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


PHP XoopsThemeForm::setRequired方法代码示例

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


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

示例1: XoopsFormElementTray

 $form->addElement($name_text, $required['realname']['flag']);
 // email
 $email_tray = new XoopsFormElementTray(_US_EMAIL . _MD_XOONIPS_ACCOUNT_REQUIRED_MARK, '<br />');
 if ($myxoopsConfigUser['allow_chgmail'] == 1) {
     $email_text = new XoopsFormText('', 'email', 30, 60, $u_obj->getVar('email', 's'));
 } else {
     $email_text = new XoopsFormLabel('', $u_obj->getVar('email', 's'));
 }
 $email_tray->addElement($email_text);
 $email_cbox_value = $u_obj->getVar('user_viewemail', 's') ? 1 : 0;
 $email_cbox = new XoopsFormCheckBox('', 'user_viewemail', $email_cbox_value);
 $email_cbox->addOption(1, _US_ALLOWVIEWEMAIL);
 $email_tray->addElement($email_cbox);
 $form->addElement($email_tray);
 if ($myxoopsConfigUser['allow_chgmail'] == 1) {
     $form->setRequired($email_text);
 }
 // url
 $url_text = new XoopsFormText(_US_WEBSITE, 'url', 30, 100, $u_obj->getVar('url', 'e'));
 $form->addElement($url_text);
 // posi
 $posi_select = new XoopsFormSelect(_MD_XOONIPS_ACCOUNT_POSITION, 'posi', $xu_obj->getVar('posi', 'e'));
 $posi_list = getUserPosiList();
 $posi_select->addOption(0, '--------------');
 if (count($posi_list) > 0) {
     $posi_select->addOptionArray($posi_list);
 }
 $form->addElement($posi_select);
 // company_name
 $company_text = new XoopsFormText(_MD_XOONIPS_ACCOUNT_COMPANY_NAME . $required['company_name']['mark'], 'company_name', 50, 255, $xu_obj->getVar('company_name', 'e'));
 $form->addElement($company_text, $required['company_name']['flag']);
开发者ID:XoopsModules25x,项目名称:xcl-module-xoonips,代码行数:31,代码来源:edituser.php

示例2: XoopsFormText

        $luogo_text = new XoopsFormText("Luogo in cui si trova l'oggetto:", "luogo", 50, 255, $luogo);
        $prezzo_text = new XoopsFormText("Prezzo:", "prezzo", 50, 255, $prezzo);
        $submit_button = new XoopsFormButton("", "submit", _SUBMIT, "submit");
        $submit_tray = new XoopsFormElementTray('');
        $submit_tray->addElement($submit_button);
        $form->addElement($id);
        $form->addElement($rmiv_form);
        $form->addElement($scadenza);
        $form->addElement($title_text);
        $form->addElement($description_text);
        $form->addElement($prezzo_text);
        $form->addElement($prezzo_trattabile);
        $form->addElement($carico_spedizione);
        $form->addElement($pagamento);
        $form->addElement($cat_select);
        if ($rmiv) {
            $form->addElement($giorni_asta);
        }
        $form->addElement($luogo_text);
        $form->addElement($submit_tray);
        $form->setRequired($cat_select);
        $form->display();
        CloseTable();
        myalbum_footer();
        include XOOPS_ROOT_PATH . "/footer.php";
        //*************************************************************************************************************************************
    }
}
//chiudo if (!$cid)
myalbum_footer();
include XOOPS_ROOT_PATH . '/footer.php';
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:modifica.php

示例3: XoopsFormCheckBox

