-
rank:
-
12
-
registered:
-
March 2009
-
Status:
-
offline
-
last visit:
-
-
Posts:
-
0
Browser IE Version 6.0.2800.1106.xpsp2.030422-16331C
Hermed kopi af linie 298 til 373
Linie 298
if (empty($subject)) {
include 'header.php';
ECHO _STORYNEEDSTITLE;
include 'footer.php';
exit;
}
if (pnUserLoggedIn()) {
$uid = pnUserGetVar('uid');
$name = pnUserGetVar('uname');
} else {
$uid = 1;
$uname = pnConfigGetVar('anonymous');
}
$column = &$pntable['queue_column'];
$newid = $dbconn->GenId($pntable['queue']);
$result = $dbconn->Execute("INSERT INTO $pntable[queue] (
$column[qid],
$column[uid],
$column[arcd],
$column[uname],
$column[subject],
$column[story],
$column[timestamp],
$column[topic],
$column[alanguage],
$column[bodytext])
VALUES (" . pnVarPrepForStore($newid). ",
'" . pnVarPrepForStore($uid) . "',
'0',
'" . pnVarPrepForStore($name) . "',
'" . pnVarPrepForStore($subject) . "',
'" . pnVarPrepForStore($storytext) . "',
now(),
'" . pnVarPrepForStore($topic) . "',
'" . pnVarPrepForStore($alanguage) . "',
'" . pnVarPrepForStore($bodytext) . "')");
if($dbconn->ErrorNo()<>0) {
echo $dbconn->ErrorNo(). ": ".$dbconn->ErrorMsg(). "
";
exit();
}
if(pnConfigGetVar('notify')) {
pnMail(pnConfigGetVar('notify_email'),
pnConfigGetVar('notify_subject'),
pnConfigGetVar('notify_message'),
'From: '.pnConfigGetVar('notify_from')
."\nX-Mailer: PHP/".phpversion());
}
include 'header.php';
OpenTable();
$column = &$pntable['queue_column'];
$result = $dbconn->Execute("SELECT count(*) FROM $pntable[queue] WHERE $column[arcd]='0'");
list($waiting) = $result->fields;
echo "
<font class="\"pn-title\"">"._SUBSENT."</font>
"
."<font class="\"pn-normal\"">"._THANKSSUB."
"
.""._SUBTEXT.""
."
"._WEHAVESUB." $waiting "._WAITING."</font>";
CloseTable();
include ('footer.php');
}
/**
* Preview function for submitted stories.
*/
function story_preview($title, $hometext, $bodytext="", $notes="") {
echo "<font class="\"pn-title\"">" . pnVarPrepForDisplay($title) . "</font>
<font class="\"pn-normal\"">" . pnVarPrepHTMLDisplay(nl2br($hometext)) . "</font>";
if ($bodytext != "") {
echo "
<font class="\"pn-normal\"">" . pnVarPrepHTMLDisplay(nl2br($bodytext)) . "</font>";
}
if ($notes != "") {
echo "
<font class="\"pn-normal\"">"._NOTE." " . pnVarPrepHTMLDisplay(nl2br($notes)) . "</font>";
}
}