Ejemplo n.º 1
0
"  \"GuestName\" varchar(150) NOT NULL default '',\n".
"  \"TimeStamp\" numeric(15) NOT NULL default '0',\n".
"  \"Post\" text NOT NULL,\n".
"  \"IP\" varchar(50) NOT NULL default ''
");", array(null));
sql_query($query,$SQLStat);
$query = sql_pre_query("INSERT INTO \"".$_POST['tableprefix']."tagboard\" VALUES (1,-1,'".$iDB_Author."',".$YourDate.",'Welcome to Your New Tag Board. ^_^','127.0.0.1'), array(null)); 
sql_query($query,$SQLStat);
*/
$query = sql_pre_query("CREATE TABLE \"" . $_POST['tableprefix'] . "themes\" (\n" . "  \"id\" SERIAL PRIMARY KEY NOT NULL,\n" . "  \"Name\" varchar(32) NOT NULL default '',\n" . "  \"ThemeName\" varchar(32) NOT NULL default '',\n" . "  \"ThemeMaker\" varchar(150) NOT NULL default '',\n" . "  \"ThemeVersion\" varchar(150) NOT NULL default '',\n" . "  \"ThemeVersionType\" varchar(150) NOT NULL default '',\n" . "  \"ThemeSubVersion\" varchar(150) NOT NULL default '',\n" . "  \"MakerURL\" varchar(150) NOT NULL default '',\n" . "  \"CopyRight\" varchar(150) NOT NULL default '',\n" . "  \"WrapperString\" text NOT NULL,\n" . "  \"CSS\" text NOT NULL,\n" . "  \"CSSType\" varchar(150) NOT NULL default '',\n" . "  \"FavIcon\" varchar(150) NOT NULL default '',\n" . "  \"TableStyle\" varchar(150) NOT NULL default '',\n" . "  \"MiniPageAltStyle\" varchar(150) NOT NULL default '',\n" . "  \"PreLogo\" varchar(150) NOT NULL default '',\n" . "  \"Logo\" varchar(150) NOT NULL default '',\n" . "  \"LogoStyle\" varchar(150) NOT NULL default '',\n" . "  \"SubLogo\" varchar(150) NOT NULL default '',\n" . "  \"TopicIcon\" varchar(150) NOT NULL default '',\n" . "  \"MovedTopicIcon\" varchar(150) NOT NULL default '',\n" . "  \"HotTopic\" varchar(150) NOT NULL default '',\n" . "  \"MovedHotTopic\" varchar(150) NOT NULL default '',\n" . "  \"PinTopic\" varchar(150) NOT NULL default '',\n" . "  \"AnnouncementTopic\" varchar(150) NOT NULL default '',\n" . "  \"MovedPinTopic\" varchar(150) NOT NULL default '',\n" . "  \"HotPinTopic\" varchar(150) NOT NULL default '',\n" . "  \"MovedHotPinTopic\" varchar(150) NOT NULL default '',\n" . "  \"ClosedTopic\" varchar(150) NOT NULL default '',\n" . "  \"MovedClosedTopic\" varchar(150) NOT NULL default '',\n" . "  \"HotClosedTopic\" varchar(150) NOT NULL default '',\n" . "  \"MovedHotClosedTopic\" varchar(150) NOT NULL default '',\n" . "  \"PinClosedTopic\" varchar(150) NOT NULL default '',\n" . "  \"MovedPinClosedTopic\" varchar(150) NOT NULL default '',\n" . "  \"HotPinClosedTopic\" varchar(150) NOT NULL default '',\n" . "  \"MovedHotPinClosedTopic\" varchar(150) NOT NULL default '',\n" . "  \"MessageRead\" varchar(150) NOT NULL default '',\n" . "  \"MessageUnread\" varchar(150) NOT NULL default '',\n" . "  \"Profile\" varchar(150) NOT NULL default '',\n" . "  \"WWW\" varchar(150) NOT NULL default '',\n" . "  \"PM\" varchar(150) NOT NULL default '',\n" . "  \"TopicLayout\" varchar(150) NOT NULL default '',\n" . "  \"AddReply\" varchar(150) NOT NULL default '',\n" . "  \"FastReply\" varchar(150) NOT NULL default '',\n" . "  \"NewTopic\" varchar(150) NOT NULL default '',\n" . "  \"QuoteReply\" varchar(150) NOT NULL default '',\n" . "  \"EditReply\" varchar(150) NOT NULL default '',\n" . "  \"DeleteReply\" varchar(150) NOT NULL default '',\n" . "  \"Report\" varchar(150) NOT NULL default '',\n" . "  \"LineDivider\" varchar(150) NOT NULL default '',\n" . "  \"ButtonDivider\" varchar(150) NOT NULL default '',\n" . "  \"LineDividerTopic\" varchar(150) NOT NULL default '',\n" . "  \"TitleDivider\" varchar(150) NOT NULL default '',\n" . "  \"ForumStyle\" varchar(150) NOT NULL default '',\n" . "  \"ForumIcon\" varchar(150) NOT NULL default '',\n" . "  \"SubForumIcon\" varchar(150) NOT NULL default '',\n" . "  \"RedirectIcon\" varchar(150) NOT NULL default '',\n" . "  \"TitleIcon\" varchar(150) NOT NULL default '',\n" . "  \"NavLinkIcon\" varchar(150) NOT NULL default '',\n" . "  \"NavLinkDivider\" varchar(150) NOT NULL default '',\n" . "  \"StatsIcon\" varchar(150) NOT NULL default '',\n" . "  \"NoAvatar\" varchar(150) NOT NULL default '',\n" . "  \"NoAvatarSize\" varchar(150) NOT NULL default '',\n" . "  UNIQUE (\"Name\")\n" . ");", array(null));
sql_query($query, $SQLStat);
$query = sql_pre_query("CREATE TABLE \"" . $_POST['tableprefix'] . "topics\" (\n" . "  \"id\" SERIAL PRIMARY KEY NOT NULL,\n" . "  \"PollID\" numeric(15) NOT NULL default '0',\n" . "  \"ForumID\" numeric(15) NOT NULL default '0',\n" . "  \"CategoryID\" numeric(15) NOT NULL default '0',\n" . "  \"OldForumID\" numeric(15) NOT NULL default '0',\n" . "  \"OldCategoryID\" numeric(15) NOT NULL default '0',\n" . "  \"UserID\" numeric(15) NOT NULL default '0',\n" . "  \"GuestName\" varchar(150) NOT NULL default '',\n" . "  \"TimeStamp\" numeric(15) NOT NULL default '0',\n" . "  \"LastUpdate\" numeric(15) NOT NULL default '0',\n" . "  \"TopicName\" varchar(150) NOT NULL default '',\n" . "  \"Description\" text NOT NULL,\n" . "  \"NumReply\" numeric(15) NOT NULL default '0',\n" . "  \"NumViews\" numeric(15) NOT NULL default '0',\n" . "  \"Pinned\" numeric(5) NOT NULL default '0',\n" . "  \"Closed\" numeric(5) NOT NULL default '0'\n" . ");", array(null));
sql_query($query, $SQLStat);
$query = sql_pre_query("INSERT INTO \"" . $_POST['tableprefix'] . "topics\" (\"PollID\", \"ForumID\", \"CategoryID\", \"OldForumID\", \"OldCategoryID\", \"UserID\", \"GuestName\", \"TimeStamp\", \"LastUpdate\", \"TopicName\", \"Description\", \"NumReply\", \"NumViews\", \"Pinned\", \"Closed\") VALUES\n" . "(0, 1, 1, 1, 1, -1, '" . $iDB_Author . "', %i, %i, 'Welcome', 'Welcome %s', 0, 0, 1, 1);", array($YourDate, $YourDate, $_POST['AdminUser']));
sql_query($query, $SQLStat);
$query = sql_pre_query("CREATE TABLE \"" . $_POST['tableprefix'] . "wordfilter\" (\n" . "  \"id\" SERIAL PRIMARY KEY NOT NULL,\n" . "  \"FilterWord\" text NOT NULL,\n" . "  \"Replacement\" text NOT NULL,\n" . "  \"CaseInsensitive\" varchar(5) NOT NULL default '',\n" . "  \"WholeWord\" varchar(5) NOT NULL default ''\n" . ");", array(null));
sql_query($query, $SQLStat);
$TableChCk = array("categories", "catpermissions", "events", "forums", "groups", "members", "mempermissions", "messenger", "permissions", "polls", "posts", "restrictedwords", "sessions", "smileys", "topics", "wordfilter");
$TablePreFix = $_POST['tableprefix'];
function add_prefix($tarray)
{
    global $TablePreFix;
    return $TablePreFix . $tarray;
}
$TableChCk = array_map("add_prefix", $TableChCk);
$tcount = count($TableChCk);
$ti = 0;
while ($ti < $tcount) {
    $OptimizeTea = sql_query(sql_pre_query("VACUUM ANALYZE \"" . $TableChCk[$ti] . "\"", array(null)), $SQLStat);
    ++$ti;
}
Ejemplo n.º 2
0
            $errorstr = $errorstr . "Your Group Name is too big.<br />\n";
        }
        if ($Error != "Yes") {
            redirect("refresh", $rbasedir . url_maker($exfile['admin'], $Settings['file_ext'], "act=view&menu=groups", $Settings['qstr'], $Settings['qsep'], $prexqstr['admin'], $exqstr['admin'], FALSE), "4");
            $admincptitle = " " . $ThemeSet['TitleDivider'] . " Updating Settings";
            if ($_POST['GroupName'] != $OldGroupName) {
                $query = sql_pre_query("UPDATE \"" . $Settings['sqltable'] . "permissions\" SET \"Name\"='%s' WHERE \"Name\"='%s'", array($_POST['GroupName'], $OldGroupName));
                sql_query($query, $SQLStat);
                $query = sql_pre_query("UPDATE \"" . $Settings['sqltable'] . "catpermissions\" SET \"Name\"='%s' WHERE \"Name\"='%s'", array($_POST['GroupName'], $OldGroupName));
                sql_query($query, $SQLStat);
            }
            if ($_POST['id'] != 1) {
                $query = sql_pre_query("UPDATE \"" . $Settings['sqltable'] . "groups\" SET \"Name\"='%s',\"NamePrefix\"='%s',\"NameSuffix\"='%s',\"CanViewBoard\"='%s',\"CanViewOffLine\"='%s',\"CanEditProfile\"='%s',\"CanAddEvents\"='%s',\"CanPM\"='%s',\"CanSearch\"='%s',\"CanDoHTML\"='%s',\"CanUseBBags\"='%s',CanViewIPAddress='%s',CanViewUserAgent='%s',\"FloodControl\"=%i,\"SearchFlood\"=%i,\"PromoteTo\"=%i,\"PromotePosts\"=%i,\"PromoteKarma\"=%i,\"HasModCP\"='%s',\"HasAdminCP\"='%s',\"ViewDBInfo\"='%s' WHERE \"id\"=%i", array($_POST['GroupName'], $_POST['NamePrefix'], $_POST['NameSuffix'], $_POST['CanViewBoard'], $_POST['CanViewOffLine'], $_POST['CanEditProfile'], $_POST['CanAddEvents'], $_POST['CanPM'], $_POST['CanSearch'], $_POST['CanDoHTML'], $_POST['CanUseBBags'], $_POST['CanViewIPAddress'], $_POST['CanViewUserAgent'], $_POST['FloodControl'], $_POST['SearchFlood'], $_POST['PromoteTo'], $_POST['PromotePosts'], $_POST['PromoteKarma'], $_POST['HasModCP'], $_POST['HasAdminCP'], $_POST['ViewDBInfo'], $_POST['id']));
            }
            if ($_POST['id'] == 1) {
                $query = sql_pre_query("UPDATE \"" . $Settings['sqltable'] . "groups\" SET \"Name\"='%s',\"NamePrefix\"='%s',\"NameSuffix\"='%s',\"CanDoHTML\"='%s',\"CanUseBBags\"='%s',\"FloodControl\"=%i,\"SearchFlood\"=%i WHERE \"id\"=%i", array($_POST['GroupName'], $_POST['NamePrefix'], $_POST['NameSuffix'], $_POST['CanDoHTML'], $_POST['CanUseBBags'], $_POST['FloodControl'], $_POST['SearchFlood'], $_POST['id']));
            }
            sql_query($query, $SQLStat);
        }
    }
}
$doupdate = false;
if (isset($_POST['id']) && $_POST['subact'] == "editnow") {
    $doupdate = true;
}
if (isset($_POST['id']) && isset($_POST['permid']) && $_POST['subact'] == "makenow") {
    $doupdate = true;
}
if ($_POST['act'] == "addgroup" && $_POST['update'] == "now" && $_GET['act'] == "addgroup") {
    $doupdate = true;
}
Ejemplo n.º 3
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;
}
Ejemplo n.º 4
0
$query = sql_pre_query("INSERT INTO \"" . $_POST['tableprefix'] . "smileys\" (\"FileName\", \"SmileName\", \"SmileText\", \"Directory\", \"Display\", \"ReplaceCI\") VALUES\n" . "('sweat.png', 'Sweat', ':sweat:', 'smileys/', 'yes', 'yes');", array(null));
sql_query($query, $SQLStat);
$query = sql_pre_query("INSERT INTO \"" . $_POST['tableprefix'] . "smileys\" (\"FileName\", \"SmileName\", \"SmileText\", \"Directory\", \"Display\", \"ReplaceCI\") VALUES\n" . "('tongue.png', 'Tongue', ':P', 'smileys/', 'yes', 'no');", array(null));
sql_query($query, $SQLStat);
$query = sql_pre_query("INSERT INTO \"" . $_POST['tableprefix'] . "smileys\" (\"FileName\", \"SmileName\", \"SmileText\", \"Directory\", \"Display\", \"ReplaceCI\") VALUES\n" . "('wub.png', 'Wub', ':wub:', 'smileys/', 'yes', 'yes');", array(null));
sql_query($query, $SQLStat);
$query = sql_pre_query("INSERT INTO \"" . $_POST['tableprefix'] . "smileys\" (\"FileName\", \"SmileName\", \"SmileText\", \"Directory\", \"Display\", \"ReplaceCI\") VALUES\n" . "('x.png', 'X', ':x:', 'smileys/', 'yes', 'yes');", array(null));
sql_query($query, $SQLStat);
/*
$query=sql_pre_query("CREATE TABLE \"".$_POST['tableprefix']."tagboard\" (\n".
"  \"id\" INTEGER PRIMARY KEY NOT NULL,\n".
"  \"UserID\" INTEGER NOT NULL default '0',\n".
"  \"GuestName\" VARCHAR(150) NOT NULL default '',\n".
"  \"TimeStamp\" INTEGER NOT NULL default '0',\n".
"  \"Post\" TEXT NOT NULL,\n".
"  \"IP\" VARCHAR(50) NOT NULL default ''
");", array(null));
sql_query($query,$SQLStat);
$query = sql_pre_query("INSERT INTO \"".$_POST['tableprefix']."tagboard\" VALUES (1,-1,'".$iDB_Author."',".$YourDate.",'Welcome to Your New Tag Board. ^_^','127.0.0.1'), array(null)); 
sql_query($query,$SQLStat);
*/
$query = sql_pre_query("CREATE TABLE \"" . $_POST['tableprefix'] . "themes\" (\n" . "  \"id\" INTEGER PRIMARY KEY NOT NULL,\n" . "  \"Name\" VARCHAR(32) UNIQUE NOT NULL default '',\n" . "  \"ThemeName\" VARCHAR(150) NOT NULL default '',\n" . "  \"ThemeMaker\" VARCHAR(150) NOT NULL default '',\n" . "  \"ThemeVersion\" VARCHAR(150) NOT NULL default '',\n" . "  \"ThemeVersionType\" VARCHAR(150) NOT NULL default '',\n" . "  \"ThemeSubVersion\" VARCHAR(150) NOT NULL default '',\n" . "  \"MakerURL\" VARCHAR(150) NOT NULL default '',\n" . "  \"CopyRight\" VARCHAR(150) NOT NULL default '',\n" . "  \"WrapperString\" TEXT NOT NULL default '',\n" . "  \"CSS\" TEXT NOT NULL,\n" . "  \"CSSType\" VARCHAR(150) NOT NULL default '',\n" . "  \"FavIcon\" VARCHAR(150) NOT NULL default '',\n" . "  \"TableStyle\" VARCHAR(150) NOT NULL default '',\n" . "  \"MiniPageAltStyle\" VARCHAR(150) NOT NULL default '',\n" . "  \"PreLogo\" VARCHAR(150) NOT NULL default '',\n" . "  \"Logo\" VARCHAR(150) NOT NULL default '',\n" . "  \"LogoStyle\" VARCHAR(150) NOT NULL default '',\n" . "  \"SubLogo\" VARCHAR(150) NOT NULL default '',\n" . "  \"TopicIcon\" VARCHAR(150) NOT NULL default '',\n" . "  \"MovedTopicIcon\" VARCHAR(150) NOT NULL default '',\n" . "  \"HotTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"MovedHotTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"PinTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"AnnouncementTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"MovedPinTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"HotPinTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"MovedHotPinTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"ClosedTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"MovedClosedTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"HotClosedTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"MovedHotClosedTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"PinClosedTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"MovedPinClosedTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"HotPinClosedTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"MovedHotPinClosedTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"MessageRead\" VARCHAR(150) NOT NULL default '',\n" . "  \"MessageUnread\" VARCHAR(150) NOT NULL default '',\n" . "  \"Profile\" VARCHAR(150) NOT NULL default '',\n" . "  \"WWW\" VARCHAR(150) NOT NULL default '',\n" . "  \"PM\" VARCHAR(150) NOT NULL default '',\n" . "  \"TopicLayout\" VARCHAR(150) NOT NULL default '',\n" . "  \"AddReply\" VARCHAR(150) NOT NULL default '',\n" . "  \"FastReply\" VARCHAR(150) NOT NULL default '',\n" . "  \"NewTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"QuoteReply\" VARCHAR(150) NOT NULL default '',\n" . "  \"EditReply\" VARCHAR(150) NOT NULL default '',\n" . "  \"DeleteReply\" VARCHAR(150) NOT NULL default '',\n" . "  \"Report\" VARCHAR(150) NOT NULL default '',\n" . "  \"LineDivider\" VARCHAR(150) NOT NULL default '',\n" . "  \"ButtonDivider\" VARCHAR(150) NOT NULL default '',\n" . "  \"LineDividerTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"TitleDivider\" VARCHAR(150) NOT NULL default '',\n" . "  \"ForumStyle\" VARCHAR(150) NOT NULL default '',\n" . "  \"ForumIcon\" VARCHAR(150) NOT NULL default '',\n" . "  \"SubForumIcon\" VARCHAR(150) NOT NULL default '',\n" . "  \"RedirectIcon\" VARCHAR(150) NOT NULL default '',\n" . "  \"TitleIcon\" VARCHAR(150) NOT NULL default '',\n" . "  \"NavLinkIcon\" VARCHAR(150) NOT NULL default '',\n" . "  \"NavLinkDivider\" VARCHAR(150) NOT NULL default '',\n" . "  \"StatsIcon\" VARCHAR(150) NOT NULL default '',\n" . "  \"NoAvatar\" VARCHAR(150) NOT NULL default '',\n" . "  \"NoAvatarSize\" VARCHAR(150) NOT NULL default ''\n" . ");", array(null));
sql_query($query, $SQLStat);
$query = sql_pre_query("CREATE TABLE \"" . $_POST['tableprefix'] . "topics\" (\n" . "  \"id\" INTEGER PRIMARY KEY NOT NULL,\n" . "  \"PollID\" INTEGER NOT NULL default '0',\n" . "  \"ForumID\" INTEGER NOT NULL default '0',\n" . "  \"CategoryID\" INTEGER NOT NULL default '0',\n" . "  \"OldForumID\" INTEGER NOT NULL default '0',\n" . "  \"OldCategoryID\" INTEGER NOT NULL default '0',\n" . "  \"UserID\" INTEGER NOT NULL default '0',\n" . "  \"GuestName\" VARCHAR(150) NOT NULL default '',\n" . "  \"TimeStamp\" INTEGER NOT NULL default '0',\n" . "  \"LastUpdate\" INTEGER NOT NULL default '0',\n" . "  \"TopicName\" VARCHAR(150) NOT NULL default '',\n" . "  \"Description\" TEXT NOT NULL,\n" . "  \"NumReply\" INTEGER NOT NULL default '0',\n" . "  \"NumViews\" INTEGER NOT NULL default '0',\n" . "  \"Pinned\" INTEGER NOT NULL default '0',\n" . "  \"Closed\" INTEGER NOT NULL default '0'\n" . ");", array(null));
sql_query($query, $SQLStat);
$query = sql_pre_query("INSERT INTO \"" . $_POST['tableprefix'] . "topics\" (\"PollID\", \"ForumID\", \"CategoryID\", \"OldForumID\", \"OldCategoryID\", \"UserID\", \"GuestName\", \"TimeStamp\", \"LastUpdate\", \"TopicName\", \"Description\", \"NumReply\", \"NumViews\", \"Pinned\", \"Closed\") VALUES\n" . "(0, 1, 1, 1, 1, -1, '" . $iDB_Author . "', %i, %i, 'Welcome', 'Welcome %s', 0, 0, 1, 1);", array($YourDate, $YourDate, $_POST['AdminUser']));
sql_query($query, $SQLStat);
$query = sql_pre_query("CREATE TABLE \"" . $_POST['tableprefix'] . "wordfilter\" (\n" . "  \"id\" INTEGER PRIMARY KEY NOT NULL,\n" . "  \"FilterWord\" TEXT NOT NULL,\n" . "  \"Replacement\" TEXT NOT NULL,\n" . "  \"CaseInsensitive\" VARCHAR(5) NOT NULL default '',\n" . "  \"WholeWord\" VARCHAR(5) NOT NULL default ''\n" . ");", array(null));
sql_query($query, $SQLStat);
$OptimizeTea = sql_query(sql_pre_query("VACUUM", array(null)), $SQLStat);
Ejemplo n.º 5
0
     $NewestMem['Name'] = "Anonymous";
     $NewestMem['IP'] = "127.0.0.1";
 }
 $NewestMemTitle = null;
 $NewestMemExtraIP = null;
 if ($GroupInfo['CanViewIPAddress'] == "yes") {
     $NewestMemTitle = " title=\"" . $NewestMem['IP'] . "\"";
     $NewestMemExtraIP = " (<a title=\"" . $NewestMem['IP'] . "\" onclick=\"window.open(this.href);return false;\" href=\"" . sprintf($IPCheckURL, $NewestMem['IP']) . "\">" . $NewestMem['IP'] . "</a>)";
 }
 $bdMonthChCk = GMTimeGet("m", $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST']);
 $bdDayChCk = GMTimeGet("d", $_SESSION['UserTimeZone'], 0, $_SESSION['UserDST']);
 if ($Settings['AdminValidate'] == "on") {
     $bdquery = sql_pre_query("SELECT * FROM \"" . $Settings['sqltable'] . "members\" WHERE \"BirthDay\"=%i AND \"BirthMonth\"=%i AND \"HiddenMember\"='no' AND \"Validated\"='yes' AND \"GroupID\"<>%i ORDER BY \"id\"", array($bdDayChCk, $bdMonthChCk, $Settings['ValidateGroup']));
 }
 if ($Settings['AdminValidate'] != "on") {
     $bdquery = sql_pre_query("SELECT * FROM \"" . $Settings['sqltable'] . "members\" WHERE \"BirthDay\"=%i AND \"BirthMonth\"=%i AND \"HiddenMember\"='no' ORDER BY \"id\"", array($bdDayChCk, $bdMonthChCk));
 }
 $bdresult = sql_query($bdquery, $SQLStat);
 $bdmembers = sql_num_rows($bdresult);
 $bdi = 0;
 if ($bdmembers > 0) {
     $bdstring = $bdmembers . " member(s) have a birthday today";
 }
 if ($bdmembers <= 0) {
     $bdstring = "<div>&nbsp;</div>&nbsp;No members have a birthday today<div>&nbsp;</div>";
 }
 while ($bdi < $bdmembers) {
     $bdmemberz = $bdmembers - 1;
     $birthday['ID'] = sql_result($bdresult, $bdi, "id");
     $birthday['Name'] = sql_result($bdresult, $bdi, "Name");
     $birthday['IP'] = sql_result($bdresult, $bdi, "IP");
Ejemplo n.º 6
0
 $ForumID = sql_result($result, $i, "id");
 $ForumName = sql_result($result, $i, "Name");
 $ForumShow = sql_result($result, $i, "ShowForum");
 $ForumType = sql_result($result, $i, "ForumType");
 $ForumShowTopics = sql_result($result, $i, "CanHaveTopics");
 $ForumShowTopics = strtolower($ForumShowTopics);
 $NumTopics = sql_result($result, $i, "NumTopics");
 $NumPosts = sql_result($result, $i, "NumPosts");
 $NumRedirects = sql_result($result, $i, "Redirects");
 $ForumDescription = sql_result($result, $i, "Description");
 $ForumType = strtolower($ForumType);
 $sflist = null;
 $gltf = array(null);
 $gltf[0] = $ForumID;
 if ($ForumType == "subforum") {
     $apcquery = sql_pre_query("SELECT * FROM \"" . $Settings['sqltable'] . "forums\" WHERE \"ShowForum\"='yes' AND \"InSubForum\"=%i" . $ForumIgnoreList2 . " ORDER BY \"OrderID\" ASC, \"id\" ASC", array($ForumID));
     $apcresult = sql_query($apcquery, $SQLStat);
     $apcnum = sql_num_rows($apcresult);
     $apci = 0;
     $apcl = 1;
     if ($apcnum >= 1) {
         while ($apci < $apcnum) {
             $NumsTopics = sql_result($apcresult, $apci, "NumTopics");
             $NumTopics = $NumsTopics + $NumTopics;
             $NumsPosts = sql_result($apcresult, $apci, "NumPosts");
             $NumPosts = $NumsPosts + $NumPosts;
             $SubsForumID = sql_result($apcresult, $apci, "id");
             $SubsForumName = sql_result($apcresult, $apci, "Name");
             $SubsForumType = sql_result($apcresult, $apci, "ForumType");
             $SubsForumShowTopics = sql_result($result, $i, "CanHaveTopics");
             if (isset($PermissionInfo['CanViewForum'][$SubsForumID]) && $PermissionInfo['CanViewForum'][$SubsForumID] == "yes") {
Ejemplo n.º 7
0
     $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 ($User1CanExecPHP == "yes") {
     $MyPost = php_execute($MyPost);
 }
Ejemplo n.º 8
0
            if ($_POST['id'] == 1) {
                $dmquery = sql_pre_query("UPDATE \"" . $Settings['sqltable'] . "members\" SET \"HiddenMember\"='%s',\"WarnLevel\"=%i,\"BanTime\"=%i,\"PostCount\"=%i,\"Karma\"=%i WHERE \"id\"=%i", array($_POST['MemHidden'], $_POST['MemWarnLevel'], $_POST['MemBanTime'], $_POST['MemPostCount'], $_POST['MemKarma'], $_POST['id']));
                $dpmquery = sql_pre_query("UPDATE \"" . $Settings['sqltable'] . "mempermissions\" SET \"CanDoHTML\"='%s',\"CanUseBBags\"='%s',\"FloodControl\"=%i,\"SearchFlood\"=%i WHERE \"id\"=%i", array($_POST['CanDoHTML'], $_POST['CanUseBBags'], $_POST['FloodControl'], $_POST['SearchFlood'], $_POST['id']));
            }
        }
        if ($_POST['MemName'] != $DMemName && $username_check < 1) {
            if ($_POST['id'] != 1) {
                if (!is_numeric($_POST['MemPermID'])) {
                    $_POST['MemPermID'] = "0";
                }
                $dmquery = sql_pre_query("UPDATE \"" . $Settings['sqltable'] . "members\" SET \"Name\"='%s',\"GroupID\"=%i,\"HiddenMember\"='%s',\"WarnLevel\"=%i,\"BanTime\"=%i,\"PostCount\"=%i,\"Karma\"=%i WHERE \"id\"=%i", array($_POST['MemName'], $_POST['gid'], $_POST['MemHidden'], $_POST['MemWarnLevel'], $_POST['MemBanTime'], $_POST['MemPostCount'], $_POST['MemKarma'], $_POST['id']));
                $dpmquery = sql_pre_query("UPDATE \"" . $Settings['sqltable'] . "mempermissions\" SET \"PermissionID\"=%i,\"CanViewBoard\"='%s',\"CanViewOffLine\"='%s',\"CanEditProfile\"='%s',\"CanAddEvents\"='%s',\"CanPM\"='%s',\"CanSearch\"='%s',\"CanDoHTML\"='%s',\"CanUseBBags\"='%s',\"CanViewIPAddress\"='%s',\"CanViewUserAgent\"='%s',\"FloodControl\"=%i,\"SearchFlood\"=%i,\"HasModCP\"='%s',\"HasAdminCP\"='%s',\"ViewDBInfo\"='%s' WHERE \"id\"=%i", array($_POST['MemPermID'], $_POST['CanViewBoard'], $_POST['CanViewOffLine'], $_POST['CanEditProfile'], $_POST['CanAddEvents'], $_POST['CanPM'], $_POST['CanSearch'], $_POST['CanDoHTML'], $_POST['CanUseBBags'], $_POST['CanViewIPAddress'], $_POST['CanViewUserAgent'], $_POST['FloodControl'], $_POST['SearchFlood'], $_POST['HasModCP'], $_POST['HasAdminCP'], $_POST['ViewDBInfo'], $_POST['id']));
            }
            if ($_POST['id'] == 1) {
                $dmquery = sql_pre_query("UPDATE \"" . $Settings['sqltable'] . "members\" SET \"Name\"='%s',\"HiddenMember\"='%s',\"WarnLevel\"=%i,\"BanTime\"=%i,\"PostCount\"=%i,\"Karma\"=%i WHERE \"id\"=%i", array($_POST['MemName'], $_POST['MemHidden'], $_POST['MemWarnLevel'], $_POST['MemBanTime'], $_POST['MemPostCount'], $_POST['MemKarma'], $_POST['id']));
                $dpmquery = sql_pre_query("UPDATE \"" . $Settings['sqltable'] . "mempermissions\" SET \"CanViewBoard\"='%s',\"CanViewOffLine\"='%s',\"CanEditProfile\"='%s',\"CanAddEvents\"='%s',\"CanPM\"='%s',\"CanSearch\"='%s',\"CanDoHTML\"='%s',\"CanUseBBags\"='%s',\"CanViewIPAddress\"='%s',\"CanViewUserAgent\"='%s',\"FloodControl\"=%i,\"SearchFlood\"=%i WHERE \"id\"=%i", array($_POST['CanViewBoard'], $_POST['CanViewOffLine'], $_POST['CanEditProfile'], $_POST['CanAddEvents'], $_POST['CanPM'], $_POST['CanSearch'], $_POST['CanDoHTML'], $_POST['CanUseBBags'], $_POST['CanViewIPAddress'], $_POST['CanViewUserAgent'], $_POST['FloodControl'], $_POST['SearchFlood'], $_POST['id']));
            }
        }
        sql_query($dmquery, $SQLStat);
        sql_query($dpmquery, $SQLStat);
    }
    ?>
<div class="TableMenuBorder">
<?php 
    if ($ThemeSet['TableStyle'] == "div") {
        ?>
<div class="TableMenuRow1">
<?php 
        echo $ThemeSet['TitleIcon'];
        ?>
<a href="<?php 
Ejemplo n.º 9
0
        if ($prenum == 0) {
            redirect("location", $rbasedir . url_maker($exfile['admin'], $Settings['file_ext'], "act=view", $Settings['qstr'], $Settings['qsep'], $prexqstr['admin'], $exqstr['admin'], false));
            sql_free_result($preresult);
            ob_clean();
            header("Content-Type: text/plain; charset=" . $Settings['charset']);
            $urlstatus = 302;
            gzip_page($Settings['use_gzip'], $GZipEncode['Type']);
            session_write_close();
            die;
        }
        if ($prenum >= 1) {
            $PermissionName = sql_result($preresult, 0, "Name");
            sql_free_result($preresult);
        }
        //$nextidnum = sql_get_next_id($Settings['sqltable'],"catpermissions",$SQLStat);
        $query = sql_pre_query("INSERT INTO \"" . $Settings['sqltable'] . "catpermissions\" (\"PermissionID\", \"Name\", \"CategoryID\", \"CanViewCategory\") VALUES\n" . "(%i, '%s', %i, '%s')", array($_POST['permid'], $PermissionName, $_POST['id'], $_POST['CanViewCategory']));
        sql_query($query, $SQLStat);
    }
}
$doupdate = false;
if (isset($_POST['id']) && $_POST['subact'] == "editnow") {
    $doupdate = true;
}
if (isset($_POST['id']) && isset($_POST['permid']) && $_POST['subact'] == "makenow") {
    $doupdate = true;
}
if ($_POST['act'] == "addcategory" && $_POST['update'] == "now" && $_GET['act'] == "addcategory") {
    $doupdate = true;
}
if ($_GET['act'] == "deletecategory" && $_POST['update'] == "now" && $_GET['act'] == "deletecategory") {
    $doupdate = true;
Ejemplo n.º 10
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;
}
Ejemplo n.º 11
0
             }
             if (file_exists($skindir . $file . "/info.php")) {
                 if ($file != "." && $file != "..") {
                     include $skindir . $file . "/info.php";
                     $themelist[$dirnum] = $file;
                     ++$dirnum;
                 }
             }
         }
         closedir($handle);
         asort($themelist);
         $themenum = count($themelist);
         $themei = 0;
         while ($themei < $themenum) {
             include $skindir . $themelist[$themei] . "/settings.php";
             $query = sql_pre_query("INSERT INTO \"" . $_POST['tableprefix'] . "themes\" (\"Name\", \"ThemeName\", \"ThemeMaker\", \"ThemeVersion\", \"ThemeVersionType\", \"ThemeSubVersion\", \"MakerURL\", \"CopyRight\", \"WrapperString\", \"CSS\", \"CSSType\", \"FavIcon\", \"TableStyle\", \"MiniPageAltStyle\", \"PreLogo\", \"Logo\", \"LogoStyle\", \"SubLogo\", \"TopicIcon\", \"MovedTopicIcon\", \"HotTopic\", \"MovedHotTopic\", \"PinTopic\", \"AnnouncementTopic\", \"MovedPinTopic\", \"HotPinTopic\", \"MovedHotPinTopic\", \"ClosedTopic\", \"MovedClosedTopic\", \"HotClosedTopic\", \"MovedHotClosedTopic\", \"PinClosedTopic\", \"MovedPinClosedTopic\", \"HotPinClosedTopic\", \"MovedHotPinClosedTopic\", \"MessageRead\", \"MessageUnread\", \"Profile\", \"WWW\", \"PM\", \"TopicLayout\", \"AddReply\", \"FastReply\", \"NewTopic\", \"QuoteReply\", \"EditReply\", \"DeleteReply\", \"Report\", \"LineDivider\", \"ButtonDivider\", \"LineDividerTopic\", \"TitleDivider\", \"ForumStyle\", \"ForumIcon\", \"SubForumIcon\", \"RedirectIcon\", \"TitleIcon\", \"NavLinkIcon\", \"NavLinkDivider\", \"StatsIcon\", \"NoAvatar\", \"NoAvatarSize\") VALUES\n" . "('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s');", array($themelist[$themei], $ThemeSet['ThemeName'], $ThemeSet['ThemeMaker'], $ThemeSet['ThemeVersion'], $ThemeSet['ThemeVersionType'], $ThemeSet['ThemeSubVersion'], $ThemeSet['MakerURL'], $ThemeSet['CopyRight'], $ThemeSet['WrapperString'], $ThemeSet['CSS'], $ThemeSet['CSSType'], $ThemeSet['FavIcon'], $ThemeSet['TableStyle'], $ThemeSet['MiniPageAltStyle'], $ThemeSet['PreLogo'], $ThemeSet['Logo'], $ThemeSet['LogoStyle'], $ThemeSet['SubLogo'], $ThemeSet['TopicIcon'], $ThemeSet['MovedTopicIcon'], $ThemeSet['HotTopic'], $ThemeSet['MovedHotTopic'], $ThemeSet['PinTopic'], $ThemeSet['AnnouncementTopic'], $ThemeSet['MovedPinTopic'], $ThemeSet['HotPinTopic'], $ThemeSet['MovedHotPinTopic'], $ThemeSet['ClosedTopic'], $ThemeSet['MovedClosedTopic'], $ThemeSet['HotClosedTopic'], $ThemeSet['MovedHotClosedTopic'], $ThemeSet['PinClosedTopic'], $ThemeSet['MovedPinClosedTopic'], $ThemeSet['HotPinClosedTopic'], $ThemeSet['MovedHotPinClosedTopic'], $ThemeSet['MessageRead'], $ThemeSet['MessageUnread'], $ThemeSet['Profile'], $ThemeSet['WWW'], $ThemeSet['PM'], $ThemeSet['TopicLayout'], $ThemeSet['AddReply'], $ThemeSet['FastReply'], $ThemeSet['NewTopic'], $ThemeSet['QuoteReply'], $ThemeSet['EditReply'], $ThemeSet['DeleteReply'], $ThemeSet['Report'], $ThemeSet['LineDivider'], $ThemeSet['ButtonDivider'], $ThemeSet['LineDividerTopic'], $ThemeSet['TitleDivider'], $ThemeSet['ForumStyle'], $ThemeSet['ForumIcon'], $ThemeSet['SubForumIcon'], $ThemeSet['RedirectIcon'], $ThemeSet['TitleIcon'], $ThemeSet['NavLinkIcon'], $ThemeSet['NavLinkDivider'], $ThemeSet['StatsIcon'], $ThemeSet['NoAvatar'], $ThemeSet['NoAvatarSize']));
             sql_query($query, $SQLStat);
             ++$themei;
         }
     }
     sql_disconnect_db($SQLStat);
     $ThemeSet = $OldThemeSet;
 }
 $CHMOD = $_SERVER['PHP_SELF'];
 $iDBRDate = $SVNDay[0] . "/" . $SVNDay[1] . "/" . $SVNDay[2];
 $iDBRSVN = $VER2[2] . " " . $SubVerN;
 $LastUpdateS = "Last Update: " . $iDBRDate . " " . $iDBRSVN;
 $pretext = "<?php\n/*\n    This program is free software; you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation; either version 2 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    Revised BSD License for more details.\n\nCopyright 2004-" . $SVNDay[2] . " Game Maker 2k - http://gamemaker2k.org/\n    Copyright 2004-" . $SVNDay[2] . " Game Maker 2k - http://gamemaker2k.org/\n    iDB Installer made by Game Maker 2k - http://idb.berlios.net/\n\n    \$FileInfo: settings.php & settingsbak.php - " . $LastUpdateS . " - Author: cooldude2k \$\n*/\n";
 $pretext2 = array("/*   Board Setting Section Begins   */\n\$Settings = array();", "/*   Board Setting Section Ends  \n     Board Info Section Begins   */\n\$SettInfo = array();", "/*   Board Setting Section Ends   \n     Board Dir Section Begins   */\n\$SettDir = array();", "/*   Board Dir Section Ends   */");
 $settcheck = "\$File3Name = basename(\$_SERVER['SCRIPT_NAME']);\nif (\$File3Name==\"" . $_POST['tableprefix'] . "settings.php\"||\$File3Name==\"/" . $_POST['tableprefix'] . "settings.php\") {\n    header('Location: index.php');\n    exit(); }\n";
 $BoardSettings = $pretext2[0] . "\n" . "require('settings.php');\n" . "\$Settings['sqltable'] = '" . $_POST['tableprefix'] . "';\n" . "\$Settings['board_name'] = '" . $_POST['NewBoardName'] . "';\n" . "\$Settings['weburl'] = '" . $_POST['WebURL'] . "';\n" . "\$Settings['SQLThemes'] = '" . $_POST['SQLThemes'] . "';\n" . "\$Settings['GuestGroup'] = 'Guest';\n" . "\$Settings['MemberGroup'] = 'Member';\n" . "\$Settings['ValidateGroup'] = 'Validate';\n" . "\$Settings['AdminValidate'] = 'off';\n" . "\$Settings['TestReferer'] = '" . $_POST['TestReferer'] . "';\n" . "\$Settings['DefaultTheme'] = '" . $_POST['DefaultTheme'] . "';\n" . "\$Settings['DefaultTimeZone'] = '" . $AdminTime . "';\n" . "\$Settings['DefaultDST'] = '" . $AdminDST . "';\n" . "\$Settings['start_date'] = " . $YourDate . ";\n" . "\$Settings['idb_time_format'] = '" . $Settings['idb_time_format'] . "';\n" . "\$Settings['idb_date_format'] = '" . $Settings['idb_date_format'] . "';\n" . "\$Settings['use_hashtype'] = '" . $_POST['usehashtype'] . "';\n" . "\$Settings['max_posts'] = '10';\n" . "\$Settings['max_topics'] = '10';\n" . "\$Settings['max_memlist'] = '10';\n" . "\$Settings['max_pmlist'] = '10';\n" . "\$Settings['hot_topic_num'] = '15';\n" . "\$Settings['enable_rss'] = 'on';\n" . "\$Settings['enable_search'] = 'on';\n" . "\$Settings['board_offline'] = 'off';\n" . "\$Settings['VerCheckURL'] = '';\n" . "\$Settings['IPCheckURL'] = '';\n" . "\$Settings['log_http_request'] = '" . $_POST['iDBHTTPLogger'] . "';\n" . "\$Settings['log_config_format'] = '" . $_POST['iDBLoggerFormat'] . "';\n" . "\$Settings['BoardUUID'] = '" . base64_encode($ServerUUID) . "';\n" . "\$Settings['KarmaBoostDays'] = '" . $KarmaBoostDay . "';\n" . "\$Settings['KBoostPercent'] = '6|10';\n" . $pretext2[1] . "\n" . "\$SettInfo['board_name'] = '" . $_POST['NewBoardName'] . "';\n" . "\$SettInfo['Author'] = '" . $_POST['AdminUser'] . "';\n" . "\$SettInfo['Keywords'] = '" . $_POST['NewBoardName'] . "," . $_POST['AdminUser'] . "';\n" . "\$SettInfo['Description'] = '" . $_POST['NewBoardName'] . "," . $_POST['AdminUser'] . "';\n?>";
