本文整理汇总了PHP中XoopsFormElementTray::render方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsFormElementTray::render方法的具体用法?PHP XoopsFormElementTray::render怎么用?PHP XoopsFormElementTray::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XoopsFormElementTray
的用法示例。
在下文中一共展示了XoopsFormElementTray::render方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: b_ams_topicsnav_edit
function b_ams_topicsnav_edit($options)
{
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
$form = new XoopsFormElementTray('', '<br/>');
$restrict_select = new XoopsFormRadioYN(_AMS_MB_NEWS_RESTRICTTOPICS, 'options[0]', $options[0]);
$form->addElement($restrict_select);
return $form->render();
}
示例2: b_newsletter_edit
function b_newsletter_edit($options)
{
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
if (!class_exists('XoopsFormSelectList')) {
include_once XOOPS_ROOT_PATH . "/modules/smartmail/class/formselectlist.php";
}
$form = new XoopsFormElementTray('', '<br/><br />');
$form->addElement(new XoopsFormSelectList(_NL_BK_NEWSLETTER_ID, 'options[0]', $options[0], 1, "newsletter", "smartmail"));
return $form->render();
}
示例3: b_smartmail_custom_edit
function b_smartmail_custom_edit($options)
{
$ts =& MyTextSanitizer::getInstance();
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
$form = new XoopsFormElementTray('', '<br />', 'options');
$form->addElement(new XoopsFormDhtmlTextArea(_NL_MB_CONTENT, 'options[0]', htmlspecialchars($ts->stripSlashesGPC($options[0]), ENT_QUOTES), 15, 60));
$type_select = new XoopsFormSelect(_NL_MB_CONTENTTYPE, 'options[1]', $options[1]);
$type_select->addOption('H', _NL_MB_HTMLBLOCK);
$type_select->addOption('S', _NL_MB_NOHTMLBLOCK);
$form->addElement($type_select);
return $form->render();
}
示例4: render
function render()
{
xoops_load('XoopsEditorHandler');
$editor_handler = XoopsEditorHandler::getInstance();
$editor_handler->allowed_editors = $this->allowed_editors;
$option_select = new XoopsFormSelect("", $this->name, $this->value);
$extra = 'onchange="if(this.options[this.selectedIndex].value.length > 0 ){
window.document.forms.' . $this->form->getName() . '.submit();
}"';
$option_select->setExtra($extra);
$option_select->addOptionArray($editor_handler->getList($this->nohtml));
$this->addElement($option_select);
return parent::render();
}
示例5: b_ams_author_edit
function b_ams_author_edit($options)
{
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
$form = new XoopsFormElementTray('', '<br/>');
$sort_select = new XoopsFormSelect(_AMS_MB_NEWS_ORDER, 'options[0]', $options[0]);
$sort_select->addOption('count', _AMS_MB_NEWS_ARTCOUNT);
$sort_select->addOption('read', _AMS_MB_NEWS_HITS);
$sort_select->addOption('rating', _AMS_MB_NEWS_RATING);
$form->addElement($sort_select);
$form->addElement(new XoopsFormText(_AMS_MB_NEWS_DISP, 'options[1]', 20, 15, $options[1]));
$name_select = new XoopsFormSelect(_AMS_MB_NEWS_DISPLAYNAME, 'options[2]', $options[2]);
$name_select->addOption('uname', _AMS_MB_NEWS_USERNAME);
$name_select->addOption('name', _AMS_MB_NEWS_REALNAME);
$form->addElement($name_select);
$average_select = new XoopsFormSelect(_AMS_MB_NEWS_COMPUTING, 'options[3]', $options[3]);
$average_select->addOption('average', _AMS_MB_NEWS_AVERAGE);
$average_select->addOption('total', _AMS_MB_NEWS_TOTAL);
$form->addElement($average_select);
return $form->render();
}
示例6: createDataTypeUI
function createDataTypeUI($ele_type, $element, $id_form, $ele_encrypt)
{
// data type controls ... added May 31 2009, jwe
// only do it for existing elements where the datatype choice is relevant
// do not do it for encrypted elements
$renderedUI = "";
// check if there's a special class file for this element type, and if so, instantiate an element object of that kind, so we can check if it needs a datatype UI or not
$customTypeNeedsUI = false;
if (file_exists(XOOPS_ROOT_PATH . "/modules/formulize/class/" . $ele_type . "Element.php")) {
$customTypeHandler = xoops_getmodulehandler($ele_type . "Element", 'formulize');
$customTypeObject = $customTypeHandler->create();
$customTypeNeedsUI = $customTypeObject->needsDataType;
}
if (($ele_type == "text" or $ele_type == "textarea" or $ele_type == "select" or $ele_type == "radio" or $ele_type == "checkbox" or $ele_type == "derived" or $customTypeNeedsUI) and !$ele_encrypt) {
if ($element) {
$defaultTypeInformation = $element->getDataTypeInformation();
$defaultType = $defaultTypeInformation['dataType'];
$defaultTypeSize = $defaultTypeInformation['dataTypeSize'];
//print "defaultType: $defaultType<br>";
//print "defaultTypeSize: $defaultTypeSize<br>";
$renderedUI .= "<input type='hidden' name='element_default_datatype' value='{$defaultType}'>\n";
$renderedUI .= "<input type='hidden' name='element_default_datatypesize' value='{$defaultTypeSize}'>\n";
} else {
$defaultType = 'text';
$defaultTypeSize = '';
}
// setup the UI for the options...
$dataTypeTray = new XoopsFormElementTray(_AM_FORM_DATATYPE_CONTROLS, '<br>');
$dataTypeTray->setDescription(_AM_FORM_DATATYPE_CONTROLS_DESC);
$textType = new XoopsFormRadio('', 'element_datatype', $defaultType);
$textDataTypeLabel = (!$element and $ele_type == 'text') ? _AM_FORM_DATATYPE_TEXT_NEWTEXT : _AM_FORM_DATATYPE_TEXT;
$textType->addOption('text', $textDataTypeLabel);
$intType = new XoopsFormRadio('', 'element_datatype', $defaultType);
$intType->addOption('int', _AM_FORM_DATATYPE_INT);
$decimalType = new XoopsFormRadio('', 'element_datatype', $defaultType);
$decimalTypeSizeDefault = ($defaultTypeSize and $defaultType == "decimal") ? $defaultTypeSize : 2;
$decimalTypeSize = new XoopsFormText('', 'element_datatype_decimalsize', 2, 2, $decimalTypeSizeDefault);
$decimalTypeSize->setExtra(" style=\"width: 2em;\" ");
// style to force width necessary to compensate for silly forced 60% textbox widths in ICMS admin side
$decimalType->addOption('decimal', _AM_FORM_DATATYPE_DECIMAL1 . $decimalTypeSize->render() . _AM_FORM_DATATYPE_DECIMAL2);
$varcharType = new XoopsFormRadio('', 'element_datatype', $defaultType);
$varcharTypeSizeDefault = ($defaultTypeSize and $defaultType == 'varchar') ? $defaultTypeSize : 255;
$varcharTypeSize = new XoopsFormText('', 'element_datatype_varcharsize', 3, 3, $varcharTypeSizeDefault);
$varcharTypeSize->setExtra(" style=\"width: 3em;\" ");
$varcharType->addOption('varchar', _AM_FORM_DATATYPE_VARCHAR1 . $varcharTypeSize->render() . _AM_FORM_DATATYPE_VARCHAR2);
$charType = new XoopsFormRadio('', 'element_datatype', $defaultType);
$charTypeSizeDefault = ($defaultTypeSize and $defaultType == 'char') ? $defaultTypeSize : 255;
$charTypeSize = new XoopsFormText('', 'element_datatype_charsize', 3, 3, $charTypeSizeDefault);
$charTypeSize->setExtra(" style=\"width: 3em;\" ");
$charType->addOption('char', _AM_FORM_DATATYPE_CHAR1 . $charTypeSize->render() . _AM_FORM_DATATYPE_CHAR2);
if ($defaultType != "text" and $defaultType != "int" and $defaultType != "decimal" and $defaultType != "varchar" and $defaultType != "char") {
$otherType = new XoopsFormRadio('', 'element_datatype', $defaultType);
$otherType->addOption($defaultType, _AM_FORM_DATATYPE_OTHER . $defaultType);
$dataTypeTray->addElement($otherType);
}
$dataTypeTray->addElement($textType);
$dataTypeTray->addElement($intType);
$dataTypeTray->addElement($decimalType);
$dataTypeTray->addElement($varcharType);
$dataTypeTray->addElement($charType);
$renderedUI .= $dataTypeTray->render();
}
return $renderedUI;
}
示例7: render
function render($ele_value, $caption, $markupName, $isDisabled, $element, $entry_id)
{
global $myts;
$myts =& MyTextSanitizer::getInstance();
$renderer =& new formulizeElementRenderer();
$ele_desc = $element->getVar('ele_desc', "f");
if (strstr($markupName, "de_")) {
// display element uses a slightly different element name so it can be distinguished on subsequent page load from regular elements...THIS IS NOT TRUE/NECESSARY ANYMORE SINCE FORMULIZE 3, WHERE ALL ELEMENTS ARE DISPLAY ELEMENTS
$true_ele_id = str_replace("de_" . $element->getVar('id_form') . "_" . $entry_id . "_", "", $markupName);
} else {
$true_ele_id = str_replace("ele_", "", $markupName);
}
$selected = array();
$options = array();
$disabledHiddenValue = array();
$disabledHiddenValues = "";
$disabledOutputText = array();
$opt_count = 1;
while ($i = each($ele_value)) {
$options[$opt_count] = $myts->stripSlashesGPC($i['key']);
if ($i['value'] > 0) {
$selected[] = $opt_count;
$disabledHiddenValue[] = "<input type=hidden name=\"" . $markupName . "[]\" value=\"{$opt_count}\">";
}
$opt_count++;
}
if ($element->getVar('ele_delim') != "") {
$delimSetting = $element->getVar('ele_delim');
}
$delimSetting =& $myts->undoHtmlSpecialChars($delimSetting);
if ($delimSetting == "br") {
$delimSetting = "<br />";
}
$hiddenOutOfRangeValuesToWrite = array();
switch ($delimSetting) {
case 'space':
$form_ele1 = new XoopsFormCheckBox($caption, $markupName, $selected);
$counter = 0;
// counter used for javascript that works with 'Other' box
while ($o = each($options)) {
$o = formulize_swapUIText($o, $element->getVar('ele_uitext'));
$other = $renderer->optOther($o['value'], $markupName, $entry_id, $counter, true);
if ($other != false) {
$form_ele1->addOption($o['key'], _formulize_OPT_OTHER . $other);
if (in_array($o['key'], $selected)) {
$disabledOutputText[] = _formulize_OPT_OTHER . $other;
}
} else {
$form_ele1->addOption($o['key'], $o['value']);
if (in_array($o['key'], $selected)) {
$disabledOutputText[] = $o['value'];
}
if (strstr($o['value'], _formulize_OUTOFRANGE_DATA)) {
$hiddenOutOfRangeValuesToWrite[$o['key']] = str_replace(_formulize_OUTOFRANGE_DATA, "", $o['value']);
// if this is an out of range value, grab the actual value so we can stick it in a hidden element later
}
}
$counter++;
}
$form_ele1->setExtra(" onchange=\"javascript:formulizechanged=1;\" jquerytag=\"{$form_ele_id}\" ");
break;
default:
$form_ele1 = new XoopsFormElementTray($caption, $delimSetting);
$counter = 0;
// counter used for javascript that works with 'Other' box
while ($o = each($options)) {
$o = formulize_swapUIText($o, $element->getVar('ele_uitext'));
$t = new XoopsFormCheckBox('', $markupName . '[]', $selected);
$other = $renderer->optOther($o['value'], $markupName, $entry_id, $counter, true);
if ($other != false) {
$t->addOption($o['key'], _formulize_OPT_OTHER . $other);
if (in_array($o['key'], $selected)) {
$disabledOutputText[] = _formulize_OPT_OTHER . $other;
}
} else {
$t->addOption($o['key'], $o['value']);
if (in_array($o['key'], $selected)) {
$disabledOutputText[] = $o['value'];
}
if (strstr($o['value'], _formulize_OUTOFRANGE_DATA)) {
$hiddenOutOfRangeValuesToWrite[$o['key']] = str_replace(_formulize_OUTOFRANGE_DATA, "", $o['value']);
// if this is an out of range value, grab the actual value so we can stick it in a hidden element later
}
}
$t->setExtra(" onchange=\"javascript:formulizechanged=1;\" jquerytag=\"{$form_ele_id}\" ");
$form_ele1->addElement($t);
unset($t);
$counter++;
}
break;
}
$renderedHoorvs = "";
if (count($hiddenOutOfRangeValuesToWrite) > 0) {
foreach ($hiddenOutOfRangeValuesToWrite as $hoorKey => $hoorValue) {
$thisHoorv = new xoopsFormHidden('formulize_hoorv_' . $true_ele_id . '_' . $hoorKey, $hoorValue);
$renderedHoorvs .= $thisHoorv->render() . "\n";
unset($thisHoorv);
}
}
if ($isDisabled) {
//.........这里部分代码省略.........
示例8: b_ams_top_edit
function b_ams_top_edit($options)
{
global $xoopsDB;
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
$form = new XoopsFormElementTray('', '<br/><br />');
$order_select = new XoopsFormSelect(_AMS_MB_NEWS_ORDER, 'options[0]', $options[0]);
$order_select->addOption('published', _AMS_MB_NEWS_DATE);
$order_select->addOption('counter', _AMS_MB_NEWS_HITS);
$order_select->addOption('rating', _AMS_MB_NEWS_RATING);
$form->addElement($order_select);
$form->addElement(new XoopsFormText(_AMS_MB_NEWS_DISP . " x " . _AMS_MB_NEWS_ARTCLS, 'options[1]', 10, 10, $options[1]));
$form->addElement(new XoopsFormText(_AMS_MB_NEWS_CHARS . " x " . _AMS_MB_NEWS_LENGTH, 'options[2]', 10, 10, $options[2]));
$form->addElement(new XoopsFormText(_AMS_MB_NEWS_TEASER, 'options[3]', 10, 10, $options[3]));
if (!isset($options[4])) {
$topics = array(0);
} elseif (is_array($options[4])) {
$topics = $options[4];
} else {
$topics = array_slice($options, 4);
}
$topics_select = new XoopsFormSelect(_AMS_MB_TOPIC, 'options[4]', $topics, 7, true);
include_once XOOPS_ROOT_PATH . "/modules/AMS/class/class.newstopic.php";
$xt = new AmsTopic($xoopsDB->prefix("ams_topics"));
$alltopics = $xt->getAllTopics();
$topics_select->addOption(0, _AMS_MB_NEWS_ALLTOPICS);
foreach ($alltopics as $topicid => $topic) {
$topics_select->addOption($topicid, $topic->topic_title());
}
$form->addElement($topics_select);
return $form->render();
}
示例9: constructElement
//.........这里部分代码省略.........
} else {
$linked_column_values[] = strip_tags(trim($rowlinkedvaluesq[$linked_column_index]));
}
}
}
$linkedElementOptions[$rowlinkedvaluesq[0]] = implode(" - ", $linked_column_values);
}
}
$cachedSourceValuesQ[$sourceValuesQ] = $linkedElementOptions;
/* ALTERED - 20100318 - freeform - jeff/julian - start */
if (!$isDisabled and $ele_value[8] == 1) {
// write the possible values to a cached file so we can look them up easily when we need them, don't want to actually send them to the browser, since it could be huge, but don't want to replicate all the logic that has already gathered the values for us, each time there's an ajax request
$cachedLinkedOptionsFileName = "formulize_linkedOptions_" . str_replace(".", "", microtime(true));
formulize_scandirAndClean(XOOPS_ROOT_PATH . "/cache/", "formulize_linkedOptions_");
$maxLength = 10;
$the_values = array();
asort($linkedElementOptions);
foreach ($linkedElementOptions as $id => $text) {
$the_values[$id] = trans($text);
$thisTextLength = strlen($text);
$maxLength = $thisTextLength > $maxLength ? $thisTextLength : $maxLength;
}
file_put_contents(XOOPS_ROOT_PATH . "/cache/{$cachedLinkedOptionsFileName}", "<?php\n\${$cachedLinkedOptionsFileName} = " . var_export($the_values, true) . ";\n");
$cachedSourceValuesAutocompleteFile[$sourceValuesQ] = $cachedLinkedOptionsFileName;
$cachedSourceValuesAutocompleteLength[$sourceValuesQ] = $maxLength;
}
}
if ($boxproperties[2]) {
$default_value = $boxproperties[2];
$default_value_user = $cachedSourceValuesQ[$sourceValuesQ][$boxproperties[2]];
}
// if we're rendering an autocomplete box
if (!$isDisabled and $ele_value[8] == 1) {
$renderedComboBox = $this->formulize_renderQuickSelect($form_ele_id, $cachedSourceValuesAutocompleteFile[$sourceValuesQ], $default_value, $default_value_user, $cachedSourceValuesAutocompleteLength[$sourceValuesQ]);
$form_ele = new xoopsFormLabel($ele_caption, $renderedComboBox);
$form_ele->setDescription(html_entity_decode($ele_desc, ENT_QUOTES));
} elseif ($isDisabled) {
$disabledOutputText[] = $default_value_user;
}
// only do this if we're rendering a normal element, that is not disabled
if (!$isDisabled and $ele_value[8] == 0) {
$form_ele->addOptionArray($cachedSourceValuesQ[$sourceValuesQ]);
}
// only do this if we're rendering a normal element (may be disabled)
if ($ele_value[8] == 0) {
foreach ($sourceEntryIds as $thisEntryId) {
if (!$isDisabled) {
$form_ele->setValue($thisEntryId);
} else {
$disabledName = $ele_value[1] ? $form_ele_id . "[]" : $form_ele_id;
$disabledHiddenValue[] = "<input type=hidden name=\"{$disabledName}\" value=\"{$thisEntryId}\">";
$disabledOutputText[] = $cachedSourceValuesQ[$sourceValuesQ][$thisEntryId];
// the text value of the option(s) that are currently selected
}
}
}
if ($isDisabled) {
$form_ele = new XoopsFormLabel($ele_caption, implode(", ", $disabledOutputText) . implode("\n", $disabledHiddenValue));
$form_ele->setDescription(html_entity_decode($ele_desc, ENT_QUOTES));
} elseif ($ele_value[8] == 0) {
// this is a hack because the size attribute is private and only has a getSize and not a setSize, setting the size can only be done through the constructor
$count = count($form_ele->getOptions());
$size = $ele_value[0];
$new_size = $count < $size ? $count : $size;
$form_ele->_size = $new_size;
}
示例10: Array
}
$ret_ele .= '</tr></table></td><td class="even">';
$ret_ele .= _ALL . ' <input id="checkall[' . $i . ']" type="checkbox" value="" onclick="var optionids = new Array(' . implode(", ", $option_ids) . '); xoopsCheckAllElements(optionids, \'checkall[' . $i . ']\')" />';
$ret_ele .= '</td></tr></table>';
$ret_ele .= '</td></tr>';
$elements[] = $ret_ele;
}
$tray = new XoopsFormElementTray('');
$tray->addElement(new XoopsFormHidden('action', 'template_save'));
$tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
$tray->addElement(new XoopsFormButton('', 'reset', _CANCEL, 'reset'));
$ret = '<h4>' . _AM_NEWBB_PERM_TEMPLATE . '</h4>' . _AM_NEWBB_PERM_TEMPLATE_DESC . '<br /><br /><br />';
$ret .= "<form name='template' id='template' method='post'>\n<table width='100%' class='outer' cellspacing='1'>\n";
$ret .= implode("\n", $elements);
$ret .= '<tr align="left" valign="top"><td class="head"></td><td class="even">';
$ret .= $tray->render();
$ret .= '</td></tr>';
$ret .= '</table></form>';
echo $ret;
break;
case "template_save":
$res = $newbbperm_handler->setTemplate($_POST['perms'], $groupid = 0);
if ($res) {
redirect_header("admin_permissions.php?action=template", 2, _AM_NEWBB_PERM_TEMPLATE_CREATED);
} else {
redirect_header("admin_permissions.php?action=template", 2, _AM_NEWBB_PERM_TEMPLATE_ERROR);
}
break;
case "apply":
$perm_template = $newbbperm_handler->getTemplate();
if ($perm_template === null) {
示例11: b_ams_spotlight_edit
function b_ams_spotlight_edit($options)
{
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
include_once XOOPS_ROOT_PATH . "/modules/AMS/include/functions.inc.php";
global $xoopsModule;
AMS_updateCache();
if (!isset($xoopsModule) || $xoopsModule->getVar('dirname') != "AMS") {
$module_handler =& xoops_gethandler('module');
$module =& $module_handler->getByDirname("AMS");
} else {
$module =& $xoopsModule;
}
$config_handler =& xoops_gethandler('config');
$moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid'));
$templates_list = array_flip($moduleConfig['spotlight_template']);
//fix template list value lost after module update
foreach ($templates_list as $k => $v) {
$templates_list[$k] = substr($k, 20, strlen($k) - 25);
}
$form = new XoopsFormElementTray('', '<br/><br />');
$numarticles_select = new XoopsFormText(_AMS_MB_SPOT_NUMARTICLES, 'options[0]', 10, 10, $options[0]);
$form->addElement($numarticles_select);
$form->addElement(new XoopsFormRadioYN(_AMS_MB_SPOT_SHOWMINISTATS, 'options[1]', $options[1]));
//spotlight template selection
$template_select = new XoopsFormSelect(_AMS_MB_SPOTLIGHT_TEMPLATE, 'options[2]', $options[2]);
$template_select->addOptionArray($templates_list);
$template_select->setExtra("onchange='showImgSelected(\"template_preview\", \"options[2]\", \"" . '/modules/AMS/images/spotlight_preview' . "\", \".jpg\", \"" . XOOPS_URL . "\")'");
$template_select->setDescription(_AMS_MB_SPOTLIGHT_TEMPLATE_DESC);
$form->addElement($template_select);
//spotlight preview image
$imgpath = sprintf('', "modules/AMS/images/spotlight_preview/");
$form->addElement(new XoopsFormLabel('', "<br /><img src='" . XOOPS_URL . "/modules/AMS/images/spotlight_preview/" . $options[2] . ".jpg' name='template_preview' id='template_preview' alt='' />"));
return $form->render();
}
示例12: XoopsFormCheckBox
$datemin_use = 1;
}
$date_min_use = new XoopsFormCheckBox('', 'datemin_use', $datemin_use);
$date_min_use->addOption(1, _XHELP_TEXT_USE);
//No request done, set default value for form
$date_max = new XoopsFormTextDateSelect(_XHELP_TEXT_DATE_MAX, 'recieve_datemax', 10, strtotime($recieve_datemax));
if ($recieve_datemax == 0) {
$datemax_use = 1;
}
$date_max_use = new XoopsFormCheckBox('', 'datemax_use', $datemax_use);
$date_max_use->addOption(1, _XHELP_TEXT_USE);
$aff_date->addElement($date_min);
$aff_date->addElement($date_min_use);
$aff_date->addElement($date_max);
$aff_date->addElement($date_max_use);
$dateform = $aff_date->render();
$xoopsTpl->assign('dateform', $dateform);
// End of hack
// If search submitted, or moving to another page of search results, or submitted a saved search
if (isset($_POST['search']) || isset($_GET['start']) || isset($_REQUEST['savedSearch'])) {
if (isset($_REQUEST['savedSearch']) && $_REQUEST['savedSearch'] != 0) {
// If this is a saved search
if (!isset($_POST['delete_savedSearch'])) {
// If not deleting saved search
$mySavedSearch =& $hSavedSearch->get($_REQUEST['savedSearch']);
$crit = unserialize($mySavedSearch->getVar('search'));
// Set $crit object
$pagenav_vars = $mySavedSearch->getVar('pagenav_vars');
// set pagenav vars
if ($crit->getLimit() != 0) {
$limit = $crit->getLimit();
示例13: XoopsFormRadioYN
$xoopsTpl->assign("xoops_timezone", $timezone->render());
$mail = new XoopsFormRadioYN(_PROFILE_MA_MAILOK, 'user_mailok', $user_mailok);
$xoopsTpl->assign("xoops_mailok", $mail->render());
$email_option = new XoopsFormCheckBox("", "user_viewemail", $user_viewemail);
$email_option->addOption(1, _PROFILE_MA_ALLOWVIEWEMAIL);
$xoopsTpl->assign("xoops_viewemail", $email_option->render());
if ($xoopsConfigUser['reg_dispdsclmr'] != 0 && $xoopsConfigUser['reg_disclaimer'] != '') {
$xoopsTpl->assign("show_disc", 1);
$disc_tray = new XoopsFormElementTray(_PROFILE_MA_DISCLAIMER, '<br />');
$disc_text = new XoopsFormTextarea('', 'disclaimer', $xoopsConfigUser['reg_disclaimer'], 8);
$disc_text->setExtra('readonly="readonly"');
$disc_tray->addElement($disc_text);
$agree_chk = new XoopsFormCheckBox('', 'agree_disc', $agree_disc);
$agree_chk->addOption(1, _PROFILE_MA_IAGREE);
$disc_tray->addElement($agree_chk);
$xoopsTpl->assign("xoops_agree", $disc_tray->render());
}
}
if ($process == true) {
if ($entry_state_has_zones == true) {
$zones_array = array();
$zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int) $country . "' order by zone_name");
while ($zones_values = tep_db_fetch_array($zones_query)) {
$zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
}
$xoopsTpl->assign("form_state", tep_draw_pull_down_menu('state', $zones_array, $zone_id));
} else {
$xoopsTpl->assign("form_state", tep_draw_input_field('state', $state));
}
} else {
$xoopsTpl->assign("form_state", tep_draw_input_field('state', $state));