本文整理汇总了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'));
}
示例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'));
}
}
示例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'));
}
示例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'));
}
}
示例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}§ion={$field}");
die(js::reload('parent'));
}
示例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;
}
}
示例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'));
}
}
示例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'));
}
}
示例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'));
}
}
示例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();
}
示例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'));
}
示例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'));
}
}
示例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'));
}
}
示例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();
}
示例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'));
}
}