mirror of
https://git.code.sf.net/p/quake/website
synced 2024-11-24 05:01:23 +00:00
Fix plans...stupid bug, I have _no_ idea how this ever worked.
This commit is contained in:
parent
19e3351805
commit
30a9154f83
1 changed files with 54 additions and 55 deletions
109
members/plan.php
109
members/plan.php
|
@ -1,55 +1,54 @@
|
|||
<? // Preamble
|
||||
$pageName = "Developers - Update Plan";
|
||||
$focused = "home"; // Dock icon name to gets a border
|
||||
$need = 'auth';
|
||||
require("../parts/preamble.php"); // Load most of document
|
||||
?>
|
||||
<?
|
||||
if ($planItem) {
|
||||
need('sql');
|
||||
|
||||
$user = ucfirst($userInfo[u_username]) ;
|
||||
$newsItem = AddSlashes($newsItem);
|
||||
|
||||
$conn = mysql_connect (sqlHost, sqlUser, sqlPass);
|
||||
if ($conn) {
|
||||
$query = 'UPDATE devel_plans SET p_date = NOW(), p_plan = ' .
|
||||
"'$planItem' WHERE p_user = '$user'";
|
||||
$result = mysql_db_query (sqlDB, $query, $conn);
|
||||
if ($result) {
|
||||
$numRows = mysql_affected_rows ($conn);
|
||||
if ($numRows) {
|
||||
echo '<P>All is well... your plan has been updated';
|
||||
} else {
|
||||
echo '<P>Hmm... that\'s not right. An error occoured';
|
||||
}
|
||||
}
|
||||
else
|
||||
echo '<P>MySQL error occoured, possibly an invalid query. Contact your webmaster';
|
||||
mysql_close ($conn);
|
||||
} else {
|
||||
echo 'You suck, butthead.';
|
||||
}
|
||||
} else {
|
||||
tableBoxHeader(featureBgColor, tableHeadColor);
|
||||
tableTitle("Edit Plan", 1, tableHeadColor);
|
||||
|
||||
$date = strftime('%d %b %Y', time());
|
||||
$user = ucfirst($userInfo[u_username]);
|
||||
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>
|
||||
<INPUT align="center" type="submit" value="Post"></INPUT>
|
||||
</FORM>
|
||||
<? ' . </DD>' .
|
||||
'</DL></TD></TR>';
|
||||
tableBoxFooter();
|
||||
}
|
||||
?>
|
||||
<?
|
||||
?>
|
||||
<?
|
||||
require (siteHome ."/parts/postamble.php"); // Finish this sucker up
|
||||
?>
|
||||
<? // Preamble
|
||||
$pageName = "Developers - Update Plan";
|
||||
$focused = "home"; // Dock icon name to gets a border
|
||||
$need = 'auth';
|
||||
require("../parts/preamble.php"); // Load most of document
|
||||
?>
|
||||
<?
|
||||
if ($planItem) {
|
||||
need('sql');
|
||||
|
||||
$user = ucfirst($userInfo[u_username]) ;
|
||||
$planItem = AddSlashes($planItem);
|
||||
|
||||
$conn = mysql_connect (sqlHost, sqlUser, sqlPass);
|
||||
if ($conn) {
|
||||
$query = 'UPDATE devel_plans' .
|
||||
" SET p_date = NOW(), p_plan = '$planItem'" .
|
||||
" WHERE p_user = '$user'";
|
||||
$result = mysql_db_query (sqlDB, $query, $conn);
|
||||
if ($result) {
|
||||
$numRows = mysql_affected_rows ($conn);
|
||||
if ($numRows) {
|
||||
echo '<P>All is well... your plan has been updated.';
|
||||
} else {
|
||||
echo '<P>Hmm... that\'s not right. An error occurred.';
|
||||
}
|
||||
}
|
||||
else
|
||||
echo '<P>MySQL error occurred, possibly an invalid query. Bitch at Deek.';
|
||||
mysql_close ($conn);
|
||||
} else {
|
||||
echo '<P><MySQL> You suck, butthead.';
|
||||
}
|
||||
} else {
|
||||
tableBoxHeader(featureBgColor, tableHeadColor);
|
||||
tableTitle("Edit Plan", 1, tableHeadColor);
|
||||
|
||||
$date = strftime('%d %b %Y', time());
|
||||
$user = ucfirst($userInfo[u_username]);
|
||||
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>
|
||||
<INPUT align="center" type="submit" value="Post"></INPUT>
|
||||
</FORM>
|
||||
<? ' . </DD>' .
|
||||
'</DL></TD></TR>';
|
||||
tableBoxFooter();
|
||||
}
|
||||
?>
|
||||
<?
|
||||
require siteHome . "/parts/postamble.php"; // Finish this sucker up
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue