[Openfirst-cvscommit] search index.php,1.3,1.4
Brought to you by:
xtimg
From: <xt...@us...> - 2003-08-24 01:41:20
|
Update of /cvsroot/openfirst/search In directory sc8-pr-cvs1:/tmp/cvs-serv13453 Modified Files: index.php Log Message: Replace mysql functions with new database functions, allowing multiple database types to be used easily. Index: index.php =================================================================== RCS file: /cvsroot/openfirst/search/index.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index.php 19 Aug 2003 23:24:49 -0000 1.3 --- index.php 23 Aug 2003 20:26:11 -0000 1.4 *************** *** 75,85 **** <p><sub>This search looks through member profiles</sub></p>"); ! $qu = mysql_query("SELECT * FROM ofirst_members WHERE description LIKE '%" . $_GET["q"] . "%' OR signature LIKE '% " . $_GET["q"] . " %' OR firstname LIKE '%" . $_GET["q"] . "%' OR lastname LIKE '%" . $_GET["q"] . "%' OR team LIKE '%" . $_GET["q"] . "%';"); ! if(mysql_num_rows($qu) == 0) { echo("<p>Your search has returned no results.</p>"); } else { echo("<table> <tr><th>User</th><th>Name</th><th>Division</th><th>Team</th></tr>"); ! while($q = mysql_fetch_object($qu)) { echo("<tr><td><a href='$basepath/members/profile.php?id=$q->user'>$q->user</a></td> <td>$q->firstname $q->lastname</td><td>$q->division</td><td>$q->team</td></tr>"); --- 75,85 ---- <p><sub>This search looks through member profiles</sub></p>"); ! $qu = ofirst_dbquery("SELECT * FROM ofirst_members WHERE description LIKE '%" . $_GET["q"] . "%' OR signature LIKE '% " . $_GET["q"] . " %' OR firstname LIKE '%" . $_GET["q"] . "%' OR lastname LIKE '%" . $_GET["q"] . "%' OR team LIKE '%" . $_GET["q"] . "%';"); ! if(ofirst_dbnum_rows($qu) == 0) { echo("<p>Your search has returned no results.</p>"); } else { echo("<table> <tr><th>User</th><th>Name</th><th>Division</th><th>Team</th></tr>"); ! while($q = ofirst_dbfetch_object($qu)) { echo("<tr><td><a href='$basepath/members/profile.php?id=$q->user'>$q->user</a></td> <td>$q->firstname $q->lastname</td><td>$q->division</td><td>$q->team</td></tr>"); *************** *** 92,102 **** <p><sub>This search looks through guestbook postings</sub></p>"); ! $qu = mysql_query("SELECT * FROM ofirst_guestbook WHERE guest LIKE '%" . $_GET["q"] . "%' OR webpage LIKE '% " . $_GET["q"] . " %' OR location LIKE '%" . $_GET["q"] . "%' OR comment LIKE '%" . $_GET["q"] . "%';"); ! if(mysql_num_rows($qu) == 0) { echo("<p>Your search has returned no results.</p>"); } else { echo("<table> <tr><th>Guest</th><th>Webpage</th><th>Location</th><th>Comment</th></tr>"); ! while($q = mysql_fetch_object($qu)) { echo("<tr><td>$q->guest</td> <td><a href='$q->webpage'>$q->webpage</a></td><td>$q->location</td><td>$q->comment</td></tr>"); --- 92,102 ---- <p><sub>This search looks through guestbook postings</sub></p>"); ! $qu = ofirst_dbquery("SELECT * FROM ofirst_guestbook WHERE guest LIKE '%" . $_GET["q"] . "%' OR webpage LIKE '% " . $_GET["q"] . " %' OR location LIKE '%" . $_GET["q"] . "%' OR comment LIKE '%" . $_GET["q"] . "%';"); ! if(ofirst_dbnum_rows($qu) == 0) { echo("<p>Your search has returned no results.</p>"); } else { echo("<table> <tr><th>Guest</th><th>Webpage</th><th>Location</th><th>Comment</th></tr>"); ! while($q = ofirst_dbfetch_object($qu)) { echo("<tr><td>$q->guest</td> <td><a href='$q->webpage'>$q->webpage</a></td><td>$q->location</td><td>$q->comment</td></tr>"); *************** *** 112,122 **** <p><sub>This search looks through workspace files (you may not have permission to access some of the resulting documents)</sub></p>"); ! $qu = mysql_query("SELECT * FROM ofirst_workspace_files WHERE name LIKE '%" . $_GET["q"] . "%' OR owner LIKE '% " . $_GET["q"] . " %' OR date LIKE '%" . $_GET["q"] . "%' OR filetype LIKE '%" . $_GET["q"] . "%' OR location LIKE '%" . $_GET["q"] . "%' OR division LIKE '%" . $_GET["q"] . "%';"); ! if(mysql_num_rows($qu) == 0) { echo("<p>Your search has returned no results.</p>"); } else { echo("<table> <tr><th>Name</th><th>Owner</th><th>Date</th><th>File Type</th><th>Location</th><th>Division</th></tr>"); ! while($q = mysql_fetch_object($qu)) { echo("<tr><td><a href='$basepath/members/workspace.php'>$q->name</a></td><td>$q->owner</td><td>$q->date</td><td>$q->filetype</td><td>$q->location</td><td>$q->division</td></tr>"); } --- 112,122 ---- <p><sub>This search looks through workspace files (you may not have permission to access some of the resulting documents)</sub></p>"); ! $qu = ofirst_dbquery("SELECT * FROM ofirst_workspace_files WHERE name LIKE '%" . $_GET["q"] . "%' OR owner LIKE '% " . $_GET["q"] . " %' OR date LIKE '%" . $_GET["q"] . "%' OR filetype LIKE '%" . $_GET["q"] . "%' OR location LIKE '%" . $_GET["q"] . "%' OR division LIKE '%" . $_GET["q"] . "%';"); ! if(ofirst_dbnum_rows($qu) == 0) { echo("<p>Your search has returned no results.</p>"); } else { echo("<table> <tr><th>Name</th><th>Owner</th><th>Date</th><th>File Type</th><th>Location</th><th>Division</th></tr>"); ! while($q = ofirst_dbfetch_object($qu)) { echo("<tr><td><a href='$basepath/members/workspace.php'>$q->name</a></td><td>$q->owner</td><td>$q->date</td><td>$q->filetype</td><td>$q->location</td><td>$q->division</td></tr>"); } *************** *** 132,142 **** <p><sub>This search looks through news postings</sub></p>"); ! $qu = mysql_query("SELECT * FROM ofirst_news WHERE poster LIKE '%" . $_GET["q"] . "%' OR date LIKE '% " . $_GET["q"] . " %' OR title LIKE '%" . $_GET["q"] . "%' OR news LIKE '%" . $_GET["q"] . "%';"); ! if(mysql_num_rows($qu) == 0) { echo("<p>Your search has returned no results.</p>"); } else { echo("<table> <tr><th>Poster</th><th>Date</th><th>Title</th><th>News</th></tr>"); ! while($q = mysql_fetch_object($qu)) { echo("<tr><td>$q->poster</td><td>$q->date</td><td>$q->title</td><td>$q->news</td></tr>"); } --- 132,142 ---- <p><sub>This search looks through news postings</sub></p>"); ! $qu = ofirst_dbquery("SELECT * FROM ofirst_news WHERE poster LIKE '%" . $_GET["q"] . "%' OR date LIKE '% " . $_GET["q"] . " %' OR title LIKE '%" . $_GET["q"] . "%' OR news LIKE '%" . $_GET["q"] . "%';"); ! if(ofirst_dbnum_rows($qu) == 0) { echo("<p>Your search has returned no results.</p>"); } else { echo("<table> <tr><th>Poster</th><th>Date</th><th>Title</th><th>News</th></tr>"); ! while($q = ofirst_dbfetch_object($qu)) { echo("<tr><td>$q->poster</td><td>$q->date</td><td>$q->title</td><td>$q->news</td></tr>"); } |