本文整理汇总了PHP中FixQuotes函数的典型用法代码示例。如果您正苦于以下问题:PHP FixQuotes函数的具体用法?PHP FixQuotes怎么用?PHP FixQuotes使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FixQuotes函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: automatednews
function automatednews()
{
global $gmt;
global $NPDS_Prefix;
$today = getdate(time() + $gmt * 3600);
$day = $today['mday'];
if ($day < 10) {
$day = "0{$day}";
}
$month = $today['mon'];
if ($month < 10) {
$month = "0{$month}";
}
$year = $today['year'];
$hour = $today['hours'];
$min = $today['minutes'];
$result = sql_query("SELECT anid, date_debval FROM " . $NPDS_Prefix . "autonews WHERE date_debval LIKE '{$year}-{$month}%'");
while (list($anid, $date_debval) = sql_fetch_row($result)) {
preg_match('#^(\\d{4})-(\\d{1,2})-(\\d{1,2}) (\\d{1,2}):(\\d{1,2}):(\\d{1,2})$#', $date_debval, $date);
if ($date[1] <= $year and $date[2] <= $month and $date[3] <= $day) {
if ($date[4] < $hour and $date[5] >= $min or $date[4] <= $hour and $date[5] <= $min or $day - $date[3] >= 1) {
$result2 = sql_query("SELECT catid, aid, title, hometext, bodytext, topic, informant, notes, ihome, date_finval, auto_epur FROM " . $NPDS_Prefix . "autonews WHERE anid='{$anid}'");
while (list($catid, $aid, $title, $hometext, $bodytext, $topic, $author, $notes, $ihome, $date_finval, $epur) = sql_fetch_row($result2)) {
$subject = stripslashes(FixQuotes($title));
$hometext = stripslashes(FixQuotes($hometext));
$bodytext = stripslashes(FixQuotes($bodytext));
$notes = stripslashes(FixQuotes($notes));
sql_query("INSERT INTO " . $NPDS_Prefix . "stories VALUES (NULL, '{$catid}', '{$aid}', '{$subject}', now(), '{$hometext}', '{$bodytext}', '0', '0', '{$topic}', '{$author}', '{$notes}', '{$ihome}', '0', '{$date_finval}', '{$epur}')");
sql_query("DELETE FROM " . $NPDS_Prefix . "autonews WHERE anid='{$anid}'");
global $subscribe;
if ($subscribe) {
subscribe_mail("topic", $topic, "", $subject, "");
}
// Réseaux sociaux
if (file_exists('modules/npds_twi/npds_to_twi.php')) {
include 'modules/npds_twi/npds_to_twi.php';
}
if (file_exists('modules/npds_fbk/npds_to_fbk.php')) {
include 'modules/npds_twi/npds_to_fbk.php';
}
// Réseaux sociaux
}
}
}
}
// Purge automatique
$result = sql_query("SELECT sid, date_finval, auto_epur FROM " . $NPDS_Prefix . "stories WHERE date_finval LIKE '{$year}-{$month}%'");
while (list($sid, $date_finval, $epur) = sql_fetch_row($result)) {
preg_match('#^(\\d{4})-(\\d{1,2})-(\\d{1,2}) (\\d{1,2}):(\\d{1,2}):(\\d{1,2})$#', $date_finval, $date);
if ($date[1] <= $year and $date[2] <= $month and $date[3] <= $day) {
if ($date[4] < $hour and $date[5] >= $min or $date[4] <= $hour and $date[5] <= $min) {
if ($epur == 1) {
sql_query("DELETE FROM " . $NPDS_Prefix . "stories WHERE sid='{$sid}'");
} else {
sql_query("UPDATE " . $NPDS_Prefix . "stories SET archive='1' WHERE sid='{$sid}'");
}
}
}
}
}
示例2: PerSav
function PerSav()
{
$pmbperiod = $_REQUEST['pmbperiod'];
$md = $_REQUEST['md'] + 0;
$Nama = FixQuotes($_REQUEST['Nama']);
$na = empty($_REQUEST['NA']) ? 'N' : $_REQUEST['NA'];
$mul = "{$_REQUEST['TglMulai_y']}-{$_REQUEST['TglMulai_m']}-{$_REQUEST['TglMulai_d']}";
$sel = "{$_REQUEST['TglSelesai_y']}-{$_REQUEST['TglSelesai_m']}-{$_REQUEST['TglSelesai_d']}";
$umul = "{$_REQUEST['UjianMulai_y']}-{$_REQUEST['UjianMulai_m']}-{$_REQUEST['UjianMulai_d']}";
$usel = "{$_REQUEST['UjianSelesai_y']}-{$_REQUEST['UjianSelesai_m']}-{$_REQUEST['UjianSelesai_d']}";
$bmul = "{$_REQUEST['BayarMulai_y']}-{$_REQUEST['BayarMulai_m']}-{$_REQUEST['BayarMulai_d']}";
$bsel = "{$_REQUEST['BayarSelesai_y']}-{$_REQUEST['BayarSelesai_m']}-{$_REQUEST['BayarSelesai_d']}";
$_prodi = array();
$_prodi = $_REQUEST['ProdiID'];
$ProdiID = !empty($_prodi) ? implode(',', $_prodi) : '';
// Simpan
if ($md == 0) {
$s = "update pmbperiod set Nama='{$Nama}', TglMulai='{$mul}', TglSelesai='{$sel}', \r\n BayarMulai='{$bmul}', BayarSelesai='{$bsel}', TelitiBayarProdi='{$ProdiID}',\r\n UjianMulai='{$umul}', UjianSelesai='{$usel}', NA='{$na}' where PMBPeriodID='{$pmbperiod}'";
_query($s);
} else {
$ada = GetFields('pmbperiod', 'PMBPeriodID', $pmbperiod, '*');
if (empty($ada)) {
$s = "insert into pmbperiod(PMBPeriodID, Nama, KodeID, TglMulai, TglSelesai, UjianMulai, UjianSelesai, \r\n BayarMulai, BayarSelesai, TelitiBayarProdi, NA)\r\n Values('{$pmbperiod}', '{$Nama}', '{$_SESSION['KodeID']}', '{$mul}', '{$sel}', '{$umul}', '{$usel}', \r\n '{$bmul}', '{$bsel}', '{$ProdiID}', '{$na}')";
_query($s);
} else {
echo ErrorMsg('Periode Telah Ada', "Periode <b>{$pmbperiod}</b> tidak dapat ditambahkan\r\n karena Periode tersebut sudah dibuat.");
}
}
// Tidak aktifkan
if ($na == 'N') {
$s = "update pmbperiod set NA='Y' where NA='N' and PMBPeriodID<>'{$pmbperiod}' ";
_query($s);
}
DftrPer();
}
示例3: SiteSent
function SiteSent($fname)
{
include 'header.php';
$fname = stripslashes(FixQuotes(check_html(removecrlf($fname))));
OpenTable();
echo "<center><font class=\"content\">" . _FREFERENCE . " {$fname}...<br><br>" . _THANKSREC . "</font></center>";
CloseTable();
include 'footer.php';
}
示例4: changemblock
function changemblock($title, $content)
{
global $NPDS_Prefix;
$title = stripslashes(FixQuotes($title));
$content = stripslashes(FixQuotes($content));
sql_query("UPDATE " . $NPDS_Prefix . "mainblock SET title='{$title}', content='{$content}'");
global $aid;
Ecr_Log("security", "ChangeMainBlock({$title}) by AID : {$aid}", "");
Header("Location: admin.php?op=adminMain");
}
示例5: autoSaveEdit
function autoSaveEdit($anid, $title, $hometext, $bodytext, $topic, $notes, $catid, $ihome, $informant, $members, $Mmembers, $date_debval, $date_finval, $epur)
{
global $aid, $ultramode, $NPDS_Prefix;
$title = stripslashes(FixQuotes(str_replace('"', '"', $title)));
$hometext = stripslashes(FixQuotes($hometext));
$bodytext = stripslashes(FixQuotes($bodytext));
$notes = stripslashes(FixQuotes($notes));
if ($members == 1 and $Mmembers == '') {
$ihome = "-127";
}
if ($members == 1 and ($Mmembers > 1 and $Mmembers <= 127)) {
$ihome = $Mmembers;
}
$result = sql_query("UPDATE " . $NPDS_Prefix . "autonews SET catid='{$catid}', title='{$title}', time=now(), hometext='{$hometext}', bodytext='{$bodytext}', topic='{$topic}', notes='{$notes}', ihome='{$ihome}', date_debval='{$date_debval}', date_finval='{$date_finval}', auto_epur='{$epur}' WHERE anid='{$anid}'");
if ($ultramode) {
ultramode();
}
Header("Location: admin.php?op=autoEdit&anid={$anid}");
}
示例6: poll_SendEditPoll
function poll_SendEditPoll()
{
global $maxOptions, $pollTitle, $optionText, $poll_type, $pollID, $poll_close;
global $NPDS_Prefix;
$result = sql_query("UPDATE " . $NPDS_Prefix . "poll_desc SET pollTitle='{$pollTitle}' WHERE pollID='{$pollID}'");
$poll_type = $poll_type + 128 * $poll_close;
for ($i = 1; $i <= sizeof($optionText); $i++) {
if ($optionText[$i] != "") {
$optionText[$i] = FixQuotes($optionText[$i]);
}
$result = sql_query("UPDATE " . $NPDS_Prefix . "poll_data SET optionText='{$optionText[$i]}', pollType='{$poll_type}' WHERE pollID='{$pollID}' and voteID='{$i}'");
}
Header("Location: admin.php?op=create");
}
示例7: intval
<TBODY>
<TR>
<TD width="10" vAlign=top></TD>
<TD vAlign=top>
<TABLE align=center cellSpacing=0 width="400" cellPadding=0 border=0>
<?php
$_GET['id'] = intval($_GET['id']);
//с╩┤звш╥╟╩╥├/╗├╨к╥╩╤┴╛╤╣╕ь
$db->connectdb(DB_NAME, DB_USERNAME, DB_PASSWORD);
$res['news'] = $db->select_query("SELECT * FROM " . TB_NEWS . " WHERE id='" . $_GET['id'] . "' ");
$arr['news'] = $db->fetch($res['news']);
if (!$arr['news']['id']) {
echo "<BR><BR><BR><BR><CENTER><IMG SRC=\"images/icon/notview.gif\" BORDER=\"0\" ><BR><BR><B>ф┴ш┴╒├╥┬б╥├вш╥╟╩╥├/╗├╨к╥╩╤┴╛╤╣╕ь╣╒щ</B></CENTER><BR><BR><BR><BR>";
} else {
$content = $arr['news']['detail'];
$Detail = stripslashes(FixQuotes($content));
//╖╙б╥├р╛╘ш┴и╙╣╟╣д╣рвщ╥к┴
$db->connectdb(DB_NAME, DB_USERNAME, DB_PASSWORD);
//к╫ш═╦┴╟┤╦┴┘ш
$res['category'] = $db->select_query("SELECT * FROM " . TB_NEWS_CAT . " WHERE id='" . $arr['news']['category'] . "' ");
$arr['category'] = $db->fetch($res['category']);
?>
<tr>
<td><B><FONT COLOR="#990000"><h5><?php
echo _FORM_CAT;
?>
<FONT COLOR="#0066FF"><?php
echo $arr['category']['category_name'];
?>
</h>
示例8: changeStory
function changeStory($sid, $subject, $hometext, $bodytext, $topic, $notes, $catid, $ihome, $members, $Mmembers, $Cdate, $Csid, $date_finval, $epur, $theme)
{
global $NPDS_Prefix;
global $aid, $ultramode;
$subject = stripslashes(FixQuotes(str_replace('"', '"', $subject)));
$hometext = stripslashes(FixQuotes($hometext));
$bodytext = stripslashes(FixQuotes($bodytext));
$notes = stripslashes(FixQuotes($notes));
if ($members == 1 and $Mmembers == "") {
$ihome = "-127";
}
if ($members == 1 and ($Mmembers > 1 and $Mmembers <= 127)) {
$ihome = $Mmembers;
}
if ($Cdate) {
sql_query("UPDATE " . $NPDS_Prefix . "stories SET catid='{$catid}', title='{$subject}', hometext='{$hometext}', bodytext='{$bodytext}', topic='{$topic}', notes='{$notes}', ihome='{$ihome}',time=now(), date_finval='{$date_finval}', auto_epur='{$epur}', archive='0' WHERE sid='{$sid}'");
} else {
sql_query("UPDATE " . $NPDS_Prefix . "stories SET catid='{$catid}', title='{$subject}', hometext='{$hometext}', bodytext='{$bodytext}', topic='{$topic}', notes='{$notes}', ihome='{$ihome}', date_finval='{$date_finval}', auto_epur='{$epur}' WHERE sid='{$sid}'");
}
if ($Csid) {
if ($ibid = theme_image("pick.gif")) {
$imgtmp = $ibid;
} else {
$imgtmp = "images/pick.gif";
}
sql_query("UPDATE " . $NPDS_Prefix . "stories SET hometext='<img src=\"" . $imgtmp . "\" border=\"0\" align=\"center\" alt=\"\" /> :: {$hometext}' WHERE sid='{$sid}'");
list($Lsid) = sql_fetch_row(sql_query("SELECT sid FROM " . $NPDS_Prefix . "stories ORDER BY sid DESC"));
$Lsid++;
sql_query("UPDATE " . $NPDS_Prefix . "stories SET sid='{$Lsid}' WHERE sid='{$sid}'");
// commentaires
if (file_exists("modules/comments/article.conf.php")) {
include "modules/comments/article.conf.php";
sql_query("UPDATE " . $NPDS_Prefix . "posts SET topic_id='{$Lsid}' WHERE forum_id='{$forum}' AND topic_id='{$topic}'");
}
$sid = $Lsid;
}
global $aid;
Ecr_Log("security", "changeStory({$sid}, {$subject}, hometext..., bodytext..., {$topic}, notes..., {$catid}, {$ihome}, {$members}, {$Mmembers}, {$Cdate}, {$Csid}, {$date_finval},{$epur},{$theme}) by AID : {$aid}", "");
if ($ultramode) {
ultramode();
}
// Cluster Paradise
if (file_exists("modules/cluster-paradise/cluster-activate.php")) {
include "modules/cluster-paradise/cluster-activate.php";
}
if (file_exists("modules/cluster-paradise/cluster-M.php")) {
include "modules/cluster-paradise/cluster-M.php";
}
// Cluster Paradise
// Réseaux sociaux
if (file_exists('modules/npds_twi/npds_to_twi.php')) {
include 'modules/npds_twi/npds_to_twi.php';
}
if (file_exists('modules/npds_fbk/npds_to_fbk.php')) {
include 'modules/npds_twi/npds_to_fbk.php';
}
// Réseaux sociaux
redirect_url("admin.php?op=EditStory&sid={$sid}");
}
示例9: RecentForumPosts_fab
function RecentForumPosts_fab($title, $maxforums, $maxtopics, $displayposter, $topicmaxchars, $hr)
{
global $parse, $user;
global $NPDS_Prefix;
$topics = 0;
settype($maxforums, "integer");
if ($maxforums == 0) {
$lim = "";
} else {
$lim = " LIMIT {$maxforums}";
}
if ($user) {
$query = "SELECT * FROM " . $NPDS_Prefix . "forums ORDER BY cat_id,forum_index,forum_id" . $lim;
} else {
$query = "SELECT * FROM " . $NPDS_Prefix . "forums WHERE forum_type!='9' AND forum_type!='7' AND forum_type!='5' ORDER BY cat_id,forum_index,forum_id" . $lim;
}
$result = sql_query($query);
if (!$result) {
exit;
}
$premier = false;
$boxstuff = "<ul>\n";
while ($row = sql_fetch_row($result)) {
if ($row[6] == "5" or $row[6] == "7") {
$ok_affich = false;
$tab_groupe = valid_group($user);
$ok_affich = groupe_forum($row[7], $tab_groupe);
} else {
$ok_affich = true;
}
if ($ok_affich) {
$forumid = $row[0];
$forumname = $row[1];
$forum_desc = $row[2];
if ($hr) {
$boxstuff .= "<hr class=\"titboxcont\" />";
}
if ($parse == 0) {
$forumname = FixQuotes($forumname);
$forum_desc = FixQuotes($forum_desc);
} else {
$forumname = stripslashes($forumname);
$forum_desc = stripslashes($forum_desc);
}
$res = sql_query("SELECT * FROM " . $NPDS_Prefix . "forumtopics WHERE forum_id = '{$forumid}' ORDER BY topic_time DESC");
$ibidx = sql_num_rows($res);
$boxstuff .= "<li><a href=\"viewforum.php?forum={$forumid}\" title=\"" . strip_tags($forum_desc) . "\">{$forumname}</a> ({$ibidx}) </li>\n";
$topics = 0;
while ($topics < $maxtopics && ($topicrow = sql_fetch_row($res))) {
$topicid = $topicrow[0];
$tt = $topictitle = $topicrow[1];
$date = $topicrow[3];
$replies = 0;
$postquery = "SELECT COUNT(*) AS total FROM " . $NPDS_Prefix . "posts WHERE topic_id = '{$topicid}'";
if ($pres = sql_query($postquery)) {
if ($myrow = sql_fetch_assoc($pres)) {
$replies = $myrow['total'];
}
}
if (strlen($topictitle) > $topicmaxchars) {
$topictitle = substr($topictitle, 0, $topicmaxchars);
$topictitle .= "..";
}
if ($displayposter) {
$posterid = $topicrow[2];
$RowQ1 = Q_Select("SELECT uname FROM " . $NPDS_Prefix . "users WHERE uid = '{$posterid}'", 3600);
list(, $myrow) = each($rowQ1);
$postername = $myrow['uname'];
}
if ($parse == 0) {
$tt = strip_tags(FixQuotes($tt));
$topictitle = FixQuotes($topictitle);
} else {
$tt = strip_tags(stripslashes($tt));
$topictitle = stripslashes($topictitle);
}
$boxstuff .= "<a href=\"viewtopic.php?topic={$topicid}&forum={$forumid}\" title=\"{$tt}\">\"{$topictitle}\"</a> ({$replies})";
$boxstuff .= "</li>";
if ($displayposter) {
$boxstuff .= "<br /> - {$postername}";
}
$topics++;
}
}
}
$boxstuff .= "</ul>\n";
return $boxstuff;
}
示例10: secartpublish
function secartpublish($artid, $secid, $title, $content, $author, $members, $Mmembers)
{
global $NPDS_Prefix;
if (is_array($Mmembers) and $members == 1) {
$members = implode(',', $Mmembers);
}
$title = stripslashes(FixQuotes($title));
$content = stripslashes(FixQuotes($content));
if ($secid != '0') {
sql_query("DELETE FROM " . $NPDS_Prefix . "seccont_tempo WHERE artid='{$artid}'");
$timestamp = time();
sql_query("INSERT INTO " . $NPDS_Prefix . "seccont VALUES (NULL,'{$secid}','{$title}','{$content}', '0', '{$author}', '99', '{$members}', '{$timestamp}')");
global $aid;
Ecr_Log('security', "PublicateArticleSections({$artid}, {$secid}, {$title}) by AID : {$aid}", '');
$result = sql_query("SELECT email FROM authors WHERE aid='{$author}'");
list($lemail) = sql_fetch_row($result);
$sujet = adm_translate("Validation de votre publication");
$message = adm_translate("La publication que vous aviez en attente vient d'être validée");
global $notify_from;
send_email($lemail, $sujet, $message, $notify_from, true, "html");
}
Header("Location: admin.php?op=sections");
}
示例11: Ephemeridschange
function Ephemeridschange($eid, $did, $mid, $yid, $content)
{
global $hlpfile, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg;
$content = stripslashes(FixQuotes($content) . "");
sql_query("UPDATE " . $NPDS_Prefix . "ephem SET yid='{$yid}', content='{$content}' WHERE eid='{$eid}'");
Header("Location: admin.php?op=Ephemeridsmaintenance&did={$did}&mid={$mid}");
}
示例12: CreateTopic
function CreateTopic($xanonpost, $subject, $comment, $pid, $pollID, $host_name, $mode, $order, $thold, $posttype)
{
global $user, $userinfo, $EditedMessage, $cookie, $prefix, $pollcomm, $anonpost, $db, $module_name;
$author = FixQuotes($author);
$subject = FixQuotes(filter_text($subject, "nohtml"));
$comment = format_url($comment);
if ($posttype == "exttrans") {
$comment = FixQuotes(nl2br(htmlspecialchars(check_words($comment))));
} elseif ($posttype == "plaintext") {
$comment = FixQuotes(nl2br(filter_text($comment)));
} else {
$comment = FixQuotes(filter_text($comment));
}
if (is_user($user)) {
getusrinfo($user);
}
if (is_user($user) && !$xanonpost) {
getusrinfo($user);
$name = $userinfo[username];
$email = $userinfo[femail];
$url = $userinfo[user_website];
$score = 1;
} else {
$name = "";
$email = "";
$url = "";
$score = 0;
}
$ip = $_SERVER["REMOTE_HOST"];
if (empty($ip)) {
$ip = $_SERVER["REMOTE_ADDR"];
}
$pollID = intval($pollID);
$result = $db->sql_query("select count(*) from " . $prefix . "_poll_desc where pollID='{$pollID}'");
$fake = $db->sql_numrows($result);
if ($fake == 1) {
if ($anonpost == 0 and is_user($user) or $anonpost == 1) {
$db->sql_query("insert into " . $prefix . "_pollcomments values (NULL, '{$pid}', '{$pollID}', now(), '{$name}', '{$email}', '{$url}', '{$ip}', '{$subject}', '{$comment}', '{$score}', '0')");
update_points(9);
} else {
echo "Nice try...";
die;
}
} else {
include "header.php";
echo "According to my records, the topic you are trying " . "to reply to does not exist. If you're just trying to be " . "annoying, well then too bad.";
include "footer.php";
die;
}
if ($pollcomm == 1) {
if (isset($cookie[4])) {
$options .= "&mode={$cookie['4']}";
} else {
$options .= "&mode=thread";
}
if (isset($cookie[5])) {
$options .= "&order={$cookie['5']}";
} else {
$options .= "&order=0";
}
if (isset($cookie[6])) {
$options .= "&thold={$cookie['6']}";
} else {
$options .= "&thold=0";
}
} else {
$options = "";
}
Header("Location: modules.php?name={$module_name}&op=results&pollID={$pollID}{$options}");
}
示例13: settype
global $powerpack;
$powerpack = true;
settype($op, 'string');
switch ($op) {
// Instant Members Message
case "instant_message":
Form_instant_message($to_userid);
break;
case "write_instant_message":
if ($user) {
$rowQ1 = Q_Select("SELECT uid FROM " . $NPDS_Prefix . "users WHERE uname='{$cookie['1']}'", 3600);
list(, $uid) = each($rowQ1);
$from_userid = $uid['uid'];
if ($subject != "" or $message != "") {
$subject = FixQuotes($subject) . "";
$messages = FixQuotes($messages) . "";
writeDB_private_message($to_userid, "", $subject, $from_userid, $message, $copie);
}
}
Header("Location: index.php");
break;
// Instant Members Message
// Purge Chat Box
// Instant Members Message
// Purge Chat Box
case "admin_chatbox_write":
if ($admin) {
if ($chatbox_clearDB == "OK") {
sql_query("DELETE FROM " . $NPDS_Prefix . "chatbox WHERE date <= " . (time() - 60 * 5) . "");
}
}
示例14: add_review
function add_review($id, $date, $title, $text, $reviewer, $email, $score, $cover, $url, $url_title, $rlanguage)
{
global $prefix, $db;
$id = intval($id);
$title = stripslashes(FixQuotes($title));
$text = stripslashes(FixQuotes($text));
$reviewer = stripslashes(FixQuotes($reviewer));
$email = stripslashes(FixQuotes($email));
$score = intval($score);
$db->sql_query("insert into " . $prefix . "_reviews values (NULL, '{$date}', '{$title}', '{$text}', '{$reviewer}', '{$email}', '{$score}', '{$cover}', '{$url}', '{$url_title}', '1', '{$rlanguage}')");
$db->sql_query("delete from " . $prefix . "_reviews_add WHERE id = '{$id}'");
Header("Location: admin.php?op=reviews");
}
示例15: date
$ddate = date(d);
$ydate = date(Y);
$ndate = "{$mdate}-{$ddate}-{$ydate}";
$pdate = $ndate;
$ptime = $mtime;
if ($debug == "true") {
echo "UserName:{$username}<br>SiteName: {$sitename}";
}
startjournal($sitename, $user);
echo "<br>";
OpenTable();
echo "<div align=center class=title>" . _ENTRYADDED . "</div><br><br>";
echo "<div align=center> [ <a href=\"modules.php?name={$module_name}&file=edit\">" . _RETURNJOURNAL . "</a> ]</div>";
CloseTable();
$title = stripslashes(FixQuotes($title));
$bodytext = stripslashes(FixQuotes($bodytext));
$sql = "INSERT INTO " . $prefix . "_journal (jid,aid,title,bodytext,mood,pdate,ptime,status,mtime,mdate) VALUES ('','{$username}','{$title}','{$bodytext}','{$mood}','{$pdate}','{$ptime}','{$status}','{$mtime}','{$ndate}')";
$db->sql_query($sql);
update_points(1);
$sql = "SELECT * FROM " . $prefix . "_journal_stats WHERE joid = '{$username}'";
$result = $db->sql_query($sql);
$row_count = $db->sql_numrows($result);
if ($row_count == 0) {
$query = "INSERT INTO " . $prefix . "_journal_stats (id,joid,nop,ldp,ltp,micro) VALUES ('','{$username}','1',now(),'{$mtime}',now())";
$db->sql_query($query);
} else {
$row = $db->sql_fetchrow($result);
$nnop = $row[nop];
$nnnop = $nnop + 1;
$micro = date(U);
$query = "UPDATE " . $prefix . "_journal_stats SET nop='{$nnnop}', ldp='{$ndate}', ltp='{$mtime}' micro='{$micro}' WHERE joid='{$username}'";