@@ -137,17 +137,17 @@ |
||
| 137 | 137 | */ |
| 138 | 138 | public function loadClass($className) |
| 139 | 139 | { |
| 140 | - if (null === $this->_namespace || $this->_namespace . $this->_namespaceSeparator === mb_substr($className, 0, mb_strlen($this->_namespace . $this->_namespaceSeparator))) { |
|
| 140 | + if (null === $this->_namespace || $this->_namespace.$this->_namespaceSeparator === mb_substr($className, 0, mb_strlen($this->_namespace.$this->_namespaceSeparator))) { |
|
| 141 | 141 | $fileName = ''; |
| 142 | 142 | $namespace = ''; |
| 143 | 143 | if (false !== ($lastNsPos = mb_strrpos($className, $this->_namespaceSeparator))) { |
| 144 | 144 | $namespace = mb_substr($className, 0, $lastNsPos); |
| 145 | 145 | $className = mb_substr($className, $lastNsPos + 1); |
| 146 | - $fileName = str_replace($this->_namespaceSeparator, DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR; |
|
| 146 | + $fileName = str_replace($this->_namespaceSeparator, DIRECTORY_SEPARATOR, $namespace).DIRECTORY_SEPARATOR; |
|
| 147 | 147 | } |
| 148 | - $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . $this->_fileExtension; |
|
| 148 | + $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className).$this->_fileExtension; |
|
| 149 | 149 | |
| 150 | - require(null !== $this->_includePath ? $this->_includePath . DIRECTORY_SEPARATOR : '') . $fileName; |
|
| 150 | + require(null !== $this->_includePath ? $this->_includePath.DIRECTORY_SEPARATOR : '').$fileName; |
|
| 151 | 151 | } |
| 152 | 152 | } |
| 153 | 153 | } |
@@ -27,6 +27,6 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | public static function eventCoreIncludeCommonEnd($args) |
| 29 | 29 | { |
| 30 | - include __DIR__ . '/autoloader.php'; |
|
| 30 | + include __DIR__.'/autoloader.php'; |
|
| 31 | 31 | } |
| 32 | 32 | } |
@@ -3,12 +3,12 @@ discard block |
||
| 3 | 3 | /** |
| 4 | 4 | * @see http://www.php-fig.org/psr/psr-4/examples/ |
| 5 | 5 | */ |
| 6 | -spl_autoload_register(static function ($class) { |
|
| 6 | +spl_autoload_register(static function($class) { |
|
| 7 | 7 | // project-specific namespace prefix |
| 8 | - $prefix = 'XoopsModules\\' . ucfirst(basename(dirname(__DIR__))); |
|
| 8 | + $prefix = 'XoopsModules\\'.ucfirst(basename(dirname(__DIR__))); |
|
| 9 | 9 | |
| 10 | 10 | // base directory for the namespace prefix |
| 11 | - $baseDir = __DIR__ . '/../class/'; |
|
| 11 | + $baseDir = __DIR__.'/../class/'; |
|
| 12 | 12 | |
| 13 | 13 | // does the class use the namespace prefix? |
| 14 | 14 | $len = mb_strlen($prefix); |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | // replace the namespace prefix with the base directory, replace namespace |
| 24 | 24 | // separators with directory separators in the relative class name, append |
| 25 | 25 | // with .php |
| 26 | - $file = $baseDir . str_replace('\\', '/', $relativeClass) . '.php'; |
|
| 26 | + $file = $baseDir.str_replace('\\', '/', $relativeClass).'.php'; |
|
| 27 | 27 | |
| 28 | 28 | // if the file exists, require it |
| 29 | 29 | if (file_exists($file)) { |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | $modversion['release_info'] = 'README'; |
| 43 | 43 | $modversion['release_file'] = 'https://github.com/txmodxoops/tdmcreate-1.91/releases'; |
| 44 | 44 | $modversion['manual'] = 'MANUAL'; |
| 45 | -$modversion['manual_file'] = XOOPS_URL . "/modules/{$moduleDirName}/docs/manual.txt"; |
|
| 45 | +$modversion['manual_file'] = XOOPS_URL."/modules/{$moduleDirName}/docs/manual.txt"; |
|
| 46 | 46 | $modversion['image'] = "assets/images/{$moduleDirName}_logo.png"; |
| 47 | 47 | $modversion['dirname'] = $moduleDirName; |
| 48 | 48 | // Frameworks icons |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | // Module icons |
| 53 | 53 | $modversion['modicons16'] = 'assets/images/icons/16'; |
| 54 | 54 | $modversion['modicons32'] = 'assets/images/icons/32'; |
| 55 | -$modversion['targetdir'] = XOOPS_UPLOAD_PATH . "/{$moduleDirName}/repository/"; |
|
| 55 | +$modversion['targetdir'] = XOOPS_UPLOAD_PATH."/{$moduleDirName}/repository/"; |
|
| 56 | 56 | $modversion['module_website_url'] = 'https://github.com/txmodxoops/tdmcreate-1.91'; |
| 57 | 57 | $modversion['module_website_name'] = 'GitHub Txmodx Xoops'; |
| 58 | 58 | $modversion['min_php'] = '5.5'; |
@@ -88,17 +88,17 @@ discard block |
||
| 88 | 88 | $modversion['sqlfile']['mysql'] = 'sql/mysql.sql'; |
| 89 | 89 | // Tables created by sql file (without prefix!) |
| 90 | 90 | $modversion['tables'] = [ |
| 91 | - $moduleDirName . '_' . 'settings', |
|
| 92 | - $moduleDirName . '_' . 'modules', |
|
| 93 | - $moduleDirName . '_' . 'tables', |
|
| 94 | - $moduleDirName . '_' . 'fields', |
|
| 95 | - $moduleDirName . '_' . 'languages', |
|
| 96 | - $moduleDirName . '_' . 'fieldtype', |
|
| 97 | - $moduleDirName . '_' . 'fieldattributes', |
|
| 98 | - $moduleDirName . '_' . 'fieldnull', |
|
| 99 | - $moduleDirName . '_' . 'fieldkey', |
|
| 100 | - $moduleDirName . '_' . 'fieldelements', |
|
| 101 | - $moduleDirName . '_' . 'morefiles', |
|
| 91 | + $moduleDirName.'_'.'settings', |
|
| 92 | + $moduleDirName.'_'.'modules', |
|
| 93 | + $moduleDirName.'_'.'tables', |
|
| 94 | + $moduleDirName.'_'.'fields', |
|
| 95 | + $moduleDirName.'_'.'languages', |
|
| 96 | + $moduleDirName.'_'.'fieldtype', |
|
| 97 | + $moduleDirName.'_'.'fieldattributes', |
|
| 98 | + $moduleDirName.'_'.'fieldnull', |
|
| 99 | + $moduleDirName.'_'.'fieldkey', |
|
| 100 | + $moduleDirName.'_'.'fieldelements', |
|
| 101 | + $moduleDirName.'_'.'morefiles', |
|
| 102 | 102 | ]; |
| 103 | 103 | // Scripts to run upon installation or update |
| 104 | 104 | $modversion['onInstall'] = 'include/install.php'; |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | $c = 1; |
| 110 | 110 | |
| 111 | 111 | $modversion['config'][] = [ |
| 112 | - 'name' => 'break' . $c, |
|
| 112 | + 'name' => 'break'.$c, |
|
| 113 | 113 | 'title' => '_MI_TDMCREATE_CONFIG_BREAK_GENERAL', |
| 114 | 114 | 'description' => '_MI_TDMCREATE_CONFIG_', |
| 115 | 115 | 'formtype' => 'line_break', |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | |
| 198 | 198 | ++$c; |
| 199 | 199 | $modversion['config'][] = [ |
| 200 | - 'name' => 'break' . $c, |
|
| 200 | + 'name' => 'break'.$c, |
|
| 201 | 201 | 'title' => '_MI_TDMCREATE_CONFIG_BREAK_REQUIRED', |
| 202 | 202 | 'description' => '_MI_TDMCREATE_CONFIG_', |
| 203 | 203 | 'formtype' => 'line_break', |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | |
| 379 | 379 | ++$c; |
| 380 | 380 | $modversion['config'][] = [ |
| 381 | - 'name' => 'break' . $c, |
|
| 381 | + 'name' => 'break'.$c, |
|
| 382 | 382 | 'title' => '_MI_TDMCREATE_CONFIG_BREAK_OPTIONAL', |
| 383 | 383 | 'description' => '_MI_TDMCREATE_CONFIG_', |
| 384 | 384 | 'formtype' => 'line_break', |
@@ -582,8 +582,8 @@ discard block |
||
| 582 | 582 | */ |
| 583 | 583 | $modversion['config'][] = [ |
| 584 | 584 | 'name' => 'displaySampleButton', |
| 585 | - 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON', |
|
| 586 | - 'description' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON_DESC', |
|
| 585 | + 'title' => 'CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON', |
|
| 586 | + 'description' => 'CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON_DESC', |
|
| 587 | 587 | 'formtype' => 'yesno', |
| 588 | 588 | 'valuetype' => 'int', |
| 589 | 589 | 'default' => 1, |
@@ -594,8 +594,8 @@ discard block |
||
| 594 | 594 | */ |
| 595 | 595 | $modversion['config'][] = [ |
| 596 | 596 | 'name' => 'displayDeveloperTools', |
| 597 | - 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS', |
|
| 598 | - 'description' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS_DESC', |
|
| 597 | + 'title' => 'CO_'.$moduleDirNameUpper.'_'.'SHOW_DEV_TOOLS', |
|
| 598 | + 'description' => 'CO_'.$moduleDirNameUpper.'_'.'SHOW_DEV_TOOLS_DESC', |
|
| 599 | 599 | 'formtype' => 'yesno', |
| 600 | 600 | 'valuetype' => 'int', |
| 601 | 601 | 'default' => 0, |
@@ -94,11 +94,11 @@ |
||
| 94 | 94 | } |
| 95 | 95 | // Form file save |
| 96 | 96 | $morefilesObj->setVars([ |
| 97 | - 'file_mid' => $_POST['file_mid'], |
|
| 98 | - 'file_name' => $_POST['file_name'], |
|
| 99 | - 'file_extension' => $_POST['file_extension'], |
|
| 100 | - 'file_infolder' => $_POST['file_infolder'], |
|
| 101 | - ]); |
|
| 97 | + 'file_mid' => $_POST['file_mid'], |
|
| 98 | + 'file_name' => $_POST['file_name'], |
|
| 99 | + 'file_extension' => $_POST['file_extension'], |
|
| 100 | + 'file_infolder' => $_POST['file_infolder'], |
|
| 101 | + ]); |
|
| 102 | 102 | |
| 103 | 103 | if ($helper->getHandler('Morefiles')->insert($morefilesObj)) { |
| 104 | 104 | if ($morefilesObj->isNew()) { |
@@ -94,11 +94,11 @@ |
||
| 94 | 94 | } |
| 95 | 95 | // Form file save |
| 96 | 96 | $addfilesObj->setVars([ |
| 97 | - 'file_mid' => $_POST['file_mid'], |
|
| 98 | - 'file_name' => $_POST['file_name'], |
|
| 99 | - 'file_extension' => $_POST['file_extension'], |
|
| 100 | - 'file_infolder' => $_POST['file_infolder'], |
|
| 101 | - ]); |
|
| 97 | + 'file_mid' => $_POST['file_mid'], |
|
| 98 | + 'file_name' => $_POST['file_name'], |
|
| 99 | + 'file_extension' => $_POST['file_extension'], |
|
| 100 | + 'file_infolder' => $_POST['file_infolder'], |
|
| 101 | + ]); |
|
| 102 | 102 | |
| 103 | 103 | if ($helper->getHandler('Addfiles')->insert($addfilesObj)) { |
| 104 | 104 | if ($addfilesObj->isNew()) { |
@@ -26,16 +26,16 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | $GLOBALS['xoopsOption']['template_main'] = 'tdmcreate_building.tpl'; |
| 28 | 28 | |
| 29 | -include __DIR__ . '/header.php'; |
|
| 29 | +include __DIR__.'/header.php'; |
|
| 30 | 30 | $op = \Xmf\Request::getString('op', 'default'); |
| 31 | 31 | $mid = \Xmf\Request::getInt('mod_id'); |
| 32 | 32 | $moduleObj = $helper->getHandler('Modules')->get($mid); |
| 33 | -$cachePath = XOOPS_VAR_PATH . '/caches/tdmcreate_cache'; |
|
| 33 | +$cachePath = XOOPS_VAR_PATH.'/caches/tdmcreate_cache'; |
|
| 34 | 34 | // Clear cache |
| 35 | -if (file_exists($cache = $cachePath . '/classpaths.cache')) { |
|
| 35 | +if (file_exists($cache = $cachePath.'/classpaths.cache')) { |
|
| 36 | 36 | unlink($cache); |
| 37 | 37 | } |
| 38 | -if (!file_exists($indexFile = $cachePath . '/index.html')) { |
|
| 38 | +if (!file_exists($indexFile = $cachePath.'/index.html')) { |
|
| 39 | 39 | copy('index.html', $indexFile); |
| 40 | 40 | } |
| 41 | 41 | // Switch option |
@@ -46,8 +46,8 @@ discard block |
||
| 46 | 46 | // Get var module dirname |
| 47 | 47 | $moduleDirname = $moduleObj->getVar('mod_dirname'); |
| 48 | 48 | // Directories for copy from to |
| 49 | - $fromDir = TDMC_UPLOAD_REPOSITORY_PATH . '/' . mb_strtolower($moduleDirname); |
|
| 50 | - $toDir = XOOPS_ROOT_PATH . '/modules/' . mb_strtolower($moduleDirname); |
|
| 49 | + $fromDir = TDMC_UPLOAD_REPOSITORY_PATH.'/'.mb_strtolower($moduleDirname); |
|
| 50 | + $toDir = XOOPS_ROOT_PATH.'/modules/'.mb_strtolower($moduleDirname); |
|
| 51 | 51 | // include_once TDMC_CLASS_PATH . '/building.php'; |
| 52 | 52 | if (isset($moduleDirname)) { |
| 53 | 53 | // Clear this module if it's in repository |
@@ -109,4 +109,4 @@ discard block |
||
| 109 | 109 | $GLOBALS['xoopsTpl']->assign('form', $form->render()); |
| 110 | 110 | break; |
| 111 | 111 | } |
| 112 | -include __DIR__ . '/footer.php'; |
|
| 112 | +include __DIR__.'/footer.php'; |
|
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | $GLOBALS['xoopsOption']['template_main'] = 'tdmcreate_tables.tpl'; |
| 26 | 26 | |
| 27 | -include __DIR__ . '/header.php'; |
|
| 27 | +include __DIR__.'/header.php'; |
|
| 28 | 28 | // Recovered value of arguments op in the URL $ |
| 29 | 29 | $op = \Xmf\Request::getString('op', 'list'); |
| 30 | 30 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $adminObject->addItemButton(_AM_TDMCREATE_ADD_TABLE, 'tables.php?op=new', 'add'); |
| 52 | 52 | $GLOBALS['xoopsTpl']->assign('buttons', $adminObject->displayButton('left')); |
| 53 | 53 | $GLOBALS['xoopsTpl']->assign('tdmc_upload_imgmod_url', TDMC_UPLOAD_IMGMOD_URL); |
| 54 | - $GLOBALS['xoopsTpl']->assign('modPathIcon16', TDMC_URL . '/' . $modPathIcon16); |
|
| 54 | + $GLOBALS['xoopsTpl']->assign('modPathIcon16', TDMC_URL.'/'.$modPathIcon16); |
|
| 55 | 55 | // Get the list of modules |
| 56 | 56 | $modulesCount = $helper->getHandler('Modules')->getCountModules(); |
| 57 | 57 | // Redirect if there aren't modules |
@@ -90,8 +90,8 @@ discard block |
||
| 90 | 90 | unset($module); |
| 91 | 91 | } |
| 92 | 92 | if ($modulesCount > $limit) { |
| 93 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 94 | - $pagenav = new \XoopsPageNav($modulesCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
| 93 | + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
| 94 | + $pagenav = new \XoopsPageNav($modulesCount, $limit, $start, 'start', 'op=list&limit='.$limit); |
|
| 95 | 95 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
| 96 | 96 | } |
| 97 | 97 | } else { |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | 'table_order' => $order, |
| 144 | 144 | ]); |
| 145 | 145 | //Form table_image |
| 146 | - include_once XOOPS_ROOT_PATH . '/class/uploader.php'; |
|
| 146 | + include_once XOOPS_ROOT_PATH.'/class/uploader.php'; |
|
| 147 | 147 | $uploaddir = is_dir(XOOPS_ICONS32_PATH) ? XOOPS_ICONS32_PATH : TDMC_UPLOAD_IMGTAB_PATH; |
| 148 | 148 | $uploader = new \XoopsMediaUploader( |
| 149 | 149 | $uploaddir, |
@@ -189,18 +189,18 @@ discard block |
||
| 189 | 189 | if ($tables->insert($tablesObj)) { |
| 190 | 190 | if ($tablesObj->isNew()) { |
| 191 | 191 | $tableTid = $GLOBALS['xoopsDB']->getInsertId(); |
| 192 | - $tableAction = '&field_mid=' . $tableMid . '&field_tid=' . $tableTid . '&field_numb=' . $tableNumbFields . '&field_name=' . $tableFieldname; |
|
| 192 | + $tableAction = '&field_mid='.$tableMid.'&field_tid='.$tableTid.'&field_numb='.$tableNumbFields.'&field_name='.$tableFieldname; |
|
| 193 | 193 | // Fields Elements Handler |
| 194 | 194 | $fieldelementObj = $helper->getHandler('Fieldelements')->create(); |
| 195 | 195 | $fieldelementObj->setVar('fieldelement_mid', $tableMid); |
| 196 | 196 | $fieldelementObj->setVar('fieldelement_tid', $tableTid); |
| 197 | - $fieldelementObj->setVar('fieldelement_name', 'Table : ' . ucfirst($_POST['table_name'])); |
|
| 198 | - $fieldelementObj->setVar('fieldelement_value', 'XoopsFormTables-' . ucfirst($_POST['table_name'])); |
|
| 197 | + $fieldelementObj->setVar('fieldelement_name', 'Table : '.ucfirst($_POST['table_name'])); |
|
| 198 | + $fieldelementObj->setVar('fieldelement_value', 'XoopsFormTables-'.ucfirst($_POST['table_name'])); |
|
| 199 | 199 | // Insert new field element id for table name |
| 200 | 200 | if (!$helper->getHandler('Fieldelements')->insert($fieldelementObj)) { |
| 201 | - $GLOBALS['xoopsTpl']->assign('error', $fieldelementObj->getHtmlErrors() . ' Field element'); |
|
| 201 | + $GLOBALS['xoopsTpl']->assign('error', $fieldelementObj->getHtmlErrors().' Field element'); |
|
| 202 | 202 | } |
| 203 | - redirect_header('fields.php?op=new' . $tableAction, 5, sprintf(_AM_TDMCREATE_TABLE_FORM_CREATED_OK, $_POST['table_name'])); |
|
| 203 | + redirect_header('fields.php?op=new'.$tableAction, 5, sprintf(_AM_TDMCREATE_TABLE_FORM_CREATED_OK, $_POST['table_name'])); |
|
| 204 | 204 | } else { |
| 205 | 205 | redirect_header('tables.php', 5, sprintf(_AM_TDMCREATE_TABLE_FORM_UPDATED_OK, $_POST['table_name'])); |
| 206 | 206 | } |
@@ -272,9 +272,9 @@ discard block |
||
| 272 | 272 | if ($mid > 0) { |
| 273 | 273 | $modulesObj = $helper->getHandler('Modules')->get($mid); |
| 274 | 274 | foreach ($modArray as $modField) { |
| 275 | - if (isset($_POST['mod_' . $modField])) { |
|
| 276 | - $mField = $modulesObj->getVar('mod_' . $modField); |
|
| 277 | - $modulesObj->setVar('mod_' . $modField, !$mField); |
|
| 275 | + if (isset($_POST['mod_'.$modField])) { |
|
| 276 | + $mField = $modulesObj->getVar('mod_'.$modField); |
|
| 277 | + $modulesObj->setVar('mod_'.$modField, !$mField); |
|
| 278 | 278 | } |
| 279 | 279 | } |
| 280 | 280 | if ($helper->getHandler('Modules')->insert($modulesObj)) { |
@@ -287,9 +287,9 @@ discard block |
||
| 287 | 287 | if ($tid > 0) { |
| 288 | 288 | $tablesObj = $helper->getHandler('Tables')->get($tid); |
| 289 | 289 | foreach ($tableArray as $tableField) { |
| 290 | - if (isset($_POST['table_' . $tableField])) { |
|
| 291 | - $tblField = $tablesObj->getVar('table_' . $tableField); |
|
| 292 | - $tablesObj->setVar('table_' . $tableField, !$tblField); |
|
| 290 | + if (isset($_POST['table_'.$tableField])) { |
|
| 291 | + $tblField = $tablesObj->getVar('table_'.$tableField); |
|
| 292 | + $tablesObj->setVar('table_'.$tableField, !$tblField); |
|
| 293 | 293 | } |
| 294 | 294 | } |
| 295 | 295 | if ($helper->getHandler('Tables')->insert($tablesObj)) { |
@@ -299,4 +299,4 @@ discard block |
||
| 299 | 299 | } |
| 300 | 300 | break; |
| 301 | 301 | } |
| 302 | -include __DIR__ . '/footer.php'; |
|
| 302 | +include __DIR__.'/footer.php'; |
|
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | use Xmf\Request; |
| 23 | 23 | use XoopsModules\Tdmcreate\Common; |
| 24 | 24 | |
| 25 | -include __DIR__ . '/header.php'; |
|
| 25 | +include __DIR__.'/header.php'; |
|
| 26 | 26 | |
| 27 | 27 | $adminObject = \Xmf\Module\Admin::getInstance(); |
| 28 | 28 | |
@@ -62,12 +62,12 @@ discard block |
||
| 62 | 62 | $fb_content = Request::getText('fb_content', ''); |
| 63 | 63 | $fb_content = str_replace(["\r\n", "\n", "\r"], '<br>', $fb_content); //clean line break from dhtmltextarea |
| 64 | 64 | |
| 65 | - $title = constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SEND_FOR') . $GLOBALS['xoopsModule']->getVar('dirname'); |
|
| 66 | - $body = constant('CO_' . $moduleDirNameUpper . '_' . 'FB_NAME') . ': ' . $your_name . '<br>'; |
|
| 67 | - $body .= constant('CO_' . $moduleDirNameUpper . '_' . 'FB_MAIL') . ': ' . $your_mail . '<br>'; |
|
| 68 | - $body .= constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SITE') . ': ' . $your_site . '<br>'; |
|
| 69 | - $body .= constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE') . ': ' . $fb_type . '<br><br>'; |
|
| 70 | - $body .= constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_CONTENT') . ':<br>'; |
|
| 65 | + $title = constant('CO_'.$moduleDirNameUpper.'_'.'FB_SEND_FOR').$GLOBALS['xoopsModule']->getVar('dirname'); |
|
| 66 | + $body = constant('CO_'.$moduleDirNameUpper.'_'.'FB_NAME').': '.$your_name.'<br>'; |
|
| 67 | + $body .= constant('CO_'.$moduleDirNameUpper.'_'.'FB_MAIL').': '.$your_mail.'<br>'; |
|
| 68 | + $body .= constant('CO_'.$moduleDirNameUpper.'_'.'FB_SITE').': '.$your_site.'<br>'; |
|
| 69 | + $body .= constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE').': '.$fb_type.'<br><br>'; |
|
| 70 | + $body .= constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_CONTENT').':<br>'; |
|
| 71 | 71 | $body .= $fb_content; |
| 72 | 72 | $xoopsMailer = xoops_getMailer(); |
| 73 | 73 | $xoopsMailer->useMail(); |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $xoopsMailer->setBody($body); |
| 80 | 80 | $ret = $xoopsMailer->send(); |
| 81 | 81 | if ($ret) { |
| 82 | - redirect_header('index.php', 3, constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SEND_SUCCESS')); |
|
| 82 | + redirect_header('index.php', 3, constant('CO_'.$moduleDirNameUpper.'_'.'FB_SEND_SUCCESS')); |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | // show form with content again |
@@ -89,11 +89,11 @@ discard block |
||
| 89 | 89 | $feedback->type = $fb_type; |
| 90 | 90 | $feedback->content = $fb_content; |
| 91 | 91 | echo '<div align="center" style="width: 80%; padding: 10px; border: 2px solid #ff0000; color: #ff0000; margin-right:auto;margin-left:auto;"> |
| 92 | - <h3>' . constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SEND_ERROR') . '</h3> |
|
| 92 | + <h3>' . constant('CO_'.$moduleDirNameUpper.'_'.'FB_SEND_ERROR').'</h3> |
|
| 93 | 93 | </div>'; |
| 94 | 94 | $form = $feedback->getFormFeedback(); |
| 95 | 95 | $form->display(); |
| 96 | 96 | |
| 97 | 97 | break; |
| 98 | 98 | } |
| 99 | -require __DIR__ . '/footer.php'; |
|
| 99 | +require __DIR__.'/footer.php'; |
|