本文整理汇总了PHP中xoops_confirm函数的典型用法代码示例。如果您正苦于以下问题:PHP xoops_confirm函数的具体用法?PHP xoops_confirm怎么用?PHP xoops_confirm使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xoops_confirm函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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();
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:26,代码来源:index.php
示例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);
}
}
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:29,代码来源:file.php
示例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();
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:18,代码来源:index.php
示例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();
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:21,代码来源:index.php
示例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();
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:24,代码来源:index.php
示例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] : '';
}
开发者ID:BackupTheBerlios,项目名称:xoops4-svn,代码行数:31,代码来源:main.php
示例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)) {
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:31,代码来源:main.php
示例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;
开发者ID:geekwright,项目名称:XoopsCore25,代码行数:31,代码来源:main.php
示例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')));
}
开发者ID:gauravsaxena21,项目名称:simantz,代码行数:20,代码来源:blocksadmin.php
示例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";
开发者ID:yunsite,项目名称:xoopsdc,代码行数:31,代码来源:action.links.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;
}
开发者ID:RanLee,项目名称:Xoops_demo,代码行数:31,代码来源:main.php
示例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;
}
}
开发者ID:gauravsaxena21,项目名称:simantz,代码行数:31,代码来源:index.php
示例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'>";
开发者ID:trabisdementia,项目名称:xuups,代码行数:31,代码来源:client.php
示例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;
开发者ID:amjadtbssm,项目名称:website,代码行数:31,代码来源:main.php
示例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'>";
开发者ID:trabisdementia,项目名称:xuups,代码行数:31,代码来源:question.php
示例16: delCat
function delCat()
{
global $xoopsDB, $eh, $mytree, $xoopsModule;
$cid = isset($_POST['cid']) ? intval($_POST['cid']) : intval($_GET['cid']);
$ok = isset($_POST['ok']) ? intval($_POST['ok']) : 0;
if ($ok == 1) {
//get all subcategories under the specified category
$arr = $mytree->getAllChildId($cid);
$dcount = count($arr);
for ($i = 0; $i < $dcount; $i++) {
//get all links in each subcategory
$result = $xoopsDB->query("select lid from " . $xoopsDB->prefix("mylinks_links") . " where cid=" . $arr[$i] . "") or $eh->show("0013");
//now for each link, delete the text data and vote ata associated with the link
while (list($lid) = $xoopsDB->fetchRow($result)) {
$sql = sprintf("DELETE FROM %s WHERE lid = %u", $xoopsDB->prefix("mylinks_text"), $lid);
$xoopsDB->query($sql) or $eh->show("0013");
$sql = sprintf("DELETE FROM %s WHERE lid = %u", $xoopsDB->prefix("mylinks_votedata"), $lid);
$xoopsDB->query($sql) or $eh->show("0013");
$sql = sprintf("DELETE FROM %s WHERE lid = %u", $xoopsDB->prefix("mylinks_links"), $lid);
$xoopsDB->query($sql) or $eh->show("0013");
xoops_comment_delete($xoopsModule->getVar('mid'), $lid);
xoops_notification_deletebyitem($xoopsModule->getVar('mid'), 'link', $lid);
}
xoops_notification_deletebyitem($xoopsModule->getVar('mid'), 'category', $arr[$i]);
//all links for each subcategory is deleted, now delete the subcategory data
$sql = sprintf("DELETE FROM %s WHERE cid = %u", $xoopsDB->prefix("mylinks_cat"), $arr[$i]);
$xoopsDB->query($sql) or $eh->show("0013");
}
//all subcategory and associated data are deleted, now delete category data and its associated data
$result = $xoopsDB->query("select lid from " . $xoopsDB->prefix("mylinks_links") . " where cid=" . $cid . "") or $eh->show("0013");
while (list($lid) = $xoopsDB->fetchRow($result)) {
$sql = sprintf("DELETE FROM %s WHERE lid = %u", $xoopsDB->prefix("mylinks_links"), $lid);
$xoopsDB->query($sql) or $eh->show("0013");
$sql = sprintf("DELETE FROM %s WHERE lid = %u", $xoopsDB->prefix("mylinks_text"), $lid);
$xoopsDB->query($sql) or $eh->show("0013");
$sql = sprintf("DELETE FROM %s WHERE lid = %u", $xoopsDB->prefix("mylinks_votedata"), $lid);
$xoopsDB->query($sql) or $eh->show("0013");
// delete comments
xoops_comment_delete($xoopsModule->getVar('mid'), $lid);
// delete notifications
xoops_notification_deletebyitem($xoopsModule->getVar('mid'), 'link', $lid);
}
$sql = sprintf("DELETE FROM %s WHERE cid = %u", $xoopsDB->prefix("mylinks_cat"), $cid);
$xoopsDB->query($sql) or $eh->show("0013");
xoops_notification_deletebyitem($xoopsModule->getVar('mid'), 'category', $cid);
redirect_header("index.php", 1, _MD_CATDELETED);
exit;
} else {
xoops_cp_header();
xoops_confirm(array('op' => 'delCat', 'cid' => $cid, 'ok' => 1), 'index.php', _MD_WARNING);
xoops_cp_footer();
}
}
开发者ID:koki-h,项目名称:xoops_utf8,代码行数:53,代码来源:index.php
示例17: elseif
}
}
if ($_POST['op'] == 'save') {
$xoopsTpl->assign('msg', _PM_UNSAVED);
} elseif (isset($total_save) && !$xoopsUser->isAdmin()) {
$xoopsTpl->assign('msg', sprintf(_PM_SAVED_PART, $xoopsModuleConfig['max_save'], $i));
} else {
$xoopsTpl->assign('msg', _PM_SAVED_ALL);
}
}
}
if (isset($_REQUEST['empty_messages'])) {
if (!$GLOBALS['xoopsSecurity']->check()) {
$xoopsTpl->assign('errormsg', implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
} elseif (empty($_REQUEST['ok'])) {
xoops_confirm(array('ok' => 1, 'empty_messages' => 1, 'op' => $_REQUEST['op']), $_SERVER['REQUEST_URI'], _PM_RUSUREEMPTY);
include XOOPS_ROOT_PATH . "/footer.php";
exit;
} else {
if ($_POST['op'] == 'save') {
$crit_to = new CriteriaCompo(new Criteria('to_delete', 0));
$crit_to->add(new Criteria('to_save', 1));
$crit_to->add(new Criteria('to_userid', $xoopsUser->getVar('uid')));
$crit_from = new CriteriaCompo(new Criteria('from_delete', 0));
$crit_from->add(new Criteria('from_save', 1));
$crit_from->add(new Criteria('from_userid', $xoopsUser->getVar('uid')));
$criteria = new CriteriaCompo($crit_to);
$criteria->add($crit_from, "OR");
} elseif ($_POST['op'] == 'out') {
$criteria = new CriteriaCompo(new Criteria('from_delete', 0));
$criteria->add(new Criteria('from_userid', $xoopsUser->getVar('uid')));
开发者ID:BackupTheBerlios,项目名称:xoops4-svn,代码行数:31,代码来源:viewpmsg.php
示例18: xoops_cp_header
exit;
}
if ($op == 'delete') {
xoops_cp_header();
// delete_block($bid); GIJ imported from blocksadmin.php
$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') {
$message = _AM_MODULECANT;
redirect_header('admin.php?fct=blocksadmin', 4, $message);
exit;
} else {
xoops_confirm(array('fct' => 'blocksadmin', 'op' => 'delete_ok', 'bid' => $myblock->getVar('bid')) + $xoopsGTicket->getTicketArray(__LINE__, 1800, 'myblocksadmin'), 'admin.php', sprintf(_AM_RUSUREDEL, $myblock->getVar('title')));
}
// end of delete_block() GIJ
xoops_cp_footer();
exit;
}
if ($op == 'edit') {
xoops_cp_header();
// edit_block($bid); GIJ imported from blocksadmin.php
$myblock = new XoopsBlock($bid);
$db =& Database::getInstance();
$sql = 'SELECT module_id FROM ' . $db->prefix('block_module_link') . ' WHERE block_id=' . intval($bid);
$result = $db->query($sql);
$modules = array();
while ($row = $db->fetchArray($result)) {
$modules[] = intval($row['module_id']);
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:31,代码来源:blocksadmin.inc.php
示例19: redirect_header
redirect_header('admin.greenep.php', 3, _AM_CATALOG_ACTIVSUCCESS);
} else {
redirect_header('admin.greenep.php', 3, _AM_CATALOG_ACTIVEERROR);
}
break;
case "delete":
$greenep_obj =& $greenep_handler->get($greenep_id);
$greenep_logo = $greenep_obj->getVar('greenep_logo');
$logo_dir = XOOPS_ROOT_PATH . "/uploads/";
if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) {
if (!$GLOBALS['xoopsSecurity']->check()) {
redirect_header('admin.greenep.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
$criteria = new Criteria('greenep_id', $greenep_id);
if ($item_handler->getCount($criteria) > 0) {
redirect_header('admin.greenep.php', 3, _AM_CATALOG_DELETEGREENTIPS);
}
if ($greenep_handler->delete($greenep_obj)) {
if ($greenep_logo) {
unlink($logo_dir . $greenep_logo);
}
redirect_header('admin.greenep.php', 3, _AM_CATALOG_DELETESUCCESS);
} else {
echo $greenep_obj->getHtmlErrors();
}
} else {
xoops_confirm(array('ok' => 1, 'id' => $greenep_id, 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_CATALOG_RESUREDELIT, $greenep_obj->getVar('greenep_rank')));
}
break;
}
include 'footer.php';
开发者ID:RanLee,项目名称:Xoops_demo,代码行数:31,代码来源:admin.greenep.php
示例20: explode
$version_array = explode(".", $_POST['version']);
if (!isset($version_array[2])) {
$version_array[2] = 0;
}
include_once XOOPS_ROOT_PATH . "/header.php";
xoops_confirm(array('op' => 'delversions', 'submit' => 1, 'ok' => 1, 'storyid' => $_POST['storyid'], 'version' => $version_array[0], 'revision' => $version_array[1], 'revisionminor' => $version_array[2]), 'versions.php', _AMS_NW_RUSUREDELVERSIONS);
}
break;
case "delallversions":
$story = new AmsStory(intval($_POST['storyid']));
$gperm_handler =& xoops_gethandler('groupperm');
if (!$xoopsUser || !$gperm_handler->checkRight("ams_approve", $story->topicid(), $xoopsUser->getGroups(), $xoopsModule->mid())) {
redirect_header(XOOPS_URL . '/modules/AMS/article.php?storyid=' . $story->storyid, 3, _NOPERM);
exit;
}
if (!empty($_POST['ok'])) {
include_once XOOPS_ROOT_PATH . "/header.php";
$story->delallversions($_POST['version'], $_POST['revision'], $_POST['revisionminor']);
redirect_header(XOOPS_URL . '/modules/AMS/article.php?storyid=' . $story->storyid, 3, sprintf(_AMS_NW_VERSIONUPDATED, $_POST['version'] . "." . $_POST['revision'] . "." . $_POST['revisionminor']));
} else {
$version_array = explode(".", $_POST['version']);
if (!isset($version_array[2])) {
$version_array[2] = 0;
}
include_once XOOPS_ROOT_PATH . "/header.php";
xoops_confirm(array('op' => 'delallversions', 'submit' => 1, 'ok' => 1, 'storyid' => $_POST['storyid'], 'version' => $version_array[0], 'revision' => $version_array[1], 'revisionminor' => $version_array[2]), 'versions.php', _AMS_NW_RUSUREDELALLVERSIONS);
}
break;
}
}
include '../../footer.php';
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:versions.php
注:本文中的xoops_confirm函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论