当前位置: 首页>>代码示例>>PHP>>正文


PHP filterText函数代码示例

本文整理汇总了PHP中filterText函数的典型用法代码示例。如果您正苦于以下问题:PHP filterText函数的具体用法?PHP filterText怎么用?PHP filterText使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了filterText函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: awardMedalSave

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);
}
开发者ID:nsystem1,项目名称:clanscripts,代码行数:9,代码来源:awardmedal.php

示例2: dispShoutbox

 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;
 }
开发者ID:nsystem1,项目名称:clanscripts,代码行数:50,代码来源:shoutbox.php

示例3: index

 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('');
     }
 }
开发者ID:pdkhuong,项目名称:VideoFW,代码行数:40,代码来源:Search.php

示例4: dispIAMessages

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;
}
开发者ID:nsystem1,项目名称:clanscripts,代码行数:23,代码来源:inactiverequestlist.php

示例5: makeParams

 /**
  * 
  * @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;
 }
开发者ID:khalid9th,项目名称:ocAds,代码行数:30,代码来源:hSeo.php

示例6: array

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"));
开发者ID:nsystem1,项目名称:clanscripts,代码行数:30,代码来源:addmenuitem.php

示例7: filterText

?>


<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=" . $twitchObj->data['memberCard']['memberInfo']['username'] . "'><img src='" . $twitchObj->data['memberCard']['rawData']['stream']['preview']['medium'] . "'></a>\n\t\t\t";
} else {
    echo "<a href='" . MAIN_ROOT . "plugins/twitch/?user=" . $twitchObj->data['memberCard']['memberInfo']['username'] . "'><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>
开发者ID:nsystem1,项目名称:clanscripts,代码行数:31,代码来源:membercard.php

示例8: date

$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);
开发者ID:nsystem1,项目名称:clanscripts,代码行数:31,代码来源:campaign_form.php

示例9: createOutput

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);
//.........这里部分代码省略.........
开发者ID:hansstam,项目名称:makerfaire,代码行数:101,代码来源:makersigns.php

示例10: array

			<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({
开发者ID:nsystem1,项目名称:clanscripts,代码行数:31,代码来源:setmanagers.php

示例11: array

             }
             $_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 {
开发者ID:nsystem1,项目名称:clanscripts,代码行数:31,代码来源:add.php

示例12: array

             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);
开发者ID:nsystem1,项目名称:clanscripts,代码行数:31,代码来源:addplayers.php

示例13: Medal

    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);
开发者ID:nsystem1,项目名称:clanscripts,代码行数:30,代码来源:edit.php

示例14: filterText

                                    <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>
开发者ID:khalid9th,项目名称:ocAds,代码行数:31,代码来源:vContact.php

示例15: array

    }
}
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";
开发者ID:nsystem1,项目名称:clanscripts,代码行数:31,代码来源:invitemembers.php


注:本文中的filterText函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。