$r_rblock_checkbox = new XoopsFormCheckBox("<b>" . _RIGHT . "</b><br />", "read_bids[]", $r_block_value);
$new_blocks_array = array();
$blocks_array = XoopsBlock::getAllBlocks("list", XOOPS_SIDEBLOCK_RIGHT);
foreach ($blocks_array as $key => $value) {
    $new_blocks_array[$key] = "<a href='" . XOOPS_URL . "/modules/system/admin.php?fct=blocksadmin&amp;op=edit&amp;bid=" . $key . "'>" . $value . " (ID: " . $key . ")</a>";
}
$r_rblock_checkbox->addOptionArray($new_blocks_array);
$r_block_tray = new XoopsFormElementTray(_AM_BLOCKRIGHTS, "<br /><br />");
$r_block_tray->addElement($r_lblock_checkbox);
$r_block_tray->addElement($r_cblock_checkbox);
$r_block_tray->addElement($r_rblock_checkbox);
$op_hidden = new XoopsFormHidden("op", $op_value);
$fct_hidden = new XoopsFormHidden("fct", "groups");
$submit_button = new XoopsFormButton("", "groupsubmit", $submit_value, "submit");
$form = new XoopsThemeForm($form_title, "groupform", "admin.php");
$form->addElement(new XoopsFormToken(XoopsMultiTokenHandler::quickCreate('groups_' . $op_value)));
$form->addElement($name_text);
$form->addElement($desc_text);
$form->addElement($s_cat_checkbox);
$form->addElement($a_mod_checkbox);
$form->addElement($r_mod_checkbox);
$form->addElement($r_block_tray);
$form->addElement($op_hidden);
$form->addElement($fct_hidden);
if (!empty($g_id_value)) {
    $g_id_hidden = new XoopsFormHidden("g_id", $g_id_value);
    $form->addElement($g_id_hidden);
}
$form->addElement($submit_button);
$form->setRequired($name_text);
$form->display();
开发者ID:koki-h,项目名称:xoops_utf8,代码行数:31,代码来源:groupform.php

示例4: dirname

    $leaf['prefix'] = str_replace(".", "--", $leaf['prefix']);
    $cat->addOption($leaf['cid'], $leaf['prefix'] . $leaf['title']);
}
$submitter_select = new XoopsFormSelectUser(_MD_A_GNAVI_TH_SUBMITTER, 'submitter', false, $submitter);
$date_text = new XoopsFormText(_MD_A_GNAVI_TH_DATE, 'post_date', 20, 20, formatTimestamp(time(), _MD_GNAV_DTFMT_YMDHI));
$dir_tray = new XoopsFormElementTray(_MD_A_GNAV_TEXT_DIRECTORY, '<br /><br />');
$dir_text = new XoopsFormText(_MD_A_GNAV_PHOTOPATH, "dir", 50, 255, $dir4edit);
$dir_tray->addElement($dir_text);
$dir_tray->addElement(new XoopsFormLabel(_MD_A_GNAV_DESC_PHOTOPATH));
$desc_tarea = new XoopsFormDhtmlTextarea(_MD_A_GNAVI_TH_DESCRIPTION, 'desc', $desc4edit, 10, 50);
$submit_button = new XoopsFormButton('', "submit", _SUBMIT, 'submit');
// Render forms
xoops_cp_header();
include dirname(__FILE__) . '/mymenu.php';
echo "<h3 style='text-align:left;'>" . sprintf(_MD_A_GNAVI_FMT_BATCHREGISTER, $xoopsModule->name()) . "</h3>\n";
gnavi_opentable();
$form->addElement($title_tray);
$form->addElement($desc_tarea);
$form->addElement($cat);
$form->addElement($dir_tray);
$form->addElement($submitter_select);
$form->addElement($date_text);
$form->addElement($submit_button);
$form->setRequired($dir_text);
$form->display();
gnavi_closetable();
if (isset($result_str)) {
    echo "<br />\n";
    echo $result_str;
}
xoops_cp_footer();
开发者ID:nouphet,项目名称:rata,代码行数:31,代码来源:batch.php

