setMainTpl('tpl/page/content_page.tpl'); //vdie($page); $page->setTitle($content->get('title')); $page->content['PAGE']['keywords'] = $content->get('keywords'); $page->content['PAGE']['description'] = $content->get('description'); //$page->content['PAGE']['alias'] = $_path; $aContent=$content->getContentArray(); $page->addContent($aContent); if (isset($_REQUEST['action']) && $_REQUEST['action']=='insert') { $_REQUEST['request']=strip_tags($_REQUEST['request']); $contact_us->initFromArray($_REQUEST); if ($contact_us->isValid()) { $contact_us->insert(); WACSG_base::setData('home.html', 'msg', 'Thank You! Your message was sent'); $message="A Contact Us Request received from ".$_SERVER['HTTP_HOST']." site. Here are more detailed info: \r\n\r\n############## Name: ###############\r\n".$_REQUEST['name']."\r\n######### Email or Phone: ##########\r\n".$_REQUEST['email']."\r\n############# Request: #############\r\n".$_REQUEST['request']."\r\n######################################\r\n"; $res = sendMail($__CONFIG['CONTACT_US_TO_EMAIL'], 'Contact Us Request from '.$_SERVER['HTTP_HOST'], $message); header('location: ' .BASE_URL.'/home.html'); exit; } else { $form=$contact_us->getAddForm(); $form['email']=$__CONFIG['CONTACT_US_TO_EMAIL']; $page->addContent($form); } } else { $form=$contact_us->getAddForm(); $form['email']=$__CONFIG['CONTACT_US_TO_EMAIL']; $page->addContent($form); } $page->addItem($content->getSummaryArray(),'SUMMARY'); $page->display(); ?>