$error++; $errormsg .= $cs_lang['no_text'] . cs_html_br(1); } $exists = cs_sql_count(__FILE__, 'boardreport', "threads_id = " . (int) $tid . " AND comments_id = " . (int) $cid); if (!empty($exists)) { $error++; $errormsg .= $cs_lang['report_exists'] . cs_html_br(1); } } if (!empty($error)) { $data['lang']['body'] = $errormsg; } elseif (!isset($_POST['submit'])) { $data['lang']['body'] = $cs_lang['fill_out_all_fields']; } else { $data['lang']['body'] = $cs_lang['report_success']; } if (!empty($error) or !isset($_POST['submit'])) { $data['action']['form'] = cs_url('board', 'report'); $data['report']['tid'] = $tid; $data['report']['cid'] = $cid; } else { $report_cells = array('threads_id', 'comments_id', 'users_id', 'boardreport_time', 'boardreport_text'); $report_save = array($tid, $cid, $account['users_id'], cs_time(), $report); cs_sql_insert(__FILE__, 'boardreport', $report_cells, $report_save); cs_cache_delete('count_boardreport'); require_once 'mods/notifymods/functions.php'; $users_nick = cs_sql_select(__FILE__, 'users', 'users_nick', 'users_id = ' . $account['users_id']); notifymods_mail('board', $account['users_id'], array($users_nick['users_nick'], $cs_thread['threads_headline'], $report)); cs_redirect($cs_lang['report_success'], 'board', 'thread', 'where=' . $tid); } echo cs_subtemplate(__FILE__, $data, 'board', 'report');
} if (empty($users_id) or !empty($cs_options['captcha_users'])) { if (!empty($captcha)) { $data['captcha']['img'] = cs_html_img('mods/captcha/generate.php?time=' . cs_time()); $data['tpl']['captcha'] = cs_subtemplate(__FILE__, $data, 'gbook', 'captcha'); } } $data['abcode']['smileys'] = cs_abcode_smileys('gbook_text'); $data['abcode']['features'] = cs_abcode_features('gbook_text'); $data['gbook']['id'] = $id; $data['gbook']['from'] = $from; echo cs_subtemplate(__FILE__, $data, 'gbook', 'entry'); } else { $cs_gbook['users_id'] = $account['users_id']; $cs_gbook['gbook_users_id'] = $id; $cs_gbook['gbook_lock'] = empty($cs_options['lock']) ? 1 : 0; if (!empty($account['users_id'])) { unset($cs_gbook['gbook_ip']); } $cells = array_keys($cs_gbook); $save = array_values($cs_gbook); cs_sql_insert(__FILE__, 'gbook', $cells, $save); require_once 'mods/notifymods/functions.php'; notifymods_mail('gbook', $account['users_id']); $msg = empty($cs_options['lock']) ? $cs_lang['create_done'] : $cs_lang['create_done_lock']; if (empty($id)) { cs_redirect($msg, 'gbook', $from); } else { cs_redirect($msg, 'gbook', 'users', 'id=' . $id); } }
$data = array(); require 'mods/files/functions.php'; $file_id = !empty($_GET['where']) ? (int) $_GET['where'] : (int) $_GET['id']; $from = 'files fls INNER JOIN {pre}_users usr ON fls.users_id = usr.users_id'; $from .= ' INNER JOIN {pre}_categories cat ON fls.categories_id = cat.categories_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, fls.files_time AS files_time, fls.files_id AS files_id'; $select .= ', fls.files_mirror AS files_mirror ,cat.categories_name AS categories_name'; $select .= ', cat.categories_id AS categories_id, fls.files_count AS files_count'; $select .= ', fls.files_description AS files_description, fls.files_close AS files_close'; $select .= ', fls.files_vote AS files_vote, fls.files_size AS files_size, fls.files_version AS files_version, fls.files_previews AS files_previews'; $where = 'cat.categories_access <= ' . (int) $account['access_files'] . ' AND fls.files_id = ' . $file_id; $cs_file = cs_sql_select(__FILE__, $from, $select, $where); if (!empty($_POST['brokenlink'])) { require_once 'mods/notifymods/functions.php'; notifymods_mail('files', $account['users_id'], $cs_file['files_name']); $data['if']['brokenlink'] = FALSE; } else { $data['if']['brokenlink'] = TRUE; } $from = 'voted'; $select = 'users_id, voted_answer'; $where = 'voted_fid = ' . $file_id . ' AND voted_mod = \'files\''; $cs_voted = cs_sql_select(__FILE__, $from, $select, $where, 0, 0, 0); $voted_loop = count($cs_voted); if (!empty($_POST['voted_answer'])) { $voted_answer = $_POST['voted_answer']; } $users_id = !empty($account['users_id']) ? $account['users_id'] : 0; $check_user_voted = 0; for ($run = 0; $run < $voted_loop; $run++) {
$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'); } echo cs_subtemplate(__FILE__, $data, 'fightus', 'new');
global $cs_db; if ($cs_db['hash'] == 'md5') { $data['join']['users_pwd'] = md5($data['join']['users_pwd']); } elseif ($cs_db['hash'] == 'sha1') { $data['join']['users_pwd'] = sha1($data['join']['users_pwd']); } } settype($data['join']['joinus_icq'], 'integer'); $data['join']['joinus_since'] = cs_time(); $joinus_cells = array_keys($data['join']); $joinus_save = array_values($data['join']); cs_sql_insert(__FILE__, 'joinus', $joinus_cells, $joinus_save); $joinus_id = cs_sql_insertid(__FILE__); cs_cache_delete('count_joinus'); require_once 'mods/notifymods/functions.php'; notifymods_mail('joinus', $account['users_id']); $tables = "joinus ju INNER JOIN {pre}_members mem ON ju.squads_id = mem.squads_id AND mem.members_admin = '1' "; $tables .= 'INNER JOIN {pre}_squads sq ON ju.squads_id = sq.squads_id'; $cells = 'ju.squads_id AS squads_id, mem.users_id AS users_id, sq.squads_name AS squads_name'; $select = cs_sql_select(__FILE__, $tables, $cells, "ju.joinus_id = '" . $joinus_id . "'", 0, 0, 0); $select_count = count($select); for ($run = 0; $run < $select_count; $run++) { $user = cs_sql_select(__FILE__, 'users', 'users_id', "users_id = '" . $select[$run]['users_id'] . "'"); $message['users_id'] = '1'; $message['users_id_to'] = $user['users_id']; $message['messages_time'] = cs_time(); $message['messages_subject'] = $cs_lang['new_joinus'] . $select[$run]['squads_name']; $message['messages_text'] = $cs_lang['new_joinus_text'] . $select[$run]['squads_name'] . $cs_lang['new_joinus_text2']; // $message['messages_text'] .= $cs_lang['since'] . ': ' . $cs_joinus['joinus_date']; // $message['messages_text'] .= $cs_lang['nick'] . ': ' . $cs_joinus['joinus_nick']; // $message['messages_text'] .= $cs_lang['vorname'] . ': ' . $cs_joinus['joinus_name'];