| [ PHPXref.com ] | [ Generated: Sun Jul 20 19:19:23 2008 ] | [ PBS Helpdesk 0.93 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php ; 2 include "init.php3"; 3 $users_id=get_login_id(); 4 5 6 7 $command="select ugroup from users where users_id=$users_id"; 8 $res1=mysql_query_wrap($command); 9 $row = mysql_fetch_row($res1); 10 $ugroup=$row[0]; 11 12 if($function<>"refresh"){ 13 $command="select option1,option2,option3,option4,option5,option6,option7 from users"; 14 $command=$command." where users_id=$users_id"; 15 $res1=mysql_query_wrap($command); 16 $row = mysql_fetch_row($res1); 17 $option1=$row[0]; 18 $option2=0; 19 $option3=$row[2]; 20 $option4=0; 21 $option5=$row[4]; 22 $option6=$row[5]; 23 24 $sortorder=$option6; 25 $pieces = explode(" ", $option6); 26 $option6=$pieces[0]; 27 $option8=$pieces[1]; 28 //$sortorder=$option8; 29 30 $option7=$row[6]; 31 if($users=="")$users=$option1; /* if MyWork don't change $users ***********************************/ 32 $andor1=$option2; 33 $creator=$option3; 34 $andor2=$option4; 35 $status=$option5; 36 37 38 $srefresh=$option7; 39 }else{ 40 $option1=$users; 41 $option2=0; 42 $option3=$creator; 43 $option4=0; 44 $option5=$status; 45 46 $option6=$sortorder; 47 48 $option7=$srefresh; 49 $option8=$sortupdown; 50 } 51 52 //################################################################################################################# 53 // My Calls should show all not closed calls **************************************************** 54 if($todo==2 && $function<>"refresh"){ 55 $option1=$users_id; 56 $users=$users_id; 57 $option3=0; 58 $creator=$option3; 59 $option5=99; 60 $status=$option5; 61 $option7=$srefresh; 62 $pieces = explode(" ", $option6); 63 64 } 65 //################################################################################################################### 66 67 68 69 echo "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\"> 70 <html><BODY onLoad=\"parent.frames['PBStop'].location.href='top.php3?function=init'\" 71 background=\"$pbs_background1\"> 72 <head>"; 73 if($srefresh){ 74 echo "<meta http-equiv=\"refresh\" content=\"$pbs_refresh; 75 URL=calls.php3?myoffset=0\">"; 76 } 77 echo"<meta http-equiv=\"Content-Type\" content=\"text/html; iso-8859-1\"> 78 <title>Hauptseite-Frame - Calls</title> 79 <!base target=\"PBS\"> 80 </head> 81 <body> 82 <CENTER>"; 83 if($todo<>5){ // if no workflow, show top ...******************************************* 84 85 echo "<TABLE border=0 ALIGN=CENTER > 86 <tr> 87 <td></td> 88 <FORM ACTION=usersearch.html METHOD=GET> 89 <td><input type=\"submit\" value=\"$pbsl_newcall\"></td> 90 </FORM> 91 <FORM ACTION=calls.php3?function=refresh&myoffset=0 METHOD=POST> 92 <td><input type=\"submit\" value=\"$pbsl_refresh\"></td>"; 93 94 95 96 if($srefresh) 97 echo "<td><input type=checkbox name=\"srefresh\" checked value=\"1\">$pbsl_autorefresh 98 $pbs_refresh s</td> "; 99 else 100 echo "<td><input type=checkbox name=\"srefresh\" value=\"1\">$pbsl_autorefresh 101 $pbs_refresh s</td>"; 102 echo " 103 <td><input type=checkbox name=\"storeoption\" value=\"1\"> $pbsl_storesettings</td> 104 </tr> 105 </TABLE> 106 <TABLE border=1 ALIGN=CENTER > 107 <tr> 108 <td> $pbsl_processor <select name=\"users\">"; 109 echo "<option value=\"0\"> $pbsl_all"; 110 111 $res1 = mysql_query_wrap("select name, users_id from users order by name"); 112 $i=0; 113 while ($i < mysql_num_rows ($res1)) { 114 $row = mysql_fetch_row($res1); 115 /* if($row[1]==$option1) echo "<option value=\"$row[1]\" selected> $row[0]"; */ 116 if($row[1]==$users) echo "<option value=\"$row[1]\" selected> $row[0]"; 117 else echo "<option value=\"$row[1]\"> $row[0]"; 118 $i++; 119 } 120 echo "</select></td>"; 121 echo "<td>$pbsl_and</td> <td> $pbsl_operator <select name=\"creator\"> "; 122 echo "<option value=\"0\"> $pbsl_all"; 123 124 $res1 = mysql_query_wrap("select name, users_id from users order by name"); 125 $i=0; 126 while ($i < mysql_num_rows ($res1)) { 127 $row = mysql_fetch_row($res1); 128 if($row[1]==$option3) echo "<option value=\"$row[1]\" selected> $row[0]"; 129 else echo "<option value=\"$row[1]\"> $row[0]"; 130 $i++; 131 } 132 echo "</select></td> 133 134 135 </td>"; 136 137 echo "<td>$pbsl_and <input type=\"hidden\" name=\"todo\" value=$todo></td> 138 <td> $pbsl_status <select name=\"status\"> 139 140 <option value=\"0\"> $pbsl_all"; 141 142 $res1 = mysql_query_wrap("select status, status_id from call_status order by status"); 143 $i=0; 144 while ($i < mysql_num_rows ($res1)) { 145 $row = mysql_fetch_row($res1); 146 if($row[1]==$option5) echo "<option value=\"$row[1]\" selected> $row[0]"; 147 else echo "<option value=\"$row[1]\"> $row[0]"; 148 $i++; 149 } 150 if(99==$option5) echo "<option value=\"99\" selected>$pbsl_notclosed"; 151 else echo "<option value=\"99\">$pbsl_notclosed"; 152 153 if($option6=="open_date") $so1="selected"; else $so1=""; 154 if($option6=="call_type") $so2="selected"; else $so2=""; 155 if($option6=="deadline") $so3="selected"; else $so3=""; 156 if($option6=="users_calls.users_id") $so4="selected"; else $so4=""; 157 if($option6=="people.last_name") $so5="selected"; else $so5=""; 158 if($option6=="priority") $so6="selected"; else $so6=""; 159 160 //$option8=$sortupdown; 161 if($option8=="DESC") $soud1="selected"; else $soud1=""; 162 if($option8=="ASC") $soud2="selected"; else $soud2=""; 163 164 165 echo " </select> 166 </td> 167 <td>$pbsl_orderby: 168 <select name=\"sortorder\" > 169 <option value=\"open_date\" $so1>$pbsl_date 170 <option value=\"call_type\" $so2>$pbsl_kind 171 <option value=\"deadline\" $so3>$pbsl_deadline 172 <option value=\"users_calls.users_id\" $so4>$pbsl_operatorid 173 <option value=\"people.last_name\" $so5>$pbsl_user 174 <option value=\"priority\" $so6>$pbsl_priority 175 </select> 176 </td> 177 178 </select> 179 <td> 180 <select name=\"sortupdown\" > 181 <option value=\"DESC\" $soud1>> 182 <option value=\"ASC\" $soud2>< 183 </select> 184 </td> 185 186 187 188 </tr> 189 </TABLE> 190 </FORM>"; 191 } // end if no workflow **************************************************************** 192 193 echo "<TABLE border=1 table width=99% ALIGN=CENTER > 194 <tr> 195 <td>$pbsl_nr</td> 196 <td>$pbsl_calldate</td> 197 <td>$pbsl_status</td> 198 <td>$pbsl_user</td> 199 <td>$pbsl_description</td> 200 <td>$pbsl_operator</td> 201 <td>$pbsl_processor</td> 202 </tr> 203 <tr> 204 </tr>"; 205 206 /* if($function=="refresh"){ */ 207 208 209 if($storeoption==1) { /* Einstellunge speichern */ 210 211 $command="update $db_name.users set 212 option1=$users,option2=0,option3=$creator,option4=0,option5=$status,option6='$sortorder $sortupdown',option7=".intval($srefresh); 213 $command=$command." where users_id=$users_id"; 214 mysql_query_wrap($command); 215 } 216 217 218 219 if($status>0) $myfilter=" and $db_name.call_status.status_id=$status"; 220 /* wenn =99 alle die nicht geschlossen bzw. verworfen sind */ 221 if($status==99) $myfilter=" and $db_name.call_status.status_id<>1 and 222 $db_name.call_status.status_id<>4"; 223 if($creator>0) $myfilter=$myfilter." and call1.creator=$creator"; 224 225 // if($todo==2){ $myfilter=$myfilter." and $db_name.users_calls.users_id=$users_id";} 226 // My Calls should show all not closed calls **************************************************** 227 //if($todo==2){ $myfilter=" and $db_name.call_status.status_id<>1 and 228 //$db_name.call_status.status_id<>4 and $db_name.users_calls.users_id=$users_id";} 229 230 /*****************************************************************************/ 231 if($users>0){ $myfilter=$myfilter." and 232 users_calls.users_id=$users";} 233 234 if($todo==1) $myfilter=$myfilter." and call1.call_type=5"; 235 else if($todo==3) $myfilter=$myfilter." and call1.call_type=5 and users_calls.users_id=$users_id"; 236 else $myfilter=$myfilter." and call1.call_type<>5"; 237 238 /* nur für AIS - Gastro, wenn Gruppe 2 *******************************/ 239 if($ugroup==2) $myfilter=$myfilter." and call1.call_obj=9999"; 240 /*********************************************************************/ 241 242 // todo 5 is workflow ******************** 243 if($todo==5) $myfilter=" and call1.wflow='$wflow'"; 244 245 if($option6 == "priority") $sortorder="calltype.soltime , open_date"; 246 247 248 $command = "select call1.call_id, date_format(open_date, '%d.%m.%Y'), call_status.status,people.last_name,people.first_name, 249 call1.error_decr, users.name,call1.creator,users_calls.users_id,UNIX_TIMESTAMP(open_date),call_type,call1.status_id, 250 call1.priority, calltype.soltime, call1.call_obj, date_format(call1.deadline,'%Y%m%d'),wflow 251 from call1, people, call_status, users_calls, calltype, users where 252 call1.people_id=people.people_id and call1.status_id=call_status.status_id and 253 call1.call_id=users_calls.call_id and call1.creator=users.users_id 254 and call1.call_type=calltype.type_id and call1.priority=calltype.priority 255 $myfilter order by $sortorder $sortupdown LIMIT $myoffset,$maxrows"; 256 257 258 259 // ********* 260 //echo "<p>todo=$todo<p><p>$command<p>"; 261 262 $res1 = mysql_query_wrap($command); 263 264 $i=0; 265 while ($i < mysql_num_rows ($res1)) { 266 $row = mysql_fetch_row($res1); 267 $res2 = mysql_query_wrap("select name from users where users_id=$row[8]"); 268 $row2 = mysql_fetch_row($res2); 269 if($users==$row[8] || $users==0){ 270 271 /* Test Farben *********************************************/ 272 // $res3 = mysql_query_wrap("select soltime from calltype where type_id=$row[10] and 273 //priority=$row[12]"); 274 // $row3 = mysql_fetch_row($res3); 275 // echo "<br>$row3[0]<br>"; 276 $soltime=$row[13]*3600; 277 $status_color=""; 278 $sap_color=""; 279 280 // if you like to set attention to special callobject !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 281 if($row[14]==106) $sap_color="bgcolor=blue"; 282 283 if($row[16]){ $wlow_color="bgcolor=#00FFFF"; $wflowtext="($row[16])<br>";} else {$wlow_color=""; $wflowtext="";} 284 if($row[16] && $row[10]!=8) $wlow_color="bgcolor=#008080"; 285 286 if(($row[11]==2 || $row[11]==5) && $row[12]>0 ){ /* eskalieren wenn "erfaßt" oder "in Bearbeitung" */ 287 $mytime=time(void)-$row[9]; /* jetzt - Erfassung */ 288 if($mytime>$soltime*70/100)$status_color="bgcolor=yellow"; 289 if($mytime>$soltime*90/100)$status_color="bgcolor=red"; 290 } 291 292 if($row[15]<>0 ){ // **************** if deadline - wishdate exist 293 $status_color=""; 294 $myday=date("Ymd"); 295 $mytime=$row[15]-$myday; /* wish-now */ 296 if($mytime==1)$status_color="bgcolor=yellow"; 297 if($mytime<=0)$status_color="bgcolor=red"; 298 299 } 300 301 // only if .. priority higher than low ...blink.. 302 if(($mytime>$soltime) && $status_color>"" && $row[12]>1 )$blink='blink'; else $blink='center'; 303 304 echo 305 "<tr><td><A href=\"call.php3?function=change&call=$row[0]&todo=$todo\" target=\"PBSmain\"> $row[0]</A></td><td> 306 $row[1]</td><td $status_color><center><$blink>$row[2]</td><td>$row[3], 307 $row[4]</td><td $sap_color>$row[5] $wflowtext </td><td>$row[6]</td><td $wlow_color>$row2[0]</td>"; 308 echo "</tr>"; 309 } 310 $i++; 311 } 312 313 echo "</TABLE>"; 314 echo "<br>$pbsl_count Calls=$i<br>"; 315 if($todo==1)mynavigator($myoffset,$i,$todo,$users,$creator,$status,$sortorder,$sortupdown); 316 else mynavigator($myoffset,$i,0,$users,$creator,$status,$sortorder,$sortupdown); 317 318 319 if($todo==5) echo "<p><A href=\"wflow.php?function=changeview&standardworkflow=$wflow&users_id=$users_id\">$wflow </a>"; 320 321 322 323 324 /* } */ /* End if function=refresh */ 325 echo "</body></html>"; 326 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |