", $message); $message = str_replace(":cry:", "\"Cry", $message); $message = str_replace(":(", "\"Sad", $message); $message = str_replace(":twisted:", "\"Twisted", $message); $message = str_replace(":D", "\"Biggrin", $message); $message = str_replace(":o", "\"Surprise", $message); $message = str_replace(":shock:", "\"Eek", $message); $message = str_replace(":?", "\"Confused", $message); $message = str_replace("8)", "\"Cool", $message); $message = str_replace(":p", "\"Razz", $message); $message = str_replace(":P", "\"Razz", $message); $message = str_replace(":lol:", "\"LOL", $message); $message = str_replace(":x", "\"Mad", $message); $message = str_replace(":redface:", "\"Red", $message); $message = str_replace(";)", "\"Wink", $message); $message = str_replace(":wink:", "\"Wink", $message); $message = str_replace(":roll:", "\"Roll", $message); $message = str_replace(":!:", "\"Exclaimation", $message); $message = str_replace(":?:", "\"Question", $message); $message = str_replace(":idea:", "\"Idea", $message); $message = str_replace(":arrow:", "\"Arrow", $message); $message = str_replace(":evil:", "\"Evil", $message); return($message); } function viewbbcode($message) { $uid = md5(mt_rand()); $uid = substr($uid, 0, 10); $message = preg_replace('#(script|about|applet|activex|chrome):#is', "\\1:", $message); $message = " " . $message; if (! (strpos($message, "[") && strpos($message, "]")) ) { // Remove padding, return. $message = substr($message, 1); return $message; } //$uid = ""; //$message = str_replace("[br]", "
", $message); $message = str_replace("[u]", "", $message); $message = str_replace("[b]", "", $message); $message = str_replace("[/u]", "", $message); $message = str_replace("[/b]", "", $message); $message = str_replace("[i]", "", $message); $message = str_replace("[/i]", "", $message); $message = str_replace("[quote]", "
Quote :
", $message); $message = str_replace("[/quote]", "
", $message); $message = str_replace("[code]", "
Code :
", $message); $message = str_replace("[/code]", "
", $message); // [list] and [list=x] for (un)ordered lists. $open_tag = array(); $open_tag[0] = "[list]"; // unordered.. $message = bbencode_first_pass_pda($message, $uid, $open_tag, "[/list]", "[/list:u]", false, 'replace_listitems'); $open_tag[0] = "[list=1]"; $open_tag[1] = "[list=a]"; // ordered. $message = bbencode_first_pass_pda($message, $uid, $open_tag, "[/list]", "[/list:o]", false, 'replace_listitems'); //echo $message; $bbcode_ol['olist_open'] = '
    '; $bbcode_ol['olist_open'] = str_replace('{LIST_TYPE}', '\\1', $bbcode_ol['olist_open']); $message = preg_replace("/\[list=([a1]):$uid\]/si", $bbcode_ol['olist_open'], $message); $message = str_replace("[list:$uid]", "", $message); $message = str_replace("[/list:o:$uid]", "
", $message); return substr($message, 1); ; } function autolink($message) { $text = " " . $message; $text = preg_replace("#([\n ])([a-z]+?)://([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)#i", "\\1\\2://\\3", $text); $text = preg_replace("#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]*)?)#i", "\\1www.\\2.\\3\\4", $text); $text = preg_replace("#([\n ])([a-z0-9\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)?[\w]+)#i", "\\1\\2@\\3", $text); $text = substr($text, 1); return($text); } function viewlink($message) { $urltpl['url']='{DESCRIPTION}'; $urltpl['url1'] = str_replace('{URL}', '\\1', $urltpl['url']); $urltpl['url1'] = str_replace('{DESCRIPTION}', '\\1', $urltpl['url1']); $urltpl['url2'] = str_replace('{URL}', 'http://\\1', $urltpl['url']); $urltpl['url2'] = str_replace('{DESCRIPTION}', '\\1', $urltpl['url2']); $urltpl['url3'] = str_replace('{URL}', '\\1', $urltpl['url']); $urltpl['url3'] = str_replace('{DESCRIPTION}', '\\2', $urltpl['url3']); $urltpl['url4'] = str_replace('{URL}', 'http://\\1', $urltpl['url']); $urltpl['url4'] = str_replace('{DESCRIPTION}', '\\3', $urltpl['url4']); $bbcode_tpl['img']= '
'; $bbcode_tpl['img'] = str_replace('{URL}', '\\1', $bbcode_tpl['img']); $bbcode_tpl['imgr']= '
'; $bbcode_tpl['imgr'] = str_replace('{URL}', '\\1', $bbcode_tpl['imgr']); $bbcode_tpl['imgl']= '
'; $bbcode_tpl['imgl'] = str_replace('{URL}', '\\1', $bbcode_tpl['imgl']); $pattern[] = "#\[url\]([\w]+?://([\w\#$%&~/.\-;:=,?@\]+]+|\[(?!url=))*?)\[/url\]#is"; $replacement[] = $urltpl['url1']; $pattern[] = "#\[url\]((www|ftp)\.([\w\#$%&~/.\-;:=,?@\]+]+|\[(?!url=))*?)\[/url\]#is"; $replacement[] = $urltpl['url2']; $pattern[] = "#\[url=([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is"; $replacement[] = $urltpl['url3']; $pattern[] = "#\[url=((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is"; $replacement[] = $urltpl['url4']; $message = preg_replace("#\[img\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:]\\1' . str_replace(' ', '%20', '\\3') . '[/img:]'", $message); $message = preg_replace("#\[imgl\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/imgl\]#sie", "'[imgl:]\\1' . str_replace(' ', '%20', '\\3') . '[/imgl:]'", $message); $message = preg_replace("#\[imgr\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/imgr\]#sie", "'[imgr:]\\1' . str_replace(' ', '%20', '\\3') . '[/imgr:]'", $message); $pattern[] = "#\[img:\]([^?](?:[^\[]+|\[(?!url))*?)\[/img:]#i"; $replacement[] = $bbcode_tpl['img']; $pattern[] = "#\[imgr:\]([^?](?:[^\[]+|\[(?!url))*?)\[/imgr:\]#i"; $replacement[] = $bbcode_tpl['imgr']; $pattern[] = "#\[imgl:\]([^?](?:[^\[]+|\[(?!url))*?)\[/imgl:\]#i"; $replacement[] = $bbcode_tpl['imgl']; $message = preg_replace($pattern, $replacement, $message); return($message); } /** * $text - The text to operate on. * $uid - The UID to add to matching tags. * $open_tag - The opening tag to match. Can be an array of opening tags. * $close_tag - The closing tag to match. * $close_tag_new - The closing tag to replace with. * $mark_lowest_level - boolean - should we specially mark the tags that occur * at the lowest level of nesting? (useful for [code], because * we need to match these tags first and transform HTML tags * in their contents.. * $func - This variable should contain a string that is the name of a function. * That function will be called when a match is found, and passed 2 * parameters: ($text, $uid). The function should return a string. * This is used when some transformation needs to be applied to the * text INSIDE a pair of matching tags. If this variable is FALSE or the * empty string, it will not be executed. * If open_tag is an array, then the pda will try to match pairs consisting of * any element of open_tag followed by close_tag. This allows us to match things * like [list=A]...[/list] and [list=1]...[/list] in one pass of the PDA. * * NOTES: - this function assumes the first character of $text is a space. * - every opening tag and closing tag must be of the [...] format. */ function bbencode_first_pass_pda($text, $uid, $open_tag, $close_tag, $close_tag_new, $mark_lowest_level, $func, $open_regexp_replace = false) { $open_tag_count = 0; if (!$close_tag_new || ($close_tag_new == '')) { $close_tag_new = $close_tag; } $close_tag_length = strlen($close_tag); $close_tag_new_length = strlen($close_tag_new); $uid_length = strlen($uid); $use_function_pointer = ($func && ($func != '')); $stack = array(); if (is_array($open_tag)) { if (0 == count($open_tag)) { // No opening tags to match, so return. return $text; } $open_tag_count = count($open_tag); } else { // only one opening tag. make it into a 1-element array. $open_tag_temp = $open_tag; $open_tag = array(); $open_tag[0] = $open_tag_temp; $open_tag_count = 1; } $open_is_regexp = false; if ($open_regexp_replace) { $open_is_regexp = true; if (!is_array($open_regexp_replace)) { $open_regexp_temp = $open_regexp_replace; $open_regexp_replace = array(); $open_regexp_replace[0] = $open_regexp_temp; } } if ($mark_lowest_level && $open_is_regexp) { error("ERROR", "Unsupported operation for bbcode_first_pass_pda()."); } // Start at the 2nd char of the string, looking for opening tags. $curr_pos = 1; while ($curr_pos && ($curr_pos < strlen($text))) { $curr_pos = strpos($text, "[", $curr_pos); // If not found, $curr_pos will be 0, and the loop will end. if ($curr_pos) { // We found a [. It starts at $curr_pos. // check if it's a starting or ending tag. $found_start = false; $which_start_tag = ""; $start_tag_index = -1; for ($i = 0; $i < $open_tag_count; $i++) { // Grab everything until the first "]"... $possible_start = substr($text, $curr_pos, strpos($text, ']', $curr_pos + 1) - $curr_pos + 1); // // We're going to try and catch usernames with "[' characters. // if( preg_match('#\[quote=\\\"#si', $possible_start, $match) && !preg_match('#\[quote=\\\"(.*?)\\\"\]#si', $possible_start) ) { // OK we are in a quote tag that probably contains a ] bracket. // Grab a bit more of the string to hopefully get all of it.. if ($close_pos = strpos($text, '"]', $curr_pos + 9)) { if (strpos(substr($text, $curr_pos + 9, $close_pos - ($curr_pos + 9)), '[quote') === false) { $possible_start = substr($text, $curr_pos, $close_pos - $curr_pos + 2); } } } // Now compare, either using regexp or not. if ($open_is_regexp) { $match_result = array(); if (preg_match($open_tag[$i], $possible_start, $match_result)) { $found_start = true; $which_start_tag = $match_result[0]; $start_tag_index = $i; break; } } else { // straightforward string comparison. if (0 == strcasecmp($open_tag[$i], $possible_start)) { $found_start = true; $which_start_tag = $open_tag[$i]; $start_tag_index = $i; break; } } } if ($found_start) { // We have an opening tag. // Push its position, the text we matched, and its index in the open_tag array on to the stack, and then keep going to the right. $match = array("pos" => $curr_pos, "tag" => $which_start_tag, "index" => $start_tag_index); bbcode_array_push($stack, $match); // // Rather than just increment $curr_pos // Set it to the ending of the tag we just found // Keeps error in nested tag from breaking out // of table structure.. // $curr_pos += strlen($possible_start); } else { // check for a closing tag.. $possible_end = substr($text, $curr_pos, $close_tag_length); if (0 == strcasecmp($close_tag, $possible_end)) { // We have an ending tag. // Check if we've already found a matching starting tag. if (sizeof($stack) > 0) { // There exists a starting tag. $curr_nesting_depth = sizeof($stack); // We need to do 2 replacements now. $match = bbcode_array_pop($stack); $start_index = $match['pos']; $start_tag = $match['tag']; $start_length = strlen($start_tag); $start_tag_index = $match['index']; if ($open_is_regexp) { $start_tag = preg_replace($open_tag[$start_tag_index], $open_regexp_replace[$start_tag_index], $start_tag); } // everything before the opening tag. $before_start_tag = substr($text, 0, $start_index); // everything after the opening tag, but before the closing tag. $between_tags = substr($text, $start_index + $start_length, $curr_pos - $start_index - $start_length); // Run the given function on the text between the tags.. if ($use_function_pointer) { $between_tags = $func($between_tags, $uid); } // everything after the closing tag. $after_end_tag = substr($text, $curr_pos + $close_tag_length); // Mark the lowest nesting level if needed. if ($mark_lowest_level && ($curr_nesting_depth == 1)) { if ($open_tag[0] == '[code]') { $code_entities_match = array('#<#', '#>#', '#"#', '#:#', '#\[#', '#\]#', '#\(#', '#\)#', '#\{#', '#\}#'); $code_entities_replace = array('<', '>', '"', ':', '[', ']', '(', ')', '{', '}'); $between_tags = preg_replace($code_entities_match, $code_entities_replace, $between_tags); } $text = $before_start_tag . substr($start_tag, 0, $start_length - 1) . ":$curr_nesting_depth:$uid]"; $text .= $between_tags . substr($close_tag_new, 0, $close_tag_new_length - 1) . ":$curr_nesting_depth:$uid]"; } else { if ($open_tag[0] == '[code]') { $text = $before_start_tag . '[code]'; $text .= $between_tags . '[/code]'; } else { if ($open_is_regexp) { $text = $before_start_tag . $start_tag; } else { $text = $before_start_tag . substr($start_tag, 0, $start_length - 1) . ":$uid]"; } $text .= $between_tags . substr($close_tag_new, 0, $close_tag_new_length - 1) . ":$uid]"; } } $text .= $after_end_tag; // Now.. we've screwed up the indices by changing the length of the string. // So, if there's anything in the stack, we want to resume searching just after it. // otherwise, we go back to the start. if (sizeof($stack) > 0) { $match = bbcode_array_pop($stack); $curr_pos = $match['pos']; // bbcode_array_push($stack, $match); // ++$curr_pos; } else { $curr_pos = 1; } } else { // No matching start tag found. Increment pos, keep going. ++$curr_pos; } } else { // No starting tag or ending tag.. Increment pos, keep looping., ++$curr_pos; } } } } // while return $text; } // bbencode_first_pass_pda() function bbcode_array_pop(&$stack) { $arrSize = count($stack); $x = 1; //print_r($stack); //echo $arrSize; while(list($key, $val) = each($stack)) { if($x < count($stack)) { $tmpArr[] = $val; } else { $return_val = $val; } $x++; } if (isset($tmpArr)) $stack = $tmpArr; else $stack =array(); return($return_val); } function bbcode_array_push(&$stack, $value) { $stack[] = $value; return(sizeof($stack)); } function replace_listitems($message, $uid) { $message = str_replace("[*]", "[*:$uid]", $message); return $message; } function pagelink($mode, $pageno, $limit, $numrows) { if (!isset($pagestring)) { $pagestring = "";} $pages = intval($numrows/$limit); if ($numrows%$limit) { $pages++;} $current = ($pageno/$limit) + 1; if (($pages < 1) || ($pages == 0)) { $total = 1;} else { $total = $pages;} $first = $pageno + 1; if (!((($pageno + $limit) / $limit) >= $pages) && $pages != 1) { $last = $pageno + $limit; } else { $last = $numrows; } //echo $total ; //echo $pages ; $notprinted = true; if ($pageno != 0) { $back_page = $pageno - $limit; $pagestring .= "Prev " ; } for ($i=1; $i <= $pages; $i++) { $ppage = $limit*($i - 1); if ($ppage == $pageno) { //echo $ppage; $pagestring .= "$i "; $nextpage = $i + 1; } elseif ($pages - 5 < $i || $i < 8|| $i == $nextpage){ // else{ $pagestring .= "$i "; } else { if ($notprinted) { $pagestring .= "..."; $notprinted = false; } } // echo ($ppage)."
"; } if (!((($pageno+$limit) / $limit) >= $pages) && $pages != 1) { // If last page don't give next link. $next_page = $pageno + $limit; $pagestring .= "Next"; } $notprinted = true; return $pagestring; } function pagelinkuser($mode, $pageno, $limit, $numrows) { if (!isset($pagestring)) { $pagestring = "";} $pages = intval($numrows/$limit); if ($numrows%$limit) { $pages++;} $current = ($pageno/$limit) + 1; if (($pages < 1) || ($pages == 0)) { $total = 1;} else { $total = $pages;} $first = $pageno + 1; if (!((($pageno + $limit) / $limit) >= $pages) && $pages != 1) { $last = $pageno + $limit; } else { $last = $numrows; } //echo $total ; //echo $pages ; $notprinted = true; if ($pageno != 0) { $back_page = $pageno - $limit; $pagestring .= "Prev " ; } for ($i=1; $i <= $pages; $i++) { $ppage = $limit*($i - 1); if ($ppage == $pageno) { //echo $ppage; $pagestring .= "$i "; $nextpage = $i + 1; } elseif ($pages - 3 < $i || $i < 4 || $i == $nextpage){ // else{ $pagestring .= "$i "; } else { if ($notprinted) { $pagestring .= "..."; $notprinted = false; } } // echo ($ppage)."
"; } if (!((($pageno+$limit) / $limit) >= $pages) && $pages != 1) { // If last page don't give next link. $next_page = $pageno + $limit; $pagestring .= "Next"; } $notprinted = true; return $pagestring; } // // Append $SID to a url. Borrowed from phplib and modified. This is an // extra routine utilised by the session code above and acts as a wrapper // around every single URL and form action. If you replace the session // code you must include this routine, even if it's empty. // function append_sid($url, $non_html_amp = false) { global $SID; if ( !empty($SID) && !preg_match('#sid=#', $url) ) { $url .= ( ( strpos($url, '?') != false ) ? ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID; } return $url; } function error( $alert, $message ) { global $mybloggie_root_path; ?>



myBloggie Home | Back
set_filenames(array( 'footer' => $mybloggie_root_path.'footer.tpl' )); $template->pparse('footer'); exit; } function message( $alert, $message ) { global $mybloggie_root_path; ?>



myBloggie Home | Back
$minimum_length) { // Reset the tag_counter and pass through (part of) the entire text for ($i = 0; $i < strlen($posttext); $i++) { // Load the current character and the next one // if the string has not arrived at the last character $current_char = substr($posttext,$i,1); if ($i < strlen($posttext) - 1) { $next_char = substr($posttext,$i + 1,1); } else { $next_char = ""; } // First check if quotes are on if (!$quotes_on) { // Check if it's a tag // On a "<" add 3 if it's an opening tag (like ) if ($current_char == "<") { if ($next_char == "/") { $tag_counter++; } else { $tag_counter = $tag_counter + 3; } } // Slash signifies an ending (like or ... />) // substract 2 if ($current_char == "/") $tag_counter = $tag_counter - 2; // On a ">" substract 1 if ($current_char == ">") $tag_counter--; // If quotes are encountered, start ignoring the tags // (for directory slashes) if ($current_char == "\"") $quotes_on = TRUE; } else { // IF quotes are encountered again, turn it back off if ($current_char == "\"") $quotes_on = FALSE; } // Check if the counter has reached the minimum length yet, // then wait for the tag_counter to become 0, and chop the string there if ($i > $minimum_length - $length_offset && $tag_counter == 0) { // Ensure complete word is display & not partial... search for space $nospace = true; while ( $nospace ) { if ( substr($posttext,$i,1) != " ") { $i++; } else { $nospace = false; } } if ( substr($posttext,$i+1,1) == "/") { $i=$i+2; } $posttext = substr($posttext,0,$i); return $posttext; } } } return $posttext; } function highlight($text,$keywords) { $regex = '#(?!<.*?)(%s)(?![^<>]*?>)#si'; $colors = array('FFF000','FF0000','FFFF00','0000FF','000FFF' ,'00FF00','00FFF0','0FFF00'); $i=0; // surround search item items with highlight class foreach($keywords as $needle){ if ($i>count($colors)-1) { $i=0; } $start_tag = ""; $end_tag = ""; $pattern = sprintf($regex, $needle); $replacement = $start_tag . '\1' . $end_tag; $text = preg_replace($pattern, $replacement, $text); $i++; } return $text; } function self_url( $display=0 ) { if (isset($_SERVER['PHP_SELF']) && isset($_SERVER['HTTP_HOST'])) { $me = $_SERVER['PHP_SELF']; $Apathweb = explode("/", $me); $myFileName = array_pop($Apathweb); $pathweb = implode("/", $Apathweb); $myUrl = "http://".$_SERVER['HTTP_HOST'].$pathweb; } elseif (isset($_SERVER['PHP_SELF']) && isset($_SERVER['SERVER_NAME'])) { $me = $_SERVER['PHP_SELF']; $Apathweb = explode("/", $me); $pathweb = implode("/", $Apathweb); $myUrl = 'http://'.$_SERVER['SERVER_NAME'].$pathweb; } //echo $pathweb; //echo $Apathweb[0]; if ($display) { echo $myUrl; } else { return $myUrl; } } function tb_rdf($post_id, $title) { $tb_rdf = " " ; return $tb_rdf; } function gen_permalink($post_id) { $permalink = self_url()."/index.php?mode=viewid&post_id=".$post_id ; return $permalink; } function checkurlparameter($param) { //$params = array('submit' => 'post', 'preview' => 'preview', 'delete' => 'delete', 'poll_delete' => 'poll_delete', 'poll_add' => 'add_poll_option', 'poll_edit' => 'edit_poll_option', 'mode' => 'mode'); while( list($var, $param) = @each($params) ) { if ( !empty($HTTP_POST_VARS[$param]) || !empty($HTTP_GET_VARS[$param]) ) { $$var = ( !empty($HTTP_POST_VARS[$param]) ) ? htmlspecialchars($HTTP_POST_VARS[$param]) : htmlspecialchars($HTTP_GET_VARS[$param]); } else { $$var = ''; } } } function versioncheck($mb_version) { $error_no = 0; $error_msg = $latest_version = ''; $i = 0; $blog_info['version'] = $mb_version ; $get_status = false; $updatemsg = ""; if ($fsock = @fsockopen('www.mywebland.com', 80, $error_no, $error_msg, 10)) { @fputs($fsock, "GET /version/mybloggie/latestversion.txt HTTP/1.1\r\n"); @fputs($fsock, "HOST: www.mywebland.com\r\n"); @fputs($fsock, "Connection: close\r\n\r\n"); while (!@feof($fsock)) { if ($get_status) { $latest_version .= @fread($fsock, 1024); } else { if (@fgets($fsock, 1024) == "\r\n") { $get_status = true; } } } @fclose($fsock); //echo $latest_version ; $installed_version = explode('.', $blog_info['version']); $latest_version = explode("\n", $latest_version); $i = count($latest_version) ; if ($installed_version[0] < $latest_version[0] || $installed_version[1] < $latest_version[1] || $installed_version[2] < $latest_version[2]) { $updatemsg = "Alert ! myBloggie Installed is not the latest version.
"; $updatemsg .= "Installed version : ".$mb_version. ",   Latest available update : ".$latest_version[0].".".$latest_version[1].".".$latest_version[2]."
"; if ($i > 3) { $updatemsg .= $latest_version[3]; } } else { $updatemsg = "Installed version is the latest
"; if ($i > 4) { $updatemsg .="".$latest_version[4].""; } } } else { if ($error_msg) { $updatemsg = $error_msg; } else { $updatemsg = 'Socket functions disabled'; } } return $updatemsg; } function redirect($url) { global $db; if (!empty($db)) { $db->sql_close(); } $url = preg_replace('#^\/?(.*?)\/?$#', '/\1', trim($url)); echo @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')); if (@preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE'))) { header('Refresh: 0; URL='.$url); echo 'Redirect
Redirection in progress. If this page appears more that 3 seconds Click HERE to be redirected
'; exit; } header('Location: '. $url); exit; } function metaredirect($url, $sec) { global $db, $template; //if (!empty($db)) { $db->sql_close(); } //$url = preg_replace('#^\/?(.*?)\/?$#', '/\1', trim($url)); //echo $url; // $template->assign_vars(array( // 'META' => "") // ); echo "" ; } //Function BBCode to HTML that will work with Hoteditor. function BBCodeToHTML($text){ $patterns[] = "#&#"; $replacements[] = '&'; $patterns[] = "#<#"; $replacements[] = '<'; $patterns[] = "#>#"; $replacements[] = '>'; $patterns[] = "# #si"; $replacements[] = ' '; $patterns[] = "#\t#si"; $replacements[] = ' '; $patterns[] = "#\r\n#si"; $replacements[] = "
"; $patterns[] = "#\n#si"; $replacements[] = "
"; $patterns[] = "#\[hr\]#si"; $replacements[] = "
"; //Support Table here $patterns[] = "#\[table\]#si"; $replacements[] = ''; $patterns[] = "#\[\/table\]#si"; $replacements[] = '
'; $patterns[] = "#\[td\]#si"; $replacements[] = ''; $patterns[] = "#\[\/td\]#si"; $replacements[] = ''; $patterns[] = "#\[tr\]#si"; $replacements[] = ''; $patterns[] = "#\[\/tr\]#si"; $replacements[] = ''; $patterns[] = "#\[(indent|blockquote)\]#si"; $replacements[] = "
"; $patterns[] = "#\[\/(indent|blockquote)\]#si"; $replacements[] = "
"; $patterns[] = "#\[(\/|)sub\]#si"; $replacements[] = "<$1sub>"; $patterns[] = "#\[(\/|)sup\]#si"; $replacements[] = "<$1sup>"; $patterns[] = "#\[(\/|)strike\]#si"; $replacements[] = "<$1strike>"; $patterns[] = "#\[(\/|)u\]#si"; $replacements[] = "<$1u>"; $patterns[] = "#\[(\/|)b\]#si"; $replacements[] = "<$1strong>"; $patterns[] = "#\[(\/|)i\]#si"; $replacements[] = "<$1em>"; $patterns[] = "#\[size=1\]#si"; $replacements[] = ''; $patterns[] = "#\[size=2\]#si"; $replacements[] = ''; $patterns[] = "#\[size=3\]#si"; $replacements[] = ''; $patterns[] = "#\[size=4\]#si"; $replacements[] = ''; $patterns[] = "#\[size=5\]#si"; $replacements[] = ''; $patterns[] = "#\[size=6\]#si"; $replacements[] = ''; $patterns[] = "#\[size=7\]#si"; $replacements[] = ''; $patterns[] = "#\[font=(.*?)\]#si"; $replacements[] = ''; $patterns[] = "#\[color=(.*?)\]#si"; $replacements[] = ''; $patterns[] = "#\[highlight=(.*?)\]#si"; $replacements[] = ''; $patterns[] = "#\[\/(font|color|size|highlight)\]#si"; $replacements[] = ''; $patterns[] = "#\[(center|left|right|justify)\]#si"; $replacements[] = "
"; $patterns[] = "#\[\/(center|left|right|justify)\]#si"; $replacements[] = "
"; $patterns[] = "#\[email=(.*?)\]#si"; $replacements[] = ''; $patterns[] = "#\[email\](.*?)\[\/email\]#si"; $replacements[] = '$1[/email]'; $patterns[] = "#\[url=(.*?)\]#si"; $replacements[] = ''; $patterns[] = "#\[url\](.*?)\[\/url\]#si"; $replacements[] = '$1[/url]'; $patterns[] = "#\[\/(email|url)\]#si"; $replacements[] = ""; $patterns[] = "#\[img\]http:\/\/www.friendbookmark.com\/richedit\/upload(.*?)\[\/img\]#si"; $replacements[] = 'Article Image'; $patterns[] = "#\[img\](.*?)\[\/img\]#si"; $replacements[] = ''; $patterns[] = "#\[list=1\]#si"; $replacements[] = "
    "; $patterns[] = "#\[list\]#si"; $replacements[] = "
      "; $patterns[] = "#\[\*\]#si"; $replacements[] = "
    • "; $patterns[] = "#]*>
    • #si"; $replacements[] = "
    • "; $patterns[] = "#]*>
    • #si"; $replacements[] = "
    • "; $patterns[] = "#]*><\/li>#si"; $replacements[] = "
    • "; $patterns[] = "#\[\/list\]#si"; $replacements[] = ''; $patterns[] = "#\[FLASH=(.*?),(.*?)\](.*?)\[\/FLASH\]#si"; $replacements[] = ''; $text = preg_replace($patterns, $replacements, $text); if (preg_match("/
        0)$line="<".$line; if(preg_match("/
          /i",$line)){ $line=str_replace("",$temp,$line); } $output.=$line; $x++; } } else{ $output=$text; } //Try to close tag
        1. $output=str_replace("
        2. ","
        3. ",$output); $output=str_replace("
            ","
              ",$output); $output=str_replace("
                ","
                  ",$output); $output=str_replace("
            ","
          ",$output); $output=str_replace("
        ","
      ",$output); return $output; } function mk_dir($path, $rights = 0777) { $folder_path = array( strstr($path, '.') ? dirname($path) : $path); while(!@is_dir(dirname(end($folder_path))) && dirname(end($folder_path)) != '/' && dirname(end($folder_path)) != '.' && dirname(end($folder_path)) != '') array_push($folder_path, dirname(end($folder_path))); while($parent_folder_path = array_pop($folder_path)) if(!@mkdir($parent_folder_path, $rights)) user_error("Can't create folder \"$parent_folder_path\"."); } function returnSubstrings($text, $openingMarker, $closingMarker) { $openingMarkerLength = strlen($openingMarker); $closingMarkerLength = strlen($closingMarker); $result = array(); $position = 0; while (($position = strpos($text, $openingMarker, $position)) !== false) { $position += $openingMarkerLength; if (($closingMarkerPosition = strpos($text, $closingMarker, $position)) !== false) { $result[] = substr($text, $position, $closingMarkerPosition - $position); $position = $closingMarkerPosition + $closingMarkerLength; } } return $result; } //Function BBCode to HTML that will work with Hoteditor. function bbcfilter($text){ $patterns[] = "#&#"; $replacements[] = '&'; $patterns[] = "#<#"; $replacements[] = '<'; $patterns[] = "#>#"; $replacements[] = '>'; $patterns[] = "# #si"; $replacements[] = ''; $patterns[] = "#\t#si"; $replacements[] = ''; $patterns[] = "#\r\n#si"; $replacements[] = "
      "; $patterns[] = "#\n#si"; $replacements[] = "
      "; $patterns[] = "#\[hr\]#si"; $replacements[] = ""; //Support Table here $patterns[] = "#\[table\]#si"; $replacements[] = ''; $patterns[] = "#\[\/table\]#si"; $replacements[] = ''; $patterns[] = "#\[td\]#si"; $replacements[] = ''; $patterns[] = "#\[\/td\]#si"; $replacements[] = ''; $patterns[] = "#\[tr\]#si"; $replacements[] = ''; $patterns[] = "#\[\/tr\]#si"; $replacements[] = ''; $patterns[] = "#\[(indent|blockquote)\]#si"; $replacements[] = ""; $patterns[] = "#\[\/(indent|blockquote)\]#si"; $replacements[] = ""; $patterns[] = "#\[(\/|)sub\]#si"; $replacements[] = ""; $patterns[] = "#\[(\/|)sup\]#si"; $replacements[] = ""; $patterns[] = "#\[(\/|)strike\]#si"; $replacements[] = ""; $patterns[] = "#\[(\/|)u\]#si"; $replacements[] = "<$1u>"; $patterns[] = "#\[(\/|)b\]#si"; $replacements[] = "<$1strong>"; $patterns[] = "#\[(\/|)i\]#si"; $replacements[] = "<$1em>"; $patterns[] = "#\[size=1\]#si"; $replacements[] = ''; $patterns[] = "#\[size=2\]#si"; $replacements[] = ''; $patterns[] = "#\[size=3\]#si"; $replacements[] = ''; $patterns[] = "#\[size=4\]#si"; $replacements[] = ''; $patterns[] = "#\[size=5\]#si"; $replacements[] = ''; $patterns[] = "#\[size=6\]#si"; $replacements[] = ''; $patterns[] = "#\[size=7\]#si"; $replacements[] = ''; $patterns[] = "#\[font=(.*?)\]#si"; $replacements[] = ''; $patterns[] = "#\[color=(.*?)\]#si"; $replacements[] = ''; $patterns[] = "#\[highlight=(.*?)\]#si"; $replacements[] = ''; $patterns[] = "#\[\/(color|highlight)\]#si"; $replacements[] = ''; $patterns[] = "#\[(center|left|right|justify)\]#si"; $replacements[] = ""; $patterns[] = "#\[\/(center|left|right|justify)\]#si"; $replacements[] = ""; $patterns[] = "#\[email=(.*?)\]#si"; $replacements[] = ''; $patterns[] = "#\[email\](.*?)\[\/email\]#si"; $replacements[] = '$1[/email]'; $patterns[] = "#\[url=(.*?)\]#si"; $replacements[] = ''; $patterns[] = "#\[url\](.*?)\[\/url\]#si"; $replacements[] = '$1[/url]'; $patterns[] = "#\[\/(email|url)\]#si"; $replacements[] = ""; $patterns[] = "#\[img\](http:\/\/.*?\/)(.*?jpg|JPG|png|PNG)\[\/img\]#si"; $replacements[]= "-"; $patterns[] = "#\[img\](http:\/\/.*?\/)(.*?gif|GIF)\[\/img\]#si"; $replacements[]= 'Gif Image'; $patterns[] = "#\[list=1\]#si"; $replacements[] = "
        "; $patterns[] = "#\[list\]#si"; $replacements[] = "
          "; $patterns[] = "#\[\*\]#si"; $replacements[] = "
        • "; $patterns[] = "#]*>
        • #si"; $replacements[] = "
        • "; $patterns[] = "#]*>
        • #si"; $replacements[] = "
        • "; $patterns[] = "#]*><\/li>#si"; $replacements[] = "
        • "; $patterns[] = "#\[\/list\]#si"; $replacements[] = ''; $patterns[] = "#
          #si"; $replacements[] = ''; $patterns[] = "#\[FLASH=(.*?),(.*?)\](.*?)\[\/FLASH\]#si"; $replacements[] = ''; $text = preg_replace($patterns, $replacements, $text); if (preg_match("/
            0)$line="<".$line; if(preg_match("/
              /i",$line)){ $line=str_replace("",$temp,$line); } $output.=$line; $x++; } } else{ $output=$text; } //Try to close tag
            1. $output=str_replace("
            2. ","
            3. ",$output); $output=str_replace("
                ","
                  ",$output); $output=str_replace("
                    ","
                      ",$output); $output=str_replace("
                ","
              ",$output); $output=str_replace("
            ","
          ",$output); return $output; } //Function BBCode to HTML that will work with Hoteditor. function bbcfordesc($text){ $patterns[] = '#&#'; $replacements[] = '&'; $patterns[] = '#<#'; $replacements[] = '<'; $patterns[] = '#>#'; $replacements[] = '>'; $patterns[] = '# #si'; $replacements[] = ''; $patterns[] = '#\t#si'; $replacements[] = ''; $patterns[] = '#\r\n#si'; $replacements[] = ''; $patterns[] = '#\n#si'; $replacements[] = ''; $patterns[] = '#\[hr\]#si'; $replacements[] = ''; //Support Table here $patterns[] = '#\[table\]#si'; $replacements[] = ''; $patterns[] = '#\[\/table\]#si'; $replacements[] = ''; $patterns[] = '#\[td\]#si'; $replacements[] = ''; $patterns[] = '#\[\/td\]#si'; $replacements[] = ''; $patterns[] = '#\[tr\]#si'; $replacements[] = ''; $patterns[] = '#\[\/tr\]#si'; $replacements[] = ''; $patterns[] = '#\[(indent|blockquote)\]#si'; $replacements[] = ''; $patterns[] = '#\[\/(indent|blockquote)\]#si'; $replacements[] = ''; $patterns[] = '#\[(\/|)sub\]#si'; $replacements[] = ''; $patterns[] = '#\[(\/|)sup\]#si'; $replacements[] = ''; $patterns[] = '#\[(\/|)strike\]#si'; $replacements[] = ''; $patterns[] = '#\[(\/|)u\]#si'; $replacements[] = ''; $patterns[] = '#\[(\/|)b\]#si'; $replacements[] = ''; $patterns[] = '#\[(\/|)i\]#si'; $replacements[] = ''; $patterns[] = '#\[size=1\]#si'; $replacements[] = ''; $patterns[] = '#\[size=2\]#si'; $replacements[] = ''; $patterns[] = '#\[size=3\]#si'; $replacements[] = ''; $patterns[] = '#\[size=4\]#si'; $replacements[] = ''; $patterns[] = '#\[size=5\]#si'; $replacements[] = ''; $patterns[] = '#\[size=6\]#si'; $replacements[] = ''; $patterns[] = '#\[size=7\]#si'; $replacements[] = ''; $patterns[] = '#\[font=(.*?)\]#si'; $replacements[] = ''; $patterns[] = '#\[color=(.*?)\]#si'; $replacements[] = ''; $patterns[] = '#\[highlight=(.*?)\]#si'; $replacements[] = ''; $patterns[] = '#\[\/(color|highlight)\]#si'; $replacements[] = ''; $patterns[] = '#\[(center|left|right|justify)\]#si'; $replacements[] = ''; $patterns[] = '#\[\/(center|left|right|justify)\]#si'; $replacements[] = ''; $patterns[] = '#\[email=(.*?)\]#si'; $replacements[] = ''; $patterns[] = '#\[email\](.*?)\[\/email\]#si'; $replacements[] = ''; $patterns[] = '#\[url=(.*?)\]#si'; $replacements[] = ''; $patterns[] = '#\[url\](.*?)\[\/url\]#si'; $replacements[] = ''; $patterns[] = '#\[\/(email|url)\]#si'; $replacements[] = ''; $patterns[] = '#\[img\](http:\/\/.*?\/)(.*?jpg|JPG|png|PNG)\[\/img\]#si'; $replacements[]= ''; $patterns[] = '#\[img\](https:\/\/.*?\/)(.*?jpg|JPG|png|PNG)\[\/img\]#si'; $replacements[]= ''; $patterns[] = '#\[img\](http:\/\/.*?\/)(.*?gif|GIF)\[\/img\]#si'; $replacements[]= ''; $patterns[] = '#\[img\](https:\/\/.*?\/)(.*?gif|GIF)\[\/img\]#si'; $replacements[]= ''; $patterns[] = '#\[list=1\]#si'; $replacements[] = ''; $patterns[] = '#\[list\]#si'; $replacements[] = ''; $patterns[] = '#\[\*\]#si'; $replacements[] = ''; $patterns[] = '#]*>
        • #si'; $replacements[] = ''; $patterns[] = '#]*>
        • #si'; $replacements[] = ''; $patterns[] = '#]*><\/li>#si'; $replacements[] = ''; $patterns[] = '#\[\/list\]#si'; $replacements[] = ''; $patterns[] = '#
          #si'; $replacements[] = ''; $patterns[] = '#\[FLASH=(.*?),(.*?)\](.*?)\[\/FLASH\]#si'; $replacements[] = ''; $text = preg_replace($patterns, $replacements, $text); if (preg_match("/
            0)$line="<".$line; if(preg_match("/
              /i",$line)){ $line=str_replace("",$temp,$line); } $output.=$line; $x++; } } else{ $output=$text; } //Try to close tag
            1. $output=str_replace("
            2. ","",$output); $output=str_replace("
                ","",$output); $output=str_replace("
                  ","",$output); $output=str_replace("
              ","",$output); $output=str_replace("
            ","",$output); return $output; } function sendmail($strTo, $strFrom, $strCC, $strBCC, $strSubject, $strBody, $htmlMail) { $strHeaders = ""; if ($htmlMail) { $strHeaders .= "MIME-Version: 1.0\r\n"; $strHeaders .= "Content-type: text/html; charset=iso-8859-1\r\n"; } if (strcmp($strTo, "") != 0) $strHeaders .= "To: " . $strTo . "\r\n"; if (strcmp($strFrom, "") != 0) $strHeaders .= "From: " . $strFrom . "\r\n"; if (strcmp($strCC, "") != 0) { $strHeaders .= "Cc: " . $strCC . "\r\n"; if (strcmp($strTo, "") != 0) $strTo .= "," . $strCC; else $strTo .= $strCC; } if (strcmp($strBCC, "") != 0) { $strHeaders .= "Bcc: " . $strBCC . "\r\n"; if (strcmp($strBcc, "") != 0) $strTo .= "," . $strBcc; else $strTo .= $strBcc; } return @mail($strTo, $strSubject, $strBody, $strHeaders); } function cint($str) { return (round($str, 0)); } class paging { var $ps; //Pagesize var $pss; //Page scroll size var $pg; //Current page var $tr; //Total rows var $tp; //Total pages var $rec; //Start row for limit var $cps; var $sp; //Start page var $ep; //End page var $tps; //Total page sets var $pps; //Previous page set var $nps; //Next page set var $i; //Counter function paging() { $this->pss = 5; if (!empty($_GET["ps"])) $this->ps = (int) $_GET["ps"]; else $this->ps = 10; if (empty($this->ps)) $this->ps = 10; if (!empty($_GET["pg"])) $this->pg = (int) $_GET["pg"]; else $this->pg = 1; if (empty($this->pg)) $this->pg = 1; $this->i = 1; } function setpages($sql) { $rs = mysql_fetch_row(mysql_query($sql)); $this->tr = $rs[0]; //$this->tp = round($this->tr/$this->ps, 0)+1; $this->tp = round($this->tr/$this->ps, 0); if ($this->tp < 1) $this->tp = 1; if ($this->tr > $this->ps) if (($this->tr%$this->ps) != 0) $this->tp++; //echo $this->tr%$this->ps; if (!empty($this->pg)) { if ($this->pg > $this->tp) $this->pg = $this->tp; } else $this->pg = 1; $this->rec = ($this->pg*$this->ps)-$this->ps; } function getlimit() { return " limit " . $this->rec . ", " . $this->ps; } function showPagingw($url, $qs) { $this->cps = cint( ($this->pg / $this->pss) + .49 ); $this->tps = ((cint( ($this->tp / $this->pss) + .49 )-1)*$this->pss)+1; $this->sp = (($this->cps-1)*$this->pss)+1; $this->ep = $this->sp + 5; if ($this->ep > $this->tp) $this->ep = $this->tp; $this->pps = $this->sp - 5; $this->nps = $this->sp + 5; echo ""; //if ($this->pg == 1) //echo "<< <"; //else { //if ($this->pps > 0) // echo "<<"; //else // echo "<<"; //echo " <"; //} echo "   "; //$this->ep=($this->ep; for ($this->i=$this->sp; $this->i<=$this->ep; $this->i++) { if ($this->i == $this->pg) echo "[" . $this->i . "]"; else echo "" . $this->i . ""; echo " "; } echo "   "; //if ($this->pg == $this->tp) //echo "> >>"; //else { //echo "> "; //if ($this->nps <= $this->tps) // echo ">>"; //else // echo ">>"; //} } function showPaging($url, $qs) { $this->cps = cint( ($this->pg / $this->pss) + .49 ); $this->tps = ((cint( ($this->tp / $this->pss) + .49 )-1)*$this->pss)+1; $this->sp = (($this->cps-1)*$this->pss)+1; $this->ep = $this->sp + 5; if ($this->ep > $this->tp) $this->ep = $this->tp; $this->pps = $this->sp - 5; $this->nps = $this->sp + 5; $pagelink = ""; if ($this->pg !=1 && $this->pg!='' ) $pagelink = $pagelink.""; //echo "Page: "; if ($this->pg == 1) $pagelink = $pagelink."<< <"; else { if ($this->pps > 0) $pagelink = $pagelink."<<"; else $pagelink = $pagelink."<<"; $pagelink = $pagelink." <"; } $pagelink = $pagelink."   "; for ($this->i=$this->sp; $this->i<=$this->ep; $this->i++) { //$url="Listing".$this->i.".html"; $url1=$url."?pg=".$this->i.$qs; if ($this->i == $this->pg) { $pagelink = $pagelink."[" . $this->i . "]"; $nextpage= $url."?pg=".($this->i+1).$qs; //echo $nextpage; } else $pagelink = $pagelink."" . $this->i . ""; $pagelink = $pagelink." "; $url1=''; } $pagelink = $pagelink."   "; if ($this->pg == $this->tp) $pagelink = $pagelink."> >>"; else { $pagelink = $pagelink."> " ; if ($this->nps <= $this->tps) $pagelink = $pagelink.">>"; else $pagelink = $pagelink.">>"; } return $pagelink; } function showPagingbtag($url, $qs, $bvpw) { $this->cps = cint( ($this->pg / $this->pss) + .49 ); $this->tps = ((cint( ($this->tp / $this->pss) + .49 )-1)*$this->pss)+1; $this->sp = (($this->cps-1)*$this->pss)+1; $this->ep = $this->sp + 5; if ($this->ep > $this->tp) $this->ep = $this->tp; $this->pps = $this->sp - 5; $this->nps = $this->sp + 5; $pagelink = ""; $clean_btag_name = _prepare_url_text($url); $clean_btag_name = strtolower($clean_btag_name); if ($qs == 0) { $qs = "/"; } if ($bvpw != '') { if ($bvpw == 1) { $keywordurl = SITE_DOMAIN . '/videos/tag'.$qs; } elseif ($bvpw == 2) { $keywordurl = SITE_DOMAIN . '/blogu/tag'.$qs; } elseif ($bvpw == 3) { $keywordurl = SITE_DOMAIN . '/webs/tag'.$qs; } elseif ($bvpw == 4) { $keywordurl = SITE_DOMAIN . '/photos/tag'.$qs; } elseif ($bvpw == 8) { $keywordurl = SITE_DOMAIN . '/audio/tag'.$qs; } else { $keywordurl = SITE_DOMAIN . '/authors/'.$qs.'/'; } } if ($this->pg !=1 && $this->pg!='' ) $pagelink = $pagelink.""; //echo "Page: "; if ($this->pg == 1) $pagelink = $pagelink."<< <"; else { if ($this->pps > 0) $pagelink = $pagelink."pps+4) . "&\" class=bodylinks><<"; else $pagelink = $pagelink."<<"; $pagelink = $pagelink." pg-1) . "&\" class=bodylinks><"; } $pagelink = $pagelink."   "; for ($this->i=$this->sp; $this->i<=$this->ep; $this->i++) { //$url="Listing".$this->i.".html"; $url1=$keywordurl.$clean_btag_name."/pg".$this->i; if ($this->i == $this->pg) { $pagelink = $pagelink."[" . $this->i . "]"; $nextpage= $keywordurl.$clean_btag_name."/pg".($this->i+1); //echo $nextpage; } else $pagelink = $pagelink."" . $this->i . ""; $pagelink = $pagelink." "; $url1=''; } $pagelink = $pagelink."   "; if ($this->pg == $this->tp) $pagelink = $pagelink."> >>"; else { $pagelink = $pagelink."pg+1) . "&\" class=bodylinks>> " ; if ($this->nps <= $this->tps) $pagelink = $pagelink."nps . "&\" class=bodylinks>>>"; else $pagelink = $pagelink.">>"; } return $pagelink; } function showPagingvcat($url, $qs, $url11, $qs1) { $this->cps = cint( ($this->pg / $this->pss) + .49 ); $this->tps = ((cint( ($this->tp / $this->pss) + .49 )-1)*$this->pss)+1; $this->sp = (($this->cps-1)*$this->pss)+1; $this->ep = $this->sp + 5; if ($this->ep > $this->tp) $this->ep = $this->tp; $this->pps = $this->sp - 5; $this->nps = $this->sp + 5; $pagelink = ""; $clean_category_name = _prepare_url_text($url); $clean_category_name = strtolower($clean_category_name); $clean_user_name = _prepare_url_text($url11); $clean_user_name = strtolower($clean_user_name); $keywordurl = SITE_DOMAIN . '/cat' . $qs. '-'. $clean_category_name.'/user'.$qs1.'-'.$clean_user_name; if ($this->pg !=1 && $this->pg!='' ) $pagelink = $pagelink.""; //echo "Page: "; if ($this->pg == 1) $pagelink = $pagelink."<< <"; else { if ($this->pps > 0) $pagelink = $pagelink."pps+4) . "&\" class=bodylinks><<"; else $pagelink = $pagelink."<<"; $pagelink = $pagelink." pg-1) . "&\" class=bodylinks><"; } $pagelink = $pagelink."   "; for ($this->i=$this->sp; $this->i<=$this->ep; $this->i++) { //$url="Listing".$this->i.".html"; $url1=$keywordurl."/pg".$this->i; if ($this->i == $this->pg) { $pagelink = $pagelink."[" . $this->i . "]"; $nextpage= $keywordurl."/pg".($this->i+1); //echo $nextpage; } else $pagelink = $pagelink."" . $this->i . ""; $pagelink = $pagelink." "; $url1=''; } $pagelink = $pagelink."   "; if ($this->pg == $this->tp) $pagelink = $pagelink."> >>"; else { $pagelink = $pagelink."pg+1) . "&\" class=bodylinks>> " ; if ($this->nps <= $this->tps) $pagelink = $pagelink."nps . "&\" class=bodylinks>>>"; else $pagelink = $pagelink.">>"; } return $pagelink; } } ?>