0) { $cloak = true; } else { $query = "select cloak_id from cloak where cloak = '$ip' and cloak_type = 2"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); if ($num_rows > 0) { $cloak = true; } else { $query = "select cloak from cloak where cloak_type = 3"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); for ($i=0; $i<$num_rows; $i++) { $row = mysql_fetch_array($result); $cloak_ip = $row['cloak']; $ip_split = explode(".", $ip); $ip = $ip_split[0].".".$ip_split[1].".".$ip_split[2]; if ($cloak_ip == $ip) { $cloak = true; break; } } } } return $cloak; } function get_ban() { global $REMOTE_ADDR; $ip = $REMOTE_ADDR; $query = "select ban_id from bans where ban_ip = '$ip'"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); if ($num_rows > 0) { $ban = true; } return $ban; } function get_root_categories() { $query = "select category_name from categories where category_parent = '0'"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); for ($i=0; $i<$num_rows; $i++) { $row[$i] = mysql_fetch_array($result); } return $row; } function get_breaking_news() { $query = "select feed_id, feed_title, feed_content, feed_date, source_id from feeds order by feed_date DESC limit 13"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); for ($i=0; $i<$num_rows; $i++) { $row = mysql_fetch_array($result); $breaking_array[$i]['feed_id'] = $row['feed_id']; $breaking_array[$i]['feed_title'] = $row['feed_title']; $breaking_array[$i]['feed_content'] = $row['feed_content']; $breaking_array[$i]['feed_date'] = $row['feed_date']; $breaking_array[$i]['source_id'] = $row['source_id']; $query = "select comment_id from comments LEFT JOIN comments_verified on (comments.comment_email = comments_verified.comment_verified_email) where feed_id = '".$row['feed_id']."' and comment_verified_confirm_date != 0"; $total_comments = mysql_num_rows(mysql_query($query)); $breaking_array[$i]['total_comments'] = $total_comments; } return $breaking_array; } function get_recent_comments() { $query = "select feeds.feed_id, feed_title, comment_name, comment_text, comment_date from comments LEFT JOIN comments_verified on (comments.comment_email = comments_verified.comment_verified_email) LEFT JOIN feeds on (comments.feed_id = feeds.feed_id) where comment_verified_confirm_date > 0 order by comments.comment_date DESC limit 15"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); for ($i=0; $i<$num_rows; $i++) { $row[$i] = mysql_fetch_array($result); } return $row; } function get_headlines() { $query = "select feeds.feed_id, feed_title, feed_content, feed_date, feed_image, feed_image_width, feed_image_height, source_id from headlines LEFT JOIN feeds on (feeds.feed_id = headlines.feed_id) order by feeds.feed_date DESC, feeds.source_id limit 50"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); for ($i=0; $i<$num_rows; $i++) { $row = mysql_fetch_array($result); $feed_array[$i]['feed_id'] = $row['feed_id']; $feed_array[$i]['feed_title'] = $row['feed_title']; $feed_array[$i]['feed_content'] = $row['feed_content']; $feed_array[$i]['feed_date'] = $row['feed_date']; $feed_array[$i]['feed_image'] = $row['feed_image']; $feed_array[$i]['feed_image_width'] = $row['feed_image_width']; $feed_array[$i]['feed_image_height'] = $row['feed_image_height']; $feed_array[$i]['source_id'] = $row['source_id']; $query = "select comment_id from comments LEFT JOIN comments_verified on (comments.comment_email = comments_verified.comment_verified_email) where feed_id = '".$row['feed_id']."' and comment_verified_confirm_date != 0"; $total_comments = mysql_num_rows(mysql_query($query)); $feed_array[$i]['total_comments'] = $total_comments; } $headline_array = array_csort($feed_array, "source_id", "feed_date", SORT_DESC); return $headline_array; } function get_site_map_feeds($min, $max) { $query = "select feed_id, feed_title from feeds order by feed_id DESC limit $min, $max"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); for ($i=0; $i<$num_rows; $i++) { $row[$i] = mysql_fetch_array($result); } return $row; } function get_total_feeds() { $query = "select count(feed_id) from feeds"; $result = mysql_query($query); $row = mysql_fetch_array($result); $count = $row[0]; return $count; } function get_comments($feed_id) { $query = "select comment_name, comment_url, comment_text, comment_date from comments LEFT JOIN comments_verified on (comments.comment_email = comments_verified.comment_verified_email) where feed_id = '$feed_id' and comment_verified_confirm_date != 0 order by comment_date"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); for ($i=0; $i<$num_rows; $i++) { $row[$i] = mysql_fetch_array($result); } return $row; } function array_csort() { $args = func_get_args(); $marray = array_shift($args); $i=0; $msortline = "return(array_multisort("; foreach ($args as $arg) { $i++; if (is_string($arg)) { foreach ($marray as $row) { $sortarr[$i][] = $row[$arg]; } } else { $sortarr[$i] = $arg; } $msortline .= "\$sortarr[".$i."],"; } $msortline .= "\$marray));"; eval($msortline); return $marray; } function get_subs($id) { $query = "select category_id from categories where category_name = '$id'"; $result = mysql_query($query); $row = mysql_fetch_array($result); $category_id = $row['category_id']; $query = "select category_name from categories where category_parent = '$category_id' order by category_name"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); $row = null; for ($i=0; $i<$num_rows; $i++) { $row[$i] = mysql_fetch_array($result); } return $row; } function get_keywords($id) { $query = "select keyword_name from keywords LEFT JOIN categories on (keywords.category_id = categories.category_id) where category_name = '$id' order by keyword_name"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); for ($i=0; $i<$num_rows; $i++) { $row[$i] = mysql_fetch_array($result); } return $row; } function get_links($id) { $query = "select link_text, link_url, link_description, link_static from links LEFT JOIN keywords on (links.keyword_id = keywords.keyword_id) where keyword_link = '$id' order by link_url"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); for ($i=0; $i<$num_rows; $i++) { $row[$i] = mysql_fetch_array($result); } return $row; } function get_partners($link_page) { $query = "select link_text, link_url, link_description from links where keyword_id = 0 and link_page = '$link_page' order by link_id"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); for ($i=0; $i<$num_rows; $i++) { $row[$i] = mysql_fetch_array($result); } return $row; } function get_keyword_name($id) { $query = "select keyword_name from keywords where keyword_link = '$id'"; $result = mysql_query($query); $row = mysql_fetch_array($result); $keyword_name = $row['keyword_name']; return $keyword_name; } /* function get_feed_search($keyword) { $maximum = 40; if (eregi('"', $keyword, $regs)) { $keyword = str_replace('"', "", $keyword); $keywords = explode(" ", $keyword); for ($i=0; $i", $feed_content); for ($i=0; $i 620) { $feed_description = trim_feed_description($feed_description, $keyword); } break; } } return $feed_description; } function trim_feed_description($id, $keyword) { $explosion = explode('."', $id); if (count($explosion) > 1) { for ($i=0; $i 620) { $explosion = explode('. ', $id); for ($i=0; $i 1) { for ($i=0; $i 1) { for ($i=0; $i 1) { if (strlen($description_explosion[0]) < 30) { for ($i=0; $i", $feed_content); for ($i=0; $i 100) { $feed_description = $feed_content_explosion[$i]; break; } } return $feed_description; } function get_headline_description($feed_content) { $feed_content_explosion = explode("

", $feed_content); for ($i=0; $i 100) { $feed_description = $feed_content_explosion[$i]; break; } } $feed_description = "

".$feed_description."

".$feed_content_explosion[$i+1]."

".$feed_content_explosion[$i+2]; return $feed_description; } function make_url_compatible($id) { $id = strtolower($id); $id = preg_replace("/[^A-Za-z0-9 -]/", "", $id); $id = str_replace(" ", "-", $id); return $id; } function get_feed_date($feed_date) { $current_time = mktime(); $minutes_elapsed = round(($current_time - $feed_date) / 60); if ($minutes_elapsed < 300) { $hours = floor($minutes_elapsed / 60); $minutes = $minutes_elapsed - ($hours * 60); if ($hours > 0) { if ($hours > 1) { $hours = "$hours hours,"; } else { $hours = "$hours hour,"; } } else { $hours = ""; } if ($minutes != 1) { $minutes = "$minutes minutes ago"; } else { $minutes = "$minutes minute ago"; } $time_elapsed = "$hours $minutes"; } else { $feed_date = $feed_date + (180*60); $date = date("D M jS Y", $feed_date); $time = date("g:i a", $feed_date); $time_elapsed = "$date at $time ET"; } return $time_elapsed; } function decipher_category($id) { $query = "select source_title from sources where source_id = '$id'"; $result = mysql_query($query); $row = mysql_fetch_array($result); $category = $row['source_title']; $category = str_replace("Yahoo! News - ", "", $category); $category = str_replace("Politics - ", "", $category); return $category; } function get_domain() { global $HTTP_SERVER_VARS; $domain = str_replace("www.", "", $_SERVER['HTTP_HOST']); return $domain; } function get_subdomain() { global $HTTP_SERVER_VARS; $domain = str_replace("www.", "", $_SERVER['HTTP_HOST']); $domain_array = explode(".", $domain); $subdomain = $domain_array[0]; return $subdomain; } function get_site_name($domain) { $domain = strtolower($domain); if ($domain == "entertainment-news.org") { $site_name = "Entertainment News"; } elseif ($domain == "political-news.org") { $site_name = "Political News"; } elseif ($domain == "health-news.org") { $site_name = "Health News"; } elseif ($domain == "insidesports.org") { $site_name = "Inside Sports"; } return $site_name; } function get_common_word($domain) { $domain = strtolower($domain); if ($domain == "entertainment-news.org" || $domain == "insidesports.org") { $common_word = "An"; } else { $common_word = "A"; } return $common_word; } function get_logo($domain) { $domain = strtolower($domain); if ($domain == "entertainment-news.org") { $logo = "entertainment-news.gif"; } elseif ($domain == "political-news.org") { $logo = "political-news.gif"; } elseif ($domain == "health-news.org") { $logo = "health-news.gif"; } elseif ($domain == "insidesports.org") { $logo = "insidesports.gif"; } return $logo; } function get_site_directory($domain) { $domain = strtolower($domain); if ($domain == "entertainment-news.org") { $site_directory = "entertai"; } elseif ($domain == "political-news.org") { $site_directory = "politica"; } elseif ($domain == "health-news.org") { $site_directory = "health"; } elseif ($domain == "insidesports.org") { $site_directory = "sports"; } return $site_directory; } function get_sponsor($domain) { $query = "select config_sponsor from config limit 1"; $result = mysql_query($query); $row = mysql_fetch_array($result); $sponsor = $row['config_sponsor']; return $sponsor; } function get_index_seo() { $query = "select config_seo_title, config_seo_meta, config_seo_description from config limit 1"; $result = mysql_query($query); $row = mysql_fetch_array($result); return $row; } function get_image_alt($feed_image) { $feed_image_alt = str_replace("-", " ", $feed_image); $feed_image_alt = str_replace(".jpg", "", $feed_image_alt); $feed_image_alt = str_replace(".jpeg", "", $feed_image_alt); $feed_image_alt = str_replace(".gif", "", $feed_image_alt); return $feed_image_alt; } function get_adsense_channel($domain) { $domain = strtolower($domain); if ($domain == "political-news.org") { $adsense_channel = "0470364569"; } elseif ($domain == "entertainment-news.org") { $adsense_channel = "8041797634"; } elseif ($domain == "health-news.org") { $adsense_channel = "7505601100"; } elseif ($domain == "insidesports.org") { $adsense_channel = "0634767729"; } return $adsense_channel; } function get_tabs($domain) { if ($domain == "entertainment-news.org") { $tabs[0]['site_name'] = "Entertainment News"; $tabs[1]['site_name'] = "Political News"; $tabs[2]['site_name'] = "Health News"; $tabs[3]['site_name'] = "Inside Sports"; $tabs[0]['image_name'] = "entertainment"; $tabs[1]['image_name'] = "political"; $tabs[2]['image_name'] = "health"; $tabs[3]['image_name'] = "sports"; $tabs[0]['domain'] = "entertainment-news.org"; $tabs[1]['domain'] = "political-news.org"; $tabs[2]['domain'] = "health-news.org"; $tabs[3]['domain'] = "insidesports.org"; $tabs[0]['imagewidth'] = "120"; $tabs[1]['imagewidth'] = "92"; $tabs[2]['imagewidth'] = "83"; $tabs[3]['imagewidth'] = "86"; } elseif ($domain == "political-news.org") { $tabs[0]['site_name'] = "Political News"; $tabs[1]['site_name'] = "Entertainment News"; $tabs[2]['site_name'] = "Health News"; $tabs[3]['site_name'] = "Inside Sports"; $tabs[0]['image_name'] = "political"; $tabs[1]['image_name'] = "entertainment"; $tabs[2]['image_name'] = "health"; $tabs[3]['image_name'] = "sports"; $tabs[0]['domain'] = "political-news.org"; $tabs[1]['domain'] = "entertainment-news.org"; $tabs[2]['domain'] = "health-news.org"; $tabs[3]['domain'] = "insidesports.org"; $tabs[0]['imagewidth'] = "92"; $tabs[1]['imagewidth'] = "120"; $tabs[2]['imagewidth'] = "83"; $tabs[3]['imagewidth'] = "86"; } elseif ($domain == "health-news.org") { $tabs[0]['site_name'] = "Health News"; $tabs[1]['site_name'] = "Entertainment News"; $tabs[2]['site_name'] = "Political News"; $tabs[3]['site_name'] = "Inside Sports"; $tabs[0]['image_name'] = "health"; $tabs[1]['image_name'] = "entertainment"; $tabs[2]['image_name'] = "political"; $tabs[3]['image_name'] = "sports"; $tabs[0]['domain'] = "health-news.org"; $tabs[1]['domain'] = "entertainment-news.org"; $tabs[2]['domain'] = "political-news.org"; $tabs[3]['domain'] = "insidesports.org"; $tabs[0]['imagewidth'] = "83"; $tabs[1]['imagewidth'] = "120"; $tabs[2]['imagewidth'] = "92"; $tabs[3]['imagewidth'] = "86"; } elseif ($domain == "insidesports.org") { $tabs[0]['site_name'] = "Inside Sports"; $tabs[1]['site_name'] = "Health News"; $tabs[2]['site_name'] = "Entertainment News"; $tabs[3]['site_name'] = "Political News"; $tabs[0]['image_name'] = "sports"; $tabs[1]['image_name'] = "health"; $tabs[2]['image_name'] = "entertainment"; $tabs[3]['image_name'] = "political"; $tabs[0]['domain'] = "insidesports.org"; $tabs[1]['domain'] = "health-news.org"; $tabs[2]['domain'] = "entertainment-news.org"; $tabs[3]['domain'] = "political-news.org"; $tabs[0]['imagewidth'] = "86"; $tabs[1]['imagewidth'] = "83"; $tabs[2]['imagewidth'] = "120"; $tabs[3]['imagewidth'] = "92"; } return $tabs; } function get_keyword_link($keyword) { $keyword_link = strtolower($keyword); $keyword_link = str_replace("&", "zampersandz", $keyword_link); $keyword_link = preg_replace("/[^A-Za-z0-9 -]/", "", $keyword_link); $keyword_link = str_replace("zampersandz", "&", $keyword_link); $keyword_link = str_replace(" ", "-", $keyword_link); return $keyword_link; } function get_netinsert_meta($domain) { if ($domain == "health-news.org") { $meta = ''; } elseif ($domain == "entertainment-news.org") { $meta = ''; } elseif ($domain == "political-news.org") { $meta = ''; } return $meta; } function send_mail($myname, $myemail, $contactname, $contactemail, $subject, $message) { // Configuration $MP = "/usr/sbin/sendmail -t"; $spec_envelope = 1; $extra_headers = "Message-ID: <" . md5(uniqid(time())) . "@" . $_SERVER['SERVER_NAME'] . ">\nFrom: ".$myemail."\nTo: $contactemail\nSubject: $subject\nDate: " . date('r', time()) . "\nReturn-Path: ".$myemail.">\nMIME-Version: 1.0\nContent-type: text/plain; charset=iso-8859-1\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\nX-MimeOLE: Produced by ".$_SERVER['SERVER_NAME']."\n"; // Access Sendmail // Conditionally match envelope address if($spec_envelope) { $MP .= " -f $myemail"; } $fd = popen($MP,"w"); fputs($fd, "$extra_headers"); fputs($fd, $message); pclose($fd); } function processURI() { global $HTTP_SERVER_VARS; // Define our global variables $array = explode("/", $_SERVER['REQUEST_URI']); // Explode the URI using '/'. $num = count($array); // How many items in the array? $url_array = array(); // Init our new array for ($i = 0 ; $i < $num ; $i++) { // Insert each element from the $url_array[$i] = $array[$i]; // request URI into $url_array } // with a key of argN. We start $i // at 1 because exploding the URI // gives us an empty ref in $array[0] // It's a hacky way of getting round it // *:) return $url_array; // return our new shiny array } function processSubdomain() { global $HTTP_SERVER_VARS; // Define our global variables $array = explode(".", $_SERVER['HTTP_HOST']); // Explode the URI using '/'. $num = count($array); // How many items in the array? $url_array = array(); // Init our new array for ($i = 0 ; $i < $num ; $i++) { // Insert each element from the $url_array[$i] = $array[$i]; // request URI into $url_array } // with a key of argN. We start $i // at 1 because exploding the URI // gives us an empty ref in $array[0] // It's a hacky way of getting round it // *:) return $url_array; // return our new shiny array } function replace_special_characters($id) { $id = str_replace("& ", "& ", $id); $id = str_replace ("", "", $id); $id = str_replace ("", "", $id); $id = str_replace ("", "", $id); $id = str_replace ("", "", $id); $id = str_replace ("—", "—", $id); $id = str_replace ("é", "é", $id); $id = str_replace ("Ù", "Ù", $id); $id = str_replace ("–", "–", $id); return $id; } function get_feed_image_directory($domain, $feed_id) { if ($domain == "entertainment-news.org" && $feed_id > 50554) { $directory = "2006/thumbnails"; } elseif ($domain == "political-news.org" && $feed_id > 25767) { $directory = "2006/thumbnails"; } elseif ($domain == "health-news.org" && $feed_id > 6875) { $directory = "2006/thumbnails"; } else { $directory = "thumbnails"; } return $directory; } function get_full_size_directory($domain, $feed_id) { if ($domain == "entertainment-news.org" && $feed_id > 50554) { $directory = "2006/full_size"; } elseif ($domain == "political-news.org" && $feed_id > 25767) { $directory = "2006/full_size"; } elseif ($domain == "health-news.org" && $feed_id > 6875) { $directory = "2006/full_size"; } else { $directory = "full_size"; } return $directory; } //gets the correct directory for uploading images in the scripts function get_directory($domain) { if ($domain == "entertainment-news.org") { $directory = "entertai"; } elseif ($domain == "political-news.org") { $directory = "politica"; } elseif ($domain == "health-news.org") { } elseif ($domain == "insidesports.org") { } return $directory; } function checkforspam() { if (preg_match("/bcc:|Content-Type:/i", implode($_POST))) { die("Annihilated the SPAM."); } } ?>
Fatal error: Call to undefined function get_domain() in /home/sbefort/public_html/health-news.org/public/topic.php on line 5