Ejemplo n.º 1
0
function awardMedalSave()
{
    global $member, $medalObj, $memberInfo;
    $member->select($_POST['member_id']);
    $logMessage = $member->getMemberLink() . " was awarded the " . $medalObj->get_info_filtered("name") . " medal.<br><br><b>Reason:</b><br>" . filterText($_POST['reason']);
    $member->postNotification("You were awarded the medal: <b>" . $medalObj->get_info_filtered("name") . "</b>");
    $member->select($memberInfo['member_id']);
    $member->logAction($logMessage);
}
Ejemplo n.º 2
0
 public function dispShoutbox($setWidth = 0, $setHeight = 0, $blnPercentWidth = false, $txtBoxWidth = 0, $blnPercentHeight = false)
 {
     global $MAIN_ROOT, $THEME;
     if ($setWidth > 0) {
         $this->intDispWidth = $setWidth;
     }
     if ($setHeight > 0) {
         $this->intDispHeight = $setHeight;
     }
     $dispWidthPX = "px";
     if ($blnPercentWidth) {
         $dispWidthPX = "%";
     }
     $dispHeightPX = "px";
     if ($blnPercentHeight) {
         $dispHeightPX = "%";
     }
     $result = $this->MySQL->query("SELECT * FROM " . $this->strTableName . " WHERE newstype = '3'" . $this->strSQLSort . " ORDER BY dateposted");
     while ($row = $result->fetch_assoc()) {
         if ($this->memberObj->select($row['member_id'])) {
             $memberLink = $this->memberObj->getMemberLink();
             $dispPost = nl2br(parseBBCode(wordwrap(filterText($row['newspost']), $this->intWordWrap)));
             $dispTime = "<p align='center' style='font-size: 9px'><br>" . getPreciseTime($row['dateposted']) . "</p>";
             $dispManagePost = "";
             if ($this->strEditLink != "" && $this->strDeleteLink != "") {
                 $dispManagePost = "<p align='center'><span class='loadingSpiral' id='" . $this->strDivID . "_loading_" . $row[$this->strTableKey] . "'><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/loading-spiral2.gif' width='30' height='30'></span><span class='tinyFont' id='" . $this->strDivID . "_manage_" . $row[$this->strTableKey] . "'><br><b><a href='" . $this->strEditLink . $row[$this->strTableKey] . "'>EDIT</a> - <a href='javascript:void(0)' onclick=\"deleteShoutbox('" . $row[$this->strTableKey] . "', '" . $this->strDeleteLink . "', '" . $this->strDivID . "')\">DELETE</a></b></span></p>";
             }
             $shoutBoxInfo .= "\n\t\t\t\t\t<b>" . $memberLink . ":</b><br>\n\t\t\t\t\t<div style='word-wrap: break-word;'>" . $dispPost . "</div>\n\t\t\t\t\t" . $dispTime . "\n\t\t\t\t\t" . $dispManagePost . "\n\t\t\t\t\t<div class='dottedLine' style='margin: 5px 0px'></div>\n\t\t\t\t";
         }
     }
     $addToReturn = "";
     $addToReturn2 = "";
     $setMainShoutbox = "";
     if ($this->blnMainShoutbox) {
         $setMainShoutbox = " data-shoutbox='main' ";
     }
     if (!$this->blnUpdateShoutbox) {
         $addToReturn = "<div class='shoutBox' id='" . $this->strDivID . "'" . $setMainShoutbox . " style='width: " . $this->intDispWidth . $dispWidthPX . "; height: " . $this->intDispHeight . $dispHeightPX . "'>";
         $addToReturn2 = "</div>";
     }
     $returnVal = $addToReturn . $shoutBoxInfo . $addToReturn2;
     if ($this->strPostLink != "") {
         $setTxtBoxWidth = $this->intDispWidth - 10;
         if ($txtBoxWidth > 0) {
             $setTxtBoxWidth = $txtBoxWidth;
         }
         $returnVal .= "\n\t\t\t<div class='shoutBoxPost' style='text-align: center; width: 100%' id='" . $this->strDivID . "_postShoutbox'>\n\t\t\t\t<div style='margin-left: auto; margin-right: auto; width: " . $setTxtBoxWidth . $dispWidthPX . "'>\n\t\t\t\t\t<textarea class='textBox' rows='1' style='margin-left: auto; margin-right: auto; width: 100%; height: 25px' id='" . $this->strDivID . "_message'></textarea>\n\t\t\t\t\t<p align='right' style='margin-right: -3px; padding-top: 1px; margin-top: 3px'><input type='button' class='submitButton' value='POST' onclick=\"postShoutbox('" . $this->strDivID . "', '" . $this->strPostLink . "')\" style='padding: 5px'></p>\n\t\t\t\t</div>\n\t\t\t</div>";
     }
     return $returnVal;
 }
Ejemplo n.º 3
0
 public function index($page = "index")
 {
     //$this->output->cache(15);
     $data = array();
     if (isset($_GET['keyword']) && strlen($_GET['keyword']) > 2) {
         $keyword = filterText($_GET['keyword']);
         $data['original_keyword'] = $keyword;
         $keyword = strtolower($keyword);
         $keyword = str_replace(' ep ', ' episode ', $keyword);
         $whereClause = "title LIKE '%" . $keyword . "%'";
         $pageNum = isset($_GET['p']) ? intval($_GET['p']) : 1;
         $offset = ($pageNum - 1) * ITEM_PER_PAGE;
         $total = $this->Series_model->getTotal($whereClause);
         $listObject = $this->Series_model->getRange($whereClause, $offset, ITEM_PER_PAGE);
         $data['keyword'] = $keyword;
         $data['max'] = ITEM_PER_PAGE;
         $data['offset'] = $offset;
         $data['total'] = $total;
         $this->layout->title('Search result for ' . $keyword);
         $metaData['page_link'] = makeLink(0, $keyword, 'search');
         $this->layout->setMeta($metaData);
         if (empty($listObject)) {
             $whereClause2 = "video.title LIKE '%" . $keyword . "%'";
             $total = $this->Video_model->getTotalFull($whereClause2);
             $data['total'] = $total;
             $listVideo = $this->Video_model->getRangeFull($whereClause2, $offset, ITEM_PER_PAGE);
             if ($listVideo) {
                 $data['listObject'] = $listVideo;
                 $this->layout->view('search/video', $data);
             } else {
                 $this->layout->view('home/nodata', array());
             }
         } else {
             $data['listObject'] = $listObject;
             $this->layout->view('search/' . $page, $data);
         }
     } else {
         redirect('');
     }
 }
Ejemplo n.º 4
0
function dispIAMessages($iaID)
{
    global $MAIN_ROOT, $dbprefix, $mysqli;
    $iaMember = new Member($mysqli);
    $counter = 0;
    $iaMessages = "";
    $iaMessagesQuery = $mysqli->query("SELECT * FROM " . $dbprefix . "iarequest_messages WHERE iarequest_id = '" . $iaID . "' ORDER BY messagedate DESC");
    while ($iaMessageRow = $iaMessagesQuery->fetch_assoc()) {
        if ($counter == 1) {
            $addCSS = "";
            $counter = 0;
        } else {
            $addCSS = " alternateBGColor";
            $counter = 1;
        }
        $iaMember->select($iaMessageRow['member_id']);
        $iaMessages .= "\n\t\t\t<div class='dottedLine" . $addCSS . "' style='padding: 10px 5px; margin-left: auto; margin-right: auto; width: 80%;'>\n\t\t\t\t" . $iaMember->getMemberLink() . " - " . getPreciseTime($iaMessageRow['messagedate']) . "<br><br>\n\t\t\t\t<div style='padding-left: 5px'>" . nl2br(filterText($iaMessageRow['message'])) . "</div>\n\t\t\t</div>\n\t\t";
    }
    if ($iaMessagesQuery->num_rows == 0) {
        $iaMessages = "<i>No Messages</i>";
    }
    return $iaMessages;
}
Ejemplo n.º 5
0
 /**
  * 
  * @param array $params
  * @param boolean $page Default is TRUE
  * @param array $extend Default is NULL
  * @return string|null
  */
 function makeParams($params, $page = TRUE, $extend = NULL)
 {
     if ($params) {
         if ($page === FALSE) {
             unset($params['page']);
         }
         $str = '';
         if ($extend) {
             foreach ($extend as $key => $val) {
                 if (isset($val) && $val != '') {
                     $params[$key] = $val;
                 }
             }
         }
         foreach ($params as $key => $val) {
             if (isset($val) && $val != '') {
                 $str .= '&amp;' . filterText($key) . '=' . urlencode(filterText($val));
             }
         }
         return substr($str, 5);
     }
     return NULL;
 }
