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


PHP page::assignArray方法代码示例

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


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

示例1: defAction

 public function defAction()
 {
     if (file_exists(MODUL_DIR . '/users/template/settings.tpl')) {
         include MODUL_DIR . '/users/template/settings.tpl';
     }
     ui::newButton(lang::get('BTN_SAVE_ONLY'), "javascript:sendForm('save');");
     page::assignArray(lang::get('USERS_FORM_FIELD'));
     page::assign('errorCountBlock', reg::getKey('/users/errorCountBlock'));
     // page::assign('errorCountCapcha', reg::getKey('/users/errorCountCapcha'));
     ui::CheckBox('gzip', 1, reg::getKey('/core/gzip'), lang::get('USERS_FORM_FIELD', 9));
     ui::CheckBox('reg', 1, reg::getKey('/users/reg'), lang::get('USERS_FORM_FIELD', 11));
     ui::CheckBox('activation', 1, reg::getKey('/users/activation'), lang::get('USERS_FORM_FIELD', 28));
     ui::CheckBox('confirm', 1, reg::getKey('/users/confirm'), lang::get('USERS_FORM_FIELD', 35));
     ui::CheckBox('ask_email', 1, reg::getKey('/users/ask_email'), lang::get('USERS_FORM_FIELD', 9));
     //авторизация чере соц. сети
     ui::CheckBox('twitter_bool', 1, reg::getKey('/users/twitter_bool'), lang::get('USERS_FORM_FIELD', 40));
     page::assign('twitter_id', reg::getKey('/users/twitter_id'));
     page::assign('twitter_secret', reg::getKey('/users/twitter_secret'));
     ui::CheckBox('vk_bool', 1, reg::getKey('/users/vk_bool'), lang::get('USERS_FORM_FIELD', 42));
     page::assign('vk_id', reg::getKey('/users/vk_id'));
     page::assign('vk_secret', reg::getKey('/users/vk_secret'));
     ui::CheckBox('ok_bool', 1, reg::getKey('/users/ok_bool'), lang::get('USERS_FORM_FIELD', 45));
     page::assign('ok_id', reg::getKey('/users/ok_id'));
     page::assign('ok_public', reg::getKey('/users/ok_public'));
     page::assign('ok_secret', reg::getKey('/users/ok_secret'));
     ui::CheckBox('facebook_bool', 1, reg::getKey('/users/facebook_bool'), lang::get('USERS_FORM_FIELD', 41));
     page::assign('facebook_id', reg::getKey('/users/facebook_id'));
     page::assign('facebook_secret', reg::getKey('/users/facebook_secret'));
     ui::CheckBox('yandex_bool', 1, reg::getKey('/users/yandex_bool'), lang::get('USERS_FORM_FIELD', 43));
     ui::CheckBox('google_bool', 1, reg::getKey('/users/google_bool'), lang::get('USERS_FORM_FIELD', 44));
     return page::parse($TEMPLATE['frame']);
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:32,代码来源:__settings.php

示例2: defAction

 public function defAction()
 {
     if (file_exists(MODUL_DIR . '/core/template/change.tpl')) {
         include MODUL_DIR . '/core/template/change.tpl';
     }
     // Выводим (если нужно) форму изменения свойств домена (AJAX)
     $this->changeDomainInfo($TEMPLATE);
     ui::newButton(lang::get('BTN_SAVE_ONLY'), "javascript:saveConfig();");
     page::assignArray(lang::get('CONFIG_FORM_FIELD'));
     ui::CheckBox('gzip', 1, reg::getKey('/core/gzip'), lang::get('CONFIG_FORM_FIELD', 9));
     ui::CheckBox('delToTrash', 1, reg::getKey('/core/delToTrash'), lang::get('CONFIG_FORM_FIELD', 12));
     ui::CheckBox('noIE6', 1, reg::getKey('/core/noIE6'), lang::get('CONFIG_FORM_FIELD', 34));
     ui::CheckBox('noIE7', 1, reg::getKey('/core/noIE7'), lang::get('CONFIG_FORM_FIELD', 35));
     ui::CheckBox('noIE8', 1, reg::getKey('/core/noIE8'), lang::get('CONFIG_FORM_FIELD', 37));
     ui::CheckBox('noDelMiniTexts', 1, reg::getKey('/core/noDelMiniTexts'), lang::get('CONFIG_FORM_FIELD', 36));
     ui::loadFile('watermark', reg::getKey('/core/watermark'));
     ui::CheckBox('scaleBigJpeg', 1, reg::getKey('/core/scaleBigJpeg'), lang::get('CONFIG_FORM_FIELD', 33));
     page::assign('sizeBigJpeg', reg::getKey('/core/sizeBigJpeg'));
     // Форма редактирования языков
     $form = new uiMultiForm('langs');
     $form->insideForm();
     $form->setData(languages::getAll());
     $form->addColumn('l_name', lang::get('CONFIG_FORM_FIELD', 13), 255);
     $form->addColumn('l_prefix', lang::get('CONFIG_FORM_FIELD', 14), 120, lang::get('CONFIG_FORM_FIELD', 15));
     page::assign('langs', $form->getHTML());
     // Форма редактирования доменов
     $form = new uiMultiForm('domains');
     $form->insideForm();
     $form->setData(domains::getAll());
     $form->addColumn('d_name', lang::get('CONFIG_FORM_FIELD', 18), 150, lang::get('CONFIG_FORM_FIELD', 23));
     $form->addColumn('d_def_lang', lang::get('CONFIG_FORM_FIELD', 19), 140, lang::get('CONFIG_FORM_FIELD', 24), 0, 'getLangList');
     $form->addColumn('d_online', lang::get('CONFIG_FORM_FIELD', 20), 40, lang::get('CONFIG_FORM_FIELD', 25), 0, 'getCheckBox');
     $form->addColumn('d_sitename', lang::get('CONFIG_FORM_FIELD', 4), 250, lang::get('CONFIG_FORM_FIELD', 16));
     $form->addColumn('d_email', lang::get('CONFIG_FORM_FIELD', 5), 250, lang::get('CONFIG_FORM_FIELD', 17));
     $form->addColumn('d_id', ' ', 25, '', 0, 'getEditButt');
     function getLangList($val, $obj)
     {
         return ui::SelectBox('objdomains[' . $obj['id'] . '][d_def_lang]', languages::getAll(), $val, 130);
     }
     function getCheckBox($val, $obj)
     {
         return '<div align="center">' . ui::CheckBox('objdomains[' . $obj['id'] . '][d_online]', 1, $val) . '</div>';
     }
     function getEditButt($val, $obj)
     {
         if (empty($val)) {
             return '';
         } else {
             return '<div name="' . $val . '" class="header_tree" style="float:left;margin-left:15px;">
     			<font class="compose_image"></font></div>';
         }
     }
     page::assign('domains', $form->getHTML());
     return page::parse($TEMPLATE['frame']);
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:55,代码来源:__change.php

示例3: upd

 public function upd()
 {
     if (file_exists(MODUL_DIR . '/constructor/template/fgroup.tpl')) {
         include MODUL_DIR . '/constructor/template/fgroup.tpl';
     }
     if (system::action() == "upd") {
         // форма обновления информации
         $group = new ormFieldsGroup(system::url(2));
         if ($group->id() == '') {
             system::stop();
         }
         page::assign('obj.group_name', $group->getName());
         page::assign('obj.group_sname', $group->getSName());
         page::assign('obj.id', $group->id());
         $view = $group->getView();
         $system = $group->getSystem();
         page::assign('right', 'fgroup_proc_upd');
     } else {
         if (system::action() == "add") {
             // форма добавления информации
             if (system::issetUrl(2)) {
                 // Проверяем существует ли родитель?
                 $class = new ormClass(system::url(2));
                 if ($class->id() == '') {
                     system::stop();
                 }
             }
             $view = 1;
             $system = 0;
             page::assign('obj.id', system::url(2));
             page::assign('right', 'fgroup_proc_add');
         }
     }
     page::assignArray(lang::get('CONSTR_FORM_FIELD2'));
     page::assignSavingPost();
     ui::CheckBox('group_view', 1, $view, lang::get('CONSTR_FORM_FIELD2', 3));
     ui::CheckBox('group_system', 1, $system, lang::get('CONSTR_FORM_FIELD2', 4));
     echo page::parse($TEMPLATE['frame'], 1);
     system::stop();
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:40,代码来源:__fgroup.php

示例4: upd

 public function upd()
 {
     if (file_exists(MODUL_DIR . '/constructor/template/separator.tpl')) {
         include MODUL_DIR . '/constructor/template/separator.tpl';
     }
     if (system::action() == "upd") {
         // форма обновления информации
         $obj = new ormField(system::url(2));
         if ($obj->id() == '') {
             system::stop();
         }
         page::assign('obj.fname', $obj->getName());
         $max_size = $obj->getMaxSize() != '' ? $obj->getMaxSize() : 0;
         page::assign('obj.max_size', $max_size);
         page::assign('obj.id', $obj->id());
         page::assign('right', 'separator_proc_upd');
     } else {
         if (system::action() == "add") {
             // форма добавления информации
             if (system::issetUrl(2)) {
                 // Проверяем существует ли родитель?
                 $group = new ormFieldsGroup(system::url(2));
                 if ($group->id() == '') {
                     system::stop();
                 }
             }
             page::assign('obj.id', system::url(2));
             page::assign('right', 'separator_proc_add');
             page::assign('obj.max_size', 0);
         }
     }
     page::assignArray(lang::get('CONSTR_FORM_FIELD3'));
     page::assignSavingPost();
     echo page::parse($TEMPLATE['frame'], 1);
     system::stop();
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:36,代码来源:__separator.php

示例5: upd

 public function upd()
 {
     if (system::url(3) == 'view') {
         header('Content-Type: text/html; charset=utf-8');
         page::assign('hello', '');
         page::assign('user_name', user::get('name'));
         echo page::parse(mailingProcess::getMailHTML(system::url(2)));
         system::stop();
     }
     // Указываем для какого объекта строить форму
     if (system::action() == "upd") {
         // Если это редактирование
         $obj = ormObjects::get(system::url(2));
         $parent_id = $obj->parent_id;
         $right = 'msg_proc_upd';
         if ($obj->error_part_num > 0) {
             $time = time() - strtotime($obj->last_subscribe);
             if ($time < 5) {
                 ui::MessageBox(lang::get('SUBSCRIBE_MSG_MB_TITLE'), lang::get('SUBSCRIBE_MSG_MB_TEXT'));
                 system::redirect('/subscription/msg/' . $parent_id);
             }
         }
     } else {
         if (system::action() == "add") {
             // Если это добавление нового объекта
             $parent_id = system::url(2);
             $right = 'msg_proc_add';
             $obj = new ormObject();
             $obj->setClass('subscribe_msg');
             $obj->setParent($parent_id);
             $obj->publ_date = date('d.m.Y');
         }
     }
     // Если произошли ошибки, перенаправляем на главную страницу модуля
     if ($obj->issetErrors()) {
         system::redirect('/subscription');
     }
     // Устанавливаем кнопки для формы
     ui::setCancelButton('/subscription/msg/' . $parent_id);
     ui::newButton(lang::get('BTN_SAVE'), "javascript:sendForm('save');");
     ui::newButton(lang::get('BTN_APPLY'), "javascript:sendForm('apply');");
     // Создаем форму и выводим ее на страницу
     $form = new ormEditForm($obj, $right);
     // Формируем форму рассылки сообщений
     $send_form = '';
     if (system::action() == "upd" && user::issetRight('msg_send') && ($parent = ormObjects::get($parent_id))) {
         if (file_exists(MODUL_DIR . '/subscription/template/subscription.tpl')) {
             include MODUL_DIR . '/subscription/template/subscription.tpl';
             $links = '';
             // Получаем количество частей в рассылке
             $count = mailingProcess::getPartCount($parent->id);
             if ($count > 0) {
                 $part_num = $obj->part_count - $obj->part_count_awaiting + 1;
                 if ($part_num > $obj->part_count) {
                     $part_num = 1;
                 }
                 page::assign('subject', $parent->subject);
                 // page::assign('count_part', ruNumbers::decl($count, lang::get('SUBSCRIBE_TS')));
                 page::assign('count_part', $count);
                 page::assign('count_part2', $count);
                 page::assign('part_num', $part_num);
                 page::assign('release_id', $obj->id);
                 if ($obj->error_part_num == 0) {
                     page::assign('error_part_num', $part_num);
                     page::fParse('sh1', 'block');
                     page::fParse('sh2', 'none');
                 } else {
                     page::assign('error_part_num', $obj->error_part_num);
                     ui::MessageBox(lang::get('SUBSCRIBE_TEXT_SEND', 9) . $obj->error_part_num . lang::get('SUBSCRIBE_TEXT_SEND', 10), lang::get('SUBSCRIBE_TEXT_SEND', 11));
                     page::fParse('sh2', 'block');
                     page::fParse('sh1', 'none');
                 }
                 $send_form = page::parse($TEMPLATE['frame']);
                 $links .= page::parse($TEMPLATE['send_link']);
             }
             page::assignArray(lang::get('SUBSCRIBE_TEXT_SEND'));
             page::assign('url', system::au() . '/subscription/msg_upd/' . $obj->id . '/view');
             $links .= page::parse($TEMPLATE['view_link']);
             page::assign('list', $links);
             $form->addInBottomTabs('base', page::parse($TEMPLATE['frame_link']));
         }
     }
     return $send_form . $form->getHTML();
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:84,代码来源:__msg.php

示例6: upd

 public function upd()
 {
     if (file_exists(MODUL_DIR . '/constructor/template/field.tpl')) {
         include MODUL_DIR . '/constructor/template/field.tpl';
     }
     if (system::action() == "upd") {
         // форма обновления информации
         $obj = new ormField(system::url(2));
         if ($obj->id() == '') {
             system::stop();
         }
         page::assign('obj.fname', $obj->getName());
         page::assign('obj.fsname', $obj->getSName());
         page::assign('obj.hint', $obj->getHint());
         page::assign('obj.max_size', $obj->getMaxSize());
         page::assign('obj.id', $obj->id());
         $view = $obj->getView();
         $inherit = $obj->getInherit();
         $search = $obj->getSearch();
         $filter = $obj->getFilter();
         $required = $obj->getRequired();
         $system = $obj->getSystem();
         $type = $obj->getType();
         $list_id = $obj->getListId();
         $uniqum = $obj->getUniqum();
         $quick_add = $obj->getQuickAdd();
         $relation = $obj->getRelType();
         $spec = $obj->getSpec();
         $fr = $obj->getSName() == 'name' ? '_name' : '';
         page::assign('right', 'field_proc_upd');
     } else {
         if (system::action() == "add") {
             // форма добавления информации
             if (system::issetUrl(2)) {
                 // Проверяем существует ли родитель?
                 $group = new ormFieldsGroup(system::url(2));
                 if ($group->id() == '') {
                     system::stop();
                 }
             }
             $view = $inherit = 1;
             $search = $filter = $required = $system = $type = $list_id = $uniqum = $spec = $quick_add = $relation = 0;
             $fr = '';
             page::assign('obj.id', system::url(2));
             page::assign('right', 'field_proc_add');
         }
     }
     page::assignArray(lang::get('CONSTR_FORM_FIELD3'));
     page::assignSavingPost();
     ui::CheckBox('view', 1, $view, lang::get('CONSTR_FORM_FIELD3', 6));
     ui::CheckBox('inherit', 1, $inherit, lang::get('CONSTR_FORM_FIELD3', 7));
     ui::CheckBox('search', 1, $search, lang::get('CONSTR_FORM_FIELD3', 8));
     ui::CheckBox('filter', 1, $filter, lang::get('CONSTR_FORM_FIELD3', 9));
     ui::CheckBox('required', 1, $required, lang::get('CONSTR_FORM_FIELD3', 10));
     ui::CheckBox('system', 1, $system, lang::get('CONSTR_FORM_FIELD3', 11));
     ui::CheckBox('uniqum', 1, $uniqum, lang::get('CONSTR_FORM_FIELD3', 13));
     ui::CheckBox('quick_add', 1, $quick_add, lang::get('CONSTR_FORM_FIELD3', 14));
     ui::CheckBox('spec', 1, $spec, lang::get('CONSTR_FORM_FIELD3', 16));
     ui::SelectBox('reltype', lang::get('CONSTR_RELTYPE'), $relation, 300);
     ui::SelectBox('type', lang::get('CONSTR_TYPE_LIST' . $fr), $type, 300);
     $list = ormClasses::getHandbooks();
     ui::SelectBox('list_id', $list, $list_id, 300, '&nbsp;');
     page::assign('sh', !empty($list_id) ? '' : 'style="display:none;"');
     page::assign('sh2', $type > 69 && $type < 86 ? '' : 'style="display:none;"');
     page::assign('sh3', $type == 90 || $type == 95 || $type == 100 ? '' : 'style="display:none;"');
     page::assign('sh4', $type == 55 || $type == 60 ? '' : 'style="display:none;"');
     echo page::parse($TEMPLATE['frame' . $fr], 1);
     system::stop();
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:69,代码来源:__field.php

示例7: addlist

 public function addlist()
 {
     // Устанавливаем кнопки для формы
     ui::setCancelButton('/subscription/user/' . system::url(2));
     ui::newButton(lang::get('BTN_SAVE'), "javascript:sendForm('save');");
     if (file_exists(MODUL_DIR . '/subscription/template/add_userlist.tpl')) {
         include MODUL_DIR . '/subscription/template/add_userlist.tpl';
     }
     // Добавляем поле "Подписан на рассылку"
     $html = ui::SelectBox('subscribes', ormObjects::getObjectsByClass('subscription'), system::url(2), 400, '', '', 'selectbox_multi_big');
     page::assignArray(lang::get('SUBSCRIBE_TEXT'));
     page::assign('parent_id', system::url(2));
     return page::parse($TEMPLATE['frame']);
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:14,代码来源:__user.php

示例8: upd

 public function upd()
 {
     $is_page = false;
     if (file_exists(MODUL_DIR . '/constructor/template/class.tpl')) {
         include MODUL_DIR . '/constructor/template/class.tpl';
     }
     if (system::action() == "upd") {
         // форма обновления информации
         $class = new ormClass(system::url(2));
         if ($class->id() == '') {
             system::redirect('/constructor/tree');
         }
         page::assign('obj.class_name', $class->getName());
         page::assign('obj.sname', $class->getSName());
         page::assign('obj.text', $class->getPadej());
         page::assign('obj.id', $class->id());
         $system = $class->isSystem();
         $is_list = $class->isList();
         $is_page = $class->isPage();
         $is_user = $class->isInheritor('user');
         $base_class = $class->getBaseClass();
         page::assign('right', 'class_proc_upd');
         // Выводим дерево для отображения структуры класса
         $tree = new ormFieldsTree();
         page::assign('fields', $tree->getHTML($class));
     } else {
         if (system::action() == "add") {
             // форма добавления информации
             $system = $is_list = $uniqum = $base_class = 0;
             // Проверяем существует ли родитель?
             if (system::issetUrl(2)) {
                 $parent = new ormClass(system::url(2));
                 if ($parent->id() == '') {
                     system::redirect('/constructor/tree');
                 }
                 $is_list = $parent->isList();
                 $is_page = $parent->isPage();
                 $is_user = $parent->isInheritor('user');
             } else {
                 $is_user = false;
             }
             page::assign('obj.id', system::url(2));
             page::assign('right', 'class_proc_add');
         }
     }
     if ($is_page) {
         ui::SelectBox('class_list', ormClasses::getPagesClassList(), $base_class, 400, '&nbsp;');
         ui::SelectBox('template_list1', templates::getByDestination(0, true), isset($class) ? $class->getDefTemplate(0) : 0, 400, '&nbsp;');
         ui::SelectBox('template_list2', templates::getByDestination(1, true), isset($class) ? $class->getDefTemplate(1) : 0, 400, '&nbsp;');
         page::fParse('page_fields', $TEMPLATE['page_fields']);
     } else {
         if ($is_user) {
             page::fParse('page_fields', $TEMPLATE['user_fields']);
         } else {
             page::assign('page_fields', '');
         }
     }
     if (system::action() == "add" || !$class->isSystem()) {
         ui::newButton(lang::get('BTN_SAVE'), "javascript:sendForm('save');");
         ui::newButton(lang::get('BTN_APPLY'), "javascript:sendForm('apply');");
         ui::setCancelButton('/constructor');
     } else {
         ui::setBackButton('/constructor');
     }
     page::assignArray(lang::get('CONSTR_FORM_FIELD'));
     page::assignSavingPost();
     ui::CheckBox('system', 1, $system, lang::get('CONSTR_FORM_FIELD', 3));
     ui::CheckBox('is_list', 1, $is_list, lang::get('CONSTR_FORM_FIELD', 4));
     return page::parse($TEMPLATE['frame'], 1);
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:70,代码来源:__class.php


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