-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.php
75 lines (57 loc) · 1.85 KB
/
contact.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
//debug on
ini_set('display_errors', 1);
//boolean
include_once('app/includes/boolean.php');
/*Fetch API Data */
//include api functions
include("app/includes/api_fetch.php");
// Contact Page Data //
$contacts = api_fetch($api_contact,$api_auth);
$pr = 'cp_';
$active = $contacts->{$pr . 'active'};
$home = api_fetch($api_home,$api_auth);
/*Create template parts */
include 'app/views/templates/default/html/html.php';
include "header.php";
//Header Area
$header = headArea($contact,'cp_',$home,'mp_');
//Meta
$meta_tag = metaData('cp_',$contact);
$meta_title = metaTitle('cp_',$contact);
//Notify Announcement
$notify = notify('cp_',$contact);
//Logo
include_once 'app/views/templates/default/logo.php';
// function logo($logoImg,$logoAlt,$logoClass="",$logoMaxWidth="",$logoLink="",$logoWrapTag="",$logoWrapClass=""){
$logo_max_width = $obj->{$pr . 'logo_max_width'} ?? 30;
$logo_display = $obj->{$pr . 'logo_display'} ?? 30;
$cp_logo = "";
if (yes($logo_display))
{
$cp_logo = logo($logo,$company_name,$logo_max_width,'/',); //Need api field for logo size
}
//contact details
$email = c($contacts,'cp_email');
$tel1 = c($contacts,'cp_tel');
$tel2 = c($contacts,'cp_tel2');
$address = c($contacts,'cp_address');
$office_hours = c($contacts,'cp_business_hours');
$company_name = c($home,'mp_company_name');
//Contact details
include ('app/views/templates/default/contactdetails.php');
$contact_details = contactDetails($company_name,$tel1,$tel2,$address,$office_hours);
//contact Form
include 'app/views/templates/default/contactform.php';
$form = contactForm($contact,'cp_');
//Map
include 'app/views/templates/default/map.php';
$map = map($contact,"cp_");
//Footer
include "footer.php";
//include views
include("app/views/v_header.php");
include("app/views/v_nav.php");
include("app/views/v_contact.php");
include("app/views/v_footer.php");
?>