Exemple #1
0
    echo url_maker($exfile['index'], $Settings['file_ext'], "act=view", $Settings['qstr'], $Settings['qsep'], $prexqstr['index'], $exqstr['index']);
    ?>
"><?php 
    echo $Settings['board_name'];
    ?>
</a><?php 
    echo $ThemeSet['NavLinkDivider'];
    ?>
<a href="<?php 
    echo url_maker($exfile['index'], $Settings['file_ext'], "act=stats", $Settings['qstr'], $Settings['qsep'], $prexqstr['index'], $exqstr['index']);
    ?>
#bstats">Board Statistics</a></div>
<div class="DivNavLinks">&nbsp;</div>
<?php 
}
$uolcuttime = GMTimeStamp();
$uoltime = $uolcuttime - ini_get("session.gc_maxlifetime");
$uolquery = sql_pre_query("SELECT * FROM \"" . $Settings['sqltable'] . "sessions\" WHERE \"expires\" >= %i ORDER BY \"expires\" DESC", array($uoltime));
$uolresult = sql_query($uolquery, $SQLStat);
$uolnum = sql_num_rows($uolresult);
$uoli = 0;
$olmn = 0;
$olgn = 0;
$olan = 0;
$olmbn = 0;
$MembersOnline = null;
$GuestsOnline = null;
while ($uoli < $uolnum) {
    $session_data = sql_result($uolresult, $uoli, "session_data");
    $serialized_data = sql_result($uolresult, $uoli, "serialized_data");
    $session_user_agent = sql_result($uolresult, $uoli, "user_agent");
Exemple #2
0
                $Error = "Yes";
                ?>
<div class="TableMessage" style="text-align: center;">Your old password is too big.<br />&nbsp;</div>
<?php 
            }
            if ($_POST['Password'] != $_POST['RePassword']) {
                $Error = "Yes";
                ?>
<div class="TableMessage" style="text-align: center;">Your passwords did not match.<br />&nbsp;</div>
<?php 
            }
            $NewIP = $_SERVER['REMOTE_ADDR'];
            if ($Error != "Yes") {
                if ($_POST['Password'] != "") {
                    $NewSalt = salt_hmac();
                    $NewDay = GMTimeStamp();
                    if ($Settings['use_hashtype'] == "md2") {
                        $iDBHash = "iDBH2";
                        $NewPassword = b64e_hmac($_POST['Password'], $OldJoined, $NewSalt, "md2");
                    }
                    if ($Settings['use_hashtype'] == "md4") {
                        $iDBHash = "iDBH4";
                        $NewPassword = b64e_hmac($_POST['Password'], $OldJoined, $NewSalt, "md4");
                    }
                    if ($Settings['use_hashtype'] == "md5") {
                        $iDBHash = "iDBH5";
                        $NewPassword = b64e_hmac($_POST['Password'], $OldJoined, $NewSalt, "md5");
                    }
                    if ($Settings['use_hashtype'] == "sha1") {
                        $iDBHash = "iDBH";
                        $NewPassword = b64e_hmac($_POST['Password'], $OldJoined, $NewSalt, "sha1");
Exemple #3
0
     setcookie("UserID", null, GMTimeStamp() - 3600, $cbasedir);
     setcookie("SessPass", null, GMTimeStamp() - 3600, $cbasedir);
     setcookie(session_name(), "", GMTimeStamp() - 3600, $cbasedir);
 }
 if ($cookieDomain != null) {
     if ($cookieSecure === true) {
         setcookie("MemberName", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain, 1);
         setcookie("UserID", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain, 1);
         setcookie("SessPass", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain, 1);
         setcookie(session_name(), "", GMTimeStamp() - 3600, $cbasedir, $cookieDomain, 1);
     }
     if ($cookieSecure === false) {
         setcookie("MemberName", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain);
         setcookie("UserID", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain);
         setcookie("SessPass", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain);
         setcookie(session_name(), "", GMTimeStamp() - 3600, $cbasedir, $cookieDomain);
     }
 }
 unset($_COOKIE[session_name()]);
 $_SESSION = array();
 session_unset();
 session_destroy();
 redirect("location", $rbasedir . url_maker($exfile['member'], $Settings['file_ext'], "act=login", $Settings['qstr'], $Settings['qsep'], $prexqstr['member'], $exqstr['member'], false));
 sql_free_result($resultchkusr);
 sql_free_result($svrgresultkgb);
 ob_clean();
 header("Content-Type: text/plain; charset=" . $Settings['charset']);
 $urlstatus = 302;
 gzip_page($Settings['use_gzip'], $GZipEncode['Type']);
 session_write_close();
 die;
Exemple #4
0
if (!is_numeric($_GET['calmadd'])) {
    $_GET['calmadd'] = 0;
}
$nextcalm = $_GET['calmadd'] + 1;
$backcalm = $_GET['calmadd'] - 1;
if ($_GET['calmadd'] === 0 || $_GET['calmadd'] == "0") {
    $calmounthaddd = $_GET['calmadd'] * $dayconv['month'];
}
if ($_GET['calmadd'] !== 0 && $_GET['calmadd'] != "0") {
    $calmounthaddd = $_GET['calmadd'] * $dayconv['month'] + $dayconv['day'] * 1;
}
// Extra month stuff
$MyRealMonthNum1 = GMTimeGet("m", $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST']);
$MyRealYear = GMTimeGet("Y", $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST']);
// Count the Days in this month
$MyTimeStamp = GMTimeStamp() + $calmounthaddd;
$CountDays = GMTimeGet("t", $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST'], $calmounthaddd);
$MyDay = GMTimeGet("j", $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST'], $calmounthaddd);
$MyDay2 = GMTimeGet("jS", $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST'], $calmounthaddd);
$MyDayNum = GMTimeGet("d", $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST'], $calmounthaddd);
$MyDayName = GMTimeGet("l", $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST'], $calmounthaddd);
$MyYear = GMTimeGet("Y", $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST'], $calmounthaddd);
$MyYear2 = GMTimeGet("y", $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST'], $calmounthaddd);
$MyMonth = GMTimeGet("m", $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST'], $calmounthaddd);
$MyTimeStamp1 = mktime(0, 0, 0, $MyMonth, 1, $MyYear);
$MyTimeStamp2 = mktime(23, 59, 59, $MyMonth, $CountDays, $MyYear);
$MyMonthName = GMTimeGet("F", $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST'], $calmounthaddd);
$MyMonthNum1 = GMTimeGet("m", $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST'], $calmounthaddd);
$MyMonthNum2 = GMTimeGet("n", $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST'], $calmounthaddd);
$FirstDayThisMonth = date("w", mktime(0, 0, 0, $MyMonth, 1, $MyYear));
$EventsName = array();
Exemple #5
0
    }
    if ($Error == "Yes") {
        redirect("refresh", $rbasedir . url_maker($exfile['index'], $Settings['file_ext'], "act=view", $Settings['qstr'], $Settings['qsep'], $prexqstr['index'], $exqstr['index'], false), "4");
        ?>
<tr>
	<td><span class="TableMessage">
	<br />Click <a href="<?php 
        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 />&nbsp;
	</span><br /></td>
</tr>
<?php 
    }
    if ($Error != "Yes") {
        $LastActive = GMTimeStamp();
        if ($_SESSION['UserGroup'] == $Settings['GuestGroup']) {
            $User1Name = $_POST['GuestName'];
        }
        if ($_SESSION['UserGroup'] != $Settings['GuestGroup']) {
            $User1Name = $_SESSION['MemberName'];
        }
        $User1IP = $_SERVER['REMOTE_ADDR'];
        $query = sql_pre_query("INSERT INTO \"" . $Settings['sqltable'] . "messenger\" (\"SenderID\", \"ReciverID\", \"GuestName\", \"MessageTitle\", \"MessageText\", \"Description\", \"DateSend\", \"Read\", \"IP\") VALUES \n(%i, %i, '%s', '%s', '%s', '%s', %i, %i, '%s')", array($_SESSION['UserID'], $SendMessageToID, $_SESSION['MemberName'], $_POST['MessageName'], $_POST['Message'], $_POST['MessageDesc'], $LastActive, 0, $User1IP));
        sql_query($query, $SQLStat);
        $messageid = sql_get_next_id($Settings['sqltable'], "messenger", $SQLStat);
        ?>
<tr>
	<td><span class="TableMessage"><br />
	Message sent to user <?php 
        echo $_POST['SendMessageTo'];
Exemple #6
0
                    }
                    $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");
                    sql_free_result($gresult);
                    $User1IP = $_SERVER['REMOTE_ADDR'];
                    ++$rei;
                }
                sql_free_result($reresult);
                $query = sql_pre_query("INSERT INTO \"" . $Settings['sqltable'] . "topics\" (\"PollID\", \"ForumID\", \"CategoryID\", \"OldForumID\", \"OldCategoryID\", \"UserID\", \"GuestName\", \"TimeStamp\", \"LastUpdate\", \"TopicName\", \"Description\", \"NumReply\", \"NumViews\", \"Pinned\", \"Closed\") VALUES\n" . "(0, %i, %i, %i, %i, %i, '%s', %i, %i, '%s', '%s', 0, 0, 0, 0)", array($ForumID, $ForumCatID, $ForumID, $ForumCatID, $User1ID, $User1Name, $LastActive, $LastActive, $_POST['TopicName'], $_POST['TopicDesc']));
                sql_query($query, $SQLStat);
                $topicid = sql_get_next_id($Settings['sqltable'], "topics", $SQLStat);
                $query = sql_pre_query("INSERT INTO \"" . $Settings['sqltable'] . "posts\" (\"TopicID\", \"ForumID\", \"CategoryID\", \"UserID\", \"GuestName\", \"TimeStamp\", \"LastUpdate\", \"EditUser\", \"EditUserName\", \"Post\", \"Description\", \"IP\", \"EditIP\") VALUES\n" . "(" . $topicid . ", %i, %i, %i, '%s', %i, %i, 0, '', '%s', '%s', '%s', '0')", array($ForumID, $ForumCatID, $User1ID, $User1Name, $LastActive, $LastActive, $_POST['TopicPost'], $_POST['TopicDesc'], $User1IP));
                sql_query($query, $SQLStat);
                $postid = sql_get_next_id($Settings['sqltable'], "posts", $SQLStat);
                $_SESSION['LastPostTime'] = GMTimeStamp() + $GroupInfo['FloodControl'];
                if ($User1ID != 0 && $User1ID != -1) {
                    $queryupd = sql_pre_query("UPDATE \"" . $Settings['sqltable'] . "members\" SET \"LastActive\"=%i,\"IP\"='%s',\"PostCount\"=%i,\"LastPostTime\"=%i WHERE \"id\"=%i", array($LastActive, $User1IP, $NewPostCount, $_SESSION['LastPostTime'], $User1ID));
                    sql_query($queryupd, $SQLStat);
                }
                $NewNumPosts = $NumberPosts + 1;
                $NewNumTopics = $NumberTopics + 1;
                $queryupd = sql_pre_query("UPDATE \"" . $Settings['sqltable'] . "forums\" SET \"NumPosts\"=%i,\"NumTopics\"=%i WHERE \"id\"=%i", array($NewNumPosts, $NewNumTopics, $ForumID));
                sql_query($queryupd, $SQLStat);
                redirect("refresh", $rbasedir . url_maker($exfile['topic'], $Settings['file_ext'], "act=view&id=" . $topicid . "&page=1", $Settings['qstr'], $Settings['qsep'], $prexqstr['topic'], $exqstr['topic'], FALSE), "3");
                ?>
<tr>
	<td><span class="TableMessage"><br />
	Topic <?php 
                echo $_POST['TopicName'];
                ?>
Exemple #7
0
}
if (file_exists($_POST['tableprefix'] . "_settings.php")) {
    $Error = "Yes";
    echo "<br />Sorry board exists pick a new board url prefix.";
}
if ($_POST['AdminPasswords'] != $_POST['ReaPassword']) {
    $Error = "Yes";
    echo "<br />Your passwords did not match.";
}
if ($_POST['HTMLType'] == "xhtml11") {
    $_POST['HTMLLevel'] = "Strict";
}
$_POST['BoardURL'] = htmlentities($_POST['BoardURL'], ENT_QUOTES, $Settings['charset']);
$_POST['BoardURL'] = remove_spaces($_POST['BoardURL']);
$_POST['BoardURL'] = addslashes($_POST['BoardURL']);
$YourDate = GMTimeStamp();
$YourEditDate = $YourDate + $dayconv['minute'];
$GSalt = salt_hmac();
$YourSalt = salt_hmac();
/* Fix The User Info for iDB */
$_POST['NewBoardName'] = stripcslashes(htmlspecialchars($_POST['NewBoardName'], ENT_QUOTES, $Settings['charset']));
//$_POST['NewBoardName'] = preg_replace("/&amp;#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['NewBoardName']);
$_POST['NewBoardName'] = remove_spaces($_POST['NewBoardName']);
//$_POST['AdminPassword'] = stripcslashes(htmlspecialchars($_POST['AdminPassword'], ENT_QUOTES, $Settings['charset']));
//$_POST['AdminPassword'] = preg_replace("/\&amp;#(.*?);/is", "&#$1;", $_POST['AdminPassword']);
$_POST['AdminUser'] = stripcslashes(htmlspecialchars($_POST['AdminUser'], ENT_QUOTES, $Settings['charset']));
//$_POST['AdminUser'] = preg_replace("/&amp;#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['AdminUser']);
$_POST['AdminUser'] = remove_spaces($_POST['AdminUser']);
$_POST['AdminEmail'] = remove_spaces($_POST['AdminEmail']);
if (!function_exists('hash') && !function_exists('hash_algos')) {
    if ($_POST['usehashtype'] != "md5" && $_POST['usehashtype'] != "sha1") {
Exemple #8
0
    }
    if ($cookieDomain != null) {
        if ($cookieSecure === true) {
            setcookie("MemberName", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain, 1);
            setcookie("UserID", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain, 1);
            setcookie("SessPass", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain, 1);
            setcookie(session_name(), "", GMTimeStamp() - 3600, $cbasedir, $cookieDomain, 1);
        }
        if ($cookieSecure === false) {
            setcookie("MemberName", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain);
            setcookie("UserID", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain);
            setcookie("SessPass", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain);
            setcookie(session_name(), "", GMTimeStamp() - 3600, $cbasedir, $cookieDomain);
        }
    }
    unset($_COOKIE[session_name()]);
    $_SESSION = array();
    //session_unset(); session_destroy();
    $temp_user_ip = $_SERVER['REMOTE_ADDR'];
    $exptime = GMTimeStamp() - ini_get("session.gc_maxlifetime");
    sql_query(sql_pre_query("DELETE FROM \"" . $Settings['sqltable'] . "sessions\" WHERE \"expires\" < %i OR ip_address='%s'", array($exptime, $temp_user_ip)), $SQLStat);
    redirect("location", $rbasedir . url_maker($exfile['member'], $Settings['file_ext'], "act=login", $Settings['qstr'], $Settings['qsep'], $prexqstr['member'], $exqstr['member'], false));
    sql_free_result($resultlog2);
    sql_free_result($gresult);
    ob_clean();
    header("Content-Type: text/plain; charset=" . $Settings['charset']);
    $urlstatus = 302;
    gzip_page($Settings['use_gzip'], $GZipEncode['Type']);
    session_write_close();
    die;
}
Exemple #9
0
function sql_session_gc($maxlifetime)
{
    global $sqltable, $SQLStat;
    $time = GMTimeStamp() - $maxlifetime;
    //sql_query(sql_pre_query('DELETE FROM \"'.$sqltable.'sessions\" WHERE \"expires\" < UNIX_TIMESTAMP();', array(null)),$SQLStat);
    sql_query(sql_pre_query("DELETE FROM \"" . $sqltable . "sessions\" WHERE \"expires\" < %i", array($time)), $SQLStat);
    return true;
}
Exemple #10
0
                ?>
<tr>
	<td><span class="TableMessage">
	<br />Click <a href="<?php 
                echo url_maker($exfile['member'], $Settings['file_ext'], "act=signup", $Settings['qstr'], $Settings['qsep'], $exqstr['member'], $prexqstr['member']);
                ?>
">here</a> to try again.<br />&nbsp;
	</span><br /></td>
</tr>
<?php 
            }
            if ($Error != "Yes") {
                $_POST['UserIP'] = $_SERVER['REMOTE_ADDR'];
                $_POST['Group'] = $Settings['MemberGroup'];
                $_POST['Joined'] = GMTimeStamp();
                $_POST['LastActive'] = GMTimeStamp();
                $_POST['Signature'] = "";
                $_POST['Interests'] = "";
                $_POST['Title'] = "";
                $_POST['PostCount'] = "0";
                if (!isset($Settings['AdminValidate'])) {
                    $Settings['AdminValidate'] = "off";
                }
                if ($Settings['AdminValidate'] == "on" || $Settings['AdminValidate'] != "off") {
                    $ValidateStats = "no";
                    $yourgroup = $Settings['ValidateGroup'];
                }
                if ($Settings['AdminValidate'] == "off" || $Settings['AdminValidate'] != "on") {
                    $ValidateStats = "yes";
                    $yourgroup = $Settings['MemberGroup'];
                }
Exemple #11
0
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);
    }
}