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


PHP js::reload方法代碼示例

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


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

示例1: turnon

 /**
  * Turnon cron. 
  * 
  * @access public
  * @return void
  */
 public function turnon($confirm = 'no')
 {
     $turnon = empty($this->config->global->cron) ? 1 : 0;
     if (!$turnon and $confirm == 'no') {
         die(js::confirm($this->lang->cron->confirmTurnon, inlink('turnon', "confirm=yes")) . js::reload('parent'));
     }
     $this->loadModel('setting')->setItem('system.sys.common.global.cron', $turnon);
     die(js::reload('parent'));
 }
開發者ID:leowh,項目名稱:colla,代碼行數:15,代碼來源:control.php

示例2: manage

 public function manage($productID)
 {
     if ($_POST) {
         $this->branch->manage($productID);
         die(js::reload('parent'));
     }
     $this->view->title = $this->lang->branch->manage;
     $this->view->position[] = $this->lang->branch->manage;
     $this->loadModel('product')->setMenu($this->product->getPairs('nocode'), $productID);
     $this->view->product = $this->product->getById($productID);
     $this->view->branches = $this->branch->getPairs($productID, 'noempty');
     $this->display();
 }
開發者ID:heeeello,項目名稱:zentaopms,代碼行數:13,代碼來源:control.php

示例3: batchCreate

 /**
  * Create batch todo
  * 
  * @access public
  * @return void
  */
 public function batchCreate()
 {
     $todos = fixer::input('post')->cleanInt('date')->get();
     for ($i = 0; $i < $this->config->todo->batchCreate; $i++) {
         if ($todos->names[$i] != '' || isset($todos->bugs[$i + 1]) || isset($todos->tasks[$i + 1])) {
             $todo = new stdclass();
             $todo->account = $this->app->user->account;
             if ($this->post->date == false) {
                 $todo->date = '2030-01-01';
             } else {
                 $todo->date = $this->post->date;
             }
             $todo->type = $todos->types[$i];
             $todo->pri = $todos->pris[$i];
             $todo->name = isset($todos->names[$i]) ? $todos->names[$i] : '';
             $todo->desc = $todos->descs[$i];
             $todo->begin = isset($todos->begins[$i]) ? $todos->begins[$i] : 2400;
             $todo->end = isset($todos->ends[$i]) ? $todos->ends[$i] : 2400;
             $todo->status = "wait";
             $todo->private = 0;
             $todo->idvalue = 0;
             if ($todo->type == 'bug') {
                 $todo->idvalue = isset($todos->bugs[$i + 1]) ? $todos->bugs[$i + 1] : 0;
             }
             if ($todo->type == 'task') {
                 $todo->idvalue = isset($todos->tasks[$i + 1]) ? $todos->tasks[$i + 1] : 0;
             }
             $this->dao->insert(TABLE_TODO)->data($todo)->autoCheck()->exec();
             if (dao::isError()) {
                 echo js::error(dao::getError());
                 die(js::reload('parent'));
             }
             $this->loadModel('action')->create('todo', $this->dao->lastInsertID(), 'opened');
         } else {
             unset($todos->types[$i]);
             unset($todos->pris[$i]);
             unset($todos->names[$i]);
             unset($todos->descs[$i]);
             unset($todos->begins[$i]);
             unset($todos->ends[$i]);
         }
     }
 }
開發者ID:XMGmen,項目名稱:zentao,代碼行數:49,代碼來源:model.php

示例4: batchCreate

 /**
  * Create batch todo
  * 
  * @access public
  * @return void
  */
 public function batchCreate()
 {
     $todos = fixer::input('post')->cleanInt('date')->get();
     for ($i = 0; $i < $this->config->todo->batchCreate; $i++) {
         if ($todos->names[$i] != '' || isset($todos->bugs[$i + 1]) || isset($todos->tasks[$i + 1])) {
             $todo->account = $this->app->user->account;
             $todo->date = $this->post->date;
             $todo->type = $todos->types[$i];
             $todo->pri = $todos->pris[$i];
             $todo->name = isset($todos->names[$i]) ? $todos->names[$i] : '';
             $todo->desc = $todos->descs[$i];
             $todo->begin = $todos->begins[$i];
             $todo->end = $todos->ends[$i];
             $todo->source = isset($todos->source) ? $todos->source : 'todo';
             $todo->status = "wait";
             $todo->private = 0;
             $todo->idvalue = 0;
             if ($todo->type == 'bug') {
                 $todo->idvalue = isset($todos->bugs[$i + 1]) ? $todos->bugs[$i + 1] : 0;
             }
             if ($todo->type == 'task') {
                 $todo->idvalue = isset($todos->tasks[$i + 1]) ? $todos->tasks[$i + 1] : 0;
             }
             $this->dao->insert(TABLE_TODO)->data($todo)->autoCheck()->exec();
             if (dao::isError()) {
                 echo js::error(dao::getError());
                 die(js::reload('parent'));
             }
         } else {
             unset($todos->types[$i]);
             unset($todos->pris[$i]);
             unset($todos->names[$i]);
             unset($todos->descs[$i]);
             unset($todos->begins[$i]);
             unset($todos->ends[$i]);
         }
     }
 }
