Portions created by the Initial Developer are Copyright (C) 2008-2012 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane James Rose */ return; //disable include "root.php"; require_once "resources/require.php"; require_once "resources/check_auth.php"; require_once "config.php"; if (permission_exists('content_view')) { //access granted } else { echo "access denied"; exit; } //add multi-lingual support require_once "app_languages.php"; foreach($text as $key => $value) { $text[$key] = $value[$_SESSION['domain']['language']['code']]; } //include module specific information if (strlen($mod_config_path)==0) { include "config.php"; } else { //$mod_config_path = "/news"; //examples //$mod_config_path = "/app/news"; //examples include $mod_config_path.'/config.php'; } $rss_css_url = 'http://'.$_SERVER["HTTP_HOST"].$_SERVER["PHP_SELF"]; $rss_css_url = str_replace ("rss.php", "rss.css", $rss_css_url); $content_type = $_GET["c"]; //echo "contenttype $content_type"; if (strlen($_GET["rss_category"]) > 0) { $rss_category = $_GET["rss_category"]; } if (strlen($content_type) == 0) { $content_type = "rss"; //define default contenttype } if ($content_type == "html") { session_start(); } //echo $rss_css_url; //exit; if ($content_type == "rss") { header('Content-Type: text/xml'); echo ''; echo ''; //echo ''; //echo "\n"; echo "\n"; echo "\n"; echo "$module_title ".$text['title-rss']."\n"; //echo "http://www.xul.fr/\n"; echo "".$text['description-rss']."\n"; echo "en-US\n"; //echo "\n"; //echo "\n"; //echo " http://www.xul.fr/xul-icon.gif\n"; //echo " http://www.xul.fr/index.html\n"; //echo ""; } $sql = ""; $sql .= "select * from v_rss "; $sql .= "where rss_category = '$rss_category' "; $sql .= "and length(rss_del_date) = 0 "; $sql .= "or rss_category = '$rss_category' "; $sql .= "and rss_del_date is null "; $sql .= "order by rss_uuid asc "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $last_cat = ""; $count = 0; $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); foreach ($result as &$row) { $rss_uuid = $row["rss_uuid"]; $rss_title = $row["rss_title"]; $rss_description = $row["rss_description"]; $rss_link = $row["rss_link"]; //$rss_description = $row[rss_sub_description]; //$rss_description = str_replace ("\r\n", "
", $rss_description); //$rss_description = str_replace ("\n", "
", $rss_description); if ($content_type == "rss") { $rss_title = htmlentities($rss_title); $rss_description = htmlentities($rss_description); echo "\n"; echo "".$rss_title."\n"; echo "".$rss_description."\n"; echo "".$rss_link."\n"; //echo "12 Mar 2007 19:38:06 GMT\n"; //echo "http://www.google.com/log/123\n"; //echo "http://www.google.com/log/121#comments\n"; //echo "Web Design"; echo "\n"; echo "\n"; } else { if (strlen($rss_link) > 0) { echo "".$rss_title."
\n"; } else { echo "".$rss_title."
\n"; } echo "".$rss_description."\n"; echo "

"; if ($rss_sub_show == 1) { //--- Begin Sub List ------------------------------------------------------- echo "


"; echo "$rss_sub_title
"; $sql = ""; $sql .= "select * from v_rss_sub "; $sql .= "where rss_uuid = '$rss_uuid' "; $sql .= "and length(rss_sub_del_date) = 0 "; $sql .= "or rss_uuid = '$rss_uuid' "; $sql .= "and rss_sub_del_date is null "; if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } $prep_statement_2 = $db->prepare($sql); $prep_statement_2->execute(); $result2 = $prep_statement->fetchAll(PDO::FETCH_NAMED); $result_count2 = count($result2); $c2 = 0; $row_style["0"] = "background-color: #F5F5DC;"; $row_style["1"] = "background-color: #FFFFFF;"; echo "
\n"; //echo " Notes"; echo "\n"; //echo ""; if ($result_count == 0) { //no results echo ""; } else { echo "\n"; foreach($result2 as $row2) { echo "\n"; //echo ""; //echo ""; //echo ""; echo ""; echo ""; //echo ""; //echo ""; //echo ""; //echo ""; //echo ""; //echo ""; echo ""; $rss_sub_description = $row2[rss_sub_description]; //$rss_sub_description = str_replace ("\r\n", "
", $rss_sub_description); //$rss_sub_description = str_replace ("\n", "
", $rss_sub_description); echo ""; echo "\n"; echo ""; echo ""; echo "\n"; if ($c2==0) { $c2=1; } else { $c2=0; } } //end foreach unset($sql, $result, $row_count); echo "
 
".$rss_uuid." ".$row2[rss_sub_title]."  ".$row2[rss_sub_link]." "; echo " ".$row2[rss_sub_title].""; echo "".$row2[rss_sub_add_date]."".$row2[rss_sub_optional_1]."".$row2[rss_sub_optional_2]."".$row2[rss_sub_optional_3]."".$row2[rss_sub_optional_4]."".$row2[rss_sub_optional_5]."".$row2[rss_sub_add_user].""; echo "  "; //echo " "; echo "   \n"; //echo " Update "; echo "
"; echo "".$rss_sub_description." "; echo "
\n"; echo "
\n"; echo "

"; echo " \n"; echo "\n"; } //end if results echo "\n"; //--- End Sub List ------------------------------------------------------- } } //echo "\n"; //echo " ".$row["favname"]."\n"; //echo "".$row["favdesc"]."\n"; //echo "".$row["favurl"]."\n"; //echo "\n"; //$last_cat = $row["favcat"]; $count++; } if ($content_type == "rss") { echo "
\n"; echo "\n"; echo "
\n"; } ?>