本文整理汇总了PHP中cs_redirect函数的典型用法代码示例。如果您正苦于以下问题:PHP cs_redirect函数的具体用法?PHP cs_redirect怎么用?PHP cs_redirect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cs_redirect函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cs_sql_update
if (!empty($_GET['delall'])) {
cs_sql_update(__FILE__, 'board', array('board_order'), array(0), 0, 'board_order != 0');
cs_sql_update(__FILE__, 'categories', array('categories_order'), array(0), 0, "categories_mod = 'board'");
cs_redirect(NULL, 'board', 'sort');
}
if (!empty($_GET['board'])) {
$board_cells = array('board_order');
$board_save = empty($_GET['order']) ? array(0) : array(cs_sql_escape($_GET['order']));
cs_sql_update(__FILE__, 'board', $board_cells, $board_save, cs_sql_escape($_GET['board']));
cs_redirect(NULL, 'board', 'sort');
}
if (!empty($_GET['cat'])) {
$board_cells = array('categories_order');
$board_save = empty($_GET['order']) ? array(0) : array(cs_sql_escape($_GET['order']));
cs_sql_update(__FILE__, 'categories', $board_cells, $board_save, cs_sql_escape($_GET['cat']));
cs_redirect(NULL, 'board', 'sort');
}
$data['link']['back'] = cs_url('board', 'manage');
$data['link']['delall'] = cs_url('board', 'sort', 'delall=1');
$where = "categories_mod = 'board'";
$select = 'categories_name, categories_id, categories_order';
$cs_categories = cs_sql_select(__FILE__, 'categories', $select, $where, 'categories_order ASC, categories_name ASC', 0, 0);
$loop_categories = count($cs_categories);
if (!empty($cs_categories)) {
for ($run = 0; $run < $loop_categories; $run++) {
$data['cat'][$run]['categories_name'] = cs_secure($cs_categories[$run]['categories_name']);
$data['cat'][$run]['categories_order'] = cs_secure($cs_categories[$run]['categories_order']);
if ($run > 0 and $cs_categories[$run]['categories_order'] - 1 >= $cs_categories[$run - 1]['categories_order']) {
$data['cat'][$run]['categories_up'] = cs_html_img('symbols/clansphere/up_arrow_active.png') . ' ' . cs_link($cs_lang['up'], 'board', 'sort', 'cat=' . $cs_categories[$run]['categories_id'] . '&order=' . $cs_categories[$run - 1]['categories_order']);
} else {
if ($run > 0 and $cs_categories[$run]['categories_order'] > 0) {
示例2: cs_translate
// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('board');
$count_abo = cs_sql_count(__FILE__, 'abonements', 'users_id=' . $account['users_id']);
$count_att = cs_sql_count(__FILE__, 'boardfiles', 'users_id=' . $account['users_id']);
$data = array();
$data['head']['getmsg'] = cs_getmsg();
$data['count']['abos'] = $count_abo;
$data['count']['attachments'] = $count_att;
$data['link']['abos'] = cs_url('board', 'center');
$data['link']['attachments'] = cs_url('board', 'attachments');
$data['link']['avatar'] = cs_url('board', 'avatar');
$data['action']['form'] = cs_url('board', 'signature');
$data['signature']['smileys'] = cs_abcode_smileys('signature');
$data['signature']['abcode'] = cs_abcode_features('signature');
$signature_sql = cs_sql_select($file, 'users', 'users_signature', "users_id = '" . $account['users_id'] . "'");
$signature = $signature_sql['users_signature'];
$signature = isset($_POST['signature']) ? $_POST['signature'] : $signature;
$signature = preg_replace_callback("=\\[img\\](.*?)\\[/img\\]=si", "cs_abcode_resize", $signature);
$signature = preg_replace_callback("=\\[img width\\=(.*?) height\\=(.*?)\\](.*?)\\[/img\\]=si", "cs_abcode_resize", $signature);
$data['signature']['text'] = $signature;
$data['signature']['preview'] = cs_secure($signature, 1, 1);
$data['if']['preview'] = (isset($_POST['preview']) and !empty($signature)) ? 1 : 0;
if (isset($_POST['submit'])) {
$signature_cells = array('users_signature');
$signature_save = array($signature);
cs_sql_update(__FILE__, 'users', $signature_cells, $signature_save, $account['users_id']);
cs_redirect($cs_lang['create_done'], 'board', 'signature');
}
$data['signature']['text'] = cs_secure($data['signature']['text']);
echo cs_subtemplate(__FILE__, $data, 'board', 'signature');
示例3: 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');
}
示例4: str_replace
$sql_install = str_replace('{community}', $cs_lang['community'], $sql_install);
$sql_install = str_replace('{member}', $cs_lang['member'], $sql_install);
$sql_install = str_replace('{orga}', $cs_lang['orga'], $sql_install);
$sql_install = str_replace('{admin}', $cs_lang['admin'], $sql_install);
if ($cs_db['hash'] == 'md5') {
$sec_pwd = md5('admin');
} elseif ($cs_db['hash'] == 'sha1') {
$sec_pwd = sha1('admin');
}
$sql_install = str_replace('{pwd}', $sec_pwd, $sql_install);
$sql_install = cs_sql_replace($sql_install);
$sql_array = preg_split("=;[\n\r]+=", $sql_install);
foreach ($sql_array as $sql_query) {
$sql_query = trim($sql_query);
if (!empty($sql_query)) {
if (!cs_sql_query(__FILE__, $sql_query)) {
cs_installerror($sql_query);
}
}
}
if (isset($_POST['module_select'])) {
$mods = array('articles', 'awards', 'banners', 'board', 'boardmods', 'boardranks', 'buddys', 'cash', 'clans', 'computers', 'events', 'explorer', 'faq', 'fightus', 'files', 'gallery', 'games', 'gbook', 'history', 'joinus', 'links', 'linkus', 'maps', 'members', 'messages', 'news', 'newsletter', 'partner', 'quotes', 'ranks', 'replays', 'rules', 'search', 'servers', 'shoutbox', 'squads', 'static', 'usersgallery', 'votes', 'wars', 'wizard');
$mods_count = count($mods);
for ($run = 0; $run < $mods_count; $run++) {
if (!isset($_POST[$mods[$run]])) {
cs_sql_query(__FILE__, "UPDATE {pre}_access SET access_" . $mods[$run] . " = '0'");
}
}
}
cs_redirect('', 'install', 'admin', 'lang=' . $account['users_lang']);
示例5: isset
$cs_gallery_pic['gallery_name'] = $name;
$cs_gallery_pic['gallery_status'] = isset($_POST['gallery_status']) ? $_POST['gallery_status'] : 0;
$cs_gallery_pic['gallery_access'] = isset($_POST['gallery_access']) ? $_POST['gallery_access'] : 0;
$cs_gallery_pic['gallery_watermark'] = $_POST['gallery_watermark'];
if (!empty($_POST['gallery_watermark'])) {
$watermark_pos = $_POST['watermark_pos'];
$watermark_trans = $_POST['gallery_watermark_trans'];
$cs_gallery_pic['gallery_watermark_pos'] = $watermark_pos . '|--@--|' . $watermark_trans;
}
$extension = strlen(strrchr($name, "."));
$file = strlen($name);
$filename = substr($name, 0, $file - $extension);
$cs_gallery_pic['gallery_titel'] = $filename;
$cs_gallery_pic['gallery_time'] = cs_time();
$gallery_cells = array_keys($cs_gallery_pic);
$gallery_save = array_values($cs_gallery_pic);
cs_sql_insert(__FILE__, 'gallery', $gallery_cells, $gallery_save);
}
$data['pics'][$run]['img'] = cs_html_img('mods/gallery/image.php?picname=' . $name);
$data['pics'][$run]['name'] = $name;
}
}
}
cs_redirect($cs_lang['create_done'], 'gallery');
}
if (!isset($_POST['submit_1'])) {
if (!isset($_POST['submit']) or !empty($error)) {
$data['if']['start'] = TRUE;
}
}
echo cs_subtemplate(__FILE__, $data, 'gallery', 'manage_advanced');
示例6: array
$games_version = $_POST['games_version'];
}
$data['lang']['body'] = !isset($_POST['submit']) ? $cs_lang['body_create'] : $errormsg;
if (isset($_POST['submit']) && empty($games_error) && empty($symbol_error)) {
$games_cells = array('games_name', 'games_version', 'games_released', 'games_creator', 'categories_id', 'games_url', 'games_usk');
$games_save = array($games_name, $games_version, $games_release, $games_creator, $categories_id, $games_url, $games_usk);
cs_sql_insert(__FILE__, 'games', $games_cells, $games_save);
$where = "games_name = '" . cs_sql_escape($games_name) . "'";
$getid = cs_sql_select(__FILE__, 'games', 'games_id', $where);
if (!empty($files['symbol']['tmp_name']) and $symbol_error == 0) {
$filename = $getid['games_id'] . '.' . $extension;
cs_upload('games', $filename, $files['symbol']['tmp_name']);
} else {
copy('uploads/games/0.gif', 'uploads/games/' . (int) $getid['games_id'] . '.gif');
}
cs_redirect($cs_lang['create_done'], 'games');
}
$data['url']['form'] = cs_url('games', 'create');
$data['games']['name'] = $games_name;
$data['games']['version'] = $games_version;
$data['games']['genre'] = cs_categories_dropdown('games', $categories_id);
$data['games']['release'] = cs_dateselect('datum', 'date', $games_release);
$data['games']['creator'] = $games_creator;
$data['games']['homepage'] = $games_url;
$usknum[0]['games_usk'] = '00';
$usknum[0]['name'] = $cs_lang['usk_00'];
$usknum[1]['games_usk'] = '06';
$usknum[1]['name'] = $cs_lang['usk_06'];
$usknum[2]['games_usk'] = '12';
$usknum[2]['name'] = $cs_lang['usk_12'];
$usknum[3]['games_usk'] = '16';
示例7: make_folders_select
$data['folders']['select'] = make_folders_select('folders_id', $edit['folders_id'], $account['users_id'], 'usersgallery');
$data['access']['options'] = '';
$levels = 0;
while ($levels < 6) {
$edit['usersgallery_access'] == $levels ? $sel = 1 : ($sel = 0);
$data['access']['options'] .= cs_html_option($levels . ' - ' . $cs_lang['lev_' . $levels], $levels, $sel);
$levels++;
}
$data['status']['options'] = '';
$levels = 0;
while ($levels < 2) {
$edit['usersgallery_status'] == $levels ? $sel = 1 : ($sel = 0);
$data['status']['options'] .= cs_html_option($cs_lang['show_' . $levels], $levels, $sel);
$levels++;
}
$data['abcode']['smileys'] = cs_abcode_smileys('gallery_description');
$data['abcode']['features'] = cs_abcode_features('gallery_description');
$checked = 'checked="checked"';
$data['check']['newtime'] = empty($new_time) ? '' : $checked;
$data['check']['count'] = empty($gallery_count_reset) ? '' : $checked;
$data['hidden']['id'] = $gallery_id;
$data['data']['usersgallery_name'] = cs_secure($data['data']['usersgallery_name']);
$data['data']['usersgallery_titel'] = cs_secure($data['data']['usersgallery_titel']);
$data['data']['usersgallery_description'] = cs_secure($data['data']['usersgallery_description']);
echo cs_subtemplate(__FILE__, $data, 'usersgallery', 'users_edit');
} else {
$cells = array_keys($edit);
$save = array_values($edit);
cs_sql_update(__FILE__, 'usersgallery', $cells, $save, $gallery_id);
cs_redirect($cs_lang['changes_done'], 'usersgallery', 'center');
}
示例8: cs_html_br
$errormsg = '';
if (empty($cs_bm['categories_id'])) {
$error++;
$errormsg .= $cs_lang['no_cat'] . cs_html_br(1);
}
} else {
$boardmods_id = $_GET['id'];
$tables = 'boardmods brd INNER JOIN {pre}_users usr ON usr.users_id = brd.users_id';
$cells = 'brd.boardmods_id AS boardmods_id, brd.categories_id AS categories_id, brd.users_id AS users_id, usr.users_nick AS users_nick, ';
$cells .= 'brd.boardmods_modpanel AS boardmods_modpanel, brd.boardmods_edit AS boardmods_edit, brd.boardmods_del AS boardmods_del';
$cs_bm = cs_sql_select(__FILE__, $tables, $cells, "boardmods_id = '" . $boardmods_id . "'", 0, 0);
}
if (!isset($_POST['submit']) and empty($error)) {
$data['head']['body'] = $cs_lang['body'];
} elseif (!empty($error)) {
$data['head']['body'] = $errormsg;
}
if (!empty($error) or !isset($_POST['submit'])) {
$data['bm']['id'] = empty($_POST['id']) ? $_GET['id'] : $_POST['id'];
$data['bm']['user'] = cs_secure($cs_bm['users_nick']);
$data['bm']['cat_dropdown'] = cs_categories_dropdown('boardmods', $cs_bm['categories_id']);
$data['bm']['boardmods_modpanel'] = $cs_bm['boardmods_modpanel'] == 1 ? 'checked="checked"' : '';
$data['bm']['boardmods_edit'] = $cs_bm['boardmods_edit'] == 1 ? 'checked="checked"' : '';
$data['bm']['boardmods_del'] = $cs_bm['boardmods_del'] == 1 ? 'checked="checked"' : '';
} else {
$boardmods_cells = array_keys($cs_bm);
$boardmods_save = array_values($cs_bm);
cs_sql_update(__FILE__, 'boardmods', $boardmods_cells, $boardmods_save, $_POST['id']);
cs_redirect($cs_lang['changes_done'], 'boardmods');
}
echo cs_subtemplate(__FILE__, $data, 'boardmods', 'edit');
示例9: cs_translate
<?php
// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('medals');
$cs_get = cs_get('id,confirm,');
if (isset($_GET['confirm'])) {
cs_sql_delete(__FILE__, 'medalsuser', $cs_get['id'], 'medals_id');
cs_sql_delete(__FILE__, 'medals', $cs_get['id']);
cs_redirect($cs_lang['del_true'], 'medals', 'manage');
}
$medal = cs_sql_select(__FILE__, 'medals', 'medals_name', "medals_id = '" . $cs_get['id'] . "'");
if (!empty($medal)) {
$data = array();
$medals_name = cs_secure($medal['medals_name']);
$data['medals']['message'] = sprintf($cs_lang['rly_remove'], $medals_name);
$data['medals']['url_confirm'] = cs_url('medals', 'remove', 'id=' . $cs_get['id'] . '&confirm');
echo cs_subtemplate(__FILE__, $data, 'medals', 'remove');
} else {
cs_redirect('', 'medals');
}
示例10: cs_sql_update
$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');
}
if (isset($_POST['cancel'])) {
$board_form = 0;
cs_redirect($cs_lang['del_false'], 'board');
}
if (!empty($board_form)) {
$data['action']['form'] = cs_url('board', 'remove');
$data['lang']['body'] = sprintf($cs_lang['del_rly'], $board_id);
if (!empty($threads_loop)) {
$data['if']['threads_loop'] = true;
$cs_board['change_threads'] = 0;
if ($cs_board['change_threads'] == 0) {
$data['remove']['checked'] = '';
} else {
$data['remove']['checked'] = 'checked="checked"';
}
$cs_board['board_id'] = 0;
$where = "board_id != '" . $board_id . "'";
$board_data = cs_sql_select(__FILE__, 'board', '*', $where, 'board_name', 0, 0);
示例11: cs_link
$data['link']['wizard'] = cs_link($cs_lang['show'], 'wizard', 'roots') . ' - ' . cs_link($cs_lang['task_done'], 'wizard', 'roots', 'handler=temp&done=1');
}
}
if (!empty($activate) and !empty($allow)) {
require_once 'mods/clansphere/func_options.php';
$save = array();
$save['def_tpl'] = $activate;
if (isset($templates[ucfirst($activate)]['themes'])) {
$themes = cs_checkdirs('themes');
if (isset($themes[ucfirst($templates[ucfirst($activate)]['themes'])])) {
$save['def_theme'] = $templates[ucfirst($activate)]['themes'];
}
}
cs_optionsave('clansphere', $save);
$msg = file_exists('themes/' . $activate) ? $cs_lang['theme_found'] . cs_link($cs_lang['change_to_this'], 'clansphere', 'themes_list', 'activate=' . $activate) : $cs_lang['success'];
cs_redirect($msg, 'clansphere', 'temp_list');
} else {
$data['lang']['getmsg'] = cs_getmsg();
$run = 0;
foreach ($templates as $mod) {
if ($mod['dir'] == 'install') {
$tpl_all--;
continue;
}
$data['temp_list'][$run]['name'] = $mod['name'];
$data['temp_list'][$run]['dir'] = $mod['dir'];
$data['temp_list'][$run]['version'] = $mod['version'];
$data['temp_list'][$run]['date'] = cs_date('date', $mod['released']);
$data['temp_list'][$run]['if']['active'] = $mod['dir'] == $cs_main['template'] ? 1 : 0;
$data['temp_list'][$run]['if']['def'] = $mod['dir'] == $cs_main['def_tpl'] ? 1 : 0;
$run++;
示例12: cs_translate
<?php
// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('files');
$advanced = 0;
if (empty($_REQUEST['where'])) {
cs_redirect(NULL, 'files', 'list');
}
$files_id = $_REQUEST['where'];
settype($files_id, 'integer');
$mirror_id = isset($_REQUEST['target']) ? $_REQUEST['target'] : 0;
settype($mirror_id, 'integer');
$from = 'files';
$select = 'files_count, files_name, files_mirror';
$where = "files_id = '" . $files_id . "'";
$cs_files = cs_sql_select(__FILE__, $from, $select, $where, 0, 0, 1);
$files_loop = count($cs_files);
if (!empty($files_loop)) {
$files_count = $cs_files['files_count'];
$files_mirror = $cs_files['files_mirror'];
$temp_mirror1 = explode("-----", $files_mirror);
$mirror = explode("\n", $temp_mirror1[$mirror_id]);
$files_count = $files_count + 1;
$files_cells = array('files_count');
$files_save = array($files_count);
cs_sql_update(__FILE__, 'files', $files_cells, $files_save, $files_id);
if (empty($advanced) and isset($mirror[1])) {
header('Location: ' . $mirror[1]);
} elseif (!empty($advanced)) {
$data['file']['wait'] = cs_html_img('symbols/files/wait.gif', 0, 0, 0);
示例13: array_values
$thread_save = array_values($board);
cs_sql_insert(__FILE__, 'threads', $thread_cells, $thread_save);
$thread_now = cs_sql_select(__FILE__, 'threads', 'threads_id', 'threads_id = \'' . cs_sql_insertid(__FILE__) . '\'');
#if thread voting -> save vote to boardvotes
if ($votes == 1) {
$bv['users_id'] = $board['users_id'];
$bv['threads_id'] = $thread_now['threads_id'];
$bv['boardvotes_time'] = $board['threads_time'];
$bv_cells = array_keys($bv);
$bv_save = array_values($bv);
cs_sql_insert(__FILE__, 'boardvotes', $bv_cells, $bv_save);
}
for ($run = 0; $run < $run_loop_files; $run++) {
$num = $run + 1;
$files_cells = array('users_id', 'threads_id', 'boardfiles_time', 'boardfiles_name');
$files_save = array($board['users_id'], $thread_now['threads_id'], $board['threads_time'], $file_name[$num]);
cs_sql_insert(__FILE__, 'boardfiles', $files_cells, $files_save);
$files_select_new_id = cs_sql_insertid(__FILE__);
$ext = substr($file_name[$num], strlen($file_name[$num]) + 1 - strlen(strrchr($file_name[$num], '.')));
$path = $cs_main['def_path'] . '/uploads/board/files/';
$target = $path . $file_upload_name[$num];
$target2 = $path . $files_select_new_id . '.' . $ext;
$fileHand = fopen($target, 'r');
fclose($fileHand);
rename($target, $target2);
}
# Update board entry to get correct threads and comments count
include_once 'mods/board/repair.php';
cs_board_threads($board_id);
cs_redirect($cs_lang['create_done'], 'board', 'thread', 'where=' . $thread_now['threads_id']);
}
示例14: cs_sql_select
$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']);
$data['count']['medals_user'] = count($data['medals_user']);
示例15: array
break;
case 2:
$ext = 'jpg';
break;
case 3:
$ext = 'png';
break;
}
$target = $cs_files_id . '-' . $file_next . '.' . $ext;
$picture_name = 'picture-' . $target;
$thumb_name = 'thumb-' . $target;
if (cs_resample($files_gl['picture']['tmp_name'], 'uploads/files/' . $thumb_name, 80, 200) and cs_upload('files', $picture_name, $files_gl['picture']['tmp_name'])) {
$cells = array('files_previews');
$content = empty($file_string) ? array($target) : array($file_string . "\n" . $target);
cs_sql_update(__FILE__, 'files', $cells, $content, $cs_files_id);
cs_redirect($cs_lang['success'], 'files', 'picture', 'id=' . $cs_files_id);
} else {
$message .= $cs_lang['up_error'];
$error++;
}
}
}
if (!empty($message)) {
$data['head']['text'] = $message;
} elseif (empty($_GET['delete'])) {
$data['head']['text'] = $cs_lang['body_picture'];
} else {
$data['head']['text'] = $cs_lang['remove_done'];
}
$data['head']['message'] = cs_getmsg();
$data['file']['id'] = $cs_files_id;