Exemple #1
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);
    $fightus_save = array_values($cs_fightus);
    cs_sql_insert(__FILE__, 'fightus', $fightus_cells, $fightus_save);
    cs_cache_delete('count_fightus');
    require_once 'mods/notifymods/functions.php';
    notifymods_mail('fightus', $account['users_id']);
    cs_redirect($cs_lang['success'], 'fightus', 'new');
}
Exemple #2
0
// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('board');
$count_abo = cs_sql_count(__FILE__, 'abonements', 'users_id=' . $account['users_id']);
$count_att = cs_sql_count(__FILE__, 'boardfiles', 'users_id=' . $account['users_id']);
$data = array();
$data['head']['getmsg'] = cs_getmsg();
$data['count']['abos'] = $count_abo;
$data['count']['attachments'] = $count_att;
$data['link']['abos'] = cs_url('board', 'center');
$data['link']['attachments'] = cs_url('board', 'attachments');
$data['link']['avatar'] = cs_url('board', 'avatar');
$data['action']['form'] = cs_url('board', 'signature');
$data['signature']['smileys'] = cs_abcode_smileys('signature');
$data['signature']['abcode'] = cs_abcode_features('signature');
$signature_sql = cs_sql_select($file, 'users', 'users_signature', "users_id = '" . $account['users_id'] . "'");
$signature = $signature_sql['users_signature'];
$signature = isset($_POST['signature']) ? $_POST['signature'] : $signature;
$signature = preg_replace_callback("=\\[img\\](.*?)\\[/img\\]=si", "cs_abcode_resize", $signature);
$signature = preg_replace_callback("=\\[img width\\=(.*?) height\\=(.*?)\\](.*?)\\[/img\\]=si", "cs_abcode_resize", $signature);
$data['signature']['text'] = $signature;
$data['signature']['preview'] = cs_secure($signature, 1, 1);
$data['if']['preview'] = (isset($_POST['preview']) and !empty($signature)) ? 1 : 0;
if (isset($_POST['submit'])) {
    $signature_cells = array('users_signature');
    $signature_save = array($signature);
    cs_sql_update(__FILE__, 'users', $signature_cells, $signature_save, $account['users_id']);
    cs_redirect($cs_lang['create_done'], 'board', 'signature');
}
$data['signature']['text'] = cs_secure($data['signature']['text']);
Exemple #3
0
    $data['users']['country_url'] = cs_html_img('symbols/countries/' . $cs_user['users_country'] . '.png', 0, 0, 'id="country_1"');
    $data['hidden']['users_name'] = isset($hidden['users_name']) ? $checked : '';
    $data['hidden']['users_surname'] = isset($hidden['users_surname']) ? $checked : '';
    $data['hidden']['users_age'] = isset($hidden['users_age']) ? $checked : '';
    $data['hidden']['users_height'] = isset($hidden['users_height']) ? $checked : '';
    $data['hidden']['users_postalcode'] = isset($hidden['users_postalcode']) ? $checked : '';
    $data['hidden']['users_place'] = isset($hidden['users_place']) ? $checked : '';
    $data['hidden']['users_adress'] = isset($hidden['users_adress']) ? $checked : '';
    $data['hidden']['users_icq'] = isset($hidden['users_icq']) ? $checked : '';
    $data['hidden']['users_jabber'] = isset($hidden['users_jabber']) ? $checked : '';
    $data['hidden']['users_skype'] = isset($hidden['users_skype']) ? $checked : '';
    $data['hidden']['users_email'] = isset($hidden['users_email']) ? $checked : '';
    $data['hidden']['users_url'] = isset($hidden['users_url']) ? $checked : '';
    $data['hidden']['users_phone'] = isset($hidden['users_phone']) ? $checked : '';
    $data['hidden']['users_mobile'] = isset($hidden['users_mobile']) ? $checked : '';
    $data['abcode']['features'] = cs_abcode_features('users_info');
    $data['abcode']['smileys'] = cs_abcode_smileys('users_info');
    $data['country'] = array();
    $run = 0;
    foreach ($cs_country as $short => $full) {
        $data['country'][$run]['short'] = $short;
        $data['country'][$run]['selection'] = $short == $cs_user['users_country'] ? ' selected="selected"' : '';
        $data['country'][$run]['full'] = $full;
        $run++;
    }
    echo cs_subtemplate(__FILE__, $data, 'users', 'profile');
} else {
    settype($cs_user['users_height'], 'integer');
    settype($cs_user['users_icq'], 'integer');
    $cs_user['users_hidden'] = implode(',', $hidden);
    if ($cs_user['users_nick'] != $account['users_nick']) {
Exemple #4
0
        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['pre_answers'][$run]['run'] = $run;
            $data['pre_answers'][$run]['answer'] = cs_secure($cs_files["votes_election_{$num}"], 0, 1);
        }
    }
    $data['preview']['text'] = cs_secure($board['threads_text'], 1, 1);
}
if (isset($_POST['election'])) {
    $_POST['run_loop']++;
}
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'];
Exemple #5
0
     if (isset($_POST['mirror'])) {
         $cs_news["news_mirror_{$num}"] = isset($_POST["news_mirror_{$num}"]) ? $_POST["news_mirror_{$num}"] : '';
         $cs_news["news_mirror_name_{$num}"] = isset($_POST["news_mirror_name_{$num}"]) ? $_POST["news_mirror_name_{$num}"] : '';
     } else {
         $cs_news["news_mirror_{$num}"] = $temp_mirror[$run];
         $cs_news["news_mirror_name_{$num}"] = $temp_mirror_name[$run];
     }
     $data['mirror'][$tpl_run]['num'] = $num;
     $data['mirror'][$tpl_run]['news_mirror'] = $cs_news["news_mirror_{$num}"];
     $data['mirror'][$tpl_run]['news_mirror_name'] = $cs_news["news_mirror_name_{$num}"];
     $tpl_run++;
 }
 if (empty($cs_main['rte_html'])) {
     $data['abcode']['features'] = cs_abcode_features('news_text', $abcode[3], 1);
     $data['abcode']['smileys'] = cs_abcode_smileys('news_text', 1);
     $data['abcode']['features_readmore'] = cs_abcode_features('news_readmore', $abcode[3], 1);
     $data['abcode']['smileys_readmore'] = cs_abcode_smileys('news_readmore', 1);
     $data['if']['rte_html'] = false;
     $data['if']['abcode'] = true;
 } else {
     $data['if']['rte_html'] = true;
     $data['if']['abcode'] = false;
     $data['rte']['html'] = cs_rte_html('news_text', $cs_news['news_text']);
     $data['rte']['html_readmore'] = cs_rte_html('news_readmore', $cs_news['news_readmore']);
 }
 $data['news']['loop'] = $run_loop;
 $data['news']['news_readmore_active'] = $cs_news['news_readmore_active'] == 1 ? 'checked="checked"' : '';
 $data['news']['news_close'] = $cs_news['news_close'] == 1 ? 'checked="checked"' : '';
 $data['news']['news_public'] = $cs_news['news_public'] == 1 ? 'checked="checked"' : '';
 $data['news']['news_attached'] = $cs_news['news_attached'] == 1 ? 'checked="checked"' : '';
 $data['news']['check_publish'] = !empty($cs_news['news_publishs_at']) ? 'checked="checked"' : '';
