$UsersName = $GuestsName; if ($UsersName == null) { $UsersName = "Guest"; } } if ($PermissionInfo['CanViewForum'][$ForumID] == "yes" && $CatPermissionInfo['CanViewCategory'][$CategoryID] == "yes" && $TopicStat >= 0 && $TopicStat < 3 || $PermissionInfo['CanViewForum'][$ForumID] == "yes" && $CatPermissionInfo['CanViewCategory'][$CategoryID] == "yes" && $PermissionInfo['CanModForum'][$ForumID] == "yes" && $TopicStat == 3) { $LastReply = " <br /> "; $glrquery = sql_pre_query("SELECT * FROM \"" . $Settings['sqltable'] . "posts\" WHERE \"TopicID\"=%i ORDER BY \"TimeStamp\" DESC LIMIT 1", array($TopicID)); $glrresult = sql_query($glrquery, $SQLStat); $glrnum = sql_num_rows($glrresult); if ($glrnum > 0) { $ReplyID1 = sql_result($glrresult, 0, "id"); $UsersID1 = sql_result($glrresult, 0, "UserID"); $GuestsName1 = sql_result($glrresult, 0, "GuestName"); $TimeStamp1 = sql_result($glrresult, 0, "TimeStamp"); $TimeStamp1 = GMTimeChange($_SESSION['iDBDateFormat'] . ", " . $_SESSION['iDBTimeFormat'], $TimeStamp1, $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST']); $PreUsersName1 = GetUserName($UsersID1, $Settings['sqltable'], $SQLStat); if ($PreUsersName1['Name'] === null) { $UsersID1 = -1; $PreUsersName1 = GetUserName($UsersID1, $Settings['sqltable'], $SQLStat); } $UsersName1 = $PreUsersName1['Name']; $UsersHidden1 = $PreUsersName1['Hidden']; } $NumPages = null; $NumRPosts = $NumReply + 1; if (!isset($Settings['max_posts'])) { $Settings['max_posts'] = 10; } if ($NumRPosts > $Settings['max_posts']) { $NumPages = ceil($NumRPosts / $Settings['max_posts']);
$requery = sql_pre_query("SELECT * FROM \"" . $Settings['sqltable'] . "members\" WHERE \"id\"=%i LIMIT 1", array($MyUserID)); $reresult = sql_query($requery, $SQLStat); $renum = sql_num_rows($reresult); $rei = 0; $ipshow = "two"; $User1ID = $MyUserID; $GuestsName = $MyGuestName; $User1Name = sql_result($reresult, $rei, "Name"); $User1IP = sql_result($reresult, $rei, "IP"); if ($User1IP == $MyPostIP) { $ipshow = "one"; } $User1Email = sql_result($reresult, $rei, "Email"); $User1Title = sql_result($reresult, $rei, "Title"); $User1Joined = sql_result($reresult, $rei, "Joined"); $User1Joined = GMTimeChange($_SESSION['iDBDateFormat'], $User1Joined, $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST']); $User1Hidden = sql_result($reresult, $rei, "HiddenMember"); $User1GroupID = sql_result($reresult, $rei, "GroupID"); $gquery = sql_pre_query("SELECT * FROM \"" . $Settings['sqltable'] . "groups\" WHERE \"id\"=%i LIMIT 1", array($User1GroupID)); $gresult = sql_query($gquery, $SQLStat); $User1Group = sql_result($gresult, 0, "Name"); $GroupNamePrefix = sql_result($gresult, 0, "NamePrefix"); $GroupNameSuffix = sql_result($gresult, 0, "NameSuffix"); sql_free_result($gresult); } if ($User1CanUseBBags1 == "yes") { $MyPost = bbcode_parser($MyPost); } if ($User1CanExecPHP == "no") { $MyPost = preg_replace("/\\[ExecPHP\\](.*?)\\[\\/ExecPHP\\]/is", "<span style=\"color: red; font-weight: bold;\">ERROR:</span> cannot execute php code.", $MyPost); }
if (!is_numeric($BirthExpl[2])) { $BirthExpl[2] = "0"; } if (count($BirthExpl) == "3" && checkdate($BirthExpl[0], $BirthExpl[1], $BirthExpl[2]) === true) { if (is_numeric($BirthExpl[0]) && is_numeric($BirthExpl[1]) && is_numeric($BirthExpl[2])) { if (pre_strlen($BirthExpl[0]) == "1") { $BirthExpl[0] = "0" . $BirthExpl[0]; } if (pre_strlen($BirthExpl[1]) == "1") { $BirthExpl[1] = "0" . $BirthExpl[1]; } if (pre_strlen($BirthExpl[0]) == "2" && pre_strlen($BirthExpl[1]) == "2" && pre_strlen($BirthExpl[2]) == "4") { $BirthIn = mktime(12, 12, 12, $BirthExpl[0], $BirthExpl[1], $BirthExpl[2]); $BirthMonth = GMTimeChange("m", $BirthIn, 0, 0, "off"); $BirthDay = GMTimeChange("d", $BirthIn, 0, 0, "off"); $BirthYear = GMTimeChange("Y", $BirthIn, 0, 0, "off"); } if (pre_strlen($BirthExpl[0]) != "2" || pre_strlen($BirthExpl[1]) != "2" || pre_strlen($BirthExpl[2]) != "4") { $BirthMonth = "0"; $BirthDay = "0"; $BirthYear = "0"; } } if (!is_numeric($BirthExpl[0]) || !is_numeric($BirthExpl[1]) || !is_numeric($BirthExpl[2])) { $BirthMonth = "0"; $BirthDay = "0"; $BirthYear = "0"; } } if (count($BirthExpl) == "3" && checkdate($BirthExpl[0], $BirthExpl[1], $BirthExpl[2]) === false) { $BirthMonth = "0";
?> "> <table style="text-align: left;"> <tr> <td style="width: 50%;"><span class="TextBoxLabel" title="Using User Time Zone">[User TimeZone] Install Date:</span></td> <td style="width: 50%;"><?php echo GMTimeChange($_SESSION['iDBDateFormat'] . ", " . $_SESSION['iDBTimeFormat'], $Settings['start_date'], $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST']); ?> </td> </tr><?php if ($_SESSION['UserTimeZone'] != $Settings['DefaultTimeZone'] || $_SESSION['UserDST'] != $Settings['DefaultDST']) { ?> <tr> <td style="width: 50%;"><span class="TextBoxLabel" title="Using Board Time Zone">[Board TimeZone] Install Date:</span></td> <td style="width: 50%;"><?php echo GMTimeChange($_SESSION['iDBDateFormat'] . ", " . $_SESSION['iDBTimeFormat'], $Settings['start_date'], $Settings['DefaultTimeZone'], 0, $Settings['DefaultDST']); ?> </td> </tr><?php } if ($_GET['board'] == $Settings['root_board']) { if ($GroupInfo['ViewDBInfo'] == "yes") { ?> <tr style="text-align: left;"> <td style="width: 50%;"><span class="TextBoxLabel">Forum Software Version:</span></td> <td style="width: 50%;"><?php echo "<span title=\"" . $VerInfo['iDB_Full_Ver_Show'] . "\">" . $VerInfo['iDB_Ver_Show'] . "</span>"; ?> <!-- <a href="<?php echo url_maker($exfile['admin'], $Settings['file_ext'], "act=vercheck", $Settings['qstr'], $Settings['qsep'], $prexqstr['admin'], $exqstr['admin']); ?>
$EventName = sql_result($result, $is, "EventName"); $EventText = sql_result($result, $is, "EventText"); $EventStart = sql_result($result, $is, "TimeStamp"); $EventEnd = sql_result($result, $is, "TimeStampEnd"); //$EventMonth=sql_result($result,$is,"EventMonth"); $EventMonth = GMTimeChange("m", $EventStart, $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST']); //$EventMonthEnd=sql_result($result,$is,"EventMonthEnd"); $EventMonthEnd = GMTimeChange("m", $EventEnd, $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST']); //$EventDay=sql_result($result,$is,"EventDay"); $EventDay = GMTimeChange("j", $EventStart, $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST']); //$EventDayEnd=sql_result($result,$is,"EventDayEnd"); $EventDayEnd = GMTimeChange("j", $EventEnd, $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST']); //$EventYear=sql_result($result,$is,"EventYear"); $EventYear = GMTimeChange("Y", $EventStart, $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST']); //$EventYearEnd=sql_result($result,$is,"EventYearEnd"); $EventYearEnd = GMTimeChange("Y", $EventEnd, $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST']); if ($EventMonthEnd != $MyMonth) { $EventDayEnd = $CountDays; } if ($EventMonth < $MyMonth) { $EventDay = 1; } $oldeventname = $EventName; $EventName1 = pre_substr($EventName, 0, 20); if (pre_strlen($EventName) > 20) { $EventName1 = $EventName1 . "..."; } $EventName = $EventName1; if (!isset($EventsName[$EventDay])) { $EventsName[$EventDay] = null; }
<li> </li> <?php } if ($num > 0) { ?> <ul style="list-style-type: decimal;"> <?php } while ($i < $num) { $TopicID = sql_result($result, $i, "id"); $TForumID = sql_result($result, $i, "ForumID"); $OldForumID = sql_result($result, $i, "OldForumID"); $UsersID = sql_result($result, $i, "UserID"); $GuestsName = sql_result($result, $i, "GuestName"); $TheTime = sql_result($result, $i, "TimeStamp"); $TheTime = GMTimeChange($_SESSION['iDBDateFormat'] . ", " . $_SESSION['iDBTimeFormat'], $TheTime, $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST']); $NumReply = sql_result($result, $i, "NumReply"); $NumberPosts = $NumReply + 1; $prepagelist = null; if (!isset($Settings['max_posts'])) { $Settings['max_posts'] = 10; } $TopicName = sql_result($result, $i, "TopicName"); $TopicDescription = sql_result($result, $i, "Description"); $PinnedTopic = sql_result($result, $i, "Pinned"); $TopicStat = sql_result($result, $i, "Closed"); $PreTopic = null; if ($PinnedTopic > 2) { $PinnedTopic = 1; } if ($PinnedTopic < 0) {
echo url_maker($exfile['index'], $Settings['file_ext'], "act=view", $Settings['qstr'], $Settings['qsep'], $prexqstr['index'], $exqstr['index']); ?> ">here</a> to goto index page.<br /> </span><br /></td> </tr> <?php } if ($Error != "Yes") { $TimeSIn = mktime(0, 0, 0, $TimeIn[0], $TimeIn[1], $TimeIn[2]); $TimeSOut = mktime(23, 59, 59, $TimeOut[0], $TimeOut[1], $TimeOut[2]); $EventMonth = GMTimeChange("m", $TimeSIn, 0, 0, "off"); $EventMonthEnd = GMTimeChange("m", $TimeSOut, 0, 0, "off"); $EventDay = GMTimeChange("d", $TimeSIn, 0, 0, "off"); $EventDayEnd = GMTimeChange("d", $TimeSOut, 0, 0, "off"); $EventYear = GMTimeChange("Y", $TimeSIn, 0, 0, "off"); $EventYearEnd = GMTimeChange("Y", $TimeSOut, 0, 0, "off"); $User1ID = $MyUserID; $User1IP = $_SERVER['REMOTE_ADDR']; if ($_SESSION['UserGroup'] == $Settings['GuestGroup']) { $User1Name = $_POST['GuestName']; } if ($_SESSION['UserGroup'] != $Settings['GuestGroup']) { $User1Name = $_SESSION['MemberName']; } $query = sql_pre_query("INSERT INTO " . $Settings['sqltable'] . "events (\"UserID\", \"GuestName\", \"EventName\", \"EventText\", \"TimeStamp\", \"TimeStampEnd\", \"EventMonth\", \"EventMonthEnd\", \"EventDay\", \"EventDayEnd\", \"EventYear\", \"EventYearEnd\", \"IP\") VALUES\n" . "(%i, '%s', '%s', '%s', %i, %i, %i, %i, %i, %i, %i, %i, '%s')", array($User1ID, $User1Name, $_POST['EventName'], $_POST['EventText'], $TimeSIn, $TimeSOut, $EventMonth, $EventMonthEnd, $EventDay, $EventDayEnd, $EventYear, $EventYearEnd, $User1IP)); sql_query($query, $SQLStat); $eventid = sql_get_next_id($Settings['sqltable'], "events", $SQLStat); redirect("refresh", $rbasedir . url_maker($exfile['event'], $Settings['file_ext'], "act=event&id=" . $eventid, $Settings['qstr'], $Settings['qsep'], $prexqstr['event'], $exqstr['event'], FALSE), "3"); ?> <tr> <td><span class="TableMessage"><br />
$MyDescription = do_html_bbcode($MyDescription); } $MyDescription = text2icons($MyDescription, $Settings['sqltable'], $SQLStat); $MyDescription = preg_replace("/\\<br\\>/", "<br />", nl2br($MyDescription)); $MyDescription = url2link($MyDescription); if (isset($GroupNamePrefix) && $GroupNamePrefix != null) { $UsersName = $GroupNamePrefix . $UsersName; } if (isset($GroupNameSuffix) && $GroupNameSuffix != null) { $UsersName = $UsersName . $GroupNameSuffix; } $TheTime = sql_result($result, $i, "TimeStamp"); $AtomTime = GMTimeChange("Y-m-d\\TH:i:s\\Z", $TheTime, 0); //$OldRSSTime=GMTimeChange("Y-m-d\TH:i:s+0:00",$TheTime,0); $OldRSSTime = $AtomTime; $TheTime = GMTimeChange("D, j M Y G:i:s \\G\\M\\T", $TheTime, 0); $TopicName = sql_result($result, $i, "TopicName"); $ForumDescription = sql_result($result, $i, "Description"); if (isset($PermissionInfo['CanViewForum'][$ForumID]) && $PermissionInfo['CanViewForum'][$ForumID] == "yes" && isset($CatPermissionInfo['CanViewCategory'][$CategoryID]) && $CatPermissionInfo['CanViewCategory'][$CategoryID] == "yes") { if ($_GET['feedtype'] == "atom") { $CDataDescription = "<![CDATA[\n" . $MyDescription . "\n]]>"; $Atom .= '<entry>' . "\n" . '<title>' . $TopicName . '</title>' . "\n" . '<summary>' . $CDataDescription . '</summary>' . "\n" . '<link rel="alternate" href="' . $BoardURL . url_maker($exfilerss['topic'], $Settings['file_ext'], "act=view&id=" . $TopicID . "&page=1", $Settings['qstr'], $Settings['qsep'], $prexqstrrss['topic'], $exqstrrss['topic']) . '" />' . "\n" . '<id>' . $BoardURL . url_maker($exfilerss['topic'], $Settings['file_ext'], "act=view&id=" . $TopicID . "&page=1", $Settings['qstr'], $Settings['qsep'], $prexqstrrss['topic'], $exqstrrss['topic']) . '</id>' . "\n" . '<author>' . "\n" . '<name>' . $UsersName . '</name>' . "\n" . '</author>' . "\n" . '<updated>' . $AtomTime . '</updated>' . "\n" . '</entry>' . "\n"; } if ($_GET['feedtype'] == "oldrss") { $CDataDescription = "<![CDATA[\n" . $MyDescription . "\n]]>"; $PreRSS .= ' <rdf:li rdf:resource="' . $BoardURL . url_maker($exfilerss['topic'], $Settings['file_ext'], "act=view&id=" . $TopicID . "&page=1", $Settings['qstr'], $Settings['qsep'], $prexqstrrss['topic'], $exqstrrss['topic']) . '" />' . "\n"; $RSS .= '<item rdf:about="' . $BoardURL . url_maker($exfilerss['topic'], $Settings['file_ext'], "act=view&id=" . $TopicID . "&page=1", $Settings['qstr'], $Settings['qsep'], $prexqstrrss['topic'], $exqstrrss['topic']) . '">' . "\n" . '<title>' . $TopicName . '</title>' . "\n" . '<description>' . $CDataDescription . '</description>' . "\n" . '<dc:publisher>' . $UsersName . '</dc:publisher>' . "\n" . '<dc:creator>' . $UsersName . '</dc:creator>' . "\n" . '<dc:date>' . $OldRSSTime . '</dc:date>' . "\n" . '</item>' . "\n"; } if ($_GET['feedtype'] == "rss") { $CDataDescription = "<![CDATA[\n" . $MyDescription . "\n]]>"; $RSS .= '<item>' . "\n" . '<pubDate>' . $TheTime . '</pubDate>' . "\n" . '<author>' . $UsersName . '</author>' . "\n" . '<title>' . $TopicName . '</title>' . "\n" . '<description>' . $CDataDescription . '</description>' . "\n" . '<link>' . $BoardURL . url_maker($exfilerss['topic'], $Settings['file_ext'], "act=view&id=" . $TopicID . "&page=1", $Settings['qstr'], $Settings['qsep'], $prexqstrrss['topic'], $exqstrrss['topic']) . '</link>' . "\n" . '<guid>' . $BoardURL . url_maker($exfilerss['topic'], $Settings['file_ext'], "act=view&id=" . $TopicID . "&page=1", $Settings['qstr'], $Settings['qsep'], $prexqstrrss['topic'], $exqstrrss['topic']) . '</guid>' . "\n" . '</item>' . "\n";
if ($_POST['MinOffSet'] < 0) { $_POST['MinOffSet'] = "00"; } $YourOffSet = $_POST['YourOffSet'] . ":" . $_POST['MinOffSet']; $AdminDST = $_POST['DST']; $MyDay = GMTimeGet("d", $YourOffSet, 0, $AdminDST); $MyMonth = GMTimeGet("m", $YourOffSet, 0, $AdminDST); $MyYear = GMTimeGet("Y", $YourOffSet, 0, $AdminDST); $MyYear10 = $MyYear + 10; $YourDateEnd = $YourDate; $EventMonth = GMTimeChange("m", $YourDate, 0, 0, "off"); $EventMonthEnd = GMTimeChange("m", $YourDateEnd, 0, 0, "off"); $EventDay = GMTimeChange("d", $YourDate, 0, 0, "off"); $EventDayEnd = GMTimeChange("d", $YourDateEnd, 0, 0, "off"); $EventYear = GMTimeChange("Y", $YourDate, 0, 0, "off"); $EventYearEnd = GMTimeChange("Y", $YourDateEnd, 0, 0, "off"); $KarmaBoostDay = $EventMonth . $EventDay; $Settings['idb_time_format'] = "g:i A"; if (!isset($_POST['iDBTimeFormat'])) { $_POST['iDBTimeFormat'] = "g:i A"; } if (isset($_POST['iDBTimeFormat'])) { $_POST['iDBTimeFormat'] = convert_strftime($_POST['iDBTimeFormat']); } $Settings['idb_date_format'] = "F j Y"; if (!isset($_POST['iDBDateFormat'])) { $_POST['iDBDateFormat'] = "F j Y"; } if (isset($_POST['iDBDateFormat'])) { $_POST['iDBDateFormat'] = convert_strftime($_POST['iDBDateFormat']); }
} $ViewMem['ID'] = sql_result($result, $i, "id"); $ViewMem['Name'] = sql_result($result, $i, "Name"); $ViewMem['Signature'] = sql_result($result, $i, "Signature"); $ViewMem['Avatar'] = sql_result($result, $i, "Avatar"); $ViewMem['AvatarSize'] = sql_result($result, $i, "AvatarSize"); $ViewMem['Email'] = sql_result($result, $i, "Email"); $ViewMem['GroupID'] = sql_result($result, $i, "GroupID"); $ViewMem['HiddenMember'] = sql_result($result, $i, "HiddenMember"); $ViewMem['WarnLevel'] = sql_result($result, $i, "WarnLevel"); $ViewMem['Interests'] = sql_result($result, $i, "Interests"); $ViewMem['Title'] = sql_result($result, $i, "Title"); $ViewMem['Joined'] = sql_result($result, $i, "Joined"); $ViewMem['Joined'] = GMTimeChange("M j Y, " . $_SESSION['iDBTimeFormat'], $ViewMem['Joined'], $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST']); $ViewMem['LastActive'] = sql_result($result, $i, "LastActive"); $ViewMem['LastActive'] = GMTimeChange("M j Y, " . $_SESSION['iDBTimeFormat'], $ViewMem['LastActive'], $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST']); $ViewMem['Website'] = sql_result($result, $i, "Website"); if ($ViewMem['Website'] == "http://") { $ViewMem['Website'] = $Settings['idburl']; } $ViewMem['Website'] = urlcheck($ViewMem['Website']); $BoardWWWChCk = parse_url($Settings['idburl']); $MemsWWWChCk = parse_url($ViewMem['Website']); $opennew = " onclick=\"window.open(this.href);return false;\""; if ($BoardWWWChCk['host'] == $MemsWWWChCk['host']) { $opennew = null; } $ViewMem['Gender'] = sql_result($result, $i, "Gender"); $ViewMem['PostCount'] = sql_result($result, $i, "PostCount"); $ViewMem['Karma'] = sql_result($result, $i, "Karma"); $ViewMem['TimeZone'] = sql_result($result, $i, "TimeZone");
function GMTimeGet($format, $offset, $minoffset = null, $dst = null, $taddon = null) { if (!is_numeric($taddon)) { $taddon = null; } if ($taddon !== null) { return GMTimeChange($format, GMTimeStamp() + $taddon, $offset, $minoffset, $dst); } if ($taddon === null) { return GMTimeChange($format, GMTimeStamp(), $offset, $minoffset, $dst); } }
function TimeChange($format, $timestamp, $offset, $minoffset = null, $dst = null) { return GMTimeChange($format, $timestamp, $offset, $minoffset, $dst); }