diff --git a/contact.php b/contact.php
index 3ce22fb35..b6ff7f898 100644
--- a/contact.php
+++ b/contact.php
@@ -17,12 +17,28 @@ class contact_front
{
function __construct()
{
+ $range = range(00,24);
+ $tp = e107::getParser();
+ $defs = array();
+
+ foreach($range as $val)
+ {
+ $inc = $tp->leadingZeros($val,2);
+ $legacy = 'LAN_CONTACT_'.$inc;
+ $defs[$legacy] = 'LANCONTACT_'.$inc;
+
+ }
+
+ e107::getLanguage()->bcDefs($defs);
+
$this->init();
}
function init()
{
+ $pref = e107::pref();
+
$active = varset($pref['contact_visibility'], e_UC_PUBLIC);
$contactInfo = trim(SITECONTACTINFO);
$pref = e107::getPref();
@@ -34,7 +50,7 @@ class contact_front
if(isset($_POST['send-contactus']))
{
- $this->processFormSubmit($sql);
+ $this->processFormSubmit();
}
$form = '';
@@ -118,51 +134,30 @@ class contact_front
// Check Image-Code
if(isset($_POST['rand_num']) && ($sec_img->invalidCode($_POST['rand_num'], $_POST['code_verify'])))
{
- $error .= LANCONTACT_15 . "\\n";
+ $error .= LAN_CONTACT_15 . "\\n";
}
// Check message body.
if(strlen(trim($body)) < 15)
{
- $error .= LANCONTACT_12 . "\\n";
+ $error .= LAN_CONTACT_12 . "\\n";
}
// Check subject line.
if(isset($_POST['subject']) && strlen(trim($subject)) < 2)
{
- $error .= LANCONTACT_13 . "\\n";
+ $error .= LAN_CONTACT_13 . "\\n";
}
if(!strpos(trim($sender), "@"))
{
- $error .= LANCONTACT_11 . "\\n";
+ $error .= LAN_CONTACT_11 . "\\n";
}
-
- // Check email address on remote server (if enabled). XXX Problematic!
- /*
- if ($pref['signup_remote_emailcheck'] && $error == '')
- {
- require_once(e_HANDLER."mail_validation_class.php");
- list($adminuser,$adminhost) = explode('@', SITEADMINEMAIL, 2);
- $validator = new email_validation_class;
- $validator->localuser= $adminuser;
- $validator->localhost= $adminhost;
- $validator->timeout=3;
- // $validator->debug=1;
- // $validator->html_debug=1;
- if($validator->ValidateEmailBox($sender) != 1)
- {
- $error .= LANCONTACT_11."\\n";
- }
-
- }
- */
-
// No errors - so proceed to email the admin and the user (if selected).
if($ignore === true)
{
- $ns->tablerender('', "
" . LANCONTACT_09 . "
"); // ignore and leave them none the wiser.
+ $ns->tablerender('', "" . LAN_CONTACT_09 . "
"); // ignore and leave them none the wiser.
e107::getDebug()->log("Contact form post ignored");
require_once(FOOTERF);
exit;
@@ -257,7 +252,7 @@ class contact_front
);
- $message = e107::getEmail()->sendEmail($send_to, $send_to_name, $eml) ? LANCONTACT_09 : LANCONTACT_10;
+ $message = e107::getEmail()->sendEmail($send_to, $send_to_name, $eml) ? LAN_CONTACT_09 : LAN_CONTACT_10;
// $message = (sendemail($send_to,"[".SITENAME."] ".$subject, $body,$send_to_name,$sender,$sender_name)) ? LANCONTACT_09 : LANCONTACT_10;
@@ -295,7 +290,7 @@ class contact_front
$contact_shortcodes->wrapper('contact/info');
$text = e107::getParser()->parseTemplate($CONTACT_INFO, true, $contact_shortcodes);
- return e107::getRender()->tablerender(LANCONTACT_01, $text, "contact-info", true);
+ return e107::getRender()->tablerender(LAN_CONTACT_01, $text, "contact-info", true);
}
@@ -317,7 +312,7 @@ class contact_front
if(trim($text) !== '')
{
- return e107::getRender()->tablerender(LANCONTACT_02, $text, "contact-form", true);
+ return e107::getRender()->tablerender(LAN_CONTACT_02, $text, "contact-form", true);
}
}
@@ -327,16 +322,16 @@ class contact_front
$srch = array("[", "]");
$repl = array("", "");
- $message = LANCONTACT_16; // "You must be [registered] and signed-in to use this form.";
+ $message = LAN_CONTACT_16; // "You must be [registered] and signed-in to use this form.";
- e107::getRender()->tablerender(LANCONTACT_02, "" . str_replace($srch, $repl, $message) . "
", "contact");
+ e107::getRender()->tablerender(LAN_CONTACT_02, "" . str_replace($srch, $repl, $message) . "
", "contact");
}
}
e107::lan('core','contact');
-e107::title(LANCONTACT_00);
+e107::title(LAN_CONTACT_00);
e107::canonical('contact');
e107::route('contact/index');
diff --git a/e107_core/shortcodes/batch/contact_shortcodes.php b/e107_core/shortcodes/batch/contact_shortcodes.php
index 686c1dbb4..14af85a7d 100644
--- a/e107_core/shortcodes/batch/contact_shortcodes.php
+++ b/e107_core/shortcodes/batch/contact_shortcodes.php
@@ -92,7 +92,7 @@ class contact_shortcodes extends e_shortcode
/* example {CONTACT_NAME} */
/* example {CONTACT_NAME: class=form-control} */
- /* example {CONTACT_NAME: class=col-md-12&placeholder=".LANCONTACT_03." *} */
+ /* example {CONTACT_NAME: class=col-md-12&placeholder=".LAN_CONTACT_03." *} */
function sc_contact_name($parm=null)
{
@@ -100,7 +100,7 @@ class contact_shortcodes extends e_shortcode
$class = (!empty($parm['class'])) ? $parm['class'] : 'tbox form-control';
$placeholder = (!empty($parm['placeholder'])) ? " placeholder= '".$parm['placeholder']."'" : '';
$value = !empty($_POST['author_name']) ? e107::getParser()->filter( $_POST['author_name']) : $userName;
- return "";
+ return "";
}
function sc_contact_map($parm=null)
@@ -174,7 +174,7 @@ class contact_shortcodes extends e_shortcode
/* example {CONTACT_EMAIL} */
/* example {CONTACT_EMAIL: class=form-control} */
- /* example {CONTACT_EMAIL: class=col-md-12&placeholder=".LANCONTACT_04." *} */
+ /* example {CONTACT_EMAIL: class=col-md-12&placeholder=".LAN_CONTACT_04." *} */
function sc_contact_email($parm=null)
{
@@ -184,21 +184,21 @@ class contact_shortcodes extends e_shortcode
$class = (!empty($parm['class'])) ? $parm['class'] : 'tbox form-control';
$placeholder = (!empty($parm['placeholder'])) ? " placeholder= '".$parm['placeholder']."'" : '';
$value = !empty($_POST['email_send'] ) ? e107::getParser()->filter($_POST['email_send'],'email') : USEREMAIL;
- return "";
+ return "";
}
/* example {CONTACT_SUBJECT} */
/* example {CONTACT_SUBJECT: class=form-control} */
- /* example {CONTACT_SUBJECT: class=col-md-12&placeholder=".LANCONTACT_05." *} */
+ /* example {CONTACT_SUBJECT: class=col-md-12&placeholder=".LAN_CONTACT_05." *} */
function sc_contact_subject($parm=null)
{
$class = (!empty($parm['class'])) ? $parm['class'] : 'tbox form-control';
$placeholder = (!empty($parm['placeholder'])) ? " placeholder= '".$parm['placeholder']."'" : '';
$value = !empty($_POST['subject']) ? e107::getParser()->filter($_POST['subject']) : '';
- return "";
+ return "";
}
@@ -220,7 +220,7 @@ class contact_shortcodes extends e_shortcode
$value = !empty($_POST['body']) ? stripslashes($_POST['body']) : '';
- return "";
+ return "";
}
@@ -230,7 +230,7 @@ class contact_shortcodes extends e_shortcode
{
$class = (!empty($parm['class'])) ? $parm['class'] : 'btn btn-primary button';
- return "";
+ return "";
}
function sc_contact_gdpr_check($parm=null)
@@ -250,9 +250,9 @@ class contact_shortcodes extends e_shortcode
}
$pp = e107::getParser()->replaceConstants($pp, 'full');
$class = (!empty($parm['class'])) ? $parm['class'] : '';
- $link = sprintf('%s', $class, $pp, LANCONTACT_22);
+ $link = sprintf('%s', $class, $pp, LAN_CONTACT_22);
- return e107::getParser()->lanVars(LANCONTACT_23, $link);
+ return e107::getParser()->lanVars(LAN_CONTACT_23, $link);
}
diff --git a/e107_core/shortcodes/single/lan.php b/e107_core/shortcodes/single/lan.php
index ee701316b..5f449f52b 100644
--- a/e107_core/shortcodes/single/lan.php
+++ b/e107_core/shortcodes/single/lan.php
@@ -19,6 +19,6 @@ function lan_shortcode($parm = '')
}
elseif(ADMIN)
{
- return "".$parm ." is undefined"; // debug info
+ return "".$parm ." is undefined"; // debug info
}
}
diff --git a/e107_core/templates/contact_template.php b/e107_core/templates/contact_template.php
index 79cff576f..7e7c9c005 100644
--- a/e107_core/templates/contact_template.php
+++ b/e107_core/templates/contact_template.php
@@ -18,9 +18,9 @@ $CONTACT_WRAPPER['info']['CONTACT_INFO: type=message'] = "{---}
";
$CONTACT_WRAPPER['info']['CONTACT_INFO: type=address'] = "{GLYPH=fa-map-marker} {---}";
$CONTACT_WRAPPER['info']['CONTACT_INFO: type=email1'] = "{GLYPH=fa-envelope} {---}
";
$CONTACT_WRAPPER['info']['CONTACT_INFO: type=email2'] = "{GLYPH=fa-envelope} {---}
";
-$CONTACT_WRAPPER['info']['CONTACT_INFO: type=phone1'] = "{GLYPH=fas-phone-alt} {---}
";
-$CONTACT_WRAPPER['info']['CONTACT_INFO: type=phone2'] = "{GLYPH=fas-phone-alt} {---}
";
-$CONTACT_WRAPPER['info']['CONTACT_INFO: type=phone3'] = "{GLYPH=fas-phone-alt} {---}
";
+$CONTACT_WRAPPER['info']['CONTACT_INFO: type=phone1'] = "{GLYPH=fas-phone} {---}
";
+$CONTACT_WRAPPER['info']['CONTACT_INFO: type=phone2'] = "{GLYPH=fas-phone} {---}
";
+$CONTACT_WRAPPER['info']['CONTACT_INFO: type=phone3'] = "{GLYPH=fas-phone} {---}
";
$CONTACT_WRAPPER['info']['CONTACT_INFO: type=fax'] = "{GLYPH=fa-fax} {---}
";
$CONTACT_WRAPPER['info']['CONTACT_INFO: type=hours'] = "{GLYPH=fa-clock} {---}
";
@@ -59,21 +59,21 @@ $CONTACT_TEMPLATE['info'] = "
$CONTACT_TEMPLATE['menu'] = '