示例5: XoopsFormTextArea

     $body_text = new XoopsFormTextArea($body_caption, 'mail_body', '', 10);
     $to_checkbox = new XoopsFormCheckBox(_AM_SYSTEM_MAILUSERS_SENDTO, 'mail_send_to', 'mail');
     $to_checkbox->addOption('mail', _AM_SYSTEM_MAILUSERS_EMAIL);
     $to_checkbox->addOption('pm', _AM_SYSTEM_MAILUSERS_PM);
     $start_hidden = new XoopsFormHidden('mail_start', 0);
     $op_hidden = new XoopsFormHidden('op', 'send');
     $submit_button = new XoopsFormButton('', 'mail_submit', _SEND, 'submit');
     $form->addElement($fname_text);
     $form->addElement($femail_text);
     $form->addElement($subject_text);
     $form->addElement($body_text);
     $form->addElement($to_checkbox);
     $form->addElement($op_hidden);
     $form->addElement($start_hidden);
     $form->addElement($submit_button);
     $form->setRequired($subject_text);
     $form->setRequired($body_text);
     // Assign form
     $xoopsTpl->assign('form', $form->render());
     break;
     // Send
 // Send
 case 'send':
     // Define Breadcrumb and tips
     $xoBreadCrumb->addLink(_AM_SYSTEM_MAILUSERS_MANAGER, system_adminVersion('mailusers', 'adminpath'));
     $xoBreadCrumb->addLink(_AM_SYSTEM_MAILUSERS_LIST);
     $xoBreadCrumb->render();
     if (!empty($_POST['mail_send_to'])) {
         $added = array();
         $added_id = array();
         $criteria = array();
开发者ID:geekwright,项目名称:XoopsCore25,代码行数:31,代码来源:main.php

示例6: XoopsThemeForm

            $xoopsTpl->assign(array("content4join" => "<br />" . $xoopsMailer->getErrors() . _MD_GOBACK, "lang_main_partner" => _MD_PARTNERS, "lang_join" => _MD_JOIN, "sitename" => $xoopsConfig['sitename']));
        } else {
            $xoopsTpl->assign(array("content4join" => "<br />" . _MD_SENDMAIL, "lang_main_partner" => _MD_PARTNERS, "lang_join" => _MD_JOIN, "sitename" => $xoopsConfig['sitename']));
        }
        $xoopsContentsTpl = 'partnerjoin.html';
    } else {
        include XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
        $form = new XoopsThemeForm("", "joinform", "join.php");
        $titlePartern = new XoopsFormText(_MD_TITLE, "title", 30, 50);
        $imagePartern = new XoopsFormText(_MD_IMAGE, "image", 30, 150, "http://");
        $urlPartern = new XoopsFormText(_MD_URL, "url", 30, 150, "http://");
        $descriptionPartern = new XoopsFormTextArea(_MD_DESCRIPTION, "description", "", 7, 50);
        $op_hidden = new XoopsFormHidden("op", "sendMail");
        $submit_button = new XoopsFormButton("", "dbsubmit", _MD_SEND, "submit");
        $form->addElement($titlePartern);
        $form->addElement($imagePartern);
        $form->addElement($urlPartern);
        $form->addElement($descriptionPartern);
        $form->addElement($op_hidden);
        $form->addElement($submit_button);
        $form->setRequired($titlePartern);
        $form->setRequired($urlPartern);
        $form->setRequired($descriptionPartern);
        $content = $form->render();
        $xoopsTpl->assign(array("content4join" => $content, "lang_main_partner" => _MD_PARTNERS, "lang_join" => _MD_JOIN, "sitename" => $xoopsConfig['sitename']));
    }
} else {
    // else -- if ( $xoopsUser )
    redirect_header("index.php", 2, _NOPERM);
}
include_once XOOPS_ROOT_PATH . '/footer.php';
开发者ID:amjadtbssm,项目名称:website,代码行数:31,代码来源:join.php

