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


PHP ui::CheckBox方法代码示例

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


在下文中一共展示了ui::CheckBox方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: upd

 function upd()
 {
     // Устанавливаем кнопки для формы
     ui::setCancelButton('/comments/list');
     ui::newButton(lang::get('BTN_SAVE'), "javascript:sendForm('save');");
     ui::newButton(lang::get('BTN_APPLY'), "javascript:sendForm('apply');");
     if (file_exists(MODUL_DIR . '/comments/template/comment.tpl')) {
         include MODUL_DIR . '/comments/template/comment.tpl';
     }
     if (!($obj = comments::get(system::url(2)))) {
         system::redirect('/comments/list');
     }
     if ($obj->getUserId() != 0 && user::issetRight('user_upd', 'users')) {
         $url = system::au() . '/users/user_upd/' . $obj->getUserId();
         page::assign('user_link', $url);
         page::fParse('user_name', $TEMPLATE['user_link']);
     } else {
         page::fParse('user_name', $TEMPLATE['user_name']);
     }
     page::assign('obj.id', $obj->id());
     page::assign('obj.username', $obj->getUserName());
     page::assign('obj.email', $obj->getEmail());
     page::assign('obj.text', $obj->getText());
     page::assign('obj.date', date('d.m.Y H:i', strtotime($obj->getPublDate())));
     page::assign('obj.parram', $obj->getParram());
     ui::CheckBox('active', 1, $obj->isActive(), 'Проверен');
     // Информация о странице
     if ($page = ormPages::get($obj->getObjId())) {
         page::assign('page.id', $page->id);
         page::assign('page.url', $page->url);
         page::assign('page.name', $page->name);
     }
     return page::parse($TEMPLATE['frame']);
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:34,代码来源:__comment.php

示例3: view

 function view()
 {
     // Устанавливаем кнопки для формы
     ui::setCancelButton('/eshop/list');
     ui::newButton(lang::get('BTN_SAVE'), "javascript:sendForm('save');");
     ui::newButton(lang::get('BTN_APPLY'), "javascript:sendForm('apply');");
     if (file_exists(MODUL_DIR . '/eshop/template/order.tpl')) {
         include MODUL_DIR . '/eshop/template/order.tpl';
     }
     if (!($obj = ormObjects::get(system::url(2), 'eshop_order'))) {
         system::redirect('/eshop/list');
     }
     $order = new eShopOrder($obj);
     // Вывод информации о товарах
     function getGoodsName($val, $obj)
     {
         if ($obj = ormPages::get($val, 'goods')) {
             return '<a href="' . $obj->url . '" target="_blank">' . $obj->name . '</a>';
         }
     }
     function getPrice($val, $obj)
     {
         return '&nbsp;&nbsp;&nbsp;&nbsp;' . $obj->cost * $obj->count . ' руб.';
     }
     $sel = new ormSelect('eshop_goods');
     $sel->where('parents', '=', $obj->id);
     $table = new ormMultiForm('goods');
     $table->setData($sel);
     $table->insideForm();
     $table->addColumn('goods_id', 0, 400, 0, false, 'getGoodsName');
     $table->addColumn('cost', 0, 100, 0, false);
     $table->addColumn('count', 0, 100);
     $table->addColumn('id', 'Общая стоимость', 100, 0, false, 'getPrice');
     $table->withoutAdditions();
     page::assign('goods_list', $table->getHTML());
     page::assign('order.number', $order->getNumber());
     page::assign('order.cost', $order->getCost());
     page::assign('order.cost_all', $order->getTotalCost());
     page::assign('order.delivery_price', $order->getDeliveryPrice());
     page::assign('order.delivery', $order->_delivery);
     $obj->parseAllFields();
     page::assign('obj.id', $order->id);
     page::assign('obj.date', date('d.m.Y в H:i', strtotime($obj->date)));
     page::assign('user_link', '/mpanel/users/user_upd/' . $order->getUserId());
     ui::SelectBox('state', ormObjects::getObjectsByClass('eshop_status'), $obj->state, 200);
     ui::CheckBox('is_payment', 1, $obj->is_payment, 'Оплачено');
     // Создаем форму и выводим ее на страницу
     // $form = new ormEditForm($obj, $right);
     //return $form->getHTML();
     return page::parse($TEMPLATE['frame']);
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:51,代码来源:__order.php

示例4: upd

 public function upd()
 {
     if (!($obj = ormPages::get(system::url(2)))) {
         system::redirect('/feedback');
     }
     ui::setCancelButton('/feedback');
     ui::newButton(lang::get('BTN_SAVE'), "javascript:sendForm('save');");
     ui::newButton(lang::get('BTN_APPLY'), "javascript:sendForm('apply');");
     // Создаем форму и выводим ее на страницу
     $form = new ormEditForm($obj, 'message_proc_upd');
     $form->withoutSH();
     $form->withoutTabs();
     $form->tabuList('pseudo_url', 'h1', 'keywords', 'title', 'description', 'active', 'is_home_page', 'view_in_menu', 'view_submenu', 'in_search', 'in_index', 'in_new_window', 'other_link', 'img_act', 'img_no_act', 'img_h1');
     if (!$obj->active) {
         $form->addField('base', 10, 'publ', '', ui::CheckBox('publ', 1, 0, 'Опубликовать на сайте'));
     }
     if (!$obj->send_answer_to_user) {
         $form->addField('base', 11, 'send_to_email', '', ui::CheckBox('send_to_email', 1, 0, 'Отправить ответ на почту'));
     }
     return $form->getHTML();
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:21,代码来源:__message.php

示例5: 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

示例6: parseField

 private function parseField($obj, $field, $TEMPLATE, $current_id)
 {
     $is_upd = $obj->id == '' ? false : true;
     $is_editable = !isset($field['editable']) || $field['editable'];
     $width = empty($field['width']) ? $this->width : $field['width'];
     page::assign('width', $width);
     if (isset($_SESSION['SAVING_POST']['obj' . $this->form_name]) && ($field['f_type'] < 70 || $field['f_type'] > 85)) {
         $tmp = $_SESSION['SAVING_POST']['obj' . $this->form_name];
         if (isset($tmp[$current_id][$field['f_sname']])) {
             $value = $tmp[$current_id][$field['f_sname']];
         }
     } else {
         $value = '';
     }
     if (empty($value)) {
         if ($field['f_type'] == 105) {
             $value = $obj->__get('_' . $field['f_sname']);
         } else {
             $value = $obj->__get($field['f_sname']);
         }
         $function = !empty($field['funct_name']) ? $field['funct_name'] : '';
         if (!$is_editable) {
             $value = parent::processValue($obj, $field['f_sname'], $field['f_type'], $value, $function);
         }
     }
     if ($is_editable) {
         page::assign('field.id', $field['f_id']);
         page::assign('field.name', $field['f_name']);
         page::assign('field.sname', $field['f_sname']);
         page::assign('field.value', $value);
         $obj_id = $field['f_sname'] . '_' . $current_id;
         $elem_name = 'obj' . $this->form_name . '[' . $current_id . '][' . $field['f_sname'] . ']';
         // Специальная обработка данных
         if ($field['f_type'] == 50) {
             page::assign('element', ui::CheckBox($elem_name, 1, $value, '', '', $obj_id));
         } else {
             if ($field['f_type'] == 32) {
                 if (empty($value) || $value == '0000-00-00 00:00:00') {
                     page::assign('field.date', '');
                     page::assign('field.time', '00:00');
                 } else {
                     page::assign('field.date', date('d.m.Y', strtotime($value)));
                     page::assign('field.time', date('H:i', strtotime($value)));
                 }
             } else {
                 if ($field['f_type'] == 25) {
                     $time = empty($value) || $value == '0000-00-00' ? '' : date('d.m.Y', strtotime($value));
                     page::assign('field.date', $time);
                 } else {
                     if ($field['f_type'] == 30) {
                         $time = empty($value) ? '' : date('H:i:s', strtotime($value));
                         page::assign('field.time', $time);
                     } else {
                         if ($field['f_type'] > 69 && $field['f_type'] < 86) {
                             // файлы
                             if (system::$isAdmin) {
                                 page::assign('element', ui::loadFile($elem_name, $value, 'load_file_mini', $obj_id));
                             } else {
                                 page::fParse('element', '');
                             }
                         } else {
                             if ($field['f_type'] == 90 || $field['f_type'] == 95) {
                                 // Выпадающий список или Список со множественным выбором
                                 // Получаем список объектов справочника
                                 $data = ormObjects::getObjectsByClass($field['f_list_id']);
                                 $multi = $field['f_type'] == 95 ? 'selectbox_multi' : 'selectbox_template';
                                 $empty = !$field['f_required'] ? '&nbsp;' : '';
                                 if ($field['f_quick_add']) {
                                     $width = $width - 22;
                                 }
                                 $min = $field['f_type'] == 95 ? 8 : 30;
                                 page::assign('width_plu', $width - $min);
                                 page::assign('element', ui::SelectBox($elem_name, $data, $value, $width, $empty, '', $multi, $obj_id));
                                 if ($field['f_quick_add']) {
                                     page::fParse('plus', $TEMPLATE['field_' . $field['f_type'] . '_plus']);
                                 } else {
                                     page::assign('plus', '');
                                 }
                             } else {
                                 if ($field['f_type'] == 100) {
                                     // Связь с объектом
                                     page::assign('element', ui::objectLinks($obj, $field['f_id'], '_' . $current_id, $elem_name, $width - 30, 'objectLinks2'));
                                 }
                             }
                         }
                     }
                 }
             }
         }
         // Генерируем яву (создаем правила проверки для элементов формы)
         if ($field['f_required'] && ($field['f_type'] == 35 && $this->action == 'add' || $field['f_type'] != 35)) {
             $msg = str_replace('%title%', $field['f_name'], lang::get('CONSTR_BASE_FIELD_E2'));
             $zpt = !empty($this->requred_field) ? ', ' : '';
             $empty = $field['f_type'] == 90 || $field['f_type'] == 95 ? 'null' : '""';
             if ($field['f_type'] == 100) {
                 $this->requred_field .= $zpt . '["' . $obj_id . '", "' . $current_id . '", "' . $msg . '", ' . $empty . ', 1]';
             } else {
                 $this->requred_field .= $zpt . '["' . $obj_id . '", "' . $current_id . '", "' . $msg . '", ' . $empty . ']';
             }
         }
//.........这里部分代码省略.........
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:101,代码来源:ormMultiForm.php

示例7: parseField

    private function parseField($field, $TEMPLATE)
    {
        if (in_array($field['f_sname'], $this->read_only)) {
            $value = $this->obj->__get($field['f_sname']);
            page::assign('value', $value);
            if ($field['f_type'] == 90 || $field['f_type'] == 95 || $field['f_type'] == 105) {
                page::assign('val', $this->obj->__get('_' . $field['f_sname']));
            } else {
                page::assign('val', $value);
            }
            $value = page::parse($TEMPLATE['read_only']);
            page::assign('content', $value);
            return page::parse($TEMPLATE['field_standart']);
        }
        // Определяем значение поля
        if (isset($_SESSION['SAVING_POST']) && ($field['f_type'] < 70 || $field['f_type'] > 85) && isset($_SESSION['SAVING_POST'][$field['f_sname']])) {
            $value = $_SESSION['SAVING_POST'][$field['f_sname']];
        } else {
            if ($field['f_type'] == 105) {
                $value = $this->obj->__get('_' . $field['f_sname']);
            } else {
                $value = $this->obj->__get($field['f_sname']);
            }
        }
        page::assign('field.value', $value);
        // Для страниц, для кнопки "Показать \ скрыть доп. поля"
        if ($this->obj instanceof ormPage && in_array($field['f_sname'], $this->page_fields)) {
            $sh_page = isset($_SESSION['SH_FIELDS']) && $_SESSION['SH_FIELDS'] == 'show' ? '' : ' style="display:none;"';
            page::assign('sh_page', $sh_page);
        } else {
            page::assign('sh_page', '');
        }
        // Специальная обработка данных
        if ($field['f_type'] == 50) {
            page::assign('element', ui::CheckBox($field['f_sname'], 1, $value));
        } else {
            if ($field['f_type'] == 32) {
                if (empty($value) || $value == '0000-00-00 00:00:00') {
                    page::assign('field.date', '');
                    page::assign('field.time', '00:00');
                } else {
                    page::assign('field.date', date('d.m.Y', strtotime($value)));
                    page::assign('field.time', date('H:i', strtotime($value)));
                }
            } else {
                if ($field['f_type'] == 25) {
                    $time = empty($value) || $value == '0000-00-00' ? '' : date('d.m.Y', strtotime($value));
                    page::assign('field.date', $time);
                } else {
                    if ($field['f_type'] == 30) {
                        $time = empty($value) ? '' : date('H:i:s', strtotime($value));
                        page::assign('field.time', $time);
                    } else {
                        if ($field['f_type'] == 70 || $field['f_type'] == 75 || $field['f_type'] == 80 || $field['f_type'] == 85) {
                            if (system::$isAdmin) {
                                page::assign('element', ui::loadFile($field['f_sname'], $value));
                            } else {
                                page::fParse('element', $TEMPLATE['upload_file_field']);
                            }
                        } else {
                            if ($field['f_type'] == 73) {
                                page::assign('element', ui::listFile($field['f_sname'], $value));
                            } else {
                                if ($field['f_type'] == 90 || $field['f_type'] == 95) {
                                    // Выпадающий список или Список со множественным выбором
                                    // Получаем список объектов справочника
                                    page::assign('field.sname', $field['f_sname']);
                                    $data = ormObjects::getObjectsByClass($field['f_list_id']);
                                    $multi = $field['f_type'] == 95 ? 'selectbox_multi' : 'selectbox_template';
                                    $empty = !$field['f_required'] ? '&nbsp;' : '';
                                    if (system::$isAdmin) {
                                        page::assign('element', ui::SelectBox($field['f_sname'], $data, $value, 400, $empty, '', $multi));
                                        if ($field['f_quick_add']) {
                                            page::fParse('plus', $TEMPLATE['field_' . $field['f_type'] . '_plus']);
                                        } else {
                                            page::assign('plus', '');
                                        }
                                    } else {
                                        page::assign('element', ui::SelectBox($field['f_sname'], $data, $value, 200, $empty, '', $multi));
                                    }
                                } else {
                                    if ($field['f_type'] == 97) {
                                        // Подчиненный справочник
                                        // Получаем список объектов справочника
                                        $sel = new ormSelect($field['f_list_id']);
                                        $sel->where('parents', '=', $this->obj->id);
                                        // Выводим мультиформу для добавления и редактирования
                                        $form = new ormMultiForm('subject_list_' . $field['f_id']);
                                        $form->setData($sel);
                                        $form->insideForm();
                                        $re = $form->getHTML();
                                        //  echo $re;
                                        page::assign('element', $re);
                                    } else {
                                        if ($field['f_type'] == 100) {
                                            // Связь с объектом
                                            page::assign('element', ui::objectLinks($this->obj, $field['f_id']));
                                        }
                                    }
                                }
//.........这里部分代码省略.........
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:101,代码来源:ormEditForm.php

示例8: 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

示例9: 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

示例10: getTemplateBox

 private function getTemplateBox($field_name, $templs, $value, $fla = 0)
 {
     $empty = $field_name == 'template2_id' ? lang::get('STRUCTURE_NO_CHANGE') : '';
     return ui::SelectBox($field_name, $templs, $value, 400, $empty, '', 'selectbox_template') . '
              <div id="' . $field_name . '_edit_block" class="input_min_2" style="display:none;">
                 <input value="" id="' . $field_name . '_new_val" name="' . $field_name . '_new_val" class="" />
                 <input value="" id="' . $field_name . '_new_val2" name="' . $field_name . '_new_val2" class="" />
              </div>
              <span class="add_value" onclick="return AddNewTemplate(this, ' . $fla . ');"></span>
              <small>' . ui::CheckBox($field_name . '_all', 1, 0, 'Применить для всех подразделов', 0, 0, 0) . '</small>';
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:11,代码来源:__page.php

示例11: getCheckBox

 function getCheckBox($val, $obj)
 {
     return '<div align="center">' . ui::CheckBox('objdomains[' . $obj['id'] . '][d_online]', 1, $val) . '</div>';
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:4,代码来源:__change.php


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