Ejemplo n.º 12
0
    echo $TopicForumID;
    ?>
" class="TableRow2">
<td class="TableColumn2" colspan="2" style="width: 100%;">Making a Reply in Topic <?php 
    echo $TopicName;
    ?>
</td>
</tr>
<tr class="TableRow3" id="MkReply<?php 
    echo $TopicForumID;
    ?>
">
<td class="TableColumn3" style="width: 15%; vertical-align: middle; text-align: center;">
<div style="width: 100%; height: 160px; overflow: auto;">
<table style="width: 100%; text-align: center;"><?php 
    $renee_query = sql_pre_query("SELECT * FROM \"" . $Settings['sqltable'] . "smileys\" WHERE \"Display\"='yes'", array(null));
    $renee_result = sql_query($renee_query, $SQLStat);
    $renee_num = sql_num_rows($renee_result);
    $renee_s = 0;
    $SmileRow = 0;
    $SmileCRow = 0;
    while ($renee_s < $renee_num) {
        ++$SmileRow;
        $FileName = sql_result($renee_result, $renee_s, "FileName");
        $SmileName = sql_result($renee_result, $renee_s, "SmileName");
        $SmileText = sql_result($renee_result, $renee_s, "SmileText");
        $SmileDirectory = sql_result($renee_result, $renee_s, "Directory");
        $ShowSmile = sql_result($renee_result, $renee_s, "Display");
        $ReplaceType = sql_result($renee_result, $renee_s, "ReplaceCI");
        if ($SmileRow == 1) {
            ?>
Ejemplo n.º 13
0
"  \"TimeStamp\" int(15) NOT NULL default '0',\n".
"  \"Post\" text COLLATE ".$Settings['sql_collate']." NOT NULL,\n".
"  \"IP\" varchar(50) COLLATE ".$Settings['sql_collate']." NOT NULL default '',\n".
"  PRIMARY KEY  (\"id\")\n".
") ENGINE=".$SQLStorageEngine."  DEFAULT CHARSET=".$Settings['sql_charset']." COLLATE=".$Settings['sql_collate'].";", array(null));
sql_query($query,$SQLStat);
$query = sql_pre_query("INSERT INTO \"".$_POST['tableprefix']."tagboard\" VALUES (1,-1,'".$iDB_Author."',".$YourDate.",'Welcome to Your New Tag Board. ^_^','127.0.0.1'), array(null)); 
sql_query($query,$SQLStat);
*/
$query = sql_pre_query("CREATE TABLE IF NOT EXISTS \"" . $_POST['tableprefix'] . "themes\" (\n" . "  \"id\" int(15) NOT NULL auto_increment,\n" . "  \"Name\" varchar(32) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"ThemeName\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"ThemeMaker\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"ThemeVersion\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"ThemeVersionType\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"ThemeSubVersion\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"MakerURL\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"CopyRight\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"WrapperString\" text COLLATE " . $Settings['sql_collate'] . " NOT NULL,\n" . "  \"CSS\" text COLLATE " . $Settings['sql_collate'] . " NOT NULL,\n" . "  \"CSSType\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"FavIcon\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"TableStyle\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"MiniPageAltStyle\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"PreLogo\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"Logo\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"LogoStyle\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"SubLogo\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"TopicIcon\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"MovedTopicIcon\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"HotTopic\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"MovedHotTopic\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"PinTopic\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"AnnouncementTopic\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"MovedPinTopic\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"HotPinTopic\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"MovedHotPinTopic\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"ClosedTopic\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"MovedClosedTopic\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"HotClosedTopic\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"MovedHotClosedTopic\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"PinClosedTopic\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"MovedPinClosedTopic\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"HotPinClosedTopic\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"MovedHotPinClosedTopic\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"MessageRead\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"MessageUnread\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"Profile\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"WWW\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"PM\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"TopicLayout\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"AddReply\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"FastReply\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"NewTopic\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"QuoteReply\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"EditReply\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"DeleteReply\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"Report\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"LineDivider\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"ButtonDivider\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"LineDividerTopic\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"TitleDivider\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"ForumStyle\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"ForumIcon\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"SubForumIcon\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"RedirectIcon\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"TitleIcon\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"NavLinkIcon\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"NavLinkDivider\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"StatsIcon\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"NoAvatar\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"NoAvatarSize\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  PRIMARY KEY  (\"id\"),\n" . "  UNIQUE KEY \"Name\" (\"Name\")\n" . ") ENGINE=" . $SQLStorageEngine . "  DEFAULT CHARSET=" . $Settings['sql_charset'] . " COLLATE=" . $Settings['sql_collate'] . ";", array(null));
sql_query($query, $SQLStat);
$query = sql_pre_query("CREATE TABLE IF NOT EXISTS \"" . $_POST['tableprefix'] . "topics\" (\n" . "  \"id\" int(15) NOT NULL auto_increment,\n" . "  \"PollID\" int(15) NOT NULL default '0',\n" . "  \"ForumID\" int(15) NOT NULL default '0',\n" . "  \"CategoryID\" int(15) NOT NULL default '0',\n" . "  \"OldForumID\" int(15) NOT NULL default '0',\n" . "  \"OldCategoryID\" int(15) NOT NULL default '0',\n" . "  \"UserID\" int(15) NOT NULL default '0',\n" . "  \"GuestName\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"TimeStamp\" int(15) NOT NULL default '0',\n" . "  \"LastUpdate\" int(15) NOT NULL default '0',\n" . "  \"TopicName\" varchar(150) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"Description\" text COLLATE " . $Settings['sql_collate'] . " NOT NULL,\n" . "  \"NumReply\" int(15) NOT NULL default '0',\n" . "  \"NumViews\" int(15) NOT NULL default '0',\n" . "  \"Pinned\" int(5) NOT NULL default '0',\n" . "  \"Closed\" int(5) NOT NULL default '0',\n" . "  PRIMARY KEY  (\"id\")\n" . ") ENGINE=" . $SQLStorageEngine . "  DEFAULT CHARSET=" . $Settings['sql_charset'] . " COLLATE=" . $Settings['sql_collate'] . ";", array(null));
sql_query($query, $SQLStat);
$query = sql_pre_query("INSERT INTO \"" . $_POST['tableprefix'] . "topics\" (\"PollID\", \"ForumID\", \"CategoryID\", \"OldForumID\", \"OldCategoryID\", \"UserID\", \"GuestName\", \"TimeStamp\", \"LastUpdate\", \"TopicName\", \"Description\", \"NumReply\", \"NumViews\", \"Pinned\", \"Closed\") VALUES\n" . "(0, 1, 1, 1, 1, -1, '" . $iDB_Author . "', %i, %i, 'Welcome', 'Welcome %s', 0, 0, 1, 1);", array($YourDate, $YourDate, $_POST['AdminUser']));
sql_query($query, $SQLStat);
$query = sql_pre_query("CREATE TABLE IF NOT EXISTS \"" . $_POST['tableprefix'] . "wordfilter\" (\n" . "  \"id\" int(15) NOT NULL auto_increment,\n" . "  \"FilterWord\" text COLLATE " . $Settings['sql_collate'] . " NOT NULL,\n" . "  \"Replacement\" text COLLATE " . $Settings['sql_collate'] . " NOT NULL,\n" . "  \"CaseInsensitive\" varchar(5) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  \"WholeWord\" varchar(5) COLLATE " . $Settings['sql_collate'] . " NOT NULL default '',\n" . "  PRIMARY KEY  (\"id\")\n" . ") ENGINE=" . $SQLStorageEngine . "  DEFAULT CHARSET=" . $Settings['sql_charset'] . " COLLATE=" . $Settings['sql_collate'] . ";", array(null));
sql_query($query, $SQLStat);
$TableChCk = array("categories", "catpermissions", "events", "forums", "groups", "members", "mempermissions", "messenger", "permissions", "posts", "polls", "restrictedwords", "sessions", "smileys", "topics", "wordfilter");
$TablePreFix = $_POST['tableprefix'];
function add_prefix($tarray)
{
    global $TablePreFix;
    return $TablePreFix . $tarray;
}
$TableChCk = array_map("add_prefix", $TableChCk);
$tcount = count($TableChCk);
$ti = 0;
while ($ti < $tcount) {
    $OptimizeTea = sql_query(sql_pre_query("OPTIMIZE TABLE \"" . $TableChCk[$ti] . "\"", array(null)), $SQLStat);
    ++$ti;
}
Ejemplo n.º 14
0
            redirect("location", $rbasedir . url_maker($exfile['admin'], $Settings['file_ext'], "act=view", $Settings['qstr'], $Settings['qsep'], $prexqstr['admin'], $exqstr['admin'], false));
            sql_free_result($preresult);
            ob_clean();
            header("Content-Type: text/plain; charset=" . $Settings['charset']);
            $urlstatus = 302;
            gzip_page($Settings['use_gzip'], $GZipEncode['Type']);
            session_write_close();
            die;
        }
        if ($prenum >= 1) {
            $PermissionName = sql_result($preresult, 0, "Name");
            sql_free_result($preresult);
        }
        //$nextidnum = sql_get_next_id($Settings['sqltable'],"permissions",$SQLStat);
        $nextidnum = null;
        $query = sql_pre_query("INSERT INTO \"" . $Settings['sqltable'] . "permissions\" (\"PermissionID\", \"Name\", \"ForumID\", \"CanViewForum\", \"CanMakePolls\", \"CanMakeTopics\", \"CanMakeReplys\", \"CanMakeReplysCT\", \"CanEditTopics\", \"CanEditTopicsCT\", \"CanEditReplys\", \"CanEditReplysCT\", \"CanDeleteTopics\", \"CanDeleteTopicsCT\", \"CanDeleteReplys\", \"CanDeleteReplysCT\", \"CanCloseTopics\", \"CanPinTopics\", \"CanExecPHP\", \"CanDoHTML\", \"CanUseBBags\", \"CanModForum\") VALUES\n" . "(%i, '%s', %i, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', 'no', '%s', '%s', '%s')", array($_POST['permid'], $PermissionName, $_POST['id'], $_POST['CanViewForum'], $_POST['CanMakePolls'], $_POST['CanMakeTopics'], $_POST['CanMakeReplys'], $_POST['CanMakeReplysCT'], $_POST['CanEditTopics'], $_POST['CanEditTopicsCT'], $_POST['CanEditReplys'], $_POST['CanEditReplysCT'], $_POST['CanDeleteTopics'], $_POST['CanDeleteTopicsCT'], $_POST['CanDeleteReplys'], $_POST['CanDeleteReplysCT'], $_POST['CanCloseTopics'], $_POST['CanPinTopics'], $_POST['CanDoHTML'], $_POST['CanUseBBags'], $_POST['CanModForum']));
        sql_query($query, $SQLStat);
    }
}
$doupdate = false;
if (isset($_POST['id']) && $_POST['subact'] == "editnow") {
    $doupdate = true;
}
if (isset($_POST['id']) && isset($_POST['permid']) && $_POST['subact'] == "makenow") {
    $doupdate = true;
}
if ($_POST['act'] == "addforum" && $_POST['update'] == "now" && $_GET['act'] == "addforum") {
    $doupdate = true;
}
if ($_GET['act'] == "deleteforum" && $_POST['update'] == "now" && $_GET['act'] == "deleteforum") {
    $doupdate = true;
Ejemplo n.º 15
0
</tr>
</table>
</div>
<?php 
}
if ($_POST['act'] == "info" && $_POST['update'] == "now" && $_GET['act'] == "info" && $_SESSION['UserGroup'] != $Settings['GuestGroup'] && $GroupInfo['HasAdminCP'] == "yes") {
    $_POST = array_map("rsq", $_POST);
    if (!isset($Settings['BoardUUID']) || $Settings['BoardUUID'] === null) {
        $Settings['BoardUUID'] = rand_uuid("rand");
    }
    $_POST['board_name'] = htmlspecialchars($_POST['board_name'], ENT_QUOTES, $Settings['charset']);
    $_POST['board_name'] = fixbamps($_POST['board_name']);
    $_POST['board_name'] = remove_spaces($_POST['board_name']);
    $_POST['board_name'] = str_replace("\\&#039;", "&#039;", $_POST['board_name']);
    if ($_POST['board_name'] != $Settings['board_name'] && $Settings['SQLThemes'] == "on") {
        $logoquery = sql_pre_query("UPDATE \"" . $Settings['sqltable'] . "themes\" SET \"Logo\"='%s' WHERE \"Logo\"='%s'", array($_POST['board_name'], $Settings['board_name']));
        sql_query($logo, $SQLStat);
    }
    $_POST['Author'] = htmlspecialchars($_POST['Author'], ENT_QUOTES, $Settings['charset']);
    $_POST['Author'] = fixbamps($_POST['Author']);
    $_POST['Author'] = remove_spaces($_POST['Author']);
    $_POST['Author'] = str_replace("\\&#039;", "&#039;", $_POST['Author']);
    $_POST['Keywords'] = htmlspecialchars($_POST['Keywords'], ENT_QUOTES, $Settings['charset']);
    $_POST['Keywords'] = fixbamps($_POST['Keywords']);
    $_POST['Keywords'] = remove_spaces($_POST['Keywords']);
    $_POST['Keywords'] = str_replace("\\&#039;", "&#039;", $_POST['Keywords']);
    $_POST['Description'] = htmlspecialchars($_POST['Description'], ENT_QUOTES, $Settings['charset']);
    $_POST['Description'] = fixbamps($_POST['Description']);
    $_POST['Description'] = remove_spaces($_POST['Description']);
    $_POST['Description'] = str_replace("\\&#039;", "&#039;", $_POST['Description']);
    $BoardSettings = $pretext2[0] . "\nrequire('settings.php');\n" . "\$Settings['sqltable'] = " . null_string($Settings['sqltable']) . ";\n" . "\$Settings['board_name'] = " . null_string($_POST['board_name']) . ";\n" . "\$Settings['weburl'] = " . null_string($Settings['weburl']) . ";\n" . "\$Settings['SQLThemes'] = " . null_string($Settings['SQLThemes']) . ";\n" . "\$Settings['GuestGroup'] = " . null_string($Settings['GuestGroup']) . ";\n" . "\$Settings['MemberGroup'] = " . null_string($Settings['MemberGroup']) . ";\n" . "\$Settings['ValidateGroup'] = " . null_string($Settings['ValidateGroup']) . ";\n" . "\$Settings['AdminValidate'] = " . null_string($Settings['AdminValidate']) . ";\n" . "\$Settings['TestReferer'] = " . null_string($Settings['TestReferer']) . ";\n" . "\$Settings['DefaultTheme'] = " . null_string($Settings['DefaultTheme']) . ";\n" . "\$Settings['DefaultTimeZone'] = " . null_string($Settings['DefaultTimeZone']) . ";\n" . "\$Settings['DefaultDST'] = " . null_string($Settings['DefaultDST']) . ";\n" . "\$Settings['start_date'] = " . null_string($Settings['start_date']) . ";\n" . "\$Settings['idb_time_format'] = " . null_string($Settings['idb_time_format']) . ";\n" . "\$Settings['idb_date_format'] = " . null_string($Settings['idb_date_format']) . ";\n" . "\$Settings['use_hashtype'] = " . null_string($Settings['use_hashtype']) . ";\n" . "\$Settings['max_posts'] = " . null_string($Settings['max_posts']) . ";\n" . "\$Settings['max_topics'] = " . null_string($Settings['max_topics']) . ";\n" . "\$Settings['max_memlist'] = " . null_string($Settings['max_memlist']) . ";\n" . "\$Settings['max_pmlist'] = " . null_string($Settings['max_pmlist']) . ";\n" . "\$Settings['hot_topic_num'] = " . null_string($Settings['hot_topic_num']) . ";\n" . "\$Settings['enable_rss'] = " . null_string($Settings['enable_rss']) . ";\n" . "\$Settings['enable_search'] = " . null_string($Settings['enable_search']) . ";\n" . "\$Settings['board_offline'] = " . null_string($Settings['board_offline']) . ";\n" . "\$Settings['VerCheckURL'] = " . null_string($Settings['VerCheckURL']) . ";\n" . "\$Settings['IPCheckURL'] = " . null_string($Settings['IPCheckURL']) . ";\n" . "\$Settings['log_http_request'] = " . null_string($Settings['log_http_request']) . ";\n" . "\$Settings['log_config_format'] = " . null_string($Settings['log_config_format']) . ";\n" . "\$Settings['BoardUUID'] = " . null_string(base64_encode($Settings['BoardUUID'])) . ";\n" . "\$Settings['KarmaBoostDays'] = " . null_string($Settings['KarmaBoostDays']) . ";\n" . "\$Settings['KBoostPercent'] = " . null_string($Settings['KBoostPercent']) . ";\n" . $pretext2[1] . "\n" . "\$SettInfo['board_name'] = " . null_string($_POST['board_name']) . ";\n" . "\$SettInfo['Author'] = " . null_string($_POST['Author']) . ";\n" . "\$SettInfo['Keywords'] = " . null_string($_POST['Keywords']) . ";\n" . "\$SettInfo['Description'] = " . null_string($_POST['Description']) . ";\n?>";
Ejemplo n.º 16
0
 if ($_GET['st'] <= 0 || !isset($_GET['st'])) {
     $PageLimit = $Settings['max_topics'] * $snumber;
 }
 if ($_GET['st'] > 0 && isset($_GET['st'])) {
     $PageLimit = $_GET['st'];
 }
 if ($PageLimit < 0) {
     $PageLimit = 0;
 }
 //End Topic Page Code
 $i = 0;
 $ExtraIgnores = null;
 if ($PermissionInfo['CanModForum'][$_GET['id']] == "no") {
     $ExtraIgnores = " AND \"Closed\"<>3";
 }
 $query = sql_pre_query("SELECT * FROM \"" . $Settings['sqltable'] . "topics\" WHERE \"ForumID\"=%i" . $ExtraIgnores . $ForumIgnoreList4 . " ORDER BY \"Pinned\" DESC, \"LastUpdate\" DESC " . $SQLimit, array($_GET['id'], $PageLimit, $Settings['max_topics']));
 $result = sql_query($query, $SQLStat);
 $num = sql_num_rows($result);
 //List Page Number Code Start
 $pagenum = count($Pages);
 if ($_GET['page'] > $pagenum) {
     $_GET['page'] = $pagenum;
 }
 $pagei = 0;
 $pstring = null;
 if ($pagenum > 1) {
     $pstring = "<div class=\"PageList\"><span class=\"pagelink\">" . $pagenum . " Pages:</span> ";
 }
 if ($_GET['page'] < 4) {
     $Pagez[0] = null;
 }
Ejemplo n.º 17
0
        }
        ++$peri;
    }
    if ($PerError === true) {
        header("Content-Type: text/plain; charset=" . $Settings['charset']);
        sql_free_result($peresult);
        $urlstatus = 503;
        ob_clean();
        echo "Sorry could not load all permission data in database.\nContact the board admin about error.";
        gzip_page($Settings['use_gzip'], $GZipEncode['Type']);
        session_write_close();
        die;
    }
}
sql_free_result($peresult);
$per2query = sql_pre_query("SELECT * FROM \"" . $Settings['sqltable'] . "catpermissions\" WHERE \"PermissionID\"=%i ORDER BY \"CategoryID\" ASC", array($GroupInfo['PermissionID']));
$per2esult = sql_query($per2query, $SQLStat);
$per2num = sql_num_rows($per2esult);
$per2i = 0;
$Per2Error = null;
if ($per2num <= 0) {
    $Per2Error = true;
    sql_free_result($per2esult);
    header("Content-Type: text/plain; charset=" . $Settings['charset']);
    $urlstatus = 503;
    ob_clean();
    echo "Sorry could not find permission data in database.\nContact the board admin about error.";
    gzip_page($Settings['use_gzip'], $GZipEncode['Type']);
    session_write_close();
    die;
}
Ejemplo n.º 18
0
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    Revised BSD License for more details.

    Copyright 2004-2012 iDB Support - http://idb.berlios.de/
    Copyright 2004-2012 Game Maker 2k - http://gamemaker2k.org/

    $FileInfo: navbar.php - Last Update: 12/30/2011 SVN 781 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name == "navbar.php" || $File3Name == "/navbar.php") {
    require 'index.php';
    exit;
}
if ($_SESSION['UserGroup'] != $Settings['GuestGroup'] || $GroupInfo['CanPM'] == "yes") {
    $pmquery1 = sql_pre_query("SELECT * FROM \"" . $Settings['sqltable'] . "messenger\" WHERE \"ReciverID\"=%i AND \"Read\"=0", array($_SESSION['UserID']));
    $pmresult1 = sql_query($pmquery1, $SQLStat);
    $PMNumber = sql_num_rows($pmresult1);
    sql_free_result($pmresult1);
    /*
    $pmquery2 = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."messenger\" WHERE \"SenderID\"=%i AND \"Read\"=0", array($_SESSION['UserID']));
    $pmresult2=sql_query($pmquery2,$SQLStat);
    $SentPMNumber=sql_num_rows($pmresult2);
    sql_free_result($pmresult2); */
}
if ($ThemeSet['LogoStyle'] == null) {
    $logostyle = "";
}
if ($ThemeSet['LogoStyle'] != null) {
    $logostyle = "style=\"" . $ThemeSet['LogoStyle'] . "\" ";
}
Ejemplo n.º 19
0
                $EventsName[$NextDay] = null;
            }
            if ($EventsName[$NextDay] != null) {
                $EventsName[$NextDay] .= ", <a href=\"" . url_maker($exfile['event'], $Settings['file_ext'], "act=event&id=" . $EventID, $Settings['qstr'], $Settings['qsep'], $prexqstr['event'], $exqstr['event']) . "\" style=\"font-size: 9px;\" title=\"View Event " . $oldeventname . ".\">" . $EventName . "</a>";
            }
            if ($EventsName[$NextDay] == null) {
                $EventsName[$NextDay] = "<a href=\"" . url_maker($exfile['event'], $Settings['file_ext'], "act=event&id=" . $EventID, $Settings['qstr'], $Settings['qsep'], $prexqstr['event'], $exqstr['event']) . "\" style=\"font-size: 9px;\" title=\"View Event " . $oldeventname . ".\">" . $EventName . "</a>";
            }
            $NextDay++;
        }
    }
    $EventsID[$EventDay] = $EventID;
    ++$is;
}
sql_free_result($result);
$bdquery = sql_pre_query("SELECT * FROM \"" . $Settings['sqltable'] . "members\" WHERE \"BirthMonth\"=%i", array($MyMonth));
$bdresult = sql_query($bdquery, $SQLStat);
$bdnum = sql_num_rows($bdresult);
$bdi = 0;
while ($bdi < $bdnum) {
    $UserNamebd = sql_result($bdresult, $bdi, "Name");
    $BirthDay = sql_result($bdresult, $bdi, "BirthDay");
    $BirthMonth = sql_result($bdresult, $bdi, "BirthMonth");
    $BirthYear = sql_result($bdresult, $bdi, "BirthYear");
    $oldusername = $UserNamebd;
    $UserNamebd1 = pre_substr($UserNamebd, 0, 20);
    if (pre_strlen($UserNamebd) > 20) {
        $UserNamebd1 = $UserNamebd1 . "...";
    }
    $UserNamebd = $UserNamebd1;
    if (!isset($EventsName[$BirthDay])) {
Ejemplo n.º 20
0
        ?>
">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'];
        ?>
.<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 go back to index.<br />&nbsp;
	</span><br /></td>
</tr>
Ejemplo n.º 21
0
"  \"GuestName\" VARCHAR(150) NOT NULL default '',\n".
"  \"TimeStamp\" INTEGER NOT NULL default '0',\n".
"  \"Post\" STRING NOT NULL,\n".
"  \"IP\" VARCHAR(50) NOT NULL default ''\n".
");", array(null));
sql_query($query,$SQLStat);
$query = sql_pre_query("INSERT INTO \"".$_POST['tableprefix']."tagboard\" VALUES (1,-1,'".$iDB_Author."',".$YourDate.",'Welcome to Your New Tag Board. ^_^','127.0.0.1'), array(null)); 
sql_query($query,$SQLStat);
*/
$query = sql_pre_query("CREATE TABLE \"" . $_POST['tableprefix'] . "themes\" (\n" . "  \"id\" INTEGER AUTO_INCREMENT PRIMARY KEY,\n" . "  \"Name\" VARCHAR(32) NOT NULL default '' UNIQUE,\n" . "  \"ThemeName\" VARCHAR(150) NOT NULL default '',\n" . "  \"ThemeMaker\" VARCHAR(150) NOT NULL default '',\n" . "  \"ThemeVersion\" VARCHAR(150) NOT NULL default '',\n" . "  \"ThemeVersionType\" VARCHAR(150) NOT NULL default '',\n" . "  \"ThemeSubVersion\" VARCHAR(150) NOT NULL default '',\n" . "  \"MakerURL\" VARCHAR(150) NOT NULL default '',\n" . "  \"CopyRight\" VARCHAR(150) NOT NULL default '',\n" . "  \"WrapperString\" STRING NOT NULL,\n" . "  \"CSS\" STRING NOT NULL,\n" . "  \"CSSType\" VARCHAR(150) NOT NULL default '',\n" . "  \"FavIcon\" VARCHAR(150) NOT NULL default '',\n" . "  \"TableStyle\" VARCHAR(150) NOT NULL default '',\n" . "  \"MiniPageAltStyle\" VARCHAR(150) NOT NULL default '',\n" . "  \"PreLogo\" VARCHAR(150) NOT NULL default '',\n" . "  \"Logo\" VARCHAR(150) NOT NULL default '',\n" . "  \"LogoStyle\" VARCHAR(150) NOT NULL default '',\n" . "  \"SubLogo\" VARCHAR(150) NOT NULL default '',\n" . "  \"TopicIcon\" VARCHAR(150) NOT NULL default '',\n" . "  \"MovedTopicIcon\" VARCHAR(150) NOT NULL default '',\n" . "  \"HotTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"MovedHotTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"PinTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"AnnouncementTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"MovedPinTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"HotPinTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"MovedHotPinTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"ClosedTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"MovedClosedTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"HotClosedTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"MovedHotClosedTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"PinClosedTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"MovedPinClosedTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"HotPinClosedTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"MovedHotPinClosedTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"MessageRead\" VARCHAR(150) NOT NULL default '',\n" . "  \"MessageUnread\" VARCHAR(150) NOT NULL default '',\n" . "  \"Profile\" VARCHAR(150) NOT NULL default '',\n" . "  \"WWW\" VARCHAR(150) NOT NULL default '',\n" . "  \"PM\" VARCHAR(150) NOT NULL default '',\n" . "  \"TopicLayout\" VARCHAR(150) NOT NULL default '',\n" . "  \"AddReply\" VARCHAR(150) NOT NULL default '',\n" . "  \"FastReply\" VARCHAR(150) NOT NULL default '',\n" . "  \"NewTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"QuoteReply\" VARCHAR(150) NOT NULL default '',\n" . "  \"EditReply\" VARCHAR(150) NOT NULL default '',\n" . "  \"DeleteReply\" VARCHAR(150) NOT NULL default '',\n" . "  \"Report\" VARCHAR(150) NOT NULL default '',\n" . "  \"LineDivider\" VARCHAR(150) NOT NULL default '',\n" . "  \"ButtonDivider\" VARCHAR(150) NOT NULL default '',\n" . "  \"LineDividerTopic\" VARCHAR(150) NOT NULL default '',\n" . "  \"TitleDivider\" VARCHAR(150) NOT NULL default '',\n" . "  \"ForumStyle\" VARCHAR(150) NOT NULL default '',\n" . "  \"ForumIcon\" VARCHAR(150) NOT NULL default '',\n" . "  \"SubForumIcon\" VARCHAR(150) NOT NULL default '',\n" . "  \"RedirectIcon\" VARCHAR(150) NOT NULL default '',\n" . "  \"TitleIcon\" VARCHAR(150) NOT NULL default '',\n" . "  \"NavLinkIcon\" VARCHAR(150) NOT NULL default '',\n" . "  \"NavLinkDivider\" VARCHAR(150) NOT NULL default '',\n" . "  \"StatsIcon\" VARCHAR(150) NOT NULL default '',\n" . "  \"NoAvatar\" VARCHAR(150) NOT NULL default '',\n" . "  \"NoAvatarSize\" VARCHAR(150) NOT NULL default ''\n" . ");", array(null));
sql_query($query, $SQLStat);
$query = sql_pre_query("CREATE TABLE \"" . $_POST['tableprefix'] . "topics\" (\n" . "  \"id\" INTEGER AUTO_INCREMENT PRIMARY KEY,\n" . "  \"PollID\" INTEGER NOT NULL default '0',\n" . "  \"ForumID\" INTEGER NOT NULL default '0',\n" . "  \"CategoryID\" INTEGER NOT NULL default '0',\n" . "  \"OldForumID\" INTEGER NOT NULL default '0',\n" . "  \"OldCategoryID\" INTEGER NOT NULL default '0',\n" . "  \"UserID\" INTEGER NOT NULL default '0',\n" . "  \"GuestName\" VARCHAR(150) NOT NULL default '',\n" . "  \"TimeStamp\" INTEGER NOT NULL default '0',\n" . "  \"LastUpdate\" INTEGER NOT NULL default '0',\n" . "  \"TopicName\" VARCHAR(150) NOT NULL default '',\n" . "  \"Description\" STRING NOT NULL,\n" . "  \"NumReply\" INTEGER NOT NULL default '0',\n" . "  \"NumViews\" INTEGER NOT NULL default '0',\n" . "  \"Pinned\" INTEGER NOT NULL default '0',\n" . "  \"Closed\" INTEGER NOT NULL default '0'\n" . ");", array(null));
sql_query($query, $SQLStat);
$query = sql_pre_query("INSERT INTO \"" . $_POST['tableprefix'] . "topics\" (\"PollID\", \"ForumID\", \"CategoryID\", \"OldForumID\", \"OldCategoryID\", \"UserID\", \"GuestName\", \"TimeStamp\", \"LastUpdate\", \"TopicName\", \"Description\", \"NumReply\", \"NumViews\", \"Pinned\", \"Closed\") VALUES\n" . "(0, 1, 1, 1, 1, -1, '" . $iDB_Author . "', %i, %i, 'Welcome', 'Welcome %s', 0, 0, 1, 1);", array($YourDate, $YourDate, $_POST['AdminUser']));
sql_query($query, $SQLStat);
$query = sql_pre_query("CREATE TABLE \"" . $_POST['tableprefix'] . "wordfilter\" (\n" . "  \"id\" INTEGER AUTO_INCREMENT PRIMARY KEY,\n" . "  \"FilterWord\" STRING NOT NULL,\n" . "  \"Replacement\" STRING NOT NULL,\n" . "  \"CaseInsensitive\" VARCHAR(5) NOT NULL default '',\n" . "  \"WholeWord\" VARCHAR(5) NOT NULL default ''\n" . ");", array(null));
sql_query($query, $SQLStat);
$TableChCk = array("categories", "catpermissions", "events", "forums", "groups", "members", "mempermissions", "messenger", "permissions", "polls", "posts", "restrictedwords", "sessions", "smileys", "topics", "wordfilter");
$TablePreFix = $_POST['tableprefix'];
function add_prefix($tarray)
{
    global $TablePreFix;
    return $TablePreFix . $tarray;
}
$TableChCk = array_map("add_prefix", $TableChCk);
$tcount = count($TableChCk);
$ti = 0;
while ($ti < $tcount) {
    $OptimizeTea = sql_query(sql_pre_query("UPDATE STATISTICS ON \"" . $TableChCk[$ti] . "\"", array(null)), $SQLStat);
    ++$ti;
}
Ejemplo n.º 22
0
                }
                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'];
                ?>
 was started.<br />
	Click <a href="<?php 
                echo url_maker($exfile['topic'], $Settings['file_ext'], "act=view&id=" . $topicid . "&page=1", $Settings['qstr'], $Settings['qsep'], $prexqstr['topic'], $exqstr['topic']);
                ?>
">here</a> to continue to topic.<br />&nbsp;
	</span><br /></td>
</tr>
Ejemplo n.º 23
0
function sql_get_num_rows($tablepre, $table, $link = null)
{
    $getnextidq = sql_pre_query("SHOW TABLE STATUS LIKE '" . $tablepre . $table . "'", array());
    if (!isset($link)) {
        $getnextidr = sql_query($getnextidq);
    }
    if (isset($link)) {
        $getnextidr = sql_query($getnextidq, $link);
    }
    $getnextid = sql_fetch_assoc($getnextidr);
    return $getnextid['Rows'];
    @sql_free_result($getnextidr);
}
Ejemplo n.º 24
0
 if (isset($PermissionInfo['CanViewForum'][$ForumID]) && $PermissionInfo['CanViewForum'][$ForumID] == "yes") {
     $LastTopic = "&nbsp;<br />&nbsp;<br />&nbsp;";
     if (!isset($LastTopic)) {
         $LastTopic = null;
     }
     $gltnum = count($gltf);
     $glti = 0;
     $OldUpdateTime = 0;
     $UseThisFonum = null;
     if ($ForumType == "subforum") {
         while ($glti < $gltnum) {
             $ExtraIgnores = null;
             if ($PermissionInfo['CanModForum'][$gltf[$glti]] == "no") {
                 $ExtraIgnores = " AND \"Closed\"<>3";
             }
             $gltfoquery = sql_pre_query("SELECT * FROM \"" . $Settings['sqltable'] . "topics\" WHERE \"ForumID\"=%i" . $ExtraIgnores . " ORDER BY \"LastUpdate\" DESC LIMIT 1", array($gltf[$glti]));
             $gltforesult = sql_query($gltfoquery, $SQLStat);
             $gltfonum = sql_num_rows($gltforesult);
             if ($gltfonum > 0) {
                 $NewUpdateTime = sql_result($gltforesult, 0, "LastUpdate");
                 if ($NewUpdateTime > $OldUpdateTime) {
                     $UseThisFonum = $gltf[$glti];
                     $OldUpdateTime = $NewUpdateTime;
                 }
             }
             sql_free_result($gltforesult);
             ++$glti;
         }
     }
     $shownum = null;
     if ($ForumType == "redirect") {
Ejemplo n.º 25
0
                    if ($cookieDomain != null) {
                        if ($cookieSecure === true) {
                            setcookie("SessPass", $NewPassword, time() + 7 * 86400, $cbasedir, $cookieDomain, 1);
                        }
                        if ($cookieSecure === false) {
                            setcookie("SessPass", $NewPassword, time() + 7 * 86400, $cbasedir, $cookieDomain);
                        }
                    }
                }
                $_POST['Email'] = remove_spaces($_POST['Email']);
                if ($_POST['Password'] != "") {
                    $querynewuserinfo = sql_pre_query("UPDATE \"" . $Settings['sqltable'] . "members\" SET \"UserPassword\"='%s',\"HashType\"='%s',\"Email\"='%s',\"LastActive\"=%i,\"IP\"='%s',\"Salt\"='%s' WHERE \"id\"=%i", array($NewPassword, $iDBHash, $_POST['Email'], $NewDay, $NewIP, $NewSalt, $_SESSION['UserID']));
                    sql_query($querynewuserinfo, $SQLStat);
                }
                if ($_POST['Password'] == "") {
                    echo $querynewuserinfo = sql_pre_query("UPDATE \"" . $Settings['sqltable'] . "members\" SET \"Email\"='%s',\"LastActive\"=%i,\"IP\"='%s' WHERE \"id\"=%i", array($_POST['Email'], $NewDay, $NewIP, $_SESSION['UserID']));
                    sql_query($querynewuserinfo, $SQLStat);
                }
            }
        }
    }
}
if ($_POST['update'] == "now" && $_GET['act'] != null) {
    $profiletitle = " " . $ThemeSet['TitleDivider'] . " Updating Settings";
    ?>
</td></tr>
<tr id="ProfileTitleEnd" class="TableMenuRow4">
<td class="TableMenuColumn4">&nbsp;</td>
</tr></table></div><?php 
}
?>
Ejemplo n.º 26
0
        $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 />
	Event <?php 
        echo $_POST['EventName'];
        ?>
 was started.<br />
	Click <a href="<?php 
        echo url_maker($exfile['event'], $Settings['file_ext'], "act=event&id=" . $eventid, $Settings['qstr'], $Settings['qsep'], $prexqstr['event'], $exqstr['event']);
        ?>
