Fix plans...stupid bug, I have _no_ idea how this ever worked.

This commit is contained in:
Jeff Teunissen 2000-07-06 11:02:04 +00:00
parent 19e3351805
commit 30a9154f83

View file

@ -1,55 +1,54 @@
<? // Preamble <? // Preamble
$pageName = "Developers - Update Plan"; $pageName = "Developers - Update Plan";
$focused = "home"; // Dock icon name to gets a border $focused = "home"; // Dock icon name to gets a border
$need = 'auth'; $need = 'auth';
require("../parts/preamble.php"); // Load most of document require("../parts/preamble.php"); // Load most of document
?> ?>
<? <?
if ($planItem) { if ($planItem) {
need('sql'); need('sql');
$user = ucfirst($userInfo[u_username]) ; $user = ucfirst($userInfo[u_username]) ;
$newsItem = AddSlashes($newsItem); $planItem = AddSlashes($planItem);
$conn = mysql_connect (sqlHost, sqlUser, sqlPass); $conn = mysql_connect (sqlHost, sqlUser, sqlPass);
if ($conn) { if ($conn) {
$query = 'UPDATE devel_plans SET p_date = NOW(), p_plan = ' . $query = 'UPDATE devel_plans' .
"'$planItem' WHERE p_user = '$user'"; " SET p_date = NOW(), p_plan = '$planItem'" .
$result = mysql_db_query (sqlDB, $query, $conn); " WHERE p_user = '$user'";
if ($result) { $result = mysql_db_query (sqlDB, $query, $conn);
$numRows = mysql_affected_rows ($conn); if ($result) {
if ($numRows) { $numRows = mysql_affected_rows ($conn);
echo '<P>All is well... your plan has been updated'; if ($numRows) {
} else { echo '<P>All is well... your plan has been updated.';
echo '<P>Hmm... that\'s not right. An error occoured'; } else {
} echo '<P>Hmm... that\'s not right. An error occurred.';
} }
else }
echo '<P>MySQL error occoured, possibly an invalid query. Contact your webmaster'; else
mysql_close ($conn); echo '<P>MySQL error occurred, possibly an invalid query. Bitch at Deek.';
} else { mysql_close ($conn);
echo 'You suck, butthead.'; } else {
} echo '<P>&lt;MySQL&gt; You suck, butthead.';
} else { }
tableBoxHeader(featureBgColor, tableHeadColor); } else {
tableTitle("Edit Plan", 1, tableHeadColor); tableBoxHeader(featureBgColor, tableHeadColor);
tableTitle("Edit Plan", 1, tableHeadColor);
$date = strftime('%d %b %Y', time());
$user = ucfirst($userInfo[u_username]); $date = strftime('%d %b %Y', time());
echo '<TR><TD><DL><DT><FONT SIZE=-1>Posted on ' . $date . ' by ' . $user . '</FONT></DT>' . $user = ucfirst($userInfo[u_username]);
' <DD> '; echo '<TR><TD><DL><DT><FONT size="-1">Posted on ' . $date . ' by ' . $user . '</FONT></DT>' .
?> ' <DD> ';
<FORM action="plan.php" method="post"> ?>
<TEXTAREA name="planItem" rows="25" cols="64"></TEXTAREA><BR> <FORM action="plan.php" method="post">
<INPUT align="center" type="submit" value="Post"></INPUT> <TEXTAREA name="planItem" rows="25" cols="64"></TEXTAREA><BR>
</FORM> <INPUT align="center" type="submit" value="Post"></INPUT>
<? ' . </DD>' . </FORM>
'</DL></TD></TR>'; <? ' . </DD>' .
tableBoxFooter(); '</DL></TD></TR>';
} tableBoxFooter();
?> }
<? ?>
?> <?
<? require siteHome . "/parts/postamble.php"; // Finish this sucker up
require (siteHome ."/parts/postamble.php"); // Finish this sucker up ?>
?>