Esempio n. 1
0
 echo "<td>";
 // Have a look if this user has skills with this software
 $ssql = "SELECT softwareid FROM `{$dbUserSoftware}` ";
 $ssql .= "WHERE userid='{$userrow['id']}' AND softwareid='{$software}' ";
 $sresult = mysql_query($ssql);
 if (mysql_num_rows($sresult) >= 1) {
     echo "<strong>{$userrow['realname']}</strong>";
 } else {
     echo $userrow['realname'];
 }
 echo "</td>";
 echo "<td>" . $userrow['phone'] . "</td>";
 echo "<td>" . user_online_icon($userrow['id']) . " " . userstatus_name($userrow['status']) . "</td>";
 echo "<td>" . $userrow['message'] . "</td>";
 echo "<td align='center'>";
 $incpriority = user_incidents($userrow['id']);
 $countincidents = $incpriority['1'] + $incpriority['2'] + $incpriority['3'] + $incpriority['4'];
 if ($countincidents >= 1) {
     $countactive = user_activeincidents($userrow['id']);
 } else {
     $countactive = 0;
 }
 $countdiff = $countincidents - $countactive;
 echo "{$countactive} / {$countdiff}</td>";
 echo "<td align='center'>" . $incpriority['4'] . "</td>";
 echo "<td align='center'>" . $incpriority['3'] . "</td>";
 echo "<td align='center'>" . $incpriority['2'] . "</td>";
 echo "<td align='center'>" . $incpriority['1'] . "</td>";
 echo "<td align='center'>";
 echo $userrow['accepting'] == 'Yes' ? $strYes : "<span class='error'>{$strNo}</span>";
 echo "</td>";
 echo "<tr class='{$shade}'>";
 echo "<td><label><input type='radio' name='userid' value='{$users->id}' /> ";
 // Have a look if this user has skills with this software
 $ssql = "SELECT softwareid FROM `{$dbUserSoftware}` WHERE userid={$users->id} AND softwareid={$incident->softwareid} ";
 $sresult = mysql_query($ssql);
 if (mysql_error()) {
     trigger_error("MySQL Query Error " . mysql_error(), E_USER_WARNING);
 }
 if (mysql_num_rows($sresult) >= 1) {
     echo "<strong>{$users->realname}</strong>";
 } else {
     echo $users->realname;
 }
 echo "</label></td>";
 echo "<td>" . user_online_icon($users->id) . userstatus_name($users->status) . "</td>";
 $incpriority = user_incidents($users->id);
 $countincidents = $incpriority['1'] + $incpriority['2'] + $incpriority['3'] + $incpriority['4'];
 if ($countincidents >= 1) {
     $countactive = user_activeincidents($users->id);
 } else {
     $countactive = 0;
 }
 $countdiff = $countincidents - $countactive;
 echo "<td align='center'>{$countactive} / {$countdiff}</td>";
 echo "<td align='center'>" . $incpriority['4'] . "</td>";
 echo "<td align='center'>" . $incpriority['3'] . "</td>";
 echo "<td align='center'>" . $incpriority['2'] . "</td>";
 echo "<td align='center'>" . $incpriority['1'] . "</td>";
 echo "<td align='center'>";
 echo $users->accepting == 'Yes' ? $strYes : "<span class='error'>{$strNo}</span>";
 echo "</td>";