This repository has been archived by the owner on Nov 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f603dde
Showing
35 changed files
with
10,750 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<?php | ||
include "inc/init.php"; | ||
|
||
|
||
|
||
$page->title = "Contact to ". $set->site_name; | ||
|
||
|
||
$page->navbar = $presets->GenerateNavbar(); | ||
|
||
$page->navbar[1][1]['class'] = 'active'; // we highlith the contact link | ||
|
||
|
||
if($_POST) { | ||
|
||
$email = $_POST['email']; | ||
$message = $_POST['message']; | ||
|
||
if(!preg_match('/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/', $email)) | ||
$page->error = "Email address is not valid."; | ||
else if(!isset($message[10])) | ||
$page->error = "Message was too short !"; | ||
else { | ||
$from = 'MIME-Version: 1.0' . "\r\n"; | ||
$from .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; | ||
$from .="From: ".$email; | ||
$sub = "Contact Admin $set->site_name !"; | ||
if(mail($email, $sub, $message,$from)) | ||
$page->success = "Your message was sent !"; | ||
|
||
} | ||
} | ||
|
||
|
||
include 'header.php'; | ||
|
||
echo " | ||
<div class=\"container\"><div class='span6'>"; | ||
|
||
|
||
if(isset($page->error)) | ||
echo "<div class=\"alert alert-error\">".$page->error."</div>"; | ||
else if(isset($page->success)) | ||
echo "<div class=\"alert alert-success\">".$page->success."</div>"; | ||
|
||
echo "<form class='form-horizontal well' action='#' method='post'> | ||
<fieldset> | ||
<legend>Contact Admin</legend> | ||
<div class='control-group'> | ||
<div class='control-label'> | ||
<label>Your Email</label> | ||
</div> | ||
<div class='controls'> | ||
<input type='text' name='email' class='input-large' value='".($user->islg() ? $user->filter->email : "")."'> | ||
</div> | ||
</div> | ||
<div class='control-group'> | ||
<div class='control-label'> | ||
<label>Message</label> | ||
</div> | ||
<div class='controls'> | ||
<textarea name='message' rows='5' class='input-large'></textarea> | ||
</div> | ||
</div> | ||
<div class='control-group'> | ||
<div class='controls'> | ||
<button type='submit' id='submit' class='btn btn-primary'>Send</button> | ||
</div> | ||
</div> | ||
</fieldset> | ||
</form> | ||
</div> | ||
</div><!-- /container -->"; | ||
|
||
include 'footer.php'; |
Oops, something went wrong.