<?php /** handle submission **/ if (isset($_POST['submit'])) { $content = "<table>"; foreach ($_POST as $key => $val) { $tokens = explode("_", $key); $key = ""; foreach ($tokens as $token) { $key .= ucfirst($token) . " "; } $content .= "<tr><th>{$key}</th><td>{$val}</td></tr>"; } $content .= "</table>"; sendemailAdmin($settings['sitename'] . " - Apply for course", $content); Message::register(new Message(Message::SUCCESS, 'Thank you for your application. We will contact you soon!')); } $html = new HTML(); $html->renderOut('site/components/html_header', array('title' => 'Apply for a course', 'body_class' => 'page page-template page-template-templates page-template-full-width page-template-templatesfull-width-php has-toolbar')); $html->output('<div id="page-container">'); //$html->renderOut('site/components/toptoolbar'); $html->renderOut('site/components/header'); $html->renderOut('site/apply', array('full_page_sidebar_right' => $html->render('site/components/full_page_sidebar_right', array('blocks' => array(Block::findByName('Get in Touch')))))); $html->renderOut('site/components/footer'); $html->output('</div>'); $html->renderOut('site/components/page_footer'); $html->renderOut('site/components/html_footer');
<li> <a href="<?php echo uri('news/' . $news->getId()); ?> "><?php echo $news->getTitle(); ?> </a> </li> <?php } ?> </ul> </aside> </div> <div class="widgets widgets-4 one-fourth"> <aside class="widget widget-educator-contact" id="widget_educator_contact-3"> <h3 class="widget-title">Get in Touch</h3> <div class="text"> <p><?php echo Block::findByName('Footer Right'); ?> </p> </div> </aside> </div> </div> </footer>
<?php /** $page has already been assigned by Page module **/ // forward 404 if not published if (!$page->getPublished()) { dispatch('site/404'); exit; } $html = new HTML(); $html->renderOut('site/components/html_header', array('title' => $page->getTitle(), 'body_class' => 'page page-template page-template-templates page-template-full-width page-template-templatesfull-width-php has-toolbar')); $html->output('<div id="page-container">'); //$html->renderOut('site/components/toptoolbar'); $html->renderOut('site/components/header'); $html->renderOut('site/page/default', array('breadcrumb' => $html->render('site/components/breadcrumb', array('items' => array('Home' => uri(''), $page->getTitle() => false))), 'page' => $page, 'full_page_sidebar_right' => $html->render('site/components/full_page_sidebar_right', array('blocks' => array(Block::findByName('Get in Touch'), Block::findByName('Apply Now')))))); $html->renderOut('site/components/footer'); $html->output('</div>'); $html->renderOut('site/components/page_footer'); $html->renderOut('site/components/html_footer');
$file = str_replace(WEBROOT . DS, "", $newname); } $rtn[] = $file; } $object->setIeltsTranscripts(implode("\n", $rtn)); $object->setCreatedAt(time()); if ($error_flag == false) { if ($object->save()) { Message::register(new Message(Message::SUCCESS, i18n(array("en" => "Thanks for your application. We will come back to you as soon as possible.", "zh" => "记录保存成功")))); sendemailAdmin('Apply for course', '<p>A new application for course has just been submitted: <br /><a href="http://en.ct21.com.au/admin/application/edit/' . $object->getId() . '">http://en.ct21.com.au/admin/application/edit/' . $object->getId() . '</a></p>'); HTML::forwardBackToReferer(); } else { Message::register(new Message(Message::DANGER, i18n(array("en" => "Record failed to save", "zh" => "记录保存失败")))); } } } // bootstrap field widgets FormWidgetPlupfile::bootstrap('graduation_certificate'); FormWidgetPlupfile::bootstrap('degree_certificate'); FormWidgetPlupfile::bootstrap('academic_transcripts'); FormWidgetPlupfile::bootstrap('ielts_transcripts'); $html = new HTML(); $html->renderOut('site/components/html_header', array('title' => 'Apply for a course', 'body_class' => 'page page-template page-template-templates page-template-full-width page-template-templatesfull-width-php has-toolbar')); $html->output('<div id="page-container">'); //$html->renderOut('site/components/toptoolbar'); $html->renderOut('site/components/header'); $html->renderOut('site/apply_form', array('object' => new Application(), 'full_page_sidebar_right' => $html->render('site/components/full_page_sidebar_right', array('blocks' => array(Block::findByName('Get in Touch')))))); $html->renderOut('site/components/footer'); $html->output('</div>'); $html->renderOut('site/components/page_footer'); $html->renderOut('site/components/html_footer');
Message::register($messages); HTML::forward($_SERVER['HTTP_REFERER'] . '#contact-form'); } // check spam if (module_enabled('form') && !Form::checkSpamToken('global contact form')) { $message = new Message(Message::DANGER, i18n(array('en' => 'Form login session expired. Please try again', 'zh' => '表单提交时限过期,请重新尝试登录'))); Message::register($message); HTML::forward($_SERVER['HTTP_REFERER'] . '#contact-form'); } /** success action **/ Message::register(new Message(Message::SUCCESS, i18n(array('en' => 'Thank you for your contact ;) We will get back to you soon.', 'zh' => '感谢您的留言 ;) 我们会及时和您沟通')))); if (module_enabled('mail')) { $message = array(); foreach ($_POST['contact'] as $key => $val) { $message[] = "<p><strong>{$key}</strong>:<br />" . str_replace("\n", "<br />", $val) . "</p><br />"; } $message = implode("\n", $message); sendemailAdmin('Site contact form', $message); } HTML::forward($_SERVER['HTTP_REFERER'] . '#contact-form'); } $html = new HTML(); $html->renderOut('site/components/html_header', array('title' => 'Contact', 'body_class' => 'page page-template page-template-templates page-template-full-width page-template-templatesfull-width-php has-toolbar')); $html->output('<div id="page-container">'); //$html->renderOut('site/components/toptoolbar'); $html->renderOut('site/components/header'); $html->renderOut('site/contact', array('pagetitle' => $page->getTitle(), 'content' => $page->getContent(), 'googlemap' => $html->render('site/components/googlemap', array('latitude' => '-33.877348', 'longitude' => '151.2079613')), 'full_page_sidebar_right' => $html->render('site/components/full_page_sidebar_right', array('blocks' => array(Block::findByName('Get in Touch'), Block::findByName('Apply Now')))))); $html->renderOut('site/components/footer'); $html->output('</div>'); $html->renderOut('site/components/page_footer'); $html->renderOut('site/components/html_footer');
<a href="<?php echo uri('news'); ?> ">Check all news »</a> </div> </div> <div class="dm3-one-half dm3-column-last" id="video-container"> <iframe width="560" height="315" src="<?php echo $youtube_url; ?> " frameborder="0" allowfullscreen></iframe> <div id="shortcuts"> <div class="dm3-box-icon dm3-box-icon-center"> <div class="dm3-box-icon-icon"> <span class="fa fa-search"></span> </div> <div class="dm3-box-icon-content"> <?php echo Block::findByName('Course search'); ?> </div> </div> </div> </div> <div class="clear"></div> </div> </div> </section>
<?php // get youtube video url from block $block = Block::findByName('Youtube video'); $matches = array(); preg_match('/www.youtube.com\\/embed\\/([^\\<&]+)/', $block, $matches); if (isset($matches[1])) { $youtube_id = $matches[1]; } else { preg_match('/www.youtube.com\\/watch\\?v=([^\\<&]+)/', $block, $matches); $youtube_id = $matches[1]; } $youtube_url = isset($youtube_id) ? "https://www.youtube.com/embed/{$youtube_id}" : 'https://www.youtube.com/embed/jiBxpdobg0E'; $html = new HTML(); $html->renderOut('site/components/html_header', array('title' => $settings['sitename'], 'body_class' => 'home page page-id-115 page-template-default has-toolbar')); $html->output('<div id="page-container">'); //$html->renderOut('site/components/toptoolbar'); $html->renderOut('site/components/header'); $html->renderOut('site/components/slider', array('carousels' => Carousel::findAll())); $html->renderOut('site/components/latest_news', array('youtube_url' => $youtube_url)); $html->renderOut('site/components/countries_block', array('title' => 'Apply for oversea study', 'countries' => Country::findAll())); $html->renderOut('site/components/testimonial'); $html->renderOut('site/components/footer'); $html->output('</div>'); $html->renderOut('site/components/page_footer'); $html->renderOut('site/components/html_footer');