當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Content::action方法代碼示例

本文整理匯總了PHP中Content::action方法的典型用法代碼示例。如果您正苦於以下問題:PHP Content::action方法的具體用法?PHP Content::action怎麽用?PHP Content::action使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Content的用法示例。


在下文中一共展示了Content::action方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: action

 /**
  * 發表新任務
  */
 public function action()
 {
     //列出用戶
     $userList = \Model\Content::listContent('user');
     $this->assign('user', $userList);
     foreach ($userList as $key => $value) {
         //獲取本部門的用戶
         if ($value['user_department_id'] == $_SESSION['team']['user_department_id']) {
             $localUser[$value['user_id']] = $value['user_name'];
         }
         //將所有用戶放到一個以用戶ID的一維數組,方便查找
         $findUser[$value['user_id']] = $value['user_name'];
     }
     $this->assign('localUser', $localUser);
     $this->assign('findUser', $findUser);
     //列出部門
     foreach (\Model\Content::listContent('department') as $key => $value) {
         $department[$value['department_id']] = $value['department_name'];
     }
     $this->assign('department', $department);
     //列出項目
     $project = \Model\Content::listContent('project', array(), '', 'project_listsort ASC, project_id DESC');
     $this->assign('project', $project);
     parent::action();
 }
開發者ID:tarscoding,項目名稱:PESCMS-TEAM,代碼行數:28,代碼來源:Task.class.php

示例2: action

 /**
  * 更新模型
  */
 public function action($jump = FALSE, $commit = TRUE)
 {
     $model = \Model\ModelManage::findModel($_POST['id']);
     parent::action($jump, $commit);
     //更新菜單
     $this->db('menu')->where('menu_name = :old_name')->update(array('menu_name' => $this->p('title'), 'noset' => array('old_name' => $model['model_title'])));
     $this->success('更新模型成功', $this->url(GROUP . '-Model-index'));
 }
開發者ID:Myazure,項目名稱:PESCMS2,代碼行數:11,代碼來源:Model.class.php

示例3: action

 public function action($jump = TRUE, $commit = TRUE)
 {
     if ($_POST['parent'] == '0') {
         $_POST['value'] = (string) ucfirst(strtolower($_POST['value']));
     } else {
         $controller = \Model\Content::findContent('node', $_POST['parent'], 'node_id');
         $_POST['check_value'] = GROUP . $_POST['method_type'] . $controller['node_value'] . $_POST['value'];
     }
     parent::action();
 }
開發者ID:hurricanetx,項目名稱:PESCMS2,代碼行數:10,代碼來源:Node.class.php

示例4: action

 /**
  * 部門添加/編輯
  */
 public function action()
 {
     $userList = \Model\Content::listContent('user');
     $this->assign('user', $userList);
     foreach ($userList as $key => $value) {
         $findUser[$value['user_id']] = $value['user_name'];
     }
     $this->assign('findUser', $findUser);
     parent::action();
 }
開發者ID:tarscoding,項目名稱:PESCMS-TEAM,代碼行數:13,代碼來源:Department.class.php

示例5: action

 public function action($jump = FALSE, $commit = true)
 {
     \Model\Field::baseForm();
     parent::action($jump, $commit);
     if (empty($_GET['back_url'])) {
         $url = $this->url(GROUP . '-Model-fieldList', array('id' => $this->p('id'), 'model_id' => \Model\Field::$model['model_id']));
     } else {
         $url = base64_decode($_GET['back_url']);
     }
     $this->success('更新字段成功', $url);
 }
開發者ID:Myazure,項目名稱:PESCMS2,代碼行數:11,代碼來源:Field.class.php

示例6: action

 /**
  * 添加內容
  */
 public function action($jump = TRUE, $commit = TRUE)
 {
     if ($this->p('password')) {
         $password = $this->p('password');
         if ($password != $this->p('confirm_password')) {
             $this->error('兩次輸入的密碼不一致');
         }
         $_POST['password'] = (string) \Core\Func\CoreFunc::generatePwd($this->isP('account', '請提交帳號') . $password, 'PRIVATE_KEY');
     }
     parent::action();
 }
開發者ID:hurricanetx,項目名稱:PESCMS2,代碼行數:14,代碼來源:User.class.php

示例7: action

 public function action()
 {
     $this->assign('topMenu', json_encode(\Model\Menu::topMenu()));
     parent::action();
 }
開發者ID:Myazure,項目名稱:PESCMS2,代碼行數:5,代碼來源:Menu.class.php


注:本文中的Content::action方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。