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


PHP js::confirm方法代码示例

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


在下文中一共展示了js::confirm方法的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: delete

 /**
  * Delete a department.
  * 
  * @param  int    $deptID 
  * @param  string $confirm  yes|no
  * @access public
  * @return void
  */
 public function delete($deptID, $confirm = 'no')
 {
     if ($confirm == 'no') {
         echo js::confirm($this->lang->dept->confirmDelete, $this->createLink('dept', 'delete', "deptID={$deptID}&confirm=yes"));
         exit;
     } else {
         $this->dept->delete($deptID);
         die(js::reload('parent'));
     }
 }
开发者ID:huokedu,项目名称:zentao,代码行数:18,代码来源:control.php

示例3: finish

 /**
  * Finish a todo.
  * 
  * @param  int    $todoID 
  * @access public
  * @return void
  */
 public function finish($todoID)
 {
     $todo = $this->todo->getById($todoID);
     if ($todo->status != 'done') {
         $this->todo->finish($todoID);
     }
     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'));
     }
     if (isonlybody()) {
         die(js::reload('parent.parent'));
     }
     die(js::reload('parent'));
 }
开发者ID:XMGmen,项目名称:zentao,代码行数:24,代码来源:control.php

示例4: delete

 /**
  * Delete a release.
  * 
  * @param  int    $releaseID 
  * @param  string $confirm      yes|no
  * @access public
  * @return void
  */
 public function delete($releaseID, $confirm = 'no')
 {
     if ($confirm == 'no') {
         die(js::confirm($this->lang->release->confirmDelete, $this->createLink('release', 'delete', "releaseID={$releaseID}&confirm=yes")));
     } else {
         $this->release->delete(TABLE_RELEASE, $releaseID);
         /* if ajax request, send result. */
         if ($this->server->ajax) {
             if (dao::isError()) {
                 $response['result'] = 'fail';
                 $response['message'] = dao::getError();
             } else {
                 $response['result'] = 'success';
                 $response['message'] = '';
             }
             $this->send($response);
         }
         die(js::locate($this->session->releaseList, 'parent'));
     }
 }
开发者ID:ppmon,项目名称:ppm,代码行数:28,代码来源:control.php

示例5: restore

 /**
  * Restore the default lang. Delete the related items.
  * 
  * @param  string $module 
  * @param  string $field 
  * @param  string $confirm 
  * @access public
  * @return void
  */
 public function restore($module, $field, $confirm = 'no')
 {
     if ($confirm == 'no') {
         die(js::confirm($this->lang->custom->confirmRestore, inlink('restore', "module={$module}&field={$field}&confirm=yes")));
     }
     $this->custom->deleteItems("module={$module}&section={$field}");
     die(js::reload('parent'));
 }
开发者ID:XMGmen,项目名称:zentao,代码行数:17,代码来源:control.php

示例6: unlinkStory

 /**
  * Unlink a story.
  * 
  * @param  int    $projectID 
  * @param  int    $storyID 
  * @param  string $confirm    yes|no
  * @access public
  * @return void
  */
 public function unlinkStory($projectID, $storyID, $confirm = 'no')
 {
     if ($confirm == 'no') {
         echo js::confirm($this->lang->project->confirmUnlinkStory, $this->createLink('project', 'unlinkstory', "projectID={$projectID}&storyID={$storyID}&confirm=yes"));
         exit;
     } else {
         $this->project->unlinkStory($projectID, $storyID);
         echo js::locate($this->app->session->storyList, 'parent');
         exit;
     }
 }
开发者ID:shshenpengfei,项目名称:scrum_project_manage_system,代码行数:20,代码来源:control.php

示例7: delete

 /**
  * Delete a group.
  * 
  * @param  int    $groupID 
  * @param  string $confirm  yes|no
  * @access public
  * @return void
  */
 public function delete($groupID, $confirm = 'no')
 {
     if ($confirm == 'no') {
         die(js::confirm($this->lang->group->confirmDelete, $this->createLink('group', 'delete', "groupID={$groupID}&confirm=yes")));
     } else {
         $this->group->delete($groupID);
         die(js::locate($this->createLink('group', 'browse'), 'parent'));
     }
 }
开发者ID:laiello,项目名称:zentaoms,代码行数:17,代码来源:control.php

示例8: delete

 /**
  * Delete a file.
  * 
  * @param  int    $fileID 
  * @param  string $confirm  yes|no
  * @access public
  * @return void
  */
 public function delete($fileID, $confirm = 'no')
 {
     if ($confirm == 'no') {
         die(js::confirm($this->lang->file->confirmDelete, inlink('delete', "fileID={$fileID}&confirm=yes")));
     } else {
         $file = $this->file->getById($fileID);
         $this->dao->delete()->from(TABLE_FILE)->where('id')->eq($fileID)->exec();
         $this->loadModel('action')->create($file->objectType, $file->objectID, 'deletedFile', '', $extra = $file->title);
         @unlink($file->realPath);
         die(js::reload('parent'));
     }
 }
开发者ID:XMGmen,项目名称:zentao,代码行数:20,代码来源:control.php

