コード例 #1
0
ファイル: compose.php プロジェクト: nsystem1/clanscripts
 if ($_POST['submit']) {
     $pmSessionID = $_POST['pmsessionid'];
     // Check To
     $arrReceivers = array();
     // Check Members
     if (count($_SESSION['btComposeList'][$pmSessionID]['member']) > 0) {
         foreach ($_SESSION['btComposeList'][$pmSessionID]['member'] as $memberID) {
             if ($memberID != "" && $member->select($memberID)) {
                 $arrReceivers[] = $memberID;
             }
         }
     }
     // Check Rank Category
     if (count($_SESSION['btComposeList'][$pmSessionID]['rankcategory']) > 0) {
         foreach ($_SESSION['btComposeList'][$pmSessionID]['rankcategory'] as $rankCatID) {
             if ($rankCatID != "" && $rankCatObj->select($rankCatID)) {
                 $arrRanks = $rankCatObj->getRanks();
                 $rankSQL = "('" . implode("','", $arrRanks) . "')";
                 $filterMembers = "('" . implode("','", $arrReceivers) . "')";
                 $result = $mysqli->query("SELECT member_id FROM " . $dbprefix . "members WHERE rank_id IN " . $rankSQL . " AND member_id NOT IN " . $filterMembers . " AND disabled = '0'");
                 while ($row = $result->fetch_assoc()) {
                     $arrReceivers[] = $row['member_id'];
                     $arrGroup[$row['member_id']] = array("rankcategory", $rankCatID);
                 }
             }
         }
     }
     // Check Ranks
     $member->select($memberInfo['member_id']);
     if (count($_SESSION['btComposeList'][$pmSessionID]['rank']) > 0) {
         foreach ($_SESSION['btComposeList'][$pmSessionID]['rank'] as $rankID) {
コード例 #2
0
ファイル: ranks.php プロジェクト: nsystem1/clanscripts
include $prevFolder . "themes/" . $THEME . "/_header.php";
$member = new Member($mysqli);
$rankObj = new Rank($mysqli);
$rankCatObj = new RankCategory($mysqli);
$breadcrumbObj->setTitle("Ranks");
$breadcrumbObj->addCrumb("Home", $MAIN_ROOT);
$breadcrumbObj->addCrumb("Ranks");
include $prevFolder . "include/breadcrumb.php";
?>


<table id='rankPageTable' class='formTable' style='width: 75%; margin-left: auto; margin-right: auto'>
<?php 
$result = $mysqli->query("SELECT rankcategory_id FROM " . $dbprefix . "rankcategory WHERE hidecat = '0' ORDER BY ordernum DESC");
while ($row = $result->fetch_assoc()) {
    $rankCatObj->select($row['rankcategory_id']);
    $rankCatInfo = $rankCatObj->get_info_filtered();
    if ($rankCatInfo['useimage'] == 1 && $rankCatInfo['imageurl'] != "") {
        if ($rankCatInfo['imagewidth'] == 0) {
            $imageURL = $rankCatObj->getLocalImageURL();
            $imageSize = getimagesize($imageURL);
            $rankCatInfo['imagewidth'] = $imageSize[0];
        }
        if ($rankCatInfo['imageheight'] == 0) {
            $imageURL = $rankCatObj->getLocalImageURL();
            $imageSize = getimagesize($imageURL);
            $rankCatInfo['imageheight'] = $imageSize[1];
        }
        echo "\n\t\t\t<tr>\n\t\t\t\t<td class='main' align='center' colspan='2'><img src='" . $rankCatInfo['imageurl'] . "' width='" . $rankCatInfo['imagewidth'] . "' height='" . $rankCatInfo['imageheight'] . "' onmouseover=\"showToolTip('<b>" . $rankCatInfo['name'] . "</b><br>" . $rankCatInfo['description'] . "')\" onmouseout='hideToolTip()'></td>\n\t\t\t</tr>\n\t\t";
    } else {
        $dispCatDesc = "";
コード例 #3
0
ファイル: addrank.php プロジェクト: nsystem1/clanscripts
    }
}
include_once $prevFolder . "classes/btupload.php";
include_once $prevFolder . "classes/rankcategory.php";
$cID = $_GET['cID'];
if (isset($_POST['submit']) && $_POST['submit']) {
    $countErrors = 0;
    // Check Rank Name
    $checkRankName = trim($_POST['rankname']);
    if ($checkRankName == "") {
        $countErrors++;
        $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You may not enter a blank rank name.<br>";
    }
    // Check Rank Category
    $rankCatObj = new RankCategory($mysqli);
    if (!$rankCatObj->select($_POST['rankcat'])) {
        $countErrors++;
        $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You selected an invalid rank category.<br>";
    }
    // Check Image Height
    if (!is_numeric($_POST['rankimageheight']) and trim($_POST['rankimageheight']) != "") {
        $countErrors++;
        $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> The Image Height must be a numeric value.<br>";
    } elseif ($_POST['rankimageheight'] <= 0 and is_numeric($_POST['rankimageheight'])) {
        $countErrors++;
        $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> The Image Height must be a value greater than 0.<br>";
    }
    if ($_FILES['rankimagefile']['name'] == "" and (trim($_POST['rankimageheight']) == "" or $_POST['rankimageheight'] <= 0)) {
        $countErrors++;
        $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You must supply an image height for images that aren't uploaded.<br>";
    }
コード例 #4
0
ファイル: delete.php プロジェクト: nsystem1/clanscripts
 */
include_once "../../../../_setup.php";
include_once "../../../../classes/member.php";
include_once "../../../../classes/rank.php";
include_once "../../../../classes/consoleoption.php";
include_once "../../../../classes/rankcategory.php";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$rankCatObj = new RankCategory($mysqli);
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Manage Rank Categories");
$consoleObj->select($cID);
$_GET['cID'] = $cID;
if ($member->authorizeLogin($_SESSION['btPassword'])) {
    $memberInfo = $member->get_info_filtered();
    if ($member->hasAccess($consoleObj) && $rankCatObj->select($_POST['rID'])) {
        define('MEMBERRANK_ID', $memberInfo['rank_id']);
        $rankCatInfo = $rankCatObj->get_info_filtered();
        $arrRanks = $rankCatObj->getAssociateIDs();
        if (count($arrRanks) > 0) {
            echo "<div id='newDeleteMessage' style='display: none'><p align='center'>There are currently ranks under the rank category <b>" . $rankCatInfo['name'] . "</b>.  Please change all ranks with this category before deleting it.</p></div>";
            echo "\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\$('#deleteMessage').dialog('close');\n\t\t\t\t\t\t\$('#newDeleteMessage').dialog({\n\t\t\t\t\t\t\n\t\t\t\t\t\t\ttitle: 'Manage Rank Categories - Delete',\n\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\tzIndex: 9999,\n\t\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t\t'OK': function() {\n\t\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t";
        } elseif (isset($_POST['confirm']) && $_POST['confirm'] == "1") {
            $rankCatObj->delete();
            include "main.php";
        } else {
            echo "<p align='center'>Are you sure you want to delete the rank category <b>" . $rankCatInfo['name'] . "</b>?";
        }
    } elseif (!$rankCatObj->select($_POST['rID'])) {
        echo "<p align='center'>Unable find the selected rank category.  Please try again or contact the website administrator.</p>";
    }
コード例 #5
0
        $_POST['submit'] = false;
    }
}
if (!$_POST['submit']) {
    $_SESSION['btAccessRules'] = array();
    $result = $mysqli->query("SELECT * FROM " . $dbprefix . "consolecategory WHERE adminoption != '1' ORDER BY ordernum DESC");
    while ($row = $result->fetch_assoc()) {
        $consoleCatOptions .= "<option value='" . $row['consolecategory_id'] . "'>" . filterText($row['name']) . "</option>";
    }
    $result = $mysqli->query("SELECT * FROM " . $dbprefix . "rankcategory ORDER BY ordernum DESC");
    $counter = 1;
    while ($row = $result->fetch_assoc()) {
        $arrRankCats[] = $row['rankcategory_id'];
    }
    foreach ($arrRankCats as $rankCat) {
        $rankCatObj->select($rankCat);
        $arrRanks = $rankCatObj->getAssociateIDs();
        if (count($arrRanks) > 0) {
            $sqlRanks = "('" . implode("','", $arrRanks) . "')";
            $rankOptions .= "<span style='font-weight: bold; text-decoration: underline'>" . $rankCatObj->get_info_filtered("name") . "</span> - <a href='javascript:void(0)' onclick=\"selectAllCheckboxes('ranksection_" . $rankCat . "', 1)\">Check All</a> - <a href='javascript:void(0)' onclick=\"selectAllCheckboxes('ranksection_" . $rankCat . "', 0)\">Uncheck All</a><br>";
            $rankOptions .= "<div id='ranksection_" . $rankCat . "'>";
            $result = $mysqli->query("SELECT * FROM " . $dbprefix . "ranks WHERE rank_id != '1' AND rank_id IN " . $sqlRanks . " ORDER BY ordernum DESC");
            while ($row = $result->fetch_assoc()) {
                $rankOptions .= "<input type='checkbox' name='rankaccess_" . $row['rank_id'] . "' value='1' class='textBox'> " . filterText($row['name']) . "<br>";
                $counter++;
            }
            $rankOptions .= "</div><br>";
        }
    }
    $rankOptionsHeight = $counter * 20;
    if ($rankOptionsHeight > 300) {
コード例 #6
0
ファイル: index.php プロジェクト: nsystem1/clanscripts
        $dispHPNews .= "\t\t\n\t\t\t<div class='newsDiv' id='newsDiv_" . $newsInfo['news_id'] . "'>\n\t\t\t\t<div class='postInfo'>\n\t\t\t\t\t<div id='newsPostAvatar' style='float: left'><img src='" . $posterInfo['avatar'] . "' class='avatarImg'></div>\n\t\t\t\t\t<div id='newsPostInfo' style='float: left; margin-left: 15px'>posted by " . $member->getMemberLink() . " - " . getPreciseTime($newsInfo['dateposted']) . $dispNewsType . "<br>\n\t\t\t\t\t<span class='subjectText'>" . $newsInfo['postsubject'] . "</span></div>\n\t\t\t\t</div>\n\t\t\t\t<br>\n\t\t\t\t<div class='dottedLine' style='margin-top: 5px'></div>\n\t\t\t\t<div class='postMessage'>\n\t\t\t\t\t" . $dispNews . "\n\t\t\t\t</div>\n\t\t\t\t<div class='dottedLine' style='margin-top: 5px; margin-bottom: 5px'></div>\n\t\t\t\t<div class='main' style='margin-top: 0px; margin-bottom: 10px; padding-left: 5px'>" . $dispLastEdit . "</div>\n\t\t\t\t<p style='padding: 0px; margin: 0px' align='right'><b><a href='" . $MAIN_ROOT . "news/viewpost.php?nID=" . $newsInfo['news_id'] . "#comments'>Comments (" . $newsObj->countComments() . ")</a></b></p>\n\t\t\t</div>\n\t\t\n\t\t\n\t\t";
    }
}
if ($dispAnnouncements != "") {
    echo "<p class='main' style='font-size: 18px; font-weight: bold; padding-left: 15px'>Announcements</p>";
    echo $dispAnnouncements;
    if ($dispHPNews != "") {
        echo "<br>";
    }
}
if ($dispHPNews != "") {
    echo "<p class='main' style='font-size: 18px; font-weight: bold; padding-left: 15px'>Latest News</p>";
    echo $dispHPNews;
}
echo "\n<div>\n\n<table class='formTable' style='width: 65%; margin-left: auto; margin-right: auto; border-spacing: 0px' align='center'>\n\t<tr>\n\t\t<td class='formTitle' align='center'>Members Online Statistics</td>\n\t</tr>\n\t<tr>\n\t\t<td class='main solidBox' style='border-top-width: 0px' align='center'>\n\t\t\t<b>Members Online:</b> " . $membersOnlineCount . "<br>\n\t\t\t<p>\n\t\t\t\t";
if (constant('LOGGED_IN')) {
    echo $membersOnlineList;
} else {
    echo "You must be logged in to view members online";
}
echo "\n\t\t\t</p>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td class='main solidBox' style='border-top-width: 0px' align='center'>\n";
foreach ($arrRankCatCount as $key => $value) {
    $rankCatObj->select($key);
    $rankCatColor = $rankCatObj->get_info_filtered("color");
    $rankCatName = $rankCatObj->get_info_filtered("name");
    $arrDispRankCat[$key] = "<span style='color: " . $rankCatColor . "'><b>" . $value . "</b> " . $rankCatName . "</span>";
}
$dispRankCatCount = implode(", ", $arrDispRankCat);
echo "<p>" . $dispRankCatCount . "</p>\n\t\t</td>\n\t</tr>\n</table>\n<table class='formTable' style='width: 65%; margin-left: auto; margin-right: auto; border-spacing: 0px' align='center'>\n\t<tr>\n\t\t<td class='formTitle' align='center'>Website Statistics</td>\n\t<tr>\n\t\t<td class='main solidBox' style='border-top-width: 0px' align='center'>\n\t\t\t<p>\n\t\t\t\t<b>Most Members Online:</b> " . $websiteInfo['mostonline'] . " - " . getPreciseTime($websiteInfo['mostonlinedate']) . "<br><br>\n\t\t\t\t<b>Total Page Views:</b> " . $totalPageViews[0] . "<br>\n\t\t\t\t<b>Total Unique Views:</b> " . $totalUniqueViews->num_rows . "<br><br>\n\t\t\t\tYou have viewed this site <b>" . $totalYourViews['totalhits'] . "</b> times.<br><br>\n\t\t\t\t" . $dispLastVisitDate . "\n\t\t\t</p>\n\t\t</td>\n\t</tr>\n</table>\n\n</div>\n<br><br>\n\n\t";
echo "<!-- " . phpversion() . " -->";
include "themes/" . $THEME . "/_footer.php";
コード例 #7
0
     $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You have selected an invalid category order (before/after).<br>";
 }
 // Check image width
 if ($_FILES['catimagefile']['name'] == "" and trim($_POST['catimageurl']) != "" and $_POST['useimage'] == "1" and (trim($_POST['catimagewidth']) == "" or $_POST['catimagewidth'] <= 0)) {
     $countErrors++;
     $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You must enter a valid image width when using an external image.<br>";
 }
 // Check image height
 if ($_FILES['catimagefile']['name'] == "" and trim($_POST['catimageurl']) != "" and $_POST['useimage'] == "1" and (trim($_POST['catimageheight']) == "" or $_POST['catimageheight'] <= 0)) {
     $countErrors++;
     $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You must enter a valid image height when using an external image.<br>";
 }
 // Check Order
 $rankCatObj = new RankCategory($mysqli);
 if ($_POST['catorder'] != "first") {
     if (!$rankCatObj->select($_POST['catorder'])) {
         $countErrors++;
         $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You have selected an invalid category order (category).<br>";
     } else {
         $intNewCatOrderNum = $rankCatObj->makeRoom($_POST['beforeafter']);
         if ($intNewCatOrderNum == "false") {
             $countErrors++;
             $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You have selected an invalid category order (category).<br>";
         }
     }
 } else {
     $result = $mysqli->query("SELECT * FROM " . $dbprefix . "rankcategory ORDER BY ordernum");
     if ($result->num_rows > 0) {
         $countErrors++;
         $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You have selected an invalid category order (category).<br>";
     } else {