mirror of
https://git.code.sf.net/p/quake/website
synced 2025-02-17 09:21:29 +00:00
I THINK the plan posting should work now.
This commit is contained in:
parent
decf2308ff
commit
71b8369d08
2 changed files with 7 additions and 19 deletions
|
@ -65,10 +65,6 @@
|
|||
|
||||
need ('boxes sql table');
|
||||
|
||||
global $newsID;
|
||||
global $newsText
|
||||
global $newsUser
|
||||
|
||||
$newsID = $_GET['newsID'];
|
||||
$newsText = $_POST['newsText'];
|
||||
$newsUser = $_POST['newsUser'];
|
||||
|
|
22
plan_add.php
22
plan_add.php
|
@ -3,7 +3,7 @@
|
|||
$need = 'auth';
|
||||
require "parts/preamble.php"; // Load most of document
|
||||
|
||||
need ("boxes news");
|
||||
need ("boxes news sql");
|
||||
|
||||
// set up local vars
|
||||
$mode = $_REQUEST['mode'];
|
||||
|
@ -12,23 +12,15 @@
|
|||
$user = $userInfo['u_displayname'];
|
||||
|
||||
if ($planText && $planSubj && $mode == "Post") {
|
||||
need ('sql');
|
||||
|
||||
$planText = addSlashes ($planText);
|
||||
$query = 'INSERT INTO plans (p_date, p_user, p_subject, p_plan) VALUES ('
|
||||
."NOW(), '$user', '$planSubj', '$planText')";
|
||||
|
||||
if ($conn = mysql_connect (sqlHost, sqlRWUser, sqlRWPass)) {
|
||||
$query = 'INSERT INTO plans (p_date, p_user, p_subject, p_plan) VALUES ('
|
||||
."NOW(), '$user', '$planSubj', '$planText')";
|
||||
|
||||
if ($result = mysql_db_query (sqlDB, $query, $conn)
|
||||
&& $numRows = mysql_affected_rows ($conn)) {
|
||||
echo '<P>Your plan entry has been posted successfully.</P>';
|
||||
} else {
|
||||
echo '<P>Somebody screwed up, MySQL said "' . mysql_error () . '". Bug a project admin or somethin\' eh?</P>';
|
||||
}
|
||||
mysql_close ($conn);
|
||||
$rows = sqlWriteQuery ($query);
|
||||
if ($rows && $rows !== true) {
|
||||
echo '<P>Your plan entry has been posted successfully.</P>';
|
||||
} else {
|
||||
echo '<P>Somebody screwed up, MySQL said "' . mysql_error () . '". Bug a project admin or somethin\' eh?</P>';
|
||||
echo "<P>Somebody screwed up, MySQL said '$sqlError'. Bug a project admin or somethin', eh?</P>";
|
||||
}
|
||||
} else {
|
||||
$date = date ('d M Y');
|
||||
|
|
Loading…
Reference in a new issue