Beispiel #1
0
include "code-list.php";
include "user-list.php";
$title = "{$system_name} Request Ranking List";
// Recommended way of limiting queries to not include sub-tables for 7.1
$result = awm_pgexec($dbconn, "SET SQL_Inheritance TO OFF;");
require_once "top-menu-bar.php";
require_once "page-header.php";
// Initialise variables.
include "system-list.php";
if (is_member_of('Admin', 'Support')) {
    $system_list = get_system_list("", "{$system_id}");
} else {
    $system_list = get_system_list("CES", "{$system_id}");
}
include "organisation-list.php";
$org_list = get_organisation_list("{$org_code}");
?>

<form  method="POST" action="<?php 
echo $PHP_SELF;
?>
" class=row1>
  <table align=center>
    <tr>
      <td class=smb>&nbsp;System:</td>
      <td class=sml>
        <select class=sml name=system_id>
          <option>(All)</option>
          <?php 
echo $system_list;
?>
Beispiel #2
0
        $user_list = "<option value=\"\">--- All Users ---</option>" . get_user_list("Support,Contractor", "", $user_no);
    }
    echo "<td class=smb align=right>&nbsp;&nbsp;Work&nbsp;By:</td><td class=sml><select class=sml name=user_no>{$user_list}</select></td>\n";
    printf("<td align=right><input type=checkbox value=1 name=uncharged%s></td><td align=left class=smb><label for=uncharged>Uncharged</label></td>\n", "{$uncharged}" != "" ? " checked" : "");
    printf("<td align=right><input type=checkbox value=1 name=charge%s></td><td align=left class=smb><label for=charge>Charge</label></td>\n", "{$charge}" != "" ? " checked" : "");
    echo "</tr></table></td>\n<tr><td><table border=0 cellpadding=0 cellspacing=0 width=100%>\n";
    include "system-list.php";
    if (is_member_of('Admin', 'Support')) {
        $system_list = get_system_list("", "{$system_id}", 35);
    } else {
        $system_list = get_system_list("CES", "{$system_id}", 35);
    }
    echo "<td class=smb>System:</td><td class=sml><font size=1><select class=sml name=system_id><option value=\"\">--- All Systems ---</option>{$system_list}</select></font></td>\n";
    if (is_member_of('Admin', 'Support')) {
        include "organisation-list.php";
        $orglist = "<option value=\"\">--- All Organisations ---</option>\n" . get_organisation_list("{$org_code}", 35);
        echo "<td class=smb>&nbsp; &nbsp;Organisation:</td><td class=sml><select class=sml name=\"org_code\">\n{$orglist}</select></td>\n";
    }
    echo "<td align=left><input type=submit class=submit alt=go id=go value=\"GO>>\"name=go></td>\n";
    echo "</tr></table></td></tr>\n<tr><td><table border=0 cellspacing=0 cellpadding=0 width=100%><tr valign=middle>\n<td class=smb align=right>Work&nbsp;From:</td>\n<td nowrap class=smb><input type=text size=10 name=from_date class=sml value=\"{$from_date}\">\n<a href=\"javascript:show_calendar('forms.form.from_date');\" onmouseover=\"window.status='Date Picker';return true;\" onmouseout=\"window.status='';return true;\">" . $theme->Image("date-picker.gif") . "</a>\n</td>\n\n<td class=smb align=right>&nbsp;To:</td>\n<td nowrap class=smb><input type=text size=10 name=to_date class=sml value=\"{$to_date}\">\n<a href=\"javascript:show_calendar('forms.form.to_date');\" onmouseover=\"window.status='Date Picker';return true;\" onmouseout=\"window.status='';return true;\">" . $theme->Image("date-picker.gif") . "</a>\n</td>\n<td class=smb align=right>&nbsp;Type:</td>\n<td nowrap class=smb><select name=\"type_code\" class=sml><option value=\"\">-- All Types --</option>{$request_types}</select></td>\n</tr></table></td>\n</tr>\n</table>\n</form>\n";
}
$numcols = 7;
if ("{$search_for}{$system_id} " != "") {
    $query = "SELECT request.*, organisation.*, request_timesheet.*, ";
    $query .= " worker.fullname AS worker_name, requester.fullname AS requester_name";
    $query .= " FROM request, usr AS worker, usr AS requester, organisation, request_timesheet ";
    $query .= " WHERE request_timesheet.request_id = request.request_id";
    $query .= " AND worker.user_no = work_by_id ";
    $query .= " AND requester.user_no = requester_id ";
    $query .= " AND organisation.org_code = requester.org_code ";
    if (isset($user_no) && $user_no > 0) {
Beispiel #3
0
}
if (!isset($to_date)) {
    $to_date = date('d/m/y', mktime(0, 0, 0, date("m"), 0, date("Y")));
}
if (!isset($break_columns)) {
    $break_columns = 2;
}
if (is_member_of('Admin', 'Accounts')) {
    $system_list = get_system_list("", $system_id);
    $user_list = get_user_list("Support", "", $users);
} else {
    $system_list = get_system_list("CES", $system_id);
    $users = array($session->user_no);
    $user_list = "<option value=\"" . $session->user_no . "\">" . substr($session->fullname, 0, 25) . " (" . $session->abbreviation . ")" . "</option>";
}
$organisation_list = get_organisation_list($organisation_code);
$request_types = get_code_list("request", "request_type", "{$request_type}");
$quote_types = get_code_list("request_quote", "quote_type", "{$quote_type}");
$period_total = "week";
$select_columns = array("" => "", "Organisation" => "o.org_name", "System" => "ws.system_desc", "WR#" => "r.request_id", "Work By" => "rtu.fullname", "Request Brief" => "r.brief", "Request Status" => "r.last_status");
// $select_columns=array(""=>"","Organisation"=>"o.org_name","System"=>"r.system_id","WR#"=>"r.request_id","Work By"=>"rtu.fullname","Request Brief"=>"r.brief","Request Status"=>"r.last_status");
function buildSelect($name, $key_values, $current)
{
    // global $select_columns;
    $select = "<select name=\"" . $name . "\" class=\"sml\" id=\"" . $name . "\">\n";
    foreach ($key_values as $key => $value) {
        $select .= "<option";
        if ($key == $current) {
            $select .= " selected=\"selected\"";
        }
        $select .= ">{$key}</option>\n";