cs_redirect($cs_lang['remove_done'], 'computers', 'picture', 'id=' . $cs_computers_id); } 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');
$cs_categories['categories_access'] == $levels ? $sel = 1 : ($sel = 0); $data['access'][$levels]['sel'] = cs_html_option($levels . ' - ' . $cs_lang['lev_' . $levels], $levels, $sel); $levels++; } $data['cat']['abcode_smileys'] = cs_abcode_smileys('categories_text'); $data['cat']['abcode_features'] = cs_abcode_features('categories_text'); $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_categories['max_width'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_height'] . $op_categories['max_height'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_size'] . cs_filesize($op_categories['max_size']) . cs_html_br(1); $matches[2] .= $cs_lang['filetypes'] . $return_types; $data['cat']['picup_clip'] = cs_abcode_clip($matches); echo cs_subtemplate(__FILE__, $data, 'categories', 'create'); } else { $categories_cells = array_keys($cs_categories); $categories_save = array_values($cs_categories); cs_sql_insert(__FILE__, 'categories', $categories_cells, $categories_save); if (!empty($files_gl['picture']['tmp_name'])) { $where = "categories_name = '" . cs_sql_escape($cs_categories['categories_name']) . "'"; $getid = cs_sql_select(__FILE__, 'categories', 'categories_id', $where); $filename = 'picture-' . $getid['categories_id'] . '.' . $extension; cs_upload('categories', $filename, $files_gl['picture']['tmp_name']); $cs_categories2['categories_picture'] = $filename; $categories2_cells = array_keys($cs_categories2); $categories2_save = array_values($cs_categories2); cs_sql_update(__FILE__, 'categories', $categories2_cells, $categories2_save, $getid['categories_id']); }
} $data['clans']['country'] .= cs_html_select(0) . ' ' . cs_html_img('symbols/countries/' . $cs_clans['clans_country'] . '.png', 11, 16, 'id="' . $el_id . '"'); $data['clans']['url'] = cs_secure($cs_clans['clans_url']); $data['clans']['since'] = cs_dateselect('since', 'date', $cs_clans['clans_since']); $data['clans']['password'] = cs_secure($cs_clans['clans_pwd']); $data['users']['nick'] = $users_nick; if (empty($cs_clans['clans_picture'])) { $data['clans']['pic'] = $cs_lang['nopic']; } else { $place = 'uploads/clans/' . $cs_clans['clans_picture']; $size = getimagesize($cs_main['def_path'] . '/' . $place); $data['clans']['pic'] = cs_html_img($place, $size[1], $size[0]); } $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_clans['max_width'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_height'] . $op_clans['max_height'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_size'] . cs_filesize($op_clans['max_size']) . cs_html_br(1); $matches[2] .= $cs_lang['filetypes'] . $return_types; $data['clans']['clip'] = cs_abcode_clip($matches); $data['data']['id'] = $clans_id; echo cs_subtemplate(__FILE__, $data, 'clans', 'edit'); } else { $clans_cells = array_keys($cs_clans); $clans_save = array_values($cs_clans); cs_sql_update(__FILE__, 'clans', $clans_cells, $clans_save, $clans_id); cs_redirect($cs_lang['changes_done'], 'clans'); }
<?php // ClanSphere 2010 - www.clansphere.net // $Id$ $cs_lang = cs_translate('database'); $sql_content = ''; $modules = cs_checkdirs('mods'); $tables = 0; foreach ($modules as $mod) { if ((isset($account['access_' . $mod['dir'] . '']) or $mod['dir'] == 'captcha' or $mod['dir'] == 'pictures') and !empty($mod['tables'][0])) { foreach ($mod['tables'] as $table) { $tables++; $sql_content .= '{optimize} {pre}_' . $table . ";\n"; } } } $sql_content = substr($sql_content, 0, -1); $data['action']['form'] = cs_url('database', 'import'); $matches[1] = $tables; $matches[2] = '<textarea name="text" cols="50" rows="12" id="text">' . $sql_content . '</textarea>'; $data['optimize']['clip'] = cs_abcode_clip($matches); echo cs_subtemplate(__FILE__, $data, 'database', 'optimize');
$matches[1] = $cs_lang['secure_stages']; $matches[2] = $cs_lang['stage_1'] . $cs_lang['stage_1_text'] . cs_html_br(1); $matches[2] .= $cs_lang['stage_2'] . $cs_lang['stage_2_text'] . cs_html_br(1); $matches[2] .= $cs_lang['stage_3'] . $cs_lang['stage_3_text'] . cs_html_br(1); $matches[2] .= $cs_lang['stage_4'] . $cs_lang['stage_4_text']; $data['squads']['secure_clip'] = cs_abcode_clip($matches); $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_squads['max_width'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_height'] . $op_squads['max_height'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_size'] . cs_filesize($op_squads['max_size']) . cs_html_br(1); $matches[2] .= $cs_lang['filetypes'] . $return_types; $data['squads']['picup_clip'] = cs_abcode_clip($matches); if (empty($cs_squads['squads_picture'])) { $data['squads']['current_pic'] = $cs_lang['nopic']; } else { $place = 'uploads/squads/' . $cs_squads['squads_picture']; $size = getimagesize($cs_main['def_path'] . '/' . $place); $data['squads']['current_pic'] = cs_html_img($place, $size[1], $size[0]); $data['if']['advanced'] = TRUE; } $data['squads']['id'] = $squads_id; echo cs_subtemplate(__FILE__, $data, 'squads', 'edit'); } else { $squads_cells = array_keys($cs_squads); $squads_save = array_values($cs_squads); cs_sql_update(__FILE__, 'squads', $squads_cells, $squads_save, $squads_id); cs_redirect($cs_lang['changes_done'], 'squads');
} else { $data['head']['text'] = $cs_lang['remove_done']; } $data['head']['message'] = cs_getmsg(); $data['file']['id'] = $cs_files_id; if (!empty($error) or empty($_POST['submit'])) { $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'] . $img_max['width'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_height'] . $img_max['height'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_size'] . cs_filesize($img_max['size']) . cs_html_br(1); $matches[2] .= $cs_lang['filetypes'] . $return_types; $data['upload']['clip'] = cs_abcode_clip($matches); $data['pictures'] = array(); if (empty($file_string)) { $data['if']['nopics'] = true; } else { $data['if']['nopics'] = false; $run = 1; $i = 0; foreach ($file_pics as $pic) { $data['pictures'][$i]['sad'] = $data['pictures'][$i]['thumbpath'] = 'uploads/files/thumb-' . $pic; $data['pictures'][$i]['picpath'] = 'uploads/files/picture-' . $pic; $data['pictures'][$i]['id'] = $run; $run++; $i++; } }
$data['data']['folders_access'] = ''; while ($levels < 6) { $folders['folders_access'] == $levels ? $sel = 1 : ($sel = 0); $data['data']['folders_access'] .= cs_html_option($levels . ' - ' . $cs_lang['lev_' . $levels], $levels, $sel); $levels++; } $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'] . $option['max_width'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_height'] . $option['max_height'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_size'] . cs_filesize($option['max_size']) . cs_html_br(1); $matches[2] .= $cs_lang['filetypes'] . $return_types; $data['data']['info_clip'] = cs_abcode_clip($matches); $checked = 'checked="checked"'; $data['check']['vote'] = empty($adv_vote) ? '' : $checked; $data['check']['close'] = empty($adv_close) ? '' : $checked; $data['check']['dl'] = empty($adv_dl) ? '' : $checked; $data['check']['dlo'] = empty($adv_dlo) ? '' : $checked; $data['data']['folders_name'] = cs_secure($data['data']['folders_name']); $data['data']['folders_url'] = cs_secure($data['data']['folders_url']); $data['data']['folders_text'] = cs_secure($data['data']['folders_text']); echo cs_subtemplate(__FILE__, $data, 'usersgallery', 'folders_create'); } else { $folder_cells = array_keys($folders); $folder_save = array_values($folders); cs_sql_insert(__FILE__, 'folders', $folder_cells, $folder_save); if (!empty($files_gl['picture']['tmp_name'])) { $id = cs_sql_insertid(__FILE__);
for ($run = 0; $run < $showcount; $run++) { $data['show'][$run]['run'] = $run; $data['show'][$run]['value'] = empty($_POST['show_' . $run]) ? '' : $_POST['show_' . $run]; $data['show'][$run]['axx_value'] = empty($_POST['showaccess_' . $run]) ? '' : $_POST['showaccess_' . $run]; } $data['value']['showcount'] = $showcount; $data['value']['modname'] = empty($_POST['modname']) ? '' : $_POST['modname']; $data['value']['moddir'] = empty($_POST['moddir']) ? '' : $_POST['moddir']; $data['value']['modversion'] = empty($_POST['modversion']) ? '' : $_POST['modversion']; $data['value']['description'] = empty($_POST['description']) ? '' : $_POST['description']; $var = cs_datepost('release', 'date'); $data['value']['dateselect'] = empty($var) ? cs_datereal('Y-m-d') : $var; $data['value']['creator'] = empty($_POST['creator']) ? '' : $_POST['creator']; $data['value']['team'] = empty($_POST['team']) ? '' : $_POST['team']; $data['value']['homepage'] = empty($_POST['homepage']) ? '' : $_POST['homepage']; $data['value']['icon'] = empty($_POST['icon']) ? '' : $_POST['icon']; $clip[1] = $cs_lang['help']; $clip[2] = $cs_lang['helptext']; $data['help']['clip'] = cs_abcode_clip($clip); $sel = 'selected="selected"'; $data['selected']['categories_no'] = empty($_POST['categories']) ? $sel : ''; $data['selected']['categories_yes'] = empty($_POST['categories']) ? '' : $sel; $data['selected']['protected_no'] = empty($_POST['protected']) ? $sel : ''; $data['selected']['protected_yes'] = empty($_POST['protected']) ? '' : $sel; $data['form']['url'] = cs_url('modules', 'create'); $data['input']['dateselect'] = cs_dateselect('release', 'date', $data['value']['dateselect']); echo cs_subtemplate(__FILE__, $data, 'modules', 'create'); } else { cs_cache_clear(); cs_redirect($cs_lang['create_done'], 'modules', 'roots'); }
if (!empty($errormsg) or isset($_POST['preview']) or !isset($_POST['submit'])) { $data['create']['cat_drop'] = cs_categories_dropdown2('board', $data['create']['categories_id']); $data['create']['ab_box'] = cs_abcode_features('board_text'); $levels = 0; $sel = 0; while ($levels < 6) { $data['create']['board_access'] == $levels ? $sel = 1 : ($sel = 0); $data['access'][$levels]['access_level'] = cs_html_option($levels . ' - ' . $cs_lang['lev_' . $levels], $levels, $sel); $levels++; } $matches[1] = $cs_lang['secure_stages']; $matches[2] = $cs_lang['stage_1'] . $cs_lang['stage_1_text'] . cs_html_br(1); $matches[2] .= $cs_lang['stage_2'] . $cs_lang['stage_2_text'] . cs_html_br(1); $matches[2] .= $cs_lang['stage_3'] . $cs_lang['stage_3_text'] . cs_html_br(1); $matches[2] .= $cs_lang['stage_4'] . $cs_lang['stage_4_text']; $data['create']['sec_level'] = cs_abcode_clip($matches); $op_squads = cs_sql_option(__FILE__, 'squads'); $data['create']['squad_lang'] = $cs_lang[$op_squads['label']]; $data_squads = cs_sql_select(__FILE__, 'squads', 'squads_name,squads_id', 'squads_own=1', 'squads_name', 0, 0); $data['create']['squad_drop'] = cs_dropdown('squads_id', 'squads_name', $data_squads, $data['create']['squads_id']); } else { global $cs_db; if (!empty($data['create']['board_pwd'])) { if ($cs_db['hash'] == 'md5') { $data['create']['board_pwd'] = md5($data['create']['board_pwd']); } elseif ($cs_db['hash'] == 'sha1') { $data['create']['board_pwd'] = sha1($data['create']['board_pwd']); } } $board_cells = array_keys($data['create']); $board_save = array_values($data['create']);
} $matches_l[2] = $cs_lang['max_width'] . $op_partner['def_width_listimg'] . ' px' . cs_html_br(1); $matches_l[2] .= $cs_lang['max_height'] . $op_partner['def_height_listimg'] . ' px' . cs_html_br(1); $matches_l[2] .= $cs_lang['max_size'] . cs_filesize($op_partner['max_size_listimg']) . cs_html_br(1); $matches_l[2] .= $cs_lang['filetypes'] . $return_types; $data['clip']['limg'] = cs_abcode_clip($matches_l); $matches_r[1] = $cs_lang['infobox']; $return_types = ''; foreach ($img_filetypes as $add => $value) { $return_types .= empty($return_types) ? $add : ', ' . $add; } $matches_r[2] = $cs_lang['max_width'] . $op_partner['def_width_rotimg'] . ' px' . cs_html_br(1); $matches_r[2] .= $cs_lang['max_height'] . $op_partner['def_height_rotimg'] . ' px' . cs_html_br(1); $matches_r[2] .= $cs_lang['max_size'] . cs_filesize($op_partner['max_size_rotimg']) . cs_html_br(1); $matches_r[2] .= $cs_lang['filetypes'] . $return_types; $data['clip']['rimg'] = cs_abcode_clip($matches_r); echo cs_subtemplate(__FILE__, $data, 'partner', 'create'); } elseif (!empty($_POST['submit']) && empty($error)) { $cells = array('partner_name', 'categories_id', 'partner_url', 'partner_alt', 'partner_text', 'partner_priority'); $values = array($_POST['partner_name'], $categories_id, $_POST['partner_url'], $_POST['partner_alt'], $_POST['partner_text'], $_POST['partner_priority']); cs_sql_insert(__FILE__, 'partner', $cells, $values); // upload navlist-image $where = "partner_name = '" . cs_sql_escape($data['partner']['partner_name']) . "'"; $getid = cs_sql_select(__FILE__, 'partner', 'partner_id', $where); if (!empty($files['partner_nimg']['tmp_name'])) { $filename_navimg = 'navbanner-' . $getid['partner_id'] . '.' . $extension_nimg; cs_upload('partner', $filename_navimg, $files['partner_nimg']['tmp_name'], 0); $cells_navimg = array('partner_nimg'); $values_navimg = array($filename_navimg); cs_sql_update(__FILE__, 'partner', $cells_navimg, $values_navimg, $getid['partner_id']); }
function pasteError($err) { $cs_err[1] = 'ERROR....'; $cs_err[2] = $err; echo cs_abcode_clip($cs_err); }
if ($pwdchars < 4) { $error .= $cs_lang['short_pwd'] . cs_html_br(1); } if ($pwd['new'] != $pwd['again']) { $error .= $cs_lang['not_match'] . cs_html_br(1); } } else { $pwd = array('current' => '', 'new' => '', 'again' => ''); } if (!isset($_POST['submit'])) { $data['head']['body'] = $cs_lang['change_password']; } elseif (!empty($error)) { $data['head']['body'] = $error; } if (!empty($error) or !isset($_POST['submit'])) { $data['users']['current_pwd'] = ''; $data['users']['new_pwd'] = ''; $data['users']['pwd_again'] = ''; $matches[1] = $cs_lang['secure_stages']; $matches[2] = $cs_lang['stage_1'] . $cs_lang['stage_1_text'] . cs_html_br(1); $matches[2] .= $cs_lang['stage_2'] . $cs_lang['stage_2_text'] . cs_html_br(1); $matches[2] .= $cs_lang['stage_3'] . $cs_lang['stage_3_text'] . cs_html_br(1); $matches[2] .= $cs_lang['stage_4'] . $cs_lang['stage_4_text']; $data['users']['secure_clip'] = cs_abcode_clip($matches); echo cs_subtemplate(__FILE__, $data, 'users', 'password'); } else { $users_cells = array('users_pwd'); $users_save = array($new_pwd); cs_sql_update(__FILE__, 'users', $users_cells, $users_save, $account['users_id']); cs_redirect($cs_lang['changes_done'], 'users', 'home'); }
$dir = cs_explorer_path($target, 'raw'); $lsd = cs_explorer_path($dir, 'escape'); $files_gl = cs_files(); $data = array(); if (empty($_POST['submit'])) { $post_max_size = str_replace('M', ' Mb', ini_get('post_max_size')); $data['lang']['max_upload'] = sprintf($cs_lang['max_upload'], $post_max_size); #$data['if']['modsdir'] = substr($dir,0,5) == 'mods/' && strpos(substr($dir,5),'/') == strrpos(substr($dir,5),'/') && empty($_POST['accessadd']) ? true : false; $data['if']['modsdir'] = false; $data['var']['dir'] = $dir; $data['var']['name'] = empty($_POST['name']) ? '' : str_replace('..', '', $_POST['name']); $data['icn']['dir'] = cs_html_img('symbols/files/filetypes/dir.gif', 16, 16); #$data['if']['accessentry'] = isset($_POST['accessadd']) && file_exists($dir . '/access.php') ? true : false; $data['if']['accessentry'] = false; $clip = array(1 => $cs_lang['infobox'], 2 => nl2br($cs_lang['possible'])); $data['clip']['info'] = cs_abcode_clip($clip); echo cs_subtemplate(__FILE__, $data, 'explorer', 'upload'); } else { $filename = $dir . '/'; $extension = strtolower(substr(strrchr($files_gl['file']['name'], '.'), 1)); if (empty($_POST['name'])) { $filename .= str_replace('..', '', $files_gl['file']['name']); $action = substr($files_gl['file']['name'], 0, strlen($files_gl['file']['name']) - strlen($extension) - 1); } else { $filename .= str_replace('..', '', $_POST['name']); $filename .= '.' . strtolower($extension); $action = $_POST['name']; } $message = move_uploaded_file($files_gl['file']['tmp_name'], $filename) ? $cs_lang['success'] : $cs_lang['error_upload']; cs_redirect($message, 'explorer', 'roots', 'dir=' . $lsd); /*
$data['head']['body'] = $cs_lang['body_create']; } elseif (!empty($error)) { $data['head']['body'] = $error; } if (!empty($error) or !isset($_POST['submit'])) { $data['linkus'] = $cs_linkus; $matches[1] = $cs_lang['pic_infos']; $return_types = ''; foreach ($img_filetypes as $add => $value) { $return_types .= empty($return_types) ? $add : ', ' . $add; } $matches[2] = $cs_lang['max_width'] . $img_max['width'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_height'] . $img_max['height'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_size'] . cs_filesize($img_max['size']) . cs_html_br(1); $matches[2] .= $cs_lang['filetypes'] . $return_types; $data['linkus']['picup_clip'] = cs_abcode_clip($matches); echo cs_subtemplate(__FILE__, $data, 'linkus', 'create'); } else { $linkus_cells = array_keys($cs_linkus); $linkus_save = array_values($cs_linkus); cs_sql_insert(__FILE__, 'linkus', $linkus_cells, $linkus_save); if (!empty($files_gl['symbol']['tmp_name'])) { $where = "linkus_name = '" . cs_sql_escape($cs_linkus['linkus_name']) . "'"; $getid = cs_sql_select(__FILE__, 'linkus', 'linkus_id', $where); $filename = $getid['linkus_id'] . '.' . $extension; cs_upload('linkus', $filename, $files_gl['symbol']['tmp_name']); } $linkus_cells = array('linkus_banner'); $linkus_save = array($filename); cs_sql_update(__FILE__, 'linkus', $linkus_cells, $linkus_save, $getid['linkus_id']); cs_redirect($cs_lang['create_done'], 'linkus');
foreach ($languages as $lang) { $lang['name'] == $create['users_lang'] ? $sel = 1 : ($sel = 0); $data['lang']['opts'] .= cs_html_option($lang['name'], $lang['name'], $sel); } $where = "access_clansphere <= '" . $account['access_clansphere'] . "'"; $access_data = cs_sql_select(__FILE__, 'access', 'access_name, access_id, access_clansphere', $where, 'access_name', 0, 0); $data['access']['dropdown'] = cs_dropdown('access_id', 'access_name', $access_data, $create['access_id']); if (empty($conv_joinus)) { $data['if']['simple'] = TRUE; $data['if']['convert'] = FALSE; $matches[1] = $cs_lang['secure_stages']; $matches[2] = $cs_lang['stage_1'] . $cs_lang['stage_1_text'] . cs_html_br(1); $matches[2] .= $cs_lang['stage_2'] . $cs_lang['stage_2_text'] . cs_html_br(1); $matches[2] .= $cs_lang['stage_3'] . $cs_lang['stage_3_text'] . cs_html_br(1); $matches[2] .= $cs_lang['stage_4'] . $cs_lang['stage_4_text']; $data['clip']['pw_sec'] = cs_abcode_clip($matches); } else { $data['if']['simple'] = FALSE; $data['if']['convert'] = TRUE; $code_id = generate_code(8); $data['hidden']['password'] = $code_id; $data['hidden']['conv'] = $conv_joinus; } $data['check']['send_mail'] = empty($create_['send_mail']) ? '' : 'checked="checked"'; $data['hidden']['flag'] = $create['users_country']; echo cs_subtemplate(__FILE__, $data, 'users', 'create'); } else { $create['users_timezone'] = empty($cs_main['def_timezone']) ? 0 : $cs_main['def_timezone']; $create['users_dstime'] = empty($cs_main['def_dstime']) ? 0 : $cs_main['def_dstime']; $users_id = create_user($create['access_id'], $create['users_nick'], $create_['password'], $create['users_lang'], $create['users_email'], $create['users_country'], $create['users_timezone'], $create['users_dstime']); if (!empty($conv_joinus) and !empty($users_id)) {
cs_redirect('', 'users', 'manage'); } else { $error .= $cs_lang['up_error']; } } } if (empty($error)) { $data['head']['body'] = $cs_lang['picture_manage']; } else { $data['head']['body'] = $error; } if (!empty($error) or empty($files['picture']['tmp_name']) and empty($del)) { if (empty($userpic)) { $data['users']['current_pic'] = $cs_lang['nopic']; } else { $size = getimagesize($cs_main['def_path'] . '/uploads/users/' . $userpic); $data['users']['current_pic'] = cs_html_img('uploads/users/' . $userpic, $size[1], $size[0]); } $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_users['max_width'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_height'] . $op_users['max_height'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_size'] . cs_filesize($op_users['max_size']) . cs_html_br(1); $matches[2] .= $cs_lang['filetypes'] . $return_types; $data['users']['picup_clip'] = cs_abcode_clip($matches); $data['users']['id'] = $users_id; echo cs_subtemplate(__FILE__, $data, 'users', 'picture_edit'); }
$data['comment'][$run]['current_anchor'] = cs_html_anchor('com' . $current); if (isset($cs_report[$rpno]['comments_id']) and $cs_report[$rpno]['comments_id'] == $cs_com[$run]['comments_id']) { $data['comment'][$run]['if']['com_report'] = true; $matches[1] = $cs_lang['report']; $matches[2] = '<div style="float: right">' . cs_link(cs_icon('special_paste', 16, $cs_lang['reports']), 'board', 'reportlist'); $rid = 'id=' . $cs_report[$rpno]['boardreport_id']; if (!empty($cs_report[$rpno]['boardreport_done'])) { $matches[1] .= ' - ' . $cs_lang['done']; } else { $matches[2] .= ' ' . cs_link(cs_icon('submit', 16, $cs_lang['done']), 'board', 'reportdone', $rid); } $matches[2] .= ' ' . cs_link(cs_icon('cancel', 16, $cs_lang['remove']), 'board', 'reportdel', $rid) . '</div>'; $matches[2] .= cs_date('unix', $cs_report[$rpno]['boardreport_time'], 1) . ' - '; $matches[2] .= cs_user($cs_report[$rpno]['users_id'], $cs_report[$rpno]['users_nick'], $cs_report[$rpno]['users_active'], $cs_report[$rpno]['users_delete']); $matches[2] .= cs_html_br(2) . cs_secure($cs_report[$rpno]['boardreport_text'], 1); $data['comment'][$run]['com_clip'] = cs_abcode_clip($matches); $rpno++; } $data['comment'][$run]['text'] = cs_secure($cs_com[$run]['comments_text'], 1, 1); //Files Start // Comment Files auslesen $where_com_file = 'threads_id = ' . (int) $id . ' AND comments_id = ' . (int) $cs_com[$run]['comments_id']; $cells = 'boardfiles_name, boardfiles_id, boardfiles_downloaded'; $cs_comments_files = cs_sql_select(__FILE__, 'boardfiles', $cells, $where_com_file, 'boardfiles_id ASC', 0, 0); $loop_com_files = count($cs_comments_files); if (!empty($loop_com_files)) { $data['comment'][$run]['if']['c_files'] = true; require_once 'mods/clansphere/filetype.php'; for ($run2 = 0; $run2 < $loop_com_files; $run2++) { $file = $cs_comments_files[$run2]['boardfiles_name']; $extension = strlen(strrchr($file, "."));
$data['banners']['name'] = $cs_banners['banners_name']; $data['banners']['category'] = cs_categories_dropdown('banners', $cs_banners['categories_id']); $data['banners']['url'] = $cs_banners['banners_url']; $data['banners']['or_img_url'] = $cs_banners['banners_picture']; $data['banners']['alt'] = $cs_banners['banners_alt']; $data['banners']['order'] = $cs_banners['banners_order']; $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_banners['max_width'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_height'] . $op_banners['max_height'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_size'] . cs_filesize($op_banners['max_size']) . cs_html_br(1); $matches[2] .= $cs_lang['filetypes'] . $return_types; $data['banners']['clip'] = cs_abcode_clip($matches); echo cs_subtemplate(__FILE__, $data, 'banners', 'create'); } else { settype($cs_banners['banners_order'], 'integer'); $banners_cells = array_keys($cs_banners); $banners_save = array_values($cs_banners); cs_sql_insert(__FILE__, 'banners', $banners_cells, $banners_save); if (!empty($files['picture']['tmp_name'])) { $where = "banners_name = '" . cs_sql_escape($cs_banners['banners_name']) . "'"; $getid = cs_sql_select(__FILE__, 'banners', 'banners_id', $where); $filename = 'picture-' . $getid['banners_id'] . '.' . $extension; cs_upload('banners', $filename, $files['picture']['tmp_name']); $cs_banners2['banners_picture'] = 'uploads/banners/' . $filename; $banners2_cells = array_keys($cs_banners2); $banners2_save = array_values($cs_banners2); cs_sql_update(__FILE__, 'banners', $banners2_cells, $banners2_save, $getid['banners_id']);
$games_count = count($cs_games); for ($run = 0; $run < $games_count; $run++) { $sel = $cs_games[$run]['games_id'] == $cs_replays['games_id'] ? 1 : 0; $data['games'][$run]['op'] = cs_html_option($cs_games[$run]['games_name'], $cs_games[$run]['games_id'], $sel); } $url = 'uploads/games/' . $cs_replays['games_id'] . '.gif'; $data['replays']['games_img'] = cs_html_img($url, 0, 0, 'id="' . $el_id . '"'); $data['replays']['date_sel'] = cs_dateselect('date', 'date', $cs_replays['replays_date'], 1995); $matches[1] = $cs_lang['rep_infos']; $return_types = ''; foreach ($rep_filetypes as $add) { $return_types .= empty($return_types) ? $add : ', ' . $add; } $matches[2] = $cs_lang['max_size'] . cs_filesize($rep_max['size']) . cs_html_br(1); $matches[2] .= $cs_lang['filetypes'] . $return_types; $data['replays']['upload_clip'] = cs_abcode_clip($matches); $data['replays']['abcode_smileys'] = cs_abcode_smileys('replays_info'); $data['replays']['abcode_features'] = cs_abcode_features('replays_info'); $data['replays']['close_check'] = empty($cs_replays['replays_close']) ? '' : 'checked="checked"'; echo cs_subtemplate(__FILE__, $data, 'replays', 'create'); } else { $cs_replays['users_id'] = $account['users_id']; $cs_replays['replays_since'] = cs_time(); $replays_cells = array_keys($cs_replays); $replays_save = array_values($cs_replays); cs_sql_insert(__FILE__, 'replays', $replays_cells, $replays_save); if (!empty($files_gl['replay']['tmp_name'])) { $where = "replays_team1 = '" . cs_sql_escape($cs_replays['replays_team1']) . "'"; $order = 'replays_since DESC'; $getid = cs_sql_select(__FILE__, 'replays', 'replays_id, replays_mirror_urls', $where, $order); $filename = 'replay-' . $getid['replays_id'] . '-' . cs_time() . '.' . $extension;
for ($run = 0; $run < $run_loop_files; $run++) { $num = $run + 1; $cs_files["text_{$num}"] = isset($_POST["text_{$num}"]) ? $_POST["text_{$num}"] : ''; $data['files'][$run]['num'] = $num; $data['files'][$run]['if']['empty_file'] = FALSE; $data['files'][$run]['if']['file_exists'] = FALSE; if (empty($file_name[$num])) { $data['files'][$run]['if']['empty_file'] = TRUE; $matches[1] = $cs_lang['infos']; $return_types = ''; foreach ($filetypes as $add) { $return_types .= empty($return_types) ? $add : ', ' . $add; } $matches[2] = $cs_lang['max_size'] . cs_filesize($max_size) . cs_html_br(1); $matches[2] .= $cs_lang['filetypes'] . ': ' . $return_types; $data['files'][$run]['clip'] = cs_abcode_clip($matches); } else { $data['files'][$run]['if']['file_exists'] = TRUE; $data['files'][$run]['name'] = $file_name[$num]; $data['files'][$run]['up_name'] = $file_upload_name[$num]; $file = $file_name[$num]; $extension = strlen(strrchr($file, ".")); $name = strlen($file); $ext = substr($file, $name - $extension + 1, $name); $ext_lower = strtolower($ext); $data['files'][$run]['ext'] = cs_filetype($ext_lower); $data['files'][$run]['if']['file_is_picture'] = FALSE; $data['files'][$run]['if']['file_is_other'] = FALSE; #check if file is picture if (strcasecmp($ext, 'jpg') == '0' or strcasecmp($ext, 'jpeg') == '0' or strcasecmp($ext, 'gif') == '0' or strcasecmp($ext, 'png') == '0') { $data['files'][$run]['if']['file_is_picture'] = TRUE;
$message .= $cs_lang['up_error']; $error++; } } } $data['lang']['getmsg'] = cs_getmsg(); if (!empty($error) or empty($_POST['submit'])) { if (!empty($message)) { $data['if']['error'] = 1; $data['avatar']['error'] = $message; } $data['action']['form'] = cs_url('board', 'avatar'); if (empty($useravatar)) { $data['avatar']['img'] = $cs_lang['nopic']; } else { $place = 'uploads/board/' . $useravatar; $size = getimagesize($cs_main['def_path'] . '/' . $place); $data['avatar']['img'] = cs_html_img($place, $size[1], $size[0]); } $matches[1] = $cs_lang['pic_infos']; $return_types = ''; foreach ($img_filetypes as $add => $value) { $return_types .= empty($return_types) ? $add : ', ' . $add; } $matches[2] = $cs_lang['max_width'] . $img_max['width'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_height'] . $img_max['height'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_size'] . cs_filesize($img_max['size']) . cs_html_br(1); $matches[2] .= $cs_lang['filetypes'] . ': ' . $return_types; $data['avatar']['clip'] = cs_abcode_clip($matches); } echo cs_subtemplate(__FILE__, $data, 'board', 'avatar');
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'; $usknum[3]['name'] = $cs_lang['usk_16']; $usknum[4]['games_usk'] = '18'; $usknum[4]['name'] = $cs_lang['usk_18']; $data['games']['usk'] = cs_dropdown('games_usk', 'name', $usknum, $games_usk); $matches[1] = $cs_lang['pic_infos']; $return_types = ''; foreach ($img_filetypes as $add => $value) { $return_types .= empty($return_types) ? $add : ', ' . $add; } $matches[2] = $cs_lang['max_width'] . ': ' . $options['max_width'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_height'] . ': ' . $options['max_height'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_size'] . ': ' . cs_filesize($options['max_size']) . cs_html_br(1); $matches[2] .= $cs_lang['filetypes'] . $return_types; $data['games']['clip'] = cs_abcode_clip($matches); echo cs_subtemplate(__FILE__, $data, 'games', 'create');
$data['head']['topline'] = $cs_lang['picture_body']; } else { $data['head']['topline'] = $cs_lang['remove_done']; } } $data['head']['news_id'] = $cs_news_id; $data['lang']['submit'] = $cs_lang['save']; $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_news['max_width'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_height'] . ': ' . $op_news['max_height'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_size'] . ': ' . cs_filesize($op_news['max_size']) . cs_html_br(1); $matches[2] .= $cs_lang['filetypes'] . $return_types; $data['head']['infobox'] = cs_abcode_clip($matches); if (empty($news_string)) { $data['pictures'][0]['view_link'] = $cs_lang['nopic']; $data['pictures'][0]['remove_link'] = ''; } else { $run = 0; foreach ($news_pics as $pic) { $link = cs_html_img('uploads/news/thumb-' . $pic); $data['pictures'][$run]['view_link'] = cs_html_link('uploads/news/picture-' . $pic, $link) . ' '; $set = 'id=' . $cs_news_id . '&delete=' . ($run + 1); $data['pictures'][$run]['remove_link'] = cs_link($cs_lang['remove'], 'news', 'picture', $set); $run++; } } echo cs_subtemplate(__FILE__, $data, 'news', 'picture');
$data['abcode']['smileys'] = cs_abcode_smileys('maps_text'); $data['abcode']['features'] = cs_abcode_features('maps_text'); $data['maps']['action'] = cs_url('maps', 'edit'); $data['games'] = cs_sql_select(__FILE__, 'games', 'games_name,games_id', 0, 'games_name', 0, 0); $data['games'] = cs_dropdownsel($data['games'], $data['maps']['games_id'], 'games_id'); $data['maps']['picture'] = empty($data['maps']['maps_picture']) ? '-' : cs_html_img('uploads/maps/' . $data['maps']['maps_picture']); $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'] . $options['max_width'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_height'] . $options['max_height'] . ' px' . cs_html_br(1); $matches[2] .= $cs_lang['max_size'] . cs_filesize($options['max_size']) . cs_html_br(1); $matches[2] .= $cs_lang['filetypes'] . $return_types; $data['maps']['matches'] = cs_abcode_clip($matches); $data['if']['picture_remove'] = !empty($data['maps']['maps_picture']) ? TRUE : FALSE; echo cs_subtemplate(__FILE__, $data, 'maps', 'edit'); } else { $cs_maps['games_id'] = (int) $_POST['games_id']; $cs_maps['maps_name'] = $_POST['maps_name']; $cs_maps['server_name'] = $_POST['server_name']; $cs_maps['maps_text'] = $_POST['maps_text']; $maps_id = (int) $_POST['maps_id']; if (empty($_POST['pic_del']) and empty($files_gl['picture']['tmp_name'])) { $cells = array_keys($cs_maps); $values = array_values($cs_maps); cs_sql_update(__FILE__, 'maps', $cells, $values, $maps_id); } elseif (isset($_POST['pic_del']) and empty($files_gl['picture']['tmp_name'])) { $select = cs_sql_select(__FILE__, 'maps', 'maps_picture', 'maps_id = \'' . $maps_id . '\''); cs_unlink('maps', $select['maps_picture']);
$post_count = '$_POST (' . count($_POST) . ')'; $cookie_count = '$_COOKIE (' . count($_COOKIE) . ')'; $session_count = '$_SESSION (' . count($_SESSION) . ')'; $files_count = '$_FILES (' . count($files) . ')'; $com_count = '$com_lang (' . count($com_lang) . ')'; $main_count = '$cs_main (' . count($cs_main) . ')'; $logs_count = '$cs_logs (' . count($cs_logs) . ')'; $acc_count = '$account (' . count($account) . ')'; $arrays[$req_order] = $_REQUEST; $arrays[$get_count] = $_GET; $arrays[$post_count] = $_POST; $arrays[$cookie_count] = $_COOKIE; $arrays[$session_count] = $_SESSION; $arrays[$files_count] = $files; $arrays[$com_count] = $com_lang; $arrays[$main_count] = $cs_main; $arrays[$logs_count] = $cs_logs; $arrays[$acc_count] = $account; foreach ($arrays as $name => $content) { $matches = array(1 => $name, 2 => ''); foreach ($content as $key => $value) { if (is_array($value)) { $content = 'Array'; } else { $content = is_int($value) ? $value : "'" . $value . "'"; } $matches[2] .= '[\'' . $key . '\'] = ' . htmlentities($content, ENT_QUOTES, $cs_main['charset']) . cs_html_br(1); } echo cs_abcode_clip($matches); echo cs_html_br(1); }