コード例 #1
0
ファイル: Support.php プロジェクト: TaylorMonacelli/phplib
     // and don't forget this!
 }
 if ($rowcount) {
     $q_SupportTickets->start_row = $startingwith;
     $q_SupportTickets->row_count = $rowcount;
 }
 if ($submit == 'Search') {
     $query = $q_SupportTickets->search($t->map_cols);
 }
 // When we hit that page a second time, the array named
 // by $base will be set and we must generate the $query.
 // Ah, and don\'t set $base to "q" when $q is your Sql_Query
 // object... :-)
 if (array_key_exists("x", $_POST)) {
     get_request_values("x");
     $query = $q_SupportTickets->where("x", 1);
     $hideQuery = "";
 } else {
     $hideQuery = "style='display:none'";
 }
 if (!$sortorder) {
     $sortorder = "id";
 }
 if (empty($query)) {
     $query = "1 order by  " . $db->qi("id") . " desc";
 }
 $db->query("SELECT COUNT(*) as total from " . $db->qi("SupportTickets") . " where " . $query);
 $db->next_record();
 if ($db->f("total") < $q_SupportTickets->start_row - $q_SupportTickets->row_count) {
     $q_SupportTickets->start_row = $db->f("total") - $q_SupportTickets->row_count;
 }
コード例 #2
0
     // ... # of conditions is variable
     $q->lang = "en";
     // ... in English, please
     $sess->register("q");
     // and don't forget this!
 }
 if ($rowcount) {
     $q->start_row = $startingwith;
     $q->row_count = $rowcount;
 }
 // When we hit that page a second time, the array named
 // by $base will be set and we must generate the $query.
 // Ah, and don\'t set $base to "q" when $q is your Sql_Query
 // object... :-)
 if (isset($x)) {
     $query = $q->where("x", 1);
 }
 if (!$query) {
     if ($Status) {
         $query = "Status='{$Status}'";
     } else {
         $query = "Status<>'Closed'";
     }
 }
 if (!$perm->have_perm('support') && !$perm->have_perm("admin")) {
     if ($perm->have_perm("sitecontact")) {
         $query .= " and Location in ({$Locations})";
     } else {
         $query .= " and UserName='******'";
     }
 }