本文整理汇总了PHP中deleteUser函数的典型用法代码示例。如果您正苦于以下问题:PHP deleteUser函数的具体用法?PHP deleteUser怎么用?PHP deleteUser使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了deleteUser函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process
function process($form_data)
{
include "Helper.php";
// pretty_print_array($form_data);
$a = session_id();
include "connect.php";
$conn = init($_SESSION["permission_type"]);
$result = array();
if (isset($form_data["transportoffer---relation"])) {
$result = deleteTransportOffer($form_data, $conn);
} else {
if (isset($form_data["user---relation"])) {
$result = deleteUser($form_data, $conn);
} else {
if (isset($form_data["contract---relation"])) {
$result = deleteContract($form_data, $conn);
} else {
if (isset($form_data["market---relation"])) {
$result = deleteMarket($form_data, $conn);
} else {
if (isset($form_data["transportoffer---relation"])) {
$result = deleteTransportOffer($form_data, $conn);
} else {
if (isset($form_data["immigrants---relation"])) {
$result = deleteImigrants($form_data, $conn);
} else {
if (isset($form_data["product---relation"])) {
$result = deleteProduct($form_data, $conn);
} else {
if (isset($form_data["transportcompany---relation"])) {
$result = deleteTransportCompany($form_data, $conn);
} else {
if (isset($form_data["flavour---relation"])) {
$result = deleteTaste($form_data, $conn);
} else {
if (isset($form_data["storagetype---relation"])) {
$result = deleteStoragetype($form_data, $conn);
} else {
if (isset($form_data["country---relation"])) {
$result = deleteCountry($form_data, $conn);
}
}
}
}
}
}
}
}
}
}
}
if ($result["error"] == "") {
$returnedData = $conn->query($result["data"]);
}
if ($conn->connect_errno) {
$result["error"] = $conn->connect_error;
}
$result["data"] = "";
echo json_encode($result);
}
示例2: processRequest
/**
* This file is a part of MyWebSQL package
*
* @file: modules/usermanager.php
* @author Samnan ur Rehman
* @copyright (c) 2008-2014 Samnan ur Rehman
* @web http://mywebsql.net
* @license http://mywebsql.net/license
*/
function processRequest(&$db)
{
$action = v($_REQUEST["id"]);
include BASE_PATH . "/lib/usermanager.php";
$legacyServer = Session::get('db', 'version') < 5;
$editor = new userManager($db, $legacyServer);
$message = '';
if ($action != '') {
if ($action == "add") {
$result = addUser($db, v($_REQUEST["query"]), $editor);
} else {
if ($action == "delete") {
$result = deleteUser($db, v($_REQUEST["query"]), $editor);
} else {
if ($action == "update") {
$result = updateUser($db, v($_REQUEST["query"]), $editor);
}
}
}
if ($result) {
$db->flush('PRIVILEGES', true);
$message = __('The command executed successfully');
} else {
$message = __('Error occurred while executing the query');
}
}
displayUserForm($db, $editor, $message, $action);
}
示例3: _moduleContent
function _moduleContent(&$smarty, $module_name)
{
include_once "libs/paloSantoGrid.class.php";
include_once "libs/paloSantoForm.class.php";
include_once "libs/paloSantoOrganization.class.php";
//folder path for custom templates
$local_templates_dir = getWebDirModule($module_name);
//conexion resource
$pDB = new paloDB($arrConf['elastix_dsn']["elastix"]);
global $arrCredentials;
$action = getAction();
$content = "";
switch ($action) {
case "new_user":
$content = viewFormUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
break;
case "view":
$content = viewFormUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
break;
case "edit":
$content = viewFormUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
break;
case "save_new":
$content = saveNewUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
break;
case "save_edit":
$content = saveEditUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
break;
case "delete":
$content = deleteUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
break;
case "getGroups":
$content = getGroups($pDB, $arrCredentials);
break;
case "getImage":
$content = getImage($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
break;
case "reloadAasterisk":
$content = reloadAasterisk($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
break;
case "reconstruct_mailbox":
$content = reconstruct_mailbox($pDB, $arrConf, $arrCredentials);
break;
/*case "changes_email_quota":
$content = changes_email_quota($smarty, $module_name, $pDB, $arrConf, $arrCredentials);
break;*/
/*case "changes_email_quota":
$content = changes_email_quota($smarty, $module_name, $pDB, $arrConf, $arrCredentials);
break;*/
default:
// report
$content = reportUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
break;
}
return $content;
}
示例4: option
function option()
{
if (isset($_POST['nom']) && !empty($_POST['nom']) && isset($_POST['email']) && !empty($_POST['email']) && isset($_POST['prenom']) && !empty($_POST['prenom']) && isset($_POST['pwd1']) && !empty($_POST['pwd1']) && isset($_POST['pwd2']) && !empty($_POST['pwd2'])) {
deleteUser($_SESSION['uid']);
saveUser($_POST['nom'], $_POST['prenom'], $_POST['pwd1'], $_POST['email'], $_SESSION['utype'], '../Ressources/Photo/face.jpg');
deconnecter();
} else {
echo '<script type="text/javascript">', 'document.location.replace("../View/Options.php);', '</script>';
exit;
}
}
示例5: commandRouter
function commandRouter($action)
{
switch ($action) {
case 'login':
loginUser();
break;
case 'createUser':
createUser();
break;
case 'getUser':
getUser();
break;
case 'deleteUser':
deleteUser();
break;
case 'updateUser':
updateUser();
break;
case 'addTab':
addTab();
break;
case 'delTab':
delTab();
break;
case 'editTab':
editTab();
break;
case 'getTabs':
getTabs();
break;
case 'addNote':
addNote();
break;
case 'delNote':
delNote();
break;
case 'editNote':
editNote();
break;
case 'getNotes':
getNotes();
break;
default:
break;
}
}
示例6: commandRouter
function commandRouter($action)
{
switch ($action) {
case 'login':
loginUser();
break;
case 'createUser':
createUser();
break;
case 'getUser':
getUser();
break;
case 'deleteUser':
deleteUser();
break;
case 'updateUser':
updateUser();
break;
case 'addInv':
addToInv();
break;
case 'subInv':
subFromInv();
break;
case 'getInv':
getInventory();
break;
case 'getDecks':
getDecks();
break;
case 'createDeck':
createDeck();
break;
case 'updateDeck':
updateDeck();
break;
case 'deleteDeck':
deleteDeck();
break;
default:
break;
}
}
示例7: mergeUsers
function mergeUsers($original, $duplicate)
{
set_time_limit(60);
print '<br/>Merging ' . $duplicate . ' into ' . $original;
$umreq = Sql_Query(sprintf('select * from %s where userid = %d', $GLOBALS["tables"]["usermessage"], $duplicate));
while ($um = Sql_Fetch_Array($umreq)) {
Sql_Query(sprintf('update %s set userid = %d, entered = "%s" where userid = %d and entered = "%s"', $GLOBALS["tables"]["usermessage"], $original, $um["entered"], $duplicate, $um["entered"]), 1);
}
$bncreq = Sql_Query(sprintf('select * from %s where user = %d', $GLOBALS["tables"]["user_message_bounce"], $duplicate));
while ($bnc = Sql_Fetch_Array($bncreq)) {
Sql_Query(sprintf('update %s set user = %d, time = "%s" where user = %d and time = "%s"', $GLOBALS["tables"]["user_message_bounce"], $original, $bnc["time"], $duplicate, $bnc["time"]), 1);
}
$listreq = Sql_Query(sprintf('select * from %s where userid = %d', $GLOBALS["tables"]["listuser"], $duplicate));
while ($list = Sql_Fetch_Array($listreq)) {
Sql_Query(sprintf('update %s set userid = %d, entered = "%s" where userid = %d and entered = "%s" and listid = %d', $GLOBALS["tables"]["listuser"], $original, $list["entered"], $duplicate, $list["entered"], $list['listid']), 1);
}
Sql_Query(sprintf('delete from %s where userid = %d', $GLOBALS["tables"]["listuser"], $duplicate));
Sql_Query(sprintf('delete from %s where user = %d', $GLOBALS["tables"]["user_message_bounce"], $duplicate));
Sql_Query(sprintf('delete from %s where userid = %d', $GLOBALS["tables"]["usermessage"], $duplicate));
# if (MERGE_DUPLICATES_DELETE_DUPLICATE) {
deleteUser($duplicate);
# }
flush();
}
示例8: checkUser
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
// $Id: editUser.php,v 1.7 2006/01/29 08:15:18 atrommer Exp $
checkUser($_SESSION['USERTYPE'], 2);
//if (!$_REQUEST['u_id'] && !$_REQUEST['action']){
// accessDenied("Please choose an employee first!");
//}
doHeader("Edit User");
// first we check if we're doing an update
// or a delete
if ($_REQUEST['action'] == 'del') {
deleteConfirm();
} elseif ($_POST['confirmDelete']) {
deleteUser($_POST['hdUserID']);
print "User deactivated sucessfully!";
} else {
editUserForm();
}
function deleteConfirm()
{
$aUserVals = getUserVals($_REQUEST['u_id']);
?>
<form id="frmDelete" name="frmDelete" method="post" action="<?php
echo $_SERVER['PHP_SELF'];
?>
">
<input type="hidden" name="hdUserID" value="<?php
echo $_REQUEST['u_id'];
?>
示例9: session_start
<?php
if (!isset($_SESSION)) {
session_start();
}
if (!(isset($_SESSION['login']) || isset($_SESSION['password']))) {
header('Location: ../index.php');
exit;
}
require_once '../modeles/modele_baseadmin.php';
if (isset($_POST['email'])) {
$email = $_POST['email'];
try {
$stmt = deleteUser($email);
//echo $email;
//exit();
header('Location: ../vues/vue_interface_admin.php?error=deletesuccessful');
exit;
} catch (PDOException $e) {
header('Location: ../vues/vue_interface_admin.php?error=errordelete');
exit;
}
}
header('Location: ../vues/vue_interface_admin.php?error=errordelete');
exit;
示例10: clearOutOldChatPrefs
function clearOutOldChatPrefs()
{
/* Clear out old user names */
$now = time();
$return = '';
if ($dir = @opendir(AT_CONTENT_DIR . 'chat/' . $_SESSION['course_id'] . '/users/')) {
while (($file = readdir($dir)) !== false) {
if (substr($file, -strlen('.prefs')) == '.prefs') {
$chatName = substr($file, 0, -strlen('.prefs'));
$la = @stat(AT_CONTENT_DIR . 'chat/' . $_SESSION['course_id'] . '/users/' . $file);
$la = $la['mtime'];
if ($admin['chatIDLifeSpan'] && $now - $la > $admin['chatIDLifeSpan']) {
$return .= 'Automated Clean Up: Deleting old Chat ID ' . $chatName . '<br />';
deleteUser($chatName);
}
}
}
}
return $return;
}
示例11: COM_applyFilter
$mode = 'batchdeleteexec';
}
if (isset($_REQUEST['order'])) {
$order = COM_applyFilter($_REQUEST['order'], true);
}
if (isset($_GET['direction'])) {
$direction = COM_applyFilter($_GET['direction']);
}
if ($mode == $LANG_ADMIN['delete'] && !empty($LANG_ADMIN['delete'])) {
// delete
$uid = COM_applyFilter($_POST['uid'], true);
if ($uid <= 1) {
COM_errorLog('Attempted to delete user uid=' . $uid);
$display = COM_refresh($_CONF['site_admin_url'] . '/user.php');
} elseif (SEC_checkToken()) {
$display .= deleteUser($uid);
} else {
COM_accessLog("User {$_USER['username']} tried to illegally delete user {$uid} and failed CSRF checks.");
echo COM_refresh($_CONF['site_admin_url'] . '/index.php');
exit;
}
} elseif ($mode == $LANG_ADMIN['save'] && !empty($LANG_ADMIN['save']) && SEC_checkToken()) {
// save
$delphoto = '';
if (isset($_POST['delete_photo'])) {
$delphoto = $_POST['delete_photo'];
}
if (!isset($_POST['oldstatus'])) {
$_POST['oldstatus'] = USER_ACCOUNT_ACTIVE;
}
if (!isset($_POST['userstatus'])) {
示例12: mail
$message = 'Reset Password';
mail($to, $subject, $message);
header('Location: /users.php');
}
//Delete user
if ($_POST['action'] == 'delete') {
deleteUser($_POST['userid']);
header('Location: /users.php');
}
//Apply Bulk Action
if ($_POST['action'] == 'applyBulk') {
//Delete
if ($_POST['bulkAction'] == 'delete') {
foreach ($_POST['chk'] as $thisUser) {
echo $thisUser;
deleteUser($thisUser);
}
header('Location: /users.php');
}
}
//Add User
if ($_POST['action'] == 'addUser') {
$result = addUser($_POST['username'], $_POST['email'], $_POST['password'], $_POST['avatar'], $_POST['steamid']);
if ($result == FALSE) {
//Couldn't add user
echo 'nope';
} else {
//Add User
header('Location: /users.php');
}
}
示例13: logEvent
break;
case 'unconfirmuser':
logEvent('User ' . $userdata['email'] . ' unconfirmed by bounce rule ' . PageLink2('bouncerule&id=' . $rule['id'], $rule['id']));
Sql_Query(sprintf('update %s set confirmed = 0 where id = %d', $GLOBALS['tables']['user'], $row['user']));
$advanced_report .= 'User ' . $userdata['email'] . ' made unconfirmed by bounce rule ' . $rule['id'] . "\n";
$advanced_report .= 'User: ' . $report_linkroot . '/?page=user&id=' . $userdata['id'] . "\n";
$advanced_report .= 'Rule: ' . $report_linkroot . '/?page=bouncerule&id=' . $rule['id'] . "\n";
addUserHistory($userdata['email'], s('Auto Unconfirmed'), s('Subscriber auto unconfirmed for') . " " . s('bounce rule') . ' ' . $rule['id']);
addSubscriberStatistics('auto unsubscribe', 1);
break;
case 'deleteuserandbounce':
logEvent('User ' . $userdata['email'] . ' deleted by bounce rule ' . PageLink2('bouncerule&id=' . $rule['id'], $rule['id']));
$advanced_report .= 'User ' . $userdata['email'] . ' deleted by bounce rule ' . $rule['id'] . "\n";
$advanced_report .= 'User: ' . $report_linkroot . '/?page=user&id=' . $userdata['id'] . "\n";
$advanced_report .= 'Rule: ' . $report_linkroot . '/?page=bouncerule&id=' . $rule['id'] . "\n";
deleteUser($row['user']);
deleteBounce($row['bounce']);
break;
case 'unconfirmuseranddeletebounce':
logEvent('User ' . $userdata['email'] . ' unconfirmed by bounce rule ' . PageLink2('bouncerule&id=' . $rule['id'], $rule['id']));
Sql_Query(sprintf('update %s set confirmed = 0 where id = %d', $GLOBALS['tables']['user'], $row['user']));
$advanced_report .= 'User ' . $userdata['email'] . ' made unconfirmed by bounce rule ' . $rule['id'] . "\n";
$advanced_report .= 'User: ' . $report_linkroot . '/?page=user&id=' . $userdata['id'] . "\n";
$advanced_report .= 'Rule: ' . $report_linkroot . '/?page=bouncerule&id=' . $rule['id'] . "\n";
addUserHistory($userdata['email'], s('Auto unconfirmed'), s('Subscriber auto unconfirmed for') . " " . $GLOBALS['I18N']->get("bounce rule") . ' ' . $rule['id']);
addSubscriberStatistics('auto unsubscribe', 1);
deleteBounce($row['bounce']);
break;
case 'blacklistuser':
logEvent('User ' . $userdata['email'] . ' blacklisted by bounce rule ' . PageLink2('bouncerule&id=' . $rule['id'], $rule['id']));
addUserToBlacklist($userdata['email'], s('Subscriber auto blacklisted by bounce rule', $rule['id']));
示例14: clearOutOldChatPrefs
}
}
}
} else {
if ($_GET['function'] == 'clearOldChatIDs') {
$return = clearOutOldChatPrefs();
} else {
if ($_POST['submit3']) {
deleteUser($_POST['delName']);
} else {
if ($_POST['submit4']) {
if ($dir = @opendir(AT_CONTENT_DIR . 'chat/' . $_SESSION['course_id'] . '/users/')) {
while (($file = readdir($dir)) !== false) {
if (substr($file, -strlen('.prefs')) == '.prefs') {
$chatName = substr($file, 0, -strlen('.prefs'));
deleteUser($chatName);
}
}
}
}
}
}
}
}
//check chat directory
if (!@opendir(AT_CONTENT_DIR . 'chat/')) {
mkdir(AT_CONTENT_DIR . 'chat/', 0777);
}
if (!file_exists(AT_CONTENT_DIR . 'chat/' . $_SESSION['course_id'] . '/admin.settings')) {
@mkdir(AT_CONTENT_DIR . 'chat/' . $_SESSION['course_id'], 0777);
@mkdir(AT_CONTENT_DIR . 'chat/' . $_SESSION['course_id'] . '/tran/', 0776);
示例15: header
<?php
include "adminapi.php";
$id = $_GET['id'];
if (!isset($_POST["id"])) {
if (!isset($_GET["id"])) {
return header("Location: index.php");
}
} else {
$rs = deleteUser($id);
echo "deleting user";
if ($rs == true) {
header("Location: index.php");
}
}
$form = findUserById($id);
$pageTitle = "Deleting User: {$form['name']}";
$pageInfo = "";
$submitPage = $_SERVER["REQUEST_URI"];
$submitLabel = "Delete User";
?>
<?php
include 'header.php';
?>
<body id="edit_user" class="users">
<?php
make_navbar('Users');
?>
<div id="body" class="wrap">