Example #1
0
}
$symbol = empty($_POST['symbol']) ? '' : $_POST['symbol'];
$games_name = '';
$games_version = '';
$games_creator = '';
$games_url = '';
$categories_id = empty($_POST['categories_id']) ? 0 : $_POST['categories_id'];
$games_usk = empty($_POST['games_usk']) ? '' : $_POST['games_usk'];
$errormsg = '';
if (!empty($_POST['games_name'])) {
    $games_name = $_POST['games_name'];
} else {
    $errormsg .= $cs_lang['name_error'] . cs_html_br(1);
    $games_error++;
}
$categories_id = empty($_POST['categories_name']) ? $categories_id : cs_categories_create('games', $_POST['categories_name']);
if (empty($categories_id)) {
    $errormsg .= $cs_lang['cat_error'] . cs_html_br(1);
    $games_error++;
}
if (!empty($files['symbol']['tmp_name'])) {
    $symbol_error = 1;
    foreach ($img_filetypes as $allowed => $new_ext) {
        if ($allowed == $files['symbol']['type']) {
            $symbol_error = 0;
            $extension = $new_ext;
        }
    }
    $img_size = getimagesize($files['symbol']['tmp_name']);
    if (!empty($symbol_error) and $img_size[2] != 1) {
        $errormsg .= $cs_lang['ext_error'] . cs_html_br(1);
Example #2
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('boardmods');
require_once 'mods/categories/functions.php';
$data = array();
if (isset($_POST['submit'])) {
    $cs_bm['categories_id'] = empty($_POST['categories_id']) ? cs_categories_create('boardmods', $_POST['categories_name']) : (int) $_POST['categories_id'];
    $cs_bm['boardmods_modpanel'] = isset($_POST['boardmods_modpanel']) ? $_POST['boardmods_modpanel'] : 0;
    $cs_bm['boardmods_edit'] = isset($_POST['boardmods_edit']) ? $_POST['boardmods_edit'] : 0;
    $cs_bm['boardmods_del'] = isset($_POST['boardmods_del']) ? $_POST['boardmods_del'] : 0;
    $error = 0;
    $errormsg = '';
    if (empty($cs_bm['categories_id'])) {
        $error++;
        $errormsg .= $cs_lang['no_cat'] . cs_html_br(1);
    }
} else {
    $boardmods_id = $_GET['id'];
    $tables = 'boardmods brd INNER JOIN {pre}_users usr ON usr.users_id = brd.users_id';
    $cells = 'brd.boardmods_id AS boardmods_id, brd.categories_id AS categories_id, brd.users_id AS users_id, usr.users_nick AS users_nick, ';
    $cells .= 'brd.boardmods_modpanel AS boardmods_modpanel, brd.boardmods_edit AS boardmods_edit, brd.boardmods_del AS boardmods_del';
    $cs_bm = cs_sql_select(__FILE__, $tables, $cells, "boardmods_id = '" . $boardmods_id . "'", 0, 0);
}
if (!isset($_POST['submit']) and empty($error)) {
    $data['head']['body'] = $cs_lang['body'];
} elseif (!empty($error)) {
    $data['head']['body'] = $errormsg;
}
if (!empty($error) or !isset($_POST['submit'])) {
Example #3
0
            $num = $run_prev;
            if ($run_prev == count($temp_mirror) - 1) {
                $data['prev_mirror'][$prev_run]['dot'] = '';
            } elseif (!empty($run_prev)) {
                $data['prev_mirror'][$prev_run]['dot'] = ' - ';
            } else {
                $data['prev_mirror'][$prev_run]['dot'] = ' - ';
            }
            $data['prev_mirror'][$prev_run]['news_mirror'] = cs_html_link($temp_mirror[$run_prev], $temp_mirror_name[$run_prev]);
            $prev_run++;
        }
    }
    $data['if']['preview'] = true;
}
if (isset($_POST['mirror'])) {
    $cs_news['categories_id'] = empty($_POST['categories_name']) ? $_POST['categories_id'] : cs_categories_create('news', $_POST['categories_name']);
    $cs_news['news_close'] = isset($_POST['news_close']) ? $_POST['news_close'] : 0;
    $cs_news['news_public'] = isset($_POST['news_public']) ? $_POST['news_public'] : 0;
    $cs_news['news_attached'] = isset($_POST['news_attached']) ? $_POST['news_attached'] : 0;
    $cs_news['news_headline'] = $_POST['news_headline'];
    $cs_news['news_time'] = cs_time();
    $cs_news['news_publishs_at'] = isset($_POST['publish_at']) ? cs_datepost('date', 'unix') : 0;
    $cs_news['news_readmore_active'] = isset($_POST['news_readmore_active']) ? $_POST['news_readmore_active'] : 0;
    $cs_news['news_text'] = empty($cs_main['rte_html']) ? $_POST['news_text'] : cs_abcode_inhtml($_POST['news_text'], 'add');
    $cs_news['news_readmore'] = empty($cs_main['rte_html']) ? $_POST['news_readmore'] : cs_abcode_inhtml($_POST['news_readmore'], 'add');
    $_POST['run_loop']++;
}
if (!empty($error) or isset($_POST['preview']) or !isset($_POST['submit'])) {
    $data['categories']['dropdown'] = cs_categories_dropdown('news', $cs_news['categories_id']);
    $data['news']['news_headline'] = cs_secure($cs_news['news_headline']);
    $data['news']['news_text'] = cs_secure($cs_news['news_text']);
Example #4
0
require_once 'mods/categories/functions.php';
$cs_events['events_name'] = '';
$cs_events['categories_id'] = 0;
$cs_events['events_time'] = cs_time();
$cs_events['events_venue'] = '';
$cs_events['events_url'] = '';
$cs_events['events_more'] = '';
$cs_events['events_close'] = 0;
$cs_events['events_cancel'] = 0;
$cs_events['events_guestsmin'] = '';
$cs_events['events_guestsmax'] = '';
$cs_events['events_needage'] = '';
$_POST['events_multix'] = empty($_POST['events_multix']) ? '' : $_POST['events_multix'];
$_POST['events_multi'] = empty($_POST['events_multi']) ? '' : $_POST['events_multi'];
if (isset($_POST['submit'])) {
    $cs_events['categories_id'] = empty($_POST['categories_name']) ? $_POST['categories_id'] : cs_categories_create('events', $_POST['categories_name']);
    $cs_events['events_name'] = $_POST['events_name'];
    $cs_events['events_venue'] = $_POST['events_venue'];
    $cs_events['events_url'] = $_POST['events_url'];
    $cs_events['events_more'] = empty($cs_main['rte_html']) ? $_POST['events_more'] : cs_abcode_inhtml($_POST['events_more'], 'add');
    $cs_events['events_time'] = cs_datepost('time', 'unix');
    $cs_events['events_close'] = isset($_POST['events_close']) ? $_POST['events_close'] : 0;
    $cs_events['events_cancel'] = isset($_POST['events_cancel']) ? $_POST['events_cancel'] : 0;
    $cs_events['events_guestsmin'] = !empty($_POST['events_guestsmin']) ? $_POST['events_guestsmin'] : '';
    $cs_events['events_guestsmax'] = !empty($_POST['events_guestsmax']) ? $_POST['events_guestsmax'] : '';
    $cs_events['events_needage'] = !empty($_POST['events_needage']) ? $_POST['events_needage'] : '';
    $error = '';
    if (empty($cs_events['events_name'])) {
        $error .= $cs_lang['no_name'] . cs_html_br(1);
    }
    if (empty($cs_events['categories_id'])) {
Example #5
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('banners');
$files = cs_files();
require_once 'mods/categories/functions.php';
$op_banners = cs_sql_option(__FILE__, 'banners');
$img_filetypes = array('gif', 'jpg', 'png');
if (isset($_POST['submit'])) {
    $cs_banners['categories_id'] = empty($_POST['categories_name']) ? $_POST['categories_id'] : cs_categories_create('banners', $_POST['categories_name']);
    $cs_banners['banners_name'] = $_POST['banners_name'];
    $cs_banners['banners_url'] = $_POST['banners_url'];
    $cs_banners['banners_picture'] = $_POST['banners_picture'];
    $cs_banners['banners_alt'] = $_POST['banners_alt'];
    $cs_banners['banners_order'] = empty($_POST['banners_order']) ? $op_banners['def_order'] : $_POST['banners_order'];
    $error = 0;
    $message = '';
    $img_size = false;
    if (!empty($files['picture']['tmp_name'])) {
        $img_size = getimagesize($files['picture']['tmp_name']);
    }
    if (!empty($files['picture']['tmp_name']) and empty($img_size) or $img_size[2] > 3) {
        $message .= $cs_lang['ext_error'] . cs_html_br(1);
        $error++;
    } elseif (!empty($files['picture']['tmp_name'])) {
        switch ($img_size[2]) {
            case 1:
                $extension = 'gif';
                break;
            case 2:
Example #6
0
    }
    if (empty($data['file']['files_name'])) {
        $error .= $cs_lang['no_name'] . cs_html_br(1);
    }
    if (empty($data['file']['files_description'])) {
        $error .= $cs_lang['no_text'] . cs_html_br(1);
    }
    if (empty($data['file']['files_mirror'])) {
        $error .= $cs_lang['no_mirror'] . cs_html_br(1);
    }
} else {
    $cells = 'categories_id, files_name, files_version, files_description, files_mirror, users_id, files_time AS time, files_close, files_vote, files_size, files_id';
    $data['file'] = cs_sql_select(__FILE__, 'files', $cells, "files_id = '" . $files_id . "'");
}
if (isset($_POST['mirror'])) {
    $data['file']['categories_id'] = empty($_POST['categories_name']) ? $_POST['categories_id'] : cs_categories_create('files', $_POST['categories_name']);
    $data['file']['files_close'] = isset($_POST['files_close']) ? $_POST['files_close'] : 0;
    $data['file']['files_vote'] = isset($_POST['files_vote']) ? $_POST['files_vote'] : 0;
    $data['file']['files_name'] = $_POST['files_name'];
    $data['file']['files_version'] = $_POST['files_version'];
    $data['file']['files_description'] = $_POST['files_description'];
    $data['file']['files_size'] = stripos($_POST['files_size'], ',') === FALSE ? $_POST['files_size'] : strtr($_POST['files_size'], ',', '.');
    $data['file']['files_size'] = round($data['file']['files_size'], 2);
    $size = $_POST['size'];
    $_POST['run_loop']++;
}
if (!isset($_POST['submit'])) {
    $data['head']['message'] = $cs_lang['body_edit'];
} elseif (!empty($error)) {
    $data['head']['message'] = $error;
}
Example #7
0
require_once 'mods/categories/functions.php';
$img_max['width'] = 470;
$img_max['height'] = 100;
$img_max['size'] = 256000;
$img_filetypes = array('gif', 'jpg', 'png');
$data['if']['abcode'] = FALSE;
$data['if']['rte_html'] = FALSE;
$cs_links['links_name'] = '';
$cs_links['categories_id'] = 0;
$cs_links['links_url'] = '';
$cs_links['links_stats'] = '';
$cs_links['links_info'] = '';
$cs_links['links_sponsor'] = '';
if (isset($_POST['submit'])) {
    $cs_links['links_name'] = $_POST['links_name'];
    $cs_links['categories_id'] = empty($_POST['categories_name']) ? $_POST['categories_id'] : cs_categories_create('links', $_POST['categories_name']);
    $cs_links['links_url'] = $_POST['links_url'];
    $cs_links['links_stats'] = $_POST['links_stats'];
    $cs_links['links_info'] = empty($cs_main['rte_html']) ? $_POST['links_info'] : cs_abcode_inhtml($_POST['links_info'], 'add');
    $cs_links['links_sponsor'] = isset($_POST['links_sponsor']) ? $_POST['links_sponsor'] : 0;
    $error = '';
    //check name
    if (!empty($cs_links['links_name'])) {
        $check_name = cs_sql_count(__FILE__, 'links', "links_name = '" . $cs_links['links_name'] . "'");
        if (!empty($check_name)) {
            $error .= sprintf($cs_lang['name_exists'], $cs_links['links_name']) . cs_html_br(1);
        }
    } else {
        $error .= $cs_lang['no_name'] . cs_html_br(1);
    }
    if (empty($cs_links['categories_id'])) {
Example #8
0
$cs_lang = cs_translate('faq');
$cs_post = cs_post('id');
$cs_get = cs_get('id');
$faq_id = empty($cs_get['id']) ? 0 : $cs_get['id'];
if (!empty($cs_post['id'])) {
    $faq_id = $cs_post['id'];
}
require_once 'mods/categories/functions.php';
$data['if']['preview'] = false;
$select = 'faq_question, faq_answer, categories_id';
$cs_faq = cs_sql_select(__FILE__, 'faq', $select, "faq_id = '" . $faq_id . "'");
$faq_frage = $cs_faq['faq_question'];
$faq_antwort = $cs_faq['faq_answer'];
$categories_id = empty($_POST['categories_id']) ? $cs_faq['categories_id'] : $_POST['categories_id'];
if (isset($_POST['submit']) or isset($_POST['preview'])) {
    $categories_id = empty($_POST['categories_name']) ? (int) $_POST['categories_id'] : cs_categories_create('faq', $_POST['categories_name']);
    $faq_frage = $_POST['faq_frage'];
    $faq_antwort = empty($cs_main['rte_html']) ? $_POST['faq_antwort'] : cs_abcode_inhtml($_POST['faq_antwort'], 'add');
    $error = '';
    if (empty($categories_id)) {
        $error .= $cs_lang['no_cat'] . cs_html_br(1);
    }
    if (empty($faq_frage)) {
        $error .= $cs_lang['no_question'] . cs_html_br(1);
    }
    if (empty($faq_antwort)) {
        $error .= $cs_lang['no_answer'] . cs_html_br(1);
    }
}
if (!isset($_POST['submit']) and !isset($_POST['preview']) and empty($error)) {
    $data['head']['body'] = $cs_lang['body_edit'];
Example #9
0
            $num = $run;
            if ($run == count($temp_mirror) - 1) {
                $data['prev_mirror'][$prev_run]['dot'] = '';
            } elseif (!empty($run)) {
                $data['prev_mirror'][$prev_run]['dot'] = ' - ';
            } else {
                $data['prev_mirror'][$prev_run]['dot'] = ' - ';
            }
            $data['prev_mirror'][$prev_run]['news_mirror'] = cs_html_link($temp_mirror[$run], $temp_mirror_name[$run]);
            $prev_run++;
        }
    }
    $data['if']['preview'] = true;
}
if (isset($_POST['mirror'])) {
    $data['news']['categories_id'] = empty($_POST['categories_name']) ? (int) $_POST['categories_id'] : cs_categories_create('news', $_POST['categories_name']);
    $data['news']['news_close'] = isset($_POST['news_close']) ? (int) $_POST['news_close'] : 0;
    $data['news']['news_public'] = isset($_POST['news_public']) ? (int) $_POST['news_public'] : 0;
    $data['news']['news_attached'] = isset($_POST['news_attached']) ? (int) $_POST['news_attached'] : 0;
    $data['news']['news_headline'] = $_POST['news_headline'];
    $data['news']['users_id'] = $_POST['users_id'];
    $data['news']['news_publishs_at'] = isset($_POST['publish_at']) ? (int) cs_datepost('date', 'unix') : 0;
    $data['news']['news_readmore_active'] = isset($_POST['news_readmore_active']) ? (int) $_POST['news_readmore_active'] : 0;
    $data['if']['no_readmore'] = isset($_POST['news_readmore_active']) ? false : true;
    $data['news']['news_text'] = empty($cs_main['rte_html']) ? $_POST['news_text'] : cs_abcode_inhtml($_POST['news_text'], 'add');
    $data['news']['news_readmore'] = empty($cs_main['rte_html']) ? $_POST['news_readmore'] : cs_abcode_inhtml($_POST['news_readmore'], 'add');
    $_POST['run_loop']++;
}
if (!empty($error) or isset($_POST['preview']) or !isset($_POST['submit'])) {
    $data['categories']['dropdown'] = cs_categories_dropdown('news', $cs_news['categories_id']);
    $data['news']['news_headline'] = cs_secure($cs_news['news_headline']);
Example #10
0
// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('partner');
require_once 'mods/categories/functions.php';
$op_partner = cs_sql_option(__FILE__, 'partner');
$img_filetypes = array('image/pjpeg' => 'jpg', 'image/jpeg' => 'jpg', 'image/gif' => 'gif', 'image/png' => 'png');
$error = '';
$data = array();
$files = cs_files();
if (!empty($_POST['submit'])) {
    $data['partner']['partner_name'] = empty($_POST['partner_name']) ? '' : $_POST['partner_name'];
    $data['partner']['partner_text'] = empty($_POST['partner_text']) ? '' : $_POST['partner_text'];
    $data['partner']['partner_url'] = empty($_POST['partner_url']) ? '' : $_POST['partner_url'];
    $data['partner']['partner_alt'] = empty($_POST['partner_alt']) ? '' : $_POST['partner_alt'];
    $data['partner']['partner_priority'] = empty($_POST['partner_priority']) ? '' : $_POST['partner_priority'];
    $categories_id = empty($_POST['categories_name']) ? $_POST['categories_id'] : cs_categories_create('partner', $_POST['categories_name']);
    if (empty($_POST['partner_name'])) {
        $error .= $cs_lang['no_name'] . cs_html_br(1);
    }
    if (empty($_POST['partner_text'])) {
        $error .= $cs_lang['no_text'] . cs_html_br(1);
    }
    if (empty($_POST['partner_url'])) {
        $error .= $cs_lang['no_url'] . cs_html_br(1);
    }
    if (empty($_POST['partner_alt'])) {
        $error .= $cs_lang['no_alt'] . cs_html_br(1);
    }
    if (empty($_POST['partner_priority'])) {
        $error .= $cs_lang['no_priority'] . cs_html_br(1);
    }
Example #11
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('replays');
$files_gl = cs_files();
$op_replays = cs_sql_option(__FILE__, 'replays');
$rep_max['size'] = $op_replays['file_size'];
$rep_filetypes = explode(",", $op_replays['file_type']);
require_once 'mods/categories/functions.php';
if (isset($_POST['submit'])) {
    $cs_replays['categories_id'] = empty($_POST['categories_name']) ? $_POST['categories_id'] : cs_categories_create('replays', $_POST['categories_name']);
    $cs_replays['games_id'] = $_POST['games_id'];
    $cs_replays['replays_version'] = $_POST['replays_version'];
    $cs_replays['replays_team1'] = $_POST['replays_team1'];
    $cs_replays['replays_team2'] = $_POST['replays_team2'];
    $cs_replays['replays_date'] = cs_datepost('date', 'date');
    $cs_replays['replays_map'] = $_POST['replays_map'];
    $cs_replays['replays_mirror_urls'] = $_POST['replays_mirror_urls'];
    $cs_replays['replays_mirror_names'] = $_POST['replays_mirror_names'];
    $cs_replays['replays_info'] = $_POST['replays_info'];
    $cs_replays['replays_close'] = isset($_POST['replays_close']) ? $_POST['replays_close'] : 0;
    $error = '';
    if (!empty($files_gl['replay']['tmp_name'])) {
        $rep_size = filesize($files_gl['replay']['tmp_name']);
        $rep_ext = explode('.', $files_gl['replay']['name']);
        $who_ext = count($rep_ext) < 1 ? 0 : count($rep_ext) - 1;
        $extension = in_array($rep_ext[$who_ext], $rep_filetypes) ? $rep_ext[$who_ext] : 0;
        if (empty($extension)) {
            $error .= $cs_lang['ext_error'] . cs_html_br(1);
        }
Example #12
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('quotes');
require_once 'mods/categories/functions.php';
$data = array();
$data['head']['body'] = '';
$data['head']['action'] = $cs_lang['create'];
if (isset($_POST['submit'])) {
    $cs_quotes['categories_id'] = empty($_POST['categories_id']) ? cs_categories_create('quotes', $_POST['categories_name']) : (int) $_POST['categories_id'];
    $cs_quotes['quotes_headline'] = $_POST['quotes_headline'];
    $cs_quotes['quotes_text'] = $_POST['quotes_text'];
    $cs_quotes['quotes_time'] = cs_time();
    $cs_quotes['users_id'] = $account['users_id'];
    $error = 0;
    $errormsg = '';
    if (empty($cs_quotes['categories_id'])) {
        $error++;
        $errormsg .= $cs_lang['no_cat'] . cs_html_br(1);
    }
    if (empty($cs_quotes['quotes_headline'])) {
        $error++;
        $errormsg .= $cs_lang['no_headline'] . cs_html_br(1);
    }
    if (empty($cs_quotes['quotes_text'])) {
        $error++;
        $errormsg .= $cs_lang['no_text'] . cs_html_br(1);
    }
}
if (!isset($_POST['submit']) and empty($error)) {
Example #13
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('board');
require_once 'mods/categories/functions.php';
$data = array();
$data['create']['board_time'] = cs_time();
$data['create']['users_id'] = $account['users_id'];
if (isset($_POST['submit']) or isset($_POST['preview'])) {
    $data['create']['categories_id'] = empty($_POST['categories_name']) ? $_POST['categories_id'] : cs_categories_create('board', $_POST['categories_name']);
    $data['create']['board_access'] = $_POST['board_access'];
    $data['create']['board_name'] = $_POST['board_name'];
    $data['create']['board_text'] = $_POST['board_text'];
    $data['create']['board_pwd'] = $_POST['board_pwd'];
    $data['create']['squads_id'] = $_POST['squads_id'];
    $data['create']['board_read'] = $_POST['board_read'];
    $errormsg = '';
    if (empty($data['create']['categories_id'])) {
        $errormsg .= $cs_lang['no_cat'] . cs_html_br(1);
    }
    if (empty($data['create']['board_name'])) {
        $errormsg .= $cs_lang['no_name'] . cs_html_br(1);
    }
    if (empty($data['create']['board_text'])) {
        $errormsg .= $cs_lang['no_text'] . cs_html_br(1);
    }
} else {
    $data['create']['categories_id'] = 0;
    $data['create']['squads_id'] = 0;
    $data['create']['board_name'] = '';
Example #14
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('rules');
require_once 'mods/categories/functions.php';
$data = array();
$data['if']['preview'] = false;
$data['ru']['rules_order'] = '';
$data['ru']['rules_title'] = '';
$data['ru']['rules_rule'] = '';
if (isset($_POST['submit']) or isset($_POST['preview'])) {
    $data['ru']['categories_id'] = empty($_POST['categories_id']) ? cs_categories_create('rules', $_POST['categories_name']) : (int) $_POST['categories_id'];
    $data['ru']['rules_order'] = $_POST['rules_order'];
    $data['ru']['rules_title'] = $_POST['rules_title'];
    $data['ru']['rules_rule'] = $_POST['rules_rule'];
    $error = '';
    if (empty($data['ru']['categories_id'])) {
        $error .= $cs_lang['no_cat'] . cs_html_br(1);
    }
    if (empty($data['ru']['rules_order'])) {
        $error .= $cs_lang['no_order'] . cs_html_br(1);
    }
    if (empty($data['ru']['rules_title'])) {
        $error .= $cs_lang['no_title'] . cs_html_br(1);
    }
    if (empty($data['ru']['rules_rule'])) {
        $error .= $cs_lang['no_rule'] . cs_html_br(1);
    }
}
if (!isset($_POST['submit']) and empty($error) and !isset($_POST['preview'])) {
Example #15
0

<?php 
// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('quotes');
require_once 'mods/categories/functions.php';
$quotes_id = $_REQUEST['id'];
settype($quotes_id, 'integer');
$data['head']['mod'] = $cs_lang['mod_name'];
$data['head']['action'] = $cs_lang['edit'];
$data['head']['body'] = $cs_lang['fill_obligated'];
if (isset($_POST['submit'])) {
    $cs_quotes['categories_id'] = empty($_POST['categories_name']) ? $_POST['categories_id'] : cs_categories_create('quotes', $_POST['categories_name']);
    $cs_quotes['quotes_headline'] = $_POST['quotes_headline'];
    $cs_quotes['quotes_text'] = $_POST['quotes_text'];
    $cs_quotes['quotes_time'] = $_POST['quotes_time'];
    if (!empty($_POST['quotes_newtime'])) {
        $cs_quotes['quotes_time'] = cs_time();
        $quotes_newtime = 1;
    }
    $error = 0;
    $errormsg = '';
    if (empty($cs_quotes['categories_id'])) {
        $error++;
        $errormsg .= $cs_lang['no_cat'] . cs_html_br(1);
    }
    if (empty($cs_quotes['quotes_headline'])) {
        $error++;
        $errormsg .= $cs_lang['no_headline'] . cs_html_br(1);
    }
Example #16
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('articles');
require_once 'mods/categories/functions.php';
require_once 'mods/pictures/functions.php';
$data['if']['head'] = 1;
$data['if']['preview'] = false;
$files = cs_files();
if (isset($_POST['submit']) or isset($_POST['preview'])) {
    $cs_articles['categories_id'] = empty($_POST['categories_name']) ? $_POST['categories_id'] : cs_categories_create('articles', $_POST['categories_name']);
    $cs_articles['articles_com'] = isset($_POST['articles_com']) ? $_POST['articles_com'] : 0;
    $cs_articles['articles_navlist'] = isset($_POST['articles_navlist']) ? $_POST['articles_navlist'] : 0;
    $cs_articles['articles_fornext'] = isset($_POST['articles_fornext']) ? $_POST['articles_fornext'] : 0;
    $cs_articles['articles_headline'] = $_POST['articles_headline'];
    $cs_articles['articles_time'] = $_POST['articles_time'];
    $cs_articles['articles_text'] = empty($cs_main['rte_html']) ? $_POST['articles_text'] : cs_abcode_inhtml($_POST['articles_text'], 'add');
    $categories = cs_sql_select(__FILE__, 'categories', 'categories_picture', "categories_id = '" . $cs_articles['categories_id'] . "'");
    if (!empty($_POST['articles_newtime'])) {
        $cs_articles['articles_time'] = cs_time();
        $articles_newtime = 1;
    }
    $error = 0;
    $errormsg = '';
    if (empty($cs_articles['categories_id'])) {
        $error++;
        $errormsg .= $cs_lang['no_cat'] . cs_html_br(1);
    }
    if (empty($cs_articles['articles_headline'])) {
        $error++;