/[libdata]/branches/paul/admin/include/fuzzy.php
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/include/fuzzy.php

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

revision 66 by dpavlin, Thu Jan 15 14:22:44 2004 UTC revision 67 by dpavlin, Thu Mar 18 19:24:54 2004 UTC
# Line 33  function newResPageHeader() { Line 33  function newResPageHeader() {
33    
34  /**********************************************************  /**********************************************************
35  Function: resTitlePat  Function: resTitlePat
36  Original Author: Paul Bramscher <brams006@tc.umn.edu>  Original Author: Paul Bramscher <brams006@umn.edu>
37  Last Modified: 03.19.2003  Last Modified: 03.03.2004
38  ***********************************************************  ***********************************************************
39  Comments:  Comments:
40  This function takes $string as input and builds eight  This function takes $string as input and builds eight
# Line 54  pass6 = every other starting with 1 posi Line 54  pass6 = every other starting with 1 posi
54  pass7 = replacing 'ies' with 'y'  pass7 = replacing 'ies' with 'y'
55  pass8 = replacing 'y' with 'ies'  pass8 = replacing 'y' with 'ies'
56  **********************************************************/  **********************************************************/
57  function resTitlePat($con, $string) {  function resTitlePat($string) {
58    
59          // Save this for display purposes          // Save this for display purposes
60          $title = $string;          $title = $string;
# Line 146  function resTitlePat($con, $string) { Line 146  function resTitlePat($con, $string) {
146          // Debugging          // Debugging
147          // printf("sql was: %s", $sql);          // printf("sql was: %s", $sql);
148    
149          $rs = mysql_query($sql, $con);          $rs = mysql_tryquery($sql);
150          $hits = mysql_num_rows($rs);          $hits = mysql_num_rows($rs);
151          if ($hits > 0) {          if ($hits > 0) {
152    
# Line 155  function resTitlePat($con, $string) { Line 155  function resTitlePat($con, $string) {
155    
156                  // Table                  // Table
157                  printf("<table width = \"60%%\" border = \"3\" cellpadding =\"4\" class=\"backLight\">\n");                  printf("<table width = \"60%%\" border = \"3\" cellpadding =\"4\" class=\"backLight\">\n");
158                  printf("<tr><td><br>\n");                  printf("<tr><td>\n");
159                  printf("<strong>Messages:</strong><br>\n");                  printf("<b>Messages:</b><br>\n");
160    
161                  printf ("Possible duplicate resource titles found with title '%s'.  Are you sure you want to continue?<br><br>\n", $title);                  printf ("Possible duplicate resource titles found with title '%s'.  Are you sure you want to continue?<br><br>\n", $title);
162                  while ($row = mysql_fetch_array ($rs)) {                  while ($row = mysql_fetch_array ($rs, MYSQL_ASSOC)) {
163                          $title = $row["title"];                          $title = $row["title"];
164                          $resource_id = $row["resource_id"];                          $resource_id = $row["resource_id"];
165    
166                          printf("<b>Resource ID:</b> %d ", $resource_id);                          printf("<b>Resource ID:</b> %d ", $resource_id);
167                          printf("<b>Title:</b> %s<BR>", $title);                          printf("<b>Title:</b> %s<BR>\n", $title);
168    
169                  } // this result set                  } // this result set
170    
# Line 179  function resTitlePat($con, $string) { Line 179  function resTitlePat($con, $string) {
179          return $hits;          return $hits;
180    
181  } // end of php function  } // end of php function
182  ?>  ?>

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

  ViewVC Help
Powered by ViewVC 1.1.26