本文整理汇总了PHP中FormHandler类的典型用法代码示例。如果您正苦于以下问题:PHP FormHandler类的具体用法?PHP FormHandler怎么用?PHP FormHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FormHandler类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: passbuilder_template
function passbuilder_template($template)
{
$url = new UrlParams();
$current_role = Helper::getRole();
$urlParams = $url->getQueryArray();
if (array_key_exists('pass-builder', $urlParams)) {
if (is_user_logged_in()) {
if ($current_role != '') {
// form submit handle here
if ($_POST['formAction']) {
$handler = new FormHandler($_POST['formAction']);
$handler->handleSubmit();
}
if ($_GET['action']) {
$handler = new ActionHandler($_GET['action']);
$handler->fireAction();
}
return dirname(__FILE__) . '/templates/page-pass-template.php';
} else {
return dirname(__FILE__) . '/templates/page-permission-exceptions.php';
}
} else {
$loginUrl = ICL_LANGUAGE_CODE == 'en' ? get_site_url() . '/log-in/' : get_site_url() . '/da/log-in-2/';
wp_redirect($loginUrl);
}
}
return $template;
}
开发者ID:kamranshahzad,项目名称:passbook-ui,代码行数:28,代码来源:passbook-builder.php
示例2: _parseEditMachineForm
function _parseEditMachineForm()
{
$FH = new FormHandler("editMachineFH", $_POST);
$name = $FH->getPostValue("name");
$description = $FH->getPostValue("description");
$enabled = $FH->getPostValue("shareEnabled") == "on" ? True : "";
return array($name, $description, $enabled);
}
开发者ID:psyray,项目名称:mmc,代码行数:8,代码来源:edit.php
示例3: add
function add()
{
// make a new $form object
$form = new FormHandler();
// permit editing
$form->PermitEdit();
echo "<span class=\"pageHeading\">Add files</span><BR><BR>";
$form->TableSettings('100%', 0, 1, 2, 'font-family:Verdana;font-size:10px;border: 1px solid grey');
// upload config
$config = array('path' => '../files/', 'type' => 'jpg jpeg png gif', 'exists' => 'rename', 'size' => '1000000');
// uploadfield
$form->uploadField('Image', 'image', $config);
// save the resized image as...
// MAKE SURE THAT THIS DIR EXISTS!
$saveAs = UPLOAD_DIR . '/thumbs';
// resize the image
//echo $saveAs;
$form->imageResize('image', $saveAs, UPLOAD_RESIZE_WIDTH);
$form->SubmitBtn("Opslaan", false, "Annuleren");
// what to do after saving ?
$form->OnCorrect("doRun");
// flush the form
$form->FlushForm();
// 'commit after form' function
}
开发者ID:TimvanSteenbergen,项目名称:rethmeier,代码行数:25,代码来源:upload.php
示例4: login
function login()
{
$this->_fix_failedlogins();
if(MEMBER_ID < 1)
{
$this->Messager("请先在前台进行<a href='index.php?mod=account&code=login'><b>登录</b></a>",null);
}
$loginperm = $this->_logincheck();
if(!$loginperm) {
$this->Messager("累计 5 次错误尝试,15 分钟内您将不能登录。",null);
}
$this->Title="用户登录";
if ($this->CookieHandler->GetVar('referer')=='')
{
$this->CookieHandler->Setvar('referer',referer());
}
$action="admin.php?mod=login&code=dologin";
$question_select=FormHandler::Select('question',ConfigHandler::get('member','question_list'),0);
$role_type_select=FormHandler::Radio('role_type',ConfigHandler::get('member','role_type_list'),'normal');
ob_clean();
include(handler('template')->file("@admin/login"));
}
开发者ID:pf5512,项目名称:phpstudy,代码行数:25,代码来源:login.mod.php
示例5: getInstance
/**
* getInstance
* @return FormHandler object instance of the class
*/
public static function getInstance()
{
if (self::$instance == null) {
self::$instance = new FormHandler();
}
return self::$instance;
}
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:11,代码来源:form.handler.class.php
示例6: setValidator
public function setValidator($validator = null)
{
if (count($this->getValidators()) === 0 && $validator instanceof FormHandler\Validator\FunctionCallable && is_array($validator->getCallable())) {
$callable = $validator->getCallable();
//detect if it is an optional validator
if ($callable[0] instanceof Validator && substr($callable[1], 0, 1) !== '_') {
parent::setValidator(new \FormHandler\Validator\NotEmpty());
}
}
return parent::setValidator(FormHandler::parseValidator($validator, $this));
}
开发者ID:FormHandler,项目名称:FormHandler-legacy,代码行数:11,代码来源:UploadField.php
示例7: add
function add()
{
if (isset($_GET['id'])) {
echo "<span class=\"pageHeading\">Wijzigen categorie</span><BR><BR>";
} else {
echo "<span class=\"pageHeading\">Invoeren nieuwe categorie</span><BR><BR>";
}
$form = new FormHandler();
$form->PermitEdit();
$form->TableSettings('100%', 0, 1, 2, 'font-family:Verdana;font-size:10px;border: 1px solid grey');
//$form->AddHTML($myhtml);
// set the database data (data from another file or so ? )
$form->UseDatabase(DB_DATABASE, "categories");
$form->textfield("Naam", "categories_name", "", "50");
$form->SubmitBtn("Opslaan", false, "Annuleren");
$form->OnSaved("doRun");
// flush the form
$form->FlushForm();
}
开发者ID:TimvanSteenbergen,项目名称:rethmeier,代码行数:19,代码来源:categories.php
示例8: Main
function Main()
{
$this->CheckAdminPrivs('ucenter');
if(!is_file(UC_CLIENT_ROOT . './client.php')){
$this->Messager('Ucenter的客户端文件 <b>' . UC_CLIENT_ROOT . './client.php' . "</b> 不存在,请检查",null);
}
if(!is_file(ROOT_PATH . './api/uc.php')){
$this->Messager('Ucenter的api文件 <b>' . UC_CLIENT_ROOT . './client.php' . "</b> 不存在,请检查",null);
}
$ucenter = ConfigHandler::get('ucenter');
$uc_enable_radio = FormHandler::YesNoRadio('ucenter[enable]',(bool) $ucenter['enable']);
${"uc_connect_{$ucenter['uc_connect']}_checked"} = " checked ";
include handler('template')->file('@admin/ucenter');
}
开发者ID:pf5512,项目名称:phpstudy,代码行数:18,代码来源:ucenter.mod.php
示例9: FormHandler
<?php
require_once "./lib/defines.php";
require_once "./lib/module.access.php";
require_once DIR_COMMON . "Form.inc.php";
require_once DIR_COMMON . "Class.HelpElem.inc.php";
require_once DIR_COMMON . "Form/Class.SqlRefField.inc.php";
require_once DIR_COMMON . "Form/Class.TimeField.inc.php";
require_once DIR_COMMON . "Form/Class.ClauseField.inc.php";
$menu_section = 'menu_charge';
HelpElem::DoHelp(_("Charges are money transactions apart from calls. They are used to indicate that the customer should pay or receive extra money."));
$HD_Form = new FormHandler('cc_card_charge', _("Charges"), _("Charge"));
$HD_Form->checkRights(ACX_ACCESS);
$HD_Form->init();
// $HD_Form->views['list']=new ListView();
// $HD_Form->views['details'] = new DetailsView();
$PAGE_ELEMS[] =& $HD_Form;
//$PAGE_ELEMS[] = new AddNewButton($HD_Form);
// TODO: put static fields and fix them!
$HD_Form->views['ask-del'] = $HD_Form->views['delete'] = null;
$HD_Form->views['ask-add'] = $HD_Form->views['add'] = null;
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$HD_Form->model[] = new ClauseField('agentid', $_SESSION['agent_id']);
$HD_Form->model[] = new SqlBigRefField(_("Card"), "card", "cc_card", "id", "username");
$HD_Form->model[] = new DateTimeFieldDH(_("Date"), 'creationdate');
$HD_Form->model[] = new SqlRefField(_("Type"), "chargetype", "cc_texts", "id", "txt");
$lng = getenv('LANG');
if (empty($lng) || $lng == 'en_US') {
$lng = 'C';
}
end($HD_Form->model)->refclause = "lang = '{$lng}'";
开发者ID:sayemk,项目名称:a2billing,代码行数:31,代码来源:A2B_entity_charge.php
示例10: session_start
session_start();
// check if the script has been already called in the previous minute, no multiple signup
if (!isset($_SESSION["date_activation"]) || time() - $_SESSION["date_activation"] > 0) {
$_SESSION["date_activation"] = time();
} else {
sleep(3);
echo gettext("Sorry the activation has been sent already, please wait 1 minute before making any other try !");
exit;
}
// get include
include './lib/customer.defines.php';
include './lib/customer.module.access.php';
include './lib/Form/Class.FormHandler.inc.php';
include './lib/customer.smarty.php';
getpost_ifset(array('key'));
$HD_Form = new FormHandler("cc_card", "User");
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
// HEADER SECTION
$smarty->display('signup_header.tpl');
if (empty($key)) {
$key = null;
}
$result = null;
$instance_sub_table = new Table('cc_card', "username, lastname, firstname, email, uipass, credit, useralias, loginkey, status, id");
$QUERY = "( loginkey = '" . $key . "' )";
$list = $instance_sub_table->Get_list($HD_Form->DBHandle, $QUERY);
if (isset($key) && $list[0][8] != "1") {
if ($A2B->config["signup"]['activated']) {
// Status : 1 - Active
$QUERY = "UPDATE cc_card SET status = 1 WHERE ( status = 2 OR status = 3 ) AND loginkey = '" . $key . "' ";
开发者ID:saydulk,项目名称:a2billing,代码行数:31,代码来源:activate.php
示例11: FormHandler
<tr>
<td class="bgcolor_004" align="left" > </td>
<td class="bgcolor_005" align="center" >
<input type="image" name="image16" align="top" border="0" src="<?php echo Images_Path;?>/button-search.gif" />
</td>
</tr>
</table>
</FORM>
<?php
$HD_Form = new FormHandler("pnl_report","PNL Report");
$HD_Form -> setDBHandler (DbConnect());
$HD_Form -> init();
$condition1=str_replace('cdr.starttime','date',$condition);
$condition2=str_replace('cdr.starttime','firstusedate',$condition);
$payphones=$A2B->config["webui"]["report_pnl_pay_phones"];
$tallfree=$A2B->config["webui"]["report_pnl_tall_free"];
$payphones=str_replace(' ','',$payphones);
$tallfree=str_replace(' ','',$tallfree);
$payphones=str_replace('),(',' ,1 as dnid_type union select ',$payphones);
$payphones=str_replace(')',' ,1 ',$payphones);
$tallfree=str_replace('),(',' ,2 union select ',$tallfree);
$tallfree=str_replace(')',' ,2 ',$tallfree);
开发者ID:nixonch,项目名称:a2billing,代码行数:30,代码来源:call-pnl-report.php
示例12: FreeClauseField
$tmp->Form->views['list']->page_cols = 2;
$tmp->Form->model[] = new FreeClauseField("sessionbill IS NOT NULL");
$tmp->Form->model[] = new FreeClauseField("sessiontime > 0");
$tmp->Form->model[] = new DateTimeField(_("Time"), 'starttime');
$tmp->Form->model[] = new TextField(_("Number"), 'calledstation');
$tmp->Form->model[] = new TextField(_("Destination"), 'destination');
$tmp->Form->model[] = new SecondsField(_("Duration"), 'sessiontime');
end($tmp->Form->model)->fieldacr = _("Dur");
//$tmp->Form->model[] = new PKeyFieldTxt(_("ID"),'id');
$tmp->Form->model[] = new MoneyField(_("Bill"), 'sessionbill');
//one non-summed group
$tmp->Form->views['list']->sums[] = array('fns' => array('starttime' => true, 'calledstation' => true, 'destination' => true, 'sessiontime' => true, 'sessionbill' => true), 'order' => 'starttime');
//Per day/destination
$tmp->Form->views['list']->sums[] = array('title' => _("Sum per destination"), 'fns' => array('starttime' => false, 'destination' => true, 'sessiontime' => 'SUM', 'sessionbill' => 'SUM'), 'order' => 'sessiontime', 'sens' => 'DESC');
$tmp->Form->views['list']->sums[] = array('title' => _("Total"), 'fns' => array('calledstation' => 'COUNT', 'sessiontime' => 'SUM', 'sessionbill' => 'SUM'));
$hform = new FormHandler('cc_card');
$hform->checkRights(ACX_INVOICING);
$hform->init(null, false);
$hform->setAction('details');
$hform->views['details'] = new DetailsView();
$hform->model[] = new FreeClauseField(str_dbparams(A2Billing::DBHandle(), 'id = (SELECT cardid FROM cc_invoices WHERE id = %#1)', array($dform->getpost_dirty('id'))));
//$hform->model[] = new PKeyField(_("ID"),'id');
$hform->model[] = new TextField(_("Local number"), 'useralias');
$hform->model[] = new TextFieldN(_("First name"), 'firstname');
$hform->model[] = new TextFieldN(_("Last name"), 'lastname');
$hform->model[] = new TextAreaField(_("Address"), 'address');
$hform->model[] = new TextFieldN(_("City"), 'city');
$hform->model[] = new TextFieldN(_("State"), 'state');
$hform->model[] = new TextFieldN(_("Country"), 'country');
$hform->model[] = new TextFieldN(_("Zipcode"), 'zipcode');
//$hform->model[] = new TextFieldN(_("Phone"),'phone');
开发者ID:sayemk,项目名称:a2billing,代码行数:31,代码来源:invoices_card.php
示例13: _userquota_baseGroupEdit
function _userquota_baseGroupEdit($ldapArr, $postArr)
{
$FH = new FormHandler("editGroupQuota", $postArr);
$FH->setArr($ldapArr);
$components = getActiveComponents();
if ($components["disk"]) {
$f = new DivForModule(_T("Quota plugin - Filesystem", "userquota"), "#FDD");
$f->push(new Table());
$f = addDiskQuotas($f, $FH);
$f->add(new TrCommentElement(_T("Quota's applied here affect all members of the group", "userquota")));
$overwrite = new RadioTpl("diskoverwrite");
$overwrite->setChoices(array(_T("Overwrite all existing quotas", "userquota"), _T("Current quota is smaller than the new quota, or does not exist", "userquota"), _T("Current quota is larger than the new quota, or does not exist", "userquota"), _T("Don't overwrite any existing quotas", "userquota")));
$overwrite->setValues(array("all", "smaller", "larger", "none"));
$overwrite->setSelected("none");
$f->add(new TrFormElement(_T("Overwrite mode for existing quotas", "userquota"), $overwrite));
$f->pop();
$f->display();
}
if ($components["network"]) {
$f = new DivForModule(_T("Quota plugin - Network", "userquota"), "#FFD");
$f->push(new Table());
$f = addNetworkQuotas($f, $FH);
$f->add(new TrCommentElement(_T("Quota's applied here affect all members of the group", "userquota")));
$overwrite = new RadioTpl("networkoverwrite");
$overwrite->setChoices(array(_T("Overwrite all existing quotas", "userquota"), _T("Current quota is smaller than the new quota, or does not exist", "userquota"), _T("Current quota is larger than the new quota, or does not exist", "userquota"), _T("Don't overwrite any existing quotas", "userquota")));
$overwrite->setValues(array("all", "smaller", "larger", "none"));
$overwrite->setSelected("none");
$f->add(new TrFormElement(_T("Overwrite mode for existing quotas", "userquota"), $overwrite));
$f->pop();
$f->display();
}
}
开发者ID:neoclust,项目名称:mmc,代码行数:32,代码来源:publicFunc.php
示例14: FormHandler
require_once "./lib/defines.php";
require_once "./lib/module.access.php";
require_once "a2blib/Form.inc.php";
require_once "a2blib/Class.HelpElem.inc.php";
require_once "a2blib/Form/Class.SqlRefField.inc.php";
require_once "a2blib/Form/Class.VolField.inc.php";
require_once "a2blib/Form/Class.TimeField.inc.php";
require_once "a2blib/Form/Class.ClauseField.inc.php";
require_once "a2blib/Form/Class.TextSearchField.inc.php";
require_once "a2blib/Form/Class.SelectionForm.inc.php";
require_once "a2blib/Form/Class.TabField.inc.php";
require_once "a2blib/Class.JQuery.inc.php";
$menu_section = 'menu_customers';
HelpElem::DoHelp(gettext("Customers are listed below by card number. Each row corresponds to one customer, along with information such as their call plan, credit remaining, etc.</br>" . "The SIP and IAX buttons create SIP and IAX entries to allow direct VoIP connections to the Asterisk server without further authentication."), 'vcard.png');
$HD_Form = new FormHandler('cc_card', _("Customers"), _("Customer"));
$HD_Form->checkRights(ACX_CUSTOMER);
$HD_Form->init();
$HD_Form->views['tooltip'] = new DetailsMcView();
$HD_Form->model[] = new TabField(_("Card information"));
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$HD_Form->model[] = new TextFieldEH(_("Card number"), 'username', _('Card username. Also the PIN for callingcards'));
$HD_Form->model[] = new TextField(_("Card alias"), 'useralias', _("Alias, also the number *-*"));
$HD_Form->model[] = new SqlRefField(_("Group"), "grp", "cc_card_group", "id", "name");
if ($HD_Form->getAction() != 'tooltip') {
$HD_Form->model[] = dontList(new PasswdField(_("Card pass"), 'userpass', 'alnum', _("PIN")));
}
$HD_Form->model[] = new FloatVolField(_("Credit"), 'credit', _("Money now in the card. Positive is credit, negative owes us."));
$HD_Form->model[] = new FloatVolField(_("Credit Limit"), 'creditlimit', _("Maximum (negative) credit this card can reach, if postpaid."));
end($HD_Form->model)->fieldacr = _("CLim");
$cs_list = array();
开发者ID:sayemk,项目名称:a2billing,代码行数:30,代码来源:A2B_entity_card.php
示例15: customers
<?php
require_once "./lib/defines.php";
require_once "./lib/module.access.php";
require_once "a2blib/Form.inc.php";
require_once "a2blib/Form/Class.SqlRefField.inc.php";
require_once "a2blib/Form/Class.VolField.inc.php";
require_once "a2blib/Form/Class.TimeField.inc.php";
require_once "a2blib/Class.HelpElem.inc.php";
$menu_section = 'menu_billing';
HelpElem::DoHelp(_("Subscriptions are customers (cards) being attached to a recurring fee or special service."));
$HD_Form = new FormHandler('card_subscription', _("Subscriptions"), _("Subscription"));
$HD_Form->checkRights(ACX_BILLING);
$HD_Form->init();
$PAGE_ELEMS[] =& $HD_Form;
$PAGE_ELEMS[] = new AddNewButton($HD_Form);
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$HD_Form->model[] = new SqlBigRefField(_("Card"), "card", "cc_card", "id", "username");
$HD_Form->model[] = new SqlRefField(_("Kind"), "template", "subscription_template", "id", "name");
$cs_list = array();
$cs_list[] = array("0", _("Inactive"));
$cs_list[] = array("1", _("Active"));
//$cs_list[] = array("2", _("..."));
$HD_Form->model[] = dontAdd(new RefField(_("Status"), 'status', $cs_list));
$HD_Form->model[] = dontAdd(dontList(new DateTimeField(_("Creation date"), "creationdate", _("Date the subscription was registered"))));
end($HD_Form->model)->fieldacr = _("Creat");
$HD_Form->model[] = new DateTimeFieldN(_("Activation date"), "activedate", _("Date it becomes active"));
end($HD_Form->model)->fieldacr = _("Activ");
$HD_Form->model[] = new DateTimeFieldN(_("Expire date"), "expiredate", _("After this date it is no longer charged or used."));
end($HD_Form->model)->fieldacr = _("Exp.");
// $HD_Form->model[] = dontList(new SqlRefFieldN(_("CLID Rules"), "rnplan","cc_re_numplan", "id", "name"));
开发者ID:sayemk,项目名称:a2billing,代码行数:31,代码来源:A2B_entity_subscription.php
示例16: isCorrect
/**
* dbFormHandler::isCorrect()
*
* Return if the form is filled correctly (for the fields which are set!)
*
* @return boolean: the form values valid or not
* @access public
* @author Teye Heimans
*/
function isCorrect()
{
$result = parent::isCorrect();
// check if there is no unique field error when the field is completly correct
if ($result) {
return $this->_checkUniqueFields();
}
return false;
}
开发者ID:reshadf,项目名称:RMProject,代码行数:18,代码来源:dbFormHandler.php
示例17: FormHandler
<?php
// include the class
//include("includes/classes/class.FormHandler.php");
include "style.php";
// make a new $form object
$form = new FormHandler();
// permit editing
$form->PermitEdit();
echo "<span class=\"pageHeading\">Administratie gebruiker toevoegen</span><BR><BR>";
$form->TableSettings('100%', 0, 1, 2, 'font-family:Verdana;font-size:10px;border: 1px solid grey');
//$form->AddHTML($myhtml);
// set the database data (data from another file or so ? )
$form->UseDatabase(DB_DATABASE, "admin_users");
$form->textfield("Naam", "USER_NAME", "", "50");
$form->textfield("Loginnaam", "USER_LOGIN", "", "50");
$form->textfield("Wachtwoord", "USER_PASS", "", "50");
$form->textfield("E-mail", "USER_EMAIL", "", "50");
$form->hiddenfield("USER_IP", $_SERVER['REMOTE_ADDR']);
// button beneath it (submit, reset and cancel!)
$form->SubmitBtn("Opslaan", false, "Annuleren");
// what to do after saving ?
$form->OnSaved("doRun");
// flush the form
$form->FlushForm();
// 'commit after form' function
function doRun($id, $data)
{
return "<META HTTP-EQUIV=\"Refresh\" Content= \"0; URL=index.php?page=adminusers\">";
}
?>
开发者ID:TimvanSteenbergen,项目名称:rethmeier,代码行数:31,代码来源:inc_newadminuser.php
示例18: FormHandler
<?php
require_once "./lib/defines.php";
require_once "./lib/module.access.php";
require_once "a2blib/Form.inc.php";
require_once "a2blib/Class.HelpElem.inc.php";
require_once "a2blib/Form/Class.SqlRefField.inc.php";
// require_once ("a2blib/Form/Class.TabField.inc.php");
require_once "a2blib/Form/Class.TimeField.inc.php";
// require_once ("a2blib/Class.JQuery.inc.php");
$menu_section = 'menu_queues';
HelpElem::DoHelp(_("Logs are the technical entries, directly from asterisk, of queue events."));
$HD_Form = new FormHandler('ast_queue_log', _("Logs"), _("Log"));
$HD_Form->checkRights(ACX_QUEUES);
$HD_Form->default_order = 'tstamp';
$HD_Form->default_sens = 'DESC';
$HD_Form->init();
$PAGE_ELEMS[] =& $HD_Form;
// $PAGE_ELEMS[] = new AddNewButton($HD_Form);
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$HD_Form->model[] = new DateTimeFieldDH(_("Date"), "tstamp", _("Event date"));
$HD_Form->model[] = new TextFieldN(_("Call"), 'callid', _("Asterisk call identifier."));
$HD_Form->model[] = new TextFieldN(_("Queue"), 'queuename', _("Queue name."));
$HD_Form->model[] = new TextFieldN(_("Agent"), 'agent', _("Agent which served the call, if any."));
$HD_Form->model[] = new TextFieldN(_("Event"), 'event', _("Asterisk event code."));
$HD_Form->model[] = dontList(new TextFieldN(_("P 1"), 'parm1', _("Event parameter 1.")));
$HD_Form->model[] = dontList(new TextFieldN(_("P 2"), 'parm2', _("Event parameter 2.")));
$HD_Form->model[] = dontList(new TextFieldN(_("P 3"), 'parm3', _("Event parameter 3.")));
// $HD_Form->model[] = new DelBtnField();
require "PP_page.inc.php";
开发者ID:sayemk,项目名称:a2billing,代码行数:30,代码来源:A2B_entity_queue_log.php
示例19: FormHandler
<?php
require_once "./lib/defines.php";
require_once "./lib/module.access.php";
require_once "a2blib/Form.inc.php";
require_once "a2blib/Class.HelpElem.inc.php";
require_once "a2blib/Form/Class.SqlRefField.inc.php";
$menu_section = 'menu_customers';
HelpElem::DoHelp(gettext("CallerID <br> Set the caller ID so that the customer calling in is authenticated on the basis of the callerID rather than with account number."));
$HD_Form = new FormHandler('cc_callerid', _("CallerIDs"), _("CallerID"));
$HD_Form->checkRights(ACX_CUSTOMER);
$HD_Form->init();
$PAGE_ELEMS[] =& $HD_Form;
$PAGE_ELEMS[] = new AddNewButton($HD_Form);
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$HD_Form->model[] = new TextFieldEH(_("Caller ID"), 'cid', _("Insert the CallerID"));
$HD_Form->model[] = new SqlBigRefField(_("CardNumber"), "cardid", "cc_card", "id", "username");
end($HD_Form->model)->SetRefEntity("A2B_entity_card.php");
end($HD_Form->model)->SetRefEntityL("A2B_entity_card.php");
end($HD_Form->model)->SetEditTitle(_("Card ID"));
$actived_list = array();
$actived_list[] = array('t', gettext("Active"));
$actived_list[] = array('f', gettext("Inactive"));
$HD_Form->model[] = new RefField(_("ACTIVATED"), "activated", $actived_list, _("Allow the callerID to operate"), "4%");
$HD_Form->model[] = new DelBtnField();
require "PP_page.inc.php";
?>
开发者ID:sayemk,项目名称:a2billing,代码行数:27,代码来源:A2B_entity_callerid.php
示例20: FormHandler
<?php
require_once "./lib/defines.php";
require_once "./lib/module.access.php";
require_once "a2blib/Form.inc.php";
require_once "a2blib/Form/Class.SqlRefField.inc.php";
require_once "a2blib/Form/Class.VolField.inc.php";
require_once "a2blib/Form/Class.TimeField.inc.php";
require_once "a2blib/Form/Class.RevRefForm.inc.php";
require_once "a2blib/Class.HelpElem.inc.php";
$menu_section = 'menu_did';
HelpElem::DoHelp(_("DID phonebooks help associate incoming CLIDs with names"));
$HD_Form = new FormHandler('did_phonebook', _("DID Phonebooks"), _("DID phonebook"));
$HD_Form->checkRights(ACX_DID);
$HD_Form->init();
$PAGE_ELEMS[] =& $HD_Form;
$PAGE_ELEMS[] = new AddNewButton($HD_Form);
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$HD_Form->model[] = new TextFieldEH(_("Name"), 'name');
$HD_Form->model[] = new TextFieldN(_("Code"), 'code', _("A code, for syncing it with foreign ones."));
$HD_Form->model[] = dontList(new SqlRefFieldN(_("CLID Rules"), "rnplan", "cc_re_numplan", "id", "name", _("Use this book in those CLIDs only")));
$HD_Form->model[] = dontList(new SqlRefFieldN(_("Card Group"), "card_group", "cc_card_group", "id", "name", _("Use this book in that card group only")));
$HD_Form->model[] = dontList(new SqlBigRefField(_("Card"), "cardid", "cc_card", "id", "name", _("Use this book only for that card: private one.")));
$HD_Form->model[] = new DelBtnField();
$tmp = new RevRefForm(_("Entries"), 'ints', 'id', 'did_pb_entry', 'pb');
$HD_Form->meta_elems[] = $tmp;
$tmp->Form->checkRights(ACX_DID);
$tmp->Form->init();
$tmp->Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$tmp->Form->model[] = new TextField(_("Name"), 'name');
$tmp->Form->model[] = new TextField(_("Number"), 'dnum', _('Number, in intermediate incoming format.'));
开发者ID:sayemk,项目名称:a2billing,代码行数:31,代码来源:A2B_entity_did_phonebook.php
注:本文中的FormHandler类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论