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

PHP ui类代码示例

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

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



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

示例1: index

 public function index($parameters)
 {
     $pageModel = new pageModel();
     $view = new ui($this);
     $view->assign('pages', $allowedPages);
     $startlevel = isset($parameters['startlevel']) ? $parameters['startlevel'] : 1;
     $id = myauth::getCurrentpageid();
     $page = $pageModel->getfromId($id);
     $page = $page[0];
     $tree[] = $page;
     while ($page->getParentid() != 0) {
         $page = $pageModel->getfromId($page->getParentid());
         $page = $page[0];
         $tree[] = $page;
         $this->tree_id[$page->getId()] = $page->getId();
     }
     $this->tree = array_reverse($tree);
     if ($startlevel != 1) {
         $startbelow = $this->tree[$startlevel - 2]->getId();
     } else {
         $startbelow = 0;
     }
     $this->maxdepth = isset($parameters['maxdepth']) ? $parameters['maxdepth'] : -1;
     $depth = 1;
     $pages = $this->recursivegetpages($startbelow, $depth);
     $view->assign('menu', $pages);
     $this->response->assign($this->self, 'innerHTML', $view->fetch($parameters['viewprefix'] . 'menu_index.tpl'));
 }
开发者ID:nephie,项目名称:AZL-website,代码行数:28,代码来源:mymenuController.php


示例2: showhtml

 public function showhtml($parameters = array())
 {
     if (isset($parameters['template'])) {
         $template = new ui($this);
         $this->response->assign($this->self, 'innerHTML', $template->fetch($parameters['template'] . '.tpl'));
     }
 }
开发者ID:nephie,项目名称:AZL-website,代码行数:7,代码来源:mysimplehtmlController.php


示例3: createErrorView

function createErrorView($exception)
{
    $ui = new ui();
    $ui->assign('exceptionid', uniqid());
    $ui->assign('exception', $exception);
    $template = VERBOSE_ERRORS ? 'detailederror.tpl' : 'shorterror.tpl';
    return $ui->fetch($template);
}
开发者ID:nephie,项目名称:AZL-website,代码行数:8,代码来源:errortoexception.php


示例4: confirm

 protected function confirm($controller, $title = '')
 {
     $view = new ui($controller);
     $view->assign('form', $this);
     $view->assign('title', $title);
     //$popup = new popupController();
     //$popup->create(array('name' => 'confirm','title' => $title, 'content' => $view->fetch('confirmform.tpl')));
     $response = responseLib::getInstance();
     $response->assign($controller->getSelf(), 'innerHTML', $view->fetch('confirmform.tpl'));
 }
开发者ID:nephie,项目名称:AZL-website,代码行数:10,代码来源:form.php


示例5: loginform

 public function loginform($parameters = array())
 {
     require FRAMEWORK . DS . 'conf' . DS . 'auth.php';
     require FRAMEWORK . DS . 'conf' . DS . 'dispatcher.php';
     $currentuser = myauth::getCurrentuser();
     $groups = $currentuser->getGroupid();
     $groupfound = false;
     foreach ($groups as $groupname => $groupid) {
         if (isset($defaultPageids[$groupname])) {
             $groupfound = true;
             $defaultPageid = $defaultPageids[$groupname];
         }
     }
     if (!$groupfound) {
         $defaultPageid = $defaultPageids['default'];
     }
     if ($currentuser->getId() == $defaultUserid) {
         $form = new form($parameters);
         $username = new textField('username', 'Gebruiker', '', array('required'));
         $password = new passwordField('password', 'Wachtwoord', array('required'));
         $form->addField($username);
         $form->addField($password);
         $form->setSubmittext('Log in');
         $form->setResettext('Herbegin');
         $template = new ui($this);
         if ($form->validate()) {
             $usermodel = new userModel();
             $authuser = $usermodel->auth($parameters['username'], $parameters['password']);
             if ($authuser instanceof userObject) {
                 myauth::setCurrentuser($authuser);
                 //	Refresh the page
                 $this->response->redirect('?pageid=' . $defaultPageid);
             } else {
                 $this->response->assign('formerror_' . $form->getId(), 'innerHTML', 'De ingevulde gegevens zijn niet correct.', true);
             }
         } elseif (!$form->isSent()) {
             $template->assign('form', $form);
             $this->response->assign($this->self, 'innerHTML', $template->fetch($parameters['viewprefix'] . 'myauth_loginform.tpl'));
         } else {
             $this->response->assign('formerror_' . $form->getId(), 'innerHTML', 'Alle velden moeten ingevuld worden.', true);
         }
     } else {
         $template = new ui($this);
         $defrequest = new pagerequest($defaultPageid);
         $template->assign('defrequest', $defrequest);
         $template->assign('logoutRequest', myauth::getLogoutrequest());
         $template->assign('currentuser', $currentuser);
         $this->response->assign($this->self, 'innerHTML', $template->fetch($parameters['viewprefix'] . 'myauth_loginform_loggedin.tpl'));
         //$this->response->assign($this->self , 'innerHTML' , '');
     }
 }
