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


PHP XoopsThemeForm::render方法代码示例

本文整理汇总了PHP中XoopsThemeForm::render方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsThemeForm::render方法的具体用法?PHP XoopsThemeForm::render怎么用?PHP XoopsThemeForm::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XoopsThemeForm的用法示例。


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

示例1: salat_block_show

function salat_block_show($options)
{
    $block = array();
    $infos = salat_getInfos();
    $sform = new XoopsThemeForm(_MA_SALAT_GETPRAYERS, "form", XOOPS_URL . '/modules/salat/index.php');
    foreach ($infos as $info) {
        $options[$info['city']] = $info['city'] . ' - ' . $info['country'];
        if (isset($info['default'])) {
            $default = $info['city'];
        }
    }
    $city = isset($default) ? $default : '';
    $date = time();
    $timezone = 0;
    // City
    $element = new XoopsFormSelect(_MA_SALAT_SELECT_CITY, 'city', $city);
    $element->addOptionArray($options);
    $element->setExtra('width="100" style="width:100px;"');
    $sform->addElement($element);
    unset($element);
    $element = new XoopsFormTextDateSelect(_MA_SALAT_SELECT_DATE, 'date', 12, $date);
    //$element->setExtra('width="100" style="width:100px;"');
    $sform->addElement($element);
    unset($element);
    // Timezone
    $element = new XoopsFormSelectTimezone(_MA_SALAT_SELECT_TIMEZONE, 'timezone', $timezone);
    $element->setExtra('width="100" style="width:100px;"');
    $sform->addElement($element);
    unset($element);
    $sform->addElement(new XoopsFormButton('', 'get_prayers', _SUBMIT, 'submit'));
    $block['content'] = $sform->render();
    return $block;
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:33,代码来源:salat_block.php

示例2: XortifySignupForm

function XortifySignupForm()
{
    include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
    $form = new XoopsThemeForm(_AM_SPIDERS_FRM_TITLE, "xortify_member", "", "post");
    $form->addElement(new XoopsFormText(_AM_SPIDERS_FRM_UNAME, "uname", 35, 128, $_REQUEST['uname']));
    $form->addElement(new XoopsFormPassword(_AM_SPIDERS_FRM_PASS, "pass", 35, 128, $_REQUEST['pass']), false);
    $form->addElement(new XoopsFormPassword(_AM_SPIDERS_FRM_VPASS, "vpass", 35, 128, $_REQUEST['vpass']), false);
    $form->addElement(new XoopsFormText(_AM_SPIDERS_FRM_EMAIL, "email", 35, 128, $_REQUEST['email']));
    $form->addElement(new XoopsFormText(_AM_SPIDERS_FRM_URL, "url", 35, 128, $_REQUEST['url']));
    $form->addElement(new XoopsFormRadioYN(_AM_SPIDERS_FRM_VIEWEMAIL, "viewemail", $_REQUEST['viewemail']));
    $form->addElement(new XoopsFormSelectTimezone(_AM_SPIDERS_FRM_TIMEZONE, "timezone", $_REQUEST['timezone']));
    $xortifyAuth =& XortifyAuthFactory::getAuthConnection(false, apimethod());
    $myts =& MyTextSanitizer::getInstance();
    $disclaimer = $xortifyAuth->network_disclaimer();
    if (strlen(trim($disclaimer)) == 0) {
        $disclaimer = _AM_SPIDERS_FRM_NOSOAP_DISCLAIMER;
    }
    $form->addElement(new XoopsFormLabel(_AM_SPIDERS_FRM_DISCLAIMER, $myts->nl2br($disclaimer)));
    $form->addElement(new XoopsFormRadioYN(_AM_SPIDERS_FRM_DISCLAIMER_AGREE, "agree", false));
    $form->addElement(new XoopsFormCaptcha(_AM_SPIDERS_FRM_PUZZEL, 'xoopscaptcha', false), true);
    $form->addElement(new XoopsFormHidden('op', 'signup'));
    $form->addElement(new XoopsFormHidden('fct', 'save'));
    if ($disclaimer != _AM_SPIDERS_FRM_NOSOAP_DISCLAIMER) {
        $form->addElement(new XoopsFormButton('', 'submit', _AM_SPIDERS_FRM_REGISTER, 'submit'));
    }
    return $form->render();
}
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:27,代码来源:forms.php

示例3: edit_members_form

function edit_members_form()
{
    if (isset($_REQUEST['id'])) {
        $id = intval($_REQUEST['id']);
        $membershandler = xoops_getmodulehandler('members', 'genobio');
        $members = $membershandler->get($id);
        $category_id = $members->getVar('category_id');
        $uid = $members->getVar('uid');
        $domain = $members->getVar('domain');
        $domains = $members->getVar('domains');
        $display_name = $members->getVar('display_name');
        $display_picture = $members->getVar('display_picture');
        $member_sex = $members->getVar('member_sex');
        $title = 'Edit Members Item';
    } else {
        $category_id = 0;
        $uid = 0;
        $domain = urlencode(XOOPS_URL);
        $domains = array(0 => urlencode(XOOPS_URL));
        $display_name = '';
        $display_picture = 'current_photo';
        $title = 'New Members Item';
    }
    $form = new XoopsThemeForm($title, "edititem", "", "post");
    $form->addElement(new XoopsFormText(_GB_AM_DISPLAYNAME, "display_name", 35, 128, $display_name));
    $form->addElement(new GenobioFormSelectSex(_GB_AM_SEX, "member_sex", $member_sex, 1, false));
    $form->addElement(new GenobioFormSelectDisplayPicture(_GB_AM_DISPLAYPICTURE, "display_picture", $display_picture, 1, false));
    $form->addElement(new GenobioFormSelectCategory(_GB_AM_CATEGORY, "category_id", $category_id, 1, false));
    $form->addElement(new XoopsFormSelectUser(_GB_AM_USERNAME, "uid", true, $uid, 1, false));
    if (class_exists('XoopsFormSelectDomains')) {
        $form->addElement(new XoopsFormSelectDomains(_GB_AM_PERSONALDOMAIN, "domain", $domain, 1, false));
        $form->addElement(new XoopsFormSelectDomains(_GB_AM_ASSOCIATEDDOMAIN, "domains", $domains, 8, true));
    } else {
        $form->addElement(new XoopsFormHidden("domain", $domain));
        foreach ($domains as $key => $value) {
            $form->addElement(new XoopsFormHidden("domains[" . $key . ']', $value));
        }
    }
    $form->addElement(new XoopsFormHidden("id", $id));
    $form->addElement(new XoopsFormHidden("op", "members"));
    $form->addElement(new XoopsFormHidden("fct", "save"));
    $form->addElement(new XoopsFormButton('', 'contents_submit', _SUBMIT, "submit"));
    echo $form->render();
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:44,代码来源:members.forms.php

示例4: setup_package

function setup_package($dirname)
{
    $pkgs = new PackageList();
    $pkgs->load();
    $pkg = $pkgs->getVar($dirname);
    if (empty($pkg)) {
        $pkg = $pkgs->selectPackage($dirname);
    }
    $pname = $pkg ? $pkg['pname'] : _AM_PKG_NOCURRENT;
    // current package-name
    if ($dirname) {
        $modversion = get_modversion($dirname);
        if (empty($modversion)) {
            return;
        }
        // illigal dirname?
        $title = $modversion['name'] . " ({$dirname})";
    } else {
        $title = XOOPS_VERSION;
    }
    echo "<h1>" . htmlspecialchars($title) . "</h1>\n";
    echo "<table class='outer' border='0' cellspacing='1'>\n";
    $n = 0;
    $form = new XoopsThemeForm(_AM_REG_DETAIL, "CustomForm", 'pkgadmin.php');
    $form->addElement(new XoopsFormHidden('dirname', $dirname));
    $form->addElement(new XoopsFormLabel(_AM_PKG_NAME, $pkg['name']));
    $form->addElement(new XoopsFormLabel(_AM_PKG_DIRNAME, $dirname));
    $form->addElement(new XoopsFormLabel(_AM_PKG_CURRENT_PNAME, $pname));
    $select = new XoopsFormSelect(_AM_PKG_PNAME, 'pname');
    foreach ($pkgs->getAllPackages() as $pn => $apkg) {
        $select->addOption($pn);
    }
    $select->setValue($pname);
    $form->addElement($select);
    $form->addElement(new XoopsFormButton("", "custom", _AM_REG_SUBMIT, "submit"));
    echo $form->render();
}
开发者ID:nbuy,项目名称:xoops-modules-update,代码行数:37,代码来源:pkgadmin.php

示例5: render

 /**
  * create HTML to output the form as a theme-enabled table with validation.
  * 
  * @return	string
  */
 function render()
 {
     $ret = "\n<script type=\"text/javascript\">\n";
     $ret .= "function validDate(startDateInput, startTimeSelect, endDateInput, endTimeSelect) {\n";
     $ret .= "startDateInput = document.getElementById(startDateInput);\n";
     $ret .= "startTimeSelect = document.getElementById(startTimeSelect);\n";
     $ret .= "endDateInput = document.getElementById(endDateInput);\n";
     $ret .= "endTimeSelect = document.getElementById(endTimeSelect);\n";
     $ret .= "var pattern = new RegExp(\"-\", \"g\");\n";
     $ret .= "var startDateString = startDateInput.value;\n";
     $ret .= "var startDateArray = startDateString.split(pattern);\n";
     $ret .= "var startDate = new Date(startDateArray[0], startDateArray[2], startDateArray[1]);\n";
     $ret .= "var endDateString = endDateInput.value;\n";
     $ret .= "var endDateArray = endDateString.split(pattern);\n";
     $ret .= "var endDate = new Date(endDateArray[0], endDateArray[2], endDateArray[1]);\n";
     $ret .= "if((startDate.getTime() + startTimeSelect.options[startTimeSelect.selectedIndex].value) > (endDate.getTime() + endTimeSelect.options[endTimeSelect.selectedIndex].value)) {\n";
     $ret .= "endDateInput.value = startDateInput.value;\n";
     $ret .= "endTimeSelect.selectedIndex = startTimeSelect.selectedIndex;\n";
     $ret .= "}\n";
     $ret .= "}\n";
     $ret .= "</script>\n";
     $ret .= parent::render();
     return $ret;
 }
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:29,代码来源:extcalform.php

示例6: defacer_form

function defacer_form($itemid = 0)
{
    $defacer =& DefacerDefacer::getInstance();
    $obj = $defacer->getHandler('page')->get($itemid);
    if ($obj->isNew()) {
        $ftitle = _EDIT;
    } else {
        $ftitle = _ADD;
    }
    $form = new XoopsThemeForm($ftitle, 'page_form', basename(__FILE__), 'post', true);
    $mid = new XoopsFormSelect(_AM_DEFACER_PAGE_MODULE, 'page_moduleid', $obj->getVar('page_moduleid', 'e'));
    $mid->customValidationCode[] = 'var value = document.getElementById(\'page_moduleid\').value; if (value == 0){alert("' . _AM_DEFACER_SELECTMODULE_ERR . '"); return false;}';
    $module_handler =& xoops_gethandler('module');
    $criteria = new CriteriaCompo(new Criteria('hasmain', 1));
    $criteria->add(new Criteria('isactive', 1));
    //$criteria->setSort('name');
    //$criteria->setOrder('ASC'); xoopsModule does not accpet this :(
    $moduleslist = $module_handler->getList($criteria);
    $module = $module_handler->get(1);
    $list = array($module->getVar('mid') => $module->getVar('name'));
    $moduleslist = $list + $moduleslist;
    $mid->addOptionArray($moduleslist);
    $form->addElement($mid, true);
    $form->addElement(new XoopsFormText(_AM_DEFACER_PAGE_TITLE, 'page_title', 50, 255, $obj->getVar('page_title', 'e')), true);
    $furl = new XoopsFormText(_AM_DEFACER_PAGE_URL, 'page_url', 50, 255, $obj->getVar('page_url', 'e'));
    $furl->setDescription(_AM_DEFACER_PAGE_URL_DESC);
    $form->addElement($furl, true);
    $form->addElement(new XoopsFormRadioYN(_AM_DEFACER_PAGE_DISPLAY, 'page_status', $obj->getVar('page_status', 'e'), _YES, _NO));
    $tray = new XoopsFormElementTray('', '');
    $tray->addElement(new XoopsFormButton('', 'defacer_button', _SUBMIT, 'submit'));
    $btn = new XoopsFormButton('', 'reset', _CANCEL, 'button');
    if (!$obj->isNew()) {
        $btn->setExtra('onclick="document.location.href=\'' . basename(__FILE__) . '\'"');
    } else {
        $btn->setExtra('onclick="document.getElementById(\'form\').style.display = \'none\'; return false;"');
    }
    $tray->addElement($btn);
    $form->addElement($tray);
    if (!$obj->isNew()) {
        $form->addElement(new XoopsFormHidden('op', 'editok'));
        $form->addElement(new XoopsFormHidden('itemid', $itemid));
    } else {
        $form->addElement(new XoopsFormHidden('op', 'add'));
    }
    return $form->render();
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:46,代码来源:admin_page.php

示例7: XoopsFormText

$formyear = new XoopsFormText(_MD_DEBASER_YEAR, 'year', 4, 4);
$fileform->addElement($formyear);
include_once XOOPS_ROOT_PATH . '/fck/fckeditor.php';
$oFCKeditor = new FCKeditor('comment');
$oFCKeditor->Value = '';
$oFCKeditor->Height = '200';
$fileform->addElement(new XoopsFormLabel(_MD_DEBASER_COMMENT, $oFCKeditor->CreateHTML()));
//$formcomment = new XoopsFormDhtmlTextArea(_MD_DEBASER_COMMENT, 'comment', '', 10, 50);
//$fileform->addElement($formcomment);
if ($xoopsModuleConfig['autogenresingle'] != 1) {
    $mytreechose = new debaserTree($xoopsDB->prefix("debaser_genre"), 'genreid', 'subgenreid');
    ob_start();
    $mytreechose->debaserSelBox("genretitle", "genretitle", 0, 1, "genrefrom");
    $formgenre = new XoopsFormLabel(_MD_DEBASER_GENRE, ob_get_contents());
    ob_end_clean();
    $fileform->addElement($formgenre);
}
$formtrack = new XoopsFormText(_MD_DEBASER_TRACK, 'track', 3, 3);
$fileform->addElement($formtrack);
$formlength = new XoopsFormText(_MD_DEBASER_LENGTH, 'length', 5, 5);
$fileform->addElement($formlength);
$formbitrate = new XoopsFormText(_MD_DEBASER_BITRATE, 'bitrate', 3, 3);
$fileform->addElement($formbitrate);
$formfrequence = new XoopsFormText(_MD_DEBASER_FREQUENCY, 'frequence', 5, 5);
$fileform->addElement($formfrequence);
$op_hidden = new XoopsFormHidden('op', 'extfile');
$fileform->addElement($op_hidden);
$submit_button = new XoopsFormButton("", "filesubmit", _SUBMIT, "submit");
$fileform->addElement($submit_button);
$xoopsTpl->assign('extfileform', $fileform->render());
include_once XOOPS_ROOT_PATH . '/footer.php';
开发者ID:artistafrustrado,项目名称:debaser-diaadiaeducacao,代码行数:31,代码来源:upload.php

示例8: defacer_form

function defacer_form($itemid = 0)
{
    $defacer =& DefacerDefacer::getInstance();
    $obj = $defacer->getHandler('permission')->get($itemid);
    if ($obj->isNew()) {
        $ftitle = _EDIT;
    } else {
        $ftitle = _ADD;
    }
    $form = new XoopsThemeForm($ftitle, 'permission_form', basename(__FILE__), 'post', true);
    $page_select = new XoopsFormSelect(_AM_DEFACER_PAGE, 'permission_id', $obj->getVar('permission_id', 'e'));
    $page_select->customValidationCode[] = 'var value = document.getElementById(\'permission_id\').value; if (value == 0){alert("' . _AM_DEFACER_SELECTPAGE_ERR . '"); return false;}';
    $criteria = new CriteriaCompo(new Criteria('page_status', 1));
    $criteria->setSort('name');
    $criteria->setOrder('ASC');
    $pageslist = $defacer->getHandler('page')->getList($criteria);
    $list = array('0' => '--------------------------');
    $pageslist = $list + $pageslist;
    $page_select->addOptionArray($pageslist);
    $form->addElement($page_select, true);
    $form->addElement(new XoopsFormSelectGroup(_AM_DEFACER_PERMISSION_GROUPS, 'permission_groups', true, $obj->getVar('permission_groups', 'e'), 8, true));
    $tray = new XoopsFormElementTray('', '');
    $tray->addElement(new XoopsFormButton('', 'defacer_button', _SUBMIT, 'submit'));
    $btn = new XoopsFormButton('', 'reset', _CANCEL, 'button');
    if (!$obj->isNew()) {
        $btn->setExtra('onclick="document.location.href=\'' . basename(__FILE__) . '\'"');
    } else {
        $btn->setExtra('onclick="document.getElementById(\'form\').style.display = \'none\'; return false;"');
    }
    $tray->addElement($btn);
    $form->addElement($tray);
    if (!$obj->isNew()) {
        $form->addElement(new XoopsFormHidden('op', 'editok'));
        $form->addElement(new XoopsFormHidden('itemid', $itemid));
    } else {
        $form->addElement(new XoopsFormHidden('op', 'add'));
    }
    return $form->render();
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:39,代码来源:admin_permission.php

示例9: XoopsFormElementTray

$button_tray = new XoopsFormElementTray('', '');
//upload
if ($view_perms & GPERM_UP) {
    $indeximage_up = new XoopsFormFile('', 'fileup', $xoopsModuleConfig['mimemax']);
    $indeximage_uptray = new XoopsFormElementTray(_MP_MIMEFILE, '&nbsp;');
    $indeximage_uptray->addElement($indeximage_up);
    $indeximage_uptray->addElement(new XoopsFormLabel('', '<br />' . _MP_MIMETYPE2 . mp_mimetypes() . '<br />' . _MP_MIME . sprintf(_MD_NUMBYTES, $xoopsModuleConfig['mimemax'])));
    $form->addElement($indeximage_uptray);
    $up_tray = new XoopsFormElementTray(_MP_MIMEFILE, '&nbsp;');
    $up_tray->addElement(new XoopsFormLabel('', "<div id=\"files_list\"></div>\r\n<script>\r\n\tvar multi_selector = new MultiSelector( document.getElementById( 'files_list' ), " . $xoopsModuleConfig['upmax'] . " );\r\n\tmulti_selector.addElement( document.getElementById( 'fileup' ) );\r\n</script>"));
    $form->addElement($up_tray);
}
//
$post_button = new XoopsFormButton('', 'post_messages', _MP_SUBMIT, "submit");
$button_tray->addElement($post_button);
// quote
if ($reply == 1) {
    $quote_button = new XoopsFormButton('', 'quote', _MP_QUOTE, 'button');
    $quote_button->setExtra("onclick='xoopsGetElementById(\"message\").value=xoopsGetElementById(\"message\").value+ xoopsGetElementById(\"hidden_quote\").value;xoopsGetElementById(\"hidden_quote\").value=\"\";'");
    $button_tray->addElement($quote_button);
}
//
$button_tray->addElement(new XoopsFormButton('', 'reset', _MP_CLEAR, 'reset'));
$form->addElement($button_tray);
$form->addElement(new XoopsFormHidden('hidden_quote', $hidden_quote));
$form_formtype = new XoopsFormHidden("formtype", $formtype);
$form->addElement($form_formtype);
$msg_hidden = new XoopsFormHidden("msg_mp", $msg_mp);
$form->addElement($msg_hidden);
@($content .= $form->render());
$xoopsTpl->assign('mp_form', $content);
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:form.inc.php

示例10: XoopsFormHidden

	$forum_form->addElement(new XoopsFormHidden('topic_id', $topic_id));
	$forum_form->addElement(new XoopsFormHidden('forum', $forum_id));
	$forum_form->addElement(new XoopsFormHidden('viewmode', $viewmode));
	$forum_form->addElement(new XoopsFormHidden('order', $order));
	$forum_form->addElement(new XoopsFormHidden('start', $start));

	// backward compatible
	if(!class_exists("XoopsSecurity")){
		$post_valid = 1;
		$_SESSION['submit_token'] = $post_valid;
		$forum_form->addElement(new XoopsFormHidden('post_valid', $post_valid));
	}

	$forum_form->addElement(new XoopsFormHidden('notify', -1));
	$forum_form->addElement(new XoopsFormHidden('contents_submit', 1));
	$submit_button = new XoopsFormButton('', 'quick_submit', _SUBMIT, "submit");
	$submit_button->setExtra('onclick="if(document.forms.quick_reply.message.value == \'RE\' || document.forms.quick_reply.message.value == \'\'){ alert(\''._MD_QUICKREPLY_EMPTY.'\'); return false;}else{ return true;}"');
	$button_tray = new XoopsFormElementTray('');
	$button_tray->addElement($submit_button);
	$forum_form->addElement($button_tray);

	$toggles = forum_getcookie('G', true);
	$display = (in_array('qr', $toggles)) ? 'none;' : 'block;';
    $xoopsTpl->assign('quickreply', array( 'show' => 1, 'display'=>$display, 'icon'=>forum_displayImage($xforumImage['t_qr']), 'form' => $forum_form->render()));
	unset($forum_form);
}else{
	$xoopsTpl->assign('quickreply', array( 'show' => 0));
}

include XOOPS_ROOT_PATH.'/footer.php';
?>
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:viewtopic.php

示例11: XoopsFormText

            $formulario->addElement(new XoopsFormText("Name:", "usuario[Nome]", 50, 100, $tmp['name']));
            $formulario->addElement(new XoopsFormText("E-mail:", "usuario[Email]", 50, 100, $tmp['email']));
            $formulario->addElement(new XoopsFormText("Username:", "usuario[Login]", 20, 20, $tmp['username']));
            $formulario->addElement(new XoopsFormPassword("Password:", "usuario[Senha]", 20, 32, $tmp['password']));
            $formulario->addElement(new XoopsFormHidden("usuario[SenhaTmp]", $tmp['password']));
            $administrador = new XoopsFormCheckBox("Administrator:", "usuario[Administrador]", $tmp['administrator'] ? "true" : "");
            $administrador->addOption("true", " ");
            $formulario->addElement($administrador);
            $coordenador = new XoopsFormCheckBox("Coordinator:", "usuario[Coordenador]", $tmp['coordinator'] ? "true" : "");
            $coordenador->addOption("true", " ");
            $formulario->addElement($coordenador);
            $tray2 = new XoopsFormElementTray("", "table", "", "right");
            $tray2->addElement(new XoopsFormButton("", "excluirusuario", "Disable", "submit", true));
            $tray2->addElement(new XoopsFormButton("", "salvarusuario", "Save", "submit", true));
            $formulario->addElement($tray2);
            $smarty->assign("formulario", $formulario->render());
            $smarty->assign("display_conteudo", "formulariopadrao");
            finaliza_request();
            break;
        default:
    }
}
$sql = "select * from collaborator where active = 1 order by name";
$db->query($sql);
$usuarios = array();
while ($tmp = $db->fetch_assoc()) {
    $usuarios[] = $tmp;
}
$smarty->assign("usuarios", $usuarios);
$smarty->assign("display_conteudo", "modulo_usuarios_index");
finaliza_request();
开发者ID:mohamedbiniz,项目名称:qualityranking,代码行数:31,代码来源:usuarios.php

示例12: XoopsFormLabel

        $sform->addElement(new XoopsFormLabel(_OLEDRION_STREET, $commande->getVar('cmd_adress')));
        $sform->addElement(new XoopsFormLabel(_OLEDRION_CP, $commande->getVar('cmd_zip')));
        $sform->addElement(new XoopsFormLabel(_OLEDRION_CITY, $commande->getVar('cmd_town')));
        $sform->addElement(new XoopsFormLabel(_OLEDRION_COUNTRY, $countries[$commande->getVar('cmd_country')]));
        $sform->addElement(new XoopsFormLabel(_OLEDRION_PHONE, $commande->getVar('cmd_telephone')));
        $sform->addElement(new XoopsFormLabel(_OLEDRION_EMAIL, $commande->getVar('cmd_email')));
        if (oledrion_utils::getModuleOption('ask_vatnumber')) {
            $sform->addElement(new XoopsFormLabel(_OLEDRION_VAT_NUMBER, $commande->getVar('cmd_vat_number')));
        }
        if ($commande->getVar('cmd_bill') == 0) {
            $sform->addElement(new XoopsFormLabel(_OLEDRION_INVOICE, _NO));
        } else {
            $sform->addElement(new XoopsFormLabel(_OLEDRION_INVOICE, _YES));
        }
        $button_tray = new XoopsFormElementTray('', '');
        if (oledrion_utils::getModuleOption('offline_payment') == 1 && isset($_POST['offline_payment']) && intval($_POST['offline_payment']) == 0 || $commandAmountTTC == 0) {
            $submit_btn = new XoopsFormButton('', 'post', _OLEDRION_FINISH, 'submit');
        } else {
            $submit_btn = new XoopsFormButton('', 'post', _OLEDRION_PAY_GATEWAY, 'submit');
        }
        $button_tray->addElement($submit_btn);
        $sform->addElement($button_tray);
        $xoopsTpl->assign('form', $sform->render());
        break;
}
$xoopsTpl->assign('global_advert', oledrion_utils::getModuleOption('advertisement'));
$xoopsTpl->assign('breadcrumb', oledrion_utils::breadcrumb(array(OLEDRION_URL . basename(__FILE__) => _OLEDRION_VALIDATE_CMD)));
$title = _OLEDRION_VALIDATE_CMD . ' - ' . oledrion_utils::getModuleName();
oledrion_utils::setMetas($title, $title);
oledrion_utils::setCSS();
require_once XOOPS_ROOT_PATH . '/footer.php';
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:checkout.php

