sql_query($sql); while ($row = $db->sql_fetchrow($result)) { if (!is_admin($admin)): if ($username != $row['aid']): echo ("
"); openTable(); echo ("
".NOTYOURS."
"); closeTable(); journalfoot(); die(); endif; endif; } echo ("
"._UPDATEOK."

"); $sql = "UPDATE ".$prefix."_journal SET title='$title', bodytext='$jbodytext', mood='$mood', status='$status', mdate='$ndate', mtime='$mtime' WHERE jid='$jid'"; $db->sql_query($sql); $edited = "

"._UPDATED."
"; } else { $edited = ""; } if ($debug == "true") : echo ("UserName:$username
SiteName: $sitename"); endif; startjournal($sitename, $user); echo "
"; OpenTable(); echo ("
"._JOURNALFOR." $username

"); echo ("
[ "._ADDENTRY." | "._YOURLAST20." | "._LISTALLENTRIES." ]
"); echo "$edited"; CloseTable(); echo "
"; function list20($username, $bgcolor1, $bgcolor2, $bgcolor3) { global $prefix, $user_prefix, $db, $module_name; openTable(); echo ("
"._LAST20FOR." $username

"); echo (""); echo (""); echo (""); echo (""); echo (""); echo (""); echo (""); echo (""); echo (""); $sql = "SELECT jid, aid, title, pdate, ptime, mdate, mtime, status, mood FROM ".$prefix."_journal WHERE aid='$username' order by 'jid' DESC"; $result = $db->sql_query($sql); $dcount = 1; while ($row = $db->sql_fetchrow($result)) { if ($dcount >= 21) : echo ("
"._DATE."
"._TIME."
"._TITLE." "._CLICKTOVIEW."
"._PUBLIC."
"._EDIT."
"._DELETE."
"); closeTable(); echo ("
"); journalfoot(); die(); else : $dcount = $dcount + 1; print (""); $jid = intval($row['jid']); $title = check_html($row['title'], "nohtml"); $jaid = check_html($row['aid'], "nohtml"); $pdate = check_html($row['pdate'], "nohtml"); $ptime = check_html($row['ptime'], "nohtml"); printf ("
%s
", $pdate); printf ("
%s
", $ptime); printf (" %s", $jid, $title); $sqlscnd = "SELECT cid from ".$prefix."_journal_comments where rid='$jaid'"; $rstscnd = $db->sql_query($sqlscnd); $scndcount = 0; while ($rowscnd = $db->sql_fetchrow($rstscnd)) { $scndcount = $scndcount + 1; } if ($scndcount == 1) { printf (" —— $scndcount "._COMMENT.""); } else { printf (" —— $scndcount "._COMMENTS.""); } if ($row['status'] == "yes") { $row['status'] = _YES; } else { $row['status'] = _NO; } printf ("
%s
", $row['status']); printf ("
\""._EDIT."\"
", $jid, $title); printf ("
\""._DELETE."\"
", $jid, $title); print (""); endif; } echo (""); closeTable(); } function listall($username, $bgcolor1, $bgcolor2, $bgcolor3, $sitename) { global $prefix, $user_prefix, $db, $module_name; openTable(); echo ("
"._COMPLETELIST." $username

"); echo (""); echo (""); echo (""); echo (""); echo (""); echo (""); echo (""); echo (""); echo (""); $sql = "SELECT jid, aid, title, pdate, ptime, mdate, mtime, status, mood FROM ".$prefix."_journal WHERE aid='$username' order by 'jid' DESC"; $result = $db->sql_query($sql); $dcount = 0; $pubcount = 0; $prvcount = 0; while ($row = $db->sql_fetchrow($result)) { $jid = intval($row['jid']); $title = check_html($row['title'], "nohtml"); $jaid = check_html($row['aid'], "nohtml"); $pdate = check_html($row['pdate'], "nohtml"); $ptime = check_html($row['ptime'], "nohtml"); $dcount = $dcount + 1; if ($row['status'] == "yes"): $pubcount = $pubcount +1; $row['status'] = _YES; else: $prvcount = $prvcount + 1; $row['status'] = _NO; endif; print (""); printf ("", $row['pdate']); printf ("", $row['ptime']); printf (""); } else { printf (" —— $scndcount "._COMMENTS.""); } printf ("", $row['status']); printf ("", $row['jid']); printf ("", $row['jid']); print (""); } echo ("
"._DATE."
"._TIME."
"._TITLE."
"._PUBLIC."
"._EDIT."
"._DELETE."
%s
%s
%s", $jid, $title); $sqlscnd = "SELECT cid from ".$prefix."_journal_comments where rid='".intval($row['jid'])."'"; $rstscnd = $db->sql_query($sqlscnd); $scndcount = 0; while ($rowscnd = $db->sql_fetchrow($rstscnd)) { $scndcount = $scndcount + 1; } if ($scndcount == 1) { printf (" —— $scndcount "._COMMENT."
%s
"._EDIT."
"._DELETE."
"); if ($prvcount == "") { $prvcount = 0; } if ($pubcount == "") { $pubcount = 0; } if ($dcount == "") { $dcount = 0; } echo "
$pubcount "._PUBLICENTRIES." - " ."$prvcount "._PRIVATEENTRIES." - " ."$dcount "._TOTALENTRIES."
"; closeTable(); } if (!isset($disp)) { $disp = ""; } switch($disp) { case "last": list20($username, $bgcolor1, $bgcolor2, $bgcolor3); break; case "all": listall($username, $bgcolor1, $bgcolor2, $bgcolor3, $sitename); break; default: list20($username, $bgcolor1, $bgcolor2, $bgcolor3); break; } journalfoot(); } if (is_admin($admin)) { $username = check_html($username, "nohtml"); $sitename = check_html($sitename, "nohtml"); $jbodytext = kses(ADVT_stripslashes($jbodytext), $allowed); $jbodytext = addslashes($jbodytext); $jid = intval($jid); if ($edit == intval(1)) { $htime = date(h); $mtime = date(i); $ntime = date(a); $mtime = "$htime:$mtime $ntime"; $mdate = date(m); $ddate = date(d); $ydate = date(Y); $ndate = "$mdate-$ddate-$ydate"; $pdate = $ndate; $ptime = $mtime; $micro = microtime(); $sql = "SELECT * FROM ".$prefix."_journal WHERE jid = '$jid'"; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { } echo ("
"._UPDATEOK."

"); $sql = "UPDATE ".$user_prefix."_journal SET title='$title', bodytext='$jbodytext', mood='$mood', status='$status', mdate='$ndate', mtime='$mtime' WHERE jid='$jid'"; $db->sql_query($sql); $edited = "

"._UPDATED."
"; } else { $edited = ""; } if ($debug == "true") : echo ("UserName:$username
SiteName: $sitename"); endif; startjournal($sitename, $user); echo "
"; OpenTable(); echo ("
"._JOURNALFOR." $username

"); echo ("
[ "._ADDENTRY." | "._YOURLAST20." | "._LISTALLENTRIES." ]
"); echo "$edited"; CloseTable(); echo "
"; function list20($username, $bgcolor1, $bgcolor2, $bgcolor3) { global $prefix, $user_prefix, $db, $module_name; openTable(); echo ("
"._LAST20FOR." $username

"); echo (""); echo (""); echo (""); echo (""); echo (""); echo (""); echo (""); echo (""); echo (""); $sql = "SELECT jid, aid, title, pdate, ptime, mdate, mtime, status, mood FROM ".$prefix."_journal WHERE aid='$username' order by 'jid' DESC"; $result = $db->sql_query($sql); $dcount = 1; while ($row = $db->sql_fetchrow($result)) { if ($dcount >= 21) : echo ("
"._DATE."
"._TIME."
"._TITLE." "._CLICKTOVIEW."
"._PUBLIC."
"._EDIT."
"._DELETE."
"); closeTable(); echo ("
"); journalfoot(); die(); else : $dcount = $dcount + 1; print (""); $jid = intval($row['jid']); $title = check_html($row['title'], "nohtml"); $jaid = check_html($row['aid'], "nohtml"); $pdate = check_html($row['pdate'], "nohtml"); $ptime = check_html($row['ptime'], "nohtml"); printf ("
%s
", $pdate); printf ("
%s
", $ptime); printf (" %s", $jid, $title); $sqlscnd = "SELECT cid from ".$prefix."_journal_comments where rid='$jaid'"; $rstscnd = $db->sql_query($sqlscnd); $scndcount = 0; while ($rowscnd = $db->sql_fetchrow($rstscnd)) { $scndcount = $scndcount + 1; } if ($scndcount == 1) { printf (" —— $scndcount "._COMMENT.""); } else { printf (" —— $scndcount "._COMMENTS.""); } if ($row['status'] == "yes") { $row['status'] = _YES; } else { $row['status'] = _NO; } printf ("
%s
", $row['status']); printf ("
\""._EDIT."\"
", $jid, $title); printf ("
\""._DELETE."\"
", $jid, $title); print (""); endif; } echo (""); closeTable(); } function listall($username, $bgcolor1, $bgcolor2, $bgcolor3, $sitename) { global $prefix, $user_prefix, $db, $module_name; openTable(); echo ("
"._COMPLETELIST." $username

"); echo (""); echo (""); echo (""); echo (""); echo (""); echo (""); echo (""); echo (""); echo (""); $sql = "SELECT jid, aid, title, pdate, ptime, mdate, mtime, status, mood FROM ".$prefix."_journal WHERE aid='$username' order by 'jid' DESC"; $result = $db->sql_query($sql); $dcount = 0; $pubcount = 0; $prvcount = 0; while ($row = $db->sql_fetchrow($result)) { $jid = intval($row['jid']); $title = check_html($row['title'], "nohtml"); $jaid = check_html($row['aid'], "nohtml"); $pdate = check_html($row['pdate'], "nohtml"); $ptime = check_html($row['ptime'], "nohtml"); $dcount = $dcount + 1; if ($row['status'] == "yes"): $pubcount = $pubcount +1; $row['status'] = _YES; else: $prvcount = $prvcount + 1; $row['status'] = _NO; endif; print (""); printf ("", $row['pdate']); printf ("", $row['ptime']); printf (""); } else { printf (" —— $scndcount "._COMMENTS.""); } printf ("", $row['status']); printf ("", $row['jid']); printf ("", $row['jid']); print (""); } echo ("
"._DATE."
"._TIME."
"._TITLE."
"._PUBLIC."
"._EDIT."
"._DELETE."
%s
%s
%s", $jid, $title); $sqlscnd = "SELECT cid from ".$user_prefix."_journal_comments where rid=".intval($row['jid']); $rstscnd = $db->sql_query($sqlscnd); $scndcount = 0; while ($rowscnd = $db->sql_fetchrow($rstscnd)) { $scndcount = $scndcount + 1; } if ($scndcount == 1) { printf (" —— $scndcount "._COMMENT."
%s
"._EDIT."
"._DELETE."
"); if ($prvcount == "") { $prvcount = 0; } if ($pubcount == "") { $pubcount = 0; } if ($dcount == "") { $dcount = 0; } echo "
$pubcount "._PUBLICENTRIES." - " ."$prvcount "._PRIVATEENTRIES." - " ."$dcount "._TOTALENTRIES."
"; closeTable(); } if (!isset($disp)) { $disp = ""; } switch($disp) { case "last": list20($username, $bgcolor1, $bgcolor2, $bgcolor3); break; case "all": listall($username, $bgcolor1, $bgcolor2, $bgcolor3, $sitename); break; default: list20($username, $bgcolor1, $bgcolor2, $bgcolor3); break; } journalfoot(); } else { $pagetitle = "- "._YOUMUSTBEMEMBER.""; $pagetitle = check_html($pagetitle, "nohtml"); OpenTable(); echo "
"._YOUMUSTBEMEMBER."
"; CloseTable(); include("footer.php"); die(); } ?>