예제 #1
0
function cs_newsletter_to($select)
{
    $cs_lang = cs_translate('newsletter');
    $op_squads = cs_sql_option(__FILE__, 'squads', 'label');
    $op_clans = cs_sql_option(__FILE__, 'clans', 'label');
    $dp = cs_html_option('----', '0', 1);
    $dp .= cs_html_option($cs_lang['all_users'], '1');
    $dp .= cs_html_option('»' . $cs_lang['ac_group'], '');
    $usergroups = cs_sql_select(__FILE__, 'access', 'access_id,access_name', 'access_id != 1', 0, 0, 0);
    foreach ($usergroups as $value) {
        $dp .= cs_html_option('   ' . cs_secure($value['access_name']), '2?' . $value['access_id']);
    }
    $dp .= cs_html_option(' »' . $cs_lang[$op_squads['label']], '');
    $squads = cs_sql_select(__FILE__, 'squads', 'squads_id, squads_name', 0, 'squads_name', 0, 0);
    $squads = empty($squads) ? array() : $squads;
    foreach ($squads as $squad) {
        $dp .= cs_html_option('   ' . cs_secure($squad['squads_name']), '3?' . $squad['squads_id']);
    }
    $dp .= cs_html_option('»' . $cs_lang[$op_clans['label']], '');
    $clans = cs_sql_select(__FILE__, 'clans', 'clans_id, clans_name', 0, 'clans_name', 0, 0);
    $clans = empty($clans) ? array() : $clans;
    foreach ($clans as $clan) {
        $dp .= cs_html_option('   ' . cs_secure($clan['clans_name']), '4?' . $clan['clans_id']);
    }
    $data['nl']['to_dropdown'] = $dp;
    return $dp;
}
예제 #2
0
function cs_abcode_sql($name)
{
    global $cs_lang;
    $more = "onchange=\"javascript:abc_insert(this.form.cs_sql.options";
    $more .= "[this.form.cs_sql.selectedIndex].value + '(',')','" . $name . "');";
    $more .= "this.selectedIndex=0\"";
    $var = cs_html_select(1, 'cs_sql', $more);
    $var .= cs_html_option('SQL', 0);
    $var .= cs_html_option('cs_sql_connect', 'cs_sql_connect');
    $var .= cs_html_option('cs_sql_count', 'cs_sql_connect');
    $var .= cs_html_option('cs_sql_delete', 'cs_sql_delete');
    $var .= cs_html_option('cs_sql_escape', 'cs_sql_escape');
    $var .= cs_html_option('cs_sql_insert', 'cs_sql_insert');
    $var .= cs_html_option('cs_sql_insertid', 'cs_sql_insertid');
    $var .= cs_html_option('cs_sql_option', 'cs_sql_option');
    $var .= cs_html_option('cs_sql_query', 'cs_sql_query');
    $var .= cs_html_option('cs_sql_select', 'cs_sql_select');
    $var .= cs_html_option('cs_sql_update', 'cs_sql_update');
    $var .= cs_html_option('cs_sql_version', 'cs_sql_version');
    $var .= cs_html_select(0);
    return $var;
}
예제 #3
0
function cs_categories_dropdown2($mod, $categories_id = 0, $new = 1, $name = 'categories_id')
{
    global $account;
    $data = array();
    $cells = 'categories_id, categories_name, categories_subid';
    $categories = cs_sql_select(__FILE__, 'categories', $cells, "categories_mod = '" . $mod . "' AND categories_access <= '" . $account['access_news'] . "'", 'categories_subid ASC, categories_name', 0, 0);
    $categories = cs_catsort($categories);
    $data['categories']['options'] = '';
    if (!empty($categories)) {
        foreach ($categories as $cat) {
            $blank = '';
            if (!empty($cat['layer'])) {
                for ($i = 0; $i < $cat['layer']; $i++) {
                    $blank .= '&nbsp;&nbsp;';
                }
                $blank .= '&raquo;';
            }
            $data['categories']['options'] .= cs_html_option($blank . $cat['categories_name'], $cat['categories_id'], $cat['categories_id'] == $categories_id);
        }
    }
    $data['if']['new'] = !empty($new) ? TRUE : FALSE;
    $data['dropdown']['name'] = $name;
    return cs_subtemplate(__FILE__, $data, 'categories', 'cat_dropdown2');
}
예제 #4
0
    $data['head']['links'] = $head;
    $data['if']['move'] = FALSE;
    $data['if']['rename'] = FALSE;
    //move
    if (!empty($_POST['move'])) {
        $data['if']['move'] = TRUE;
        $tables = "board boa INNER JOIN {pre}_categories cat ON boa.categories_id = cat.categories_id";
        $select = "boa.board_id AS board_id, boa.board_name AS board_name, cat.categories_name AS categories_name";
        $axx_where = "boa.board_access <= '" . $account['access_board'] . "'";
        $sorting = 'cat.categories_name ASC, boa.board_name ASC';
        $board_data = cs_sql_select(__FILE__, $tables, $select, $axx_where, $sorting, 0, 0);
        $data['board']['select'] = '';
        foreach ($board_data as $board) {
            $sel = $board_id == $board['board_id'] ? 1 : 0;
            $content = $board['categories_name'] . ' -> ' . $board['board_name'];
            $data['board']['select'] .= cs_html_option($content, $board['board_id'], $sel);
        }
        $data['checked']['closed'] = empty($thread_edit['threads_close']) ? '' : 'checked="checked" ';
        $data['checked']['notclosed'] = !empty($thread_edit['threads_close']) ? '' : 'checked="checked" ';
    }
    //rename
    if (!empty($_POST['rename'])) {
        $data['if']['rename'] = TRUE;
        $data['val']['thread_headline'] = $thread_headline;
    }
    echo cs_subtemplate(__FILE__, $data, 'board', 'modpanel_q');
} else {
    cs_redirect($cs_lang['mark_all'], 'board', 'thread', 'where=' . $thread_id);
}
//Daten verarbeiten und in SQL Eintragen
if (!empty($thread_cells) and !empty($thread_save)) {
예제 #5
0
파일: edit.php 프로젝트: aberrios/WEBTHESGO
 } else {
     $data['select']['before'] = '';
 }
 if ($cs_clans['clans_tagpos'] == '2') {
     $data['select']['next'] = 'selected="selected"';
 } else {
     $data['select']['next'] = '';
 }
 $el_id = 'country_1';
 $onc = "document.getElementById('" . $el_id . "').src='" . $cs_main['php_self']['dirname'] . "symbols/countries/' + this.form.";
 $onc .= "clans_country.options[this.form.clans_country.selectedIndex].value + '.png'";
 $data['clans']['country'] = cs_html_select(1, 'clans_country', "onchange=\"" . $onc . "\"");
 include_once 'lang/' . $account['users_lang'] . '/countries.php';
 foreach ($cs_country as $short => $full) {
     $short == $cs_clans['clans_country'] ? $sel = 1 : ($sel = 0);
     $data['clans']['country'] .= cs_html_option($full, $short, $sel);
 }
 $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 = '';
