]> git.mxchange.org Git - mailer.git/commitdiff
Config added for surfbar
authorRoland Häder <roland@mxchange.org>
Mon, 1 Sep 2008 00:24:01 +0000 (00:24 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 1 Sep 2008 00:24:01 +0000 (00:24 +0000)
.gitattributes
inc/language/de.php
inc/language/surfbar_de.php [new file with mode: 0644]
inc/modules/admin/what-config_stats.php
inc/modules/admin/what-config_surfbar.php
templates/de/html/admin/admin_config_surfbar.tpl [new file with mode: 0644]
templates/de/html/admin/admin_footer.tpl

index 4283e03a3de3e3f5dcf037435612ef53827ad0d4..9380cae3be4e1b2c2f9d0d5f23e39c175d88b4c4 100644 (file)
@@ -171,6 +171,7 @@ inc/language/repair_de.php -text
 inc/language/rewrite_de.php -text
 inc/language/sponsor_de.php -text
 inc/language/support_de.php -text
+inc/language/surfbar_de.php -text
 inc/language/task_de.php -text
 inc/language/theme_de.php -text
 inc/language/top10_de.php -text
@@ -789,6 +790,7 @@ templates/de/html/admin/admin_config_secure.tpl -text
 templates/de/html/admin/admin_config_sponsor.tpl -text
 templates/de/html/admin/admin_config_stats.tpl -text
 templates/de/html/admin/admin_config_sub_points.tpl -text
+templates/de/html/admin/admin_config_surfbar.tpl -text
 templates/de/html/admin/admin_config_title.tpl -text
 templates/de/html/admin/admin_config_top10.tpl -text
 templates/de/html/admin/admin_config_transfer.tpl -text
index b5b0838566881db28ddb00a2ecd6f333e193231e..0fc0173d981bac07799d3f0b04b6651d9228f5c0 100644 (file)
@@ -1150,6 +1150,7 @@ define('ADMIN_CHANGE_LOGIN', "Anderes Adminlogin");
 define('ADMIN_PASSWORD_RESET_DONE', "Ihr Administratorkennwort wurde neu gesetzt. Sie k&ouml;nnen sich jetzt mit Ihren neuen Zugangsdaten im Adminbereich einloggen.");
 define('ADMIN_CONTINUE_LOGIN', "Weiter zum Administratorlogin");
 define('ADMIN_RESET_PASS_LINK', "Jetzt Ihr Administratorkennwort zur&uuml;cksetzen (n&ouml;tiger Schritt!)");
+define('ADMIN_SUPPORT_FORUM_LINK', "Direktlink zum Support-Forum (neues Fenster)");
 
 //
 ?>
diff --git a/inc/language/surfbar_de.php b/inc/language/surfbar_de.php
new file mode 100644 (file)
index 0000000..2d51ae3
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 08/31/2008 *
+ * ===============                              Last change: 08/31/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : surfbar_de.php                                   *
+ * -------------------------------------------------------------------- *
+ * Short description : German langugage support                         *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Deutsche Sprachunterstuetzung                    *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (basename($_SERVER['PHP_SELF']) == basename(__FILE__)) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Language definitions
+define('ADMIN_CONFIG_SURFBAR_TITLE', "Konfiguration der Surfbar");
+define('ADMIN_CONFIG_SURFBAR_STATIC_REWARD', "Statische Verg&uuml;tung in ".POINTS.":");
+define('ADMIN_CONFIG_SURFBAR_STATIC_TIME', "Statische Verweildauer bis n&auml;chste Seite geladen wird in Sekunden:");
+define('ADMIN_CONFIG_SURFBAR_STATIC_LOCK', "Statische Reload-Sperre (oberes Frame oder ges. Surfbar):");
+define('ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL', "Verg&uuml;tungsmodel ausw&auml;hlen:");
+define('ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL_STATIC', "Statische Werte verwenden.");
+define('ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL_DYNAMIC', "Dynamische Werte errechnen.");
+
+//
+?>
index 155a72ccbb3224adf53b4ba48efef8a72b5ffbc0..a82febbef7fa861d0c020077bad23cda9738ed8b 100644 (file)
  ************************************************************************/
 
 // Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
-{
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 }
+
 // Add description as navigation point
 ADD_DESCR("admin", basename(__FILE__));
 
-if (isset($_POST['ok']))
-{
+// Was the form submitted?
+if (isset($_POST['ok'])) {
        // Save settings
        ADMIN_SAVE_SETTINGS($_POST);
-}
- else
-{
+} else {
        // Guest stats
        switch (strtolower($_CONFIG['guest_stats']))
        {
@@ -75,5 +73,6 @@ if (isset($_POST['ok']))
        // Load template
        LOAD_TEMPLATE("admin_config_stats");
 }
+
 //
 ?>
index e49887b35109b233ed84811f72a20d584790e460..10d587c6758c94b5d73d2e1cb4782b75a846f607 100644 (file)
@@ -40,7 +40,35 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin())) {
 // Add description as navigation point
 ADD_DESCR("admin", basename(__FILE__));
 
-die("<pre>".print_r($_CONFIG, true)."</pre>");
+// Was the form submitted?
+if (isset($_POST['ok'])) {
+       // Replace german decimal comma with computer decimal dot
+       if (isset($_POST['surfbar_static_reward'])) $_POST['surfbar_static_reward'] = str_replace(",", ".", $_POST['surfbar_static_reward']);
+
+       // Save settings
+       ADMIN_SAVE_SETTINGS($_POST);
+} else {
+       // Prepare content
+       $content = array(
+               'surfbar_static_reward' => TRANSLATE_COMMA($_CONFIG['surfbar_static_reward']),
+               'surfbar_static_time'   => $_CONFIG['surfbar_static_time'],
+               'surfbar_static_lock'   => $_CONFIG['surfbar_static_lock']
+       );
+
+       // Prepare payment model for template
+       if ($_CONFIG['surfbar_pay_model'] == "STATIC") {
+               // Static model
+               define('__CONFIG_SURFBAR_PAY_MODEL_STATIC' , " checked=\"checked\"");
+               define('__CONFIG_SURFBAR_PAY_MODEL_DYNAMIC', "");
+       } else {
+               // Dynamic model
+               define('__CONFIG_SURFBAR_PAY_MODEL_STATIC' , "");
+               define('__CONFIG_SURFBAR_PAY_MODEL_DYNAMIC', " checked=\"checked\"");
+       }
+
+       // Load template
+       LOAD_TEMPLATE("admin_config_surfbar", false, $content);
+}
 
 //
 ?>
diff --git a/templates/de/html/admin/admin_config_surfbar.tpl b/templates/de/html/admin/admin_config_surfbar.tpl
new file mode 100644 (file)
index 0000000..715d56b
--- /dev/null
@@ -0,0 +1,63 @@
+<FORM action="{!URL!}/modules.php?module=admin&amp;what=config_surfbar" method="POST">
+<TABLE border="0" cellspacing="0" cellpadding="0" width="400" class="admin_table dashed" align="center">
+       <TR>
+               <TD colspan="2" align="center" class="admin_title bottom2" height="30">
+                       <STRONG>{--ADMIN_CONFIG_SURFBAR_TITLE--}</STRONG>
+               </TD>
+       </TR>
+       <TR><TD height="3" colspan="2" class="seperator">&nbsp;</TD></TR>
+       <TR>
+               <TD width="70%" height="30" align="right" style="padding-right:5px">
+                       {--ADMIN_CONFIG_SURFBAR_STATIC_REWARD--}
+               </TD>
+               <TD width="30%">
+                       <INPUT type="text" name="surfbar_static_reward" size="10" maxlength="20" value="$content[surfbar_static_reward]" />
+               </TD>
+       </TR>
+       <TR>
+               <TD height="30" align="right" style="padding-right:5px">
+                       {--ADMIN_CONFIG_SURFBAR_STATIC_TIME--}
+               </TD>
+               <TD>
+                       <INPUT type="text" name="surfbar_static_time" size="10" maxlength="20" value="$content[surfbar_static_time]" />
+               </TD>
+       </TR>
+       <TR><TD height="3" colspan="2" class="seperator">&nbsp;</TD></TR>
+       <TR>
+               <TD height="30" align="right" style="padding-right:5px">
+                       {--ADMIN_CONFIG_SURFBAR_STATIC_LOCK--}
+               </TD>
+               <TD>
+                       <INPUT type="text" name="surfbar_static_lock" size="10" maxlength="20" value="$content[surfbar_static_lock]" />
+               </TD>
+       </TR>
+       <TR><TD height="8" colspan="2" class="seperator bottom2">&nbsp;</TD></TR>
+       <TR>
+               <TD height="20" align="center" colspan="2" class="admin_footer bottom2">
+                       {--ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL--}
+               </TD>
+       </TR>
+       <TR>
+               <TD height="30" align="right" style="padding-right:5px">
+                       {--ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL_STATIC--}
+               </TD>
+               <TD>
+                       <INPUT type="radio" name="surfbar_pay_model" size="10" maxlength="20" value="STATIC"{--__CONFIG_SURFBAR_PAY_MODEL_STATIC--} />
+               </TD>
+       </TR>
+       <TR>
+               <TD class="bottom2" height="30" align="right" style="padding-right:5px">
+                       {--ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL_DYNAMIC--}
+               </TD>
+               <TD class="bottom2">
+                       <INPUT type="radio" name="surfbar_pay_model" size="10" maxlength="20" value="DYNAMIC"{--__CONFIG_SURFBAR_PAY_MODEL_DYNAMIC--} />
+               </TD>
+       </TR>
+       <TR>
+               <TD colspan="2" align="center" class="admin_footer">
+                       <INPUT type="reset" class="admin_reset" value="{--CLEAR_FORM--}" />&nbsp;*
+                       <INPUT type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" />
+               </TD>
+       </TR>
+</TABLE>
+</FORM>
index c13b658b6acb9b9d2d59c1ffb13324f6d1539eb2..4becac12ae0dd8e031e4cec6398a1eafcb37ab0b 100644 (file)
@@ -1 +1,3 @@
-<A href="{!URL!}/modules.php?module=index">{--ADMIN_BACK_TO_GUEST_MENU--}</A>
\ No newline at end of file
+<A href="{!URL!}/modules.php?module=index">{--ADMIN_BACK_TO_GUEST_MENU--}</A><BR />
+<BR />
+<A href="http://forum.mxchange.org" target="_blank">{--ADMIN_SUPPORT_FORUM_LINK--}</A>