Completed
Push — master ( 720064...d5ad83 )
by Michael
02:05
created

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/*
3
 You may not change or alter any portion of this comment or credits
4
 of supporting developers from this source code or any supporting source code
5
 which is considered copyrighted (c) material of the original comment or credit authors.
6
7
 This program is distributed in the hope that it will be useful,
8
 but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
*/
11
12
/**
13
 * Contact module
14
 *
15
 * @copyright   The XOOPS Project http://sourceforge.net/projects/xoops/
16
 * @license     http://www.fsf.org/copyleft/gpl.html GNU public license
17
 * @author      Kazumi Ono (aka Onokazu)
18
 * @author      Trabis <[email protected]>
19
 * @author      Hossein Azizabadi (AKA Voltan)
20
 * @author      Mirza (AKA Bleekk)
21
  */
22
include __DIR__ . '/header.php';
23
$GLOBALS['xoopsOption']['template_main'] = 'contact_index.tpl';
24
//unset($_SESSION);
25
include XOOPS_ROOT_PATH . '/header.php';
26
global $xoopsModuleConfig, $xoopsModule;
0 ignored issues
show
Compatibility Best Practice introduced by
Use of global functionality is not recommended; it makes your code harder to test, and less reusable.

Instead of relying on global state, we recommend one of these alternatives:

1. Pass all data via parameters

function myFunction($a, $b) {
    // Do something
}

2. Create a class that maintains your state

class MyClass {
    private $a;
    private $b;

    public function __construct($a, $b) {
        $this->a = $a;
        $this->b = $b;
    }

    public function myFunction() {
        // Do something
    }
}
Loading history...
27
/*Modules Options*/
28
if ($xoopsModuleConfig['form_dept'] == 1) {
29
    // show a drop down with the correct departments listed
30
    $departmentlist = array();
31
    $departments    = xoops_getModuleOption('contact_dept', 'contact');
32
    foreach ($departments as $val) {
33
        list($name, $email) = explode(',', $val, 2); //split the name and email
34
        $departmentlist[] = $name;
35
    }
36
    $GLOBALS['xoopsTpl']->assign('depart', $xoopsModuleConfig['form_dept']);
37
    $GLOBALS['xoopsTpl']->assign('departments', $departmentlist);
38
}
39
$GLOBALS['xoopsTpl']->assign('recaptcha', $xoopsModuleConfig['recaptchause']);
40
$GLOBALS['xoopsTpl']->assign('recaptchakey', $xoopsModuleConfig['recaptchakey']);
41
$GLOBALS['xoopsTpl']->assign('url', $xoopsModuleConfig['form_url']);
42
$GLOBALS['xoopsTpl']->assign('icq', $xoopsModuleConfig['form_icq']);
43
$GLOBALS['xoopsTpl']->assign('skype', $xoopsModuleConfig['form_skype']);
44
$GLOBALS['xoopsTpl']->assign('company', $xoopsModuleConfig['form_company']);
45
$GLOBALS['xoopsTpl']->assign('location', $xoopsModuleConfig['form_location']);
46
$GLOBALS['xoopsTpl']->assign('phone', $xoopsModuleConfig['form_phone']);
47
$GLOBALS['xoopsTpl']->assign('address', $xoopsModuleConfig['form_address']);
48
49
$GLOBALS['xoopsTpl']->assign('map', $xoopsModuleConfig['embed_maps']);
50
/*end Modules options*/
51
52
$GLOBALS['xoopsTpl']->assign('breadcrumb', '<li><a href="' . XOOPS_URL . '">' . _YOURHOME . '</a></li> <li class="active">' . $xoopsModule->name().'</li>');
53
$GLOBALS['xoopsTpl']->assign('info', xoops_getModuleOption('contact_info', 'contact'));
54
$GLOBALS['xoopsTpl']->assign('contact_default', xoops_getModuleOption('contact_default', 'contact'));
55
56
/* lang vars, added by goffy */
57
$GLOBALS['xoopsTpl']->assign('lng_username', _MD_CONTACT_NAME);
58
$GLOBALS['xoopsTpl']->assign('lng_email', _MD_CONTACT_MAIL);
59
$GLOBALS['xoopsTpl']->assign('lng_url', _MD_CONTACT_URL);
60
$GLOBALS['xoopsTpl']->assign('lng_company', _MD_CONTACT_COMPANY);
61
$GLOBALS['xoopsTpl']->assign('lng_icq', _MD_CONTACT_ICQ_NAME);
62
$GLOBALS['xoopsTpl']->assign('lng_address', _MD_CONTACT_ADDRESS);
63
$GLOBALS['xoopsTpl']->assign('lng_location', _MD_CONTACT_LOCATION);
64
$GLOBALS['xoopsTpl']->assign('lng_phone', _MD_CONTACT_PHONE);
65
$GLOBALS['xoopsTpl']->assign('lng_skypename', _MD_CONTACT_SKYPE_NAME);
66
$GLOBALS['xoopsTpl']->assign('lng_department', _MD_CONTACT_DEPARTMENT);
67
$GLOBALS['xoopsTpl']->assign('lng_subject', _MD_CONTACT_SUBJECT);
68
$GLOBALS['xoopsTpl']->assign('lng_message', _MD_CONTACT_MESSAGE);
69
$GLOBALS['xoopsTpl']->assign('lng_submit', _MD_CONTACT_SUBMIT);
70
71
$GLOBALS['xoopsTpl']->assign('lng_username_info', _MD_CONTACT_NAME_INFO);
72
$GLOBALS['xoopsTpl']->assign('lng_email_info', _MD_CONTACT_MAIL_INFO);
73
$GLOBALS['xoopsTpl']->assign('lng_url_info', _MD_CONTACT_URL_INFO);
74
$GLOBALS['xoopsTpl']->assign('lng_company_info', _MD_CONTACT_COMPANY_INFO);
75
$GLOBALS['xoopsTpl']->assign('lng_address_info', _MD_CONTACT_ADDRESS_INFO);
76
$GLOBALS['xoopsTpl']->assign('lng_location_info', _MD_CONTACT_LOCATION_INFO);
77
$GLOBALS['xoopsTpl']->assign('lng_phone_info', _MD_CONTACT_PHONE_INFO);
78
$GLOBALS['xoopsTpl']->assign('lng_icq_info', _MD_CONTACT_ICQ_INFO);
79
$GLOBALS['xoopsTpl']->assign('lng_skypename_info', _MD_CONTACT_SKYPE_NAME_INFO);
80
$GLOBALS['xoopsTpl']->assign('lng_subject_info', _MD_CONTACT_SUBJECT_INFO);
81
$GLOBALS['xoopsTpl']->assign('lng_message_info', _MD_CONTACT_MESSAGE_INFO);
82
               
83
include XOOPS_ROOT_PATH . '/footer.php';
84