This repository has been archived by the owner on Mar 27, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
disabled.php
157 lines (131 loc) · 5.49 KB
/
disabled.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?php
include_once('./templates/globals.php');
$pageTitle = 'MolyJam - Account Disabled';
$pageHeader = 'Oops, Access Denied';
$pageStyles = array();
$activeTab = '0';
$pageScripts = array();
$PageScriptsRaw = '';
include_once('./templates/header.php');
include_once(dirname(__FILE__) . '/classes/class.generic.php');
// 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 = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$comments = $_POST['comments'];
$verify = strtolower($_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-error">'._('You must enter your name.').'</div>';
}
else if(empty($email))
{
$error = '<div class="alert alert-error">'._('Please enter a valid email address.').'</div>';
}
else if(!$generic->isEmail($email))
{
$error = '<div class="alert alert-error">'._('You have enter an invalid e-mail address, try again.').'</div>';
}
if(empty($subject))
{
$error = '<div class="alert alert-error">'._('Please enter a subject.').'</div>';
}
else if(empty($comments))
{
$error = '<div class="alert alert-error">'._('Please enter your message.').'</div>';
}
else if(empty($verify))
{
$error = '<div class="alert alert-error">'._('Please enter the verification code.').'</div>';
}
else if(trim($verify) != 'blue')
{
$error = '<div class="alert alert-error">'._('The verification code you entered is incorrect.').'</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.')."\r\n\r\n";
$e_content = "\"$comments\"\r\n\r\n";
//$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) . "\r\n";
$msg = $e_body . $e_content . $e_reply;
mail($address, $e_subject, $msg, "From: $email\r\nReply-To: $email\r\nReturn-Path: $email\r\n");
// 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;
?>
<div class="row-fluid">
<div class="span12">
<h4><?php _e('Sorry, your username or user group has been disabled!'); ?></h4>
<p><?php _e('We have detected that your username or user group has been disabled; so you cannot view internal pages.'); ?></p>
<p><?php _e('Fill out this form if you feel this is in error'); ?></p>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<br/>
<fieldset>
<form method="post" action="disabled.php">
<div class="clearfix">
<label for="name"><?php _e('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"><?php _e('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"><?php _e('Subject'); ?></label>
<div class="input">
<select name="subject" id="subject">
<option selected="selected" value="User / Group Disabled"><?php _e('Disabled Message'); ?></option>
<option value="a Bug fix"><?php _e('Report a bug'); ?></option>
</select>
</div>
</div><!-- /clearfix -->
<div class="clearfix">
<label for="comments" accesskey="C"><?php _e('Your comments'); ?></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"><?php _e('What colour is the sky?'); ?></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="<?php _e('Submit'); ?>" />
</form>
</fieldset>
</div>
</div>
<?php } include_once('./templates/footer.php'); ?>