A PHP bulletin board creatively titled Jake's Bulletin Board, circa 2003. (My first full coding project ever – complete with bugs and security holes and horrendous style!)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
2.7 KiB

<INPUT TYPE="hidden" name="pmID" value="$pm->pmID">
include ('conf.php');
$conn = mysql_connect ($sqlServer, $sqlUsername, $sqlPassword)
or die ("Could not connect to server $sqlServer");
mysql_select_db ($sqlDatabase, $conn)
or die ("Could not connect to database $sqlDatabase");
$query1 = "SELECT * FROM jbb_pm WHERE pmID = '$pmID'";
$result1 = mysql_query ($query1)
or die ($query1);
while ($pm = mysql_fetch_object($result1)) {
$replacement = '<IMG SRC=images/emoticons/smile.gif>';
$replacement2 = '<IMG SRC=images/emoticons/bigsmile.gif>';
$replacement3 = '<IMG SRC=images/emoticons/frown.gif>';
$replacement4 = '<IMG SRC=images/emoticons/crying.gif>';
$replacement5 = '<IMG SRC=images/emoticons/blush.gif>';
$replacement6 = '<IMG SRC=images/emoticons/confused.gif>';
$replacement7 = '<IMG SRC=images/emoticons/cool.gif>';
$replacement8 = '<IMG SRC=images/emoticons/surprised.gif>';
$replacement9 = '<IMG SRC=images/emoticons/tongue.gif>';
$replacement10 = '<IMG SRC=images/emoticons/innocent.gif>';
$replacement11 = ' <IMG SRC=images/emoticons/wink.gif>';
$replacement12 = '<IMG SRC=images/emoticons/whoa.gif>';
$replacement12 = '<BR>';
$pm->message = str_replace(':)', $replacement, $pm->message);
$pm->message = str_replace(':D', $replacement2, $pm->message);
$pm->message = str_replace(':(', $replacement3, $pm->message);
$pm->message = str_replace(':crying:', $replacement4, $pm->message);
$pm->message = str_replace(':blush:', $replacement5, $pm->message);
$pm->message = str_replace(':?', $replacement6, $pm->message);
$pm->message = str_replace('B)', $replacement7, $pm->message);
$pm->message = str_replace(':O', $replacement8, $pm->message);
$pm->message = str_replace(':P', $replacement9, $pm->message);
$pm->message = str_replace(':angel:', $replacement10, $pm->message);
$pm->message = str_replace(';)', $replacement11, $pm->message);
$pm->message = str_replace(':0', $replacement12, $pm->message);
$pm->message = str_replace('
', $replacement13, $pm->message);
echo "
<TD ALIGN=\"left\">
Reading \"$pm->title\" sent by <b>$pm->sender</b>.
<TD ALIGN=\"left\">
<TD ALIGN=\"right\">
<FORM ACTION=\"index.php?act=private\" METHOD=\"post\">
<INPUT TYPE=\"hidden\" NAME=\"pmusr\" VALUE=\"$pm->sender\">
<INPUT TYPE=\"submit\" VALUE=\"Reply\">