Changeset 147 for branches/comment-registration/common/functions_blog.php
- Timestamp:
- 04/17/06 10:55:20 (3 years ago)
- Location:
- branches/comment-registration
- Files:
-
- 2 modified
-
. (modified) (1 prop)
-
common/functions_blog.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/comment-registration
- Property svnmerge-integrated changed from /trunk:1-142,144 to /trunk:1-146
-
branches/comment-registration/common/functions_blog.php
r141 r147 24 24 set_magic_quotes_runtime(0); 25 25 26 /* magic_quotes_strip() {{{ */ 27 /** 28 * strip escape \ signs when magic_quotes_gpc is on in php.ini 29 * 30 * @param mixed the input string or array 31 * @return mixed the string/array with the magic_quotes_gpc added slashes removed 32 */ 26 33 function magic_quotes_strip($mixed) { 27 34 if(is_array($mixed)) … … 29 36 return stripslashes($mixed); 30 37 } 31 38 /* }}} */ 32 39 if(get_magic_quotes_gpc() || ini_get("magic_quotes_sybase")) { 33 40 $_GET = magic_quotes_strip($_GET); … … 39 46 $_SERVER = magic_quotes_strip($_SERVER); 40 47 } 41 //------------------------------------- 42 //{{{ db_init: initialize database link 43 //------------------------------------- 48 49 /* db_init() {{{ */ 50 /** 51 * Initialize database connection 52 * 53 * @return DB_* database link object 54 */ 44 55 function db_init() { 45 56 session_start(); … … 59 70 return $db; 60 71 } 61 //}}}--------------------------- 62 //{{{ initialize the mvblog tool 63 //------------------------------ 72 /* }}} */ 64 73 session_start(); 65 74 ob_start(); … … 69 78 /* populate the $plugins array */ 70 79 load_plugins(); 71 //}}}-------------------------------------------------------- 72 //{{{ check_admin_logged_in: are we logged in as admin user ? 73 //----------------------------------------------------------- 80 81 /* check_admin_logged_in() {{{ */ 82 /** 83 * Check to see if the admin session is set 84 **/ 74 85 function check_admin_logged_in() { 75 86 if (!$_SESSION["author_id"]) { … … 77 88 } 78 89 } 79 80 //}}}--------------------------------------------------------------------------------------------- 81 //{{{ html_header($title, style): print the html headers and style block etc. optionally with set <title> 82 //------------------------------------------------------------------------------------------------ 90 /* }}} */ 91 92 /* html_header: {{{ */ 93 /** 94 * Send start of html document 95 * 96 * @param string (optional)The title to use in html title tag 97 * @param string (optional)The style to use 98 * @return nothing It uses echo to send the data to the client 99 */ 83 100 function html_header($title="Home", $style="MvBlog") { 84 101 global $db; … … 122 139 echo "<body>\n"; 123 140 } 124 125 //}}}-------------------------- 126 //{{{ html_footer(): close html 127 //----------------------------- 141 /* }}} */ 142 143 /* html_footer() {{{ */ 144 /** 145 * send the end of a html document 146 */ 128 147 function html_footer() { 129 148 echo "\t\t\t<div id=\"if_page_footer\">\n"; … … 138 157 139 158 } 140 141 //}}}---------------------------------------------------- 142 //{{{ show_article($id): show specific post with comments 143 //------------------------------------------------------- 159 /* }}} */ 160 161 /* show_article($iid) {{{ */ 162 /** 163 * Show an article with all comments etc 164 * 165 * @param int The article id to show 166 */ 144 167 function show_article($id) { 145 168 //get all the authors in an array … … 278 301 <? 279 302 } 280 281 //}}}---------------------------------------------------------------- 303 /* }}} */ 282 304 //{{{ blog_get_description(): get the description from settings table 283 305 //-------------------------------------------------------------------