예제 #6
0
if (!empty($error) or !isset($_POST['submit']) or isset($_POST['preview'])) {
    $data['data'] = $board;
    $data['abcode']['smileys'] = cs_abcode_smileys('threads_text');
    $data['abcode']['features'] = cs_abcode_features('threads_text');
    $data['max']['text'] = $cs_board_opt['max_text'];
    //////////// VOTES ////////////
    $data['if']['vote'] = FALSE;
    if ($votes == 1) {
        $data['if']['vote'] = TRUE;
        $data['if']['vote_several'] = empty($bv['boardvotes_several']) ? false : true;
        $data['time']['select'] = cs_dateselect('votes_end', 'unix', $bv['boardvotes_end'], 2005);
        $data['access']['options'] = '';
        $levels = 0;
        while ($levels < 6) {
            $bv['boardvotes_access'] == $levels ? $sel = 1 : ($sel = 0);
            $data['access']['options'] .= cs_html_option($levels . ' - ' . $cs_lang['lev_' . $levels], $levels, $sel);
            $levels++;
        }
        $data['data']['votes_question'] = $bv['boardvotes_question'];
        $data['several']['checked'] = empty($bv['boardvotes_several']) ? '' : 'checked="checked"';
        $run_loop = isset($_POST['run_loop']) ? $_POST['run_loop'] : 1;
        for ($run = 0; $run < $run_loop; $run++) {
            $num = $run + 1;
            $cs_files["votes_election_{$num}"] = isset($_POST["votes_election_{$num}"]) ? $_POST["votes_election_{$num}"] : '';
            $data['answers'][$run]['num'] = $num;
            $data['answers'][$run]['answer'] = $cs_files["votes_election_{$num}"];
        }
    }
    //////////// FILES ////////////
    $data['if']['file'] = FALSE;
    $a = $run_loop_files;
예제 #7
0
    }
}
if (!isset($_POST['submit'])) {
    $data['head']['body'] = $cs_lang['rounds_management'];
} elseif (!empty($error)) {
    $data['head']['body'] = $error;
}
if (!empty($error) or empty($_POST['submit'])) {
    $data['wars'] = $cs_rounds;
    $cs_wars = cs_sql_select(__FILE__, 'wars', 'games_id', "wars_id = '" . $wars_id . "'");
    $cs_maps = cs_sql_select(__FILE__, 'maps', 'maps_name, maps_id', "games_id = '" . $cs_wars['games_id'] . "'", 'maps_name', 0, 0);
    $i = 0;
    if (!empty($cs_maps)) {
        foreach ($cs_maps as $map) {
            $sel = $map['maps_id'] == $cs_rounds['maps_id'] ? 1 : 0;
            $data['map'][$i]['sel'] = cs_html_option($map['maps_name'], $map['maps_id'], $sel);
            $i++;
        }
    }
    $data['wars']['new_map'] = $new_map;
    $data['abcode']['smileys'] = cs_abcode_smileys('rounds_description');
    $data['abcode']['features'] = cs_abcode_features('rounds_description');
    $data['wars']['id'] = $wars_id;
    $data['get']['msg'] = cs_getmsg();
    $tables = 'rounds rnd LEFT JOIN {pre}_maps mps ON rnd.maps_id = mps.maps_id';
    $cells = 'rnd.rounds_id AS rounds_id, rnd.rounds_score1 AS rounds_score1, ';
    $cells .= 'rnd.rounds_score2 AS rounds_score2, mps.maps_name AS maps_name, ';
    $cells .= 'rnd.rounds_order AS rounds_order';
    $sort = 'rnd.rounds_order ASC, rnd.rounds_id ASC';
    $cs_rounds = cs_sql_select(__FILE__, $tables, $cells, 'rnd.wars_id = \'' . $wars_id . '\'', $sort, 0, 0);
    $count = count($cs_rounds);
예제 #8
0
$cs_sort[3] = 'categories_url DESC';
$cs_sort[4] = 'categories_url ASC';
$order = 'categories_subid, ' . $cs_sort[$sort];
$where = empty($_REQUEST['where']) ? $op_cat['def_mod'] : $_REQUEST['where'];
$mdp = "categories_mod = '" . cs_sql_escape($where) . "'";
$categories_count = cs_sql_count(__FILE__, 'categories', $mdp);
$data['where']['mod'] = $where;
$data['head']['count'] = $categories_count;
$data['head']['pages'] = cs_pages('categories', 'manage', $categories_count, $start, $where, $sort);
$run = 0;
$modules = cs_checkdirs('mods');
foreach ($modules as $mods) {
    $check_axx = empty($account['access_' . $mods['dir'] . '']) ? 0 : $account['access_' . $mods['dir'] . ''];
    if (!empty($mods['categories']) and $check_axx > 2) {
        $mods['dir'] == $where ? $sel = 1 : ($sel = 0);
        $data['mod'][$run]['sel'] = cs_html_option($mods['name'], $mods['dir'], $sel);
        $run++;
    }
}
$data['head']['getmsg'] = cs_getmsg();
$data['sort']['name'] = cs_sort('categories', 'manage', $start, $where, 1, $sort);
$data['sort']['url'] = cs_sort('categories', 'manage', $start, $where, 3, $sort);
$select = 'categories_id, categories_name, categories_url, categories_subid';
$data['cat'] = cs_sql_select(__FILE__, 'categories', $select, $mdp, $order, $start, $account['users_limit']);
$data['cat'] = cs_catsort($data['cat']);
$categories_loop = !empty($data['cat']) ? count($data['cat']) : '';
for ($run = 0; $run < $categories_loop; $run++) {
    $blank = '';
    if (!empty($data['cat'][$run]['layer'])) {
        for ($i = 0; $i < $data['cat'][$run]['layer']; $i++) {
            $blank .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
예제 #9
0
        $data['sel'][$run]['options'] = cs_html_option($mods['name'], $mods['dir'], $sel);
        $run++;
    }
    $data['options']['automatic'] = $data['options']['def_path'] == '1' ? 'selected="selected"' : '';
    $data['options']['manual'] = $data['options']['def_path'] == '0' ? 'selected="selected"' : '';
    $data['options']['def_path'] = $cs_main['def_path'];
    $data['options']['public_1'] = $data['options']['public'] == '1' ? 'checked="checked"' : '';
    $data['options']['public_2'] = $data['options']['public'] == '0' ? 'checked="checked"' : '';
    $data['options']['admin_1'] = $data['options']['def_admin'] == 'integrated' || empty($data['options']['def_admin']) ? 'checked="checked"' : '';
    $data['options']['admin_2'] = $data['options']['def_admin'] == 'separated' ? 'checked="checked"' : '';
    $data['options']['sec_remote_1'] = !empty($data['options']['sec_remote']) ? 'checked="checked"' : '';
    $data['options']['sec_remote_2'] = empty($data['options']['sec_remote']) ? 'checked="checked"' : '';
    $data['options']['timezone_select'] = cs_html_select(1, 'def_timezone');
    $timezone = -10;
    while ($timezone <= 12) {
        $zonename = $timezone >= 0 ? 'UTC +' . $timezone : 'UTC ' . $timezone;
        $offset = $timezone * 3600;
        $sel = $offset == $data['options']['def_timezone'] ? 1 : 0;
        $data['options']['timezone_select'] .= cs_html_option($zonename, $offset, $sel);
        $timezone = $timezone + 0.5;
    }
    $data['options']['timezone_select'] .= cs_html_select(0);
    $data['options']['time_1'] = $data['options']['def_dstime'] == 'on' ? 'selected="selected"' : '';
    $data['options']['time_0'] = $data['options']['def_dstime'] == 'off' ? 'selected="selected"' : '';
    $data['options']['time_auto'] = $data['options']['def_dstime'] == '0' ? 'selected="selected"' : '';
    $data['options']['ajax_reload'] = empty($data['options']['ajax_reload']) ? 10 : $data['options']['ajax_reload'];
    $data['options']['main_acc3_checked'] = $data['options']['maintenance_access'] == 3 ? 'selected="selected"' : '';
    $data['options']['main_acc4_checked'] = $data['options']['maintenance_access'] == 4 ? 'selected="selected"' : '';
    $data['options']['main_acc5_checked'] = $data['options']['maintenance_access'] == 5 ? 'selected="selected"' : '';
    echo cs_subtemplate(__FILE__, $data, 'clansphere', 'options');
}
예제 #10
0
function cs_dropdown($name, $list, $array, $select = 0, $key = 0, $def_option = 0)
{
    global $cs_main;
    $key = empty($key) ? $name : $key;
    $var = cs_html_select(1, $name);
    if (empty($def_option)) {
        $var .= cs_html_option('----', 0, 0);
    }
    $array = is_array($array) ? $array : array();
    foreach ($array as $data) {
        $sel = $select == $data[$key] ? 1 : 0;
        $content = html_entity_decode($data[$list], ENT_QUOTES, $cs_main['charset']);
        $content = htmlentities($content, ENT_QUOTES, $cs_main['charset']);
        $var .= cs_html_option($content, $data[$key], $sel);
    }
    return $var . cs_html_select(0);
}
예제 #11
0
     $tables = 'comments cms INNER JOIN {pre}_users usr ON cms.users_id = usr.users_id';
     $cells = 'cms.comments_fid AS comments_fid, ';
     $cells .= 'usr.users_id AS users_id, usr.users_nick AS users_nick, ';
     $cells .= 'usr.users_active AS users_active, usr.users_country AS users_country';
     $data['comment'] = cs_sql_select(__FILE__, $tables, $cells, 'comments_id = ' . (int) $comments_id);
     $data['comment']['comments_text'] = $_POST['threads_text'];
     $data['lang']['errors_here'] = $cs_lang['error_occured'] . $error;
 }
 $data['abcode']['features'] = cs_abcode_features('threads_text');
 $tables = 'categories cat INNER JOIN {pre}_board b ON cat.categories_id = b.categories_id';
 $cells = 'cat.categories_name AS categories_name, b.board_name AS board_name, b.board_id AS board_id';
 $boards = cs_sql_select(__FILE__, $tables, $cells, 0, 0, 0, 0);
 $data['board']['select'] = cs_html_select(1, 'board_id');
 $data['board']['select'] .= cs_html_option('----', 0);
 foreach ($boards as $board) {
     $data['board']['select'] .= cs_html_option($board['categories_name'] . ': ' . $board['board_name'], $board['board_id'], 0);
 }
 $data['board']['select'] .= cs_html_select(0);
 $data['comment']['text'] = cs_secure($data['comment']['comments_text'], 1, 1);
 $data['comment']['user'] = cs_user($data['comment']['users_id'], $data['comment']['users_nick'], $data['comment']['users_active']);
 $tables = 'comments cms INNER JOIN {pre}_users usr ON cms.users_id = usr.users_id';
 $cells = 'usr.users_nick AS users_nick, usr.users_id AS users_id, cms.comments_text AS comments_text, ';
 $cells .= 'usr.users_active AS users_active, usr.users_country AS users_country, cms.comments_id AS comments_id';
 $cond = "cms.comments_fid = " . (int) $data['comment']['comments_fid'] . " AND comments_mod = 'board' AND cms.comments_id > " . (int) $comments_id;
 $data['comments'] = cs_sql_select(__FILE__, $tables, $cells, $cond, 'comments_time', 0, 0);
 $comments_count = count($data['comments']);
 for ($run = 0; $run < $comments_count; $run++) {
     $data['comments'][$run]['user'] = cs_user($data['comments'][$run]['users_id'], $data['comments'][$run]['users_nick'], $data['comments'][$run]['users_active']);
     $data['comments'][$run]['comments_text'] = cs_secure($data['comments'][$run]['comments_text'], 1, 1);
     $data['comments'][$run]['checked'] = !empty($_POST) && in_array($data['comments'][$run]['comments_id'], $_POST['comments']) ? ' checked="checked"' : '';
 }
예제 #12
0
function make_subfolders_select($array, $select)
{
    $var = '';
    $sel = 0;
    $loop = count($array);
    for ($run = 0; $run < $loop; $run++) {
        if (!empty($array[$run][0])) {
            make_subfolders_select($array[$run], $select);
        } else {
            $array[$run]['folders_id'] == $select ? $sel = 1 : ($sel = 0);
            $tab = makeTAB($array[$run]['depht']);
            $var .= cs_html_option($tab . $array[$run]['name'], $array[$run]['folders_id'], $sel);
        }
    }
    return $var;
}
예제 #13
0
    $static = array();
    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 $mod_table) {
                if (isset($static[$mod_table])) {
                    cs_error(__FILE__, 'SQL-Table "' . $mod_table . '" is owned by two modules: "' . $static[$mod_table] . '" and "' . $mod['dir'] . '"');
                } else {
                    $static[$mod_table] = $mod['dir'];
                }
            }
        }
    }
    ksort($static);
    $run = 0;
    foreach ($static as $sql_table => $mod) {
        $data['tables'][$run]['option'] = cs_html_option($sql_table, $sql_table);
        $run++;
    }
    $data['output']['prefix'] = $prefix;
    $checked = 'checked="checked"';
    $data['output']['truncate_check'] = empty($truncate) ? '' : $checked;
    $array = $output == 'file' ? array('text' => 0, 'file' => 1) : array('text' => 1, 'file' => 0);
    $data['output']['text_check'] = empty($array['text']) ? '' : $checked;
    $data['output']['file_check'] = empty($array['file']) ? '' : $checked;
} else {
    $sql_content = '-- ClanSphere ' . $cs_main['version_name'] . ' SQL EXPORT' . "\n";
    $sql_content .= '-- ' . $cs_lang['tables'] . ': ' . count($tables) . "\n";
    $sql_content .= '-- ' . $cs_lang['date'] . ': ' . cs_date('unix', cs_time(), 1) . "\n";
    foreach ($tables as $sql_table) {
        $sql_content .= "\n" . '-- --------------------------------------------------';
        $sql_content .= "\n" . '-- ' . sprintf($cs_lang['sql_data_for'], $sql_table) . "\n\n";
예제 #14
0
     $data['setup']['languages'] .= cs_html_option($lang['name'], $lang['name'], $sel);
 }
 $timezone = -10;
 while ($timezone <= 12) {
     $zonename = $timezone >= 0 ? 'UTC +' . $timezone : 'UTC ' . $timezone;
     $offset = $timezone * 3600;
     $sel = $offset == $cs_user['users_timezone'] ? 1 : 0;
     $data['setup']['timezone'] .= cs_html_option($zonename, $offset, $sel);
     $timezone = $timezone + 0.5;
 }
 $sel = empty($cs_user['users_dstime']) ? 1 : 0;
 $data['setup']['option_automatic'] = cs_html_option($cs_lang['automatic'], 0, $sel);
 $sel = $cs_user['users_dstime'] == 'on' ? 1 : 0;
 $data['setup']['option_on'] = cs_html_option($cs_lang['on'], 'on', $sel);
 $sel = $cs_user['users_dstime'] == 'off' ? 1 : 0;
 $data['setup']['option_off'] = cs_html_option($cs_lang['off'], 'off', $sel);
 $data['setup']['users_limit'] = $cs_user['users_limit'];
 $views[0]['users_view'] = '';
 $views[0]['name'] = $cs_lang['default'];
 $views[1]['users_view'] = 'list';
 $views[1]['name'] = $cs_lang['list'];
 $views[2]['users_view'] = 'float';
 $views[2]['name'] = $cs_lang['compatible'];
 $data['setup']['view_type'] = cs_dropdown('users_view', 'name', $views, $cs_user['users_view'], 0, 1);
 $mode[0]['users_invisible'] = 0;
 $mode[0]['name'] = $cs_lang['off'];
 $mode[1]['users_invisible'] = 1;
 $mode[1]['name'] = $cs_lang['on'];
 $data['setup']['users_invisible'] = cs_dropdown('users_invisible', 'name', $mode, $cs_user['users_invisible'], 0, 1);
 $mode[0]['users_abomail'] = 0;
 $mode[0]['name'] = $cs_lang['off'];
예제 #15
0
        $error .= $cs_lang['cat_exists'] . cs_html_br(1);
    }
}
if (!isset($_POST['submit'])) {
    $data['head']['body'] = $cs_lang['body_folder'];
} elseif (!empty($error)) {
    $data['head']['body'] = $error;
}
if (!empty($error) or !isset($_POST['submit'])) {
    $data['data'] = $folders;
    $data['data']['folders_select'] = make_folders_select('sub_id', $folders['sub_id'], $account['users_id'], 'usersgallery');
    $levels = 0;
    $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;
예제 #16
0
$mdp = "comments_mod = '" . cs_sql_escape($where) . "'";
$comments_count = cs_sql_count(__FILE__, 'comments', $mdp);
$data['head']['count'] = $comments_count;
$data['head']['pages'] = cs_pages('comments', 'manage', $comments_count, $start, $where, $sort);
$data['head']['mod_dropdown'] = cs_html_select(1, 'where');
$check_sel = empty($where) ? $issel = 0 : ($issel = 1);
$data['head']['mod_dropdown'] .= cs_html_option('----', 0, 0, $issel);
$modules = cs_checkdirs('mods');
foreach ($modules as $mods) {
    if (!empty($mods['comments'])) {
        if (!empty($where)) {
            $mods['dir'] == $where ? $sel = 1 : ($sel = 0);
        } else {
            $sel = 0;
        }
        $data['head']['mod_dropdown'] .= cs_html_option($mods['name'], $mods['dir'], $sel);
    }
}
$data['head']['mod_dropdown'] .= cs_html_select(0);
$data['head']['getmsg'] = cs_getmsg();
$data['sort']['comments_id'] = cs_sort('comments', 'manage', $start, $where, 1, $sort);
$data['sort']['users_id'] = cs_sort('comments', 'manage', $start, $where, 3, $sort);
$data['sort']['comments_time'] = cs_sort('comments', 'manage', $start, $where, 5, $sort);
$com_where = $mdp . " AND comments_mod != 'board'";
$select = 'comments_id, users_id, comments_time, comments_fid, comments_mod, comments_guestnick';
$data['com'] = cs_sql_select(__FILE__, 'comments', $select, $com_where, $order, $start, $account['users_limit']);
$com_loop = count($data['com']);
for ($run = 0; $run < $com_loop; $run++) {
    $id = $data['com'][$run]['comments_id'];
    $data['com'][$run]['fid'] = $data['com'][$run]['comments_fid'];
    if (!empty($data['com'][$run]['users_id'])) {
예제 #17
0
            $conv_joinus = 1;
        }
    }
}
if (!isset($_POST['submit'])) {
    $data['head']['body'] = $cs_lang['create_users'];
} elseif (!empty($error)) {
    $data['head']['body'] = $error;
}
if (!empty($error) or !isset($_POST['submit'])) {
    $data['data'] = $create;
    $data['lang']['opts'] = '';
    $languages = cs_checkdirs('lang');
    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;
예제 #18
0
        $data['lang']['manage_options'] = $cs_lang['error_occured'] . $error;
    }
    $data['dropdown']['def_register'] = cs_html_select(1, 'def_register');
    $sel = $data['options']['def_register'] == '0' ? 1 : 0;
    $data['dropdown']['def_register'] .= cs_html_option($cs_lang['reg_captcha'], 0, $sel);
    $sel = $data['options']['def_register'] == '1' ? 1 : 0;
    $data['dropdown']['def_register'] .= cs_html_option($cs_lang['reg_mail'], 1, $sel);
    $sel = $data['options']['def_register'] == '2' ? 1 : 0;
    $data['dropdown']['def_register'] .= cs_html_option($cs_lang['reg_captcha_mail'], 2, $sel);
    $data['dropdown']['def_register'] .= cs_html_select(0);
    $sel = empty($data['options']['register']) ? 1 : 0;
    $data['options']['register_off'] = cs_html_option($cs_lang['off'], 0, $sel);
    $sel = !empty($data['options']['register']) ? 1 : 0;
    $data['options']['register_on'] = cs_html_option($cs_lang['on'], 1, $sel);
    #nextbirth_time_interval
    $data['options']['nextbirth_time_interval'] /= 86400;
    $data['dropdown']['nextbirth_time_interval'] = cs_html_select(1, 'nextbirth_time_interval');
    $sel = $data['options']['nextbirth_time_interval'] == '3' ? 1 : 0;
    $data['dropdown']['nextbirth_time_interval'] .= cs_html_option(3, 3, $sel);
    $sel = $data['options']['nextbirth_time_interval'] == '7' ? 1 : 0;
    $data['dropdown']['nextbirth_time_interval'] .= cs_html_option(7, 7, $sel);
    $sel = $data['options']['nextbirth_time_interval'] == '14' ? 1 : 0;
    $data['dropdown']['nextbirth_time_interval'] .= cs_html_option(14, 14, $sel);
    $sel = $data['options']['nextbirth_time_interval'] == '30' ? 1 : 0;
    $data['dropdown']['nextbirth_time_interval'] .= cs_html_option(30, 30, $sel);
    $data['dropdown']['nextbirth_time_interval'] .= cs_html_select(0);
    $data['selected']['def_picture'] = empty($data['options']['def_picture']) ? '' : 'checked="checked" ';
    $data['login']['nick'] = $data['options']['login'] == 'nick' ? 'selected="selected"' : '';
    $data['login']['email'] = $data['options']['login'] == 'email' ? 'selected="selected"' : '';
    echo cs_subtemplate(__FILE__, $data, 'users', 'options');
}
예제 #19
0
 }
 if (!empty($error) or !isset($_POST['submit'])) {
     $data['head']['action'] = $cs_lang['register'];
     echo cs_subtemplate(__FILE__, $data, 'users', 'head');
     $data = array();
     $data['form']['register'] = cs_url('users', 'register');
     $data['register']['nick'] = $register['nick'];
     $data['register']['password'] = $register['password'];
     $data['register']['email'] = $register['email'];
     $data['register']['send_mail'] = $register['send_mail'];
     $data['register']['languages'] = '';
     $data['checked']['newsletter'] = empty($register['newsletter']) ? '' : 'checked';
     $data['checked']['email'] = empty($register['send_mail']) ? '' : 'checked';
     foreach ($languages as $lang) {
         $lang['name'] == $register['lang'] ? $sel = 1 : ($sel = 0);
         $data['register']['languages'] .= cs_html_option($lang['name'], $lang['name'], $sel);
     }
     $data['if']['captcha'] = 0;
     if (empty($op_users['def_register']) or $op_users['def_register'] == '2') {
         if (!empty($captcha)) {
             $data['if']['captcha'] = 1;
             $data['captcha']['img'] = cs_html_img('mods/captcha/generate.php?time=' . cs_time());
         }
     }
     if (empty($op_users['def_register']) or $op_users['def_register'] == '2') {
         if ($op_users['def_register'] != '2') {
             $data['if']['reg_mail'] = 1;
         } else {
             $data['if']['reg_mail'] = 0;
         }
         echo cs_subtemplate(__FILE__, $data, 'users', 'register_code');
예제 #20
0
            $datax['categories_picture'] == $cs_gallery['gallery_watermark'] ? $sel = 1 : ($sel = 0);
            $select1 .= cs_html_option($datax['categories_name'], $datax['categories_picture'], $sel);
        }
        $select1 .= cs_html_select(0) . ' ';
        $data['data']['w_select'] = $select1;
        if (!empty($watermark_id)) {
            $url = 'uploads/categories/' . $cs_gallery['gallery_watermark'];
        } else {
            $url = 'symbols/gallery/nowatermark.png';
        }
        $data['data']['w_img'] = cs_html_img($url, '', '', 'id="' . $el_id . '"');
        $data['data']['w_position'] = cs_html_select(1, 'watermark_pos');
        $levels = 1;
        while ($levels < 10) {
            $watermark_pos == $levels ? $sel = 1 : ($sel = 0);
            $data['data']['w_position'] .= cs_html_option($cs_lang['watermark_' . $levels], $levels, $sel);
            $levels++;
        }
        $data['data']['w_position'] .= cs_html_select(0);
        $data['data']['w_trans'] = $gallery_watermark_trans;
    }
    $data['abcode']['smileys'] = cs_abcode_smileys('gallery_description');
    $data['abcode']['features'] = cs_abcode_features('gallery_description');
    $checked = 'checked="checked"';
    $data['check']['gray'] = empty($gray) ? '' : $checked;
    echo cs_subtemplate(__FILE__, $data, 'gallery', 'picture_create');
} else {
    $cs_gallery['gallery_watermark_pos'] = $watermark_pos;
    $cells = array_keys($cs_gallery);
    $save = array_values($cs_gallery);
    cs_sql_insert(__FILE__, 'gallery', $cells, $save);
예제 #21
0
파일: new.php 프로젝트: aberrios/WEBTHESGO
 foreach ($cs_squads as $key => $value) {
     $data['squads'][$key] = cs_secure($value);
 }
 $data['head']['mod'] = $cs_lang[$op_squads['label'] . 's'];
 $data['lang']['clan_label'] = $cs_lang[$op_clans['label']];
 $cs_clans = cs_sql_select(__FILE__, 'clans', 'clans_name,clans_id', "clans_pwd != ''", 'clans_name', 0, 0);
 $data['squads']['clan_sel'] = cs_dropdown('clans_id', 'clans_name', $cs_clans, $cs_squads['clans_id']);
 $data['squads']['clans_pwd'] = $clans_pwd;
 if ($data['if']['gamesmod'] == TRUE) {
     $el_id = 'game_1';
     $cs_games = cs_sql_select(__FILE__, 'games', 'games_name,games_id', 0, 'games_name', 0, 0);
     $games_count = count($cs_games);
     $data['squads']['games_sel'] = '';
     for ($run = 0; $run < $games_count; $run++) {
         $sel = $cs_games[$run]['games_id'] == $cs_squads['games_id'] ? 1 : 0;
         $data['squads']['games_sel'] .= cs_html_option($cs_games[$run]['games_name'], $cs_games[$run]['games_id'], $sel);
     }
     $url = 'uploads/games/' . $cs_squads['games_id'] . '.gif';
     $data['squads']['games_img'] = cs_html_img($url, 0, 0, 'id="' . $el_id . '"');
 }
 $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;
 }