開發者ID:shshenpengfei,項目名稱:scrum_project_manage_system,代碼行數:44,代碼來源:model.php

示例5: sync2db

 public function sync2db($config)
 {
     $ldapUsers = $this->getUsers($config);
     $user = new stdclass();
     $account = '';
     $i = 0;
     for (; $i < $ldapUsers['count']; $i++) {
         $user->account = $ldapUsers[$i][$config->uid][0];
         $user->email = $ldapUsers[$i][$config->mail][0];
         $user->realname = $ldapUsers[$i][$config->name][0];
         $account = $this->dao->select('*')->from(TABLE_USER)->where('account')->eq($user->account)->fetch('account');
         if ($account == $user->account) {
             $this->dao->update(TABLE_USER)->data($user)->where('account')->eq($user->account)->autoCheck()->exec();
         } else {
             $this->dao->insert(TABLE_USER)->data($user)->autoCheck()->exec();
         }
         if (dao::isError()) {
             echo js::error(dao::getError());
             die(js::reload('parent'));
         }
     }
     return $i;
 }
開發者ID:TigerLau1985,項目名稱:ZenTao_LDAP,代碼行數:23,代碼來源:model.php

示例6: updateDefaultPwd

 public function updateDefaultPwd()
 {
     $data = fixer::input('post')->get();
     $pwdList = $this->post->pwdList ? $this->post->pwdList : array();
     if (!empty($pwdList)) {
         /* Initialize todos from the post data. */
         foreach ($pwdList as $pwdID) {
             $pwd = $data->password[$pwdID];
             if ('' === $pwd) {
                 continue;
             }
             if ($pwdID > 0) {
                 $this->updatePwd($pwdID, $pwd);
             } else {
                 $this->setdefaultpwd($pwd);
             }
         }
     }
     if (dao::isError()) {
         echo js::error(dao::getError());
         die(js::reload('parent'));
     }
 }
開發者ID:xupnge1314,項目名稱:project,代碼行數:23,代碼來源:model.php

示例7: order

 /**
  * order product 
  * 
  * @param  int    $productID 
  * @access public
  * @return void
  */
 public function order($productID)
 {
     if ($_POST) {
         $this->product->saveOrder();
         die(js::reload('parent'));
     }
     $this->product->setMenu($this->products, $productID);
     $this->view->products = $this->product->getList('noclosed');
     $this->display();
 }
開發者ID:shshenpengfei,項目名稱:scrum_project_manage_system,代碼行數:17,代碼來源:control.php

示例8: batchClose

 /**
  * Batch close tasks.
  * 
  * @access public
  * @return void
  */
 public function batchClose()
 {
     if ($this->post->tasks) {
         $tasks = $this->post->tasks;
         unset($_POST['tasks']);
         $this->loadModel('action');
         foreach ($tasks as $taskID) {
             $this->commonAction($taskID);
             $task = $this->task->getById($taskID);
             if ($task->status == 'wait' or $task->status == 'doing') {
                 continue;
             }
             $changes = $this->task->close($taskID);
             if ($changes) {
                 $actionID = $this->action->create('task', $taskID, 'Closed', '');
                 $this->action->logHistory($actionID, $changes);
                 $this->sendmail($taskID, $actionID);
             }
         }
     }
     die(js::reload('parent'));
 }
開發者ID:huokedu,項目名稱:zentao,代碼行數:28,代碼來源:control.php

示例9: confirmStoryChange

 /**
  * Confirm story changes.
  * 
  * @param  int   $caseID 
  * @access public
  * @return void
  */
 public function confirmStoryChange($caseID)
 {
     $case = $this->testcase->getById($caseID);
     $this->dao->update(TABLE_CASE)->set('storyVersion')->eq($case->latestStoryVersion)->where('id')->eq($caseID)->exec();
     $this->loadModel('action')->create('case', $caseID, 'confirmed', '', $case->latestStoryVersion);
     die(js::reload('parent'));
 }