Exemple #6
0
                break;
        }
        if (empty($extension)) {
            $error .= cs_html_br(1) . $cs_lang['wrong_ext'];
        } else {
            $save['medals_extension'] = $extension;
        }
    }
}
if (!empty($_POST['submit']) && empty($error)) {
    $cells = array_keys($save);
    $values = array_values($save);
    cs_sql_insert(__FILE__, 'medals', $cells, $values);
    if (!empty($files_gl['medals_picture']['tmp_name'])) {
        $id = cs_sql_insertid(__FILE__);
        $filename = 'medal-' . $id . '.' . $extension;
        cs_upload('medals', $filename, $files_gl['medals_picture']['tmp_name']);
    }
    cs_redirect($cs_lang['create_done'], 'medals');
}
if (empty($_POST['submit'])) {
    $data['medals']['medals_name'] = '';
    $data['medals']['medals_text'] = '';
} else {
    $data['medals']['medals_name'] = $save['medals_name'];
    $data['medals']['medals_text'] = $save['medals_text'];
}
$data['medals']['message'] = empty($error) ? $cs_lang['errors_here'] : $cs_lang['error_occured'] . $error;
$data['form']['abcode'] = cs_abcode_features('medals_text');
$data['form']['dirname'] = $cs_main['php_self']['dirname'];
echo cs_subtemplate(__FILE__, $data, 'medals', 'create');
Exemple #7
0
}
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);
    if (!empty($cs_rounds)) {
        $data['if']['rounds'] = true;
        $img_up = cs_html_img('symbols/clansphere/up_arrow.png');
        $img_down = cs_html_img('symbols/clansphere/down_arrow.png');
        $run = 0;
        $run2 = 0;
Exemple #8
0
        $sel = $cs_games[$run]['games_id'] == $cs_replays['games_id'] ? 1 : 0;
        $data['games'][$run]['op'] = cs_html_option($cs_games[$run]['games_name'], $cs_games[$run]['games_id'], $sel);
    }
    $url = 'uploads/games/' . $cs_replays['games_id'] . '.gif';
    $data['replays']['games_img'] = cs_html_img($url, 0, 0, 'id="' . $el_id . '"');
    $data['replays']['date_sel'] = cs_dateselect('date', 'date', $cs_replays['replays_date'], 1995);
    $matches[1] = $cs_lang['rep_infos'];
    $return_types = '';
    foreach ($rep_filetypes as $add) {
        $return_types .= empty($return_types) ? $add : ', ' . $add;
    }
    $matches[2] = $cs_lang['max_size'] . cs_filesize($rep_max['size']) . cs_html_br(1);
    $matches[2] .= $cs_lang['filetypes'] . $return_types;
    $data['replays']['upload_clip'] = cs_abcode_clip($matches);
    $data['replays']['abcode_smileys'] = cs_abcode_smileys('replays_info');
    $data['replays']['abcode_features'] = cs_abcode_features('replays_info');
    $data['replays']['close_check'] = empty($cs_replays['replays_close']) ? '' : 'checked="checked"';
    echo cs_subtemplate(__FILE__, $data, 'replays', 'create');
} else {
    $cs_replays['users_id'] = $account['users_id'];
    $cs_replays['replays_since'] = cs_time();
    $replays_cells = array_keys($cs_replays);
    $replays_save = array_values($cs_replays);
    cs_sql_insert(__FILE__, 'replays', $replays_cells, $replays_save);
    if (!empty($files_gl['replay']['tmp_name'])) {
        $where = "replays_team1 = '" . cs_sql_escape($cs_replays['replays_team1']) . "'";
        $order = 'replays_since DESC';
        $getid = cs_sql_select(__FILE__, 'replays', 'replays_id, replays_mirror_urls', $where, $order);
        $filename = 'replay-' . $getid['replays_id'] . '-' . cs_time() . '.' . $extension;
        cs_upload('replays', $filename, $files_gl['replay']['tmp_name']);
        $replay_file = 'uploads/replays/' . $filename;
Exemple #9
0
} elseif (!empty($error)) {
    $data['head']['body'] = $error;
} elseif (isset($_POST['preview'])) {
    $data['head']['body'] = $cs_lang['preview'];
}
if (isset($_POST['preview']) and empty($error)) {
    $data['if']['preview'] = true;
    $data['preview']['question'] = cs_secure($_POST['faq_frage']);
    $data['preview']['answer'] = cs_secure($faq_antwort, 1, 1, 1, 1);
}
if (!empty($error) or isset($_POST['preview']) or !isset($_POST['submit'])) {
    $data['faq']['cat'] = cs_categories_dropdown('faq', $categories_id);
    $data['faq']['frage'] = $faq_frage;
    if (empty($cs_main['rte_html'])) {
        $data['abcode']['smileys'] = cs_abcode_smileys('faq_antwort', 1);
        $data['abcode']['features'] = cs_abcode_features('faq_antwort', 1, 1);
        $data['if']['rte_html'] = FALSE;
        $data['if']['no_rte_html'] = TRUE;
        $data['faq']['antwort'] = $faq_antwort;
    } else {
        $data['if']['rte_html'] = TRUE;
        $data['if']['no_rte_html'] = FALSE;
        $data['faq']['content'] = cs_rte_html('faq_antwort', $faq_antwort);
    }
    $data['faq']['id'] = $faq_id;
    echo cs_subtemplate(__FILE__, $data, 'faq', 'edit');
} else {
    $faq_cells = array('faq_question', 'faq_answer', 'categories_id');
    $faq_save = array($faq_frage, $faq_antwort, $categories_id);
    cs_sql_update(__FILE__, 'faq', $faq_cells, $faq_save, $faq_id);
    cs_redirect($cs_lang['changes_done'], 'faq');
Exemple #10
0
        }
    }
} else {
    $data['partner']['partner_name'] = '';
    $data['partner']['partner_text'] = '';
    $data['partner']['partner_url'] = '';
    $data['partner']['partner_alt'] = '';
    $data['partner']['partner_priority'] = '1';
    $categories_id = '';
}
if (empty($_POST['submit']) || !empty($error)) {
    $data['form']['create'] = cs_url('partner', 'create');
    $data['head']['body_text'] = !empty($error) ? $error : $cs_lang['body_text'];
    $data['categories']['dropdown'] = cs_categories_dropdown('partner', $categories_id);
    $data['abcode']['smileys'] = cs_abcode_smileys('partner_text');
    $data['abcode']['features'] = cs_abcode_features('partner_text');
    $matches_n[1] = $cs_lang['infobox'];
    $return_types = '';
    foreach ($img_filetypes as $add => $value) {
        $return_types .= empty($return_types) ? $add : ', ' . $add;
    }
    $matches_n[2] = $cs_lang['max_width'] . $op_partner['def_width_navimg'] . ' px' . cs_html_br(1);
    $matches_n[2] .= $cs_lang['max_height'] . $op_partner['def_height_navimg'] . ' px' . cs_html_br(1);
    $matches_n[2] .= $cs_lang['max_size'] . cs_filesize($op_partner['max_size_navimg']) . cs_html_br(1);
    $matches_n[2] .= $cs_lang['filetypes'] . $return_types;
    $data['clip']['nimg'] = cs_abcode_clip($matches_n);
    $matches_l[1] = $cs_lang['infobox'];
    $return_types = '';
    foreach ($img_filetypes as $add => $value) {
        $return_types .= empty($return_types) ? $add : ', ' . $add;
    }
Exemple #11
0
function cs_comments_edit($mod, $action, $com_id, $mod_name, $more = 'id')
{
    $cs_lang = cs_translate('comments');
    global $account;
    settype($com_id, 'integer');
    $data['if']['guest'] = FALSE;
    $guestnick = '';
    $cells = 'users_id, comments_text, comments_time, comments_fid, comments_edit, comments_guestnick';
    $cs_comments = cs_sql_select(__FILE__, 'comments', $cells, "comments_id = " . (int) $com_id);
    $com_fid = $cs_comments['comments_fid'];
    if ($account['access_comments'] >= 4 or $account['users_id'] == $cs_comments['users_id']) {
        $data['head']['mod'] = $mod_name;
        $data['if']['preview'] = false;
        if (isset($_POST['submit']) or isset($_POST['preview'])) {
            $cs_comments['comments_text'] = $_POST['comments_text'];
            $error = '';
            if (empty($cs_comments['users_id'])) {
                $guestnick = $_POST['comments_guestnick'];
                if (empty($guestnick) and empty($cs_comments['users_id'])) {
                    $error .= $cs_lang['no_guestnick'] . cs_html_br(1);
                } else {
                    $op_users = cs_sql_option(__FILE__, 'users');
                    $nick2 = str_replace(' ', '', $guestnick);
                    $nickchars = strlen($nick2);
                    if ($nickchars < $op_users['min_letters']) {
                        $error .= sprintf($cs_lang['short_guestnick'], $op_users['min_letters']) . cs_html_br(1);
                    }
                    $search_nick = cs_sql_count(__FILE__, 'users', "users_nick = '" . cs_sql_escape($guestnick) . "'");
                    if (!empty($search_nick)) {
                        $error .= $cs_lang['nick_exists'] . cs_html_br(1);
                    }
                }
            }
            if (empty($cs_comments['comments_text'])) {
                $error .= $cs_lang['no_text'] . cs_html_br(1);
            }
        }
        if (!isset($_POST['submit']) and !isset($_POST['preview'])) {
            $data['head']['body'] = $cs_lang['body_com_edit'];
        } elseif (!empty($error)) {
            $data['head']['body'] = $error;
        } elseif (isset($_POST['preview'])) {
            $data['head']['body'] = $cs_lang['preview'];
        }
        if (isset($_POST['preview']) and empty($error)) {
            $data['if']['preview'] = true;
            $userid = $account['users_id'];
            $select = 'users_nick, users_laston, users_place, users_country, users_active, users_invisible, users_delete';
            $cs_user = cs_sql_select(__FILE__, 'users', $select, "users_id = " . (int) $userid);
            if (empty($cs_comments['users_id'])) {
                $data['if']['guest_prev'] = TRUE;
                $data['if']['user_prev'] = FALSE;
                $data['prev']['guestnick'] = cs_secure($guestnick);
            } else {
                $data['if']['guest_prev'] = FALSE;
                $data['if']['user_prev'] = TRUE;
                $user = cs_secure($cs_user['users_nick']);
                $url = 'symbols/countries/' . $cs_user['users_country'] . '.png';
                $data['prev']['flag'] = cs_html_img($url, 11, 16);
                $data['prev']['user'] = cs_user($userid, $cs_user['users_nick'], $cs_user['users_active'], $cs_user['users_delete']);
                $data['prev']['status'] = cs_userstatus($cs_user['users_laston'], $cs_user['users_invisible']);
                $data['prev']['laston'] = empty($cs_user['users_invisible']) ? '--' : cs_date('unix', $cs_user['users_laston']);
                $place = empty($cs_user['users_place']) ? '-' : $cs_user['users_place'];
                $data['prev']['place'] = cs_secure($place);
                $who = "users_id = '" . $userid . "'";
                $count_com[$userid] = cs_sql_count(__FILE__, 'comments', $who);
                $data['prev']['posts'] = $count_com[$userid];
            }
            $opt = "comments_mod = '" . cs_sql_escape($mod) . "' AND comments_fid = " . (int) $com_fid;
            $count_com = cs_sql_count(__FILE__, 'comments', $opt);
            $data['prev']['count_com'] = $count_com + 1;
            $data['prev']['date'] = cs_date('unix', cs_time(), 1);
            $data['prev']['text'] = cs_secure($cs_comments['comments_text'], 1, 1);
        }
        if (!empty($error) or isset($_POST['preview']) or !isset($_POST['submit'])) {
            $data['com']['form_name'] = $mod . '_com_edit';
            $data['com']['form_url'] = cs_url($mod, 'com_edit');
            $data['com']['smileys'] = cs_abcode_smileys('comments_text');
            $data['com']['abcode'] = cs_abcode_features('comments_text');
            if ($account['access_comments'] >= 4 and empty($cs_comments['users_id'])) {
                $data['if']['guest'] = TRUE;
                $data['com']['guestnick'] = $cs_comments['comments_guestnick'];
            }
            $data['com']['text'] = $cs_comments['comments_text'];
            $data['com']['id'] = $com_id;
            echo cs_subtemplate(__FILE__, $data, 'comments', 'com_edit');
        } else {
            $opt = "comments_mod = '" . cs_sql_escape($mod) . "' AND comments_fid = " . (int) $com_fid;
            $opt .= " AND comments_id <= '" . $com_id . "'";
            $count_com = cs_sql_count(__FILE__, 'comments', $opt);
            $start = floor($count_com / $account['users_limit']) * $account['users_limit'];
            if (!empty($cs_comments['comments_edit'])) {
                $edits = explode('/', $cs_comments['comments_edit']);
                $edits_count = $edits[3] + 1;
            } else {
                $edits_count = 1;
            }
            $com_edits = $account['users_id'] . '/' . $account['users_nick'] . '/' . cs_time() . '/' . $edits_count;
            $com_cells = array('comments_text', 'comments_edit', 'comments_guestnick');
            $com_save = array($cs_comments['comments_text'], $com_edits, $guestnick);
            cs_sql_update(__FILE__, 'comments', $com_cells, $com_save, $com_id);
            $more_action = $more . '=' . $com_fid . '&amp;start=' . $start . '#com' . $count_com;
            cs_redirect($cs_lang['changes_done'], $mod, $action, $more_action);
        }
    } else {
        cs_redirect('', 'errors', '403');
    }
}
Exemple #12
0
    }
    if (empty($cs_quotes['quotes_text'])) {
        $error++;
        $errormsg .= $cs_lang['no_text'] . cs_html_br(1);
    }
}
if (!isset($_POST['submit']) and empty($error)) {
    $data['head']['body'] = $cs_lang['fill_obligated'];
} elseif (!empty($error)) {
    $data['head']['error'] = $errormsg;
    $data['head']['body'] = '';
}
if (empty($error)) {
    $data['head']['error'] = '';
}
if (!empty($error) or !isset($_POST['submit'])) {
    $data['head']['body'] = $cs_lang['fill_obligated'];
    $categories_id = empty($cs_quotes['categories_id']) ? 0 : $cs_quotes['categories_id'];
    $data['categories']['dropdown'] = cs_categories_dropdown('quotes', $categories_id);
    $data['abcode']['features'] = cs_abcode_features('quotes_text');
    $data['data']['smileys'] = cs_abcode_smileys('quotes_text');
    $data['url']['action'] = cs_url('quotes', 'create');
    $data['quotes']['quotes_headline'] = empty($cs_quotes['quotes_headline']) ? '' : $cs_quotes['quotes_headline'];
    $data['quotes']['quotes_text'] = empty($cs_quotes['quotes_text']) ? '' : $cs_quotes['quotes_text'];
    echo cs_subtemplate(__FILE__, $data, 'quotes', 'create');
} else {
    $quotes_cells = array_keys($cs_quotes);
    $quotes_save = array_values($cs_quotes);
    cs_sql_insert(__FILE__, 'quotes', $quotes_cells, $quotes_save);
    cs_redirect($cs_lang['create_done'], 'quotes');
}
Exemple #13
0
if (!empty($error)) {
    $data['head']['body'] = $error;
}
if (isset($_POST['preview']) and empty($error)) {
    $data['if']['preview'] = TRUE;
    $data['prev']['img'] = cs_html_img('mods/gallery/image.php?pic=' . $picture_id . '&size=300');
    $data['prev']['mailfrom'] = cs_html_link('mailto:' . $ecard['sender_mail'], $ecard['sender_name'], 1);
    $data['prev']['mailto'] = cs_html_link('mailto:' . $ecard['receiver_mail'], $ecard['receiver_name'], 1);
    $data['prev']['time'] = cs_date('unix', cs_time(), 1);
    $data['prev']['titel'] = cs_secure($ecard['ecard_titel']);
    $data['prev']['text'] = cs_secure($ecard['ecard_text'], 1);
}
if (!empty($error) or !isset($_POST['submit']) or isset($_POST['preview'])) {
    $data['data'] = $ecard;
    $data['ecard']['picture'] = cs_html_img('mods/gallery/image.php?pic=' . $picture_id . '&size=300');
    $data['abcode']['features'] = cs_abcode_features('ecard_text');
    $data['hidden']['id'] = $picture_id;
    echo cs_subtemplate(__FILE__, $data, 'gallery', 'ecard');
} else {
    $send['data'] = $ecard;
    $send['data']['src'] = $cs_main['php_self']['website'] . '/mods/gallery/image.php?pic=' . $picture_id . '&size=300';
    $send['data']['time'] = cs_date('unix', cs_time(), 1);
    $send['data']['ecard_titel'] = cs_secure($ecard['ecard_titel']);
    $send['data']['ecard_text'] = cs_secure($ecard['ecard_text'], 1);
    $message = cs_subtemplate(__FILE__, $send, 'gallery', 'ecard_mail');
    if (cs_mail($ecard['receiver_mail'], $ecard['ecard_titel'], $message, 0, 'text/html')) {
        $where = "gallery_id = '" . cs_sql_escape($picture_id) . "'";
        $cs_gallery = cs_sql_select(__FILE__, 'gallery', 'gallery_count_cards', $where);
        $gallery_count = $cs_gallery['gallery_count_cards'] + 1;
        $gallery_cells = array('gallery_count_cards');
        $gallery_save = array($gallery_count);
Exemple #14
0
    if (empty($data['create']['board_pwd'])) {
        $data['create']['board_ico'] = cs_icon('tutorials');
    } else {
        $data['create']['board_ico'] = cs_icon('password');
    }
    $data['create']['pre_text'] = cs_secure($data['create']['board_text'], 1);
}
$data['if']['error'] = false;
if (!empty($errormsg)) {
    $data['if']['error'] = true;
    $data['if']['preview'] = false;
    $data['create']['errormsg'] = $errormsg;
}
if (!empty($errormsg) or isset($_POST['preview']) or !isset($_POST['submit'])) {
    $data['create']['cat_drop'] = cs_categories_dropdown2('board', $data['create']['categories_id']);
    $data['create']['ab_box'] = cs_abcode_features('board_text');
    $levels = 0;
    $sel = 0;
    while ($levels < 6) {
        $data['create']['board_access'] == $levels ? $sel = 1 : ($sel = 0);
        $data['access'][$levels]['access_level'] = cs_html_option($levels . ' - ' . $cs_lang['lev_' . $levels], $levels, $sel);
        $levels++;
    }
    $matches[1] = $cs_lang['secure_stages'];
    $matches[2] = $cs_lang['stage_1'] . $cs_lang['stage_1_text'] . cs_html_br(1);
    $matches[2] .= $cs_lang['stage_2'] . $cs_lang['stage_2_text'] . cs_html_br(1);
    $matches[2] .= $cs_lang['stage_3'] . $cs_lang['stage_3_text'] . cs_html_br(1);
    $matches[2] .= $cs_lang['stage_4'] . $cs_lang['stage_4_text'];
    $data['create']['sec_level'] = cs_abcode_clip($matches);
    $op_squads = cs_sql_option(__FILE__, 'squads');
    $data['create']['squad_lang'] = $cs_lang[$op_squads['label']];
Exemple #15
0
        $check_axx = empty($account['access_' . $mods['dir'] . '']) ? 0 : $account['access_' . $mods['dir'] . ''];
        if (!empty($mods['categories']) and $check_axx > 2) {
            $mods['dir'] == $cs_categories['categories_mod'] ? $sel = 1 : ($sel = 0);
            $data['mod'][$run]['sel'] = cs_html_option($mods['name'], $mods['dir'], $sel);
            $run++;
        }
    }
    $levels = 0;
    $sel = 0;
    while ($levels < 6) {
        $cs_categories['categories_access'] == $levels ? $sel = 1 : ($sel = 0);
        $data['access'][$levels]['sel'] = cs_html_option($levels . ' - ' . $cs_lang['lev_' . $levels], $levels, $sel);
        $levels++;
    }
    $data['cat']['abcode_smileys'] = cs_abcode_smileys('categories_text');
    $data['cat']['abcode_features'] = cs_abcode_features('categories_text');
    $matches[1] = $cs_lang['pic_infos'];
    $return_types = '';
    foreach ($img_filetypes as $add) {
        $return_types .= empty($return_types) ? $add : ', ' . $add;
    }
    $matches[2] = $cs_lang['max_width'] . $op_categories['max_width'] . ' px' . cs_html_br(1);
    $matches[2] .= $cs_lang['max_height'] . $op_categories['max_height'] . ' px' . cs_html_br(1);
    $matches[2] .= $cs_lang['max_size'] . cs_filesize($op_categories['max_size']) . cs_html_br(1);
    $matches[2] .= $cs_lang['filetypes'] . $return_types;
    $data['cat']['picup_clip'] = cs_abcode_clip($matches);
    echo cs_subtemplate(__FILE__, $data, 'categories', 'create');
} else {
    $categories_cells = array_keys($cs_categories);
    $categories_save = array_values($cs_categories);
    cs_sql_insert(__FILE__, 'categories', $categories_cells, $categories_save);
Exemple #16
0
    $cs_cash['users_id'] = $account['users_id'];
    $cs_cash['cash_time'] = cs_date('unix', cs_time(), 0, 1, 'Y-m-d');
}
if (!isset($_POST['submit']) and empty($error)) {
    $data['head']['body'] = $cs_lang['body_info'];
} elseif (!empty($error)) {
    $data['head']['body'] = $error;
}
if (!empty($error) or !isset($_POST['submit'])) {
    $data['cash'] = $cs_cash;
    $data['cash']['cash_money'] = cs_secure($data['cash']['cash_money'], 0, 0, 0);
    $data['cash']['cash_text'] = cs_secure($data['cash']['cash_text'], 0, 0, 0);
    $data['cash']['cash_info'] = cs_secure($data['cash']['cash_info'], 0, 0, 0);
    $cs_users = cs_sql_select(__FILE__, 'users', 'users_nick,users_id', 'users_delete = "0"', 'users_nick', 0, 0);
    $data['cash']['users_sel'] = cs_dropdown('users_id', 'users_nick', $cs_users, $cs_cash['users_id']);
    $inoutlist[0]['cash_inout'] = 'in';
    $inoutlist[0]['name'] = $cs_lang['drop_in'];
    $inoutlist[1]['cash_inout'] = 'out';
    $inoutlist[1]['name'] = $cs_lang['drop_out'];
    $data['cash']['inout_sel'] = cs_dropdown('cash_inout', 'name', $inoutlist, $cs_cash['cash_inout']);
    $data['cash']['date_sel'] = cs_dateselect('datum', 'date', $cs_cash['cash_time'], 2000);
    $data['cash']['abcode_smileys'] = cs_abcode_smileys('cash_info');
    $data['cash']['abcode_features'] = cs_abcode_features('cash_info');
    $data['users']['nick'] = cs_secure($users_nick, 0, 0, 0);
    echo cs_subtemplate(__FILE__, $data, 'cash', 'create');
} else {
    $cash_cells = array_keys($cs_cash);
    $cash_save = array_values($cs_cash);
    cs_sql_insert(__FILE__, 'cash', $cash_cells, $cash_save);
    cs_redirect($cs_lang['create_done'], 'cash');
}
Exemple #17
0
    if (function_exists('stream_encoding')) {
        stream_encoding($fp, $cs_main['charset']);
    }
    fwrite($fp, $content);
    chmod($filename, 0755);
    fclose($fp);
    if ($account['access_wizard'] == 5) {
        $wizard = cs_sql_count(__FILE__, 'options', "options_name = 'done_cont' AND options_value = '1'");
        if (empty($wizard)) {
            $data['if']['wizzard'] = TRUE;
        }
    }
}
if (!empty($imp_form)) {
    $data = array();
    $data['imprint']['content'] = file_exists($filename) ? $imprint[1] : '';
    if (empty($cs_main['rte_html'])) {
        $data['if']['abcode'] = TRUE;
        $data['if']['rte_html'] = FALSE;
        $data['abcode']['features'] = cs_abcode_features('imprint', 1, 1);
    } else {
        $data['if']['abcode'] = FALSE;
        $data['if']['rte_html'] = TRUE;
        $data['rte']['html'] = cs_rte_html('imprint', $data['imprint']['content']);
    }
    $data['if']['done'] = FALSE;
    $data['if']['form'] = TRUE;
    $data['if']['wizzard'] = FALSE;
}
$data['url']['contact_imp_edit'] = cs_url('contact', 'imp_edit');
echo cs_subtemplate(__FILE__, $data, 'contact', 'imp_edit');
Exemple #18
0
    $data['gbook']['icon_skype'] = empty($cs_gbook['gbook_skype']) ? '' : $skype;
    $url = cs_html_link('http://' . $cs_gbook['gbook_url'], cs_icon('gohome'));
    $data['gbook']['icon_url'] = empty($cs_gbook['gbook_url']) ? '' : $url;
    $data['gbook']['text'] = cs_secure($cs_gbook['gbook_text'], 1, 1);
    $data['gbook']['time'] = cs_date('unix', $cs_gbook['gbook_time'], 1);
    $data['tpl']['preview'] = cs_subtemplate(__FILE__, $data, 'gbook', 'preview');
}
if (!empty($error) or !isset($_POST['submit']) or isset($_POST['preview'])) {
    foreach ($cs_gbook as $key => $value) {
        $data['gbook'][$key] = cs_secure($value);
    }
    if ($cs_gbook['users_id'] == 0) {
        $data['tpl']['extension'] = cs_subtemplate(__FILE__, $data, 'gbook', 'extension');
    }
    $data['abcode']['smileys'] = cs_abcode_smileys('gbook_text');
    $data['abcode']['features'] = cs_abcode_features('gbook_text');
    $data['check']['newtime'] = !empty($_POST['gbook_newtime']) ? 'checked="checked"' : '';
    $data['gbook']['id'] = $gbook_id;
    $data['gbook']['from'] = cs_secure($from);
    echo cs_subtemplate(__FILE__, $data, 'gbook', 'edit');
} else {
    $cells = array_keys($cs_gbook);
    $save = array_values($cs_gbook);
    cs_sql_update(__FILE__, 'gbook', $cells, $save, $gbook_id);
    if ($from == 'users') {
        $selid = cs_sql_select(__FILE__, 'gbook', 'gbook_users_id', "gbook_id = '" . $gbook_id . "'", 0, 0);
        $action = 'users';
        $more = 'id=' . $selid['gbook_users_id'];
    } else {
        $action = $from;
        $more = '';
Exemple #19
0
            $title = $cs_lang['mail_titel'];
            $message = $cs_lang['mail_text'] . $cs_messages[$run]['users_nick'];
            $message .= $cs_lang['mail_text_2'] . $cs_main['def_title'] . $cs_lang['mail_text_3'];
            $message .= $cs_contact['def_org'] . $cs_lang['mail_text_4'];
            cs_mail($email, $title, $message);
            if (!empty($lang_save)) {
                $cs_lang = $cs_lang_save;
                $account['users_lang'] = $lang_save;
            }
        }
    }
    cs_redirect($cs_lang['msg_create_done'], 'messages', 'center');
}
$data = array();
$data['if']['preview'] = false;
$data['lang']['body_create'] = empty($messages_error) ? nl2br($cs_lang['body_create']) : $cs_lang['error_occured'] . cs_html_br(1) . $errormsg;
if (isset($_POST['preview']) && empty($messages_error)) {
    $data['if']['preview'] = true;
    $data['var']['subject'] = cs_secure($_POST['messages_subject']);
    $data['var']['date'] = cs_date('unix', $time, 1);
    $data['to'] = $cs_messages;
    $data['var']['text'] = cs_secure($_POST['messages_text'], 1, 1);
}
$data['msg']['to'] = cs_secure($messages_to);
$data['msg']['subject'] = cs_secure($messages_subject);
$data['msg']['smileys'] = cs_abcode_smileys('messages_text');
$data['msg']['abcode'] = cs_abcode_features('messages_text');
$data['msg']['text'] = cs_secure($messages_text);
$data['checked']['show_sender'] = empty($messages_show_sender) ? '' : ' checked="checked"';
$data['var']['reply_id'] = $reply_id;
echo cs_subtemplate(__FILE__, $data, 'messages', 'create');
Exemple #20
0
}
if (!empty($error) or !isset($_POST['submit'])) {
    $size = 0;
    $data['file']['files_size'] /= 1024;
    while ($data['file']['files_size'] >= 1024 && $size < 2) {
        $data['file']['files_size'] /= 1024;
        $size++;
    }
    for ($l = 0; $l < 3; $l++) {
        $data['levels'][$l]['value'] = $l;
        $data['levels'][$l]['name'] = $cs_lang['size_' . $l];
        $data['levels'][$l]['if']['selected'] = $size == $l ? true : false;
    }
    $data['categories']['dropdown'] = cs_categories_dropdown2('files', $data['file']['categories_id']);
    $data['text']['smileys'] = cs_abcode_smileys('files_description');
    $data['text']['features'] = cs_abcode_features('files_description');
    $data['if']['closed'] = $data['file']['files_close'] ? true : false;
    $data['if']['votes'] = $data['file']['files_vote'] ? true : false;
    if (isset($_POST['mirror'])) {
        $run_loop = isset($_POST['run_loop']) ? $_POST['run_loop'] : 1;
    } else {
        $files_mirror = $data['file']['files_mirror'];
        $temp = explode("-----", $files_mirror);
        $run_loop = count($temp);
    }
    $data['mirrors'] = array();
    for ($run = 1; $run < $run_loop; $run++) {
        $num = $run + 1;
        $data['mirrors'][$run - 1]['run'] = $run;
        $data['mirrors'][$run - 1]['num'] = $num;
        if (isset($_POST['mirror'])) {
Exemple #21
0
    $search = cs_sql_count(__FILE__, 'squads', $where);
    if (!empty($search)) {
        $error .= $cs_lang['squad_exists'] . cs_html_br(1);
    }
}
if (!isset($_POST['submit'])) {
    $data['head']['body'] = $cs_lang['errors_here'];
} elseif (!empty($error)) {
    $data['head']['body'] = $error;
}
if (!empty($error) or !isset($_POST['submit'])) {
    foreach ($cs_squads as $key => $value) {
        $data['squads'][$key] = cs_secure($value);
    }
    $data['head']['mod'] = $cs_lang[$op_squads['label'] . 's'];
    $data['squads']['abcode'] = cs_abcode_features('squads_text');
    $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;
Exemple #22
0
        $count_com[$userid] = cs_sql_count(__FILE__, 'comments', $who);
        $data['prev']['posts'] = $count_com[$userid];
    } else {
        $data['if']['guest_prev'] = TRUE;
        $data['if']['user_prev'] = FALSE;
        $data['prev']['guestnick'] = cs_secure($guestnick);
    }
    $opt = "comments_mod = '" . $cs_com['comments_mod'] . "' AND comments_fid = '" . $com_fid . "'";
    $count_com = cs_sql_count(__FILE__, 'comments', $opt);
    $data['prev']['count_com'] = $count_com + 1;
    $data['prev']['date'] = cs_date('unix', cs_time(), 1);
    $data['prev']['text'] = cs_secure($cs_com['comments_text'], 1, 1);
}
if (!empty($error) or isset($_POST['preview']) or !isset($_POST['submit'])) {
    $data['com']['smileys'] = cs_abcode_smileys('comments_text');
    $data['com']['abcode'] = cs_abcode_features('comments_text');
    if (empty($cs_com['users_id'])) {
        $data['if']['guest'] = TRUE;
        $data['com']['guestnick'] = $guestnick;
    }
    $data['com']['text'] = $cs_com['comments_text'];
    $data['com']['id'] = $com_id;
    echo cs_subtemplate(__FILE__, $data, 'comments', 'edit');
} else {
    if (!empty($cs_com['comments_edit'])) {
        $edits = explode('/', $cs_com['comments_edit']);
        $edits_count = $edits[3] + 1;
    } else {
        $edits_count = 1;
    }
    $com_edits = $account['users_id'] . '/' . $account['users_nick'] . '/' . cs_time() . '/' . $edits_count;
Exemple #23
0
    $cs_buddys = cs_sql_select(__FILE__, 'buddys', $cells, "buddys_id = '" . $buddys_id . "'");
}
if (isset($_POST['preview'])) {
    $data['if']['preview'] = TRUE;
    $data['if']['form'] = TRUE;
    $data['if']['done'] = FALSE;
    $data['edit']['buddys_notice'] = cs_secure($cs_buddys['buddys_notice'], 1, 1);
    $data['edit']['id'] = $buddys_id;
}
if (isset($_POST['preview']) or !isset($_POST['submit'])) {
    if (!isset($_POST['preview'])) {
        $data['if']['preview'] = FALSE;
        $data['if']['form'] = TRUE;
        $data['if']['done'] = FALSE;
    }
    $data['edit']['abcode_smileys'] = cs_abcode_smileys('buddys_notice');
    $data['edit']['abcode_features'] = cs_abcode_features('buddys_notice');
    $data['edit']['buddys_notice'] = cs_secure($cs_buddys['buddys_notice']);
    $data['edit']['id'] = $buddys_id;
} else {
    $buddys_id = $_POST['id'];
    settype($buddys_id, 'integer');
    $data['if']['preview'] = FALSE;
    $data['if']['form'] = FALSE;
    $data['if']['done'] = TRUE;
    $buddys_cells = array_keys($cs_buddys);
    $buddys_save = array_values($cs_buddys);
    cs_sql_update(__FILE__, 'buddys', $buddys_cells, $buddys_save, $buddys_id);
    cs_redirect($cs_lang['changes_done'], 'buddys', 'center');
}
echo cs_subtemplate(__FILE__, $data, 'buddys', 'edit');
Exemple #24
0
    $data['head']['body'] = $cs_lang['body_create'];
} elseif (!empty($error)) {
    $data['head']['body'] = $error;
}
if (!empty($error) or !isset($_POST['submit'])) {
    $data['data'] = $cs_links;
    $data['cat']['dropdown'] = cs_categories_dropdown('links', $cs_links['categories_id']);
    $linksstat[0]['links_stats'] = 'on';
    $linksstat[0]['name'] = $cs_lang['online'];
    $linksstat[1]['links_stats'] = 'off';
    $linksstat[1]['name'] = $cs_lang['offline'];
    $data['status']['dropdown'] = cs_dropdown('links_stats', 'name', $linksstat, $cs_links['links_stats']);
    if (empty($cs_main['rte_html'])) {
        $data['if']['abcode'] = TRUE;
        $data['abcode']['smileys'] = cs_abcode_smileys('links_info', 1);
        $data['abcode']['features'] = cs_abcode_features('links_info', 1, 1);
    } else {
        $data['if']['rte_html'] = TRUE;
        $data['rte']['html'] = cs_rte_html('links_info', $cs_links['links_info']);
    }
    $matches[1] = $cs_lang['pic_infos'];
    $return_types = '';
    foreach ($img_filetypes as $add) {
        $return_types .= empty($return_types) ? $add : ', ' . $add;
    }
    $matches[2] = $cs_lang['max_width'] . $img_max['width'] . ' px' . cs_html_br(1);
    $matches[2] .= $cs_lang['max_height'] . $img_max['height'] . ' px' . cs_html_br(1);
    $matches[2] .= $cs_lang['max_size'] . cs_filesize($img_max['size']) . cs_html_br(1);
    $matches[2] .= $cs_lang['filetypes'] . $return_types;
    $data['picup']['clip'] = cs_abcode_clip($matches);
    $data['check']['sponsor'] = empty($cs_links['links_sponsor']) ? '' : 'checked="checked"';
Exemple #25
0
    $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);
    cs_sql_update(__FILE__, 'usersgallery', $cells, $save, $gallery_id);
    cs_redirect($cs_lang['changes_done'], 'usersgallery', 'center');
}
Exemple #26
0
    }
}
if (!isset($_POST['submit'])) {
    $data['head']['body'] = $cs_lang['body_create'];
} elseif (!empty($error)) {
    $data['head']['body'] = $error;
}
if (!empty($error) or !isset($_POST['submit'])) {
    $data['data'] = $cs_events;
    $data['categories']['dropdown'] = cs_categories_dropdown('events', $cs_events['categories_id']);
    $data['select']['time'] = cs_dateselect('time', 'unix', $cs_events['events_time'], 1995);
    if (empty($cs_main['rte_html'])) {
        $data['if']['abcode'] = TRUE;
        $data['if']['rte_html'] = FALSE;
        $data['abcode']['smileys'] = cs_abcode_smileys('events_more', 1);
        $data['abcode']['features'] = cs_abcode_features('events_more', 1, 1);
    } else {
        $data['if']['abcode'] = FALSE;
        $data['if']['rte_html'] = TRUE;
        $data['rte']['html'] = cs_rte_html('events_more', $cs_events['events_more']);
    }
    $selected = 'selected="selected"';
    $data['check']['multi_no'] = $_POST['events_multi'] == 'no' ? $selected : '';
    $data['check']['multi_yes'] = $_POST['events_multi'] == 'yes' ? $selected : '';
    $data['data']['events_multix'] = $_POST['events_multix'];
    $checked = 'checked="checked"';
    $data['check']['close'] = empty($cs_events['events_close']) ? '' : $checked;
    $data['check']['cancel'] = empty($cs_events['events_cancel']) ? '' : $checked;
    echo cs_subtemplate(__FILE__, $data, 'events', 'create');
} else {
    settype($cs_events['events_guestsmin'], 'integer');
Exemple #27
0
} elseif (!empty($error)) {
    $data['head']['body'] = $error;
} elseif (isset($_POST['preview'])) {
    $data['head']['body'] = $cs_lang['preview'];
}
if (isset($_POST['preview']) and empty($error)) {
    $data['if']['preview'] = TRUE;
    $data['preview']['date'] = cs_date('unix', $history['history_time'], 1);
    $cs_user = cs_sql_select(__FILE__, 'users', 'users_nick, users_active', "users_id = '" . $history['users_id'] . "'");
    $data['preview']['user'] = cs_user($history['users_id'], $cs_user['users_nick'], $cs_user['users_active']);
    $data['preview']['text'] = cs_secure($history['history_text'], 1, 1, 1, 1);
}
if (!empty($error) or !isset($_POST['submit']) or isset($_POST['preview'])) {
    if (empty($cs_main['rte_html'])) {
        $data['if']['no_rte_html'] = 1;
        $data['history']['abcode_smileys'] = cs_abcode_smileys('history_text', 1);
        $data['history']['abcode_features'] = cs_abcode_features('history_text', 1, 1);
        $data['history']['text'] = $history['history_text'];
        $data['if']['rte_html'] = 0;
    } else {
        $data['if']['rte_html'] = 1;
        $data['if']['no_rte_html'] = 0;
        $data['history']['rte_html'] = cs_rte_html('history_text', $history['history_text']);
    }
    echo cs_subtemplate(__FILE__, $data, 'history', 'create');
} else {
    $history_cells = array_keys($history);
    $history_save = array_values($history);
    cs_sql_insert(__FILE__, 'history', $history_cells, $history_save);
    cs_redirect($cs_lang['create_done'], 'history');
}
Exemple #28
0
        $cs_static_tpl['static']['table'] = $sel;
        $static_edit['static_comments'] == '1' ? $sel = 'checked="checked"' : ($sel = '');
        $cs_static_tpl['static']['comments'] = $sel;
        if ($account['access_static'] < 5) {
            $cs_static_tpl['if']['access_php'] = FALSE;
            $cs_static_tpl['if']['access_admin'] = FALSE;
        } else {
            $cs_static_tpl['if']['access_php'] = TRUE;
            $cs_static_tpl['if']['access_admin'] = TRUE;
            $cs_static_tpl['check']['admin'] = empty($static_edit['static_admins']) ? '' : 'checked="checked"';
        }
        $cs_static_tpl['static']['id'] = $static_edit['static_id'];
        $cs_static_tpl['static']['lang_form'] = $cs_lang['edit'];
        if (empty($cs_main['rte_html'])) {
            $cs_static_tpl['if']['rte_html'] = 0;
            $cs_static_tpl['if']['no_rte_html'] = 1;
            $cs_static_tpl['abcode']['features'] = cs_abcode_features('static_text', 1, 1);
            $cs_static_tpl['static']['content'] = cs_secure($cs_static_tpl['static']['content']);
        } else {
            $cs_static_tpl['if']['rte_html'] = 1;
            $cs_static_tpl['if']['no_rte_html'] = 0;
            $cs_static_tpl['static']['content'] = cs_rte_html('static_text', $cs_static_tpl['static']['content']);
        }
        echo cs_subtemplate(__FILE__, $cs_action_head, 'static', 'action_head');
        echo cs_subtemplate(__FILE__, $cs_static_tpl, 'static', 'action_form');
    }
} else {
    $cs_action_head['head']['action'] = $cs_lang['edit'];
    $cs_action_head['head']['body'] = $cs_lang['no_access'];
    echo cs_subtemplate(__FILE__, $cs_action_head, 'static', 'action_head');
}
Exemple #29
0
         }
         if ($files_gl['picture']['size'] > $options['max_size']) {
             $error .= cs_html_br(1) . '- ' . $cs_lang['too_big'];
         }
     }
 }
 if (empty($_POST['submit']) || !empty($error)) {
     $maps_id = empty($_POST['submit']) ? (int) $_GET['id'] : $_POST['maps_id'];
     $cells = 'games_id, maps_name, maps_text, maps_picture, server_name';
     $data['maps'] = cs_sql_select(__FILE__, 'maps', $cells, 'maps_id = \'' . $maps_id . '\'');
     $data['maps']['maps_id'] = empty($error) ? (int) $_GET['id'] : (int) $_POST['maps_id'];
     $data['maps']['message'] = empty($error) ? $cs_lang['fill_in'] : $cs_lang['error_occured'] . $error;
     $data['maps']['maps_name'] = empty($_POST['maps_name']) ? $data['maps']['maps_name'] : $_POST['maps_name'];
     $data['maps']['maps_text'] = empty($_POST['maps_text']) ? $data['maps']['maps_text'] : $_POST['maps_text'];
     $data['abcode']['smileys'] = cs_abcode_smileys('maps_text');
     $data['abcode']['features'] = cs_abcode_features('maps_text');
     $data['maps']['action'] = cs_url('maps', 'edit');
     $data['games'] = cs_sql_select(__FILE__, 'games', 'games_name,games_id', 0, 'games_name', 0, 0);
     $data['games'] = cs_dropdownsel($data['games'], $data['maps']['games_id'], 'games_id');
     $data['maps']['picture'] = empty($data['maps']['maps_picture']) ? '-' : cs_html_img('uploads/maps/' . $data['maps']['maps_picture']);
     $matches[1] = $cs_lang['pic_infos'];
     $return_types = '';
     foreach ($img_filetypes as $add) {
         $return_types .= empty($return_types) ? $add : ', ' . $add;
     }
     $matches[2] = $cs_lang['max_width'] . $options['max_width'] . ' px' . cs_html_br(1);
     $matches[2] .= $cs_lang['max_height'] . $options['max_height'] . ' px' . cs_html_br(1);
     $matches[2] .= $cs_lang['max_size'] . cs_filesize($options['max_size']) . cs_html_br(1);
     $matches[2] .= $cs_lang['filetypes'] . $return_types;
     $data['maps']['matches'] = cs_abcode_clip($matches);
     $data['if']['picture_remove'] = !empty($data['maps']['maps_picture']) ? TRUE : FALSE;
Exemple #30
0
        $data['player'][$x]['player_name'] = $cs_players[$x];
        $data['player'][$x]['user_sel'] = cs_dropdown('playerid' . $x, 'users_nick', $cs_members, 0, 'users_id');
    }
    $data['wars']['date_sel'] = cs_dateselect('date', 'unix', $cs_wars['wars_date'], 1995);
    $status = array();
    $status[0]['wars_status'] = 'upcoming';
    $status[0]['name'] = $cs_lang['upcoming'];
    $status[1]['wars_status'] = 'running';
    $status[1]['name'] = $cs_lang['running'];
    $status[2]['wars_status'] = 'canceled';
    $status[2]['name'] = $cs_lang['canceled'];
    $status[3]['wars_status'] = 'played';
    $status[3]['name'] = $cs_lang['played'];
    $data['wars']['status_dropdown'] = cs_dropdown('wars_status', 'name', $status, $cs_wars['wars_status']);
    $data['abcode']['smileys'] = cs_abcode_smileys('wars_report');
    $data['abcode']['features'] = cs_abcode_features('wars_report');
    $data['abcode']['smileys2'] = cs_abcode_smileys('wars_report2');
    $data['abcode']['features2'] = cs_abcode_features('wars_report2');
    $data['wars']['check_player'] = !empty($players) ? $players : 1;
    $data['wars']['close_check'] = empty($cs_wars['wars_close']) ? '' : 'checked="checked"';
    $data['value']['wars_topmatch_check'] = empty($cs_wars['wars_topmatch']) ? '' : 'checked="checked"';
    $data['wars']['id'] = $wars_id;
    echo cs_subtemplate(__FILE__, $data, 'wars', 'edit');
} else {
    settype($cs_wars['wars_score1'], 'integer');
    settype($cs_wars['wars_score2'], 'integer');
    $wars_cells = array_keys($cs_wars);
    $wars_save = array_values($cs_wars);
    cs_sql_update(__FILE__, 'wars', $wars_cells, $wars_save, $wars_id);
    cs_redirect($cs_lang['changes_done'], 'wars');
}