示例7: XoopsFormLabel

    $cat_select1->addOption($leaf['cid'], $leaf['prefix'] . $leaf['title']);
    $cat_select2->addOption($leaf['cid'], $leaf['prefix'] . $leaf['title']);
    $cat_select3->addOption($leaf['cid'], $leaf['prefix'] . $leaf['title']);
    $cat_select4->addOption($leaf['cid'], $leaf['prefix'] . $leaf['title']);
}
//fileform
if ($photo['ext']) {
    $photoview = new XoopsFormLabel(_MD_GNAV_ITM_FILE1, "<img src='" . $photo['imgsrc_photo'] . "' width='150' />");
    $file_form = new XoopsFormFile(_MD_GNAV_ITM_EDIT_FILE1, "photofile", $gnavi_fsize);
    $del_box = new XoopsFormCheckBox("&nbsp;", "del_photo", array(0));
    $del_box->addOption('1', _MD_GNAV_ITM_DEL_FILE1);
    $del_hidden = new XoopsFormHidden("del_photo", $del_photo);
} else {
    $file_form = new XoopsFormFile(_MD_GNAV_ITM_FILE1, "photofile", $gnavi_fsize);
    if (!$gnavi_allownoimage) {
        $form->setRequired($file_form);
    }
}
$file_form->setExtra("size='70'");
if ($photo['ext1']) {
    $photoview1 = new XoopsFormLabel(_MD_GNAV_ITM_FILE2, "<img src='" . $photo['imgsrc_photo1'] . "' width='150' />");
    $file_form1 = new XoopsFormFile(_MD_GNAV_ITM_EDIT_FILE2, "photofile1", $gnavi_fsize);
    $del_box1 = new XoopsFormCheckBox("&nbsp;", "del_photo1", array(0));
    $del_box1->addOption('1', _MD_GNAV_ITM_DEL_FILE2);
} else {
    $file_form1 = new XoopsFormFile(_MD_GNAV_ITM_FILE2, "photofile1", $gnavi_fsize);
    $del_hidden1 = new XoopsFormHidden("del_photo1", $del_photo1);
}
$file_form1->setExtra("size='70'");
if ($photo['ext2']) {
    $photoview2 = new XoopsFormLabel(_MD_GNAV_ITM_FILE3, "<img src='" . $photo['imgsrc_photo2'] . "' width='150' />");
开发者ID:nouphet,项目名称:rata,代码行数:31,代码来源:submit.php

示例8: XoopsFormText

    $criteria_tray->addElement($mailok_cbox);
    $criteria_tray->addElement($inactive_cbox);
    $criteria_tray->addElement($regd_min);
    $criteria_tray->addElement($regd_max);
    $form->addElement($criteria_tray);
}
$fname_text = new XoopsFormText(_AM_MAILFNAME, "mail_fromname", 30, 255, $xoopsConfig['sitename']);
$fromemail = !empty($xoopsConfig['adminmail']) ? $xoopsConfig['adminmail'] : $xoopsUser->getVar("email", "E");
$femail_text = new XoopsFormText(_AM_MAILFMAIL, "mail_fromemail", 30, 255, $fromemail);
//$subject_caption = _AM_MAILSUBJECT."<br /><br /><span style='font-size:x-small;font-weight:bold;'>"._AM_MAILTAGS."</span><br /><span style='font-size:x-small;font-weight:normal;'>"._AM_MAILTAGS1."<br />"._AM_MAILTAGS2."<br />"._AM_MAILTAGS3."</span>";
$subject_caption = _AM_MAILSUBJECT . "<br /><br /><span style='font-size:x-small;font-weight:bold;'>" . _AM_MAILTAGS . "</span><br /><span style='font-size:x-small;font-weight:normal;'>" . _AM_MAILTAGS2 . "</span>";
$subject_text = new XoopsFormText($subject_caption, "mail_subject", 50, 255);
$body_caption = _AM_MAILBODY . "<br /><br /><span style='font-size:x-small;font-weight:bold;'>" . _AM_MAILTAGS . "</span><br /><span style='font-size:x-small;font-weight:normal;'>" . _AM_MAILTAGS1 . "<br />" . _AM_MAILTAGS2 . "<br />" . _AM_MAILTAGS3 . "<br />" . _AM_MAILTAGS4 . "</span>";
$body_text = new XoopsFormTextArea($body_caption, "mail_body", "", 10);
$to_checkbox = new XoopsFormCheckBox(_AM_SENDTO, "mail_send_to", "mail");
$to_checkbox->addOption("mail", _AM_EMAIL);
$to_checkbox->addOption("pm", _AM_PM);
$start_hidden = new XoopsFormHidden("mail_start", 0);
$op_hidden = new XoopsFormHidden("op", "send");
$submit_button = new XoopsFormButton("", "mail_submit", _SEND, "submit");
$form->addElement($fname_text);
$form->addElement($femail_text);
$form->addElement($subject_text);
$form->addElement($body_text);
$form->addElement($to_checkbox);
$form->addElement($op_hidden);
$form->addElement($start_hidden);
$form->addElement($submit_button);
$form->setRequired($subject_text);
$form->setRequired($body_text);
$form->setRequired($to_checkbox);
开发者ID:amjadtbssm,项目名称:website,代码行数:31,代码来源:mailform.php

示例9: IRnew

function IRnew()
{
    global $radioid, $xoopsDB;
    debaseradminMenu(1, _AM_DEBASERRAD_ADMIN . ' : ' . _AM_DEBASERRAD_NEW);
    echo "\r\n\t\t<div style='float:left; width:100%;'><table width='100%'>\r\n\t\t<tr>\r\n\t\t<td>";
    $nuform = new XoopsThemeForm(_AM_DEBASERRAD_NEW, "IRnew", "radioindex.php");
    $formradioname = new XoopsFormText(_AM_DEBASERRAD_NAME, "radioname", 50, 50);
    $formradiourl = new XoopsFormText(_AM_DEBASERRAD_URL, "radiourl", 50, 50, "http://");
    $formradiostream = new XoopsFormText(_AM_DEBASERRAD_STREAM, "radiostream", 50, 255, "http://");
    $formradiopict = new XoopsFormText(_AM_DEBASERRAD_PICT, "radiopicture", 50, 50);
    $op_hidden = new XoopsFormHidden("op", "IRadd");
    $submit_button = new XoopsFormButton("", "dbsubmit", _SUBMIT, "submit");
    $nuform->addElement($formradioname);
    $nuform->addElement($formradiourl);
    $nuform->addElement($formradiostream);
    $nuform->addElement($formradiopict);
    $nuform->addElement($op_hidden);
    $nuform->addElement($submit_button);
    $nuform->setRequired($formradioname);
    $nuform->setRequired($formradiostream);
    $nuform->display();
    echo "\r\n\t\t</td>\r\n\t\t</tr>\r\n\t\t</table>\r\n\t\t<br /><a href='http://www.radio-locator.com' target='_blank'>Open MIT Radio Locator</a><hr /></div>";
}
开发者ID:artistafrustrado,项目名称:debaser-diaadiaeducacao,代码行数:23,代码来源:radioindex.php