예제 #22
0
파일: new.php 프로젝트: aberrios/WEBTHESGO
    $games_count = count($data['games']);
    for ($i = 0; $i < $games_count; $i++) {
        $data['games'][$i]['games_name'] = cs_secure($data['games'][$i]['games_name']);
    }
    $url = 'uploads/games/' . $cs_fightus['games_id'] . '.gif';
    $data['fightus']['games_img'] = cs_html_img($url, 0, 0, 'id="game_1"');
    $cid = "squads_own = '1' AND squads_fightus = '0'";
    $cs_squads = cs_sql_select(__FILE__, 'squads', 'squads_name, squads_id, squads_own, squads_fightus', $cid, 'squads_name', 0, 0);
    $data['fightus']['squad_sel'] = cs_dropdown('squads_id', 'squads_name', $cs_squads, $cs_fightus['squads_id']);
    $el_id = 'country_1';
    $onc = "document.getElementById('" . $el_id . "').src='" . $cs_main['php_self']['dirname'] . "symbols/countries/' + this.form.";
    $onc .= "fightus_country.options[this.form.fightus_country.selectedIndex].value + '.png'";
    $data['fightus']['country_sel'] = cs_html_select(1, 'fightus_country', "onchange=\"" . $onc . "\"");
    foreach ($cs_country as $short => $full) {
        $short == $cs_fightus['fightus_country'] ? $sel = 1 : ($sel = 0);
        $data['fightus']['country_sel'] .= cs_html_option($full, $short, $sel);
    }
    $data['fightus']['country_sel'] .= cs_html_select(0) . ' ';
    $url = 'symbols/countries/' . $cs_fightus['fightus_country'] . '.png';
    $data['fightus']['country_img'] = cs_html_img($url, 11, 16, 'id="' . $el_id . '"');
    $data['fightus']['date_sel'] = cs_dateselect('fight', 'unix', $cs_fightus['fightus_date'], 2000);
    $data['fightus']['abcode_smileys'] = cs_abcode_smileys('fightus_more');
    $data['fightus']['abcode_features'] = cs_abcode_features('fightus_more');
    if (!empty($captcha)) {
        $data['if']['captcha'] = TRUE;
        $data['fightus']['captcha_img'] = cs_html_img('mods/captcha/generate.php?time=' . cs_time());
    }
} elseif (!empty($data['if']['form'])) {
    settype($cs_fightus['fightus_icq'], 'integer');
    $cs_fightus['fightus_since'] = cs_time();
    $fightus_cells = array_keys($cs_fightus);
예제 #23
0
파일: edit.php 프로젝트: aberrios/WEBTHESGO
 $data['lang']['own_label'] = $cs_lang['own_' . $op_clans['label']];
 $checked = 'checked="checked"';
 $data['squads']['own_check'] = empty($cs_squads['squads_own']) ? '' : $checked;
 $data['squads']['joinus_check'] = empty($cs_squads['squads_joinus']) ? '' : $checked;
 $data['squads']['fightus_check'] = empty($cs_squads['squads_fightus']) ? '' : $checked;
 $data['lang']['clan_label'] = $cs_lang[$op_clans['label']];
 $cs_clans = cs_sql_select(__FILE__, 'clans', 'clans_name,clans_id', 0, 'clans_name', 0, 0);
 $data['squads']['clan_sel'] = cs_dropdown('clans_id', 'clans_name', $cs_clans, $cs_squads['clans_id']);
 if ($data['if']['gamesmod'] == TRUE) {
     $data['games'] = array();
     $el_id = 'game_1';
     $cs_games = cs_sql_select(__FILE__, 'games', 'games_name,games_id', 0, 'games_name', 0, 0);
     $games_count = count($cs_games);
     for ($run = 0; $run < $games_count; $run++) {
         $sel = $cs_games[$run]['games_id'] == $cs_squads['games_id'] ? 1 : 0;
         $data['games'][$run]['sel'] = cs_html_option($cs_games[$run]['games_name'], $cs_games[$run]['games_id'], $sel);
     }
     $url = 'uploads/games/' . $cs_squads['games_id'] . '.gif';
     $data['squads']['games_img'] = cs_html_img($url, 0, 0, 'id="' . $el_id . '"');
 }
 $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;
 }
