]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/what-wernis_portal.php
Even more rewrites/fixes from EL branch (please report any broken part after you...
[mailer.git] / inc / modules / guest / what-wernis_portal.php
index 7cd8ea8ab4e1d821247f4689bc35574ecdeeea1e..5b52e527edd8eb98a049ab11bbf5d766bed82ffc 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 10/19/2003 *
- * ================                             Last change: 10/19/2003 *
+ * Mailer v0.2.1-FINAL                                Start: 10/19/2003 *
+ * ===================                          Last change: 10/19/2003 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : what-                                            *
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  :                                                  *
  * -------------------------------------------------------------------- *
- *                                                                      *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * Needs to be in all Files and every File needs "svn propset           *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  ************************************************************************/
 
 // Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
-       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
-       require($INC);
-}
+if (!defined('__SECURITY')) {
+       die();
+} // END - if
 
 // Special file
-require_once (PATH."inc/rdf.class.php");
+loadIncludeOnce('inc/classes/rdf.class.php');
 
 // Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+addMenuDescription('guest', __FILE__);
+
+if ((!isExtensionActive('wernis')) && (!isAdmin())) {
+       loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('wernis'));
+       return;
+} // END - if
 
-OUTPUT_HTML("<DIV style=\"padding-left: 10px; padding-right: 10px\">");
-$rdf = new fase4_rdf;
+outputHtml('<div style="padding-left: 10px; padding-right: 10px">');
+$rdf = new fase4_rdf();
+$rdf->_use_nl2br = false;
 $rdf->use_dynamic_display(false);
-$rdf->set_CacheDir(PATH."cache/");
-$rdf->set_salt(SITE_KEY);
+$rdf->set_CacheDir(getConfig('CACHE_PATH') . '');
+$rdf->set_salt(md5(getConfig('SITE_KEY')));
+$rdf->set_max_item(10);
 $rdf->set_Options(
        array(
-               "textinput" => "hidden",
-               "sitelink"  => "http://www.wds66.com",
-               "refid"     => "10437",
-               "reflink"   => "/ref.php?refid=",
+               'textinput' => 'hidden',
+               'sitelink'  => 'http://www.wds66.com',
+               'refid'     => getConfig('wernis_refid'),
+               'reflink'   => '/ref.php?refid=',
        )
 );
-$rdf->set_max_item(10);
-$rdf->parse_RDF("http://www.wds66.com/rss.xml");
-$rdf->finish();
-$rdf->clear_cache();
-OUTPUT_HTML("</DIV>");
 
-//
+// Use proxy?
+if ((getConfig('proxy_host') != '') && (getConfig('proxy_port') > 0)) {
+       // Set proxy data
+       $rdf->set_proxy(getConfig('proxy_host'), getConfig('proxy_port'));
+
+       // Use auth?
+       if (getConfig('proxy_username') != '') {
+               // Set auth data
+               $rdf->set_proxy_auth(getConfig('proxy_username'), getConfig('proxy_password'));
+       } // END  - if
+} // END - if
+
+$rdf->parse_RDF('http://www.wds66.com/rss.xml');
+
+// Fix to avoid 'headers already sent' bug. Thanks to Profi-Concept
+outputHtml($rdf->finish(true));
+outputHtml('</div>');
+
+// [EOF]
 ?>