• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP exponent_forms_initialize函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中exponent_forms_initialize函数的典型用法代码示例。如果您正苦于以下问题:PHP exponent_forms_initialize函数的具体用法?PHP exponent_forms_initialize怎么用?PHP exponent_forms_initialize使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: form

 function form($object)
 {
     $i18n = exponent_lang_loadFile('datatypes/approvalpolicy.php');
     if (!defined('SYS_WORKFLOW')) {
         require_once BASE . 'subsystems/workflow.php';
     }
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     if (isset($object->id)) {
         $form->meta('id', $object->id);
     } else {
         $object->name = '';
         $object->description = '';
         $object->max_approvers = 0;
         $object->required_approvals = 0;
         $object->on_deny = SYS_WORKFLOW_REVOKE_NONE;
         $object->on_edit = SYS_WORKFLOW_REVOKE_NONE;
         $object->on_approve = SYS_WORKFLOW_REVOKE_NONE;
         $object->delete_on_deny = 0;
     }
     $form->register('name', $i18n['name'], new textcontrol($object->name));
     $form->register('description', $i18n['description'], new texteditorcontrol($object->description));
     $form->register('max_approvers', $i18n['max_approvers'], new textcontrol($object->max_approvers));
     $form->register('required_approvals', $i18n['required_approvals'], new textcontrol($object->required_approvals));
     $list = array(SYS_WORKFLOW_REVOKE_NONE => $i18n['revoke_none'], SYS_WORKFLOW_REVOKE_ALL => $i18n['revoke_all'], SYS_WORKFLOW_REVOKE_POSTER => $i18n['revoke_poster'], SYS_WORKFLOW_REVOKE_APPROVERS => $i18n['revoke_approvers'], SYS_WORKFLOW_REVOKE_OTHERS => $i18n['revoke_others']);
     $form->register('on_approve', $i18n['on_approve'], new dropdowncontrol($object->on_approve, $list));
     $form->register('on_edit', $i18n['on_edit'], new dropdowncontrol($object->on_edit, $list));
     $form->register('on_deny', $i18n['on_deny'], new dropdowncontrol($object->on_deny, $list));
     $form->register('delete_on_deny', $i18n['delete_on_deny'], new checkboxcontrol($object->delete_on_deny));
     $form->register('submit', '', new buttongroupcontrol($i18n['save'], '', $i18n['cancel']));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:35,代码来源:approvalpolicy.php


示例2: form

 function form($object)
 {
     $i18n = exponent_lang_loadFile('datatypes/contact_contact.php');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $type = 0;
     $default = 0;
     $form = new form();
     if (!isset($object->id)) {
         $object->user_id = 0;
         $object->addressbook_contact_id = 0;
         $object->email = '';
         $object->contact_info = '';
     } else {
         $form->meta('id', $object->id);
         if ($object->user_id != 0) {
             $type = 0;
             $default = $object->user_id;
         } else {
             $type = 1;
             $default = $object->email;
         }
     }
     $form->register('contact', $i18n['contact'], new contactcontrol($default, $type));
     $form->register('submit', '', new buttongroupcontrol($i18n['save'], '', $i18n['cancel']));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:29,代码来源:contact_contact.php


示例3: form

 function form($object)
 {
     if (!defined('SYS_FORMS')) {
         include_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->name = '';
         $object->affiliate_id = 0;
         $object->url = 'http://';
     } else {
         $form->meta('id', $object->id);
         global $db;
         $file = $db->selectObject('file', 'id=' . $object->file_id);
         $form->register(uniqid(''), '', new htmlcontrol('<img src="' . $file->directory . '/' . $file->filename . '"/>'));
     }
     $i18n = exponent_lang_loadFile('datatypes/banner_ad.php');
     $affiliates = BannerModule::listAffiliates();
     $form->register('name', $i18n['name'], new textcontrol($object->name));
     $submit = new buttongroupcontrol($i18n['save'], '', $i18n['cancel']);
     if (count($affiliates)) {
         $form->register('affiliate_id', $i18n['affiliate_id'], new dropdowncontrol($object->affiliate_id, $affiliates));
     } else {
         $form->registerBefore('name', null, '', new htmlcontrol('<div class="error">' . $i18n['no_affiliates'] . '</div>'));
         $submit->disabled = 1;
     }
     $form->register('url', $i18n['url'], new texteditorcontrol($object->url, 2, 40));
     $form->register('submit', '', $submit);
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:31,代码来源:banner_ad.php


示例4: form

 function form($object)
 {
     $i18n = exponent_lang_loadFile('database/inbox_contactbanned.php');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     if (!defined('SYS_USERS')) {
         require_once BASE . 'subsystems/users.php';
     }
     $users = array();
     foreach (exponent_users_getAllUsers() as $u) {
         // Get the current user.
         $thisuser = $_SESSION['/']['user'];
         if ($u->is_acting_admin == 0 && $u->id != $thisuser->id) {
             $users[$u->id] = $u->firstname . ' ' . $u->lastname . ' (' . $u->username . ')';
         }
     }
     global $db;
     foreach ($db->selectObjects('inbox_contactbanned', 'owner=' . $thisuser->id) as $b) {
         unset($users[$b->user_id]);
     }
     $form->register('uid', $i18n['uid'], new dropdowncontrol(0, $users));
     $form->register('submit', '', new buttongroupcontrol($i18n['save'], '', $i18n['cancel']));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:27,代码来源:inbox_contactbanned.php


示例5: form

 function form($object)
 {
     $i18n = exponent_lang_loadFile('datatypes/imagemanageritem.php');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->name = '';
         $object->description = '';
         $object->scale = 20;
     } else {
         $form->meta('id', $object->id);
     }
     $form->register('name', $i18n['name'], new textcontrol($object->name));
     $form->register('description', $i18n['description'], new texteditorcontrol($object->description));
     if (!isset($object->id)) {
         $form->register(null, '', new htmlcontrol(exponent_core_maxUploadSizeMessage()));
         $form->register('file', $i18n['file'], new uploadcontrol());
     }
     $form->register('scale', $i18n['scale'], new textcontrol($object->scale));
     $form->register('submit', '', new buttongroupcontrol($i18n['save'], '', $i18n['cancel']));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:25,代码来源:imagemanageritem.php


示例6: form

 function form($object)
 {
     if (!defined('SYS_FORMS')) {
         include_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $i18n = exponent_lang_loadFile('datatypes/user.php');
     $form = new form();
     if (!isset($object->id)) {
         // If the user object has no id, then this is a new user form.
         // Populate the empty user object with default attributes,
         // so that the calls to $form->register can confidently dereference
         // thes attributes.
         $object->firstname = '';
         $object->lastname = '';
         $object->email = '';
         // Username and Password can only be specified for a new user.  To change the password,
         // a different form is used (part of the loginmodule)
         $form->register('username', $i18n['desired_username'], new textcontrol());
         $form->register('pass1', $i18n['pass1'], new passwordcontrol());
         $form->register('pass2', $i18n['pass2'], new passwordcontrol());
         $form->register(null, '', new htmlcontrol('<br />'));
     } else {
         $form->meta("id", $object->id);
     }
     // Register the basic user profile controls.
     $form->register('firstname', $i18n['firstname'], new textcontrol($object->firstname));
     $form->register('lastname', $i18n['lastname'], new textcontrol($object->lastname));
     $form->register(null, '', new htmlcontrol('<br />'));
     $form->register('email', $i18n['email'], new textcontrol($object->email));
     $form->register(null, '', new htmlcontrol('<br />'));
     $form->register('submit', '', new buttongroupcontrol($i18n['save'], '', $i18n['cancel']));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:34,代码来源:user.php


示例7: form

 function form($object)
 {
     if (!defined('SYS_FORMS')) {
         include_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $i18n = exponent_lang_loadFile('datatypes/group.php');
     $form = new form();
     if (!isset($object->id)) {
         // If the user object has no id, then this is a new user form.
         // Populate the empty user object with default attributes,
         // so that the calls to $form->register can confidently dereference
         // thes attributes.
         $object->name = '';
         $object->description = '';
         $object->inclusive = 1;
     } else {
         $form->meta('id', $object->id);
     }
     // Register the basic user profile controls.
     $form->register('name', $i18n['name'], new textcontrol($object->name));
     $form->register('description', $i18n['description'], new texteditorcontrol($object->description));
     $form->register('inclusive', $i18n['inclusive'], new checkboxcontrol($object->inclusive));
     $form->register('submit', '', new buttongroupcontrol($i18n['save'], '', $i18n['cancel']));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:26,代码来源:group.php


示例8: form

 function form($object)
 {
     $i18n = exponent_lang_loadFile('datatypes/weblog_post.php');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->title = '';
         $object->internal_name = '';
         $object->body = '';
         global $user;
         $object->poster = $user->id;
         $object->is_private = 0;
         $object->is_draft = 0;
     } else {
         $form->meta('id', $object->id);
     }
     $form->register('title', $i18n['title'], new textcontrol($object->title));
     $form->register('body', $i18n['body'], new htmleditorcontrol($object->body));
     $form->register('is_private', $i18n['is_private'], new checkboxcontrol($object->is_private));
     $form->register('submit', '', new buttongroupcontrol($i18n['save'], '', $i18n['cancel']));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:25,代码来源:weblog_post.php


示例9: form

 function form($object = null)
 {
     $i18n = exponent_lang_loadFile('datatypes/section_template.php');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->name = '';
         $object->active = 1;
         $object->public = 1;
         $object->subtheme = '';
         $object->page_title = SITE_TITLE;
         $object->keywords = SITE_KEYWORDS;
         $object->description = SITE_DESCRIPTION;
         if (!isset($object->parent)) {
             $object->parent = 0;
         }
         // NOT IMPLEMENTED YET
         //$object->subtheme='';
     } else {
         $form->meta('id', $object->id);
     }
     $form->meta('parent', $object->parent);
     $form->register('name', $i18n['name'], new textcontrol($object->name));
     if (!isset($object->id) && $object->parent != 0) {
         // Add the 'Add' drop down if not a top level
         global $db;
         $sections = $db->selectObjects('section_template', 'parent=' . $object->parent);
         if (count($sections)) {
             if (!defined('SYS_SORTING')) {
                 require_once BASE . 'subsystems/sorting.php';
             }
             usort($sections, 'exponent_sorting_byRankAscending');
             $dd = array($i18n['position_top']);
             foreach ($sections as $s) {
                 $dd[] = sprintf($i18n['position_after'], $s->name);
             }
             $form->register('rank', $i18n['rank'], new dropdowncontrol(count($dd) - 1, $dd));
         } else {
             $form->meta('rank', 0);
         }
     } else {
         $form->meta('rank', 0);
     }
     if (is_readable(THEME_ABSOLUTE . 'subthemes')) {
         // grab sub themes
         $form->register('subtheme', $i18n['subtheme'], new dropdowncontrol($object->subtheme, exponent_theme_getSubThemes()));
     }
     $form->register('active', $i18n['active'], new checkboxcontrol($object->active));
     $form->register('public', $i18n['public'], new checkboxcontrol($object->public));
     // Register the Page Meta Data controls.
     $form->register('page_title', $i18n['page_title'], new textcontrol($object->page_title));
     $form->register('keywords', $i18n['keywords'], new texteditorcontrol($object->keywords, 5, 25));
     $form->register('description', $i18n['description'], new texteditorcontrol($object->keywords, 5, 25));
     $form->register('submit', '', new buttongroupcontrol($i18n['save'], '', $i18n['save']));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:59,代码来源:section_template.php


示例10: update

 function update($values, $object)
 {
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $object->name = $values['name'];
     $object->description = $values['description'];
     $object->text = htmleditorcontrol::parseData('text', $values);
     $object->column_names = $values['column_names'];
     return $object;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:12,代码来源:formbuilder_report.php


示例11: update

 function update($values, $object)
 {
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $object->title = $values['title'];
     $object->internal_name = preg_replace('/--+/', '-', preg_replace('/[^A-Za-z0-9_]/', '-', $values['int']));
     $object->body = $values['body'];
     $object->publish = popupdatetimecontrol::parseData('publish', $values);
     $object->unpublish = popupdatetimecontrol::parseData('unpublish', $values);
     return $object;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:13,代码来源:newsitem.php


示例12: update

 function update($values, $object)
 {
     if (!defined('SYS_FORMS')) {
         include_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $object->subject = $values['subject'];
     $object->from_name = $values['from_name'];
     $object->from_address = $values['from'];
     $object->replyto_address = $values['replyto'];
     $object->final_message = htmleditorcontrol::parseData('final_message', $values);
     return $object;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:13,代码来源:contactmodule_config.php


示例13: form

 function form($object)
 {
     $i18n = exponent_lang_loadFile('datatypes/addressbook_contact.php');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->firstname = '';
         $object->lastname = '';
         $object->address1 = '';
         $object->address2 = '';
         $object->city = '';
         $object->state = '';
         $object->zip = '';
         $object->country = '';
         $object->email = '';
         $object->phone = '';
         $object->cell = '';
         $object->fax = '';
         $object->pager = '';
         $object->notes = '';
         $object->webpage = '';
     } else {
         $form->meta('id', $object->id);
     }
     $form->register('firstname', $i18n['firstname'], new textcontrol($object->firstname));
     $form->register('lastname', $i18n['lastname'], new textcontrol($object->lastname));
     $form->register(null, '', new htmlcontrol('<hr size="1" />'));
     $form->register('address1', $i18n['address1'], new textcontrol($object->address1, 30));
     $form->register('address2', $i18n['address2'], new textcontrol($object->address2, 30));
     $form->register('city', $i18n['city'], new textcontrol($object->city));
     $form->register('state', $i18n['state'], new textcontrol($object->state));
     $form->register('zip', $i18n['zip'], new textcontrol($object->zip));
     $form->register(null, '', new htmlcontrol('<hr size="1" />'));
     $form->register('email', $i18n['email'], new textcontrol($object->email));
     $form->register('webpage', $i18n['webpage'], new textcontrol($object->webpage));
     $form->register(null, '', new htmlcontrol('<hr size="1" />'));
     $form->register('phone', $i18n['phone'], new textcontrol($object->phone));
     $form->register('cell', $i18n['cell'], new textcontrol($object->cell));
     $form->register('fax', $i18n['fax'], new textcontrol($object->fax));
     $form->register('pager', $i18n['pager'], new textcontrol($object->pager));
     $form->register(null, '', new htmlcontrol('<hr size="1" />'));
     $form->register('notes', $i18n['notes'], new texteditorcontrol($object->notes, 12, 50));
     $form->register(null, '', new htmlcontrol('<hr size="1" />'));
     $form->register('submit', '', new buttongroupcontrol($i18n['save'], '', $i18n['cancel']));
     exponent_forms_cleanup();
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:50,代码来源:addressbook_contact.php


示例14: form

 function form($object)
 {
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
     } else {
         $form->meta('id', $object->id);
     }
     // GREP:I18N in sdk/blanks files
     $form->register('submit', '', new buttongroupcontrol('Save', '', 'Cancel'));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:15,代码来源:datatype.php


示例15: form

 function form($object)
 {
     if (!defined("SYS_FORMS")) {
         require_once BASE . "subsystems/forms.php";
     }
     exponent_forms_initialize();
     $form = new form();
     if (!isset($object->html)) {
         $object->html = "";
     }
     $i18n = exponent_lang_loadFile('subsystems/forms/controls/htmlcontrol.php');
     $form->register("html", '', new htmleditorcontrol($object->html));
     $form->register("submit", "", new buttongroupcontrol($i18n['save'], '', $i18n['cancel']));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:15,代码来源:htmlcontrol.php


示例16: form

 function form($object)
 {
     $i18n = exponent_lang_loadFile('datatypes/SearchModule_config.php');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->is_categorized = 0;
     } else {
         $form->meta('id', $object->id);
     }
     $form->register('is_categorized', $i18n['is_categorized'], new checkboxcontrol($object->is_categorized, true));
     $form->register('submit', '', new buttongroupcontrol($i18n['save'], '', $i18n['cancel']));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:17,代码来源:searchmodule_config.php


示例17: form

 function form()
 {
     exponent_lang_loadDictionary('modules', 'database');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     //Form is created to collect information from the user
     //Values set previously (defaults or user-entered) are displayed
     $form->register('dbengine', TR_DATABASE_DBTYPE, new dropdowncontrol('', exponent_database_backends()));
     $form->register('host', TR_DATABASE_HOST, new textcontrol(DB_HOST));
     $form->register('port', TR_DATABASE_PORT, new textcontrol(DB_PORT));
     $form->register('dbname', TR_DATABASE_DBNAME, new textcontrol(''));
     $form->register('username', TR_DATABASE_USER, new textcontrol(DB_USER));
     $form->register('pwd', TR_DATABASE_PWD, new passwordcontrol(''));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:18,代码来源:database_importer.php


示例18: form

 function form($object)
 {
     $i18n = exponent_lang_loadFile('datatypes/rotator_item.php');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     if (!$object) {
         $object->text = '';
         $form->meta('id', 0);
     } else {
         $form->meta('id', $object->id);
     }
     $form->register('text', $i18n['text'], new htmleditorcontrol($object->text));
     $form->register('submit', '', new buttongroupcontrol($i18n['save'], '', $i18n['cancel']));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:18,代码来源:rotator_item.php


示例19: form

 function form($object)
 {
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->name = '';
         $object->description = '';
     } else {
         $form->meta('id', $object->id);
     }
     $form->register('name', 'Name', new textcontrol($object->name));
     $form->register('description', 'Description', new htmleditorcontrol($object->description));
     $form->register('submit', '', new buttongroupcontrol('Save', '', 'Cancel'));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:18,代码来源:file_collection.php


示例20: form

 function form()
 {
     $i18n = exponent_lang_loadFile('datatypes/database_importer.php');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     //Form is created to collect information from the user
     //Values set previously (defaults or user-entered) are displayed
     $form->register('dbengine', $i18n['db_type'], new dropdowncontrol('', exponent_database_backends()));
     $form->register('host', $i18n['db_host'], new textcontrol(DB_HOST));
     $form->register('port', $i18n['db_port'], new textcontrol(DB_PORT));
     $form->register('dbname', $i18n['db_name'], new textcontrol(''));
     $form->register('username', $i18n['db_username'], new textcontrol(DB_USER));
     $form->register('pwd', $i18n['db_userpwd'], new passwordcontrol(''));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:18,代码来源:database_importer.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP exponent_lang_loadFile函数代码示例发布时间:2022-05-15
下一篇:
PHP exponent_flow_set函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap