本文整理汇总了PHP中cs_sql_delete函数的典型用法代码示例。如果您正苦于以下问题:PHP cs_sql_delete函数的具体用法?PHP cs_sql_delete怎么用?PHP cs_sql_delete使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cs_sql_delete函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cs_pictures_upload
function cs_pictures_upload($file, $mod, $fid, $ajaxclean = 1)
{
if (!empty($_POST['del_picture'])) {
cs_pictures_delete($_POST['del_picture']);
}
if (empty($file['tmp_name'])) {
return true;
}
settype($fid, 'integer');
$types_allowed = array('image/jpeg', 'image/png', 'image/pjpeg', 'image/x-png');
if (!in_array($file['type'], $types_allowed)) {
return false;
}
$exts = array('image/jpeg' => 'jpg', 'image/png' => 'png', 'image/pjpeg' => 'jpg', 'image/x-png' => 'png');
$ext = $exts[$file['type']];
$where = "pictures_fid = '" . $fid . "' AND pictures_mod = '" . $mod . "'";
$already = cs_sql_select(__FILE__, 'pictures', 'pictures_id', $where);
$pictures_id = $already['pictures_id'];
if (empty($already)) {
$vars = array();
$vars['pictures_mod'] = $mod;
$vars['pictures_fid'] = $fid;
cs_sql_insert(__FILE__, 'pictures', array_keys($vars), array_values($vars));
$pictures_id = cs_sql_insertid(__FILE__);
}
if (!cs_upload('pictures', 'picture-' . $pictures_id . '.' . $ext, $file['tmp_name'], $ajaxclean)) {
cs_sql_delete(__FILE__, 'pictures', $pictures_id);
return false;
}
$cells = array('pictures_file');
$content = array('picture-' . $pictures_id . '.' . $ext);
cs_sql_update(__FILE__, 'pictures', $cells, $content, $pictures_id);
return true;
}
示例2: cs_captchacheck
function cs_captchacheck($input, $mini = 0)
{
if (!extension_loaded('gd')) {
return true;
}
$ip = cs_getip();
$timeout = cs_time() - 900;
$string = empty($mini) ? cs_sql_escape($input) : 'mini_' . cs_sql_escape($input);
$cond = 'captcha_ip = \'' . cs_sql_escape($ip) . '\' AND ';
$cond .= 'captcha_time > \'' . $timeout . '\' AND ';
$cond .= 'captcha_string = \'' . $string . '\'';
$hash_db = cs_sql_select(__FILE__, 'captcha', 'captcha_id', $cond);
if (empty($hash_db)) {
return false;
}
cs_sql_delete(__FILE__, 'captcha', $hash_db['captcha_id']);
return true;
}
示例3: cs_translate
<?php
// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('quotes');
$cs_get = cs_get('id');
$cs_post = cs_post('id');
$quotes_id = empty($cs_get['id']) ? $cs_post['id'] : $cs_get['id'];
if (isset($cs_post['agree'])) {
cs_sql_delete(__FILE__, 'quotes', $quotes_id);
$query = 'DELETE FROM {pre}_comments WHERE comments_mod = \'quotes\' AND comments_fid = ' . $quotes_id;
cs_sql_query(__FILE__, $query);
cs_redirect($cs_lang['del_true'], 'quotes');
}
if (isset($cs_post['cancel'])) {
cs_redirect($cs_lang['del_false'], 'quotes');
}
$quote = cs_sql_select(__FILE__, 'quotes', 'quotes_headline', 'quotes_id = ' . $quotes_id, 0, 0, 1);
if (!empty($quote)) {
$data = array();
$data['head']['mod'] = $cs_lang['mod_name'];
$data['head']['action'] = $cs_lang['remove'];
$data['quotes']['id'] = $quotes_id;
$data['head']['body'] = sprintf($cs_lang['remove_entry'], $cs_lang['mod_name'], $quote['quotes_headline']);
$data['lang']['confirm'] = $cs_lang['confirm'];
$data['lang']['cancel'] = $cs_lang['cancel'];
echo cs_subtemplate(__FILE__, $data, 'quotes', 'remove');
} else {
cs_redirect('', 'quotes');
}
示例4: cs_sql_escape
$users_nick = cs_sql_escape($_POST['users_nick']);
$users_id = cs_sql_select(__FILE__, 'users', 'users_id', "users_nick = '{$users_nick}'", 0, 0, 1);
if ($users_id > 0) {
$insertion = array('medals_id' => $medals_id, 'users_id' => $users_id['users_id'], 'medalsuser_date' => cs_time());
cs_sql_insert(__FILE__, 'medalsuser', array_keys($insertion), array_values($insertion));
cs_redirect($cs_lang['create_done'], 'medals', 'user', 'where=' . $medals_id);
} else {
cs_redirect($cs_lang['user_not_found'], 'medals', 'user', 'where=' . $medals_id);
}
}
} else {
$medals_id = $_GET['where'];
}
if (isset($_GET['delete'])) {
$medalsuser_id = cs_sql_escape($_GET['delete']);
cs_sql_delete(__FILE__, 'medalsuser', $medalsuser_id);
cs_redirect($cs_lang['del_true'], 'medals', 'user', 'where=' . $medals_id);
}
$start = empty($_GET['start']) ? 0 : $_GET['start'];
$cs_sort[1] = 'md.medalsuser_date DESC';
$cs_sort[2] = 'md.medalsuser_date ASC';
$cs_sort[3] = 'usr.users_nick DESC';
$cs_sort[4] = 'usr.users_nick ASC';
$sort = empty($_GET['sort']) ? 1 : $_GET['sort'];
$order = $cs_sort[$sort];
$tables = 'medalsuser md LEFT JOIN {pre}_users usr ON usr.users_id = md.users_id';
$cells = 'usr.users_nick AS users_nick, md.users_id AS users_id, usr.users_active AS users_active, usr.users_delete AS users_delete, ';
$cells .= 'md.medals_id AS medals_id, md.medalsuser_date AS medalsuser_date, md.medalsuser_id AS medalsuser_id';
$where = 'medals_id = ' . $medals_id . '';
$data['medals_user'] = array();
$data['medals_user'] = cs_sql_select(__FILE__, $tables, $cells, $where, $order, $start, $account['users_limit']);
示例5: array_values
$values = array_values($cs_cups);
cs_sql_insert(__FILE__, 'cupmatches', $cells, $values);
}
/* autoclose the matches */
cs_cups_autoclose($id);
}
cs_redirect($cs_lang['started_successfully'], 'cups', 'manage');
} else {
$id = (int) $_GET['id'];
$cupsel = cs_sql_select(__FILE__, 'cups', 'cups_teams, cups_system', 'cups_id = ' . $id);
if ($cupsel['cups_system'] == CS_CUPS_TYPE_TEAMS) {
// remove squads automatically which doesn't exist anymore in the database
$del = cs_sql_select(__FILE__, 'cupsquads cq LEFT JOIN {pre}_squads sq ON cq.squads_id = sq.squads_id', 'cq.squads_id', 'sq.squads_id IS NULL AND cups_id = ' . $id, 0, 0, 0);
if (!empty($del)) {
foreach ($del as $del_id) {
cs_sql_delete(__FILE__, 'cupsquads', $del_id['squads_id'], 'squads_id');
}
}
}
$squads_count = cs_sql_count(__FILE__, 'cupsquads', 'cupsquads_checkedin = 1 AND cups_id = ' . $id);
if ($cupsel['cups_teams'] / 2 >= $squads_count) {
$bin = decbin($squads_count);
if (substr_count($bin, '1') != 1) {
// Get the smallest potency of 2 bigger then the team count
$new = '1';
for ($x = 0; $x < strlen($bin); $x++) {
$new .= '0';
}
settype($new, 'integer');
$new = bindec($new);
} else {
示例6: cs_translate
<?php
// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('events');
$events_form = 1;
$eventguests_id = $_REQUEST['id'];
settype($eventguests_id, 'integer');
$cols = 'events_id, users_id, eventguests_status';
$cs_events = cs_sql_select(__FILE__, 'eventguests', $cols, "eventguests_id = '" . $eventguests_id . "'");
$events_id = empty($cs_events['events_id']) ? 0 : $cs_events['events_id'];
$users_id = empty($cs_events['users_id']) ? 0 : $cs_events['users_id'];
if (isset($_GET['agree'])) {
$events_form = 0;
cs_sql_delete(__FILE__, 'eventguests', $eventguests_id);
# email notification for eventguest interactions
if (!empty($users_id)) {
$columns = 'events_time, events_name, events_id';
$where = "events_id = '" . $events_id . "'";
$event = cs_sql_select(__FILE__, 'events', $columns, $where);
$user = cs_sql_select(__FILE__, 'users', 'users_id, users_email', "users_id = '" . $users_id . "'");
$subject = $cs_lang['evg_mail_subject'] . ': ' . $event['events_name'];
$message = $cs_lang['evg_mail_reasons'] . $cs_lang['evg_mail_deletes'] . "\n\n";
$message .= $cs_lang['event'] . ': ' . $event['events_name'] . "\n";
$message .= $cs_lang['date'] . ': ' . cs_date('unix', $event['events_time'], 1) . "\n";
$message .= $cs_lang['status'] . ': ' . $cs_lang['status_' . $cs_events['eventguests_status']] . "\n\n";
$message .= $cs_lang['evg_mail_weblink'] . "\n";
$message .= $cs_main['php_self']['website'] . cs_url('events', 'view', 'id=' . $event['events_id']);
cs_mail($user['users_email'], $subject, $message);
}
cs_redirect($cs_lang['del_true'], 'events', 'guests', 'id=' . $events_id);
示例7: explode
$comments_edits_now = explode('/', $cs_thread['comments_edit']);
} else {
$comments_edits_now[3] = 0;
}
$new_count = 1 + $comments_edits_now[3];
$comments_edit = $account['users_id'] . '/' . $account['users_nick'] . '/' . cs_time() . '/' . $new_count;
$com_cells = array('comments_text', 'comments_edit');
$com_save = array($cs_comments['comments_text'], $comments_edit);
cs_sql_update(__FILE__, 'comments', $com_cells, $com_save, $comments_id);
for ($run = 0; $run < $run_loop_files; $run++) {
if ($cs_boardfiles[$run]['boardfiles_del'] == 1) {
$ext = substr($cs_boardfiles[$run]['boardfiles_name'], strlen($cs_boardfiles[$run]['boardfiles_name']) + 1 - strlen(strrchr($cs_boardfiles[$run]['boardfiles_name'], '.')));
$del_file_x = $cs_boardfiles[$run]['boardfiles_id'] . '.' . $ext;
cs_unlink('board', $del_file_x, 'files');
$sql_id = $cs_boardfiles[$run]['boardfiles_id'];
cs_sql_delete(__FILE__, 'boardfiles', $sql_id);
}
if ($cs_boardfiles[$run]['boardfiles_id'] == '') {
$files_cells = array('users_id', 'threads_id', 'comments_id', 'boardfiles_time', 'boardfiles_name');
$files_save = array($cs_boardfiles[$run]['users_id'], $cs_thread['threads_id'], $comments_id, cs_time(), $cs_boardfiles[$run]['boardfiles_name']);
cs_sql_insert(__FILE__, 'boardfiles', $files_cells, $files_save);
$files_select_new_id = cs_sql_insertid(__FILE__);
$ext = substr($cs_boardfiles[$run]['boardfiles_name'], strlen($cs_boardfiles[$run]['boardfiles_name']) + 1 - strlen(strrchr($cs_boardfiles[$run]['boardfiles_name'], '.')));
$path = $cs_main['def_path'] . '/uploads/board/files/';
$target = $path . $file_upload_name[$run];
$target2 = $path . $files_select_new_id . '.' . $ext;
$fileHand = fopen($target, 'r');
fclose($fileHand);
rename($target, $target2);
}
}
示例8: empty
$cs_sort[2] = 'usr.users_nick ASC';
$cs_sort[3] = 'mem.members_task DESC';
$cs_sort[4] = 'mem.members_task ASC';
$sort = empty($_REQUEST['sort']) ? 2 : $_REQUEST['sort'];
$order = $cs_sort[$sort];
if (!empty($_GET['del_id'])) {
$del_id = $_GET['del_id'];
settype($del_id, 'integer');
$target = cs_sql_select(__FILE__, 'members', 'squads_id', "members_id = '" . $del_id . "'");
$squads_id = $target['squads_id'];
$is_admin = "members_admin > 0 AND squads_id ='" . $squads_id . "' AND users_id ='" . $account['users_id'] . "'";
$allow = cs_sql_count(__FILE__, 'members', $is_admin);
if (empty($allow)) {
$msg = $cs_lang['del_failed'];
} else {
cs_sql_delete(__FILE__, 'members', $del_id);
$msg = $cs_lang['del_done'];
}
}
$data['lang']['mod_name'] = $cs_lang[$op_members['label']];
$data['url']['form'] = cs_url('members', 'center');
$data['lang']['team'] = $cs_lang[$op_squads['label']];
$where = "mem.users_id = '" . $account['users_id'] . "' AND mem.members_admin > 0";
$select = 'sqd.squads_name AS squads_name, sqd.squads_id AS squads_id';
$from = 'members mem INNER JOIN {pre}_squads sqd ON mem.squads_id = sqd.squads_id';
$sqd_data = cs_sql_select(__FILE__, $from, $select, $where, 'sqd.squads_name', 0, 0);
$sqd_loop = count($sqd_data);
for ($run = 0; $run < $sqd_loop; $run++) {
$data['squad'][$run]['selected'] = $sqd_data[$run]['squads_id'] == $squads_id ? ' selected="selected"' : '';
$data['squad'][$run]['id'] = $sqd_data[$run]['squads_id'];
$data['squad'][$run]['name'] = cs_secure($sqd_data[$run]['squads_name']);
示例9: cs_sql_query
$query = "DELETE FROM {pre}_comments WHERE comments_mod='board' AND ";
$query .= "comments_fid=" . (int) $thread_id;
cs_sql_query(__FILE__, $query);
$query = "DELETE FROM {pre}_abonements WHERE threads_id=" . (int) $thread_id;
cs_sql_query(__FILE__, $query);
$query = "DELETE FROM {pre}_boardfiles WHERE threads_id=" . (int) $thread_id;
cs_sql_query(__FILE__, $query);
$query = "DELETE FROM {pre}_boardvotes WHERE threads_id=" . (int) $thread_id;
cs_sql_query(__FILE__, $query);
$query = "DELETE FROM {pre}_voted WHERE voted_mod='board' AND ";
$query .= "voted_fid=" . (int) $thread_id;
cs_sql_query(__FILE__, $query);
// Delete Ghostlinks
$query = "DELETE FROM {pre}_threads WHERE threads_ghost_thread = " . (int) $thread_id;
cs_sql_query(__FILE__, $query);
# Update board entry to get correct threads and comments count
include_once 'mods/board/repair.php';
cs_board_threads($cs_thread['board_id']);
cs_board_comments($cs_thread['board_id']);
# Remove attached boardreports if there are any
cs_sql_delete(__FILE__, 'boardreport', $thread_id, 'threads_id');
cs_cache_delete('count_boardreport');
cs_redirect($cs_lang['del_true'], 'board', 'listcat', 'where=' . $cs_thread['board_id']);
}
if (isset($_POST['cancel'])) {
cs_redirect($cs_lang['del_false'], 'board', 'thread', 'where=' . $thread_id);
} else {
$data['head']['body'] = sprintf($cs_lang['del_thread_rly'], cs_secure($cs_thread['threads_headline']));
$data['thread']['id'] = $thread_id;
echo cs_subtemplate(__FILE__, $data, 'board', 'thread_remove');
}
示例10: cs_sql_select
$msg = $cs_lang['not_own'];
} else {
$where = "clans_id = '" . $clans_id . "'";
$getpic = cs_sql_select(__FILE__, 'clans', 'clans_picture', $where);
if (!empty($getpic['clans_picture'])) {
cs_unlink('clans', $getpic['clans_picture']);
}
$where = "clans_id = '" . $clans_id . "'";
$cs_squads = cs_sql_select(__FILE__, 'squads', 'squads_id', $where, 0, 0, 0);
if (is_array($cs_squads)) {
foreach ($cs_squads as $key => $squads_id) {
cs_sql_delete(__FILE__, 'members', $squads_id, 'squads_id');
}
}
cs_sql_delete(__FILE__, 'squads', $clans_id, 'clans_id');
cs_sql_delete(__FILE__, 'clans', $clans_id);
$msg = sprintf($cs_lang['del_true_clan'], $cs_lang[$op_clans['label']]);
}
cs_redirect($msg, 'clans', $center);
}
if (isset($_GET['cancel']) or $clans_id == 1) {
$clans_form = 0;
cs_redirect($cs_lang['del_false'], 'clans', $center);
}
if (!empty($clans_form)) {
$clan = cs_sql_select(__FILE__, 'clans', 'clans_name', 'clans_id = ' . $clans_id, 0, 0, 1);
if (!empty($clan)) {
$data['lang']['mod_name'] = $cs_lang[$op_clans['label']];
$data['lang']['body'] = sprintf($cs_lang['remove_entry'], $data['lang']['mod_name'], $clan['clans_name']);
$data['lang']['content'] = cs_link($cs_lang['confirm'], 'clans', 'remove', 'id=' . $clans_id . '&agree');
$data['lang']['content'] .= ' - ';
示例11: cs_sql_delete
cs_sql_delete(__FILE__, 'abonements', $thread_id, 'threads_id');
$files_select = 'boardfiles_id, threads_id, boardfiles_name';
$files_where = 'threads_id = ' . $thread_id;
$files_id = cs_sql_select(__FILE__, 'boardfiles', $files_select, $files_where, 0, 0, 0);
$files_loop = count($files_id);
for ($run2 = 0; $run2 < $files_loop; $run2++) {
$file = $files_id[$run2]['boardfiles_name'];
$extension = strlen(strrchr($file, "."));
$name = strlen($file);
$ext = substr($file, $name - $extension + 1, $name);
echo 'uploads/board/files/' . $files_id[$run2]['boardfiles_id'] . '.' . $ext . cs_html_br(1);
cs_unlink('board', $files_id[$run2]['boardfiles_id'] . '.' . $ext, 'files');
}
// $query = 'DELETE FROM {pre}_boardfiles WHERE threads_id= ' . $thread_id;
// cs_sql_query(__FILE__,$query);
cs_sql_delete(__FILE__, 'boardfiles', $thread_id, 'threads_id');
}
} else {
$cs_board_id = $cs_board['board_id'];
// $query = "UPDATE {pre}_threads SET board_id='$cs_board_id' ";
// $query .= "WHERE board_id = '$board_id'";
// cs_sql_query(__FILE__,$query);
cs_sql_update(__FILE__, 'threads', array('board_id'), array($cs_board_id), 0, 'board_id = ' . $board_id);
# Update board entry to get correct threads and comments count
include_once 'mods/board/repair.php';
cs_board_threads($cs_board_id);
cs_board_last($cs_board_id);
cs_board_comments($cs_board_id);
}
cs_redirect($cs_lang['del_true'], 'board');
}
示例12: cs_sql_delete
cs_sql_delete(__FILE__, 'comments', $comments_id);
$update_last = cs_sql_select(__FILE__, 'comments', '*', "comments_fid = '" . $com_fid . "'", 'comments_time DESC', 0, 1);
$cells = array('threads_last_time', 'threads_last_user');
if (empty($update_last['comments_time'])) {
$saves = array((int) $cs_thread['threads_time'], (int) $cs_thread['users_id']);
} else {
$saves = array((int) $update_last['comments_time'], (int) $update_last['users_id']);
}
cs_sql_update(__FILE__, 'threads', $cells, $saves, $com_fid);
# Update board entry to get correct threads and comments count
include_once 'mods/board/repair.php';
cs_board_comments($cs_thread['board_id']);
cs_board_last($cs_thread['board_id']);
cs_threads_comments($com_fid);
# Remove attached boardreport if there is one
cs_sql_delete(__FILE__, 'boardreport', $comments_id, 'comments_id');
cs_cache_delete('count_boardreport');
$more = 'where=' . $com_fid . '&start=' . $start;
cs_redirect($cs_lang['del_true'], 'board', 'thread', $more);
}
if (isset($_POST['cancel'])) {
$options_board = cs_sql_option(__FILE__, 'board');
$where = "comments_fid = \"" . $com_fid . "\" AND comments_mod = 'board' AND comments_id <= \"" . $comments_id . "\"";
$comnr = cs_sql_count(__FILE__, 'comments', $where);
if ($options_board['sort'] == 'ASC') {
$start = $comnr - $comnr % $account['users_limit'];
} else {
$where = "comments_fid = \"" . $com_fid . "\" AND comments_mod = 'board' AND comments_id > \"" . $comments_id . "\"";
$after = cs_sql_count(__FILE__, 'comments', $where);
$start = $after - $after % $account['users_limit'];
}
示例13: cs_translate
<?php
// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('wars');
$cs_get = cs_get('id');
$data = array();
$rounds_id = empty($cs_get['id']) ? 0 : $cs_get['id'];
$cs_rounds = cs_sql_select(__FILE__, 'rounds', 'wars_id', "rounds_id = '" . $rounds_id . "'");
if (isset($_GET['agree'])) {
cs_sql_delete(__FILE__, 'rounds', $rounds_id);
cs_redirect($cs_lang['del_true'], 'wars', 'rounds', 'id=' . $cs_rounds['wars_id']);
}
if (isset($_GET['cancel'])) {
cs_redirect($cs_lang['del_false'], 'wars', 'rounds', 'id=' . $cs_rounds['wars_id']);
} else {
$data['head']['body'] = sprintf($cs_lang['really_delete'], $rounds_id);
$data['url']['agree'] = cs_url('wars', 'roundsremove', 'id=' . $rounds_id . '&agree');
$data['url']['cancel'] = cs_url('wars', 'roundsremove', 'id=' . $rounds_id . '&cancel');
echo cs_subtemplate(__FILE__, $data, 'wars', 'remove');
}
示例14: cs_translate
<?php
// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('board');
$report_id = $_GET['id'];
if (isset($_GET['agree'])) {
cs_sql_delete(__FILE__, 'boardreport', $report_id);
cs_cache_delete('count_boardreport');
cs_redirect($cs_lang['del_true'], 'board', 'reportlist');
} elseif (isset($_GET['cancel'])) {
cs_redirect($cs_lang['del_false'], 'board', 'reportlist');
} else {
$data['head']['topline'] = sprintf($cs_lang['remove_rly'], $report_id);
$data['boardreport']['content'] = cs_link($cs_lang['confirm'], 'board', 'reportdel', 'id=' . $report_id . '&agree');
$data['boardreport']['content'] .= ' - ';
$data['boardreport']['content'] .= cs_link($cs_lang['cancel'], 'board', 'reportdel', 'id=' . $report_id . '&cancel');
}
echo cs_subtemplate(__FILE__, $data, 'board', 'reportdel');
示例15: empty
$users_id = empty($cs_get['id']) ? 0 : $cs_get['id'];
$nick_temp = cs_sql_select(__FILE__, 'users', 'users_nick', 'users_id = ' . $users_id);
if (isset($_GET['agree'])) {
$nick = $nick_temp['users_nick'];
$chars = 'abcdefghijklmnopqrstuvwxyz0123456789';
$chars_count = strlen($chars) - 1;
$mail = '';
$given = 1;
while (!empty($given)) {
for ($i = 0; $i < 40; $i++) {
$rand = rand(0, $chars_count);
$mail .= $chars[$rand];
}
$given = cs_sql_count(__FILE__, 'users', "users_email = '" . $mail . "'");
}
$array_data = array('access_id' => 0, 'users_nick' => $nick, 'users_pwd' => '', 'users_name' => '', 'users_surname' => '', 'users_sex' => '', 'users_age' => '', 'users_height' => 0, 'users_lang' => '', 'users_country' => "fam", 'users_postalcode' => '', 'users_place' => '', 'users_adress' => '', 'users_icq' => 0, 'users_jabber' => '', 'users_skype' => '', 'users_email' => $mail, 'users_url' => '', 'users_phone' => '', 'users_mobile' => '', 'users_laston' => 0, 'users_picture' => '', 'users_avatar' => '', 'users_signature' => '', 'users_info' => '', 'users_regkey' => '', 'users_register' => 0, 'users_delete' => 1);
$array_keys = array_keys($array_data);
$array_values = array_values($array_data);
cs_sql_update(__FILE__, 'users', $array_keys, $array_values, $users_id);
cs_sql_delete(__FILE__, 'members', $users_id, 'users_id');
cs_cache_clear();
cs_redirect($cs_lang['del_true'], 'users');
}
if (isset($_GET['cancel'])) {
cs_redirect($cs_lang['del_false'], 'users');
} else {
$data['head']['body'] = sprintf($cs_lang['rly_rmv_user'], $nick_temp['users_nick']);
$data['url']['agree'] = cs_url('users', 'remove', 'id=' . $users_id . '&agree');
$data['url']['cancel'] = cs_url('users', 'remove', 'id=' . $users_id . '&cancel');
echo cs_subtemplate(__FILE__, $data, 'users', 'remove');
}