"; OpenTable(); echo ("
"); echo (""._JOURNALSEARCH."


"); echo ("
"); echo ("
"); echo (""); echo (" "._IN."   "); echo ("
"); echo ("
"); CloseTable(); } function search($username, $bywhat, $forwhat, $sitename, $bgcolor2, $bgcolor3, $user) { global $prefix, $user_prefix, $db, $module_name, $exact, $bgcolor1; echo "
"; OpenTable(); echo ("
"); $exact = intval($exact); if ($exact == '1') { echo (""._JOURNALFOR.": \"$forwhat\"

"); } else { echo (""._SEARCHRESULTS.": \"$forwhat\"

"); } if ($forwhat == "naddaanythang") : displaySearch($sitename, $username, $bgcolor2, $bgcolor3, $bgcolor1); else : echo (""); echo (""); echo (""); echo (""); echo (""); /* Commented out because this was broken sixonetonoffun $editdel = intval($editdel); if ($exact == '1') { if ($forwhat == $username) { $editdel = 1; } } else { if (eregi($forwhat, $username)) { $editdel = 2; } } if ($editdel == '1') { echo (""); echo (""); } elseif ($editdel == '2') { echo (""); echo (""); } else { */ echo (""); // } Commented out because this was broken sixonetonoffun echo (""); if ($bywhat == 'aid'): if ($exact == '1') { $sql = "SELECT j.jid, j.aid, j.title, j.pdate, j.ptime, j.status, j.mdate, j.mtime, u.user_id, u.username FROM ".$prefix."_journal j, ".$user_prefix."_users u WHERE u.username=j.aid and j.aid='$forwhat' order by j.jid DESC"; } else { $sql = "SELECT j.jid, j.aid, j.title, j.pdate, j.ptime, j.status, j.mdate, j.mtime, u.user_id, u.username FROM ".$prefix."_journal j, ".$user_prefix."_users u WHERE u.username=j.aid and j.aid like '%$forwhat%' order by j.jid DESC"; } elseif ($bywhat == 'title'): $sql = "SELECT j.jid, j.aid, j.title, j.pdate, j.ptime, j.status, j.mdate, j.mtime, u.user_id, u.username FROM ".$prefix."_journal j, ".$user_prefix."_users u WHERE u.username=j.aid and j.title like '%$forwhat%' order by j.jid DESC"; elseif ($bywhat == 'bodytext'): $sql = "SELECT j.jid, j.aid, j.title, j.pdate, j.ptime, j.status, j.mdate, j.mtime, u.user_id, u.username FROM ".$prefix."_journal j, ".$user_prefix."_users u WHERE u.username=j.aid and j.bodytext LIKE '%$forwhat%' order by j.jid DESC"; elseif ($bywhat == 'comment'): $sql = "SELECT j.jid, j.aid, j.title, j.pdate, j.ptime, j.status, j.mdate, j.mtime, u.user_id, u.username FROM ".$prefix."_journal j, ".$user_prefix."_users u, ".$user_prefix."_journal_comments c WHERE u.username=j.aid and c.rid=j.jid and c.comment LIKE '%$forwhat%' order by j.jid DESC"; endif; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $row['jid'] = intval($row['jid']); $row['aid'] = check_html($row['aid'], "nohtml"); $row['title'] = check_html($row['title'], "nohtml"); $row['pdate'] = check_html($row['pdate'], "nohtml"); $row['ptime'] = check_html($row['ptime'], "nohtml"); $row['status'] = check_html($row['status'], "nohtml"); $row['mdate'] = check_html($row['mdate'], "nohtml"); $row['mtime'] = check_html($row['mtime'], "nohtml"); $row['user_id'] = check_html($row['user_id'], "nohtml"); $row['username'] = check_html($row['username'], "nohtml"); $dcount = 0; if ($row['status'] == "no") : $dcount = $dcount + 0; else : $dcount = $dcount + 1; print (""); //The follwing line made reference to non-existing field uname.// printf ("", $row['aid'], $row['aid']); printf (""); endif; printf ("", $row['jid'], $row['title']); /* Commented out because this was broken sixonetonoffun if ($row['aid'] == $username) : printf ("", $row['jid'], $row['title']); printf ("", $row['jid'], $row['title']); else : */ //printf ("", $row['jid'], $row['title']); //The follwing line made reference to non-existing field uname.// printf (""); /* if (empty($username)) { print (""); } elseif (!empty($username) AND is_active("Private_Messages")) { printf ("", $row['aid'], $row['aid']); } */ endif; // endif; // Commented out because this was broken sixonetonoffun } echo ("
"._PROFILE."
"._TITLE." "._CLICKTOVIEW.""._VIEW.""._EDIT.""._DELETE.""._EDIT."/
"._PROFILE."
"._DELETE."/
 
"._PROFILE."
%s %s (%s @ %s)", $row['jid'], $row['title'], $row['pdate'], $row['ptime']); $sqlscnd = "SELECT cid from ".$prefix."_journal_comments where rid=".$row['jid']; $rstscnd = $db->sql_query($sqlscnd); $scndcount = 0; while ($rowscnd = $db->sql_fetchrow($rstscnd)) { $scndcount = $scndcount + 1; } if ($scndcount > 0): printf (" —— $scndcount comments\""._READ."\"\""._EDIT."\"\""._DELETE."\"\""._READ."\"\""._USERPROFILE2."\"\""._CREATEACCOUNT."\""._PRIVMSGJ2."
"); if (empty($dcount)) { $dcount = 0; } echo ("
$dcount "._PUBLICFOR." \"$forwhat\"
"); endif; echo ("
"); CloseTable(); } if (isset($disp)) { $disp = check_html($disp, "nohtml"); } else { $disp = ""; } switch($disp) { case "showsearch": displaySearch($sitename, $username, $bgcolor2, $bgcolor3, $bgcolor1, $forwhat, $user); break; case "search": search($username, $bywhat, $forwhat, $sitename, $bgcolor2, $bgcolor3, $user); break; default: search($username, $bywhat, $forwhat, $sitename, $bgcolor2, $bgcolor3, $user); break; } journalfoot(); ?>