Exemple #1
0
   <tr>
      <th >Employee Name</th>
      <th >Mobile</th>
      <th >Email ID</th>
      <th >Reg. Date</th>
      <th >Picked Requests</th>
      <th >Meeting Requests</th>
      <th >Demo Requests</th>
      <th >Done Requests</th>
   </tr>
  </thead>
  <tbody>
  <?php 
    while ($userRow = mysqli_fetch_array($user)) {
        $user_id = $userRow['id'];
        echo "<tr>\n            <td>" . strtoupper($userRow['first_name']) . " " . strtoupper($userRow['last_name']) . "</td>\n            <td>" . $userRow['phone'] . "</td>\n            <td>" . $userRow['email'] . "</td>\n            <td>" . $userRow['reg_date'] . "</td>\n            <td onclick='viewrequests(\"picked\", \"cem\"," . $user_id . ");'>" . countRequest('picked', 'cem', $user_id, $db_handle) . "</td>\n            <td onclick='viewrequests(\"meeting\", \"cem\"," . $user_id . ");'>" . countRequest('meeting', 'cem', $user_id, $db_handle) . "</td>\n            <td onclick='viewrequests(\"demo\", \"cem\"," . $user_id . ");'>" . countRequest('demo', 'cem', $user_id, $db_handle) . "</td>\n            <td onclick='viewrequests(\"done\", \"cem\"," . $user_id . ");'>" . countRequest('done', 'cem', $user_id, $db_handle) . "</td>\n         </tr>\n         <tr><span id='userDetails_" . $user_id . "' style='width:100%;'> </span></tr>";
    }
    ?>
  </tbody> 
