From 721a1d3654b4ca942ee5d99f8053ac4c9dcd9c7a Mon Sep 17 00:00:00 2001 From: gigabytedevelopers Date: Wed, 8 Mar 2017 13:38:23 +0100 Subject: [PATCH 1/2] reformat code (PHP) --- activate.php | 97 +- admin.php | 61 +- aside.php | 10 +- bat/MailHandler.php | 85 +- bat/libmail.php | 705 +--------- bat/recaptchalib.php | 278 +--- changepassword.php | 123 +- classes/MailHandler.php | 85 +- classes/TMForm.js | 345 +---- classes/checkdata.php | 51 +- classes/libmail.php | 705 +--------- classes/recaptchalib.php | 278 +--- contact.php | 179 +-- contactcss/animate.css | 18 +- contactcss/bootstrap.css | 12 +- contactcss/font-awesome.css | 9 +- contactcss/owl.carousel.css | 88 +- contactcss/stuck.css | 36 +- contactjs/PIE.php | 20 +- contacttest.html | 9 +- core/database/connect.php | 6 +- core/functions/general.php | 43 +- core/functions/users.php | 150 +-- core/init.php | 29 +- css/animate.min.css | 33 +- css/bootstrap.min.css | 8 +- css/font-awesome.min.css | 9 +- css/presets/preset1.css | 98 +- css/presets/preset2.css | 55 +- css/presets/preset3.css | 55 +- css/presets/preset4.css | 55 +- css/presets/preset5.css | 55 +- css/presets/preset6.css | 55 +- email.php | 66 +- includes/aside.php | 10 +- includes/footer.php | 4 +- includes/head.php | 14 +- includes/header.php | 17 +- includes/menu.php | 9 +- includes/overall/overallheader.php | 8 +- includes/overall/overallheaders.php | 7 +- includes/widgets/loggedin.php | 1102 +-------------- includes/widgets/login.php | 28 +- index.html | 40 +- index.php | 100 +- init.php | 28 +- js/contactcss/animate.css | 18 +- js/contactcss/bootstrap.css | 12 +- js/contactcss/font-awesome.css | 9 +- js/contactcss/owl.carousel.css | 88 +- js/contactcss/stuck.css | 36 +- js/contactjs/PIE.php | 20 +- loggedin.php | 90 +- loggedinonmobile.php | 72 +- login.php | 166 +-- loginform.php | 194 +-- logout.php | 8 +- mail.php | 102 +- mobile.php | 76 +- passwordrecover.php | 100 +- picture.php | 92 +- portfolio-single.html | 24 +- profile.php | 113 +- protected.php | 60 +- recover.php | 99 +- secure_email_code.php | 37 +- sendemail.php | 37 +- sendemailhosted.php | 82 +- settings.php | 374 +---- user/core/database/connect.php | 5 +- user/core/functions/users.php | 34 +- user/includes/head.php | 6 +- user/includes/header.php | 2 +- user/includes/widgets/loggedin.php | 1946 +++++++++++++-------------- user/includes/widgets/login.php | 2 +- user/profile.php | 16 +- user/protected.php | 6 +- 77 files changed, 1301 insertions(+), 7903 deletions(-) diff --git a/activate.php b/activate.php index 8248f55..55d2606 100644 --- a/activate.php +++ b/activate.php @@ -1,96 +1 @@ - - - - - - - - - - - - Gigabyte Developers Incorporated | Account Activation - - - - - - - - - - - -
- - -
-

Gigabyte Developers Incorporated Account Activation

- -
-
-
- - - -
-
-
- -

Thanks! We've activated your account...

-

You're free to login!

-

Don't forget to click Profile Picture in your Profile Menu so as to update/change your profile picture

- -

Oops...

- -
-
-
-
- - \ No newline at end of file + Gigabyte Developers Incorporated | Account Activation

Gigabyte Developers Incorporated Account Activation


Thanks! We've activated your account...

You're free to login!

Don't forget to click Profile Picture in your Profile Menu so as to update/change your profile picture

Oops...

\ No newline at end of file diff --git a/admin.php b/admin.php index e7ab006..2dca203 100644 --- a/admin.php +++ b/admin.php @@ -1,60 +1 @@ - - - - - - - - - - - - Gigabyte Developers Incorporated | Admin - - - - - - - - - - - -
- - -
-

Gigabyte Developers Incorporated Admin Section

- -
-
-
- - - -
-
- -

Admin

-

Admin Panel

- - + Gigabyte Developers Incorporated | Admin

Gigabyte Developers Incorporated Admin Section

Admin

Admin Panel

\ No newline at end of file diff --git a/aside.php b/aside.php index 4c39602..8aa5398 100644 --- a/aside.php +++ b/aside.php @@ -1,9 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/bat/MailHandler.php b/bat/MailHandler.php index d761321..69ef004 100644 --- a/bat/MailHandler.php +++ b/bat/MailHandler.php @@ -1,84 +1 @@ -is_valid){ - die ('wrong captcha'); - } - } - - if(isset($_POST['name']) and $_POST['name'] != ''){$message_body .= '

Visitor: ' . $_POST['name'] . '

' . "\n" . '
' . "\n"; $subject.=$_POST['name'];} - if(isset($_POST['email']) and $_POST['email'] != ''){$message_body .= '

Email Address: ' . $_POST['email'] . '

' . "\n" . '
' . "\n"; $user_email=$_POST['email'];} - if(isset($_POST['state']) and $_POST['state'] != ''){$message_body .= '

State: ' . $_POST['state'] . '

' . "\n" . '
' . "\n";} - if(isset($_POST['phone']) and $_POST['phone'] != ''){$message_body .= '

Phone Number: ' . $_POST['phone'] . '

' . "\n" . '
' . "\n";} - if(isset($_POST['fax']) and $_POST['fax'] != ''){$message_body .= '

Fax Number: ' . $_POST['fax'] . '

' . "\n" . '
' . "\n";} - if(isset($_POST['message']) and $_POST['message'] != ''){$message_body .= '

Message: ' . $_POST['message'] . '

' . "\n";} - if(isset($_POST['stripHTML']) and $_POST['stripHTML']=='true'){$message_body = strip_tags($message_body);$message_type='text';} - -try{ - include "libmail.php"; - $m= new Mail("utf-8"); - $m->From($user_email); - $m->To($owner_email); - $m->Subject($subject); - $m->Body($message_body,$message_type); - //$m->log_on(true); - - if(isset($_FILES['attachment'])){ - if($_FILES['attachment']['size']>$max_file_size){ - $error_text=$error_text_filesize . ' ' . $max_file_size . 'bytes'; - die($error_text); - }else{ - if(preg_match($file_types,$_FILES['attachment']['name'])){ - $m->Attach($_FILES['attachment']['tmp_name'],$_FILES['attachment']['name'],'','attachment'); - }else{ - $error_text=$error_text_filetype; - die($error_text); - } - } - } - if(!$use_smtp){ - $m->smtp_on( $host, $username, $password, $port); - } - - if($m->Send()){ - die('success'); - } - -}catch(Exception $mail){ - die($mail); -} -?> \ No newline at end of file +is_valid){ die ('wrong captcha'); } } if(isset($_POST['name']) and $_POST['name'] != ''){$message_body .= '

Visitor: ' . $_POST['name'] . '

' . "\n" . '
' . "\n"; $subject.=$_POST['name'];} if(isset($_POST['email']) and $_POST['email'] != ''){$message_body .= '

Email Address: ' . $_POST['email'] . '

' . "\n" . '
' . "\n"; $user_email=$_POST['email'];} if(isset($_POST['state']) and $_POST['state'] != ''){$message_body .= '

State: ' . $_POST['state'] . '

' . "\n" . '
' . "\n";} if(isset($_POST['phone']) and $_POST['phone'] != ''){$message_body .= '

Phone Number: ' . $_POST['phone'] . '

' . "\n" . '
' . "\n";} if(isset($_POST['fax']) and $_POST['fax'] != ''){$message_body .= '

Fax Number: ' . $_POST['fax'] . '

' . "\n" . '
' . "\n";} if(isset($_POST['message']) and $_POST['message'] != ''){$message_body .= '

Message: ' . $_POST['message'] . '

' . "\n";} if(isset($_POST['stripHTML']) and $_POST['stripHTML']=='true'){$message_body = strip_tags($message_body);$message_type='text';} try{ include "libmail.php"; $m= new Mail("utf-8"); $m->From($user_email); $m->To($owner_email); $m->Subject($subject); $m->Body($message_body,$message_type); //$m->log_on(true); if(isset($_FILES['attachment'])){ if($_FILES['attachment']['size']>$max_file_size){ $error_text=$error_text_filesize . ' ' . $max_file_size . 'bytes'; die($error_text); }else{ if(preg_match($file_types,$_FILES['attachment']['name'])){ $m->Attach($_FILES['attachment']['tmp_name'],$_FILES['attachment']['name'],'','attachment'); }else{ $error_text=$error_text_filetype; die($error_text); } } } if(!$use_smtp){ $m->smtp_on( $host, $username, $password, $port); } if($m->Send()){ die('success'); } }catch(Exception $mail){ die($mail); } ?> \ No newline at end of file diff --git a/bat/libmail.php b/bat/libmail.php index 2187024..916973b 100644 --- a/bat/libmail.php +++ b/bat/libmail.php @@ -1,704 +1 @@ - true, "message" => 'ок'); - public function __construct($charset = "", $ctencoding = '') - { - $this->boundary = md5(uniqid("myboundary")); - $this->smtp['on'] = false; - if (strlen($ctencoding) and $ctencoding == '8bit') - { - $this->ctencoding = '8bit'; - } - if (strlen($charset)) - { - $this->charset = strtolower($charset); - if ($this->charset == "us-ascii") - { - $this->ctencoding = "7bit"; - } - } - } - public function Body($text, $text_html = "", $alternative_text = '', $resource = 'webi') - { - if (!strlen($resource)) - $resource = 'webi'; - if ($text_html == "html") - $text_html = "text/html"; - else - $text_html = "text/plain"; - if ($this->ctencoding == 'base64') - { - if (strlen($alternative_text)) - $alternative_text = chunk_split(base64_encode($alternative_text)); - if (strlen($text)) - $text = chunk_split(base64_encode($text)); - } - if (!strlen($alternative_text)) - { - $body = "Content-Type: ".$text_html."; charset=".$this->charset."\r\n"; - $body.="Content-Transfer-Encoding: ".$this->ctencoding."\r\n\r\n"; - $body.=$text; - } - elseif (strlen($alternative_text) and $text_html == 'text/html') - { - $body = "Content-Type: multipart/alternative; boundary=ALT-".$this->boundary."\r\n\r\n"; - $body.="--ALT-".$this->boundary."\r\n"; - $body.="Content-Type: text/plain; charset=".$this->charset."\r\n"; - $body.="Content-Transfer-Encoding: ".$this->ctencoding."\r\n\r\n"; - $body.=$alternative_text."\r\n"; - $body.="--ALT-".$this->boundary."\r\n"; - $body.="Content-Type: text/html; charset=".$this->charset."\r\n"; - $body.="Content-Transfer-Encoding: ".$this->ctencoding."\r\n\r\n"; - $body.=$text."\r\n"; - $body.="--ALT-".$this->boundary."--"; - } - $this->SubBody[$resource]['body'][0] = $body; - } - protected function mime_content_type($file) - { - $ext = strtolower(substr(strrchr(basename($file), '.'), 1)); - switch ($ext) - { - case 'jpg': return 'image/jpeg'; - case 'jpeg': return 'image/jpeg'; - case 'gif': return 'image/gif'; - case 'png': return 'image/png'; - case 'ico': return 'image/x-icon'; - case 'txt': return 'text/plain'; - - default: return 'application/octet-stream'; - } - } - - public function Attach($filename, $new_name_filename = "", $filetype = "", $disposition = "", $resource = 'webi') - { - if (!strlen($resource)) - $resource = 'webi'; - if (!file_exists($filename)) - { - return FALSE; - } - if (strlen($new_name_filename)) - $basename = basename($new_name_filename); - else - $basename = basename($filename); - - $charset_name = "=?".$this->charset."?B?".base64_encode($basename)."?="; - if (!strlen($filetype)) - $filetype = $this->mime_content_type($basename); - $body = "Content-Type: ".$filetype."; name=\"$charset_name\"\r\n"; - $body.="Content-Transfer-Encoding: base64\r\n"; - if ($disposition == 'attachment') - { - $body.="Content-Disposition: attachment; filename=\"$charset_name\"\r\n"; - } - $body.="Content-ID: <".$basename.">\r\n"; - $body.="\r\n"; - $body.=chunk_split(base64_encode(file_get_contents($filename))); - if ($disposition == 'attachment') - $this->SubBody[$resource]['mixed'][] = $body; - else - { - $this->SubBody[$resource]['body'][$this->count_body] = $body; - $this->count_body++; - } - } - public function BuildMail($resource = 'webi') - { - if (!strlen($resource)) - $resource = 'webi'; - $this->ready_headers[$resource] = ''; - if (isset($this->SubBody[$resource]['body'])) - $resource_body = $resource; - else - $resource_body = 'webi'; - if (!is_array($this->sendto[$resource]) OR !count($this->sendto[$resource])) - { - $this->status_mail['status'] = false; - $this->status_mail['message'] = "Error : no recipient selected for ".$resource; - // return false; - } - if (!isset($this->body[$resource_body])) - { - if (count($this->SubBody[$resource_body]['body']) > 1) - { - $body = implode("\r\n--REL-".$this->boundary."\r\n", $this->SubBody[$resource_body]['body']); - $body = "Content-Type: multipart/related; boundary=REL-".$this->boundary."\r\n\r\n" - .'--REL-'.$this->boundary."\r\n".$body.'--REL-'.$this->boundary."--"; - } - else - { - $body = $this->SubBody[$resource_body]['body'][0]; - } - if (isset($this->SubBody[$resource_body]['mixed']) AND count($this->SubBody[$resource_body]['mixed'])) - { - $bodymix = implode('--MIX-'.$this->boundary."\r\n", $this->SubBody[$resource_body]['mixed']); - $body = $body."\r\n--MIX-".$this->boundary."\r\n".$bodymix; - $body = "Content-Type: multipart/mixed; boundary=MIX-".$this->boundary."\r\n\r\n" - .'--MIX-'.$this->boundary."\r\n".$body.'--MIX-'.$this->boundary."--"; - } - unset($this->SubBody[$resource_body]); - $temp_mass = explode("\r\n\r\n", $body); - $this->body_header[$resource_body] = $temp_mass[0]; - unset($temp_mass[0]); - $this->body[$resource_body] = implode("\r\n\r\n", $temp_mass); - unset($temp_mass); - unset($body); - } - $temp_mass = array(); - foreach ($this->sendto[$resource] as $key => $value) - { - - if (strlen($this->names_email[$resource]['To'][$value])) - $temp_mass[] = "=?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($this->names_email[$resource]['To'][$value], "\r\n", " "))))."?= <".$value.">"; - else - $temp_mass[] = $value; - } - $this->headers[$resource]['To'] = implode(", ", $temp_mass); - if (isset($this->acc[$resource]) and count($this->acc[$resource]) > 0) - $this->headers[$resource]['CC'] = implode(", ", $this->acc[$resource]); - if (isset($this->abcc[$resource]) and count($this->abcc[$resource]) > 0) - $this->headers[$resource]['BCC'] = implode(", ", $this->abcc[$resource]); - if ($this->receipt) - { - if (isset($this->headers["Reply-To"])) - $this->headers["Disposition-Notification-To"] = $this->headers["Reply-To"]; - else - $this->headers["Disposition-Notification-To"] = $this->headers['From']; - } - if ($this->charset != "") - { - $this->headers["Mime-Version"] = "1.0"; - } - $this->headers["X-Mailer"] = "Php_libMail_v_2.0(webi.ru)"; - if (!isset($this->headers[$resource]['Subject']) and isset($this->headers['webi']['Subject'])) - $this->headers[$resource]['Subject'] = $this->headers['webi']['Subject']; - if ($this->smtp['on']) - { - $user_domen = explode('@', $this->headers['From']); - $this->ready_headers[$resource] .= "Date: ".date("r")."\r\n"; - $this->ready_headers[$resource] .= "Message-ID: <".rand().".".$resource.date("YmjHis")."@".$user_domen[1].">\r\n"; - foreach ($this->headers[$resource] as $key => $value) - { - $new_mass_head[$key] = $value; - } - foreach ($this->headers as $key => $value) - { - if (!is_array($value)) - $new_mass_head[$key] = $value; - } - reset($new_mass_head); - while (list( $hdr, $value ) = each($new_mass_head)) - { - if ($hdr == "From" and strlen($this->names_email['from'])) - $this->ready_headers[$resource] .= $hdr.": =?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($this->names_email['from'], "\r\n", " "))))."?= <".$value.">\r\n"; - elseif ($hdr == "Reply-To" and strlen($this->names_email['Reply-To'])) - $this->ready_headers[$resource] .= $hdr.": =?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($this->names_email['Reply-To'], "\r\n", " "))))."?= <".$value.">\r\n"; - elseif ($hdr != "BCC") - $this->ready_headers[$resource] .= $hdr.": ".$value."\r\n"; - } - } - else - { - foreach ($this->headers[$resource] as $key => $value) - { - $new_mass_head[$key] = $value; - } - foreach ($this->headers as $key => $value) - { - if (!is_array($value)) - $new_mass_head[$key] = $value; - } - reset($new_mass_head); - while (list( $hdr, $value ) = each($new_mass_head)) - { - if ($hdr == "From" and strlen($this->names_email['from'])) - $this->ready_headers[$resource] .= $hdr.": =?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($this->names_email['from'], "\r\n", " "))))."?= <".$value.">\r\n"; - elseif ($hdr == "Reply-To" and strlen($this->names_email['Reply-To'])) - $this->ready_headers[$resource] .= $hdr.": =?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($this->names_email['Reply-To'], "\r\n", " "))))."?= <".$value.">\r\n"; - elseif ($hdr != "Subject" and $hdr != "To") - $this->ready_headers[$resource] .= "$hdr: $value\r\n"; - } - } - $this->ready_headers[$resource].=$this->body_header[$resource_body]."\r\n"; - } - public function autoCheck($bool) - { - if ($bool) - $this->checkAddress = true; - else - $this->checkAddress = false; - } - public function log_on($bool) - { - if ($bool) - $this->log_on = true; - else - $this->log_on = false; - } - public function Subject($subject, $resource = 'webi') - { - if (!strlen($resource)) - $resource = 'webi'; - $this->headers[$resource]['Subject'] = "=?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($subject, "\r\n", " "))))."?="; - } - public function From($from) - { - if (!is_string($from)) - { - $this->status_mail['status'] = false; - $this->status_mail['message'] = "Error, From should be inline"; - return FALSE; - } - $temp_mass = explode(';', $from); - if (count($temp_mass) == 2) - { - $this->names_email['from'] = $temp_mass[0]; - $this->headers['From'] = $temp_mass[1]; - } - else - { - $this->names_email['from'] = ''; - $this->headers['From'] = $from; - } - } - public function ReplyTo($address) - { - if (!is_string($address)) - return false; - $temp_mass = explode(';', $address); - if (count($temp_mass) == 2) - { - $this->names_email['Reply-To'] = $temp_mass[0]; - $this->headers['Reply-To'] = $temp_mass[1]; - } - else - { - $this->names_email['Reply-To'] = ''; - $this->headers['Reply-To'] = $address; - } - } - public function Receipt() - { - $this->receipt = 1; - } - public function To($to, $resource = 'webi') - { - if (!strlen($resource)) - $resource = 'webi'; - if (is_array($to)) - { - foreach ($to as $key => $value) - { - $temp_mass = explode(';', $value); - if (count($temp_mass) == 2) - { - $this->smtpsendto[$resource][$temp_mass[1]] = $temp_mass[1]; - $this->names_email[$resource]['To'][$temp_mass[1]] = $temp_mass[0]; - $this->sendto[$resource][] = $temp_mass[1]; - } - else - { - $this->smtpsendto[$resource][$value] = $value; - $this->names_email[$resource]['To'][$value] = ''; - $this->sendto[$resource][] = $value; - } - } - } - else - { - $temp_mass = explode(';', $to); - if (count($temp_mass) == 2) - { - $this->sendto[$resource][] = $temp_mass[1]; - $this->smtpsendto[$resource][$temp_mass[1]] = $temp_mass[1]; - $this->names_email[$resource]['To'][$temp_mass[1]] = $temp_mass[0]; - } - else - { - $this->sendto[$resource][] = $to; - $this->smtpsendto[$resource][$to] = $to; - - $this->names_email[$resource]['To'][$to] = ''; - } - } - if ($this->checkAddress == true) - $this->CheckAdresses($this->sendto[$resource]); - } - private function CheckAdresses($aad) - { - foreach ($aad as $key => $value) - { - if (!$this->ValidEmail($value)) - { - $this->status_mail['status'] = false; - $this->status_mail['message'] = "Error : wrong email ".$value; - return FALSE; - } - } - } - public function ValidEmail($address) - { - if (function_exists('filter_list')) - { - $valid_email = filter_var($address, FILTER_VALIDATE_EMAIL); - if ($valid_email !== false) - return true; - else - return false; - } - else - { - if (ereg(".*<(.+)>", $address, $regs)) - { - $address = $regs[1]; - } - if (ereg("^[^@ ]+@([a-zA-Z0-9\-]+\.)+([a-zA-Z0-9\-]{2}|net|com|gov|mil|org|edu|int)\$", $address)) - return true; - else - return false; - } - } - public function Cc($cc, $resource = 'webi') - { - if (!strlen($resource)) - $resource = 'webi'; - - if (is_array($cc)) - { - foreach ($cc as $key => $value) - { - $this->smtpsendto[$resource][$value] = $value; - $this->acc[$resource][$value] = $value; - } - } - else - { - $this->acc[$resource][$cc] = $cc; - $this->smtpsendto[$resource][$cc] = $cc; - } - if ($this->checkAddress == true) - $this->CheckAdresses($this->acc[$resource]); - } - public function Bcc($bcc, $resource = 'webi') - { - if (!strlen($resource)) - $resource = 'webi'; - if (is_array($bcc)) - { - foreach ($bcc as $key => $value) - { - $this->smtpsendto[$resource][$value] = $value; - $this->abcc[$resource][$value] = $value; - } - } - else - { - $this->abcc[$resource][$bcc] = $bcc; - $this->smtpsendto[$resource][$bcc] = $bcc; - } - if ($this->checkAddress == true) - $this->CheckAdresses($this->abcc[$resource]); - } - public function Organization($org) - { - if (trim($org != "")) - $this->headers['Organization'] = $org; - } - public function Priority($priority) - { - $priorities = array('1 (Highest)', '2 (High)', '3 (Normal)', '4 (Low)', '5 (Lowest)'); - if (!intval($priority)) - return false; - - if (!isset($priorities[$priority - 1])) - return false; - - $this->headers["X-Priority"] = $priorities[$priority - 1]; - - return true; - } - public function smtp_on($smtp_serv, $login, $pass, $port = 25, $timeout = 5) - { - $this->smtp['on'] = true; // smtp transfer on - $this->smtp['serv'] = $smtp_serv; - $this->smtp['login'] = $login; - $this->smtp['pass'] = $pass; - $this->smtp['port'] = $port; - $this->smtp['timeout'] = $timeout; - } - private function get_data($smtp_conn) - { - $data = ""; - while ($str = fgets($smtp_conn, 515)) - { - $data .= $str; - if (substr($str, 3, 1) == " ") - { - break; - } - } - return $data; - } - private function add_log($text) - { - if ($this->log_on) - $this->smtp_log.=$text; - } - public function Send() - { - if (!$this->status_mail['status']) - { - return FALSE; - } - if (!$this->smtp['on']) - { - foreach ($this->sendto as $key => $value) - { - $strTo = implode(", ", $this->sendto[$key]); - $this->BuildMail($key); - if (!$this->status_mail['status']) - { - return FALSE; - } - if (isset($this->body[$key])) - $body_resource = $key; - else - $body_resource = 'webi'; - $res = @mail($strTo, $this->headers[$key]['Subject'], $this->body[$body_resource], $this->ready_headers[$key]); - if (!$res) - { - $this->status_mail['status'] = false; - $this->status_mail['message'] = "Error : mail() function returns error"; - } - elseif ($this->status_mail['status']) - { - $this->add_log('TO: '.$strTo."\n"); - $this->add_log("Subject: ".$this->headers[$key]['Subject']."\n"); - $this->add_log($this->ready_headers[$key]."\n\n"); - $this->add_log($this->body[$body_resource]."\n\n\n"); - $this->status_mail['status'] = true; - $this->status_mail['message'] = "Message successfully sent by mail()"; - } - if ($key != 'webi') - { - unset($this->headers[$key]); - unset($this->ready_headers[$key]); - } - if ($body_resource != 'webi') - { - unset($this->body[$body_resource]); - } - } - if ($this->status_mail['status']) - { - return true; - } - else - { - return FALSE; - } - } - else - { - if (!$this->smtp['serv'] OR !$this->smtp['login'] OR !$this->smtp['pass'] OR !$this->smtp['port']) - { - $this->status_mail['status'] = false; - $this->status_mail['message'] = "Error : missing required SMTP values "; - return false; - } - $user_domen = explode('@', $this->headers['From']); - $smtp_conn = fsockopen($this->smtp['serv'], $this->smtp['port'], $errno, $errstr, $this->smtp['timeout']); - if (!$smtp_conn) - { - $this->add_log("can't connect to server\n\n"); - fclose($smtp_conn); - $this->status_mail['status'] = false; - $this->status_mail['message'] = "Error: can't connect to server"; - return false; - } - $data = $this->get_data($smtp_conn)."\n"; - $this->add_log($data); - fputs($smtp_conn, "EHLO ".$user_domen[0]."\r\n"); - $this->add_log("I: EHLO ".$user_domen[0]."\n"); - $data = $this->get_data($smtp_conn)."\n"; - $this->add_log($data); - $code = substr($data, 0, 3); - if ($code != 250) - { - $this->add_log("Error greeting EHLO \n"); - fclose($smtp_conn); - $this->status_mail['status'] = false; - $this->status_mail['message'] = "Error: greeting EHLO"; - return false; - } - fputs($smtp_conn, "AUTH LOGIN\r\n"); - $this->add_log( "I: AUTH LOGIN\n"); - $data = $this->get_data($smtp_conn)."\n"; - $this->add_log($data); - $code = substr($data, 0, 3); - if ($code != 334) - { - $this->add_log("server denies authorization \n"); - fclose($smtp_conn); - $this->status_mail['status'] = false; - $this->status_mail['message'] = "server denies authorization"; - return false; - } - fputs($smtp_conn, base64_encode($this->smtp['login'])."\r\n"); - $this->add_log( "I: ".base64_encode($this->smtp['login'])."\n"); - $data = $this->get_data($smtp_conn)."\n"; - $this->add_log($data); - $code = substr($data, 0, 3); - if ($code != 334) - { - $this->add_log( "user access failed\n"); - fclose($smtp_conn); - $this->status_mail['status'] = false; - $this->status_mail['message'] = "user SMTP access failed "; - return false; - } - fputs($smtp_conn, base64_encode($this->smtp['pass'])."\r\n"); - $this->add_log("I: parol_skryt\n"); - $data = $this->get_data($smtp_conn)."\n"; - $this->add_log($data); - $code = substr($data, 0, 3); - if ($code != 235) - { - $this->add_log("wrong password\n"); - fclose($smtp_conn); - $this->status_mail['status'] = false; - $this->status_mail['message'] = "wrong password for SMTP"; - return false; - } - foreach ($this->smtpsendto as $key_res => $value_res) - { - $this->BuildMail($key_res); - if (!$this->status_mail['status']) - { - return FALSE; - } - if (isset($this->body[$key_res])) - $body_resource = $key_res; - else - $body_resource = 'webi'; - fputs($smtp_conn, "MAIL FROM:<".$this->headers['From']."> SIZE=".strlen($this->ready_headers[$key_res]."\r\n".$this->body[$body_resource])."\r\n"); - $this->add_log("I: MAIL FROM:<".$this->headers['From']."> SIZE=".strlen($this->ready_headers[$key_res]."\r\n".$this->body[$body_resource])."\n"); - $data = $this->get_data($smtp_conn)."\n"; - $this->add_log($data); - $code = substr($data, 0, 3); - if ($code != 250) - { - $this->add_log("command MAIL FROM denied by server\n"); - fclose($smtp_conn); - $this->status_mail['status'] = false; - $this->status_mail['message'] = "command MAIL FROM through SMTP denied by server "; - return false; - } - foreach ($this->smtpsendto[$key_res] as $keywebi => $valuewebi) - { - fputs($smtp_conn, "RCPT TO:<".$valuewebi.">\r\n"); - $this->add_log("I: RCPT TO:<".$valuewebi.">\n"); - $data = $this->get_data($smtp_conn)."\n"; - $this->add_log($data); - $code = substr($data, 0, 3); - if ($code != 250 AND $code != 251) - { - $this->add_log( "Server denied RCPT TO command\n"); - fclose($smtp_conn); - $this->status_mail['status'] = false; - $this->status_mail['message'] = "Server denied RCPT TO command through SMTP"; - return false; - } - } - fputs($smtp_conn, "DATA\r\n"); - $this->add_log("I: DATA\n"); - $data = $this->get_data($smtp_conn)."\n"; - $this->add_log($data); - $code = substr($data, 0, 3); - if ($code != 354) - { - $this->add_log( "server denied DATA command \n"); - fclose($smtp_conn); - $this->status_mail['status'] = false; - $this->status_mail['message'] = "server denied DATA command through SMTP"; - return false; - } - fputs($smtp_conn, $this->ready_headers[$key_res]."\r\n".$this->body[$body_resource]."\r\n.\r\n"); - $this->add_log("I: ".$this->ready_headers[$key_res]."\r\n".$this->body[$body_resource]."\r\n.\r\n"); - $data = $this->get_data($smtp_conn)."\n"; - $this->add_log($data); - $code = substr($data, 0, 3); - if ($code != 250) - { - $this->add_log("error sending message\n"); - fclose($smtp_conn); - $this->status_mail['status'] = false; - $this->status_mail['message'] = "error sending message through SMTP"; - return false; - } - fputs($smtp_conn, "RSET\r\n"); - $this->add_log("I: RSET\n"); - $data = $this->get_data($smtp_conn)."\n"; - $this->add_log($data); - $code = substr($data, 0, 3); - if ($code != 250) - { - $this->add_log("error sending message\n"); - fclose($smtp_conn); - $this->status_mail['status'] = false; - $this->status_mail['message'] = "Server denied RSET command"; - return false; - } - if ($key_res != 'webi') - { - unset($this->headers[$key_res]); - unset($this->ready_headers[$key_res]); - } - if ($body_resource != 'webi') - { - unset($this->body[$body_resource]); - } - } - fputs($smtp_conn, "QUIT\r\n"); - $this->add_log("QUIT\r\n"); - $data = $this->get_data($smtp_conn)."\n"; - $this->add_log($data); - fclose($smtp_conn); - $this->status_mail['status'] = true; - $this->status_mail['message'] = "Message successfully sent through SMTP"; - return true; - } - } - public function Get() - { - if (!$this->log_on) - return 'Logging disabled. To create log file enable logging setting $m->log_on(true);'; - - if (strlen($this->smtp_log)) - { - return $this->smtp_log; - } - } -} -?> \ No newline at end of file + true, "message" => 'ок'); public function __construct($charset = "", $ctencoding = '') { $this->boundary = md5(uniqid("myboundary")); $this->smtp['on'] = false; if (strlen($ctencoding) and $ctencoding == '8bit') { $this->ctencoding = '8bit'; } if (strlen($charset)) { $this->charset = strtolower($charset); if ($this->charset == "us-ascii") { $this->ctencoding = "7bit"; } } } public function Body($text, $text_html = "", $alternative_text = '', $resource = 'webi') { if (!strlen($resource)) $resource = 'webi'; if ($text_html == "html") $text_html = "text/html"; else $text_html = "text/plain"; if ($this->ctencoding == 'base64') { if (strlen($alternative_text)) $alternative_text = chunk_split(base64_encode($alternative_text)); if (strlen($text)) $text = chunk_split(base64_encode($text)); } if (!strlen($alternative_text)) { $body = "Content-Type: ".$text_html."; charset=".$this->charset."\r\n"; $body.="Content-Transfer-Encoding: ".$this->ctencoding."\r\n\r\n"; $body.=$text; } elseif (strlen($alternative_text) and $text_html == 'text/html') { $body = "Content-Type: multipart/alternative; boundary=ALT-".$this->boundary."\r\n\r\n"; $body.="--ALT-".$this->boundary."\r\n"; $body.="Content-Type: text/plain; charset=".$this->charset."\r\n"; $body.="Content-Transfer-Encoding: ".$this->ctencoding."\r\n\r\n"; $body.=$alternative_text."\r\n"; $body.="--ALT-".$this->boundary."\r\n"; $body.="Content-Type: text/html; charset=".$this->charset."\r\n"; $body.="Content-Transfer-Encoding: ".$this->ctencoding."\r\n\r\n"; $body.=$text."\r\n"; $body.="--ALT-".$this->boundary."--"; } $this->SubBody[$resource]['body'][0] = $body; } protected function mime_content_type($file) { $ext = strtolower(substr(strrchr(basename($file), '.'), 1)); switch ($ext) { case 'jpg': return 'image/jpeg'; case 'jpeg': return 'image/jpeg'; case 'gif': return 'image/gif'; case 'png': return 'image/png'; case 'ico': return 'image/x-icon'; case 'txt': return 'text/plain'; default: return 'application/octet-stream'; } } public function Attach($filename, $new_name_filename = "", $filetype = "", $disposition = "", $resource = 'webi') { if (!strlen($resource)) $resource = 'webi'; if (!file_exists($filename)) { return FALSE; } if (strlen($new_name_filename)) $basename = basename($new_name_filename); else $basename = basename($filename); $charset_name = "=?".$this->charset."?B?".base64_encode($basename)."?="; if (!strlen($filetype)) $filetype = $this->mime_content_type($basename); $body = "Content-Type: ".$filetype."; name=\"$charset_name\"\r\n"; $body.="Content-Transfer-Encoding: base64\r\n"; if ($disposition == 'attachment') { $body.="Content-Disposition: attachment; filename=\"$charset_name\"\r\n"; } $body.="Content-ID: <".$basename.">\r\n"; $body.="\r\n"; $body.=chunk_split(base64_encode(file_get_contents($filename))); if ($disposition == 'attachment') $this->SubBody[$resource]['mixed'][] = $body; else { $this->SubBody[$resource]['body'][$this->count_body] = $body; $this->count_body++; } } public function BuildMail($resource = 'webi') { if (!strlen($resource)) $resource = 'webi'; $this->ready_headers[$resource] = ''; if (isset($this->SubBody[$resource]['body'])) $resource_body = $resource; else $resource_body = 'webi'; if (!is_array($this->sendto[$resource]) OR !count($this->sendto[$resource])) { $this->status_mail['status'] = false; $this->status_mail['message'] = "Error : no recipient selected for ".$resource; // return false; } if (!isset($this->body[$resource_body])) { if (count($this->SubBody[$resource_body]['body']) > 1) { $body = implode("\r\n--REL-".$this->boundary."\r\n", $this->SubBody[$resource_body]['body']); $body = "Content-Type: multipart/related; boundary=REL-".$this->boundary."\r\n\r\n" .'--REL-'.$this->boundary."\r\n".$body.'--REL-'.$this->boundary."--"; } else { $body = $this->SubBody[$resource_body]['body'][0]; } if (isset($this->SubBody[$resource_body]['mixed']) AND count($this->SubBody[$resource_body]['mixed'])) { $bodymix = implode('--MIX-'.$this->boundary."\r\n", $this->SubBody[$resource_body]['mixed']); $body = $body."\r\n--MIX-".$this->boundary."\r\n".$bodymix; $body = "Content-Type: multipart/mixed; boundary=MIX-".$this->boundary."\r\n\r\n" .'--MIX-'.$this->boundary."\r\n".$body.'--MIX-'.$this->boundary."--"; } unset($this->SubBody[$resource_body]); $temp_mass = explode("\r\n\r\n", $body); $this->body_header[$resource_body] = $temp_mass[0]; unset($temp_mass[0]); $this->body[$resource_body] = implode("\r\n\r\n", $temp_mass); unset($temp_mass); unset($body); } $temp_mass = array(); foreach ($this->sendto[$resource] as $key => $value) { if (strlen($this->names_email[$resource]['To'][$value])) $temp_mass[] = "=?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($this->names_email[$resource]['To'][$value], "\r\n", " "))))."?= <".$value.">"; else $temp_mass[] = $value; } $this->headers[$resource]['To'] = implode(", ", $temp_mass); if (isset($this->acc[$resource]) and count($this->acc[$resource]) > 0) $this->headers[$resource]['CC'] = implode(", ", $this->acc[$resource]); if (isset($this->abcc[$resource]) and count($this->abcc[$resource]) > 0) $this->headers[$resource]['BCC'] = implode(", ", $this->abcc[$resource]); if ($this->receipt) { if (isset($this->headers["Reply-To"])) $this->headers["Disposition-Notification-To"] = $this->headers["Reply-To"]; else $this->headers["Disposition-Notification-To"] = $this->headers['From']; } if ($this->charset != "") { $this->headers["Mime-Version"] = "1.0"; } $this->headers["X-Mailer"] = "Php_libMail_v_2.0(webi.ru)"; if (!isset($this->headers[$resource]['Subject']) and isset($this->headers['webi']['Subject'])) $this->headers[$resource]['Subject'] = $this->headers['webi']['Subject']; if ($this->smtp['on']) { $user_domen = explode('@', $this->headers['From']); $this->ready_headers[$resource] .= "Date: ".date("r")."\r\n"; $this->ready_headers[$resource] .= "Message-ID: <".rand().".".$resource.date("YmjHis")."@".$user_domen[1].">\r\n"; foreach ($this->headers[$resource] as $key => $value) { $new_mass_head[$key] = $value; } foreach ($this->headers as $key => $value) { if (!is_array($value)) $new_mass_head[$key] = $value; } reset($new_mass_head); while (list( $hdr, $value ) = each($new_mass_head)) { if ($hdr == "From" and strlen($this->names_email['from'])) $this->ready_headers[$resource] .= $hdr.": =?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($this->names_email['from'], "\r\n", " "))))."?= <".$value.">\r\n"; elseif ($hdr == "Reply-To" and strlen($this->names_email['Reply-To'])) $this->ready_headers[$resource] .= $hdr.": =?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($this->names_email['Reply-To'], "\r\n", " "))))."?= <".$value.">\r\n"; elseif ($hdr != "BCC") $this->ready_headers[$resource] .= $hdr.": ".$value."\r\n"; } } else { foreach ($this->headers[$resource] as $key => $value) { $new_mass_head[$key] = $value; } foreach ($this->headers as $key => $value) { if (!is_array($value)) $new_mass_head[$key] = $value; } reset($new_mass_head); while (list( $hdr, $value ) = each($new_mass_head)) { if ($hdr == "From" and strlen($this->names_email['from'])) $this->ready_headers[$resource] .= $hdr.": =?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($this->names_email['from'], "\r\n", " "))))."?= <".$value.">\r\n"; elseif ($hdr == "Reply-To" and strlen($this->names_email['Reply-To'])) $this->ready_headers[$resource] .= $hdr.": =?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($this->names_email['Reply-To'], "\r\n", " "))))."?= <".$value.">\r\n"; elseif ($hdr != "Subject" and $hdr != "To") $this->ready_headers[$resource] .= "$hdr: $value\r\n"; } } $this->ready_headers[$resource].=$this->body_header[$resource_body]."\r\n"; } public function autoCheck($bool) { if ($bool) $this->checkAddress = true; else $this->checkAddress = false; } public function log_on($bool) { if ($bool) $this->log_on = true; else $this->log_on = false; } public function Subject($subject, $resource = 'webi') { if (!strlen($resource)) $resource = 'webi'; $this->headers[$resource]['Subject'] = "=?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($subject, "\r\n", " "))))."?="; } public function From($from) { if (!is_string($from)) { $this->status_mail['status'] = false; $this->status_mail['message'] = "Error, From should be inline"; return FALSE; } $temp_mass = explode(';', $from); if (count($temp_mass) == 2) { $this->names_email['from'] = $temp_mass[0]; $this->headers['From'] = $temp_mass[1]; } else { $this->names_email['from'] = ''; $this->headers['From'] = $from; } } public function ReplyTo($address) { if (!is_string($address)) return false; $temp_mass = explode(';', $address); if (count($temp_mass) == 2) { $this->names_email['Reply-To'] = $temp_mass[0]; $this->headers['Reply-To'] = $temp_mass[1]; } else { $this->names_email['Reply-To'] = ''; $this->headers['Reply-To'] = $address; } } public function Receipt() { $this->receipt = 1; } public function To($to, $resource = 'webi') { if (!strlen($resource)) $resource = 'webi'; if (is_array($to)) { foreach ($to as $key => $value) { $temp_mass = explode(';', $value); if (count($temp_mass) == 2) { $this->smtpsendto[$resource][$temp_mass[1]] = $temp_mass[1]; $this->names_email[$resource]['To'][$temp_mass[1]] = $temp_mass[0]; $this->sendto[$resource][] = $temp_mass[1]; } else { $this->smtpsendto[$resource][$value] = $value; $this->names_email[$resource]['To'][$value] = ''; $this->sendto[$resource][] = $value; } } } else { $temp_mass = explode(';', $to); if (count($temp_mass) == 2) { $this->sendto[$resource][] = $temp_mass[1]; $this->smtpsendto[$resource][$temp_mass[1]] = $temp_mass[1]; $this->names_email[$resource]['To'][$temp_mass[1]] = $temp_mass[0]; } else { $this->sendto[$resource][] = $to; $this->smtpsendto[$resource][$to] = $to; $this->names_email[$resource]['To'][$to] = ''; } } if ($this->checkAddress == true) $this->CheckAdresses($this->sendto[$resource]); } private function CheckAdresses($aad) { foreach ($aad as $key => $value) { if (!$this->ValidEmail($value)) { $this->status_mail['status'] = false; $this->status_mail['message'] = "Error : wrong email ".$value; return FALSE; } } } public function ValidEmail($address) { if (function_exists('filter_list')) { $valid_email = filter_var($address, FILTER_VALIDATE_EMAIL); if ($valid_email !== false) return true; else return false; } else { if (ereg(".*<(.+)>", $address, $regs)) { $address = $regs[1]; } if (ereg("^[^@ ]+@([a-zA-Z0-9\-]+\.)+([a-zA-Z0-9\-]{2}|net|com|gov|mil|org|edu|int)\$", $address)) return true; else return false; } } public function Cc($cc, $resource = 'webi') { if (!strlen($resource)) $resource = 'webi'; if (is_array($cc)) { foreach ($cc as $key => $value) { $this->smtpsendto[$resource][$value] = $value; $this->acc[$resource][$value] = $value; } } else { $this->acc[$resource][$cc] = $cc; $this->smtpsendto[$resource][$cc] = $cc; } if ($this->checkAddress == true) $this->CheckAdresses($this->acc[$resource]); } public function Bcc($bcc, $resource = 'webi') { if (!strlen($resource)) $resource = 'webi'; if (is_array($bcc)) { foreach ($bcc as $key => $value) { $this->smtpsendto[$resource][$value] = $value; $this->abcc[$resource][$value] = $value; } } else { $this->abcc[$resource][$bcc] = $bcc; $this->smtpsendto[$resource][$bcc] = $bcc; } if ($this->checkAddress == true) $this->CheckAdresses($this->abcc[$resource]); } public function Organization($org) { if (trim($org != "")) $this->headers['Organization'] = $org; } public function Priority($priority) { $priorities = array('1 (Highest)', '2 (High)', '3 (Normal)', '4 (Low)', '5 (Lowest)'); if (!intval($priority)) return false; if (!isset($priorities[$priority - 1])) return false; $this->headers["X-Priority"] = $priorities[$priority - 1]; return true; } public function smtp_on($smtp_serv, $login, $pass, $port = 25, $timeout = 5) { $this->smtp['on'] = true; // smtp transfer on $this->smtp['serv'] = $smtp_serv; $this->smtp['login'] = $login; $this->smtp['pass'] = $pass; $this->smtp['port'] = $port; $this->smtp['timeout'] = $timeout; } private function get_data($smtp_conn) { $data = ""; while ($str = fgets($smtp_conn, 515)) { $data .= $str; if (substr($str, 3, 1) == " ") { break; } } return $data; } private function add_log($text) { if ($this->log_on) $this->smtp_log.=$text; } public function Send() { if (!$this->status_mail['status']) { return FALSE; } if (!$this->smtp['on']) { foreach ($this->sendto as $key => $value) { $strTo = implode(", ", $this->sendto[$key]); $this->BuildMail($key); if (!$this->status_mail['status']) { return FALSE; } if (isset($this->body[$key])) $body_resource = $key; else $body_resource = 'webi'; $res = @mail($strTo, $this->headers[$key]['Subject'], $this->body[$body_resource], $this->ready_headers[$key]); if (!$res) { $this->status_mail['status'] = false; $this->status_mail['message'] = "Error : mail() function returns error"; } elseif ($this->status_mail['status']) { $this->add_log('TO: '.$strTo."\n"); $this->add_log("Subject: ".$this->headers[$key]['Subject']."\n"); $this->add_log($this->ready_headers[$key]."\n\n"); $this->add_log($this->body[$body_resource]."\n\n\n"); $this->status_mail['status'] = true; $this->status_mail['message'] = "Message successfully sent by mail()"; } if ($key != 'webi') { unset($this->headers[$key]); unset($this->ready_headers[$key]); } if ($body_resource != 'webi') { unset($this->body[$body_resource]); } } if ($this->status_mail['status']) { return true; } else { return FALSE; } } else { if (!$this->smtp['serv'] OR !$this->smtp['login'] OR !$this->smtp['pass'] OR !$this->smtp['port']) { $this->status_mail['status'] = false; $this->status_mail['message'] = "Error : missing required SMTP values "; return false; } $user_domen = explode('@', $this->headers['From']); $smtp_conn = fsockopen($this->smtp['serv'], $this->smtp['port'], $errno, $errstr, $this->smtp['timeout']); if (!$smtp_conn) { $this->add_log("can't connect to server\n\n"); fclose($smtp_conn); $this->status_mail['status'] = false; $this->status_mail['message'] = "Error: can't connect to server"; return false; } $data = $this->get_data($smtp_conn)."\n"; $this->add_log($data); fputs($smtp_conn, "EHLO ".$user_domen[0]."\r\n"); $this->add_log("I: EHLO ".$user_domen[0]."\n"); $data = $this->get_data($smtp_conn)."\n"; $this->add_log($data); $code = substr($data, 0, 3); if ($code != 250) { $this->add_log("Error greeting EHLO \n"); fclose($smtp_conn); $this->status_mail['status'] = false; $this->status_mail['message'] = "Error: greeting EHLO"; return false; } fputs($smtp_conn, "AUTH LOGIN\r\n"); $this->add_log( "I: AUTH LOGIN\n"); $data = $this->get_data($smtp_conn)."\n"; $this->add_log($data); $code = substr($data, 0, 3); if ($code != 334) { $this->add_log("server denies authorization \n"); fclose($smtp_conn); $this->status_mail['status'] = false; $this->status_mail['message'] = "server denies authorization"; return false; } fputs($smtp_conn, base64_encode($this->smtp['login'])."\r\n"); $this->add_log( "I: ".base64_encode($this->smtp['login'])."\n"); $data = $this->get_data($smtp_conn)."\n"; $this->add_log($data); $code = substr($data, 0, 3); if ($code != 334) { $this->add_log( "user access failed\n"); fclose($smtp_conn); $this->status_mail['status'] = false; $this->status_mail['message'] = "user SMTP access failed "; return false; } fputs($smtp_conn, base64_encode($this->smtp['pass'])."\r\n"); $this->add_log("I: parol_skryt\n"); $data = $this->get_data($smtp_conn)."\n"; $this->add_log($data); $code = substr($data, 0, 3); if ($code != 235) { $this->add_log("wrong password\n"); fclose($smtp_conn); $this->status_mail['status'] = false; $this->status_mail['message'] = "wrong password for SMTP"; return false; } foreach ($this->smtpsendto as $key_res => $value_res) { $this->BuildMail($key_res); if (!$this->status_mail['status']) { return FALSE; } if (isset($this->body[$key_res])) $body_resource = $key_res; else $body_resource = 'webi'; fputs($smtp_conn, "MAIL FROM:<".$this->headers['From']."> SIZE=".strlen($this->ready_headers[$key_res]."\r\n".$this->body[$body_resource])."\r\n"); $this->add_log("I: MAIL FROM:<".$this->headers['From']."> SIZE=".strlen($this->ready_headers[$key_res]."\r\n".$this->body[$body_resource])."\n"); $data = $this->get_data($smtp_conn)."\n"; $this->add_log($data); $code = substr($data, 0, 3); if ($code != 250) { $this->add_log("command MAIL FROM denied by server\n"); fclose($smtp_conn); $this->status_mail['status'] = false; $this->status_mail['message'] = "command MAIL FROM through SMTP denied by server "; return false; } foreach ($this->smtpsendto[$key_res] as $keywebi => $valuewebi) { fputs($smtp_conn, "RCPT TO:<".$valuewebi.">\r\n"); $this->add_log("I: RCPT TO:<".$valuewebi.">\n"); $data = $this->get_data($smtp_conn)."\n"; $this->add_log($data); $code = substr($data, 0, 3); if ($code != 250 AND $code != 251) { $this->add_log( "Server denied RCPT TO command\n"); fclose($smtp_conn); $this->status_mail['status'] = false; $this->status_mail['message'] = "Server denied RCPT TO command through SMTP"; return false; } } fputs($smtp_conn, "DATA\r\n"); $this->add_log("I: DATA\n"); $data = $this->get_data($smtp_conn)."\n"; $this->add_log($data); $code = substr($data, 0, 3); if ($code != 354) { $this->add_log( "server denied DATA command \n"); fclose($smtp_conn); $this->status_mail['status'] = false; $this->status_mail['message'] = "server denied DATA command through SMTP"; return false; } fputs($smtp_conn, $this->ready_headers[$key_res]."\r\n".$this->body[$body_resource]."\r\n.\r\n"); $this->add_log("I: ".$this->ready_headers[$key_res]."\r\n".$this->body[$body_resource]."\r\n.\r\n"); $data = $this->get_data($smtp_conn)."\n"; $this->add_log($data); $code = substr($data, 0, 3); if ($code != 250) { $this->add_log("error sending message\n"); fclose($smtp_conn); $this->status_mail['status'] = false; $this->status_mail['message'] = "error sending message through SMTP"; return false; } fputs($smtp_conn, "RSET\r\n"); $this->add_log("I: RSET\n"); $data = $this->get_data($smtp_conn)."\n"; $this->add_log($data); $code = substr($data, 0, 3); if ($code != 250) { $this->add_log("error sending message\n"); fclose($smtp_conn); $this->status_mail['status'] = false; $this->status_mail['message'] = "Server denied RSET command"; return false; } if ($key_res != 'webi') { unset($this->headers[$key_res]); unset($this->ready_headers[$key_res]); } if ($body_resource != 'webi') { unset($this->body[$body_resource]); } } fputs($smtp_conn, "QUIT\r\n"); $this->add_log("QUIT\r\n"); $data = $this->get_data($smtp_conn)."\n"; $this->add_log($data); fclose($smtp_conn); $this->status_mail['status'] = true; $this->status_mail['message'] = "Message successfully sent through SMTP"; return true; } } public function Get() { if (!$this->log_on) return 'Logging disabled. To create log file enable logging setting $m->log_on(true);'; if (strlen($this->smtp_log)) { return $this->smtp_log; } } } ?> \ No newline at end of file diff --git a/bat/recaptchalib.php b/bat/recaptchalib.php index de6c281..fd87f0f 100644 --- a/bat/recaptchalib.php +++ b/bat/recaptchalib.php @@ -1,277 +1 @@ - $value ) - $req .= $key . '=' . urlencode( stripslashes($value) ) . '&'; - - // Cut the last '&' - $req=substr($req,0,strlen($req)-1); - return $req; -} - - - -/** - * Submits an HTTP POST to a reCAPTCHA server - * @param string $host - * @param string $path - * @param array $data - * @param int port - * @return array response - */ -function _recaptcha_http_post($host, $path, $data, $port = 80) { - - $req = _recaptcha_qsencode ($data); - - $http_request = "POST $path HTTP/1.0\r\n"; - $http_request .= "Host: $host\r\n"; - $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n"; - $http_request .= "Content-Length: " . strlen($req) . "\r\n"; - $http_request .= "User-Agent: reCAPTCHA/PHP\r\n"; - $http_request .= "\r\n"; - $http_request .= $req; - - $response = ''; - if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) { - die ('Could not open socket'); - } - - fwrite($fs, $http_request); - - while ( !feof($fs) ) - $response .= fgets($fs, 1160); // One TCP-IP packet - fclose($fs); - $response = explode("\r\n\r\n", $response, 2); - - return $response; -} - - - -/** - * Gets the challenge HTML (javascript and non-javascript version). - * This is called from the browser, and the resulting reCAPTCHA HTML widget - * is embedded within the HTML form it was called from. - * @param string $pubkey A public key for reCAPTCHA - * @param string $error The error given by reCAPTCHA (optional, default is null) - * @param boolean $use_ssl Should the request be made over ssl? (optional, default is false) - - * @return string - The HTML to be embedded in the user's form. - */ -function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false) -{ - if ($pubkey == null || $pubkey == '') { - die ("To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create"); - } - - if ($use_ssl) { - $server = RECAPTCHA_API_SECURE_SERVER; - } else { - $server = RECAPTCHA_API_SERVER; - } - - $errorpart = ""; - if ($error) { - $errorpart = "&error=" . $error; - } - return ' - - '; -} - - - - -/** - * A ReCaptchaResponse is returned from recaptcha_check_answer() - */ -class ReCaptchaResponse { - var $is_valid; - var $error; -} - - -/** - * Calls an HTTP POST function to verify if the user's guess was correct - * @param string $privkey - * @param string $remoteip - * @param string $challenge - * @param string $response - * @param array $extra_params an array of extra variables to post to the server - * @return ReCaptchaResponse - */ -function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $extra_params = array()) -{ - if ($privkey == null || $privkey == '') { - die ("To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create"); - } - - if ($remoteip == null || $remoteip == '') { - die ("For security reasons, you must pass the remote ip to reCAPTCHA"); - } - - - - //discard spam submissions - if ($challenge == null || strlen($challenge) == 0 || $response == null || strlen($response) == 0) { - $recaptcha_response = new ReCaptchaResponse(); - $recaptcha_response->is_valid = false; - $recaptcha_response->error = 'incorrect-captcha-sol'; - return $recaptcha_response; - } - - $response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER, "/recaptcha/api/verify", - array ( - 'privatekey' => $privkey, - 'remoteip' => $remoteip, - 'challenge' => $challenge, - 'response' => $response - ) + $extra_params - ); - - $answers = explode ("\n", $response [1]); - $recaptcha_response = new ReCaptchaResponse(); - - if (trim ($answers [0]) == 'true') { - $recaptcha_response->is_valid = true; - } - else { - $recaptcha_response->is_valid = false; - $recaptcha_response->error = $answers [1]; - } - return $recaptcha_response; - -} - -/** - * gets a URL where the user can sign up for reCAPTCHA. If your application - * has a configuration page where you enter a key, you should provide a link - * using this function. - * @param string $domain The domain where the page is hosted - * @param string $appname The name of your application - */ -function recaptcha_get_signup_url ($domain = null, $appname = null) { - return "https://www.google.com/recaptcha/admin/create?" . _recaptcha_qsencode (array ('domains' => $domain, 'app' => $appname)); -} - -function _recaptcha_aes_pad($val) { - $block_size = 16; - $numpad = $block_size - (strlen ($val) % $block_size); - return str_pad($val, strlen ($val) + $numpad, chr($numpad)); -} - -/* Mailhide related code */ - -function _recaptcha_aes_encrypt($val,$ky) { - if (! function_exists ("mcrypt_encrypt")) { - die ("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed."); - } - $mode=MCRYPT_MODE_CBC; - $enc=MCRYPT_RIJNDAEL_128; - $val=_recaptcha_aes_pad($val); - return mcrypt_encrypt($enc, $ky, $val, $mode, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"); -} - - -function _recaptcha_mailhide_urlbase64 ($x) { - return strtr(base64_encode ($x), '+/', '-_'); -} - -/* gets the reCAPTCHA Mailhide url for a given email, public key and private key */ -function recaptcha_mailhide_url($pubkey, $privkey, $email) { - if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) { - die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " . - "you can do so at http://www.google.com/recaptcha/mailhide/apikey"); - } - - - $ky = pack('H*', $privkey); - $cryptmail = _recaptcha_aes_encrypt ($email, $ky); - - return "http://www.google.com/recaptcha/mailhide/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64 ($cryptmail); -} - -/** - * gets the parts of the email to expose to the user. - * eg, given johndoe@example,com return ["john", "example.com"]. - * the email is then displayed as john...@example.com - */ -function _recaptcha_mailhide_email_parts ($email) { - $arr = preg_split("/@/", $email ); - - if (strlen ($arr[0]) <= 4) { - $arr[0] = substr ($arr[0], 0, 1); - } else if (strlen ($arr[0]) <= 6) { - $arr[0] = substr ($arr[0], 0, 3); - } else { - $arr[0] = substr ($arr[0], 0, 4); - } - return $arr; -} - -/** - * Gets html to display an email address given a public an private key. - * to get a key, go to: - * - * http://www.google.com/recaptcha/mailhide/apikey - */ -function recaptcha_mailhide_html($pubkey, $privkey, $email) { - $emailparts = _recaptcha_mailhide_email_parts ($email); - $url = recaptcha_mailhide_url ($pubkey, $privkey, $email); - - return htmlentities($emailparts[0]) . "...@" . htmlentities ($emailparts [1]); - -} - - -?> + $value ) $req .= $key . '=' . urlencode( stripslashes($value) ) . '&'; // Cut the last '&' $req=substr($req,0,strlen($req)-1); return $req; } /** * Submits an HTTP POST to a reCAPTCHA server * @param string $host * @param string $path * @param array $data * @param int port * @return array response */ function _recaptcha_http_post($host, $path, $data, $port = 80) { $req = _recaptcha_qsencode ($data); $http_request = "POST $path HTTP/1.0\r\n"; $http_request .= "Host: $host\r\n"; $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n"; $http_request .= "Content-Length: " . strlen($req) . "\r\n"; $http_request .= "User-Agent: reCAPTCHA/PHP\r\n"; $http_request .= "\r\n"; $http_request .= $req; $response = ''; if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) { die ('Could not open socket'); } fwrite($fs, $http_request); while ( !feof($fs) ) $response .= fgets($fs, 1160); // One TCP-IP packet fclose($fs); $response = explode("\r\n\r\n", $response, 2); return $response; } /** * Gets the challenge HTML (javascript and non-javascript version). * This is called from the browser, and the resulting reCAPTCHA HTML widget * is embedded within the HTML form it was called from. * @param string $pubkey A public key for reCAPTCHA * @param string $error The error given by reCAPTCHA (optional, default is null) * @param boolean $use_ssl Should the request be made over ssl? (optional, default is false) * @return string - The HTML to be embedded in the user's form. */ function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false) { if ($pubkey == null || $pubkey == '') { die ("To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create"); } if ($use_ssl) { $server = RECAPTCHA_API_SECURE_SERVER; } else { $server = RECAPTCHA_API_SERVER; } $errorpart = ""; if ($error) { $errorpart = "&error=" . $error; } return ' '; } /** * A ReCaptchaResponse is returned from recaptcha_check_answer() */ class ReCaptchaResponse { var $is_valid; var $error; } /** * Calls an HTTP POST function to verify if the user's guess was correct * @param string $privkey * @param string $remoteip * @param string $challenge * @param string $response * @param array $extra_params an array of extra variables to post to the server * @return ReCaptchaResponse */ function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $extra_params = array()) { if ($privkey == null || $privkey == '') { die ("To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create"); } if ($remoteip == null || $remoteip == '') { die ("For security reasons, you must pass the remote ip to reCAPTCHA"); } //discard spam submissions if ($challenge == null || strlen($challenge) == 0 || $response == null || strlen($response) == 0) { $recaptcha_response = new ReCaptchaResponse(); $recaptcha_response->is_valid = false; $recaptcha_response->error = 'incorrect-captcha-sol'; return $recaptcha_response; } $response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER, "/recaptcha/api/verify", array ( 'privatekey' => $privkey, 'remoteip' => $remoteip, 'challenge' => $challenge, 'response' => $response ) + $extra_params ); $answers = explode ("\n", $response [1]); $recaptcha_response = new ReCaptchaResponse(); if (trim ($answers [0]) == 'true') { $recaptcha_response->is_valid = true; } else { $recaptcha_response->is_valid = false; $recaptcha_response->error = $answers [1]; } return $recaptcha_response; } /** * gets a URL where the user can sign up for reCAPTCHA. If your application * has a configuration page where you enter a key, you should provide a link * using this function. * @param string $domain The domain where the page is hosted * @param string $appname The name of your application */ function recaptcha_get_signup_url ($domain = null, $appname = null) { return "https://www.google.com/recaptcha/admin/create?" . _recaptcha_qsencode (array ('domains' => $domain, 'app' => $appname)); } function _recaptcha_aes_pad($val) { $block_size = 16; $numpad = $block_size - (strlen ($val) % $block_size); return str_pad($val, strlen ($val) + $numpad, chr($numpad)); } /* Mailhide related code */ function _recaptcha_aes_encrypt($val,$ky) { if (! function_exists ("mcrypt_encrypt")) { die ("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed."); } $mode=MCRYPT_MODE_CBC; $enc=MCRYPT_RIJNDAEL_128; $val=_recaptcha_aes_pad($val); return mcrypt_encrypt($enc, $ky, $val, $mode, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"); } function _recaptcha_mailhide_urlbase64 ($x) { return strtr(base64_encode ($x), '+/', '-_'); } /* gets the reCAPTCHA Mailhide url for a given email, public key and private key */ function recaptcha_mailhide_url($pubkey, $privkey, $email) { if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) { die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " . "you can do so at http://www.google.com/recaptcha/mailhide/apikey"); } $ky = pack('H*', $privkey); $cryptmail = _recaptcha_aes_encrypt ($email, $ky); return "http://www.google.com/recaptcha/mailhide/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64 ($cryptmail); } /** * gets the parts of the email to expose to the user. * eg, given johndoe@example,com return ["john", "example.com"]. * the email is then displayed as john...@example.com */ function _recaptcha_mailhide_email_parts ($email) { $arr = preg_split("/@/", $email ); if (strlen ($arr[0]) <= 4) { $arr[0] = substr ($arr[0], 0, 1); } else if (strlen ($arr[0]) <= 6) { $arr[0] = substr ($arr[0], 0, 3); } else { $arr[0] = substr ($arr[0], 0, 4); } return $arr; } /** * Gets html to display an email address given a public an private key. * to get a key, go to: * * http://www.google.com/recaptcha/mailhide/apikey */ function recaptcha_mailhide_html($pubkey, $privkey, $email) { $emailparts = _recaptcha_mailhide_email_parts ($email); $url = recaptcha_mailhide_url ($pubkey, $privkey, $email); return htmlentities($emailparts[0]) . "...@" . htmlentities ($emailparts [1]); } ?> \ No newline at end of file diff --git a/changepassword.php b/changepassword.php index 8a338ef..76ada54 100644 --- a/changepassword.php +++ b/changepassword.php @@ -1,122 +1 @@ -$value) { - if (empty($value) && in_array($key, $required_fields) === true) { - $errors[] = 'Hello! The fields marked with an asterisk are required'; - break 1; - } - } - - if (md5($_POST['current_password']) === $user_data['password']) { - if (trim($_POST['password']) !== trim($_POST['password_again'])) { - $errors[] = 'Your new passwords do not match perfectly!'; - } else if (strlen($_POST['password']) < 6) { - $errors[] = 'Your new passwords must be at least 6 characters!'; - } - } else { - $errors[] = 'Your current password is incorrect'; - } -} - -?> - - - - - - - - - - - Gigabyte Developers Incorporated | Change Password - - - - - - - - - - -
- - -
-

Gigabyte Developers Incorporated

- -
-
-
- - - -
-
- -

Change Password

- -

Congratulations! your password has been successfully changed!.

- -

You must reset your password before continuing!...

- - - - -

- - -

  -

- - -

-

- - -

-

- -

- - +$value) { if (empty($value) && in_array($key, $required_fields) === true) { $errors[] = 'Hello! The fields marked with an asterisk are required'; break 1; } } if (md5($_POST['current_password']) === $user_data['password']) { if (trim($_POST['password']) !== trim($_POST['password_again'])) { $errors[] = 'Your new passwords do not match perfectly!'; } else if (strlen($_POST['password']) < 6) { $errors[] = 'Your new passwords must be at least 6 characters!'; } } else { $errors[] = 'Your current password is incorrect'; } } ?> Gigabyte Developers Incorporated | Change Password

