Example #1
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('users');
include_once 'lang/' . $account['users_lang'] . '/countries.php';
include_once 'mods/users/functions.php';
$data = array();
if (isset($_POST['submit'])) {
    $op_users = cs_sql_option(__FILE__, 'users');
    $cs_user['users_nick'] = $_POST['users_nick'];
    $cs_user['users_name'] = $_POST['users_name'];
    $cs_user['users_surname'] = $_POST['users_surname'];
    $cs_user['users_sex'] = $_POST['users_sex'];
    $cs_user['users_age'] = cs_datepost('age', 'date');
    $cs_user['users_height'] = $_POST['users_height'];
    $cs_user['users_country'] = $_POST['users_country'];
    $cs_user['users_postalcode'] = $_POST['users_postalcode'];
    $cs_user['users_place'] = $_POST['users_place'];
    $cs_user['users_adress'] = $_POST['users_adress'];
    $cs_user['users_icq'] = str_replace('-', '', $_POST['users_icq']);
    $cs_user['users_jabber'] = $_POST['users_jabber'];
    $cs_user['users_skype'] = $_POST['users_skype'];
    $cs_user['users_email'] = $_POST['users_email'];
    $cs_user['users_url'] = $_POST['users_url'];
    $cs_user['users_phone'] = $_POST['users_phone'];
    $cs_user['users_mobile'] = $_POST['users_mobile'];
    $cs_user['users_info'] = $_POST['users_info'];
    $hidden = array();
    $hidden_count = isset($_POST['hidden']) ? count($_POST['hidden']) : 0;
    $canhid = array('users_name', 'users_surname', 'users_age', 'users_height', 'users_adress', 'users_place', 'users_icq', 'users_jabber', 'users_skype', 'users_email', 'users_url', 'users_phone', 'users_mobile');
Example #2
0
                $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');
    $cs_news['news_readmore'] = empty($cs_main['rte_html']) ? $_POST['news_readmore'] : cs_abcode_inhtml($_POST['news_readmore'], 'add');
    $_POST['run_loop']++;
}
if (!empty($error) or isset($_POST['preview']) or !isset($_POST['submit'])) {
    $data['categories']['dropdown'] = cs_categories_dropdown('news', $cs_news['categories_id']);
    $data['news']['news_headline'] = cs_secure($cs_news['news_headline']);
    $data['news']['news_text'] = cs_secure($cs_news['news_text']);
    $data['news']['news_readmore'] = cs_secure($cs_news['news_readmore']);
    if (isset($_POST['mirror'])) {
        $run_loop = isset($_POST['run_loop']) ? $_POST['run_loop'] : 1;
    } else {
        $temp_mirror = explode("\n", $cs_news['news_mirror']);
        $temp_mirror_name = explode("\n", $cs_news['news_mirror_name']);
Example #3
0
$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 {
        $cs_clans['users_id'] = $users_data['users_id'];
    }
    if (isset($_POST['delete'])) {
        cs_unlink('clans', $cs_clans['clans_picture']);
Example #4
0
 }
 $data['value']['tablescount'] = $tablescount;
 // Show
 $_POST['showcount'] = empty($_POST['showcount']) ? 1 : (int) $_POST['showcount'];
 $showcount = empty($_POST['addshow']) ? $_POST['showcount'] : $_POST['showcount'] + 1;
 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']);
Example #5
0
$board['threads_important'] = 0;
$board['threads_close'] = 0;
$votes = 0;
if (isset($_POST['submit']) or isset($_POST['preview']) or isset($_POST['new_votes']) or isset($_POST['election']) or isset($_POST['files+']) or isset($_POST['new_file'])) {
    $board['threads_headline'] = $_POST['threads_headline'];
    $board['threads_text'] = $_POST['threads_text'];
    if (!empty($acc_mod)) {
        $board['threads_important'] = isset($_POST['threads_important']) ? $_POST['threads_important'] : 0;
        $board['threads_close'] = isset($_POST['threads_close']) ? $account['users_id'] : 0;
    }
    $bv['boardvotes_access'] = isset($_POST['votes_access']) ? $_POST['votes_access'] : '0';
    $bv['boardvotes_question'] = isset($_POST['votes_question']) ? $_POST['votes_question'] : '';
    $bv['boardvotes_several'] = isset($_POST['votes_several']) ? '1' : '0';
    $cs_vote_tpl['several']['checked'] = empty($votes_several) ? '' : 'checked';
    if (cs_datepost('votes_end', 'unix')) {
        $bv['boardvotes_end'] = cs_datepost('votes_end', 'unix');
    } else {
        $bv['boardvotes_end'] = time() + 604800;
    }
    $votes = isset($_POST['votes']) ? $_POST['votes'] : 0;
    if (isset($_POST['new_votes'])) {
        $votes = '1';
    }
    $error = '';
    if (empty($board['threads_headline'])) {
        $error .= $cs_lang['no_headline'] . cs_html_br(1);
    }
    if (!empty($board['threads_text'])) {
        $count_figures = strlen($board['threads_text']);
        if ($count_figures >= $cs_board_opt['max_text']) {
            $diff = $count_figures - $cs_board_opt['max_text'];
Example #6
0
$cs_events['events_url'] = '';
$cs_events['events_more'] = '';
$cs_events['events_close'] = 0;
$cs_events['events_cancel'] = 0;
$cs_events['events_guestsmin'] = '';
$cs_events['events_guestsmax'] = '';
$cs_events['events_needage'] = '';
$_POST['events_multix'] = empty($_POST['events_multix']) ? '' : $_POST['events_multix'];
$_POST['events_multi'] = empty($_POST['events_multi']) ? '' : $_POST['events_multi'];
if (isset($_POST['submit'])) {
    $cs_events['categories_id'] = empty($_POST['categories_name']) ? $_POST['categories_id'] : cs_categories_create('events', $_POST['categories_name']);
    $cs_events['events_name'] = $_POST['events_name'];
    $cs_events['events_venue'] = $_POST['events_venue'];
    $cs_events['events_url'] = $_POST['events_url'];
    $cs_events['events_more'] = empty($cs_main['rte_html']) ? $_POST['events_more'] : cs_abcode_inhtml($_POST['events_more'], 'add');
    $cs_events['events_time'] = cs_datepost('time', 'unix');
    $cs_events['events_close'] = isset($_POST['events_close']) ? $_POST['events_close'] : 0;
    $cs_events['events_cancel'] = isset($_POST['events_cancel']) ? $_POST['events_cancel'] : 0;
    $cs_events['events_guestsmin'] = !empty($_POST['events_guestsmin']) ? $_POST['events_guestsmin'] : '';
    $cs_events['events_guestsmax'] = !empty($_POST['events_guestsmax']) ? $_POST['events_guestsmax'] : '';
    $cs_events['events_needage'] = !empty($_POST['events_needage']) ? $_POST['events_needage'] : '';
    $error = '';
    if (empty($cs_events['events_name'])) {
        $error .= $cs_lang['no_name'] . cs_html_br(1);
    }
    if (empty($cs_events['categories_id'])) {
        $error .= $cs_lang['no_cat'] . cs_html_br(1);
    }
    if (empty($cs_events['events_time'])) {
        $error .= $cs_lang['no_date'] . cs_html_br(1);
    }
Example #7
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('members');
$op_members = cs_sql_option(__FILE__, 'members');
$members_id = $_REQUEST['id'];
settype($members_id, 'integer');
$data['members']['mod'] = $cs_lang[$op_members['label']];
$cells = 'squads_id,users_id,members_task,members_order,members_since,members_admin';
$cs_members = cs_sql_select(__FILE__, 'members', $cells, "members_id = '" . $members_id . "'");
if (isset($_POST['submit'])) {
    $cs_members['members_task'] = $_POST['members_task'];
    $cs_members['members_since'] = cs_datepost('since', 'date');
    $cs_members['members_order'] = empty($_POST['members_order']) ? 1 : $_POST['members_order'];
    $cs_members['members_admin'] = empty($_POST['members_admin']) ? 0 : $_POST['members_admin'];
    $error = 0;
    $errormsg = '';
    if (empty($cs_members['members_task'])) {
        $error++;
        $errormsg .= $cs_lang['no_task'] . cs_html_br(1);
    }
    $where = "squads_id = '" . $cs_members['squads_id'] . "' AND users_id = '" . $account['users_id'] . "'";
    $search_admin = cs_sql_select(__FILE__, 'members', 'members_admin', $where);
    if (empty($search_admin['members_admin'])) {
        $error++;
        $errormsg .= $cs_lang['no_admin'] . cs_html_br(1);
    }
}
if (!isset($_POST['submit'])) {
    $data['lang']['body'] = $cs_lang['errors_here'];
Example #8
0
                $data['prev_mirror'][$prev_run]['dot'] = ' - ';
            }
            $data['prev_mirror'][$prev_run]['news_mirror'] = cs_html_link($temp_mirror[$run], $temp_mirror_name[$run]);
            $prev_run++;
        }
    }
    $data['if']['preview'] = true;
}
if (isset($_POST['mirror'])) {
    $data['news']['categories_id'] = empty($_POST['categories_name']) ? (int) $_POST['categories_id'] : cs_categories_create('news', $_POST['categories_name']);
    $data['news']['news_close'] = isset($_POST['news_close']) ? (int) $_POST['news_close'] : 0;
    $data['news']['news_public'] = isset($_POST['news_public']) ? (int) $_POST['news_public'] : 0;
    $data['news']['news_attached'] = isset($_POST['news_attached']) ? (int) $_POST['news_attached'] : 0;
    $data['news']['news_headline'] = $_POST['news_headline'];
    $data['news']['users_id'] = $_POST['users_id'];
    $data['news']['news_publishs_at'] = isset($_POST['publish_at']) ? (int) cs_datepost('date', 'unix') : 0;
    $data['news']['news_readmore_active'] = isset($_POST['news_readmore_active']) ? (int) $_POST['news_readmore_active'] : 0;
    $data['if']['no_readmore'] = isset($_POST['news_readmore_active']) ? false : true;
    $data['news']['news_text'] = empty($cs_main['rte_html']) ? $_POST['news_text'] : cs_abcode_inhtml($_POST['news_text'], 'add');
    $data['news']['news_readmore'] = empty($cs_main['rte_html']) ? $_POST['news_readmore'] : cs_abcode_inhtml($_POST['news_readmore'], 'add');
    $_POST['run_loop']++;
}
if (!empty($error) or isset($_POST['preview']) or !isset($_POST['submit'])) {
    $data['categories']['dropdown'] = cs_categories_dropdown('news', $cs_news['categories_id']);
    $data['news']['news_headline'] = cs_secure($cs_news['news_headline']);
    $data['news']['news_readmore'] = cs_secure($cs_news['news_readmore']);
    $data['news']['news_text'] = cs_secure($cs_news['news_text']);
    $data['news']['users_id'] = (int) $cs_news['users_id'];
    if (isset($_POST['mirror'])) {
        $run_loop = isset($_POST['run_loop']) ? $_POST['run_loop'] : 1;
    } else {
Example #9
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('cups');
$cs_option = cs_sql_option(__FILE__, 'cups');
require_once 'mods/categories/functions.php';
include_once 'mods/cups/defines.php';
$cs_cups = array();
$cs_cups['cups_name'] = empty($_POST['cups_name']) ? '' : $_POST['cups_name'];
$cs_cups['games_id'] = empty($_POST['games_id']) ? 0 : (int) $_POST['games_id'];
$cs_cups['cups_teams'] = empty($_POST['cups_teams']) ? 0 : (int) $_POST['cups_teams'];
$cs_cups['cups_start'] = empty($_POST['cups_start_year']) ? time() + 604800 : cs_datepost('cups_start', 'unix');
$cs_cups['cups_checkin'] = empty($_POST['cups_checkin_year']) ? time() + 601200 : cs_datepost('cups_checkin', 'unix');
$cs_cups['cups_system'] = empty($_POST['cups_system']) ? '' : $_POST['cups_system'];
$cs_cups['cups_text'] = empty($_POST['cups_text']) ? '' : $_POST['cups_text'];
$cs_cups['cups_brackets'] = empty($_POST['cups_brackets']) ? CS_CUPS_SYSTEM_KO : (int) $_POST['cups_brackets'];
$cs_cups['cups_access'] = isset($_POST['cups_access']) ? empty($_POST['cups_access']) ? 0 : (int) $_POST['cups_access'] : 1;
if (isset($_POST['submit'])) {
    $error = '';
    if ($cs_cups['cups_start'] <= $cs_cups['cups_checkin'] + 900) {
        $error .= cs_html_br(1) . $cs_lang['checkin_before_start'];
    }
    if (empty($cs_cups['cups_name'])) {
        $error .= cs_html_br(1) . $cs_lang['no_name'];
    }
    if (empty($cs_cups['games_id'])) {
        $error .= cs_html_br(1) . $cs_lang['no_game'];
    }
    if (empty($cs_cups['cups_teams'])) {
        $error .= cs_html_br(1) . $cs_lang['no_maxteams'];
Example #10
0
// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('replays');
$files_gl = cs_files();
$op_replays = cs_sql_option(__FILE__, 'replays');
$rep_max['size'] = $op_replays['file_size'];
$rep_filetypes = explode(",", $op_replays['file_type']);
require_once 'mods/categories/functions.php';
if (isset($_POST['submit'])) {
    $cs_replays['categories_id'] = empty($_POST['categories_name']) ? $_POST['categories_id'] : cs_categories_create('replays', $_POST['categories_name']);
    $cs_replays['games_id'] = $_POST['games_id'];
    $cs_replays['replays_version'] = $_POST['replays_version'];
    $cs_replays['replays_team1'] = $_POST['replays_team1'];
    $cs_replays['replays_team2'] = $_POST['replays_team2'];
    $cs_replays['replays_date'] = cs_datepost('date', 'date');
    $cs_replays['replays_map'] = $_POST['replays_map'];
    $cs_replays['replays_mirror_urls'] = $_POST['replays_mirror_urls'];
    $cs_replays['replays_mirror_names'] = $_POST['replays_mirror_names'];
    $cs_replays['replays_info'] = $_POST['replays_info'];
    $cs_replays['replays_close'] = isset($_POST['replays_close']) ? $_POST['replays_close'] : 0;
    $error = '';
    if (!empty($files_gl['replay']['tmp_name'])) {
        $rep_size = filesize($files_gl['replay']['tmp_name']);
        $rep_ext = explode('.', $files_gl['replay']['name']);
        $who_ext = count($rep_ext) < 1 ? 0 : count($rep_ext) - 1;
        $extension = in_array($rep_ext[$who_ext], $rep_filetypes) ? $rep_ext[$who_ext] : 0;
        if (empty($extension)) {
            $error .= $cs_lang['ext_error'] . cs_html_br(1);
        }
        if ($files_gl['replay']['size'] > $rep_max['size']) {
Example #11
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('cash');
$data = array();
$data['op'] = cs_sql_option(__FILE__, 'cash');
$users_nick = '';
$cs_cash['users_id'] = 0;
if (isset($_POST['submit'])) {
    $cs_cash['cash_inout'] = $_POST['cash_inout'];
    $cs_cash['cash_money'] = $_POST['cash_money'];
    $cs_cash['cash_text'] = $_POST['cash_text'];
    $cs_cash['cash_info'] = $_POST['cash_info'];
    $cs_cash['cash_time'] = cs_datepost('datum', 'date');
    $users_nick = empty($_REQUEST['users_nick']) ? '' : $_REQUEST['users_nick'];
    $error = '';
    $where = "users_nick = '" . cs_sql_escape($users_nick) . "'";
    $users_data = cs_sql_select(__FILE__, 'users', 'users_id', $where);
    if (empty($users_data['users_id'])) {
        $error .= $cs_lang['no_user'] . cs_html_br(1);
    } else {
        $cs_cash['users_id'] = $users_data['users_id'];
    }
    if (empty($cs_cash['cash_inout'])) {
        $error .= $cs_lang['no_inout'] . cs_html_br(1);
    }
    if (empty($cs_cash['cash_money'])) {
        $error .= $cs_lang['no_money'] . cs_html_br(1);
    }
    if (empty($cs_cash['cash_text'])) {
Example #12
0
        $cs_vote_tpl['votes']['type'] = empty($votes_several) ? 'radio' : 'checkbox';
        echo cs_subtemplate(__FILE__, $cs_vote_tpl, 'votes', 'action_vote');
        unset($cs_vote_tpl['answers']);
    } else {
        $cs_vote_tpl['lang']['error_occurred'] = $cs_lang['error_occurred'];
        $cs_vote_tpl['error']['message'] = $errormsg;
        echo cs_subtemplate(__FILE__, $cs_vote_tpl, 'votes', 'error');
    }
}
if (isset($_POST['election'])) {
    $vote_userid = $account['users_id'];
    $votes_access = $_POST['votes_access'];
    $levels = $_POST['votes_access'];
    $votes_question = $_POST['votes_question'];
    $votes_start = cs_datepost('votes_start', 'unix');
    $votes_end = cs_datepost('votes_end', 'unix');
    $votes_close = empty($_POST['votes_close']) ? 0 : $_POST['votes_close'];
    $votes_several = empty($_POST['votes_several']) ? 0 : $_POST['votes_several'];
    $_POST['run_loop']++;
}
if (!empty($vote_form)) {
    $levels = 0;
    while ($levels < 6) {
        $votes_access == $levels ? $sel = 'selected="selected"' : ($sel = '');
        $cs_vote_tpl['access'][$levels]['level_id'] = $levels;
        $cs_vote_tpl['access'][$levels]['level_name'] = $cs_lang['lev_' . $levels];
        $cs_vote_tpl['access'][$levels]['selected'] = $sel;
        $levels++;
    }
    $run_loop = isset($_POST['run_loop']) ? $_POST['run_loop'] : 1;
    for ($run = 0; $run < $run_loop; $run++) {
Example #13
0
$captcha = 0;
if (empty($account['users_id']) and extension_loaded('gd')) {
    $captcha = 1;
}
if (isset($_POST['submit'])) {
    $cs_fightus['games_id'] = empty($_POST['games_id']) ? 0 : $_POST['games_id'];
    $cs_fightus['squads_id'] = $_POST['squads_id'];
    $cs_fightus['fightus_nick'] = $_POST['fightus_nick'];
    $cs_fightus['fightus_clan'] = $_POST['fightus_clan'];
    $cs_fightus['fightus_short'] = $_POST['fightus_short'];
    $cs_fightus['fightus_url'] = $_POST['fightus_url'];
    $cs_fightus['fightus_country'] = $_POST['fightus_country'];
    $cs_fightus['fightus_icq'] = empty($_POST['fightus_icq']) ? 0 : str_replace('-', '', $_POST['fightus_icq']);
    $cs_fightus['fightus_jabber'] = $_POST['fightus_jabber'];
    $cs_fightus['fightus_email'] = $_POST['fightus_email'];
    $cs_fightus['fightus_date'] = cs_datepost('fight', 'unix');
    $cs_fightus['fightus_more'] = $_POST['fightus_more'];
    $error = '';
    $nick2 = str_replace(' ', '', $cs_fightus['fightus_nick']);
    $nickchars = strlen($nick2);
    if (empty($cs_fightus['fightus_nick'])) {
        $error .= $cs_lang['no_nick'] . cs_html_br(1);
    } elseif ($nickchars < $op_users['min_letters']) {
        $error .= sprintf($cs_lang['short_nick'], $op_users['min_letters']) . cs_html_br(1);
    }
    if (empty($cs_fightus['fightus_clan'])) {
        $error .= $cs_lang['no_clan'] . cs_html_br(1);
    }
    if (empty($cs_fightus['fightus_short'])) {
        $error .= $cs_lang['no_short'] . cs_html_br(1);
    }
Example #14
0
}
if (isset($_POST['submit'])) {
    $cs_wars['categories_id'] = empty($_POST['categories_name']) ? $_POST['categories_id'] : cs_categories_create('wars', $_POST['categories_name']);
    $cs_wars['games_id'] = (int) $_POST['games_id'];
    $cs_wars['clans_id'] = (int) $_POST['clans_id'];
    $cs_wars['squads_id'] = (int) $_POST['squads_id'];
    $cs_wars['wars_status'] = $_POST['wars_status'];
    $cs_wars['wars_score1'] = $_POST['wars_score1'] == '' ? 0 : (int) $_POST['wars_score1'];
    $cs_wars['wars_score2'] = $_POST['wars_score2'] == '' ? 0 : (int) $_POST['wars_score2'];
    $cs_wars['wars_players1'] = $_POST['wars_players1'] == '' ? 0 : $_POST['wars_players1'];
    $cs_wars['wars_players2'] = $_POST['wars_players2'] == '' ? 0 : $_POST['wars_players2'];
    $cs_wars['wars_opponents'] = $_POST['wars_opponents'];
    $cs_wars['wars_url'] = strpos($_POST['wars_url'], 'http://') === false ? $_POST['wars_url'] : substr($_POST['wars_url'], 7);
    $cs_wars['wars_report'] = $_POST['wars_report'];
    $cs_wars['wars_report2'] = $_POST['wars_report2'];
    $cs_wars['wars_date'] = cs_datepost('date', 'unix');
    $cs_wars['wars_close'] = isset($_POST['wars_close']) ? $_POST['wars_close'] : 0;
    $cs_wars['wars_topmatch'] = empty($_POST['wars_topmatch']) ? 0 : 1;
    $old_cells = 'users_id, players_status, players_played, players_time';
    $old_players = cs_sql_select(__FILE__, 'players', $old_cells, 'wars_id = ' . $wars_id, 0, 0, 0);
    $old_players = empty($old_players) ? array() : $old_players;
    cs_sql_delete(__FILE__, 'players', $wars_id, 'wars_id');
    $players = empty($_POST['players']) ? 1 : (int) $_POST['players'];
    $pcells = array('users_id', 'wars_id', 'players_status', 'players_played', 'players_time');
    function multiarray_search_2($array, $innerkey, $value)
    {
        foreach ($array as $outerkey => $innerarray) {
            if ($innerarray[$innerkey] == $value) {
                return $outerkey;
            }
        }
Example #15
0
$data['if']['captcha'] = 0;
if (isset($_POST['submit'])) {
    $data['join']['games_id'] = $_POST['games_id'];
    $data['join']['squads_id'] = $_POST['squads_id'];
    $data['join']['joinus_nick'] = $_POST['joinus_nick'];
    $data['join']['joinus_name'] = $_POST['joinus_name'];
    $data['join']['joinus_surname'] = $_POST['joinus_surname'];
    $data['join']['joinus_age'] = cs_datepost('age', 'date');
    $data['join']['joinus_country'] = $_POST['joinus_country'];
    $data['join']['joinus_place'] = $_POST['joinus_place'];
    $data['join']['joinus_icq'] = empty($_POST['joinus_icq']) ? 0 : str_replace('-', '', $_POST['joinus_icq']);
    $data['join']['joinus_jabber'] = $_POST['joinus_jabber'];
    $data['join']['joinus_email'] = $_POST['joinus_email'];
    $data['join']['joinus_lanact'] = $_POST['joinus_lanact'];
    $data['join']['joinus_webcon'] = $_POST['joinus_webcon'];
    $data['join']['joinus_date'] = cs_datepost('join', 'date');
    $data['join']['joinus_more'] = $_POST['joinus_more'];
    $data2['join']['joinus_rules'] = empty($_POST['joinus_rules']) ? 0 : 1;
    if (empty($account['users_id'])) {
        $data['join']['users_pwd'] = $_POST['users_pwd'];
    } else {
        $data['if']['pass'] = 1;
        $data['if']['nopass'] = 0;
    }
    $error = 0;
    $errormsg = '';
    $nick2 = str_replace(' ', '', $data['join']['joinus_nick']);
    $nickchars = strlen($nick2);
    $op_users = cs_sql_option(__FILE__, 'users');
    if ($nickchars < $op_users['min_letters']) {
        $error++;
Example #16
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('cups');
require_once 'mods/categories/functions.php';
include_once 'mods/cups/defines.php';
$cs_cups = array();
$cs_cups['cups_name'] = empty($_POST['cups_name']) ? '' : $_POST['cups_name'];
$cs_cups['games_id'] = empty($_POST['games_id']) ? 0 : (int) $_POST['games_id'];
$cs_cups['cups_teams'] = empty($_POST['cups_teams']) ? 0 : (int) $_POST['cups_teams'];
$cs_cups['cups_start'] = cs_datepost('cups_start', 'unix');
$cs_cups['cups_checkin'] = cs_datepost('cups_checkin', 'unix');
$cs_cups['cups_system'] = empty($_POST['cups_system']) ? '' : $_POST['cups_system'];
$cs_cups['cups_text'] = empty($_POST['cups_text']) ? '' : $_POST['cups_text'];
$cs_cups['cups_brackets'] = empty($_POST['cups_brackets']) ? CS_CUPS_SYSTEM_KO : (int) $_POST['cups_brackets'];
$cs_cups['cups_access'] = empty($_POST['cups_access']) ? 0 : (int) $_POST['cups_access'];
$cs_cups['cups_notified'] = empty($_POST['cups_notified']) ? 0 : 1;
$cs_cups['cups_notify_hours'] = empty($_POST['cups_notify_hours']) ? 0 : (int) $_POST['cups_notify_hours'];
if ($cs_cups['cups_notify_hours'] < 0) {
    $cs_cups['cups_notify_hours'] = 0;
}
$cs_cups['cups_notify_via'] = 0;
if (!empty($_POST['cups_notify_pm'])) {
    $cs_cups['cups_notify_via'] += constant('CS_CUPS_NOTIFY_PM');
}
if (!empty($_POST['cups_notify_email'])) {
    $cs_cups['cups_notify_via'] += constant('CS_CUPS_NOTIFY_EMAIL');
}
if (isset($_POST['submit'])) {
    $error = '';