예제 #24
0
     if ($cs_voted[$run]['users_id'] == $users_id) {
         $check_user_voted++;
     }
 }
 $data['if']['vote'] = empty($advanced[0]) ? false : true;
 if (!empty($advanced[0])) {
     if (empty($check_user_voted) && empty($_POST['submit'])) {
         $data['if']['vote_allow'] = true;
         $data['if']['voted'] = false;
         $data['hidden']['id'] = $cs_gallery['gallery_id'];
         $levels = 0;
         $data['vote']['options'] = '';
         while ($levels < 6) {
             $cs_gallery['gallery_vote'] == $levels ? $sel = 1 : ($sel = 0);
             $xx = $levels + 1;
             $data['vote']['options'] .= cs_html_option($cs_lang['vote_' . $xx], $levels, $sel);
             $levels++;
         }
     } else {
         $data['if']['vote_allow'] = false;
         $data['if']['voted'] = true;
         if (isset($_POST['submit'])) {
             $votes_cells = array('voted_fid', 'users_id', 'voted_time', 'voted_answer', 'voted_ip', 'voted_mod');
             $votes_save = array($cs_gallery['gallery_id'], $users_id, $time, $voted_answer, $voted_ip, 'gallery');
             cs_sql_insert(__FILE__, 'voted', $votes_cells, $votes_save);
         }
         $voted_select = cs_sql_select(__FILE__, 'voted', 'voted_answer', "voted_fid='" . $cs_gallery['gallery_id'] . "'", '', '', '0');
         $count_voted_select = count($voted_select);
         $answers = 0;
         for ($run = 0; $run < $count_voted_select; $run++) {
             $answers = $answers + $voted_select[$run]['voted_answer'];
예제 #25
0
$data['if']['setup'] = false;
$data['if']['display_setup'] = false;
$data['if']['display_form'] = false;
if (!empty($setup_exists)) {
    $data['if']['setup'] = true;
} elseif (isset($_POST['view']) and empty($error)) {
    $data['if']['display_setup'] = true;
    $data['data']['setup'] = htmlentities($setup_php, ENT_QUOTES, $cs_main['charset']);
} else {
    $data['if']['display_form'] = true;
    $data['selected']['md5'] = $cs_db['hash'] == 'md5' ? ' selected="selected"' : '';
    $data['selected']['sha1'] = $cs_db['hash'] == 'sha1' ? ' selected="selected"' : '';
    $data['data']['types'] = '';
    foreach ($sql_files as $sql_file => $num) {
        $extension = substr($sql_file, 0, -4);
        if (extension_loaded($extension)) {
            $selected = $cs_db['type'] == $extension ? 1 : 0;
            $data['data']['types'] .= cs_html_option($extension, $extension, $selected);
        }
    }
    $data['value']['subtype'] = $cs_db['subtype'];
    $data['value']['charset'] = $cs_main['charset'];
    $data['value']['place'] = $cs_db['place'];
    $data['value']['name'] = $cs_db['name'];
    $data['value']['prefix'] = $cs_db['prefix'];
    $data['value']['user'] = $cs_db['user'];
    $data['value']['pwd'] = $cs_db['pwd'];
    $data['checked']['save_actions'] = empty($log['save_actions']) ? '' : ' checked="checked"';
    $data['checked']['save_errors'] = empty($log['save_errors']) ? '' : ' checked="checked"';
}
echo cs_subtemplate(__FILE__, $data, 'install', 'settings');
예제 #26
0
$cs_sort[3] = 'files_time DESC';
$cs_sort[4] = 'files_time ASC';
$sort = empty($_REQUEST['sort']) ? 3 : $_REQUEST['sort'];
$order = $cs_sort[$sort];
$files_count = cs_sql_count(__FILE__, 'files', $where);
$data = array();
$data['head']['count'] = $files_count;
$data['head']['paginator'] = cs_pages('files', 'manage', $files_count, $start, $categories_id, $sort);
$data['head']['message'] = cs_getmsg();
$filesmod = "categories_mod = 'files'";
$categories = cs_sql_select(__FILE__, 'categories', 'categories_name, categories_id', $filesmod, 'categories_name', 0, 0);
$data['head']['categories'] = '';
if (!empty($categories)) {
    foreach ($categories as $category) {
        $selected = $category['categories_id'] == $categories_id ? 1 : 0;
        $data['head']['categories'] .= cs_html_option($category['categories_name'], $category['categories_id'], $selected);
    }
}
$from = 'files fls LEFT JOIN {pre}_users usr ON fls.users_id = usr.users_id';
$select = 'fls.files_name AS files_name, fls.users_id AS users_id, usr.users_nick';
$select .= ' AS users_nick, usr.users_active AS users_active, usr.users_id AS users_id, usr.users_active AS users_active, fls.files_time AS files_time, fls.files_id AS files_id';
$select .= ', fls.files_mirror AS files_mirror';
$cs_files = cs_sql_select(__FILE__, $from, $select, $where, $order, $start, $account['users_limit']);
$files_loop = count($cs_files);
$data['sort']['headline'] = cs_sort('files', 'manage', $start, $categories_id, 1, $sort);
$data['sort']['date'] = cs_sort('files', 'manage', $start, $categories_id, 3, $sort);
$data['files'] = array();
for ($run = 0; $run < $files_loop; $run++) {
    $files_mirror = $cs_files[$run]['files_mirror'];
    $temp = explode("-----", $files_mirror);
    $temp_loop = count($temp);
예제 #27
0
if (!empty($error) or !isset($_POST['submit'])) {
    $data['data'] = $edit;
    $data['current']['img'] = cs_html_img('mods/gallery/image.php?usersthumb=' . $edit['usersgallery_id']);
    $data['folders']['select'] = make_folders_select('folders_id', $edit['folders_id'], $account['users_id'], 'usersgallery');
    $data['access']['options'] = '';
    $levels = 0;
    while ($levels < 6) {
        $edit['usersgallery_access'] == $levels ? $sel = 1 : ($sel = 0);
        $data['access']['options'] .= cs_html_option($levels . ' - ' . $cs_lang['lev_' . $levels], $levels, $sel);
        $levels++;
    }
    $data['status']['options'] = '';
    $levels = 0;
    while ($levels < 2) {
        $edit['usersgallery_status'] == $levels ? $sel = 1 : ($sel = 0);
        $data['status']['options'] .= cs_html_option($cs_lang['show_' . $levels], $levels, $sel);
        $levels++;
    }
    $data['abcode']['smileys'] = cs_abcode_smileys('gallery_description');
    $data['abcode']['features'] = cs_abcode_features('gallery_description');
    $checked = 'checked="checked"';
    $data['check']['newtime'] = empty($new_time) ? '' : $checked;
    $data['check']['count'] = empty($gallery_count_reset) ? '' : $checked;
    $data['hidden']['id'] = $gallery_id;
    $data['data']['usersgallery_name'] = cs_secure($data['data']['usersgallery_name']);
    $data['data']['usersgallery_titel'] = cs_secure($data['data']['usersgallery_titel']);
    $data['data']['usersgallery_description'] = cs_secure($data['data']['usersgallery_description']);
    echo cs_subtemplate(__FILE__, $data, 'usersgallery', 'users_edit');
} else {
    $cells = array_keys($edit);
    $save = array_values($edit);
예제 #28
0
    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 = '';
    while ($levels < 2) {
        $data['op']['list_sort'] == $levels ? $sel = 1 : ($sel = 0);
        $var2 .= cs_html_option($cs_lang['sort_' . $levels], $levels, $sel);
        $levels++;
    }
    $data['sort']['options'] = $var2;
    $levels = 0;
    $var = '';
    while ($levels < 2) {
        $data['op']['lightbox'] == $levels ? $sel = 1 : ($sel = 0);
        $var .= cs_html_option($cs_lang['light_' . $levels], $levels, $sel);
        $levels++;
    }
    $data['lightbox']['options'] = $var;
    echo cs_subtemplate(__FILE__, $data, 'gallery', 'options');
}
예제 #29
0
     $data['watermark']['options'] = '';
     foreach ($cat_data_watermark as $data2) {
         $data2['categories_picture'] == $cs_gallery['gallery_watermark'] ? $sel = 1 : ($sel = 0);
         $data['watermark']['options'] .= cs_html_option($data2['categories_name'], $data2['categories_picture'], $sel);
     }
     if (!empty($watermark_id)) {
         $url = 'uploads/categories/' . $cs_gallery['gallery_watermark'];
     } else {
         $url = 'symbols/gallery/nowatermark.png';
     }
     $data['watermark']['img'] = cs_html_img($url, '', '', 'id="' . $el_id . '"');
     $levels = 1;
     $data['watermark']['pos_options'] = '';
     while ($levels < 10) {
         $watermark_pos == $levels ? $sel = 1 : ($sel = 0);
         $data['watermark']['pos_options'] .= cs_html_option($levels . ' - ' . $cs_lang['watermark_' . $levels], $levels, $sel);
         $levels++;
     }
     $data['watermark']['trans'] = $gallery_watermark_trans;
 }
 $run = 0;
 $count = 0;
 foreach ($diff as $pic) {
     $count++;
     $data['pictures'][$run]['run'] = $count;
     $data['pictures'][$run]['name'] = $pic;
     $img_size = getimagesize("uploads/gallery/pics/{$pic}");
     $img_filesize = filesize("uploads/gallery/pics/{$pic}");
     $img_width = $img_size[0];
     $img_height = $img_size[1];
     $img_w_h = $img_width / $img_height;
예제 #30
0
        $run++;
    }
}
closedir($handle);
if (empty($temp_file)) {
    $temp_file = array();
}
$count_handle = count($temp_file);
if ($sort == 2) {
    rsort($temp_file);
}
$data['head']['dropdown'] = cs_html_select(1, 'log_id');
$levels = 1;
while ($levels < 3) {
    $log_id == $levels ? $sel = 1 : ($sel = 0);
    $data['head']['dropdown'] .= cs_html_option($cs_lang['lev_' . $levels], $levels, $sel);
    $levels++;
}
$data['head']['dropdown'] .= cs_html_select(0);
$data['head']['count'] = $count_handle;
$data['head']['pages'] = cs_pages('logs', 'roots', $count_handle, $start, $log_id, $sort, $account['users_limit']);
if ($account['access_wizard'] == 5) {
    $wizard = cs_sql_count(__FILE__, 'options', "options_name = 'done_logs' AND options_value = '1'");
    if (empty($wizard)) {
        $data['if']['wizard'] = TRUE;
        $data['wizard']['show'] = cs_link($cs_lang['show'], 'wizard', 'roots');
        $data['wizard']['task_done'] = cs_link($cs_lang['task_done'], 'wizard', 'roots', 'handler=logs&amp;done=1');
    }
}
$data['sort']['name'] = cs_sort('logs', 'roots', $start, $log_id, 1, $sort);
$temp_limit = $start + $account['users_limit'];