Hi, as I promised (long time ago), here is the change to the tree menu. Now it should be displaying wards grouped in departments.
file: ../main/indexframe.php
after line 30 add
include($root_path.'language/'.$lang.'/lang_'.$lang.'_departments.php');
and after
include($root_path.'language/en/lang_en_indexframe.php');
add
include($root_path.'language/en/lang_en_departments.php');
this should set the language variables. then open
file: ../main/menu/dtree/mainmenu.inc.php
Replace all FROM //Station anzeigen; display station TO //Station anzeigen
Ende; End of station display
with this.
if ($menu['s_status']=='[station]') { //Station anzeigen; display
station
$i_stat=$j;
$i2_stat=$j-1;
$sqldep="select (select care_department.id from care_department where
care_department.nr=care_ward.dept_nr) as did, (select
care_department.name_short from care_department where
care_department.nr=care_ward.dept_nr) as dname, (select
care_department.LD_var from care_department where
care_department.nr=care_ward.dept_nr) \"LD_var\", dept_nr from care_ward
where is_temp_closed=0 group by dept_nr order by dept_nr";
$res_dept=$db->Execute($sqldep);
// begin departmens and wards
//begin department
while($dept3=$res_dept->FetchRow()) {
$d_id=$dept3['dept_nr'];
$d_name=$dept3['dname'];
$d_var=$dept3['LD_var'];
$d_did=dept3['did'];
if(isset($$d_var) && $$d_var!='') //text durch Inhalt LD_var ersetzen;
get the language dependent text
$my_d_name=$$d_var;
else
$my_d_name=$d_name;
$erg2="m.add($j,$i2_stat,'$my_d_name','','','../main/img/folderopen.gif','../main/img/folder.gif');";
echo "\n$erg2\n";
$j+=1;
//begin wards
$sql="select nr, dept_nr, ward_id, name from care_ward where
is_temp_closed=0 and dept_nr=". $d_id . " order by dept_nr";
$res_stat=$db->Execute($sql);
while($stat=$res_stat->FetchRow()){
$st_name=$stat['name'];
$st_nr=$stat['nr'];
$st_ward_id=$stat['ward_id'];
$st_dept=$stat['dept_nr'];
$erg="m.add($j,$i_stat,'$st_name','javascript:runModul(\'../modules/nursing/nursing-station-pass.php".URL_APPEND."&rt=pflege&edit=1&station=$st_ward_id&location_id=$st_ward_nr&ward_nr=$st_nr\')','','','../gui/img/common/default/blue_bullet.gif');";
$j+=1;
echo "\n$erg\n";
}$i_stat=$j;
}
} //Station anzeigen Ende; End of station display
I have also included the file mainmenu.inc.php, in case this emails
linebreaks get's messed up. p.s. if you think the language variable is too
long for the menu, as an alternative you can set the department id as text.
in line 138 change $my_d_name into $d_did
enjoy,
Emir
--
GMX ProMail mit bestem Virenschutz http://www.gmx.net/de/go/mail
+++ Empfehlung der Redaktion +++ Internet Professionell 10/04 +++
mainmenu.inc.php
Description: Binary data

