'.PHP_EOL; include 'Forbidden/BN-rpanel.php'; $post=false; $error=''; $emluok=true; $phoneok=true; $onevalid=false; if(isset($_SESSION['posted'])) foreach($_SESSION['posted'] as $k=>$v) { if($v) { $post=true; break; } } if($post) { $fields=array('Name','Phone','E-mail','Check-in','Stay','Rooms','Guests','Flowers'); $temp=array(); foreach($fields as $f) $temp[$f]=(isset($_SESSION['posted'][$f]))?$_SESSION['posted'][$f]:''; $_SESSION['posted']=$temp; if($_SESSION['posted']['Phone']) { $phoneok=false; $temp=preg_replace("/[^0-9]/","-",$_SESSION['posted']['Phone']); $temp=preg_replace('{-+}', '-',$temp); $temp=trim($temp,'-'); if(strlen($temp)>6) { $_SESSION['posted']['Phone']=$temp; $phoneok=true; $onevalid=true; } else $error.='
Problem with phone number
'; } if($_SESSION['posted']['E-mail']) { $emluok=false; $emlu=strip_tags(substr($_SESSION['posted']['E-mail'],0,24)); $pattern='/^([a-z0-9])(([-a-z0-9._])*([a-z0-9]))*\@([a-z0-9])'.'(([a-z0-9-])*([a-z0-9]))+'.'(\.([a-z0-9])([-a-z0-9_-])?([a-z0-9])+)+$/i'; if(preg_match($pattern,$emlu) && $emlu==$_SESSION['posted']['E-mail']) { $emluok=true; $onevalid=true; } else $error.='
Problem with e-mail address
'; } } if(isset($_SESSION['sent'])) { echo $_SESSION['sent']; $_SESSION=array(); } elseif($post && !$error && !$_SESSION['edit']) include 'Forbidden/BN-gooredit.php'; else include 'Forbidden/BN-bnforml.php'; echo '
Date: '.date("M j, o").'
'; include 'Forbidden/below.php'; ?>