</table>
<?php 
} else {
    if ($status == "open") {
        $condition = " cem_id = 0 AND me_id = 0 ";
    } elseif ($status == "meeting") {
        $condition = "status = 'meeting'";
    } elseif ($status == "all") {
        $condition = "1";
    } elseif ($status == "me_open") {
        $condition = " status = 'me_open'";
    } elseif ($status == "cem_open") {
Exemple #2
0
><a href="operator.php?status=followback">
            <div class="icon-bg bg-blue"></div><i class="glyphicon glyphicon-repeat"></i>
            <span class="menu-title">Follow back Requests</span><?php 
echo countRequest('followback', $type, $user_id, $db_handle);
?>
</a>
          </li>
          <li <?php 
if ($_GET['status'] == 'feedback') {
    echo "class='active'";
}
?>
><a href="operator.php?status=feedback">
            <div class="icon-bg bg-blue"></div><i class="glyphicon glyphicon-repeat"></i>
            <span class="menu-title">Feedback Requests</span><?php 
echo countRequest('feedback', $type, $user_id, $db_handle);
?>
</a>
          </li>
          <li ><a href="insert.php">
            <div class="icon-bg bg-red"></div><i class="glyphicon glyphicon-plus"></i>
            <span class="menu-title">Insert New Service Request</span></a>
          </li>
          <li ><a href="insertworker.php">
            <div class="icon-bg bg-red"></div><i class="glyphicon glyphicon-plus"></i>
            <span class="menu-title">Insert New Worker</span></a>
          </li>
        </ul>
      </div>
    </nav>
    <div id="page-wrapper">
Exemple #3
0
 */
// allowed 'srcfld*' parameter values for each 'srctbl' value
$allowedSrcFields = array('users' => '"usergrpid", "alias", "fullname", "userid"', 'triggers' => '"description", "triggerid", "expression"', 'items' => '"itemid", "name"', 'prototypes' => '"itemid", "name", "flags"', 'graphs' => '"graphid", "name"', 'sysmaps' => '"sysmapid", "name"', 'slides' => '"slideshowid"', 'help_items' => '"key"', 'screens' => '"screenid"', 'screens2' => '"screenid", "name"', 'nodes' => '"nodeid", "name"', 'drules' => '"druleid", "name"', 'dchecks' => '"dcheckid", "name"', 'proxies' => '"hostid", "host"', 'usrgrp' => '"usrgrpid", "name"', 'applications' => '"applicationid", "name"', 'scripts' => '"scriptid", "name"', 'hosts' => '"hostid", "host"', 'templates' => '"hostid", "host"', 'host_templates' => '"hostid", "host"', 'host_groups' => '"groupid", "name"');
// VAR	TYPE	OPTIONAL	FLAGS	VALIDATION	EXCEPTION
$fields = array('dstfrm' => array(T_ZBX_STR, O_OPT, P_SYS, NOT_EMPTY, '!isset({multiselect})'), 'dstfld1' => array(T_ZBX_STR, O_OPT, P_SYS, NOT_EMPTY, '!isset({multiselect})'), 'srctbl' => array(T_ZBX_STR, O_MAND, P_SYS, NOT_EMPTY, null), 'srcfld1' => array(T_ZBX_STR, O_MAND, P_SYS, IN($allowedSrcFields[$_REQUEST['srctbl']]), null), 'nodeid' => array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, null), 'groupid' => array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, null), 'group' => array(T_ZBX_STR, O_OPT, null, null, null), 'hostid' => array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, null), 'host' => array(T_ZBX_STR, O_OPT, null, null, null), 'parent_discoveryid' => array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, null), 'screenid' => array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, null), 'templates' => array(T_ZBX_STR, O_OPT, null, NOT_EMPTY, null), 'host_templates' => array(T_ZBX_STR, O_OPT, null, NOT_EMPTY, null), 'multiselect' => array(T_ZBX_INT, O_OPT, null, null, null), 'submit' => array(T_ZBX_STR, O_OPT, null, null, null), 'excludeids' => array(T_ZBX_STR, O_OPT, null, null, null), 'only_hostid' => array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, null), 'monitored_hosts' => array(T_ZBX_INT, O_OPT, null, IN('0,1'), null), 'templated_hosts' => array(T_ZBX_INT, O_OPT, null, IN('0,1'), null), 'real_hosts' => array(T_ZBX_INT, O_OPT, null, IN('0,1'), null), 'normal_only' => array(T_ZBX_INT, O_OPT, null, IN('0,1'), null), 'with_applications' => array(T_ZBX_INT, O_OPT, null, IN('0,1'), null), 'with_graphs' => array(T_ZBX_INT, O_OPT, null, IN('0,1'), null), 'with_items' => array(T_ZBX_INT, O_OPT, null, IN('0,1'), null), 'with_simple_graph_items' => array(T_ZBX_INT, O_OPT, null, IN('0,1'), null), 'with_triggers' => array(T_ZBX_INT, O_OPT, null, IN('0,1'), null), 'with_monitored_triggers' => array(T_ZBX_INT, O_OPT, null, IN('0,1'), null), 'itemtype' => array(T_ZBX_INT, O_OPT, null, null, null), 'value_types' => array(T_ZBX_INT, O_OPT, null, BETWEEN(0, 15), null), 'numeric' => array(T_ZBX_INT, O_OPT, null, IN('0,1'), null), 'reference' => array(T_ZBX_STR, O_OPT, null, null, null), 'writeonly' => array(T_ZBX_STR, O_OPT, null, null, null), 'noempty' => array(T_ZBX_STR, O_OPT, null, null, null), 'select' => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, null, null), 'submitParent' => array(T_ZBX_INT, O_OPT, null, IN('0,1'), null));
// unset disabled item types
$allowed_item_types = array(ITEM_TYPE_ZABBIX, ITEM_TYPE_ZABBIX_ACTIVE, ITEM_TYPE_SIMPLE, ITEM_TYPE_INTERNAL, ITEM_TYPE_AGGREGATE, ITEM_TYPE_SNMPTRAP);
if (isset($_REQUEST['itemtype']) && !str_in_array($_REQUEST['itemtype'], $allowed_item_types)) {
    unset($_REQUEST['itemtype']);
}
// set destination/source fields
$dstfldCount = countRequest('dstfld');
for ($i = 2; $i <= $dstfldCount; $i++) {
    $fields['dstfld' . $i] = array(T_ZBX_STR, O_OPT, P_SYS, null, null);
}
$srcfldCount = countRequest('srcfld');
for ($i = 2; $i <= $srcfldCount; $i++) {
    $fields['srcfld' . $i] = array(T_ZBX_STR, O_OPT, P_SYS, IN($allowedSrcFields[$_REQUEST['srctbl']]), null);
}
check_fields($fields);
// validate permissions
if (get_request('only_hostid')) {
    if (!API::Host()->isReadable(array($_REQUEST['only_hostid']))) {
        access_deny();
    }
} else {
    if (get_request('hostid') && !API::Host()->isReadable(array($_REQUEST['hostid'])) || get_request('groupid') && !API::HostGroup()->isReadable(array($_REQUEST['groupid']))) {
        access_deny();
    }
    if (get_request('nodeid')) {
        $node = get_node_by_nodeid($_REQUEST['nodeid']);
Exemple #4
0
            <span class="menu-title">Not Interested</span><?php 
            echo countRequest('not_interested', $type, $user_id, $db_handle);
            ?>
</a>
          </li>
          <li><a href="request.php?status=decay">
            <div class="icon-bg bg-blue"></div><i class="glyphicon glyphicon-trash"></i>
            <span class="menu-title">Decay Requests</span><?php 
            echo countRequest('decay', $type, $user_id, $db_handle);
            ?>
</a>
          </li>
          <li ><a href="request.php?status=24">
            <div class="icon-bg bg-blue"></div><i class=" glyphicon glyphicon-time"></i>
            <span class="menu-title">View 24hours Requests</span><?php 
            echo countRequest('24', $type, $user_id, $db_handle);
            ?>
</a>
          </li>
          <li><a href="area.php">
            <div class="icon-bg bg-blue"></div><i class="glyphicon glyphicon-print"></i>
            <span class="menu-title">Print Area</span></a>
          </li>
          <?php 
        }
    }
}
?>
          <li class="active"><a href="insert.php">
            <div class="icon-bg bg-red"></div><i class="glyphicon glyphicon-plus"></i>
            <span class="menu-title">Insert New Service Request</span></a>