开发者ID:nephie,项目名称:AZL-website,代码行数:51,代码来源:myauthController.php


示例6: showallowed

 public function showallowed($parameter = array())
 {
     $view = new ui($this);
     $grid = new mygrid('allowed');
     $grid->setModel(new ftgdallowedModel());
     $grid->setDefaultorder(array('fields' => array('time'), 'type' => 'DESC'));
     $grid->setPagesize(15);
     $grid->registerRequest('user', 'mygrid', 'search', array('directsearch' => 'true', 'gridid' => $grid->getId(), 'search' => '{user}'));
     $grid->registerRequest('group', 'mygrid', 'search', array('directsearch' => 'true', 'gridid' => $grid->getId(), 'search' => '{group}'));
     $grid->registerRequest('sourceip', 'mygrid', 'search', array('directsearch' => 'true', 'gridid' => $grid->getId(), 'search' => '{sourceip}'));
     $grid->registerRequest('host', 'mygrid', 'search', array('directsearch' => 'true', 'gridid' => $grid->getId(), 'search' => '{host}'));
     $grid->registerRequest('cat', 'mygrid', 'search', array('directsearch' => 'true', 'gridid' => $grid->getId(), 'search' => '{cat}'));
     $grid->registerRequest('destip', 'mygrid', 'search', array('directsearch' => 'true', 'gridid' => $grid->getId(), 'search' => '{destip}'));
     $view->assign('blocked', $grid);
     $this->response->assign($this->self, 'innerHTML', $view->fetch('ftgd_allowed.tpl'));
 }
开发者ID:nephie,项目名称:AZL-website,代码行数:16,代码来源:fortiguardlogController.php


