function getUserIcons($cs_lang, $users_id, $nick, $hidden = 0, $email = 0, $icq = 0, $jabber = 0, $url = 0, $skype = 0) { global $account; $allow = $users_id == $account['users_id'] or $account['access_users'] > 4 ? 1 : 0; $hidden = explode(',', $hidden); if (in_array('users_email', $hidden) && empty($allow)) { $email = ''; } if (in_array('users_icq', $hidden) && empty($allow)) { $icq = ''; } if (in_array('users_jabber', $hidden) && empty($allow)) { $jabber = ''; } if (in_array('users_skype', $hidden) && empty($allow)) { $skype = ''; } if (in_array('users_url', $hidden) && empty($allow)) { $url = ''; } $icons = ''; $icons .= !empty($email) ? cs_html_mail($email, cs_icon('mail_generic')) : ''; $icons .= $account['access_users'] >= 2 ? cs_link(cs_icon('mail_send'), 'messages', 'create', 'to_id=' . $users_id, 0, $cs_lang['send_message']) : ''; $icons .= !empty($icq) ? cs_html_link('http://www.icq.com/people/' . $icq, cs_icon('licq'), 1, 0, $cs_lang['icq']) : ''; $icons .= !empty($jabber) ? cs_html_jabbermail($jabber, cs_icon('jabber_protocol')) : ''; $icons .= !empty($skype) ? cs_html_link('skype:' . $skype . '?userinfo', cs_html_img('http://mystatus.skype.com/smallicon/' . $skype, '16', '16', '0', 'Skype'), 0, 0, $cs_lang['skype']) : ''; $icons .= !empty($url) ? cs_html_link('http://' . $url, cs_icon('gohome'), 1, 0, $cs_lang['homepage']) : ''; return $icons; }
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('partner'); $data['categories'] = array(); $op_partner = cs_sql_option(__FILE__, 'partner'); $data['partner']['list_width'] = $op_partner['def_width_listimg'] + 20; $categories_select = 'categories_name, categories_id, categories_order'; $categories_order = 'categories_order DESC'; $categories_data = cs_sql_select(__FILE__, 'categories', $categories_select, "categories_mod = 'partner'", $categories_order, 0, 0); $categories_loop = count($categories_data); for ($run = 0; $run < $categories_loop; $run++) { $data['categories'][$run]['categories_name'] = $categories_data[$run]['categories_name']; $categories_id = $categories_data[$run]['categories_id']; $data['categories'][$run]['partner'] = array(); $select = 'partner_id, partner_name, partner_url, partner_text, partner_alt, partner_limg'; $order = 'partner_priority ASC'; $where = "categories_id = '" . $categories_id . "'"; $cs_partner = cs_sql_select(__FILE__, 'partner', $select, $where, $order, 0, 0); $partner_loop = count($cs_partner); for ($run2 = 0; $run2 < $partner_loop; $run2++) { $data['categories'][$run]['partner'][$run2]['partner_name'] = cs_html_link('http://' . $cs_partner[$run2]['partner_url'], cs_secure($cs_partner[$run2]['partner_name'])); $data['categories'][$run]['partner'][$run2]['partner_text'] = cs_secure($cs_partner[$run2]['partner_text'], 1); $data['categories'][$run]['partner'][$run2]['partner_alt'] = cs_secure($cs_partner[$run2]['partner_alt']); $place = "uploads/partner/"; $data['categories'][$run]['partner'][$run2]['partner_limg'] = cs_html_link('http://' . $cs_partner[$run2]['partner_url'], cs_html_img($place . $cs_partner[$run2]['partner_limg'], 0, 0, 0, $cs_partner[$run2]['partner_alt'])); } } echo cs_subtemplate(__FILE__, $data, 'partner', 'list');
if (empty($cs_clan['clans_picture'])) { $data['clans']['img'] = $cs_lang['nopic']; } else { $place = 'uploads/clans/' . $cs_clan['clans_picture']; $size = getimagesize($cs_main['def_path'] . '/' . $place); $data['clans']['img'] = cs_html_img($place, $size[1], $size[0]); } $data['clans']['short'] = cs_secure($cs_clan['clans_short']); if (!empty($cs_clan['clans_country'])) { include_once 'lang/' . $account['users_lang'] . '/countries.php'; $data['clans']['country'] = cs_html_img('symbols/countries/' . $cs_clan['clans_country'] . '.png', 11, 16) . ' ' . $cs_country[$cs_clan['clans_country']]; } else { $data['clans']['country'] = '-'; } if (!empty($cs_clan['clans_url'])) { $data['clans']['url'] = cs_html_link('http://' . $cs_clan['clans_url'], cs_secure($cs_clan['clans_url'])); } else { $data['clans']['url'] = ''; } if (!empty($cs_clan['clans_since'])) { $content = cs_date('date', $cs_clan['clans_since']); $birth = explode('-', $cs_clan['clans_since']); $age = cs_datereal('Y') - $birth[0]; if (cs_datereal('m') <= $birth[1]) { $age--; } if (cs_datereal('d') >= $birth[2] and cs_datereal('m') == $birth[1]) { $age++; } $content .= ' (' . $age . ')'; $data['clans']['since'] = $content;
} else { $temp_mirror = explode("\n", $cs_news['news_mirror']); $temp_mirror_name = explode("\n", $cs_news['news_mirror_name']); $run_loop_2 = count($temp_mirror); } $prev_run = 0; for ($run_prev = 1; $run_prev < $run_loop_2; $run_prev++) { $num = $run_prev; if ($run_prev == count($temp_mirror) - 1) { $data['prev_mirror'][$prev_run]['dot'] = ''; } elseif (!empty($run_prev)) { $data['prev_mirror'][$prev_run]['dot'] = ' - '; } else { $data['prev_mirror'][$prev_run]['dot'] = ' - '; } $data['prev_mirror'][$prev_run]['news_mirror'] = cs_html_link($temp_mirror[$run_prev], $temp_mirror_name[$run_prev]); $prev_run++; } } $data['if']['preview'] = true; } if (isset($_POST['mirror'])) { $cs_news['categories_id'] = empty($_POST['categories_name']) ? $_POST['categories_id'] : cs_categories_create('news', $_POST['categories_name']); $cs_news['news_close'] = isset($_POST['news_close']) ? $_POST['news_close'] : 0; $cs_news['news_public'] = isset($_POST['news_public']) ? $_POST['news_public'] : 0; $cs_news['news_attached'] = isset($_POST['news_attached']) ? $_POST['news_attached'] : 0; $cs_news['news_headline'] = $_POST['news_headline']; $cs_news['news_time'] = cs_time(); $cs_news['news_publishs_at'] = isset($_POST['publish_at']) ? cs_datepost('date', 'unix') : 0; $cs_news['news_readmore_active'] = isset($_POST['news_readmore_active']) ? $_POST['news_readmore_active'] : 0; $cs_news['news_text'] = empty($cs_main['rte_html']) ? $_POST['news_text'] : cs_abcode_inhtml($_POST['news_text'], 'add');
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('links'); $data = array(); $links_count = cs_sql_count(__FILE__, 'links', 'links_sponsor = 1'); $data['head']['body'] = sprintf($cs_lang['all1'], $links_count); $select = 'links_name, links_url, links_banner, links_info'; $data['links'] = cs_sql_select(__FILE__, 'links', $select, 'links_sponsor = 1', 0, 0, 0); $links_loop = count($data['links']); for ($run = 0; $run < $links_loop; $run++) { $data['links'][$run]['name'] = cs_secure($data['links'][$run]['links_name']); $target = 'http://' . $data['links'][$run]['links_url']; $data['links'][$run]['url_img'] = cs_html_link($target, $data['links'][$run]['links_url']); if (!empty($data['links'][$run]['links_banner'])) { $place = 'uploads/links/' . $data['links'][$run]['links_banner']; $img = cs_html_img($place, 0, 0, 0, $data['links'][$run]['links_name']); $data['links'][$run]['url_img'] = cs_html_link($target, $img); } $data['links'][$run]['info'] = cs_secure($data['links'][$run]['links_info'], 1, 1, 1, 1); } echo cs_subtemplate(__FILE__, $data, 'links', 'sponsors');
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_temp = cs_translate('clansphere'); $dir = empty($_GET['dir']) ? '' : $_GET['dir']; if (empty($dir) or !preg_match("=^[_a-z0-9-]+\$=i", $dir)) { $dir = $cs_main['def_tpl']; } include 'templates/' . $dir . '/info.php'; $data['temp_view']['name'] = $mod_info['name']; $data['temp_view']['version'] = $mod_info['version']; $data['temp_view']['mod_released'] = cs_date('date', $mod_info['released']); $data['temp_view']['creator'] = $mod_info['creator']; $data['temp_view']['mod_team'] = $mod_info['team']; $data['temp_view']['mod_url'] = cs_html_link('http://' . $mod_info['url'], $mod_info['url']); $data['temp_view']['mod_desc'] = $mod_info['text']; echo cs_subtemplate(__FILE__, $data, 'clansphere', 'temp_view');
} } $data['if']['show'] = false; if (!empty($cs_news['news_mirror'])) { $data['if']['show'] = true; $temp_mirror = explode("\n", $cs_news['news_mirror']); $temp_mirror_name = explode("\n", $cs_news['news_mirror_name']); $tpl_run = 0; for ($run_mirror = 1; $run_mirror < count($temp_mirror); $run_mirror++) { $num = $run_mirror; if ($run_mirror == count($temp_mirror) - 1) { $data['mirror'][$tpl_run]['dot'] = ''; } elseif (!empty($run_mirror)) { $data['mirror'][$tpl_run]['dot'] = ' - '; } else { $data['mirror'][$tpl_run]['dot'] = ' - '; } $url = strpos($temp_mirror[$run_mirror], '://') === false ? 'http://' . $temp_mirror[$run_mirror] : $temp_mirror[$run_mirror]; $data['mirror'][$tpl_run]['news_mirror'] = cs_html_link($url, $temp_mirror_name[$run_mirror]); $tpl_run++; } } echo cs_subtemplate(__FILE__, $data, 'news', 'view'); echo cs_html_anchor('com0'); include_once 'mods/comments/functions.php'; if (!empty($data['news']['comments_count'])) { echo cs_html_br(1); echo cs_comments_view($cs_news_id, 'news', 'view', $data['news']['comments_count']); } echo cs_comments_add($cs_news_id, 'news', $cs_news['news_close']); }
$mods['dir'] == $where ? $sel = 1 : ($sel = 0); $data['mod'][$run]['sel'] = cs_html_option($mods['name'], $mods['dir'], $sel); $run++; } } $data['head']['getmsg'] = cs_getmsg(); $data['sort']['name'] = cs_sort('categories', 'manage', $start, $where, 1, $sort); $data['sort']['url'] = cs_sort('categories', 'manage', $start, $where, 3, $sort); $select = 'categories_id, categories_name, categories_url, categories_subid'; $data['cat'] = cs_sql_select(__FILE__, 'categories', $select, $mdp, $order, $start, $account['users_limit']); $data['cat'] = cs_catsort($data['cat']); $categories_loop = !empty($data['cat']) ? count($data['cat']) : ''; for ($run = 0; $run < $categories_loop; $run++) { $blank = ''; if (!empty($data['cat'][$run]['layer'])) { for ($i = 0; $i < $data['cat'][$run]['layer']; $i++) { $blank .= ' '; } $blank .= cs_icon('add_sub_task'); } $data['cat'][$run]['subcat_layer'] = $blank; $cs_cat_name = cs_secure($data['cat'][$run]['categories_name']); $data['cat'][$run]['category'] = cs_link($cs_cat_name, 'categories', 'view', 'id=' . $data['cat'][$run]['categories_id']); $data['cat'][$run]['url'] = ''; if (!empty($data['cat'][$run]['categories_url'])) { $cs_cat_url = cs_secure($data['cat'][$run]['categories_url']); $data['cat'][$run]['url'] = cs_html_link('http://' . $cs_cat_url, $cs_cat_url); } $data['cat'][$run]['id'] = $data['cat'][$run]['categories_id']; } echo cs_subtemplate(__FILE__, $data, 'categories', 'manage');
$nick = $data['squad']['clans_tagpos'] == 1 ? $data['squad']['clans_tag'] . ' ' . $users_nick : $users_nick . ' ' . $data['squad']['clans_tag']; $data['members'][$run]['users_url'] = cs_user($data['members'][$run]['users_id'], $data['members'][$run]['users_nick'], $data['members'][$run]['users_active'], $data['members'][$run]['users_delete']); } //ranks $data['if']['rank'] = 0; if (!empty($account['access_ranks'])) { $cells = 'ranks_id, ranks_name, ranks_url, ranks_img, ranks_code'; $ranks = cs_sql_select(__FILE__, 'ranks', $cells, "squads_id = '" . $squads_id . "'", 'ranks_name', 0, 5); $ranks_loop = count($ranks); $data['if']['rank'] = empty($ranks_loop) ? FALSE : TRUE; for ($run = 0; $run < $ranks_loop; $run++) { $ranks[$run]['name'] = cs_secure($ranks[$run]['ranks_name']); $ranks[$run]['picture'] = ''; if (!empty($ranks[$run]['ranks_url']) and $ranks[$run]['ranks_img'] != 'http://') { $picture = cs_html_img($ranks[$run]['ranks_img']); $ranks[$run]['picture'] = cs_html_link('http://' . $ranks[$run]['ranks_url'], $picture); } else { $ranks[$run]['picture'] = $ranks[$run]['ranks_code']; } } } $data['ranks'] = !empty($ranks) ? $ranks : array(0 => ''); //awards $data['if']['award'] = 0; if (!empty($account['access_awards'])) { $from = 'awards aws INNER JOIN {pre}_games gms ON aws.games_id = gms.games_id'; $select = 'aws.awards_id AS awards_id, aws.awards_time AS awards_time, aws.awards_event AS awards_event, aws.awards_event_url AS awards_event_url, aws.awards_rank AS awards_rank'; $awards = cs_sql_select(__FILE__, $from, $select, "squads_id = '" . $squads_id . "'", 'awards_time DESC', 0, 5); $awards_loop = count($awards); $data['if']['award'] = empty($awards_loop) ? FALSE : TRUE; $medals = array(1 => 'gold', 2 => 'silber', 3 => 'bronze');
$file = $cs_thread_files[$run]['boardfiles_name']; $extension = strlen(strrchr($file, ".")); $name = strlen($file); $ext = substr($file, $name - $extension + 1, $name); $cs_thread_files[$run]['boardfiles_typ'] = $ext; } require_once 'mods/clansphere/filetype.php'; for ($run = 0; $run < $loop_files; $run++) { $ext = $cs_thread_files[$run]['boardfiles_typ']; $file = $cs_thread_files[$run]['boardfiles_name']; if (file_exists('uploads/board/files/' . $cs_thread_files[$run]['boardfiles_id'] . '.' . $ext)) { $file_file = filesize('uploads/board/files/' . $cs_thread_files[$run]['boardfiles_id'] . '.' . $ext); $data['files'][$run]['file'] = cs_filetype($ext) . ' ' . cs_html_link($cs_main['php_self']['dirname'] . 'mods/board/attachment.php?id=' . $cs_thread_files[$run]['boardfiles_id'], $file, 1) . ' (' . cs_filesize($file_file) . ' - ' . $cs_thread_files[$run]['boardfiles_downloaded'] . ' ' . $cs_lang['times'] . ' )'; } elseif (file_exists('uploads/board/files/' . $file)) { $file_file = filesize('uploads/board/files/' . $file); $data['files'][$run]['file'] = cs_filetype($ext) . ' ' . cs_html_link($cs_main['php_self']['dirname'] . 'mods/board/attachment.php?id=' . $file, $file, 1) . ' (' . cs_filesize($file_file) . ' - ' . $cs_thread_files[$run]['boardfiles_downloaded'] . ' ' . $cs_lang['times'] . ' )'; } else { $data['files'][$run]['file'] = $cs_lang['no_att_file']; } } } } //Files Ende $data['thread_desc']['signature'] = getUserSignature($data['thread']['users_signature']); if (!empty($data['thread']['threads_edit'])) { $data['thread_desc']['checkedit'] = checkLastEdit($data['thread']['threads_edit'], $cs_lang); } //board_safemode($data['thread']['users_nick'], $data['thread']['threads_time'], $options); $data['thread_desc']['laston'] = cs_userstatus($data['thread']['users_laston'], $data['thread']['users_invisible'], 1); //echo cs_html_hr('100%'); $data['thread_desc']['users_icons'] = getUserIcons($cs_lang, $data['thread']['users_id'], $data['thread']['users_nick'], $data['thread']['users_hidden'], $data['thread']['users_email'], $data['thread']['users_icq'], $data['thread']['users_jabber'], $data['thread']['users_url'], $data['thread']['users_skype']);
$data['link']['attachments_count'] = $count_att; if (empty($count_att)) { $data['attachments'] = ''; } require_once 'mods/clansphere/filetype.php'; for ($run = 0; $run < $count_att; $run++) { $file = $cs_att[$run]['boardfiles_name']; $extension = strlen(strrchr($file, ".")); $name = strlen($file); $ext = substr($file, $name - $extension + 1, $name); $ext_lower = strtolower($ext); $data['attachments'][$run]['img'] = cs_filetype($ext_lower); if (file_exists('uploads/board/files/' . $cs_att[$run]['boardfiles_id'] . '.' . $ext)) { $file_file = filesize('uploads/board/files/' . $cs_att[$run]['boardfiles_id'] . '.' . $ext); $data['attachments'][$run]['filename'] = cs_html_link('mods/board/attachment.php?id=' . $cs_att[$run]['boardfiles_id'], $file, 1); $data['attachments'][$run]['size'] = cs_filesize($file_file); } elseif (file_exists('uploads/board/files/' . $file)) { $file_file = filesize('uploads/board/files/' . $file); $data['attachments'][$run]['filename'] = cs_html_link('mods/board/attachment.php?name=' . $file, $file, 1); $data['attachments'][$run]['size'] = cs_filesize($file_file); } else { $data['attachments'][$run]['filename'] = $cs_lang['no_att_exist']; $data['attachments'][$run]['size'] = cs_filesize(0); } $headline = strlen($cs_att[$run]['threads_headline']) <= 15 ? $cs_att[$run]['threads_headline'] : cs_substr($cs_att[$run]['threads_headline'], 0, 15) . '...'; $data['attachments'][$run]['topics'] = cs_link($headline, 'board', 'thread', 'where=' . $cs_att[$run]['threads_id'], 0, $cs_att[$run]['threads_headline']); $data['attachments'][$run]['downloaded'] = $cs_att[$run]['boardfiles_downloaded']; $img_del = cs_icon('editdelete', 16, $cs_lang['remove']); $data['attachments'][$run]['remove'] = cs_link($img_del, 'board', 'delatt', 'id=' . $cs_att[$run]['boardfiles_id'], 0, $cs_lang['remove']); } echo cs_subtemplate(__FILE__, $data, 'board', 'attachments');
if (empty($dir) or !preg_match("=^[_a-z0-9-]+\$=i", $dir)) { $dir = $cs_main['def_mod']; } $cs_lang_mod = cs_translate('modules', 1); $cs_lang_acc = cs_translate('access', 1); include 'mods/' . $dir . '/info.php'; $cs_lang = empty($cs_lang) ? array() : $cs_lang; # combine translations of target info file with mods access and modules $cs_lang = array_merge($cs_lang, $cs_lang_acc, $cs_lang_mod); $data['mod']['name'] = $mod_info['name']; $data['mod']['version'] = $mod_info['version']; $data['mod']['released'] = cs_date('date', $mod_info['released']); $data['mod']['protected'] = empty($mod_info['protected']) ? $cs_lang['no'] : $cs_lang['yes']; $data['mod']['creator'] = $mod_info['creator']; $data['mod']['team'] = $mod_info['team']; $data['mod']['url'] = cs_html_link('http://' . $mod_info['url'], $mod_info['url']); $data['mod']['icon_48'] = empty($mod_info['icon']) ? '' : cs_icon($mod_info['icon'], '48'); $data['mod']['icon_16'] = empty($mod_info['icon']) ? '' : cs_icon($mod_info['icon']); $data['mod']['text'] = $mod_info['text']; if (!empty($account['access_explorer'])) { $data['if']['access_explorer'] = TRUE; include_once 'mods/explorer/functions.php'; $more = 'dir=' . cs_explorer_path('mods/' . $dir, 'escape'); $data['extended']['link'] = cs_link($cs_lang['jump_to_explorer'], 'explorer', 'roots', $more); } if (file_exists('mods/' . $dir . '/access.php')) { $sort = empty($_REQUEST['sort']) ? 2 : $_REQUEST['sort']; $data['sort']['file'] = cs_sort('modules', 'view', 0, 0, 1, $sort, 'dir=' . $dir); $data['sort']['access'] = cs_sort('modules', 'view', 0, 0, 3, $sort, 'dir=' . $dir); $axx_file = array(); include 'mods/' . $dir . '/access.php';
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('abcode'); $name = empty($_GET['name']) ? '' : $_GET['name']; $name = preg_replace('/[^\\w]/s', '', $name); $where = "abcode_func = 'img'"; $cs_abcode = cs_sql_select(__FILE__, 'abcode', '*', $where, 'abcode_pattern ASC', 0, 0); $abcode_loop = count($cs_abcode); for ($run = 0; $run < $abcode_loop; $run++) { $data['abcode'][$run]['pattern'] = cs_secure($cs_abcode[$run]['abcode_pattern']); $img = cs_secure($cs_abcode[$run]['abcode_pattern'], 1, 1); $url = "javascript:abc_insert_list('" . $cs_abcode[$run]['abcode_pattern'] . "','','" . $name . "')"; $data['abcode'][$run]['result'] = cs_html_link($url, $img, 0); } echo cs_subtemplate(__FILE__, $data, 'abcode', 'listimg');
function cs_cspnews($all = 0) { $remote_url_secnews = 'http://www.clansphere.net/clansphere/updates.txt'; $remote_url_newsid = 'http://www.clansphere.net/index/news/view/id/'; $timeout = 5; $content = ''; global $cs_lang, $cs_main; $cs_lang = cs_translate('clansphere'); cs_cache_delete('op_clansphere'); $id = empty($_GET['sec_news']) ? 0 : (int) $_GET['sec_news']; $data['if']['one'] = false; $data['if']['all'] = false; $allow_url_fopen = ini_get('allow_url_fopen'); if (empty($allow_url_fopen)) { $error = $cs_lang['need_url_fopen']; } else { if (!empty($id) and empty($all)) { $opt_where = "options_mod = 'clansphere' AND options_name = 'sec_last'"; cs_sql_update(__FILE__, 'options', array('options_value'), array($id), 0, $opt_where); } else { $opt_where = "options_mod = 'clansphere' AND options_name = 'sec_time'"; cs_sql_update(__FILE__, 'options', array('options_value'), array(cs_time()), 0, $opt_where); ini_set("default_socket_timeout", $timeout); $rfp = fopen($remote_url_secnews, 'r'); if (is_resource($rfp)) { stream_set_timeout($rfp, $timeout); $content = fread($rfp, 4096); fclose($rfp); } if (!empty($content)) { $content = str_replace(array("\r", "\n"), '', $content); $news = explode(';', $content); $content = explode('@', $news[0]); if ($content[0] > $cs_main['sec_news']) { $opt_where = "options_mod = 'clansphere' AND options_name = 'sec_news'"; $sec_news = (int) $content[0]; cs_sql_update(__FILE__, 'options', array('options_value'), array($sec_news), 0, $opt_where); } if (empty($all)) { if ($content[0] > $cs_main['sec_last']) { $url = $remote_url_newsid . $content[0]; $data['info']['text'] = htmlentities($content[1], ENT_QUOTES, $cs_main['charset']); $data['info']['view'] = cs_html_link($url, $cs_lang['view']); $data['info']['read'] = cs_link($cs_lang['read'], 'clansphere', 'sec_news', 'sec_news=' . $content[0]); $data['info']['showall'] = cs_link($cs_lang['showall'], 'clansphere', 'sec_news'); $data['if']['one'] = true; $data['if']['all'] = false; return cs_subtemplate(__FILE__, $data, 'clansphere', 'news'); } } else { $data['if']['one'] = false; $data['if']['all'] = true; $count = count($news) - 1; for ($run = 0; $run < $count; $run++) { $content = explode("@", $news[$run]); $data['infos'][$run]['text'] = cs_secure($content[1]); $url = $remote_url_newsid . $content[0]; $data['infos'][$run]['view'] = cs_html_link($url, $cs_lang['view']); } return cs_subtemplate(__FILE__, $data, 'clansphere', 'news'); } } } } }
if (!empty($check_name)) { $error .= sprintf($cs_lang['name_exists'], $cs_links['links_name']) . cs_html_br(1); } } else { $error .= $cs_lang['no_name'] . cs_html_br(1); } if (empty($cs_links['categories_id'])) { $error .= $cs_lang['no_cat'] . cs_html_br(1); } //check url if (!empty($cs_links['links_url'])) { $where = "links_url = '" . $cs_links['links_url'] . "'"; $check_url = cs_sql_count(__FILE__, 'links', $where); if (!empty($check_url)) { $link_exists = cs_sql_select(__FILE__, 'links', 'links_name', $where); $url = cs_html_link($cs_links['links_url'], $cs_links['links_url']); $error .= sprintf($cs_lang['url_exists'], $link_exists['links_name'], $url) . cs_html_br(1); } } else { $error .= $cs_lang['no_url'] . cs_html_br(1); } if (empty($cs_links['links_stats'])) { $error .= $cs_lang['no_status'] . cs_html_br(1); } if (empty($cs_links['links_info'])) { $error .= $cs_lang['no_info'] . cs_html_br(1); } $img_size = false; if (!empty($files_gl['symbol']['tmp_name'])) { $img_size = getimagesize($files_gl['symbol']['tmp_name']); }
} require_once 'mods/clansphere/filetype.php'; for ($run = 0; $run < $count_att; $run++) { $file = $cs_att[$run]['boardfiles_name']; $extension = strlen(strrchr($file, ".")); $name = strlen($file); $ext = substr($file, $name - $extension + 1, $name); $ext_lower = strtolower($ext); $data['attachments'][$run]['icon'] = cs_filetype($ext_lower); if (file_exists('uploads/board/files/' . $cs_att[$run]['boardfiles_id'] . '.' . $ext)) { $file_file = filesize('uploads/board/files/' . $cs_att[$run]['boardfiles_id'] . '.' . $ext); $data['attachments'][$run]['filename'] = cs_html_link($cs_main['php_self']['dirname'] . 'mods/board/attachment.php?id=' . $cs_att[$run]['boardfiles_id'], $file, 1); $data['attachments'][$run]['size'] = cs_filesize($file_file); } elseif (file_exists('uploads/board/files/' . $file)) { $file_file = filesize('uploads/board/files/' . $file); $data['attachments'][$run]['filename'] = cs_html_link($cs_main['php_self']['dirname'] . 'mods/board/attachment.php?name=' . $file, $file, 1); $data['attachments'][$run]['size'] = cs_filesize($file_file); } else { $data['attachments'][$run]['filename'] = $cs_lang['no_att_exist']; $data['attachments'][$run]['size'] = cs_filesize(0); } $threads_headline = $cs_att[$run]['threads_headline']; $data['attachments'][$run]['topics'] = strlen($threads_headline) <= 15 ? $threads_headline : cs_substr($threads_headline, 0, 15) . '...'; $data['attachments'][$run]['threads_headline'] = $threads_headline; $data['attachments'][$run]['topics_link'] = cs_url('board', 'thread', 'where=' . $cs_att[$run]['threads_id']); $data['attachments'][$run]['downloaded'] = $cs_att[$run]['boardfiles_downloaded']; $data['attachments'][$run]['user'] = $cs_att[$run]['users_nick']; $data['attachments'][$run]['user_link'] = cs_url('users', 'view', 'id=' . $cs_att[$run]['users_id']); $data['attachments'][$run]['remove'] = cs_url('board', 'delatt_admin', 'id=' . $cs_att[$run]['boardfiles_id']); } echo cs_subtemplate(__FILE__, $data, 'board', 'attachements_admin');
} elseif (!empty($error)) { $data['head']['body'] = $error; } if (!empty($error) or !isset($_POST['submit'])) { $data['head']['getmsg'] = cs_getmsg(); $matches[1] = $cs_lang['pic_infos']; $return_types = ''; foreach ($img_filetypes as $add) { $return_types .= empty($return_types) ? $add : ', ' . $add; } $matches[2] = $cs_lang['max_width'] . ': ' . $op_wars['max_width'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_height'] . ': ' . $op_wars['max_height'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_size'] . ': ' . cs_filesize($op_wars['max_size']) . cs_html_br(1); $matches[2] .= $cs_lang['filetypes'] . $return_types; $data['picup']['clip'] = cs_abcode_clip($matches); $data['wars']['id'] = $cs_wars_id; if (empty($war_string)) { $data['pictures'][0]['view_link'] = $cs_lang['nopic']; $data['pictures'][0]['remove_link'] = ''; } else { $run = 0; foreach ($war_pics as $pic) { $link = cs_html_img('uploads/wars/thumb-' . $pic); $data['pictures'][$run]['view_link'] = cs_html_link('uploads/wars/picture-' . $pic, $link) . ' '; $set = 'id=' . $cs_wars_id . '&delete=' . ($run + 1); $data['pictures'][$run]['remove_link'] = cs_link($cs_lang['remove'], 'wars', 'picture', $set); $run++; } } echo cs_subtemplate(__FILE__, $data, 'wars', 'picture'); }
$error .= cs_html_br(1) . '- ' . $cs_lang['double']; } if (empty($account['users_id']) || $cs_shout['shoutbox_name'] != $account['users_nick']) { $nick_valid = cs_sql_count(__FILE__, 'users', 'users_nick = \'' . cs_sql_escape($cs_shout['shoutbox_name']) . '\''); if (!empty($nick_valid)) { $error .= cs_html_br(1) . '- ' . $cs_lang['user_exists']; } } if (!empty($error)) { $data['lang']['body'] = $cs_lang['errors'] . ' ' . $error; $data['form']['url'] = cs_url('shoutbox', 'create'); $data['form']['name'] = cs_secure($cs_shout['shoutbox_name']); $data['form']['message'] = cs_secure($cs_shout['shoutbox_text']); if (!empty($captcha) && empty($account['users_id'])) { $data['form']['captcha'] = cs_html_img('mods/captcha/generate.php?time=' . cs_time() . '&mini'); $data['form']['show'] = cs_subtemplate(__FILE__, $data, 'shoutbox', 'captcha'); } else { $data['form']['show'] = ''; } echo cs_subtemplate(__FILE__, $data, 'shoutbox', 'create'); } else { $cells = array_keys($cs_shout); $values = array_values($cs_shout); cs_sql_insert(__FILE__, 'shoutbox', $cells, $values); $data['shoutbox']['done'] = cs_html_link($uri, $cs_lang['continue'], 0); echo cs_subtemplate(__FILE__, $data, 'shoutbox', 'submit'); } } else { $data['shoutbox']['no_submit'] = $cs_lang['no_submit']; echo cs_subtemplate(__FILE__, $data, 'shoutbox', 'no_submit'); }
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('ranks'); $cs_option = cs_sql_option(__FILE__, 'ranks'); $select = 'ranks_url, ranks_img, ranks_code'; $data = array(); $data['ranks'] = cs_sql_select(__FILE__, 'ranks', $select, 0, 0, 0, $cs_option['max_navlist']); $ranks_loop = count($data['ranks']); for ($run = 0; $run < $ranks_loop; $run++) { $data['ranks'][$run]['picture'] = ''; if (!empty($data['ranks'][$run]['ranks_url'])) { $picture = cs_html_img($data['ranks'][$run]['ranks_img']); $data['ranks'][$run]['picture'] = cs_html_link($data['ranks'][$run]['ranks_url'], $picture); } else { $data['ranks'][$run]['picture'] = $data['ranks'][$run]['ranks_code']; } } echo cs_subtemplate(__FILE__, $data, 'ranks', 'navlist');
} else { $data['head']['body'] = $cs_lang['body_picture']; } if (!empty($error) or empty($_POST['submit'])) { $data['head']['getmsg'] = cs_getmsg(); $matches[1] = $cs_lang['pic_infos']; $return_types = ''; foreach ($img_filetypes as $add) { $return_types .= empty($return_types) ? $add : ', ' . $add; } $matches[2] = $cs_lang['max_width'] . $op_computers['max_width'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_height'] . $op_computers['max_height'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_size'] . cs_filesize($op_computers['max_size']) . cs_html_br(1); $matches[2] .= $cs_lang['filetypes'] . $return_types; $data['com']['abcode_clip'] = cs_abcode_clip($matches); $data['com']['id'] = $cs_computers_id; if (empty($computer_string)) { $data['pictures'][0]['thumb'] = $cs_lang['nopic']; $data['pictures'][0]['url_remove'] = ''; } else { $run = 0; foreach ($computer_pics as $pic) { $link = cs_html_img('uploads/computers/thumb-' . $pic); $data['pictures'][$run]['thumb'] = cs_html_link('uploads/computers/picture-' . $pic, $link) . ' '; $remove = 'id=' . $cs_computers_id . '&delete=' . ($run + 1); $data['pictures'][$run]['url_remove'] = cs_link($cs_lang['remove'], 'computers', 'picture', $remove); $run++; } } echo cs_subtemplate(__FILE__, $data, 'computers', 'picture'); }
} $data['join']['place'] = empty($cs_joinus['joinus_place']) ? '-' : cs_secure($cs_joinus['joinus_place']); if (empty($cs_joinus['joinus_country'])) { $data['join']['country'] = '-'; } else { $url = 'symbols/countries/' . $cs_joinus['joinus_country'] . '.png'; $flag = cs_html_img($url, 11, 16); include_once 'lang/' . $account['users_lang'] . '/countries.php'; $country = $cs_joinus['joinus_country']; $data['join']['country'] = $flag . ' ' . $cs_country[$country]; } $data['join']['email'] = empty($cs_joinus['joinus_email']) ? '-' : cs_html_mail($cs_joinus['joinus_email'], $cs_joinus['joinus_email']); if (empty($cs_joinus['joinus_icq'])) { $data['join']['icq'] = '-'; } else { $data['join']['icq'] = cs_html_link('http://www.icq.com/people/' . $cs_joinus['joinus_icq'], $cs_joinus['joinus_icq']); } if (empty($cs_joinus['joinus_jabber'])) { $data['join']['jabber'] = '-'; } else { $cs_joinus['joinus_jabber'] = cs_secure($cs_joinus['joinus_jabber']); $data['join']['jabber'] = cs_html_jabbermail($cs_joinus['joinus_jabber']); } if (empty($cs_joinus['games_id'])) { $data['join']['game'] = '-'; } else { $img = cs_html_img('uploads/games/' . $cs_joinus['games_id'] . '.gif'); $where = "games_id = '" . $cs_joinus['games_id'] . "'"; $cs_game = cs_sql_select(__FILE__, 'games', 'games_name, games_id', $where); $link = cs_link($cs_game['games_name'], 'games', 'view', 'id=' . $cs_game['games_id']); $data['join']['game'] = $img . ' ' . $link;
$cs_cat = cs_sql_select(__FILE__, 'categories', 'categories_name, categories_id', $where); $data['data']['category'] = cs_link($cs_cat['categories_name'], 'categories', 'view', 'id=' . $cs_cat['categories_id']); $data['data']['time'] = cs_date('unix', $cs_events['events_time'], 1); $data['data']['events_venue'] = cs_secure($cs_events['events_venue']); $data['data']['signed'] = cs_sql_count(__FILE__, 'eventguests', "events_id = '" . $events_id . "'"); $data['data']['events_guestsmin'] = !empty($cs_events['events_guestsmin']) ? $cs_events['events_guestsmin'] : '-'; $data['data']['events_guestsmax'] = !empty($cs_events['events_guestsmax']) ? $cs_events['events_guestsmax'] : '-'; $data['data']['events_needage'] = !empty($cs_events['events_needage']) ? $cs_events['events_needage'] : '-'; $events_url = cs_secure($cs_events['events_url']); $data['data']['events_url'] = cs_html_link('http://' . $events_url, $events_url); if (empty($cs_events['events_pictures'])) { $data['data']['pictures'] = '-'; } else { $data['data']['pictures'] = ''; $events_pics = explode("\n", $cs_events['events_pictures']); foreach ($events_pics as $pic) { $link = cs_html_img('uploads/events/thumb-' . $pic); $path = empty($cs_main['mod_rewrite']) ? '' : $cs_main['php_self']['website'] . str_replace('index.php', '', $_SERVER['PHP_SELF']); $data['data']['pictures'] .= cs_html_link($path . 'uploads/events/picture-' . $pic, $link) . ' '; } } $data['data']['events_more'] = cs_secure($cs_events['events_more'], 1, 1, 1, 1); echo cs_subtemplate(__FILE__, $data, 'events', 'view'); $where_com = "comments_mod = 'events' AND comments_fid = '" . $events_id . "'"; $count_com = cs_sql_count(__FILE__, 'comments', $where_com); include_once 'mods/comments/functions.php'; if (!empty($count_com)) { echo cs_html_br(1); echo cs_comments_view($events_id, 'events', 'view', $count_com); } echo cs_comments_add($events_id, 'events', $cs_events['events_close']);
if ($cs_option['scores'] == 1) { $matrix[$column + 1][$currow]['content'] = cs_html_link(cs_url('cups', 'match', 'id=' . $match['cupmatches_id']), $match['cupmatches_score2']); } if ($match['cupmatches_winner'] == $match['team2_id'] && $match['team2_id'] != $match['team1_id']) { $matrix[$column][$currow]['class'] .= '-win'; if ($cs_option['scores'] == 1) { $matrix[$column + 1][$currow]['class'] .= '-win'; } } else { $matrix[$column][$currow]['class'] .= '-loss'; if ($cs_option['scores'] == 1) { $matrix[$column + 1][$currow]['class'] .= '-loss'; } } } else { $matrix[$column + 1][$currow]['content'] = cs_html_link(cs_url('cups', 'match', 'id=' . $match['cupmatches_id']), 'x'); } } if ($prevrow > $maxrows) { $maxrows = $prevrow; } if ($currow > $maxrows) { $maxrows = $currow; } $count++; } } } // TODO $finalmatchnr = -1; if ($cup['cups_brackets'] == CS_CUPS_SYSTEM_LB) {
if (isset($_POST['preview']) and empty($error)) { $where_user = !empty($id) ? "gbook_users_id = '" . $id . "'" : 0; $count_entry = cs_sql_count(__FILE__, 'gbook', $where_user); $data['gbook']['entry_count'] = $count_entry + 1; $data['gbook']['users_nick'] = $cs_gbook['gbook_nick']; $data['gbook']['icon_town'] = empty($cs_gbook['gbook_town']) ? '' : cs_icon('gohome'); $data['gbook']['town'] = empty($cs_gbook['gbook_town']) ? '' : cs_secure($cs_gbook['gbook_town']); $data['gbook']['icon_mail'] = cs_html_link('mailto:' . $cs_gbook['gbook_email'], cs_icon('mail_generic')); $icq = cs_html_link('http://www.icq.com/people/' . $cs_gbook['gbook_icq'], cs_icon('licq')); $data['gbook']['icon_icq'] = empty($cs_gbook['gbook_icq']) ? '' : $icq; $jabber = cs_html_jabbermail($cs_gbook['gbook_jabber'], cs_icon('jabber_protocol')); $data['gbook']['icon_jabber'] = empty($cs_gbook['gbook_jabber']) ? '' : $jabber; $url = 'http://mystatus.skype.com/smallicon/' . $cs_gbook['gbook_skype']; $skype = cs_html_link('skype:' . $cs_gbook['gbook_skype'] . '?userinfo', cs_html_img($url, '16', '16', '0', 'Skype'), '0'); $data['gbook']['icon_skype'] = empty($cs_gbook['gbook_skype']) ? '' : $skype; $url = cs_html_link('http://' . $cs_gbook['gbook_url'], cs_icon('gohome')); $data['gbook']['icon_url'] = empty($cs_gbook['gbook_url']) ? '' : $url; $data['gbook']['text'] = cs_secure($cs_gbook['gbook_text'], 1, 1); $data['gbook']['time'] = cs_date('unix', $cs_gbook['gbook_time'], 1); $data['tpl']['preview'] = cs_subtemplate(__FILE__, $data, 'gbook', 'preview'); } if (!empty($error) or !isset($_POST['submit']) or isset($_POST['preview'])) { foreach ($cs_gbook as $key => $value) { $data['gbook'][$key] = cs_secure($value); } if ($cs_gbook['users_id'] == 0) { $data['tpl']['extension'] = cs_subtemplate(__FILE__, $data, 'gbook', 'extension'); } $data['abcode']['smileys'] = cs_abcode_smileys('gbook_text'); $data['abcode']['features'] = cs_abcode_features('gbook_text'); $data['check']['newtime'] = !empty($_POST['gbook_newtime']) ? 'checked="checked"' : '';
$icon4 = $result <= 1 ? '#74B200' : '#DE0002'; $icon4 = empty($result) ? '#c0c0c0' : $icon4; $wars['result']['color1'] = $icon3; $wars['result']['color2'] = $icon4; $wars['result']['img'] = cs_html_img('symbols/clansphere/' . $icon . '.gif'); $wars_url = cs_secure($cs_wars['wars_url']); $wars['war']['link'] = empty($wars_url) ? '-' : cs_html_link('http://' . $wars_url, $wars_url); $wars['pictures']['show'] = ''; if (empty($cs_wars['wars_pictures'])) { $wars['pictures']['show'] = '-'; } else { $wars_pics = explode("\n", $cs_wars['wars_pictures']); foreach ($wars_pics as $pic) { $link = cs_html_img('uploads/wars/thumb-' . $pic); $path = $cs_main['php_self']['dirname']; $wars['pictures']['show'] .= cs_html_link($path . 'uploads/wars/picture-' . $pic, $link) . ' '; } } $wars['war']['report'] = empty($cs_wars['wars_report']) ? '-' : cs_secure($cs_wars['wars_report'], 1, 1); $wars['war']['report2'] = empty($cs_wars['wars_report2']) ? '-' : cs_secure($cs_wars['wars_report2'], 1, 1); $tables2 = 'rounds rnd INNER JOIN {pre}_maps mps ON rnd.maps_id = mps.maps_id'; $cells2 = 'rnd.rounds_score1 AS rounds_score1, rnd.rounds_score2 AS rounds_score2, ' . 'rnd.rounds_description AS rounds_description, mps.maps_name AS maps_name, ' . 'rnd.maps_id AS maps_id'; $wars['rounds'] = cs_sql_select(__FILE__, $tables2, $cells2, 'rnd.wars_id = \'' . $wars_id . '\'', 'rnd.rounds_order ASC', 0, 0); if (!empty($wars['rounds'])) { $count_rounds = count($wars['rounds']); for ($run = 0; $run < $count_rounds; $run++) { $wars['rounds'][$run]['mapurl'] = cs_url('maps', 'view', 'id=' . $wars['rounds'][$run]['maps_id']); $wars['rounds'][$run]['maps_name'] = cs_secure($wars['rounds'][$run]['maps_name']); $result2 = $wars['rounds'][$run]['rounds_score1'] - $wars['rounds'][$run]['rounds_score2']; $icon2 = $result2 >= 1 ? 'green' : 'red'; $icon2 = !empty($result2) ? $icon2 : 'grey';
if (in_array('users_icq', $hidden)) { $icq = empty($allow) ? '' : $icq; } $gbook[$run]['icon_icq'] = empty($cs_gbook[$run]['users_icq']) ? '' : $icq; $jabber = cs_html_jabbermail($cs_gbook[$run]['users_jabber'], cs_icon('jabber_protocol')); if (in_array('users_jabber', $hidden)) { $jabber = empty($allow) ? '' : $jabber; } $gbook[$run]['icon_jabber'] = empty($cs_gbook[$run]['users_jabber']) ? '' : $jabber; $url = 'http://mystatus.skype.com/smallicon/' . $cs_gbook[$run]['users_skype']; $skype = cs_html_link('skype:' . $cs_gbook[$run]['users_skype'] . '?userinfo', cs_html_img($url, '16', '16', '0', 'Skype'), '0'); if (in_array('users_skype', $hidden)) { $skype = empty($allow) ? '' : $skype; } $gbook[$run]['icon_skype'] = empty($cs_gbook[$run]['users_skype']) ? '' : $skype; $url = cs_html_link('http://' . $cs_gbook[$run]['users_url'], cs_icon('gohome')); if (in_array('users_url', $hidden)) { $url = empty($allow) ? '' : $url; } $gbook[$run]['icon_url'] = empty($cs_gbook[$run]['users_url']) ? '' : $url; } $gbook[$run]['text'] = cs_secure($cs_gbook[$run]['gbook_text'], 1, 1); $gbook[$run]['time'] = cs_date('unix', $cs_gbook[$run]['gbook_time'], 1); if ($account['access_gbook'] >= 4) { $img_edit = cs_icon('edit', 16, $cs_lang['edit']); $gbook[$run]['icon_edit'] = cs_link($img_edit, 'gbook', 'edit', 'id=' . $cs_gbook[$run]['gbook_id'] . '&from=list', 0, $cs_lang['edit']); $img_del = cs_icon('editdelete', 16, $cs_lang['remove']); $gbook[$run]['icon_remove'] = cs_link($img_del, 'gbook', 'remove', 'id=' . $cs_gbook[$run]['gbook_id'] . '&from=list', 0, $cs_lang['remove']); $ip = $cs_gbook[$run]['gbook_ip']; $gbook[$run]['if']['admin'] = true; if ($account['access_gbook'] == 4) {
$gbook[$run]['icon_icq'] = empty($icq) ? '' : cs_html_link("http://www.icq.com/{$icq}", cs_icon('licq')); $jabber = cs_secure($cs_gbook[$run]['users_jabber']); if (in_array('users_jabber', $hidden)) { $jabber = empty($allow) ? '' : $jabber; } $gbook[$run]['icon_jabber'] = empty($jabber) ? '' : cs_html_jabbermail($jabber, cs_icon('jabber_protocol')); $skype = cs_secure($cs_gbook[$run]['users_skype']); $url = 'http://mystatus.skype.com/smallicon/' . $skype; $skype = cs_html_link('skype:' . $cs_gbook[$run]['users_skype'] . '?userinfo', cs_html_img($url, '16', '16', '0', 'Skype'), '0'); if (in_array('users_skype', $hidden)) { $skype = empty($allow) ? '' : $skype; } $gbook[$run]['icon_skype'] = empty($cs_gbook[$run]['users_skype']) ? '' : $skype; $url = cs_secure($cs_gbook[$run]['users_url']); if (in_array('users_url', $hidden)) { $url = empty($allow) ? '' : $url; } $gbook[$run]['icon_url'] = empty($url) ? '' : cs_html_link("http://{$url}", cs_icon('gohome')); } $gbook[$run]['text'] = cs_secure($cs_gbook[$run]['gbook_text'], 1, 1); $gbook[$run]['time'] = cs_date('unix', $cs_gbook[$run]['gbook_time'], 1); if ($cs_gbook[$run]['gbook_lock'] == 0) { $gbook[$run]['class'] = 'notpublic'; $gbook[$run]['de_activate'] = cs_link(cs_icon('submit'), 'gbook', 'center', 'unhide=' . $cs_gbook[$run]['gbook_id'], 0, $cs_lang['unhide']); } else { $gbook[$run]['class'] = ''; $gbook[$run]['de_activate'] = cs_link(cs_icon('editcut'), 'gbook', 'center', 'hide=' . $cs_gbook[$run]['gbook_id'], 0, $cs_lang['hide']); } } $data['gbook'] = !empty($gbook) ? $gbook : ''; echo cs_subtemplate(__FILE__, $data, 'gbook', 'center');
$content = empty($allow) ? '--' : cs_html_italic(1) . $content . cs_html_italic(0); } $data['users']['url'] = empty($cs_user['users_url']) ? '--' : $content; $content = cs_html_link('http://www.icq.com/people/' . $cs_user['users_icq'], $cs_user['users_icq']); if (in_array('users_icq', $hidden)) { $content = empty($allow) ? '--' : cs_html_italic(1) . $content . cs_html_italic(0); } $data['users']['icq'] = empty($cs_user['users_icq']) ? '--' : $content; $cs_user['users_jabber'] = cs_secure($cs_user['users_jabber']); $content = cs_html_jabbermail($cs_user['users_jabber']); if (in_array('users_jabber', $hidden)) { $content = empty($allow) ? '--' : cs_html_italic(1) . $content . cs_html_italic(0); } $data['users']['jabber'] = empty($cs_user['users_jabber']) ? '--' : $content; $cs_user['users_skype'] = cs_secure($cs_user['users_skype']); $content = cs_html_link('skype:' . $cs_user['users_skype'] . '?userinfo', $cs_user['users_skype']); $skype_url = 'http://mystatus.skype.com/smallicon/' . $cs_user['users_skype']; $content .= ' ' . cs_html_img($skype_url, '16', '16'); if (in_array('users_skype', $hidden)) { $content = empty($allow) ? '--' : cs_html_italic(1) . $content . cs_html_italic(0); } $data['users']['skype'] = empty($cs_user['users_skype']) ? '--' : $content; $content = cs_secure($cs_user['users_phone']); if (in_array('users_phone', $hidden)) { $content = empty($allow) ? '--' : cs_html_italic(1) . $content . cs_html_italic(0); } $data['users']['phone'] = empty($cs_user['users_phone']) ? '--' : $content; $content = cs_secure($cs_user['users_mobile']); if (in_array('users_mobile', $hidden)) { $content = empty($allow) ? '--' : cs_html_italic(1) . $content . cs_html_italic(0); }
<?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'); }
$pattern = "=^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@([0-9a-z](-?[0-9a-z])*\\.)+[a-z]{2}([zmuvtg]|fo|me)?\$=i"; if (!preg_match($pattern, $ecard['receiver_mail'])) { $error .= $cs_lang['email_false'] . cs_html_br(1); } } if (!isset($_POST['submit']) or !isset($_POST['preview'])) { $data['head']['body'] = $cs_lang['ecard_body_list']; } if (!empty($error)) { $data['head']['body'] = $error; } if (isset($_POST['preview']) and empty($error)) { $data['if']['preview'] = TRUE; $data['prev']['img'] = cs_html_img('mods/gallery/image.php?pic=' . $picture_id . '&size=300'); $data['prev']['mailfrom'] = cs_html_link('mailto:' . $ecard['sender_mail'], $ecard['sender_name'], 1); $data['prev']['mailto'] = cs_html_link('mailto:' . $ecard['receiver_mail'], $ecard['receiver_name'], 1); $data['prev']['time'] = cs_date('unix', cs_time(), 1); $data['prev']['titel'] = cs_secure($ecard['ecard_titel']); $data['prev']['text'] = cs_secure($ecard['ecard_text'], 1); } if (!empty($error) or !isset($_POST['submit']) or isset($_POST['preview'])) { $data['data'] = $ecard; $data['ecard']['picture'] = cs_html_img('mods/gallery/image.php?pic=' . $picture_id . '&size=300'); $data['abcode']['features'] = cs_abcode_features('ecard_text'); $data['hidden']['id'] = $picture_id; echo cs_subtemplate(__FILE__, $data, 'gallery', 'ecard'); } else { $send['data'] = $ecard; $send['data']['src'] = $cs_main['php_self']['website'] . '/mods/gallery/image.php?pic=' . $picture_id . '&size=300'; $send['data']['time'] = cs_date('unix', cs_time(), 1); $send['data']['ecard_titel'] = cs_secure($ecard['ecard_titel']);