">here</a> to continue to event.<br />&nbsp;
	</span><br /></td>
Ejemplo n.º 27
0
 $PreUsersName = GetUserName($UsersID, $Settings['sqltable'], $SQLStat);
 if ($PreUsersName['Name'] === null) {
     $UsersID = -1;
     $PreUsersName = GetUserName($UsersID, $Settings['sqltable'], $SQLStat);
 }
 $UsersName = $PreUsersName['Name'];
 $UsersHidden = $PreUsersName['Hidden'];
 if ($UsersName == "Guest") {
     $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 = "&nbsp;<br />&nbsp;";
     $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'];
Ejemplo n.º 28
0
function GetUserName($idu, $sqlt, $link = null)
{
    $UsersName = null;
    global $SQLStat;
    if (!isset($link)) {
        $link = $SQLStat;
    }
    $gunquery = sql_pre_query("SELECT * FROM \"" . $sqlt . "members\" WHERE \"id\"=%i LIMIT 1", array($idu));
    $gunresult = sql_query($gunquery, $link);
    $gunnum = sql_num_rows($gunresult);
    // I'm now hidden from you. ^_^ | <_< I cant find you.
    $UsersHidden = "yes";
    if ($gunnum > 0) {
        $UsersName = sql_result($gunresult, 0, "Name");
        // Am i still hidden. o_O <_< I can see you.
        $UsersHidden = sql_result($gunresult, 0, "HiddenMember");
    }
    sql_free_result($gunresult);
    $UsersInfo['Name'] = $UsersName;
    $UsersInfo['Hidden'] = $UsersHidden;
    return $UsersInfo;
}