開發者ID:XMGmen,項目名稱:zentao,代碼行數:14,代碼來源:control.php

示例10: setFlow

 /**
  * Set flow.
  * 
  * @access public
  * @return void
  */
 public function setFlow()
 {
     if ($_POST) {
         $this->loadModel('setting')->setItem('system.common.global.flow', $this->post->flow, 0);
         if ($this->post->flow != 'full') {
             die(js::locate($this->createLink('extension', 'install', "extension={$this->config->admin->flow2Ext[$this->post->flow]}"), 'parent'));
         }
         die(js::reload('parent.parent'));
     }
     $this->display();
 }
開發者ID:laiello,項目名稱:zentaoms,代碼行數:17,代碼來源:control.php

示例11: confirmStoryChange

 /**
  * Confirm story change.
  * 
  * @param  int    $bugID 
  * @access public
  * @return void
  */
 public function confirmStoryChange($bugID)
 {
     $bug = $this->bug->getById($bugID);
     $this->dao->update(TABLE_BUG)->set('storyVersion')->eq($bug->latestStoryVersion)->where('id')->eq($bugID)->exec();
     $this->loadModel('action')->create('bug', $bugID, 'confirmed', '', $bug->latestStoryVersion);
     die(js::reload('parent'));
 }
開發者ID:jsyinwenjun,項目名稱:zentao,代碼行數:14,代碼來源:control.php

示例12: mark

 /**
  * Mark status of a todo.
  * 
  * @param  int    $todoID 
  * @param  string $status   wait|doing|done
  * @access public
  * @return void
  */
 public function mark($todoID, $status)
 {
     $this->todo->mark($todoID, $status);
     $todo = $this->todo->getById($todoID);
     if ($todo->status == 'done') {
         if ($todo->type == 'bug' or $todo->type == 'task') {
             $confirmNote = 'confirm' . ucfirst($todo->type);
             $confirmURL = $this->createLink($todo->type, 'view', "id={$todo->idvalue}");
             $cancelURL = $this->server->HTTP_REFERER;
             die(js::confirm(sprintf($this->lang->todo->{$confirmNote}, $todo->idvalue), $confirmURL, $cancelURL, 'parent', 'parent'));
         }
     }
     die(js::reload('parent'));
 }
開發者ID:shshenpengfei,項目名稱:scrum_project_manage_system,代碼行數:22,代碼來源:control.php

示例13: batchFinish

 /**
  * Batch finish todos.
  * 
  * @access public
  * @return void
  */
 public function batchFinish()
 {
     if (!empty($_POST['todoIDList'])) {
         foreach ($_POST['todoIDList'] as $todoID) {
             $todo = $this->todo->getById($todoID);
             if ($todo->status != 'done') {
                 $this->todo->finish($todoID);
             }
         }
         die(js::reload('parent'));
     }
 }
開發者ID:XMGmen,項目名稱:zentao,代碼行數:18,代碼來源:control.php

示例14: flow

 /**
  * Flow zentao. 
  * 
  * @access public
  * @return void
  */
 public function flow()
 {
     if ($_POST) {
         $this->loadModel('setting')->setItem('system.custom.productproject', $this->post->productproject);
         die(js::reload('parent'));
     }
     $this->view->title = $this->lang->custom->flow;
     $this->view->position[] = $this->lang->custom->flow;
     $this->display();
 }
開發者ID:XMGmen,項目名稱:zentao,代碼行數:16,代碼來源:control.php

示例15: close

 /**
  * Close product.
  * 
  * @param  int    $productID 
  * @access public
  * @return void
  */
 public function close($productID)
 {
     $product = $this->product->getById($productID);
     $actions = $this->loadModel('action')->getList('product', $productID);
     if (!empty($_POST)) {
         $changes = $this->product->close($productID);
         if (dao::isError()) {
             die(js::error(dao::getError()));
         }
         if ($this->post->comment != '' or !empty($changes)) {
             $actionID = $this->action->create('product', $productID, 'Closed', $this->post->comment);
             $this->action->logHistory($actionID, $changes);
         }
         die(js::reload('parent.parent'));
     }
     $this->product->setMenu($this->products, $productID);
     $this->view->product = $product;
     $this->view->title = $this->view->product->name . $this->lang->colon . $this->lang->close;
     $this->view->position[] = $this->lang->close;
     $this->view->actions = $actions;
     $this->view->users = $this->loadModel('user')->getPairs('noletter');
     $this->display();
 }
開發者ID:nanata1115,項目名稱:zentaopms,代碼行數:30,代碼來源:control.php


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