Security line in all includes changed
[mailer.git] / inc / modules / guest / what-wernis_portal.php
index 7cd8ea8ab4e1d821247f4689bc35574ecdeeea1e..5c82e8d187af1c96ea7ae85479e5111d14d7a22a 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,20 +46,33 @@ 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",
                "sitelink"  => "http://www.wds66.com",
-               "refid"     => "10437",
+               "refid"     => bigintval($_CONFIG['wernis_refid']),
                "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>");
 
 //