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 XOOPS Project (https://xoops.org) |
||||
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 | |||||
23 | use XoopsModules\Contact; |
||||
24 | |||||
25 | require_once \dirname(__DIR__, 2) . '/mainfile.php'; |
||||
26 | require_once __DIR__ . '/header.php'; |
||||
27 | $GLOBALS['xoopsOption']['template_main'] = 'contact_index.tpl'; |
||||
28 | //unset($_SESSION); |
||||
29 | require XOOPS_ROOT_PATH . '/header.php'; |
||||
30 | $helper = Contact\Helper::getInstance(); |
||||
31 | global $xoopsModuleConfig, $xoopsModule, $xoopsUser; |
||||
32 | |||||
33 | /*Modules Options*/ |
||||
34 | if (1 == $helper->getConfig('form_dept')) { |
||||
35 | // show a drop down with the correct departments listed |
||||
36 | $departmentlist = []; |
||||
37 | $departments = xoops_getModuleOption('contact_dept', 'contact'); |
||||
38 | foreach ($departments as $val) { |
||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||
39 | [$name, $email] = explode(',', $val, 2); //split the name and email |
||||
40 | $departmentlist[] = $name; |
||||
41 | } |
||||
42 | $GLOBALS['xoopsTpl']->assign('depart', $helper->getConfig('form_dept')); |
||||
43 | $GLOBALS['xoopsTpl']->assign('departments', $departmentlist); |
||||
44 | } |
||||
45 | $GLOBALS['xoopsTpl']->assign('recaptcha', $helper->getConfig('recaptchause')); |
||||
46 | $GLOBALS['xoopsTpl']->assign('recaptchakey', $helper->getConfig('recaptchakey')); |
||||
47 | $GLOBALS['xoopsTpl']->assign('url', $helper->getConfig('form_url')); |
||||
48 | $GLOBALS['xoopsTpl']->assign('icq', $helper->getConfig('form_icq')); |
||||
49 | $GLOBALS['xoopsTpl']->assign('skype', $helper->getConfig('form_skype')); |
||||
50 | $GLOBALS['xoopsTpl']->assign('company', $helper->getConfig('form_company')); |
||||
51 | $GLOBALS['xoopsTpl']->assign('location', $helper->getConfig('form_location')); |
||||
52 | $GLOBALS['xoopsTpl']->assign('phone', $helper->getConfig('form_phone')); |
||||
53 | $GLOBALS['xoopsTpl']->assign('address', $helper->getConfig('form_address')); |
||||
54 | $GLOBALS['xoopsTpl']->assign('map', $helper->getConfig('embed_maps')); |
||||
55 | $GLOBALS['xoopsTpl']->assign('info', xoops_getModuleOption('contact_info', 'contact')); |
||||
56 | $GLOBALS['xoopsTpl']->assign('contact_default', xoops_getModuleOption('contact_default', 'contact')); |
||||
0 ignored issues
–
show
The function
xoops_getModuleOption() has been deprecated.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
57 | |||||
58 | if ($helper->getConfig('show_breadcrumbs')) { |
||||
59 | $GLOBALS['xoopsTpl']->assign('show_breadcrumbs', true); |
||||
60 | $GLOBALS['xoopsTpl']->assign('breadcrumb', '<li><a href="' . XOOPS_URL . '">' . _YOURHOME . '</a></li> <li class="active">' . $xoopsModule->name() . '</li>'); |
||||
61 | } |
||||
62 | /*end Modules options*/ |
||||
63 | |||||
64 | $uid = is_object($xoopsUser) ? $xoopsUser->getVar('uid') : 0; |
||||
65 | $GLOBALS['xoopsTpl']->assign('contact_uid', $uid); |
||||
66 | |||||
67 | /* lang vars, added by goffy */ |
||||
68 | $GLOBALS['xoopsTpl']->assign('lng_username', _MD_CONTACT_NAME); |
||||
69 | $GLOBALS['xoopsTpl']->assign('lng_email', _MD_CONTACT_MAIL); |
||||
70 | $GLOBALS['xoopsTpl']->assign('lng_url', _MD_CONTACT_URL); |
||||
71 | $GLOBALS['xoopsTpl']->assign('lng_company', _MD_CONTACT_COMPANY); |
||||
72 | $GLOBALS['xoopsTpl']->assign('lng_icq', _MD_CONTACT_ICQ_NAME); |
||||
73 | $GLOBALS['xoopsTpl']->assign('lng_address', _MD_CONTACT_ADDRESS); |
||||
74 | $GLOBALS['xoopsTpl']->assign('lng_location', _MD_CONTACT_LOCATION); |
||||
75 | $GLOBALS['xoopsTpl']->assign('lng_phone', _MD_CONTACT_PHONE); |
||||
76 | $GLOBALS['xoopsTpl']->assign('lng_skypename', _MD_CONTACT_SKYPE_NAME); |
||||
77 | $GLOBALS['xoopsTpl']->assign('lng_department', _MD_CONTACT_DEPARTMENT); |
||||
78 | $GLOBALS['xoopsTpl']->assign('lng_subject', _MD_CONTACT_SUBJECT); |
||||
79 | $GLOBALS['xoopsTpl']->assign('lng_message', _MD_CONTACT_MESSAGE); |
||||
80 | $GLOBALS['xoopsTpl']->assign('lng_submit', _MD_CONTACT_SUBMIT); |
||||
81 | |||||
82 | $GLOBALS['xoopsTpl']->assign('lng_username_info', _MD_CONTACT_NAME_INFO); |
||||
83 | $GLOBALS['xoopsTpl']->assign('lng_email_info', _MD_CONTACT_MAIL_INFO); |
||||
84 | $GLOBALS['xoopsTpl']->assign('lng_url_info', _MD_CONTACT_URL_INFO); |
||||
85 | $GLOBALS['xoopsTpl']->assign('lng_company_info', _MD_CONTACT_COMPANY_INFO); |
||||
86 | $GLOBALS['xoopsTpl']->assign('lng_address_info', _MD_CONTACT_ADDRESS_INFO); |
||||
87 | $GLOBALS['xoopsTpl']->assign('lng_location_info', _MD_CONTACT_LOCATION_INFO); |
||||
88 | $GLOBALS['xoopsTpl']->assign('lng_phone_info', _MD_CONTACT_PHONE_INFO); |
||||
89 | $GLOBALS['xoopsTpl']->assign('lng_icq_info', _MD_CONTACT_ICQ_INFO); |
||||
90 | $GLOBALS['xoopsTpl']->assign('lng_skypename_info', _MD_CONTACT_SKYPE_NAME_INFO); |
||||
91 | $GLOBALS['xoopsTpl']->assign('lng_subject_info', _MD_CONTACT_SUBJECT_INFO); |
||||
92 | $GLOBALS['xoopsTpl']->assign('lng_message_info', _MD_CONTACT_MESSAGE_INFO); |
||||
93 | |||||
94 | require XOOPS_ROOT_PATH . '/footer.php'; |
||||
95 |