/[libdata]/branches/paul/admin/res_results_brief.phtml
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /branches/paul/admin/res_results_brief.phtml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 66 by dpavlin, Tue Jan 27 20:49:26 2004 UTC revision 67 by dpavlin, Thu Mar 18 19:24:54 2004 UTC
# Line 16  printf("<link rel=\"stylesheet\" href=\" Line 16  printf("<link rel=\"stylesheet\" href=\"
16  printf("</HEAD>\n");  printf("</HEAD>\n");
17    
18    
19    // Default access settings
20    $sess_time_human = "";
21    $sess_staff_account = "";
22    $sess_staff_id = 0;
23    $sess_access_level = 0;
24    $sess_access = "";
25    $sess_last_name = "";
26    $sess_first_name = "";
27    
28    
29  // Page header  // Page header
30  require_once ($GLOBAL_ADMIN_HEADER);  require_once ($GLOBAL_ADMIN_HEADER);
31    
# Line 49  if(isset($libsession) && $sess_access_le Line 59  if(isset($libsession) && $sess_access_le
59          // Make sure some criteria was chosen (i.e. we don't want to return ALL records)          // Make sure some criteria was chosen (i.e. we don't want to return ALL records)
60          // However, a "*" for record_id means a wildcard.          // However, a "*" for record_id means a wildcard.
61                    
62          if ($account_created == "" && $account_modified == "" && $subject == "" && $author == "" && $annotation == "" && $subject_id < 1 && $title == "" &&          if ($account_created == "" && $account_modified == "" && $subject == "" &&
63                  $date_created == "" && $date_modified == "" && $location =="" && $location_id < 1 &&                  $author == "" && $annotation == "" && $subject_id < 1 && $title == "" &&
64                  $infotype_id =="" && $resource_id < 1 && $resource_id != "*" && $cat_num < 1 && $url =="" && $call_no =="" && $feature_id < 1) $problem = 2;                  $date_created == "" && $date_modified == "" && $location =="" &&
65                    $location_id < 1 && $infotype_id =="" && $resource_id < 1 &&
66                    $resource_id != "*" && $cat_num < 1 && $url =="" && $call_no =="" &&
67                    $feature_id < 1 && $feature_id < 1  && $vendor_id < 1  &&
68                    $guide_url == "") $problem = 2;
69          if ($resource_id == "*") $resource_id = "";          if ($resource_id == "*") $resource_id = "";
70    
71          // Algorithm is cleared to search          // Algorithm is cleared to search
# Line 126  if(isset($libsession) && $sess_access_le Line 140  if(isset($libsession) && $sess_access_le
140                          $sql .= " AND (r.url LIKE '%" . $url . "%')";                          $sql .= " AND (r.url LIKE '%" . $url . "%')";
141                  }                  }
142    
143                    // If user limited by help/guide url
144                    if ($guide_url != ""){
145                    
146                            $guide_url = textSearchmySQL($guide_url);
147                            $sql .= " AND (r.guide_url LIKE '%" . $guide_url . "%')";
148                    }
149    
150                  // If user limited by title                  // If user limited by title
151                  if ($title !=""){                  if ($title !=""){
152                                    
# Line 175  if(isset($libsession) && $sess_access_le Line 196  if(isset($libsession) && $sess_access_le
196                                  . $location_id                                    . $location_id  
197                                  . ")";                                  . ")";
198                  }                  }
199                    
200                    // If user limited by vendor id
201                    if ($vendor_id > 0){
202                            $sql .= " AND (r.vendor_id ="
203                                    . $vendor_id  
204                                    . ")";
205                    }              
206    
207                  // If user limited by call number                  // If user limited by call number
208                  if ($call_no !=""){                  if ($call_no !=""){
# Line 229  if(isset($libsession) && $sess_access_le Line 257  if(isset($libsession) && $sess_access_le
257                          $sql .= " ORDER BY " . $orderby . " " . $orderdir;                          $sql .= " ORDER BY " . $orderby . " " . $orderdir;
258                  }                  }
259    
260                  // Debugging                  $rs = mysql_tryquery($sql);
261                  //printf("sql was: %s<BR>", $sql);                  
   
   
                 if ( !$rs = mysql_query ( $sql, $con ) ) {  
                         sql_err ( $sql ) And bailout();  
                 }  
   
262                  // Table                  // Table
263                  printf("<center><table width=\"90%%\" border =\"1\" bgcolor =\"#ffffff\" cellpadding=\"4\">");                  printf("<center><table width=\"90%%\" border =\"1\" bgcolor =\"#ffffff\" cellpadding=\"4\">");
264    
# Line 259  if(isset($libsession) && $sess_access_le Line 281  if(isset($libsession) && $sess_access_le
281                  $rowcount = 0;                  $rowcount = 0;
282    
283                  // Cycle through the result set of unique reference id's.                  // Cycle through the result set of unique reference id's.
284                  while ( $row = mysql_fetch_array ( $rs ) ) {                  while ( $row = mysql_fetch_array ($rs, MYSQL_ASSOC)) {
285                          $resource_id = $row["resource_id"];                          $resource_id = $row["resource_id"];
286                          $title = Trim($row["title"]);                          $title = Trim($row["title"]);
287                          $publisher = Trim($row["publisher"]);                          $publisher = Trim($row["publisher"]);

Legend:
Removed from v.66  
changed lines
  Added in v.67

  ViewVC Help
Powered by ViewVC 1.1.26