Exemple #5
0
<?php

session_start();
if (!isset($_SESSION['user_id'])) {
    header('Location: index.php');
}
require_once "../components/dbConnection.php";
if (isset($_POST['user_id'])) {
    $user_id = $_POST['user_id'];
    $type = $_POST['type'];
    $data = "";
    if ($type == 'cem') {
        $data .= "<div class='list-group'>\n\t                <p style='font-size:16px;padding-left: 2em;'>\n\t                    <a  class='list-group-item active'> Picked Requests " . countRequest('picked', $type, $user_id, $db_handle) . "<button class='btn btn-success pull-right' onclick='viewrequestDetails(\"picked\", \"" . $type . "\", " . $user_id . ");'>Details</button></a>\n\t                    <a class='list-group-item'>Meeting Requests" . countRequest('meeting', $type, $user_id, $db_handle) . "<button class='btn btn-success pull-right' onclick='viewrequestDetails(\"meeting\",\"" . $type . "\", " . $user_id . ")'>Details</button></a>\n\t                    <a  class='list-group-item'> Demo Requests" . countRequest('demo', $type, $user_id, $db_handle) . "  <button class='btn btn-success pull-right' onclick='viewrequestDetails(\"demo\", \"" . $type . "\", " . $user_id . ")'>Details</button></a>\n\t                    <a  class='list-group-item'> Done Requests" . countRequest('done', $type, $user_id, $db_handle) . "<button class='btn btn-success pull-right' onclick='viewrequestDetails(\"done\", \"" . $type . "\", " . $user_id . ")'>Details</button></a>\n\t                </p>\n\t            </div>";
    } else {
        if ($type == 'me') {
            $data .= "<div class='list-group'>\n\t                <p style='font-size:16px;padding-left: 2em;'>\n\t                    <a  class='list-group-item active'> Picked Requests" . countRequest('picked', $type, $user_id, $db_handle) . "<button class='btn btn-success pull-right' onclick='viewrequestDetails(\"picked\",\"" . $type . "\", " . $user_id . ")'>Details</button></a>\n\t                    <a  class='list-group-item'> Done Requests" . countRequest('done', $type, $user_id, $db_handle) . "<button class='btn btn-success pull-right' onclick='viewrequestDetails(\"done\",\"" . $type . "\", " . $user_id . ")'>Details</button></a>\n\t                </p>\n\t            </div>";
        } else {
            if ($type == 'operator') {
            } else {
                if ($type == 'admin') {
                } else {
                    if ($type == 'accountant') {
                    } else {
                        if ($type == 'ba') {
                        } else {
                            if ($type == 'dev') {
                            } else {
                            }
                        }
                    }
                }