示例13: singleupload

function singleupload()
{
    require_once XOOPS_ROOT_PATH . '/class/template.php';
    if (!isset($xoopsTpl)) {
        $xoopsTpl = new XoopsTpl();
    }
    global $xoopsDB, $xoopsModuleConfig, $xoopsUser, $xoopsModule;
    $xoopsTpl->assign('uploadmax', $xoopsModuleConfig['debasermaxsize']);
    debaseradminMenu(4, _AM_DEBASER_SINGLEUP);
    echo "<br />";
    $fileform = new XoopsThemeForm(_MD_DEBASER_ADDMPEG, 'extfile', xoops_getenv('PHP_SELF'));
    if ($xoopsModuleConfig['debaserupsel'] == 1 || $xoopsModuleConfig['debaserupsel'] == 3) {
        $fileform->setExtra('enctype="multipart/form-data"');
    }
    $xfid = isset($_POST['xfid']) ? $_POST['xfid'] : 0;
    $member_handler =& xoops_gethandler('member');
    $group_list =& $member_handler->getGroupList();
    $gperm_handler =& xoops_gethandler('groupperm');
    $groups = $gperm_handler->getGroupIds('DebaserFilePerm', $xfid, $xoopsModule->getVar('mid'));
    $groups = $groups;
    if ($xoopsModuleConfig['usefileperm'] == 1) {
        $fileform->addElement(new XoopsFormSelectGroup(_AM_DEBASER_FCATEGORY_GROUPPROMPT, "groups", true, $groups, 5, true));
    }
    if ($xoopsModuleConfig['debaserupsel'] == 1 || $xoopsModuleConfig['debaserupsel'] == 3) {
        $fileform->addElement(new XoopsFormFile(_AM_DEBASER_FILE, 'mp3file', 0));
    }
    if ($xoopsModuleConfig['debaserupsel'] == 2 || $xoopsModuleConfig['debaserupsel'] == 3) {
        $formlink = new XoopsFormText(_MD_DEBASER_EXTLINK, 'link', 50, 255);
        $fileform->addElement($formlink);
    }
    $formtitle = new XoopsFormText(_MD_DEBASER_TITLE, 'title', 50, 100);
    $fileform->addElement($formtitle);
    //$formalbum = new XoopsFormText(_MD_DEBASER_ALBUM, 'album', 50, 50);
    //$fileform->addElement($formalbum);
    //$formyear = new XoopsFormText(_MD_DEBASER_YEAR, 'year', 4, 4);
    //$fileform->addElement($formyear);
    include_once XOOPS_ROOT_PATH . '/fck/fckeditor.php';
    $oFCKeditor = new FCKeditor('comment');
    $oFCKeditor->Value = '';
    $oFCKeditor->Height = '200';
    $fileform->addElement(new XoopsFormLabel(_MD_DEBASER_COMMENT, $oFCKeditor->CreateHTML()));
    //$formcomment = new XoopsFormDhtmlTextArea(_MD_DEBASER_COMMENT, 'comment', '', 10, 50);
    //$fileform->addElement($formcomment);
    if ($xoopsModuleConfig['autogenresingle'] != 1) {
        $mytreechose = new debaserTree($xoopsDB->prefix("debaser_genre"), 'genreid', 'subgenreid');
        ob_start();
        $mytreechose->debaserSelBox("genretitle", "genretitle", 0, 1, "genrefrom");
        $formgenre = new XoopsFormLabel(_MD_DEBASER_GENRE, ob_get_contents());
        ob_end_clean();
        $fileform->addElement($formgenre, true);
    }
    //$formtrack = new XoopsFormText(_MD_DEBASER_TRACK, 'track', 3, 3);
    //$fileform->addElement($formtrack);
    //$formartist = new XoopsFormText(_MD_DEBASER_TAMANHO, 'artist', 15, 50);
    //$fileform->addElement($formartist, true);
    $formalbum = new XoopsFormText(_MD_DEBASER_TAMANHO, 'album', 15, 50);
    $fileform->addElement($formalbum, true);
    $formlength = new XoopsFormText(_MD_DEBASER_LENGTH, 'length', 5, 5);
    $fileform->addElement($formlength, true);
    //$formbitrate = new XoopsFormText(_MD_DEBASER_BITRATE, 'bitrate', 3, 3);
    //$fileform->addElement($formbitrate);
    //$formfrequence = new XoopsFormText(_MD_DEBASER_FREQUENCY, 'frequence', 5, 5);
    //$fileform->addElement($formfrequence);
    $formweight = new XoopsFormText(_AM_DEBASER_WEIGHT, 'weight', 4, 4, 0);
    $fileform->addElement($formweight);
    $op_hidden = new XoopsFormHidden('op', 'extfile');
    $fileform->addElement($op_hidden);
    $submit_button = new XoopsFormButton("", "filesubmit", _SUBMIT, "button");
    $submit_button->setExtra("onclick=\"if(document.extfile.genrefrom.options[document.extfile.genrefrom.selectedIndex].value=='0') alert('Selecione categoria'); else submit();\"");
    $fileform->addElement($submit_button);
    $xoopsTpl->assign('extfileform', $fileform->render());
    $xoopsTpl->display('db:debaser_amupload.html');
}
开发者ID:artistafrustrado,项目名称:debaser-diaadiaeducacao,代码行数:73,代码来源:upload.php

