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 |
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; |
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 |
|
|
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 |
|
|
179 |
return $hits; |
return $hits; |
180 |
|
|
181 |
} // end of php function |
} // end of php function |
182 |
?> |
?> |