Exemplo n.º 1
0
        cs_optionsave('counter', $save);
    }
    if ($op_counter['last_archiv'] != $month) {
        $year = cs_datereal('Y');
        $timer = mktime(0, 0, 0, $month, 1, $year);
        $timer2 = $timer - 86400;
        $cond = "count_time < '" . $timer . "'";
        $last_day = cs_sql_count(__FILE__, 'count', $cond . " AND count_time > '" . $timer2 . "'");
        $count_month = cs_sql_count(__FILE__, 'count', $cond);
        $month_archieve = cs_sql_select(__FILE__, 'count_archiv', 'SUM(count_num) AS count', 'count_mode = 1', 0, 0, 0);
        $count_month += $month_archieve[0]['count'];
        if (!empty($count_month)) {
            cs_sql_query(__FILE__, 'DELETE FROM {pre}_count WHERE ' . $cond);
            cs_sql_query(__FILE__, "DELETE FROM {pre}_count_archiv WHERE count_mode = '1'");
            if ($month == 1) {
                $old_year = $year - 1;
                $old_month = 12;
            } else {
                $old_year = $year;
                $old_month = $month - 1;
            }
            $counter_cells1 = array('count_month', 'count_num');
            $counter_content1 = array($old_month . '-' . $old_year, $count_month);
            cs_sql_insert(__FILE__, 'count_archiv', $counter_cells1, $counter_content1);
        }
        //Save the newest month
        $save = array('last_archiv' => $month, 'last_archiv_day' => 1, 'count_lastday' => $last_day);
        require_once 'mods/clansphere/func_options.php';
        cs_optionsave('counter', $save);
    }
}
Exemplo n.º 2
0
    if (empty($wizard)) {
        $data['if']['done'] = true;
        $data['link']['wizard'] = cs_link($cs_lang['show'], 'wizard', 'roots') . ' - ' . cs_link($cs_lang['task_done'], 'wizard', 'roots', 'handler=temp&amp;done=1');
    }
}
if (!empty($activate) and !empty($allow)) {
    require_once 'mods/clansphere/func_options.php';
    $save = array();
    $save['def_tpl'] = $activate;
    if (isset($templates[ucfirst($activate)]['themes'])) {
        $themes = cs_checkdirs('themes');
        if (isset($themes[ucfirst($templates[ucfirst($activate)]['themes'])])) {
            $save['def_theme'] = $templates[ucfirst($activate)]['themes'];
        }
    }
    cs_optionsave('clansphere', $save);
    $msg = file_exists('themes/' . $activate) ? $cs_lang['theme_found'] . cs_link($cs_lang['change_to_this'], 'clansphere', 'themes_list', 'activate=' . $activate) : $cs_lang['success'];
    cs_redirect($msg, 'clansphere', 'temp_list');
} else {
    $data['lang']['getmsg'] = cs_getmsg();
    $run = 0;
    foreach ($templates as $mod) {
        if ($mod['dir'] == 'install') {
            $tpl_all--;
            continue;
        }
        $data['temp_list'][$run]['name'] = $mod['name'];
        $data['temp_list'][$run]['dir'] = $mod['dir'];
        $data['temp_list'][$run]['version'] = $mod['version'];
        $data['temp_list'][$run]['date'] = cs_date('date', $mod['released']);
        $data['temp_list'][$run]['if']['active'] = $mod['dir'] == $cs_main['template'] ? 1 : 0;
Exemplo n.º 3
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('wars');
if (isset($_POST['submit'])) {
    $save = array();
    $save['max_width'] = (int) $_POST['max_width'];
    $save['max_height'] = (int) $_POST['max_height'];
    $save['max_size'] = (int) $_POST['max_size'];
    $save['max_navlist'] = (int) $_POST['max_navlist'];
    $save['max_navlist2'] = (int) $_POST['max_navlist2'];
    $save['max_navnext'] = (int) $_POST['max_navnext'];
    require_once 'mods/clansphere/func_options.php';
    cs_optionsave('wars', $save);
    $lang = cs_substr($account['users_lang'], 0, 2);
    if (!file_exists('uploads/wars/news_' . $lang . '.txt')) {
        $lang = 'de';
    }
    $text = $_POST['news_text'];
    $fp = fopen('uploads/wars/news_' . $lang . '.txt', 'w');
    # set stream encoding if possible to avoid converting issues
    if (function_exists('stream_encoding')) {
        stream_encoding($fp, $cs_main['charset']);
    }
    fwrite($fp, $text);
    fclose($fp);
    cs_redirect($cs_lang['success'], 'options', 'roots');
} else {
    $data = array();
    $data['head']['message'] = cs_getmsg();
Exemplo n.º 4
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('members');
if (!empty($_POST['submit'])) {
    $save = array();
    $save['label'] = $_POST['label'];
    require_once 'mods/clansphere/func_options.php';
    cs_optionsave('members', $save);
    cs_redirect($cs_lang['success'], 'options', 'roots');
}
$data = array();
$data['op'] = cs_sql_option(__FILE__, 'members');
$data['lang']['mod_name'] = $cs_lang[$data['op']['label']];
$data['select']['members_select'] = $data['op']['label'] == 'members' ? 'selected="selected"' : '';
$data['select']['memberemployees_select'] = $data['op']['label'] == 'employees' ? 'selected="selected"' : '';
$data['select']['teammates_select'] = $data['op']['label'] == 'teammates' ? 'selected="selected"' : '';
$data['select']['classmates_select'] = $data['op']['label'] == 'classmates' ? 'selected="selected"' : '';
echo cs_subtemplate(__FILE__, $data, 'members', 'options');
Exemplo n.º 5
0
    $save['max_text'] = $_POST['max_text'] < 65000 ? (int) $_POST['max_text'] : 65000;
    $save['max_signatur'] = $_POST['max_signatur'];
    $save['avatar_width'] = $_POST['avatar_width'];
    $save['avatar_height'] = $_POST['avatar_height'];
    $save['avatar_size'] = $_POST['avatar_size'] * 1024;
    $save['file_size'] = $_POST['file_size'] * 1024;
    $save['file_types'] = $_POST['file_types'];
    $save['sort'] = $_POST['sort'];
    $save['doubleposts'] = empty($_POST['doublep_allowed']) ? -1 : (int) (86400 * str_replace(',', '.', $_POST['doubleposts']));
    $save['list_subforums'] = empty($_POST['list_subforums']) ? 0 : 1;
    $save['max_navlist'] = $_POST['max_navlist'];
    $save['max_headline'] = $_POST['max_headline'];
    $save['max_navtop'] = $_POST['max_navtop'];
    $save['max_navtop2'] = $_POST['max_navtop2'];
    require_once 'mods/clansphere/func_options.php';
    cs_optionsave('board', $save);
    cs_redirect($cs_lang['success'], 'options', 'roots');
}
if (!empty($board_form)) {
    $data['action']['form'] = cs_url('board', 'options');
    $size = $cs_board['avatar_size'] / 1024;
    $size2 = $cs_board['file_size'] / 1024;
    $data['options']['max_text'] = $cs_board['max_text'];
    $data['options']['max_signatur'] = $cs_board['max_signatur'];
    $data['options']['max_high'] = $cs_board['avatar_height'];
    $data['options']['max_avatar_width'] = $cs_board['avatar_width'];
    $data['options']['max_avatar_size'] = $size;
    $data['options']['max_filesize'] = $size2;
    $data['options']['filetypes'] = $cs_board['file_types'];
    $data['options']['max_navlist'] = $cs_board['max_navlist'];
    $data['options']['max_headline'] = $cs_board['max_headline'];
Exemplo n.º 6
0
// $Id$
require_once 'mods/clansphere/func_options.php';
$data = array();
$i = 0;
$modules = cs_checkdirs('mods');
if (isset($_POST['submit'])) {
    foreach ($modules as $mod) {
        if (isset($mod['navlist'])) {
            if (isset($_POST[$mod['tables'][0]])) {
                foreach ($mod['navlist'] as $navlist) {
                    $save = array();
                    $save[$navlist] = $_POST[$mod['tables'][0]][$navlist];
                    if (empty($save[$navlist])) {
                        $save[$navlist] = 0;
                    }
                    cs_optionsave($mod['tables'][0], $save);
                }
            }
        }
    }
    global $cs_lang;
    cs_redirect($cs_lang['success'], 'options', 'roots');
} else {
    foreach ($modules as $mod) {
        if (isset($mod['navlist'])) {
            $cs_lang = cs_translate($mod['dir']);
            $cs_option = cs_sql_option(__FILE__, $mod['tables'][0]);
            $data['mods'][$i]['mod'] = $mod['name'];
            $a = 0;
            foreach ($mod['navlist'] as $navlist) {
                $data['mods'][$i]['navlist'][$a]['type'] = $cs_lang[$navlist];
Exemplo n.º 7
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$data = array();
$op_banners = cs_sql_option(__FILE__, 'banners');
$where = "banners_id != '" . $op_banners['last_id'] . "'";
$cat_where = '';
if (!empty($_GET['cat_id'])) {
    $cat_id = (int) $_GET['cat_id'];
    $cat_where = "categories_id = '" . $cat_id . "'";
    $where .= ' AND ' . $cat_where;
}
$cs_count = cs_sql_count(__FILE__, 'banners', $where);
if ($cs_count == 0) {
    $where = $cat_where;
}
$columns = 'banners_id, banners_picture, banners_alt, banners_url, categories_id';
$cs_banners = cs_sql_select(__FILE__, 'banners', $columns, $where, '{random}', 0, 1);
if (empty($cs_banners)) {
    echo '----';
} else {
    $data['banner']['pic'] = cs_secure($cs_banners['banners_picture']);
    $data['banner']['alt'] = cs_secure($cs_banners['banners_alt']);
    $data['banner']['url'] = cs_secure($cs_banners['banners_url']);
    echo cs_subtemplate(__FILE__, $data, 'banners', 'rotation');
    require_once 'mods/clansphere/func_options.php';
    $save = array('last_id' => $cs_banners['banners_id']);
    cs_optionsave('banners', $save);
}
Exemplo n.º 8
0
if (isset($_POST['submit'])) {
    $save = array();
    $save['vorname'] = (int) $_POST['vorname'];
    $save['surname'] = (int) $_POST['surname'];
    $save['place'] = (int) $_POST['place'];
    $save['country'] = (int) $_POST['country'];
    $save['icq'] = (int) $_POST['icq'];
    $save['jabber'] = (int) $_POST['jabber'];
    $save['game'] = (int) $_POST['game'];
    $save['squad'] = (int) $_POST['squad'];
    $save['webcon'] = (int) $_POST['webcon'];
    $save['lanact'] = (int) $_POST['lanact'];
    $save['more'] = (int) $_POST['more'];
    $save['max_usershome'] = (int) $_POST['max_usershome'];
    require_once 'mods/clansphere/func_options.php';
    cs_optionsave('joinus', $save);
    cs_redirect($cs_lang['success'], 'options', 'roots');
}
$data = array();
$data['op'] = cs_sql_option(__FILE__, 'joinus');
$data['op']['vorname'] = empty($data['op']['vorname']) ? $data['op']['vorname_no'] = 'checked="checked"' : ($data['op']['vorname_yes'] = 'checked="checked"');
$data['op']['surname'] = empty($data['op']['surname']) ? $data['op']['surname_no'] = 'checked="checked"' : ($data['op']['surname_yes'] = 'checked="checked"');
$data['op']['place'] = empty($data['op']['place']) ? $data['op']['place_no'] = 'checked="checked"' : ($data['op']['place_yes'] = 'checked="checked"');
$data['op']['country'] = empty($data['op']['country']) ? $data['op']['country_no'] = 'checked="checked"' : ($data['op']['country_yes'] = 'checked="checked"');
$data['op']['icq'] = empty($data['op']['icq']) ? $data['op']['icq_no'] = 'checked="checked"' : ($data['op']['icq_yes'] = 'checked="checked"');
$data['op']['jabber'] = empty($data['op']['jabber']) ? $data['op']['jabber_no'] = 'checked="checked"' : ($data['op']['jabber_yes'] = 'checked="checked"');
$data['op']['game'] = empty($data['op']['game']) ? $data['op']['game_no'] = 'checked="checked"' : ($data['op']['game_yes'] = 'checked="checked"');
$data['op']['squad'] = empty($data['op']['squad']) ? $data['op']['squad_no'] = 'checked="checked"' : ($data['op']['squad_yes'] = 'checked="checked"');
$data['op']['webcon'] = empty($data['op']['webcon']) ? $data['op']['webcon_no'] = 'checked="checked"' : ($data['op']['webcon_yes'] = 'checked="checked"');
$data['op']['lanact'] = empty($data['op']['lanact']) ? $data['op']['lanact_no'] = 'checked="checked"' : ($data['op']['lanact_yes'] = 'checked="checked"');
$data['op']['more'] = empty($data['op']['more']) ? $data['op']['more_no'] = 'checked="checked"' : ($data['op']['more_yes'] = 'checked="checked"');
Exemplo n.º 9
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('categories');
if (isset($_POST['submit'])) {
    require_once 'mods/clansphere/func_options.php';
    $save = array();
    $save['max_width'] = (int) $_POST['max_width'];
    $save['max_height'] = (int) $_POST['max_height'];
    $save['max_size'] = (int) $_POST['max_size'];
    $save['def_mod'] = $_POST['def_mod'];
    cs_optionsave('categories', $save);
    cs_redirect($cs_lang['changes_done'], 'options', 'roots');
} else {
    $data = array();
    $data['op'] = cs_sql_option(__FILE__, 'categories');
    $data['head']['getmsg'] = cs_getmsg();
    $modules = cs_checkdirs('mods');
    $run = 0;
    foreach ($modules as $mods) {
        if (!empty($mods['categories'])) {
            $mods['dir'] == $data['op']['def_mod'] ? $sel = 1 : ($sel = 0);
            $data['mod'][$run]['sel'] = cs_html_option($mods['name'], $mods['dir'], $sel);
            $run++;
        }
    }
    echo cs_subtemplate(__FILE__, $data, 'categories', 'options');
}
Exemplo n.º 10
0
        $color_title1 = array(0, 0, 0);
    }
    $color_title2 = !empty($_POST['color_title2']) ? explode(',', $_POST['color_title2']) : array(0, 0, 0);
    if (count($color_title2) != 3) {
        $color_title2 = array(0, 0, 0);
    }
    $save['color_bg'] = implode(',', $color_bg);
    $save['color_line'] = implode(',', $color_line);
    $save['color_team_bg'] = implode(',', $color_team_bg);
    $save['color_team_bg_lb'] = implode(',', $color_team_bg_lb);
    $save['color_team_fg'] = implode(',', $color_team_fg);
    $save['color_headline'] = implode(',', $color_headline);
    $save['color_title1'] = implode(',', $color_title1);
    $save['color_title2'] = implode(',', $color_title2);
    require_once 'mods/clansphere/func_options.php';
    cs_optionsave('cups', $save);
    // create/replace grid images
    cs_cups_grid_images();
    // clear datacache
    if (function_exists('cs_datacache_load')) {
        cs_datacache_clear('cups');
    }
    cs_redirect($cs_lang['changes_done'], 'options', 'roots');
} else {
    $data = array();
    $data['com'] = cs_sql_option(__FILE__, 'cups');
    $s_bg = cs_cups_dechex(explode(',', $data['com']['color_bg']));
    $data['com']['sample_bg'] = '<span style="color: #' . $s_bg[0] . $s_bg[1] . $s_bg[2] . '; font-weight: bold;">' . $cs_lang['example'] . '</span>';
    $s_bg = cs_cups_dechex(explode(',', $data['com']['color_line']));
    $data['com']['sample_line'] = '<span style="color: #' . $s_bg[0] . $s_bg[1] . $s_bg[2] . '; font-weight: bold;">' . $cs_lang['example'] . '</span>';
    $s_bg = cs_cups_dechex(explode(',', $data['com']['color_team_bg']));
Exemplo n.º 11
0
    $save['quality'] = (int) $_POST['quality'];
    $save['width'] = (int) $_POST['width'];
    $save['height'] = (int) $_POST['height'];
    $save['size'] = (int) $_POST['size'] * 1024;
    $save['max_width'] = (int) $_POST['max_width'];
    $save['top_5_votes'] = (int) $_POST['top_5_votes'];
    $save['top_5_views'] = (int) $_POST['top_5_views'];
    $save['newest_5'] = (int) $_POST['newest_5'];
    $save['list_sort'] = (int) $_POST['list_sort'];
    $save['size2'] = (int) $_POST['size2'] * 1024;
    $save['max_files'] = (int) $_POST['max_files'];
    $save['max_folders'] = (int) $_POST['max_folders'];
    $save['lightbox'] = (int) $_POST['lightbox'];
    $save['max_navlist'] = (int) $_POST['max_navlist'];
    require_once 'mods/clansphere/func_options.php';
    cs_optionsave('gallery', $save);
    cs_redirect($cs_lang['changes_done'], 'options', 'roots');
} else {
    $data = array();
    $data['op'] = cs_sql_option(__FILE__, 'gallery');
    $data['op']['size'] = $data['op']['size'] / 1024;
    $data['op']['size2'] = $data['op']['size2'] / 1024;
    $checked = 'checked="checked"';
    $data['check']['top_5_votes_0'] = empty($data['op']['top_5_votes']) ? $checked : '';
    $data['check']['top_5_votes_1'] = !empty($data['op']['top_5_votes']) ? $checked : '';
    $data['check']['top_5_views_0'] = empty($data['op']['top_5_views']) ? $checked : '';
    $data['check']['top_5_views_1'] = !empty($data['op']['top_5_views']) ? $checked : '';
    $data['check']['newest_5_0'] = empty($data['op']['newest_5']) ? $checked : '';
    $data['check']['newest_5_1'] = !empty($data['op']['newest_5']) ? $checked : '';
    $levels = 0;
    $var2 = '';
Exemplo n.º 12
0
$data = array();
$data['lang']['getmsg'] = cs_getmsg();
if (!isset($_POST['submit'])) {
    $data['options'] = cs_sql_option(__FILE__, 'abcode');
    $rte_html_array = cs_checkdirs('mods', 'abcode/rte_html');
    $rte_more_array = cs_checkdirs('mods', 'abcode/rte_more');
    $data['dropdown']['rte_html'] = cs_dropdown('rte_html', 'name', $rte_html_array, $data['options']['rte_html'], 'dir');
    $data['dropdown']['rte_more'] = cs_dropdown('rte_more', 'name', $rte_more_array, $data['options']['rte_more'], 'dir');
    $abc[0]['def_func'] = 'img';
    $abc[0]['name'] = $cs_lang['img'];
    $abc[1]['def_func'] = 'str';
    $abc[1]['name'] = $cs_lang['str'];
    $data['dropdown']['def_func'] = cs_dropdown('def_func', 'name', $abc, $data['options']['def_func']);
    $data['checked']['def_abcode'] = empty($data['options']['def_abcode']) ? '' : ' checked="checked"';
    echo cs_subtemplate(__FILE__, $data, 'abcode', 'options');
} else {
    require_once 'mods/clansphere/func_options.php';
    $save = array();
    $save['rte_html'] = $_POST['rte_html'];
    $save['rte_more'] = $_POST['rte_more'];
    $save['max_width'] = (int) $_POST['max_width'];
    $save['max_height'] = (int) $_POST['max_height'];
    $save['max_size'] = (int) $_POST['max_size'];
    $save['def_func'] = $_POST['def_func'];
    $save['image_width'] = $_POST['image_width'];
    $save['image_height'] = $_POST['image_height'];
    $save['word_cut'] = $_POST['word_cut'] > 65535 ? 65535 : (int) $_POST['word_cut'];
    $save['def_abcode'] = empty($_POST['def_abcode']) ? 0 : 1;
    cs_optionsave('abcode', $save);
    cs_redirect($cs_lang['changes_done'], 'options', 'roots');
}
Exemplo n.º 13
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('gbook');
if (isset($_POST['submit'])) {
    $save = array();
    $save['lock'] = (int) $_POST['lock'];
    $save['captcha_users'] = (int) $_POST['captcha_users'];
    require_once 'mods/clansphere/func_options.php';
    cs_optionsave('gbook', $save);
    cs_redirect($cs_lang['changes_done'], 'options', 'roots');
} else {
    $data = array();
    $data['option'] = cs_sql_option(__FILE__, 'gbook');
    $data['select']['no'] = $data['option']['lock'] == 0 ? 'selected="selected"' : '';
    $data['select']['yes'] = $data['option']['lock'] == 1 ? 'selected="selected"' : '';
    $data['captcha']['no'] = $data['option']['captcha_users'] == 0 ? 'selected="selected"' : '';
    $data['captcha']['yes'] = $data['option']['captcha_users'] == 1 ? 'selected="selected"' : '';
    echo cs_subtemplate(__FILE__, $data, 'gbook', 'options');
}
Exemplo n.º 14
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('articles');
$data = array();
if (isset($_POST['submit'])) {
    require_once 'mods/clansphere/func_options.php';
    $save = array();
    $save['max_navlist'] = (int) $_POST['max_navlist'];
    $save['max_navtop'] = (int) $_POST['max_navtop'];
    cs_optionsave('articles', $save);
    cs_redirect($cs_lang['changes_done'], 'options', 'roots');
}
$op_articles = cs_sql_option(__FILE__, 'articles');
$data['op']['max_navlist'] = $op_articles['max_navlist'];
$data['op']['max_navtop'] = $op_articles['max_navtop'];
echo cs_subtemplate(__FILE__, $data, 'articles', 'options');
Exemplo n.º 15
0
    $abcode[] = empty($_POST['clip']) ? 0 : 1;
    $abcode[] = empty($_POST['html']) ? 0 : 1;
    $abcode[] = empty($_POST['php']) ? 0 : 1;
    $abcode = implode(",", $abcode);
    $save = array();
    $save['max_width'] = (int) $_POST['max_width'];
    $save['max_height'] = (int) $_POST['max_height'];
    $save['max_size'] = (int) $_POST['max_size'];
    $save['max_navlist'] = (int) $_POST['max_navlist'];
    $save['max_headline'] = (int) $_POST['max_headline'];
    $save['max_recent'] = (int) $_POST['max_recent'];
    $save['def_public'] = (int) $_POST['def_public'];
    $save['rss_title'] = $_POST['rss_title'];
    $save['rss_description'] = $_POST['rss_description'];
    $save['abcode'] = $abcode;
    require_once 'mods/clansphere/func_options.php';
    cs_optionsave('news', $save);
    cs_redirect($cs_lang['success'], 'options', 'roots');
}
$data = array();
$data['op'] = cs_sql_option(__FILE__, 'news');
$data['op']['public_no'] = empty($data['op']['def_public']) ? ' checked="checked"' : '';
$data['op']['public_yes'] = empty($data['op']['def_public']) ? '' : ' checked="checked"';
/* ABcode*/
$abcode = explode(",", $data['op']['abcode']);
$data['op']['features'] = empty($abcode[0]) ? '' : 'checked="checked"';
$data['op']['smileys'] = empty($abcode[1]) ? '' : 'checked="checked"';
$data['op']['clip'] = empty($abcode[2]) ? '' : 'checked="checked"';
$data['op']['html'] = empty($abcode[3]) ? '' : 'checked="checked"';
$data['op']['php'] = empty($abcode[4]) ? '' : 'checked="checked"';
echo cs_subtemplate(__FILE__, $data, 'news', 'options');
Exemplo n.º 16
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('files');
$data = array();
if (isset($_POST['submit'])) {
    require_once 'mods/clansphere/func_options.php';
    $save = array();
    $save['max_width'] = (int) $_POST['max_width'];
    $save['max_height'] = (int) $_POST['max_height'];
    $save['max_size'] = (int) $_POST['max_size'];
    $save['max_navlist'] = (int) $_POST['max_navlist'];
    $save['max_headline'] = (int) $_POST['max_headline'];
    $save['max_navtop'] = (int) $_POST['max_navtop'];
    $save['max_headline_navtop'] = (int) $_POST['max_headline_navtop'];
    cs_optionsave('files', $save);
    cs_redirect($cs_lang['changes_done'], 'options', 'roots');
}
$data['op'] = cs_sql_option(__FILE__, 'files');
echo cs_subtemplate(__FILE__, $data, 'files', 'options');
Exemplo n.º 17
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('fightus');
$data = array();
if (isset($_POST['submit'])) {
    require_once 'mods/clansphere/func_options.php';
    $save = array();
    $save['max_usershome'] = (int) $_POST['max_usershome'];
    cs_optionsave('fightus', $save);
    cs_redirect($cs_lang['changes_done'], 'options', 'roots');
}
$op_articles = cs_sql_option(__FILE__, 'fightus');
$data['op']['max_usershome'] = $op_articles['max_usershome'];
echo cs_subtemplate(__FILE__, $data, 'fightus', 'options');
Exemplo n.º 18
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('maps');
$data = array();
if (isset($_POST['submit'])) {
    require_once 'mods/clansphere/func_options.php';
    $save = array();
    $save['max_width'] = (int) $_POST['max_width'];
    $save['max_height'] = (int) $_POST['max_height'];
    $save['max_size'] = (int) $_POST['max_size'];
    cs_optionsave('maps', $save);
    cs_redirect($cs_lang['changes_done'], 'options', 'roots');
}
$data['op'] = cs_sql_option(__FILE__, 'maps');
echo cs_subtemplate(__FILE__, $data, 'maps', 'options');
Exemplo n.º 19
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('squads');
if (isset($_POST['submit'])) {
    $save = array();
    $save['max_width'] = (int) $_POST['max_width'];
    $save['max_height'] = (int) $_POST['max_height'];
    $save['max_size'] = (int) $_POST['max_size'];
    $save['def_order'] = (int) $_POST['def_order'];
    $save['label'] = $_POST['label'];
    require_once 'mods/clansphere/func_options.php';
    cs_optionsave('squads', $save);
    cs_redirect($cs_lang['success'], 'options', 'roots');
}
$data = array();
$data['op'] = cs_sql_option(__FILE__, 'squads');
$data['head']['mod'] = $cs_lang[$data['op']['label'] . 's'];
$data['head']['getmsg'] = cs_getmsg();
$data['op']['squad'] = $data['op']['label'] == 'squad' ? 'selected="selected"' : '';
$data['op']['group'] = $data['op']['label'] == 'group' ? 'selected="selected"' : '';
$data['op']['section'] = $data['op']['label'] == 'section' ? 'selected="selected"' : '';
$data['op']['team'] = $data['op']['label'] == 'team' ? 'selected="selected"' : '';
$data['op']['class'] = $data['op']['label'] == 'class' ? 'selected="selected"' : '';
echo cs_subtemplate(__FILE__, $data, 'squads', 'options');
Exemplo n.º 20
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('wizard');
$cs_options = cs_sql_option(__FILE__, 'wizard');
$task_array = array(0 => array('icon' => 'locale', 'handler' => 'lang', 'mod' => 'clansphere', 'action' => 'lang_list'), 1 => array('icon' => 'style', 'handler' => 'temp', 'mod' => 'clansphere', 'action' => 'temp_list'), 2 => array('icon' => 'package_system', 'handler' => 'opts', 'mod' => 'clansphere', 'action' => 'options'), 3 => array('icon' => 'knetconfig', 'handler' => 'meta', 'mod' => 'clansphere', 'action' => 'metatags'), 4 => array('icon' => 'looknfeel', 'handler' => 'setp', 'mod' => 'users', 'action' => 'setup'), 5 => array('icon' => 'personal', 'handler' => 'prfl', 'mod' => 'users', 'action' => 'profile'), 6 => array('icon' => 'kdmconfig', 'handler' => 'clan', 'mod' => 'clans', 'action' => 'create'), 7 => array('icon' => 'kontact', 'handler' => 'cont', 'mod' => 'contact', 'action' => 'imp_edit'), 8 => array('icon' => 'kcmdf', 'handler' => 'mods', 'mod' => 'modules', 'action' => 'roots'), 9 => array('icon' => 'log', 'handler' => 'logs', 'mod' => 'logs', 'action' => 'roots'));
$handler = isset($_GET['handler']) ? $_GET['handler'] : 0;
if (!empty($handler)) {
    foreach ($task_array as $step) {
        if ($step['handler'] == $handler) {
            require_once 'mods/clansphere/func_options.php';
            $save = array();
            $save['done_' . $handler] = isset($_GET['done']) ? $_GET['done'] : 0;
            cs_optionsave('wizard', $save);
            $cs_options['done_' . $handler . ''] = $save['done_' . $handler];
            break;
        }
    }
}
$run = 0;
$done = 0;
$next = 0;
$next_task = '-';
$data = array('head' => array(), 'wizard' => array());
foreach ($task_array as $step) {
    $data['wizard'][$run]['icon'] = cs_icon($step['icon'], 48);
    $data['wizard'][$run]['link'] = cs_link($cs_lang['' . $step['handler'] . '_name'], $step['mod'], $step['action']);
    $data['wizard'][$run]['text'] = $cs_lang['' . $step['handler'] . '_text'];
    if (empty($cs_options['done_' . $step['handler'] . ''])) {
        $next_task = empty($next) ? cs_link($cs_lang['' . $step['handler'] . '_name'], $step['mod'], $step['action']) : $next_task;
Exemplo n.º 21
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('messages');
if (isset($_POST['submit'])) {
    $save = array();
    $save['del_time'] = (int) $_POST['del_time'];
    $save['max_space'] = (int) $_POST['max_space'];
    require_once 'mods/clansphere/func_options.php';
    cs_optionsave('messages', $save);
    cs_redirect($cs_lang['changes_done'], 'options', 'roots');
} else {
    $data = array();
    $data['op'] = cs_sql_option(__FILE__, 'messages');
    $data['head']['getmsg'] = cs_getmsg();
    echo cs_subtemplate(__FILE__, $data, 'messages', 'options');
}
Exemplo n.º 22
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('partner');
if (!empty($_POST['submit'])) {
    $save = array();
    $save['def_width_navimg'] = (int) $_POST['def_width_navimg'];
    $save['def_height_navimg'] = (int) $_POST['def_height_navimg'];
    $save['max_size_navimg'] = (int) $_POST['max_size_navimg'];
    $save['def_width_listimg'] = (int) $_POST['def_width_listimg'];
    $save['def_height_listimg'] = (int) $_POST['def_height_listimg'];
    $save['max_size_listimg'] = (int) $_POST['max_size_listimg'];
    $save['def_width_rotimg'] = (int) $_POST['def_width_rotimg'];
    $save['def_height_rotimg'] = (int) $_POST['def_height_rotimg'];
    $save['max_size_rotimg'] = (int) $_POST['max_size_rotimg'];
    $save['method'] = $_POST['method'];
    $save['max_navlist'] = (int) $_POST['max_navlist'];
    require_once 'mods/clansphere/func_options.php';
    cs_optionsave('partner', $save);
    cs_redirect($cs_lang['success'], 'options', 'roots');
} else {
    $data = array();
    $data['partner'] = cs_sql_option(__FILE__, 'partner');
    $data['sel']['random'] = $data['partner']['method'] == 'random' ? 'selected="selected"' : '';
    $data['sel']['rotation'] = $data['partner']['method'] == 'rotation' ? 'selected="selected"' : '';
    $data['head']['body_text'] = empty($error) ? $cs_lang['errors_here'] : $error;
    echo cs_subtemplate(__FILE__, $data, 'partner', 'options');
}
Exemplo n.º 23
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('clans');
if (isset($_POST['submit'])) {
    $save = array();
    $save['max_width'] = (int) $_POST['max_width'];
    $save['max_height'] = (int) $_POST['max_height'];
    $save['max_size'] = (int) $_POST['max_size'];
    $save['label'] = $_POST['label'];
    require_once 'mods/clansphere/func_options.php';
    cs_optionsave('clans', $save);
    cs_redirect($cs_lang['changes_done'], 'options', 'roots');
} else {
    $op_clans = cs_sql_option(__FILE__, 'clans');
    $data['lang']['getmsg'] = cs_getmsg();
    $data['lang']['mod_name'] = $cs_lang[$op_clans['label']];
    $data['clans']['clan'] = $op_clans['label'] == 'clan' ? 'selected="selected"' : '';
    $data['clans']['association'] = $op_clans['label'] == 'association' ? 'selected="selected"' : '';
    $data['clans']['club'] = $op_clans['label'] == 'club' ? 'selected="selected"' : '';
    $data['clans']['guild'] = $op_clans['label'] == 'guild' ? 'selected="selected"' : '';
    $data['clans']['enterprise'] = $op_clans['label'] == 'enterprise' ? 'selected="selected"' : '';
    $data['clans']['school'] = $op_clans['label'] == 'school' ? 'selected="selected"' : '';
    $data['clans']['max_width'] = $op_clans['max_width'];
    $data['clans']['max_height'] = $op_clans['max_height'];
    $data['clans']['max_size'] = $op_clans['max_size'];
    echo cs_subtemplate(__FILE__, $data, 'clans', 'options');
}
Exemplo n.º 24
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('games');
if (!empty($_POST['submit'])) {
    $save = array();
    $save['max_width'] = (int) $_POST['max_width'];
    $save['max_height'] = (int) $_POST['max_height'];
    $save['max_size'] = (int) $_POST['max_size'];
    require_once 'mods/clansphere/func_options.php';
    cs_optionsave('games', $save);
    cs_redirect($cs_lang['success'], 'options', 'roots');
}
$data = array();
$data['op'] = cs_sql_option(__FILE__, 'games');
echo cs_subtemplate(__FILE__, $data, 'games', 'options');
Exemplo n.º 25
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('ranks');
$data = array();
if (isset($_POST['submit'])) {
    require_once 'mods/clansphere/func_options.php';
    $save = array();
    $save['max_navlist'] = (int) $_POST['max_navlist'];
    cs_optionsave('ranks', $save);
    cs_redirect($cs_lang['changes_done'], 'options', 'roots');
}
$data['op'] = cs_sql_option(__FILE__, 'ranks');
echo cs_subtemplate(__FILE__, $data, 'ranks', 'options');
Exemplo n.º 26
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('servers');
if (isset($_POST['submit'])) {
    $save = array();
    $save['max_navlist'] = (int) $_POST['max_navlist'];
    require_once 'mods/clansphere/func_options.php';
    cs_optionsave('servers', $save);
    cs_redirect($cs_lang['changes_done'], 'options', 'roots');
} else {
    $data = array();
    $data['op'] = cs_sql_option(__FILE__, 'servers');
    echo cs_subtemplate(__FILE__, $data, 'servers', 'options');
}
Exemplo n.º 27
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('cash');
if (isset($_POST['submit'])) {
    $opt['month_out'] = empty($_POST['month_out']) ? 0 : (double) $_POST['month_out'];
    $opt['currency'] = empty($_POST['currency']) ? '' : $_POST['currency'];
    require_once 'mods/clansphere/func_options.php';
    $save = array();
    $save['month_out'] = $opt['month_out'];
    $save['currency'] = $opt['currency'];
    cs_optionsave('cash', $save);
    cs_redirect($cs_lang['success'], 'options', 'roots');
} else {
    $data = array();
    $data['op'] = cs_sql_option(__FILE__, 'cash');
    settype($data['op']['month_out'], 'float');
    echo cs_subtemplate(__FILE__, $data, 'cash', 'options');
}
Exemplo n.º 28
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('replays');
if (isset($_POST['submit'])) {
    $save = array();
    $save['file_size'] = (int) $_POST['file_size'] * 1024;
    $save['file_type'] = $_POST['file_type'];
    $save['max_navlist'] = (int) $_POST['max_navlist'];
    $save['max_headline_team1'] = (int) $_POST['max_headline_team1'];
    $save['max_headline_team2'] = (int) $_POST['max_headline_team2'];
    require_once 'mods/clansphere/func_options.php';
    cs_optionsave('replays', $save);
    cs_redirect($cs_lang['changes_done'], 'options', 'roots');
} else {
    $data = array();
    $data['op'] = cs_sql_option(__FILE__, 'replays');
    $data['op']['filesize'] = round($data['op']['file_size'] / 1024);
    echo cs_subtemplate(__FILE__, $data, 'replays', 'options');
}
Exemplo n.º 29
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('computers');
if (isset($_POST['submit'])) {
    $save = array();
    $save['max_width'] = (int) $_POST['max_width'];
    $save['max_height'] = (int) $_POST['max_height'];
    $save['max_size'] = (int) $_POST['max_size'];
    require_once 'mods/clansphere/func_options.php';
    cs_optionsave('computers', $save);
    cs_redirect($cs_lang['changes_done'], 'options', 'roots');
} else {
    $data = array();
    $data['com'] = cs_sql_option(__FILE__, 'computers');
    echo cs_subtemplate(__FILE__, $data, 'computers', 'options');
}
Exemplo n.º 30
0
 $save = array();
 $save['max_width'] = (int) $_POST['max_width'];
 $save['max_height'] = (int) $_POST['max_height'];
 $save['max_size'] = (int) $_POST['max_size'];
 $save['min_letters'] = (int) $_POST['min_letters'];
 $save['navbirth_max_users'] = (int) $_POST['navbirth_max_users'];
 $save['nextbirth_max_users'] = (int) $_POST['nextbirth_max_users'];
 $save['nextbirth_time_interval'] = (int) $_POST['nextbirth_time_interval'] * 86400;
 $save['def_register'] = (int) $_POST['def_register'];
 $save['register'] = $_POST['register'];
 $save['def_picture'] = !empty($_POST['def_picture_on']) ? 1 : 0;
 $save['login'] = $_POST['login'];
 if (!empty($files['def_picture']['tmp_name'])) {
     $save['def_picture'] = 1;
 }
 cs_optionsave('users', $save);
 cs_cache_delete('navbirth');
 cs_cache_delete('nextbirth');
 if (!empty($save['def_picture']) && empty($data['options']['def_picture'])) {
     cs_sql_update(__FILE__, 'users', array('users_picture'), array('nopicture.jpg'), 0, "users_picture = ''");
 } elseif (empty($save['def_picture']) && !empty($data['options']['def_picture'])) {
     cs_sql_update(__FILE__, 'users', array('users_picture'), array(''), 0, "users_picture = 'nopicture.jpg'");
 }
 if (!empty($files['def_picture']['tmp_name'])) {
     $img_size = getimagesize($files['def_picture']['tmp_name']);
     if ($files['def_picture']['type'] != 'image/jpeg') {
         $error .= cs_html_br(1) . $cs_lang['ext_error'];
     }
     if ($files['def_picture']['size'] > $_POST['max_size']) {
         $error .= cs_html_br(1) . $cs_lang['too_big'];
     }