Ejemplo n.º 6
0
include "managemenu/include/shoutboxoptions.php";
// Poll Options
include "managemenu/include/polloptions.php";
// Custom Code Editor
include "managemenu/include/customcodeoptions.php";
// Custom Code Editor - WYSIWYG
include "managemenu/include/customcodeformatoptions.php";
// Global Link Options - Target Window, Text Align and Prefix
$globalLinkOptionsNeeded = array("link", "custompage", "customform", "downloads");
foreach ($globalLinkOptionsNeeded as $optionName) {
    $globalLinkOptions[$optionName] = array("targetwindow_" . $optionName => array("type" => "select", "display_name" => "Target Window", "sortorder" => $i++, "attributes" => array("class" => "textBox formInput"), "options" => array("" => "Same Window", "_blank" => "New Window")), "textalign_" . $optionName => array("type" => "select", "display_name" => "Text-align", "attributes" => array("class" => "textBox formInput"), "options" => $textAlignOptions, "sortorder" => $i++), "prefix_" . $optionName => array("type" => "text", "display_name" => "Prefix", "tooltip" => "Text to display before the link, i.e. a bullet point or dash.", "sortorder" => $i++, "attributes" => array("class" => "textBox formInput")));
}
$linkOptionComponents = array_merge($linkOptionComponents, $globalLinkOptions['link']);
$customPageOptionComponents = array_merge($customPageOptionComponents, $globalLinkOptions['custompage']);
$customFormOptionComponents = array_merge($customFormOptionComponents, $globalLinkOptions['customform']);
$downloadOptionComponents = array_merge($downloadOptionComponents, $globalLinkOptions['downloads']);
$i = 1;
$arrComponents = array("generalinfo" => array("type" => "section", "options" => array("section_title" => "General Information:"), "sortorder" => $i++), "itemname" => array("type" => "text", "attributes" => array("class" => "textBox formInput"), "validate" => array("NOT_BLANK"), "db_name" => "name", "sortorder" => $i++, "display_name" => "Item Name"), "menucategory" => array("type" => "select", "display_name" => "Menu Category", "sortorder" => $i++, "validate" => array("RESTRICT_TO_OPTIONS"), "db_name" => "menucategory_id", "attributes" => array("class" => "textBox formInput", "id" => "menuCats"), "options" => $menuCatOptions, "value" => $selectMenuCat), "displayorder" => array("type" => "beforeafter", "display_name" => "Display Order", "attributes" => array("class" => "textBox formInput"), "sortorder" => $i++, "validate" => array("RESTRICT_TO_OPTIONS", array("name" => "VALIDATE_ORDER", "set_category" => $_POST['menucategory'], "orderObject" => $menuItemObj)), "db_name" => "sortnum", "options" => $displayOrderOptions), "itemtype" => array("type" => "select", "display_name" => "Item Type", "validate" => array("RESTRICT_TO_OPTIONS"), "db_name" => "itemtype", "sortorder" => $i++, "attributes" => array("class" => "textBox formInput", "id" => "itemType"), "options" => $itemTypeOptions), "accesstype" => array("type" => "select", "display_name" => "Show when", "sortorder" => $i++, "validate" => array("RESTRICT_TO_OPTIONS"), "db_name" => "accesstype", "options" => array("Always", "Logged In"), "attributes" => array("class" => "textBox formInput")), "hide" => array("type" => "checkbox", "display_name" => "Hide", "attributes" => array("class" => "textBox formInput"), "value" => 1, "sortorder" => $i++, "db_name" => "hide"), "linkinformation" => array("type" => "section", "options" => array("section_title" => "Link Information:"), "sortorder" => $i++, "attributes" => array("id" => "linkOptions"), "components" => $linkOptionComponents, "validate" => array("validateMenuItem_Links")), "imageinformation" => array("type" => "section", "options" => array("section_title" => "Image Information:"), "sortorder" => $i++, "attributes" => array("id" => "imageOptions", "style" => "display: none"), "components" => $imageOptionComponents, "validate" => array("validateMenuItem_Images")), "custompageoptions" => array("type" => "section", "options" => array("section_title" => "Custom Page Options:"), "sortorder" => $i++, "attributes" => array("id" => "customPageOptions", "style" => "display: none"), "components" => $customPageOptionComponents, "validate" => array(array("name" => array("function" => "validateMenuItem_CustomPageTypes", "args" => array("custompage", &$customPageOptionComponents))))), "customformoptions" => array("type" => "section", "options" => array("section_title" => "Custom Form Options:"), "sortorder" => $i++, "attributes" => array("id" => "customFormOptions", "style" => "display: none"), "components" => $customFormOptionComponents, "validate" => array(array("name" => array("function" => "validateMenuItem_CustomPageTypes", "args" => array("customform", &$customFormOptionComponents))))), "downloadoptions" => array("type" => "section", "options" => array("section_title" => "Download Page Options:"), "sortorder" => $i++, "attributes" => array("id" => "downloadLinkOptions", "style" => "display: none"), "components" => $downloadOptionComponents, "validate" => array(array("name" => array("function" => "validateMenuItem_CustomPageTypes", "args" => array("downloads", &$downloadOptionComponents))))), "shoutboxoptions" => array("type" => "section", "options" => array("section_title" => "Shoutbox Information:", "section_description" => "<b><u>NOTE:</u></b> Leave all fields blank to keep the theme's default settings."), "sortorder" => $i++, "attributes" => array("id" => "shoutBoxOptions", "style" => "display: none"), "components" => $shoutboxOptionComponents), "polloptions" => array("type" => "section", "options" => array("section_title" => "Poll Options:"), "sortorder" => $i++, "attributes" => array("id" => "pollOptions", "style" => "display: none"), "components" => $pollOptionComponents), "customcodeoptions" => array("type" => "section", "options" => array("section_title" => "Menu Item Code:"), "sortorder" => $i++, "attributes" => array("id" => "customCodeOptions", "style" => "display: none"), "components" => $customCodeOptionComponents), "customformatoptions" => array("type" => "section", "options" => array("section_title" => "Menu Item Information:"), "sortorder" => $i++, "attributes" => array("id" => "customFormatOptions", "style" => "display: none"), "components" => $customWYSIWYGOptionComponents), "fakeSubmit" => array("type" => "button", "attributes" => array("class" => "submitButton formSubmitButton", "id" => "btnFakeSubmit"), "value" => "Add Menu Item", "sortorder" => $i++), "submit" => array("type" => "submit", "value" => "submit", "attributes" => array("style" => "display: none", "id" => "btnSubmit"), "sortorder" => $i++));
$arrAfterJS = array();
$arrAfterJS['menuCats'] = "\n\n\t\$('#menuCats').change(function() {\n\t\t\$('#displayOrder').html(\"<option value''>Loading...</option>\");\n\t\t\$.post('" . $MAIN_ROOT . "members/include/admin/managemenu/include/menuitemlist.php', { menuCatID: \$('#menuCats').val() }, function(data) {\n\t\t\t\$('select[name=displayorder]').html(data);\n\t\t});\n\t});\n\t\t\t\n\t\$('#menuCats').change();\n\n";
$arrItemTypeChangesJS = array("linkOptions" => "link", "imageOptions" => "image", "shoutBoxOptions" => "shoutbox", "customPageOptions" => "custompage", "customFormOptions" => "customform", "customCodeOptions" => "customcode", "customFormatOptions" => "customformat", "downloadLinkOptions" => "downloads", "pollOptions" => "poll");
$arrAfterJS['itemType'] = prepareItemTypeChangeJS($arrItemTypeChangesJS);
$arrAfterJS['shoutbox'] = "\n\n\$('#shoutBoxWidthPercent').change(function() {\n\t\t\t\t\t\n\tif(\$(this).val() == '0') {\n\t\t\$('#shoutBoxTextBoxWidth').html('pixels');\n\t}\n\telse {\n\t\t\$('#shoutBoxTextBoxWidth').html('percent');\n\t}\n\n});\n\n";
$arrAfterJS['submit'] = "\n\n\$('#btnFakeSubmit').click(function() {\n\t\$('#menuCodeEditor_code').val(menuCodeEditor.getValue());\n\t\$('#btnSubmit').click();\n\n});\n\n";
$afterJS = "\n\n\t\$(document).ready(function() {\n\t";
foreach ($arrAfterJS as $value) {
    $afterJS .= $value . "\n";
}
$afterJS .= "\t\t\n\t});\n\t\n";
$setupFormArgs = array("name" => "console-" . $cID, "components" => $arrComponents, "description" => "Use the form below to add a menu item.", "saveObject" => $menuItemObj, "saveMessage" => "Successfully Added New Menu Item: <b>" . filterText($_POST['itemname']) . "</b>!", "saveType" => "add", "attributes" => array("action" => $MAIN_ROOT . "members/console.php?cID=" . $cID, "method" => "post", "enctype" => "multipart/form-data"), "embedJS" => $afterJS, "afterSave" => array(array("function" => "saveMenuItem", "args" => array(&$linkOptionComponents, &$menuItemObj->objLink, array("linkurl_link" => "link", "targetwindow_link" => "linktarget", "textalign_link" => "textalign", "prefix_link" => "prefix"), "menulink_id", "link")), array("function" => "saveMenuItem", "args" => array(&$imageOptionComponents, &$menuItemObj->objImage, array("imagefile_image" => "imageurl", "width_image" => "width", "height_image" => "height", "linkurl_image" => "link", "targetwindow_image" => "linktarget", "textalign_image" => "imagealign"), "menuimage_id", "image")), array("function" => "saveMenuItem", "args" => array(&$customPageOptionComponents, &$menuItemObj->objCustomPage, array("custompage" => "custompage_id", "targetwindow_custompage" => "linktarget", "textalign_custompage" => "textalign", "prefix_custompage" => "prefix"), "menucustompage_id", "custompage")), array("function" => "saveMenuItem", "args" => array(&$customFormOptionComponents, &$menuItemObj->objCustomPage, array("customform" => "custompage_id", "targetwindow_customform" => "linktarget", "textalign_customform" => "textalign", "prefix_customform" => "prefix"), "menucustompage_id", "customform")), array("function" => "saveMenuItem", "args" => array(&$downloadOptionComponents, &$menuItemObj->objCustomPage, array("downloadpage" => "custompage_id", "targetwindow_downloads" => "linktarget", "textalign_downloads" => "textalign", "prefix_downloads" => "prefix"), "menucustompage_id", "downloads")), array("function" => "saveMenuItem", "args" => array(&$shoutboxOptionComponents, &$menuItemObj->objShoutbox, array("width_shoutbox" => "width", "height_shoutbox" => "height", "textboxwidth_shoutbox" => "textboxwidth"), "menushoutbox_id", "shoutbox", array("percentwidth" => $_POST['widthunit_shoutbox'], "percentheight" => $_POST['heightunit_shoutbox']))), array("function" => "saveMenuItem", "args" => array(&$customCodeOptionComponents, &$menuItemObj->objCustomBlock, array("customcode" => "code"), "menucustomblock_id", "customcode", array("blocktype" => "code"))), array("function" => "saveMenuItem", "args" => array(&$customWYSIWYGOptionComponents, &$menuItemObj->objCustomBlock, array("wysiwygEditor" => "code"), "menucustomblock_id", "customformat", array("blocktype" => "format"))), "savePoll"));
Ejemplo n.º 7
0
?>


<div class='twitchCardContainer'>
	<div class='twitchPreview'>
	<?php 
if ($twitchObj->data['memberCard']['online']) {
    echo "\n\t\t\t\t<div class='twitchLiveIcon'></div>\n\t\t\t\t<div class='twitchGameOverlay'><img src='" . $twitchObj->getGameImageURL($twitchObj->data['memberCard']['game']) . "' onmouseover=\"showToolTip('" . filterText($twitchObj->data['memberCard']['game']) . "')\" onmouseout=\"hideToolTip()\"></div>\n\t\t\t\t<div class='twitchViewers'>" . number_format($twitchObj->data['memberCard']['viewers']) . " " . pluralize("viewer", $twitchObj->data['memberCard']['viewers']) . "</div>\n\t\t\t\t<a href='" . MAIN_ROOT . "plugins/twitch/?user="******"'><img src='" . $twitchObj->data['memberCard']['rawData']['stream']['preview']['medium'] . "'></a>\n\t\t\t";
} else {
    echo "<a href='" . MAIN_ROOT . "plugins/twitch/?user="******"'><img src='" . MAIN_ROOT . "plugins/twitch/images/offlinepreview.png'></a>";
}
?>
	
	</div>
	<div class='twitchChannelDescription ellipsis' title='<?php 
echo filterText($twitchObj->data['memberCard']['streamTitle']);
?>
'><?php 
echo $twitchObj->data['memberCard']['streamTitle'];
?>
</div>
	<div class='twitchChannelDescription'><?php 
echo $twitchObj->data['memberCard']['memberLink'];
?>
 streaming as <a href='http://twitch.tv/<?php 
