Example #1
0
<?php

function exception_handler($e)
{
    $responseArray['status'] = 'failure';
    $responseArray['message'] = $e->getMessage();
    echo json_encode($responseArray);
}
set_exception_handler('exception_handler');
// This controller sends emails
if (isset($_GET)) {
    $values = $_GET;
}
$function = 'unknown';
if (isset($_GET['function'])) {
    $function = $_GET['function'];
}
include_once "mail.inc";
switch ($function) {
    case "contact_us":
        contact_us($values);
        $responseArray['message'] = "Email has been sent";
        $responseArray['response'] = "Email has been sent";
        break;
    default:
        throw new Exception("Unknown function: {$function}");
}
$responseArray['status'] = 'success';
echo json_encode($responseArray);
exit;
Example #2
0
 function shortcode($atts)
 {
     extract(shortcode_atts(array('type' => false, 'include' => false, 'heading' => '', 'heading_open_tag' => '<h4>', 'heading_close_tag' => '</h4>', 'nl2br' => false, 'before' => '', 'after' => ''), $atts));
     if ('form' == $type) {
         return $this->form($include);
     }
     return contact_us($type, $heading, $heading_open_tag, $heading_close_tag, $nl2br, $before, $after);
 }
Example #3
0
             } else {
                 if (isset($_GET['delete'])) {
                     delete_job_application($_GET['delete']);
                 }
             }
         }
         require "templates/job_applications.php";
     } else {
         header("location:index.php?page=login&redirect=job_applications");
     }
 } else {
     if ($page == "applyforajob" && isset($_POST['name']) && isset($_POST['email']) && isset($_POST['previous_experiences']) && isset($_POST['about']) && isset($_POST['strengths'])) {
         applyforajob($_POST['name'], $_POST['email'], $_POST['previous_experiences'], $_POST['about'], $_POST['strengths']);
     } else {
         if (isset($_POST['name']) && isset($_POST['email']) && isset($_POST['subject']) && isset($_POST['message'])) {
             contact_us($_POST['name'], $_POST['email'], $_POST['company'], $_POST['subject'], $_POST['message']);
         } else {
             if ($page == "delete_project_image" && isset($_GET['project_id']) && isset($_GET['image_id'])) {
                 delete_project_image($_GET['project_id'], $_GET['image_id']);
             } else {
                 if ($page == "edit_project" && isset($_GET['id'])) {
                     if (isset($_POST['title']) && isset($_POST['type']) && isset($_POST['text'])) {
                         edit_project($_POST['title'], $_POST['type'], $_POST['text']);
                     }
                     require "templates/admin/edit_project.php";
                 } else {
                     if ($page == "testimony" && isset($_GET['invite'])) {
                         $pdo = pdo();
                         $invite = $_GET['invite'];
                         //check if the user has submitted data in the form
                         if (isset($_POST['email']) && isset($_POST['name']) && isset($_POST['text'])) {
$clients[] = array("src" => get_template_directory_uri() . "/img/grid/clients/logitech.png", "alt" => "Logitech Logo");
$clients[] = array("src" => get_template_directory_uri() . "/img/grid/clients/microsoft.png", "alt" => "Microsoft Logo");
$clients[] = array("src" => get_template_directory_uri() . "/img/grid/clients/panasonic.png", "alt" => "Panasonic Logo");
$clients[] = array("src" => get_template_directory_uri() . "/img/grid/clients/seagate.png", "alt" => "Seagate Logo");
$clients[] = array("src" => get_template_directory_uri() . "/img/grid/clients/pmi.png", "alt" => "PMI Logo");
$clients[] = array("src" => get_template_directory_uri() . "/img/grid/clients/htc.png", "alt" => "HTC Logo");
$clients[] = array("src" => get_template_directory_uri() . "/img/grid/clients/Blackberry.png", "alt" => "BlackBerry Logo");
$clients[] = array("src" => get_template_directory_uri() . "/img/grid/clients/Furla.png", "alt" => "Furla Logo");
$clients[] = array("src" => get_template_directory_uri() . "/img/grid/clients/electrolux.png", "alt" => "Electrolux Logo");
$clients[] = array("src" => get_template_directory_uri() . "/img/grid/clients/jabra.png", "alt" => "Jabra Logo");
$clients[] = array("src" => get_template_directory_uri() . "/img/grid/clients/razer.png", "alt" => "Razer Logo");
clients_section($headline, $clients);
?>
<style>
.client_quote_box.flexslider, .owl-stage, .owl-stage-outer {
    height: 255px !important;
}
</style>
<style>
	.resources-wrapper{overflow:hidden;}
</style>
<?php 
initResourcesSection();
$headline = 'Ready to go direct?';
$copy = array();
$copy[] = 'Every brand is unique. We look forward to talking to you about yours. Together, we will tailor your ecommerce experience for the right go-to-market approach.';
contact_us($headline, $copy);
get_footer();
?>


  <body>
    <div id="headerfile"></div>   
    <div class="container-fluid"> 
    <div class="row">
      <div class="col-md-10 col-md-offset-1">

                
        <?php 
$fname = $_POST['fname'];
$email = $_POST['email'];
$lname = $_POST['lname'];
$msg = $_POST['message'];
$phone = $_POST['phone'];
contact_us($fname, $lname, $email, $phone, $msg);
?>

      </div>
    </div>
    </div>
    <div id="footerfile"></div>

    <script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

      ga('create', 'UA-68434893-1', 'auto');
      ga('send', 'pageview');