$error++; $errormsg .= $cs_lang['nick_exists'] . cs_html_br(1); } $where = "users_email = '" . cs_sql_escape($cs_user['users_email']) . "' AND users_id != "; $search_email = cs_sql_count(__FILE__, 'users', $where . $account['users_id']); if (!empty($search_email)) { $error++; $errormsg .= $cs_lang['email_exists'] . cs_html_br(1); } $pattern = "=^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@([0-9a-z](-?[0-9a-z])*\\.)+[a-z]{2}([zmuvtg]|fo|me)?\$=i"; if (!preg_match($pattern, $cs_user['users_email'])) { $error++; $errormsg .= $cs_lang['email_false'] . cs_html_br(1); } include_once 'mods/contact/trashmail.php'; if (cs_trashmail($cs_user['users_email'])) { $error++; $errormsg .= $cs_lang['email_false'] . cs_html_br(1); } if (!empty($cs_user['users_sex'])) { $cs_user['users_sex'] = $cs_user['users_sex'] == 'male' ? 'male' : 'female'; } $country = $cs_user['users_country']; $cs_user['users_country'] = isset($cs_country[$country]) ? $cs_user['users_country'] : 'fam'; if ((int) $_POST['age_year'] . $_POST['age_month'] . $_POST['age_day'] > (int) cs_datereal('Ymd')) { $error++; $errormsg .= $cs_lang['age_false'] . cs_html_br(1); } } else { $cells = 'users_nick, users_name, users_surname, users_sex, users_age, users_height, users_country, users_postalcode, users_place, users_adress, users_icq, users_jabber, users_skype, users_email, users_url, users_phone, users_mobile, users_info, users_hidden'; $cs_user = cs_sql_select(__FILE__, 'users', $cells, "users_id = '" . $account['users_id'] . "'");
if ($pwdchars < 4) { $error++; $errormsg .= $cs_lang['short_pwd'] . cs_html_br(1); } $search_email = cs_sql_count(__FILE__, 'users', "users_email = '" . cs_sql_escape($register['email']) . "'"); if (!empty($search_email)) { $error++; $errormsg .= $cs_lang['email_exists'] . cs_html_br(1); } $pattern = "=^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@([0-9a-z](-?[0-9a-z])*\\.)+[a-z]{2}([zmuvtg]|fo|me)?\$=i"; if (!preg_match($pattern, $register['email'])) { $error++; $errormsg .= $cs_lang['email_false'] . cs_html_br(1); } include_once 'mods/contact/trashmail.php'; if (cs_trashmail($register['email'])) { $error++; $errormsg .= $cs_lang['email_false'] . cs_html_br(1); } $flood = cs_sql_select(__FILE__, 'users', 'users_register', 0, 'users_register DESC'); $maxtime = $flood['users_register'] + $cs_main['def_flood']; if ($maxtime > cs_time()) { $error++; $diff = $maxtime - cs_time(); $errormsg .= sprintf($cs_lang['flood_on'], $diff) . cs_html_br(1); } if (empty($op_users['def_register']) or $op_users['def_register'] == '2') { if (!cs_captchacheck($_POST['captcha'])) { $error++; $errormsg .= $cs_lang['captcha_false'] . cs_html_br(1); }
} if (empty($cs_fightus['fightus_clan'])) { $error .= $cs_lang['no_clan'] . cs_html_br(1); } if (empty($cs_fightus['fightus_short'])) { $error .= $cs_lang['no_short'] . cs_html_br(1); } if (empty($cs_fightus['fightus_date'])) { $error .= $cs_lang['no_date'] . cs_html_br(1); } $pattern = "=^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@([0-9a-z](-?[0-9a-z])*\\.)+[a-z]{2}([zmuvtg]|fo|me)?\$=i"; if (!preg_match($pattern, $cs_fightus['fightus_email'])) { $error .= $cs_lang['email_false'] . cs_html_br(1); } include_once 'mods/contact/trashmail.php'; if (cs_trashmail($cs_fightus['fightus_email'])) { $error .= $cs_lang['email_false'] . cs_html_br(1); } $flood = cs_sql_select(__FILE__, 'fightus', 'fightus_since', 0, 'fightus_since DESC'); $maxtime = $flood['fightus_since'] + $cs_main['def_flood']; if ($maxtime > cs_time()) { $error++; $diff = $maxtime - cs_time(); $error .= sprintf($cs_lang['flood_on'], $diff); } if (empty($account['users_id'])) { if (!cs_captchacheck($_POST['captcha'])) { $error .= $cs_lang['captcha_false'] . cs_html_br(1); } } } else {
$errormsg .= $cs_lang['error_name'] . ' ' . cs_html_br(1); } if (empty($mail['why'])) { $error++; $errormsg .= $cs_lang['error_subject'] . ' ' . cs_html_br(1); } if (empty($mail['text'])) { $error++; $errormsg .= $cs_lang['error_message'] . ' ' . cs_html_br(1); } if (!preg_match("/^[0-9a-zA-Z._\\-]+@[0-9a-zA-Z._\\-]{2,}\\.[a-zA-Z]{2,4}\$/", $mail['email'])) { $error++; $errormsg .= $cs_lang['error_email'] . cs_html_br(1); } include_once 'mods/contact/trashmail.php'; if (cs_trashmail($mail['email'])) { $error++; $errormsg .= $cs_lang['error_email'] . cs_html_br(1); } if (!empty($mail['icq']) and !preg_match('#^[\\d-]*$#', $mail['icq'])) { $error++; $errormsg .= $cs_lang['error_icq'] . cs_html_br(1); } if (empty($mail['categories_id'])) { $error++; $errormsg .= $cs_lang['error_category'] . cs_html_br(1); } } if (!isset($_POST['submit'])) { $data['lang']['head'] = $cs_lang['body_mail']; } elseif (!empty($error)) {
} if (empty($data['join']['joinus_date'])) { $error++; $errormsg .= $cs_lang['no_date'] . cs_html_br(1); } if (empty($data2['join']['joinus_rules'])) { $error++; $errormsg .= $cs_lang['no_rules'] . cs_html_br(1); } $pattern = "=^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@([0-9a-z](-?[0-9a-z])*\\.)+[a-z]{2}([zmuvtg]|fo|me)?\$=i"; if (!preg_match($pattern, $data['join']['joinus_email'])) { $error++; $errormsg .= $cs_lang['email_false'] . cs_html_br(1); } include_once 'mods/contact/trashmail.php'; if (cs_trashmail($data['join']['joinus_email'])) { $error++; $errormsg .= $cs_lang['email_false'] . cs_html_br(1); } $flood = cs_sql_select(__FILE__, 'joinus', 'joinus_since', 0, 'joinus_since DESC'); $maxtime = $flood['joinus_since'] + $cs_main['def_flood']; if ($maxtime > cs_time()) { $error++; $diff = $maxtime - cs_time(); $errormsg .= sprintf($cs_lang['flood_on'], $diff); } if (empty($account['users_id'])) { if (!cs_captchacheck($_POST['captcha'])) { $error++; $errormsg .= $cs_lang['captcha_false'] . cs_html_br(1); }