Файл: Space race/disabled.php
Строк: 153
<?php
include_once(dirname(__FILE__) . '/classes/generic.class.php');
include_once(cINC . 'header.php');
if(empty($_SESSION['starrace']['username'])) { header('Location: home.php'); exit(); }
// Attention ! Please read the following.
// It is important you do not edit pieces of code that aren't tagged as a configurable options identified by the following:
// Configuration option.
// Each option that is easily editable has a modified example given.
$error = '';
if(isset($_POST['contactus'])) {
$name = $generic->secure($_POST['name']);
$email = $generic->secure($_POST['email']);
$subject = $generic->secure($_POST['subject']);
$comments = $generic->secure($_POST['comments']);
$verify = strtolower($generic->secure((string) $_POST['verify']));
// Configuration option.
// You may change the error messages below.
// e.g. $error = 'Attention! This is a customised error message!';
if(empty($name)) {
$error = '<div class="alert alert-danger">'._('Вы должны указать имя.').'</div>';
} else if(empty($email)) {
$error = '<div class="alert alert-danger">'._('Укажите реальный адрес почты.').'</div>';
} else if(!$generic->isEmail($email)) {
$error = '<div class="alert alert-danger">'._('Вы указали неверный email. Попробуйте еще раз.').'</div>';
}
if(empty($subject)) {
$error = '<div class="alert alert-danger">'._('Укажите тему.').'</div>';
} else if(empty($comments)) {
$error = '<div class="alert alert-danger">'._('Вы не ввели сообщение.').'</div>';
} else if(empty($verify)) {
$error = '<div class="alert alert-danger">'._('Вы не ввели код подтверждения.').'</div>';
} else if(trim($verify) != 'голубой') {
$error = '<div class="alert alert-danger">'._('Неверный код подтверждения. Вы что, не знаете что цвет неба <b>голубой</b>?').'</div>';
}
if(empty($error)) { if(get_magic_quotes_gpc()) { $comments = stripslashes($comments); }
// Configuration option.
// Enter the email address that you want to emails to be sent to.
// Example $address = "joe.doe@yourdomain.com";
if(!isset($address)) $address = "example@codecanyon.net";
// Configuration option.
// i.e. The standard subject will appear as, "You've been contacted by John Doe."
// Example, $e_subject = '$name . ' has contacted you via Your Website.';
$e_subject = ''._('You've been contacted by').' ' . $name . '.';
// Configuration option.
// You can change this if you feel that you need to.
// Developers, you may wish to add more fields to the form, in which case you must be sure to add them here.
$e_body = _('You have been contacted by $name with regards to $subject, their additional message is as follows.')."rnrn";
$e_content = ""$comments"rnrn";
//$e_reply = "You can contact $name via email, $email or via phone $phone";
$e_reply = sprintf(_('You can contact %s via email, %s'), $name, $email) . "rn";
$msg = $e_body . $e_content . $e_reply;
mail($address, $e_subject, $msg, "From: $emailrnReply-To: $emailrnReturn-Path: $emailrn");
// Email has sent successfully, echo a success page.
echo "<div class='alert alert-success'>"._('Email Sent Successfully')."</div>";
echo "<p>"._('Thank you')." <strong>$name</strong>," ._('your message has been submitted to us.')."</p>";
}
}
if(!isset($_POST['contactus']) || !empty($error)) // Do not edit.
{
echo $error;
?>
<h1>Упс. Доступ закрыт.</h1>
<h4>Извините, но Вы или Ваша группа заблокированы.</h4>
<p>Вы не можете просмотривать страницы и использовать личный кабинет.</p>
<p>Если Вы считаете, что заблокированы по ошибке - свяжитесь с администратором</p>
<br/>
<fieldset>
<form method="post" action="disabled.php">
<div class="clearfix">
<label for="name">Имя</label>
<div class="input">
<input id="name" name="name" size="30" type="text" value="<?php if(isset($name)) echo $name;?>"/>
</div>
</div><!-- /clearfix -->
<div class="clearfix">
<label for="email">Email</label>
<div class="input">
<input id="email" name="email" size="30" type="text" value="<?php if(isset($email)) echo $email;?>"/>
</div>
</div><!-- /clearfix -->
<div class="clearfix">
<label for="subject">Тема</label>
<div class="input">
<select name="subject" id="subject">
<option selected="selected" value="User / Group Disabled">Меня заблокировали</option>
<option value="a Bug fix">Сообщение об ошибке</option>
</select>
</div>
</div><!-- /clearfix -->
<div class="clearfix">
<label for="comments" accesskey="C">Ваш комментарий</label>
<div class="input">
<textarea name="comments" cols="20" rows="3" class="xxlarge" /><?php if(isset($comments)) echo $comments; ?></textarea>
</div>
</div><!-- /clearfix -->
<div class="clearfix">
<label for="verify">Какой цвет у неба?</label>
<div class="input">
<input id="verify" name="verify" size="4" type="text" value="<?php if(isset($verify)) echo $verify;?>"/>
</div>
</div><!-- /clearfix -->
<input name="contactus" type="submit" class="btn btn-primary" id="contactus" value="Отправить" />
</form>
</fieldset>
<?php } include_once(cINC . 'footer.php'); ?>