示例10: display_edit_form

function display_edit_form($icons, $form_title, $action)
{
    global $cattree, $icon_url;
    global $gnavi_defaultlat;
    global $gnavi_defaultlng;
    global $gnavi_defaultzoom;
    global $gnavi_googlemapapi_key;
    global $gnavi_usegooglemap, $gnavi_fsize;
    $myts =& MyTextSanitizer::getInstance();
    extract($icons);
    // Beggining of XoopsForm
    $form = new XoopsThemeForm($form_title, 'MainForm', '');
    $form->setExtra("enctype='multipart/form-data'");
    // Hidden
    $form->addElement(new XoopsFormHidden('action', $action));
    $form->addElement(new XoopsFormHidden('icd', $icd));
    // Title
    $form->addElement(new XoopsFormText(_MD_A_GNAVI_ICO_TH_TITLE, 'title', 30, 50, $myts->htmlSpecialChars($title)), true);
    if ($ext) {
        $photoview = new XoopsFormLabel(_MD_A_GNAVI_ICO_IMG, "<img src='" . $icon_url . "/" . $icd . "." . $ext . "' />");
        $file_form = new XoopsFormFile(_MD_A_GNAVI_ICO_EDIIMG, "photofile", $gnavi_fsize);
    } else {
        $file_form = new XoopsFormFile(_MD_A_GNAVI_ICO_IMG, "photofile", $gnavi_fsize);
        $form->setRequired($file_form);
    }
    $file_form->setExtra("size='70'");
    if ($shadow_ext) {
        $photoview1 = new XoopsFormLabel(_MD_A_GNAVI_ICO_SHADOW, "<img src='" . $icon_url . "/" . $icd . "_s." . $shadow_ext . "'  />");
        $file_form1 = new XoopsFormFile(_MD_A_GNAVI_ICO_EDISHADOW, "photofile1", $gnavi_fsize);
    } else {
        $file_form1 = new XoopsFormFile(_MD_A_GNAVI_ICO_SHADOW, "photofile1", $gnavi_fsize);
    }
    $file_form1->setExtra("size='70'");
    $del_box1 = new XoopsFormCheckBox("&nbsp;", "del_photo1", array(0));
    $del_box1->addOption('1', _MD_A_GNAVI_ICO_DELSHADOW);
    if ($ext) {
        $form->addElement($photoview);
    }
    $form->addElement($file_form);
    if ($shadow_ext) {
        $form->addElement($photoview1);
        $form->addElement($del_box1);
    }
    $form->addElement($file_form1);
    // Anchor
    $form->addElement(new XoopsFormText('Anchor_x', 'Anchor_x', 4, 4, $myts->htmlSpecialChars($Anchor_x)), true);
    $form->addElement(new XoopsFormText('Anchor_y', 'Anchor_y', 4, 4, $myts->htmlSpecialChars($Anchor_y)), true);
    //infoWindowAnchor
    $form->addElement(new XoopsFormText('infoWindowAnchor_x', 'infoWindowAnchor_x', 4, 4, $myts->htmlSpecialChars($infoWindowAnchor_x)), true);
    $form->addElement(new XoopsFormText('infoWindowAnchor_y', 'infoWindowAnchor_y', 4, 4, $myts->htmlSpecialChars($infoWindowAnchor_y)), true);
    // Buttons
    $button_tray = new XoopsFormElementTray('', '&nbsp;');
    $button_tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
    $button_tray->addElement(new XoopsFormButton('', 'reset', _CANCEL, 'reset'));
    $form->addElement($button_tray);
    // Ticket
    $GLOBALS['xoopsGTicket']->addTicketXoopsFormElement($form, __LINE__);
    // End of XoopsForm
    $form->display();
}
开发者ID:nouphet,项目名称:rata,代码行数:60,代码来源:icon.php


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