function cs_abcode_pb_url($matches) { $cs_get = cs_get('id,where'); if (!empty($cs_get['id'])) { $matches[3] = empty($cs_get['id']) ? 0 : $cs_get['id']; } if (!empty($cs_get['where'])) { $matches[3] = empty($cs_get['where']) ? 0 : $cs_get['where']; } if (empty($matches[2])) { $matches[2] = $matches[1]; } return cs_link($matches[2], 'articles', 'view', 'id=' . $matches[3] . '&page=' . $matches[1]); }
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('users'); $cs_get = cs_get('id'); $data = array(); $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'])) {
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('linkus'); $cs_post = cs_post('start,sort'); $cs_get = cs_get('start,sort'); $data = array(); $start = empty($cs_get['start']) ? 0 : $cs_get['start']; if (!empty($cs_post['start'])) { $start = $cs_post['start']; } $sort = empty($cs_get['sort']) ? 2 : $cs_get['sort']; if (!empty($cs_post['sort'])) { $sort = $cs_post['sort']; } $cs_sort[1] = 'linkus_name DESC'; $cs_sort[2] = 'linkus_name ASC'; $cs_sort[3] = 'linkus_banner DESC'; $cs_sort[4] = 'linkus_banner ASC'; $order = $cs_sort[$sort]; $linkus_count = cs_sql_count(__FILE__, 'linkus'); $data['head']['count'] = $linkus_count; $data['head']['pages'] = cs_pages('linkus', 'manage', $linkus_count, $start, 0, $sort); $data['head']['getmsg'] = cs_getmsg(); $data['sort']['name'] = cs_sort('linkus', 'manage', $start, 0, 1, $sort); $data['sort']['banner'] = cs_sort('linkus', 'manage', $start, 0, 3, $sort); $select = 'linkus_id, linkus_name, linkus_banner'; $data['linkus'] = cs_sql_select(__FILE__, 'linkus', $select, 0, $order, $start, $account['users_limit']); $linkus_loop = count($data['linkus']); for ($run = 0; $run < $linkus_loop; $run++) {
<?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'); }
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('fightus'); $cs_get = cs_get('id,agree,cancel'); if (isset($cs_get['agree'])) { cs_sql_delete(__FILE__, 'fightus', $cs_get['id']); cs_cache_delete('count_fightus'); cs_redirect($cs_lang['fight_del_true'], 'fightus'); } if (isset($cs_get['cancel'])) { cs_redirect($cs_lang['del_false'], 'fightus'); } $fightus = cs_sql_select(__FILE__, 'fightus', 'fightus_nick', 'fightus_id = ' . $cs_get['id'], 0, 0, 1); if (!empty($fightus)) { $data = array(); $data['head']['body'] = sprintf($cs_lang['remove_entry'], $cs_lang['mod_name'], $fightus['fightus_nick']); $data['url']['agree'] = cs_url('fightus', 'remove', 'id=' . $cs_get['id'] . '&agree'); $data['url']['cancel'] = cs_url('fightus', 'remove', 'id=' . $cs_get['id'] . '&cancel'); echo cs_subtemplate(__FILE__, $data, 'fightus', 'remove'); } else { cs_redirect('', 'fightus'); }
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('news'); $cs_get = cs_get('id,where'); $cs_option = cs_sql_option(__FILE__, 'news'); $abcode = explode(",", $cs_option['abcode']); $cs_news_id = empty($cs_get['id']) ? 0 : $cs_get['id']; if (!empty($cs_get['where'])) { $cs_news_id = $cs_get['where']; } $from = 'news nws INNER JOIN {pre}_users usr ON nws.users_id = usr.users_id INNER JOIN {pre}_categories cat ON nws.categories_id = cat.categories_id'; $select = 'nws.news_id AS news_id, nws.news_headline AS news_headline, nws.news_time AS news_time, nws.news_text AS news_text, nws.news_close AS news_close, nws.news_public AS news_public, nws.news_pictures as news_pictures, nws.users_id AS users_id, usr.users_nick AS users_nick, usr.users_active AS users_active, usr.users_delete AS users_delete, nws.categories_id AS categories_id, cat.categories_access AS categories_access, cat.categories_picture AS categories_picture, nws.news_mirror AS news_mirror, nws.news_mirror_name AS news_mirror_name, nws.news_readmore AS news_readmore, nws.news_readmore_active AS news_readmore_active'; $cs_news = cs_sql_select(__FILE__, $from, $select, "news_id = '" . $cs_news_id . "'"); $head['head']['mod'] = $cs_lang['mod_name']; $head['head']['action'] = $cs_lang['details']; $topline = empty($cs_news['news_public']) ? 'not_public' : 'news_info'; $head['head']['topline'] = $cs_lang[$topline]; echo cs_subtemplate(__FILE__, $head, 'news', 'head'); $pub = $cs_news['categories_access'] > $account['access_news'] ? 0 : $cs_news['news_public']; if (!empty($pub)) { $com_where = "comments_mod = 'news' AND comments_fid = '" . $cs_news['news_id'] . "'"; $data['news']['comments_count'] = cs_sql_count(__FILE__, 'comments', $com_where); $start = floor($data['news']['comments_count'] / ($account['users_limit'] + 1)) * $account['users_limit']; $cs_news_com_count = $data['news']['comments_count'] - $start; $data['news']['comments_link'] = cs_link($cs_lang['comments'], 'news', 'view', 'id=' . $cs_news['news_id'] . '&start=' . $start . '#com' . $cs_news_com_count); $cs_main['page_title'] = $cs_news['news_headline']; $data['news']['news_headline'] = cs_secure($cs_news['news_headline']); $data['news']['news_time'] = cs_date('unix', $cs_news['news_time'], 1); $data['news']['news_text'] = cs_secure($cs_news['news_text'], $abcode[0], $abcode[1], $abcode[2], $abcode[3], $abcode[4]);
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('gallery', 1); $cs_post = cs_post('id,cat_id,start'); $cs_get = cs_get('id_cat_id,start'); $data = array(); $id = empty($cs_get['id']) ? 0 : $cs_get['id']; if (!empty($cs_post['id'])) { $id = $cs_post['id']; } $cat_id = empty($cs_get['cat_id']) ? 0 : $cs_get['cat_id']; if (!empty($cs_post['cat_id'])) { $cat_id = $cs_post['cat_id']; } $start = empty($cs_get['start']) ? 0 : $cs_get['start']; if (!empty($cs_post['start'])) { $start = $cs_post['start']; } require_once 'mods/gallery/functions.php'; $options = cs_sql_option(__FILE__, 'gallery'); $cols = $options['cols']; $rows = $options['rows']; $cols_rows = $account['users_limit']; $access_id = $account['access_usersgallery']; $data['lang']['getmsg'] = cs_getmsg(); $data['data']['addons'] = cs_addons('users', 'view', $id, 'usersgallery'); if (!empty($id)) { if (empty($cat_id)) { $from = 'usersgallery';
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('gallery', 1); $cs_post = cs_post('id,cat_id,more,move'); $cs_get = cs_get('id_cat_id,more,move'); $id = empty($cs_get['id']) ? 0 : $cs_get['id']; if (!empty($cs_post['id'])) { $id = $cs_post['id']; } $cat_id = empty($cs_get['cat_id']) ? 0 : $cs_get['cat_id']; if (!empty($cs_post['cat_id'])) { $cat_id = $cs_post['cat_id']; } $detail = empty($cs_get['more']) ? 0 : $cs_get['more']; if (!empty($cs_post['more'])) { $more = $cs_post['more']; } $move = empty($cs_get['move']) ? 0 : $cs_get['move']; if (!empty($cs_post['move'])) { $move = $cs_post['move']; } $access_id = $account['access_usersgallery']; $cs_options = cs_sql_option(__FILE__, 'gallery'); $data['data']['addons'] = cs_addons('users', 'view', $id, 'usersgallery'); $data['if']['error'] = FALSE; $data['if']['view'] = FALSE; $data['if']['details'] = FALSE; $data['if']['vote'] = FALSE; $select = 'usersgallery_id , usersgallery_name, usersgallery_titel, usersgallery_download, ';
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('articles'); $cs_get = cs_get(array('where', 'id', 'page')); $cs_articles_id = empty($cs_get['where']) ? $cs_get['id'] : $cs_get['where']; function cs_articles_views($id, $views) { settype($id, 'integer'); settype($views, 'integer'); $_SESSION['articles'] = isset($_SESSION['articles']) ? $_SESSION['articles'] : array(); if (empty($_SESSION['articles'][$id])) { $_SESSION['articles'][$id] = true; cs_sql_update(__FILE__, 'articles', array('articles_views'), array(1 + $views), $id, 0, 0); } } $cells = 'articles_views, articles_headline, users_id, articles_time, articles_text, articles_fornext, articles_com, categories_id'; $cs_articles = cs_sql_select(__FILE__, 'articles', $cells, "articles_id = '" . $cs_articles_id . "'"); $categories = cs_sql_select(__FILE__, 'categories', 'categories_picture, categories_access', "categories_id = '" . $cs_articles['categories_id'] . "'"); if ($categories['categories_access'] > $account['access_categories']) { echo $cs_lang['nocat_axx']; } else { $cs_main['page_title'] = $cs_articles['articles_headline']; cs_articles_views($cs_articles_id, $cs_articles['articles_views']); $page = empty($cs_get['page']) ? 1 : $cs_get['page']; $data['head']['articles_headline'] = cs_secure($cs_articles['articles_headline']); $cs_articles_user = cs_sql_select(__FILE__, 'users', 'users_nick, users_active, users_delete', "users_id = '" . $cs_articles['users_id'] . "'"); $data['head']['users_link'] = cs_user($cs_articles['users_id'], $cs_articles_user['users_nick'], $cs_articles_user['users_active'], $cs_articles_user['users_delete']) . ' '; $data['head']['articles_date'] = cs_date('unix', $cs_articles['articles_time'], 1); $data['head']['pages'] = $page;
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('gbook'); $cs_post = cs_post('start'); $cs_get = cs_get('start'); $start = empty($cs_get['start']) ? 0 : $cs_get['start']; if (!empty($cs_post['start'])) { $start = $cs_post['start']; } $gbook_count = cs_sql_count(__FILE__, 'gbook', "gbook_users_id = '0' AND gbook_lock = '1'"); $data['head']['entry'] = cs_link($cs_lang['submit'], 'gbook', 'entry', 'id=0&from=list'); $data['head']['count'] = $gbook_count; $data['head']['pages'] = cs_pages('gbook', 'list', $gbook_count, $start); $data['head']['getmsg'] = cs_getmsg(); $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_icq AS gbook_icq, gbk.gbook_jabber AS gbook_jabber, gbk.gbook_skype AS gbook_skype, '; $select .= 'gbk.gbook_url AS gbook_url, gbk.gbook_town AS gbook_town, gbk.gbook_text AS gbook_text, gbk.gbook_ip AS gbook_ip, '; $select .= 'usr.users_nick AS users_nick, usr.users_place AS users_place, usr.users_icq AS users_icq, usr.users_jabber AS users_jabber, '; $select .= 'usr.users_skype AS users_skype, usr.users_email AS users_email, usr.users_url AS users_url, usr.users_hidden AS users_hidden, usr.users_active AS users_active, usr.users_delete AS users_delete'; $where = "gbook_users_id = '0' AND gbook_lock = '1'"; $order = 'gbk.gbook_id DESC'; $cs_gbook = cs_sql_select(__FILE__, $from, $select, $where, $order, $start, $account['users_limit']); $gbook_loop = count($cs_gbook); $c = 0; for ($run = 0; $run < $gbook_loop; $run++) { $entry_count = $gbook_count - $start - $c; $c++; $gbook[$run]['entry_count'] = $entry_count;
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('gbook'); $cs_post = cs_post('id,from'); $cs_get = cs_get('id,from'); $data = array(); $from = 'list'; $id = empty($cs_get['id']) ? 0 : $cs_get['id']; if (!empty($cs_post['id'])) { $id = $cs_post['id']; } if (!empty($_POST['from'])) { $from = $_POST['from']; } elseif (!empty($_GET['from'])) { $from = $_GET['from']; } $from = cs_secure($from, 0, 0, 0, 0, 0); $cs_options = cs_sql_option(__FILE__, 'gbook'); $users_id = $account['users_id']; $error = ''; $ip = cs_getip(); //check if user exists if ($id != 0) { $users_check = cs_sql_count(__FILE__, 'users', "users_id = '" . (int) $id . "'"); if (empty($users_check)) { cs_redirect($cs_lang['user_not_exist'], 'gbook', 'list'); } if ($users_id == 0) { $error .= $cs_lang['error_login'] . cs_html_br(1);
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('gallery'); $cs_post = cs_post('where,access,start,sort'); $cs_get = cs_get('where,access,start,sort'); $data = array(); $folders_id = empty($cs_get['where']) ? 0 : $cs_get['where']; if (!empty($cs_post['where'])) { $folders_id = $cs_post['where']; } $access_id = empty($cs_get['access']) ? 0 : $cs_get['access']; if (!empty($cs_post['access'])) { $access_id = $cs_post['access']; } $start = empty($cs_get['start']) ? 0 : $cs_get['start']; if (!empty($cs_post['start'])) { $start = $cs_post['start']; } $sort = empty($cs_get['sort']) ? 2 : $cs_get['sort']; if (!empty($cs_post['sort'])) { $sort = $cs_post['sort']; } require_once 'mods/gallery/functions.php'; $options = cs_sql_option(__FILE__, 'gallery'); $where = 0; if (!empty($folders_id) and empty($access_id)) { $where = "folders_id = '" . cs_sql_escape($folders_id) . "'"; } elseif (!empty($access_id) and empty($folders_id)) { $where = "gallery_access = '" . cs_sql_escape($access_id) . "'";
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('gallery'); $cs_post = cs_post('where,folders_id'); $cs_get = cs_get('where,folders_id'); $data = array(); $gid = empty($cs_get['where']) ? 0 : $cs_get['where']; if (!empty($cs_post['where'])) { $gid = $cs_post['where']; } $folder_id = empty($cs_get['folders_id']) ? 0 : $cs_get['folders_id']; if (!empty($cs_post['folders_id'])) { $folder_id = $cs_post['folders_id']; } require_once 'mods/gallery/functions.php'; $time = cs_time(); $voted_ip = cs_getip(); $exp = extension_loaded('gd'); $option = cs_sql_option(__FILE__, 'gallery'); $id = empty($gid) ? $folder_id : $gid; $select = 'gallery_id, gallery_name, gallery_titel, gallery_description, '; $select .= 'gallery_time, gallery_vote, gallery_count, folders_id, users_id'; $where = 'gallery_id = ' . $id . ' AND gallery_status = 1 AND gallery_access <=' . $account['access_gallery']; $cs_gallery = cs_sql_select(__FILE__, 'gallery', $select, $where); $gallery_loop = count($cs_gallery); if (empty($gallery_loop)) { $data['head']['error'] = cs_link($cs_lang['mod_name'], 'gallery', 'list') . ' - ' . $cs_lang['head_view']; echo cs_subtemplate(__FILE__, $data, 'gallery', 'error'); } else {
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('news'); $data = array(); $cs_post = cs_post('where'); $cs_get = cs_get('where'); require_once 'mods/categories/functions.php'; $cat_id = empty($cs_get['where']) ? 0 : $cs_get['where']; if (!empty($cs_post['where'])) { $cat_id = $cs_post['where']; } $cs_option = cs_sql_option(__FILE__, 'news'); $abcode = explode(",", $cs_option['abcode']); $where = "nws.news_public = 1 AND cat.categories_access <= " . $account['access_news']; if (!empty($cat_id)) { $cat_where = 'categories_subid = ' . $cat_id; $categories = cs_sql_select(__FILE__, 'categories', 'categories_id', $cat_where, 0, 0, 0); if (!empty($categories)) { $where .= " AND (cat.categories_id = '" . $cat_id . "'"; for ($a = 0; $a < count($categories); $a++) { $where .= " OR cat.categories_id = '" . $categories[$a]['categories_id'] . "'"; } $where .= ")"; } else { $where .= " AND cat.categories_id = '" . $cat_id . "'"; } } $start = empty($_REQUEST['start']) ? 0 : (int) $_REQUEST['start']; $data['cats']['dropdown'] = cs_categories_dropdown2('news', $cat_id, 0, 'where');
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('gbook'); $cs_post = cs_post('where,start,sort'); $cs_get = cs_get('where,start,sort'); $data = array(); if (!empty($_GET['active'])) { cs_sql_update(__FILE__, 'gbook', array('gbook_lock'), array('1'), (int) $_GET['active']); cs_redirectmsg($cs_lang['active_done']); } if (!empty($_GET['deactive'])) { cs_sql_update(__FILE__, 'gbook', array('gbook_lock'), array('0'), (int) $_GET['deactive']); cs_redirectmsg($cs_lang['deactive_done']); } $id = empty($cs_get['where']) ? 0 : $cs_get['where']; if (!empty($cs_post['where'])) { $id = $cs_post['where']; } $start = empty($cs_get['start']) ? 0 : $cs_get['start']; if (!empty($cs_post['start'])) { $start = $cs_post['start']; } $sort = empty($cs_get['sort']) ? 1 : $cs_get['sort']; if (!empty($cs_post['sort'])) { $sort = $cs_post['sort']; } $cs_sort[1] = 'gbk.gbook_time DESC'; $cs_sort[2] = 'gbk.gbook_time ASC'; $cs_sort[3] = 'usr.users_email DESC';
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('wars'); $cs_get = cs_get('catid,squadid'); $cs_option = cs_sql_option(__FILE__, 'wars'); $data = array(); $select = 'war.games_id AS games_id, cln.clans_short AS clans_short, war.wars_score1 AS wars_score1, ' . 'war.wars_score2 AS wars_score2, war.wars_date AS wars_date, war.wars_id AS wars_id'; $from = 'wars war INNER JOIN {pre}_clans cln ON war.clans_id = cln.clans_id'; $order = 'war.wars_date DESC'; $where = empty($cs_get['squadid']) ? 'war.wars_status = \'played\'' : 'war.wars_status = \'played\' AND war.squads_id = ' . $cs_get['squadid']; if (!empty($cs_get['catid'])) { $where .= ' AND war.categories_id = ' . $cs_get['catid']; } $cs_wars = cs_sql_select(__FILE__, $from, $select, $where, $order, 0, $cs_option['max_navlist']); if (!empty($cs_wars)) { if ($cs_option['max_navlist'] == 1) { $cs_wars = array(0 => $cs_wars); } $all = count($cs_wars); for ($i = 0; $i < $all; $i++) { $cs_wars[$i]['game_icon'] = file_exists('uploads/games/' . $cs_wars[$i]['games_id'] . '.gif') ? cs_html_img('uploads/games/' . $cs_wars[$i]['games_id'] . '.gif') : ''; $secure_short = cs_secure($cs_wars[$i]['clans_short']); $cs_wars[$i]['enemy'] = cs_link($secure_short, 'wars', 'view', 'id=' . $cs_wars[$i]['wars_id']); $result = $cs_wars[$i]['wars_score1'] - $cs_wars[$i]['wars_score2']; $icon = $result > 0 ? 'green' : 'red'; if (empty($result)) { $icon = 'grey'; } $cs_wars[$i]['icon'] = cs_html_img('symbols/clansphere/' . $icon . '.gif');
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('banners'); $cs_get = cs_get('catid'); $cs_option = cs_sql_option(__FILE__, 'banners'); $data = array(); $where = empty($cs_get['catid']) ? 0 : 'categories_id = ' . $cs_get['catid']; $data['banners'] = cs_sql_select(__FILE__, 'banners', 'banners_picture, banners_alt, banners_url', $where, 'banners_order ASC', 0, $cs_option['max_navlist']); $banners_loop = count($data['banners']); if (empty($data['banners'])) { echo $cs_lang['no_banners']; } else { for ($run = 0; $run < $banners_loop; $run++) { $go = cs_secure($data['banners'][$run]['banners_picture']); $picture = cs_html_img($go, 0, 0, " style=\"margin-bottom:4px\"", cs_secure($data['banners'][$run]['banners_alt'])); $data['banners'][$run]['image'] = cs_html_link('http://' . cs_secure($data['banners'][$run]['banners_url']), $picture) . ' '; } echo cs_subtemplate(__FILE__, $data, 'banners', 'navlist'); }
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('gbook'); $cs_post = cs_post('id,where,start'); $cs_get = cs_get('id,where,sort'); $where = empty($cs_get['id']) ? 0 : $cs_get['id']; if (!empty($cs_post['id'])) { $where = $cs_post['id']; } $start = empty($cs_get['start']) ? 0 : $cs_get['start']; if (!empty($cs_post['start'])) { $start = $cs_post['start']; } if (empty($where)) { $where = empty($cs_get['where']) ? 0 : $cs_get['where']; if (!empty($cs_post['where'])) { $where = $cs_post['where']; } } $gbook_count = cs_sql_count(__FILE__, 'gbook', "gbook_users_id = '" . $where . "' AND gbook_lock = 1"); $data['head']['addons'] = cs_addons('users', 'view', $where, 'gbook'); $data['head']['pages'] = cs_pages('gbook', 'users', $gbook_count, $start, $where); $data['head']['new_entry'] = cs_link($cs_lang['submit'], 'gbook', 'entry', 'id=' . $where); $data['head']['count'] = $gbook_count; $data['head']['getmsg'] = cs_getmsg(); $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, '; $select .= 'gbk.gbook_nick AS gbook_nick, gbk.gbook_email AS gbook_email, gbk.gbook_icq AS gbook_icq, '; $select .= 'gbk.gbook_jabber AS gbook_jabber, gbk.gbook_skype AS gbook_skype, gbk.gbook_url AS gbook_url, ';