本文整理汇总了PHP中xoops_confirm函数的典型用法代码示例。如果您正苦于以下问题:PHP xoops_confirm函数的具体用法?PHP xoops_confirm怎么用?PHP xoops_confirm使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xoops_confirm函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: transfer_pm
function transfer_pm(&$data)
{
global $xoopsModule, $xoopsConfig, $xoopsUser, $xoopsModuleConfig;
global $xoopsLogger, $xoopsOption, $xoopsTpl, $xoopsblock;
$_config = require(dirname(__FILE__)."/config.php");
$hiddens["to_userid"] = $data["uid"];
$hiddens["subject"] = $data["title"];
$content = str_replace("<br />", "\n\r", $data["content"]);
$content = str_replace("<br>", "\n\r", $content);
$content = "[quote]\n".forum_html2text($content)."\n[/quote]";
$content = $data["title"]."\n\r".$content."\n\r\n\r"._MORE."\n\r".$data["url"];
$hiddens["message"] = $content;
include XOOPS_ROOT_PATH."/header.php";
if(!empty($_config["module"]) && is_dir(XOOPS_ROOT_PATH."/modules/".$_config["module"])){
$action = XOOPS_URL."/modules/".$_config["module"]."/pmlite.php";
}else{
$action = XOOPS_URL."/pmlite.php?send2=1&to_userid=".$data["uid"];
}
xoops_confirm($hiddens, $action, $_config["title"]);
$GLOBALS["xoopsOption"]['output_type'] = "plain";
include XOOPS_ROOT_PATH."/footer.php";
exit();
}
示例2: deleteResolved
function deleteResolved()
{
global $oAdminButton;
if (!isset($_POST['ok'])) {
xoops_cp_header();
echo $oAdminButton->renderButtons('manFiles');
xoops_confirm(array('op' => 'deleteResolved', 'ok' => 1), XHELP_BASE_URL . '/admin/file.php', _AM_XHELP_MSG_DELETE_RESOLVED);
xoops_cp_footer();
} else {
$hTicket =& xhelpGetHandler('ticket');
$hFile =& xhelpGetHandler('file');
$tickets =& $hTicket->getObjectsByState(1);
// Memory saver - unresolved should be less tickets
$aTickets = array();
foreach ($tickets as $ticket) {
$aTickets[$ticket->getVar('id')] = $ticket->getVar('id');
}
// Retrieve all unresolved ticket attachments
$crit = new CriteriaCompo();
foreach ($aTickets as $ticket) {
$crit->add(new Criteria('ticketid', $ticket, "!="));
}
if ($hFile->deleteAll($crit)) {
header("Location: " . XHELP_ADMIN_URL . "/file.php?op=manageFiles");
} else {
redirect_header(XHELP_ADMIN_URL . "/file.php?op=manageFiles", 3, _XHELP_MESSAGE_DELETE_FILE_ERR);
}
}
}
示例3: transfer_blog
function transfer_blog(&$data)
{
global $xoopsModule, $xoopsConfig, $xoopsUser, $xoopsModuleConfig;
global $xoopsLogger, $xoopsOption, $xoopsTpl, $xoopsblock;
$_config = require(dirname(__FILE__)."/config.php");
$hiddens["art_author"] = $data["author"];
$hiddens["art_title"] = $data["title"];
$hiddens["art_source"] = $data["url"];
$hiddens["text"] = $data["content"];
include XOOPS_ROOT_PATH."/header.php";
xoops_confirm($hiddens, XOOPS_URL."/modules/".$_config["module"]."/action.article.php", $_config["title"]);
$GLOBALS["xoopsOption"]['output_type'] = "plain";
include XOOPS_ROOT_PATH."/footer.php";
exit();
}
示例4: transfer_print
function transfer_print(&$data)
{
global $xoopsModule, $xoopsConfig, $xoopsUser, $xoopsModuleConfig;
global $xoopsLogger, $xoopsOption, $xoopsTpl, $xoopsblock;
$_config = require(dirname(__FILE__)."/config.php");
$post_data["subject"] = $data["title"];
$post_data["author"] = $data["author"];
$post_data["date"] = $data["time"];
$post_data["text"] = $data["content"];
$post_data["url"] = $data["url"];
$hiddens["post_data"] = base64_encode(serialize($post_data));
include XOOPS_ROOT_PATH."/header.php";
xoops_confirm($hiddens, XOOPS_URL."/modules/".$GLOBALS["xoopsModule"]->getVar("dirname")."/print.php", $_config["title"]);
$GLOBALS["xoopsOption"]['output_type'] = "plain";
include XOOPS_ROOT_PATH."/footer.php";
exit();
}
示例5: transfer_wordpress
function transfer_wordpress(&$data)
{
global $xoopsModule, $xoopsConfig, $xoopsUser, $xoopsModuleConfig;
global $xoopsLogger, $xoopsOption, $xoopsTpl, $xoopsblock;
$_config = require(dirname(__FILE__)."/config.php");
$hiddens["action"] = "post";
$hiddens["post_status"] = "draft";
$content = $data["content"] . "<p><a href=\"".$data["url"]."\">"._MORE."</a></p>";
$hiddens["content"] = $content;
$hiddens["post_title"] = $data["title"];
$hiddens["post_author"] = empty($xoopsUser)?0:$xoopsUser->getVar("uid");
//$hiddens["advanced"] = 1;
$hiddens["save"] = 1;
$hiddens["post_from_xoops"] = 1;
include_once XOOPS_ROOT_PATH."/header.php";
xoops_confirm($hiddens, XOOPS_URL."/modules/".$_config["module"]."/wp-admin/post.php", $_config["title"]);
$GLOBALS["xoopsOption"]['output_type'] = "plain";
include_once XOOPS_ROOT_PATH."/footer.php";
exit();
}
示例6: xoops_cp_header
}
}
xoops_cp_header();
echo '<code>';
foreach ($msg as $m) {
echo $m . '<br />';
}
echo '</code><br /><a href="admin.php?fct=tplsets&op=listtpl&tplset=' . $tplset . '&moddir=' . $moddir . '">' . _MD_AM_BTOTADMIN . '</a>';
xoops_cp_footer();
break;
case 'importtpl':
xoops_cp_header();
if (!empty($id)) {
xoops_confirm(array('tplset' => $tplset, 'moddir' => $moddir, 'id' => $id, 'op' => 'importtpl_go', 'fct' => 'tplsets'), 'admin.php', _MD_RUSUREIMPT, _MD_IMPORT);
} elseif (isset($file)) {
xoops_confirm(array('tplset' => $tplset, 'moddir' => $moddir, 'file' => $file, 'op' => 'importtpl_go', 'fct' => 'tplsets'), 'admin.php', _MD_RUSUREIMPT, _MD_IMPORT);
}
xoops_cp_footer();
break;
case 'importtpl_go':
if (!$GLOBALS['xoopsSecurity']->check()) {
redirect_header('admin.php?fct=tplsets', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
}
$tpltpl_handler =& xoops_gethandler('tplfile');
$tplfile = '';
if (!empty($id)) {
$tplfile =& $tpltpl_handler->get($id, true);
} else {
$tplfiles =& $tpltpl_handler->find('default', null, null, null, trim($file), true);
$tplfile = count($tplfiles) > 0 ? $tplfiles[0] : '';
}
示例7: xoops_error
xoops_error(sprintf(_AM_SYSTEM_USERS_NO_ADMINSUPP, $user->getVar("uname")));
} elseif (!$member_handler->deleteUser($user)) {
xoops_error(sprintf(_AM_SYSTEM_USERS_NO_SUPP, $user->getVar("uname")));
} else {
$online_handler =& xoops_gethandler('online');
$online_handler->destroy($uid);
// RMV-NOTIFY
xoops_notification_deletebyuser($uid);
redirect_header("admin.php?fct=users", 1, _AM_SYSTEM_DBUPDATED);
}
} else {
//Assign Breadcrumb menu
$xoBreadCrumb->addHelp(system_adminVersion('users', 'help') . '#delete');
$xoBreadCrumb->addLink(_AM_SYSTEM_USERS_NAV_DELETE_USER);
$xoBreadCrumb->render();
xoops_confirm(array('ok' => 1, 'uid' => $uid, 'op' => 'users_delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_SYSTEM_USERS_FORM_SURE_DEL, $user->getVar('uname')));
}
break;
// Delete users
// Delete users
case "action_group":
if (@isset($_REQUEST['memberslist_id']) || @$_REQUEST['memberslist_id'] != '') {
$xoBreadCrumb->render();
$error = '';
foreach ($_REQUEST['memberslist_id'] as $del) {
$del = intval($del);
$user =& $member_handler->getUser($del);
$groups = $user->getGroups();
if (in_array(XOOPS_GROUP_ADMIN, $groups)) {
$error .= sprintf(_AM_SYSTEM_USERS_NO_ADMINSUPP, $user->getVar("uname"));
} elseif (!$member_handler->deleteUser($user)) {
示例8: redirect_header
if ($cid > 0) {
$obj = $banner_client_Handler->get($cid);
if (isset($_POST['ok']) && $_POST['ok'] == 1) {
if (!$GLOBALS['xoopsSecurity']->check()) {
redirect_header('admin.php?fct=banners', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
if ($banner_client_Handler->delete($obj)) {
// Delete client banners
$banner_Handler->deleteAll(new Criteria('cid', $cid));
$banner_finish_Handler->deleteAll(new Criteria('cid', $cid));
redirect_header('admin.php?fct=banners', 3, _AM_SYSTEM_BANNERS_DBUPDATED);
} else {
xoops_error($obj->getHtmlErrors());
}
} else {
xoops_confirm(array('ok' => 1, 'cid' => $cid, 'op' => 'banner_client_delete'), 'admin.php?fct=banners', _AM_SYSTEM_BANNERS_SUREDELBNR);
}
} else {
redirect_header('admin.php?fct=banners', 1, _AM_SYSTEM_DBERROR);
}
break;
case 'new_banner':
// Form: New Banner
$xoBreadCrumb->addLink(_AM_SYSTEM_BANNERS_NAV_ADDBNR);
$xoBreadCrumb->addHelp(system_adminVersion('banners', 'help') . '#new_banner');
$xoBreadCrumb->addTips(_AM_SYSTEM_BANNERS_NAV_TIPS);
$xoBreadCrumb->render();
$obj = $banner_Handler->create();
$form = $obj->getForm();
$xoopsTpl->assign('form', $form->render());
break;
示例9: delete_block
function delete_block($bid)
{
$myblock = new XoopsBlock($bid);
if ($myblock->getVar('block_type') == 'S') {
$message = _AM_SYSTEMCANT;
redirect_header('admin.php?fct=blocksadmin', 4, $message);
exit;
} elseif ($myblock->getVar('block_type') == 'M') {
// Fix for duplicated blocks created in 2.0.9 module update
// A module block can be deleted if there is more than 1 that
// has the same func_num/show_func which is mostly likely
// be the one that was duplicated in 2.0.9
if (1 >= ($count = XoopsBlock::countSimilarBlocks($myblock->getVar('mid'), $myblock->getVar('func_num'), $myblock->getVar('show_func')))) {
$message = _AM_MODULECANT;
redirect_header('admin.php?fct=blocksadmin', 4, $message);
exit;
}
}
xoops_confirm(array('fct' => 'blocksadmin', 'op' => 'delete_ok', 'bid' => $myblock->getVar('bid')), 'admin.php', sprintf(_AM_RUSUREDEL, $myblock->getVar('title')));
}
示例10: redirect_header
if ($link_handler->insert($link_obj)) {
redirect_header('admin.links.php?sort=' . $sort, 3, $message);
} else {
redirect_header('admin.links.php?sort=' . $sort, 3, _AM_LINKS_ACTIVEERROR);
}
break;
case 'delete':
$link_obj =& $link_handler->get($link_id);
if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) {
if (!$GLOBALS['xoopsSecurity']->check()) {
redirect_header('admin.links.php?sort=' . $sort, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
$link_image = $link_obj->getVar('link_image');
$link_dir = XOOPS_ROOT_PATH . $xoopsModuleConfig['logo_dir'];
if ($link_handler->delete($link_obj)) {
if (!empty($link_image)) {
unlink($link_dir . $link_image);
}
redirect_header('admin.links.php?sort=' . $sort, 3, _AM_LINKS_DELETESUCCESS);
} else {
echo $link_obj->getHtmlErrors();
}
} else {
xoops_confirm(array('ok' => 1, 'link_id' => $link_id, 'sort' => $sort, 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_LINKS_RESUREDELLIK, $link_obj->getVar('link_title')));
}
break;
default:
redirect_header('admin.links.php?sort=' . $sort);
break;
}
include "footer.php";
示例11: xoops_gethandler
$member_handler->deleteGroup($group);
$gperm_handler =& xoops_gethandler('groupperm');
$gperm_handler->deleteByGroup($groups_id);
redirect_header('admin.php?fct=groups', 1, _AM_SYSTEM_GROUPS_DBUPDATED);
} else {
redirect_header('admin.php?fct=groups', 2, _AM_SYSTEM_GROUPS_ERROR_DELETE);
}
} else {
// Define Stylesheet
$xoTheme->addStylesheet(XOOPS_URL . '/modules/system/css/admin.css');
// Define Breadcrumb and tips
$xoBreadCrumb->addLink(_AM_SYSTEM_GROUPS_NAV_DELETE);
$xoBreadCrumb->addHelp(system_adminVersion('groups', 'help') . '#edit');
$xoBreadCrumb->render();
// Display message
xoops_confirm(array("ok" => 1, "groups_id" => $_REQUEST["groups_id"], "op" => "groups_delete"), 'admin.php?fct=groups', sprintf(_AM_SYSTEM_GROUPS_SUREDEL) . '<br \\>' . $obj->getVar("name") . '<br \\>');
}
} else {
redirect_header('admin.php?fct=groups', 1, _AM_SYSTEM_DBERROR);
}
break;
//Add users group
//Add users group
case 'action_group':
$error = true;
if (isset($_REQUEST['edit_group'])) {
if (isset($_REQUEST['edit_group']) && $_REQUEST['edit_group'] == 'add_group' && isset($_REQUEST['selgroups'])) {
foreach ($_REQUEST['memberslist_id'] as $uid) {
$member_handler->addUserToGroup($_REQUEST['selgroups'], $uid);
$error = false;
}
示例12: xoops_gethandler
$config_handler =& xoops_gethandler('config');
$GLOBALS['xoopsConfigUser'] = $config_handler->getConfigsByCat(XOOPS_CONF_USER);
if (!$GLOBALS['xoopsUser'] || $GLOBALS['xoopsConfigUser']['self_delete'] != 1) {
redirect_header(XOOPS_URL . '/', 5, _US_NOPERMISS);
exit;
} else {
$groups = $GLOBALS['xoopsUser']->getGroups();
if (in_array(XOOPS_GROUP_ADMIN, $groups)) {
// users in the webmasters group may not be deleted
redirect_header(XOOPS_URL . '/', 5, _US_ADMINNO);
exit;
}
$ok = !isset($_POST['ok']) ? 0 : intval($_POST['ok']);
if ($ok != 1) {
include $GLOBALS['xoops']->path('header.php');
xoops_confirm(array('op' => 'delete', 'ok' => 1), 'user.php', _US_SURETODEL . '<br/>' . _US_REMOVEINFO);
include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'footer.php';
} else {
$del_uid = $GLOBALS['xoopsUser']->getVar("uid");
$member_handler =& xoops_gethandler('member');
if (false != $member_handler->deleteUser($GLOBALS['xoopsUser'])) {
$online_handler =& xoops_gethandler('online');
$online_handler->destroy($del_uid);
xoops_notification_deletebyuser($del_uid);
redirect_header(XOOPS_URL . '/', 5, _US_BEENDELED);
}
redirect_header(XOOPS_URL . '/', 5, _US_NOPERMISS);
}
exit;
}
}
示例13: isset
$id = isset($_GET['id']) ? intval($_GET['id']) : $id;
$clientObj = new SmartclientClient($id);
$confirm = isset($_POST['confirm']) ? $_POST['confirm'] : 0;
$title = isset($_POST['title']) ? $_POST['title'] : '';
if ($confirm) {
if (!$client_handler->delete($clientObj)) {
redirect_header("client.php", 2, _AM_SCLIENT_CLIENT_DELETE_ERROR);
exit;
}
redirect_header("client.php", 2, sprintf(_AM_SCLIENT_CLIENT_DELETE_SUCCESS, $clientObj->title()));
exit;
} else {
// no confirm: show deletion condition
$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
xoops_cp_header();
xoops_confirm(array('op' => 'del', 'id' => $clientObj->id(), 'confirm' => 1, 'name' => $clientObj->title()), 'client.php', _AM_SCLIENT_DELETETHISP . " <br />'" . $clientObj->title() . "' <br /> <br />", _AM_SCLIENT_DELETE);
xoops_cp_footer();
}
exit;
break;
case "default":
default:
xoops_cp_header();
smartclient_adminMenu(1, _AM_SCLIENT_CLIENTS);
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModuleConfig, $xoopsModule;
echo "<br />\n";
smartclient_collapsableBar('toptable', 'toptableicon');
echo "<img id='toptableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/close12.gif alt='' /></a> " . _AM_SCLIENT_ACTIVE_CLIENTS . "</h3>";
echo "<div id='toptable'>";
示例14: intval
$uid = intval($HTTP_GET_VARS['uid']);
}
}
switch ($op) {
case "modifyUser":
modifyUser($uid);
break;
case "updateUser":
// RMV-NOTIFY
updateUser($uid, $uname, $name, $url, $email, $user_icq, $user_aim, $user_yim, $user_msnm, $user_from, $user_occ, $user_intrest, $user_viewemail, $user_avatar, $user_sig, $attachsig, $theme, $pass, $pass2, $rank, $bio, $uorder, $umode, $notify_method, $notify_mode, $timezone_offset, $user_mailok);
break;
case "delUser":
xoops_cp_header();
$member_handler =& xoops_gethandler('member');
$userdata =& $member_handler->getUser($uid);
xoops_confirm(array('fct' => 'users', 'op' => 'delUserConf', 'del_uid' => $userdata->getVar('uid')), 'admin.php', sprintf(_AM_AYSYWTDU, $userdata->getVar('uname')));
xoops_cp_footer();
break;
case "delete_many":
xoops_cp_header();
$count = count($memberslist_id);
if ($count > 0) {
$list = "<a href='" . XOOPS_URL . "/userinfo.php?uid=" . $memberslist_id[0] . "' target='_blank'>" . $memberslist_uname[$memberslist_id[0]] . "</a>";
$hidden = "<input type='hidden' name='memberslist_id[]' value='" . $memberslist_id[0] . "' />\n";
for ($i = 1; $i < $count; $i++) {
$list .= ", <a href='" . XOOPS_URL . "/userinfo.php?uid=" . $memberslist_id[$i] . "' target='_blank'>" . $memberslist_uname[$memberslist_id[$i]] . "</a>";
$hidden .= "<input type='hidden' name='memberslist_id[]' value='" . $memberslist_id[$i] . "' />\n";
}
echo "<div><h4>" . sprintf(_AM_AYSYWTDU, " " . $list . " ") . "</h4>";
echo _AM_BYTHIS . "<br /><br />\r\n\t\t<form action='admin.php' method='post'>\r\n\t\t<input type='hidden' name='fct' value='users' />\r\n\t\t<input type='hidden' name='op' value='delete_many_ok' />\r\n\t\t<input type='submit' value='" . _YES . "' />\r\n\t\t<input type='button' value='" . _NO . "' onclick='javascript:location.href=\"admin.php?op=adminMain\"' />";
echo $hidden;
示例15: isset
$faqid = isset($_GET['faqid']) ? intval($_GET['faqid']) : $faqid;
$faqObj = new sfFaq($faqid);
$confirm = isset($_POST['confirm']) ? $_POST['confirm'] : 0;
$question = isset($_POST['question']) ? $_POST['question'] : '';
if ($confirm) {
if (!$faq_handler->delete($faqObj)) {
redirect_header("question.php", 2, _AM_SF_FAQ_DELETE_ERROR);
exit;
}
redirect_header("question.php", 2, sprintf(_AM_SF_QUESTIONISDELETED, $faqObj->question()));
exit;
} else {
// no confirm: show deletion condition
$faqid = isset($_GET['faqid']) ? intval($_GET['faqid']) : 0;
xoops_cp_header();
xoops_confirm(array('op' => 'del', 'faqid' => $faqObj->faqid(), 'confirm' => 1, 'name' => $faqObj->question()), 'question.php', _AM_SF_DELETETHISQUESTION . " <br />'" . $faqObj->question() . "'. <br /> <br />", _AM_SF_DELETE);
xoops_cp_footer();
}
exit;
break;
case "default":
default:
xoops_cp_header();
sf_adminMenu(3, _AM_SF_OPEN_QUESTIONS);
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModuleConfig, $xoopsModule;
echo "<br />\n";
sf_collapsableBar('toptable', 'toptableicon');
echo "<img id='toptableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/close12.gif alt='' /></a> " . _AM_SF_OPENED_TITLE . "</h3>";
echo "<div id='toptable'>";