echo $twitchObj->data['memberCard']['twitchName'];
?>
/profile' target='_blank'><?php 
echo $twitchObj->data['memberCard']['twitchName'];
?>
</a></div>
Ejemplo n.º 8
0
$checkRecurringBox = $setRecurringBox == 1 ? 1 : 0;
$campaignJS = "\n\t\n\t\t\$(document).ready(function() {\n\t\t\tvar recurring = " . $checkRecurringBox . ";\n\t\t\n\t\t\t\$('#chkRecurring').click(function() {\n\t\t\t\tif(recurring == 1) {\n\t\t\t\t\t\$('#repeatPeriodAmount').attr('disabled', 'disabled');\n\t\t\t\t\t\$('#repeatPeriodUnit').attr('disabled', 'disabled');\n\t\t\t\t\trecurring = 0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\$('#repeatPeriodAmount').attr('disabled', false);\n\t\t\t\t\t\$('#repeatPeriodUnit').attr('disabled', false);\n\t\t\t\t\trecurring = 1;\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\t\$('#runUntil').change(function() {\n\t\t\t\n\t\t\t\tif(\$(this).val() == \"choose\") {\n\t\t\t\t\t\$('#jsEndDate').show();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\$('#jsEndDate').hide();\n\t\t\t\t}\n\t\t\t\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t\t\$('#runUntil').change();\n\t\t});\n\t";
$maxYear = date("Y") + 10;
$maxDate = "new Date(" . $maxYear . ",12,31)";
$i = 0;
$arrComponents = array("mainsection" => array("type" => "section", "options" => array("section_title" => "General Information"), "sortorder" => $i++), "title" => array("type" => "text", "attributes" => array("class" => "textBox bigTextBox formInput"), "sortorder" => $i++, "display_name" => "Title", "db_name" => "title", "validate" => array("NOT_BLANK")), "description" => array("type" => "textarea", "display_name" => "Description", "attributes" => array("class" => "textBox formInput bigTextBox", "rows" => 5), "sortorder" => $i++, "db_name" => "description"), "rununtil" => array("type" => "select", "display_name" => "Run Until", "options" => array("forever" => "Forever", "choose" => "Choose Date"), "attributes" => array("class" => "textBox formInput", "id" => "runUntil"), "sortorder" => $i++), "enddate" => array("type" => "datepicker", "sortorder" => $i++, "attributes" => array("style" => "cursor: pointer; display: none", "id" => "jsEndDate", "class" => "textBox formInput"), "db_name" => "dateend", "before_html" => "<label class='formLabel' style='display: inline-block'></label>\n\t\t\t", "options" => array("changeMonth" => "true", "changeYear" => "true", "dateFormate" => "M d, yy", "minDate" => "new Date(50, 1, 1)", "maxDate" => $maxDate, "yearRange" => "1950:" . $maxYear, "altField" => "realEndDate"), "validate" => array("NUMBER_ONLY"), "value" => 0), "allowname" => array("type" => "checkbox", "display_name" => "Allow Names", "tooltip" => "Check this box to allow donators to leave their name.", "sortorder" => $i++, "value" => 1, "options" => array(1 => ""), "attributes" => array("class" => "formInput"), "db_name" => "allowname"), "allowmessage" => array("type" => "checkbox", "display_name" => "Allow Messages", "tooltip" => "Check this box to allow donators to leave a message.", "sortorder" => $i++, "value" => 1, "options" => array(1 => ""), "attributes" => array("class" => "formInput"), "db_name" => "allowmessage"), "allowhiddenamount" => array("type" => "checkbox", "display_name" => "Allow Hidden Amounts", "tooltip" => "Check this box to allow donators to hide the amount they donated on the donation profile page.  You will still be able to view the amount in the donation logs.", "sortorder" => $i++, "value" => 0, "options" => array(1 => ""), "attributes" => array("class" => "formInput"), "db_name" => "allowhiddenamount"), "goalamount" => array("type" => "text", "attributes" => array("class" => "formInput textBox smallTextBox"), "sortorder" => $i++, "display_name" => "Donation Goal", "db_name" => "goalamount"), "minimumamount" => array("type" => "text", "attributes" => array("class" => "formInput textBox smallTextBox"), "sortorder" => $i++, "display_name" => "Minimum Donation", "value" => "1.00", "db_name" => "minimumamount"), "currency" => array("type" => "select", "attributes" => array("class" => "formInput textBox"), "sortorder" => $i++, "display_name" => "Currency", "db_name" => "currency", "options" => $arrPaypalCurrencyCodes, "value" => $donationPlugin->getConfigInfo("currency")));
// Check for award medal console access
$awardMedalCID = $consoleObj->findConsoleIDByName("Award Medal");
$consoleObj->select($awardMedalCID);
$hasAwardMedalAccess = false;
if ($member->hasAccess($consoleObj)) {
    $hasAwardMedalAccess = true;
    $medalOptions[0] = "None";
    $result = $mysqli->query("SELECT * FROM " . $dbprefix . "medals ORDER BY ordernum DESC");
    while ($row = $result->fetch_assoc()) {
        $medalOptions[$row['medal_id']] = filterText($row['name']);
    }
    $arrComponents['awardmedal'] = array("type" => "select", "display_name" => "Award Medal", "sortorder" => $i++, "tooltip" => "Auto-award a medal to a member who donates.", "attributes" => array("class" => "formInput textBox"), "db_name" => "awardmedal", "options" => $medalOptions);
}
$consoleObj->select($cID);
if (!is_array($arrSelectRecur)) {
    $arrSelectRecur['months'] = "selected";
}
$arrRecurUnits = array("days" => "Days", "weeks" => "Weeks", "months" => "Months", "years" => "Years");
foreach ($arrRecurUnits as $key => $value) {
    $recurOptions .= "<option value='" . $key . "'" . $arrSelectRecur[$key] . ">" . $value . "</option>";
}
$disabledRecurring = $checkRecurringBox == 1 ? "" : " disabled='disabled'";
$arrRecurringComponents = array("recurringsection" => array("type" => "section", "options" => array("section_title" => "Recurring Options", "section_description" => "Use this section to setup a campaign that restarts after a certain period of time."), "sortorder" => $i++), "recurring" => array("type" => "checkbox", "display_name" => "Recurring Campaign", "options" => array(1 => ""), "sortorder" => $i++, "attributes" => array("class" => "formInput", "id" => "chkRecurring"), "value" => $checkRecurringBox, "db_name" => "currentperiod"), "repeatperiod" => array("type" => "custom", "display_name" => "Repeat Every", "sortorder" => $i++, "html" => "<input type='text' id='repeatPeriodAmount' class='textBox smallTextBox formInput' name='recurringamount' value='1'" . $disabledRecurring . "> <select name='recurringunit' class='textBox formInput' id='repeatPeriodUnit'" . $disabledRecurring . ">" . $recurOptions . "</select>", "validate" => array("validateCreateCampaignForm")));
$arrComponents['submit'] = array("type" => "submit", "value" => "Create Campaign", "attributes" => array("class" => "submitButton formSubmitButton"), "sortorder" => $i++);
$arrComponents = array_merge($arrComponents, $arrRecurringComponents);
Ejemplo n.º 9
0
function createOutput($entry_id, $pdf)
{
    $entry = GFAPI::get_entry($entry_id);
    $makers = array();
    if (strlen($entry['160.3']) > 0) {
        $makers[] = $entry['160.3'] . ' ' . $entry['160.6'];
    }
    if (strlen($entry['158.3']) > 0) {
        $makers[] = $entry['158.3'] . ' ' . $entry['158.6'];
    }
    if (strlen($entry['155.3']) > 0) {
        $makers[] = $entry['155.3'] . ' ' . $entry['155.6'];
    }
    if (strlen($entry['156.3']) > 0) {
        $makers[] = $entry['156.3'] . ' ' . $entry['156.6'];
    }
    if (strlen($entry['157.3']) > 0) {
        $makers[] = $entry['157.3'] . ' ' . $entry['157.6'];
    }
    if (strlen($entry['159.3']) > 0) {
        $makers[] = $entry['159.3'] . ' ' . $entry['159.6'];
    }
    if (strlen($entry['154.3']) > 0) {
        $makers[] = $entry['154.3'] . ' ' . $entry['154.6'];
    }
    //maker 1 bio
    $bio = filterText($entry['234']);
    $groupname = $entry['109'];
    $groupphoto = $entry['111'];
    $groupbio = filterText($entry['110']);
    $project_name = filterText($entry['151']);
    $project_photo = $entry['22'];
    $project_short = filterText($entry['16']);
    $project_website = $entry['27'];
    $project_video = $entry['32'];
    $project_title = filterText((string) $entry['151']);
    $project_title = preg_replace('/\\v+|\\\\[rn]/', '<br/>', $project_title);
    // Project ID
    $pdf->SetFont('Benton Sans', '', 12);
    $pdf->setTextColor(168, 170, 172);
    $pdf->SetXY(240, 20);
    $pdf->MultiCell(115, 10, $entry_id, 0, 'L');
    // Project Title
    $pdf->setTextColor(0);
    $pdf->SetXY(12, 75);
    //auto adjust the font so the text will fit
    $x = 65;
    // set the starting font size
    $pdf->SetFont('Benton Sans', 'B', 65);
    /* Cycle thru decreasing the font size until it's width is lower than the max width */
    while ($pdf->GetStringWidth(utf8_decode($project_title)) > 400) {
        $x--;
        // Decrease the variable which holds the font size
        $pdf->SetFont('Benton Sans', 'B', $x);
    }
    $lineHeight = $x * 0.2645833333333 * 1.3;
    /* Output the title at the required font size */
    $pdf->MultiCell(0, $lineHeight, $project_title, 0, 'L');
    //field 16 - short description
    //auto adjust the font so the text will fit
    $pdf->SetXY(145, 135);
    //auto adjust the font so the text will fit
    $sx = 30;
    // set the starting font size
    $pdf->SetFont('Benton Sans', '', $sx);
    // Cycle thru decreasing the font size until it's width is lower than the max width
    while ($pdf->GetStringWidth(utf8_decode($project_short)) > 1300) {
        $sx--;
        // Decrease the variable which holds the font size
        $pdf->SetFont('Benton Sans', '', $sx);
    }
    $lineHeight = $sx * 0.2645833333333 * 1.3;
    $pdf->MultiCell(125, $lineHeight, $project_short, 0, 'L');
    //field 22 - project photo
    $photo_extension = exif_imagetype($project_photo);
    if ($photo_extension) {
        //DEBUG:
        $project_photo = legacy_get_fit_remote_image_url($project_photo, 450, 450, 0);
        $pdf->Image($project_photo, 12, 135, null, null, image_type_to_extension($photo_extension, false));
    }
    //print white box to overlay long descriptions or photos
    /*$pdf->SetXY(10, 255); 
      $pdf->Cell(300,80,'',0,2,'L',true);*/
    //maker info, use a background of white to overlay any long images or text
    $pdf->setTextColor(0, 174, 239);
    $pdf->SetFont('Benton Sans', 'B', 48);
    $pdf->SetXY(10, 270);
    if (!empty($groupbio)) {
        //auto adjust the font so the text will fit
        $sx = 48;
        // set the starting font size
        // Cycle thru decreasing the font size until it's width is lower than the max width
        while ($pdf->GetStringWidth(utf8_decode($groupname)) > 240) {
            $sx--;
            // Decrease the variable which holds the font size
            $pdf->SetFont('Benton Sans', 'B', $sx);
        }
        $lineHeight = $sx * 0.2645833333333 * 1.3;
        $pdf->MultiCell(0, $lineHeight, $groupname, 0, 'L', true);
        $pdf->setTextColor(0);
        $pdf->SetFont('Benton Sans', '', 24);
        //auto adjust the font so the text will fit
        $x = 24;
        // set the starting font size
        /* Cycle thru decreasing the font size until it's width is lower than the max width */
        while ($pdf->GetStringWidth($groupbio) > 1200) {
            $x--;
            // Decrease the variable which holds the font size
            $pdf->SetFont('Benton Sans', '', $x);
        }
        $lineHeight = $x * 0.2645833333333 * 1.3;
        $pdf->MultiCell(0, $lineHeight, $groupbio, 0, 'L', true);
    } else {
        $makerList = implode(', ', $makers);
        $pdf->SetFont('Benton Sans', 'B', 48);
        //auto adjust the font so the text will fit
        $x = 48;
        // set the starting font size
        /* Cycle thru decreasing the font size until it's width is lower than the max width */
        while ($pdf->GetStringWidth(utf8_decode($makerList)) > 900) {
            $x--;
            // Decrease the variable which holds the font size
            $pdf->SetFont('Benton Sans', '', $x);
        }
        $lineHeight = $x * 0.2645833333333 * 1.3;
        $pdf->MultiCell(0, $lineHeight, $makerList, 0, 'L', true);
        //if size of makers is 1, then display maker bio
        if (sizeof($makers) == 1) {
            $pdf->setTextColor(0);
            $pdf->SetFont('Benton Sans', '', 24);
            //auto adjust the font so the text will fit
            $x = 24;
            // set the starting font size
            /* Cycle thru decreasing the font size until it's width is lower than the max width */
            while ($pdf->GetStringWidth($bio) > 900) {
                $x--;
                // Decrease the variable which holds the font size
                $pdf->SetFont('Benton Sans', '', $x);
            }
            $lineHeight = $x * 0.2645833333333 * 1.37;
            $pdf->MultiCell(0, $lineHeight, $bio, 0, 'L', true);
        }
    }
}
Ejemplo n.º 10
0
			<p align='center'>
				<input type='button' class='submitButton' value='Add Manager' id='btnAddManager'>
				
			</p>
		</div>
	</div>
</div>
<input type='hidden' id='newManagerID'>
<?php 
// Get auto-complete list
$arrMembers = array();
$result = $mysqli->query("SELECT " . $dbprefix . "members.member_id, " . $dbprefix . "members.username FROM " . $dbprefix . "members, " . $dbprefix . "ranks WHERE " . $dbprefix . "members.rank_id = " . $dbprefix . ".ranks.rank_id AND " . $dbprefix . "members.disabled = '0' ORDER BY " . $dbprefix . "ranks.ordernum DESC");
while ($row = $result->fetch_assoc()) {
    $member->select($row['member_id']);
    if ($member->hasAccess($tournamentConsoleCheck)) {
        $arrMembers[] = array("id" => $row['member_id'], "value" => filterText($row['username']));
    }
}
$member->select($memberInfo['member_id']);
$arrJSONMembers = json_encode($arrMembers);
?>