Gigabyte Developers Incorporated

Change Password

Congratulations! your password has been successfully changed!.

You must reset your password before continuing!...

 

\ No newline at end of file diff --git a/classes/MailHandler.php b/classes/MailHandler.php index d761321..69ef004 100644 --- a/classes/MailHandler.php +++ b/classes/MailHandler.php @@ -1,84 +1 @@ -is_valid){ - die ('wrong captcha'); - } - } - - if(isset($_POST['name']) and $_POST['name'] != ''){$message_body .= '

Visitor: ' . $_POST['name'] . '

' . "\n" . '
' . "\n"; $subject.=$_POST['name'];} - if(isset($_POST['email']) and $_POST['email'] != ''){$message_body .= '

Email Address: ' . $_POST['email'] . '

' . "\n" . '
' . "\n"; $user_email=$_POST['email'];} - if(isset($_POST['state']) and $_POST['state'] != ''){$message_body .= '

State: ' . $_POST['state'] . '

' . "\n" . '
' . "\n";} - if(isset($_POST['phone']) and $_POST['phone'] != ''){$message_body .= '

Phone Number: ' . $_POST['phone'] . '

' . "\n" . '
' . "\n";} - if(isset($_POST['fax']) and $_POST['fax'] != ''){$message_body .= '

Fax Number: ' . $_POST['fax'] . '

' . "\n" . '
' . "\n";} - if(isset($_POST['message']) and $_POST['message'] != ''){$message_body .= '

Message: ' . $_POST['message'] . '

' . "\n";} - if(isset($_POST['stripHTML']) and $_POST['stripHTML']=='true'){$message_body = strip_tags($message_body);$message_type='text';} - -try{ - include "libmail.php"; - $m= new Mail("utf-8"); - $m->From($user_email); - $m->To($owner_email); - $m->Subject($subject); - $m->Body($message_body,$message_type); - //$m->log_on(true); - - if(isset($_FILES['attachment'])){ - if($_FILES['attachment']['size']>$max_file_size){ - $error_text=$error_text_filesize . ' ' . $max_file_size . 'bytes'; - die($error_text); - }else{ - if(preg_match($file_types,$_FILES['attachment']['name'])){ - $m->Attach($_FILES['attachment']['tmp_name'],$_FILES['attachment']['name'],'','attachment'); - }else{ - $error_text=$error_text_filetype; - die($error_text); - } - } - } - if(!$use_smtp){ - $m->smtp_on( $host, $username, $password, $port); - } - - if($m->Send()){ - die('success'); - } - -}catch(Exception $mail){ - die($mail); -} -?> \ No newline at end of file +is_valid){ die ('wrong captcha'); } } if(isset($_POST['name']) and $_POST['name'] != ''){$message_body .= '

Visitor: ' . $_POST['name'] . '

' . "\n" . '
' . "\n"; $subject.=$_POST['name'];} if(isset($_POST['email']) and $_POST['email'] != ''){$message_body .= '

Email Address: ' . $_POST['email'] . '

' . "\n" . '
' . "\n"; $user_email=$_POST['email'];} if(isset($_POST['state']) and $_POST['state'] != ''){$message_body .= '

State: ' . $_POST['state'] . '

' . "\n" . '
' . "\n";} if(isset($_POST['phone']) and $_POST['phone'] != ''){$message_body .= '

Phone Number: ' . $_POST['phone'] . '

' . "\n" . '
' . "\n";} if(isset($_POST['fax']) and $_POST['fax'] != ''){$message_body .= '

Fax Number: ' . $_POST['fax'] . '

' . "\n" . '
' . "\n";} if(isset($_POST['message']) and $_POST['message'] != ''){$message_body .= '

Message: ' . $_POST['message'] . '

' . "\n";} if(isset($_POST['stripHTML']) and $_POST['stripHTML']=='true'){$message_body = strip_tags($message_body);$message_type='text';} try{ include "libmail.php"; $m= new Mail("utf-8"); $m->From($user_email); $m->To($owner_email); $m->Subject($subject); $m->Body($message_body,$message_type); //$m->log_on(true); if(isset($_FILES['attachment'])){ if($_FILES['attachment']['size']>$max_file_size){ $error_text=$error_text_filesize . ' ' . $max_file_size . 'bytes'; die($error_text); }else{ if(preg_match($file_types,$_FILES['attachment']['name'])){ $m->Attach($_FILES['attachment']['tmp_name'],$_FILES['attachment']['name'],'','attachment'); }else{ $error_text=$error_text_filetype; die($error_text); } } } if(!$use_smtp){ $m->smtp_on( $host, $username, $password, $port); } if($m->Send()){ die('success'); } }catch(Exception $mail){ die($mail); } ?> \ No newline at end of file diff --git a/classes/TMForm.js b/classes/TMForm.js index 21f1ba7..0feb07c 100644 --- a/classes/TMForm.js +++ b/classes/TMForm.js @@ -1,344 +1 @@ -//TMForm 1.0.1 -$(window).load(function(){ - $('#main-contact-form').TMForm({ - recaptchaPublicKey:'6LeZwukSAAAAAG8HbIAE0XeNvCon_cXThgu9afkj' - }) -}) - -;(function($){ - $.fn.TMForm=function(opt){ - return this.each(TMForm) - - function TMForm(){ - var form=$(this) - opt=$.extend({ - okClass:'ok' - ,emptyClass:'empty' - ,invalidClass:'invalid' - ,successClass:'success' - ,responseErrorClass:'response-error' - ,responseMessageClass:'response-message' - ,processingClass:'processing' - ,onceVerifiedClass:'once-verified' - ,mailHandlerURL:'MailHandler.php' - ,successShowDelay:'4000' - ,stripHTML:true - ,recaptchaPublicKey:'' - ,capchaTheme:'clean' - },opt) - - init() - - function init(){ - form - .on('submit',formSubmit) - .on('reset',formReset) - .on('focus','[data-constraints]',function(){ - $(this).parents('label').removeClass(opt.emptyClass) - }) - .on('blur','[data-constraints]:not(.once-verified)',function(){ - $(this) - .addClass(opt.onceVerifiedClass) - .trigger('validate.form') - }) - .on('keyup','[data-constraints].once-verified',function(){ - $(this).trigger('validate.form') - }) - .on('keydown','input',function(e){ - var $this=$(this) - ,next=$this.parents('label').next('label').find('input,textarea') - if(e.keyCode===13) - if(next.length) - next.focus() - else - form.submit() - }) - .on('keydown','textarea',function(e){ - if(e.keyCode===13&&e.ctrlKey) - $(this).parents('label').next('label').find('input,textarea').focus() - }) - .on('change','input[type="file"]',function(){ - $(this).parents('label').next('label').find('input,textarea').focus() - }) - .attr({ - method:'POST' - ,action:opt.mailHandlerURL - }) - - if($('[data-constraints]',form).length!==0) - $('[data-constraints]',form) - .regula('bind') - .on('show.placeholder',function(){ - fieldDesolation($(this)) - }) - .on('validate.form',fieldValidate) - - - $('[placeholder]',form).TMPlaceholder() - - $('[data-type=submit]',form) - .click(function(){ - form.trigger('submit') - return false - }) - - $('[data-type=reset]',form) - .click(function(){ - form.trigger('reset') - return false - }) - - if(opt.stripHTML) - form.append('') - - if($('label.recaptcha',form).length!==0&&window.Recaptcha) - showRecaptcha() - - } - - function fieldValidate(el){ - var el=$(this) - ,result=el.regula('validate') - ,isEmpty=false - ,isInvalid=false - ,isRequired=!!~el.data('constraints').indexOf('@Required') - - $.each(result,function(){ - if(this.constraintName==='Required') - isEmpty=true - else - isInvalid=true - }) - - if(!el.hasClass(opt.onceVerifiedClass)&&!isEmpty) - el.addClass(opt.onceVerifiedClass) - - if(isEmpty) - el.parents('label').addClass(opt.emptyClass) - - if(isInvalid&&!isEmpty&&isRequired) - el.parents('label') - .removeClass(opt.emptyClass) - .removeClass(opt.okClass) - .addClass(opt.invalidClass) - - if(isInvalid&&!isRequired&&el.val()) - el.parents('label') - .removeClass(opt.emptyClass) - .removeClass(opt.okClass) - .addClass(opt.invalidClass) - - if(!result.length) - el.parents('label') - .removeClass(opt.invalidClass) - .removeClass(opt.emptyClass) - .addClass(opt.okClass) - } - - function fieldDesolation(el){ - el - .removeClass(opt.onceVerifiedClass) - .parents('label') - .removeClass(opt.invalidClass) - .removeClass(opt.emptyClass) - .removeClass(opt.okClass) - } - - function getValue(el){ - return el.val()||false - } - - function formSubmit(){ - var $this=$(this) - ,modal=$('.'+opt.responseMessageClass) - ,responseMessage - - modal.on('hidden.bs.modal',function(){ - if(responseMessage!=='success') - $('#recaptcha_reload',form).click() - ,$('#recaptcha_response_field',form).focus() - }) - - $('[data-constraints]',form).trigger('validate.form') - - if($('#recaptcha_response_field',form).val()==='') - $('label.recaptcha',form).addClass(opt.emptyClass) - - if(!$('label.'+opt.invalidClass+',label.'+opt.emptyClass,form).length&&!form.hasClass(opt.processingClass)){ - form.addClass(opt.processingClass) - $this.ajaxSubmit(function(e,d,a,c){ - responseMessage=e - if(e=='success'){ - form - .removeClass(opt.processingClass) - .addClass(opt.successClass) - - modal.find('.modal-title').text('Success!') - modal.find('.modal-body').text('Your message has been successfully sent!') - - setTimeout(function(){ - form - .removeClass(opt.successClass) - .trigger('reset') - },opt.successShowDelay) - }else{ - modal.find('.modal-title').text('Error!') - modal.find('.modal-body').html(e) - - form - .removeClass(opt.processingClass) - .addClass(opt.responseErrorClass) - - $('#recaptcha_response_field',form).val('') - - setTimeout(function(){ - form - .removeClass(opt.responseErrorClass) - //.trigger('reset') - },opt.successShowDelay) - } - modal.modal({keyboard:true}) - }) - } - return false - } - - function formReset(){ - fieldDesolation($('[data-constraints]',form)) - } - - function showRecaptcha(){ - $('label.recaptcha',form) - .append('
') - - Recaptcha.create( - opt.recaptchaPublicKey - ,'captchadiv' - , { - theme:opt.capchaTheme - } - ) - - form - .on('focus','#recaptcha_response_field',function(){ - $(this).parents('label').removeClass(opt.emptyClass) - }) - } - } - } -})(jQuery) - -;(function($){ - $.fn.TMPlaceholder=function(opt){ - return this.each(function(){ - var th=$(this) - ,placeholder_text - ,placeholder - - opt=$.extend({ - placeholderClass:'_placeholder' - ,placeholderFocusedClass:'focused' - ,placeholderHiddenClass:'hidden' - },opt) - - init() - - function init(){ - placeholder_text=th.attr('placeholder') - placeholder=$(document.createElement('span')) - placeholder - .addClass(opt.placeholderClass) - .css({ - left:th.prop('offsetLeft') - ,top:th.prop('offsetTop') - ,width:th.width() - ,height:th.outerHeight() - }) - .text(placeholder_text) - .appendTo(th.parent()) - .click(function(){ - th.focus() - return false - }) - .on('contextmenu',function(){ - th.trigger('hide.placeholder').focus() - }) - - th - .val('') - .removeAttr('placeholder') - .on('hide.placeholder',function(){ - placeholder.addClass(opt.placeholderHiddenClass) - }) - .on('show.placeholder',function(){ - placeholder.removeClass(opt.placeholderHiddenClass) - }) - .on('focus',function(){ - placeholder.addClass(opt.placeholderFocusedClass) - }) - .on('blur',function(){ - var val=th.val() - if(val===''||val===placeholder_text) - th.val('') - ,th.trigger('show.placeholder') - placeholder.removeClass(opt.placeholderFocusedClass) - }) - .on('keydown',function(e){ - if(e.keyCode===32||e.keyCode>46) - th.trigger('hide.placeholder') - }) - .on('keyup',function(){ - if(th.val()===''){ - th.trigger('show.placeholder') - return false - }else{ - th.trigger('hide.placeholder') - } - }) - .parents('form').on('reset',function(){ - th.trigger('show.placeholder') - }) - } - }) - } -})(jQuery) -//using suggested jQuery practice by passing jQuery into a function -//in order to have $ notation without conflicting with other libraries -//Author: Troy Ingram -eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(4(a){3(n j===\'4\'&&j.w){j([\'x\'],a)}e{a(r)}}(4(b){u $=b,7={9:4(a){3(2 d b){3(!a)a={};3(2.8().c>0){$.g(h,a,{i:2.8()})}}5.9(a);6 2},k:4(a){3(2 d b){3(!a)a={};3(2.8().c>0){$.g(h,a,{i:2.8()})}}5.k(a);6 2},p:4(a){3(2 d b){3(!a)a={};3(2.8().c>0){$.g(h,a,{i:2.8()})}}6 5.p(a)},q:4(a){5.q(a);6 2},m:4(a){5.m(a);6 2},s:4(a){5.s(a);6 2}};7.t=7.9;7.v=7.k;$.C.5=f;$.5=f;4 f(a){3(7[a]){6 7[a].l(2,y.z.A.B(o,1))}e 3(n a===\'D\'||!a){6 7.9.l(2,o)}e{$.E(\'F \'+a+\' G H I t r.5\')}}}));',45,45,'||this|if|function|regula|return|methods|get|bind|||length|instanceof|else|CallMethod|extend|true|elements|define|unbind|apply|compound|typeof|arguments|validate|custom|jQuery|override|on|var|off|amd|jquery|Array|prototype|slice|call|fn|object|error|Method|does|not|exist'.split('|'),0,{})) -/* - Regula: An annotation-based form-validation framework in Javascript - Version 1.2.4-SNAPSHOT - - Written By Vivin Paliath (http://vivin.net) - License: BSD License - - TODO: Add step validation to regula (like html5 step validation) - TODO: Add URL validation to regula (like html5 url validation) - Copyright (C) 2010-2012 - */ -eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('1a 1v={4S:1e(){},2h:1e(){},3A:1e(){},1t:1e(){},1u:1e(){},26:1e(){},2I:1e(){},37:{},4J:{},4I:{}},1v=1e(){1e G(){i={1U:{}}}1e t(a,b){1a c=H.4q;"1s"!==1n b.4l&&(c=!b.4l);1j!(N.2j(a)&&!c)}1e O(){1a a=!1;1b("2q"===1m.1R.1T()&&""!==1m.1E.1J(/\\s/g,""))1i(1a b=I(2n.4g,"2e","1E",1m.1E),c=0;c=2u(a.1z));1j b},1k:o.3u,1t:!1,1u:!1,1o:["1z"],1D:"{1N} 2D 1p 1A 5Y 4K 2m 4G 1p {1z}."},3d:{1y:!1,1B:1e(a){1a b=!0;t(1m,a)&&(b=""!=1m.1z.1J(/\\s/g,"")&&2u(1m.1z)<=2u(a.2Q)&&2u(1m.1z)>=2u(a.2S));1j b},1k:o.3d,1t:!1,1u:!1,1o:["2S","2Q"],1D:"{1N} 2D 1p 1A 4z {2S} 2k {2Q}."},3g:{1y:!1,1B:P,1k:o.3g,1t:!1,1u:!1,1o:[],1D:"{1N} 3E 1A 4y."},3f:{1y:!1,1B:N,1k:o.3f,1t:!1,1u:!1,1o:[],1D:"{1N} 2D 1p 1A 4y."},3e:{1y:!1,1B:1e(a){1a b=!0;t(1m,a)&&(b="24"===1n a.2O?a.2O.1J(/^\\//,"").1J(/\\/$/,""):a.2O,b=("1s"!==1n a.3z?2G(b.3R().1J(/^\\//,"").1J(/\\/[^\\/]*$/,""),a.3z):2G(b)).25(1m.1z));1j b},1k:o.3e,1t:!1,1u:!1,1o:["2O"],1D:"{1N} 2D 1p 4v {2O}{3z}."},3q:{1y:!1,1B:1e(a){1a b=!0;t(1m,a)&&(b=/[a-2s-9!#$%&\'*+/=?^2C`{|}~-]+(?:\\.[a-2s-9!#$%&\'*+/=?^2C`{|}~-]+)*@(?:[a-2s-9](?:[a-2s-9-]*[a-2s-9])?\\.)+[a-2s-9](?:[a-2s-9-]*[a-2s-9])?/i.25(1m.1z));1j b},1k:o.3q,1t:!1,1u:!1,1o:[],1D:"{1N} 1P 23 a 2J 66."},3h:{1y:!1,1B:1e(a){1a b=!0;t(1m,a)&&(b=/^[A-3H-z]+$/.25(1m.1z));1j b},1k:o.3h,1t:!1,1u:!1,1o:[],1D:"{1N} 3o 2a 3Z 5v."},3J:{1y:!1,1B:1e(a){1a b=!0;t(1m,a)&&(b=/^[0-9]+$/.25(1m.1z));1j b},1k:o.3J,1t:!1,1u:!1,1o:[],1D:"{1N} 3o 2a 3Z 5u."},3j:{1y:!1,1B:1e(a){1a b=!0;t(1m,a)&&(b=/^[0-4R-3H-z]+$/.25(1m.1z));1j b},1k:o.3j,1t:!1,1u:!1,1o:[],1D:"{1N} 3o 2a 3Z 5u 2k 5v."},3i:{1y:!1,1B:1e(a){1a b=!0;t(1m,a)&&(b=/^-?[0-9]+$/.25(1m.1z));1j b},1k:o.3i,1t:!1,1u:!1,1o:[],1D:"{1N} 29 1A 1S 2R."},3G:{1y:!1,1B:1e(a){1a b=!0;t(1m,a)&&(b=/^-?([0-9]+(\\.[0-9]+)?|\\.[0-9]+)$/.25(1m.1z));1j b},1k:o.3G,1t:!1,1u:!1,1o:[],1D:"{1N} 29 1A a 6a 32."},3r:{1y:!0,1B:1e(){1i(1a a=[],b=0;b<1m.1O.1g;b++){1a c=1m.1O[b];Q.2j(c)||a.1I(c)}1j a},1k:o.3r,1t:!1,1u:!1,1o:[],1D:"{1N} 29 1A 6b 6c."},3M:{1y:!0,1B:1e(a){1a b=[],c=2n.2K(a.5t),a=2n.2K(a.5o);c.1z!=a.1z&&(b=[c,a]);1j b},1k:o.3M,1t:!1,1u:!1,1o:["5t","5o"],1D:"5C 6g 23 4v."},3x:{1y:!1,1B:Q,1k:o.3x,1t:!1,1u:!1,1o:[],1D:"{1N} 1P 4e."},3B:{1y:!1,1B:1e(a){1j 1m.1z.1g>=a.2S&&1m.1z.1g<=a.2Q},1k:o.3B,1t:!1,1u:!1,1o:["2S","2Q"],1D:"{1N} 1g 29 1A 4z {2S} 2k {2Q}."},3s:{1y:!1,1B:1e(a){1a b=!0;1b(t(1m,a)){1a c=1m.1z.1J(/\\s/g,""),d=c.2H(/\\./),b=!1;0a.3P);1j b},1k:o.3w,1t:!1,1u:!1,1o:["3W"],1D:"{1N} 29 1A 1l 1w 6l."}},y={3L:1e(){},3n:1e(){},2x:1e(){},4N:1e(){},42:1e(){},43:1e(){}},46=1e(a){1i(1a b={2L:a.2L,1E:a.1E,1R:a.1R,22:[]},c=0;ce.5b.3R().59("2w"))1r"1v.1t 1K 1w 1o 1G 1l 1w 1L 1W 1p 1A 1S 2B";1b("24"!=1n a)1r"1v.1t 1K 1w 1D 1G 1l 1w 1L 1W 1p 1A a 24";1b(h[b])1r"4L 1P 4C a 1M 4p "+b+". 2v 2p 5p 1p 26 1m 1M, 5l 1v.26";o[b]=E;q[E++]=b;h[b]={1y:c,1B:d,1k:o[b],1t:!0,1u:!1,1o:e,1D:a}},1u:1e(a){1b(!a)1r"1v.1u 1K 1L";1a b=a.1E,c=a.1V||[],d=a.1y||!1,e=a.1D||"",f=a.1o||[],a="1s"===1n a.38?!1:a.38;1b(!b)1r"1v.1u 1K a 1E 1G 1l 1w 1L 1W";1b("24"!=1n b)1r"1v.1u 1K 1E 1p 1A a 24 2g";1b(0>f.5b.3R().59("2w"))1r"1v.1u 1K 1w 1o 1G 1l 1w 1L 1W 1p 1A 1S 2B";1b(0==c.1g)1r"1v.1u 1K 1S 2B 3m 3Q 1V 5e a 1V 1G 1l 1w 1L 1W";1b(h[b])1r"1v.1u: 4L 1P 4C a 1M 4p "+b+". 2v 2p 5p 1p 26 1m 1M, 5l 1v.26";Y(b,c,f);o[b]=E;q[E++]=b;h[b]={1y:d,1k:o[b],1t:!0,1u:!0,1o:f,38:a,2N:c,1D:e,1B:5m};X(b,c)},26:1e(a){1b(!a)1r"1v.26 1K 1L";1b("1s"===1n a.1k)1r"1v.26 1K a 2J 1k 1G 1l 1w 1L 1W";1a b=q[a.1k];1b("1s"===1n b)1r"1v.26: I 6N 23 3K 1w 3F 1M. 6O 1Z 3N 23 2P 5g? 5q 5r: "+r(a);1a c=h[b].1y;h[b].1t&&(c="1s"===1n a.1y?h[b].1y:a.1y);1a d=h[b].1t&&!h[b].1u?a.1B||h[b].1B:h[b].1B,e=h[b].1t?a.1o||h[b].1o:h[b].1o,f=a.1D||h[b].1D,i=h[b].1u,m=a.1V||h[b].1V;1b("2T"!=1n c)1r"1v.26 1K 1w 1y 1G 1l 1w 1L 1W 1p 1A a 2T";1b("1e"!=1n d)1r"1v.26 1K 1w 1B 1G 1l 1w 1L 1W 1p 1A a 1e";1b(!(e 2V 2w))1r"1v.26 1K 1w 1o 1G 1l 1w 1L 1W 1p 1A 1S 2B";1b("24"!=1n f)1r"1v.26 1K 1w 1D 1G 1l 1w 1L 1W 1p 1A a 24";1b(i){Y(b,m,e);1a j=y.43();X(b,m);a=y.2x(y.3n(a.1k));1b(a.2x)1r y.42(j),"1v.26: 2r 6P 3Q-1V 2p 2f 3F 2f 6Q a 6R 6S: "+a.4f;}h[b]={1y:c,1k:o[b],1t:!0,1u:i,1o:e,2N:m,1D:f,1B:d}},37:o,4J:v,4I:{3U:"3U",3T:"3T",44:"44"}}}();',62,427,'||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||var|if|successful|message|function|data|length|null|for|return|constraintType|in|this|typeof|params|to|else|throw|undefined|custom|compound|regula|the|groups|formSpecific|value|be|validator|shift|defaultMessage|name|hasOwnProperty|attribute|id|push|replace|expects|options|constraint|label|elements|is|group|type|an|toLowerCase|Default|constraints|argument|elementId|element|it|||children|not|string|test|override|Invalid|form|must|only|select|__size__|tagName|input|have|parameter|bind|with|call|and|charAt|or|document|provided|you|radio|The|z0|Not|parseFloat|If|Array|cycleExists|textarea|bound|delete|array|_|needs|unshift|character|RegExp|split|validate|valid|getElementById|visited|definition|composingConstraints|regex|been|max|integer|min|boolean|independent|instanceof|are|Year|checkbox|starting|Can|include|number|error|any|failingElements|Selected|Constraint|reportAsSingleViolation|composingConstraintViolations|Checked|fraction|Month|Range|Pattern|Blank|NotBlank|Alpha|Integer|AlphaNumeric|list|Day|of|getNodeByType|can|but|Email|CompletelyFilled|Digits|Past|Min|Max|Future|Required|Element|flags|unbind|Length|Undefined|No|cannot|specified|Real|Za|trying|Numeric|find|addNode|PasswordsMatch|has|You|dateToTestAgainst|composing|toString|getAttribute|MDY|DMY|was|format|new|Date|contain|aa|text|setRoot|clone|YMD|dateToValidate|ca|button|empty|does|expected|constraintPassed|ba|Parameter|required|path|body|checked|void|removeChildren|regular|ignoreEmpty|expression|true|that|called|validateEmptyFields|Validation|Cannot|attached|arguments|match|Math|matching|blank|between|closing|fa|already|non|z_|after|equal|ga|DateFormat|Group|than|There|following|getRoot|box|constraintParameters|password|9A|configure|ha|ia|digits|ja|ka|separator|la|ma|substring|na|oa|Between|date|Matches|selectedIndex|Empty|indexOf|NotEmpty|constructor|found|IsAlpha|under|applicable|defined|IsNumeric|msg|ea|IsAlphaNumeric|use|da|all|field2|wish|Function|received|need|field1|numbers|letters|constraintName|Unterminated|literal|quoted|In|callee|Passwords|debug|hasn|__dontcare__|111|110|101|100|011|010|001|000|area|field|strings|enums|each|selected|overwriteParameters|lesser|overwriteConstraint|unexpected|greater|HTMLElement|nodeType|random|1E6|floor|generated|no|email|start|definitions|before|real|completely|filled|define|Unexpected|getElementsByTagName|do|up|digit|fractional|past|future|positive|parentheses|unmatched|might|false|negative|identifier|pop|missing|RootNode|still|parameters|optional|some|failed|requires|seem|However|concat|accept|least|at|boxes|nor|neither|buttons|checkboxes|could|Perhaps|overriding|created|cyclic|composition'.split('|'),0,{})); -/*! - * jQuery Form Plugin - * version: 3.50.0-2014.02.05 - * Requires jQuery v1.5 or later - * Copyright (c) 2013 M. Alsup - * Examples and documentation at: http://malsup.com/jquery/form/ - * Project repository: https://github.com/malsup/form - * Dual licensed under the MIT and GPL licenses. - * https://github.com/malsup/form#copyright-and-license - */ -eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(6(a){"3o 3p";3(1d 2E===\'6\'&&2E.4y){2E([\'2F\'],a)}R{a((1d(3q)!=\'1b\')?3q:1e.4z)}}(6($){"3o 3p";4 P={};P.2G=$("<1l S=\'2e\'/>").1T(0).3r!==1b;P.3s=1e.3t!==1b;4 Q=!!$.12.2H;$.12.1F=6(){3(!Q){8 5.1g.1G(5,24)}4 a=5.2H.1G(5,24);3((a&&a.2F)||1d a===\'2f\'){8 a}8 5.1g.1G(5,24)};$.12.1n=6(y){3(!5.Y){Z(\'1n: 4A 16 4B - 4C 4D 25\');8 5}4 z,1t,19,$9=5;3(1d y==\'6\'){y={1c:y}}R 3(y===1b){y={}}z=y.S||5.1F(\'3u\');1t=y.19||5.1F(\'1t\');19=(1d 1t===\'2f\')?$.4E(1t):\'\';19=19||1e.2I.2J||\'\';3(19){19=(19.4F(/^([^#]+)/)||[])[1]}y=$.2K(1j,{19:19,1c:$.1U.1c,S:z||$.1U.S,26:/^4G/i.1u(1e.2I.2J||\'\')?\'3v:18\':\'4H:4I\'},y);4 A={};5.1h(\'9-2L-3w\',[5,y,A]);3(A.3x){Z(\'1n: 16 3y 2g 9-2L-3w 1h\');8 5}3(y.2M&&y.2M(5,y)===18){Z(\'1n: 16 1o 2g 2M 2N\');8 5}4 B=y.2O;3(B===1b){B=$.1U.2O}4 C=[];4 D,a=5.2P(y.4J,C);3(y.1a){y.11=y.1a;D=$.1V(y.1a,B)}3(y.2Q&&y.2Q(a,5,y)===18){Z(\'1n: 16 1o 2g 2Q 2N\');8 5}5.1h(\'9-16-3z\',[a,5,y,A]);3(A.3x){Z(\'1n: 16 3y 2g 9-16-3z 1h\');8 5}4 q=$.1V(a,B);3(D){q=(q?(q+\'&\'+D):D)}3(y.S.4K()==\'4L\'){y.19+=(y.19.2h(\'?\')>=0?\'&\':\'?\')+q;y.1a=13}R{y.1a=q}4 E=[];3(y.2R){E.W(6(){$9.2R()})}3(y.2S){E.W(6(){$9.2S(y.4M)})}3(!y.27&&y.1v){4 F=y.1c||6(){};E.W(6(a){4 b=y.4N?\'3A\':\'4O\';$(y.1v)[b](a).1H(F,24)})}R 3(y.1c){E.W(y.1c)}y.1c=6(a,b,c){4 d=y.1i||5;1f(4 i=0,1p=E.Y;i<1p;i++){E[i].1G(d,[a,b,c||$9,$9])}};3(y.17){4 G=y.17;y.17=6(a,b,c){4 d=y.1i||5;G.1G(d,[a,b,c,$9])}}3(y.1I){4 H=y.1I;y.1I=6(a,b){4 c=y.1i||5;H.1G(c,[a,b,$9])}}4 I=$(\'1l[S=2e]:4P\',5).4Q(6(){8 $(5).1J()!==\'\'});4 J=I.Y>0;4 K=\'2i/9-1a\';4 L=($9.1g(\'2j\')==K||$9.1g(\'2T\')==K);4 M=P.2G&&P.3s;Z("4R :"+M);4 N=(J||L)&&!M;4 O;3(y.28!==18&&(y.28||N)){3(y.3B){$.1T(y.3B,6(){O=2U(a)})}R{O=2U(a)}}R 3((J||L)&&M){O=3C(a)}R{O=$.3D(y)}$9.4S(\'3E\').1a(\'3E\',O);1f(4 k=0;k\');$V.59({3M:\'5a\',3P:\'-3Q\',3R:\'-3Q\'})}V=$V[0];7={1o:0,1q:13,1X:13,1k:0,1y:\'n/a\',5b:6(){},2X:6(){},5c:6(){},1x:6(a){4 e=(a===\'1z\'?\'1z\':\'1o\');Z(\'5d 2m... \'+e);5.1o=1;1A{3(V.29.1r.3S){V.29.1r.3S(\'5e\')}}1N(5f){}$V.1g(\'2W\',s.26);7.17=e;3(s.17){s.17.1w(s.1i,7,e,a)}3(g){$.1O.1h("3T",[7,s,e])}3(s.1I){s.1I.1w(s.1i,7,e)}}};g=s.3U;3(g&&0===$.2Y++){$.1O.1h("5g")}3(g){$.1O.1h("5h",[7,s])}3(s.2n&&s.2n.1w(s.1i,7,s)===18){3(s.3U){$.2Y--}m.2a();8 m}3(7.1o){m.2a();8 m}1L=l.1B;3(1L){n=1L.T;3(n&&!1L.1M){s.11=s.11||{};s.11[n]=1L.U;3(1L.S=="1Y"){s.11[n+\'.x\']=l.1P;s.11[n+\'.y\']=l.1Q}}}4 o=1;4 p=2;6 2Z(a){4 b=13;1A{3(a.29){b=a.29.1r}}1N(1m){Z(\'30 1T 28.29 1r: \'+1m)}3(b){8 b}1A{b=a.31?a.31:a.1r}1N(1m){Z(\'30 1T 28.31: \'+1m);b=a.1r}8 b}4 q=$(\'3V[T=3W-5i]\').1g(\'2q\');4 r=$(\'3V[T=3W-1V]\').1g(\'2q\');3(r&&q){s.11=s.11||{};s.11[r]=q}6 32(){4 t=$9.1F(\'1v\'),a=$9.1F(\'1t\'),K=\'2i/9-1a\',3X=$9.1g(\'2j\')||$9.1g(\'2T\')||K;l.1Z(\'1v\',1K);3(!z||/3Y/i.1u(z)){l.1Z(\'3u\',\'3J\')}3(a!=s.19){l.1Z(\'1t\',s.19)}3(!s.5j&&(!z||/3Y/i.1u(z))){$9.1g({2T:\'2i/9-1a\',2j:\'2i/9-1a\'})}3(s.1z){1W=1R(6(){2o=1j;1C(o)},s.1z)}6 33(){1A{4 a=2Z(V).5k;Z(\'5l = \'+a);3(a&&a.20()==\'5m\'){1R(33,50)}}1N(e){Z(\'5n 1x: \',e,\' (\',e.T,\')\');1C(p);3(1W){3Z(1W)}1W=1b}}4 b=[];1A{3(s.11){1f(4 n 5o s.11){3(s.11.34(n)){3($.5p(s.11[n])&&s.11[n].34(\'T\')&&s.11[n].34(\'U\')){b.W($(\'<1l S="35" T="\'+s.11[n].T+\'">\').1J(s.11[n].U).36(l)[0])}R{b.W($(\'<1l S="35" T="\'+n+\'">\').1J(s.11[n]).36(l)[0])}}}}3(!s.2p){$V.36(\'21\')}3(V.40){V.40(\'41\',1C)}R{V.3L(\'42\',1C,18)}1R(33,15);1A{l.16()}1N(1m){4 c=1r.5q(\'9\').16;c.1G(l)}}5r{l.1Z(\'1t\',a);l.1Z(\'2j\',3X);3(t){l.1Z(\'1v\',t)}R{$9.3O(\'1v\')}$(b).43()}}3(s.5s){32()}R{1R(32,10)}4 u,14,44=50,37;6 1C(e){3(7.1o||37){8}14=2Z(V);3(!14){Z(\'30 5t 5u 1r\');e=p}3(e===o&&7){7.1x(\'1z\');m.2a(7,\'1z\');8}R 3(e==p&&7){7.1x(\'45 1x\');m.2a(7,\'17\',\'45 1x\');8}3(!14||14.2I.2J==s.26){3(!2o){8}}3(V.46){V.46(\'41\',1C)}R{V.5v(\'42\',1C,18)}4 c=\'1c\',1D;1A{3(2o){5w\'1z\';}4 d=s.27==\'1s\'||14.38||$.5x(14);Z(\'5y=\'+d);3(!d&&1e.2r&&(14.21===13||!14.21.47)){3(--44){Z(\'5z 5A 2N, 39 3a 5B\');1R(1C,5C);8}}4 f=14.21?14.21:14.2s;7.1q=f?f.47:13;7.1X=14.38?14.38:14;3(d){s.27=\'1s\'}7.2X=6(a){4 b={\'2q-S\':s.27};8 b[a.20()]};3(f){7.1k=48(f.2t(\'1k\'))||7.1k;7.1y=f.2t(\'1y\')||7.1y}4 h=(s.27||\'\').20();4 i=/(3b|49|2u)/.1u(h);3(i||s.2v){4 j=14.2w(\'2v\')[0];3(j){7.1q=j.U;7.1k=48(j.2t(\'1k\'))||7.1k;7.1y=j.2t(\'1y\')||7.1y}R 3(i){4 k=14.2w(\'2L\')[0];4 b=14.2w(\'21\')[0];3(k){7.1q=k.2x?k.2x:k.4a}R 3(b){7.1q=b.2x?b.2x:b.4a}}}R 3(h==\'1s\'&&!7.1X&&7.1q){7.1X=v(7.1q)}1A{u=x(7,h,s)}1N(1m){c=\'2y\';7.17=1D=(1m||c)}}1N(1m){Z(\'17 5D: \',1m);c=\'17\';7.17=1D=(1m||c)}3(7.1o){Z(\'2m 1o\');c=13}3(7.1k){c=(7.1k>=5E&&7.1k<5F||7.1k===5G)?\'1c\':\'17\'}3(c===\'1c\'){3(s.1c){s.1c.1w(s.1i,u,\'1c\',7)}m.5H(7.1q,\'1c\',7);3(g){$.1O.1h("5I",[7,s])}}R 3(c){3(1D===1b){1D=7.1y}3(s.17){s.17.1w(s.1i,7,c,1D)}m.2a(7,\'17\',1D);3(g){$.1O.1h("3T",[7,s,1D])}}3(g){$.1O.1h("5J",[7,s])}3(g&&!--$.2Y){$.1O.1h("5K")}3(s.1I){s.1I.1w(s.1i,7,c)}37=1j;3(s.1z){3Z(1W)}1R(6(){3(!s.2p){$V.43()}R{$V.1g(\'2W\',s.26)}7.1X=13},2V)}4 v=$.5L||6(s,a){3(1e.4b){a=2l 4b(\'5M.5N\');a.5O=\'18\';a.5P(s)}R{a=(2l 5Q()).5R(s,\'2u/1s\')}8(a&&a.2s&&a.2s.4c!=\'2y\')?a:13};4 w=$.5S||6(s){8 1e[\'5T\'](\'(\'+s+\')\')};4 x=6(a,b,s){4 c=a.2X(\'2q-S\')||\'\',1s=b===\'1s\'||!b&&c.2h(\'1s\')>=0,u=1s?a.1X:a.1q;3(1s&&u.2s.4c===\'2y\'){3($.17){$.17(\'2y\')}}3(s&&s.4d){u=s.4d(u,b)}3(1d u===\'2f\'){3(b===\'3b\'||!b&&c.2h(\'3b\')>=0){u=w(u)}R 3(b==="49"||!b&&c.2h("3v")>=0){$.5U(u)}}8 u};8 m}};$.12.3c=6(a){a=a||{};a.2z=a.2z&&$.5V($.12.3d);3(!a.2z&&5.Y===0){4 o={s:5.22,c:5.1i};3(!$.4e&&o.s){Z(\'39 3a 4f, 5W 3c\');$(6(){$(o.s,o.c).3c(a)});8 5}Z(\'5X; 5Y 4g 5Z 60 22\'+($.4e?\'\':\' (39 3a 4f)\'));8 5}3(a.2z){$(1r).4h(\'16.9-1E\',5.22,2A).4h(\'2B.9-1E\',5.22,2C).3d(\'16.9-1E\',5.22,a,2A).3d(\'2B.9-1E\',5.22,a,2C);8 5}8 5.4i().4j(\'16.9-1E\',a,2A).4j(\'2B.9-1E\',a,2C)};6 2A(e){4 a=e.1a;3(!e.61()){e.62();$(e.1v).1n(a)}}6 2C(e){4 a=e.1v;4 b=$(a);3(!(b.4k("[S=16],[S=1Y]"))){4 t=b.63(\'[S=16]\');3(t.Y===0){8}a=t[0]}4 c=5;c.1B=a;3(a.S==\'1Y\'){3(e.4l!==1b){c.1P=e.4l;c.1Q=e.64}R 3(1d $.12.4m==\'6\'){4 d=b.4m();c.1P=e.4n-d.3R;c.1Q=e.4o-d.3P}R{c.1P=e.4n-a.65;c.1Q=e.4o-a.66}}1R(6(){c.1B=c.1P=c.1Q=13},2V)}$.12.4i=6(){8 5.67(\'16.9-1E 2B.9-1E\')};$.12.2P=6(b,c){4 a=[];3(5.Y===0){8 a}4 d=5[0];4 e=5.1g(\'1K\');4 f=b?d.2w(\'*\'):d.4g;4 g;3(f&&!/4p [68]/.1u(4q.4r)){f=$(f).1T()}3(e){g=$(\':1l[9=\'+e+\']\').1T();3(g.Y){f=(f||[]).69(g)}}3(!f||!f.Y){8 a}4 i,j,n,v,X,1p,3e;1f(i=0,1p=f.Y;i<1p;i++){X=f[i];n=X.T;3(!n||X.1M){3f}3(b&&d.1B&&X.S=="1Y"){3(d.1B==X){a.W({T:n,U:$(X).1J(),S:X.S});a.W({T:n+\'.x\',U:d.1P},{T:n+\'.y\',U:d.1Q})}3f}v=$.2b(X,1j);3(v&&v.2D==2c){3(c){c.W(X)}1f(j=0,3e=v.Y;j<3e;j++){a.W({T:n,U:v[j]})}}R 3(P.2G&&X.S==\'2e\'){3(c){c.W(X)}4 h=X.3r;3(h.Y){1f(j=0;j') if($('label.recaptcha',form).length!==0&&window.Recaptcha) showRecaptcha() } function fieldValidate(el){ var el=$(this) ,result=el.regula('validate') ,isEmpty=false ,isInvalid=false ,isRequired=!!~el.data('constraints').indexOf('@Required') $.each(result,function(){ if(this.constraintName==='Required') isEmpty=true else isInvalid=true }) if(!el.hasClass(opt.onceVerifiedClass)&&!isEmpty) el.addClass(opt.onceVerifiedClass) if(isEmpty) el.parents('label').addClass(opt.emptyClass) if(isInvalid&&!isEmpty&&isRequired) el.parents('label') .removeClass(opt.emptyClass) .removeClass(opt.okClass) .addClass(opt.invalidClass) if(isInvalid&&!isRequired&&el.val()) el.parents('label') .removeClass(opt.emptyClass) .removeClass(opt.okClass) .addClass(opt.invalidClass) if(!result.length) el.parents('label') .removeClass(opt.invalidClass) .removeClass(opt.emptyClass) .addClass(opt.okClass) } function fieldDesolation(el){ el .removeClass(opt.onceVerifiedClass) .parents('label') .removeClass(opt.invalidClass) .removeClass(opt.emptyClass) .removeClass(opt.okClass) } function getValue(el){ return el.val()||false } function formSubmit(){ var $this=$(this) ,modal=$('.'+opt.responseMessageClass) ,responseMessage modal.on('hidden.bs.modal',function(){ if(responseMessage!=='success') $('#recaptcha_reload',form).click() ,$('#recaptcha_response_field',form).focus() }) $('[data-constraints]',form).trigger('validate.form') if($('#recaptcha_response_field',form).val()==='') $('label.recaptcha',form).addClass(opt.emptyClass) if(!$('label.'+opt.invalidClass+',label.'+opt.emptyClass,form).length&&!form.hasClass(opt.processingClass)){ form.addClass(opt.processingClass) $this.ajaxSubmit(function(e,d,a,c){ responseMessage=e if(e=='success'){ form .removeClass(opt.processingClass) .addClass(opt.successClass) modal.find('.modal-title').text('Success!') modal.find('.modal-body').text('Your message has been successfully sent!') setTimeout(function(){ form .removeClass(opt.successClass) .trigger('reset') },opt.successShowDelay) }else{ modal.find('.modal-title').text('Error!') modal.find('.modal-body').html(e) form .removeClass(opt.processingClass) .addClass(opt.responseErrorClass) $('#recaptcha_response_field',form).val('') setTimeout(function(){ form .removeClass(opt.responseErrorClass) //.trigger('reset') },opt.successShowDelay) } modal.modal({keyboard:true}) }) } return false } function formReset(){ fieldDesolation($('[data-constraints]',form)) } function showRecaptcha(){ $('label.recaptcha',form) .append('
') Recaptcha.create( opt.recaptchaPublicKey ,'captchadiv' , { theme:opt.capchaTheme } ) form .on('focus','#recaptcha_response_field',function(){ $(this).parents('label').removeClass(opt.emptyClass) }) } } } })(jQuery) ;(function($){ $.fn.TMPlaceholder=function(opt){ return this.each(function(){ var th=$(this) ,placeholder_text ,placeholder opt=$.extend({ placeholderClass:'_placeholder' ,placeholderFocusedClass:'focused' ,placeholderHiddenClass:'hidden' },opt) init() function init(){ placeholder_text=th.attr('placeholder') placeholder=$(document.createElement('span')) placeholder .addClass(opt.placeholderClass) .css({ left:th.prop('offsetLeft') ,top:th.prop('offsetTop') ,width:th.width() ,height:th.outerHeight() }) .text(placeholder_text) .appendTo(th.parent()) .click(function(){ th.focus() return false }) .on('contextmenu',function(){ th.trigger('hide.placeholder').focus() }) th .val('') .removeAttr('placeholder') .on('hide.placeholder',function(){ placeholder.addClass(opt.placeholderHiddenClass) }) .on('show.placeholder',function(){ placeholder.removeClass(opt.placeholderHiddenClass) }) .on('focus',function(){ placeholder.addClass(opt.placeholderFocusedClass) }) .on('blur',function(){ var val=th.val() if(val===''||val===placeholder_text) th.val('') ,th.trigger('show.placeholder') placeholder.removeClass(opt.placeholderFocusedClass) }) .on('keydown',function(e){ if(e.keyCode===32||e.keyCode>46) th.trigger('hide.placeholder') }) .on('keyup',function(){ if(th.val()===''){ th.trigger('show.placeholder') return false }else{ th.trigger('hide.placeholder') } }) .parents('form').on('reset',function(){ th.trigger('show.placeholder') }) } }) } })(jQuery) //using suggested jQuery practice by passing jQuery into a function //in order to have $ notation without conflicting with other libraries //Author: Troy Ingram eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(4(a){3(n j===\'4\'&&j.w){j([\'x\'],a)}e{a(r)}}(4(b){u $=b,7={9:4(a){3(2 d b){3(!a)a={};3(2.8().c>0){$.g(h,a,{i:2.8()})}}5.9(a);6 2},k:4(a){3(2 d b){3(!a)a={};3(2.8().c>0){$.g(h,a,{i:2.8()})}}5.k(a);6 2},p:4(a){3(2 d b){3(!a)a={};3(2.8().c>0){$.g(h,a,{i:2.8()})}}6 5.p(a)},q:4(a){5.q(a);6 2},m:4(a){5.m(a);6 2},s:4(a){5.s(a);6 2}};7.t=7.9;7.v=7.k;$.C.5=f;$.5=f;4 f(a){3(7[a]){6 7[a].l(2,y.z.A.B(o,1))}e 3(n a===\'D\'||!a){6 7.9.l(2,o)}e{$.E(\'F \'+a+\' G H I t r.5\')}}}));',45,45,'||this|if|function|regula|return|methods|get|bind|||length|instanceof|else|CallMethod|extend|true|elements|define|unbind|apply|compound|typeof|arguments|validate|custom|jQuery|override|on|var|off|amd|jquery|Array|prototype|slice|call|fn|object|error|Method|does|not|exist'.split('|'),0,{})) /* Regula: An annotation-based form-validation framework in Javascript Version 1.2.4-SNAPSHOT Written By Vivin Paliath (http://vivin.net) License: BSD License TODO: Add step validation to regula (like html5 step validation) TODO: Add URL validation to regula (like html5 url validation) Copyright (C) 2010-2012 */ eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('1a 1v={4S:1e(){},2h:1e(){},3A:1e(){},1t:1e(){},1u:1e(){},26:1e(){},2I:1e(){},37:{},4J:{},4I:{}},1v=1e(){1e G(){i={1U:{}}}1e t(a,b){1a c=H.4q;"1s"!==1n b.4l&&(c=!b.4l);1j!(N.2j(a)&&!c)}1e O(){1a a=!1;1b("2q"===1m.1R.1T()&&""!==1m.1E.1J(/\\s/g,""))1i(1a b=I(2n.4g,"2e","1E",1m.1E),c=0;c=2u(a.1z));1j b},1k:o.3u,1t:!1,1u:!1,1o:["1z"],1D:"{1N} 2D 1p 1A 5Y 4K 2m 4G 1p {1z}."},3d:{1y:!1,1B:1e(a){1a b=!0;t(1m,a)&&(b=""!=1m.1z.1J(/\\s/g,"")&&2u(1m.1z)<=2u(a.2Q)&&2u(1m.1z)>=2u(a.2S));1j b},1k:o.3d,1t:!1,1u:!1,1o:["2S","2Q"],1D:"{1N} 2D 1p 1A 4z {2S} 2k {2Q}."},3g:{1y:!1,1B:P,1k:o.3g,1t:!1,1u:!1,1o:[],1D:"{1N} 3E 1A 4y."},3f:{1y:!1,1B:N,1k:o.3f,1t:!1,1u:!1,1o:[],1D:"{1N} 2D 1p 1A 4y."},3e:{1y:!1,1B:1e(a){1a b=!0;t(1m,a)&&(b="24"===1n a.2O?a.2O.1J(/^\\//,"").1J(/\\/$/,""):a.2O,b=("1s"!==1n a.3z?2G(b.3R().1J(/^\\//,"").1J(/\\/[^\\/]*$/,""),a.3z):2G(b)).25(1m.1z));1j b},1k:o.3e,1t:!1,1u:!1,1o:["2O"],1D:"{1N} 2D 1p 4v {2O}{3z}."},3q:{1y:!1,1B:1e(a){1a b=!0;t(1m,a)&&(b=/[a-2s-9!#$%&\'*+/=?^2C`{|}~-]+(?:\\.[a-2s-9!#$%&\'*+/=?^2C`{|}~-]+)*@(?:[a-2s-9](?:[a-2s-9-]*[a-2s-9])?\\.)+[a-2s-9](?:[a-2s-9-]*[a-2s-9])?/i.25(1m.1z));1j b},1k:o.3q,1t:!1,1u:!1,1o:[],1D:"{1N} 1P 23 a 2J 66."},3h:{1y:!1,1B:1e(a){1a b=!0;t(1m,a)&&(b=/^[A-3H-z]+$/.25(1m.1z));1j b},1k:o.3h,1t:!1,1u:!1,1o:[],1D:"{1N} 3o 2a 3Z 5v."},3J:{1y:!1,1B:1e(a){1a b=!0;t(1m,a)&&(b=/^[0-9]+$/.25(1m.1z));1j b},1k:o.3J,1t:!1,1u:!1,1o:[],1D:"{1N} 3o 2a 3Z 5u."},3j:{1y:!1,1B:1e(a){1a b=!0;t(1m,a)&&(b=/^[0-4R-3H-z]+$/.25(1m.1z));1j b},1k:o.3j,1t:!1,1u:!1,1o:[],1D:"{1N} 3o 2a 3Z 5u 2k 5v."},3i:{1y:!1,1B:1e(a){1a b=!0;t(1m,a)&&(b=/^-?[0-9]+$/.25(1m.1z));1j b},1k:o.3i,1t:!1,1u:!1,1o:[],1D:"{1N} 29 1A 1S 2R."},3G:{1y:!1,1B:1e(a){1a b=!0;t(1m,a)&&(b=/^-?([0-9]+(\\.[0-9]+)?|\\.[0-9]+)$/.25(1m.1z));1j b},1k:o.3G,1t:!1,1u:!1,1o:[],1D:"{1N} 29 1A a 6a 32."},3r:{1y:!0,1B:1e(){1i(1a a=[],b=0;b<1m.1O.1g;b++){1a c=1m.1O[b];Q.2j(c)||a.1I(c)}1j a},1k:o.3r,1t:!1,1u:!1,1o:[],1D:"{1N} 29 1A 6b 6c."},3M:{1y:!0,1B:1e(a){1a b=[],c=2n.2K(a.5t),a=2n.2K(a.5o);c.1z!=a.1z&&(b=[c,a]);1j b},1k:o.3M,1t:!1,1u:!1,1o:["5t","5o"],1D:"5C 6g 23 4v."},3x:{1y:!1,1B:Q,1k:o.3x,1t:!1,1u:!1,1o:[],1D:"{1N} 1P 4e."},3B:{1y:!1,1B:1e(a){1j 1m.1z.1g>=a.2S&&1m.1z.1g<=a.2Q},1k:o.3B,1t:!1,1u:!1,1o:["2S","2Q"],1D:"{1N} 1g 29 1A 4z {2S} 2k {2Q}."},3s:{1y:!1,1B:1e(a){1a b=!0;1b(t(1m,a)){1a c=1m.1z.1J(/\\s/g,""),d=c.2H(/\\./),b=!1;0a.3P);1j b},1k:o.3w,1t:!1,1u:!1,1o:["3W"],1D:"{1N} 29 1A 1l 1w 6l."}},y={3L:1e(){},3n:1e(){},2x:1e(){},4N:1e(){},42:1e(){},43:1e(){}},46=1e(a){1i(1a b={2L:a.2L,1E:a.1E,1R:a.1R,22:[]},c=0;ce.5b.3R().59("2w"))1r"1v.1t 1K 1w 1o 1G 1l 1w 1L 1W 1p 1A 1S 2B";1b("24"!=1n a)1r"1v.1t 1K 1w 1D 1G 1l 1w 1L 1W 1p 1A a 24";1b(h[b])1r"4L 1P 4C a 1M 4p "+b+". 2v 2p 5p 1p 26 1m 1M, 5l 1v.26";o[b]=E;q[E++]=b;h[b]={1y:c,1B:d,1k:o[b],1t:!0,1u:!1,1o:e,1D:a}},1u:1e(a){1b(!a)1r"1v.1u 1K 1L";1a b=a.1E,c=a.1V||[],d=a.1y||!1,e=a.1D||"",f=a.1o||[],a="1s"===1n a.38?!1:a.38;1b(!b)1r"1v.1u 1K a 1E 1G 1l 1w 1L 1W";1b("24"!=1n b)1r"1v.1u 1K 1E 1p 1A a 24 2g";1b(0>f.5b.3R().59("2w"))1r"1v.1u 1K 1w 1o 1G 1l 1w 1L 1W 1p 1A 1S 2B";1b(0==c.1g)1r"1v.1u 1K 1S 2B 3m 3Q 1V 5e a 1V 1G 1l 1w 1L 1W";1b(h[b])1r"1v.1u: 4L 1P 4C a 1M 4p "+b+". 2v 2p 5p 1p 26 1m 1M, 5l 1v.26";Y(b,c,f);o[b]=E;q[E++]=b;h[b]={1y:d,1k:o[b],1t:!0,1u:!0,1o:f,38:a,2N:c,1D:e,1B:5m};X(b,c)},26:1e(a){1b(!a)1r"1v.26 1K 1L";1b("1s"===1n a.1k)1r"1v.26 1K a 2J 1k 1G 1l 1w 1L 1W";1a b=q[a.1k];1b("1s"===1n b)1r"1v.26: I 6N 23 3K 1w 3F 1M. 6O 1Z 3N 23 2P 5g? 5q 5r: "+r(a);1a c=h[b].1y;h[b].1t&&(c="1s"===1n a.1y?h[b].1y:a.1y);1a d=h[b].1t&&!h[b].1u?a.1B||h[b].1B:h[b].1B,e=h[b].1t?a.1o||h[b].1o:h[b].1o,f=a.1D||h[b].1D,i=h[b].1u,m=a.1V||h[b].1V;1b("2T"!=1n c)1r"1v.26 1K 1w 1y 1G 1l 1w 1L 1W 1p 1A a 2T";1b("1e"!=1n d)1r"1v.26 1K 1w 1B 1G 1l 1w 1L 1W 1p 1A a 1e";1b(!(e 2V 2w))1r"1v.26 1K 1w 1o 1G 1l 1w 1L 1W 1p 1A 1S 2B";1b("24"!=1n f)1r"1v.26 1K 1w 1D 1G 1l 1w 1L 1W 1p 1A a 24";1b(i){Y(b,m,e);1a j=y.43();X(b,m);a=y.2x(y.3n(a.1k));1b(a.2x)1r y.42(j),"1v.26: 2r 6P 3Q-1V 2p 2f 3F 2f 6Q a 6R 6S: "+a.4f;}h[b]={1y:c,1k:o[b],1t:!0,1u:i,1o:e,2N:m,1D:f,1B:d}},37:o,4J:v,4I:{3U:"3U",3T:"3T",44:"44"}}}();',62,427,'||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||var|if|successful|message|function|data|length|null|for|return|constraintType|in|this|typeof|params|to|else|throw|undefined|custom|compound|regula|the|groups|formSpecific|value|be|validator|shift|defaultMessage|name|hasOwnProperty|attribute|id|push|replace|expects|options|constraint|label|elements|is|group|type|an|toLowerCase|Default|constraints|argument|elementId|element|it|||children|not|string|test|override|Invalid|form|must|only|select|__size__|tagName|input|have|parameter|bind|with|call|and|charAt|or|document|provided|you|radio|The|z0|Not|parseFloat|If|Array|cycleExists|textarea|bound|delete|array|_|needs|unshift|character|RegExp|split|validate|valid|getElementById|visited|definition|composingConstraints|regex|been|max|integer|min|boolean|independent|instanceof|are|Year|checkbox|starting|Can|include|number|error|any|failingElements|Selected|Constraint|reportAsSingleViolation|composingConstraintViolations|Checked|fraction|Month|Range|Pattern|Blank|NotBlank|Alpha|Integer|AlphaNumeric|list|Day|of|getNodeByType|can|but|Email|CompletelyFilled|Digits|Past|Min|Max|Future|Required|Element|flags|unbind|Length|Undefined|No|cannot|specified|Real|Za|trying|Numeric|find|addNode|PasswordsMatch|has|You|dateToTestAgainst|composing|toString|getAttribute|MDY|DMY|was|format|new|Date|contain|aa|text|setRoot|clone|YMD|dateToValidate|ca|button|empty|does|expected|constraintPassed|ba|Parameter|required|path|body|checked|void|removeChildren|regular|ignoreEmpty|expression|true|that|called|validateEmptyFields|Validation|Cannot|attached|arguments|match|Math|matching|blank|between|closing|fa|already|non|z_|after|equal|ga|DateFormat|Group|than|There|following|getRoot|box|constraintParameters|password|9A|configure|ha|ia|digits|ja|ka|separator|la|ma|substring|na|oa|Between|date|Matches|selectedIndex|Empty|indexOf|NotEmpty|constructor|found|IsAlpha|under|applicable|defined|IsNumeric|msg|ea|IsAlphaNumeric|use|da|all|field2|wish|Function|received|need|field1|numbers|letters|constraintName|Unterminated|literal|quoted|In|callee|Passwords|debug|hasn|__dontcare__|111|110|101|100|011|010|001|000|area|field|strings|enums|each|selected|overwriteParameters|lesser|overwriteConstraint|unexpected|greater|HTMLElement|nodeType|random|1E6|floor|generated|no|email|start|definitions|before|real|completely|filled|define|Unexpected|getElementsByTagName|do|up|digit|fractional|past|future|positive|parentheses|unmatched|might|false|negative|identifier|pop|missing|RootNode|still|parameters|optional|some|failed|requires|seem|However|concat|accept|least|at|boxes|nor|neither|buttons|checkboxes|could|Perhaps|overriding|created|cyclic|composition'.split('|'),0,{})); /*! * jQuery Form Plugin * version: 3.50.0-2014.02.05 * Requires jQuery v1.5 or later * Copyright (c) 2013 M. Alsup * Examples and documentation at: http://malsup.com/jquery/form/ * Project repository: https://github.com/malsup/form * Dual licensed under the MIT and GPL licenses. * https://github.com/malsup/form#copyright-and-license */ eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(6(a){"3o 3p";3(1d 2E===\'6\'&&2E.4y){2E([\'2F\'],a)}R{a((1d(3q)!=\'1b\')?3q:1e.4z)}}(6($){"3o 3p";4 P={};P.2G=$("<1l S=\'2e\'/>").1T(0).3r!==1b;P.3s=1e.3t!==1b;4 Q=!!$.12.2H;$.12.1F=6(){3(!Q){8 5.1g.1G(5,24)}4 a=5.2H.1G(5,24);3((a&&a.2F)||1d a===\'2f\'){8 a}8 5.1g.1G(5,24)};$.12.1n=6(y){3(!5.Y){Z(\'1n: 4A 16 4B - 4C 4D 25\');8 5}4 z,1t,19,$9=5;3(1d y==\'6\'){y={1c:y}}R 3(y===1b){y={}}z=y.S||5.1F(\'3u\');1t=y.19||5.1F(\'1t\');19=(1d 1t===\'2f\')?$.4E(1t):\'\';19=19||1e.2I.2J||\'\';3(19){19=(19.4F(/^([^#]+)/)||[])[1]}y=$.2K(1j,{19:19,1c:$.1U.1c,S:z||$.1U.S,26:/^4G/i.1u(1e.2I.2J||\'\')?\'3v:18\':\'4H:4I\'},y);4 A={};5.1h(\'9-2L-3w\',[5,y,A]);3(A.3x){Z(\'1n: 16 3y 2g 9-2L-3w 1h\');8 5}3(y.2M&&y.2M(5,y)===18){Z(\'1n: 16 1o 2g 2M 2N\');8 5}4 B=y.2O;3(B===1b){B=$.1U.2O}4 C=[];4 D,a=5.2P(y.4J,C);3(y.1a){y.11=y.1a;D=$.1V(y.1a,B)}3(y.2Q&&y.2Q(a,5,y)===18){Z(\'1n: 16 1o 2g 2Q 2N\');8 5}5.1h(\'9-16-3z\',[a,5,y,A]);3(A.3x){Z(\'1n: 16 3y 2g 9-16-3z 1h\');8 5}4 q=$.1V(a,B);3(D){q=(q?(q+\'&\'+D):D)}3(y.S.4K()==\'4L\'){y.19+=(y.19.2h(\'?\')>=0?\'&\':\'?\')+q;y.1a=13}R{y.1a=q}4 E=[];3(y.2R){E.W(6(){$9.2R()})}3(y.2S){E.W(6(){$9.2S(y.4M)})}3(!y.27&&y.1v){4 F=y.1c||6(){};E.W(6(a){4 b=y.4N?\'3A\':\'4O\';$(y.1v)[b](a).1H(F,24)})}R 3(y.1c){E.W(y.1c)}y.1c=6(a,b,c){4 d=y.1i||5;1f(4 i=0,1p=E.Y;i<1p;i++){E[i].1G(d,[a,b,c||$9,$9])}};3(y.17){4 G=y.17;y.17=6(a,b,c){4 d=y.1i||5;G.1G(d,[a,b,c,$9])}}3(y.1I){4 H=y.1I;y.1I=6(a,b){4 c=y.1i||5;H.1G(c,[a,b,$9])}}4 I=$(\'1l[S=2e]:4P\',5).4Q(6(){8 $(5).1J()!==\'\'});4 J=I.Y>0;4 K=\'2i/9-1a\';4 L=($9.1g(\'2j\')==K||$9.1g(\'2T\')==K);4 M=P.2G&&P.3s;Z("4R :"+M);4 N=(J||L)&&!M;4 O;3(y.28!==18&&(y.28||N)){3(y.3B){$.1T(y.3B,6(){O=2U(a)})}R{O=2U(a)}}R 3((J||L)&&M){O=3C(a)}R{O=$.3D(y)}$9.4S(\'3E\').1a(\'3E\',O);1f(4 k=0;k\');$V.59({3M:\'5a\',3P:\'-3Q\',3R:\'-3Q\'})}V=$V[0];7={1o:0,1q:13,1X:13,1k:0,1y:\'n/a\',5b:6(){},2X:6(){},5c:6(){},1x:6(a){4 e=(a===\'1z\'?\'1z\':\'1o\');Z(\'5d 2m... \'+e);5.1o=1;1A{3(V.29.1r.3S){V.29.1r.3S(\'5e\')}}1N(5f){}$V.1g(\'2W\',s.26);7.17=e;3(s.17){s.17.1w(s.1i,7,e,a)}3(g){$.1O.1h("3T",[7,s,e])}3(s.1I){s.1I.1w(s.1i,7,e)}}};g=s.3U;3(g&&0===$.2Y++){$.1O.1h("5g")}3(g){$.1O.1h("5h",[7,s])}3(s.2n&&s.2n.1w(s.1i,7,s)===18){3(s.3U){$.2Y--}m.2a();8 m}3(7.1o){m.2a();8 m}1L=l.1B;3(1L){n=1L.T;3(n&&!1L.1M){s.11=s.11||{};s.11[n]=1L.U;3(1L.S=="1Y"){s.11[n+\'.x\']=l.1P;s.11[n+\'.y\']=l.1Q}}}4 o=1;4 p=2;6 2Z(a){4 b=13;1A{3(a.29){b=a.29.1r}}1N(1m){Z(\'30 1T 28.29 1r: \'+1m)}3(b){8 b}1A{b=a.31?a.31:a.1r}1N(1m){Z(\'30 1T 28.31: \'+1m);b=a.1r}8 b}4 q=$(\'3V[T=3W-5i]\').1g(\'2q\');4 r=$(\'3V[T=3W-1V]\').1g(\'2q\');3(r&&q){s.11=s.11||{};s.11[r]=q}6 32(){4 t=$9.1F(\'1v\'),a=$9.1F(\'1t\'),K=\'2i/9-1a\',3X=$9.1g(\'2j\')||$9.1g(\'2T\')||K;l.1Z(\'1v\',1K);3(!z||/3Y/i.1u(z)){l.1Z(\'3u\',\'3J\')}3(a!=s.19){l.1Z(\'1t\',s.19)}3(!s.5j&&(!z||/3Y/i.1u(z))){$9.1g({2T:\'2i/9-1a\',2j:\'2i/9-1a\'})}3(s.1z){1W=1R(6(){2o=1j;1C(o)},s.1z)}6 33(){1A{4 a=2Z(V).5k;Z(\'5l = \'+a);3(a&&a.20()==\'5m\'){1R(33,50)}}1N(e){Z(\'5n 1x: \',e,\' (\',e.T,\')\');1C(p);3(1W){3Z(1W)}1W=1b}}4 b=[];1A{3(s.11){1f(4 n 5o s.11){3(s.11.34(n)){3($.5p(s.11[n])&&s.11[n].34(\'T\')&&s.11[n].34(\'U\')){b.W($(\'<1l S="35" T="\'+s.11[n].T+\'">\').1J(s.11[n].U).36(l)[0])}R{b.W($(\'<1l S="35" T="\'+n+\'">\').1J(s.11[n]).36(l)[0])}}}}3(!s.2p){$V.36(\'21\')}3(V.40){V.40(\'41\',1C)}R{V.3L(\'42\',1C,18)}1R(33,15);1A{l.16()}1N(1m){4 c=1r.5q(\'9\').16;c.1G(l)}}5r{l.1Z(\'1t\',a);l.1Z(\'2j\',3X);3(t){l.1Z(\'1v\',t)}R{$9.3O(\'1v\')}$(b).43()}}3(s.5s){32()}R{1R(32,10)}4 u,14,44=50,37;6 1C(e){3(7.1o||37){8}14=2Z(V);3(!14){Z(\'30 5t 5u 1r\');e=p}3(e===o&&7){7.1x(\'1z\');m.2a(7,\'1z\');8}R 3(e==p&&7){7.1x(\'45 1x\');m.2a(7,\'17\',\'45 1x\');8}3(!14||14.2I.2J==s.26){3(!2o){8}}3(V.46){V.46(\'41\',1C)}R{V.5v(\'42\',1C,18)}4 c=\'1c\',1D;1A{3(2o){5w\'1z\';}4 d=s.27==\'1s\'||14.38||$.5x(14);Z(\'5y=\'+d);3(!d&&1e.2r&&(14.21===13||!14.21.47)){3(--44){Z(\'5z 5A 2N, 39 3a 5B\');1R(1C,5C);8}}4 f=14.21?14.21:14.2s;7.1q=f?f.47:13;7.1X=14.38?14.38:14;3(d){s.27=\'1s\'}7.2X=6(a){4 b={\'2q-S\':s.27};8 b[a.20()]};3(f){7.1k=48(f.2t(\'1k\'))||7.1k;7.1y=f.2t(\'1y\')||7.1y}4 h=(s.27||\'\').20();4 i=/(3b|49|2u)/.1u(h);3(i||s.2v){4 j=14.2w(\'2v\')[0];3(j){7.1q=j.U;7.1k=48(j.2t(\'1k\'))||7.1k;7.1y=j.2t(\'1y\')||7.1y}R 3(i){4 k=14.2w(\'2L\')[0];4 b=14.2w(\'21\')[0];3(k){7.1q=k.2x?k.2x:k.4a}R 3(b){7.1q=b.2x?b.2x:b.4a}}}R 3(h==\'1s\'&&!7.1X&&7.1q){7.1X=v(7.1q)}1A{u=x(7,h,s)}1N(1m){c=\'2y\';7.17=1D=(1m||c)}}1N(1m){Z(\'17 5D: \',1m);c=\'17\';7.17=1D=(1m||c)}3(7.1o){Z(\'2m 1o\');c=13}3(7.1k){c=(7.1k>=5E&&7.1k<5F||7.1k===5G)?\'1c\':\'17\'}3(c===\'1c\'){3(s.1c){s.1c.1w(s.1i,u,\'1c\',7)}m.5H(7.1q,\'1c\',7);3(g){$.1O.1h("5I",[7,s])}}R 3(c){3(1D===1b){1D=7.1y}3(s.17){s.17.1w(s.1i,7,c,1D)}m.2a(7,\'17\',1D);3(g){$.1O.1h("3T",[7,s,1D])}}3(g){$.1O.1h("5J",[7,s])}3(g&&!--$.2Y){$.1O.1h("5K")}3(s.1I){s.1I.1w(s.1i,7,c)}37=1j;3(s.1z){3Z(1W)}1R(6(){3(!s.2p){$V.43()}R{$V.1g(\'2W\',s.26)}7.1X=13},2V)}4 v=$.5L||6(s,a){3(1e.4b){a=2l 4b(\'5M.5N\');a.5O=\'18\';a.5P(s)}R{a=(2l 5Q()).5R(s,\'2u/1s\')}8(a&&a.2s&&a.2s.4c!=\'2y\')?a:13};4 w=$.5S||6(s){8 1e[\'5T\'](\'(\'+s+\')\')};4 x=6(a,b,s){4 c=a.2X(\'2q-S\')||\'\',1s=b===\'1s\'||!b&&c.2h(\'1s\')>=0,u=1s?a.1X:a.1q;3(1s&&u.2s.4c===\'2y\'){3($.17){$.17(\'2y\')}}3(s&&s.4d){u=s.4d(u,b)}3(1d u===\'2f\'){3(b===\'3b\'||!b&&c.2h(\'3b\')>=0){u=w(u)}R 3(b==="49"||!b&&c.2h("3v")>=0){$.5U(u)}}8 u};8 m}};$.12.3c=6(a){a=a||{};a.2z=a.2z&&$.5V($.12.3d);3(!a.2z&&5.Y===0){4 o={s:5.22,c:5.1i};3(!$.4e&&o.s){Z(\'39 3a 4f, 5W 3c\');$(6(){$(o.s,o.c).3c(a)});8 5}Z(\'5X; 5Y 4g 5Z 60 22\'+($.4e?\'\':\' (39 3a 4f)\'));8 5}3(a.2z){$(1r).4h(\'16.9-1E\',5.22,2A).4h(\'2B.9-1E\',5.22,2C).3d(\'16.9-1E\',5.22,a,2A).3d(\'2B.9-1E\',5.22,a,2C);8 5}8 5.4i().4j(\'16.9-1E\',a,2A).4j(\'2B.9-1E\',a,2C)};6 2A(e){4 a=e.1a;3(!e.61()){e.62();$(e.1v).1n(a)}}6 2C(e){4 a=e.1v;4 b=$(a);3(!(b.4k("[S=16],[S=1Y]"))){4 t=b.63(\'[S=16]\');3(t.Y===0){8}a=t[0]}4 c=5;c.1B=a;3(a.S==\'1Y\'){3(e.4l!==1b){c.1P=e.4l;c.1Q=e.64}R 3(1d $.12.4m==\'6\'){4 d=b.4m();c.1P=e.4n-d.3R;c.1Q=e.4o-d.3P}R{c.1P=e.4n-a.65;c.1Q=e.4o-a.66}}1R(6(){c.1B=c.1P=c.1Q=13},2V)}$.12.4i=6(){8 5.67(\'16.9-1E 2B.9-1E\')};$.12.2P=6(b,c){4 a=[];3(5.Y===0){8 a}4 d=5[0];4 e=5.1g(\'1K\');4 f=b?d.2w(\'*\'):d.4g;4 g;3(f&&!/4p [68]/.1u(4q.4r)){f=$(f).1T()}3(e){g=$(\':1l[9=\'+e+\']\').1T();3(g.Y){f=(f||[]).69(g)}}3(!f||!f.Y){8 a}4 i,j,n,v,X,1p,3e;1f(i=0,1p=f.Y;i<1p;i++){X=f[i];n=X.T;3(!n||X.1M){3f}3(b&&d.1B&&X.S=="1Y"){3(d.1B==X){a.W({T:n,U:$(X).1J(),S:X.S});a.W({T:n+\'.x\',U:d.1P},{T:n+\'.y\',U:d.1Q})}3f}v=$.2b(X,1j);3(v&&v.2D==2c){3(c){c.W(X)}1f(j=0,3e=v.Y;j<3e;j++){a.W({T:n,U:v[j]})}}R 3(P.2G&&X.S==\'2e\'){3(c){c.W(X)}4 h=X.3r;3(h.Y){1f(j=0;j0) - { - echo "User Name Already Exist"; - } - else - { - echo "OK"; - } - exit(); -} - -if(isset($_POST['email'])) -{ - $emailId=$_POST['email']; - - $checkdata="SELECT `user_id` FROM `users` WHERE `email` = '$email'"; - - $query=mysql_query($checkdata); - - if(mysql_num_rows($query)>0) - { - echo "Email Already Exist"; - } - else - { - echo "OK"; - } - exit(); -} -?> \ No newline at end of file +// checkdata.php 0) { echo "User Name Already Exist"; } else { echo "OK"; } exit(); } if(isset($_POST['email'])) { $emailId=$_POST['email']; $checkdata="SELECT `user_id` FROM `users` WHERE `email` = '$email'"; $query=mysql_query($checkdata); if(mysql_num_rows($query)>0) { echo "Email Already Exist"; } else { echo "OK"; } exit(); } ?> \ No newline at end of file diff --git a/classes/libmail.php b/classes/libmail.php index fbf4568..4cf8428 100644 --- a/classes/libmail.php +++ b/classes/libmail.php @@ -1,704 +1 @@ - true, "message" => 'ок'); - public function __construct($charset = "", $ctencoding = '') - { - $this->boundary = md5(uniqid("myboundary")); - $this->smtp['on'] = false; - if (strlen($ctencoding) and $ctencoding == '8bit') - { - $this->ctencoding = '8bit'; - } - if (strlen($charset)) - { - $this->charset = strtolower($charset); - if ($this->charset == "us-ascii") - { - $this->ctencoding = "7bit"; - } - } - } - public function Body($text, $text_html = "", $alternative_text = '', $resource = 'webi') - { - if (!strlen($resource)) - $resource = 'webi'; - if ($text_html == "html") - $text_html = "text/html"; - else - $text_html = "text/plain"; - if ($this->ctencoding == 'base64') - { - if (strlen($alternative_text)) - $alternative_text = chunk_split(base64_encode($alternative_text)); - if (strlen($text)) - $text = chunk_split(base64_encode($text)); - } - if (!strlen($alternative_text)) - { - $body = "Content-Type: ".$text_html."; charset=".$this->charset."\r\n"; - $body.="Content-Transfer-Encoding: ".$this->ctencoding."\r\n\r\n"; - $body.=$text; - } - elseif (strlen($alternative_text) and $text_html == 'text/html') - { - $body = "Content-Type: multipart/alternative; boundary=ALT-".$this->boundary."\r\n\r\n"; - $body.="--ALT-".$this->boundary."\r\n"; - $body.="Content-Type: text/plain; charset=".$this->charset."\r\n"; - $body.="Content-Transfer-Encoding: ".$this->ctencoding."\r\n\r\n"; - $body.=$alternative_text."\r\n"; - $body.="--ALT-".$this->boundary."\r\n"; - $body.="Content-Type: text/html; charset=".$this->charset."\r\n"; - $body.="Content-Transfer-Encoding: ".$this->ctencoding."\r\n\r\n"; - $body.=$text."\r\n"; - $body.="--ALT-".$this->boundary."--"; - } - $this->SubBody[$resource]['body'][0] = $body; - } - protected function mime_content_type($file) - { - $ext = strtolower(substr(strrchr(basename($file), '.'), 1)); - switch ($ext) - { - case 'jpg': return 'image/jpeg'; - case 'jpeg': return 'image/jpeg'; - case 'gif': return 'image/gif'; - case 'png': return 'image/png'; - case 'ico': return 'image/x-icon'; - case 'txt': return 'text/plain'; - - default: return 'application/octet-stream'; - } - } - - public function Attach($filename, $new_name_filename = "", $filetype = "", $disposition = "", $resource = 'webi') - { - if (!strlen($resource)) - $resource = 'webi'; - if (!file_exists($filename)) - { - return FALSE; - } - if (strlen($new_name_filename)) - $basename = basename($new_name_filename); - else - $basename = basename($filename); - - $charset_name = "=?".$this->charset."?B?".base64_encode($basename)."?="; - if (!strlen($filetype)) - $filetype = $this->mime_content_type($basename); - $body = "Content-Type: ".$filetype."; name=\"$charset_name\"\r\n"; - $body.="Content-Transfer-Encoding: base64\r\n"; - if ($disposition == 'attachment') - { - $body.="Content-Disposition: attachment; filename=\"$charset_name\"\r\n"; - } - $body.="Content-ID: <".$basename.">\r\n"; - $body.="\r\n"; - $body.=chunk_split(base64_encode(file_get_contents($filename))); - if ($disposition == 'attachment') - $this->SubBody[$resource]['mixed'][] = $body; - else - { - $this->SubBody[$resource]['body'][$this->count_body] = $body; - $this->count_body++; - } - } - public function BuildMail($resource = 'webi') - { - if (!strlen($resource)) - $resource = 'webi'; - $this->ready_headers[$resource] = ''; - if (isset($this->SubBody[$resource]['body'])) - $resource_body = $resource; - else - $resource_body = 'webi'; - if (!is_array($this->sendto[$resource]) OR !count($this->sendto[$resource])) - { - $this->status_mail['status'] = false; - $this->status_mail['message'] = "Error : no recipient selected for ".$resource; - // return false; - } - if (!isset($this->body[$resource_body])) - { - if (count($this->SubBody[$resource_body]['body']) > 1) - { - $body = implode("\r\n--REL-".$this->boundary."\r\n", $this->SubBody[$resource_body]['body']); - $body = "Content-Type: multipart/related; boundary=REL-".$this->boundary."\r\n\r\n" - .'--REL-'.$this->boundary."\r\n".$body.'--REL-'.$this->boundary."--"; - } - else - { - $body = $this->SubBody[$resource_body]['body'][0]; - } - if (isset($this->SubBody[$resource_body]['mixed']) AND count($this->SubBody[$resource_body]['mixed'])) - { - $bodymix = implode('--MIX-'.$this->boundary."\r\n", $this->SubBody[$resource_body]['mixed']); - $body = $body."\r\n--MIX-".$this->boundary."\r\n".$bodymix; - $body = "Content-Type: multipart/mixed; boundary=MIX-".$this->boundary."\r\n\r\n" - .'--MIX-'.$this->boundary."\r\n".$body.'--MIX-'.$this->boundary."--"; - } - unset($this->SubBody[$resource_body]); - $temp_mass = explode("\r\n\r\n", $body); - $this->body_header[$resource_body] = $temp_mass[0]; - unset($temp_mass[0]); - $this->body[$resource_body] = implode("\r\n\r\n", $temp_mass); - unset($temp_mass); - unset($body); - } - $temp_mass = array(); - foreach ($this->sendto[$resource] as $key => $value) - { - - if (strlen($this->names_email[$resource]['To'][$value])) - $temp_mass[] = "=?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($this->names_email[$resource]['To'][$value], "\r\n", " "))))."?= <".$value.">"; - else - $temp_mass[] = $value; - } - $this->headers[$resource]['To'] = implode(", ", $temp_mass); - if (isset($this->acc[$resource]) and count($this->acc[$resource]) > 0) - $this->headers[$resource]['CC'] = implode(", ", $this->acc[$resource]); - if (isset($this->abcc[$resource]) and count($this->abcc[$resource]) > 0) - $this->headers[$resource]['BCC'] = implode(", ", $this->abcc[$resource]); - if ($this->receipt) - { - if (isset($this->headers["Reply-To"])) - $this->headers["Disposition-Notification-To"] = $this->headers["Reply-To"]; - else - $this->headers["Disposition-Notification-To"] = $this->headers['From']; - } - if ($this->charset != "") - { - $this->headers["Mime-Version"] = "1.0"; - } - $this->headers["X-Mailer"] = "Php_libMail_v_2.0(webi.ru)"; - if (!isset($this->headers[$resource]['Subject']) and isset($this->headers['webi']['Subject'])) - $this->headers[$resource]['Subject'] = $this->headers['webi']['Subject']; - if ($this->smtp['on']) - { - $user_domen = explode('@', $this->headers['From']); - $this->ready_headers[$resource] .= "Date: ".date("r")."\r\n"; - $this->ready_headers[$resource] .= "Message-ID: <".rand().".".$resource.date("YmjHis")."@".$user_domen[1].">\r\n"; - foreach ($this->headers[$resource] as $key => $value) - { - $new_mass_head[$key] = $value; - } - foreach ($this->headers as $key => $value) - { - if (!is_array($value)) - $new_mass_head[$key] = $value; - } - reset($new_mass_head); - while (list( $hdr, $value ) = each($new_mass_head)) - { - if ($hdr == "From" and strlen($this->names_email['from'])) - $this->ready_headers[$resource] .= $hdr.": =?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($this->names_email['from'], "\r\n", " "))))."?= <".$value.">\r\n"; - elseif ($hdr == "Reply-To" and strlen($this->names_email['Reply-To'])) - $this->ready_headers[$resource] .= $hdr.": =?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($this->names_email['Reply-To'], "\r\n", " "))))."?= <".$value.">\r\n"; - elseif ($hdr != "BCC") - $this->ready_headers[$resource] .= $hdr.": ".$value."\r\n"; - } - } - else - { - foreach ($this->headers[$resource] as $key => $value) - { - $new_mass_head[$key] = $value; - } - foreach ($this->headers as $key => $value) - { - if (!is_array($value)) - $new_mass_head[$key] = $value; - } - reset($new_mass_head); - while (list( $hdr, $value ) = each($new_mass_head)) - { - if ($hdr == "From" and strlen($this->names_email['from'])) - $this->ready_headers[$resource] .= $hdr.": =?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($this->names_email['from'], "\r\n", " "))))."?= <".$value.">\r\n"; - elseif ($hdr == "Reply-To" and strlen($this->names_email['Reply-To'])) - $this->ready_headers[$resource] .= $hdr.": =?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($this->names_email['Reply-To'], "\r\n", " "))))."?= <".$value.">\r\n"; - elseif ($hdr != "Subject" and $hdr != "To") - $this->ready_headers[$resource] .= "$hdr: $value\r\n"; - } - } - $this->ready_headers[$resource].=$this->body_header[$resource_body]."\r\n"; - } - public function autoCheck($bool) - { - if ($bool) - $this->checkAddress = true; - else - $this->checkAddress = false; - } - public function log_on($bool) - { - if ($bool) - $this->log_on = true; - else - $this->log_on = false; - } - public function Subject($subject, $resource = 'webi') - { - if (!strlen($resource)) - $resource = 'webi'; - $this->headers[$resource]['Subject'] = "=?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($subject, "\r\n", " "))))."?="; - } - public function From($from) - { - if (!is_string($from)) - { - $this->status_mail['status'] = false; - $this->status_mail['message'] = "Error, From should be inline"; - return FALSE; - } - $temp_mass = explode(';', $from); - if (count($temp_mass) == 2) - { - $this->names_email['from'] = $temp_mass[0]; - $this->headers['From'] = $temp_mass[1]; - } - else - { - $this->names_email['from'] = ''; - $this->headers['From'] = $from; - } - } - public function ReplyTo($address) - { - if (!is_string($address)) - return false; - $temp_mass = explode(';', $address); - if (count($temp_mass) == 2) - { - $this->names_email['Reply-To'] = $temp_mass[0]; - $this->headers['Reply-To'] = $temp_mass[1]; - } - else - { - $this->names_email['Reply-To'] = ''; - $this->headers['Reply-To'] = $address; - } - } - public function Receipt() - { - $this->receipt = 1; - } - public function To($to, $resource = 'webi') - { - if (!strlen($resource)) - $resource = 'webi'; - if (is_array($to)) - { - foreach ($to as $key => $value) - { - $temp_mass = explode(';', $value); - if (count($temp_mass) == 2) - { - $this->smtpsendto[$resource][$temp_mass[1]] = $temp_mass[1]; - $this->names_email[$resource]['To'][$temp_mass[1]] = $temp_mass[0]; - $this->sendto[$resource][] = $temp_mass[1]; - } - else - { - $this->smtpsendto[$resource][$value] = $value; - $this->names_email[$resource]['To'][$value] = ''; - $this->sendto[$resource][] = $value; - } - } - } - else - { - $temp_mass = explode(';', $to); - if (count($temp_mass) == 2) - { - $this->sendto[$resource][] = $temp_mass[1]; - $this->smtpsendto[$resource][$temp_mass[1]] = $temp_mass[1]; - $this->names_email[$resource]['To'][$temp_mass[1]] = $temp_mass[0]; - } - else - { - $this->sendto[$resource][] = $to; - $this->smtpsendto[$resource][$to] = $to; - - $this->names_email[$resource]['To'][$to] = ''; - } - } - if ($this->checkAddress == true) - $this->CheckAdresses($this->sendto[$resource]); - } - private function CheckAdresses($aad) - { - foreach ($aad as $key => $value) - { - if (!$this->ValidEmail($value)) - { - $this->status_mail['status'] = false; - $this->status_mail['message'] = "Error : wrong email ".$value; - return FALSE; - } - } - } - public function ValidEmail($address) - { - if (function_exists('filter_list')) - { - $valid_email = filter_var($address, FILTER_VALIDATE_EMAIL); - if ($valid_email !== false) - return true; - else - return false; - } - else - { - if (ereg(".*<(.+)>", $address, $regs)) - { - $address = $regs[1]; - } - if (ereg("^[^@ ]+@([a-zA-Z0-9\-]+\.)+([a-zA-Z0-9\-]{2}|net|com|gov|mil|org|edu|int)\$", $address)) - return true; - else - return false; - } - } - public function Cc($cc, $resource = 'webi') - { - if (!strlen($resource)) - $resource = 'webi'; - - if (is_array($cc)) - { - foreach ($cc as $key => $value) - { - $this->smtpsendto[$resource][$value] = $value; - $this->acc[$resource][$value] = $value; - } - } - else - { - $this->acc[$resource][$cc] = $cc; - $this->smtpsendto[$resource][$cc] = $cc; - } - if ($this->checkAddress == true) - $this->CheckAdresses($this->acc[$resource]); - } - public function Bcc($bcc, $resource = 'webi') - { - if (!strlen($resource)) - $resource = 'webi'; - if (is_array($bcc)) - { - foreach ($bcc as $key => $value) - { - $this->smtpsendto[$resource][$value] = $value; - $this->abcc[$resource][$value] = $value; - } - } - else - { - $this->abcc[$resource][$bcc] = $bcc; - $this->smtpsendto[$resource][$bcc] = $bcc; - } - if ($this->checkAddress == true) - $this->CheckAdresses($this->abcc[$resource]); - } - public function Organization($org) - { - if (trim($org != "")) - $this->headers['Organization'] = $org; - } - public function Priority($priority) - { - $priorities = array('1 (Highest)', '2 (High)', '3 (Normal)', '4 (Low)', '5 (Lowest)'); - if (!intval($priority)) - return false; - - if (!isset($priorities[$priority - 1])) - return false; - - $this->headers["X-Priority"] = $priorities[$priority - 1]; - - return true; - } - public function smtp_on($smtp_serv, $login, $pass, $port = 25, $timeout = 5) - { - $this->smtp['on'] = true; // smtp transfer on - $this->smtp['serv'] = $smtp_serv; - $this->smtp['login'] = $login; - $this->smtp['pass'] = $pass; - $this->smtp['port'] = $port; - $this->smtp['timeout'] = $timeout; - } - private function get_data($smtp_conn) - { - $data = ""; - while ($str = fgets($smtp_conn, 515)) - { - $data .= $str; - if (substr($str, 3, 1) == " ") - { - break; - } - } - return $data; - } - private function add_log($text) - { - if ($this->log_on) - $this->smtp_log.=$text; - } - public function Send() - { - if (!$this->status_mail['status']) - { - return FALSE; - } - if (!$this->smtp['on']) - { - foreach ($this->sendto as $key => $value) - { - $strTo = implode(", ", $this->sendto[$key]); - $this->BuildMail($key); - if (!$this->status_mail['status']) - { - return FALSE; - } - if (isset($this->body[$key])) - $body_resource = $key; - else - $body_resource = 'webi'; - $res = @mail($strTo, $this->headers[$key]['Subject'], $this->body[$body_resource], $this->ready_headers[$key]); - if (!$res) - { - $this->status_mail['status'] = false; - $this->status_mail['message'] = "Error : mail() function returns error"; - } - elseif ($this->status_mail['status']) - { - $this->add_log('TO: '.$strTo."\n"); - $this->add_log("Subject: ".$this->headers[$key]['Subject']."\n"); - $this->add_log($this->ready_headers[$key]."\n\n"); - $this->add_log($this->body[$body_resource]."\n\n\n"); - $this->status_mail['status'] = true; - $this->status_mail['message'] = "Message successfully sent by mail()"; - } - if ($key != 'webi') - { - unset($this->headers[$key]); - unset($this->ready_headers[$key]); - } - if ($body_resource != 'webi') - { - unset($this->body[$body_resource]); - } - } - if ($this->status_mail['status']) - { - return true; - } - else - { - return FALSE; - } - } - else - { - if (!$this->smtp['serv'] OR !$this->smtp['login'] OR !$this->smtp['pass'] OR !$this->smtp['port']) - { - $this->status_mail['status'] = false; - $this->status_mail['message'] = "Error : missing required SMTP values "; - return false; - } - $user_domen = explode('@', $this->headers['From']); - $smtp_conn = fsockopen($this->smtp['serv'], $this->smtp['port'], $errno, $errstr, $this->smtp['timeout']); - if (!$smtp_conn) - { - $this->add_log("can't connect to server\n\n"); - fclose($smtp_conn); - $this->status_mail['status'] = false; - $this->status_mail['message'] = "Error: can't connect to server"; - return false; - } - $data = $this->get_data($smtp_conn)."\n"; - $this->add_log($data); - fputs($smtp_conn, "EHLO ".$user_domen[0]."\r\n"); - $this->add_log("I: EHLO ".$user_domen[0]."\n"); - $data = $this->get_data($smtp_conn)."\n"; - $this->add_log($data); - $code = substr($data, 0, 3); - if ($code != 250) - { - $this->add_log("Error greeting EHLO \n"); - fclose($smtp_conn); - $this->status_mail['status'] = false; - $this->status_mail['message'] = "Error: greeting EHLO"; - return false; - } - fputs($smtp_conn, "AUTH LOGIN\r\n"); - $this->add_log( "I: AUTH LOGIN\n"); - $data = $this->get_data($smtp_conn)."\n"; - $this->add_log($data); - $code = substr($data, 0, 3); - if ($code != 334) - { - $this->add_log("server denies authorization \n"); - fclose($smtp_conn); - $this->status_mail['status'] = false; - $this->status_mail['message'] = "server denies authorization"; - return false; - } - fputs($smtp_conn, base64_encode($this->smtp['login'])."\r\n"); - $this->add_log( "I: ".base64_encode($this->smtp['login'])."\n"); - $data = $this->get_data($smtp_conn)."\n"; - $this->add_log($data); - $code = substr($data, 0, 3); - if ($code != 334) - { - $this->add_log( "user access failed\n"); - fclose($smtp_conn); - $this->status_mail['status'] = false; - $this->status_mail['message'] = "user SMTP access failed "; - return false; - } - fputs($smtp_conn, base64_encode($this->smtp['pass'])."\r\n"); - $this->add_log("I: parol_skryt\n"); - $data = $this->get_data($smtp_conn)."\n"; - $this->add_log($data); - $code = substr($data, 0, 3); - if ($code != 235) - { - $this->add_log("wrong password\n"); - fclose($smtp_conn); - $this->status_mail['status'] = false; - $this->status_mail['message'] = "wrong password for SMTP"; - return false; - } - foreach ($this->smtpsendto as $key_res => $value_res) - { - $this->BuildMail($key_res); - if (!$this->status_mail['status']) - { - return FALSE; - } - if (isset($this->body[$key_res])) - $body_resource = $key_res; - else - $body_resource = 'webi'; - fputs($smtp_conn, "MAIL FROM:<".$this->headers['From']."> SIZE=".strlen($this->ready_headers[$key_res]."\r\n".$this->body[$body_resource])."\r\n"); - $this->add_log("I: MAIL FROM:<".$this->headers['From']."> SIZE=".strlen($this->ready_headers[$key_res]."\r\n".$this->body[$body_resource])."\n"); - $data = $this->get_data($smtp_conn)."\n"; - $this->add_log($data); - $code = substr($data, 0, 3); - if ($code != 250) - { - $this->add_log("command MAIL FROM denied by server\n"); - fclose($smtp_conn); - $this->status_mail['status'] = false; - $this->status_mail['message'] = "command MAIL FROM through SMTP denied by server "; - return false; - } - foreach ($this->smtpsendto[$key_res] as $keywebi => $valuewebi) - { - fputs($smtp_conn, "RCPT TO:<".$valuewebi.">\r\n"); - $this->add_log("I: RCPT TO:<".$valuewebi.">\n"); - $data = $this->get_data($smtp_conn)."\n"; - $this->add_log($data); - $code = substr($data, 0, 3); - if ($code != 250 AND $code != 251) - { - $this->add_log( "Server denied RCPT TO command\n"); - fclose($smtp_conn); - $this->status_mail['status'] = false; - $this->status_mail['message'] = "Server denied RCPT TO command through SMTP"; - return false; - } - } - fputs($smtp_conn, "DATA\r\n"); - $this->add_log("I: DATA\n"); - $data = $this->get_data($smtp_conn)."\n"; - $this->add_log($data); - $code = substr($data, 0, 3); - if ($code != 354) - { - $this->add_log( "server denied DATA command \n"); - fclose($smtp_conn); - $this->status_mail['status'] = false; - $this->status_mail['message'] = "server denied DATA command through SMTP"; - return false; - } - fputs($smtp_conn, $this->ready_headers[$key_res]."\r\n".$this->body[$body_resource]."\r\n.\r\n"); - $this->add_log("I: ".$this->ready_headers[$key_res]."\r\n".$this->body[$body_resource]."\r\n.\r\n"); - $data = $this->get_data($smtp_conn)."\n"; - $this->add_log($data); - $code = substr($data, 0, 3); - if ($code != 250) - { - $this->add_log("error sending message\n"); - fclose($smtp_conn); - $this->status_mail['status'] = false; - $this->status_mail['message'] = "error sending message through SMTP"; - return false; - } - fputs($smtp_conn, "RSET\r\n"); - $this->add_log("I: RSET\n"); - $data = $this->get_data($smtp_conn)."\n"; - $this->add_log($data); - $code = substr($data, 0, 3); - if ($code != 250) - { - $this->add_log("error sending message\n"); - fclose($smtp_conn); - $this->status_mail['status'] = false; - $this->status_mail['message'] = "Server denied RSET command"; - return false; - } - if ($key_res != 'webi') - { - unset($this->headers[$key_res]); - unset($this->ready_headers[$key_res]); - } - if ($body_resource != 'webi') - { - unset($this->body[$body_resource]); - } - } - fputs($smtp_conn, "QUIT\r\n"); - $this->add_log("QUIT\r\n"); - $data = $this->get_data($smtp_conn)."\n"; - $this->add_log($data); - fclose($smtp_conn); - $this->status_mail['status'] = true; - $this->status_mail['message'] = "Message successfully sent through SMTP"; - return true; - } - } - public function Get() - { - if (!$this->log_on) - return 'Logging disabled. To create log file enable logging setting $m->log_on(true);'; - - if (strlen($this->smtp_log)) - { - return $this->smtp_log; - } - } -} -?> \ No newline at end of file + true, "message" => 'ок'); public function __construct($charset = "", $ctencoding = '') { $this->boundary = md5(uniqid("myboundary")); $this->smtp['on'] = false; if (strlen($ctencoding) and $ctencoding == '8bit') { $this->ctencoding = '8bit'; } if (strlen($charset)) { $this->charset = strtolower($charset); if ($this->charset == "us-ascii") { $this->ctencoding = "7bit"; } } } public function Body($text, $text_html = "", $alternative_text = '', $resource = 'webi') { if (!strlen($resource)) $resource = 'webi'; if ($text_html == "html") $text_html = "text/html"; else $text_html = "text/plain"; if ($this->ctencoding == 'base64') { if (strlen($alternative_text)) $alternative_text = chunk_split(base64_encode($alternative_text)); if (strlen($text)) $text = chunk_split(base64_encode($text)); } if (!strlen($alternative_text)) { $body = "Content-Type: ".$text_html."; charset=".$this->charset."\r\n"; $body.="Content-Transfer-Encoding: ".$this->ctencoding."\r\n\r\n"; $body.=$text; } elseif (strlen($alternative_text) and $text_html == 'text/html') { $body = "Content-Type: multipart/alternative; boundary=ALT-".$this->boundary."\r\n\r\n"; $body.="--ALT-".$this->boundary."\r\n"; $body.="Content-Type: text/plain; charset=".$this->charset."\r\n"; $body.="Content-Transfer-Encoding: ".$this->ctencoding."\r\n\r\n"; $body.=$alternative_text."\r\n"; $body.="--ALT-".$this->boundary."\r\n"; $body.="Content-Type: text/html; charset=".$this->charset."\r\n"; $body.="Content-Transfer-Encoding: ".$this->ctencoding."\r\n\r\n"; $body.=$text."\r\n"; $body.="--ALT-".$this->boundary."--"; } $this->SubBody[$resource]['body'][0] = $body; } protected function mime_content_type($file) { $ext = strtolower(substr(strrchr(basename($file), '.'), 1)); switch ($ext) { case 'jpg': return 'image/jpeg'; case 'jpeg': return 'image/jpeg'; case 'gif': return 'image/gif'; case 'png': return 'image/png'; case 'ico': return 'image/x-icon'; case 'txt': return 'text/plain'; default: return 'application/octet-stream'; } } public function Attach($filename, $new_name_filename = "", $filetype = "", $disposition = "", $resource = 'webi') { if (!strlen($resource)) $resource = 'webi'; if (!file_exists($filename)) { return FALSE; } if (strlen($new_name_filename)) $basename = basename($new_name_filename); else $basename = basename($filename); $charset_name = "=?".$this->charset."?B?".base64_encode($basename)."?="; if (!strlen($filetype)) $filetype = $this->mime_content_type($basename); $body = "Content-Type: ".$filetype."; name=\"$charset_name\"\r\n"; $body.="Content-Transfer-Encoding: base64\r\n"; if ($disposition == 'attachment') { $body.="Content-Disposition: attachment; filename=\"$charset_name\"\r\n"; } $body.="Content-ID: <".$basename.">\r\n"; $body.="\r\n"; $body.=chunk_split(base64_encode(file_get_contents($filename))); if ($disposition == 'attachment') $this->SubBody[$resource]['mixed'][] = $body; else { $this->SubBody[$resource]['body'][$this->count_body] = $body; $this->count_body++; } } public function BuildMail($resource = 'webi') { if (!strlen($resource)) $resource = 'webi'; $this->ready_headers[$resource] = ''; if (isset($this->SubBody[$resource]['body'])) $resource_body = $resource; else $resource_body = 'webi'; if (!is_array($this->sendto[$resource]) OR !count($this->sendto[$resource])) { $this->status_mail['status'] = false; $this->status_mail['message'] = "Error : no recipient selected for ".$resource; // return false; } if (!isset($this->body[$resource_body])) { if (count($this->SubBody[$resource_body]['body']) > 1) { $body = implode("\r\n--REL-".$this->boundary."\r\n", $this->SubBody[$resource_body]['body']); $body = "Content-Type: multipart/related; boundary=REL-".$this->boundary."\r\n\r\n" .'--REL-'.$this->boundary."\r\n".$body.'--REL-'.$this->boundary."--"; } else { $body = $this->SubBody[$resource_body]['body'][0]; } if (isset($this->SubBody[$resource_body]['mixed']) AND count($this->SubBody[$resource_body]['mixed'])) { $bodymix = implode('--MIX-'.$this->boundary."\r\n", $this->SubBody[$resource_body]['mixed']); $body = $body."\r\n--MIX-".$this->boundary."\r\n".$bodymix; $body = "Content-Type: multipart/mixed; boundary=MIX-".$this->boundary."\r\n\r\n" .'--MIX-'.$this->boundary."\r\n".$body.'--MIX-'.$this->boundary."--"; } unset($this->SubBody[$resource_body]); $temp_mass = explode("\r\n\r\n", $body); $this->body_header[$resource_body] = $temp_mass[0]; unset($temp_mass[0]); $this->body[$resource_body] = implode("\r\n\r\n", $temp_mass); unset($temp_mass); unset($body); } $temp_mass = array(); foreach ($this->sendto[$resource] as $key => $value) { if (strlen($this->names_email[$resource]['To'][$value])) $temp_mass[] = "=?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($this->names_email[$resource]['To'][$value], "\r\n", " "))))."?= <".$value.">"; else $temp_mass[] = $value; } $this->headers[$resource]['To'] = implode(", ", $temp_mass); if (isset($this->acc[$resource]) and count($this->acc[$resource]) > 0) $this->headers[$resource]['CC'] = implode(", ", $this->acc[$resource]); if (isset($this->abcc[$resource]) and count($this->abcc[$resource]) > 0) $this->headers[$resource]['BCC'] = implode(", ", $this->abcc[$resource]); if ($this->receipt) { if (isset($this->headers["Reply-To"])) $this->headers["Disposition-Notification-To"] = $this->headers["Reply-To"]; else $this->headers["Disposition-Notification-To"] = $this->headers['From']; } if ($this->charset != "") { $this->headers["Mime-Version"] = "1.0"; } $this->headers["X-Mailer"] = "Php_libMail_v_2.0(webi.ru)"; if (!isset($this->headers[$resource]['Subject']) and isset($this->headers['webi']['Subject'])) $this->headers[$resource]['Subject'] = $this->headers['webi']['Subject']; if ($this->smtp['on']) { $user_domen = explode('@', $this->headers['From']); $this->ready_headers[$resource] .= "Date: ".date("r")."\r\n"; $this->ready_headers[$resource] .= "Message-ID: <".rand().".".$resource.date("YmjHis")."@".$user_domen[1].">\r\n"; foreach ($this->headers[$resource] as $key => $value) { $new_mass_head[$key] = $value; } foreach ($this->headers as $key => $value) { if (!is_array($value)) $new_mass_head[$key] = $value; } reset($new_mass_head); while (list( $hdr, $value ) = each($new_mass_head)) { if ($hdr == "From" and strlen($this->names_email['from'])) $this->ready_headers[$resource] .= $hdr.": =?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($this->names_email['from'], "\r\n", " "))))."?= <".$value.">\r\n"; elseif ($hdr == "Reply-To" and strlen($this->names_email['Reply-To'])) $this->ready_headers[$resource] .= $hdr.": =?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($this->names_email['Reply-To'], "\r\n", " "))))."?= <".$value.">\r\n"; elseif ($hdr != "BCC") $this->ready_headers[$resource] .= $hdr.": ".$value."\r\n"; } } else { foreach ($this->headers[$resource] as $key => $value) { $new_mass_head[$key] = $value; } foreach ($this->headers as $key => $value) { if (!is_array($value)) $new_mass_head[$key] = $value; } reset($new_mass_head); while (list( $hdr, $value ) = each($new_mass_head)) { if ($hdr == "From" and strlen($this->names_email['from'])) $this->ready_headers[$resource] .= $hdr.": =?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($this->names_email['from'], "\r\n", " "))))."?= <".$value.">\r\n"; elseif ($hdr == "Reply-To" and strlen($this->names_email['Reply-To'])) $this->ready_headers[$resource] .= $hdr.": =?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($this->names_email['Reply-To'], "\r\n", " "))))."?= <".$value.">\r\n"; elseif ($hdr != "Subject" and $hdr != "To") $this->ready_headers[$resource] .= "$hdr: $value\r\n"; } } $this->ready_headers[$resource].=$this->body_header[$resource_body]."\r\n"; } public function autoCheck($bool) { if ($bool) $this->checkAddress = true; else $this->checkAddress = false; } public function log_on($bool) { if ($bool) $this->log_on = true; else $this->log_on = false; } public function Subject($subject, $resource = 'webi') { if (!strlen($resource)) $resource = 'webi'; $this->headers[$resource]['Subject'] = "=?".$this->charset."?Q?".str_replace("+", "_", str_replace("%", "=", urlencode(strtr($subject, "\r\n", " "))))."?="; } public function From($from) { if (!is_string($from)) { $this->status_mail['status'] = false; $this->status_mail['message'] = "Error, From should be inline"; return FALSE; } $temp_mass = explode(';', $from); if (count($temp_mass) == 2) { $this->names_email['from'] = $temp_mass[0]; $this->headers['From'] = $temp_mass[1]; } else { $this->names_email['from'] = ''; $this->headers['From'] = $from; } } public function ReplyTo($address) { if (!is_string($address)) return false; $temp_mass = explode(';', $address); if (count($temp_mass) == 2) { $this->names_email['Reply-To'] = $temp_mass[0]; $this->headers['Reply-To'] = $temp_mass[1]; } else { $this->names_email['Reply-To'] = ''; $this->headers['Reply-To'] = $address; } } public function Receipt() { $this->receipt = 1; } public function To($to, $resource = 'webi') { if (!strlen($resource)) $resource = 'webi'; if (is_array($to)) { foreach ($to as $key => $value) { $temp_mass = explode(';', $value); if (count($temp_mass) == 2) { $this->smtpsendto[$resource][$temp_mass[1]] = $temp_mass[1]; $this->names_email[$resource]['To'][$temp_mass[1]] = $temp_mass[0]; $this->sendto[$resource][] = $temp_mass[1]; } else { $this->smtpsendto[$resource][$value] = $value; $this->names_email[$resource]['To'][$value] = ''; $this->sendto[$resource][] = $value; } } } else { $temp_mass = explode(';', $to); if (count($temp_mass) == 2) { $this->sendto[$resource][] = $temp_mass[1]; $this->smtpsendto[$resource][$temp_mass[1]] = $temp_mass[1]; $this->names_email[$resource]['To'][$temp_mass[1]] = $temp_mass[0]; } else { $this->sendto[$resource][] = $to; $this->smtpsendto[$resource][$to] = $to; $this->names_email[$resource]['To'][$to] = ''; } } if ($this->checkAddress == true) $this->CheckAdresses($this->sendto[$resource]); } private function CheckAdresses($aad) { foreach ($aad as $key => $value) { if (!$this->ValidEmail($value)) { $this->status_mail['status'] = false; $this->status_mail['message'] = "Error : wrong email ".$value; return FALSE; } } } public function ValidEmail($address) { if (function_exists('filter_list')) { $valid_email = filter_var($address, FILTER_VALIDATE_EMAIL); if ($valid_email !== false) return true; else return false; } else { if (ereg(".*<(.+)>", $address, $regs)) { $address = $regs[1]; } if (ereg("^[^@ ]+@([a-zA-Z0-9\-]+\.)+([a-zA-Z0-9\-]{2}|net|com|gov|mil|org|edu|int)\$", $address)) return true; else return false; } } public function Cc($cc, $resource = 'webi') { if (!strlen($resource)) $resource = 'webi'; if (is_array($cc)) { foreach ($cc as $key => $value) { $this->smtpsendto[$resource][$value] = $value; $this->acc[$resource][$value] = $value; } } else { $this->acc[$resource][$cc] = $cc; $this->smtpsendto[$resource][$cc] = $cc; } if ($this->checkAddress == true) $this->CheckAdresses($this->acc[$resource]); } public function Bcc($bcc, $resource = 'webi') { if (!strlen($resource)) $resource = 'webi'; if (is_array($bcc)) { foreach ($bcc as $key => $value) { $this->smtpsendto[$resource][$value] = $value; $this->abcc[$resource][$value] = $value; } } else { $this->abcc[$resource][$bcc] = $bcc; $this->smtpsendto[$resource][$bcc] = $bcc; } if ($this->checkAddress == true) $this->CheckAdresses($this->abcc[$resource]); } public function Organization($org) { if (trim($org != "")) $this->headers['Organization'] = $org; } public function Priority($priority) { $priorities = array('1 (Highest)', '2 (High)', '3 (Normal)', '4 (Low)', '5 (Lowest)'); if (!intval($priority)) return false; if (!isset($priorities[$priority - 1])) return false; $this->headers["X-Priority"] = $priorities[$priority - 1]; return true; } public function smtp_on($smtp_serv, $login, $pass, $port = 25, $timeout = 5) { $this->smtp['on'] = true; // smtp transfer on $this->smtp['serv'] = $smtp_serv; $this->smtp['login'] = $login; $this->smtp['pass'] = $pass; $this->smtp['port'] = $port; $this->smtp['timeout'] = $timeout; } private function get_data($smtp_conn) { $data = ""; while ($str = fgets($smtp_conn, 515)) { $data .= $str; if (substr($str, 3, 1) == " ") { break; } } return $data; } private function add_log($text) { if ($this->log_on) $this->smtp_log.=$text; } public function Send() { if (!$this->status_mail['status']) { return FALSE; } if (!$this->smtp['on']) { foreach ($this->sendto as $key => $value) { $strTo = implode(", ", $this->sendto[$key]); $this->BuildMail($key); if (!$this->status_mail['status']) { return FALSE; } if (isset($this->body[$key])) $body_resource = $key; else $body_resource = 'webi'; $res = @mail($strTo, $this->headers[$key]['Subject'], $this->body[$body_resource], $this->ready_headers[$key]); if (!$res) { $this->status_mail['status'] = false; $this->status_mail['message'] = "Error : mail() function returns error"; } elseif ($this->status_mail['status']) { $this->add_log('TO: '.$strTo."\n"); $this->add_log("Subject: ".$this->headers[$key]['Subject']."\n"); $this->add_log($this->ready_headers[$key]."\n\n"); $this->add_log($this->body[$body_resource]."\n\n\n"); $this->status_mail['status'] = true; $this->status_mail['message'] = "Message successfully sent by mail()"; } if ($key != 'webi') { unset($this->headers[$key]); unset($this->ready_headers[$key]); } if ($body_resource != 'webi') { unset($this->body[$body_resource]); } } if ($this->status_mail['status']) { return true; } else { return FALSE; } } else { if (!$this->smtp['serv'] OR !$this->smtp['login'] OR !$this->smtp['pass'] OR !$this->smtp['port']) { $this->status_mail['status'] = false; $this->status_mail['message'] = "Error : missing required SMTP values "; return false; } $user_domen = explode('@', $this->headers['From']); $smtp_conn = fsockopen($this->smtp['serv'], $this->smtp['port'], $errno, $errstr, $this->smtp['timeout']); if (!$smtp_conn) { $this->add_log("can't connect to server\n\n"); fclose($smtp_conn); $this->status_mail['status'] = false; $this->status_mail['message'] = "Error: can't connect to server"; return false; } $data = $this->get_data($smtp_conn)."\n"; $this->add_log($data); fputs($smtp_conn, "EHLO ".$user_domen[0]."\r\n"); $this->add_log("I: EHLO ".$user_domen[0]."\n"); $data = $this->get_data($smtp_conn)."\n"; $this->add_log($data); $code = substr($data, 0, 3); if ($code != 250) { $this->add_log("Error greeting EHLO \n"); fclose($smtp_conn); $this->status_mail['status'] = false; $this->status_mail['message'] = "Error: greeting EHLO"; return false; } fputs($smtp_conn, "AUTH LOGIN\r\n"); $this->add_log( "I: AUTH LOGIN\n"); $data = $this->get_data($smtp_conn)."\n"; $this->add_log($data); $code = substr($data, 0, 3); if ($code != 334) { $this->add_log("server denies authorization \n"); fclose($smtp_conn); $this->status_mail['status'] = false; $this->status_mail['message'] = "server denies authorization"; return false; } fputs($smtp_conn, base64_encode($this->smtp['login'])."\r\n"); $this->add_log( "I: ".base64_encode($this->smtp['login'])."\n"); $data = $this->get_data($smtp_conn)."\n"; $this->add_log($data); $code = substr($data, 0, 3); if ($code != 334) { $this->add_log( "user access failed\n"); fclose($smtp_conn); $this->status_mail['status'] = false; $this->status_mail['message'] = "user SMTP access failed "; return false; } fputs($smtp_conn, base64_encode($this->smtp['pass'])."\r\n"); $this->add_log("I: parol_skryt\n"); $data = $this->get_data($smtp_conn)."\n"; $this->add_log($data); $code = substr($data, 0, 3); if ($code != 235) { $this->add_log("wrong password\n"); fclose($smtp_conn); $this->status_mail['status'] = false; $this->status_mail['message'] = "wrong password for SMTP"; return false; } foreach ($this->smtpsendto as $key_res => $value_res) { $this->BuildMail($key_res); if (!$this->status_mail['status']) { return FALSE; } if (isset($this->body[$key_res])) $body_resource = $key_res; else $body_resource = 'webi'; fputs($smtp_conn, "MAIL FROM:<".$this->headers['From']."> SIZE=".strlen($this->ready_headers[$key_res]."\r\n".$this->body[$body_resource])."\r\n"); $this->add_log("I: MAIL FROM:<".$this->headers['From']."> SIZE=".strlen($this->ready_headers[$key_res]."\r\n".$this->body[$body_resource])."\n"); $data = $this->get_data($smtp_conn)."\n"; $this->add_log($data); $code = substr($data, 0, 3); if ($code != 250) { $this->add_log("command MAIL FROM denied by server\n"); fclose($smtp_conn); $this->status_mail['status'] = false; $this->status_mail['message'] = "command MAIL FROM through SMTP denied by server "; return false; } foreach ($this->smtpsendto[$key_res] as $keywebi => $valuewebi) { fputs($smtp_conn, "RCPT TO:<".$valuewebi.">\r\n"); $this->add_log("I: RCPT TO:<".$valuewebi.">\n"); $data = $this->get_data($smtp_conn)."\n"; $this->add_log($data); $code = substr($data, 0, 3); if ($code != 250 AND $code != 251) { $this->add_log( "Server denied RCPT TO command\n"); fclose($smtp_conn); $this->status_mail['status'] = false; $this->status_mail['message'] = "Server denied RCPT TO command through SMTP"; return false; } } fputs($smtp_conn, "DATA\r\n"); $this->add_log("I: DATA\n"); $data = $this->get_data($smtp_conn)."\n"; $this->add_log($data); $code = substr($data, 0, 3); if ($code != 354) { $this->add_log( "server denied DATA command \n"); fclose($smtp_conn); $this->status_mail['status'] = false; $this->status_mail['message'] = "server denied DATA command through SMTP"; return false; } fputs($smtp_conn, $this->ready_headers[$key_res]."\r\n".$this->body[$body_resource]."\r\n.\r\n"); $this->add_log("I: ".$this->ready_headers[$key_res]."\r\n".$this->body[$body_resource]."\r\n.\r\n"); $data = $this->get_data($smtp_conn)."\n"; $this->add_log($data); $code = substr($data, 0, 3); if ($code != 250) { $this->add_log("error sending message\n"); fclose($smtp_conn); $this->status_mail['status'] = false; $this->status_mail['message'] = "error sending message through SMTP"; return false; } fputs($smtp_conn, "RSET\r\n"); $this->add_log("I: RSET\n"); $data = $this->get_data($smtp_conn)."\n"; $this->add_log($data); $code = substr($data, 0, 3); if ($code != 250) { $this->add_log("error sending message\n"); fclose($smtp_conn); $this->status_mail['status'] = false; $this->status_mail['message'] = "Server denied RSET command"; return false; } if ($key_res != 'webi') { unset($this->headers[$key_res]); unset($this->ready_headers[$key_res]); } if ($body_resource != 'webi') { unset($this->body[$body_resource]); } } fputs($smtp_conn, "QUIT\r\n"); $this->add_log("QUIT\r\n"); $data = $this->get_data($smtp_conn)."\n"; $this->add_log($data); fclose($smtp_conn); $this->status_mail['status'] = true; $this->status_mail['message'] = "Message successfully sent through SMTP"; return true; } } public function Get() { if (!$this->log_on) return 'Logging disabled. To create log file enable logging setting $m->log_on(true);'; if (strlen($this->smtp_log)) { return $this->smtp_log; } } } ?> \ No newline at end of file diff --git a/classes/recaptchalib.php b/classes/recaptchalib.php index de6c281..fd87f0f 100644 --- a/classes/recaptchalib.php +++ b/classes/recaptchalib.php @@ -1,277 +1 @@ - $value ) - $req .= $key . '=' . urlencode( stripslashes($value) ) . '&'; - - // Cut the last '&' - $req=substr($req,0,strlen($req)-1); - return $req; -} - - - -/** - * Submits an HTTP POST to a reCAPTCHA server - * @param string $host - * @param string $path - * @param array $data - * @param int port - * @return array response - */ -function _recaptcha_http_post($host, $path, $data, $port = 80) { - - $req = _recaptcha_qsencode ($data); - - $http_request = "POST $path HTTP/1.0\r\n"; - $http_request .= "Host: $host\r\n"; - $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n"; - $http_request .= "Content-Length: " . strlen($req) . "\r\n"; - $http_request .= "User-Agent: reCAPTCHA/PHP\r\n"; - $http_request .= "\r\n"; - $http_request .= $req; - - $response = ''; - if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) { - die ('Could not open socket'); - } - - fwrite($fs, $http_request); - - while ( !feof($fs) ) - $response .= fgets($fs, 1160); // One TCP-IP packet - fclose($fs); - $response = explode("\r\n\r\n", $response, 2); - - return $response; -} - - - -/** - * Gets the challenge HTML (javascript and non-javascript version). - * This is called from the browser, and the resulting reCAPTCHA HTML widget - * is embedded within the HTML form it was called from. - * @param string $pubkey A public key for reCAPTCHA - * @param string $error The error given by reCAPTCHA (optional, default is null) - * @param boolean $use_ssl Should the request be made over ssl? (optional, default is false) - - * @return string - The HTML to be embedded in the user's form. - */ -function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false) -{ - if ($pubkey == null || $pubkey == '') { - die ("To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create"); - } - - if ($use_ssl) { - $server = RECAPTCHA_API_SECURE_SERVER; - } else { - $server = RECAPTCHA_API_SERVER; - } - - $errorpart = ""; - if ($error) { - $errorpart = "&error=" . $error; - } - return ' - - '; -} - - - - -/** - * A ReCaptchaResponse is returned from recaptcha_check_answer() - */ -class ReCaptchaResponse { - var $is_valid; - var $error; -} - - -/** - * Calls an HTTP POST function to verify if the user's guess was correct - * @param string $privkey - * @param string $remoteip - * @param string $challenge - * @param string $response - * @param array $extra_params an array of extra variables to post to the server - * @return ReCaptchaResponse - */ -function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $extra_params = array()) -{ - if ($privkey == null || $privkey == '') { - die ("To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create"); - } - - if ($remoteip == null || $remoteip == '') { - die ("For security reasons, you must pass the remote ip to reCAPTCHA"); - } - - - - //discard spam submissions - if ($challenge == null || strlen($challenge) == 0 || $response == null || strlen($response) == 0) { - $recaptcha_response = new ReCaptchaResponse(); - $recaptcha_response->is_valid = false; - $recaptcha_response->error = 'incorrect-captcha-sol'; - return $recaptcha_response; - } - - $response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER, "/recaptcha/api/verify", - array ( - 'privatekey' => $privkey, - 'remoteip' => $remoteip, - 'challenge' => $challenge, - 'response' => $response - ) + $extra_params - ); - - $answers = explode ("\n", $response [1]); - $recaptcha_response = new ReCaptchaResponse(); - - if (trim ($answers [0]) == 'true') { - $recaptcha_response->is_valid = true; - } - else { - $recaptcha_response->is_valid = false; - $recaptcha_response->error = $answers [1]; - } - return $recaptcha_response; - -} - -/** - * gets a URL where the user can sign up for reCAPTCHA. If your application - * has a configuration page where you enter a key, you should provide a link - * using this function. - * @param string $domain The domain where the page is hosted - * @param string $appname The name of your application - */ -function recaptcha_get_signup_url ($domain = null, $appname = null) { - return "https://www.google.com/recaptcha/admin/create?" . _recaptcha_qsencode (array ('domains' => $domain, 'app' => $appname)); -} - -function _recaptcha_aes_pad($val) { - $block_size = 16; - $numpad = $block_size - (strlen ($val) % $block_size); - return str_pad($val, strlen ($val) + $numpad, chr($numpad)); -} - -/* Mailhide related code */ - -function _recaptcha_aes_encrypt($val,$ky) { - if (! function_exists ("mcrypt_encrypt")) { - die ("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed."); - } - $mode=MCRYPT_MODE_CBC; - $enc=MCRYPT_RIJNDAEL_128; - $val=_recaptcha_aes_pad($val); - return mcrypt_encrypt($enc, $ky, $val, $mode, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"); -} - - -function _recaptcha_mailhide_urlbase64 ($x) { - return strtr(base64_encode ($x), '+/', '-_'); -} - -/* gets the reCAPTCHA Mailhide url for a given email, public key and private key */ -function recaptcha_mailhide_url($pubkey, $privkey, $email) { - if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) { - die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " . - "you can do so at http://www.google.com/recaptcha/mailhide/apikey"); - } - - - $ky = pack('H*', $privkey); - $cryptmail = _recaptcha_aes_encrypt ($email, $ky); - - return "http://www.google.com/recaptcha/mailhide/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64 ($cryptmail); -} - -/** - * gets the parts of the email to expose to the user. - * eg, given johndoe@example,com return ["john", "example.com"]. - * the email is then displayed as john...@example.com - */ -function _recaptcha_mailhide_email_parts ($email) { - $arr = preg_split("/@/", $email ); - - if (strlen ($arr[0]) <= 4) { - $arr[0] = substr ($arr[0], 0, 1); - } else if (strlen ($arr[0]) <= 6) { - $arr[0] = substr ($arr[0], 0, 3); - } else { - $arr[0] = substr ($arr[0], 0, 4); - } - return $arr; -} - -/** - * Gets html to display an email address given a public an private key. - * to get a key, go to: - * - * http://www.google.com/recaptcha/mailhide/apikey - */ -function recaptcha_mailhide_html($pubkey, $privkey, $email) { - $emailparts = _recaptcha_mailhide_email_parts ($email); - $url = recaptcha_mailhide_url ($pubkey, $privkey, $email); - - return htmlentities($emailparts[0]) . "...@" . htmlentities ($emailparts [1]); - -} - - -?> + $value ) $req .= $key . '=' . urlencode( stripslashes($value) ) . '&'; // Cut the last '&' $req=substr($req,0,strlen($req)-1); return $req; } /** * Submits an HTTP POST to a reCAPTCHA server * @param string $host * @param string $path * @param array $data * @param int port * @return array response */ function _recaptcha_http_post($host, $path, $data, $port = 80) { $req = _recaptcha_qsencode ($data); $http_request = "POST $path HTTP/1.0\r\n"; $http_request .= "Host: $host\r\n"; $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n"; $http_request .= "Content-Length: " . strlen($req) . "\r\n"; $http_request .= "User-Agent: reCAPTCHA/PHP\r\n"; $http_request .= "\r\n"; $http_request .= $req; $response = ''; if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) { die ('Could not open socket'); } fwrite($fs, $http_request); while ( !feof($fs) ) $response .= fgets($fs, 1160); // One TCP-IP packet fclose($fs); $response = explode("\r\n\r\n", $response, 2); return $response; } /** * Gets the challenge HTML (javascript and non-javascript version). * This is called from the browser, and the resulting reCAPTCHA HTML widget * is embedded within the HTML form it was called from. * @param string $pubkey A public key for reCAPTCHA * @param string $error The error given by reCAPTCHA (optional, default is null) * @param boolean $use_ssl Should the request be made over ssl? (optional, default is false) * @return string - The HTML to be embedded in the user's form. */ function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false) { if ($pubkey == null || $pubkey == '') { die ("To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create"); } if ($use_ssl) { $server = RECAPTCHA_API_SECURE_SERVER; } else { $server = RECAPTCHA_API_SERVER; } $errorpart = ""; if ($error) { $errorpart = "&error=" . $error; } return ' '; } /** * A ReCaptchaResponse is returned from recaptcha_check_answer() */ class ReCaptchaResponse { var $is_valid; var $error; } /** * Calls an HTTP POST function to verify if the user's guess was correct * @param string $privkey * @param string $remoteip * @param string $challenge * @param string $response * @param array $extra_params an array of extra variables to post to the server * @return ReCaptchaResponse */ function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $extra_params = array()) { if ($privkey == null || $privkey == '') { die ("To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create"); } if ($remoteip == null || $remoteip == '') { die ("For security reasons, you must pass the remote ip to reCAPTCHA"); } //discard spam submissions if ($challenge == null || strlen($challenge) == 0 || $response == null || strlen($response) == 0) { $recaptcha_response = new ReCaptchaResponse(); $recaptcha_response->is_valid = false; $recaptcha_response->error = 'incorrect-captcha-sol'; return $recaptcha_response; } $response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER, "/recaptcha/api/verify", array ( 'privatekey' => $privkey, 'remoteip' => $remoteip, 'challenge' => $challenge, 'response' => $response ) + $extra_params ); $answers = explode ("\n", $response [1]); $recaptcha_response = new ReCaptchaResponse(); if (trim ($answers [0]) == 'true') { $recaptcha_response->is_valid = true; } else { $recaptcha_response->is_valid = false; $recaptcha_response->error = $answers [1]; } return $recaptcha_response; } /** * gets a URL where the user can sign up for reCAPTCHA. If your application * has a configuration page where you enter a key, you should provide a link * using this function. * @param string $domain The domain where the page is hosted * @param string $appname The name of your application */ function recaptcha_get_signup_url ($domain = null, $appname = null) { return "https://www.google.com/recaptcha/admin/create?" . _recaptcha_qsencode (array ('domains' => $domain, 'app' => $appname)); } function _recaptcha_aes_pad($val) { $block_size = 16; $numpad = $block_size - (strlen ($val) % $block_size); return str_pad($val, strlen ($val) + $numpad, chr($numpad)); } /* Mailhide related code */ function _recaptcha_aes_encrypt($val,$ky) { if (! function_exists ("mcrypt_encrypt")) { die ("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed."); } $mode=MCRYPT_MODE_CBC; $enc=MCRYPT_RIJNDAEL_128; $val=_recaptcha_aes_pad($val); return mcrypt_encrypt($enc, $ky, $val, $mode, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"); } function _recaptcha_mailhide_urlbase64 ($x) { return strtr(base64_encode ($x), '+/', '-_'); } /* gets the reCAPTCHA Mailhide url for a given email, public key and private key */ function recaptcha_mailhide_url($pubkey, $privkey, $email) { if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) { die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " . "you can do so at http://www.google.com/recaptcha/mailhide/apikey"); } $ky = pack('H*', $privkey); $cryptmail = _recaptcha_aes_encrypt ($email, $ky); return "http://www.google.com/recaptcha/mailhide/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64 ($cryptmail); } /** * gets the parts of the email to expose to the user. * eg, given johndoe@example,com return ["john", "example.com"]. * the email is then displayed as john...@example.com */ function _recaptcha_mailhide_email_parts ($email) { $arr = preg_split("/@/", $email ); if (strlen ($arr[0]) <= 4) { $arr[0] = substr ($arr[0], 0, 1); } else if (strlen ($arr[0]) <= 6) { $arr[0] = substr ($arr[0], 0, 3); } else { $arr[0] = substr ($arr[0], 0, 4); } return $arr; } /** * Gets html to display an email address given a public an private key. * to get a key, go to: * * http://www.google.com/recaptcha/mailhide/apikey */ function recaptcha_mailhide_html($pubkey, $privkey, $email) { $emailparts = _recaptcha_mailhide_email_parts ($email); $url = recaptcha_mailhide_url ($pubkey, $privkey, $email); return htmlentities($emailparts[0]) . "...@" . htmlentities ($emailparts [1]); } ?> \ No newline at end of file diff --git a/contact.php b/contact.php index 2bcdba5..d3bc020 100644 --- a/contact.php +++ b/contact.php @@ -1,178 +1 @@ - - - -Contact Us - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-

- -

-
-
- - - -
-
-
-
- -
-
-
-

- Where to Find Us -

-
- - -

24/7 support is on for all Services.

-

Programmers at Gigabyte Developers Incorporated will help to make sure that your requested services are ready on or before your chosen deadline. Note that all our services are free but payments depend on your desired specifications and the programmer you choose to do your work.

-

Want to meet our team of Developers live in person? If yes, Don't hesitate to pay us a visit at our Headquarters using the address below.

-

#40 Nnokwa Street, World Bank Housing Estate, Umuahia, Abia State, Nigeria.

- Telephone 1: +234 810 430 9369
- Telephone 2: +234 701 723 6746
- E-mail: nwokomaemmanuel@gmail.com

-

Note: Our team here at Gigabyte Developers Incorporated are working ceaselessly to satisfy our customers.

-
-
-
-
-
-
-
-

Contact Form

-
-
-
-
-
- - - - -
-
- -
-
- -
-
-
- - -
-
-
-
-
-
- - - - - + Contact Us

Where to Find Us

24/7 support is on for all Services.

Programmers at GigabyteDevelopers Incorporated will help to make sure that your requested services are ready on orbefore your chosen deadline. Note that all our services are free but payments depend on your desiredspecifications and the programmer you choose to do your work.

Want to meet our team of Developers live in person? If yes, Don't hesitate to pay us a visit at ourHeadquarters using the address below.

#40 Nnokwa Street, World Bank Housing Estate, Umuahia, Abia State, Nigeria.

Telephone 1: +234 810 430 9369
Telephone 2: +234 701 723 6746
E-mail: nwokomaemmanuel@gmail.com

Note: Our team here at Gigabyte Developers Incorporated are working ceaselesslyto satisfy our customers.

Contact Form

\ No newline at end of file diff --git a/contactcss/animate.css b/contactcss/animate.css index b3db985..d55af5d 100644 --- a/contactcss/animate.css +++ b/contactcss/animate.css @@ -1,9 +1,15 @@ -@charset "UTF-8";/*! - * animate.css -http://daneden.me/animate - * Version - 3.5.1 - * Licensed under the MIT license - http://opensource.org/licenses/MIT - * - * Copyright (c) 2016 Daniel Eden +@charset "UTF-8";/*! + + * animate.css -http://daneden.me/animate + + * Version - 3.5.1 + + * Licensed under the MIT license - http://opensource.org/licenses/MIT + + * + + * Copyright (c) 2016 Daniel Eden + */.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite} .animated.hinge{-webkit-animation-duration:2s;animation-duration:2s}.animated.flipOutX,.animated.flipOutY,.animated.bounceIn,.animated.bounceOut{-webkit-animation-duration:.75s;animation-duration:.75s}@-webkit-keyframes bounce{from,20%,53%,80%,to{-webkit-animation-timing-function:cubic-bezier(0.215,0.610,0.355,1.000);animation-timing-function:cubic-bezier(0.215,0.610,0.355,1.000);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)} 40%,43%{-webkit-animation-timing-function:cubic-bezier(0.755,0.050,0.855,0.060);animation-timing-function:cubic-bezier(0.755,0.050,0.855,0.060);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(0.755,0.050,0.855,0.060);animation-timing-function:cubic-bezier(0.755,0.050,0.855,0.060);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)} diff --git a/contactcss/bootstrap.css b/contactcss/bootstrap.css index fec0a46..03ca792 100644 --- a/contactcss/bootstrap.css +++ b/contactcss/bootstrap.css @@ -1,7 +1,11 @@ -/*! - * Bootstrap v3.1.1 (http://getbootstrap.com) - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) +/*! + + * Bootstrap v3.1.1 (http://getbootstrap.com) + + * Copyright 2011-2014 Twitter, Inc. + + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.0 | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block} audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold} dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden} diff --git a/contactcss/font-awesome.css b/contactcss/font-awesome.css index 3320f16..fb06532 100644 --- a/contactcss/font-awesome.css +++ b/contactcss/font-awesome.css @@ -1,6 +1,9 @@ -/*! - * Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome - * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) +/*! + + * Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome + + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.1.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff?v=4.1.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.1.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal} .fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em} .fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center} diff --git a/contactcss/owl.carousel.css b/contactcss/owl.carousel.css index 39833f8..b663725 100644 --- a/contactcss/owl.carousel.css +++ b/contactcss/owl.carousel.css @@ -1,87 +1 @@ - -.carousel_wrapper { - background-color: #6b7494; - padding: 86px 0 0; -} - -#owl { - padding-bottom: 183px; - z-index: 1; - position: relative; - margin: 0 -15px; -} - -.owl_link { - color: #fff; - display: inline-block; - margin-bottom: 37px; - font: 30px/52px 'Marvel', sans-serif; -} - -.owl-item { - float: left; -} - -#owl .item { - padding: 0 15px; - position: relative; - overflow: hidden; - text-align: center; -} - -#owl .item .color2 { - font-weight: normal; -} - -#owl .banner_title { - padding-bottom: 76px; -} - -#owl .banner_title:after { - bottom: 53px; -} - -#owl .banner p { - padding: 49px 48px 0; - margin-bottom: 32px; -} - -#owl .item .banner { - margin: 0; -} - -#owl .owl-wrapper-outer { - overflow: hidden; -} - -.owl-carousel .owl-wrapper{ - display: none; - position: relative; - -webkit-transform: translate3d(0px, 0px, 0px); - -webkit-perspective: 1000; -} - -#owl .owl-prev, #owl .owl-next { - cursor: pointer; - position: absolute; - background: url(../images/prevnext-1.png) 0 0 no-repeat; - display: block; - width: 24px; - height: 40px; - bottom: 89px; - left: 50%; - margin-left: -37px; - overflow: hidden; - text-indent: -999px; - z-index: 20; -} - -#owl .owl-next { - margin-left: 11px; - background-position: right bottom; -} - -#owl .owl-next:hover, -#owl .owl-prev:hover { - opacity: 0.5; -} \ No newline at end of file + .carousel_wrapper { background-color: #6b7494; padding: 86px 0 0; } #owl { padding-bottom: 183px; z-index: 1; position: relative; margin: 0 -15px; } .owl_link { color: #fff; display: inline-block; margin-bottom: 37px; font: 30px/52px 'Marvel', sans-serif; } .owl-item { float: left; } #owl .item { padding: 0 15px; position: relative; overflow: hidden; text-align: center; } #owl .item .color2 { font-weight: normal; } #owl .banner_title { padding-bottom: 76px; } #owl .banner_title:after { bottom: 53px; } #owl .banner p { padding: 49px 48px 0; margin-bottom: 32px; } #owl .item .banner { margin: 0; } #owl .owl-wrapper-outer { overflow: hidden; } .owl-carousel .owl-wrapper{ display: none; position: relative; -webkit-transform: translate3d(0px, 0px, 0px); -webkit-perspective: 1000; } #owl .owl-prev, #owl .owl-next { cursor: pointer; position: absolute; background: url(../images/prevnext-1.png) 0 0 no-repeat; display: block; width: 24px; height: 40px; bottom: 89px; left: 50%; margin-left: -37px; overflow: hidden; text-indent: -999px; z-index: 20; } #owl .owl-next { margin-left: 11px; background-position: right bottom; } #owl .owl-next:hover, #owl .owl-prev:hover { opacity: 0.5; } \ No newline at end of file diff --git a/contactcss/stuck.css b/contactcss/stuck.css index bbec59b..683e70b 100644 --- a/contactcss/stuck.css +++ b/contactcss/stuck.css @@ -1,35 +1 @@ -#stuck_container { - -webkit-transition: all 0.4s ease; - -moz-transition: all 0.4s ease; - -ms-transition: all 0.4s ease; - -o-transition: all 0.4s ease; - transition: all 0.4s ease; - z-index: 999; - box-shadow: 0 5px 5px rgba(0, 0, 0, 0.15); - background: url(../images/stuck_overlay.png) 0 0 repeat; -} -#stuck_container .isStuck { - background-color: #fff; - -webkit-transition: all 0.2s ease; - -moz-transition: all 0.2s ease; - -ms-transition: all 0.2s ease; - -o-transition: all 0.2s ease; - transition: all 0.2s ease; -} -#stuck_container .isStuck .menuBox { - margin: 0; - -webkit-transition: all 0.4s ease; - -moz-transition: all 0.4s ease; - -ms-transition: all 0.4s ease; - -o-transition: all 0.4s ease; - transition: all 0.4s ease; -} -@media only screen and (max-width: 979px) { - #stuck_container { - position: relative !important; - box-shadow: none; - } - .pseudoStickyBlock { - height: 0 !important; - } -} +#stuck_container { -webkit-transition: all 0.4s ease; -moz-transition: all 0.4s ease; -ms-transition: all 0.4s ease; -o-transition: all 0.4s ease; transition: all 0.4s ease; z-index: 999; box-shadow: 0 5px 5px rgba(0, 0, 0, 0.15); background: url(../images/stuck_overlay.png) 0 0 repeat; } #stuck_container .isStuck { background-color: #fff; -webkit-transition: all 0.2s ease; -moz-transition: all 0.2s ease; -ms-transition: all 0.2s ease; -o-transition: all 0.2s ease; transition: all 0.2s ease; } #stuck_container .isStuck .menuBox { margin: 0; -webkit-transition: all 0.4s ease; -moz-transition: all 0.4s ease; -ms-transition: all 0.4s ease; -o-transition: all 0.4s ease; transition: all 0.4s ease; } @media only screen and (max-width: 979px) { #stuck_container { position: relative !important; box-shadow: none; } .pseudoStickyBlock { height: 0 !important; } } \ No newline at end of file diff --git a/contactjs/PIE.php b/contactjs/PIE.php index 23ad1c8..336c273 100644 --- a/contactjs/PIE.php +++ b/contactjs/PIE.php @@ -1,19 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/contacttest.html b/contacttest.html index 246ba90..6996348 100644 --- a/contacttest.html +++ b/contacttest.html @@ -1,8 +1 @@ -
- Email:
- - Message:
-
- - -
+
Email:
Message:

\ No newline at end of file diff --git a/core/database/connect.php b/core/database/connect.php index 873720f..be83319 100644 --- a/core/database/connect.php +++ b/core/database/connect.php @@ -1,5 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/core/functions/general.php b/core/functions/general.php index 9d2f129..c01c50f 100644 --- a/core/functions/general.php +++ b/core/functions/general.php @@ -1,42 +1 @@ -' . "\r\n" . - 'Reply-To: '; - $body = $boby; - mail($to, $subject, $body, $headers); -} - -function logged_in_redirect() { - if (logged_in() === true) { - header('Location: loggedin'); - exit(); - } -} - -function protect_page() { - if (logged_in() === false) { - header('Location: protected'); - exit(); - } -} - -function admin_protect() { - global $user_data; - if (is_admin($user_data['user_id']) === false) { - header('Location: index'); - exit(); - } -} - -function array_sanitize(&$item) { - $item = htmlentities(strip_tags(mysql_real_escape_string($item))); -} - -function sanitize($data) { - return htmlentities(strip_tags(mysql_real_escape_string($data))); -} - -function output_errors($errors) { - return '
  • ' . implode('
  • ', $errors). '
'; -} -?> \ No newline at end of file +' . "\r\n" . 'Reply-To: '; $body = $boby; mail($to, $subject, $body, $headers); } function logged_in_redirect() { if (logged_in() === true) { header('Location: loggedin'); exit(); } } function protect_page() { if (logged_in() === false) { header('Location: protected'); exit(); } } function admin_protect() { global $user_data; if (is_admin($user_data['user_id']) === false) { header('Location: index'); exit(); } } function array_sanitize(&$item) { $item = htmlentities(strip_tags(mysql_real_escape_string($item))); } function sanitize($data) { return htmlentities(strip_tags(mysql_real_escape_string($data))); } function output_errors($errors) { return '
  • ' . implode('
  • ', $errors). '
'; } ?> \ No newline at end of file diff --git a/core/functions/users.php b/core/functions/users.php index b91fef0..12cbf46 100644 --- a/core/functions/users.php +++ b/core/functions/users.php @@ -1,149 +1 @@ - '1')); - - // email generated password to user - email($email, 'Your password recovery', "Hello " . $user_data['first_name'] . ",\n\nYour new password is: " . $generated_password . "\n\n- Gigabyte Developers Incorporated"); - } -} - -function update_user($user_id, $update_data) { - global $session_user_id; - $update = array(); - array_walk($update_data, 'array_sanitize'); - - foreach($update_data as $field=>$data) { - $update[] = '`' . $field . '` = \'' . $data . '\''; - } - - mysql_query("UPDATE `users` SET " . implode(', ', $update) . " WHERE `user_id` = $user_id"); -} - -function activate($email, $email_code) { - $email = mysql_real_escape_string($email); - $email_code = mysql_real_escape_string($email_code); - - if (mysql_result(mysql_query("SELECT COUNT(`user_id`) FROM `users` WHERE `email` = '$email' AND `email_code` = '$email_code' AND `active` = 0"), 0) == 1) { - //queary to update user active status - mysql_query("UPDATE `users` SET `active` =1 WHERE `email` = '$email'"); - return true; - } else { - return false; - } -} - -function change_password($user_id, $password) { - $user_id = (int)$user_id; - $password = md5($password); - - mysql_query("UPDATE `users` SET `password` = '$password', `password_recover` = 0 WHERE `user_id` = $user_id"); -} - -function register_user($register_data) { - array_walk($register_data, 'array_sanitize'); - $register_data['password'] = md5($register_data['password']); - - $fields = '`' . implode('`, `', array_keys($register_data)) . '`'; - $data = '\'' . implode('\', \'', $register_data) . '\''; - - mysql_query("INSERT INTO `users` ($fields) VALUES ($data)"); - email($register_data['email'], 'Confirm Your Account Registration', "Hello " . $register_data['last_name'] .' ' . $register_data['first_name'] . ",\n\nYou need to confirm/activate your account registration to Gigabyte Developers Incorporated by following the link below:\n\nhttp://localhost/gigabytedevsinc/activate?email=" . $register_data['email'] . "&email_code=" . $register_data['email_code'] . "\n\nThanks for registering on Gigabyte Developers Incorporated\n\n- Gigabyte Developers Incorporated"); -} - -function user_count() { - return mysql_result(mysql_query("SELECT COUNT(`user_id`) FROM `users` WHERE `active` = 1"), 0); -} - -function user_data($user_id) { - $data = array(); - $user_id = (int)$user_id; - - $func_num_args = func_num_args(); - $func_get_args = func_get_args(); - - if ($func_num_args > 1) { - unset($func_get_args[0]); - - $fields = '`' . implode('`, `', $func_get_args) . '`'; - $data = mysql_fetch_assoc(mysql_query("SELECT $fields FROM `users` WHERE `user_id` = $user_id")); - - return $data; - } -} - -function logged_in() { - return (isset($_SESSION['user_id'])) ? true : false; -} - -function user_exists($username) { - $username = sanitize($username); - return (mysql_result(mysql_query("SELECT COUNT(`user_id`) FROM `users` WHERE `username` = '$username'"), 0) == 1) ? true : false; -} -function email_exists($email) { - $email = sanitize($email); - return (mysql_result(mysql_query("SELECT COUNT(`user_id`) FROM `users` WHERE `email` = '$email'"), 0) == 1) ? true : false; -} - -function user_active($username) { - $username = sanitize($username); - return (mysql_result(mysql_query("SELECT COUNT(`user_id`) FROM `users` WHERE `username` = '$username' AND `active` = 1"), 0) == 1) ? true : false; -} - -function user_id_from_username($username) { - $username = sanitize($username); - return mysql_result(mysql_query("SELECT `user_id` FROM `users` WHERE `username` = '$username'"), 0, 'user_id'); -} - -function user_id_from_email($email) { - $email = sanitize($email); - return mysql_result(mysql_query("SELECT `user_id` FROM `users` WHERE `email` = '$email'"), 0, 'user_id'); -} - -function login($username, $password) { - $user_id = user_id_from_username($username); - - $username = sanitize($username); - $password = md5($password); - - return (mysql_result(mysql_query("SELECT COUNT(`user_id`) FROM `users` WHERE `username` = '$username' AND `password` = '$password'"), 0) == 1) ? $user_id : false; -} -?> \ No newline at end of file + '1')); // email generated password to user email($email, 'Your password recovery', "Hello " . $user_data['first_name'] . ",\n\nYour new password is: " . $generated_password . "\n\n- Gigabyte Developers Incorporated"); } } function update_user($user_id, $update_data) { global $session_user_id; $update = array(); array_walk($update_data, 'array_sanitize'); foreach($update_data as $field=>$data) { $update[] = '`' . $field . '` = \'' . $data . '\''; } mysql_query("UPDATE `users` SET " . implode(', ', $update) . " WHERE `user_id` = $user_id"); } function activate($email, $email_code) { $email = mysql_real_escape_string($email); $email_code = mysql_real_escape_string($email_code); if (mysql_result(mysql_query("SELECT COUNT(`user_id`) FROM `users` WHERE `email` = '$email' AND `email_code` = '$email_code' AND `active` = 0"), 0) == 1) { //queary to update user active status mysql_query("UPDATE `users` SET `active` =1 WHERE `email` = '$email'"); return true; } else { return false; } } function change_password($user_id, $password) { $user_id = (int)$user_id; $password = md5($password); mysql_query("UPDATE `users` SET `password` = '$password', `password_recover` = 0 WHERE `user_id` = $user_id"); } function register_user($register_data) { array_walk($register_data, 'array_sanitize'); $register_data['password'] = md5($register_data['password']); $fields = '`' . implode('`, `', array_keys($register_data)) . '`'; $data = '\'' . implode('\', \'', $register_data) . '\''; mysql_query("INSERT INTO `users` ($fields) VALUES ($data)"); email($register_data['email'], 'Confirm Your Account Registration', "Hello " . $register_data['last_name'] .' ' . $register_data['first_name'] . ",\n\nYou need to confirm/activate your account registration to Gigabyte Developers Incorporated by following the link below:\n\nhttp://localhost/gigabytedevsinc/activate?email=" . $register_data['email'] . "&email_code=" . $register_data['email_code'] . "\n\nThanks for registering on Gigabyte Developers Incorporated\n\n- Gigabyte Developers Incorporated"); } function user_count() { return mysql_result(mysql_query("SELECT COUNT(`user_id`) FROM `users` WHERE `active` = 1"), 0); } function user_data($user_id) { $data = array(); $user_id = (int)$user_id; $func_num_args = func_num_args(); $func_get_args = func_get_args(); if ($func_num_args > 1) { unset($func_get_args[0]); $fields = '`' . implode('`, `', $func_get_args) . '`'; $data = mysql_fetch_assoc(mysql_query("SELECT $fields FROM `users` WHERE `user_id` = $user_id")); return $data; } } function logged_in() { return (isset($_SESSION['user_id'])) ? true : false; } function user_exists($username) { $username = sanitize($username); return (mysql_result(mysql_query("SELECT COUNT(`user_id`) FROM `users` WHERE `username` = '$username'"), 0) == 1) ? true : false; } function email_exists($email) { $email = sanitize($email); return (mysql_result(mysql_query("SELECT COUNT(`user_id`) FROM `users` WHERE `email` = '$email'"), 0) == 1) ? true : false; } function user_active($username) { $username = sanitize($username); return (mysql_result(mysql_query("SELECT COUNT(`user_id`) FROM `users` WHERE `username` = '$username' AND `active` = 1"), 0) == 1) ? true : false; } function user_id_from_username($username) { $username = sanitize($username); return mysql_result(mysql_query("SELECT `user_id` FROM `users` WHERE `username` = '$username'"), 0, 'user_id'); } function user_id_from_email($email) { $email = sanitize($email); return mysql_result(mysql_query("SELECT `user_id` FROM `users` WHERE `email` = '$email'"), 0, 'user_id'); } function login($username, $password) { $user_id = user_id_from_username($username); $username = sanitize($username); $password = md5($password); return (mysql_result(mysql_query("SELECT COUNT(`user_id`) FROM `users` WHERE `username` = '$username' AND `password` = '$password'"), 0) == 1) ? $user_id : false; } ?> \ No newline at end of file diff --git a/core/init.php b/core/init.php index 98f8fef..abc9c5b 100644 --- a/core/init.php +++ b/core/init.php @@ -1,28 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/css/animate.min.css b/css/animate.min.css index 2bb975c..d1842e4 100644 --- a/css/animate.min.css +++ b/css/animate.min.css @@ -1,14 +1,25 @@ -@charset "UTF-8";/*! -Animate.css - http://daneden.me/animate -Licensed under the MIT license - -Copyright (c) 2013 Daniel Eden - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +@charset "UTF-8";/*! + +Animate.css - http://daneden.me/animate + +Licensed under the MIT license + + + +Copyright (c) 2013 Daniel Eden + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite} .animated.hinge{-webkit-animation-duration:2s;animation-duration:2s}@-webkit-keyframes bounce{0%,20%,50%,80%,100%{-webkit-transform:translateY(0);transform:translateY(0)}40%{-webkit-transform:translateY(-30px);transform:translateY(-30px)}60%{-webkit-transform:translateY(-15px);transform:translateY(-15px)} }@keyframes bounce{0%,20%,50%,80%,100%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}40%{-webkit-transform:translateY(-30px);-ms-transform:translateY(-30px);transform:translateY(-30px)}60%{-webkit-transform:translateY(-15px);-ms-transform:translateY(-15px);transform:translateY(-15px)} diff --git a/css/bootstrap.min.css b/css/bootstrap.min.css index b028c32..d693a94 100644 --- a/css/bootstrap.min.css +++ b/css/bootstrap.min.css @@ -1,7 +1,7 @@ -/*! - * Bootstrap v3.3.5 (http://getbootstrap.com) - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) +/*! + * Bootstrap v3.3.5 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block} audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700} dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden} diff --git a/css/font-awesome.min.css b/css/font-awesome.min.css index dcb90f6..9635e36 100644 --- a/css/font-awesome.min.css +++ b/css/font-awesome.min.css @@ -1,6 +1,9 @@ -/*! - * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome - * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) +/*! + + * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome + + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.3.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.3.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.3.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.3.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal} .fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transform:translate(0,0)}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%} .fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center} diff --git a/css/presets/preset1.css b/css/presets/preset1.css index 556f75d..ed207e9 100644 --- a/css/presets/preset1.css +++ b/css/presets/preset1.css @@ -1,97 +1 @@ -a, -#home-slider .caption h1 span, -#twitter-carousel .item span, -#footer .footer-bottom, -#single-portfolio .close-folio-item:hover, -.single-table.featured .btn.btn-primary, -.contact-info ul li a:hover, -#footer .footer-bottom a { - color: #028fcc; -} - -.btn.btn-primary:hover, -.btn-submit:hover { - background-color: #027db3 -} - -a:hover, a:focus { - color: #027db3; -} - -.main-nav, -.service-icon, -.progress-bar.progress-bar-primary, -.single-table.featured, -.btn.btn-primary, -.twitter-icon .fa-twitter, -.twitter-left-control:hover, .twitter-right-control:hover, -.post-icon, -.entry-header .date:after, -.btn-loadmore:hover, -.btn-submit, -#footer, -.caption .btn-start:hover, -.left-control:hover, -.right-control:hover, -.folio-overview a:hover { - background-color:#028fcc; -} - -.twitter-left-control:hover, -.twitter-right-control:hover, -.btn-loadmore:hover { - border: 1px solid #028fcc; -} - -.caption .btn-start:hover, -.left-control:hover, -.right-control:hover { - border-color: #028fcc; -} - -.twitter-icon .fa-twitter:after { - border-color: #028fcc transparent transparent; -} -span.glyphicon.glyphicon-bullhorn{ - background-color: #028fcc; -} - -.scrollex { - background-color: #028fcc; -} - -.scrollexer { - background-color: #028fcc; -} - - .scrollex:hover { - padding:0px; - margin: 0px; - background-color: rgba(0,0,0,.2); - -} - .scrollexer:hover { - padding-bottom:-190px; - margin: 0px; - background-color: rgba(0,0,0,.2); - -} - -li.dropdown.dropdown-toggle:focus { - background-color: #028fcc; - color:#fff; -} -li.dropdown:focus { - background-color: #028fcc; - color:#fff; -} - -.dropdown-toggle:hover { - background-color: #028fcc; - color:#fff; -} - -.dropdown-toggle:focus { - background-color: #028fcc; - color:#fff; -} \ No newline at end of file +a, #home-slider .caption h1 span, #twitter-carousel .item span, #footer .footer-bottom, #single-portfolio .close-folio-item:hover, .single-table.featured .btn.btn-primary, .contact-info ul li a:hover, #footer .footer-bottom a { color: #028fcc; } .btn.btn-primary:hover, .btn-submit:hover { background-color: #027db3 } a:hover, a:focus { color: #027db3; } .main-nav, .service-icon, .progress-bar.progress-bar-primary, .single-table.featured, .btn.btn-primary, .twitter-icon .fa-twitter, .twitter-left-control:hover, .twitter-right-control:hover, .post-icon, .entry-header .date:after, .btn-loadmore:hover, .btn-submit, #footer, .caption .btn-start:hover, .left-control:hover, .right-control:hover, .folio-overview a:hover { background-color:#028fcc; } .twitter-left-control:hover, .twitter-right-control:hover, .btn-loadmore:hover { border: 1px solid #028fcc; } .caption .btn-start:hover, .left-control:hover, .right-control:hover { border-color: #028fcc; } .twitter-icon .fa-twitter:after { border-color: #028fcc transparent transparent; } span.glyphicon.glyphicon-bullhorn{ background-color: #028fcc; } .scrollex { background-color: #028fcc; } .scrollexer { background-color: #028fcc; } .scrollex:hover { padding:0px; margin: 0px; background-color: rgba(0,0,0,.2); } .scrollexer:hover { padding-bottom:-190px; margin: 0px; background-color: rgba(0,0,0,.2); } li.dropdown.dropdown-toggle:focus { background-color: #028fcc; color:#fff; } li.dropdown:focus { background-color: #028fcc; color:#fff; } .dropdown-toggle:hover { background-color: #028fcc; color:#fff; } .dropdown-toggle:focus { background-color: #028fcc; color:#fff; } \ No newline at end of file diff --git a/css/presets/preset2.css b/css/presets/preset2.css index 18472c4..94cc7db 100644 --- a/css/presets/preset2.css +++ b/css/presets/preset2.css @@ -1,54 +1 @@ -a, -#home-slider .caption h1 span, -#twitter-carousel .item span, -#footer .footer-bottom, -#single-portfolio .close-folio-item:hover, -.single-table.featured .btn.btn-primary, -.contact-info ul li a:hover, -#footer .footer-bottom a { - color: #f27935; -} - -.btn.btn-primary:hover, -.btn-submit:hover { - background-color: #db6625 -} - -a:hover, a:focus { - color: #db6625; -} - -.main-nav, -.service-icon, -.progress-bar.progress-bar-primary, -.single-table.featured, -.btn.btn-primary, -.twitter-icon .fa-twitter, -.twitter-left-control:hover, .twitter-right-control:hover, -.post-icon, -.entry-header .date:after, -.btn-loadmore:hover, -.btn-submit, -#footer, -.caption .btn-start:hover, -.left-control:hover, -.right-control:hover, -.folio-overview a:hover { - background-color:#f27935; -} - -.twitter-left-control:hover, -.twitter-right-control:hover, -.btn-loadmore:hover { - border: 1px solid #f27935; -} - -.caption .btn-start:hover, -.left-control:hover, -.right-control:hover { - border-color: #f27935; -} - -.twitter-icon .fa-twitter:after { - border-color: #f27935 transparent transparent; -} \ No newline at end of file +a, #home-slider .caption h1 span, #twitter-carousel .item span, #footer .footer-bottom, #single-portfolio .close-folio-item:hover, .single-table.featured .btn.btn-primary, .contact-info ul li a:hover, #footer .footer-bottom a { color: #f27935; } .btn.btn-primary:hover, .btn-submit:hover { background-color: #db6625 } a:hover, a:focus { color: #db6625; } .main-nav, .service-icon, .progress-bar.progress-bar-primary, .single-table.featured, .btn.btn-primary, .twitter-icon .fa-twitter, .twitter-left-control:hover, .twitter-right-control:hover, .post-icon, .entry-header .date:after, .btn-loadmore:hover, .btn-submit, #footer, .caption .btn-start:hover, .left-control:hover, .right-control:hover, .folio-overview a:hover { background-color:#f27935; } .twitter-left-control:hover, .twitter-right-control:hover, .btn-loadmore:hover { border: 1px solid #f27935; } .caption .btn-start:hover, .left-control:hover, .right-control:hover { border-color: #f27935; } .twitter-icon .fa-twitter:after { border-color: #f27935 transparent transparent; } \ No newline at end of file diff --git a/css/presets/preset3.css b/css/presets/preset3.css index 19ce7d9..7e4eeeb 100644 --- a/css/presets/preset3.css +++ b/css/presets/preset3.css @@ -1,54 +1 @@ -a, -#home-slider .caption h1 span, -#twitter-carousel .item span, -#footer .footer-bottom, -#single-portfolio .close-folio-item:hover, -.single-table.featured .btn.btn-primary, -.contact-info ul li a:hover, -#footer .footer-bottom a { - color: #7FBA00; -} - -.btn.btn-primary:hover, -.btn-submit:hover { - background-color: #6ea100 -} - -a:hover, a:focus { - color: #6ea100; -} - -.main-nav, -.service-icon, -.progress-bar.progress-bar-primary, -.single-table.featured, -.btn.btn-primary, -.twitter-icon .fa-twitter, -.twitter-left-control:hover, .twitter-right-control:hover, -.post-icon, -.entry-header .date:after, -.btn-loadmore:hover, -.btn-submit, -#footer, -.caption .btn-start:hover, -.left-control:hover, -.right-control:hover, -.folio-overview a:hover { - background-color:#7FBA00; -} - -.twitter-left-control:hover, -.twitter-right-control:hover, -.btn-loadmore:hover { - border: 1px solid #7FBA00; -} - -.caption .btn-start:hover, -.left-control:hover, -.right-control:hover { - border-color: #7FBA00; -} - -.twitter-icon .fa-twitter:after { - border-color: #7FBA00 transparent transparent; -} \ No newline at end of file +a, #home-slider .caption h1 span, #twitter-carousel .item span, #footer .footer-bottom, #single-portfolio .close-folio-item:hover, .single-table.featured .btn.btn-primary, .contact-info ul li a:hover, #footer .footer-bottom a { color: #7FBA00; } .btn.btn-primary:hover, .btn-submit:hover { background-color: #6ea100 } a:hover, a:focus { color: #6ea100; } .main-nav, .service-icon, .progress-bar.progress-bar-primary, .single-table.featured, .btn.btn-primary, .twitter-icon .fa-twitter, .twitter-left-control:hover, .twitter-right-control:hover, .post-icon, .entry-header .date:after, .btn-loadmore:hover, .btn-submit, #footer, .caption .btn-start:hover, .left-control:hover, .right-control:hover, .folio-overview a:hover { background-color:#7FBA00; } .twitter-left-control:hover, .twitter-right-control:hover, .btn-loadmore:hover { border: 1px solid #7FBA00; } .caption .btn-start:hover, .left-control:hover, .right-control:hover { border-color: #7FBA00; } .twitter-icon .fa-twitter:after { border-color: #7FBA00 transparent transparent; } \ No newline at end of file diff --git a/css/presets/preset4.css b/css/presets/preset4.css index 9787fc1..bddb2cb 100644 --- a/css/presets/preset4.css +++ b/css/presets/preset4.css @@ -1,54 +1 @@ -a, -#home-slider .caption h1 span, -#twitter-carousel .item span, -#footer .footer-bottom, -#single-portfolio .close-folio-item:hover, -.single-table.featured .btn.btn-primary, -.contact-info ul li a:hover, -#footer .footer-bottom a { - color: #0db3c7; -} - -.btn.btn-primary:hover, -.btn-submit:hover { - background-color: #0a8897 -} - -a:hover, a:focus { - color: #0a8897; -} - -.main-nav, -.service-icon, -.progress-bar.progress-bar-primary, -.single-table.featured, -.btn.btn-primary, -.twitter-icon .fa-twitter, -.twitter-left-control:hover, .twitter-right-control:hover, -.post-icon, -.entry-header .date:after, -.btn-loadmore:hover, -.btn-submit, -#footer, -.caption .btn-start:hover, -.left-control:hover, -.right-control:hover, -.folio-overview a:hover { - background-color:#0db3c7; -} - -.twitter-left-control:hover, -.twitter-right-control:hover, -.btn-loadmore:hover { - border: 1px solid #0db3c7; -} - -.caption .btn-start:hover, -.left-control:hover, -.right-control:hover { - border-color: #0db3c7; -} - -.twitter-icon .fa-twitter:after { - border-color: #0db3c7 transparent transparent; -} \ No newline at end of file +a, #home-slider .caption h1 span, #twitter-carousel .item span, #footer .footer-bottom, #single-portfolio .close-folio-item:hover, .single-table.featured .btn.btn-primary, .contact-info ul li a:hover, #footer .footer-bottom a { color: #0db3c7; } .btn.btn-primary:hover, .btn-submit:hover { background-color: #0a8897 } a:hover, a:focus { color: #0a8897; } .main-nav, .service-icon, .progress-bar.progress-bar-primary, .single-table.featured, .btn.btn-primary, .twitter-icon .fa-twitter, .twitter-left-control:hover, .twitter-right-control:hover, .post-icon, .entry-header .date:after, .btn-loadmore:hover, .btn-submit, #footer, .caption .btn-start:hover, .left-control:hover, .right-control:hover, .folio-overview a:hover { background-color:#0db3c7; } .twitter-left-control:hover, .twitter-right-control:hover, .btn-loadmore:hover { border: 1px solid #0db3c7; } .caption .btn-start:hover, .left-control:hover, .right-control:hover { border-color: #0db3c7; } .twitter-icon .fa-twitter:after { border-color: #0db3c7 transparent transparent; } \ No newline at end of file diff --git a/css/presets/preset5.css b/css/presets/preset5.css index 303da78..1b4247d 100644 --- a/css/presets/preset5.css +++ b/css/presets/preset5.css @@ -1,54 +1 @@ -a, -#home-slider .caption h1 span, -#twitter-carousel .item span, -#footer .footer-bottom, -#single-portfolio .close-folio-item:hover, -.single-table.featured .btn.btn-primary, -.contact-info ul li a:hover, -#footer .footer-bottom a { - color: #913d88; -} - -.btn.btn-primary:hover, -.btn-submit:hover { - background-color: #6d2e66 -} - -a:hover, a:focus { - color: #6d2e66; -} - -.main-nav, -.service-icon, -.progress-bar.progress-bar-primary, -.single-table.featured, -.btn.btn-primary, -.twitter-icon .fa-twitter, -.twitter-left-control:hover, .twitter-right-control:hover, -.post-icon, -.entry-header .date:after, -.btn-loadmore:hover, -.btn-submit, -#footer, -.caption .btn-start:hover, -.left-control:hover, -.right-control:hover, -.folio-overview a:hover { - background-color:#913d88; -} - -.twitter-left-control:hover, -.twitter-right-control:hover, -.btn-loadmore:hover { - border: 1px solid #913d88; -} - -.caption .btn-start:hover, -.left-control:hover, -.right-control:hover { - border-color: #913d88; -} - -.twitter-icon .fa-twitter:after { - border-color: #913d88 transparent transparent; -} \ No newline at end of file +a, #home-slider .caption h1 span, #twitter-carousel .item span, #footer .footer-bottom, #single-portfolio .close-folio-item:hover, .single-table.featured .btn.btn-primary, .contact-info ul li a:hover, #footer .footer-bottom a { color: #913d88; } .btn.btn-primary:hover, .btn-submit:hover { background-color: #6d2e66 } a:hover, a:focus { color: #6d2e66; } .main-nav, .service-icon, .progress-bar.progress-bar-primary, .single-table.featured, .btn.btn-primary, .twitter-icon .fa-twitter, .twitter-left-control:hover, .twitter-right-control:hover, .post-icon, .entry-header .date:after, .btn-loadmore:hover, .btn-submit, #footer, .caption .btn-start:hover, .left-control:hover, .right-control:hover, .folio-overview a:hover { background-color:#913d88; } .twitter-left-control:hover, .twitter-right-control:hover, .btn-loadmore:hover { border: 1px solid #913d88; } .caption .btn-start:hover, .left-control:hover, .right-control:hover { border-color: #913d88; } .twitter-icon .fa-twitter:after { border-color: #913d88 transparent transparent; } \ No newline at end of file diff --git a/css/presets/preset6.css b/css/presets/preset6.css index 35a6912..f9a95f4 100644 --- a/css/presets/preset6.css +++ b/css/presets/preset6.css @@ -1,54 +1 @@ -a, -#home-slider .caption h1 span, -#twitter-carousel .item span, -#footer .footer-bottom, -#single-portfolio .close-folio-item:hover, -.single-table.featured .btn.btn-primary, -.contact-info ul li a:hover, -#footer .footer-bottom a { - color: #f7ca18; -} - -.btn.btn-primary:hover, -.btn-submit:hover { - background-color: #d5ab07; -} - -a:hover, a:focus { - color: #d5ab07; -} - -.main-nav, -.service-icon, -.progress-bar.progress-bar-primary, -.single-table.featured, -.btn.btn-primary, -.twitter-icon .fa-twitter, -.twitter-left-control:hover, .twitter-right-control:hover, -.post-icon, -.entry-header .date:after, -.btn-loadmore:hover, -.btn-submit, -#footer, -.caption .btn-start:hover, -.left-control:hover, -.right-control:hover, -.folio-overview a:hover { - background-color:#f7ca18; -} - -.twitter-left-control:hover, -.twitter-right-control:hover, -.btn-loadmore:hover { - border: 1px solid #f7ca18; -} - -.caption .btn-start:hover, -.left-control:hover, -.right-control:hover { - border-color: #f7ca18; -} - -.twitter-icon .fa-twitter:after { - border-color: #f7ca18 transparent transparent; -} \ No newline at end of file +a, #home-slider .caption h1 span, #twitter-carousel .item span, #footer .footer-bottom, #single-portfolio .close-folio-item:hover, .single-table.featured .btn.btn-primary, .contact-info ul li a:hover, #footer .footer-bottom a { color: #f7ca18; } .btn.btn-primary:hover, .btn-submit:hover { background-color: #d5ab07; } a:hover, a:focus { color: #d5ab07; } .main-nav, .service-icon, .progress-bar.progress-bar-primary, .single-table.featured, .btn.btn-primary, .twitter-icon .fa-twitter, .twitter-left-control:hover, .twitter-right-control:hover, .post-icon, .entry-header .date:after, .btn-loadmore:hover, .btn-submit, #footer, .caption .btn-start:hover, .left-control:hover, .right-control:hover, .folio-overview a:hover { background-color:#f7ca18; } .twitter-left-control:hover, .twitter-right-control:hover, .btn-loadmore:hover { border: 1px solid #f7ca18; } .caption .btn-start:hover, .left-control:hover, .right-control:hover { border-color: #f7ca18; } .twitter-icon .fa-twitter:after { border-color: #f7ca18 transparent transparent; } \ No newline at end of file diff --git a/email.php b/email.php index dca99df..251b317 100644 --- a/email.php +++ b/email.php @@ -1,65 +1 @@ -IsSMTP(); - -// As this email.php script lives on the same server as our email server -// we are setting the HOST to localhost -$mail->Host = ""; // specify main and backup server - -$mail->SMTPAuth = true; // turn on SMTP authentication - -$mail->Port = 465; - -$mail->SMTPSecure = "tls/ssl"; - -// When sending email using PHPMailer, you need to send from a valid email address -// In this case, we setup a test email account with the following credentials: -// email: send_from_PHPMailer@bradm.inmotiontesting.com -// pass: password -$mail->Username = "nwokomaemmanuel@gmail.com"; // SMTP username -$mail->Password = "Doc.d.doc01"; // SMTP password - -// $email is the user's email address the specified -// on our contact us page. We set this variable at -// the top of this page with: -// $email = $_REQUEST['email'] ; -$mail->From = $email; - -// below we want to set the email address we will be sending our email to. -$mail->AddAddress("bradm@inmotiontesting.com", "Brad Markle"); - -// set word wrap to 50 characters -$mail->WordWrap = 50; -// set email format to HTML -$mail->IsHTML(true); - -$mail->Subject = "You have received feedback from your website!"; - -// $message is the user's message they typed in -// on our contact us page. We set this variable at -// the top of this page with: -// $message = $_REQUEST['message'] ; -$mail->Body = $message; -$mail->AltBody = $message; - -if(!$mail->Send()) -{ - echo "Message could not be sent.

"; - echo "Mailer Error: " . $mail->ErrorInfo; - exit; -} - -echo "Message has been sent"; -?> \ No newline at end of file +IsSMTP(); // As this email.php script lives on the same server as our email server // we are setting the HOST to localhost $mail->Host = ""; // specify main and backup server $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Port = 465; $mail->SMTPSecure = "tls/ssl"; // When sending email using PHPMailer, you need to send from a valid email address // In this case, we setup a test email account with the following credentials: // email: send_from_PHPMailer@bradm.inmotiontesting.com // pass: password $mail->Username = "nwokomaemmanuel@gmail.com"; // SMTP username $mail->Password = "Doc.d.doc01"; // SMTP password // $email is the user's email address the specified // on our contact us page. We set this variable at // the top of this page with: // $email = $_REQUEST['email'] ; $mail->From = $email; // below we want to set the email address we will be sending our email to. $mail->AddAddress("bradm@inmotiontesting.com", "Brad Markle"); // set word wrap to 50 characters $mail->WordWrap = 50; // set email format to HTML $mail->IsHTML(true); $mail->Subject = "You have received feedback from your website!"; // $message is the user's message they typed in // on our contact us page. We set this variable at // the top of this page with: // $message = $_REQUEST['message'] ; $mail->Body = $message; $mail->AltBody = $message; if(!$mail->Send()) { echo "Message could not be sent.

"; echo "Mailer Error: " . $mail->ErrorInfo; exit; } echo "Message has been sent"; ?> \ No newline at end of file diff --git a/includes/aside.php b/includes/aside.php index 5aa4180..260dba3 100644 --- a/includes/aside.php +++ b/includes/aside.php @@ -1,9 +1 @@ -

\ No newline at end of file + \ No newline at end of file diff --git a/includes/footer.php b/includes/footer.php index 91e1391..c86a032 100644 --- a/includes/footer.php +++ b/includes/footer.php @@ -1,3 +1 @@ -
- © Gigabyte Developers Incorporated 2016. All rights reserved. -
\ No newline at end of file +
© Gigabyte Developers Incorporated 2016. All rights reserved.
\ No newline at end of file diff --git a/includes/head.php b/includes/head.php index 5990496..773a713 100644 --- a/includes/head.php +++ b/includes/head.php @@ -1,13 +1 @@ - - - - Login and Registration Form with HTML5 and CSS3 - - - - - - - - - \ No newline at end of file + Login and Registration Form with HTML5 and CSS3 \ No newline at end of file diff --git a/includes/header.php b/includes/header.php index 45d9334..c4fa218 100644 --- a/includes/header.php +++ b/includes/header.php @@ -1,16 +1 @@ -
-

Login and Registration Form with HTML5 and CSS3

- -
-
-
- - - -
-
\ No newline at end of file +

Login and Registration Form with HTML5 and CSS3

\ No newline at end of file diff --git a/includes/menu.php b/includes/menu.php index 93e2066..293e1c2 100644 --- a/includes/menu.php +++ b/includes/menu.php @@ -1,8 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/includes/overall/overallheader.php b/includes/overall/overallheader.php index 25e1280..f6012a2 100644 --- a/includes/overall/overallheader.php +++ b/includes/overall/overallheader.php @@ -1,7 +1 @@ - - - - -
- - \ No newline at end of file +
\ No newline at end of file diff --git a/includes/overall/overallheaders.php b/includes/overall/overallheaders.php index 5b8ae40..d5c412d 100644 --- a/includes/overall/overallheaders.php +++ b/includes/overall/overallheaders.php @@ -1,6 +1 @@ - - - - -
- \ No newline at end of file +
\ No newline at end of file diff --git a/includes/widgets/loggedin.php b/includes/widgets/loggedin.php index a5d2cad..2f4bff3 100644 --- a/includes/widgets/loggedin.php +++ b/includes/widgets/loggedin.php @@ -1,1101 +1 @@ - - - - - - - - - - - Gigabyte Developers Incorporated | Home - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- - -
- -
-
-
-
-
-

Our Services

-

Our team at Gigabyte Developers Incorporated work ceaselessly to offer you a wide range of professional services in and outside the computer world of technologies. You can also Contact Us if you want to know more about the services we render to our customers.

-
-
-
-
-
-
-
- -
-
-

Brand Identity

-

Gigabyte Developers stand-out unique amongst its competitors in the world of Tech-Know-How.

-
-
-
-
- -
-
-

Knowledge Base

-

Gigabyte Developers offers you brainstorming ideas that can help you as an average person.

-
-
-
-
- -
-
-

Supporting You

-

Young computer gurus are not to be left out as GIGABYTE offers support to deserving persons.

-
-
-
-
- -
-
-

Professional Design

-

Unique and professional Web Design and Graphic Design can be found here at Gigabyte Developers Incorporated

-
-
-
-
- -
-
-

Software Development

-

We offer Software Development for a wide range of platforms such as Android, iOS, Mac OX, Windows, Linux, Windows Mobile, Fedora etc.

-
-
-
-
- -
-
-

Clean Code

-

Ever wanted to code but don't know where to start? Well, we offer lots of tutorial classes for a wide range of programming languages

-
-
-
-
-
-
-
-
-
-
-
-

About us

-

Gigabyte Developers Incorporated which is a Non-Governmental Organization was established to harness and elevate the potential in young computer gurus allover the world. Gigabyte Developers Incorporated is known globally for its quality and genuine services. The company was formerly known as Gigabyte Developers but was later in 2016 incorporated with The Access Team, Mezue Studios, LLC, Catarax Solutions and Gigabyte Studios Incorporated and from then on, it was transformed from Gigabyte Developers to Gigabyte Developers Incorporated.

-

Gigabyte Developers Incorporated was founded in December, 2015 by
Mr. Nwokoma Emmanuel. The name of this great company was derived from GIGABYTE which was Mr. Emmanuel's nickname during his days in college. Mr. Nwokoma Emmanuel was called GIGABYTE because of his wide knowledge in Computer Software & Hardware Engineering, including his programming skills in over 8 programming languages.

-
-
-
-
-
-

User Experiances

-
-
95%
-
-
-
-

Web Design

-
-
80%
-
-
-
-

Programming

-
-
75%
-
-
-
-

Fun

-
-
90%
-
-
-

Media

-
-
70%
-
-
-
-
-
-
-
- -
-
-
-
-

Our Portfolio

-

Here are some visual representation of our abilities, skills, capabilities, knowledge, qualities and potential. Some materials in this section represent tangible work related events at Gigabyte Developers Incorporated.

-
-
-
-
-
-
-
-
- -
-
-
-
-
-

Software Development

-

Design, Photography

-
-
- - -
-
-
-
-
-
-
-
-
- -
-
-
-
-
-

Android Development

-

Design, Photography

-
-
- - -
-
-
-
-
-
-
-
-
- -
-
-
-
-
-

Professional Designs

-

Design, Photography

-
-
- - -
-
-
-
-
-
-
-
-
- -
-
-
-
-
-

Branded Identity

-

Design, Photography

-
-
- - -
-
-
-
-
-
-
-
-
- -
-
-
-
-
-

Website Development

-

Design, Photography

-
-
- - -
-
-
-
-
-
-
-
-
- -
-
-
-
-
-

Graphic Designs

-

Design, Photography

-
-
- - -
-
-
-
-
-
-
-
-
- -
-
-
-
-
-

Knowledge Base

-

Design, Photography

-
-
- - -
-
-
-
-
-
-
-
-
- -
-
-
-
-
-

Website Designs

-

Design, Photography

-
-
- - -
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-

The Team

-

Meet the root of our Company's tree. They are the major members of the Company's team. They are the people behind the successful movement of this Company.

-
-
-
-
-
-
-
- -
-
-

Nwokoma Emmanuel

-

CEO & Founder

-

Consectetur adipisicing elit, sed do eiusmod tempor incididunt

-
- -
-
-
-
-
- -
-
-

Lawrence Lane

-

UI/UX Designer

-

Consectetur adipisicing elit, sed do eiusmod tempor incididunt

-
- -
-
-
-
-
- -
-
-

Lois Clark

-

Developer

-

Consectetur adipisicing elit, sed do eiusmod tempor incididunt

-
- -
-
-
-
-
- -
-
-

Marian Dixon

-

Support Manager

-

Consectetur adipisicing elit, sed do eiusmod tempor incididunt

-
- -
-
-
-
-
-
- -
-
-
-
- -

4000+

-

Happy Clients

-
-
- -

200+

-

Modern Websites

-
-
- -

10

-

WINNING AWARDS

-
-
- -

24/7

-

Fast Support

-
-
-
-
- -
-
-
-
-

Featured Pricing Table For Classes

-

Our team offers you great tutorial classes which you will definitely find interesting because of our great user friendly interaction technique. As we need no customer regrets, we have made all our tutoring plans FREE for now so as to suite the needs of our customers.

-
-
-
-
-
-
-

Free Plan

- -
    -
  • Introductory Python Classes
  • -
  • Introductory HTML/CSS Classes
  • -
  • Introductory Javascript Classes
  • -
  • Introductory JQuery Classes
  • -
  • Introductory SQL Classes
  • -
  • Introductory PHP Classes
  • -
  • Introductory Java Classes
  • -
  • Introductory Photoshop Classes
  • -
  • Introductory Illustrator Classes
  • -
- Sign up -
-
-
-
-

Basic Plan

- -
    -
  • Basic Python Classes
  • -
  • Basic HTML/CSS Classes
  • -
  • Basic Javascript Classes
  • -
  • Basic JQuery Classes
  • -
  • Basic SQL Classes
  • -
  • Basic PHP Classes
  • -
  • Basic Java Classes
  • -
  • Basic Photoshop Classes
  • -
  • Basic Illustrator Classes
  • -
- Sign up -
-
-
- -
-
-
-

Professional Plan

- -
    -
  • Professional Python Classes
  • -
  • Professional HTML Classes
  • -
  • Professional Javascript Classes
  • -
  • Professional JQuery Classes
  • -
  • Professional SQL Classes
  • -
  • Professional PHP Classes
  • -
  • Professional Java Classes
  • -
  • Professional Photoshop Classes
  • -
  • Professional Illustrator Classes
  • -
  • Professional Android Classes
  • -
  • Professional C++ Classes
  • -
  • Professional Visual Basic Classes
  • -
  • Professional Node.JS Classes
  • -
- Sign up -
-
-
-
-
-
- -
-
- - -
-
-
- - -
-
-
-
-
- -
-
-
-
-

Blog Posts

-

Latest updates on the happenings at Gigabyte Developers Incorporated, latest tutorials by our team regarding lots and lots of programming languages and some Software Development platforms.

-
-
- - - - - - - - - - - - - - -
-
-
-
-
-
-
- - -
-
-
-
- -
-
-

Hire Us Now!

-
-

Do you want our team at Gigabyte Developers Incorporated to do the work for you? Of course you want to, because we are awesome and 100% professional!. Here at Gigabyte Developers Incorporated, we work very hard every day to program lots of stuffs and to craft pixel perfect sites!. So, click on the button below to get started

-
-

- Contact Us

-
-
-
-
-
-
-
-
- - -
- -
-
-
-
-

Contact Us

-

Do you have questions that require answers, do you have any suggestions that you would like to make, do you have any ideas you want to share? If YES, then don't hesitate to contact us.
Fill out the form below and await a reply from us within 24-48hrs or 1-2 business days.

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
- - -
- -
-
-
-
-

You can meet our team and representatives in person at our Main Office/Headquarters by just paying a homely visit at the address below or call on phone for more details to schedule a visit to Gigabyte Developers Incorporated.

- -
-
-
-
-
-
-
-
-
-
-
-

Our Partners

-
-
-
- -
-
-
-
-
-
-
-
-
-

THANKS FOR VISITING US

-

-
-
-
-

Contact Information

-

#40, Nnokwa Street, World Bank Housing Estate, Umuahia, Abia State. Nigeria
- +234 810 430 9369
- +234 701 723 6746
- gigabytedevelopers@gmail.com
- @gigabytedevsinc
- Gigabyte Developers Incorporated
-

-
- -
-

Newsletter

-

Register to our newsletter and be updated with the latests information regarding our services, offers and much more.

-

-

-
- -
- -
-
-
- -
- -
-
-
-
- -
-
-
-

-
- -
-

Support Us

-

Do you love our work and would like us to achieve more? If, yes! Then why not support us to aid our continuity by simply clicking on the donate button below and donate to us. No amount is too small.
Note: "God loves a cheerfull giver"!

- Donate -
- -
- -
-
- - -
- - - - - - - - - - - - - - - -
-
- -
-
-
- - - - - - - - \ No newline at end of file + Gigabyte Developers Incorporated | Home

Our Services

Our team at Gigabyte Developers Incorporated work ceaselessly to offer you a wide range of professional services in and outside the computer world of technologies. You can also Contact Us if you want to know more about the services we render to our customers.

Brand Identity

Gigabyte Developers stand-out unique amongst its competitors in the world of Tech-Know-How.

Knowledge Base

Gigabyte Developers offers you brainstorming ideas that can help you as an average person.

Supporting You

Young computer gurus are not to be left out as GIGABYTE offers support to deserving persons.

Professional Design

Unique and professional Web Design and Graphic Design can be found here at Gigabyte Developers Incorporated

Software Development

We offer Software Development for a wide range of platforms such as Android, iOS, Mac OX, Windows, Linux, Windows Mobile, Fedora etc.

Clean Code

Ever wanted to code but don't know where to start? Well, we offer lots of tutorial classes for a wide range of programming languages

About us

Gigabyte Developers Incorporated which is a Non-Governmental Organization was established to harness and elevate the potential in young computer gurus allover the world. Gigabyte Developers Incorporated is known globally for its quality and genuine services. The company was formerly known as Gigabyte Developers but was later in 2016 incorporated with The Access Team, Mezue Studios, LLC, Catarax Solutions and Gigabyte Studios Incorporated and from then on, it was transformed from Gigabyte Developers to Gigabyte Developers Incorporated.

Gigabyte Developers Incorporated was founded in December, 2015 by
Mr. Nwokoma Emmanuel. The name of this great company was derived from GIGABYTE which was Mr. Emmanuel's nickname during his days in college. Mr. Nwokoma Emmanuel was called GIGABYTE because of his wide knowledge in Computer Software & Hardware Engineering, including his programming skills in over 8 programming languages.

User Experiances

95%

Web Design

80%

Programming

75%

Fun

90%

Media

70%

Our Portfolio

Here are some visual representation of our abilities, skills, capabilities, knowledge, qualities and potential. Some materials in this section represent tangible work related events at Gigabyte Developers Incorporated.

Software Development

Design, Photography

Android Development

Design, Photography

Professional Designs

Design, Photography

Branded Identity

Design, Photography

Website Development

Design, Photography

Graphic Designs

Design, Photography

Knowledge Base

Design, Photography

Website Designs

Design, Photography

The Team

Meet the root of our Company's tree. They are the major members of the Company's team. They are the people behind the successful movement of this Company.

Nwokoma Emmanuel

CEO & Founder

Consectetur adipisicing elit, sed do eiusmod tempor incididunt

Lawrence Lane

UI/UX Designer

Consectetur adipisicing elit, sed do eiusmod tempor incididunt

Lois Clark

Developer

Consectetur adipisicing elit, sed do eiusmod tempor incididunt

Marian Dixon

Support Manager

Consectetur adipisicing elit, sed do eiusmod tempor incididunt

4000+

Happy Clients

200+

Modern Websites

10

WINNING AWARDS

24/7

Fast Support

Featured Pricing Table For Classes

Our team offers you great tutorial classes which you will definitely find interesting because of our great user friendly interaction technique. As we need no customer regrets, we have made all our tutoring plans FREE for now so as to suite the needs of our customers.

Free Plan

  • Introductory Python Classes
  • Introductory HTML/CSS Classes
  • Introductory Javascript Classes
  • Introductory JQuery Classes
  • Introductory SQL Classes
  • Introductory PHP Classes
  • Introductory Java Classes
  • Introductory Photoshop Classes
  • Introductory Illustrator Classes
Sign up

Basic Plan

  • Basic Python Classes
  • Basic HTML/CSS Classes
  • Basic Javascript Classes
  • Basic JQuery Classes
  • Basic SQL Classes
  • Basic PHP Classes
  • Basic Java Classes
  • Basic Photoshop Classes
  • Basic Illustrator Classes
Sign up

Professional Plan

  • Professional Python Classes
  • Professional HTML Classes
  • Professional Javascript Classes
  • Professional JQuery Classes
  • Professional SQL Classes
  • Professional PHP Classes
  • Professional Java Classes
  • Professional Photoshop Classes
  • Professional Illustrator Classes
  • Professional Android Classes
  • Professional C++ Classes
  • Professional Visual Basic Classes
  • Professional Node.JS Classes
Sign up

Blog Posts

Latest updates on the happenings at Gigabyte Developers Incorporated, latest tutorials by our team regarding lots and lots of programming languages and some Software Development platforms.

Hire Us Now!

Do you want our team at Gigabyte Developers Incorporated to do the work for you? Of course you want to, because we are awesome and 100% professional!. Here at Gigabyte Developers Incorporated, we work very hard every day to program lots of stuffs and to craft pixel perfect sites!. So, click on the button below to get started



Contact Us

Do you have questions that require answers, do you have any suggestions that you would like to make, do you have any ideas you want to share? If YES, then don't hesitate to contact us.
Fill out the form below and await a reply from us within 24-48hrs or 1-2 business days.

You can meet our team and representatives in person at our Main Office/Headquarters by just paying a homely visit at the address below or call on phone for more details to schedule a visit to Gigabyte Developers Incorporated.

Our Partners


THANKS FOR VISITING US




Contact Information

#40, Nnokwa Street, World Bank Housing Estate, Umuahia, Abia State. Nigeria
+234 810 430 9369
+234 701 723 6746
gigabytedevelopers@gmail.com
@gigabytedevsinc
Gigabyte Developers Incorporated

Newsletter

Register to our newsletter and be updated with the latests information regarding our services, offers and much more.

Support Us

Do you love our work and would like us to achieve more? If, yes! Then why not support us to aid our continuity by simply clicking on the donate button below and donate to us. No amount is too small.
Note: "God loves a cheerfull giver"!

Donate
\ No newline at end of file diff --git a/includes/widgets/login.php b/includes/widgets/login.php index 61e18c9..a563a9c 100644 --- a/includes/widgets/login.php +++ b/includes/widgets/login.php @@ -1,27 +1 @@ -
-

Log in/Register

-
-
- - -
-
-
\ No newline at end of file +

Log in/Register

\ No newline at end of file diff --git a/index.html b/index.html index 916f80b..1e6d7ab 100644 --- a/index.html +++ b/index.html @@ -21,10 +21,10 @@ - + - + @@ -51,7 +51,7 @@

-
+
@@ -74,14 +74,14 @@

Simple PHP-AJAX Contact Form for Bootstrap and HTML5

- - + +
-

Contact Form

+

Contact Form

@@ -107,20 +107,20 @@

Contact Form

-
+
- -
+ +
- +
-

Contact Info

-
+

Contact Info

+

12 Tottenham Road, London, England.

+880 123 456 789

@@ -133,12 +133,12 @@

Contact Info

- +
- - + + - + @@ -174,9 +174,9 @@

Contact Info

$().UItoTop({ easingType: 'easeOutQuart' }); - $('#stuck_container').tmStickUp({}); + $('#stuck_container').tmStickUp({}); - }); + }); diff --git a/index.php b/index.php index 9b33333..2df41cc 100644 --- a/index.php +++ b/index.php @@ -14,7 +14,7 @@ Gigabyte Developers Incorporated | Home - + @@ -26,7 +26,7 @@ - +
-

200+

+

200+

Modern Websites

-
+
-

10

+

10

WINNING AWARDS

-
+
- +

24/7

Fast Support

-
+
@@ -633,7 +633,7 @@ function opendialog(page) {

Free Plan

- $0/Month + $0/Month
  • Introductory Python Classes
  • @@ -653,7 +653,7 @@ function opendialog(page) {

    Basic Plan

    - $0/Month + $0/Month
    • Basic Python Classes
    • @@ -673,7 +673,7 @@ function opendialog(page) { +
@@ -756,21 +756,21 @@ function opendialog(page) {

Latest updates on the happenings at Gigabyte Developers Incorporated, latest tutorials by our team regarding lots and lots of programming languages and some Software Development platforms.

- + - + - + - + - - + + +
@@ -778,7 +778,7 @@ function opendialog(page) {
- +
@@ -793,7 +793,7 @@ function opendialog(page) { +
@@ -822,7 +822,7 @@ function opendialog(page) {
- +
@@ -834,11 +834,11 @@ function opendialog(page) {
-
+
- +
@@ -849,12 +849,12 @@ function opendialog(page) {
  • Email: gigabytedevelopers@gmail.com
  • Website: www.gigabytedevelopersinc.com
  • -
    +
    - +
    @@ -862,7 +862,7 @@ function opendialog(page) {

    Our Partners

    -
    +
    - +

    Newsletter

    Register to our newsletter and be updated with the latests information regarding our services, offers and much more.

    @@ -923,15 +923,15 @@ function opendialog(page) {

    - +

    Support Us

    Do you love our work and would like us to achieve more? If, yes! Then why not support us to aid our continuity by simply clicking on the donate button below and donate to us. No amount is too small.
    Note: "God loves a cheerfull giver"!

    Donate
    - +
    - +
    -
    +
    @@ -274,7 +274,7 @@

    Our Portfolio

    Here are some visual representation of our abilities, skills, capabilities, knowledge, qualities and potential. Some materials in this section represent tangible work related events at Gigabyte Developers Incorporated.

    -
    +
    @@ -549,7 +549,7 @@
    - + @@ -563,19 +563,19 @@
    -

    200+

    +

    200+

    Modern Websites

    -
    +
    -

    10

    +

    10

    WINNING AWARDS

    -
    +
    - +

    24/7

    Fast Support

    -
    + @@ -594,7 +594,7 @@

    Free Plan

    @@ -717,19 +717,19 @@

    Latest updates on the happenings at Gigabyte Developers Incorporated, latest tutorials by our team regarding lots and lots of programming languages and some Software Development platforms.

    - + - + Tweets by @Enwokoma - + Tweets by @gigabytedevsinc - - + +
    Load More -
    +
    @@ -737,7 +737,7 @@
    - +
    @@ -752,7 +752,7 @@ +
    @@ -794,7 +794,7 @@
    - +
    @@ -806,11 +806,11 @@
    -
    +
    - +
    @@ -821,12 +821,12 @@
  • Email: gigabytedevelopers@gmail.com
  • Website: www.gigabytedevelopersinc.com
  • -
    +
    - +
    @@ -834,7 +834,7 @@

    Our Partners

    -
    +
    - +

    Newsletter

    Register to our newsletter and be updated with the latests information regarding our services, offers and much more.

    @@ -895,15 +895,15 @@

    - +

    Support Us

    Do you love our work and would like us to achieve more? If, yes! Then why not support us to aid our continuity by simply clicking on the donate button below and donate to us. No amount is too small.
    Note: "God loves a cheerfull giver"!

    Donate
    - +
    - +
    -
    +
    @@ -246,7 +246,7 @@

    Our Portfolio

    Here are some visual representation of our abilities, skills, capabilities, knowledge, qualities and potential. Some materials in this section represent tangible work related events at Gigabyte Developers Incorporated.

    -
    +
    @@ -520,7 +520,7 @@
    - + @@ -534,19 +534,19 @@
    -

    200+

    +

    200+

    Modern Websites

    -
    +
    -

    10

    +

    10

    WINNING AWARDS

    -
    +
    - +

    24/7

    Fast Support

    -
    + @@ -564,7 +564,7 @@

    Free Plan

    - $0/Month + $0/Month
    @@ -685,16 +685,16 @@ - + Tweets by @Enwokoma - + Tweets by @gigabytedevsinc - +
    Load More -
    +
    @@ -702,7 +702,7 @@
    - +
    @@ -743,7 +743,7 @@
    -
    +
    @@ -755,11 +755,11 @@
    -
    +
    - +
    @@ -770,12 +770,12 @@
  • Email: gigabytedevelopers@gmail.com
  • Website: www.gigabytedevelopersinc.com
  • -
    +
    - +
    @@ -783,7 +783,7 @@

    Our Partners

    -
    +
    - +

    Newsletter

    Register to our newsletter and be updated with the latests information regarding our services, offers and much more.

    @@ -844,7 +844,7 @@

    - +

    Support Us

    Do you love our work and would like us to achieve more? If, yes! Then why not support us to aid our continuity by simply clicking on the donate button below and donate to us. No amount is too small.
    Note: "God loves a cheerfull giver"!

    @@ -862,7 +862,7 @@
    • -
    • +
    • diff --git a/login.php b/login.php index 303917e..a49025b 100644 --- a/login.php +++ b/login.php @@ -1,165 +1 @@ - 32) { - $errors[] = 'Password too long'; - } - - - $login = login($username, $password); - if ($login === false) { - $errors[] = 'Sorry dear, that username/password combination is incorrect'; - } else { - $_SESSION['user_id'] = $login; - header('Location: loggedin'); - exit(); - } - } -} else { - $errors[] = 'No data received'; -} -?> - - - - - - - - - - - Gigabyte Developers Incorporated | Sign In - - - - - - - - - - - -
      - - -
      -

      Gigabyte Developers Incorporated Registration and Login Section

      - -
      -
      -
      - - - -
      -
      -
      -

      Log in

      - -

      We've tried our best to log you in, but...

      - -

      - - -

      -

      - - -

      -

      - - -

      -

      - Forgot username or password? -

      - - -
      -
      - - - -
      -
      -
      -
      - - - \ No newline at end of file + 32) { $errors[] = 'Password too long'; } $login = login($username, $password); if ($login === false) { $errors[] = 'Sorry dear, that username/password combination is incorrect'; } else { $_SESSION['user_id'] = $login; header('Location: loggedin'); exit(); } } } else { $errors[] = 'No data received'; } ?> Gigabyte Developers Incorporated | Sign In

      Gigabyte Developers Incorporated Registration and Login Section

      Log in

      We've tried our best to log you in, but...

      Forgot username or password?

      \ No newline at end of file diff --git a/loginform.php b/loginform.php index aba837e..5b04ca9 100644 --- a/loginform.php +++ b/loginform.php @@ -1,193 +1 @@ - - - - - - - - - - - - Gigabyte Developers Incorporated | Sign In - - - - - - - - - - - - -
      - - -
      -

      Gigabyte Developers Incorporated Registration and Login Section

      - -
      -
      -
      - - - -
      -
      -
      -

      Log in

      -

      - - -

      - -

      - - -

      -

      - - -

      -

      - Forgot username or password? -

      - - -
      -
      - - - -
      -
      -
      -
      - - \ No newline at end of file + Gigabyte Developers Incorporated | Sign In

      Gigabyte Developers Incorporated Registration and Login Section

      Log in

      Forgot username or password?

      \ No newline at end of file diff --git a/logout.php b/logout.php index 43f023a..dd4ec23 100644 --- a/logout.php +++ b/logout.php @@ -1,7 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/mail.php b/mail.php index 81ddab3..9548f46 100644 --- a/mail.php +++ b/mail.php @@ -1,101 +1 @@ - - - - - - - - - - - - Gigabyte Developers Incorporated | No Access - - - - - - - - - - -
      - - -
      -

      Gigabyte Developers Incorporated

      - -
      -
      -
      - - - -
      -
      -

      Email all users!

      - -

      Email has been sent successfully!

      - - -
      -
        -

        - - -

        -
      • - - -
      • -

        - -

        -
      -
      - - + Gigabyte Developers Incorporated | No Access

      Gigabyte Developers Incorporated

      Email all users!

      Email has been sent successfully!

      \ No newline at end of file diff --git a/mobile.php b/mobile.php index f0fa513..07e6ef9 100644 --- a/mobile.php +++ b/mobile.php @@ -14,7 +14,7 @@ Gigabyte Developers Incorporated | Home - + @@ -104,18 +104,18 @@

      logo

      -
      +
      -
      +
      @@ -242,7 +242,7 @@

      Our Portfolio

      Here are some visual representation of our abilities, skills, capabilities, knowledge, qualities and potential. Some materials in this section represent tangible work related events at Gigabyte Developers Incorporated.

      -
      +
      @@ -516,7 +516,7 @@
      -
      +
    @@ -530,19 +530,19 @@
    -

    200+

    +

    200+

    Modern Websites

    -
    +
    -

    10

    +

    10

    WINNING AWARDS

    -
    +
    - +

    24/7

    Fast Support

    -
    + @@ -560,7 +560,7 @@

    Free Plan

    @@ -683,19 +683,19 @@ - + Tweets by @Enwokoma - + Tweets by @gigabytedevsinc - + - - + +
    Load More -
    +
    @@ -703,7 +703,7 @@
    - +
    @@ -744,7 +744,7 @@
    -
    +
    @@ -756,11 +756,11 @@
    -
    +
    - +
    @@ -771,12 +771,12 @@
  • Email: gigabytedevelopers@gmail.com
  • Website: www.gigabytedevelopersinc.com
  • -
    +
    - +
    @@ -784,7 +784,7 @@

    Our Partners

    -
    +
    - +

    Newsletter

    Register to our newsletter and be updated with the latests information regarding our services, offers and much more.

    @@ -845,7 +845,7 @@

    - +

    Support Us

    Do you love our work and would like us to achieve more? If, yes! Then why not support us to aid our continuity by simply clicking on the donate button below and donate to us. No amount is too small.
    Note: "God loves a cheerfull giver"!

    @@ -863,7 +863,7 @@
    • -
    • +
    • diff --git a/passwordrecover.php b/passwordrecover.php index f7f17a2..5a1f450 100644 --- a/passwordrecover.php +++ b/passwordrecover.php @@ -1,99 +1 @@ - - - - - - - - - - - - Gigabyte Developers Incorporated | Password Recovery - - - - - - - - - - -
      - - -
      -

      Gigabyte Developers Incorporated Account Recovery Assistant

      - -
      -
      -
      - - - -
      -
      - - -

      Password Recovery

      - -

      Thank's we've emailed you a new password.

      -

      Use the password to login next time. Remember, you will be forced to change the password to a password of your choice whice you can easily remember!

      -Oops, we could\'t find that email address

      '; - } - } - ?> - - -
      -

      - - -

      -

      - -

      -
      - - - - + Gigabyte Developers Incorporated | Password Recovery

      Gigabyte Developers Incorporated Account Recovery Assistant

      Password Recovery

      Thank's we've emailed you a new password.

      Use the password to login next time. Remember, you will be forced to change the password to a password of your choice whice you can easily remember!

      Oops, we could\'t find that email address

      '; } } ?>

      \ No newline at end of file diff --git a/picture.php b/picture.php index 73f3b77..1705ddf 100644 --- a/picture.php +++ b/picture.php @@ -1,91 +1 @@ - - - - - - - - - - - Gigabyte Developers Incorporated | Update Profile - - - - - - - - - - - -
      - - -
      -

      Gigabyte Developers Incorporated

      - -
      -
      -
      - - - -
      -
      - -

      Update Profile

      - - - -
      -

      - - -

      -

      - -

      -
      \ No newline at end of file + Gigabyte Developers Incorporated | Update Profile

      Gigabyte Developers Incorporated

      Update Profile

      \ No newline at end of file diff --git a/portfolio-single.html b/portfolio-single.html index daf8e92..f2f98e5 100644 --- a/portfolio-single.html +++ b/portfolio-single.html @@ -1,23 +1 @@ -
      -
      - - -
      -
      -
      -

      Texts about Project

      -

      Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

      -

      Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip.

      -
      -
      -
      -
      -

      Project Details

      -

      Client: WrapBootstrap

      -

      Date: 15 Oct 2014

      -

      Tag: Graphic, Design, Creative

      -
      -
      -
      -
      -
      \ No newline at end of file +

      Texts about Project

      Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

      Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip.

      Project Details

      Client: WrapBootstrap

      Date: 15 Oct 2014

      Tag: Graphic, Design, Creative

      \ No newline at end of file diff --git a/profile.php b/profile.php index 2d7e8bd..fe956c0 100644 --- a/profile.php +++ b/profile.php @@ -1,112 +1 @@ - - - - - - - - - - - - Gigabyte Developers Incorporated | Profile - - - - - - - - - - -
      - - -
      -

      Gigabyte Developers Incorporated User Profile

      - -
      -
      -
      - - - -
      -
      - -

      's Profile

      -

      Username:

      -

      Email:

      -

      First Name:

      -

      Last Name:

      - - - - - - - - - - - - Gigabyte Developers Incorporated | Profile - - - - - - - - - - -
      -
      -

      Gigabyte Developers Incorporated

      -
      -
      -
      - - -
      -
      - -

      -

      Sorry, the page you requested doesn't exist on our database. Please try again!

      -

      If this problem persists and you are very sure of what you are doing, then head straight to contact our hotline by calling +2348104309369, or email: Administrator.

      - + Gigabyte Developers Incorporated | Profile

      Gigabyte Developers Incorporated User Profile

      's Profile

      Username:

      Email:

      First Name:

      Last Name:

      Gigabyte Developers Incorporated | Profile

      Gigabyte Developers Incorporated

      Sorry, the page you requested doesn't exist on our database. Please try again!

      If this problem persists and you are very sure of what you are doing, then head straight to contact our hotline by calling +2348104309369, or email: Administrator.

      \ No newline at end of file diff --git a/protected.php b/protected.php index 2172e12..3be7cdf 100644 --- a/protected.php +++ b/protected.php @@ -1,59 +1 @@ - - - - - - - - - - - - Gigabyte Developers Incorporated | No Access - - - - - - - - - - -
      - - -
      -

      Gigabyte Developers Incorporated

      - -
      -
      -
      - - - -
      -
      - -

      Sorry, you need to be logged in to access this area!

      -

      Please Login or Register Now!.

      - - + Gigabyte Developers Incorporated | No Access

      Gigabyte Developers Incorporated

      Sorry, you need to be logged in to access this area!

      Please Login or Register Now!.

      \ No newline at end of file diff --git a/recover.php b/recover.php index 4f8eca5..0a4f0a2 100644 --- a/recover.php +++ b/recover.php @@ -1,98 +1 @@ - - - - - - - - - - - - Gigabyte Developers Incorporated | Username Recovery - - - - - - - - - - -
      - - -
      -

      Gigabyte Developers Incorporated Account Recovery Assistant

      - -
      -
      -
      - - - -
      -
      - - -

      Username Recovery

      - -

      Thank's we've sent your username to your mailbox.

      -Oops, we could\'t find that email address

      '; - } - } - ?> - - -
      -

      - - -

      - -

      - -

      -
      - - - + Gigabyte Developers Incorporated | Username Recovery

      Gigabyte Developers Incorporated Account Recovery Assistant

      Username Recovery

      Thank's we've sent your username to your mailbox.

      Oops, we could\'t find that email address

      '; } } ?>

      \ No newline at end of file diff --git a/secure_email_code.php b/secure_email_code.php index 1ecc17d..d8e0abd 100644 --- a/secure_email_code.php +++ b/secure_email_code.php @@ -1,36 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/sendemail.php b/sendemail.php index 1ecc17d..d8e0abd 100644 --- a/sendemail.php +++ b/sendemail.php @@ -1,36 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/sendemailhosted.php b/sendemailhosted.php index 285f1fe..e3e217f 100644 --- a/sendemailhosted.php +++ b/sendemailhosted.php @@ -1,81 +1 @@ -is_valid){ - die ('wrong captcha'); - } - } - - if(isset($_POST['name']) and $_POST['name'] != ''){$message_body .= '

      Visitor: ' . $_POST['name'] . '

      ' . "\n" . '
      ' . "\n"; $subject.=$_POST['name'];} - if(isset($_POST['email']) and $_POST['email'] != ''){$message_body .= '

      Email Address: ' . $_POST['email'] . '

      ' . "\n" . '
      ' . "\n"; $user_email=$_POST['email'];} - if(isset($_POST['message']) and $_POST['message'] != ''){$message_body .= '

      Message: ' . $_POST['message'] . '

      ' . "\n";} - if(isset($_POST['stripHTML']) and $_POST['stripHTML']=='true'){$message_body = strip_tags($message_body);$message_type='text';} - -try{ - include "classes/libmail.php"; - $m= new Mail("utf-8"); - $m->From($user_email); - $m->To($owner_email); - $m->Subject($subject); - $m->Body($message_body,$message_type); - //$m->log_on(true); - - if(isset($_FILES['attachment'])){ - if($_FILES['attachment']['size']>$max_file_size){ - $error_text=$error_text_filesize . ' ' . $max_file_size . 'bytes'; - die($error_text); - }else{ - if(preg_match($file_types,$_FILES['attachment']['name'])){ - $m->Attach($_FILES['attachment']['tmp_name'],$_FILES['attachment']['name'],'','attachment'); - }else{ - $error_text=$error_text_filetype; - die($error_text); - } - } - } - if(!$use_smtp){ - $m->smtp_on( $host, $username, $password, $port); - } - - if($m->Send()){ - die('Thanks a lot for your feedback! We will get back to you ASAP.'); - } - -}catch(Exception $mail){ - die($mail); -} -?> \ No newline at end of file +is_valid){ die ('wrong captcha'); } } if(isset($_POST['name']) and $_POST['name'] != ''){$message_body .= '

      Visitor: ' . $_POST['name'] . '

      ' . "\n" . '
      ' . "\n"; $subject.=$_POST['name'];} if(isset($_POST['email']) and $_POST['email'] != ''){$message_body .= '

      Email Address: ' . $_POST['email'] . '

      ' . "\n" . '
      ' . "\n"; $user_email=$_POST['email'];} if(isset($_POST['message']) and $_POST['message'] != ''){$message_body .= '

      Message: ' . $_POST['message'] . '

      ' . "\n";} if(isset($_POST['stripHTML']) and $_POST['stripHTML']=='true'){$message_body = strip_tags($message_body);$message_type='text';} try{ include "classes/libmail.php"; $m= new Mail("utf-8"); $m->From($user_email); $m->To($owner_email); $m->Subject($subject); $m->Body($message_body,$message_type); //$m->log_on(true); if(isset($_FILES['attachment'])){ if($_FILES['attachment']['size']>$max_file_size){ $error_text=$error_text_filesize . ' ' . $max_file_size . 'bytes'; die($error_text); }else{ if(preg_match($file_types,$_FILES['attachment']['name'])){ $m->Attach($_FILES['attachment']['tmp_name'],$_FILES['attachment']['name'],'','attachment'); }else{ $error_text=$error_text_filetype; die($error_text); } } } if(!$use_smtp){ $m->smtp_on( $host, $username, $password, $port); } if($m->Send()){ die('Thanks a lot for your feedback! We will get back to you ASAP.'); } }catch(Exception $mail){ die($mail); } ?> \ No newline at end of file diff --git a/settings.php b/settings.php index 11389fe..62cb00b 100644 --- a/settings.php +++ b/settings.php @@ -1,373 +1 @@ -$value) { - if (empty($value) && in_array($key, $required_fields) === true) { - $errors[] = 'Hello! The fields marked with an asterisk are required'; - break 1; - } - } - - if (empty($errors) === true) { - if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) === false) { - $errors[] = 'A valid email address is required'; - } else if (email_existing($_POST['email']) === true) { - $errors[] = 'Sorry, the email \'' . $_POST['email'] . '\' is already in use.'; - } - } -} - -?> - - - - - - - - - - Gigabyte Developers Incorporated | Update Profile - - - - - - - - - - - -
      - - -
      -

      Gigabyte Developers Incorporated

      - -
      -
      -
      - - - -
      -
      - -

      Update Profile

      - -

      $_POST['first_name'], - 'last_name' => $_POST['last_name'], - 'email' => $_POST['email'], - 'allow_email' => ($_POST['allow_email'] == 'on') ? 1 : 0, - 'country' => $_POST['country'], - 'phonenumber' => $_POST['phonenumber'], - 'sex' => $_POST['sex'] - ); - - update_user($session_user_id, $update_data); - header('Location: settings?success'); - exit(); - - } else if (empty($errors) === false) { - echo output_errors($errors); - } - ?> - -
      -

      - - -

      -

      - - -

      -

      - - -


      -

      -       - -

      -

      - - -

      -       - -

      -

      - > Would you like to recieve emails from us? -

      -

      - -

      -
      - +$value) { if (empty($value) && in_array($key, $required_fields) === true) { $errors[] = 'Hello! The fields marked with an asterisk are required'; break 1; } } if (empty($errors) === true) { if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) === false) { $errors[] = 'A valid email address is required'; } else if (email_existing($_POST['email']) === true) { $errors[] = 'Sorry, the email \'' . $_POST['email'] . '\' is already in use.'; } } } ?> Gigabyte Developers Incorporated | Update Profile

      Gigabyte Developers Incorporated

      Update Profile

      $_POST['first_name'], 'last_name' => $_POST['last_name'], 'email' => $_POST['email'], 'allow_email' => ($_POST['allow_email'] == 'on') ? 1 : 0, 'country' => $_POST['country'], 'phonenumber' => $_POST['phonenumber'], 'sex' => $_POST['sex'] ); update_user($session_user_id, $update_data); header('Location: settings?success'); exit(); } else if (empty($errors) === false) { echo output_errors($errors); } ?>


           

           

      > Would you like to recieve emails from us?

      \ No newline at end of file diff --git a/user/core/database/connect.php b/user/core/database/connect.php index d43eab5..50b5d03 100644 --- a/user/core/database/connect.php +++ b/user/core/database/connect.php @@ -1,4 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/user/core/functions/users.php b/user/core/functions/users.php index 43f1e77..df4ef49 100644 --- a/user/core/functions/users.php +++ b/user/core/functions/users.php @@ -15,7 +15,7 @@ function mail_users($subject, $body) { function has_access($user_id, $type) { $user_id = (int)$user_id; $type = (int)$type; - + return (mysql_result(mysql_query("SELECT COUNT(`user_id`) FROM `users` WHERE `user_id` = $user_id AND `type` = $type"), 0) == 1) ? true : false; } @@ -27,9 +27,9 @@ function is_admin($user_id) { function recover($mode, $email) { $mode = sanitize($mode); $email = sanitize($email); - + $user_data = user_data(user_id_from_email($email), 'user_id', 'first_name', 'username'); - + if ($mode == 'username') { // recover username mail($email, 'Your username', "Hello " . $user_data['first_name'] . ",\n\nYour username is: " . $user_data['username'] . "\n\n- Gigabyte Developers Incorporated"); @@ -38,9 +38,9 @@ function recover($mode, $email) { $generated_password = substr(md5(rand(999, 999999)), 0, 8); change_password($user_data['user_id'], $generated_password); // recover password - + update_user($user_data['user_id'], array('password_recover' => '1')); - + // email generated password to user mail($email, 'Your password recovery', "Hello " . $user_data['first_name'] . ",\n\nYour new password is: " . $generated_password . "\n\n- Gigabyte Developers Incorporated"); } @@ -50,18 +50,18 @@ function update_user($user_id, $update_data) { global $session_user_id; $update = array(); array_walk($update_data, 'array_sanitize'); - + foreach($update_data as $field=>$data) { $update[] = '`' . $field . '` = \'' . $data . '\''; } - + mysql_query("UPDATE `users` SET " . implode(', ', $update) . " WHERE `user_id` = $user_id"); } function activate($email, $email_code) { $email = mysql_real_escape_string($email); $email_code = mysql_real_escape_string($email_code); - + if (mysql_result(mysql_query("SELECT COUNT(`user_id`) FROM `users` WHERE `email` = '$email' AND `email_code` = '$email_code' AND `active` = 0"), 0) == 1) { //queary to update user active status mysql_query("UPDATE `users` SET `active` =1 WHERE `email` = '$email'"); @@ -74,17 +74,17 @@ function activate($email, $email_code) { function change_password($user_id, $password) { $user_id = (int)$user_id; $password = md5($password); - + mysql_query("UPDATE `users` SET `password` = '$password', `password_recover` = 0 WHERE `user_id` = $user_id"); } function register_user($register_data) { array_walk($register_data, 'array_sanitize'); $register_data['password'] = md5($register_data['password']); - + $fields = '`' . implode('`, `', array_keys($register_data)) . '`'; $data = '\'' . implode('\', \'', $register_data) . '\''; - + mysql_query("INSERT INTO `users` ($fields) VALUES ($data)"); mail($register_data['email'], 'Activate your account', "Hello " . $register_data['first_name'] . ",\n\nYou need to activate your account using the link below:\n\nhttp://localhost/gigabytedevsinc/activate.php?email=" . $register_data['email'] . "&email_code=" . $register_data['email_code'] . "\n\n- Gigabyte Developers Incorporated"); } @@ -96,16 +96,16 @@ function user_count() { function user_data($user_id) { $data = array(); $user_id = (int)$user_id; - + $func_num_args = func_num_args(); $func_get_args = func_get_args(); - + if ($func_num_args > 1) { unset($func_get_args[0]); - + $fields = '`' . implode('`, `', $func_get_args) . '`'; $data = mysql_fetch_assoc(mysql_query("SELECT $fields FROM `users` WHERE `user_id` = $user_id")); - + return $data; } } @@ -140,10 +140,10 @@ function user_id_from_email($email) { function login($username, $password) { $user_id = user_id_from_username($username); - + $username = sanitize($username); $password = md5($password); - + return (mysql_result(mysql_query("SELECT COUNT(`user_id`) FROM `users` WHERE `username` = '$username' AND `password` = '$password'"), 0) == 1) ? $user_id : false; } ?> \ No newline at end of file diff --git a/user/includes/head.php b/user/includes/head.php index a5f59c6..dc1e34f 100644 --- a/user/includes/head.php +++ b/user/includes/head.php @@ -3,17 +3,17 @@ - + Gigabyte Developers Incorporated | Registration - + - + diff --git a/user/includes/header.php b/user/includes/header.php index d6e598b..28bff7e 100644 --- a/user/includes/header.php +++ b/user/includes/header.php @@ -7,7 +7,7 @@ Demo 3 --> -
      +
      diff --git a/user/includes/widgets/loggedin.php b/user/includes/widgets/loggedin.php index e14b99e..4175346 100644 --- a/user/includes/widgets/loggedin.php +++ b/user/includes/widgets/loggedin.php @@ -1,1098 +1,1030 @@ - - + - - - - - - - Gigabyte Developers Incorporated | Home - - - - - - - - - - + + + + + + + Gigabyte Developers Incorporated | Home + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + + + +
      + + + +
      + +
      +
      +
      +
      +

      Our Services

      - - - +

      Our team at Gigabyte Developers Incorporated work ceaselessly to offer you a wide range of + professional services in and outside the computer world of technologies. You can also Contact Us if you want to know more about the + services we render to our customers.

      +
      +
      +
      +
      +
      +
      +
      +

      Brand Identity

      - - - - - +

      Gigabyte Developers stand-out unique amongst its competitors in the world of + Tech-Know-How.

      +
      +
      +
      +

      Knowledge Base

      - -
      - - - - - - - +

      Gigabyte Developers offers you brainstorming ideas that can help you as an average + person.

      +
      +
      +
      +
      +

      Supporting You

      +

      Young computer gurus are not to be left out as GIGABYTE offers support to deserving + persons.

      +
      +
      +
      +

      Professional Design

      -
      - +
      +
      +
      +

      Software Development

      - +

      We offer Software Development for a wide range of platforms such as Android, iOS, Mac OX, + Windows, Linux, Windows Mobile, Fedora etc.

      +
      +
      +
      +

      Clean Code

      -
      - - - -
      -
      -
      -
      -
      -

      Our Services

      -

      Our team at Gigabyte Developers Incorporated work ceaselessly to offer you a wide range of professional services in and outside the computer world of technologies. You can also Contact Us if you want to know more about the services we render to our customers.

      -
      -
      -
      -
      -
      -
      -
      - -
      -
      -

      Brand Identity

      -

      Gigabyte Developers stand-out unique amongst its competitors in the world of Tech-Know-How.

      -
      -
      -
      -
      - -
      -
      -

      Knowledge Base

      -

      Gigabyte Developers offers you brainstorming ideas that can help you as an average person.

      -
      -
      -
      -
      - -
      -
      -

      Supporting You

      -

      Young computer gurus are not to be left out as GIGABYTE offers support to deserving persons.

      -
      -
      -
      -
      - -
      -
      -

      Professional Design

      -

      Unique and professional Web Design and Graphic Design can be found here at Gigabyte Developers Incorporated

      -
      -
      -
      -
      - -
      -
      -

      Software Development

      -

      We offer Software Development for a wide range of platforms such as Android, iOS, Mac OX, Windows, Linux, Windows Mobile, Fedora etc.

      -
      -
      -
      -
      - -
      -
      -

      Clean Code

      -

      Ever wanted to code but don't know where to start? Well, we offer lots of tutorial classes for a wide range of programming languages

      +

      Ever wanted to code but don't know where to start? Well, we offer lots of tutorial classes + for a wide range of programming languages

      +
      -
      -
      -
      -
      +
      + +
      -
      -
      -
      -

      About us

      -

      Gigabyte Developers Incorporated which is a Non-Governmental Organization was established to harness and elevate the potential in young computer gurus allover the world. Gigabyte Developers Incorporated is known globally for its quality and genuine services. The company was formerly known as Gigabyte Developers but was later in 2016 incorporated with The Access Team, Mezue Studios, LLC, Catarax Solutions and Gigabyte Studios Incorporated and from then on, it was transformed from Gigabyte Developers to Gigabyte Developers Incorporated.

      -

      Gigabyte Developers Incorporated was founded in December, 2015 by
      Mr. Nwokoma Emmanuel. The name of this great company was derived from GIGABYTE which was Mr. Emmanuel's nickname during his days in college. Mr. Nwokoma Emmanuel was called GIGABYTE because of his wide knowledge in Computer Software & Hardware Engineering, including his programming skills in over 8 programming languages.

      -
      -
      -
      -
      -
      -

      User Experiances

      -
      -
      95%
      -
      -
      -
      -

      Web Design

      -
      -
      80%
      -
      -
      -
      -

      Programming

      -
      -
      75%
      -
      +
      +
      +

      About us

      + +

      Gigabyte Developers Incorporated which is a Non-Governmental Organization was established to + harness and elevate the potential in young computer gurus allover the world. Gigabyte Developers + Incorporated is known globally for its quality and genuine services. The company was formerly + known as Gigabyte Developers but was later in 2016 incorporated with The Access Team, Mezue Studios, LLC, Catarax + Solutions and Gigabyte Studios Incorporated and from then on, it was + transformed from Gigabyte Developers to Gigabyte Developers Incorporated.

      + +

      Gigabyte Developers Incorporated was founded in December, 2015 by
      Mr. Nwokoma Emmanuel. The name of this + great company was derived from GIGABYTE which was Mr. Emmanuel's nickname during his days in + college. Mr. Nwokoma Emmanuel was called GIGABYTE because of his wide knowledge in Computer + Software & Hardware Engineering, including his programming skills in over 8 programming + languages.

      -
      -

      Fun

      -
      -
      90%
      -
      -
      -

      Media

      -
      -
      70%
      -
      +
      +
      +

      User Experiances

      + +
      +
      95% +
      +
      +
      +

      Web Design

      + +
      +
      80% +
      +
      +
      +

      Programming

      + +
      +
      75% +
      +
      +
      +

      Fun

      + +
      +
      90% +
      +
      +

      Media

      + +
      +
      70% +
      +
      +
      +
      +
      -
      -
      -
      -
      - -
      +
      + +
      -
      -
      -

      Our Portfolio

      -

      Here are some visual representation of our abilities, skills, capabilities, knowledge, qualities and potential. Some materials in this section represent tangible work related events at Gigabyte Developers Incorporated.

      +
      +

      Our Portfolio

      + +

      Here are some visual representation of our abilities, skills, capabilities, knowledge, qualities and + potential. Some materials in this section represent tangible work related events at Gigabyte + Developers Incorporated.

      -
      -
      -
      -
      -
      - -
      -
      -
      -
      -
      -

      Software Development

      -

      Design, Photography

      -
      -
      - - -
      +
      +
      +
      +
      +
      +
      +
      +
      +

      Software Development

      + +

      Design, Photography

      +
      +
      +
      +
      -
      -
      -
      -
      -
      -
      - -
      -
      -
      -
      -
      -

      Android Development

      -

      Design, Photography

      -
      -
      - - -
      +
      +
      +
      +
      +
      +
      +
      +

      Android Development

      + +

      Design, Photography

      +
      +
      +
      +
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      Professional Designs

      -

      Design, Photography

      -
      -
      - - -
      +
      +
      +
      +
      +
      +
      +
      +

      Professional Designs

      + +

      Design, Photography

      +
      +
      +
      +
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      Branded Identity

      -

      Design, Photography

      -
      -
      - - -
      +
      +
      +
      +
      +
      +
      +
      +

      Branded Identity

      + +

      Design, Photography

      +
      +
      +
      +
      -
      -
      -
      -
      -
      -
      - -
      -
      -
      -
      -
      -

      Website Development

      -

      Design, Photography

      -
      -
      - - -
      +
      +
      +
      +
      +
      +
      +
      +

      Website Development

      + +

      Design, Photography

      +
      +
      +
      +
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      Graphic Designs

      -

      Design, Photography

      -
      -
      - - -
      +
      +
      +
      +
      +
      +
      +
      +

      Graphic Designs

      + +

      Design, Photography

      +
      +
      +
      +
      -
      -
      -
      -
      -
      -
      - -
      -
      -
      -
      -
      -

      Knowledge Base

      -

      Design, Photography

      -
      -
      - - -
      +
      +
      +
      +
      +
      +
      +
      +

      Knowledge Base

      + +

      Design, Photography

      +
      +
      +
      +
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      Website Designs

      -

      Design, Photography

      -
      -
      - - -
      +
      +
      +
      +
      +
      +
      +
      +

      Website Designs

      + +

      Design, Photography

      +
      +
      +
      +
      -
      -
      -
      -
      -
      -
      -
      - -
      +
      +
      +
      + +
      -
      -
      -

      The Team

      -

      Meet the root of our Company's tree. They are the major members of the Company's team. They are the people behind the successful movement of this Company.

      -
      -
      -
      -
      -
      -
      - -
      -
      -

      Nwokoma Emmanuel

      -

      CEO & Founder

      -

      Consectetur adipisicing elit, sed do eiusmod tempor incididunt

      -
      - -
      -
      -
      -
      -
      - -
      -
      -

      Lawrence Lane

      -

      UI/UX Designer

      -

      Consectetur adipisicing elit, sed do eiusmod tempor incididunt

      -
      - -
      -
      -
      -
      -
      - -
      -
      -

      Lois Clark

      -

      Developer

      -

      Consectetur adipisicing elit, sed do eiusmod tempor incididunt

      -
      - -
      -
      -
      -
      -
      - -
      -
      -

      Marian Dixon

      -

      Support Manager

      -

      Consectetur adipisicing elit, sed do eiusmod tempor incididunt

      -
      - +

      The Team

      + +

      Meet the root of our Company's tree. They are the major members of the Company's team. They are the + people behind the successful movement of this Company.

      +
      +
      +
      +
      +
      +
      +

      Nwokoma Emmanuel

      CEO & Founder

      + +

      Consectetur adipisicing elit, sed do eiusmod tempor incididunt

      + +
      +
      +
      +
      +
      +

      Lawrence Lane

      UI/UX Designer

      + +

      Consectetur adipisicing elit, sed do eiusmod tempor incididunt

      + +
      +
      +
      +
      +
      +

      Lois Clark

      Developer

      + +

      Consectetur adipisicing elit, sed do eiusmod tempor incididunt

      + +
      +
      +
      +
      +
      +

      Marian Dixon

      Support Manager

      + +

      Consectetur adipisicing elit, sed do eiusmod tempor incididunt

      + +
      +
      -
      -
      -
      - -
      +
      + +
      -
      -
      - -

      4000+

      -

      Happy Clients

      +
      +
      + +

      4000+

      + +

      Happy Clients

      +
      + +

      200+

      + +

      Modern Websites

      +
      + +

      10

      + +

      WINNING AWARDS

      +
      + +

      24/7

      + +

      Fast Support

      -
      - -

      200+

      -

      Modern Websites

      -
      -
      - -

      10

      -

      WINNING AWARDS

      -
      -
      - -

      24/7

      -

      Fast Support

      -
      -
      -
      - -
      +
      + +
      -
      -
      -

      Featured Pricing Table For Classes

      -

      Our team offers you great tutorial classes which you will definitely find interesting because of our great user friendly interaction technique. As we need no customer regrets, we have made all our tutoring plans FREE for now so as to suite the needs of our customers.

      -
      -
      -
      -
      -
      -

      Free Plan

      - -
        -
      • Introductory Python Classes
      • -
      • Introductory HTML/CSS Classes
      • -
      • Introductory Javascript Classes
      • -
      • Introductory JQuery Classes
      • -
      • Introductory SQL Classes
      • -
      • Introductory PHP Classes
      • -
      • Introductory Java Classes
      • -
      • Introductory Photoshop Classes
      • -
      • Introductory Illustrator Classes
      • -
      - Sign up -
      -
      -
      -
      -

      Basic Plan

      - -
        -
      • Basic Python Classes
      • -
      • Basic HTML/CSS Classes
      • -
      • Basic Javascript Classes
      • -
      • Basic JQuery Classes
      • -
      • Basic SQL Classes
      • -
      • Basic PHP Classes
      • -
      • Basic Java Classes
      • -
      • Basic Photoshop Classes
      • -
      • Basic Illustrator Classes
      • -
      - Sign up -
      -
      -
      - -
      -
      -
      -

      Professional Plan

      - -
        -
      • Professional Python Classes
      • -
      • Professional HTML Classes
      • -
      • Professional Javascript Classes
      • -
      • Professional JQuery Classes
      • -
      • Professional SQL Classes
      • -
      • Professional PHP Classes
      • -
      • Professional Java Classes
      • -
      • Professional Photoshop Classes
      • -
      • Professional Illustrator Classes
      • -
      • Professional Android Classes
      • -
      • Professional C++ Classes
      • -
      • Professional Visual Basic Classes
      • -
      • Professional Node.JS Classes
      • -
      - Sign up -
      -
      -
      -
      -
      -
      +

      Featured Pricing Table For Classes

      -
      -
      - - -
      -
      -
      - - -
      -
      +
      + +
      +
      -
      +
      +
      +
      + + +
      +
      +
      +
      +
      + +
      -
      -
      -

      Blog Posts

      -

      Latest updates on the happenings at Gigabyte Developers Incorporated, latest tutorials by our team regarding lots and lots of programming languages and some Software Development platforms.

      +
      +

      Blog Posts

      + +

      Latest updates on the happenings at Gigabyte Developers Incorporated, latest tutorials by our team + regarding lots and lots of programming languages and some Software Development platforms.

      -
      - + + + + + + + +
      +
      +
      +
      +
      +
      + +
      +
      -
      -
      - - -
      - -
      -
      -
      -

      Lorem ipsum dolor sit amet consectetur adipisicing elit

      - June 26, 2014 - in Photography +
      +

      Hire Us Now!

      -
      -

      Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

      -
      -
      -
      -
      -
      - - - - -
      - -
      - -
      -
      -
      -

      Lorem ipsum dolor sit amet consectetur adipisicing elit

      - June 26, 2014 - in Photography -
      -
      -

      Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

      -
      -
      -
      -
      - - -
      - -
      +

      Do you want our + team at Gigabyte Developers Incorporated to do the work for you? Of course you want to, because we + are awesome and 100% professional!. Here at Gigabyte Developers Incorporated, we work very hard + every day to program lots of stuffs and to craft pixel perfect sites!. So, click on the button below + to get started

      + +
      +
      +
      +

      +
      + +
      + +
      +
      +
      +

      Contact Us

      + +

      Do you have questions that require answers, do you have any suggestions that you would like to + make, do you have any ideas you want to share? If YES, then don't hesitate to contact us.
      Fill + out the form below and await a reply from us within 24-48hrs or 1-2 business days.

      -
      -

      Lorem ipsum dolor sit amet consectetur adipisicing elit

      - June 26, 2014 - in Photography +
      +
      +
      +
      +
      +
      +
      +
      + +
      +
      +
      +
      + +
      + +
      + +
      + +
      + + +
      +
      +
      +
      +

      You + can meet our team and representatives in person at our Main Office/Headquarters by just + paying a homely visit at the address below or call on phone for more details to schedule + a visit to Gigabyte Developers Incorporated.

      + +
      +
      +
      -
      -

      Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

      +
      +
      +
      + +
      +
      +
      +

      Our Partners

      +
      +
      +
      +
      -
      -
      --> - - - - - - - - - - - - - -
      +
      -
      -
      -
      -
      -
      - - -
      -
      -
      -
      - -
      -
      -

      Hire Us Now!

      -
      -

      Do you want our team at Gigabyte Developers Incorporated to do the work for you? Of course you want to, because we are awesome and 100% professional!. Here at Gigabyte Developers Incorporated, we work very hard every day to program lots of stuffs and to craft pixel perfect sites!. So, click on the button below to get started

      -
      -

      - Contact Us

      -
      -
      -
      -
      -
      -
      -
      -
      - +
      +
      +
      +
      +

      -
      - -
      -
      -
      -
      -

      Contact Us

      -

      Do you have questions that require answers, do you have any suggestions that you would like to make, do you have any ideas you want to share? If YES, then don't hesitate to contact us.
      Fill out the form below and await a reply from us within 24-48hrs or 1-2 business days.

      -
      +

      THANKS FOR VISITING + US

      + +
      +
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      - -
      -
      -
      -
      +
      - +
      + +
      - - -
      - - + +

      + +

      Support Us

      + +

      Do you love our work and would like us to achieve more? If, yes! Then why not support us to aid our + continuity by simply clicking on the donate button below and donate to us. No amount is too small.
      Note: + "God loves a cheerfull giver"!

      Donate
      +
      +
      + +
      + -
      -
      -
      -
      -
      -
      -

      Our Partners

      -
      -
      -
      - -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      THANKS FOR VISITING US

      -

      -
      -
      -
      -

      Contact Information

      -

      #40, Nnokwa Street, World Bank Housing Estate, Umuahia, Abia State. Nigeria
      - +234 810 430 9369
      - +234 701 723 6746
      - gigabytedevelopers@gmail.com
      - @gigabytedevsinc
      - Gigabyte Developers Incorporated
      -

      -
      - -
      -

      Newsletter

      -

      Register to our newsletter and be updated with the latests information regarding our services, offers and much more.

      -

      -

      -
      - -
      - -
      -
      -
      - -
      - -
      -
      -
      -
      - -
      -
      -
      -

      -
      - -
      -

      Support Us

      -

      Do you love our work and would like us to achieve more? If, yes! Then why not support us to aid our continuity by simply clicking on the donate button below and donate to us. No amount is too small.
      Note: "God loves a cheerfull giver"!

      - Donate -
      - -
      - -
      -
      -
      - - - - - - - - - - - - - - + + + + + + + + + + + + -
      -
      - -
      + $('a[href=#top]').click(function () { + $('body,html').animate({scrollTop: 0}, 600); + return false; + }); + $(window).scroll(function () { + if ($(this).scrollTop() > 50) { + $('.totop a').fadeIn(); + } else { + $('.totop a').fadeOut(); + } + });//# sourceURL=pen.js +
      +
      +
      - - + diff --git a/user/includes/widgets/login.php b/user/includes/widgets/login.php index 7c21605..7192aad 100644 --- a/user/includes/widgets/login.php +++ b/user/includes/widgets/login.php @@ -21,7 +21,7 @@ Forgot username or password?
    - +
    \ No newline at end of file diff --git a/user/profile.php b/user/profile.php index fbb983e..9bad66d 100644 --- a/user/profile.php +++ b/user/profile.php @@ -4,7 +4,7 @@ if (isset($_GET['username']) === true && empty($_GET['username']) === false) { $username = $_GET['username']; - + if (user_exists($username) === true) { $user_id = user_id_from_username($username); $profile_data = user_data($user_id, 'username', 'first_name', 'last_name', 'email', 'profile', 'country', 'phonenumber', 'sex'); @@ -15,13 +15,13 @@ - + Gigabyte Developers Incorporated | Profile - + @@ -53,7 +53,7 @@ Demo 3 --> -
    +
    @@ -79,13 +79,13 @@ - + Gigabyte Developers Incorporated | Profile - + @@ -99,7 +99,7 @@

    Gigabyte Developers Incorporated

    -
    +
    @@ -113,5 +113,5 @@ diff --git a/user/protected.php b/user/protected.php index 6b0fa1a..9a5e1d4 100644 --- a/user/protected.php +++ b/user/protected.php @@ -6,13 +6,13 @@ - + Gigabyte Developers Incorporated | No Access - + @@ -44,7 +44,7 @@ Demo 3 --> -
    +
    From 3ac6762d45a47fe398400799604cb3730ac3c42f Mon Sep 17 00:00:00 2001 From: gigabytedevelopers Date: Fri, 10 Mar 2017 16:09:26 +0100 Subject: [PATCH 2/2] reformat code (PHP) --- index.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index 2df41cc..c3a8705 100644 --- a/index.php +++ b/index.php @@ -21,12 +21,8 @@ - -