@@ -101,7 +101,7 @@ |
||
| 101 | 101 | webmaster |
| 102 | 102 | {X_ADMINMAIL} |
| 103 | 103 | EOT; |
| 104 | - $this->create($moduleDirname, 'language/' . $GLOBALS['xoopsConfig']['language'] . '/mail_template', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED); |
|
| 104 | + $this->create($moduleDirname, 'language/'.$GLOBALS['xoopsConfig']['language'].'/mail_template', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED); |
|
| 105 | 105 | |
| 106 | 106 | return $this->renderFile(); |
| 107 | 107 | } |
@@ -41,16 +41,16 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | public function render() |
| 43 | 43 | { |
| 44 | - $ret = ($this->getTitle() ? '<div class=" center head ">' . $this->getTitle() . '</div>' : ''); |
|
| 45 | - $ret .= '<form name="' . $this->getName() . '" id="' . $this->getName() . '" action="' . $this->getAction() . '" method="' . $this->getMethod() . '"' . $this->getExtra() . '>' . NWLINE; |
|
| 44 | + $ret = ($this->getTitle() ? '<div class=" center head ">'.$this->getTitle().'</div>' : ''); |
|
| 45 | + $ret .= '<form name="'.$this->getName().'" id="'.$this->getName().'" action="'.$this->getAction().'" method="'.$this->getMethod().'"'.$this->getExtra().'>'.NWLINE; |
|
| 46 | 46 | foreach ($this->getElements() as $ele) { |
| 47 | 47 | if (!$ele->isHidden()) { |
| 48 | - $ret .= '<div class="' . $ele->getClass() . '"><strong>' . $ele->getCaption() . '</strong>' . $ele->render() . '</div>' . NWLINE; |
|
| 48 | + $ret .= '<div class="'.$ele->getClass().'"><strong>'.$ele->getCaption().'</strong>'.$ele->render().'</div>'.NWLINE; |
|
| 49 | 49 | } else { |
| 50 | 50 | $ret .= $ele->render(); |
| 51 | 51 | } |
| 52 | 52 | } |
| 53 | - $ret .= NWLINE . '</form>'; |
|
| 53 | + $ret .= NWLINE.'</form>'; |
|
| 54 | 54 | |
| 55 | 55 | return $ret; |
| 56 | 56 | } |
@@ -51,11 +51,11 @@ discard block |
||
| 51 | 51 | } |
| 52 | 52 | $ret .= '<td class="radio">'; |
| 53 | 53 | } |
| 54 | - $ret .= '<input type="radio" name="' . $ele_name . '" id="' . $ele_name . '[' . $value . ']' . $id_ele . '" title = "' . htmlspecialchars($ele_title, ENT_QUOTES) . '" value="' . htmlspecialchars($value, ENT_QUOTES) . '"'; |
|
| 54 | + $ret .= '<input type="radio" name="'.$ele_name.'" id="'.$ele_name.'['.$value.']'.$id_ele.'" title = "'.htmlspecialchars($ele_title, ENT_QUOTES).'" value="'.htmlspecialchars($value, ENT_QUOTES).'"'; |
|
| 55 | 55 | if (isset($ele_value) && $value == $ele_value) { |
| 56 | 56 | $ret .= ' checked'; |
| 57 | 57 | } |
| 58 | - $ret .= $ele_extra . ' />' . "<label name='xolb_{$ele_name}' for='" . $ele_name . '[' . $value . ']' . $id_ele . "'><span><span></span></span>" . $name . '</label>' . $ele_delimeter; |
|
| 58 | + $ret .= $ele_extra.' />'."<label name='xolb_{$ele_name}' for='".$ele_name.'['.$value.']'.$id_ele."'><span><span></span></span>".$name.'</label>'.$ele_delimeter; |
|
| 59 | 59 | if (!empty($this->columns)) { |
| 60 | 60 | $ret .= '</td>'; |
| 61 | 61 | if (0 == ++$i % $this->columns) { |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | if (!empty($this->columns)) { |
| 67 | 67 | $span = $i % $this->columns; |
| 68 | 68 | if ($span) { |
| 69 | - $ret .= '<td colspan="' . ($this->columns - $span) . '"></td></tr>'; |
|
| 69 | + $ret .= '<td colspan="'.($this->columns - $span).'"></td></tr>'; |
|
| 70 | 70 | } |
| 71 | 71 | $ret .= '</table>'; |
| 72 | 72 | } |
@@ -4,12 +4,12 @@ discard block |
||
| 4 | 4 | * @see http://www.php-fig.org/psr/psr-4/examples/ |
| 5 | 5 | */ |
| 6 | 6 | spl_autoload_register( |
| 7 | - static function ($class) { |
|
| 7 | + static function($class) { |
|
| 8 | 8 | // project-specific namespace prefix |
| 9 | - $prefix = 'XoopsModules\\' . ucfirst(basename(dirname(__DIR__))); |
|
| 9 | + $prefix = 'XoopsModules\\'.ucfirst(basename(dirname(__DIR__))); |
|
| 10 | 10 | |
| 11 | 11 | // base directory for the namespace prefix |
| 12 | - $baseDir = __DIR__ . '/../class/'; |
|
| 12 | + $baseDir = __DIR__.'/../class/'; |
|
| 13 | 13 | |
| 14 | 14 | // does the class use the namespace prefix? |
| 15 | 15 | $len = mb_strlen($prefix); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | // replace the namespace prefix with the base directory, replace namespace |
| 25 | 25 | // separators with directory separators in the relative class name, append |
| 26 | 26 | // with .php |
| 27 | - $file = $baseDir . str_replace('\\', '/', $relativeClass) . '.php'; |
|
| 27 | + $file = $baseDir.str_replace('\\', '/', $relativeClass).'.php'; |
|
| 28 | 28 | |
| 29 | 29 | // if the file exists, require it |
| 30 | 30 | if (file_exists($file)) { |
@@ -25,16 +25,16 @@ discard block |
||
| 25 | 25 | */ |
| 26 | 26 | $GLOBALS['xoopsOption']['template_main'] = 'tdmcreate_building.tpl'; |
| 27 | 27 | |
| 28 | -include __DIR__ . '/header.php'; |
|
| 28 | +include __DIR__.'/header.php'; |
|
| 29 | 29 | $op = \Xmf\Request::getString('op', 'default'); |
| 30 | 30 | $mid = \Xmf\Request::getInt('mod_id'); |
| 31 | 31 | $moduleObj = $helper->getHandler('Modules')->get($mid); |
| 32 | -$cachePath = XOOPS_VAR_PATH . '/caches/tdmcreate_cache'; |
|
| 32 | +$cachePath = XOOPS_VAR_PATH.'/caches/tdmcreate_cache'; |
|
| 33 | 33 | // Clear cache |
| 34 | -if (file_exists($cache = $cachePath . '/classpaths.cache')) { |
|
| 34 | +if (file_exists($cache = $cachePath.'/classpaths.cache')) { |
|
| 35 | 35 | unlink($cache); |
| 36 | 36 | } |
| 37 | -if (!file_exists($indexFile = $cachePath . '/index.html')) { |
|
| 37 | +if (!file_exists($indexFile = $cachePath.'/index.html')) { |
|
| 38 | 38 | copy('index.html', $indexFile); |
| 39 | 39 | } |
| 40 | 40 | // Switch option |
@@ -45,8 +45,8 @@ discard block |
||
| 45 | 45 | // Get var module dirname |
| 46 | 46 | $moduleDirname = $moduleObj->getVar('mod_dirname'); |
| 47 | 47 | // Directories for copy from to |
| 48 | - $fromDir = TDMC_UPLOAD_REPOSITORY_PATH . '/' . mb_strtolower($moduleDirname); |
|
| 49 | - $toDir = XOOPS_ROOT_PATH . '/modules/' . mb_strtolower($moduleDirname); |
|
| 48 | + $fromDir = TDMC_UPLOAD_REPOSITORY_PATH.'/'.mb_strtolower($moduleDirname); |
|
| 49 | + $toDir = XOOPS_ROOT_PATH.'/modules/'.mb_strtolower($moduleDirname); |
|
| 50 | 50 | // include_once TDMC_CLASS_PATH . '/building.php'; |
| 51 | 51 | if (isset($moduleDirname)) { |
| 52 | 52 | // Clear this module if it's in repository |
@@ -108,4 +108,4 @@ discard block |
||
| 108 | 108 | $GLOBALS['xoopsTpl']->assign('form', $form->render()); |
| 109 | 109 | break; |
| 110 | 110 | } |
| 111 | -include __DIR__ . '/footer.php'; |
|
| 111 | +include __DIR__.'/footer.php'; |
|
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | use Xmf\Request; |
| 23 | 23 | |
| 24 | -include __DIR__ . '/header.php'; |
|
| 24 | +include __DIR__.'/header.php'; |
|
| 25 | 25 | |
| 26 | 26 | $adminObject = \Xmf\Module\Admin::getInstance(); |
| 27 | 27 | |
@@ -60,12 +60,12 @@ discard block |
||
| 60 | 60 | $fb_content = Request::getText('fb_content', ''); |
| 61 | 61 | $fb_content = str_replace(["\r\n", "\n", "\r"], '<br>', $fb_content); //clean line break from dhtmltextarea |
| 62 | 62 | |
| 63 | - $title = constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SEND_FOR') . $GLOBALS['xoopsModule']->getVar('dirname'); |
|
| 64 | - $body = constant('CO_' . $moduleDirNameUpper . '_' . 'FB_NAME') . ': ' . $your_name . '<br>'; |
|
| 65 | - $body .= constant('CO_' . $moduleDirNameUpper . '_' . 'FB_MAIL') . ': ' . $your_mail . '<br>'; |
|
| 66 | - $body .= constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SITE') . ': ' . $your_site . '<br>'; |
|
| 67 | - $body .= constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE') . ': ' . $fb_type . '<br><br>'; |
|
| 68 | - $body .= constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_CONTENT') . ':<br>'; |
|
| 63 | + $title = constant('CO_'.$moduleDirNameUpper.'_'.'FB_SEND_FOR').$GLOBALS['xoopsModule']->getVar('dirname'); |
|
| 64 | + $body = constant('CO_'.$moduleDirNameUpper.'_'.'FB_NAME').': '.$your_name.'<br>'; |
|
| 65 | + $body .= constant('CO_'.$moduleDirNameUpper.'_'.'FB_MAIL').': '.$your_mail.'<br>'; |
|
| 66 | + $body .= constant('CO_'.$moduleDirNameUpper.'_'.'FB_SITE').': '.$your_site.'<br>'; |
|
| 67 | + $body .= constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE').': '.$fb_type.'<br><br>'; |
|
| 68 | + $body .= constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_CONTENT').':<br>'; |
|
| 69 | 69 | $body .= $fb_content; |
| 70 | 70 | $xoopsMailer = xoops_getMailer(); |
| 71 | 71 | $xoopsMailer->useMail(); |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | $xoopsMailer->setBody($body); |
| 78 | 78 | $ret = $xoopsMailer->send(); |
| 79 | 79 | if ($ret) { |
| 80 | - redirect_header('index.php', 3, constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SEND_SUCCESS')); |
|
| 80 | + redirect_header('index.php', 3, constant('CO_'.$moduleDirNameUpper.'_'.'FB_SEND_SUCCESS')); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | // show form with content again |
@@ -87,11 +87,11 @@ discard block |
||
| 87 | 87 | $feedback->type = $fb_type; |
| 88 | 88 | $feedback->content = $fb_content; |
| 89 | 89 | echo '<div align="center" style="width: 80%; padding: 10px; border: 2px solid #ff0000; color: #ff0000; margin-right:auto;margin-left:auto;"> |
| 90 | - <h3>' . constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SEND_ERROR') . '</h3> |
|
| 90 | + <h3>' . constant('CO_'.$moduleDirNameUpper.'_'.'FB_SEND_ERROR').'</h3> |
|
| 91 | 91 | </div>'; |
| 92 | 92 | $form = $feedback->getFormFeedback(); |
| 93 | 93 | $form->display(); |
| 94 | 94 | |
| 95 | 95 | break; |
| 96 | 96 | } |
| 97 | -require __DIR__ . '/footer.php'; |
|
| 97 | +require __DIR__.'/footer.php'; |
|
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | $GLOBALS['xoopsOption']['template_main'] = 'tdmcreate_modules.tpl'; |
| 26 | 26 | |
| 27 | -include __DIR__ . '/header.php'; |
|
| 27 | +include __DIR__.'/header.php'; |
|
| 28 | 28 | // Recovered value of argument op in the URL $ |
| 29 | 29 | $op = \Xmf\Request::getString('op', 'list'); |
| 30 | 30 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | $GLOBALS['xoopsTpl']->assign('buttons', $adminObject->displayButton('left')); |
| 45 | 45 | $GLOBALS['xoopsTpl']->assign('tdmc_url', TDMC_URL); |
| 46 | 46 | $GLOBALS['xoopsTpl']->assign('tdmc_upload_imgmod_url', TDMC_UPLOAD_IMGMOD_URL); |
| 47 | - $GLOBALS['xoopsTpl']->assign('modPathIcon16', TDMC_URL . '/' . $modPathIcon16); |
|
| 47 | + $GLOBALS['xoopsTpl']->assign('modPathIcon16', TDMC_URL.'/'.$modPathIcon16); |
|
| 48 | 48 | $modulesCount = $helper->getHandler('Modules')->getCountModules(); |
| 49 | 49 | $modulesAll = $helper->getHandler('Modules')->getAllModules($start, $limit); |
| 50 | 50 | // Redirect if there aren't modules |
@@ -59,8 +59,8 @@ discard block |
||
| 59 | 59 | unset($module); |
| 60 | 60 | } |
| 61 | 61 | if ($modulesCount > $limit) { |
| 62 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 63 | - $pagenav = new \XoopsPageNav($modulesCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
| 62 | + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
| 63 | + $pagenav = new \XoopsPageNav($modulesCount, $limit, $start, 'start', 'op=list&limit='.$limit); |
|
| 64 | 64 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
| 65 | 65 | } |
| 66 | 66 | } else { |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | ] |
| 115 | 115 | ); |
| 116 | 116 | //Form mod_image |
| 117 | - include_once XOOPS_ROOT_PATH . '/class/uploader.php'; |
|
| 117 | + include_once XOOPS_ROOT_PATH.'/class/uploader.php'; |
|
| 118 | 118 | $uploader = new \XoopsMediaUploader( |
| 119 | 119 | TDMC_UPLOAD_IMGMOD_PATH, $helper->getConfig('mimetypes'), $helper->getConfig('maxsize'), null, null |
| 120 | 120 | ); |
@@ -200,9 +200,9 @@ discard block |
||
| 200 | 200 | if ($id > 0) { |
| 201 | 201 | $modulesObj = $helper->getHandler('Modules')->get($id); |
| 202 | 202 | foreach ($modFieldArray as $moduleField) { |
| 203 | - if (isset($_POST['mod_' . $moduleField])) { |
|
| 204 | - $modField = $modulesObj->getVar('mod_' . $moduleField); |
|
| 205 | - $modulesObj->setVar('mod_' . $moduleField, !$modField); |
|
| 203 | + if (isset($_POST['mod_'.$moduleField])) { |
|
| 204 | + $modField = $modulesObj->getVar('mod_'.$moduleField); |
|
| 205 | + $modulesObj->setVar('mod_'.$moduleField, !$modField); |
|
| 206 | 206 | } |
| 207 | 207 | } |
| 208 | 208 | if ($helper->getHandler('Modules')->insert($modulesObj)) { |
@@ -213,4 +213,4 @@ discard block |
||
| 213 | 213 | break; |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | -include __DIR__ . '/footer.php'; |
|
| 216 | +include __DIR__.'/footer.php'; |
|
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | $GLOBALS['xoopsOption']['template_main'] = 'tdmcreate_settings.tpl'; |
| 26 | 26 | |
| 27 | -include __DIR__ . '/header.php'; |
|
| 27 | +include __DIR__.'/header.php'; |
|
| 28 | 28 | |
| 29 | 29 | // Recovered value of argument op in the URL $ |
| 30 | 30 | $op = \Xmf\Request::getString('op', 'list'); |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | $GLOBALS['xoopsTpl']->assign('buttons', $adminObject->displayButton('left')); |
| 46 | 46 | $GLOBALS['xoopsTpl']->assign('tdmc_upload_imgmod_url', TDMC_UPLOAD_IMGMOD_URL); |
| 47 | 47 | $GLOBALS['xoopsTpl']->assign('tdmc_url', TDMC_URL); |
| 48 | - $GLOBALS['xoopsTpl']->assign('modPathIcon16', TDMC_URL . '/' . $modPathIcon16); |
|
| 48 | + $GLOBALS['xoopsTpl']->assign('modPathIcon16', TDMC_URL.'/'.$modPathIcon16); |
|
| 49 | 49 | $GLOBALS['xoopsTpl']->assign('sysPathIcon32', $sysPathIcon32); |
| 50 | 50 | $settingsCount = $helper->getHandler('Settings')->getCountSettings(); |
| 51 | 51 | $settingsAll = $helper->getHandler('Settings')->getAllSettings($start, $limit); |
@@ -57,8 +57,8 @@ discard block |
||
| 57 | 57 | unset($setting); |
| 58 | 58 | } |
| 59 | 59 | if ($settingsCount > $limit) { |
| 60 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 61 | - $pagenav = new \XoopsPageNav($settingsCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
| 60 | + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
| 61 | + $pagenav = new \XoopsPageNav($settingsCount, $limit, $start, 'start', 'op=list&limit='.$limit); |
|
| 62 | 62 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
| 63 | 63 | } |
| 64 | 64 | } else { |
@@ -187,4 +187,4 @@ discard block |
||
| 187 | 187 | } |
| 188 | 188 | break; |
| 189 | 189 | } |
| 190 | -include __DIR__ . '/footer.php'; |
|
| 190 | +include __DIR__.'/footer.php'; |
|
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | $GLOBALS['xoopsOption']['template_main'] = 'tdmcreate_index.tpl'; |
| 26 | 26 | |
| 27 | -include __DIR__ . '/header.php'; |
|
| 27 | +include __DIR__.'/header.php'; |
|
| 28 | 28 | $countSettings = $helper->getHandler('Settings')->getCount(); |
| 29 | 29 | $countModules = $helper->getHandler('Modules')->getCount(); |
| 30 | 30 | $countTables = $helper->getHandler('Tables')->getCount(); |
@@ -34,11 +34,11 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | //$templateMain = 'tdmcreate_index.tpl'; |
| 36 | 36 | $adminObject->addInfoBox(_AM_TDMCREATE_ADMIN_NUMMODULES); |
| 37 | -$adminObject->addInfoBoxLine(sprintf('<label>' . _AM_TDMCREATE_THEREARE_NUMSETTINGS . '</label>', $countSettings), 'Blue'); |
|
| 38 | -$adminObject->addInfoBoxLine(sprintf('<label>' . _AM_TDMCREATE_THEREARE_NUMMODULES . '</label>', $countModules), 'Green'); |
|
| 39 | -$adminObject->addInfoBoxLine(sprintf('<label>' . _AM_TDMCREATE_THEREARE_NUMTABLES . '</label>', $countTables), 'Orange'); |
|
| 40 | -$adminObject->addInfoBoxLine(sprintf('<label>' . _AM_TDMCREATE_THEREARE_NUMFIELDS . '</label>', $countFields), 'Gray'); |
|
| 41 | -$adminObject->addInfoBoxLine(sprintf('<label>' . _AM_TDMCREATE_THEREARE_NUMFILES . '</label>', $countFiles), 'Red'); |
|
| 37 | +$adminObject->addInfoBoxLine(sprintf('<label>'._AM_TDMCREATE_THEREARE_NUMSETTINGS.'</label>', $countSettings), 'Blue'); |
|
| 38 | +$adminObject->addInfoBoxLine(sprintf('<label>'._AM_TDMCREATE_THEREARE_NUMMODULES.'</label>', $countModules), 'Green'); |
|
| 39 | +$adminObject->addInfoBoxLine(sprintf('<label>'._AM_TDMCREATE_THEREARE_NUMTABLES.'</label>', $countTables), 'Orange'); |
|
| 40 | +$adminObject->addInfoBoxLine(sprintf('<label>'._AM_TDMCREATE_THEREARE_NUMFIELDS.'</label>', $countFields), 'Gray'); |
|
| 41 | +$adminObject->addInfoBoxLine(sprintf('<label>'._AM_TDMCREATE_THEREARE_NUMFILES.'</label>', $countFiles), 'Red'); |
|
| 42 | 42 | // Upload Folders |
| 43 | 43 | $folder = [ |
| 44 | 44 | TDMC_UPLOAD_PATH, |
@@ -56,4 +56,4 @@ discard block |
||
| 56 | 56 | $GLOBALS['xoopsTpl']->assign('navigation', $adminObject->displayNavigation('index.php')); |
| 57 | 57 | $GLOBALS['xoopsTpl']->assign('index', $adminObject->displayIndex()); |
| 58 | 58 | |
| 59 | -include __DIR__ . '/footer.php'; |
|
| 59 | +include __DIR__.'/footer.php'; |
|