<script type='text/javascript'>
	$(document).ready(function() {

		var arrMemberList = <?php 
echo $arrJSONMembers;
?>
;
		
		$('#newManager').autocomplete({
Ejemplo n.º 11
0
             }
             $_SESSION['btStatCache'][] = array('statName' => $_POST['statName'], 'statType' => $_POST['statType'], 'calcOperation' => $_POST['calcOperation'], 'firstStat' => $_POST['firstStat'], 'secondStat' => $_POST['secondStat'], 'rounding' => $_POST['rounding'], 'hideStat' => $_POST['hideStat'], 'textInput' => $intInputText);
             echo "\n\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\t\t\$('#statList').hide();\n\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/admin/statcache/view.php', { }, function(data) {\n\t\t\t\t\t\t\t\t\$('#statList').html(data);\n\t\t\t\t\t\t\t\t\$('#statList').fadeOut(400);\n\t\t\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\t\t\$('#statList').fadeIn(400);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$('#addNewStatForm').dialog('close');\n\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</script>\n\t\t\t\t";
         } else {
             $_POST['submit'] = false;
         }
     }
     if (!$_POST['submit']) {
         $statOptions = "<option value='inputnum'>Input (Number)</option><option value='inputtext'>Input (Text)</option>";
         $onChange = "";
         if (is_array($_SESSION['btStatCache'])) {
             if (count($_SESSION['btStatCache']) > 1) {
                 $countStats = 0;
                 foreach ($_SESSION['btStatCache'] as $key => $statInfo) {
                     if ($statInfo['textInput'] == 0) {
                         $statIDOptions .= "<option value='" . $key . "'>" . filterText($statInfo['statName']) . "</option>";
                         $countStats++;
                     }
                 }
                 if ($countStats > 1) {
                     $statOptions .= "<option value='calculate'>Auto-Calculate</option>";
                 }
                 $onChange = "onchange='changeStatsForm()'";
             }
         }
         if ($dispError != "") {
             echo "\n\t\t\t\t<div class='errorDiv' style='width: 400px'>\n\t\t\t\t<strong>Unable to add new stat because the following errors occurred:</strong><br><br>\n\t\t\t\t{$dispError}\n\t\t\t\t</div>\n\t\t\t\t";
         }
         echo "\n\t\t\t\t<table align='center' border='0' cellspacing='2' cellpadding='2' width='400'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel'>Stat Name:</td>\n\t\t\t\t\t\t<td class='main'><input type='text' id='gpStatName' class='textBox' style='width: 150px'></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel'>Stat Type:</td>\n\t\t\t\t\t\t<td class='main'>\n\t\t\t\t\t\t\t<select id='gpStatType' class='textBox' " . $onChange . ">\n\t\t\t\t\t\t\t\t" . $statOptions . "\n\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel'>Hide Stat:</td>\n\t\t\t\t\t\t<td class='main'><input type='checkbox' id='gpHideStat' class='textBox' value='1' onmouseover=\"showToolTip('Hide Stats to create more complex auto-calculated stats... Or if you just don\\'t want this stat to be shown on the site.')\" onmouseout='hideToolTip()'></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel'><div id='inputNumericRoundingTitle'>Rounding:</div></td>\n\t\t\t\t\t\t<td class='main'><div id='inputNumericRoundingTxtBox'><input type='text' id='gpRoundingInputNumeric' class='textBox' style='width: 30px' value='2'> decimals</div></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='main' colspan='2'>\n\t\t\t\t\t\t\t<div id='gpFormFormula' style='display: none'>\n\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t<b>Formula</b>\n\t\t\t\t\t\t\t\t<div class='dottedLine' style='width: 90%; padding-top: 3px'></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel'><div style='display: none; padding-left: 5px' id='gpFormFirstStat'>First Stat:</div></td>\n\t\t\t\t\t\t<td class='main'><div style='display: none' id='gpFirstStatIDInput'><select id='gpFirstStatID' class='textBox'>" . $statIDOptions . "</select></div></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel'><div style='display: none; padding-left: 5px' id='gpFormCalcOp'>Operation:</div></td>\n\t\t\t\t\t\t<td class='main'><div style='display: none' id='gpCalcOpInput'><select id='gpCalcOp' class='textBox'><option value='add'>Plus</option><option value='sub'>Minus</option><option value='mul'>Multiplied By</option><option value='div'>Divided By</option></select></div></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel'><div style='display: none; padding-left: 5px' id='gpFormSecondStat'>Second Stat:</div></td>\n\t\t\t\t\t\t<td class='main'><div style='display: none' id='gpSecondStatIDInput'><select id='gpSecondStatID' class='textBox'>" . $statIDOptions . "</select></div></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel'><div style='display: none; padding-left: 5px' id='gpFormRounding'>Rounding:</div></td>\n\t\t\t\t\t\t<td class='main'><div style='display: none' id='gpRoundingInput'><input type='text' id='gpRounding' class='textBox' style='width: 30px' value='2'> decimals</div></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\tfunction changeStatsForm() {\n\t\t\t\t\t\n\t\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(\$('#gpStatType').val() == 'calculate') {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$('#gpFormFormula').show();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$('#gpFormFirstStat').show();\n\t\t\t\t\t\t\t\t\$('#gpFirstStatIDInput').show();\n\t\t\t\t\t\t\t\t\$('#gpFirstStatID').show();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$('#gpFormCalcOp').show();\n\t\t\t\t\t\t\t\t\$('#gpCalcOpInput').show();\n\t\t\t\t\t\t\t\t\$('#gpCalOp').show();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$('#gpFormSecondStat').show();\n\t\t\t\t\t\t\t\t\$('#gpSecondStatIDInput').show();\n\t\t\t\t\t\t\t\t\$('#gpSecondStatID').show();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$('#gpFormRounding').show();\n\t\t\t\t\t\t\t\t\$('#gpRoundingInput').show();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$('#gpFormFormula').hide();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$('#gpFormFirstStat').hide();\n\t\t\t\t\t\t\t\t\$('#gpFirstStatIDInput').hide();\n\t\t\t\t\t\t\t\t\$('#gpFirstStatID').hide();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$('#gpFormCalcOp').hide();\n\t\t\t\t\t\t\t\t\$('#gpCalcOpInput').hide();\n\t\t\t\t\t\t\t\t\$('#gpCalOp').hide();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$('#gpFormSecondStat').hide();\n\t\t\t\t\t\t\t\t\$('#gpSecondStatIDInput').hide();\n\t\t\t\t\t\t\t\t\$('#gpSecondStatID').hide();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$('#gpFormRounding').hide();\n\t\t\t\t\t\t\t\t\$('#gpRoundingInput').hide();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(\$('#gpStatType').val() == \"inputnum\") {\n\t\t\t\t\t\t\t\t\$('#inputNumericRoundingTitle').show();\n\t\t\t\t\t\t\t\t\$('#inputNumericRoundingTxtBox').show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\$('#inputNumericRoundingTitle').hide();\n\t\t\t\t\t\t\t\t\$('#inputNumericRoundingTxtBox').hide();\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\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\t});\n\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t\t\n\t\t\t";
     }
 } else {
Ejemplo n.º 12
0
             if (!in_array($newPlayer, $arrPlayers)) {
                 // Prevent multiple entries of same person
                 $tournamentObj->objPlayer->addNew(array("displayname", "tournament_id"), array($newPlayer, $tID));
             }
         }
         if ($tournamentInfo['playersperteam'] == 1) {
             $arrUnfilledTeams = $tournamentObj->getUnfilledTeams();
             if (count($arrUnfilledTeams) > 0) {
                 $newTeam = $arrUnfilledTeams[0];
                 $tournamentObj->objPlayer->update(array("team_id"), array($newTeam));
             }
         }
     }
     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\$('#newplayers').val('');\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t";
 } else {
     $filterPlayers = filterText($_POST['players']);
     echo "\n\t\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\$('#newplayers').val('" . $filterPlayers . "');\n\t\t\t\t\t\n\t\t\t\t\t\$('#errorMessage').dialog({\n\t\t\t\t\t\n\t\t\t\t\t\ttitle: 'Add Players - Error!',\n\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t'OK': function() {\n\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t}\n\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\n\t\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t</script>\n\t\t\n\t\t";
 }
 $arrPlayers = $tournamentObj->getPlayers();
 $counter = 1;
 foreach ($arrPlayers as $playerID) {
     $tPlayerID = $tournamentObj->getTournamentPlayerID($playerID);
     $tournamentObj->objPlayer->select($tPlayerID);
     $playerInfo = $tournamentObj->objPlayer->get_info();
     if ($member->select($playerID)) {
         $dispPlayer = $member->get_info_filtered("username");
     } else {
         $dispPlayer = $playerID;
     }
     $teamID = $playerInfo['team_id'];
     $arrSortPlayers[$teamID] = strtolower($dispPlayer);
Ejemplo n.º 13
0
    if (!$member->hasAccess($consoleObj)) {
        exit;
    }
}
include_once $prevFolder . "classes/btupload.php";
include_once $prevFolder . "classes/medal.php";
$cID = $_GET['cID'];
$medalObj = new Medal($mysqli);
if (!$medalObj->select($_GET['mID'])) {
    die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "members';</script>");
}
$medalInfo = $medalObj->get_info_filtered();
$breadcrumbObj->popCrumb();
$breadcrumbObj->addCrumb("Manage Medals", $MAIN_ROOT . "members/console.php?cID=" . $cID);
$breadcrumbObj->addCrumb($medalInfo['name']);
echo "\n\n<script type='text/javascript'>\n\$(document).ready(function() {\n\$('#breadCrumb').html(\"" . $breadcrumbObj->getBreadcrumb() . "\");\n});\n</script>\n";
$arrMedals = $medalObj->get_entries(array(), "ordernum DESC");
$medalOptions = array();
foreach ($arrMedals as $eachMedalInfo) {
    $medalName = filterText($eachMedalInfo['name']);
    $medalOptions[$eachMedalInfo['medal_id']] = $medalName;
}
if (count($medalOptions) == 0) {
    $medalOptions['first'] = "(first medal)";
}
$medalOrder = $medalObj->findBeforeAfter();
$medalInfo['imageurl'] = substr($medalInfo['imageurl'], strlen($MAIN_ROOT));
$i = 1;
$arrComponents = array("generalinfo" => array("type" => "section", "options" => array("section_title" => "General Information:"), "sortorder" => $i++), "medalname" => array("type" => "text", "attributes" => array("class" => "textBox formInput"), "sortorder" => $i++, "db_name" => "name", "display_name" => "Medal Name", "validate" => array("NOT_BLANK"), "value" => $medalInfo['name']), "medalimage" => array("type" => "file", "attributes" => array("class" => "textBox", "style" => "width: 100%"), "db_name" => "imageurl", "sortorder" => $i++, "options" => array("file_types" => array(".gif", ".png", ".jpg", ".bmp"), "file_prefix" => "medal_", "save_loc" => "../images/medals/", "ext_length" => 4, "append_db_value" => "images/medals/"), "display_name" => "Medal Image", "value" => $medalInfo['imageurl']), "medalimagewidth" => array("type" => "text", "attributes" => array("class" => "textBox formInput", "style" => "width: 5%"), "html" => "<div class='formInput' style='vertical-align: bottom; padding-left: 5px; padding-bottom: 2px'><i>px</i></div>", "tooltip" => "Set the Image Width to the width that you would like the Medal Image to be displayed on your website.", "db_name" => "imagewidth", "validate" => array("POSITIVE_NUMBER"), "display_name" => "Image Width", "sortorder" => $i++, "value" => $medalInfo['imagewidth']), "medalimageheight" => array("type" => "text", "attributes" => array("class" => "textBox formInput", "style" => "width: 5%"), "html" => "<div class='formInput' style='vertical-align: bottom; padding-left: 5px; padding-bottom: 2px'><i>px</i></div>", "tooltip" => "Set the Image Height to the height that you would like the Medal Image to be displayed on your website.", "db_name" => "imageheight", "validate" => array("POSITIVE_NUMBER"), "display_name" => "Image Height", "sortorder" => $i++, "value" => $medalInfo['imageheight']), "medaldesc" => array("type" => "textarea", "attributes" => array("class" => "textBox formInput", "rows" => 5, "cols" => 40), "db_name" => "description", "sortorder" => $i++, "display_name" => "Description", "value" => $medalInfo['description']), "displayorder" => array("type" => "beforeafter", "attributes" => array("class" => "textBox"), "display_name" => "Display Order", "options" => $medalOptions, "db_name" => "ordernum", "sortorder" => $i++, "validate" => array(array("name" => "VALIDATE_ORDER", "orderObject" => $medalObj, "select_back" => $medalInfo['medal_id'])), "value" => $medalInfo['medal_id'], "before_after_value" => $medalOrder[0], "after_selected" => $medalOrder[1]), "autoawardinfo" => array("type" => "section", "options" => array("section_title" => "Auto-Award Information:", "section_description" => "Set these options if you want a member to be automatically awarded for being in the clan a certain number of days or recruiting a certain amount of members. Leave blank or 0 to disable this option."), "sortorder" => $i++), "autodays" => array("type" => "text", "attributes" => array("class" => "textBox formInput", "style" => "width: 5%"), "display_name" => "Auto-Days", "sortorder" => $i++, "db_name" => "autodays", "value" => $medalInfo['autodays']), "autorecruits" => array("type" => "text", "attributes" => array("class" => "textBox formInput", "style" => "width: 5%"), "display_name" => "Auto-Recruits", "sortorder" => $i++, "db_name" => "autorecruits", "value" => $medalInfo['autorecruits']), "submit" => array("type" => "submit", "attributes" => array("class" => "submitButton formSubmitButton"), "value" => "Edit Medal", "sortorder" => $i++));
$setupFormArgs = array("name" => "console-" . $cID, "components" => $arrComponents, "description" => "Fill out the form below to edit the selected medal.<br><br><b><u>NOTE:</u></b> When setting the Medal Image, if both the File and URL are filled out, the File will be used.", "saveObject" => $medalObj, "saveMessage" => "Successfully Saved Medal: <b>" . filterText($_POST['medalname']) . "</b>!", "saveType" => "update", "attributes" => array("action" => $MAIN_ROOT . "members/console.php?cID=" . $cID . "&mID=" . $medalInfo['medal_id'] . "&action=edit", "method" => "post"), "beforeAfter" => true);
Ejemplo n.º 14
0
                                    <input type="text" name="name" id="fName" value="<?php 
echo filterText(Input::post('name'));
?>
" class="inputText">
                                </div>
                                <div class="formPart">
                                    <label for="fEmail">Your email</label>
                                    <input type="text" name="email" id="fEmail" value="<?php 
echo filterText(Input::post('email'));
?>
" class="inputText">
                                </div>
                                <div class="formPart">
                                    <label for="fMessage">Your message</label>
                                    <textarea name="message" id="fMessage" class="inputTextArea"><?php 
echo filterText(Input::post('message'));
?>
</textarea>
                                </div>
                                <div class="formPart">
                                    <label for="fCaptcha">Captcha</label>
                                    <img src="<?php 
echo baseURL('captcha');
?>
" alt="Captcha"> &nbsp; <input type="text" name="captcha" id="fCaptcha" value="" class="inputCaptcha">
                                </div>
                                <div class="formPart">
                                    <button class="inputSubmit">Send</button>
                                </div>
                            </form>
                        </div>