示例7: defAction

 public function defAction()
 {
     $count = ormObjects::getCountTrashObjects();
     $max_count = uiTable::getMaxCount();
     if (uiTable::getCurPage() != 1) {
         $niz = empty($start_pos) ? uiTable::getCurPage() * $max_count - $max_count : 0;
         $objects = ormObjects::getTrashObjects($niz, $max_count);
     } else {
         $objects = ormObjects::getTrashObjects($max_count);
     }
     if (user::issetRight('object_del') && !empty($objects)) {
         ui::newButton(lang::get('BTN_NEW_CLEAК_TRASH'), 'javascript:clearTrash();');
     }
     $table = new uiTable($objects, $count);
     $table->addColumn('name', lang::get('TRASH_TABLE_1'), 400);
     $table->addColumn('class', lang::get('TRASH_TABLE_2'));
     $table->addColumn('date', lang::get('TRASH_TABLE_3'), 0, false, false, 'viewDateTime');
     $table->addColumn('user', lang::get('TRASH_TABLE_4'), 200);
     $table->addRight('object_restore', 'restore', multi, 'restoreObj(this)', lang::get('TRASH_TABLE_RESTORE'));
     $table->addRight('object_del', 'drop', multi);
     $table->setDelMessage(lang::get('TRASH_DEL_TITLE'), lang::get('TRASH_DEL_MSG'));
     $table->setMultiDelMessage(lang::get('TRASH_DEL_TITLE2'), lang::get('TRASH_DEL_MSG2'));
     $table->emptyText(lang::get('TRASH_EMPTY_MSG'));
     $html = '
     <script type="text/javascript" src="/css_mpanel/restore_objects.js"></script>
     <input id="clearTrashTitle" type="hidden" value="' . lang::get('TRASH_DEL_TITLE3') . '">
     <input id="clearTrashText" type="hidden" value="' . lang::get('TRASH_DEL_MSG3') . '">
     ';
     return $html . $table->getHTML();
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:30,代码来源:__list.php


示例8: defAction

 public function defAction()
 {
     // Формируем список классов для быстрого добавления
     $types = ormClasses::get('user')->getAllInheritors();
     if (count($types) > 1) {
         $class_list = '';
         while (list($id, $name) = each($types)) {
             $bclass = ormClasses::get($id);
             $class_list .= '<li><a href="' . system::au() . '/users/user_add/0/' . $bclass->getSName() . '" >' . $bclass->getName() . '</a></li>';
         }
         $java = '<script> $("#usel").parent().css("width", "150px"); </script>';
         ui::newButton(lang::get('BTN_NEW_USER'), "/users/user_add", 'class_list', '<ul id="usel">' . $class_list . '</ul>' . $java);
     } else {
         ui::newButton(lang::get('BTN_NEW_USER'), "/users/user_add");
     }
     ui::newButton(lang::get('BTN_NEW_UGROUP'), "/users/group_add");
     $sel = new ormSelect('user_group');
     $sel->orderBy('name', asc);
     $table = new uiTable($sel);
     $table->showSearch(true);
     $table->addColumn('name', lang::get('USERS_TABLE_FIELD_5'), 0, true);
     $table->addColumn('children', lang::get('USERS_TABLE_FIELD_6'), 0, true, true, 'count');
     $table->defaultRight('userlist');
     $table->addRight('userlist', 'users', single);
     $table->addRight('group_upd', 'edit', single);
     $table->addRight('group_act', 'active', multi);
     $table->addRight('group_del', 'drop', multi);
     $table->setDelMessage(lang::get('USERS_DEL_TITLE2'), lang::get('USERS_DEL_TEXT2'));
     $table->setMultiDelMessage(lang::get('USERS_DEL_TITLE_MULTI2'), lang::get('USERS_DEL_TEXT_MULTI2'));
     return $table->getHTML();
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:31,代码来源:__grouplist.php


示例9: defAction

 public function defAction()
 {
     ui::newButton(lang::get('BTN_SAVE'), "javascript:sendForm('save');");
     ui::newButton(lang::get('BTN_APPLY'), "javascript:sendForm('apply');");
     if (isset($_SESSION['STRUCTURE_LIST_FLAG']) && $_SESSION['STRUCTURE_LIST_FLAG']) {
         ui::setCancelButton('/structure/list');
     } else {
         ui::setCancelButton('/structure/tree');
     }
     $list = reg::getList(ormPages::getPrefix() . '/minitext', true);
     $texts = $js = array();
     foreach ($list as $val) {
         $texts[] = array('id' => $val['id'], 'description' => $val['description'], 'num' => '<center>%text_' . $val['id'] . '%</center>', 'text' => $val['value']);
         $js['text_' . $val['id'] . '_vvv'] = $val['value'];
     }
     // Форма редактирования
     $form = new uiMultiForm('change');
     if (reg::getKey('/core/noDelMiniTexts')) {
         $form->withoutRemoving();
     }
     $form->setRight('minitext_proc');
     $form->setData($texts);
     $form->addColumn('description', lang::get('STRUCTURE_TABLE_FIELD_12'), 200, lang::get('STRUCTURE_TABLE_FIELD_13'));
     $form->addColumn('text', lang::get('STRUCTURE_TABLE_FIELD_9'), 500, lang::get('STRUCTURE_TABLE_FIELD_10'));
     $form->addColumn('num', lang::get('STRUCTURE_TABLE_FIELD_8'), 150, lang::get('STRUCTURE_TABLE_FIELD_11'), false);
     $js = '<script language="javascript"> var textlist = ' . json_encode($js) . ';</script>';
     return $js . $form->getHTML('multi_form_memo');
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:28,代码来源:__minitext.php


示例10: proc

 public function proc()
 {
     //reg::setKey('/users/errorCountCapcha', system::POST('errorCountCapcha'));
     reg::setKey('/users/errorCountBlock', system::POST('errorCountBlock'));
     reg::setKey('/users/reg', system::POST('reg', isBool));
     reg::setKey('/users/activation', system::POST('activation', isBool));
     reg::setKey('/users/confirm', system::POST('confirm', isBool));
     reg::setKey('/users/ask_email', system::POST('ask_email', isBool));
     //авторизация чере соц. сети
     reg::setKey('/users/twitter_bool', system::POST('twitter_bool'), isBool);
     reg::setKey('/users/twitter_id', system::POST('twitter_id'), isString);
     reg::setKey('/users/twitter_secret', system::POST('twitter_secret'), isString);
     reg::setKey('/users/vk_bool', system::POST('vk_bool'), isBool);
     reg::setKey('/users/vk_id', system::POST('vk_id'), isString);
     reg::setKey('/users/vk_secret', system::POST('vk_secret'), isString);
     reg::setKey('/users/ok_bool', system::POST('ok_bool'), isBool);
     reg::setKey('/users/ok_id', system::POST('ok_id'), isString);
     reg::setKey('/users/ok_public', system::POST('ok_public'), isString);
     reg::setKey('/users/ok_secret', system::POST('ok_secret'), isString);
     reg::setKey('/users/facebook_bool', system::POST('facebook_bool'), isBool);
     reg::setKey('/users/facebook_id', system::POST('facebook_id'), isString);
     reg::setKey('/users/facebook_secret', system::POST('facebook_secret'), isString);
     reg::setKey('/users/yandex_bool', system::POST('yandex_bool'), isBool);
     reg::setKey('/users/google_bool', system::POST('google_bool'), isBool);
     ui::MessageBox(lang::get('CONFIG_SAVE_OK'), lang::get('CONFIG_SAVE_OK_MSG'));
     reg::clearCache();
     system::log(lang::get('CONFIG_LOG_SAVE'), warning);
     system::redirect('/users/settings');
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:29,代码来源:__settings.php


示例11: proc_upd

 public function proc_upd()
 {
     $obj = ormPages::get(system::POST('obj_id'));
     $obj->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');
     $obj->loadFromPost();
     // Публикация на сайте
     if (system::POST('publ', isBool)) {
         if ($obj->isInheritor('faq') && $obj->newVal('answer') == '') {
             ui::MessageBox(lang::get('TEXT_MESSAGE_ERROR'), lang::get('FEEDBACK_MSG_3'));
             ui::selectErrorFields(array('select' => '', 'focus' => 'answer'));
         } else {
             $obj->active = 1;
         }
     }
     $obj_id = $obj->save();
     // Если объект не сохранился, выводим пользователю текст ошибки.
     if ($obj_id === false) {
         system::savePostToSession();
         ui::MessageBox(lang::get('TEXT_MESSAGE_ERROR'), $obj->getErrorListText());
         ui::selectErrorFields($obj->getErrorFields());
         system::redirect('/feedback/message_upd/' . $_POST['obj_id']);
     }
     if (system::POST('send_to_email', isBool) && !$obj->send_answer_to_user && ($form_obj = ormObjects::get($obj->form_id))) {
         if ($form_obj->send_answer) {
             if ($obj->answer != '') {
                 $fields = $obj->getClass()->loadFields();
                 while (list($num, $field) = each($fields)) {
                     if (!empty($field['f_sname'])) {
                         page::assign($field['f_sname'], $obj->__get($field['f_sname']));
                     }
                 }
                 page::assign('site_name', domains::curDomain()->getSiteName());
                 page::assign('base_email', domains::curDomain()->getEmail());
                 $mail = new phpmailer();
                 $mail->From = $this->parse($form_obj->answer_sender_address);
                 $mail->FromName = $this->parse($form_obj->answer_sender_name);
                 $mail->AddAddress($obj->email);
                 $mail->WordWrap = 50;
                 $mail->IsHTML(true);
                 $mail->Subject = $this->parse($form_obj->answer_subject);
                 $mail->Body = $this->parse($form_obj->answer_template);
                 $mail->Send();
                 // Помечаем, что ответ отправлен
                 $obj->send_answer_to_user = 1;
                 $obj->save();
                 ui::MessageBox(lang::get('FEEDBACK_MSG_1'), '');
             } else {
                 ui::MessageBox(lang::get('TEXT_MESSAGE_ERROR'), lang::get('FEEDBACK_MSG_2'));
                 ui::selectErrorFields(array('select' => '', 'focus' => 'answer'));
             }
         }
     }
     // Если данные изменились корректно перенаправляем на соответствующию страницу
     if ($_POST['parram'] == 'apply') {
         system::redirect('/feedback/message_upd/' . $obj_id);
     } else {
         system::redirect('/feedback');
     }
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:59,代码来源:__message.php


示例12: view

    public function view()
    {
        if (user::issetRight('delete')) {
            ui::newButton(lang::get('BTN_CLEAR_JORNAL'), 'javascript:clearJornal();');
        }
        ui::addLeftButton('Системный журнал', 'system_view');
        ui::addLeftButton('Журнал БД', 'db_view');
        function getState($val)
        {
            if ($val == info) {
                return 'info';
            } else {
                if ($val == error) {
                    return 'error';
                } else {
                    if ($val == warning) {
                        return 'warning';
                    }
                }
            }
        }
        function getEditUser($val, $obj)
        {
            if (user::issetRight('user_upd', 'users')) {
                return '<a href="' . system::au() . '/users/user_upd/' . $obj['rev_user_id'] . '" target="_blank">' . $val . '</a>';
            } else {
                return $val;
            }
        }
        $count = db::q('SELECT count(rev_id) count FROM <<revue>>, <<objects>> WHERE rev_obj_id = o_id;', value);
        $max_count = uiTable::getMaxCount();
        if (uiTable::getCurPage() != 1) {
            $niz = empty($start_pos) ? uiTable::getCurPage() * $max_count - $max_count : 0;
            $limit = ' LIMIT ' . $niz . ', ' . $max_count;
        } else {
            $limit = ' LIMIT ' . $max_count;
        }
        $mas = db::q('SELECT rev_state, rev_user, rev_user_id, rev_datetime,
        			concat(rev_message, " <b>", o_name, "</b>") rev_msg, rev_ip
		        	FROM <<revue>>, <<objects>>
		        	WHERE rev_obj_id = o_id
		        	ORDER BY rev_datetime DESC ' . $limit, records);
        /*
          Сделать фильтры:
          	- важность
          	- пользователь
          	- тип данных
          	- периуд времени
          	- IP
        */
        $table = new uiTable($mas, $count);
        $table->addColumn('rev_state', 'Важность', 0, false, false, 'getState');
        $table->addColumn('rev_user', 'Пользователь', 0, false, false, 'getEditUser');
        $table->addColumn('rev_msg', 'Действие', 400);
        $table->addColumn('rev_datetime', 'Дата / Время', 0, false, false, 'viewDateTime2');
        $table->addColumn('rev_ip', 'IP');
        $table->emptyText('В журнале нет записей!');
        return $table->getHTML();
    }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:59,代码来源:__db.php


示例13: __construct

 public function __construct()
 {
     ui::checkClasses('handbook');
     ui::addLeftButton(lang::right('list'), 'list');
     ui::addLeftButton(lang::right('state'), 'state');
     ui::addLeftButton(lang::right('delivery'), 'delivery');
     ui::addLeftButton(lang::right('payment'), 'payment');
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:8,代码来源:__list.php


示例14: view

 public function view()
 {
     if (user::issetRight('delete')) {
         ui::newButton(lang::get('BTN_CLEAR_JORNAL'), 'javascript:clearJornal();');
     }
     ui::addLeftButton('Системный журнал', 'system_view');
     ui::addLeftButton('Журнал БД', 'db_view');
     function removeQuotes($val, $obj)
     {
         return substr($val, 1, strlen($val) - 2);
     }
     function rqDateTime($val, $obj)
     {
         return date('d.m.Y H:i:s', $val);
     }
     function sortByTime($a, $b)
     {
         if ($a[1] == $b[1]) {
             return 0;
         }
         return $a[1] > $b[1] ? -1 : 1;
     }
     $mas = array();
     $system_file = ROOT_DIR . '/revue.log';
     if (file_exists($system_file)) {
         // Читаем файл, формируем массив
         $tmp_mas = array();
         $file = file($system_file);
         while (list($key, $val) = each($file)) {
             $tmp = explode(Chr(9), $val);
             if (!empty($tmp[1])) {
                 $tmp[1] = strtotime(removeQuotes($tmp[1], $tmp[1]));
                 $tmp_mas[] = $tmp;
             }
         }
         // Сортиуем массив по времени
         usort($tmp_mas, 'sortByTime');
         // Выбераем часть массива в соотвествии с постраничной навигацией
         $count = count($tmp_mas);
         $max_count = uiTable::getMaxCount();
         if (uiTable::getCurPage() != 1) {
             $niz = empty($start_pos) ? uiTable::getCurPage() * $max_count - $max_count : 0;
             $mas = array_slice($tmp_mas, $niz, $max_count);
         } else {
             $mas = array_slice($tmp_mas, 0, $max_count);
         }
     } else {
         $count = 0;
     }
     $table = new uiTable($mas, $count);
     $table->emptyText('В системном журнале нет записей!');
     $table->addColumn('2', 'Важность', 0, false, false, 'removeQuotes');
     $table->addColumn('3', 'Пользователь', 0, false, false, 'removeQuotes');
     $table->addColumn('4', 'Действие', 400);
     $table->addColumn('1', 'Дата / Время', 0, false, false, 'rqDateTime');
     $table->addColumn('0', 'IP');
     return $table->getHTML();
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:58,代码来源:__system.php


示例15: updatesuggestselectfield

 public function updatesuggestselectfield($parameters = array())
 {
     $result = array();
     $view = new ui($this);
     if ($parameters['value'] != '') {
         $controller = $parameters['callbackcontroller'] . 'Controller';
         $function = $parameters['callbackfunction'];
         $extra = $parameters['extraparams'];
         $extralist = explode(',', $extra);
         $extraparams = array();
         foreach ($extralist as $extraparam) {
             list($key, $value) = explode('|', $extraparam);
             $extraparams[$key] = $value;
         }
         $theController = new $controller();
         $result = $theController->{$function}(rawurldecode($parameters['value']), $extraparams);
         $form = new form($parameters);
         list($id, $name) = explode('_', $parameters['id'], 2);
         $form->setId($id);
         $select = new selectField(str_replace('_text', '', $name), '', '', true);
         $form->addField($select);
         foreach ($result as $row) {
             $select->addOption(new selectoptionField($row, $row, false));
         }
         $view->assign('form', $form);
         $view->assign('field', $select);
         $this->response->assign(str_replace('_text', '', $parameters['id']) . '_container', 'innerHTML', $view->fetch('selectField.tpl'));
     } else {
         $form = new form($parameters);
         $select = new selectField($parameters['id'], '', '', true);
         $view->assign('form', $form);
         $view->assign('field', $select);
         $this->response->assign(str_replace('_text', '', $parameters['id']) . '_container', 'innerHTML', $view->fetch('selectField.tpl'));
     }
 }
开发者ID:nephie,项目名称:AZL-website,代码行数:35,代码来源:myformController.php


示例16: defAction

 public function defAction()
 {
     ui::newButton(lang::get('BTN_NEW_CLASS'), '/constructor/class_add');
     if (file_exists(MODUL_DIR . '/constructor/template/classesTree.tpl')) {
         include MODUL_DIR . '/constructor/template/classesTree.tpl';
         page::assign('items', $this->createTree(0, $TEMPLATE));
         return page::parse($TEMPLATE['frame']);
     }
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:9,代码来源:__tree.php


示例17: widget

 function widget($args, $instance)
 {
     extract($args);
     /* User-selected settings. */
     $title = apply_filters('widget_title', $instance['title']);
     $category = $instance['category'];
     $show_count = $instance['show_count'];
     $show_date = $instance['show_date'] ? true : false;
     $show_thumb = $instance['show_thumb'] ? true : false;
     $show_excerpt = $instance['show_excerpt'] ? true : false;
     $excerpt_length = $instance['excerpt_length'];
     $show_title = $instance['hide_title'] ? false : true;
     /* Before widget (defined by themes). */
     echo $before_widget;
     /* Title of widget (before and after defined by themes). */
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     echo '<ul class="feature-posts-list">';
     $query_opts = apply_filters('wpzoom_query', array('posts_per_page' => $show_count, 'post_type' => 'post'));
     if ($category) {
         $query_opts['cat'] = $category;
     }
     query_posts($query_opts);
     if (have_posts()) {
         while (have_posts()) {
             the_post();
             echo '<li>';
             if ($show_thumb && has_post_thumbnail()) {
                 echo '<a href="' . get_permalink() . '"><img src="' . ui::thumbIt(absint(get_post_thumbnail_id()), absint($instance['thumb_width']), absint($instance['thumb_height'])) . '" height="' . $instance['thumb_height'] . '" width="' . $instance['thumb_width'] . '"></a>';
             }
             if ($show_title) {
                 echo '<a href="' . get_permalink() . '">' . get_the_title() . '</a> <br />';
             }
             if ($show_date) {
                 echo '<small>' . get_the_date() . '</small> <br />';
             }
             if ($show_excerpt) {
                 $the_excerpt = get_the_excerpt();
                 // cut to character limit
                 $the_excerpt = substr($the_excerpt, 0, $excerpt_length);
                 // cut to last space
                 $the_excerpt = substr($the_excerpt, 0, strrpos($the_excerpt, ' '));
                 echo '<span class="post-excerpt">' . $the_excerpt . '</span>';
             }
             echo '<div class="clear"></div></li>';
         }
     } else {
     }
     //Reset query_posts
     wp_reset_query();
     echo '</ul><div class="clear"></div>';
     /* After widget (defined by themes). */
     echo $after_widget;
 }
开发者ID:kahlanamnell,项目名称:alpha,代码行数:55,代码来源:recentposts.php


示例18: adddokter

 public function adddokter($parameters = array())
 {
     require FRAMEWORK . DS . 'conf' . DS . 'mydhcpcc.php';
     $view = new ui($this);
     $form = new form($parameters);
     $form->addField(new textField('mac', 'Mac', '', array('required', 'mac')));
     $form->addField(new textField('desc', 'Omschrijving', '', array('required')));
     if ($form->validate()) {
         $output = array();
         $lastline = exec('c:' . DS . 'plink.exe ' . $siecarehost . ' -l ' . $siecareuser . ' -i ' . $siecareppk . ' sudo /usr/sbin/adddokter ' . $form->getFieldvalue('mac') . ' ' . $form->getFieldvalue('desc') . ' && exit', $output);
         if ($lastline == 'Starting dhcpd: [  OK  ]') {
             $form->clear();
         }
         $output = implode('<br />', $output);
         $this->response->assign('formerror_' . $form->getId(), 'innerHTML', $output, true);
     } elseif (!$form->isSent()) {
         $view->assign('form', $form);
         $this->response->assign($this->self, 'innerHTML', $view->fetch('mydhcpcc_adddokter.tpl'));
     }
 }
开发者ID:nephie,项目名称:AZL-website,代码行数:20,代码来源:mydhcpccController.php


示例19: defAction

 public function defAction()
 {
     if (!system::issetUrl(2)) {
         system::redirect('/reference');
     }
     if ($class = ormClasses::get(system::url(2))) {
         if (!$class->isInheritor('handbook') || $class->getSName() == 'handbook') {
             system::redirect('/reference');
         }
         ui::setNaviBar(lang::right('values'));
         ui::setHeader($class->getName());
         ui::setBackButton('/reference');
         if (user::issetRight('val_upd')) {
             $count = 0;
             $fields = $class->loadFields();
             foreach ($fields as $field) {
                 if ($field['f_view'] == 1) {
                     $count++;
                 }
             }
         } else {
             $count = 4;
         }
         $sel = new ormSelect($class->getSName());
         if ($count > 5) {
             ui::newButton(lang::get('BTN_NEW_LIST'), '/reference/val_add/' . system::url(2));
             $table = new uiTable($sel);
             $table->showSearch(true);
             $table->addColumn('name', 'Имя объекта');
             $table->addColumn('id', '#', 200);
             $table->defaultRight('val_upd');
             $table->addRight('val_upd', 'edit', single);
             $table->addRight('val_del', 'drop', multi);
             return $table->getHTML();
         } else {
             ui::newButton(lang::get('BTN_SAVE'), "javascript:sendForm('save');");
             ui::newButton(lang::get('BTN_APPLY'), "javascript:sendForm('apply');");
             $form = new ormMultiForm('change');
             $form->setData($sel);
             $form->showColumnID();
             $form->setRight('val_proc_upd');
             $form->moreParam(system::url(2));
             if (!user::issetRight('val_upd') || !user::issetRight('val_add')) {
                 $form->withoutAdditions();
             }
             if (!user::issetRight('val_del')) {
                 $form->withoutRemoving();
             }
             return $form->getHTML();
         }
     } else {
         system::redirect('/reference');
     }
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:54,代码来源:__values.php


示例20: validate

 function validate($value, $form = null)
 {
     $this->form = $form;
     $valid = true;
     foreach ($this->validator as $req) {
         list($function, $param) = explode(':', $req, 2);
         $function = 'validate_' . $function;
         if (!call_user_func(array($this, $function), $param, $value)) {
             $valid = false;
         }
     }
     $response = responseLib::getInstance();
     if (!$valid) {
         $template = new ui($this);
         $template->assign('validateerror', $this->validateerror);
         //$response->assign($this->id . '_error' , 'innerHTML' , $template->fetch('validateerror.tpl'),true);
         $response->assign($this->id, 'title', $template->fetch('validateerror.tpl'));
         $response->script("highlightformfielderror('{$this->id}')");
     } else {
         $response->assign($this->id, 'title', '');
         $response->script("removehighlightformfielderror('{$this->id}')");
     }
     return $valid;
 }
开发者ID:nephie,项目名称:AZL-website,代码行数:24,代码来源:formField.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP uiBaseFrm类代码示例发布时间:2022-05-23
下一篇:
PHP type类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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