@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | /** |
57 | 57 | * ContactHelper constructor. |
58 | - * @param $debug |
|
58 | + * @param boolean $debug |
|
59 | 59 | */ |
60 | 60 | protected function __construct($debug) |
61 | 61 | { |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | /** |
125 | 125 | * @param null $name |
126 | 126 | * @param null $value |
127 | - * @return mixed |
|
127 | + * @return string |
|
128 | 128 | */ |
129 | 129 | public function setConfig($name = null, $value = null) |
130 | 130 | { |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | */ |
142 | 142 | /** |
143 | 143 | * @param $name |
144 | - * @return mixed |
|
144 | + * @return string |
|
145 | 145 | */ |
146 | 146 | public function &getHandler($name) |
147 | 147 | { |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | protected function __construct($debug) |
61 | 61 | { |
62 | 62 | $this->debug = $debug; |
63 | - $this->dirname = basename(dirname(__DIR__)); |
|
63 | + $this->dirname = basename(dirname(__DIR__)); |
|
64 | 64 | } |
65 | 65 | /* |
66 | 66 | * @static function &getInstance |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $this->addLog("ERROR :: CONFIG '{$name}' does not exist"); |
114 | 114 | return null; |
115 | 115 | } |
116 | - $this->addLog("Getting config '{$name}' : " . $this->config[$name]); |
|
116 | + $this->addLog("Getting config '{$name}' : ".$this->config[$name]); |
|
117 | 117 | return $this->config[$name]; |
118 | 118 | } |
119 | 119 | /* |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $this->initConfig(); |
133 | 133 | } |
134 | 134 | $this->config[$name] = $value; |
135 | - $this->addLog("Setting config '{$name}' : " . $this->config[$name]); |
|
135 | + $this->addLog("Setting config '{$name}' : ".$this->config[$name]); |
|
136 | 136 | return $this->config[$name]; |
137 | 137 | } |
138 | 138 | /* |
@@ -145,11 +145,11 @@ discard block |
||
145 | 145 | */ |
146 | 146 | public function &getHandler($name) |
147 | 147 | { |
148 | - if (!isset($this->handler[$name . 'Handler'])) { |
|
148 | + if (!isset($this->handler[$name.'Handler'])) { |
|
149 | 149 | $this->initHandler($name); |
150 | 150 | } |
151 | 151 | $this->addLog("Getting handler '{$name}'"); |
152 | - return $this->handler[$name . 'Handler']; |
|
152 | + return $this->handler[$name.'Handler']; |
|
153 | 153 | } |
154 | 154 | /* |
155 | 155 | * @static function initModule |
@@ -187,8 +187,8 @@ discard block |
||
187 | 187 | */ |
188 | 188 | public function initHandler($name) |
189 | 189 | { |
190 | - $this->addLog('INIT ' . $name . ' HANDLER'); |
|
191 | - $this->handler[$name . 'Handler'] = xoops_getModuleHandler($name, $this->dirname); |
|
190 | + $this->addLog('INIT '.$name.' HANDLER'); |
|
191 | + $this->handler[$name.'Handler'] = xoops_getModuleHandler($name, $this->dirname); |
|
192 | 192 | } |
193 | 193 | /* |
194 | 194 | * @static function addLog |
@@ -19,10 +19,10 @@ discard block |
||
19 | 19 | * @author Hossein Azizabadi (AKA Voltan) |
20 | 20 | * @author Mirza (AKA Bleekk) |
21 | 21 | */ |
22 | -include __DIR__ . '/header.php'; |
|
22 | +include __DIR__.'/header.php'; |
|
23 | 23 | $GLOBALS['xoopsOption']['template_main'] = 'contact_index.tpl'; |
24 | 24 | //unset($_SESSION); |
25 | -include XOOPS_ROOT_PATH . '/header.php'; |
|
25 | +include XOOPS_ROOT_PATH.'/header.php'; |
|
26 | 26 | |
27 | 27 | /** reCaptcha by google **/ |
28 | 28 | global $xoopsConfig, $xoopsModuleConfig; |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | if (!$captcha && $xoopsModuleConfig['recaptchause']) { |
36 | 36 | redirect_header('index.php', 2, _MD_CONTACT_MES_NOCAPTCHA); |
37 | 37 | } else { |
38 | - $response=file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=' . $xoopsModuleConfig['recaptchakey'] . '&response=' . $captcha . '&remoteip=' . $_SERVER['REMOTE_ADDR']); |
|
38 | + $response = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret='.$xoopsModuleConfig['recaptchakey'].'&response='.$captcha.'&remoteip='.$_SERVER['REMOTE_ADDR']); |
|
39 | 39 | if ($response.success === false && $xoopsModuleConfig['recaptchause']) { |
40 | 40 | redirect_header('index.php', 2, _MD_CONTACT_MES_CAPTCHAINCORRECT); |
41 | 41 | } else { |
@@ -43,11 +43,11 @@ discard block |
||
43 | 43 | $op = XoopsRequest::getString('op', 'form', 'POST'); |
44 | 44 | $department = XoopsRequest::getString('department', '', 'GET'); |
45 | 45 | if ($op === 'save') { |
46 | - if (''== XoopsRequest::getString('submit', '', 'POST')) { |
|
46 | + if ('' == XoopsRequest::getString('submit', '', 'POST')) { |
|
47 | 47 | redirect_header(XOOPS_URL, 3, _MD_CONTACT_MES_ERROR); |
48 | 48 | } else { |
49 | 49 | // check email |
50 | - if (''== XoopsRequest::getString('contact_mail', '', 'POST')) { |
|
50 | + if ('' == XoopsRequest::getString('contact_mail', '', 'POST')) { |
|
51 | 51 | redirect_header('index.php', 1, _MD_CONTACT_MES_NOVALIDEMAIL); |
52 | 52 | } |
53 | 53 | |
@@ -82,4 +82,4 @@ discard block |
||
82 | 82 | } |
83 | 83 | |
84 | 84 | |
85 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
85 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -27,7 +27,7 @@ |
||
27 | 27 | define('CONTACT_UPLOAD_URL', XOOPS_UPLOAD_URL.'/'.CONTACT_DIRNAME); |
28 | 28 | define('CONTACT_IMAGE_PATH', CONTACT_PATH.'/assets/images'); |
29 | 29 | define('CONTACT_IMAGE_URL', CONTACT_URL.'/assets/images/'); |
30 | - define('CONTACT_ADMIN', CONTACT_URL . '/admin/index.php'); |
|
30 | + define('CONTACT_ADMIN', CONTACT_URL.'/admin/index.php'); |
|
31 | 31 | } |
32 | 32 | // module information |
33 | 33 | $copyright = "<a href='http://xoops.wedega.com' title='WEDEGA Webdesign Gabor' target='_blank'> |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $xoopsDB = XoopsDatabaseFactory::getDatabaseConnection(); |
27 | 27 | |
28 | 28 | if ($version < 180) { |
29 | - $sql = 'CREATE TABLE ' . $xoopsDB->prefix('contact') . ' ( |
|
29 | + $sql = 'CREATE TABLE '.$xoopsDB->prefix('contact').' ( |
|
30 | 30 | contact_id int(10) unsigned NOT NULL auto_increment, |
31 | 31 | contact_uid int(10) NOT NULL, |
32 | 32 | contact_cid int(10) NOT NULL, |
@@ -51,31 +51,31 @@ discard block |
||
51 | 51 | |
52 | 52 | if ($version < 181) { |
53 | 53 | // Add contact_platform |
54 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . "` ADD `contact_platform` ENUM('Android','Ios','Web') NOT NULL DEFAULT 'Web'"; |
|
54 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact')."` ADD `contact_platform` ENUM('Android','Ios','Web') NOT NULL DEFAULT 'Web'"; |
|
55 | 55 | $xoopsDB->query($sql); |
56 | 56 | // Add contact_type |
57 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . "` ADD `contact_type` ENUM('Contact','Phone','Mail') NOT NULL DEFAULT 'Contact'"; |
|
57 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact')."` ADD `contact_type` ENUM('Contact','Phone','Mail') NOT NULL DEFAULT 'Contact'"; |
|
58 | 58 | $xoopsDB->query($sql); |
59 | 59 | // Add index contact_uid |
60 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_uid` ( `contact_uid` )'; |
|
60 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_uid` ( `contact_uid` )'; |
|
61 | 61 | $xoopsDB->query($sql); |
62 | 62 | // Add index contact_cid |
63 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_cid` ( `contact_cid` )'; |
|
63 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_cid` ( `contact_cid` )'; |
|
64 | 64 | $xoopsDB->query($sql); |
65 | 65 | // Add index contact_create |
66 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_create` ( `contact_create` )'; |
|
66 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_create` ( `contact_create` )'; |
|
67 | 67 | $xoopsDB->query($sql); |
68 | 68 | // Add index contact_mail |
69 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_mail` ( `contact_mail` )'; |
|
69 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_mail` ( `contact_mail` )'; |
|
70 | 70 | $xoopsDB->query($sql); |
71 | 71 | // Add index contact_phone |
72 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_phone` ( `contact_phone` )'; |
|
72 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_phone` ( `contact_phone` )'; |
|
73 | 73 | $xoopsDB->query($sql); |
74 | 74 | // Add index contact_platform |
75 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_platform` ( `contact_platform` )'; |
|
75 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_platform` ( `contact_platform` )'; |
|
76 | 76 | $xoopsDB->query($sql); |
77 | 77 | // Add index contact_type |
78 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_type` ( `contact_type` )'; |
|
78 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_type` ( `contact_type` )'; |
|
79 | 79 | $xoopsDB->query($sql); |
80 | 80 | } |
81 | 81 | } |
@@ -21,11 +21,11 @@ discard block |
||
21 | 21 | |
22 | 22 | $path = dirname(dirname(dirname(__DIR__))); |
23 | 23 | |
24 | -include_once $path . '/mainfile.php'; |
|
25 | -include_once XOOPS_ROOT_PATH . '/include/cp_functions.php'; |
|
26 | -include_once XOOPS_ROOT_PATH . '/include/cp_header.php'; |
|
27 | -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
28 | -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
24 | +include_once $path.'/mainfile.php'; |
|
25 | +include_once XOOPS_ROOT_PATH.'/include/cp_functions.php'; |
|
26 | +include_once XOOPS_ROOT_PATH.'/include/cp_header.php'; |
|
27 | +include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
28 | +include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
29 | 29 | global $xoopsModule; |
30 | 30 | |
31 | 31 | xoops_load('XoopsRequest'); |
@@ -37,10 +37,10 @@ discard block |
||
37 | 37 | xoops_loadLanguage('modinfo', $moduleDirName); |
38 | 38 | xoops_loadLanguage('main', $moduleDirName); |
39 | 39 | |
40 | -$pathIcon16 = XOOPS_URL . '/' . $xoopsModule->getInfo('icons16'); |
|
41 | -$pathIcon32 = XOOPS_URL . '/' . $xoopsModule->getInfo('icons32'); |
|
42 | -$pathModuleAdmin = XOOPS_ROOT_PATH . '/' . $xoopsModule->getInfo('dirmoduleadmin'); |
|
43 | -require_once $pathModuleAdmin . '/moduleadmin/moduleadmin.php'; |
|
40 | +$pathIcon16 = XOOPS_URL.'/'.$xoopsModule->getInfo('icons16'); |
|
41 | +$pathIcon32 = XOOPS_URL.'/'.$xoopsModule->getInfo('icons32'); |
|
42 | +$pathModuleAdmin = XOOPS_ROOT_PATH.'/'.$xoopsModule->getInfo('dirmoduleadmin'); |
|
43 | +require_once $pathModuleAdmin.'/moduleadmin/moduleadmin.php'; |
|
44 | 44 | |
45 | 45 | $adminObject = new ModuleAdmin(); |
46 | 46 |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | |
22 | 22 | // Call header |
23 | -require __DIR__ . '/admin_header.php'; |
|
23 | +require __DIR__.'/admin_header.php'; |
|
24 | 24 | // Display Admin header |
25 | 25 | xoops_cp_header(); |
26 | 26 | // Define default value |
@@ -31,11 +31,11 @@ discard block |
||
31 | 31 | // Define scripts |
32 | 32 | $GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/jquery.js'); |
33 | 33 | $GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js'); |
34 | -$GLOBALS['xoTheme']->addScript(XOOPS_URL . '/modules/contact/assets/js/admin.js'); |
|
34 | +$GLOBALS['xoTheme']->addScript(XOOPS_URL.'/modules/contact/assets/js/admin.js'); |
|
35 | 35 | // Add module stylesheet |
36 | -$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . '/modules/contact/assets/css/admin.css'); |
|
37 | -$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . '/modules/system/css/ui/' . xoops_getModuleOption('jquery_theme', 'system') . '/ui.all.css'); |
|
38 | -$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . '/modules/system/css/admin.css'); |
|
36 | +$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL.'/modules/contact/assets/css/admin.css'); |
|
37 | +$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL.'/modules/system/css/ui/'.xoops_getModuleOption('jquery_theme', 'system').'/ui.all.css'); |
|
38 | +$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL.'/modules/system/css/admin.css'); |
|
39 | 39 | |
40 | 40 | switch ($op) { |
41 | 41 | case 'list': |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $contacts = $contactHandler->contactGetAdminList($contact, 'contact_cid'); |
56 | 56 | |
57 | 57 | if ($contact_numrows > $contact['limit']) { |
58 | - $contact_pagenav = new XoopsPageNav($contact_numrows, $contact['limit'], $contact['start'], 'start', 'limit=' . $contact['limit']); |
|
58 | + $contact_pagenav = new XoopsPageNav($contact_numrows, $contact['limit'], $contact['start'], 'start', 'limit='.$contact['limit']); |
|
59 | 59 | $contact_pagenav = $contact_pagenav->renderNav(4); |
60 | 60 | } else { |
61 | 61 | $contact_pagenav = ''; |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | |
86 | 86 | case 'doreply': |
87 | 87 | // check email |
88 | - if (''== XoopsRequest::getString('contact_mailto', '', 'POST')) { |
|
88 | + if ('' == XoopsRequest::getString('contact_mailto', '', 'POST')) { |
|
89 | 89 | redirect_header('main.php', 3, _MD_CONTACT_MES_NOVALIDEMAIL); |
90 | 90 | } |
91 | 91 | |
@@ -188,6 +188,6 @@ discard block |
||
188 | 188 | $GLOBALS['xoopsTpl']->assign('level', $level); |
189 | 189 | |
190 | 190 | // Call template file |
191 | -$GLOBALS['xoopsTpl']->display(XOOPS_ROOT_PATH . '/modules/contact/templates/admin/contact_main.tpl'); |
|
191 | +$GLOBALS['xoopsTpl']->display(XOOPS_ROOT_PATH.'/modules/contact/templates/admin/contact_main.tpl'); |
|
192 | 192 | // Call footer |
193 | -require __DIR__ . '/admin_footer.php'; |
|
193 | +require __DIR__.'/admin_footer.php'; |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | |
22 | 22 | // Call header |
23 | -require __DIR__ . '/admin_header.php'; |
|
23 | +require __DIR__.'/admin_header.php'; |
|
24 | 24 | // Display Admin header |
25 | 25 | xoops_cp_header(); |
26 | 26 | |
@@ -28,6 +28,6 @@ discard block |
||
28 | 28 | $GLOBALS['xoopsTpl']->assign('renderabout', $adminObject->renderAbout('6KJ7RW5DR3VTJ', false)); |
29 | 29 | |
30 | 30 | // Call template file |
31 | -$GLOBALS['xoopsTpl']->display(XOOPS_ROOT_PATH . '/modules/contact/templates/admin/contact_about.tpl'); |
|
31 | +$GLOBALS['xoopsTpl']->display(XOOPS_ROOT_PATH.'/modules/contact/templates/admin/contact_about.tpl'); |
|
32 | 32 | // Call footer |
33 | -require __DIR__ . '/admin_footer.php'; |
|
33 | +require __DIR__.'/admin_footer.php'; |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | |
22 | 22 | // Call header |
23 | -require __DIR__ . '/admin_header.php'; |
|
23 | +require __DIR__.'/admin_header.php'; |
|
24 | 24 | // Display Admin header |
25 | 25 | xoops_cp_header(); |
26 | 26 | |
@@ -31,6 +31,6 @@ discard block |
||
31 | 31 | $GLOBALS['xoopsTpl']->assign('renderindex', $adminObject->renderIndex()); |
32 | 32 | |
33 | 33 | // Call template file |
34 | -$GLOBALS['xoopsTpl']->display(XOOPS_ROOT_PATH . '/modules/contact/templates/admin/contact_index.tpl'); |
|
34 | +$GLOBALS['xoopsTpl']->display(XOOPS_ROOT_PATH.'/modules/contact/templates/admin/contact_index.tpl'); |
|
35 | 35 | // Call footer |
36 | -require __DIR__ . '/admin_footer.php'; |
|
36 | +require __DIR__.'/admin_footer.php'; |
@@ -25,40 +25,40 @@ |
||
25 | 25 | $moduleHandler = xoops_getHandler('module'); |
26 | 26 | /** @var XoopsModule $module */ |
27 | 27 | $module = $moduleHandler->getByDirname(basename(dirname(__DIR__))); |
28 | -$pathIcon32 = '../../' . $module->getInfo('icons32'); |
|
28 | +$pathIcon32 = '../../'.$module->getInfo('icons32'); |
|
29 | 29 | xoops_loadLanguage('modinfo', $module->dirname()); |
30 | 30 | |
31 | 31 | $adminmenu[] = array( |
32 | 32 | 'title' => _MI_CONTACT_MENU_HOME, |
33 | 33 | 'desc' => _MI_CONTACT_MENU_HOME_DESC, |
34 | - 'icon' => $pathIcon32 . '/home.png', |
|
34 | + 'icon' => $pathIcon32.'/home.png', |
|
35 | 35 | 'link' => 'admin/index.php' |
36 | 36 | ); |
37 | 37 | |
38 | 38 | $adminmenu[] = array( |
39 | 39 | 'title' => _MI_CONTACT_MENU_CONTACT, |
40 | 40 | 'desc' => _MI_CONTACT_MENU_CONTACT_DESC, |
41 | - 'icon' => $pathIcon32 . '/content.png', |
|
41 | + 'icon' => $pathIcon32.'/content.png', |
|
42 | 42 | 'link' => 'admin/main.php' |
43 | 43 | ); |
44 | 44 | |
45 | 45 | $adminmenu[] = array( |
46 | 46 | 'title' => _MI_CONTACT_MENU_LOGS, |
47 | 47 | 'desc' => _MI_CONTACT_MENU_LOGS_DESC, |
48 | - 'icon' => $pathIcon32 . '/identity.png', |
|
48 | + 'icon' => $pathIcon32.'/identity.png', |
|
49 | 49 | 'link' => 'admin/log.php' |
50 | 50 | ); |
51 | 51 | |
52 | 52 | $adminmenu[] = array( |
53 | 53 | 'title' => _MI_CONTACT_MENU_TOOLS, |
54 | 54 | 'desc' => _MI_CONTACT_MENU_TOOLS_DESC, |
55 | - 'icon' => $pathIcon32 . '/delete.png', |
|
55 | + 'icon' => $pathIcon32.'/delete.png', |
|
56 | 56 | 'link' => 'admin/tools.php' |
57 | 57 | ); |
58 | 58 | |
59 | 59 | $adminmenu[] = array( |
60 | 60 | 'title' => _MI_CONTACT_MENU_ABOUT, |
61 | 61 | 'desc' => _MI_CONTACT_MENU_ABOUT_DESC, |
62 | - 'icon' => $pathIcon32 . '/about.png', |
|
62 | + 'icon' => $pathIcon32.'/about.png', |
|
63 | 63 | 'link' => 'admin/about.php' |
64 | 64 | ); |