示例9: delete

 /**
  * Delete a department.
  * 
  * @param  int    $deptID 
  * @param  string $confirm  yes|no
  * @access public
  * @return void
  */
 public function delete($deptID, $confirm = 'no')
 {
     /* Check this dept when delete. */
     $sons = $this->dept->getSons($deptID);
     $users = $this->dept->getUsers($deptID);
     if ($sons) {
         die(js::alert($this->lang->dept->error->hasSons));
     }
     if ($users) {
         die(js::alert($this->lang->dept->error->hasUsers));
     }
     if ($confirm == 'no') {
         die(js::confirm($this->lang->dept->confirmDelete, $this->createLink('dept', 'delete', "deptID={$deptID}&confirm=yes")));
     } else {
         $this->dept->delete($deptID);
         die(js::reload('parent'));
     }
 }
开发者ID:fanscky,项目名称:HTPMS,代码行数:26,代码来源:control.php

示例10: reviewdelete

 public function reviewdelete($sprintID = 0, $confirm = 'no')
 {
     if ($confirm == 'no') {
         die(js::confirm("确定删除这个回顾会吗", inlink('reviewdelete', "sprintID={$sprintID}&confirm=yes"), inlink('review', "sprintID={$sprintID}")));
     } else {
         $this->sprint->deleteReview($sprintID);
         die(js::locate($this->createLink('sprint', 'review', "projectID={$sprintID}"), 'parent'));
     }
     $this->display();
 }
开发者ID:XMGmen,项目名称:zentao,代码行数:10,代码来源:control.php

示例11: batchDelete

 /**
  * Batch delete mail queue.
  * 
  * @param  string $confirm 
  * @access public
  * @return void
  */
 public function batchDelete($confirm = 'no')
 {
     if ($confirm == 'no') {
         if (empty($_POST)) {
             die(js::reload('parent'));
         }
         $idList = join('|', $this->post->mailIDList);
         die(js::confirm($this->lang->mail->confirmDelete, inlink('batchDelete', "confirm=yes") . ($this->config->requestType == 'GET' ? '&' : '?') . "idList={$idList}"));
     }
     $idList = array();
     if (isset($_GET['idList'])) {
         $idList = explode('|', $_GET['idList']);
     }
     if ($idList) {
         $this->dao->delete()->from(TABLE_MAILQUEUE)->where('id')->in($idList)->exec();
     }
     die(js::reload('parent'));
 }
开发者ID:caiwenhao,项目名称:zentao,代码行数:25,代码来源:control.php

示例12: hideAll

 /**
  * Hide all deleted objects.
  * 
  * @param  string $confirm 
  * @access public
  * @return void
  */
 public function hideAll($confirm = 'no')
 {
     if ($confirm == 'no') {
         die(js::confirm($this->lang->action->confirmHideAll, inlink('hideAll', "confirm=yes")));
     } else {
         $this->action->hideAll();
         die(js::reload('parent'));
     }
 }
开发者ID:iamazhi,项目名称:zentaopms,代码行数:16,代码来源:control.php

示例13: delete

 /**
  * Delete a user.
  * 
  * @param  int    $userID 
  * @param  string $confirm  yes|no
  * @access public
  * @return void
  */
 public function delete($userID, $confirm = 'no')
 {
     if ($confirm == 'no') {
         die(js::confirm($this->lang->user->confirmDelete, $this->createLink('user', 'delete', "userID={$userID}&confirm=yes")));
     } else {
         $this->user->delete(TABLE_USER, $userID);
         die(js::locate($this->createLink('company', 'browse'), 'parent'));
     }
 }
开发者ID:shshenpengfei,项目名称:scrum_project_manage_system,代码行数:17,代码来源:control.php

示例14: clearData

 /**
  * Confirm clear data.
  * 
  * @param  string $confirm ''|no|yes
  * @access public
  * @return void
  */
 public function clearData($confirm = '')
 {
     if ($confirm == 'no') {
         die(js::confirm($this->lang->admin->confirmClearData, inlink('clearData', "confirm=yes")));
     } elseif ($confirm == 'yes') {
         $result = $this->admin->clearData();
         if (!$result) {
             die(js::alert($this->lang->admin->clearDataFailed));
         }
         js::alert($this->lang->admin->clearDataSuccessfully);
         die(js::locate(inLink('index'), 'parent'));
     }
     $this->display();
 }
开发者ID:laiello,项目名称:zentaoms,代码行数:21,代码来源:control.php

示例15: delete

 /**
  * Delete a bug.
  * 
  * @param  int    $bugID 
  * @param  string $confirm  yes|no
  * @access public
  * @return void
  */
 public function delete($bugID, $confirm = 'no')
 {
     $bug = $this->bug->getById($bugID);
     if ($confirm == 'no') {
         die(js::confirm($this->lang->bug->confirmDelete, inlink('delete', "bugID={$bugID}&confirm=yes")));
     } else {
         $this->bug->delete(TABLE_BUG, $bugID);
         if ($bug->toTask != 0) {
             echo js::alert($this->lang->bug->remindTask . $bug->toTask);
         }
         die(js::locate($this->session->bugList, 'parent'));
     }
 }
开发者ID:jsyinwenjun,项目名称:zentao,代码行数:21,代码来源:control.php


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