@@ -26,7 +26,7 @@ |
||
| 26 | 26 | |
| 27 | 27 | for ($i = 0, $iMax = count($faqsObj); $i < $iMax; ++$i) { |
| 28 | 28 | $ret[$i]['image'] = 'assets/images/smartfaq.gif'; |
| 29 | - $ret[$i]['link'] = 'faq.php?faqid=' . $faqsObj[$i]->faqid(); |
|
| 29 | + $ret[$i]['link'] = 'faq.php?faqid='.$faqsObj[$i]->faqid(); |
|
| 30 | 30 | $ret[$i]['title'] = $faqsObj[$i]->question(50); |
| 31 | 31 | $ret[$i]['time'] = $faqsObj[$i]->getVar('datesub'); |
| 32 | 32 | $ret[$i]['uid'] = $faqsObj[$i]->uid(); |
@@ -21,26 +21,26 @@ discard block |
||
| 21 | 21 | { |
| 22 | 22 | $moduleDirName = basename(dirname(__DIR__)); |
| 23 | 23 | $moduleDirNameUpper = strtoupper($moduleDirName); |
| 24 | - return (object)[ |
|
| 25 | - 'name' => strtoupper($moduleDirName) . ' Module Configurator', |
|
| 24 | + return (object) [ |
|
| 25 | + 'name' => strtoupper($moduleDirName).' Module Configurator', |
|
| 26 | 26 | 'paths' => [ |
| 27 | 27 | 'dirname' => $moduleDirName, |
| 28 | - 'admin' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin', |
|
| 29 | - 'modPath' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName, |
|
| 30 | - 'modUrl' => XOOPS_URL . '/modules/' . $moduleDirName, |
|
| 31 | - 'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName, |
|
| 32 | - 'uploadUrl' => XOOPS_UPLOAD_URL . '/' . $moduleDirName, |
|
| 28 | + 'admin' => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/admin', |
|
| 29 | + 'modPath' => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName, |
|
| 30 | + 'modUrl' => XOOPS_URL.'/modules/'.$moduleDirName, |
|
| 31 | + 'uploadPath' => XOOPS_UPLOAD_PATH.'/'.$moduleDirName, |
|
| 32 | + 'uploadUrl' => XOOPS_UPLOAD_URL.'/'.$moduleDirName, |
|
| 33 | 33 | ], |
| 34 | 34 | 'uploadFolders' => [ |
| 35 | - constant($moduleDirNameUpper . '_UPLOAD_PATH'), |
|
| 36 | - constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/category', |
|
| 37 | - constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/screenshots', |
|
| 35 | + constant($moduleDirNameUpper.'_UPLOAD_PATH'), |
|
| 36 | + constant($moduleDirNameUpper.'_UPLOAD_PATH').'/category', |
|
| 37 | + constant($moduleDirNameUpper.'_UPLOAD_PATH').'/screenshots', |
|
| 38 | 38 | //XOOPS_UPLOAD_PATH . '/flags' |
| 39 | 39 | ], |
| 40 | 40 | 'copyBlankFiles' => [ |
| 41 | - constant($moduleDirNameUpper . '_UPLOAD_PATH'), |
|
| 42 | - constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/category', |
|
| 43 | - constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/screenshots', |
|
| 41 | + constant($moduleDirNameUpper.'_UPLOAD_PATH'), |
|
| 42 | + constant($moduleDirNameUpper.'_UPLOAD_PATH').'/category', |
|
| 43 | + constant($moduleDirNameUpper.'_UPLOAD_PATH').'/screenshots', |
|
| 44 | 44 | //XOOPS_UPLOAD_PATH . '/flags' |
| 45 | 45 | ], |
| 46 | 46 | |
@@ -75,6 +75,6 @@ discard block |
||
| 75 | 75 | '/images', |
| 76 | 76 | ], |
| 77 | 77 | 'modCopyright' => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'> |
| 78 | - <img src='" . constant($moduleDirNameUpper . '_AUTHOR_LOGOIMG') . '\' alt=\'XOOPS Project\' /></a>', |
|
| 78 | + <img src='" . constant($moduleDirNameUpper.'_AUTHOR_LOGOIMG').'\' alt=\'XOOPS Project\' /></a>', |
|
| 79 | 79 | ]; |
| 80 | 80 | } |
@@ -28,24 +28,24 @@ discard block |
||
| 28 | 28 | { |
| 29 | 29 | global $xoopsModuleConfig; |
| 30 | 30 | |
| 31 | - $img_path = XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['dir_attachments']; |
|
| 32 | - $img_url = XOOPS_URL . '/' . $xoopsModuleConfig['dir_attachments']; |
|
| 33 | - $thumb_path = $img_path . '/thumbs'; |
|
| 34 | - $thumb_url = $img_url . '/thumbs'; |
|
| 31 | + $img_path = XOOPS_ROOT_PATH.'/'.$xoopsModuleConfig['dir_attachments']; |
|
| 32 | + $img_url = XOOPS_URL.'/'.$xoopsModuleConfig['dir_attachments']; |
|
| 33 | + $thumb_path = $img_path.'/thumbs'; |
|
| 34 | + $thumb_url = $img_url.'/thumbs'; |
|
| 35 | 35 | |
| 36 | - $thumb = $thumb_path . '/' . $source; |
|
| 37 | - $image = $img_path . '/' . $source; |
|
| 38 | - $thumb_url = $thumb_url . '/' . $source; |
|
| 39 | - $image_url = $img_url . '/' . $source; |
|
| 36 | + $thumb = $thumb_path.'/'.$source; |
|
| 37 | + $image = $img_path.'/'.$source; |
|
| 38 | + $thumb_url = $thumb_url.'/'.$source; |
|
| 39 | + $image_url = $img_url.'/'.$source; |
|
| 40 | 40 | |
| 41 | 41 | $imginfo = @getimagesize($image); |
| 42 | - $img_info = (count($imginfo) > 0) ? $imginfo[0] . 'X' . $imginfo[1] . ' px' : ''; |
|
| 42 | + $img_info = (count($imginfo) > 0) ? $imginfo[0].'X'.$imginfo[1].' px' : ''; |
|
| 43 | 43 | |
| 44 | 44 | if ($xoopsModuleConfig['max_image_width'] > 0 && $xoopsModuleConfig['max_image_height'] > 0) { |
| 45 | 45 | if ($imginfo[0] > $xoopsModuleConfig['max_image_width'] |
| 46 | 46 | || $imginfo[1] > $xoopsModuleConfig['max_image_height']) { |
| 47 | 47 | //if (!file_exists($thumb_path.'/'.$source) && $imginfo[0] > $xoopsModuleConfig['max_img_width']) { |
| 48 | - if (!file_exists($thumb_path . '/' . $source)) { |
|
| 48 | + if (!file_exists($thumb_path.'/'.$source)) { |
|
| 49 | 49 | sf_createThumbnail($source, $xoopsModuleConfig['max_image_width']); |
| 50 | 50 | } |
| 51 | 51 | } |
@@ -54,27 +54,27 @@ discard block |
||
| 54 | 54 | || $imginfo[1] > $xoopsModuleConfig['max_image_height']) { |
| 55 | 55 | $pseudo_width = $xoopsModuleConfig['max_image_width']; |
| 56 | 56 | $pseudo_height = $xoopsModuleConfig['max_image_width'] * ($imginfo[1] / $imginfo[0]); |
| 57 | - $pseudo_size = "width='" . $pseudo_width . "px' height='" . $pseudo_height . "px'"; |
|
| 57 | + $pseudo_size = "width='".$pseudo_width."px' height='".$pseudo_height."px'"; |
|
| 58 | 58 | } |
| 59 | 59 | // irmtfan to fix Undefined variable: pseudo_height |
| 60 | 60 | if (!empty($pseudo_height) && $xoopsModuleConfig['max_image_height'] > 0 |
| 61 | 61 | && $pseudo_height > $xoopsModuleConfig['max_image_height']) { |
| 62 | 62 | $pseudo_height = $xoopsModuleConfig['max_image_height']; |
| 63 | 63 | $pseudo_width = $xoopsModuleConfig['max_image_height'] * ($imginfo[0] / $imginfo[1]); |
| 64 | - $pseudo_size = "width='" . $pseudo_width . "px' height='" . $pseudo_height . "px'"; |
|
| 64 | + $pseudo_size = "width='".$pseudo_width."px' height='".$pseudo_height."px'"; |
|
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | if (file_exists($thumb)) { |
| 69 | - $attachmentImage = '<a href="' . $image_url . '" title="' . $source . ' ' . $img_info . '" target="_blank">'; |
|
| 70 | - $attachmentImage .= '<img src="' . $thumb_url . '" alt="' . $source . ' ' . $img_info . '">'; |
|
| 69 | + $attachmentImage = '<a href="'.$image_url.'" title="'.$source.' '.$img_info.'" target="_blank">'; |
|
| 70 | + $attachmentImage .= '<img src="'.$thumb_url.'" alt="'.$source.' '.$img_info.'">'; |
|
| 71 | 71 | $attachmentImage .= '</a>'; |
| 72 | 72 | } elseif (!empty($pseudo_size)) { |
| 73 | - $attachmentImage = '<a href="' . $image_url . '" title="' . $source . ' ' . $img_info . '" target="_blank">'; |
|
| 74 | - $attachmentImage .= '<img src="' . $image_url . '" ' . $pseudo_size . ' alt="' . $source . ' ' . $img_info . '">'; |
|
| 73 | + $attachmentImage = '<a href="'.$image_url.'" title="'.$source.' '.$img_info.'" target="_blank">'; |
|
| 74 | + $attachmentImage .= '<img src="'.$image_url.'" '.$pseudo_size.' alt="'.$source.' '.$img_info.'">'; |
|
| 75 | 75 | $attachmentImage .= '</a>'; |
| 76 | 76 | } elseif (file_exists($image)) { |
| 77 | - $attachmentImage = '<img src="' . $image_url . '" alt="' . $source . ' ' . $img_info . '">'; |
|
| 77 | + $attachmentImage = '<img src="'.$image_url.'" alt="'.$source.' '.$img_info.'">'; |
|
| 78 | 78 | } else { |
| 79 | 79 | $attachmentImage = ''; |
| 80 | 80 | } |
@@ -91,10 +91,10 @@ discard block |
||
| 91 | 91 | { |
| 92 | 92 | global $xoopsModuleConfig; |
| 93 | 93 | |
| 94 | - $img_path = XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['dir_attachments']; |
|
| 95 | - $thumb_path = $img_path . '/thumbs'; |
|
| 96 | - $src_file = $img_path . '/' . $source; |
|
| 97 | - $new_file = $thumb_path . '/' . $source; |
|
| 94 | + $img_path = XOOPS_ROOT_PATH.'/'.$xoopsModuleConfig['dir_attachments']; |
|
| 95 | + $thumb_path = $img_path.'/thumbs'; |
|
| 96 | + $src_file = $img_path.'/'.$source; |
|
| 97 | + $new_file = $thumb_path.'/'.$source; |
|
| 98 | 98 | //$imageLibs = sf_getImageLibs(); |
| 99 | 99 | |
| 100 | 100 | if (!filesize($src_file) || !is_readable($src_file)) { |
@@ -114,20 +114,20 @@ discard block |
||
| 114 | 114 | return false; |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | - $newWidth = (int)min($imginfo[0], $thumb_width); |
|
| 118 | - $newHeight = (int)($imginfo[1] * $newWidth / $imginfo[0]); |
|
| 117 | + $newWidth = (int) min($imginfo[0], $thumb_width); |
|
| 118 | + $newHeight = (int) ($imginfo[1] * $newWidth / $imginfo[0]); |
|
| 119 | 119 | |
| 120 | 120 | if (1 == $xoopsModuleConfig['image_lib'] or 0 == $xoopsModuleConfig['image_lib']) { |
| 121 | 121 | if (preg_match("#[A-Z]:|\\\\#Ai", __FILE__)) { |
| 122 | 122 | $cur_dir = __DIR__; |
| 123 | - $src_file_im = '"' . $cur_dir . '\\' . str_replace('/', '\\', $src_file) . '"'; |
|
| 124 | - $new_file_im = '"' . $cur_dir . '\\' . str_replace('/', '\\', $new_file) . '"'; |
|
| 123 | + $src_file_im = '"'.$cur_dir.'\\'.str_replace('/', '\\', $src_file).'"'; |
|
| 124 | + $new_file_im = '"'.$cur_dir.'\\'.str_replace('/', '\\', $new_file).'"'; |
|
| 125 | 125 | } else { |
| 126 | 126 | $src_file_im = @escapeshellarg($src_file); |
| 127 | 127 | $new_file_im = @escapeshellarg($new_file); |
| 128 | 128 | } |
| 129 | - $path = empty($xoopsModuleConfig['path_magick']) ? '' : $xoopsModuleConfig['path_magick'] . '/'; |
|
| 130 | - $magick_command = $path . 'convert -quality 85 -antialias -sample ' . $newWidth . 'x' . $newHeight . ' ' . $src_file_im . ' +profile "*" ' . str_replace('\\', '/', $new_file_im) . ''; |
|
| 129 | + $path = empty($xoopsModuleConfig['path_magick']) ? '' : $xoopsModuleConfig['path_magick'].'/'; |
|
| 130 | + $magick_command = $path.'convert -quality 85 -antialias -sample '.$newWidth.'x'.$newHeight.' '.$src_file_im.' +profile "*" '.str_replace('\\', '/', $new_file_im).''; |
|
| 131 | 131 | |
| 132 | 132 | @passthru($magick_command); |
| 133 | 133 | if (file_exists($new_file)) { |
@@ -136,13 +136,13 @@ discard block |
||
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | if (2 == $xoopsModuleConfig['image_lib'] or 0 == $xoopsModuleConfig['image_lib']) { |
| 139 | - $path = empty($xoopsModuleConfig['path_netpbm']) ? '' : $xoopsModuleConfig['path_netpbm'] . '/'; |
|
| 139 | + $path = empty($xoopsModuleConfig['path_netpbm']) ? '' : $xoopsModuleConfig['path_netpbm'].'/'; |
|
| 140 | 140 | if (preg_match("/\.png/i", $source)) { |
| 141 | - $cmd = $path . "pngtopnm $src_file | " . $path . "pnmscale -xysize $newWidth $newHeight | " . $path . "pnmtopng > $new_file"; |
|
| 141 | + $cmd = $path."pngtopnm $src_file | ".$path."pnmscale -xysize $newWidth $newHeight | ".$path."pnmtopng > $new_file"; |
|
| 142 | 142 | } elseif (preg_match("/\.(jpg|jpeg)/i", $source)) { |
| 143 | - $cmd = $path . "jpegtopnm $src_file | " . $path . "pnmscale -xysize $newWidth $newHeight | " . $path . "ppmtojpeg -quality=90 > $new_file"; |
|
| 143 | + $cmd = $path."jpegtopnm $src_file | ".$path."pnmscale -xysize $newWidth $newHeight | ".$path."ppmtojpeg -quality=90 > $new_file"; |
|
| 144 | 144 | } elseif (preg_match("/\.gif/i", $source)) { |
| 145 | - $cmd = $path . "giftopnm $src_file | " . $path . "pnmscale -xysize $newWidth $newHeight | ppmquant 256 | " . $path . "ppmtogif > $new_file"; |
|
| 145 | + $cmd = $path."giftopnm $src_file | ".$path."pnmscale -xysize $newWidth $newHeight | ppmquant 256 | ".$path."ppmtogif > $new_file"; |
|
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | @exec($cmd, $output, $retval); |
@@ -13,9 +13,9 @@ |
||
| 13 | 13 | |
| 14 | 14 | global $_POST; |
| 15 | 15 | |
| 16 | -require_once XOOPS_ROOT_PATH . '/class/xoopstree.php'; |
|
| 17 | -require_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; |
|
| 18 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 16 | +require_once XOOPS_ROOT_PATH.'/class/xoopstree.php'; |
|
| 17 | +require_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
| 18 | +require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 19 | 19 | //require_once __DIR__ . '/functions.php'; |
| 20 | 20 | |
| 21 | 21 | $mytree = new Smartfaq\Tree($xoopsDB->prefix('smartfaq_categories'), 'categoryid', 'parentid'); |
@@ -12,9 +12,9 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | global $_POST, $xoopsDB; |
| 14 | 14 | |
| 15 | -require_once XOOPS_ROOT_PATH . '/class/xoopstree.php'; |
|
| 16 | -require_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; |
|
| 17 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 15 | +require_once XOOPS_ROOT_PATH.'/class/xoopstree.php'; |
|
| 16 | +require_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
| 17 | +require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 18 | 18 | |
| 19 | 19 | //require_once __DIR__ . '/functions.php'; |
| 20 | 20 | |
@@ -73,18 +73,18 @@ discard block |
||
| 73 | 73 | // $upload_tray->addElement(new \XoopsFormFile('', 'userfile', ($forum_obj->getVar('attach_maxkb') * 1024))); |
| 74 | 74 | $upload_tray->addElement(new \XoopsFormFile('', 'userfile', $xoopsModuleConfig['max_image_size'] * 1024)); |
| 75 | 75 | $upload_tray->addElement(new \XoopsFormButton('', 'contents_upload', _MD_SF_UPLOAD, 'submit')); |
| 76 | -$upload_tray->addElement(new \XoopsFormLabel('<br><br>' . _MD_SF_MAX_FILESIZE . ':', $xoopsModuleConfig['max_image_size'] . 'Kb; ')); |
|
| 76 | +$upload_tray->addElement(new \XoopsFormLabel('<br><br>'._MD_SF_MAX_FILESIZE.':', $xoopsModuleConfig['max_image_size'].'Kb; ')); |
|
| 77 | 77 | $extensions = trim(str_replace('|', ' ', $xoopsModuleConfig['attach_ext'])); |
| 78 | 78 | $extensions = (empty($extensions) || '*' === $extensions) ? _ALL : $extensions; |
| 79 | -$upload_tray->addElement(new \XoopsFormLabel(_MD_SF_ALLOWED_EXTENSIONS . ':', $extensions)); |
|
| 80 | -$upload_tray->addElement(new \XoopsFormLabel('<br>' . sprintf(_MD_SF_MAXPIC, $xoopsModuleConfig['max_img_height'], $xoopsModuleConfig['max_img_width']))); |
|
| 79 | +$upload_tray->addElement(new \XoopsFormLabel(_MD_SF_ALLOWED_EXTENSIONS.':', $extensions)); |
|
| 80 | +$upload_tray->addElement(new \XoopsFormLabel('<br>'.sprintf(_MD_SF_MAXPIC, $xoopsModuleConfig['max_img_height'], $xoopsModuleConfig['max_img_width']))); |
|
| 81 | 81 | $form->addElement($upload_tray); |
| 82 | 82 | //} |
| 83 | 83 | |
| 84 | 84 | if (!empty($attachments) && is_array($attachments) && count($attachments)) { |
| 85 | 85 | $delete_attach_checkbox = new \XoopsFormCheckBox(_MD_SF_ATTACHED_FILES, 'delete_attach[]'); |
| 86 | 86 | foreach ($attachments as $key => $attachment) { |
| 87 | - $attach = ' ' . _DELETE . ' <a href=' . XOOPS_URL . '/' . $xoopsModuleConfig['dir_attachments'] . '/' . $attachment['name_saved'] . ' rel="external">' . $attachment['name_display'] . '</a><br>'; |
|
| 87 | + $attach = ' '._DELETE.' <a href='.XOOPS_URL.'/'.$xoopsModuleConfig['dir_attachments'].'/'.$attachment['name_saved'].' rel="external">'.$attachment['name_display'].'</a><br>'; |
|
| 88 | 88 | $delete_attach_checkbox->addOption($key, $attach); |
| 89 | 89 | } |
| 90 | 90 | $form->addElement($delete_attach_checkbox); |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $delete_attach_checkbox = new \XoopsFormCheckBox(_MD_REMOVE, 'delete_tmp[]'); |
| 96 | 96 | $url_prefix = str_replace(XOOPS_ROOT_PATH, XOOPS_URL, XOOPS_CACHE_PATH); |
| 97 | 97 | foreach ($attachments_tmp as $key => $attachment) { |
| 98 | - $attach = ' <a href="' . $url_prefix . '/' . $attachment[0] . '" rel="external">' . $attachment[1] . '</a><br>'; |
|
| 98 | + $attach = ' <a href="'.$url_prefix.'/'.$attachment[0].'" rel="external">'.$attachment[1].'</a><br>'; |
|
| 99 | 99 | $delete_attach_checkbox->addOption($key, $attach); |
| 100 | 100 | } |
| 101 | 101 | $form->addElement($delete_attach_checkbox); |
@@ -34,10 +34,10 @@ discard block |
||
| 34 | 34 | // return true; |
| 35 | 35 | |
| 36 | 36 | $moduleDirName = basename(dirname(__DIR__)); |
| 37 | - $xsitemapHelper = \Xmf\Module\Helper::getHelper($moduleDirName); |
|
| 37 | + $xsitemapHelper = \Xmf\Module\Helper::getHelper($moduleDirName); |
|
| 38 | 38 | |
| 39 | 39 | /** @var XoopsModules\Smartfaq\Utility $utilityClass */ |
| 40 | - $utilityClass = ucfirst($moduleDirName) . 'Utility'; |
|
| 40 | + $utilityClass = ucfirst($moduleDirName).'Utility'; |
|
| 41 | 41 | if (!class_exists($utilityClass)) { |
| 42 | 42 | xoops_load('utility', $moduleDirName); |
| 43 | 43 | } |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | if ($dirInfo->isDir()) { |
| 57 | 57 | // The directory exists so delete it |
| 58 | 58 | if (false === $utilityClass::rrmdir($old_dir)) { |
| 59 | - $module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_DEL_PATH'), $old_dir)); |
|
| 59 | + $module->setErrors(sprintf(constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_DEL_PATH'), $old_dir)); |
|
| 60 | 60 | $success = false; |
| 61 | 61 | } |
| 62 | 62 | } |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | 9 | $categoryID = isset($categoryID) ? $categoryID : 0; |
| 10 | -$type = isset($type) ? (int)$type : 3; |
|
| 10 | +$type = isset($type) ? (int) $type : 3; |
|
| 11 | 11 | $term = isset($term) ? $type : ''; |
| 12 | 12 | |
| 13 | 13 | $sform = new \XoopsThemeForm(_MD_WB_SEARCHFORM, 'searchform', 'search.php'); |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | $searchcat = new \XoopsFormSelect(_MD_WB_CATEGORY, 'categoryID', $categoryID); |
| 22 | 22 | $searchcat->addOption('0', _MD_WB_ALLOFTHEM); |
| 23 | 23 | |
| 24 | - $resultcat = $xoopsDB->queryF('SELECT categoryID, name FROM ' . $xoopsDB->prefix('wbcategories') . ' ORDER BY categoryID'); |
|
| 24 | + $resultcat = $xoopsDB->queryF('SELECT categoryID, name FROM '.$xoopsDB->prefix('wbcategories').' ORDER BY categoryID'); |
|
| 25 | 25 | |
| 26 | 26 | while (list($categoryID, $name) = $xoopsDB->fetchRow($resultcat)) { |
| 27 | 27 | $searchcat->addOption('categoryID', "$categoryID : $name"); |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | // defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
| 13 | 13 | |
| 14 | -defined('NEWBB_FUNCTIONS_INI') || include __DIR__ . '/functions.ini.php'; |
|
| 14 | +defined('NEWBB_FUNCTIONS_INI') || include __DIR__.'/functions.ini.php'; |
|
| 15 | 15 | define('NEWBB_FUNCTIONS_RENDER_LOADED', true); |
| 16 | 16 | |
| 17 | 17 | if (!defined('NEWBB_FUNCTIONS_RENDER')): |
@@ -56,16 +56,16 @@ discard block |
||
| 56 | 56 | // decode xcode |
| 57 | 57 | if (0 != $image) { |
| 58 | 58 | // image allowed |
| 59 | - $text =& $myts->xoopsCodeDecode($text); |
|
| 59 | + $text = & $myts->xoopsCodeDecode($text); |
|
| 60 | 60 | } else { |
| 61 | 61 | // image not allowed |
| 62 | - $text =& $myts->xoopsCodeDecode($text, 0); |
|
| 62 | + $text = & $myts->xoopsCodeDecode($text, 0); |
|
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | if (0 != $br) { |
| 66 | - $text =& $myts->nl2Br($text); |
|
| 66 | + $text = & $myts->nl2Br($text); |
|
| 67 | 67 | } |
| 68 | - $text = $myts->codeConv($text, $xcode, $image); // Ryuji_edit(2003-11-18) |
|
| 68 | + $text = $myts->codeConv($text, $xcode, $image); // Ryuji_edit(2003-11-18) |
|
| 69 | 69 | |
| 70 | 70 | return $text; |
| 71 | 71 | } |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | { |
| 96 | 96 | $button = "<input type='button' name='{$button}' {$extra} value='{$alt}' onclick='window.location.href={$link}'>"; |
| 97 | 97 | if (empty($asImage)) { |
| 98 | - $button = "<a href='{$link}' title='{$alt}' {$extra}>" . sf_displayImage($button, $alt, true) . '</a>'; |
|
| 98 | + $button = "<a href='{$link}' title='{$alt}' {$extra}>".sf_displayImage($button, $alt, true).'</a>'; |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | return $button; |
@@ -26,9 +26,9 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | Smartfaq\Utility::collapsableBar('toptable', 'toptableicon'); |
| 28 | 28 | |
| 29 | -echo "<img id='toptableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . $faqs_title . '</h3>'; |
|
| 29 | +echo "<img id='toptableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> ".$faqs_title.'</h3>'; |
|
| 30 | 30 | echo "<div id='toptable'>"; |
| 31 | -echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . $faqs_info . '</span>'; |
|
| 31 | +echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'.$faqs_info.'</span>'; |
|
| 32 | 32 | |
| 33 | 33 | // Get the total number of published FAQs |
| 34 | 34 | $totalfaqs = $faqHandler->getFaqsCount($sel_cat, [Constants::SF_STATUS_PUBLISHED, Constants::SF_STATUS_NEW_ANSWER]); |
@@ -39,22 +39,22 @@ discard block |
||
| 39 | 39 | $allCats = $categoryHandler->getObjects(null, true); |
| 40 | 40 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
| 41 | 41 | echo '<tr>'; |
| 42 | -echo "<th width='40' class='bg3' align='center'><b>" . _AM_SF_ARTID . '</b></td>'; |
|
| 43 | -echo "<th width='20%' class='bg3' align='left'><b>" . _AM_SF_ARTCOLNAME . '</b></td>'; |
|
| 44 | -echo "<th class='bg3' align='left'><b>" . _AM_SF_QUESTION . '</b></td>'; |
|
| 42 | +echo "<th width='40' class='bg3' align='center'><b>"._AM_SF_ARTID.'</b></td>'; |
|
| 43 | +echo "<th width='20%' class='bg3' align='left'><b>"._AM_SF_ARTCOLNAME.'</b></td>'; |
|
| 44 | +echo "<th class='bg3' align='left'><b>"._AM_SF_QUESTION.'</b></td>'; |
|
| 45 | 45 | |
| 46 | -echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ASKED . '</b></td>'; |
|
| 47 | -echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ANSWERED . '</b></td>'; |
|
| 46 | +echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ASKED.'</b></td>'; |
|
| 47 | +echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ANSWERED.'</b></td>'; |
|
| 48 | 48 | |
| 49 | -echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_CREATED . '</b></td>'; |
|
| 50 | -echo "<th width='60' class='bg3' align='center'><b>" . _AM_SF_ACTION . '</b></td>'; |
|
| 49 | +echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_CREATED.'</b></td>'; |
|
| 50 | +echo "<th width='60' class='bg3' align='center'><b>"._AM_SF_ACTION.'</b></td>'; |
|
| 51 | 51 | echo '</tr>'; |
| 52 | 52 | if ($totalfaqs > 0) { |
| 53 | 53 | global $pathIcon16, $smartModuleConfig; |
| 54 | 54 | foreach ($faqsObj as $iValue) { |
| 55 | 55 | $categoryObj = $allCats[$iValue->categoryid()]; |
| 56 | - $modify = "<a href='faq.php?op=mod&faqid=" . $iValue->faqid() . "'><img src='" . $pathIcon16 . '/edit.png' . "' title='" . _AM_SF_EDITART . "' alt='" . _AM_SF_EDITART . "'></a>"; |
|
| 57 | - $delete = "<a href='faq.php?op=del&faqid=" . $iValue->faqid() . "'><img src='" . $pathIcon16 . '/delete.png' . "' title='" . _AM_SF_EDITART . "' alt='" . _AM_SF_DELETEART . "'></a>"; |
|
| 56 | + $modify = "<a href='faq.php?op=mod&faqid=".$iValue->faqid()."'><img src='".$pathIcon16.'/edit.png'."' title='"._AM_SF_EDITART."' alt='"._AM_SF_EDITART."'></a>"; |
|
| 57 | + $delete = "<a href='faq.php?op=del&faqid=".$iValue->faqid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_EDITART."' alt='"._AM_SF_DELETEART."'></a>"; |
|
| 58 | 58 | |
| 59 | 59 | //adding name of the Question Submitter |
| 60 | 60 | $requester = Smartfaq\Utility::getLinkedUnameFromId($iValue->uid(), $smartModuleConfig['userealname']); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $criteria->add(new \Criteria('faqid', $iValue->faqid())); |
| 68 | 68 | $criteria->add(new \Criteria('status', true)); |
| 69 | 69 | |
| 70 | - $answerObjects =& $answerHandler->getObjects($criteria, true); |
|
| 70 | + $answerObjects = & $answerHandler->getObjects($criteria, true); |
|
| 71 | 71 | |
| 72 | 72 | foreach (array_keys($answerObjects) as $j) { |
| 73 | 73 | $answerObj = $answerObjects[$j]; |
@@ -82,26 +82,26 @@ discard block |
||
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | echo '<tr>'; |
| 85 | - echo "<td class='head' align='center'>" . $iValue->faqid() . '</td>'; |
|
| 86 | - echo "<td class='even' align='left'>" . $categoryObj->name() . '</td>'; |
|
| 87 | - echo "<td class='even' align='left'><a href='" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/faq.php?faqid=' . $iValue->faqid() . "'>" . $iValue->question(100) . '</a></td>'; |
|
| 85 | + echo "<td class='head' align='center'>".$iValue->faqid().'</td>'; |
|
| 86 | + echo "<td class='even' align='left'>".$categoryObj->name().'</td>'; |
|
| 87 | + echo "<td class='even' align='left'><a href='".XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/faq.php?faqid='.$iValue->faqid()."'>".$iValue->question(100).'</a></td>'; |
|
| 88 | 88 | |
| 89 | - echo "<td class='even' align='center'>" . $requester . '</td>'; |
|
| 90 | - echo "<td class='even' align='center'>" . $answerSubmitter . '</td>'; |
|
| 89 | + echo "<td class='even' align='center'>".$requester.'</td>'; |
|
| 90 | + echo "<td class='even' align='center'>".$answerSubmitter.'</td>'; |
|
| 91 | 91 | |
| 92 | - echo "<td class='even' align='center'>" . $iValue->datesub('s') . '</td>'; |
|
| 92 | + echo "<td class='even' align='center'>".$iValue->datesub('s').'</td>'; |
|
| 93 | 93 | echo "<td class='even' align='center'> $modify $delete </td>"; |
| 94 | 94 | echo '</tr>'; |
| 95 | 95 | } |
| 96 | 96 | } else { |
| 97 | 97 | $faqid = -1; |
| 98 | 98 | echo '<tr>'; |
| 99 | - echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOFAQS . '</td>'; |
|
| 99 | + echo "<td class='head' align='center' colspan= '7'>"._AM_SF_NOFAQS.'</td>'; |
|
| 100 | 100 | echo '</tr>'; |
| 101 | 101 | } |
| 102 | 102 | echo "</table>\n"; |
| 103 | 103 | echo "<br>\n"; |
| 104 | 104 | |
| 105 | 105 | $pagenav = new \XoopsPageNav($totalfaqs, $xoopsModuleConfig['perpage'], $startfaq, 'startfaq', $pagenav_extra_args); |
| 106 | -echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; |
|
| 106 | +echo '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'; |
|
| 107 | 107 | echo '</div>'; |