|
From: Sebastian D. <se...@us...> - 2006-03-06 17:40:23
|
Update of /cvsroot/wackofork/wiki/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22115 Modified Files: vcard.php Log Message: - std-link methode verwendet Index: vcard.php =================================================================== RCS file: /cvsroot/wackofork/wiki/actions/vcard.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** vcard.php 1 Mar 2006 17:04:50 -0000 1.2 --- vcard.php 6 Mar 2006 17:40:19 -0000 1.3 *************** *** 17,20 **** --- 17,22 ---- # the above three licenses. + # TODO: new VCard Class + # TODO: new LDAPServer Class ################################################################################ *************** *** 35,38 **** --- 37,41 ---- # Standart-Attribute-Ausgabe-Sets $user_card_set = array(array ("generate-postalAddress", "postalAddress"), "blankline", "generate-contact"); + #$user_card_set = array(array ("generate-postalAddress", "postalAddress"), "blankline", "generate-contact"); #$user_card01_set = array(array ("displayName", "cn"), "title", "telephoneNumber", "mail"); #$user_card03_set = array("generate-postalAddress", "blankline", "telephoneNumber", "facsimileTelephoneNumber", "blankline", "generate-mail", "generate-urls"); *************** *** 40,43 **** --- 43,47 ---- $GLOBALS['LDAP_CONFIG']=$LDAP_CONFIG; + $GLOBALS['wacko'] = $this; # outch!! *************** *** 176,183 **** --- 180,191 ---- ################################################################################ + # TODO: Alle Links durch wacko generieren lassen if (!function_exists('value2layout')) { function value2layout ($value, $type) { + # take the wacko object; + $wacko = $GLOBALS['wacko']; + # Falls kein Array übergeben wird, dann erschaffe einen if (!is_array($value)) $value[$type][0]=$value; *************** *** 212,219 **** return value2html($value[$type][0]); - case "mail": if (isset($value[$type][0])) ! return "<a href=\"mailto:". $value[$type][0] ."\">eMail</a><br>\n"; --- 220,227 ---- return value2html($value[$type][0]); case "mail": if (isset($value[$type][0])) ! return $wacko->Link("mailto:". $value[$type][0], "", "eMail", 1, 1); ! # return "<a href=\"mailto:". $value[$type][0] ."\">eMail</a><br>\n"; *************** *** 223,227 **** if ((isset($value['telephoneNumber'][0]))||(isset($value['facsimileTelephoneNumber'][0]))||(isset($value['mail'][0]))||(isset($value['homePhone'][0]))||(isset($value['mobile'][0]))) { ! $return.="<table cellpadding=0 cellspacing=0 border=0>"; if (isset($value['telephoneNumber'][0])) { --- 231,235 ---- if ((isset($value['telephoneNumber'][0]))||(isset($value['facsimileTelephoneNumber'][0]))||(isset($value['mail'][0]))||(isset($value['homePhone'][0]))||(isset($value['mobile'][0]))) { ! $return.="<table class='vCard'>"; if (isset($value['telephoneNumber'][0])) { *************** *** 254,258 **** if (isset($value['mail'][0])) { ! $return.="<a href=\"mailto:". $value['mail'][0] ."\">eMail</a>"; $MAILDONE=", "; } --- 262,267 ---- if (isset($value['mail'][0])) { ! $return.=$wacko->Link("mailto:".$value['mail'][0], "", "eMail", 1, 1); ! #$return.="<a href=\"mailto:". $value['mail'][0] ."\">eMail</a>"; $MAILDONE=", "; } *************** *** 263,267 **** { $URIexplode = explode(" ", $value['labeledURI'][0], 2); ! $return.="$MAILDONE<a href=\"$URIexplode[0]\">$URIexplode[1]</a>"; } --- 272,277 ---- { $URIexplode = explode(" ", $value['labeledURI'][0], 2); ! $return.=$MAILDONE . $wacko->Link($URIexplode[0], "", $URIexplode[1], 1, 1); ! #$return.="$MAILDONE<a href=\"$URIexplode[0]\">$URIexplode[1]</a>"; } *************** *** 269,273 **** { $URIexplode = explode(" ", $value['labeledURI'][$i], 2); ! $return.=", <a href=\"$URIexplode[0]\">$URIexplode[1]</a>"; } $return.="</td></tr>"; --- 279,284 ---- { $URIexplode = explode(" ", $value['labeledURI'][$i], 2); ! $return.=", ".$wacko->Link($URIexplode[0], "", $URIexplode[1], 1, 1); ! #$return.=", <a href=\"$URIexplode[0]\">$URIexplode[1]</a>"; } $return.="</td></tr>"; *************** *** 280,284 **** case "generate-mail": if (isset($value['mail'][0])) ! return "eMail: <a href=\"mailto:". $value['mail'][0] ."\">". $value['mail'][0] ."</a><br>"; case "generate-urls": --- 291,296 ---- case "generate-mail": if (isset($value['mail'][0])) ! return "eMail: ".$wacko->Link($value['mail'][0], "", $value['mail'][0], 1, 1)."<br />"; ! #return "eMail: <a href=\"mailto:". $value['mail'][0] ."\">". $value['mail'][0] ."</a><br>"; case "generate-urls": *************** *** 286,290 **** { $URIexplode = explode(" ", $value['labeledURI'][0], 2); ! return "Web: <a href=\"". $URIexplode[0] ."\">". $URIexplode[1] ."</a><br>"; } --- 298,303 ---- { $URIexplode = explode(" ", $value['labeledURI'][0], 2); ! return "Web: ".$wacko->Link($URIexplode[0], "", $URIexplode[1], 1, 1)."<br />"; ! #return "Web: <a href=\"". $URIexplode[0] ."\">". $URIexplode[1] ."</a><br>"; } *************** *** 298,302 **** if (isset($value['postOfficeBox'][0])) $return.=$value['postOfficeBox'][0] ."<br>"; ! if (isset($value['street'][0])) $return.=$value['street'][0] ."<br>"; if (isset($value['postalCode'][0])) $return.=$value['postalCode'][0] ." "; --- 311,319 ---- if (isset($value['postOfficeBox'][0])) $return.=$value['postOfficeBox'][0] ."<br>"; ! if (isset($value['street'][0])) ! if (isset($value['roomNumber'][0])) ! $return.=$value['street'][0].", Zimmer ".$value['roomNumber'][0] ."<br>"; ! else ! $return.=$value['street'][0] ."<br>"; if (isset($value['postalCode'][0])) $return.=$value['postalCode'][0] ." "; *************** *** 358,370 **** if (!auth_anon2()) { ! print "<h3>LDAP Verbindungsfehler!</h3>"; } else if (!($entry = searchPeople($name, $value))) { ! print "<h3>LDAP Objekt nicht gefunden!</h3>"; } else { ! print "<table cellpadding=5>\n"; print "<tr><td valign=top><img src=\"".$this->conf->getValue('base_url')."images/jpegPhoto.php?name=$name&value=$value\"></td>"; print "<td valign=top>"; --- 375,388 ---- if (!auth_anon2()) { ! print "<p><i>LDAP Verbindungsfehler!</i></p>"; } else if (!($entry = searchPeople($name, $value))) { ! print "<p><i>LDAP Objekt nicht gefunden!</i></p>"; } else { ! # TODO: output-table in value2layout, not here ! print "<table class='vCard'>\n"; print "<tr><td valign=top><img src=\"".$this->conf->getValue('base_url')."images/jpegPhoto.php?name=$name&value=$value\"></td>"; print "<td valign=top>"; |