<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('maps'); $files_gl = cs_files(); $data = array(); $options = cs_sql_option(__FILE__, 'maps'); $img_filetypes = array('gif', 'jpg', 'png'); if (empty($_GET['id']) and empty($_POST['submit'])) { $data['maps']['action'] = $cs_lang['edit']; $data['maps']['link'] = cs_url('maps', 'manage'); echo cs_subtemplate(__FILE__, $data, 'maps', 'no_selection'); } else { if (!empty($_POST['submit'])) { $error = ''; if (empty($_POST['maps_name'])) { $error .= cs_html_br(1) . '- ' . $cs_lang['no_name']; } if (empty($_POST['games_id'])) { $error .= cs_html_br(1) . '- ' . $cs_lang['no_game']; } $img_size = empty($files_gl['picture']['tmp_name']) ? 0 : getimagesize($files_gl['picture']['tmp_name']); if (!empty($files_gl['picture']['tmp_name']) and empty($img_size) or $img_size[2] > 3) { $error .= cs_html_br(1) . '- ' . $cs_lang['ext_error']; } elseif (!empty($files_gl['picture']['tmp_name'])) { switch ($img_size[2]) { case 1: $extension = 'gif'; break; case 2:
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('clans'); $files = cs_files(); $clans_id = $_REQUEST['id']; settype($clans_id, 'integer'); $op_clans = cs_sql_option(__FILE__, 'clans'); $img_filetypes = array('gif', 'jpg', 'png'); $users_nick = ''; $cs_clans['users_id'] = 0; if (isset($_POST['submit'])) { $cs_clans['clans_name'] = $_POST['clans_name']; $cs_clans['clans_short'] = $_POST['clans_short']; $cs_clans['clans_tag'] = $_POST['clans_tag']; $cs_clans['clans_tagpos'] = $_POST['tag_pos']; $cs_clans['clans_country'] = $_POST['clans_country']; $cs_clans['clans_url'] = $_POST['clans_url']; $cs_clans['clans_since'] = cs_datepost('since', 'date'); $picture = cs_sql_select(__FILE__, 'clans', 'clans_picture', "clans_id = " . (int) $clans_id); $cs_clans['clans_picture'] = empty($_POST['clans_picture']) ? $picture['clans_picture'] : $_POST['clans_picture']; $cs_clans['clans_pwd'] = $_POST['clans_pwd']; $users_nick = empty($_REQUEST['users_nick']) ? '' : $_REQUEST['users_nick']; $error = 0; $errormsg = ''; $where = "users_nick = '" . cs_sql_escape($users_nick) . "'"; $users_data = cs_sql_select(__FILE__, 'users', 'users_id', $where); if (empty($users_data['users_id'])) { $users_nick = ''; } else {