Beispiel #1
0
 } else {
     echo "<td class='expired'>&nbsp;</td>";
 }
 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>";
Beispiel #2
0
 if ($users->phone == '') {
     echo $strNone;
 } else {
     echo $users->phone;
 }
 echo "</td>";
 echo "<td align='center'>";
 if ($users->mobile == '') {
     echo $strNone;
 } else {
     echo $users->mobile;
 }
 echo "</td>";
 echo "<td align='left'>";
 //see if the users has been active in the last 30mins
 echo user_online_icon($users->id) . " ";
 echo userstatus_name($users->status);
 echo "</td><td align='center'>";
 if ($users->accepting == 'Yes') {
     echo $strYes;
 } else {
     echo "<span class='error'>{$strNo}</span>";
 }
 echo "</td><td>";
 echo "<a href='holidays.php?user={$users->id}' title='{$strHolidays}'>";
 echo icon('holiday', 16, $strHolidays) . "</a> ";
 echo "<a href='tasks.php?user={$users->id}' title='{$strTasks}'>";
 echo icon('task', 16, $strTask) . "</a> ";
 $sitesql = "SELECT COUNT(id) FROM `{$dbSites}` WHERE owner='{$users->id}'";
 $siteresult = mysql_query($sitesql);
 if (mysql_error()) {
 while ($users = mysql_fetch_object($result)) {
     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>";
Beispiel #4
0
         echo " <a href='{$_SERVER['PHP_SELF']}?domain=users&q={$q}&start=";
         echo $begin + $resultsperpage . "&amp;sort={$sort}&amp;order={$order}&amp;view={$view}'>{$strNext} ";
         echo icon('rightarrow', 16, $strNext) . "</a> ";
     } else {
         echo "{$strNext}";
     }
     echo "</p>";
     echo "<table align='center' width='50%'>";
     $filter['domain'] = 'users';
     echo "<tr>" . colheader(name, $strID, $sort, $order, $filter);
     echo colheader(email, $strEmail, $sort, $order, $filter);
     echo colheader(telephone, $strTelephone, $sort, $order, $filter);
     $shade = 'shade1';
     while ($row = mysql_fetch_object($userresult)) {
         $url = "javascript:incident_details_window('{$row->id}', 'incident{$row->id}')";
         echo "<tr class='{$shade}'>\n                    <td>" . user_online_icon($row->id) . " {$row->realname}</td>\n                    <td>{$row->email}</td>\n                    <td>{$row->phone}</td>\n                  </tr>";
         if ($shade == 'shade1') {
             $shade = 'shade2';
         } else {
             $shade = 'shade1';
         }
     }
     echo "</table>";
 }
 //KB RESULTS
 $kbsql = "SELECT *,MATCH (title, keywords) AGAINST ('{$search}' IN BOOLEAN MODE) AS score ";
 $kbsql .= "FROM `{$dbKBArticles}` as k ";
 $kbsql .= "WHERE MATCH (title, keywords) AGAINST ('{$search}' IN BOOLEAN MODE) ";
 if ($domain == 'kb' and !empty($sort)) {
     if ($sort == 'id') {
         $kbsql .= "ORDER BY k.title ";