Ejemplo n.º 15
0
    }
}
if (!$_POST['submit']) {
    $_SESSION['btEventID'] = $eventInfo['event_id'];
    if ($countErrors == 0) {
        $_SESSION['btInviteList'] = array();
    } else {
        $_SESSION['btInviteList'] = filterArray($_SESSION['btInviteList']);
    }
    $arrInvitedMembers = $eventObj->getInvitedMembers(true);
    $arrInvitedMembers = array_merge($arrInvitedMembers, $_SESSION['btInviteList']);
    $sqlInvitedMembers = "('" . implode("','", $arrInvitedMembers) . "')";
    $memberoptions = "<option value=''>Select</option>";
    $result = $mysqli->query("SELECT m.username,m.member_id,r.ordernum,r.name FROM " . $dbprefix . "members m, " . $dbprefix . "ranks r WHERE m.rank_id = r.rank_id AND m.member_id NOT IN " . $sqlInvitedMembers . " AND m.disabled = '0' AND m.rank_id != '1' ORDER BY r.ordernum DESC");
    while ($row = $result->fetch_assoc()) {
        $memberoptions .= "<option value='" . $row['member_id'] . "'>" . filterText($row['name']) . " " . filterText($row['username']) . "</option>";
    }
    $showInviteList = "<p align='center'><i>- Empty -</i></p>";
    if (count($_SESSION['btInviteList']) > 0) {
        $showInviteList = "";
        foreach ($_SESSION['btInviteList'] as $key => $value) {
            if ($objInviteMember->select($value)) {
                $showInviteList .= "<div class='mttPlayerSlot' style='width: 95%'>" . $objInviteMember->get_info_filtered("username") . "<div class='mttDeletePlayer'><a href='javascript:void(0)' onclick=\"removeMember('" . $key . "')\">X</a></div></div>";
            }
        }
    }
    echo "\n\t\n\t\t<form action='" . $MAIN_ROOT . "members/events/manage.php?eID=" . $eventInfo['event_id'] . "&pID=InviteMembers' method='post'>\n\t\t\t<div class='formDiv'>\n\t\t\t\n\t\t\t";
    if ($dispError != "") {
        echo "\n\t\t<div class='errorDiv'>\n\t\t<strong>Unable to send all event invitations because the following errors occurred:</strong><br><br>\n\t\t{$dispError}\n\t\t</div>\n\t\t";
    }
    echo "\n\t\t\t\n\t\t\t\tUse the form below to send event invitations.<br><br>\n\t\t\t\t<table class='formTable'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='main' valign='top' style='width: 15%'><b>Member: <a href='javascript:void(0)' onmouseover=\"showToolTip('You may type in a member\\'s username or select it from the dropdown.  If both the dropdown and text box are filled, the dropdown selection will be used.')\" onmouseout='hideToolTip()'>(?)</a></b></td>\n\t\t\t\t\t\t<td class='main' valign='top' style='width: 40%'>\n\t\t\t\t\t\t\t<i>Type:</i><br><input type='text' id='typeMemberName' class='textBox'><br><p style='padding-left: 20px'><b><i>OR</i></b></p>\n\t\t\t\t\t\t\t<i>Select:</i><br>\n\t\t\t\t\t\t\t<select id='selectMemberID' class='textBox'>" . $memberoptions . "</select><br><br>\n\t\t\t\t\t\t\t<p align='center'><input type='button' id='btnAddMember' class='submitButton' style='width: 135px' value='Add Member'></p>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td class='main' valign='top' style='width: 45%'>\n\t\t\t\t\t\t\t<b>Invite List:</b>\n\t\t\t\t\t\t\t<div id='loadingSpiral' class='loadingSpiral'>\n\t\t\t\t\t\t\t\t<p align='center'>\n\t\t\t\t\t\t\t\t\t<img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/loading-spiral.gif'><br>Loading\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div id='inviteListDiv'>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t" . $showInviteList . "\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td colspan='3' align='center'>\n\t\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\t\t<input type='submit' name='submit' value='Send Invitations' class='submitButton' style='width: 125px'>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t\n\t\t\t</div>\n\t\t\t<input type='hidden' id='addMemberID' value=''>\n\t\t</form>\n\t\t\n\t\t<script type='text/javascript'>\n\t\t\n\t\t\t\$(document).ready(function() {\n\t\t\t\n\t\t\t\tvar arrMemberList = 'include/invitemember_notinvitedlist.php';\n\t\t\t\n\t\t\t\t\$('#typeMemberName').autocomplete({\n\t\t\t\t\tsource: arrMemberList,\n\t\t\t\t\tminLength: 3,\n\t\t\t\t\tselect: function(event, ui) {\n\t\t\t\t\t\n\t\t\t\t\t\t\$('#addMemberID').val(ui.item.id);\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\$('#btnAddMember').click(function() {\n\t\t\t\t\n\t\t\t\t\tvar intMemberID = \"\";\n\t\t\t\t\t\n\t\t\t\t\tif(\$('#selectMemberID').val() != \"\") {\t\t\t\t\t\n\t\t\t\t\t\tintMemberID = \$('#selectMemberID').val();\n\t\t\t\t\t}\n\t\t\t\t\telse if(\$('#addMemberID').val() != \"\") {\n\t\t\t\t\t\tintMemberID = \$('#addMemberID').val();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tintMemberID = \$('#typeMemberName').val();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(intMemberID != \"\") {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\t\$('#inviteListDiv').fadeOut(250);\n\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/events/include/invitemember_cache.php', { action: 'add', memberID: intMemberID }, function(data) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$('#inviteListDiv').html(data);\n\t\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\t\$('#inviteListDiv').fadeIn(250);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$('#typeMemberName').val('');\n\t\t\t\t\t\t\t\$('#addMemberID').val('');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$('#selectMemberID').val('');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t});\t\t\t\t\n\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t\tfunction removeMember(intInviteKey) {\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\n\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\$('#inviteListDiv').fadeOut(250);\n\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/events/include/invitemember_cache.php', { action: 'delete', memberID: intInviteKey }, function(data) {\n\t\t\t\t\t\t\$('#inviteListDiv').html(data);\n\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\$('#inviteListDiv').fadeIn(250);\n\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t});\n\t\t\t}\n\t\t\n\t\t</script>\n\t\t\n\t";
Ejemplo n.º 16
0
    $arrQuery['rankcategory']['orderby'] = " ORDER BY ordernum DESC";
    $arrQuery['rankcategory']['id'] = "rankcategory_id";
    $arrQuery['rankcategory']['append'] = " - Category";
    $arrQuery['rank']['query'] = "SELECT * FROM " . $dbprefix . "ranks WHERE name LIKE '" . $searchTerm . "%' AND rank_id != '1' AND rank_id NOT IN ";
    $arrQuery['rank']['orderby'] = " ORDER BY ordernum DESC";
    $arrQuery['rank']['id'] = "rank_id";
    $arrQuery['rank']['append'] = " - Rank";
    $arrQuery['squad']['query'] = "SELECT " . $dbprefix . "squads.* FROM " . $dbprefix . "squads, " . $dbprefix . "squads_members WHERE " . $dbprefix . "squads.squad_id = " . $dbprefix . "squads_members.squad_id AND " . $dbprefix . "squads_members.member_id = '" . $memberInfo['member_id'] . "' AND " . $dbprefix . "squads.name LIKE '" . $searchTerm . "%' AND " . $dbprefix . "squads.squad_id NOT IN ";
    $arrQuery['squad']['orderby'] = " ORDER BY " . $dbprefix . "squads.name DESC";
    $arrQuery['squad']['id'] = "squad_id";
    $arrQuery['squad']['append'] = " Members";
    $arrQuery['tournament']['query'] = "SELECT * FROM " . $dbprefix . "tournaments WHERE member_id = '" . $memberInfo['member_id'] . "' AND name LIKE '" . $searchTerm . "%' AND tournament_id NOT IN ";
    $arrQuery['tournament']['orderby'] = " ORDER BY startdate DESC";
    $arrQuery['tournament']['id'] = "tournament_id";
    $arrQuery['tournament']['append'] = " Players";
    foreach ($arrQuery as $key => $arr) {
        $filterList = "('')";
        $checkFilterList = implode("", $_SESSION['btComposeList'][$pmSessionID][$key]);
        if (is_numeric($checkFilterList)) {
            $filterList = "('" . implode("','", $_SESSION['btComposeList'][$pmSessionID][$key]) . "')";
        }
        $sessionPrefix = $key . "_";
        $arr['query'] .= $filterList;
        //echo $arr['query'].$arr['orderby'];
        $result = $mysqli->query($arr['query'] . $arr['orderby']);
        while ($row = $result->fetch_assoc()) {
            $arrComposeList[] = array("id" => $sessionPrefix . $row[$arr['id']], "value" => filterText($row['name']) . $arr['append']);
        }
    }
    echo json_encode($arrComposeList);
}
Ejemplo n.º 17
0
            $objMember->select($commentInfo['member_id']);
            $memInfo = $objMember->get_info_filtered();
            if ($memInfo['profilepic'] == "") {
                $dispProfilePic = $MAIN_ROOT . "themes/" . $THEME . "/images/defaultprofile.png";
            } else {
                $dispProfilePic = $MAIN_ROOT . $memInfo['profilepic'];
            }
            $dispDeleteMessage = "";
            if ($eventObj->memberHasAccess($memberInfo['member_id'], "managemessages")) {
                $dispDeleteMessage = " - <a href='javascript:void(0)' onclick=\"deleteMessage('" . $commentID . "', 'c')\">Delete</a>";
            }
            echo "\n\n\t\t\t<li class='dottedLine'>\n\t\t\t\t<div class='profilePic'><img src='" . $dispProfilePic . "'></div>\n\t\t\t\t<div class='main messageDiv'><b>" . $objMember->getMemberLink() . "</b><br>\n\t\t\t\t\t" . nl2br(parseBBCode($commentInfo['comment'])) . "<br>\n\t\t\t\t\t<div class='tinyFont' style='margin-top: 5px'>" . getPreciseTime($commentInfo['dateposted']) . $dispDeleteMessage . "</div>\n\t\t\t\t</div>\n\t\t\t\t<div style='clear: both'></div>\n\t\t\t</li>\n\n\t\t\t";
        }
    }
    echo "\n\t</ul>\n\t</li>\n\t";
    if ($eventObj->memberHasAccess($memberInfo['member_id'], "postmessages")) {
        $tempTextAreaID = "txtComment_" . $row['eventmessage_id'];
        $dispComment = "";
        if ($_POST['commentBox'][$tempTextAreaID] != "") {
            $dispComment = filterText($_POST['commentBox'][$tempTextAreaID]);
            $focusID = "#" . $tempTextAreaID;
        }
        echo "\n\t\t<li class='dashedLine'>\n\t\tComment:<br>\n\t\n\t\t<textarea id='txtComment_" . $row['eventmessage_id'] . "' class='textBox'>" . $dispComment . "</textarea>\n\t\t<p align='right' style='margin-top: 2px; margin-right: 3px;'><input type='button' onclick=\"postComment('" . $row['eventmessage_id'] . "')\" class='submitButton' value='Comment' style='width: 80px'></p>\n\t\n\t\t</li>\n\t\t";
    } else {
        echo "<li class='dashedLine'></li>";
    }
}
echo "</ul>";
if ($focusID != "") {
    echo "\n\t\t<script type='text/javascript'>\n\t\t\n\t\t\t\$(document).ready(function() {\n\t\t\t\n\t\t\t\ttempVal = \$('" . $focusID . "').val();\n\t\t\t\t\$('" . $focusID . "').val('');\n\t\t\t\t\$('" . $focusID . "').focus();\n\t\t\t\t\$('" . $focusID . "').val(tempVal);\n\t\t\t\n\t\t\t});\n\t\t\n\t\t</script>\n\t";
}
Ejemplo n.º 18
0
            $_POST['submit'] = false;
            $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Unable to add new rank.  Please try again.<br>";
        }
    }
}
if (!isset($_POST['submit']) || !$_POST['submit']) {
    $rankCategories = $mysqli->query("SELECT * FROM " . $dbprefix . "rankcategory ORDER BY ordernum");
    $rankCatOptions = "";
    while ($arrRankCat = $rankCategories->fetch_assoc()) {
        $rankCatName = filterText($arrRankCat['name']);
        $rankCatOptions .= "<option value='" . $arrRankCat['rankcategory_id'] . "'>" . $arrRankCat['name'] . "</option>";
    }
    $getRanks = $mysqli->query("SELECT * FROM " . $dbprefix . "ranks WHERE rank_id != '1' ORDER BY ordernum");
    $rankOptions = "";
    while ($arrRanks = $getRanks->fetch_assoc()) {
        $rankName = filterText($arrRanks['name']);
        $rankOptions .= "<option value='" . $arrRanks['rank_id'] . "'>" . $rankName . "</option>";
    }
    $firstRankOption = "";
    if ($rankOptions == "") {
        $firstRankOption = "<option value='1'>(first rank)</option>";
    }
    echo "\n\t\n\t<form action='console.php?cID={$cID}' method='post' enctype='multipart/form-data'>\n\t\t<div class='formDiv'>\n\t\t\n\t";
    if (isset($dispError) && $dispError != "") {
        echo "\n\t\t<div class='errorDiv'>\n\t\t<strong>Unable to add new rank because the following errors occurred:</strong><br><br>\n\t\t{$dispError}\n\t\t</div>\n\t\t";
    }
    echo "\n\t\n\t<script type='text/javascript'>\n\t\t\$(document).ready(function() {\n\t\t\t\$('#rankcolor').miniColors({\n\t\t\t\tchange: function(hex, rgb) { }\n\t\t\t});\n\t\t});\n\t</script>\n\t\tFill out the form below to add a new ranking.<br><br>\n\t\t<b><u>NOTE:</u></b> When adding a Rank Image, if both the File and URL are filled out, the File will be used.\n\t\t\n\t\t\n\t\t<table class='formTable'>\n\t\t\t<tr>\n\t\t\t\t<td colspan='2' class='main'>\n\t\t\t\t\t<b>General Information</b>\n\t\t\t\t\t<div class='dottedLine' style='width: 90%; padding-top: 3px'></div>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='formLabel'>Rank Name:</td>\n\t\t\t\t<td class='main'><input type='text' name='rankname' value='" . (isset($_POST['rankname']) ? $_POST['rankname'] : "") . "' class='textBox' style='width: 250px'></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='formLabel' valign='top'>Rank Image:</td>\n\t\t\t\t<td class='main'>\n\t\t\t\t\tFile:<br><input type='file' name='rankimagefile' class='textBox' style='width: 250px; border: 0px'><br>\n\t\t\t\t\t<span style='font-size: 10px'>File Types: .jpg, .gif, .png, .bmp | <a href='javascript:void(0)' onmouseover=\"showToolTip('The file size upload limit is controlled by your PHP settings in the php.ini file.')\" onmouseout='hideToolTip()'>File Size: " . ini_get("upload_max_filesize") . "B or less</a></span>\n\t\t\t\t\t<p><b><i>OR</i></b></p>\n\t\t\t\t\tURL:<br><input type='text' name='rankimageurl' value='" . (isset($_POST['rankimageurl']) ? $_POST['rankimageurl'] : "") . "' class='textBox' style='width: 250px'>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='formLabel'>Image Width: <a href='javascript:void(0)' onmouseover=\"showToolTip('Set the Image Width to the width that you would like the Rank Image to be displayed on your website.')\" onmouseout='hideToolTip()'>(?)</a></td>\n\t\t\t\t<td class='main'>\n\t\t\t\t\t<input type='text' name='rankimagewidth' value='" . (isset($_POST['rankimagewidth']) ? $_POST['rankimagewidth'] : "") . "' class='textBox' style='width: 40px'> <i>px</i>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='formLabel'>Image Height: <a href='javascript:void(0)' onmouseover=\"showToolTip('Set the Image Height to the height that you would like the Rank Image to be displayed on your website.')\" onmouseout='hideToolTip()'>(?)</a></td>\n\t\t\t\t<td class='main'>\n\t\t\t\t\t<input type='text' name='rankimageheight' value='" . (isset($_POST['rankimageheight']) ? $_POST['rankimageheight'] : "") . "' class='textBox' style='width: 40px'> <i>px</i>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='formLabel' valign='top'>Description:</td>\n\t\t\t\t<td class='main'><textarea class='textBox' name='rankdesc' rows='5' cols='40'>" . (isset($_POST['rankdesc']) ? $_POST['rankdesc'] : "") . "</textarea></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='formLabel'>Rank Category:</td>\n\t\t\t\t<td class='main'><select name='rankcat' class='textBox'>{$rankCatOptions}</select></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='formLabel' valign='top'>Rank Order:</td>\n\t\t\t\t<td class='main'><select name='beforeafter' class='textBox'><option value='before'>Before</option><option value='after'>After</option></select><br><select name='rankorder' class='textBox'>{$firstRankOption}.{$rankOptions}</select></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='formLabel'>Color:</td>\n\t\t\t\t<td class='main'><input type='text' id='rankcolor' name='rankcolor' value='" . (isset($_POST['rankcolor']) ? $_POST['rankcolor'] : "") . "' class='textBox' style='width: 70px'></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='formLabel'>Hide Rank:</td>\n\t\t\t\t<td class='main'><input type='checkbox' name='hiderank' value='1' class='textBox' onmouseover=\"showToolTip('If you hide a rank, it will also hide members of this rank.')\" onmouseout='hideToolTip()'></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan='2' class='main'><br>\n\t\t\t\t\t<b>Promotion Options</b>\n\t\t\t\t\t<div class='dottedLine' style='width: 90%; padding-top: 3px; margin-bottom: 5px'></div>\n\t\t\t\t\t<div style='padding-left: 3px; padding-bottom: 15px'>This option determines the maximum rank that a member can promote to, award/revoke medals, disable/undisable members.</div>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='formLabel'><div style='padding-left: 3px'>Maximum Rank:</div></td>\n\t\t\t\t<td class='main'><select name='promoterank' class='textBox'><option value='0'>(Can't Promote)</option><option value='-1'>(this rank)</option>{$rankOptions}</select></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan='2' class='main'><br><br>\n\t\t\t\t<div style='padding-left: 3px; padding-right: 35px; padding-bottom: 15px'>Set the auto-days option if you want a member to be automatically promoted to this rank after a certain number of days in the clan.  Leave blank or 0 to disable this option.</div>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='formLabel'><div style='padding-left: 3px'>Auto-Days:</div></td>\n\t\t\t\t<td class='main'><input type='text' class='textBox' name='autodays' value='" . (isset($_POST['autodays']) ? $_POST['autodays'] : "") . "' style='width: 40px'></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan='2' class='main'><br><br>\n\t\t\t\t<div style='padding-left: 3px; padding-right: 35px; padding-bottom: 15px'>The auto-disable option allows you to create ranks for trial members.  Set the number of days you want a member to be this rank before being auto-disabled.  Leave blank or 0 to disable this option.</div>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='formLabel'><div style='padding-left: 3px'>Auto-Disable:</div></td>\n\t\t\t\t<td class='main'><input type='text' class='textBox' name='autodisable' value='" . (isset($_POST['autodisable']) ? $_POST['autodisable'] : "") . "' style='width: 40px'></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan='2' class='main'><br>\n\t\t\t\t\t<b>Console Options</b>\n\t\t\t\t\t<div class='dottedLine' style='width: 90%; padding-top: 3px; margin-bottom: 5px'></div>\n\t\t\t\t\t<p align='center'>\n\t\t\t\t\t\t<div class='main' style='margin-left: 15px; overflow-y: auto; width: 75%; height: 300px'>\n\t\t\t\t\t\t\t";
    $consoleCategories = $mysqli->query("SELECT * FROM " . $dbprefix . "consolecategory ORDER BY ordernum DESC");
    while ($arrConsoleCats = $consoleCategories->fetch_assoc()) {
        $tempNum = $arrConsoleCats['consolecategory_id'];
        $arrFormatOptions[$tempNum] = array();
Ejemplo n.º 19
0
echo "\n<table class='formTable' style='border-spacing: 0px; margin-top: 0px'>\n\t<tr><td colspan='5' class='dottedLine'></td></tr>\n";
$counter = 0;
$x = 1;
$eventObj->objEventPosition->setCategoryKeyValue($eventInfo['event_id']);
$intHighestOrder = $eventObj->objEventPosition->getHighestSortNum();
$result = $mysqli->query("SELECT * FROM " . $dbprefix . "eventpositions WHERE event_id = '" . $eventInfo['event_id'] . "' ORDER BY sortnum");
while ($row = $result->fetch_assoc()) {
    if ($counter == 1) {
        $addCSS = " alternateBGColor";
        $counter = 0;
    } else {
        $addCSS = "";
        $counter = 1;
    }
    if ($x == 1) {
        $dispUpArrow = "<img src='" . $MAIN_ROOT . "images/transparent.png' width='24' height'24'>";
    } else {
        $dispUpArrow = "<a href='javascript:void(0)' onclick=\"movePosition('up', '" . $row['position_id'] . "')\"><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/uparrow.png' width='24' height='24' title='Move Up'></a>";
    }
    if ($x == $intHighestOrder) {
        $dispDownArrow = "<img src='" . $MAIN_ROOT . "images/transparent.png' width='24' height'24'>";
    } else {
        $dispDownArrow = "<a href='javascript:void(0)' onclick=\"movePosition('down', '" . $row['position_id'] . "')\"><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/downarrow.png' width='24' height='24' title='Move Down'></a>";
    }
    echo "\n\t<tr>\n\t\t<td class='dottedLine" . $addCSS . "' width=\"76%\">&nbsp;&nbsp;<span class='main'><b><a href='" . $MAIN_ROOT . "members/events/manage.php?eID=" . $eventInfo['event_id'] . "&pID=ManagePositions&posID=" . $row['position_id'] . "&action=edit'>" . filterText($row['name']) . "</a></b></td>\n\t\t\n\t\t<td align='center' class='dottedLine" . $addCSS . "' width=\"6%\">" . $dispUpArrow . "</td>\n\t\t<td align='center' class='dottedLine" . $addCSS . "' width=\"6%\">" . $dispDownArrow . "</td>\n\t\t<td align='center' class='dottedLine" . $addCSS . "' width=\"6%\"><a href='" . $MAIN_ROOT . "members/events/manage.php?eID=" . $eventInfo['event_id'] . "&pID=ManagePositions&posID=" . $row['position_id'] . "&action=edit''><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/edit.png' width='24' height='24' title='Edit Position Information'></a></td>\n\t\t<td align='center' class='dottedLine" . $addCSS . "' width=\"6%\"><a href='javascript:void(0)' onclick=\"deletePosition('" . $row['position_id'] . "')\"><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/delete.png' width='24' height='24' title='Delete Position'></a></td>\n\t</tr>\n\t";
    $x++;
}
echo "</table>";
if ($result->num_rows == 0) {
    echo "\n\t\n\t\t<div class='shadedBox' style='width: 40%; margin: 20px auto'>\n\t\t\t<p class='main' align='center'>\n\t\t\t\t<i>There are currently no event positions!<br><br>Click <a href='" . $MAIN_ROOT . "members/events/manage.php?eID=" . $_GET['eID'] . "&pID=AddPosition'>here</a> to add a position.</i>\n\t\t\t</p>\n\t\t</div>\n\t\n\t";
}
Ejemplo n.º 20
0
     }
     unset($_SESSION['btComposeList'][$pmSessionID]);
 }
 if (!$_POST['submit']) {
     $pmSessionID = uniqid();
     $composeListJS = "";
     $_SESSION['btComposeList'][$pmSessionID]['member'] = array();
     $_SESSION['btComposeList'][$pmSessionID]['rankcategory'] = array();
     $_SESSION['btComposeList'][$pmSessionID]['rank'] = array();
     $_SESSION['btComposeList'][$pmSessionID]['squad'] = array();
     $_SESSION['btComposeList'][$pmSessionID]['tournament'] = array();
     $_SESSION['btComposeList'][$pmSessionID]['exptime'] = time() + 3600;
     if (isset($_GET['threadID']) && $pmObj->select($_GET['threadID']) && isset($_GET['replyID']) && $pmObj->select($_GET['replyID'])) {
         $replyPMInfo = $pmObj->get_info();
         $arrReceivers = $pmObj->getAssociateIDs();
         $_POST['subject'] = "RE: " . filterText($replyPMInfo['subject']);
         if ($replyPMInfo['receiver_id'] != 0 && ($replyPMInfo['sender_id'] == $memberInfo['member_id'] || $replyPMInfo['receiver_id'] == $memberInfo['member_id'])) {
             $member->select($replyPMInfo['sender_id']);
             $member->objRank->select($member->get_info("rank_id"));
             $_SESSION['btComposeList'][$pmSessionID]['member'][] = $replyPMInfo['sender_id'];
             $composeListJS = "\n\t\t\t\t\n\t\t\t\t\$('#composeTextBox').before(\"<div class='pmComposeSelection' data-composeid = 'member_" . $replyPMInfo['sender_id'] . "'><div style='float: left'>" . $member->objRank->get_info_filtered("name") . " " . $member->get_info_filtered("username") . "</div><div class='pmComposeSelectionDelete' data-deleteid = 'member_" . $replyPMInfo['sender_id'] . "'>&times;</div></div>\");\n\t\t\t\t\n\t\t\t\t";
         } elseif ($replyPMInfo['receiver_id'] == 0 && ($replyPMInfo['sender_id'] == $memberInfo['member_id'] || in_array($memberInfo['member_id'], $arrReceivers))) {
             if (isset($_GET['replyall'])) {
                 $pmObj->set_assocTableKey("pmmember_id");
                 $arrPMMID = $pmObj->getAssociateIDs();
                 $arrGroups['list'] = array();
                 $arrGroups['rank'] = array();
                 $arrGroups['squad'] = array();
                 $arrGroups['tournament'] = array();
                 $arrGroups['rankcategory'] = array();
                 foreach ($arrPMMID as $pmmID) {
Ejemplo n.º 21
0
            $tempArr = $_SESSION['btFormComponent'][$componentIndex]['cOptions'];
            $tempArr[] = $_POST['optionValue'];
            asort($tempArr);
            $_SESSION['btFormComponent'][$componentIndex]['cOptions'] = $tempArr;
        } elseif ($countErrors == 0 && isset($_POST['whichValue'])) {
            $_SESSION['btFormComponentTempSelectValues'][] = $_POST['optionValue'];
            $tempArr = $_SESSION['btFormComponentTempSelectValues'];
            asort($tempArr);
        }
    } elseif ($_POST['action'] == "delete" && is_numeric($_POST['deleteKey'])) {
        if ($_POST['whichValue'] == "" || !is_numeric($_POST['whichValue'])) {
            $componentIndex = $_SESSION['btFormComponentCount'];
            unset($_SESSION['btFormComponent'][$componentIndex]['cOptions'][$_POST['deleteKey']]);
            $tempArr = $_SESSION['btFormComponent'][$componentIndex]['cOptions'];
            asort($tempArr);
        } else {
            $componentIndex = $_POST['whichValue'];
            unset($_SESSION['btFormComponentTempSelectValues'][$_POST['deleteKey']]);
            $tempArr = $_SESSION['btFormComponentTempSelectValues'];
            asort($tempArr);
        }
    }
    $counter = 1;
    foreach ($tempArr as $key => $value) {
        echo "<div style='float: left'>" . $counter . ". " . filterText($value) . "</div><div style='float: right'> - <a href='javascript:void(0)' onclick=\"deleteSelectValue('" . $key . "')\">Delete</a></div><div style='clear: both'></div>";
        $counter++;
    }
    if ($counter == 1) {
        echo "<i>None</i>";
    }
}
Ejemplo n.º 22
0
        $_POST = filterArray($_POST);
        $_POST['submit'] = false;
    }
}
if (!$_POST['submit']) {
    $rankObj->select($rankInfo['promotepower']);
    $maxRankInfo = $rankObj->get_info_filtered();
    if ($rankInfo['rank_id'] == 1) {
        $maxRankInfo['ordernum'] += 1;
    }
    $arrRanks = array();
    $result = $mysqli->query("SELECT * FROM " . $dbprefix . "ranks WHERE ordernum <= '" . $maxRankInfo['ordernum'] . "' AND rank_id != '1' ORDER BY ordernum DESC");
    while ($row = $result->fetch_assoc()) {
        $rankoptions .= "<option value='" . $row['rank_id'] . "'>" . filterText($row['name']) . "</option>";
        $arrRanks[] = $row['rank_id'];
        if ($maxRankInfo['ordernum'] > $row['ordernum']) {
            $arrMemRanks[] = $row['rank_id'];
        }
    }
    $sqlRanks = "('" . implode("','", $arrMemRanks) . "')";
    $result = $mysqli->query("SELECT * FROM " . $dbprefix . "members INNER JOIN " . $dbprefix . "ranks ON " . $dbprefix . "members.rank_id = " . $dbprefix . "ranks.rank_id WHERE " . $dbprefix . "members.rank_id IN " . $sqlRanks . " AND " . $dbprefix . "members.disabled = '0' AND " . $dbprefix . "members.member_id != '" . $memberInfo['member_id'] . "'  ORDER BY " . $dbprefix . "ranks.ordernum DESC, " . $dbprefix . "members.username");
    while ($row = $result->fetch_assoc()) {
        $rankObj->select($row['rank_id']);
        $memberoptions .= "<option value='" . $row['member_id'] . "'>" . $rankObj->get_info_filtered("name") . " " . filterText($row['username']) . "</option>";
    }
    echo "\n\t\n\t\t<form action='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "' method='post'>\n\t\t\t<div class='formDiv'>\n\t";
    if ($dispError != "") {
        echo "\n\t\t\t<div class='errorDiv'>\n\t\t\t<strong>Unable to set member's rank because the following errors occurred:</strong><br><br>\n\t\t\t{$dispError}\n\t\t\t</div>\n\t\t\t";
    }
    echo "\n\t\t\t\tUse the form below to set a member's rank.<br><br>\n\t\t\t\t<table class='formTable'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel'>Member:</td>\n\t\t\t\t\t\t<td class='main'><select name='member' class='textBox'>" . $memberoptions . "</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel'>New Rank:</td>\n\t\t\t\t\t\t<td class='main'><select name='newrank' class='textBox'>" . $rankoptions . "</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel' valign='top'>Reason:</td>\n\t\t\t\t\t\t<td class='main' valign='top'><textarea name='reason' cols='40' rows='3' class='textBox'>" . $_POST['reason'] . "</textarea></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel'>Freeze Member: <a href='javascript:void(0)' onmouseover=\"showToolTip('When demoting a member, they may be auto-promoted due to the number of days they are in the clan.  Set how long you want to keep the member demoted before being auto-promoted again.')\" onmouseout='hideToolTip()'>(?)</a></td>\n\t\t\t\t\t\t<td class='main'>\n\t\t\t\t\t\t\t<select name='freezetime' class='textBox'>\n\t\t\t\t\t\t\t\t<option value='0'>Don't Freeze</option>\n\t\t\t\t\t\t\t\t<option value='1'>1 day</option>\n\t\t\t\t\t\t\t\t<option value='3'>3 days</option>\n\t\t\t\t\t\t\t\t<option value='7'>7 days</option>\n\t\t\t\t\t\t\t\t<option value='10'>10 days</option>\n\t\t\t\t\t\t\t\t<option value='14'>14 days</option>\n\t\t\t\t\t\t\t\t<option value='21'>21 days</option>\n\t\t\t\t\t\t\t\t<option value='30'>30 days</option>\n\t\t\t\t\t\t\t\t<option value='45'>45 days</option>\n\t\t\t\t\t\t\t\t<option value='60'>60 days</option>\n\t\t\t\t\t\t\t\t<option value='75'>75 days</option>\n\t\t\t\t\t\t\t\t<option value='90'>90 days</option>\n\t\t\t\t\t\t\t\t<option value='36500'>Forever</option>\n\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='main' align='center' colspan='2'><br>\t\t\n\t\t\t\t\t\t\t<input type='submit' name='submit' value='Set Rank' class='submitButton'>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t</form>\n\t\t\n\t";
}
Ejemplo n.º 23
0
 * E-mail: support@bluethrust.com
 * Website: http://www.bluethrust.com
 *
 * License: http://www.bluethrust.com/license.php
 *
 */
