@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | function smartfaq_search($queryarray, $andor, $limit, $offset, $userid) |
17 | 17 | { |
18 | - include_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php'; |
|
18 | + include_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php'; |
|
19 | 19 | |
20 | 20 | $ret = array(); |
21 | 21 | |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | for ($i = 0, $iMax = count($faqsObj); $i < $iMax; ++$i) { |
27 | 27 | $ret[$i]['image'] = 'assets/images/smartfaq.gif'; |
28 | - $ret[$i]['link'] = 'faq.php?faqid=' . $faqsObj[$i]->faqid(); |
|
28 | + $ret[$i]['link'] = 'faq.php?faqid='.$faqsObj[$i]->faqid(); |
|
29 | 29 | $ret[$i]['title'] = $faqsObj[$i]->question(50); |
30 | 30 | $ret[$i]['time'] = $faqsObj[$i]->getVar('datesub'); |
31 | 31 | $ret[$i]['uid'] = $faqsObj[$i]->uid(); |
@@ -6,8 +6,8 @@ discard block |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -$categoryID = isset($categoryID) ? (int)$categoryID : 0; |
|
10 | -$type = isset($type) ? (int)$type : 3; |
|
9 | +$categoryID = isset($categoryID) ? (int) $categoryID : 0; |
|
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->query('SELECT categoryID, name FROM ' . $xoopsDB->prefix('wbcategories') . ' ORDER BY categoryID'); |
|
24 | + $resultcat = $xoopsDB->query('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') || exit('XOOPS root path not defined'); |
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 ($image != 0) { |
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 ($br != 0) { |
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; |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | } |
148 | 148 | |
149 | 149 | if (!class_exists('NewbbIconHandler')) { |
150 | - require_once dirname(__DIR__) . '/class/icon.php'; |
|
150 | + require_once dirname(__DIR__).'/class/icon.php'; |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | $iconHandler = NewbbIconHandler::instance(); |
@@ -34,22 +34,22 @@ |
||
34 | 34 | |
35 | 35 | if ($category === 'category') { |
36 | 36 | // Assume we have a valid category id |
37 | - $sql = 'SELECT name FROM ' . $xoopsDB->prefix('smartfaq_categories') . ' WHERE categoryid = ' . $item_id; |
|
37 | + $sql = 'SELECT name FROM '.$xoopsDB->prefix('smartfaq_categories').' WHERE categoryid = '.$item_id; |
|
38 | 38 | $result = $xoopsDB->query($sql); // TODO: error check |
39 | 39 | $result_array = $xoopsDB->fetchArray($result); |
40 | 40 | $item['name'] = $result_array['name']; |
41 | - $item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/category.php?categoryid=' . $item_id; |
|
41 | + $item['url'] = XOOPS_URL.'/modules/'.$module->getVar('dirname').'/category.php?categoryid='.$item_id; |
|
42 | 42 | |
43 | 43 | return $item; |
44 | 44 | } |
45 | 45 | |
46 | 46 | if ($category === 'faq') { |
47 | 47 | // Assume we have a valid story id |
48 | - $sql = 'SELECT question FROM ' . $xoopsDB->prefix('smartfaq_faq') . ' WHERE faqid = ' . $item_id; |
|
48 | + $sql = 'SELECT question FROM '.$xoopsDB->prefix('smartfaq_faq').' WHERE faqid = '.$item_id; |
|
49 | 49 | $result = $xoopsDB->query($sql); // TODO: error check |
50 | 50 | $result_array = $xoopsDB->fetchArray($result); |
51 | 51 | $item['name'] = $result_array['question']; |
52 | - $item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/faq.php?faqid=' . $item_id; |
|
52 | + $item['url'] = XOOPS_URL.'/modules/'.$module->getVar('dirname').'/faq.php?faqid='.$item_id; |
|
53 | 53 | |
54 | 54 | return $item; |
55 | 55 | } |
@@ -40,23 +40,23 @@ discard block |
||
40 | 40 | { |
41 | 41 | global $xoopsModuleConfig; |
42 | 42 | |
43 | - $img_path = XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['dir_attachments']; |
|
44 | - $img_url = XOOPS_URL . '/' . $xoopsModuleConfig['dir_attachments']; |
|
45 | - $thumb_path = $img_path . '/thumbs'; |
|
46 | - $thumb_url = $img_url . '/thumbs'; |
|
43 | + $img_path = XOOPS_ROOT_PATH.'/'.$xoopsModuleConfig['dir_attachments']; |
|
44 | + $img_url = XOOPS_URL.'/'.$xoopsModuleConfig['dir_attachments']; |
|
45 | + $thumb_path = $img_path.'/thumbs'; |
|
46 | + $thumb_url = $img_url.'/thumbs'; |
|
47 | 47 | |
48 | - $thumb = $thumb_path . '/' . $source; |
|
49 | - $image = $img_path . '/' . $source; |
|
50 | - $thumb_url = $thumb_url . '/' . $source; |
|
51 | - $image_url = $img_url . '/' . $source; |
|
48 | + $thumb = $thumb_path.'/'.$source; |
|
49 | + $image = $img_path.'/'.$source; |
|
50 | + $thumb_url = $thumb_url.'/'.$source; |
|
51 | + $image_url = $img_url.'/'.$source; |
|
52 | 52 | |
53 | 53 | $imginfo = @getimagesize($image); |
54 | - $img_info = (count($imginfo) > 0) ? $imginfo[0] . 'X' . $imginfo[1] . ' px' : ''; |
|
54 | + $img_info = (count($imginfo) > 0) ? $imginfo[0].'X'.$imginfo[1].' px' : ''; |
|
55 | 55 | |
56 | 56 | if ($xoopsModuleConfig['max_image_width'] > 0 && $xoopsModuleConfig['max_image_height'] > 0) { |
57 | 57 | if ($imginfo[0] > $xoopsModuleConfig['max_image_width'] || $imginfo[1] > $xoopsModuleConfig['max_image_height']) { |
58 | 58 | //if (!file_exists($thumb_path.'/'.$source) && $imginfo[0] > $xoopsModuleConfig['max_img_width']) { |
59 | - if (!file_exists($thumb_path . '/' . $source)) { |
|
59 | + if (!file_exists($thumb_path.'/'.$source)) { |
|
60 | 60 | sf_createThumbnail($source, $xoopsModuleConfig['max_image_width']); |
61 | 61 | } |
62 | 62 | } |
@@ -64,26 +64,26 @@ discard block |
||
64 | 64 | if ($imginfo[0] > $xoopsModuleConfig['max_image_width'] || $imginfo[1] > $xoopsModuleConfig['max_image_height']) { |
65 | 65 | $pseudo_width = $xoopsModuleConfig['max_image_width']; |
66 | 66 | $pseudo_height = $xoopsModuleConfig['max_image_width'] * ($imginfo[1] / $imginfo[0]); |
67 | - $pseudo_size = "width='" . $pseudo_width . "px' height='" . $pseudo_height . "px'"; |
|
67 | + $pseudo_size = "width='".$pseudo_width."px' height='".$pseudo_height."px'"; |
|
68 | 68 | } |
69 | 69 | // irmtfan to fix Undefined variable: pseudo_height |
70 | 70 | if (!empty($pseudo_height) && $xoopsModuleConfig['max_image_height'] > 0 && $pseudo_height > $xoopsModuleConfig['max_image_height']) { |
71 | 71 | $pseudo_height = $xoopsModuleConfig['max_image_height']; |
72 | 72 | $pseudo_width = $xoopsModuleConfig['max_image_height'] * ($imginfo[0] / $imginfo[1]); |
73 | - $pseudo_size = "width='" . $pseudo_width . "px' height='" . $pseudo_height . "px'"; |
|
73 | + $pseudo_size = "width='".$pseudo_width."px' height='".$pseudo_height."px'"; |
|
74 | 74 | } |
75 | 75 | } |
76 | 76 | |
77 | 77 | if (file_exists($thumb)) { |
78 | - $attachmentImage = '<a href="' . $image_url . '" title="' . $source . ' ' . $img_info . '" target="_blank">'; |
|
79 | - $attachmentImage .= '<img src="' . $thumb_url . '" alt="' . $source . ' ' . $img_info . '" />'; |
|
78 | + $attachmentImage = '<a href="'.$image_url.'" title="'.$source.' '.$img_info.'" target="_blank">'; |
|
79 | + $attachmentImage .= '<img src="'.$thumb_url.'" alt="'.$source.' '.$img_info.'" />'; |
|
80 | 80 | $attachmentImage .= '</a>'; |
81 | 81 | } elseif (!empty($pseudo_size)) { |
82 | - $attachmentImage = '<a href="' . $image_url . '" title="' . $source . ' ' . $img_info . '" target="_blank">'; |
|
83 | - $attachmentImage .= '<img src="' . $image_url . '" ' . $pseudo_size . ' alt="' . $source . ' ' . $img_info . '" />'; |
|
82 | + $attachmentImage = '<a href="'.$image_url.'" title="'.$source.' '.$img_info.'" target="_blank">'; |
|
83 | + $attachmentImage .= '<img src="'.$image_url.'" '.$pseudo_size.' alt="'.$source.' '.$img_info.'" />'; |
|
84 | 84 | $attachmentImage .= '</a>'; |
85 | 85 | } elseif (file_exists($image)) { |
86 | - $attachmentImage = '<img src="' . $image_url . '" alt="' . $source . ' ' . $img_info . '" />'; |
|
86 | + $attachmentImage = '<img src="'.$image_url.'" alt="'.$source.' '.$img_info.'" />'; |
|
87 | 87 | } else { |
88 | 88 | $attachmentImage = ''; |
89 | 89 | } |
@@ -100,10 +100,10 @@ discard block |
||
100 | 100 | { |
101 | 101 | global $xoopsModuleConfig; |
102 | 102 | |
103 | - $img_path = XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['dir_attachments']; |
|
104 | - $thumb_path = $img_path . '/thumbs'; |
|
105 | - $src_file = $img_path . '/' . $source; |
|
106 | - $new_file = $thumb_path . '/' . $source; |
|
103 | + $img_path = XOOPS_ROOT_PATH.'/'.$xoopsModuleConfig['dir_attachments']; |
|
104 | + $thumb_path = $img_path.'/thumbs'; |
|
105 | + $src_file = $img_path.'/'.$source; |
|
106 | + $new_file = $thumb_path.'/'.$source; |
|
107 | 107 | //$imageLibs = sf_getImageLibs(); |
108 | 108 | |
109 | 109 | if (!filesize($src_file) || !is_readable($src_file)) { |
@@ -123,20 +123,20 @@ discard block |
||
123 | 123 | return false; |
124 | 124 | } |
125 | 125 | |
126 | - $newWidth = (int)min($imginfo[0], $thumb_width); |
|
127 | - $newHeight = (int)($imginfo[1] * $newWidth / $imginfo[0]); |
|
126 | + $newWidth = (int) min($imginfo[0], $thumb_width); |
|
127 | + $newHeight = (int) ($imginfo[1] * $newWidth / $imginfo[0]); |
|
128 | 128 | |
129 | 129 | if ($xoopsModuleConfig['image_lib'] == 1 or $xoopsModuleConfig['image_lib'] == 0) { |
130 | 130 | if (preg_match("#[A-Z]:|\\\\#Ai", __FILE__)) { |
131 | 131 | $cur_dir = __DIR__; |
132 | - $src_file_im = '"' . $cur_dir . '\\' . strtr($src_file, '/', '\\') . '"'; |
|
133 | - $new_file_im = '"' . $cur_dir . '\\' . strtr($new_file, '/', '\\') . '"'; |
|
132 | + $src_file_im = '"'.$cur_dir.'\\'.strtr($src_file, '/', '\\').'"'; |
|
133 | + $new_file_im = '"'.$cur_dir.'\\'.strtr($new_file, '/', '\\').'"'; |
|
134 | 134 | } else { |
135 | 135 | $src_file_im = @escapeshellarg($src_file); |
136 | 136 | $new_file_im = @escapeshellarg($new_file); |
137 | 137 | } |
138 | - $path = empty($xoopsModuleConfig['path_magick']) ? '' : $xoopsModuleConfig['path_magick'] . '/'; |
|
139 | - $magick_command = $path . 'convert -quality 85 -antialias -sample ' . $newWidth . 'x' . $newHeight . ' ' . $src_file_im . ' +profile "*" ' . str_replace('\\', '/', $new_file_im) . ''; |
|
138 | + $path = empty($xoopsModuleConfig['path_magick']) ? '' : $xoopsModuleConfig['path_magick'].'/'; |
|
139 | + $magick_command = $path.'convert -quality 85 -antialias -sample '.$newWidth.'x'.$newHeight.' '.$src_file_im.' +profile "*" '.str_replace('\\', '/', $new_file_im).''; |
|
140 | 140 | |
141 | 141 | @passthru($magick_command); |
142 | 142 | if (file_exists($new_file)) { |
@@ -145,13 +145,13 @@ discard block |
||
145 | 145 | } |
146 | 146 | |
147 | 147 | if ($xoopsModuleConfig['image_lib'] == 2 or $xoopsModuleConfig['image_lib'] == 0) { |
148 | - $path = empty($xoopsModuleConfig['path_netpbm']) ? '' : $xoopsModuleConfig['path_netpbm'] . '/'; |
|
148 | + $path = empty($xoopsModuleConfig['path_netpbm']) ? '' : $xoopsModuleConfig['path_netpbm'].'/'; |
|
149 | 149 | if (preg_match("/\.png/i", $source)) { |
150 | - $cmd = $path . "pngtopnm $src_file | " . $path . "pnmscale -xysize $newWidth $newHeight | " . $path . "pnmtopng > $new_file"; |
|
150 | + $cmd = $path."pngtopnm $src_file | ".$path."pnmscale -xysize $newWidth $newHeight | ".$path."pnmtopng > $new_file"; |
|
151 | 151 | } elseif (preg_match("/\.(jpg|jpeg)/i", $source)) { |
152 | - $cmd = $path . "jpegtopnm $src_file | " . $path . "pnmscale -xysize $newWidth $newHeight | " . $path . "ppmtojpeg -quality=90 > $new_file"; |
|
152 | + $cmd = $path."jpegtopnm $src_file | ".$path."pnmscale -xysize $newWidth $newHeight | ".$path."ppmtojpeg -quality=90 > $new_file"; |
|
153 | 153 | } elseif (preg_match("/\.gif/i", $source)) { |
154 | - $cmd = $path . "giftopnm $src_file | " . $path . "pnmscale -xysize $newWidth $newHeight | ppmquant 256 | " . $path . "ppmtogif > $new_file"; |
|
154 | + $cmd = $path."giftopnm $src_file | ".$path."pnmscale -xysize $newWidth $newHeight | ppmquant 256 | ".$path."ppmtogif > $new_file"; |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | @exec($cmd, $output, $retval); |
@@ -40,8 +40,8 @@ discard block |
||
40 | 40 | if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) { |
41 | 41 | exit('Access Denied'); |
42 | 42 | } |
43 | -include_once XOOPS_ROOT_PATH . '/class/xoopsblock.php'; |
|
44 | -include XOOPS_ROOT_PATH . '/modules/system/admin/blocksadmin/blocksadmin.php'; |
|
43 | +include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php'; |
|
44 | +include XOOPS_ROOT_PATH.'/modules/system/admin/blocksadmin/blocksadmin.php'; |
|
45 | 45 | |
46 | 46 | $op = 'list'; |
47 | 47 | if (isset($HTTP_POST_VARS)) { |
@@ -53,13 +53,13 @@ discard block |
||
53 | 53 | if (isset($HTTP_GET_VARS['op'])) { |
54 | 54 | if ($HTTP_GET_VARS['op'] === 'edit' || $HTTP_GET_VARS['op'] === 'delete' || $HTTP_GET_VARS['op'] === 'delete_ok' || $HTTP_GET_VARS['op'] === 'clone' || $HTTP_GET_VARS['op'] === 'previewpopup') { |
55 | 55 | $op = $HTTP_GET_VARS['op']; |
56 | - $bid = isset($HTTP_GET_VARS['bid']) ? (int)$HTTP_GET_VARS['bid'] : 0; |
|
56 | + $bid = isset($HTTP_GET_VARS['bid']) ? (int) $HTTP_GET_VARS['bid'] : 0; |
|
57 | 57 | } |
58 | 58 | } |
59 | 59 | |
60 | 60 | if (isset($previewblock)) { |
61 | 61 | xoops_cp_header(); |
62 | - include_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
62 | + include_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
63 | 63 | $xoopsTpl = new XoopsTpl(); |
64 | 64 | $xoopsTpl->xoops_setCaching(0); |
65 | 65 | if (isset($bid)) { |
@@ -79,10 +79,10 @@ discard block |
||
79 | 79 | $myts = MyTextSanitizer::getInstance(); |
80 | 80 | $myblock->setVar('title', $myts->stripSlashesGPC($btitle)); |
81 | 81 | $myblock->setVar('content', $myts->stripSlashesGPC($bcontent)); |
82 | - $dummyhtml = '<html><head><meta http-equiv="content-type" content="text/html; charset=' . _CHARSET . '" /><meta http-equiv="content-language" content="' . _LANGCODE . '" /><title>' . $xoopsConfig['sitename'] . '</title><link rel="stylesheet" type="text/css" media="all" href="' . getcss($xoopsConfig['theme_set']) . '" /></head><body><table><tr><th>' . $myblock->getVar('title') . '</th></tr><tr><td>' . $myblock->getContent('S', $bctype) . '</td></tr></table></body></html>'; |
|
82 | + $dummyhtml = '<html><head><meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" /><meta http-equiv="content-language" content="'._LANGCODE.'" /><title>'.$xoopsConfig['sitename'].'</title><link rel="stylesheet" type="text/css" media="all" href="'.getcss($xoopsConfig['theme_set']).'" /></head><body><table><tr><th>'.$myblock->getVar('title').'</th></tr><tr><td>'.$myblock->getContent('S', $bctype).'</td></tr></table></body></html>'; |
|
83 | 83 | |
84 | - $dummyfile = '_dummyfile_' . time() . '.html'; |
|
85 | - $fp = fopen(XOOPS_CACHE_PATH . '/' . $dummyfile, 'w'); |
|
84 | + $dummyfile = '_dummyfile_'.time().'.html'; |
|
85 | + $fp = fopen(XOOPS_CACHE_PATH.'/'.$dummyfile, 'w'); |
|
86 | 86 | fwrite($fp, $dummyhtml); |
87 | 87 | fclose($fp); |
88 | 88 | $block['edit_form'] = false; |
@@ -93,24 +93,24 @@ discard block |
||
93 | 93 | $block['visible'] = $bvisible; |
94 | 94 | $block['title'] = $myblock->getVar('title', 'E'); |
95 | 95 | $block['content'] = $myblock->getVar('content', 'E'); |
96 | - $block['modules'] =& $bmodule; |
|
96 | + $block['modules'] = & $bmodule; |
|
97 | 97 | $block['ctype'] = isset($bctype) ? $bctype : $myblock->getVar('c_type'); |
98 | 98 | $block['is_custom'] = true; |
99 | - $block['cachetime'] = (int)$bcachetime; |
|
100 | - echo '<a href="admin.php?fct=blocksadmin">' . _AM_BADMIN . '</a> <span style="font-weight:bold;">»»</span> ' . $block['form_title'] . '<br /><br />'; |
|
101 | - include XOOPS_ROOT_PATH . '/modules/system/admin/blocksadmin/blockform.php'; |
|
99 | + $block['cachetime'] = (int) $bcachetime; |
|
100 | + echo '<a href="admin.php?fct=blocksadmin">'._AM_BADMIN.'</a> <span style="font-weight:bold;">»»</span> '.$block['form_title'].'<br /><br />'; |
|
101 | + include XOOPS_ROOT_PATH.'/modules/system/admin/blocksadmin/blockform.php'; |
|
102 | 102 | $form->display(); |
103 | 103 | xoops_cp_footer(); |
104 | 104 | echo '<script type="text/javascript"> |
105 | 105 | <!--// |
106 | - preview_window = openWithSelfMain("' . XOOPS_URL . '/modules/system/admin.php?fct=blocksadmin&op=previewpopup&file=' . $dummyfile . '", "popup", 250, 200); |
|
106 | + preview_window = openWithSelfMain("' . XOOPS_URL.'/modules/system/admin.php?fct=blocksadmin&op=previewpopup&file='.$dummyfile.'", "popup", 250, 200); |
|
107 | 107 | //--> |
108 | 108 | </script>'; |
109 | 109 | exit(); |
110 | 110 | } |
111 | 111 | |
112 | 112 | if ($op === 'previewpopup') { |
113 | - $file = str_replace('..', '', XOOPS_CACHE_PATH . '/' . trim($HTTP_GET_VARS['file'])); |
|
113 | + $file = str_replace('..', '', XOOPS_CACHE_PATH.'/'.trim($HTTP_GET_VARS['file'])); |
|
114 | 114 | if (file_exists($file)) { |
115 | 115 | include $file; |
116 | 116 | @unlink($file); |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | } |
149 | 149 | |
150 | 150 | if ($op === 'update') { |
151 | - $bcachetime = isset($bcachetime) ? (int)$bcachetime : 0; |
|
151 | + $bcachetime = isset($bcachetime) ? (int) $bcachetime : 0; |
|
152 | 152 | $options = isset($options) ? $options : array(); |
153 | 153 | $bcontent = isset($bcontent) ? $bcontent : ''; |
154 | 154 | $bctype = isset($bctype) ? $bctype : ''; |
@@ -239,27 +239,27 @@ discard block |
||
239 | 239 | $sql = sprintf('DELETE FROM %s WHERE block_id = %u', $db->prefix('block_module_link'), $bid); |
240 | 240 | $db->query($sql); |
241 | 241 | foreach ($bmodule as $bmid) { |
242 | - $sql = sprintf('INSERT INTO %s (block_id, module_id) VALUES (%u, %d)', $db->prefix('block_module_link'), $bid, (int)$bmid); |
|
242 | + $sql = sprintf('INSERT INTO %s (block_id, module_id) VALUES (%u, %d)', $db->prefix('block_module_link'), $bid, (int) $bmid); |
|
243 | 243 | $db->query($sql); |
244 | 244 | } |
245 | - include_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
245 | + include_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
246 | 246 | $xoopsTpl = new XoopsTpl(); |
247 | 247 | $xoopsTpl->xoops_setCaching(2); |
248 | 248 | if ($myblock->getVar('template') != '') { |
249 | - if ($xoopsTpl->is_cached('db:' . $myblock->getVar('template'))) { |
|
250 | - if (!$xoopsTpl->clear_cache('db:' . $myblock->getVar('template'))) { |
|
251 | - $msg = 'Unable to clear cache for block ID' . $bid; |
|
249 | + if ($xoopsTpl->is_cached('db:'.$myblock->getVar('template'))) { |
|
250 | + if (!$xoopsTpl->clear_cache('db:'.$myblock->getVar('template'))) { |
|
251 | + $msg = 'Unable to clear cache for block ID'.$bid; |
|
252 | 252 | } |
253 | 253 | } |
254 | 254 | } else { |
255 | - if ($xoopsTpl->is_cached('db:system_dummy.html', 'block' . $bid)) { |
|
256 | - if (!$xoopsTpl->clear_cache('db:system_dummy.html', 'block' . $bid)) { |
|
257 | - $msg = 'Unable to clear cache for block ID' . $bid; |
|
255 | + if ($xoopsTpl->is_cached('db:system_dummy.html', 'block'.$bid)) { |
|
256 | + if (!$xoopsTpl->clear_cache('db:system_dummy.html', 'block'.$bid)) { |
|
257 | + $msg = 'Unable to clear cache for block ID'.$bid; |
|
258 | 258 | } |
259 | 259 | } |
260 | 260 | } |
261 | 261 | } else { |
262 | - $msg = 'Failed update of block. ID:' . $bid; |
|
262 | + $msg = 'Failed update of block. ID:'.$bid; |
|
263 | 263 | } |
264 | 264 | |
265 | 265 | return $msg; // GIJ + |
@@ -9,9 +9,9 @@ |
||
9 | 9 | |
10 | 10 | global $_POST; |
11 | 11 | |
12 | -include_once XOOPS_ROOT_PATH . '/class/xoopstree.php'; |
|
13 | -include_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; |
|
14 | -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
12 | +include_once XOOPS_ROOT_PATH.'/class/xoopstree.php'; |
|
13 | +include_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
14 | +include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
15 | 15 | |
16 | 16 | $form = new XoopsThemeForm(_MD_SF_REQUEST, 'form', xoops_getenv('PHP_SELF')); |
17 | 17 | // CATEGORY |
@@ -9,9 +9,9 @@ discard block |
||
9 | 9 | |
10 | 10 | global $_POST, $xoopsDB; |
11 | 11 | |
12 | -include_once XOOPS_ROOT_PATH . '/class/xoopstree.php'; |
|
13 | -include_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; |
|
14 | -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
12 | +include_once XOOPS_ROOT_PATH.'/class/xoopstree.php'; |
|
13 | +include_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
14 | +include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
15 | 15 | |
16 | 16 | include_once 'functions.php'; |
17 | 17 | |
@@ -70,18 +70,18 @@ discard block |
||
70 | 70 | // $upload_tray->addElement(new XoopsFormFile('', 'userfile', ($forum_obj->getVar('attach_maxkb') * 1024))); |
71 | 71 | $upload_tray->addElement(new XoopsFormFile('', 'userfile', $xoopsModuleConfig['max_image_size'] * 1024)); |
72 | 72 | $upload_tray->addElement(new XoopsFormButton('', 'contents_upload', _MD_SF_UPLOAD, 'submit')); |
73 | -$upload_tray->addElement(new XoopsFormLabel('<br /><br />' . _MD_SF_MAX_FILESIZE . ':', $xoopsModuleConfig['max_image_size'] . 'Kb; ')); |
|
73 | +$upload_tray->addElement(new XoopsFormLabel('<br /><br />'._MD_SF_MAX_FILESIZE.':', $xoopsModuleConfig['max_image_size'].'Kb; ')); |
|
74 | 74 | $extensions = trim(str_replace('|', ' ', $xoopsModuleConfig['attach_ext'])); |
75 | 75 | $extensions = (empty($extensions) || $extensions === '*') ? _ALL : $extensions; |
76 | -$upload_tray->addElement(new XoopsFormLabel(_MD_SF_ALLOWED_EXTENSIONS . ':', $extensions)); |
|
77 | -$upload_tray->addElement(new XoopsFormLabel('<br />' . sprintf(_MD_SF_MAXPIC, $xoopsModuleConfig['max_img_height'], $xoopsModuleConfig['max_img_width']))); |
|
76 | +$upload_tray->addElement(new XoopsFormLabel(_MD_SF_ALLOWED_EXTENSIONS.':', $extensions)); |
|
77 | +$upload_tray->addElement(new XoopsFormLabel('<br />'.sprintf(_MD_SF_MAXPIC, $xoopsModuleConfig['max_img_height'], $xoopsModuleConfig['max_img_width']))); |
|
78 | 78 | $form->addElement($upload_tray); |
79 | 79 | //} |
80 | 80 | |
81 | 81 | if (!empty($attachments) && is_array($attachments) && count($attachments)) { |
82 | 82 | $delete_attach_checkbox = new XoopsFormCheckBox(_MD_SF_ATTACHED_FILES, 'delete_attach[]'); |
83 | 83 | foreach ($attachments as $key => $attachment) { |
84 | - $attach = ' ' . _DELETE . ' <a href=' . XOOPS_URL . '/' . $xoopsModuleConfig['dir_attachments'] . '/' . $attachment['name_saved'] . ' rel="external">' . $attachment['name_display'] . '</a><br />'; |
|
84 | + $attach = ' '._DELETE.' <a href='.XOOPS_URL.'/'.$xoopsModuleConfig['dir_attachments'].'/'.$attachment['name_saved'].' rel="external">'.$attachment['name_display'].'</a><br />'; |
|
85 | 85 | $delete_attach_checkbox->addOption($key, $attach); |
86 | 86 | } |
87 | 87 | $form->addElement($delete_attach_checkbox); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $delete_attach_checkbox = new XoopsFormCheckBox(_MD_REMOVE, 'delete_tmp[]'); |
93 | 93 | $url_prefix = str_replace(XOOPS_ROOT_PATH, XOOPS_URL, XOOPS_CACHE_PATH); |
94 | 94 | foreach ($attachments_tmp as $key => $attachment) { |
95 | - $attach = ' <a href="' . $url_prefix . '/' . $attachment[0] . '" rel="external">' . $attachment[1] . '</a><br />'; |
|
95 | + $attach = ' <a href="'.$url_prefix.'/'.$attachment[0].'" rel="external">'.$attachment[1].'</a><br />'; |
|
96 | 96 | $delete_attach_checkbox->addOption($key, $attach); |
97 | 97 | } |
98 | 98 | $form->addElement($delete_attach_checkbox); |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | |
24 | 24 | sf_collapsableBar('toptable', 'toptableicon'); |
25 | 25 | |
26 | -echo "<img id='toptableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . $faqs_title . '</h3>'; |
|
26 | +echo "<img id='toptableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> ".$faqs_title.'</h3>'; |
|
27 | 27 | echo "<div id='toptable'>"; |
28 | -echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . $faqs_info . '</span>'; |
|
28 | +echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">".$faqs_info.'</span>'; |
|
29 | 29 | |
30 | 30 | // Get the total number of published FAQs |
31 | 31 | $totalfaqs = $faqHandler->getFaqsCount($sel_cat, array(_SF_STATUS_PUBLISHED, _SF_STATUS_NEW_ANSWER)); |
@@ -36,22 +36,22 @@ discard block |
||
36 | 36 | $allcats = $categoryHandler->getObjects(null, true); |
37 | 37 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
38 | 38 | echo '<tr>'; |
39 | -echo "<th width='40' class='bg3' align='center'><b>" . _AM_SF_ARTID . '</b></td>'; |
|
40 | -echo "<th width='20%' class='bg3' align='left'><b>" . _AM_SF_ARTCOLNAME . '</b></td>'; |
|
41 | -echo "<th class='bg3' align='left'><b>" . _AM_SF_QUESTION . '</b></td>'; |
|
39 | +echo "<th width='40' class='bg3' align='center'><b>"._AM_SF_ARTID.'</b></td>'; |
|
40 | +echo "<th width='20%' class='bg3' align='left'><b>"._AM_SF_ARTCOLNAME.'</b></td>'; |
|
41 | +echo "<th class='bg3' align='left'><b>"._AM_SF_QUESTION.'</b></td>'; |
|
42 | 42 | |
43 | -echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ASKED . '</b></td>'; |
|
44 | -echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ANSWERED . '</b></td>'; |
|
43 | +echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ASKED.'</b></td>'; |
|
44 | +echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ANSWERED.'</b></td>'; |
|
45 | 45 | |
46 | -echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_CREATED . '</b></td>'; |
|
47 | -echo "<th width='60' class='bg3' align='center'><b>" . _AM_SF_ACTION . '</b></td>'; |
|
46 | +echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_CREATED.'</b></td>'; |
|
47 | +echo "<th width='60' class='bg3' align='center'><b>"._AM_SF_ACTION.'</b></td>'; |
|
48 | 48 | echo '</tr>'; |
49 | 49 | if ($totalfaqs > 0) { |
50 | 50 | global $pathIcon16, $smartModuleConfig; |
51 | 51 | for ($i = 0; $i < $totalFaqsOnPage; ++$i) { |
52 | - $categoryObj =& $allcats[$faqsObj[$i]->categoryid()]; |
|
53 | - $modify = "<a href='faq.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/edit.png' . "' title='" . _AM_SF_EDITART . "' alt='" . _AM_SF_EDITART . "' /></a>"; |
|
54 | - $delete = "<a href='faq.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/delete.png' . "' title='" . _AM_SF_EDITART . "' alt='" . _AM_SF_DELETEART . "'/></a>"; |
|
52 | + $categoryObj = & $allcats[$faqsObj[$i]->categoryid()]; |
|
53 | + $modify = "<a href='faq.php?op=mod&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/edit.png'."' title='"._AM_SF_EDITART."' alt='"._AM_SF_EDITART."' /></a>"; |
|
54 | + $delete = "<a href='faq.php?op=del&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_EDITART."' alt='"._AM_SF_DELETEART."'/></a>"; |
|
55 | 55 | |
56 | 56 | //adding name of the Question Submitter |
57 | 57 | $requester = sf_getLinkedUnameFromId($faqsObj[$i]->uid(), $smartModuleConfig['userealname']); |
@@ -79,26 +79,26 @@ discard block |
||
79 | 79 | } |
80 | 80 | |
81 | 81 | echo '<tr>'; |
82 | - echo "<td class='head' align='center'>" . $faqsObj[$i]->faqid() . '</td>'; |
|
83 | - echo "<td class='even' align='left'>" . $categoryObj->name() . '</td>'; |
|
84 | - echo "<td class='even' align='left'><a href='" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/faq.php?faqid=' . $faqsObj[$i]->faqid() . "'>" . $faqsObj[$i]->question(100) . '</a></td>'; |
|
82 | + echo "<td class='head' align='center'>".$faqsObj[$i]->faqid().'</td>'; |
|
83 | + echo "<td class='even' align='left'>".$categoryObj->name().'</td>'; |
|
84 | + echo "<td class='even' align='left'><a href='".XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/faq.php?faqid='.$faqsObj[$i]->faqid()."'>".$faqsObj[$i]->question(100).'</a></td>'; |
|
85 | 85 | |
86 | - echo "<td class='even' align='center'>" . $requester . '</td>'; |
|
87 | - echo "<td class='even' align='center'>" . $answerSubmitter . '</td>'; |
|
86 | + echo "<td class='even' align='center'>".$requester.'</td>'; |
|
87 | + echo "<td class='even' align='center'>".$answerSubmitter.'</td>'; |
|
88 | 88 | |
89 | - echo "<td class='even' align='center'>" . $faqsObj[$i]->datesub('s') . '</td>'; |
|
89 | + echo "<td class='even' align='center'>".$faqsObj[$i]->datesub('s').'</td>'; |
|
90 | 90 | echo "<td class='even' align='center'> $modify $delete </td>"; |
91 | 91 | echo '</tr>'; |
92 | 92 | } |
93 | 93 | } else { |
94 | 94 | $faqid = -1; |
95 | 95 | echo '<tr>'; |
96 | - echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOFAQS . '</td>'; |
|
96 | + echo "<td class='head' align='center' colspan= '7'>"._AM_SF_NOFAQS.'</td>'; |
|
97 | 97 | echo '</tr>'; |
98 | 98 | } |
99 | 99 | echo "</table>\n"; |
100 | 100 | echo "<br />\n"; |
101 | 101 | |
102 | 102 | $pagenav = new XoopsPageNav($totalfaqs, $xoopsModuleConfig['perpage'], $startfaq, 'startfaq', $pagenav_extra_args); |
103 | -echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; |
|
103 | +echo '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'; |
|
104 | 104 | echo '</div>'; |