$numb) { $text = substr($text, 0, $numb); $text = substr($text,0,strrpos($text," ")); $punctuation = ".!?:;,-"; //punctuation you want removed $text = (strspn(strrev($text), $punctuation)!=0) ? substr($text, 0, -strspn(strrev($text), $punctuation)) : $text; $text = $text.$etc; } $text = htmlentities($text, ENT_QUOTES); return $text; } function recursive_in_array($needle, $haystack) { foreach ($haystack as $stalk) { if ($needle === $stalk || (is_array($stalk) && recursive_in_array($needle, $stalk))) { return true; } } return false; } /* This is somehow fucked function in_multi_array($needle, $haystack) { $in_multi_array = false; if(in_array($needle, $haystack)) { $in_multi_array = true; } else { for($i = 0; $i < sizeof($haystack); $i++) { if(is_array($haystack[$i])) { if(in_multi_array($needle, $haystack[$i])) { $in_multi_array = true; break; } } } } return $in_multi_array; } */ function convert_smart_quotes($string) { // get more chars here: // http://www.octadyne.com/html_entity_acsii_table.cfm $search = array( chr(145), chr(146), chr(147), chr(148), chr(150), chr(151), chr(233), chr(232) ); $replace = array( '\'', '\'', '"', '"', '-', '-', 'e', 'e' ); return str_replace($search, $replace, $string); } /** * Returns string with newline formatting converted into HTML paragraphs. * * @author Michael Tomasello * @copyright Copyright (c) 2007, Michael Tomasello * @license http://www.opensource.org/licenses/bsd-license.html BSD License * * @param string $string String to be formatted. * @param boolean $line_breaks When true, single-line line-breaks will be converted to HTML break tags. * @param boolean $xml When true, an XML self-closing tag will be applied to break tags (
). * @return string */ function nl2p($string, $line_breaks = true, $xml = true) { // Remove existing HTML formatting to avoid double-wrapping things $string = str_replace(array('

', '

', '
', '
'), '', $string); // It is conceivable that people might still want single line-breaks // without breaking into a new paragraph. if ($line_breaks == true) return '

'.preg_replace(array("/([\n]{2,})/i", "/([^>])\n([^<])/i"), array("

\n

", ''), trim($string)).'

'; else return '

'.preg_replace("/([\n]{1,})/i", "

\n

", trim($string)).'

'; } //function nl2p($text) { // return "

" . str_replace("\n\n", "

", $text) . "

"; //} function url2link($text) { $ret = ' ' . $text; $ret = preg_replace("#(^|[\n ])([\w]+?://[\w]+[^ \"\n\r\t<]*)#ise", "'\\1\\2'", $ret); $ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#ise", "'\\1\\2'", $ret); $ret = preg_replace("#(^|[\n ])([a-z0-9&\-_\.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1\\2@\\3", $ret); $ret = substr($ret, 1); return($ret); } /* function url2link($text) { $text = preg_replace("/(\r\n|\n|\r)/", "\n", $text); $lines = explode("\n", $text); for ($x = 0, $y = count($lines); $x < $y; $x++) { $line = $lines[$x]; $words = explode(' ', $line); for ($i = 0, $j = count($words); $i < $j; $i++) { $word = $words[$i]; $punctuation = '.,\'")(<>;:'; // Links may not end in these if (substr($word, 0, 7) == 'http://' || substr($word, 0, 4) == 'www.') { $trailing = ''; // Knock off ending punctuation $last = substr($word, -1); while (strpos($punctuation, $last) !== false) { // Last character is punctuation - eliminate it $trailing .= $last; $word = substr($word, 0, -1); $last = substr($word, -1); } // Make link, add trailing punctuation back afterwards $link = $word; if (substr($link, 0, 4) == 'www.') { // This link needs an http:// $link = 'http://'.$link; } $word = ''.$word.''.$trailing; } $words[$i] = $word; } $lines[$x] = implode(' ', $words); } return implode("\n", $lines); } */ /* function autop($pee, $br = 1) { $pee = $pee . "\n"; // just to make things a little easier, pad the end $pee = preg_replace('|
\s*
|', "\n\n", $pee); // Space things out a little $allblocks = '(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|map|area|blockquote|address|math|style|input|p|h[1-6]|hr)'; $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee); $pee = preg_replace('!()!', "$1\n\n", $pee); $pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines if ( strpos($pee, ']*)>\s*|', "", $pee); // no pee inside object/embed $pee = preg_replace('|\s*\s*|', '', $pee); } $pee = preg_replace("/\n\n+/", "\n\n", $pee); // take care of duplicates // make paragraphs, including one at the end $pees = preg_split('/\n\s*\n/', $pee, -1, PREG_SPLIT_NO_EMPTY); $pee = ''; foreach ( $pees as $tinkle ) $pee .= '

' . trim($tinkle, "\n") . "

\n"; $pee = preg_replace('|

\s*?

|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace $pee = preg_replace('!

([^<]+)\s*?(]*>)!', "

$1

$2", $pee); $pee = preg_replace( '|

|', "$1

", $pee ); $pee = preg_replace('!

\s*(]*>)\s*

!', "$1", $pee); // don't pee all over a tag $pee = preg_replace("|

(|", "$1", $pee); // problem with nested lists $pee = preg_replace('|

]*)>|i', "

", $pee); $pee = str_replace('

', '

', $pee); $pee = preg_replace('!

\s*(]*>)!', "$1", $pee); $pee = preg_replace('!(]*>)\s*

!', "$1", $pee); if ($br) { $pee = preg_replace_callback('/<(script|style).*?<\/\\1>/s', create_function('$matches', 'return str_replace("\n", "", $matches[0]);'), $pee); $pee = preg_replace('|(?)\s*\n|', "
\n", $pee); // optionally make line breaks $pee = str_replace('', "\n", $pee); } $pee = preg_replace('!(]*>)\s*
!', "$1", $pee); $pee = preg_replace('!
(\s*]*>)!', '$1', $pee); if (strpos($pee, ')(.*?)!is', 'clean_pre', $pee ); $pee = preg_replace( "|\n

$|", '

', $pee ); $pee = preg_replace('/

\s*?(' . get_shortcode_regex() . ')\s*<\/p>/s', '$1', $pee); // don't auto-p wrap shortcodes that stand alone return $pee; } */ ?> CJBQ 800am | Gallery

CJBQ
 
 


Notice: Undefined variable: gallery_row in /var/www/html/cjbq.com/html/gallery.php on line 194

 
 
$lastpage) { $page = $lastpage; } // if if ($page < 1) { $page = 1; } // if $limit = 'LIMIT ' .($page - 1) * $rows_per_page .',' .$rows_per_page; ?>
 
10) { ?>
 
  © Quinte Broadcasting