Org Chart Function

17 years 5 months ago #25184 by smhaller
Replied by smhaller on topic Re:Org Chart Function
Hi,

yes you're right. Regarding your idea I think it should be possible to.

here is the important lines of linkmap.php:
[code:1]
<node BACKGROUND_COLOR="#ff6600" COLOR="#000000" TEXT="&lt;html&gt;&lt;a href=&quot;<? echo $mosConfig_live_site."/index.php?option=com_comprofiler&task=userProfile8user=68&Itemid=30"; ?>&quot; target=&quot;_parent&quot;&gt;Beat Herzog&lt;/a&gt;">
<edge STYLE="sharp_bezier" WIDTH="8"/>
<?
$result = @mysql_query("SELECT id, firstname, lastname, cb_funktion FROM ".$mosConfig_dbprefix."comprofiler where cb_reportsto='68'"«»);
$position='left';
while($row = mysql_fetch_assoc($result)) {
echo utf8_encode('<node BACKGROUND_COLOR="#006666" COLOR="#ffffff" STYLE="bubble" POSITION="'.$position.'" TEXT="'.$row." ".$row."\n".$row.'" LINK="../index.php?option=com_comprofiler&task=userProfile&user='.$row.'&Itemid=30">');
$result2 = @mysql_query("SELECT id, firstname, lastname, cb_funktion FROM ".$mosConfig_dbprefix."comprofiler WHERE cb_reportsto='".$row."' "«»);
while($row2 = mysql_fetch_assoc($result2)) {
if ($mosConfig_sef == '0' ) {
echo utf8_encode('<node POSITION="'.$position.'" TEXT="'.$row2." ".$row2."\n".$row2.'" LINK="../index.php?option=com_comprofiler&task=userProfile&user='.$row2.'&Itemid=30"/>');
}
if ($mosConfig_sef == '1' ){
echo utf8_encode('<node POSITION="'.$position.'" TEXT="'.$row2." ".$row2."\n".$row2.'" LINK="../index.php?option=com_comprofiler&task=userProfile&user='.$row2.'&Itemid=30"/>');
}
}
[/code:1]

The relation between the users are reflected by additional cb_reportsto field.

....
Question to CB professionals: How can I use "name" instead of firstname / lastname?

cu
Stefan

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.148 seconds

Facebook Twitter LinkedIn