= $bst_) && ($t <= $_bst)) ? gmstrftime("%Y-%m-%d %T", ($t+3600)) : gmstrftime("%Y-%m-%d %T", $t); } function lpcms_format($content) { if (trim($content)) { if (stristr($content, ''.nl2br($content).'

'; } else { return '
'.nl2br($content).'
'; } } else { return false; } } function send_mail($u, $p, $to, $bcc, $fr, $s, $msg, $h, $a=NULL) { $mail = new PHPMailer; $mail->IsSMTP(); $mail->Host = 'auth.smtp.1and1.co.uk'; $mail->Port = 587; $mail->SMTPDebug = 0; $mail->SMTPAuth = true; $mail->Username = $u; $mail->Password = $p; $mail->SMTPSecure = 'tls'; $mail->IsHTML(true); $mail->Body = $msg; $mail->Subject = $s; if ($a) {$mail->AddAttachment($a[0], $a[1]);} if ($fr) { $mail->From = $fr['email']; $mail->FromName = $fr['name']; } else { $mail->From = $u; $mail->FromName = 'Northamptonshire Education Awards'; } if ($to) { foreach ($to as $t) { $mail->AddAddress($t['email'], $t['name']); } } if ($bcc) { foreach ($bcc as $b) { $mail->AddBCC($b['email'], $b['name']); } } if(!$mail->Send()) { mail('lynton@lyntonblack.net', 'Email failed to send: '.$s, $msg, $h); mail('nomination@northamptonshireeducationawards.co.uk', 'Email failed to send: '.$s, $msg, $h); foreach ($to as $t) { mail($t['email'], $s, $msg, $h); } } } function LBM_TEST($is_test_ip=true) { if ($is_test_ip == true) { return (TEST_IP == $_SERVER['REMOTE_ADDR']) ? true : false ; } else { return (TEST_IP != $_SERVER['REMOTE_ADDR']) ? true : false ; } } $_do = isset($_GET['do']) ? $_GET['do'] : NULL ; if($_do == 'reset') {reset_session();} #$cart_id = start_cart_session(); #$site_options = get_site_options($db); $cms_seo = get_seo_text($db); $meta_edit = isset($_SESSION['meta-edit-nea']) ? $_SESSION['meta-edit-nea'] : NULL ; $_https = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : NULL ; $_https_js = isset($_SERVER['HTTPS']) ? 1 : 0 ; $ua = $_SERVER['HTTP_USER_AGENT']; $touch_device = (strpos($ua,"iPhone") || strpos($ua,"Android") || strpos($ua,"BlackBerry") || strpos($ua,"iPad")) ? 1 : NULL ; $ua_ie = strpos($ua, 'Trident/7.0; rv:11.0') !== false || preg_match('/(?i)msie [1-8]/',$ua) ? 'ie' : 'non-ie' ; $nominations_open = /*(LBM_TEST()) ?*/ false /*: true*/ ; ?>