Skip to content
This repository has been archived by the owner on Nov 22, 2020. It is now read-only.

Commit

Permalink
initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
mihai-vlc committed May 30, 2013
0 parents commit f603dde
Show file tree
Hide file tree
Showing 35 changed files with 10,750 additions and 0 deletions.
Binary file added apple-touch-icon-114x114-precomposed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apple-touch-icon-144x144-precomposed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apple-touch-icon-57x57-precomposed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apple-touch-icon-72x72-precomposed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apple-touch-icon-precomposed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions contact.php
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';
Loading

0 comments on commit f603dde

Please sign in to comment.