@@ -80,17 +80,17 @@ |
||
| 80 | 80 | $comment->setVar('com_rootid', $com_rootid); |
| 81 | 81 | $comment->setVar('com_ip', xoops_getenv('REMOTE_ADDR')); |
| 82 | 82 | switch ($tb_status) { |
| 83 | - case 2: |
|
| 84 | - $comment->setVar('com_status', 2); |
|
| 85 | - $call_approvefunc = true; |
|
| 86 | - $call_updatefunc = true; |
|
| 87 | - $notify_event = 'comment'; |
|
| 88 | - break; |
|
| 89 | - case 1: |
|
| 90 | - default: |
|
| 91 | - $comment->setVar('com_status', 1); |
|
| 92 | - $notify_event = 'comment_submit'; |
|
| 93 | - break; |
|
| 83 | + case 2: |
|
| 84 | + $comment->setVar('com_status', 2); |
|
| 85 | + $call_approvefunc = true; |
|
| 86 | + $call_updatefunc = true; |
|
| 87 | + $notify_event = 'comment'; |
|
| 88 | + break; |
|
| 89 | + case 1: |
|
| 90 | + default: |
|
| 91 | + $comment->setVar('com_status', 1); |
|
| 92 | + $notify_event = 'comment_submit'; |
|
| 93 | + break; |
|
| 94 | 94 | } |
| 95 | 95 | $comment->setVar('com_uid', 0); |
| 96 | 96 | $com_title = xoops_trim($com_title); |
@@ -39,21 +39,21 @@ discard block |
||
| 39 | 39 | if (empty($xoopsModuleConfig['trackback_option'])) { |
| 40 | 40 | planet_trackback_response(1, 'Trackback is closed'); |
| 41 | 41 | } |
| 42 | -if( !strlen( $title.$url.$blog_name ) ) { |
|
| 42 | +if (!strlen($title.$url.$blog_name)) { |
|
| 43 | 43 | planet_trackback_response(1, planet_constant("MD_INVALID")); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | |
| 47 | -if ( !empty($article_id) && !empty($url)) { |
|
| 47 | +if (!empty($article_id) && !empty($url)) { |
|
| 48 | 48 | |
| 49 | - $trackback_handler =& xoops_getmodulehandler("trackback", $GLOBALS["moddirname"]); |
|
| 49 | + $trackback_handler = & xoops_getmodulehandler("trackback", $GLOBALS["moddirname"]); |
|
| 50 | 50 | $criteria = new CriteriaCompo(new Criteria('art_id', $article_id)); |
| 51 | 51 | $criteria->add(new Criteria('tb_url', $url)); |
| 52 | - if($trackback_handler->getCount($criteria)>0){ |
|
| 52 | + if ($trackback_handler->getCount($criteria)>0) { |
|
| 53 | 53 | planet_trackback_response(1, 'We already have a ping from that URI for this article.'); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | - $charset = (empty($charset))?'utf-8':$charset; |
|
| 56 | + $charset = (empty($charset)) ? 'utf-8' : $charset; |
|
| 57 | 57 | $title = XoopsLocal::convert_encoding($title, _CHARSET, $charset); |
| 58 | 58 | $excerpt = XoopsLocal::convert_encoding($excerpt, _CHARSET, $charset); |
| 59 | 59 | $blog_name = XoopsLocal::convert_encoding($blog_name, _CHARSET, $charset); |
@@ -65,14 +65,14 @@ discard block |
||
| 65 | 65 | $com_title = $title; |
| 66 | 66 | $com_text = $excerpt; |
| 67 | 67 | $com_text .= "\n\n[TRACKBACK]"._POSTEDBY.": "; |
| 68 | - if(!empty($url)){ |
|
| 68 | + if (!empty($url)) { |
|
| 69 | 69 | $com_text .= "[url=".$url."]".$blog_name."[/url]"; |
| 70 | - }else{ |
|
| 70 | + }else { |
|
| 71 | 71 | $com_text .= $blog_name; |
| 72 | 72 | } |
| 73 | 73 | $com_modid = $xoopsModule->getVar("mid"); |
| 74 | 74 | |
| 75 | - $comment_handler =& xoops_gethandler('comment'); |
|
| 75 | + $comment_handler = & xoops_gethandler('comment'); |
|
| 76 | 76 | $comment = $comment_handler->create(); |
| 77 | 77 | $comment->setVar('com_created', time()); |
| 78 | 78 | $comment->setVar('com_pid', $com_pid); |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | if (!function_exists($comment_config['callback']['approve'])) { |
| 128 | 128 | $skip = true; |
| 129 | 129 | } |
| 130 | - } else { |
|
| 130 | + }else { |
|
| 131 | 131 | $skip = true; |
| 132 | 132 | } |
| 133 | 133 | } |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | if (!function_exists($comment_config['callback']['update'])) { |
| 149 | 149 | $skip = true; |
| 150 | 150 | } |
| 151 | - } else { |
|
| 151 | + }else { |
|
| 152 | 152 | $skip = true; |
| 153 | 153 | } |
| 154 | 154 | } |
@@ -166,8 +166,8 @@ discard block |
||
| 166 | 166 | // trigger notification event if necessary |
| 167 | 167 | if ($notify_event) { |
| 168 | 168 | $not_modid = $com_modid; |
| 169 | - include_once XOOPS_ROOT_PATH . '/include/notification_functions.php'; |
|
| 170 | - $not_catinfo =& notificationCommentCategoryInfo($not_modid); |
|
| 169 | + include_once XOOPS_ROOT_PATH.'/include/notification_functions.php'; |
|
| 170 | + $not_catinfo = & notificationCommentCategoryInfo($not_modid); |
|
| 171 | 171 | $not_category = $not_catinfo['name']; |
| 172 | 172 | $not_itemid = $com_itemid; |
| 173 | 173 | $not_event = $notify_event; |
@@ -175,19 +175,19 @@ discard block |
||
| 175 | 175 | // point to a viewable page (i.e. not the system administration |
| 176 | 176 | // module). |
| 177 | 177 | $comment_tags = array(); |
| 178 | - $not_module =& $xoopsModule; |
|
| 178 | + $not_module = & $xoopsModule; |
|
| 179 | 179 | if (!isset($comment_url)) { |
| 180 | - $com_config =& $not_module->getInfo('comments'); |
|
| 181 | - $comment_url = $com_config['pageName'] . '?'; |
|
| 180 | + $com_config = & $not_module->getInfo('comments'); |
|
| 181 | + $comment_url = $com_config['pageName'].'?'; |
|
| 182 | 182 | $comment_url .= $com_config['itemName']; |
| 183 | 183 | } |
| 184 | - $comment_tags['X_COMMENT_URL'] = XOOPS_URL . '/modules/' . $not_module->getVar('dirname') . '/' .$comment_url . '=' . $com_itemid.'&com_id='.$newcid.'&com_rootid='.$com_rootid.'&com_mode='.$com_mode.'&com_order='.$com_order.'#comment'.$newcid; |
|
| 185 | - $notification_handler =& xoops_gethandler('notification'); |
|
| 186 | - $notification_handler->triggerEvent ($not_category, $not_itemid, $not_event, $comment_tags, false, $not_modid); |
|
| 184 | + $comment_tags['X_COMMENT_URL'] = XOOPS_URL.'/modules/'.$not_module->getVar('dirname').'/'.$comment_url.'='.$com_itemid.'&com_id='.$newcid.'&com_rootid='.$com_rootid.'&com_mode='.$com_mode.'&com_order='.$com_order.'#comment'.$newcid; |
|
| 185 | + $notification_handler = & xoops_gethandler('notification'); |
|
| 186 | + $notification_handler->triggerEvent($not_category, $not_itemid, $not_event, $comment_tags, false, $not_modid); |
|
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | planet_trackback_response(0); |
| 190 | - } else { |
|
| 190 | + }else { |
|
| 191 | 191 | planet_trackback_response(1, xoops_error($comment->getHtmlErrors())); |
| 192 | 192 | } |
| 193 | 193 | } |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | $com_text .= "\n\n[TRACKBACK]"._POSTEDBY.": "; |
| 68 | 68 | if(!empty($url)){ |
| 69 | 69 | $com_text .= "[url=".$url."]".$blog_name."[/url]"; |
| 70 | - }else{ |
|
| 70 | + } else{ |
|
| 71 | 71 | $com_text .= $blog_name; |
| 72 | 72 | } |
| 73 | 73 | $com_modid = $xoopsModule->getVar("mid"); |
@@ -57,8 +57,8 @@ |
||
| 57 | 57 | $modversion['min_xoops'] = "2.5.6"; |
| 58 | 58 | $modversion['min_admin'] = '1.1'; |
| 59 | 59 | $modversion['min_db'] = array( |
| 60 | - 'mysql' => '5.0.7', |
|
| 61 | - 'mysqli' => '5.0.7' |
|
| 60 | + 'mysql' => '5.0.7', |
|
| 61 | + 'mysqli' => '5.0.7' |
|
| 62 | 62 | ); |
| 63 | 63 | |
| 64 | 64 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | // Project: Article Project // |
| 26 | 26 | // ------------------------------------------------------------------------ // |
| 27 | 27 | |
| 28 | -if (!defined('XOOPS_ROOT_PATH')){ exit(); } |
|
| 28 | +if (!defined('XOOPS_ROOT_PATH')) { exit(); } |
|
| 29 | 29 | |
| 30 | 30 | include dirname(__FILE__)."/include/vars.php"; |
| 31 | 31 | |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | $modversion["pages"][3] = array("url"=>"view.article.php", "name"=>planet_constant("MI_PAGE_ARTICLE")); |
| 87 | 87 | $modversion["pages"][4] = array("url"=>"view.archive.php", "name"=>planet_constant("MI_PAGE_ARCHIVE")); |
| 88 | 88 | $modversion["pages"][5] = array("url"=>"view.list.php", "name"=>planet_constant("MI_PAGE_LIST")); |
| 89 | -$modversion["sub"][1] = array("name" => planet_constant("MI_SUBMIT"), "url"=>"action.blog.php"); |
|
| 89 | +$modversion["sub"][1] = array("name" => planet_constant("MI_SUBMIT"), "url"=>"action.blog.php"); |
|
| 90 | 90 | |
| 91 | 91 | // Use smarty |
| 92 | 92 | $modversion["use_smarty"] = 1; |
@@ -97,17 +97,17 @@ discard block |
||
| 97 | 97 | /** |
| 98 | 98 | * Templates |
| 99 | 99 | */ |
| 100 | -$modversion['templates'][] = array( "file" => $GLOBALS["VAR_PREFIX"]."_index.html", "description"=>""); |
|
| 101 | -$modversion['templates'][] = array( "file" => $GLOBALS["VAR_PREFIX"]."_article.html", "description"=>""); |
|
| 102 | -$modversion['templates'][] = array( "file" => $GLOBALS["VAR_PREFIX"]."_archive.html", "description"=>""); |
|
| 103 | -$modversion['templates'][] = array( "file" => $GLOBALS["VAR_PREFIX"]."_blogs.html", "description"=>""); |
|
| 104 | -$modversion['templates'][] = array( "file" => $GLOBALS["VAR_PREFIX"]."_search.html", "description"=>""); |
|
| 100 | +$modversion['templates'][] = array("file" => $GLOBALS["VAR_PREFIX"]."_index.html", "description"=>""); |
|
| 101 | +$modversion['templates'][] = array("file" => $GLOBALS["VAR_PREFIX"]."_article.html", "description"=>""); |
|
| 102 | +$modversion['templates'][] = array("file" => $GLOBALS["VAR_PREFIX"]."_archive.html", "description"=>""); |
|
| 103 | +$modversion['templates'][] = array("file" => $GLOBALS["VAR_PREFIX"]."_blogs.html", "description"=>""); |
|
| 104 | +$modversion['templates'][] = array("file" => $GLOBALS["VAR_PREFIX"]."_search.html", "description"=>""); |
|
| 105 | 105 | |
| 106 | 106 | //module css |
| 107 | 107 | $modversion['css'] = 'templates/style.css'; |
| 108 | 108 | |
| 109 | 109 | // Blocks |
| 110 | -$i=0; |
|
| 110 | +$i = 0; |
|
| 111 | 111 | |
| 112 | 112 | $i++; |
| 113 | 113 | $modversion["blocks"][$i]["file"] = "block.php"; |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | $modversion["notification"]["lookup_file"] = "include/notification.inc.php"; |
| 310 | 310 | $modversion["notification"]["lookup_func"] = $GLOBALS["VAR_PREFIX"]."_notify_iteminfo"; |
| 311 | 311 | |
| 312 | -$i=0; |
|
| 312 | +$i = 0; |
|
| 313 | 313 | $i++; |
| 314 | 314 | $modversion["notification"]["category"][$i]["name"] = "global"; |
| 315 | 315 | $modversion["notification"]["category"][$i]["title"] = planet_constant("MI_GLOBAL_NOTIFY"); |
@@ -333,7 +333,7 @@ discard block |
||
| 333 | 333 | $modversion["notification"]["category"][$i]["item_name"] = "article"; |
| 334 | 334 | $modversion["notification"]["category"][$i]["allow_bookmark"] = 1; |
| 335 | 335 | |
| 336 | -$i=0; |
|
| 336 | +$i = 0; |
|
| 337 | 337 | $i++; |
| 338 | 338 | $modversion["notification"]["event"][$i]["name"] = "blog_submit"; |
| 339 | 339 | $modversion["notification"]["event"][$i]["category"] = "global"; |
@@ -132,18 +132,18 @@ |
||
| 132 | 132 | |
| 133 | 133 | $tags = empty($list) ? "" : array($blog_prefix."blog_title", $blog_prefix."blog_time"); |
| 134 | 134 | switch($query_type){ |
| 135 | -case "category": |
|
| 136 | - $blogs_obj =& $blog_handler->getByCategory($criteria, $tags); |
|
| 137 | - $count_blog = $blog_handler->getCountByCategory($criteria); |
|
| 138 | - break; |
|
| 139 | -case "bookmark": |
|
| 140 | - $blogs_obj =& $blog_handler->getByBookmark($criteria, $tags); |
|
| 141 | - $count_blog = $blog_handler->getCountByBookmark($criteria); |
|
| 142 | - break; |
|
| 143 | -default: |
|
| 144 | - $blogs_obj =& $blog_handler->getAll($criteria, $tags); |
|
| 145 | - $count_blog = $blog_handler->getCount($criteria); |
|
| 146 | - break; |
|
| 135 | + case "category": |
|
| 136 | + $blogs_obj =& $blog_handler->getByCategory($criteria, $tags); |
|
| 137 | + $count_blog = $blog_handler->getCountByCategory($criteria); |
|
| 138 | + break; |
|
| 139 | + case "bookmark": |
|
| 140 | + $blogs_obj =& $blog_handler->getByBookmark($criteria, $tags); |
|
| 141 | + $count_blog = $blog_handler->getCountByBookmark($criteria); |
|
| 142 | + break; |
|
| 143 | + default: |
|
| 144 | + $blogs_obj =& $blog_handler->getAll($criteria, $tags); |
|
| 145 | + $count_blog = $blog_handler->getCount($criteria); |
|
| 146 | + break; |
|
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | /* Objects to array */ |
@@ -26,26 +26,26 @@ discard block |
||
| 26 | 26 | // ------------------------------------------------------------------------ // |
| 27 | 27 | include "header.php"; |
| 28 | 28 | |
| 29 | -if(preg_match("/\/notification_update\.php/i", $_SERVER['REQUEST_URI'], $matches)){ |
|
| 29 | +if (preg_match("/\/notification_update\.php/i", $_SERVER['REQUEST_URI'], $matches)) { |
|
| 30 | 30 | include XOOPS_ROOT_PATH.'/include/notification_update.php'; |
| 31 | 31 | exit(); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | -if($REQUEST_URI_parsed = planet_parse_args($args_num, $args, $args_str)){ |
|
| 34 | +if ($REQUEST_URI_parsed = planet_parse_args($args_num, $args, $args_str)) { |
|
| 35 | 35 | $args["start"] = @$args_num[0]; |
| 36 | 36 | $args["sort"] = @$args_str[0]; |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | /* Start */ |
| 40 | -$start = intval( empty($_GET["start"])?@$args["start"]:$_GET["start"] ); |
|
| 40 | +$start = intval(empty($_GET["start"]) ? @$args["start"] : $_GET["start"]); |
|
| 41 | 41 | /* Specified Category */ |
| 42 | -$category_id = intval( empty($_GET["category"])?@$args["category"]:$_GET["category"] ); |
|
| 42 | +$category_id = intval(empty($_GET["category"]) ? @$args["category"] : $_GET["category"]); |
|
| 43 | 43 | /* Specified Bookmar(Favorite) UID */ |
| 44 | -$uid = intval( empty($_GET["uid"])?@$args["uid"]:$_GET["uid"] ); |
|
| 44 | +$uid = intval(empty($_GET["uid"]) ? @$args["uid"] : $_GET["uid"]); |
|
| 45 | 45 | /* Sort by term */ |
| 46 | -$sort = empty($_GET["sort"])?@$args["sort"]:$_GET["sort"]; |
|
| 46 | +$sort = empty($_GET["sort"]) ? @$args["sort"] : $_GET["sort"]; |
|
| 47 | 47 | /* Display as list */ |
| 48 | -$list = intval( empty($_GET["list"])?@$args["list"]:$_GET["list"] ); |
|
| 48 | +$list = intval(empty($_GET["list"]) ? @$args["list"] : $_GET["list"]); |
|
| 49 | 49 | /* |
| 50 | 50 | // restore $_SERVER['REQUEST_URI'] |
| 51 | 51 | if(!empty($REQUEST_URI_parsed)){ |
@@ -64,37 +64,37 @@ discard block |
||
| 64 | 64 | } |
| 65 | 65 | */ |
| 66 | 66 | |
| 67 | -$xoopsOption["xoops_pagetitle"] = $xoopsModule->getVar("name"). " - " . planet_constant("MD_BLOGS"); |
|
| 67 | +$xoopsOption["xoops_pagetitle"] = $xoopsModule->getVar("name")." - ".planet_constant("MD_BLOGS"); |
|
| 68 | 68 | $xoopsOption["template_main"] = planet_getTemplate("blogs"); |
| 69 | -include_once( XOOPS_ROOT_PATH . "/header.php" ); |
|
| 69 | +include_once(XOOPS_ROOT_PATH."/header.php"); |
|
| 70 | 70 | include XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/include/vars.php"; |
| 71 | 71 | |
| 72 | 72 | // Following part will not be executed after cache |
| 73 | -$category_handler =& xoops_getmodulehandler("category", $GLOBALS["moddirname"]); |
|
| 74 | -$blog_handler =& xoops_getmodulehandler("blog", $GLOBALS["moddirname"]); |
|
| 73 | +$category_handler = & xoops_getmodulehandler("category", $GLOBALS["moddirname"]); |
|
| 74 | +$blog_handler = & xoops_getmodulehandler("blog", $GLOBALS["moddirname"]); |
|
| 75 | 75 | |
| 76 | -$limit = empty($list)? $xoopsModuleConfig["articles_perpage"] : $xoopsModuleConfig["list_perpage"]; |
|
| 76 | +$limit = empty($list) ? $xoopsModuleConfig["articles_perpage"] : $xoopsModuleConfig["list_perpage"]; |
|
| 77 | 77 | |
| 78 | 78 | $query_type = ""; |
| 79 | 79 | $criteria = new CriteriaCompo(); |
| 80 | 80 | $blog_prefix = ""; |
| 81 | 81 | /* Specific category */ |
| 82 | -if($category_id >0){ |
|
| 82 | +if ($category_id>0) { |
|
| 83 | 83 | $category_obj = $category_handler->get($category_id); |
| 84 | 84 | $criteria->add(new Criteria("bc.cat_id", $category_id)); |
| 85 | 85 | $uid = 0; |
| 86 | 86 | $blog_id = 0; |
| 87 | - $category_data = array( "id" => $category_id, "title" => $category_obj->getVar("cat_title") ); |
|
| 87 | + $category_data = array("id" => $category_id, "title" => $category_obj->getVar("cat_title")); |
|
| 88 | 88 | $query_type = "category"; |
| 89 | 89 | $blog_prefix = "b."; |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | /* User bookmarks(favorites) */ |
| 93 | -if($uid >0){ |
|
| 93 | +if ($uid>0) { |
|
| 94 | 94 | $criteria->add(new Criteria("bm.bm_uid", $uid)); |
| 95 | 95 | $category_id = 0; |
| 96 | 96 | $blog_id = 0; |
| 97 | - $bookmark_handler =& xoops_getmodulehandler("bookmark", $GLOBALS["moddirname"]); |
|
| 97 | + $bookmark_handler = & xoops_getmodulehandler("bookmark", $GLOBALS["moddirname"]); |
|
| 98 | 98 | $user_data = array( |
| 99 | 99 | "uid" => $uid, |
| 100 | 100 | "name" => XoopsUser::getUnameFromID($uid), |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | /* Sort */ |
| 110 | 110 | $order = "DESC"; |
| 111 | 111 | $sort = empty($sort) ? "default" : $sort; |
| 112 | -switch($sort){ |
|
| 112 | +switch ($sort) { |
|
| 113 | 113 | case "marks": |
| 114 | 114 | $sortby = $blog_prefix."blog_marks"; |
| 115 | 115 | break; |
@@ -131,17 +131,17 @@ discard block |
||
| 131 | 131 | $criteria->setLimit($limit); |
| 132 | 132 | |
| 133 | 133 | $tags = empty($list) ? "" : array($blog_prefix."blog_title", $blog_prefix."blog_time"); |
| 134 | -switch($query_type){ |
|
| 134 | +switch ($query_type) { |
|
| 135 | 135 | case "category": |
| 136 | - $blogs_obj =& $blog_handler->getByCategory($criteria, $tags); |
|
| 136 | + $blogs_obj = & $blog_handler->getByCategory($criteria, $tags); |
|
| 137 | 137 | $count_blog = $blog_handler->getCountByCategory($criteria); |
| 138 | 138 | break; |
| 139 | 139 | case "bookmark": |
| 140 | - $blogs_obj =& $blog_handler->getByBookmark($criteria, $tags); |
|
| 140 | + $blogs_obj = & $blog_handler->getByBookmark($criteria, $tags); |
|
| 141 | 141 | $count_blog = $blog_handler->getCountByBookmark($criteria); |
| 142 | 142 | break; |
| 143 | 143 | default: |
| 144 | - $blogs_obj =& $blog_handler->getAll($criteria, $tags); |
|
| 144 | + $blogs_obj = & $blog_handler->getAll($criteria, $tags); |
|
| 145 | 145 | $count_blog = $blog_handler->getCount($criteria); |
| 146 | 146 | break; |
| 147 | 147 | } |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | "title" => $blogs_obj[$id]->getVar("blog_title"), |
| 155 | 155 | "time" => $blogs_obj[$id]->getTime() |
| 156 | 156 | ); |
| 157 | - if(empty($list)){ |
|
| 157 | + if (empty($list)) { |
|
| 158 | 158 | $_blog = array_merge($_blog, array( |
| 159 | 159 | "image" => $blogs_obj[$id]->getImage(), |
| 160 | 160 | "feed" => $blogs_obj[$id]->getVar("blog_feed"), |
@@ -171,43 +171,43 @@ discard block |
||
| 171 | 171 | } |
| 172 | 172 | unset($blogs_obj); |
| 173 | 173 | |
| 174 | -if ( $count_blog > $limit) { |
|
| 174 | +if ($count_blog>$limit) { |
|
| 175 | 175 | include(XOOPS_ROOT_PATH."/class/pagenav.php"); |
| 176 | 176 | $start_link = array(); |
| 177 | - if($sort) $start_link[] = "sort=".$sort; |
|
| 178 | - if($category_id) $start_link[] = "category=".$category_id; |
|
| 179 | - if($list) $start_link[] = "list=".$list; |
|
| 177 | + if ($sort) $start_link[] = "sort=".$sort; |
|
| 178 | + if ($category_id) $start_link[] = "category=".$category_id; |
|
| 179 | + if ($list) $start_link[] = "list=".$list; |
|
| 180 | 180 | $nav = new XoopsPageNav($count_blog, $limit, $start, "start", implode("&", $start_link)); |
| 181 | 181 | $pagenav = $nav->renderNav(4); |
| 182 | -} else { |
|
| 182 | +}else { |
|
| 183 | 183 | $pagenav = ""; |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | -$xoopsTpl -> assign("xoops_pagetitle", $xoopsOption["xoops_pagetitle"] ); |
|
| 186 | +$xoopsTpl -> assign("xoops_pagetitle", $xoopsOption["xoops_pagetitle"]); |
|
| 187 | 187 | $xoopsTpl -> assign("link_home", "<a href=\"".XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/index.php\" title=\"".planet_constant("MD_HOME")."\" target=\"_self\">".planet_constant("MD_HOME")."</a>"); |
| 188 | 188 | |
| 189 | -if($category_id || $uid){ |
|
| 189 | +if ($category_id || $uid) { |
|
| 190 | 190 | $xoopsTpl -> assign("link_index", "<a href=\"".XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/view.blogs.php\" title=\"".planet_constant("MD_INDEX")."\" target=\"_self\">".planet_constant("MD_INDEX")."</a>"); |
| 191 | 191 | |
| 192 | 192 | $link_articles = "<a href=\"".XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/index.php". |
| 193 | - (empty($category_id)?"":"/c".$category_id). |
|
| 194 | - (empty($uid)?"":"/u".$uid). |
|
| 193 | + (empty($category_id) ? "" : "/c".$category_id). |
|
| 194 | + (empty($uid) ? "" : "/u".$uid). |
|
| 195 | 195 | "\" title=\"".planet_constant("MD_ARTICLES")."\">".planet_constant("MD_ARTICLES")."</a>"; |
| 196 | 196 | $xoopsTpl -> assign("link_articles", $link_articles); |
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | $link_switch = "<a href=\"".XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/view.blogs.php". |
| 200 | - (empty($category_id)?"":"/c".$category_id). |
|
| 201 | - (empty($uid)?"":"/u".$uid). |
|
| 202 | - (empty($list)?"/l1":""). |
|
| 203 | - "\" title=\"".(empty($list)?planet_constant("MD_LISTVIEW"):planet_constant("MD_FULLVIEW"))."\">".(empty($list)?planet_constant("MD_LISTVIEW"):planet_constant("MD_FULLVIEW"))."</a>"; |
|
| 200 | + (empty($category_id) ? "" : "/c".$category_id). |
|
| 201 | + (empty($uid) ? "" : "/u".$uid). |
|
| 202 | + (empty($list) ? "/l1" : ""). |
|
| 203 | + "\" title=\"".(empty($list) ? planet_constant("MD_LISTVIEW") : planet_constant("MD_FULLVIEW"))."\">".(empty($list) ? planet_constant("MD_LISTVIEW") : planet_constant("MD_FULLVIEW"))."</a>"; |
|
| 204 | 204 | $xoopsTpl -> assign("link_switch", $link_switch); |
| 205 | 205 | |
| 206 | -if(empty($uid) && is_object($xoopsUser)){ |
|
| 206 | +if (empty($uid) && is_object($xoopsUser)) { |
|
| 207 | 207 | $xoopsTpl -> assign("link_bookmark", "<a href=\"".XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/view.blogs.php".URL_DELIMITER."u".$xoopsUser->getVar("uid")."\" title=\"".planet_constant("MD_BOOKMARKS")."\" target=\"_self\">".planet_constant("MD_BOOKMARKS")."</a>"); |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | -if($xoopsModuleConfig["newblog_submit"]==1 || is_object($xoopsUser)){ |
|
| 210 | +if ($xoopsModuleConfig["newblog_submit"] == 1 || is_object($xoopsUser)) { |
|
| 211 | 211 | $xoopsTpl -> assign("link_submit", "<a href=\"".XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/action.blog.php\" title=\""._SUBMIT."\" target=\"_blank\">"._SUBMIT."</a>"); |
| 212 | 212 | } |
| 213 | 213 | |
@@ -219,23 +219,23 @@ discard block |
||
| 219 | 219 | $xoopsTpl -> assign("count_blog", $count_blog); |
| 220 | 220 | $xoopsTpl -> assign("is_list", !empty($list)); |
| 221 | 221 | |
| 222 | -$xoopsTpl -> assign("user_level", !is_object($xoopsUser)?0:($xoopsUser->isAdmin()?2:1)); |
|
| 223 | -if(empty($xoopsModuleConfig["anonymous_rate"]) && !is_object($xoopsUser)){ |
|
| 224 | -}elseif(!$list){ |
|
| 222 | +$xoopsTpl -> assign("user_level", !is_object($xoopsUser) ? 0 : ($xoopsUser->isAdmin() ? 2 : 1)); |
|
| 223 | +if (empty($xoopsModuleConfig["anonymous_rate"]) && !is_object($xoopsUser)) { |
|
| 224 | +}elseif (!$list) { |
|
| 225 | 225 | $xoopsTpl -> assign("canrate", 1); |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | -$sort_link = XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/view.blogs.php" . URL_DELIMITER; |
|
| 228 | +$sort_link = XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/view.blogs.php".URL_DELIMITER; |
|
| 229 | 229 | $vars = array(); |
| 230 | -if(!empty($category_id)) $vars[] = "c".$category_id; |
|
| 231 | -if(!empty($uid)) $vars[] = "u".$uid; |
|
| 232 | -if(!empty($list)) $vars[] = "li"; |
|
| 233 | -if(!empty($vars)) $sort_link .= implode("/", $vars)."/"; |
|
| 230 | +if (!empty($category_id)) $vars[] = "c".$category_id; |
|
| 231 | +if (!empty($uid)) $vars[] = "u".$uid; |
|
| 232 | +if (!empty($list)) $vars[] = "li"; |
|
| 233 | +if (!empty($vars)) $sort_link .= implode("/", $vars)."/"; |
|
| 234 | 234 | $sortlinks = array(); |
| 235 | -$valid_sorts = array( "marks" => planet_constant("MD_BOOKMARKS"), "rating" => planet_constant("MD_RATING"), "time" => planet_constant("MD_TIME"), "default" => planet_constant("MD_DEFAULT") ); |
|
| 236 | -foreach($valid_sorts as $val => $name){ |
|
| 237 | - if($val == $sort) continue; |
|
| 238 | - $sortlinks[] = "<a href=\"".$sort_link. $val."\">".$name."</a>"; |
|
| 235 | +$valid_sorts = array("marks" => planet_constant("MD_BOOKMARKS"), "rating" => planet_constant("MD_RATING"), "time" => planet_constant("MD_TIME"), "default" => planet_constant("MD_DEFAULT")); |
|
| 236 | +foreach ($valid_sorts as $val => $name) { |
|
| 237 | + if ($val == $sort) continue; |
|
| 238 | + $sortlinks[] = "<a href=\"".$sort_link.$val."\">".$name."</a>"; |
|
| 239 | 239 | } |
| 240 | 240 | $xoopsTpl -> assign("link_sort", implode(" | ", $sortlinks)); |
| 241 | 241 | |
@@ -174,9 +174,15 @@ discard block |
||
| 174 | 174 | if ( $count_blog > $limit) { |
| 175 | 175 | include(XOOPS_ROOT_PATH."/class/pagenav.php"); |
| 176 | 176 | $start_link = array(); |
| 177 | - if($sort) $start_link[] = "sort=".$sort; |
|
| 178 | - if($category_id) $start_link[] = "category=".$category_id; |
|
| 179 | - if($list) $start_link[] = "list=".$list; |
|
| 177 | + if($sort) { |
|
| 178 | + $start_link[] = "sort=".$sort; |
|
| 179 | + } |
|
| 180 | + if($category_id) { |
|
| 181 | + $start_link[] = "category=".$category_id; |
|
| 182 | + } |
|
| 183 | + if($list) { |
|
| 184 | + $start_link[] = "list=".$list; |
|
| 185 | + } |
|
| 180 | 186 | $nav = new XoopsPageNav($count_blog, $limit, $start, "start", implode("&", $start_link)); |
| 181 | 187 | $pagenav = $nav->renderNav(4); |
| 182 | 188 | } else { |
@@ -221,20 +227,30 @@ discard block |
||
| 221 | 227 | |
| 222 | 228 | $xoopsTpl -> assign("user_level", !is_object($xoopsUser)?0:($xoopsUser->isAdmin()?2:1)); |
| 223 | 229 | if(empty($xoopsModuleConfig["anonymous_rate"]) && !is_object($xoopsUser)){ |
| 224 | -}elseif(!$list){ |
|
| 230 | +} elseif(!$list){ |
|
| 225 | 231 | $xoopsTpl -> assign("canrate", 1); |
| 226 | 232 | } |
| 227 | 233 | |
| 228 | 234 | $sort_link = XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/view.blogs.php" . URL_DELIMITER; |
| 229 | 235 | $vars = array(); |
| 230 | -if(!empty($category_id)) $vars[] = "c".$category_id; |
|
| 231 | -if(!empty($uid)) $vars[] = "u".$uid; |
|
| 232 | -if(!empty($list)) $vars[] = "li"; |
|
| 233 | -if(!empty($vars)) $sort_link .= implode("/", $vars)."/"; |
|
| 236 | +if(!empty($category_id)) { |
|
| 237 | + $vars[] = "c".$category_id; |
|
| 238 | +} |
|
| 239 | +if(!empty($uid)) { |
|
| 240 | + $vars[] = "u".$uid; |
|
| 241 | +} |
|
| 242 | +if(!empty($list)) { |
|
| 243 | + $vars[] = "li"; |
|
| 244 | +} |
|
| 245 | +if(!empty($vars)) { |
|
| 246 | + $sort_link .= implode("/", $vars)."/"; |
|
| 247 | +} |
|
| 234 | 248 | $sortlinks = array(); |
| 235 | 249 | $valid_sorts = array( "marks" => planet_constant("MD_BOOKMARKS"), "rating" => planet_constant("MD_RATING"), "time" => planet_constant("MD_TIME"), "default" => planet_constant("MD_DEFAULT") ); |
| 236 | 250 | foreach($valid_sorts as $val => $name){ |
| 237 | - if($val == $sort) continue; |
|
| 251 | + if($val == $sort) { |
|
| 252 | + continue; |
|
| 253 | + } |
|
| 238 | 254 | $sortlinks[] = "<a href=\"".$sort_link. $val."\">".$name."</a>"; |
| 239 | 255 | } |
| 240 | 256 | $xoopsTpl -> assign("link_sort", implode(" | ", $sortlinks)); |
@@ -26,9 +26,9 @@ |
||
| 26 | 26 | // ------------------------------------------------------------------------ // |
| 27 | 27 | include "header.php"; |
| 28 | 28 | $com_itemid = isset($_GET['com_itemid']) ? intval($_GET['com_itemid']) : 0; |
| 29 | -if ($com_itemid > 0) { |
|
| 30 | - $article_handler =& xoops_getmodulehandler("article", $GLOBALS["moddirname"]); |
|
| 31 | - $article_obj =& $article_handler->get($com_itemid); |
|
| 29 | +if ($com_itemid>0) { |
|
| 30 | + $article_handler = & xoops_getmodulehandler("article", $GLOBALS["moddirname"]); |
|
| 31 | + $article_obj = & $article_handler->get($com_itemid); |
|
| 32 | 32 | $com_replytitle = $article_obj->getVar("art_title"); |
| 33 | 33 | include_once XOOPS_ROOT_PATH.'/include/comment_new.php'; |
| 34 | 34 | } |
@@ -75,14 +75,14 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | header('Content-Type: text/html; charset='._CHARSET); |
| 77 | 77 | echo "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>\n"; |
| 78 | - echo "<html>\n<head>\n"; |
|
| 79 | - echo "<title>" . $xoopsConfig['sitename'] . "</title>\n"; |
|
| 80 | - echo "<meta http-equiv='Content-Type' content='text/html; charset=" . _CHARSET . "' />\n"; |
|
| 81 | - echo "<meta name='AUTHOR' content='" . $myts->htmlspecialchars($xoopsConfig['sitename']) . "' />\n"; |
|
| 82 | - echo "<meta name='COPYRIGHT' content='Copyright (c) ".date('Y')." by " . $xoopsConfig['sitename'] . "' />\n"; |
|
| 83 | - echo "<meta name='DESCRIPTION' content='" . $myts->htmlspecialchars($xoopsConfig['slogan']) . "' />\n"; |
|
| 84 | - echo "<meta name='GENERATOR' content='" . XOOPS_VERSION . "' />\n"; |
|
| 85 | - echo "<style type='text/css'> |
|
| 78 | + echo "<html>\n<head>\n"; |
|
| 79 | + echo "<title>" . $xoopsConfig['sitename'] . "</title>\n"; |
|
| 80 | + echo "<meta http-equiv='Content-Type' content='text/html; charset=" . _CHARSET . "' />\n"; |
|
| 81 | + echo "<meta name='AUTHOR' content='" . $myts->htmlspecialchars($xoopsConfig['sitename']) . "' />\n"; |
|
| 82 | + echo "<meta name='COPYRIGHT' content='Copyright (c) ".date('Y')." by " . $xoopsConfig['sitename'] . "' />\n"; |
|
| 83 | + echo "<meta name='DESCRIPTION' content='" . $myts->htmlspecialchars($xoopsConfig['slogan']) . "' />\n"; |
|
| 84 | + echo "<meta name='GENERATOR' content='" . XOOPS_VERSION . "' />\n"; |
|
| 85 | + echo "<style type='text/css'> |
|
| 86 | 86 | body { |
| 87 | 87 | color:#000000; |
| 88 | 88 | background-color:#EFEFEF; |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | } |
| 98 | 98 | </style>\n"; |
| 99 | 99 | echo "</head>\n"; |
| 100 | - echo "<body style='background-color:#ffffff; color:#000000; font-family: Arial' onload='window.print()'>\n". |
|
| 100 | + echo "<body style='background-color:#ffffff; color:#000000; font-family: Arial' onload='window.print()'>\n". |
|
| 101 | 101 | "<div style='float:center; width: 750px; border: 1px solid #000; padding: 20px;'>\n". |
| 102 | 102 | "<div style='text-align: center; display: block; margin: 0 0 6px 0; padding: 5px;'>\n". |
| 103 | 103 | "<img src='" . $print_data["image"] . "' border='0' alt='".$print_data["module"]."' />\n". |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 2px solid #ccc;'></div>\n". |
| 118 | 118 | "<div>".$print_data["module"]."</div>\n". |
| 119 | 119 | "<div>URL: ".$print_data["url"]."</div>\n". |
| 120 | - "</div>\n". |
|
| 121 | - "</body>\n</html>\n"; |
|
| 120 | + "</div>\n". |
|
| 121 | + "</body>\n</html>\n"; |
|
| 122 | 122 | exit(); |
| 123 | 123 | ?> |
| 124 | 124 | \ No newline at end of file |
@@ -29,16 +29,16 @@ discard block |
||
| 29 | 29 | include 'header.php'; |
| 30 | 30 | error_reporting(0); |
| 31 | 31 | |
| 32 | -if(empty($_POST["print_data"])){ |
|
| 32 | +if (empty($_POST["print_data"])) { |
|
| 33 | 33 | |
| 34 | -if(planet_parse_args($args_num, $args, $args_str)){ |
|
| 34 | +if (planet_parse_args($args_num, $args, $args_str)) { |
|
| 35 | 35 | $args["article"] = @$args_num[0]; |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | -$article_id = intval( empty($_GET["article"])?@$args["article"]:$_GET["article"] ); |
|
| 38 | +$article_id = intval(empty($_GET["article"]) ? @$args["article"] : $_GET["article"]); |
|
| 39 | 39 | |
| 40 | -$article_handler =& xoops_getmodulehandler("article", $GLOBALS["moddirname"]); |
|
| 41 | -$article_obj =& $article_handler->get($article_id); |
|
| 40 | +$article_handler = & xoops_getmodulehandler("article", $GLOBALS["moddirname"]); |
|
| 41 | +$article_obj = & $article_handler->get($article_id); |
|
| 42 | 42 | |
| 43 | 43 | $article_data = array(); |
| 44 | 44 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | $article_data["time"] = $article_obj->getTime("l"); |
| 55 | 55 | |
| 56 | 56 | // summary |
| 57 | -$article_data["summary"] =& $article_obj->getSummary(); |
|
| 57 | +$article_data["summary"] = & $article_obj->getSummary(); |
|
| 58 | 58 | |
| 59 | 59 | // text of page |
| 60 | 60 | $article_data["text"] = $article_obj->getVar("art_content"); |
@@ -64,24 +64,24 @@ discard block |
||
| 64 | 64 | $print_data["date"] = $article_data["time"]; |
| 65 | 65 | $print_data["summary"] = empty($article_data["summary"]) ? "" : planet_constant("MD_SUMMARY").": ".$article_data["summary"]; |
| 66 | 66 | $print_data["content"] = $article_data["text"]; |
| 67 | -$print_data["url"] = XOOPS_URL."/modules/" . $xoopsModule->getVar("dirname") . "/view.article.php".URL_DELIMITER."c".$category_id."/".$article_id."/p".$page; |
|
| 67 | +$print_data["url"] = XOOPS_URL."/modules/".$xoopsModule->getVar("dirname")."/view.article.php".URL_DELIMITER."c".$category_id."/".$article_id."/p".$page; |
|
| 68 | 68 | |
| 69 | -}else{ |
|
| 69 | +}else { |
|
| 70 | 70 | $print_data = unserialize(base64_decode($_POST["print_data"])); |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | -$print_data["image"] = XOOPS_URL . "/modules/" . $xoopsModule->getVar("dirname") . "/" . $xoopsModule->getInfo( 'image' ); |
|
| 74 | -$print_data["module"] = $xoopsModule->getVar( 'name' )." V".$xoopsModule->getInfo( 'version' ); |
|
| 73 | +$print_data["image"] = XOOPS_URL."/modules/".$xoopsModule->getVar("dirname")."/".$xoopsModule->getInfo('image'); |
|
| 74 | +$print_data["module"] = $xoopsModule->getVar('name')." V".$xoopsModule->getInfo('version'); |
|
| 75 | 75 | |
| 76 | 76 | header('Content-Type: text/html; charset='._CHARSET); |
| 77 | 77 | echo "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>\n"; |
| 78 | 78 | echo "<html>\n<head>\n"; |
| 79 | - echo "<title>" . $xoopsConfig['sitename'] . "</title>\n"; |
|
| 80 | - echo "<meta http-equiv='Content-Type' content='text/html; charset=" . _CHARSET . "' />\n"; |
|
| 81 | - echo "<meta name='AUTHOR' content='" . $myts->htmlspecialchars($xoopsConfig['sitename']) . "' />\n"; |
|
| 82 | - echo "<meta name='COPYRIGHT' content='Copyright (c) ".date('Y')." by " . $xoopsConfig['sitename'] . "' />\n"; |
|
| 83 | - echo "<meta name='DESCRIPTION' content='" . $myts->htmlspecialchars($xoopsConfig['slogan']) . "' />\n"; |
|
| 84 | - echo "<meta name='GENERATOR' content='" . XOOPS_VERSION . "' />\n"; |
|
| 79 | + echo "<title>".$xoopsConfig['sitename']."</title>\n"; |
|
| 80 | + echo "<meta http-equiv='Content-Type' content='text/html; charset="._CHARSET."' />\n"; |
|
| 81 | + echo "<meta name='AUTHOR' content='".$myts->htmlspecialchars($xoopsConfig['sitename'])."' />\n"; |
|
| 82 | + echo "<meta name='COPYRIGHT' content='Copyright (c) ".date('Y')." by ".$xoopsConfig['sitename']."' />\n"; |
|
| 83 | + echo "<meta name='DESCRIPTION' content='".$myts->htmlspecialchars($xoopsConfig['slogan'])."' />\n"; |
|
| 84 | + echo "<meta name='GENERATOR' content='".XOOPS_VERSION."' />\n"; |
|
| 85 | 85 | echo "<style type='text/css'> |
| 86 | 86 | body { |
| 87 | 87 | color:#000000; |
@@ -100,16 +100,14 @@ discard block |
||
| 100 | 100 | echo "<body style='background-color:#ffffff; color:#000000; font-family: Arial' onload='window.print()'>\n". |
| 101 | 101 | "<div style='float:center; width: 750px; border: 1px solid #000; padding: 20px;'>\n". |
| 102 | 102 | "<div style='text-align: center; display: block; margin: 0 0 6px 0; padding: 5px;'>\n". |
| 103 | - "<img src='" . $print_data["image"] . "' border='0' alt='".$print_data["module"]."' />\n". |
|
| 103 | + "<img src='".$print_data["image"]."' border='0' alt='".$print_data["module"]."' />\n". |
|
| 104 | 104 | "<h2>".$print_data["title"]."</h2>\n". |
| 105 | 105 | "</div>\n". |
| 106 | 106 | "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 2px solid #ccc;'></div>\n"; |
| 107 | - echo ( empty($print_data["author"]) ? "" : |
|
| 108 | - "<div>" .planet_constant("MD_AUTHOR").": ".$print_data["author"]."</div>\n" |
|
| 107 | + echo (empty($print_data["author"]) ? "" : "<div>".planet_constant("MD_AUTHOR").": ".$print_data["author"]."</div>\n" |
|
| 109 | 108 | ). |
| 110 | - "<div>" .planet_constant("MD_DATE").": ".$print_data["date"]."</div>\n". |
|
| 111 | - ( empty($article_data["summary"]) ? "" : |
|
| 112 | - "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 1px solid #ccc;'></div>\n". |
|
| 109 | + "<div>".planet_constant("MD_DATE").": ".$print_data["date"]."</div>\n". |
|
| 110 | + (empty($article_data["summary"]) ? "" : "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 1px solid #ccc;'></div>\n". |
|
| 113 | 111 | "<div>".$print_data["summary"]."</div>\n" |
| 114 | 112 | ). |
| 115 | 113 | "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 1px solid #ccc;'></div>\n". |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | $print_data["content"] = $article_data["text"]; |
| 67 | 67 | $print_data["url"] = XOOPS_URL."/modules/" . $xoopsModule->getVar("dirname") . "/view.article.php".URL_DELIMITER."c".$category_id."/".$article_id."/p".$page; |
| 68 | 68 | |
| 69 | -}else{ |
|
| 69 | +} else{ |
|
| 70 | 70 | $print_data = unserialize(base64_decode($_POST["print_data"])); |
| 71 | 71 | } |
| 72 | 72 | |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | |
| 27 | 27 | $indexAdmin = new ModuleAdmin(); |
| 28 | 28 | |
| 29 | - echo $indexAdmin->addNavigation('index.php'); |
|
| 30 | - echo $indexAdmin->renderIndex(); |
|
| 29 | + echo $indexAdmin->addNavigation('index.php'); |
|
| 30 | + echo $indexAdmin->renderIndex(); |
|
| 31 | 31 | |
| 32 | 32 | include "admin_footer.php"; |
| 33 | 33 | \ No newline at end of file |
@@ -19,8 +19,8 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | |
| 21 | 21 | |
| 22 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; |
|
| 23 | -include_once dirname(__FILE__) . '/admin_header.php'; |
|
| 22 | +require_once dirname(dirname(dirname(dirname(__FILE__)))).'/include/cp_header.php'; |
|
| 23 | +include_once dirname(__FILE__).'/admin_header.php'; |
|
| 24 | 24 | |
| 25 | 25 | xoops_cp_header(); |
| 26 | 26 | |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | |
| 43 | 43 | |
| 44 | 44 | if (!file_exists($fileinc = $pathLanguage . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/' . 'main.php')) { |
| 45 | - $fileinc = $pathLanguage . '/language/english/main.php'; |
|
| 45 | + $fileinc = $pathLanguage . '/language/english/main.php'; |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | include_once $fileinc; |
@@ -25,50 +25,50 @@ discard block |
||
| 25 | 25 | // Project: Article Project // |
| 26 | 26 | // ------------------------------------------------------------------------ // |
| 27 | 27 | |
| 28 | -if (!defined('XOOPS_ROOT_PATH')){ exit(); } |
|
| 28 | +if (!defined('XOOPS_ROOT_PATH')) { exit(); } |
|
| 29 | 29 | |
| 30 | 30 | |
| 31 | 31 | defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined"); |
| 32 | 32 | |
| 33 | 33 | $path = dirname(dirname(dirname(dirname(__FILE__)))); |
| 34 | -include_once $path . '/mainfile.php'; |
|
| 34 | +include_once $path.'/mainfile.php'; |
|
| 35 | 35 | |
| 36 | 36 | $dirname = basename(dirname(dirname(__FILE__))); |
| 37 | 37 | $module_handler = xoops_gethandler('module'); |
| 38 | 38 | $module = $module_handler->getByDirname($dirname); |
| 39 | 39 | $pathIcon32 = $module->getInfo('icons32'); |
| 40 | 40 | $pathModuleAdmin = $module->getInfo('dirmoduleadmin'); |
| 41 | -$pathLanguage = $path . $pathModuleAdmin; |
|
| 41 | +$pathLanguage = $path.$pathModuleAdmin; |
|
| 42 | 42 | |
| 43 | 43 | |
| 44 | -if (!file_exists($fileinc = $pathLanguage . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/' . 'main.php')) { |
|
| 45 | - $fileinc = $pathLanguage . '/language/english/main.php'; |
|
| 44 | +if (!file_exists($fileinc = $pathLanguage.'/language/'.$GLOBALS['xoopsConfig']['language'].'/'.'main.php')) { |
|
| 45 | + $fileinc = $pathLanguage.'/language/english/main.php'; |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | include_once $fileinc; |
| 49 | 49 | |
| 50 | 50 | $adminmenu = array(); |
| 51 | -$i=0; |
|
| 51 | +$i = 0; |
|
| 52 | 52 | $adminmenu[$i]["title"] = _AM_MODULEADMIN_HOME; |
| 53 | 53 | $adminmenu[$i]['link'] = "admin/index.php"; |
| 54 | -$adminmenu[$i]["icon"] = $pathIcon32 . '/home.png'; |
|
| 54 | +$adminmenu[$i]["icon"] = $pathIcon32.'/home.png'; |
|
| 55 | 55 | $i++; |
| 56 | 56 | $adminmenu[$i]['title'] = planet_constant("MI_ADMENU_INDEX"); |
| 57 | 57 | $adminmenu[$i]['link'] = "admin/main.php"; |
| 58 | -$adminmenu[$i]["icon"] = $pathIcon32 . '/manage.png'; |
|
| 58 | +$adminmenu[$i]["icon"] = $pathIcon32.'/manage.png'; |
|
| 59 | 59 | |
| 60 | 60 | $i++; |
| 61 | 61 | $adminmenu[$i]['title'] = planet_constant("MI_ADMENU_CATEGORY"); |
| 62 | 62 | $adminmenu[$i]['link'] = "admin/admin.category.php"; |
| 63 | -$adminmenu[$i]["icon"] = $pathIcon32 . '/category.png'; |
|
| 63 | +$adminmenu[$i]["icon"] = $pathIcon32.'/category.png'; |
|
| 64 | 64 | $i++; |
| 65 | 65 | $adminmenu[$i]['title'] = planet_constant("MI_ADMENU_BLOG"); |
| 66 | 66 | $adminmenu[$i]['link'] = "admin/admin.blog.php"; |
| 67 | -$adminmenu[$i]["icon"] = $pathIcon32 . '/translations.png'; |
|
| 67 | +$adminmenu[$i]["icon"] = $pathIcon32.'/translations.png'; |
|
| 68 | 68 | $i++; |
| 69 | 69 | $adminmenu[$i]['title'] = planet_constant("MI_ADMENU_ARTICLE"); |
| 70 | 70 | $adminmenu[$i]['link'] = "admin/admin.article.php"; |
| 71 | -$adminmenu[$i]["icon"] = $pathIcon32 . '/content.png'; |
|
| 71 | +$adminmenu[$i]["icon"] = $pathIcon32.'/content.png'; |
|
| 72 | 72 | //$i++; |
| 73 | 73 | //$adminmenu[$i]['title'] = planet_constant("MI_ADMENU_BLOCK"); |
| 74 | 74 | //$adminmenu[$i]['link'] = "admin/admin.block.php"; |
@@ -76,4 +76,4 @@ discard block |
||
| 76 | 76 | $i++; |
| 77 | 77 | $adminmenu[$i]['title'] = _AM_MODULEADMIN_ABOUT; |
| 78 | 78 | $adminmenu[$i]["link"] = "admin/about.php"; |
| 79 | -$adminmenu[$i]["icon"] = $pathIcon32 . '/about.png'; |
|
| 79 | +$adminmenu[$i]["icon"] = $pathIcon32.'/about.png'; |
|
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | // URL: http://xoops.org // |
| 25 | 25 | // Project: Article Project // |
| 26 | 26 | // ------------------------------------------------------------------------ // |
| 27 | -include( "admin_header.php" ); |
|
| 27 | +include("admin_header.php"); |
|
| 28 | 28 | |
| 29 | 29 | xoops_cp_header(); |
| 30 | 30 | $indexAdmin = new ModuleAdmin(); |
@@ -50,63 +50,63 @@ discard block |
||
| 50 | 50 | </style> |
| 51 | 51 | "; |
| 52 | 52 | |
| 53 | -echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . planet_constant("AM_PREFERENCES") . "</legend>"; |
|
| 53 | +echo "<fieldset><legend style='font-weight: bold; color: #900;'>".planet_constant("AM_PREFERENCES")."</legend>"; |
|
| 54 | 54 | echo "<div style='padding: 8px;'>"; |
| 55 | -echo "<label>" . "<strong>PHP Version:</strong>" . ":</label><text>" . phpversion() . "</text><br />"; |
|
| 56 | -echo "<label>" . "<strong>MySQL Version:</strong>" . ":</label><text>" . mysql_get_server_info() . "</text><br />"; |
|
| 57 | -echo "<label>" . "<strong>XOOPS Version:</strong>" . ":</label><text>" . XOOPS_VERSION . "</text><br />"; |
|
| 58 | -echo "<label>" . "<strong>Module Version:</strong>" . ":</label><text>" . $xoopsModule->getInfo('version') . "</text><br />"; |
|
| 55 | +echo "<label>"."<strong>PHP Version:</strong>".":</label><text>".phpversion()."</text><br />"; |
|
| 56 | +echo "<label>"."<strong>MySQL Version:</strong>".":</label><text>".mysql_get_server_info()."</text><br />"; |
|
| 57 | +echo "<label>"."<strong>XOOPS Version:</strong>".":</label><text>".XOOPS_VERSION."</text><br />"; |
|
| 58 | +echo "<label>"."<strong>Module Version:</strong>".":</label><text>".$xoopsModule->getInfo('version')."</text><br />"; |
|
| 59 | 59 | echo "</div>"; |
| 60 | 60 | echo "<div style='padding: 8px;'>"; |
| 61 | -echo "<label>" . planet_constant("AM_SAFEMODE") . ":</label><text>"; |
|
| 62 | -echo ( ini_get( 'safe_mode' ) ) ? planet_constant("AM_ON") : planet_constant("AM_OFF"); |
|
| 61 | +echo "<label>".planet_constant("AM_SAFEMODE").":</label><text>"; |
|
| 62 | +echo (ini_get('safe_mode')) ? planet_constant("AM_ON") : planet_constant("AM_OFF"); |
|
| 63 | 63 | echo "</text><br />"; |
| 64 | -echo "<label>" . planet_constant("AM_REGISTERGLOBALS") . ":</label><text>"; |
|
| 65 | -echo ( ini_get( 'register_globals' )) ? planet_constant("AM_ON") : planet_constant("AM_OFF"); |
|
| 64 | +echo "<label>".planet_constant("AM_REGISTERGLOBALS").":</label><text>"; |
|
| 65 | +echo (ini_get('register_globals')) ? planet_constant("AM_ON") : planet_constant("AM_OFF"); |
|
| 66 | 66 | echo "</text><br />"; |
| 67 | -echo "<label>" . planet_constant("AM_MAGICQUOTESGPC") . ":</label><text>"; |
|
| 68 | -echo ( ini_get( 'magic_quotes_gpc' )) ? planet_constant("AM_ON") : planet_constant("AM_OFF"); |
|
| 67 | +echo "<label>".planet_constant("AM_MAGICQUOTESGPC").":</label><text>"; |
|
| 68 | +echo (ini_get('magic_quotes_gpc')) ? planet_constant("AM_ON") : planet_constant("AM_OFF"); |
|
| 69 | 69 | echo "</text><br />"; |
| 70 | -echo "<label>" . planet_constant("AM_MAXPOSTSIZE") .":</label><text>". ini_get( 'post_max_size' ); |
|
| 70 | +echo "<label>".planet_constant("AM_MAXPOSTSIZE").":</label><text>".ini_get('post_max_size'); |
|
| 71 | 71 | echo "</text><br />"; |
| 72 | -echo "<label>" . planet_constant("AM_MAXINPUTTIME") .":</label><text>". ini_get( 'max_input_time' ); |
|
| 72 | +echo "<label>".planet_constant("AM_MAXINPUTTIME").":</label><text>".ini_get('max_input_time'); |
|
| 73 | 73 | echo "</text><br />"; |
| 74 | -echo "<label>" . planet_constant("AM_OUTPUTBUFFERING") .":</label><text>". ini_get( 'output_buffering' ); |
|
| 74 | +echo "<label>".planet_constant("AM_OUTPUTBUFFERING").":</label><text>".ini_get('output_buffering'); |
|
| 75 | 75 | echo "</text><br />"; |
| 76 | -echo "<label>" . planet_constant("AM_XML_EXTENSION") .":</label><text>"; |
|
| 77 | -echo ( extension_loaded( 'xml' )) ? planet_constant("AM_ON") : planet_constant("AM_OFF"); |
|
| 76 | +echo "<label>".planet_constant("AM_XML_EXTENSION").":</label><text>"; |
|
| 77 | +echo (extension_loaded('xml')) ? planet_constant("AM_ON") : planet_constant("AM_OFF"); |
|
| 78 | 78 | echo "</text><br />"; |
| 79 | -echo "<label>" . planet_constant("AM_MB_EXTENSION") .":</label><text>"; |
|
| 80 | -echo ( extension_loaded( 'mbstring' )) ? planet_constant("AM_ON") : planet_constant("AM_OFF"); |
|
| 79 | +echo "<label>".planet_constant("AM_MB_EXTENSION").":</label><text>"; |
|
| 80 | +echo (extension_loaded('mbstring')) ? planet_constant("AM_ON") : planet_constant("AM_OFF"); |
|
| 81 | 81 | echo "</text><br />"; |
| 82 | -echo "<label>" . planet_constant("AM_CURL") .":</label><text>"; |
|
| 83 | -echo ( function_exists('curl_init')) ? planet_constant("AM_ON") : planet_constant("AM_OFF"); |
|
| 82 | +echo "<label>".planet_constant("AM_CURL").":</label><text>"; |
|
| 83 | +echo (function_exists('curl_init')) ? planet_constant("AM_ON") : planet_constant("AM_OFF"); |
|
| 84 | 84 | echo "</text><br />"; |
| 85 | -echo "<label>" . planet_constant("AM_FSOCKOPEN") .":</label><text>"; |
|
| 86 | -echo ( function_exists('fsockopen')) ? planet_constant("AM_ON") : planet_constant("AM_OFF"); |
|
| 85 | +echo "<label>".planet_constant("AM_FSOCKOPEN").":</label><text>"; |
|
| 86 | +echo (function_exists('fsockopen')) ? planet_constant("AM_ON") : planet_constant("AM_OFF"); |
|
| 87 | 87 | echo "</text><br />"; |
| 88 | -echo "<label>" . planet_constant("AM_URLFOPEN") .":</label><text>"; |
|
| 89 | -echo ( ini_get('allow_url_fopen')) ? planet_constant("AM_ON") : planet_constant("AM_OFF"); |
|
| 88 | +echo "<label>".planet_constant("AM_URLFOPEN").":</label><text>"; |
|
| 89 | +echo (ini_get('allow_url_fopen')) ? planet_constant("AM_ON") : planet_constant("AM_OFF"); |
|
| 90 | 90 | echo "</text><br />"; |
| 91 | 91 | echo "</div>"; |
| 92 | 92 | echo "</fieldset>"; |
| 93 | 93 | |
| 94 | -echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . planet_constant("AM_STATS") . "</legend>"; |
|
| 94 | +echo "<fieldset><legend style='font-weight: bold; color: #900;'>".planet_constant("AM_STATS")."</legend>"; |
|
| 95 | 95 | echo "<div style='padding: 8px;'>"; |
| 96 | -$category_handler =& xoops_getmodulehandler('category', $GLOBALS["moddirname"]); |
|
| 96 | +$category_handler = & xoops_getmodulehandler('category', $GLOBALS["moddirname"]); |
|
| 97 | 97 | $category_count = $category_handler->getCount(); |
| 98 | -$blog_handler =& xoops_getmodulehandler("blog", $GLOBALS["moddirname"]); |
|
| 98 | +$blog_handler = & xoops_getmodulehandler("blog", $GLOBALS["moddirname"]); |
|
| 99 | 99 | $blog_count = $blog_handler->getCount(); |
| 100 | -$article_handler =& xoops_getmodulehandler('article', $GLOBALS["moddirname"]); |
|
| 100 | +$article_handler = & xoops_getmodulehandler('article', $GLOBALS["moddirname"]); |
|
| 101 | 101 | $article_count = $article_handler->getCount(); |
| 102 | 102 | $criteria = new Criteria("blog_status", 0); |
| 103 | 103 | $blog_count_pending = $blog_handler->getCount($criteria); |
| 104 | -echo "<label>" . planet_constant("AM_TOTAL_CATEGORIES") .":</label><text>". $category_count; |
|
| 104 | +echo "<label>".planet_constant("AM_TOTAL_CATEGORIES").":</label><text>".$category_count; |
|
| 105 | 105 | echo "</text><br />"; |
| 106 | -echo "<label>" . planet_constant("AM_TOTAL_BLOGS") .":</label><text>". $blog_count; |
|
| 107 | -if($blog_count_pending>0) echo " (<font color=\"red\">". $blog_count_pending."</font>)"; |
|
| 106 | +echo "<label>".planet_constant("AM_TOTAL_BLOGS").":</label><text>".$blog_count; |
|
| 107 | +if ($blog_count_pending>0) echo " (<font color=\"red\">".$blog_count_pending."</font>)"; |
|
| 108 | 108 | echo "</text><br />"; |
| 109 | -echo "<label>" . planet_constant("AM_TOTAL_ARTICLES") .":</label><text>".$article_count; |
|
| 109 | +echo "<label>".planet_constant("AM_TOTAL_ARTICLES").":</label><text>".$article_count; |
|
| 110 | 110 | echo "</text><br />"; |
| 111 | 111 | echo "</div>"; |
| 112 | 112 | echo "</fieldset>"; |
@@ -104,7 +104,9 @@ |
||
| 104 | 104 | echo "<label>" . planet_constant("AM_TOTAL_CATEGORIES") .":</label><text>". $category_count; |
| 105 | 105 | echo "</text><br />"; |
| 106 | 106 | echo "<label>" . planet_constant("AM_TOTAL_BLOGS") .":</label><text>". $blog_count; |
| 107 | -if($blog_count_pending>0) echo " (<font color=\"red\">". $blog_count_pending."</font>)"; |
|
| 107 | +if($blog_count_pending>0) { |
|
| 108 | + echo " (<font color=\"red\">". $blog_count_pending."</font>)"; |
|
| 109 | +} |
|
| 108 | 110 | echo "</text><br />"; |
| 109 | 111 | echo "<label>" . planet_constant("AM_TOTAL_ARTICLES") .":</label><text>".$article_count; |
| 110 | 112 | echo "</text><br />"; |
@@ -19,10 +19,10 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | |
| 21 | 21 | echo "<div class='adminfooter'>\n" |
| 22 | - ." <div style='text-align: center;'>\n" |
|
| 23 | - ." <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" |
|
| 24 | - ." </div>\n" |
|
| 25 | - ." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" |
|
| 26 | - ."</div>"; |
|
| 22 | + ." <div style='text-align: center;'>\n" |
|
| 23 | + ." <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" |
|
| 24 | + ." </div>\n" |
|
| 25 | + ." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" |
|
| 26 | + ."</div>"; |
|
| 27 | 27 | |
| 28 | 28 | xoops_cp_footer(); |
| 29 | 29 | \ No newline at end of file |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | ." <div style='text-align: center;'>\n" |
| 23 | 23 | ." <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" |
| 24 | 24 | ." </div>\n" |
| 25 | - ." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" |
|
| 25 | + ." "._AM_MODULEADMIN_ADMIN_FOOTER."\n" |
|
| 26 | 26 | ."</div>"; |
| 27 | 27 | |
| 28 | 28 | xoops_cp_footer(); |
| 29 | 29 | \ No newline at end of file |