本文整理汇总了PHP中cs_getmsg函数的典型用法代码示例。如果您正苦于以下问题:PHP cs_getmsg函数的具体用法?PHP cs_getmsg怎么用?PHP cs_getmsg使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cs_getmsg函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cs_translate
<?php
// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('count');
$start = empty($_REQUEST['start']) ? 0 : $_REQUEST['start'];
$cs_sort[1] = 'count_time DESC';
$cs_sort[2] = 'count_time ASC';
$cs_sort[3] = 'count_id DESC';
$cs_sort[4] = 'count_id ASC';
$sort = empty($_REQUEST['sort']) ? 1 : $_REQUEST['sort'];
$order = $cs_sort[$sort];
$counter_count = cs_sql_count(__FILE__, 'count');
$data = array();
$data['head']['counter_count'] = $counter_count;
$data['head']['counter_pages'] = cs_pages('count', 'manage', $counter_count, $start);
$data['head']['message'] = cs_getmsg();
$data['sort']['count_time'] = cs_sort('count', 'manage', $start, 0, 1, $sort);
$data['sort']['count_id'] = cs_sort('count', 'manage', $start, 0, 3, $sort);
$cs_counter = cs_sql_select(__FILE__, 'count', '*', 0, $order, $start, $account['users_limit']);
$count_loop = count($cs_counter);
$data['count'] = array();
for ($run = 0; $run < $count_loop; $run++) {
$data['count'][$run]['count_id'] = $cs_counter[$run]['count_id'];
$data['count'][$run]['count_ip'] = $cs_counter[$run]['count_ip'];
$data['count'][$run]['count_locate'] = $cs_counter[$run]['count_location'];
$data['count'][$run]['count_time'] = cs_date('unix', $cs_counter[$run]['count_time'], 1);
}
echo cs_subtemplate(__FILE__, $data, 'count', 'manage');
示例2: empty
$order = $cs_sort[$sort];
$user_gb = empty($_POST['user_gb']) ? 0 : $_POST['user_gb'];
if (empty($user_gb)) {
$user_gb = empty($_GET['user_gb']) ? 0 : $_GET['user_gb'];
}
if (!empty($user_gb)) {
$where = "users_nick = '" . cs_sql_escape($user_gb) . "'";
$cs_user = cs_sql_select(__FILE__, 'users', 'users_id', $where);
$id = $cs_user['users_id'];
}
$where = "gbook_users_id ='" . $id . "'";
$gbook_count = cs_sql_count(__FILE__, 'gbook', $where);
$data['head']['count'] = $gbook_count;
$data['head']['pages'] = cs_pages('gbook', 'manage', $gbook_count, $start, $id, $sort);
$data['head']['user_gb'] = empty($user_gb) ? '' : $user_gb;
$data['head']['getmsg'] = cs_getmsg();
$data['sort']['email'] = cs_sort('gbook', 'manage', $start, $id, 3, $sort);
$data['sort']['time'] = cs_sort('gbook', 'manage', $start, $id, 1, $sort);
$from = 'gbook gbk LEFT JOIN {pre}_users usr ON gbk.users_id = usr.users_id';
$select = 'gbk.gbook_id AS gbook_id, gbk.users_id AS users_id, gbk.gbook_time AS gbook_time, gbk.gbook_nick AS gbook_nick, ';
$select .= 'gbk.gbook_email AS gbook_email, gbk.gbook_lock AS gbook_lock, gbk.gbook_ip AS gbook_ip, ';
$select .= 'usr.users_nick AS users_nick, usr.users_email AS users_email';
$cs_gbook = cs_sql_select(__FILE__, $from, $select, $where, $order, $start, $account['users_limit']);
$gbook_loop = count($cs_gbook);
for ($run = 0; $run < $gbook_loop; $run++) {
if ($cs_gbook[$run]['users_id'] > 0) {
$gbook[$run]['nick'] = cs_secure($cs_gbook[$run]['users_nick']);
$gbook[$run]['email'] = cs_secure($cs_gbook[$run]['users_email']);
} else {
$gbook[$run]['nick'] = cs_secure($cs_gbook[$run]['gbook_nick']);
$gbook[$run]['email'] = cs_secure($cs_gbook[$run]['gbook_email']);
示例3: cs_sql_escape
$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']);
$data['count']['all_medals_user'] = cs_sql_count(__FILE__, 'medalsuser', $where);
$data['sort']['date'] = cs_sort('medals', 'user', $start, $medals_id, 1, $sort);
$data['sort']['users_nick'] = cs_sort('medals', 'user', $start, $medals_id, 3, $sort);
$data['pages']['list'] = cs_pages('medals', 'user', $data['count']['all_medals_user'], $start, $medals_id, $sort);
for ($i = 0; $i < $data['count']['medals_user']; $i++) {
$data['medals_user'][$i]['user'] = cs_user($data['medals_user'][$i]['users_id'], $data['medals_user'][$i]['users_nick'], $data['medals_user'][$i]['users_active'], $data['medals_user'][$i]['users_delete']);
$data['medals_user'][$i]['remove_url'] = cs_url('medals', 'user', 'where=' . $data['medals_user'][$i]['medals_id'] . '&delete=' . $data['medals_user'][$i]['medalsuser_id']);
$data['medals_user'][$i]['medals_date'] = cs_date('unix', $data['medals_user'][$i]['medalsuser_date'], 1);
}
$data['medals']['id'] = $medals_id;
$data['message']['medals'] = cs_getmsg();
$data['form']['dirname'] = $cs_main['php_self']['dirname'];
echo cs_subtemplate(__FILE__, $data, 'medals', 'user');
示例4: cs_sql_select
$data['wars'] = $cs_rounds;
$cs_wars = cs_sql_select(__FILE__, 'wars', 'games_id', "wars_id = '" . $wars_id . "'");
$cs_maps = cs_sql_select(__FILE__, 'maps', 'maps_name, maps_id', "games_id = '" . $cs_wars['games_id'] . "'", 'maps_name', 0, 0);
$i = 0;
if (!empty($cs_maps)) {
foreach ($cs_maps as $map) {
$sel = $map['maps_id'] == $cs_rounds['maps_id'] ? 1 : 0;
$data['map'][$i]['sel'] = cs_html_option($map['maps_name'], $map['maps_id'], $sel);
$i++;
}
}
$data['wars']['new_map'] = $new_map;
$data['abcode']['smileys'] = cs_abcode_smileys('rounds_description');
$data['abcode']['features'] = cs_abcode_features('rounds_description');
$data['wars']['id'] = $wars_id;
$data['get']['msg'] = cs_getmsg();
$tables = 'rounds rnd LEFT JOIN {pre}_maps mps ON rnd.maps_id = mps.maps_id';
$cells = 'rnd.rounds_id AS rounds_id, rnd.rounds_score1 AS rounds_score1, ';
$cells .= 'rnd.rounds_score2 AS rounds_score2, mps.maps_name AS maps_name, ';
$cells .= 'rnd.rounds_order AS rounds_order';
$sort = 'rnd.rounds_order ASC, rnd.rounds_id ASC';
$cs_rounds = cs_sql_select(__FILE__, $tables, $cells, 'rnd.wars_id = \'' . $wars_id . '\'', $sort, 0, 0);
$count = count($cs_rounds);
if (!empty($cs_rounds)) {
$data['if']['rounds'] = true;
$img_up = cs_html_img('symbols/clansphere/up_arrow.png');
$img_down = cs_html_img('symbols/clansphere/down_arrow.png');
$run = 0;
$run2 = 0;
foreach ($cs_rounds as $round) {
$run2++;
示例5: cs_translate
<?php
// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('wars');
$wars['if']['squadmember'] = FALSE;
$wars_id = empty($_REQUEST['where']) ? (int) $_GET['id'] : (int) $_REQUEST['where'];
$cells = 'games_id, categories_id, clans_id, wars_opponents, squads_id, wars_status, wars_players1, wars_players2, ';
$cells .= 'wars_score1, wars_score2, wars_url, wars_pictures, wars_report, wars_report2, wars_date, wars_status, wars_close';
$cs_wars = cs_sql_select(__FILE__, 'wars', $cells, "wars_id = '" . $wars_id . "'");
$wars['head']['topline'] = $cs_lang['body_view'];
$wars['lang']['getmsg'] = cs_getmsg();
$gameicon = 'uploads/games/' . $cs_wars['games_id'] . '.gif';
$where = "games_id = '" . $cs_wars['games_id'] . "'";
$cs_game = cs_sql_select(__FILE__, 'games', 'games_name, games_id', $where);
$wars['game']['icon'] = file_exists($gameicon) ? cs_html_img($gameicon) : '';
$wars['game']['link'] = cs_link($cs_game['games_name'], 'games', 'view', 'id=' . $cs_game['games_id']);
$where = "categories_id = '" . $cs_wars['categories_id'] . "'";
$cs_cat = cs_sql_select(__FILE__, 'categories', 'categories_name, categories_id', $where);
$wars['lang']['category'] = $cs_lang['category'];
$wars['category']['link'] = cs_link($cs_cat['categories_name'], 'categories', 'view', 'id=' . $cs_cat['categories_id']);
$where = "clans_id = '" . $cs_wars['clans_id'] . "'";
$cs_clan = cs_sql_select(__FILE__, 'clans', 'clans_name, clans_picture, clans_country, clans_id', $where);
$wars['enemy']['link'] = cs_link(cs_secure($cs_clan['clans_name']), 'clans', 'view', 'id=' . $cs_clan['clans_id']);
$wars['enemy']['logo'] = !empty($cs_clan['clans_picture']) ? cs_html_img('uploads/clans/' . $cs_clan['clans_picture']) : $cs_lang['no_logo'];
if (!empty($cs_wars['wars_opponents'])) {
$wars['wars']['opponents'] = cs_secure($cs_wars['wars_opponents'], 0, 0, 0);
} else {
$wars['wars']['opponents'] = '-';
}
if (!empty($cs_clan['clans_country'])) {
示例6: cs_link
} else {
$data['thread']['prev_empty'] = '';
}
/*if($account['access_id'] >= 5 OR !empty($thread_mods['boardmods_modpanel']))
{
echo ' - ' .cs_link($cs_lang['modpanel'],'board','modpanel','id=' .$id);
}*/
//vorheriges - letztes thema
$data['thread']['categories_link'] = cs_link($data['thread']['categories_name'], 'board', 'list', 'id=' . $data['thread']['categories_id']);
$data['thread']['board_link'] = cs_link(cs_secure($data['thread']['board_name']), 'board', 'listcat', 'id=' . $data['thread']['board_id']);
#$arimportant = array('',$cs_lang['important']);
$important = $data['thread']['threads_important'];
#$data['thread']['abo'] = cs_secure($arimportant[$important],1) . ' ';
$cs_main['page_title'] = $data['thread']['threads_headline'];
$data['thread']['thread_link'] = cs_secure($data['thread']['threads_headline']);
$data['thread']['getmessage'] = cs_getmsg();
$data['thread']['sum'] = $sum;
$data['thread']['pages'] = cs_pages($mod, $action, $sum, $start, $id);
$data['if']['vote'] = false;
$data['if']['vote_result'] = false;
$data['if']['vote_several'] = false;
if (!empty($cs_thread_votes)) {
if ($account['access_board'] >= $cs_thread_votes['boardvotes_access'] or $time_now <= $cs_thread_votes['boardvotes_end']) {
$votes_error = '';
$users_ip = cs_getip();
$users_id = $account['users_id'];
$where = "voted_mod = 'board' AND voted_fid = " . (int) $id . " AND voted_ip = '" . cs_sql_escape($users_ip) . "'";
if ($users_id > 0) {
$where = "voted_mod = 'board' AND voted_fid = " . (int) $id . " AND users_id = " . (int) $users_id;
}
$checkit_userip = cs_sql_count(__FILE__, 'voted', $where);
示例7: cs_translate
<?php
// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('users');
$head = array('mod' => $cs_lang['mod_name'], 'action' => $cs_lang['settings'], 'topline' => $cs_lang['settings_info'], 'message' => cs_getmsg());
$opt_array = array($cs_lang['profile'] => array('file' => 'profile', 'icon' => 'personal', 'name' => $cs_lang['profile'], 'show' => array('users/settings' => 1)), $cs_lang['picture'] => array('file' => 'picture', 'icon' => 'camera_unmount', 'name' => $cs_lang['picture'], 'show' => array('users/settings' => 1)), $cs_lang['password'] => array('file' => 'password', 'icon' => 'password', 'name' => $cs_lang['password'], 'show' => array('users/settings' => 1)), $cs_lang['setup'] => array('file' => 'setup', 'icon' => 'looknfeel', 'name' => $cs_lang['setup'], 'show' => array('users/settings' => 1)), $cs_lang['close'] => array('file' => 'close', 'icon' => 'gpg', 'name' => $cs_lang['close'], 'show' => array('users/settings' => 1)), $cs_lang['avatar'] => array('dir' => 'board', 'file' => 'avatar', 'icon' => 'babelfish', 'name' => $cs_lang['avatar'], 'show' => array('users/settings' => 1)), $cs_lang['signature'] => array('dir' => 'board', 'file' => 'signature', 'icon' => 'colors', 'name' => $cs_lang['signature'], 'show' => array('users/settings' => 1)));
require_once 'mods/clansphere/functions.php';
echo cs_manage('users', 'settings', 'users', 'center', $opt_array, $head);
示例8: cs_comments_view
function cs_comments_view($com_fid, $mod, $action, $sum, $asc = true, $limit = 0)
{
$cs_lang = cs_translate('comments');
$options = cs_sql_option(__FILE__, 'comments');
global $account, $cs_main;
$class = 'leftb';
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
settype($start, 'integer');
settype($com_fid, 'integer');
settype($asc, 'boolean');
settype($limit, 'integer');
$data['comments']['sum'] = $sum;
$data['comments']['message'] = cs_getmsg();
$data['comments']['pages'] = cs_pages($mod, $action, $sum, $start, $com_fid);
if ($mod == 'board' and !empty($sum)) {
$data['if']['form'] = TRUE;
} else {
$data['if']['form'] = FALSE;
}
$where = "comments_mod = '" . cs_sql_escape($mod) . "' AND comments_fid = '" . $com_fid . "'";
$from = 'comments com LEFT JOIN {pre}_users usr ON com.users_id = usr.users_id ';
$select = 'com.comments_id AS comments_id, com.comments_ip AS comments_ip, com.comments_guestnick AS comments_guestnick, com.comments_time AS comments_time, com.comments_text AS comments_text, com.comments_edit AS comments_edit, com.users_id AS users_id, usr.users_nick as users_nick, usr.users_laston as users_laston, usr.users_place AS users_place, usr.users_country AS users_country, usr.users_avatar AS users_avatar, usr.users_hidden AS users_hidden, usr.users_active AS users_active, usr.users_delete AS users_delete, usr.users_invisible AS users_invisible';
$order = $asc == true ? 'comments_id ASC' : 'comments_id DESC';
$limit = !empty($limit) ? $limit : $account['users_limit'];
$cs_com = cs_sql_select(__FILE__, $from, $select, $where, $order, $start, $limit);
$com_loop = count($cs_com);
for ($run = 0; $run < $com_loop; $run++) {
$class = $class == 'leftb' ? 'leftc' : 'leftb';
$current = $start + $run + 1;
$com[$run]['class'] = $class;
if (empty($cs_com[$run]['users_id'])) {
$com[$run]['if']['guest'] = TRUE;
$com[$run]['if']['user'] = FALSE;
$com[$run]['guestnick'] = cs_secure($cs_com[$run]['comments_guestnick']);
} else {
$com[$run]['if']['guest'] = FALSE;
$com[$run]['if']['user'] = TRUE;
$src = 'symbols/countries/' . $cs_com[$run]['users_country'] . '.png';
$com[$run]['flag'] = cs_html_img($src, 11, 16);
$com[$run]['user'] = cs_user($cs_com[$run]['users_id'], $cs_com[$run]['users_nick'], $cs_com[$run]['users_active'], $cs_com[$run]['users_delete']);
$com[$run]['status'] = cs_userstatus($cs_com[$run]['users_laston'], $cs_com[$run]['users_invisible']);
$com[$run]['laston'] = !empty($cs_com[$run]['users_invisible']) ? '--' : cs_date('unix', $cs_com[$run]['users_laston']);
$com_place = cs_secure($cs_com[$run]['users_place']);
$hidden = explode(',', $cs_com[$run]['users_hidden']);
if (in_array('users_place', $hidden)) {
$com_place = ($account['access_users'] > 4 or $cs_com[$run]['users_id'] == $account['users_id']) ? cs_html_italic(1) . $com_place . cs_html_italic(0) : '';
}
$com[$run]['avatar'] = empty($options['show_avatar']) || empty($cs_com[$run]['users_avatar']) ? '' : cs_html_img('uploads/board/' . $cs_com[$run]['users_avatar']);
$users_place = empty($com_place);
$com[$run]['place'] = !empty($users_place) ? '-' : $cs_com[$run]['users_place'];
$who = "users_id = " . (int) $cs_com[$run]['users_id'];
$count_user_com = cs_sql_count(__FILE__, 'comments', $who);
$com[$run]['posts'] = $count_user_com;
}
$com[$run]['comments_time'] = cs_date('unix', $cs_com[$run]['comments_time'], 1);
$com[$run]['run'] = $asc == true ? $run + 1 : $com_loop - $run;
$com[$run]['current'] = $current;
$com[$run]['comments_text'] = cs_secure($cs_com[$run]['comments_text'], 1, 1);
if (!empty($cs_com[$run]['comments_edit'])) {
$edits = explode('/', $cs_com[$run]['comments_edit']);
$euser = cs_user($edits[0], $edits[1]);
$com[$run]['comments_edit'] = cs_html_br(3);
$com[$run]['comments_edit'] .= cs_html_italic(1);
$com[$run]['comments_edit'] .= sprintf($cs_lang['lastcom'], $euser, cs_date('unix', $edits[2], 1), $edits[3]);
$com[$run]['comments_edit'] .= cs_html_italic(0);
} else {
$com[$run]['comments_edit'] = '';
}
if ($mod == 'board') {
$com[$run]['if']['quote_board'] = TRUE;
$com[$run]['fid'] = $com_fid;
$com[$run]['id'] = $cs_com[$run]['comments_id'];
} else {
$com[$run]['if']['quote_board'] = FALSE;
}
if (!empty($account['users_id']) and $mod != 'board') {
$com[$run]['if']['edit_delete'] = TRUE;
$img_quote = cs_icon('xchat', 16, $cs_lang['quote']);
$com[$run]['edit_delete'] = cs_link($img_quote, $mod, 'com_create', 'id=' . $cs_com[$run]['comments_id'], 0, $cs_lang['quote']);
if ($cs_com[$run]['users_id'] == $account['users_id'] or $account['access_comments'] >= 4) {
$img_edit = cs_icon('edit', 16, $cs_lang['edit']);
$com[$run]['edit_delete'] .= cs_link($img_edit, $mod, 'com_edit', 'id=' . $cs_com[$run]['comments_id'], 0, $cs_lang['edit']);
}
if ($account['access_comments'] >= 5) {
$img_del = cs_icon('editdelete', 16, $cs_lang['remove']);
$com[$run]['edit_delete'] .= cs_link($img_del, $mod, 'com_remove', 'id=' . $cs_com[$run]['comments_id'], 0, $cs_lang['remove']);
}
} else {
$com[$run]['if']['edit_delete'] = FALSE;
}
}
$data['if']['bottom_pages'] = $sum > $com_loop ? TRUE : FALSE;
$data['fquote']['icon'] = 'symbols/' . $cs_main['img_path'] . '/16/xchat.' . $cs_main['img_ext'];
$data['com'] = !empty($com) ? $com : '';
echo cs_subtemplate(__FILE__, $data, 'comments', 'com_view');
}
示例9: cs_sql_select
$tables = 'cups cp LEFT JOIN {pre}_games gms ON cp.games_id = gms.games_id';
$cells = 'cp.cups_name AS cups_name, gms.games_name AS games_name, cp.cups_system AS cups_system,
cp.cups_teams AS cups_teams, cp.cups_text AS cups_text, cp.cups_start AS cups_start, cp.cups_checkin AS cups_checkin,
cp.games_id AS games_id, cp.cups_brackets AS cups_brackets, cp.cups_access AS cups_access, cp.cups_id AS cups_id';
$data['cup'] = cs_sql_select(__FILE__, $tables, $cells, 'cp.cups_id = ' . $cups_id . '');
if (empty($data['cup'])) {
cs_redirect($cs_lang['no_selection'], 'cups', 'list');
}
if ($account['access_cups'] < $data['cup']['cups_access'] || $data['cup']['cups_access'] == 0) {
echo $cs_lang['access_denied'];
return;
}
$data['lang']['max_participants'] = $cs_lang['max_' . $data['cup']['cups_system']];
$data['lang']['registered_participants'] = $cs_lang['registered_' . $data['cup']['cups_system']];
$data['lang']['checkedin_participants'] = $cs_lang['checkedin_' . $data['cup']['cups_system']];
$data['var']['message'] = cs_getmsg();
$data['cup']['system'] = $data['cup']['cups_system'] == CS_CUPS_TYPE_TEAMS ? $cs_lang['team_vs_team'] : $cs_lang['user_vs_user'];
switch ($data['cup']['cups_brackets']) {
default:
case CS_CUPS_SYSTEM_KO:
$data['cup']['kind'] = $cs_lang['ko'];
break;
case CS_CUPS_SYSTEM_LB:
$data['cup']['kind'] = $cs_lang['brackets'];
break;
case CS_CUPS_SYSTEM_KO3RD:
$data['cup']['kind'] = $cs_lang['ko3rd'];
break;
}
$data['cup']['reg'] = cs_sql_count(__FILE__, 'cupsquads', 'cups_id = ' . $cups_id);
$data['cup']['checkedin'] = cs_sql_count(__FILE__, 'cupsquads', 'cupsquads_checkedin = 1 AND cups_id = ' . $cups_id);
示例10: cs_translate
<?php
// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('options');
$head = array('mod' => $cs_lang['options'], 'action' => $cs_lang['head_roots'], 'topline' => $cs_lang['body_roots'], 'message' => cs_getmsg());
require_once 'mods/clansphere/functions.php';
echo cs_manage('options', 'roots', 'clansphere', 'options', 0, $head);