if (!defined("LOGGED_IN") || !LOGGED_IN) {
    die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "'</script>");
}
$actionsWidth = count($setupManageListArgs['actions']) * 6;
$titleWidth = 100 - $actionsWidth;
// Setup default values if not given
$actionsTitleName = $setupManageListArgs['action_title'] == "" ? "Actions:" : $setupManageListArgs['action_title'];
$itemTitleName = $setupManageListArgs['item_title'] == "" ? "Item:" : $setupManageListArgs['item_title'];
$dispAddNewLink = !isset($setupManageListArgs['add_new_link']['url']) || $setupManageListArgs['add_new_link']['url'] == "" ? "" : "&raquo; <a href='" . $setupManageListArgs['add_new_link']['url'] . "'>" . $setupManageListArgs['add_new_link']['name'] . "</a> &laquo;";
$setupManageListArgs['list_div_name'] = $setupManageListArgs['list_div_name'] == "" ? "manageListDiv" : $setupManageListArgs['list_div_name'];
$setupManageListArgs['loading_spiral'] = $setupManageListArgs['loading_spiral'] == "" ? "manageListLoadingSpiral" : $setupManageListArgs['loading_spiral'];
// Display Manage List
echo "\n\n\t\t<table class='formTable'>\n\t\t\t<tr>\n\t\t\t\t<td colspan='2' align='right'>" . $dispAddNewLink . "<br><br></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='formTitle' style='width: " . $titleWidth . "%'>" . $itemTitleName . "</td>\n\t\t\t\t<td class='formTitle' style='width: " . $actionsWidth . "%'>" . $actionsTitleName . "</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t\n\t\t<div class='loadingSpiral' id='" . $setupManageListArgs['loading_spiral'] . "'><p align='center'><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/loading-spiral.gif'><br>Loading...</p></div>\n\t\t\n\t\t<div id='" . $setupManageListArgs['list_div_name'] . "'>\n\t";
include "console.managelist.list.php";
echo "</div>\n\t\n\t\n\t\t<div id='confirmDeleteDialog'></div>\n\t\t<script type='text/javascript'>\n\t\t\n\t\t\tfunction moveItem(move_dir, item_id) {\n\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\n\t\t\t\t\t\$('#" . $setupManageListArgs['loading_spiral'] . "').show();\n\t\t\t\t\t\$('#" . $setupManageListArgs['list_div_name'] . "').fadeOut(250);\n\t\t\t\t\t//" . $setupManageListArgs['move_link'] . "\n\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/console.managelist.move.php?cID=" . filterText($_GET['cID']) . "', { itemID: item_id, moveDir: move_dir }, function(data) {\n\t\t\t\t\t\n\t\t\t\t\t\t\$('#" . $setupManageListArgs['loading_spiral'] . "').hide();\n\t\t\t\t\t\t\$('#" . $setupManageListArgs['list_div_name'] . "').html(data).fadeIn(250);\n\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t});\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tfunction deleteItem(item_id) {\n\t\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\n\t\t\t";
if (!$setupManageListArgs['confirm_delete']) {
    echo "\n\t\t\t\t\t\$('#" . $setupManageListArgs['loading_spiral'] . "').show();\n\t\t\t\t\t\$('#" . $setupManageListArgs['list_div_name'] . "').fadeOut(250);\n\t\t\t\t";
}
echo "\n\t\t\t\t\t\n\t\t\t\t\t\$.post('" . $setupManageListArgs['delete_link'] . "', { itemID: item_id }, function(data) {\n\t\t\t\t\t\n\t\t\t\t\t";
if ($setupManageListArgs['confirm_delete']) {
    echo "\n\t\t\t\t\t\t\t\$('#confirmDeleteDialog').html(data);\n\t\t\t\t\t\t\t\$('#confirmDeleteDialog').dialog({\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttitle: '" . $consoleInfo['pagetitle'] . " - Delete',\n\t\t\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\t\tzIndex: 9999,\n\t\t\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t\t\t'Yes': function() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\$('#" . $setupManageListArgs['loading_spiral'] . "').show();\n\t\t\t\t\t\t\t\t\t\t\$('#" . $setupManageListArgs['list_div_name'] . "').fadeOut(250);\n\t\t\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\$.post('" . $setupManageListArgs['delete_link'] . "', { itemID: item_id, confirm: 1 }, function(data1) {\n\t\t\t\t\t\t\t\t\t\t\t\$('#" . $setupManageListArgs['loading_spiral'] . "').hide();\n\t\t\t\t\t\t\t\t\t\t\t\$('#" . $setupManageListArgs['list_div_name'] . "').html(data1).fadeIn(250);\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t'Cancel': function() {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t";
} else {
    echo "\n\t\t\t\t\t\t\t\$('#" . $setupManageListArgs['loading_spiral'] . "').hide();\n\t\t\t\t\t\t\t\$('#" . $setupManageListArgs['list_div_name'] . "').html(data).fadeIn(250);\n\t\t\t\t\t\t";
}
echo "\t\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t});\n\t\t\t\n\t\t\t}\n\t\t\n\t\t</script>\n\t\n\t";
Ejemplo n.º 24
0
        $arrColumns = array("name", "ordernum");
        $arrValues = array($_POST['catname'], $intNewOrderSpot);
        if ($profileCatObj->addNew($arrColumns, $arrValues)) {
            $profileCatInfo = $profileCatObj->get_info_filtered();
            echo "\n\t\t\t<div style='display: none' id='successBox'>\n\t\t\t\t<p align='center'>\n\t\t\t\t\tSuccessfully Added New Profile Category: <b>" . $profileCatInfo['name'] . "</b>!\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\t\tpopupDialog('Add Profile Category', '" . $MAIN_ROOT . "members', 'successBox');\n\t\t\t</script>\n\t\t\t";
        } else {
            $countErrors++;
            $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Unable to save category to the database.  Please contact the website administrator.<br>";
        }
    }
    if ($countErrors > 0) {
        $_POST = filterArray($_POST);
        $_POST['submit'] = false;
    }
}
if (!$_POST['submit']) {
    $countCategories = 0;
    $result = $mysqli->query("SELECT * FROM " . $dbprefix . "profilecategory ORDER BY ordernum DESC");
    while ($row = $result->fetch_assoc()) {
        $catOrderOptions .= "<option value='" . $row['profilecategory_id'] . "'>" . filterText($row['name']) . "</option>";
        $countCategories++;
    }
    if ($countCategories == 0) {
        $catOrderOptions = "<option value='first'>(no other categories)</option>";
    }
    echo "\n\t<form action='console.php?cID=" . $cID . "' method='post'>\n\t\t<div class='formDiv'>\n\t\t\n\t\t";
    if ($dispError != "") {
        echo "\n\t\t<div class='errorDiv'>\n\t\t<strong>Unable to add new profile category because the following errors occurred:</strong><br><br>\n\t\t{$dispError}\n\t\t</div>\n\t\t";
    }
    echo "\n\t\t\n\t\t\tFill out the form below to add a new profile category.<br><br>\n\t\t\n\t\t\t<table class='formTable'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='formLabel'>Category Name:</td>\n\t\t\t\t\t<td class='main'><input type='text' name='catname' value='" . $_POST['catname'] . "' class='textBox' style='width: 250px'></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='formLabel' valign='top'>Category Order:</td>\n\t\t\t\t\t<td class='main'>\n\t\t\t\t\t\t<select name='beforeafter' class='textBox'><option value='before'>Before</option><option value='after'>After</option></select><br>\n\t\t\t\t\t\t<select name='catorder' class='textBox'>" . $catOrderOptions . "</select>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='main' align='center' colspan='2'><br>\n\t\t\t\t\t\t<input type='submit' name='submit' value='Add Profile Category' class='submitButton'>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</div>\n\t</form>\n\t";
}
Ejemplo n.º 25
0
    $member = new Member($mysqli);
    $member->select($_SESSION['btUsername']);
    // Check Login
    if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) {
        $memberInfo = $member->get_info();
    } else {
        exit;
    }
} else {
    $memberInfo = $member->get_info();
    $consoleObj->select($consoleObj->findConsoleIDByName("Diplomacy: Manage Clans"));
    if (!$member->hasAccess($consoleObj)) {
        exit;
    }
}
echo "\n<table class='formTable' style='border-spacing: 0px; margin-top: 0px'>\n\t<tr><td colspan='5' class='dottedLine'></td></tr>\n";
$counter = 0;
$x = 1;
$result = $mysqli->query("SELECT * FROM " . $dbprefix . "diplomacy ORDER BY clanname");
while ($row = $result->fetch_assoc()) {
    if ($counter == 1) {
        $addCSS = " alternateBGColor";
        $counter = 0;
    } else {
        $addCSS = "";
        $counter = 1;
    }
    echo "\n\t<tr>\n\t\t<td class='dottedLine" . $addCSS . "' width=\"80%\">&nbsp;&nbsp;<span class='main'><b><a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "&dID=" . $row['diplomacy_id'] . "&action=edit'>" . filterText($row['clanname']) . "</a></b></td>\n\t\t<td align='center' class='dottedLine" . $addCSS . "' width=\"10%\"><a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "&dID=" . $row['diplomacy_id'] . "&action=edit'><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/edit.png' width='24' height='24' title='Edit Clan Information'></a></td>\n\t\t<td align='center' class='dottedLine" . $addCSS . "' width=\"10%\"><a href='javascript:void(0)' onclick=\"deleteClan('" . $row['diplomacy_id'] . "')\"><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/delete.png' width='24' height='24' title='Delete Clan'></a></td>\n\t</tr>\n\t";
    $x++;
}
echo "</table>";
Ejemplo n.º 26
0
        exit;
    }
}
echo "\n\t<table class='formTable' style='border-spacing: 0px; margin-top: 0px'>\n";
$counter = 0;
$result = $mysqli->query("SELECT * FROM " . $dbprefix . "polls ORDER BY dateposted DESC");
while ($row = $result->fetch_assoc()) {
    if ($counter == 0) {
        $addCSS = "";
        $counter = 1;
    } else {
        $addCSS = " alternateBGColor";
        $counter = 0;
    }
    $dispQuestion = strlen($row['question']) > 75 ? substr($row['question'], 0, 75) : $row['question'];
    $dispQuestion = filterText($dispQuestion);
    echo "\t\n\t\t<tr>\n\t\t\t<td class='main manageList" . $addCSS . "' style='padding-left: 10px; width: 76%'><a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "&pID=" . $row['poll_id'] . "&action=edit'>" . $dispQuestion . "</a></td>\n\t\t\t<td class='main manageList" . $addCSS . "' style='width: 12%' align='center'><a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "&pID=" . $row['poll_id'] . "&action=edit'><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/edit.png' class='manageListActionButton'></a></td>\n\t\t\t<td class='main manageList" . $addCSS . "' style='width: 12%' align='center'><a href='javascript:void(0)'><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/delete.png' class='manageListActionButton' data-deletePoll='" . $row['poll_id'] . "'></a></td>\n\t\t</tr>\n\t";
}
echo "</table>";
if ($result->num_rows == 0) {
    echo "\n\t\t<div class='shadedBox' style='margin: 20px auto; width: 40%'>\n\t\t\t<p class='main' align='center'>\n\t\t\t\tThere are currently no polls!\n\t\t\t</p>\n\t\t</div>\n\t";
}
?>

