Security line in all includes changed
[mailer.git] / inc / modules / guest / what-wernis_portal.php
index 7a5df08..5c82e8d 100644 (file)
@@ -32,8 +32,7 @@
  ************************************************************************/
 
 // Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 }
@@ -47,8 +46,9 @@ ADD_DESCR("guest", basename(__FILE__));
 OUTPUT_HTML("<DIV style=\"padding-left: 10px; padding-right: 10px\">");
 $rdf = new fase4_rdf;
 $rdf->use_dynamic_display(false);
-$rdf->set_CacheDir(PATH."cache/");
+$rdf->set_CacheDir(PATH."inc/cache/");
 $rdf->set_salt(SITE_KEY);
+$rdf->set_max_item(10);
 $rdf->set_Options(
        array(
                "textinput" => "hidden",
@@ -57,10 +57,22 @@ $rdf->set_Options(
                "reflink"   => "/ref.php?refid=",
        )
 );
-$rdf->set_max_item(10);
+
+// Use proxy?
+if ((!empty($_CONFIG['proxy_host'])) && (!empty($_CONFIG['proxy_port']))) {
+       // Set proxy data
+       $rdf->set_proxy($_CONFIG['proxy_host'], $_CONFIG['proxy_port']);
+
+       // Use auth?
+       if (!empty($_CONFIG['proxy_username'])) {
+               // Set auth data
+               $rdf->set_proxy_auth($_CONFIG['proxy_username'], $_CONFIG['proxy_password']);
+       } // END  - if
+} // END - if
+
 $rdf->parse_RDF("http://www.wds66.com/rss.xml");
 $rdf->finish();
-$rdf->clear_cache();
+// DISABLED: $rdf->clear_cache();
 OUTPUT_HTML("</DIV>");
 
 //