"; if ($action == 1) { $result = mysql_query("delete from news where eid='$eid'"); echo "The news entry has been deleted.


"; } echo " Modify News:

"; $result = mysql_query("select uid from users where userid='$username'"); $aid=mysql_result($result, 0); if ($username == "Brandon") { $resultafff = mysql_query("select * from news order by eid DESC"); } else { $resultafff = mysql_query("select * from news where pid='$aid' order by eid DESC"); } if (mysql_num_rows($resultafff)) { while ($row=mysql_fetch_assoc($resultafff)) { $eid = $row["eid"]; $pid = $row["pid"]; $subject = $row["subject"]; $date = $row["date"]; $emoticon = $row["emoticon"]; $txtnews = $row["txtnews"]; $userinfo = mysql_query("select * from users where uid='$pid'"); while ($row=mysql_fetch_assoc($userinfo)) { $name = $row["userid"]; $aim = $row["aim"]; $email = $row["email"]; $txtnews = str_replace ("\n", "
", $txtnews); $txtnews = str_replace ("8-)", "", $txtnews); $txtnews = str_replace (":-)", "", $txtnews); $txtnews = str_replace (">:-(", "", $txtnews); $txtnews = str_replace (">:o", "", $txtnews); $txtnews = str_replace (";-)", "", $txtnews); $txtnews = str_replace (":-(", "", $txtnews); $txtnews = str_replace (":-D", "", $txtnews); echo "Subject: $subject
User: $name
$txtnews
Delete - Edit Entry

"; } } } else { echo "No News post yet."; } echo "

Return to Control Panel"; } else { echo "You are not logged in."; } include("bottom.php"); ?>