mambax7 /
contact
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 | * @version $Id: index.php 12285 2014-01-30 11:31:16Z beckmi $ |
||
| 22 | */ |
||
| 23 | include 'header.php'; |
||
| 24 | $xoopsOption['template_main'] = 'contact_index.html'; |
||
| 25 | //unset($_SESSION); |
||
| 26 | include XOOPS_ROOT_PATH . "/header.php"; |
||
| 27 | |||
| 28 | global $xoopsConfig, $xoopsOption, $xoopsTpl, $xoopsUser, $xoopsUserIsAdmin, $xoopsLogger; |
||
|
0 ignored issues
–
show
|
|||
| 29 | |||
| 30 | $department = $contact_handler->Contact_CleanVars($_GET, 'department', '', 'string'); |
||
| 31 | $obj = $contact_handler->create(); |
||
| 32 | |||
| 33 | /*Modules Options*/ |
||
| 34 | if ($xoopsModuleConfig['form_dept'] == 1) { |
||
| 35 | if (xoops_getModuleOption('form_dept', 'contact')) { |
||
| 36 | // show a drop down with the correct departments listed |
||
| 37 | $departmentlist = array(); |
||
| 38 | $departments = xoops_getModuleOption('contact_dept', 'contact'); |
||
| 39 | foreach ($departments as $val) { |
||
| 40 | list($name, $email) = explode(',', $val, 2); //split the name and email |
||
| 41 | array_push($departmentlist, $name); |
||
| 42 | } |
||
| 43 | } |
||
| 44 | $xoopsTpl->assign('depart', $xoopsModuleConfig['form_dept']); |
||
| 45 | $xoopsTpl->assign('departments', $departmentlist); |
||
| 46 | } |
||
| 47 | $xoopsTpl->assign('captcha', $xoopsModuleConfig['useCaptcha']); |
||
| 48 | $xoopsTpl->assign('captchakey', $xoopsModuleConfig['captchaKey']); |
||
| 49 | $xoopsTpl->assign('url', $xoopsModuleConfig['form_url']); |
||
| 50 | $xoopsTpl->assign('icq', $xoopsModuleConfig['form_icq']); |
||
| 51 | $xoopsTpl->assign('skype', $xoopsModuleConfig['form_skype']); |
||
| 52 | $xoopsTpl->assign('company', $xoopsModuleConfig['form_company']); |
||
| 53 | $xoopsTpl->assign('location', $xoopsModuleConfig['form_location']); |
||
| 54 | $xoopsTpl->assign('phone', $xoopsModuleConfig['form_phone']); |
||
| 55 | $xoopsTpl->assign('address', $xoopsModuleConfig['form_address']); |
||
| 56 | |||
| 57 | $xoopsTpl->assign('map', $xoopsModuleConfig['embed_maps']); |
||
| 58 | /*end Modules options*/ |
||
| 59 | $xoopsTpl->assign('breadcrumb', '<li><a href="' . XOOPS_URL . '">' . _YOURHOME . '</a></li> <li class="active">' . $xoopsModule->name().'</li>'); |
||
| 60 | $xoopsTpl->assign('info', xoops_getModuleOption('contact_info', 'contact')); |
||
| 61 | |||
| 62 | /* added by goffy */ |
||
| 63 | $xoopsTpl->assign('lng_username', _MD_CONTACT_NAME); |
||
| 64 | $xoopsTpl->assign('lng_email', _MD_CONTACT_MAIL); |
||
| 65 | $xoopsTpl->assign('lng_url', _MD_CONTACT_URL); |
||
| 66 | $xoopsTpl->assign('lng_company', _MD_CONTACT_COMPANY); |
||
| 67 | $xoopsTpl->assign('lng_icq', _MD_CONTACT_ICQ_NAME); |
||
| 68 | $xoopsTpl->assign('lng_address', _MD_CONTACT_ADDRESS); |
||
| 69 | $xoopsTpl->assign('lng_location', _MD_CONTACT_LOCATION); |
||
| 70 | $xoopsTpl->assign('lng_phone', _MD_CONTACT_PHONE); |
||
| 71 | $xoopsTpl->assign('lng_skypename', _MD_CONTACT_SKYPE_NAME); |
||
| 72 | $xoopsTpl->assign('lng_department', _MD_CONTACT_DEPARTMENT); |
||
| 73 | $xoopsTpl->assign('lng_subject', _MD_CONTACT_SUBJECT); |
||
| 74 | $xoopsTpl->assign('lng_message', _MD_CONTACT_MESSAGE); |
||
| 75 | $xoopsTpl->assign('lng_submit', _MD_CONTACT_SUBMIT); |
||
| 76 | |||
| 77 | $xoopsTpl->assign('lng_username_info', _MD_CONTACT_NAME_INFO); |
||
| 78 | $xoopsTpl->assign('lng_email_info', _MD_CONTACT_MAIL_INFO); |
||
| 79 | $xoopsTpl->assign('lng_url_info', _MD_CONTACT_URL_INFO); |
||
| 80 | $xoopsTpl->assign('lng_company_info', _MD_CONTACT_COMPANY_INFO); |
||
| 81 | $xoopsTpl->assign('lng_address_info', _MD_CONTACT_ADDRESS_INFO); |
||
| 82 | $xoopsTpl->assign('lng_location_info', _MD_CONTACT_LOCATION_INFO); |
||
| 83 | $xoopsTpl->assign('lng_phone_info', _MD_CONTACT_PHONE_INFO); |
||
| 84 | $xoopsTpl->assign('lng_icq_info', _MD_CONTACT_ICQ_INFO); |
||
| 85 | $xoopsTpl->assign('lng_skypename_info', _MD_CONTACT_SKYPE_NAME_INFO); |
||
| 86 | $xoopsTpl->assign('lng_subject_info', _MD_CONTACT_SUBJECT_INFO); |
||
| 87 | $xoopsTpl->assign('lng_message_info', _MD_CONTACT_MESSAGE_INFO); |
||
| 88 | |||
| 89 | include XOOPS_ROOT_PATH . "/footer.php"; |
||
| 90 |
Instead of relying on
globalstate, we recommend one of these alternatives:1. Pass all data via parameters
2. Create a class that maintains your state