<script type='text/javascript'>
	$(document).ready(function() {
		$('img[data-deletePoll]').click(function() {

			$('#loadingSpiral').show();
			$('#pollList').fadeOut(250);
			
Ejemplo n.º 27
0
    }
    ?>
                            <?php 
    if ($randomTags) {
        ?>
                                <?php 
        foreach ($randomTags as $randomTag) {
            ?>
                                <li><a href="<?php 
            echo tagLink($randomTag->tag);
            ?>
" title="<?php 
            echo filterText($randomTag->tag);
            ?>
"><?php 
            echo filterText($randomTag->tag);
            ?>
</a></li>
                                <?php 
        }
        ?>
                            <?php 
    }
    ?>
                        </ul>
                    </div>
                    <!-- example search end //-->
                    <?php 
}
?>
                    <!-- search pagina begin //-->
Ejemplo n.º 28
0
            $rankInfo = $rankObj->get_info();
            $memberRank = $rankInfo['name'];
            $consoleOptionObj = new ConsoleOption($mysqli);
            // Members Only Tagger
            $dispMembersOnlyTagger = "";
            if (isset($_SESSION['btMembersOnlyTagger']) && $_SESSION['btMembersOnlyTagger'] == 1 && substr($_SERVER['PHP_SELF'], -11) != "console.php") {
                $pageTaggerURL = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
                $taggerCID = $consoleOptionObj->findConsoleIDByName("Member's Only Pages");
                if ($taggerObj->select($pageTaggerURL, false)) {
                    $pageTagStatus = "<span class='pendingFont'>Member's Only</span>";
                    $dispTagOrUntag = "Untag";
                } else {
                    $pageTagStatus = "<span class='publicNewsColor'>Public</span>";
                    $dispTagOrUntag = "Tag";
                }
                $dispMembersOnlyTagger = "\n\t\t\t\t<div id='membersOnlyTagger'>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t<div id='membersOnlyLoadingSpiral' style='display: none'>\n\t\t\t\t\t\t<p align='center' class='main'>\n\t\t\t\t\t\t\t<img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/loading-spiral2.gif'><br>Loading\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t<div id='membersOnlyTaggerHTML'>\n\t\t\t\t\t\t<p align='center' style='margin: 0px; margin-bottom: 15px'><b>Members Only Tagger: " . $actualPageName . "</b></p>\n\t\t\t\t\t\n\t\t\t\t\t\t<p align='center'>Current Status: " . $pageTagStatus . "<br>Return to <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $taggerCID . "'>Member's Only Pages</a></p>\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class='taggerBottomLeft'><a href='javascript:void(0)' onclick='setMembersOnlyTaggerStatus()'>Turn Off</a></div>\n\t\t\t\t\t\t<div class='taggerBottomRight'><a href='javascript:void(0)' onclick='setMembersOnlyPageStatus()'>" . $dispTagOrUntag . " Page</a></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\t\n\t\t\t\t\tfunction setMembersOnlyTaggerStatus() {\n\t\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/admin/membersonlypagetagger.php', { setTaggerStatus: '1' }, function(data) {\n\t\t\t\t\t\t\t\t\$('#membersOnlyTagger').fadeOut(250);\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\tfunction setMembersOnlyPageStatus() {\n\t\t\t\t\t\n\t\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\t\$('#membersOnlyTaggerHTML').hide();\n\t\t\t\t\t\t\t\$('#membersOnlyLoadingSpiral').show();\n\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/admin/membersonlypagetagger.php', { setPageStatus: '1', pageName: '" . filterText($actualPageName) . "', tagURL: '" . $pageTaggerURL . "' }, function(data) {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$('#membersOnlyTaggerHTML').html(data);\n\t\t\t\t\t\t\t\t\$('#membersOnlyLoadingSpiral').hide();\n\t\t\t\t\t\t\t\t\$('#membersOnlyTaggerHTML').fadeIn(250);\n\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\t\n\t\t\t\t\n\t\t\t\t</script>\n\t\t\t\t\n\t\t\t\t";
            }
        }
    }
}
if (!defined("LOGGED_IN")) {
    define("LOGGED_IN", false);
}
if ($taggerObj->select($_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'], false) && constant('LOGGED_IN') == false) {
    echo "\n\t\n\t\t<script type='text/javascript'>\n\t\t\n\t\t\twindow.location='" . $MAIN_ROOT . "login.php';\n\t\t\n\t\t</script>\n\t\n\t";
    exit;
}
$hitCountObj = new Basic($mysqli, "hitcounter", "hit_id");
$result = $mysqli->query("SELECT * FROM " . $dbprefix . "hitcounter WHERE ipaddress = '" . $IP_ADDRESS . "'");
if ($result->num_rows > 0) {
    $hitCountRow = $result->fetch_assoc();
Ejemplo n.º 29
0
            $profileOptionInfo = $profileObj->get_info_filtered();
            if ($profileOptionInfo['profilecategory_id'] == $_POST['catID']) {
                $arrAssociates = $profileCatObj->getAssociateIDs("ORDER BY sortnum");
                $highestIndex = count($arrAssociates) - 1;
                $arrFlipped = array_flip($arrAssociates);
                if ($highestIndex > 0) {
                    if ($arrFlipped[$_POST['oID']] == $highestIndex) {
                        $temp = $highestIndex - 1;
                        $selectedOption = $arrAssociates[$temp];
                    } else {
                        $temp = $arrFlipped[$_POST['oID']] + 1;
                        $selectedConsole = $arrAssociates[$temp];
                    }
                }
            }
        }
        $profileCatInfo = $profileCatObj->get_info_filtered();
        $result = $mysqli->query("SELECT * FROM " . $dbprefix . "profileoptions WHERE profilecategory_id = '" . $profileCatInfo['profilecategory_id'] . "'" . $addSQL . " ORDER BY sortnum");
        while ($row = $result->fetch_assoc()) {
            $strSelect = "";
            if ($row['profileoption_id'] == $selectedOption) {
                $strSelect = "selected";
            }
            $dispOptions .= "<option value='" . $row['profileoption_id'] . "' " . $strSelect . ">" . filterText($row['name']) . "</option>";
        }
        if ($result->num_rows == 0) {
            $dispOptions = "<option value='first'>(no other profile options)</option>";
        }
        echo $dispOptions;
    }
}
Ejemplo n.º 30
0
            }
            echo "\n\t\t\t<div style='display: none' id='successBox'>\n\t\t\t<p align='center'>\n\t\t\tSuccessfully Added New Game: <b>" . $newGameInfo['name'] . "</b>!" . $showErrorMessage . "\n\t\t\t</p>\n\t\t\t</div>\n\t\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\tpopupDialog('Add New Game', '" . $MAIN_ROOT . "members', 'successBox');\n\t\t\t</script>\n\t\t\t";
        } else {
            $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Unable to add new game.  Please try again.<br>";
            $_POST['submit'] = false;
        }
    } else {
        $_POST = filterArray($_POST);
        $_POST['submit'] = false;
    }
}
if (!$_POST['submit']) {
    $_SESSION['btStatCache'] = array();
    echo "\n\t<form action='console.php?cID={$cID}' method='post' enctype='multipart/form-data'>\n\t\t<div class='formDiv'>\n\t";
    if ($dispError != "") {
        echo "\n\t\t<div class='errorDiv'>\n\t\t<strong>Unable to add new game because the following errors occurred:</strong><br><br>\n\t\t{$dispError}\n\t\t</div>\n\t\t";
    }
    // Get games already added
    $counter = 0;
    $gameOrderOptions = "";
    $result = $mysqli->query("SELECT * FROM " . $dbprefix . "gamesplayed ORDER BY ordernum DESC");
    while ($row = $result->fetch_assoc()) {
        $counter++;
        $dispName = filterText($row['name']);
        $gameOrderOptions .= "<option value='" . $row['gamesplayed_id'] . "'>" . $dispName . "</option>";
    }
    if ($counter == 0) {
        $gameOrderOptions = "<option value='first'>(first game)</option>";
    }
    echo "\n\t\t\tFill out the form below to add a game.<br><br>\n\t\t\t<span style='text-decoration: underline; font-weight: bold'>NOTE:</span> When adding a Game Image, if both the File and URL are filled out, the File will be used.\n\t\t\t<br><br>\n\t\t\t<table class='formTable'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan='2' class='main'>\n\t\t\t\t\t\t<b>General Information</b>\n\t\t\t\t\t\t<div class='dottedLine' style='width: 90%; padding-top: 3px'></div>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='formLabel'>Game Name:</td>\n\t\t\t\t\t<td class='main'><input type='text' name='gamename' value='" . $_POST['gamename'] . "' class='textBox' style='width: 250px'></td>\t\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='formLabel' valign='top'>Game Image:</td>\n\t\t\t\t\t<td class='main'>\n\t\t\t\t\t\tFile:<br><input type='file' name='gameimagefile' class='textBox' style='width: 250px; border: 0px'><br>\n\t\t\t\t\t\t<span style='font-size: 10px'>File Types: .jpg, .gif, .png, .bmp | <a href='javascript:void(0)' onmouseover=\"showToolTip('The file size upload limit is controlled by your PHP settings in the php.ini file.')\" onmouseout='hideToolTip()'>File Size: " . ini_get("upload_max_filesize") . "B or less</a></span>\n\t\t\t\t\t\t<p><b><i>OR</i></b></p>\n\t\t\t\t\t\tURL:<br><input type='text' name='gameimageurl' value='" . $_POST['gameimageurl'] . "' class='textBox' style='width: 250px'>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='formLabel'>Image Width: <a href='javascript:void(0)' onmouseover=\"showToolTip('Set the Image Width to the width that you would like the Game Image to be displayed on your website.')\" onmouseout='hideToolTip()'>(?)</a></td>\n\t\t\t\t\t<td class='main'>\n\t\t\t\t\t\t<input type='text' name='gameimagewidth' value='" . $_POST['gameimagewidth'] . "' class='textBox' style='width: 40px'> <i>px</i>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='formLabel'>Image Height: <a href='javascript:void(0)' onmouseover=\"showToolTip('Set the Image Height to the height that you would like the Game Image to be displayed on your website.')\" onmouseout='hideToolTip()'>(?)</a></td>\n\t\t\t\t\t<td class='main'>\n\t\t\t\t\t\t<input type='text' name='gameimageheight' value='" . $_POST['gameimageheight'] . "' class='textBox' style='width: 40px'> <i>px</i>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='formLabel' valign='top'>Display Order: <a href='javascript:void(0)' onmouseover=\"showToolTip('This is the order that the game will be displayed on the side menu bar.')\" onmouseout='hideToolTip()'>(?)</a></td>\n\t\t\t\t\t<td class='main'>\n\t\t\t\t\t\t<select name='beforeafter' class='textBox'><option value='before'>Before</option><option value='after'>After</option></select><br>\n\t\t\t\t\t\t<select name='gameorder' class='textBox'>" . $gameOrderOptions . "</select>\n\t\t\t\t\t</td>\t\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan='2' class='main'><br>\n\t\t\t\t\t\t<b>Game Statistics Information</b>\n\t\t\t\t\t\t<div class='dottedLine' style='width: 90%; padding-top: 3px; margin-bottom: 5px'></div>\n\t\t\t\t\t\t<div style='padding-left: 3px; padding-bottom: 15px'>\n\t\t\t\t\t\t\tIn this section you can add new game statistics for the game you are adding.  You can add auto-calculated stats after adding two input stats.  The highest stat will be the default stat used to rank members on the top players page.\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='main' colspan='2' align='center'>\n\t\t\t\t\t\t<input type='button' value='Add New Stat' onclick='showAddNewStat()' class='submitButton'>\n\t\t\t\t\t\t<div id='loadingSpiral' class='loadingSpiral'>\n\t\t\t\t\t\t\t<p align='center'>\n\t\t\t\t\t\t\t\t<img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/loading-spiral2.gif'><br>Loading\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='main' colspan='2' align='center'><br>\n\t\t\t\t\t\t<div id='statList'><i>No Stats Added Yet!</i></div>\n\t\t\t\t\t</td>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='main' align='center' colspan='2'><br><br><br>\n\t\t\t\t\t\t<input type='submit' name='submit' value='Add New Game' class='submitButton'>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t\n\t\t</div>\n\t</form>\n\t\n\t<div id='addNewStatForm' style='display: none'></div>\n\t\n\t\n\t\n\t<script type='text/javascript'>\n\t\tfunction showAddNewStat() {\n\t\t\n\t\t\t\$(document).ready(function() {\n\t\t\t\t\n\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/admin/statcache/add.php', { }, function(data) {\n\t\t\t\t\t\$('#addNewStatForm').html(data);\n\t\t\t\t\t\n\t\t\t\t\t\$('#addNewStatForm').dialog({\n\t\t\t\t\t\ttitle: 'Add New Stat',\n\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\twidth: 450,\n\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t'Add Stat': function() {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tvar strStatName = \$('#gpStatName').val();\n\t\t\t\t\t\t\t\tvar strStatType = \$('#gpStatType').val();\n\t\t\t\t\t\t\t\tvar intCalcOp = \$('#gpCalcOp').val();\n\t\t\t\t\t\t\t\tvar intFirstStatID = \$('#gpFirstStatID').val();\n\t\t\t\t\t\t\t\tvar intSecondStatID = \$('#gpSecondStatID').val();\n\t\t\t\t\t\t\t\tvar intRounding;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(strStatType == \"inputnum\") {\n\t\t\t\t\t\t\t\t\tintRounding = \$('#gpRoundingInputNumeric').val();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tintRounding = \$('#gpRounding').val();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tvar intHideStat = 0;\n\t\t\t\t\t\t\t\tif(\$('#gpHideStat').is(':checked')) {\n\t\t\t\t\t\t\t\t\tintHideStat = 1;\n\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/admin/statcache/add.php', { submit: 1, statName: strStatName, statType: strStatType, calcOperation: intCalcOp, firstStat: intFirstStatID, secondStat: intSecondStatID, rounding: intRounding, hideStat: intHideStat }, function(data1) {\n\t\t\t\t\t\t\t\t\t\$('#addNewStatForm').html(data1);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'Cancel': function() {\n\t\t\t\t\t\t\t\t\$(this).dialog('close');\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\$('#loadingSpiral').hide();\n\t\t\t\t});\n\t\t\t\n\t\t\t});\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfunction deleteStat(intStatID) {\n\t\t\t\$.post('" . $MAIN_ROOT . "members/include/admin/statcache/delete.php', { sID: intStatID }, function(data) {\n\t\t\t\n\t\t\t\t\$('#addNewStatForm').html(data);\n\t\t\t\n\t\t\t});\n\t\t\n\t\t}\n\t\t\n\t\tfunction moveStat(strDirection, intStatID) {\n\t\t\t\$.post('" . $MAIN_ROOT . "members/include/admin/statcache/move.php', { statDir: strDirection, sID: intStatID }, function(data) {\n\t\t\t\t\$('#addNewStatForm').html(data);\n\t\t\t});\n\t\t}\n\t\t\n\t\tfunction editStat(intStatID) {\n\t\t\t\$.post('" . $MAIN_ROOT . "members/include/admin/statcache/edit.php', { sID: intStatID }, function(data) {\n\t\t\t\n\t\t\t\t\$('#addNewStatForm').html(data);\n\t\t\t\t\n\t\t\t\t\$('#addNewStatForm').dialog('destroy');\n\t\t\t\t\n\t\t\t\t\$('#addNewStatForm').dialog({\n\t\t\t\t\ttitle: 'Edit Stat',\n\t\t\t\t\tmodal: true,\n\t\t\t\t\tresizable: false,\n\t\t\t\t\twidth: 450,\n\t\t\t\t\tshow: 'scale',\n\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t'Save': function() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar strStatName = \$('#gpStatName').val();\n\t\t\t\t\t\t\tvar strStatType = \$('#gpStatType').val();\n\t\t\t\t\t\t\tvar intCalcOp = \$('#gpCalcOp').val();\n\t\t\t\t\t\t\tvar intFirstStatID = \$('#gpFirstStatID').val();\n\t\t\t\t\t\t\tvar intSecondStatID = \$('#gpSecondStatID').val();\n\t\t\t\t\t\t\tvar intRounding;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(strStatType == \"inputnum\") {\n\t\t\t\t\t\t\t\tintRounding = \$('#gpRoundingInputNumeric').val();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tintRounding = \$('#gpRounding').val();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar intHideStat = 0;\n\t\t\t\t\t\t\tif(\$('#gpHideStat').is(':checked')) {\n\t\t\t\t\t\t\t\tintHideStat = 1;\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/admin/statcache/edit.php', { submit: 1, sID: intStatID, statName: strStatName, statType: strStatType, calcOperation: intCalcOp, firstStat: intFirstStatID, secondStat: intSecondStatID, rounding: intRounding, hideStat: intHideStat }, function(data1) {\n\t\t\t\t\t\t\t\t\$('#addNewStatForm').html(data1);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'Cancel': function() {\n\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t});\n\t\t}\n\t\t\n\t</script>\n\t";
}