示例14: mymenus_admin_form

function mymenus_admin_form($id = null, $pid = null)
{
    global $menu_id;
    $registry =& MymenusRegistry::getInstance();
    $plugin =& MymenusPlugin::getInstance();
    $this_handler =& xoops_getModuleHandler('menu', 'mymenus');
    $objArray = array();
    if (isset($id)) {
        $ftitle = _EDIT;
        $obj = $this_handler->get($id);
        $objArray = $obj->getValues();
    } else {
        $ftitle = _ADD;
        $obj = $this_handler->create();
        $objArray = $obj->getValues();
        if (isset($pid)) {
            $objArray['pid'] = $pid;
        }
    }
    $form = new XoopsThemeForm($ftitle, 'admin_form', $GLOBALS['mymenus_adminpage'], "post", true);
    $formtitle = new XoopsFormText(_AM_MYMENUS_MENU_TITLE, 'title', 50, 255, $objArray['title']);
    $formalttitle = new XoopsFormText(_AM_MYMENUS_MENU_ALTTITLE, 'alt_title', 50, 255, $objArray['alt_title']);
    $formlink = new XoopsFormText(_AM_MYMENUS_MENU_LINK, 'link', 50, 255, $objArray['link']);
    /*$plugin->triggerEvent('FormLinkDescription');
      $formlink->setDescription($registry->getEntry('form_link_description'));  */
    $formimage = new XoopsFormText(_AM_MYMENUS_MENU_IMAGE, 'image', 50, 255, $objArray['image']);
    $criteria = new CriteriaCompo(new Criteria('mid', $menu_id));
    $criteria->add(new Criteria('id', $id, '<>'));
    // $criteria->add(new Criteria('pid', 0));
    $criteria->setSort('weight');
    $criteria->setOrder('ASC');
    $results = $this_handler->getAll($criteria, array('title', 'id', 'pid'));
    include_once $GLOBALS['xoops']->path('class/tree.php');
    $parent_tree = new XoopsObjectTree($results, 'id', 'pid');
    $parent_select = $parent_tree->makeSelBox('pid', 'title', '-- ', $objArray['pid'], true);
    $formparent = new XoopsFormLabel(_AM_MYMENUS_MENU_PARENT, $parent_select);
    $formvis = new XoopsFormSelect(_AM_MYMENUS_MENU_VISIBLE, "visible", $objArray['visible']);
    $formvis->addOption("0", _NO);
    $formvis->addOption("1", _YES);
    $formtarget = new XoopsFormSelect(_AM_MYMENUS_MENU_TARGET, "target", $objArray['target']);
    $formtarget->addOption("_self", _AM_MYMENUS_MENU_TARG_SELF);
    $formtarget->addOption("_blank", _AM_MYMENUS_MENU_TARG_BLANK);
    $formtarget->addOption("_parent", _AM_MYMENUS_MENU_TARG_PARENT);
    $formtarget->addOption("_top", _AM_MYMENUS_MENU_TARG_TOP);
    $formgroups = new XoopsFormSelectGroup(_AM_MYMENUS_MENU_GROUPS, "groups", true, $objArray['groups'], 5, true);
    $formgroups->setDescription(_AM_MYMENUS_MENU_GROUPS_HELP);
    //$formhooks = new XoopsFormTextArea(_AM_MYMENUS_MENU_HOOKS, "hooks", $objArray['hooks'], 7, 60);
    $formhooks = new XoopsFormSelect(_AM_MYMENUS_MENU_ACCESS_FILTER, "hooks", $objArray['hooks'], 5, true);
    $plugin->triggerEvent('AccessFilter');
    $results = $registry->getEntry('access_filter');
    if ($results) {
        foreach ($results as $result) {
            $formhooks->addOption($result['method'], $result['name']);
        }
    }
    $formcss = new XoopsFormText(_AM_MYMENUS_MENU_CSS, 'css', 50, 255, $objArray['css']);
    $form->addElement($formtitle, true);
    $form->addElement($formalttitle);
    $form->addElement($formlink);
    $form->addElement($formimage);
    $form->addElement($formparent);
    $form->addElement($formvis);
    $form->addElement($formtarget);
    $form->addElement($formgroups);
    $form->addElement($formhooks);
    $form->addElement($formcss);
    //$form->addElement($formhooks2);
    $tray = new XoopsFormElementTray('', '');
    $tray->addElement(new XoopsFormButton('', 'submit_button', _SUBMIT, 'submit'));
    $btn = new XoopsFormButton('', 'reset', _CANCEL, 'button');
    if (isset($id)) {
        $btn->setExtra('onclick="document.location.href=\'' . $GLOBALS['mymenus_adminpage'] . '?op=list&amp;menu_id=' . $menu_id . ' \'"');
    } else {
        $btn->setExtra('onclick="document.getElementById(\'addform\').style.display = \'none\'; return false;"');
    }
    $tray->addElement($btn);
    $form->addElement($tray);
    if (isset($id)) {
        $form->addElement(new XoopsFormHidden('op', 'editok'));
        $form->addElement(new XoopsFormHidden('id', $id));
    } else {
        $form->addElement(new XoopsFormHidden('op', 'add'));
    }
    $form->addElement(new XoopsFormHidden('mid', $menu_id));
    return $form->render();
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:86,代码来源:admin_menu.php

示例15: user_form

function user_form($id = null)
{
    global $xoopsUser, $xoopsConfig, $xoopsModuleConfig;
    include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
    $this_handler =& xoops_getModuleHandler('user', 'subscribers');
    if (isset($id)) {
        $obj = $this_handler->get($id);
    }
    if (@is_object($obj)) {
        $title = _EDIT;
        $name = $obj->getVar('user_name', 'e');
        $email = $obj->getVar('user_email', 'e');
        $country = $obj->getVar('user_country', 'e');
        $phone = $obj->getVar('user_phone', 'e');
    } else {
        $title = _ADD;
        $name = '';
        $email = '';
        $phone = '';
        $country = $xoopsModuleConfig['country'];
    }
    $form = new XoopsThemeForm($title, 'user_form', 'admin_user.php', "post", true);
    include_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
    $countries = XoopsLists::getCountryList();
    unset($countries[""]);
    $element = new XoopsFormSelect(_AM_SUBSCRIBERS_COUNTRY, 'user_country', $country);
    $element->addOptionArray($countries);
    $form->addElement($element);
    unset($element);
    $form->addElement(new XoopsFormText(_AM_SUBSCRIBERS_NAME, 'user_name', 50, 50, $name));
    $form->addElement(new XoopsFormText(_AM_SUBSCRIBERS_EMAIL, 'user_email', 50, 50, $email));
    $form->addElement(new XoopsFormText(_AM_SUBSCRIBERS_PHONE, 'user_phone', 50, 50, $phone));
    $tray = new XoopsFormElementTray('', '');
    $tray->addElement(new XoopsFormButton('', 'submit_button', _SUBMIT, 'submit'));
    $btn = new XoopsFormButton('', 'reset', _CANCEL, 'button');
    if (@is_object($obj)) {
        $btn->setExtra('onclick="document.location.href=\'admin_user.php?op=list\'"');
    } else {
        $btn->setExtra('onclick="document.getElementById(\'user_form\').style.display = \'none\'; return false;"');
    }
    $tray->addElement($btn);
    $form->addElement($tray);
    if (@is_object($obj)) {
        $form->addElement(new XoopsFormHidden('op', 'editok'));
        $form->addElement(new XoopsFormHidden('id', $id));
    } else {
        $form->addElement(new XoopsFormHidden('op', 'add'));
    }
    return $form->render();
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:50,代码来源:admin_user.php


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