本文整理汇总了PHP中XoopsThemeForm类的典型用法代码示例。如果您正苦于以下问题:PHP XoopsThemeForm类的具体用法?PHP XoopsThemeForm怎么用?PHP XoopsThemeForm使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了XoopsThemeForm类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: brandForm
function brandForm($action = false)
{
global $xoopsModuleConfig;
if ($action === false) {
$action = $_SERVER['REQUEST_URI'];
}
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
$country_handler = xoops_getmodulehandler('country', 'catalog');
$title = $this->isNew() ? _AM_CATALOG_ADDBRAND : _AM_CATALOG_UPDATEBRAND;
$form = new XoopsThemeForm($title, 'form', $action, 'post', true);
$form->setExtra('enctype="multipart/form-data"');
$form->addElement(new XoopsFormText(_AM_CATALOG_BRANDNAME, 'brand_name', 60, 255, $this->getVar('brand_name')), true);
$countys =& $country_handler->getList();
$county_select = new XoopsFormSelect(_AM_CATALOG_CHOICECOUNTRY, "country_id", $this->getVar("country_id"));
$county_select->addOption('', _AM_CATALOG_CHOICE);
$county_select->addOptionArray($countys);
$form->addElement($county_select);
$configs = array('editor' => 'fckeditor', 'width' => '100%', 'height' => '150px', 'value' => $this->getVar('brand_description'));
$form->addElement(new XoopsFormEditor(_AM_CATALOG_BRANDDESC, 'brand_description', $configs, $nohtml = false, $OnFailure = ""));
if ($this->isNew()) {
$form->addElement(new XoopsFormHidden('brand_published', time()));
}
$form->addElement(new XoopsFormHidden('brand_id', $this->getVar('brand_id')));
$form->addElement(new XoopsFormHidden('ac', 'save'));
$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
return $form;
}
开发者ID:RanLee,项目名称:Xoops_demo,代码行数:27,代码来源:brand.php
示例2: getFormInfofields
/**
* Get form
*
* @param bool|mixed $action
* @return XoopsThemeForm
*/
public function getFormInfofields($action = false)
{
global $xoopsUser;
if ($action === false) {
$action = $_SERVER['REQUEST_URI'];
}
// Title
$title = $this->isNew() ? sprintf(_AM_WGTEAMS_INFOFIELD_ADD) : sprintf(_AM_WGTEAMS_INFOFIELD_EDIT);
// Get Theme Form
xoops_load('XoopsFormLoader');
$form = new XoopsThemeForm($title, 'form', $action, 'post', true);
$form->setExtra('enctype="multipart/form-data"');
// Infofields handler
//$infofieldsHandler = $this->wgteams->getHandler('infofields');
// Form Text AddField_name
$form->addElement(new XoopsFormText(_AM_WGTEAMS_INFOFIELD_NAME, 'infofield_name', 50, 255, $this->getVar('infofield_name')), true);
// Form Select User
$submitter = $this->isNew() ? $xoopsUser->getVar('uid') : $this->getVar('infofield_submitter');
$form->addElement(new XoopsFormSelectUser(_AM_WGTEAMS_SUBMITTER, 'infofield_submitter', false, $submitter, 1, false));
// Form Text Date Select
$form->addElement(new XoopsFormTextDateSelect(_AM_WGTEAMS_DATE_CREATE, 'infofield_date_created', '', $this->getVar('infofield_date_created')));
// Send
$form->addElement(new XoopsFormHidden('op', 'save'));
$form->addElement(new XoopsFormButtonTray('', _SUBMIT, 'submit', '', false));
return $form;
}
开发者ID:ggoffy,项目名称:wgteams,代码行数:32,代码来源:infofields.php
示例3: getForm
/**
* Get a {@link XoopsForm} object for creating/editing Spotlight articles
*
* @return object
*/
function getForm($action = false)
{
if ($action === false) {
$action = $_SERVER['REQUEST_URI'];
}
$title = _AMS_AM_SPOTLIGHT;
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
include_once XOOPS_ROOT_PATH . "/modules/AMS/class/formimageselect.php";
$form = new XoopsThemeForm($title, 'spotlightform', $action);
if (!$this->isNew()) {
$form->addElement(new XoopsFormHidden('id', $this->getVar('spotlightid')));
}
$mode_select = new XoopsFormRadio('', 'mode', $this->getVar('mode'));
$mode_select->addOption(1, _AMS_AM_SPOT_LATESTARTICLE);
$mode_select->addOption(2, _AMS_AM_SPOT_LATESTINTOPIC);
$mode_select->addOption(3, _AMS_AM_SPOT_SPECIFICARTICLE);
$mode_select->addOption(4, _AMS_AM_SPOT_CUSTOM);
include_once XOOPS_ROOT_PATH . "/class/tree.php";
include_once XOOPS_ROOT_PATH . "/modules/AMS/class/class.newstopic.php";
include_once XOOPS_ROOT_PATH . "/modules/AMS/class/class.newsstory.php";
$xt = new AmsTopic($GLOBALS['xoopsDB']->prefix("ams_topics"));
$allTopics = $xt->getAllTopics();
$topic_obj_tree = new XoopsObjectTree($allTopics, 'topic_id', 'topic_pid');
$topic_select = new XoopsFormLabel(_AMS_AM_TOPIC, $topic_obj_tree->makeSelBox('topicid', 'topic_title', '--', $this->getVar('topicid'), false));
$topic_select->setDescription(_AMS_AM_SPOT_TOPIC_DESC);
$article_select = new XoopsFormSelect(_AMS_AM_ARTICLE, 'storyid', $this->getVar('storyid'));
$article_select->addOptionArray(AmsStory::getAllPublished($GLOBALS['xoopsModuleConfig']['spotlight_art_num'], 0, false, 0, 1, false));
$article_select->setDescription(_AMS_AM_SPOT_ARTICLE_DESC);
$mode_tray = new XoopsFormElementTray(_AMS_AM_SPOT_MODE_SELECT);
$mode_tray->addElement($mode_select);
$showimage_select = new XoopsFormRadio(_AMS_AM_SPOT_SHOWIMAGE, 'showimage', $this->getVar('showimage'));
$showimage_select->addOption(0, _AMS_AM_SPOT_SPECIFYIMAGE);
$showimage_select->addOption(1, _AMS_AM_SPOT_TOPICIMAGE);
$showimage_select->addOption(2, _AMS_AM_SPOT_AUTHORIMAGE);
$showimage_select->addOption(3, _AMS_AM_SPOT_NOIMAGE);
$showimage_select->setDescription(_AMS_AM_SPOT_SHOWIMAGE_DESC);
$image_select = new XoopsFormImageSelect(_AMS_AM_SPOT_IMAGE, 'image', $this->getVar('image', 'e'), 70, 255);
$autoteaser_select = new XoopsFormRadioYN(_AMS_AM_SPOT_AUTOTEASER, 'autoteaser', $this->getVar('autoteaser'));
$teaser_text = new XoopsFormDhtmlTextArea(_AMS_AM_SPOT_TEASER, 'teaser', $this->getVar('teaser', 'e'));
$maxlength_text = new XoopsFormText(_AMS_AM_SPOT_MAXLENGTH, 'maxlength', 10, 10, $this->getVar('maxlength'));
$display_select = new XoopsFormRadioYN(_AMS_AM_SPOT_DISPLAY, 'display', $this->getVar('display'));
$weight_text = new XoopsFormText(_AMS_AM_SPOT_WEIGHT, 'weight', 10, 10, $this->getVar('weight'));
$form->addElement($mode_tray);
$form->addElement($topic_select);
$form->addElement($article_select);
$form->addElement($showimage_select);
$form->addElement($image_select);
$form->addElement($autoteaser_select);
$form->addElement($maxlength_text);
$form->addElement($teaser_text);
$form->addElement($display_select);
$form->addElement($weight_text);
$form->addElement(new XoopsFormHidden('op', 'save'));
$form->addElement(new XoopsFormButton('', 'spotlightsubmit', _AMS_AM_SUBMIT, 'submit'));
return $form;
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:61,代码来源:spotlight.php
示例4: getForm
/**
* Get a {@link XoopsForm} object for creating/editing objects
* @param mixed $action receiving page - defaults to $_SERVER['REQUEST_URI']
* @param mixed $title title of the form
*
* @return object
*/
function getForm($action = false, $title = false)
{
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
if ($action == false) {
$action = $_SERVER['REQUEST_URI'];
}
if ($title == false) {
$title = $this->isNew() ? _ADD : _EDIT;
$title .= " " . _NL_AM_NEWSLETTER;
}
$form = new XoopsThemeForm($title, 'form', $action);
if (!$this->isNew()) {
$form->addElement(new XoopsFormHidden('id', $this->getVar('newsletter_id')));
}
$form->addElement(new XoopsFormText(_NL_AM_NAME, 'newsletter_name', 35, 255, $this->getVar('newsletter_name', 'e')), true);
$form->addElement(new XoopsFormTextArea(_NL_AM_DESCRIPTION, 'newsletter_description', $this->getVar('newsletter_description', 'e')));
$form->addElement(new XoopsFormText(_NL_AM_FROMNAME, 'newsletter_from_name', 35, 255, $this->getVar('newsletter_from_name', 'e')), true);
$form->addElement(new XoopsFormText(_NL_AM_FROMEMAIL, 'newsletter_from_email', 35, 255, $this->getVar('newsletter_from_email', 'e')), true);
$form->addElement(new XoopsFormText(_NL_AM_EMAIL, 'newsletter_email', 35, 255, $this->getVar('newsletter_email', 'e')), true);
$form->addElement(new XoopsFormTextArea(_NL_AM_CONFIRM_TEXT, "newsletter_confirm_text", $this->getVar('newsletter_confirm_text', 'e'), 10, 50, "newsletter_confirm_text"));
$member_handler =& xoops_gethandler('member');
$group_list =& $member_handler->getGroupList();
$groups_checkbox = new XoopsFormCheckBox(_NL_AM_PERMISSIONS_SELECT, 'newsletter_permissions[]', $this->getPermissions());
$groups_checkbox->setDescription(_NL_AM_PERMISSIONS_SELECT_DSC);
foreach ($group_list as $group_id => $group_name) {
$groups_checkbox->addOption($group_id, $group_name);
}
$form->addElement($groups_checkbox);
$template_select = new XoopsFormSelect(_NL_AM_TEMPLATE, 'newsletter_template', $this->getVar('newsletter_template', 'e'));
$template_select->addOption('smartmail_newsletter_pcworld.html');
$form->addElement($template_select);
$form->addElement(new XoopsFormHidden('op', 'save'));
$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
return $form;
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:42,代码来源:newsletter.php
示例5: greenepForm
function greenepForm($action = false)
{
global $xoopsModuleConfig;
if ($action === false) {
$action = $_SERVER['REQUEST_URI'];
}
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
$title = $this->isNew() ? _AM_CATALOG_ADD_GREENEP : _AM_CATALOG_EDIT_GREENEP;
$form = new XoopsThemeForm($title, 'form', $action, 'post', true);
$form->setExtra('enctype="multipart/form-data"');
$form->addElement(new XoopsFormText(_AM_CATALOG_GREENEP_RANK, 'greenep_rank', 60, 255, $this->getVar('greenep_rank')), true);
$logo_image = new XoopsFormElementTray(_AM_CATALOG_GREENLOGO);
if ($this->getVar('greenep_id')) {
$logo_image->addElement(new XoopsFormLabel('', '<img src="' . XOOPS_URL . "/uploads/" . $this->getVar('greenep_logo') . '" width="100"><br><br>'));
$display = _AM_CATALOG_REUPLOAD;
} else {
$display = '';
}
$logo_image->addElement(new XoopsFormFile('', 'greenep_logo', 1024 * 1024 * 2));
$logo_image->addElement(new XoopsFormLabel('', $display));
$form->addElement($logo_image);
$form->addElement(new XoopsFormText(_AM_CATALOG_SORT, 'greenep_weight', 40, 60, $this->getVar('greenep_weight')));
$form->addElement(new XoopsFormHidden('greenep_id', $this->getVar('greenep_id')));
$form->addElement(new XoopsFormHidden('op', 'save'));
$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
return $form;
}
开发者ID:RanLee,项目名称:Xoops_demo,代码行数:27,代码来源:greenep.php
示例6: linksForm
function linksForm($action = false)
{
global $xoopsModuleConfig;
if ($action === false) {
$action = $_SERVER['REQUEST_URI'];
}
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
$title = $this->isNew() ? _AM_LINKS_ADDLIK : _AM_LINKS_UPDATELIK;
$link_status = $this->isNew() ? 1 : $this->getVar('link_status');
$form = new XoopsThemeForm($title, 'form', $action, 'post', true);
$form->setExtra('enctype="multipart/form-data"');
$cat_id = isset($_REQUEST['cid']) ? $_REQUEST['cid'] : '';
if (empty($cat_id)) {
$cat_id = $this->getVar("cat_id");
}
$categories = new XoopsFormSelect(_AM_LINKS_CATNAME, 'cat_id', $cat_id);
$cat_handler = xoops_getmodulehandler('category', 'links');
$criteria = new CriteriaCompo();
$criteria->setSort('cat_order');
$criteria->setOrder('ASC');
$categories->addOptionArray($cat_handler->getList($criteria));
$form->addElement($categories, true);
$form->addElement(new XoopsFormText(_AM_LINKS_TITLE, 'link_title', 40, 50, $this->getVar('link_title')), true);
if (!$this->isNew()) {
$form->addElement(new XoopsFormText(_AM_LINKS_LIKADD, 'link_url', 80, 5000, $this->getVar('link_url'), true));
$form->addElement(new XoopsFormHidden('datetime', time()));
} else {
$form->addElement(new XoopsFormText(_AM_LINKS_LIKADD, 'link_url', 80, 5000, 'http://'), true);
$form->addElement(new XoopsFormHidden('published', time()));
$form->addElement(new XoopsFormHidden('datetime', time()));
}
$logo_image = new XoopsFormElementTray(_AM_LINKS_LIKLOGO);
if (!empty($xoopsModuleConfig['logo'])) {
if ($this->getVar('link_title')) {
$logo_image->addElement(new XoopsFormLabel('', '<img src="' . XOOPS_URL . $xoopsModuleConfig['logo_dir'] . $this->getVar('link_image') . '"><br><br>'));
$display = _AM_LINKS_LOGOWARN;
} else {
$display = '';
}
$logo_image->addElement(new XoopsFormFile('', 'link_image', 1024 * 1024 * 2));
} else {
$logo_image->addElement(new XoopsFormText('', 'link_dir', 70, 255, $this->getVar('link_dir')));
$display = _AM_LINKS_LOGOTIPS . XOOPS_URL . '/uploads/logo/logo.jpg';
}
$logo_image->addElement(new XoopsFormLabel('', $display));
$form->addElement($logo_image);
$form->addElement(new XoopsFormText(_AM_LINKS_SORT, 'link_order', 4, 2, $this->getVar('link_order')));
$form->addElement(new XoopsFormText(_AM_LINKS_CONTACT, 'link_contact', 60, 255, $this->getVar('link_contact')));
$form->addElement(new XoopsFormRadioYN(_AM_LINKS_SHOW, 'link_status', $link_status));
$form->addElement(new XoopsFormHidden('link_id', $this->getVar('link_id')));
$form->addElement(new XoopsFormHidden('ac', 'insert'));
$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
return $form;
}
开发者ID:yunsite,项目名称:xoopsdc,代码行数:54,代码来源:links.php
示例7: getParametersForm
function getParametersForm($postUrl)
{
$sform = new XoopsThemeForm(_OLEDRION_PARSIAN_PARAMETERS . ' - ' . $this->gatewayInformation['name'], 'frmParsian', $postUrl);
$sform->addElement(new XoopsFormHidden('gateway', $this->gatewayInformation['foldername']));
$pin = new XoopsFormText(_OLEDRION_PARSIAN_MID, 'parsian_mid', 50, 255, $this->handlers->h_oledrion_gateways_options->getGatewayOptionValue($this->gatewayInformation['foldername'], 'parsian_mid'));
$pin->setDescription(_OLEDRION_PARSIAN_MIDDSC);
$sform->addElement($pin, true);
$button_tray = new XoopsFormElementTray('', '');
$submit_btn = new XoopsFormButton('', 'post', _AM_OLEDRION_GATEWAYS_UPDATE, 'submit');
$button_tray->addElement($submit_btn);
$sform->addElement($button_tray);
return $sform;
}
开发者ID:osw17,项目名称:oledrion,代码行数:13,代码来源:gateway.php
示例8: replyForm
function replyForm($action = false, $title = _MA_SUPPORT_QUESTIONREPLY, $type = 'reply')
{
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
$member_handler =& xoops_gethandler('member');
$category_handler =& xoops_getmodulehandler('category', 'support');
if ($action === false) {
$action = $_SERVER['REQUEST_URI'];
}
$format = empty($format) ? "e" : $format;
$form = new XoopsThemeForm($title, 'form', $action, 'post', true);
$form->setExtra("enctype=\"multipart/form-data\"");
// subject
$form->addElement(new XoopsFormLabel(_MA_SUPPORT_QUESTIONNAME, $this->getVar('subject', $format)));
// forword
if ($type == 'forword') {
$criteria = new CriteriaCompo();
$criteria->setSort('cat_weight');
$criteria->setOrder('ASC');
$categories = $category_handler->getList($criteria);
if (empty($categories)) {
$categories = array(_MA_SUPPORT_DEFAULTCAT);
}
$cat_select = new XoopsFormSelect(_MA_SUPPORT_FORWARDCAT, "cat_id", '');
$cat_select->addOption(0, _MA_SUPPORT_CHOICE);
$cat_select->addOptionArray($categories);
$form->addElement($cat_select);
$support = new XoopsFormElementTray(_MA_SUPPORT_FORWORDMANGER, '', 'support');
$support_select = new XoopsFormSelect('', "forword", '');
$support_select->addOption('', _MA_SUPPORT_CHOICE);
$support->addElement($support_select);
$support_multiLabel = new XoopsFormLabel('', _MA_SUPPORT_NOCHOICEMANGER);
$support->addElement($support_multiLabel);
$form->addElement($support);
}
// infomation
$configs = array('editor' => 'fckeditor', 'width' => '100%', 'height' => '500px', 'value' => '');
$form->addElement(new XoopsFormEditor(_MA_SUPPORT_QUESTIONDESC, 'infomation', $configs));
// annex
$annex = new XoopsFormElementTray(_MA_SUPPORT_ANNEX, '', 'annex');
$annex_file = new XoopsFormFile('', 'annex', '');
$annex_multiLabel = new XoopsFormLabel('', '<div><a id="addMore" href="javascript:void(0);">' . _MA_SUPPORT_ADDANNEX . '</a></div>');
$annex->addElement($annex_file);
$annex->addElement($annex_multiLabel);
$form->addElement($annex);
// gratetime
if ($this->isNew()) {
$form->addElement(new XoopsFormHidden('create_time', time()));
}
$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
return $form;
}
开发者ID:yunsite,项目名称:xoopsdc,代码行数:51,代码来源:process.php
示例9: displayForm
/**
* XoopsfaqCategory::displayForm()
*
* @return
*/
function displayForm()
{
include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
$caption = $this->isNew() ? _AM_XOOPSFAQ_CREATENEW : sprintf(_AM_XOOPSFAQ_MODIFYITEM, $this->getVar('category_title'));
$form = new XoopsThemeForm($caption, 'content', xoops_getenv('PHP_SELF'));
$form->addElement(new XoopsFormHiddenToken());
$form->addElement(new xoopsFormHidden('op', 'save'));
$form->addElement(new xoopsFormHidden('category_id', $this->getVar('category_id', 'e')));
// title
$category_title = new XoopsFormText(_AM_XOOPSFAQ_E_CATEGORY_TITLE, 'category_title', 50, 150, $this->getVar('category_title', 'e'));
$category_title->setDescription(_AM_XOOPSFAQ_E_CATEGORY_TITLE_DSC);
$form->addElement($category_title, true);
// order
$category_order = new XoopsFormText(_AM_XOOPSFAQ_E_CATEGORY_WEIGHT, 'category_order', 5, 5, $this->getVar('category_order', 'e'));
$category_order->setDescription(_AM_XOOPSFAQ_E_CATEGORY_WEIGHT_DSC);
$form->addElement($category_order, false);
$btnTray = new XoopsFormElementTray('', '');
$btnSubmit = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
$btnTray->addElement($btnSubmit);
$btnCancel = new XoopsFormButton('', '', _CANCEL, 'button');
$btnCancel->setExtra('onclick="history.go(-1)"');
$btnTray->addElement($btnCancel);
$form->addElement($btnTray);
$form->display();
}
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:30,代码来源:category.php
示例10: getForm
/**
* Get a {@link XoopsForm} object for creating/editing objects
* @param mixed $action receiving page - defaults to $_SERVER['REQUEST_URI']
* @param mixed $title title of the form
*
* @return object
*/
function getForm($action = false, $title = false)
{
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
if ($action == false) {
$url_parts = parse_url($_SERVER['REQUEST_URI']);
$action = $url_parts['path'];
}
if ($title == false) {
$title = $this->isNew() ? _ADD : _EDIT;
$title .= " " . _NL_AM_DISPATCH;
}
$form = new XoopsThemeForm($title, 'form', $action);
if (!$this->isNew()) {
$form->addElement(new XoopsFormHidden('id', $this->getVar('dispatch_id')));
} else {
$this->assignVar('dispatch_time', $this->getNextDispatch());
}
$form->addElement(new XoopsFormHidden('op', 'save'));
$form->addElement(new XoopsFormHidden('nid', $this->getVar('newsletterid')));
$time = new XoopsFormDateTime(_NL_AM_TIME, 'dispatch_time', 15, $this->getVar('dispatch_time'));
$time->_name = "dispatch_time";
//XOOPS 2.0.13.2 < fix for missing name attribute
$form->addElement($time);
$form->addElement(new XoopsFormText(_NL_AM_SUBJECT, 'dispatch_subject', 75, 255, $this->getVar('dispatch_subject', 'e')));
$status_radio = new XoopsFormRadio(_NL_AM_STATUS, 'dispatch_status', $this->getVar('dispatch_status'));
$status_radio->addOption(0, _NL_AM_NOTREADY);
$status_radio->addOption(1, _NL_AM_READY);
$status_radio->addOption(2, _NL_AM_DISPATCHED);
$form->addElement($status_radio);
$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
return $form;
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:39,代码来源:dispatch.php
示例11: sel_sibblings_form
function sel_sibblings_form()
{
$form = new XoopsThemeForm('Current Sibblings', "current", "", "post");
$sibblingshandler = xoops_getmodulehandler('sibblings', 'genobio');
$sibblings = $sibblingshandler->getObjects($criteria);
$element = array();
foreach ($sibblings as $key => $item) {
$element[$key] = new XoopsFormElementTray('Item ' . $item->getVar('id') . ':');
$element[$key]->addElement(new XoopsFormLabel('', '<a href="index.php?op=sibblings&fct=edit&id=' . $item->getVar('sibblings_id') . '">' . _EDIT . '</a> <a href="index.php?index.php?op=sibblings&fct=delete&id=' . $item->getVar('sibblings_id') . '">' . _DELETE . '</a>'));
$element[$key]->addElement(new XoopsFormLabel(_GB_AM_NICKNAME, '' . $item->getVar('nickname') . ''));
$form->addElement($element[$key]);
}
$form->display();
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:14,代码来源:sibblings.forms.php
示例12: XoopsThemeForm
function &execute(&$controller, &$request, &$user)
{
$editform =& $request->getAttribute('editform');
$form = new XoopsThemeForm(_MD_A_PLZXOO_LANG_EDIT_CATEGORY, 'Category', '', 'POST');
$form->addElement(new XoopsFormHidden('cid', $editform->cid_));
$form->addElement(new XoopsFormText(_MD_A_PLZXOO_LANG_NAME, 'name', 64, 255, $editform->name_));
//-------------------------
// ¿Æ¥«¥Æ¥´¥ê
//-------------------------
$select = new XoopsFormSelect(_MD_A_PLZXOO_LANG_PARENT_CATEGORY, 'pid', $editform->pid_);
$select->addOption(0, _MD_A_PLZXOO_LANG_TOP);
$categories =& $request->getAttribute('categories');
foreach ($categories as $category) {
$select->addOption($category->getVar('cid'), $category->getVar('name'));
}
$form->addElement($select);
unset($select);
$form->addElement(new XoopsFormDhtmlTextArea(_MD_A_PLZXOO_LANG_DESCRIPTION, 'description', $editform->description_, 6, 50));
$form->addElement(new XoopsFormText(_MD_A_PLZXOO_LANG_WEIGHT, 'weight', 10, 10, intval($editform->weight_)));
$tray = new XoopsFormElementTray(_MD_A_PLZXOO_LANG_CONTROL);
$tray->addElement(new XoopsFormButton('', 'submit', _MD_A_PLZXOO_LANG_SUBMIT, 'submit'));
$tray->addElement(new XoopsFormButton('', 'reset', _MD_A_PLZXOO_LANG_RESET, 'reset'));
$form->addElement($tray);
$renderer = new mojaLE_Renderer($controller, $request, $user);
$renderer->setTemplate('category_edit.tpl');
$renderer->setAttribute('xoopsform', $form);
return $renderer;
}
开发者ID:BackupTheBerlios,项目名称:peakxoops-svn,代码行数:28,代码来源:category_input.class.php
示例13: display_edit_form
function display_edit_form($cat_array, $form_title, $action)
{
global $cattree;
$myts =& MyTextSanitizer::getInstance();
extract($cat_array);
// Beggining of XoopsForm
$form = new XoopsThemeForm($form_title, 'MainForm', '');
// Hidden
$form->addElement(new XoopsFormHidden('action', $action));
$form->addElement(new XoopsFormHidden('cid', $cid));
// Title
$form->addElement(new XoopsFormText(_AM_CAT_TH_TITLE, 'title', 30, 50, $myts->htmlSpecialChars($title)), true);
// Image URL
$form->addElement(new XoopsFormText(_AM_CAT_TH_IMGURL, 'imgurl', 50, 150, $myts->htmlSpecialChars($imgurl)));
// Parent Category
ob_start();
$cattree->makeMySelBox("title", "title", $pid, 1, 'pid');
$cat_selbox = ob_get_contents();
ob_end_clean();
$form->addElement(new XoopsFormLabel(_AM_CAT_TH_PARENT, $cat_selbox));
// Buttons
$button_tray = new XoopsFormElementTray('', ' ');
$button_tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
$button_tray->addElement(new XoopsFormButton('', 'reset', _CANCEL, 'reset'));
$form->addElement($button_tray);
// End of XoopsForm
$form->display();
}
开发者ID:BackupTheBerlios,项目名称:soopa,代码行数:28,代码来源:index.php
示例14: getForm
/**
* @param bool $action
* @return XoopsThemeForm
*/
public function getForm($action = false)
{
global $xoopsDB, $xoopsModuleConfig;
if ($action === false) {
$action = $_SERVER['REQUEST_URI'];
}
$title = $this->isNew() ? sprintf(_AM_PRESENTER_CAT_ADD) : sprintf(_AM_PRESENTER_CAT_EDIT);
include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
$form = new XoopsThemeForm($title, 'form', $action, 'post', true);
$form->setExtra('enctype="multipart/form-data"');
// Cat_pid
include_once XOOPS_ROOT_PATH . '/class/tree.php';
$categoriesHandler =& xoops_getModuleHandler('categories', 'presenter');
$criteria = new CriteriaCompo();
$categories = $categoriesHandler->getObjects($criteria);
if ($categories) {
$categories_tree = new XoopsObjectTree($categories, 'cat_id', 'cat_pid');
$cat_pid = $categories_tree->makeSelBox('cat_pid', 'cat_title', '--', $this->getVar('cat_pid', 'e'), false);
$form->addElement(new XoopsFormLabel(_AM_PRESENTER_CAT_PID, $cat_pid));
}
// Cat_title
$form->addElement(new XoopsFormText(_AM_PRESENTER_CAT_TITLE, 'cat_title', 50, 255, $this->getVar('cat_title')), true);
// Cat_desc
$form->addElement(new XoopsFormTextArea(_AM_PRESENTER_CAT_DESC, 'cat_desc', $this->getVar('cat_desc'), 4, 47), true);
// Cat_image
$cat_image = $this->getVar('cat_image') ? $this->getVar('cat_image') : 'blank.gif';
$uploadir = '/uploads/presenter/images/categories';
$imgtray = new XoopsFormElementTray(_AM_PRESENTER_CAT_IMAGE, '<br />');
$imgpath = sprintf(_AM_PRESENTER_FORMIMAGE_PATH, $uploadir);
$imageselect = new XoopsFormSelect($imgpath, 'cat_image', $cat_image);
$image_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . $uploadir);
foreach ($image_array as $image) {
$imageselect->addOption("{$image}", $image);
}
$imageselect->setExtra("onchange='showImgSelected(\"image_cat_image\", \"cat_image\", \"" . $uploadir . "\", \"\", \"" . XOOPS_URL . "\")'");
$imgtray->addElement($imageselect);
$imgtray->addElement(new XoopsFormLabel('', "<br /><img src='" . XOOPS_URL . "/" . $uploadir . "/" . $cat_image . "' name='image_cat_image' id='image_cat_image' alt='' />"));
$fileseltray = new XoopsFormElementTray('', '<br />');
$fileseltray->addElement(new XoopsFormFile(_AM_PRESENTER_FORMUPLOAD, 'cat_image', $xoopsModuleConfig['maxsize']));
$fileseltray->addElement(new XoopsFormLabel(''));
$imgtray->addElement($fileseltray);
$form->addElement($imgtray);
// Cat_weight
$form->addElement(new XoopsFormText(_AM_PRESENTER_CAT_WEIGHT, 'cat_weight', 50, 255, $this->getVar('cat_weight')), false);
// Cat_color
// $form->addElement(new XoopsFormColorPicker(_AM_PRESENTER_CAT_COLOR, 'cat_color', $this->getVar('cat_color')), false);
$form->addElement(new XoopsFormHidden('op', 'save'));
$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
return $form;
}
开发者ID:mambax7,项目名称:presenter,代码行数:54,代码来源:categories.php
示例15: editCategory
/**
* editCategory()
*
* @param integer $catid
* @return
*/
function editCategory($category_obj = null)
{
global $xoopsModule;
$category_handler =& xoops_getmodulehandler('category', 'newbb');
if (empty($category_obj)) {
$category_obj =& $category_handler->create();
}
$groups_cat_access = null;
include_once XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar("dirname") . "/class/xoopsformloader.php";
if (!$category_obj->isNew()) {
$sform = new XoopsThemeForm(_AM_NEWBB_EDITCATEGORY . " " . $category_obj->getVar('cat_title'), "op", xoops_getenv('PHP_SELF'));
} else {
$sform = new XoopsThemeForm(_AM_NEWBB_CREATENEWCATEGORY, "op", xoops_getenv('PHP_SELF'));
$category_obj->setVar('cat_title', '');
$category_obj->setVar('cat_image', '');
$category_obj->setVar('cat_description', '');
$category_obj->setVar('cat_order', 0);
$category_obj->setVar('cat_url', 'http://www.myxoops.org myXOOPS Support');
}
$sform->addElement(new XoopsFormText(_AM_NEWBB_SETCATEGORYORDER, 'cat_order', 5, 10, $category_obj->getVar('cat_order')), false);
$sform->addElement(new XoopsFormText(_AM_NEWBB_CATEGORY, 'title', 50, 80, $category_obj->getVar('cat_title', 'E')), true);
$sform->addElement(new XoopsFormDhtmlTextArea(_AM_NEWBB_CATEGORYDESC, 'cat_description', $category_obj->getVar('cat_description', 'E'), 10, 60), false);
$imgdir = "/modules/" . $xoopsModule->getVar("dirname") . "/images/category";
$cat_image = $category_obj->getVar("cat_image");
$cat_image = empty($cat_image) ? 'blank.gif' : $cat_image;
$graph_array =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . $imgdir . "/");
array_unshift($graph_array, _NONE);
$cat_image_select = new XoopsFormSelect('', 'cat_image', $category_obj->getVar('cat_image'));
$cat_image_select->addOptionArray($graph_array);
$cat_image_select->setExtra("onchange=\"showImgSelected('img', 'cat_image', '/" . $imgdir . "/', '', '" . XOOPS_URL . "')\"");
$cat_image_tray = new XoopsFormElementTray(_AM_NEWBB_IMAGE, ' ');
$cat_image_tray->addElement($cat_image_select);
$cat_image_tray->addElement(new XoopsFormLabel('', "<br /><img src='" . XOOPS_URL . $imgdir . "/" . $cat_image . " 'name='img' id='img' alt='' />"));
$sform->addElement($cat_image_tray);
$sform->addElement(new XoopsFormText(_AM_NEWBB_SPONSORLINK, 'cat_url', 50, 80, $category_obj->getVar('cat_url', 'E')), false);
$sform->addElement(new XoopsFormHidden('cat_id', $category_obj->getVar("cat_id")));
$button_tray = new XoopsFormElementTray('', '');
$button_tray->addElement(new XoopsFormHidden('op', 'save'));
$butt_save = new XoopsFormButton('', '', _SUBMIT, 'submit');
$butt_save->setExtra('onclick="this.form.elements.op.value=\'save\'"');
$button_tray->addElement($butt_save);
if ($category_obj->getVar("cat_id")) {
$butt_delete = new XoopsFormButton('', '', _CANCEL, 'submit');
$butt_delete->setExtra('onclick="this.form.elements.op.value=\'default\'"');
$button_tray->addElement($butt_delete);
}
$sform->addElement($button_tray);
$sform->display();
}
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:55,代码来源:admin_cat_manager.php
示例16: sel_members_form
function sel_members_form()
{
$form = new XoopsThemeForm('Current Members', "current", "", "post");
$membershandler = xoops_getmodulehandler('members', 'genobio');
$criteria = new Criteria('1', 1);
$members = $membershandler->getObjects($criteria);
$element = array();
foreach ($members as $key => $item) {
$element[$key] = new XoopsFormElementTray('Item ' . $item->getVar('member_id') . ':');
$element[$key]->setDescription('<a href="' . urldecode($item->getVar('domain')) . '/modules/genobio/?op=profile&id=' . $item->getVar('member_id') . '">View Profile</a>');
$element[$key]->addElement(new XoopsFormLabel('', '<a href="index.php?op=members&fct=edit&id=' . $item->getVar('member_id') . '">Edit</a> <a href="index.php?op=profiles&id=' . $item->getVar('member_id') . '">Bio Profile</a> <a href="index.php?op=members&fct=delete&id=' . $item->getVar('member_id') . '">Delete</a>'));
$element[$key]->addElement(new XoopsFormLabel('Display Name:', '' . $item->getVar('display_name') . ''));
$element[$key]->addElement(new XoopsFormLabel('Domain:', urldecode($item->getVar('domain'))));
$form->addElement($element[$key]);
}
$form->display();
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:17,代码来源:members.forms.php
示例17: editCategory
/**
* editCategory()
*
* @param integer $catid
* @return
*/
function editCategory($cat_id = 0)
{
$category_handler =& xoops_getmodulehandler('category', 'newbb');
if ($cat_id > 0) {
$fc =& $category_handler->get($cat_id);
} else {
$fc =& $category_handler->create();
}
$groups_cat_access = null;
global $xoopsModule;
if ($cat_id) {
$sform = new XoopsThemeForm(_AM_NEWBB_EDITCATEGORY . " " . $fc->getVar('cat_title'), "op", xoops_getenv('PHP_SELF'));
} else {
$sform = new XoopsThemeForm(_AM_NEWBB_CREATENEWCATEGORY, "op", xoops_getenv('PHP_SELF'));
$fc->setVar('cat_title', '');
$fc->setVar('cat_image', 'blank.gif');
$fc->setVar('cat_description', '');
$fc->setVar('cat_order', 0);
$fc->setVar('cat_state', 0);
$fc->setVar('cat_showdescript', 1);
$fc->setVar('cat_url', 'http://www.xoops.org XOOPS');
}
$sform->addElement(new XoopsFormText(_AM_NEWBB_SETCATEGORYORDER, 'cat_order', 5, 10, $fc->getVar('cat_order')), false);
$sform->addElement(new XoopsFormText(_AM_NEWBB_CATEGORY, 'title', 50, 80, $fc->getVar('cat_title', 'E')), true);
$sform->addElement(new XoopsFormDhtmlTextArea(_AM_NEWBB_CATEGORYDESC, 'catdescript', $fc->getVar('cat_description', 'E'), 10, 60), false);
$displaydescription_radio = new XoopsFormRadioYN(_AM_NEWBB_SHOWDESC, 'show', $fc->getVar('cat_showdescript'), '' . _YES . '', ' ' . _NO . '');
$sform->addElement($displaydescription_radio);
$status_select = new XoopsFormSelect(_AM_NEWBB_STATE, "state", $fc->getVar('cat_state'));
$status_select->addOptionArray(array('0' => _AM_NEWBB_ACTIVE, '1' => _AM_NEWBB_INACTIVE));
$sform->addElement($status_select);
$imgdir = "/modules/" . $xoopsModule->dirname() . "/images/category";
if (!$fc->getVar("cat_image")) {
$fc->setVar('cat_image', 'blank.gif');
}
$graph_array =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . $imgdir . "/");
array_unshift($graph_array, _NONE);
$indeximage_select = new XoopsFormSelect('', 'indeximage', $fc->getVar('cat_image'));
$indeximage_select->addOptionArray($graph_array);
$indeximage_select->setExtra("onchange=\"showImgSelected('img', 'indeximage', '/" . $imgdir . "/', '', '" . XOOPS_URL . "')\"");
$indeximage_tray = new XoopsFormElementTray(_AM_NEWBB_IMAGE, ' ');
$indeximage_tray->addElement($indeximage_select);
$indeximage_tray->addElement(new XoopsFormLabel('', "<br /><img src='" . XOOPS_URL . $imgdir . "/" . $fc->getVar('cat_image') . " 'name='img' id='img' alt='' />"));
$sform->addElement($indeximage_tray);
$sform->addElement(new XoopsFormText(_AM_NEWBB_SPONSORLINK, 'sponurl', 50, 80, $fc->getVar('cat_url', 'E')), false);
$sform->addElement(new XoopsFormHidden('cat_id', $cat_id));
$button_tray = new XoopsFormElementTray('', '');
$button_tray->addElement(new XoopsFormHidden('op', 'save'));
$butt_save = new XoopsFormButton('', '', _SUBMIT, 'submit');
$butt_save->setExtra('onclick="this.form.elements.op.value=\'save\'"');
$button_tray->addElement($butt_save);
if ($cat_id) {
$butt_delete = new XoopsFormButton('', '', _CANCEL, 'submit');
$butt_delete->setExtra('onclick="this.form.elements.op.value=\'default\'"');
$button_tray->addElement($butt_delete);
}
$sform->addElement($button_tray);
$sform->display();
}
开发者ID:BackupTheBerlios,项目名称:soopa,代码行数:64,代码来源:admin_cat_manager.php
示例18: editcat
function editcat($catid = '')
{
$name = '';
$description = '';
global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $modify;
include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
if ($modify) {
$result = $xoopsDB->query("SELECT name, description FROM " . $xoopsDB->prefix("faqcategories") . " WHERE catID = '{$catid}'");
list($name, $description) = mysql_fetch_row($result);
if (mysql_num_rows($result) == 0) {
redirect_header("index.php", 1, _AM_NOCATTOEDIT);
exit;
}
$sform = new XoopsThemeForm(_AM_MODIFYCAT, "op", xoops_getenv('PHP_SELF'));
} else {
$sform = new XoopsThemeForm(_AM_ADDCAT, "op", xoops_getenv('PHP_SELF'));
}
$sform->addElement(new XoopsFormText(_AM_CATNAME, 'name', 50, 80, $name), true);
$sform->addElement(new XoopsFormDhtmlTextArea(_AM_CATDESCRIPT, 'description', $description, 15, 60));
$sform->addElement(new XoopsFormHidden('catid', $catid));
$sform->addElement(new XoopsFormHidden('modify', $modify));
$button_tray = new XoopsFormElementTray('', '');
$hidden = new XoopsFormHidden('op', 'addcat');
$button_tray->addElement($hidden);
if ($modify == '0') {
$button_tray->addElement(new XoopsFormButton('', 'update', _AM_CREATE, 'submit'));
} else {
$button_tray->addElement(new XoopsFormButton('', 'update', _AM_MODIFY, 'submit'));
}
$sform->addElement($button_tray);
$sform->display();
unset($hidden);
}
开发者ID:amjadtbssm,项目名称:website,代码行数:33,代码来源:category.php
-
dphi-official/Machine_Learning_Bootcamp
阅读:1364|2022-08-18
-
juven/maven-bash-completion: Maven Bash Auto Completion
阅读:823|2022-08-16
-
win7系统电脑使用过程中有不少朋友表示遇到过win7系统注册表编辑器打开的状况,当出现
阅读:764|2022-11-06
-
Use After Free in GitHub repository vim/vim prior to 9.0.0046.
阅读:597|2022-07-29
-
route101/mastoinker: Quick image view assistant for Mastodon client
阅读:926|2022-08-18
-
rootnroll/library: Playgrounds library
阅读:616|2022-08-15
-
0e0w · GitHub
阅读:430|2022-08-15
-
tgreyuk/typedoc-plugin-markdown: A plugin for TypeDoc that enables TypeScript AP
阅读:765|2022-08-18
-
台湾人的方言是“台湾话”,官方是“国语”,和普通话一样。小编一直觉得,大连话和台
阅读:315|2022-11-06
-
juankysoriano/MaterialLife: A Material Design styled Game of Life for Android
阅读:341|2022-08-17
|
请发表评论