projects
/
mailer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b8ba382
)
Some fixes, surfbar fixed reload is now in select boxes
author
Roland Häder
<roland@mxchange.org>
Tue, 2 Dec 2008 19:15:17 +0000
(19:15 +0000)
committer
Roland Häder
<roland@mxchange.org>
Tue, 2 Dec 2008 19:15:17 +0000
(19:15 +0000)
inc/databases.php
patch
|
blob
|
history
inc/functions.php
patch
|
blob
|
history
inc/modules/admin/admin-inc.php
patch
|
blob
|
history
inc/modules/admin/what-add_surfbar_url.php
patch
|
blob
|
history
inc/modules/admin/what-config_newsletter.php
patch
|
blob
|
history
inc/modules/admin/what-config_user.php
patch
|
blob
|
history
templates/de/html/admin/admin_add_surfbar_url.tpl
patch
|
blob
|
history
diff --git
a/inc/databases.php
b/inc/databases.php
index 25f1607c87eba20d6ec9b58cb8ac7bb0a5bf85ad..b8c28bd10e825b6673c7459b3e72ed0756c36ebf 100644
(file)
--- a/
inc/databases.php
+++ b/
inc/databases.php
@@
-113,8
+113,8
@@
define('USAGE_BASE', "usage");
// Server-URL (DO NOT CHANGE THIS OR YOU CANNOT CHECK FOR UPDATES/EXTENSIONS!)
define('SERVER_URL', "http://www.mxchange.org");
// Server-URL (DO NOT CHANGE THIS OR YOU CANNOT CHECK FOR UPDATES/EXTENSIONS!)
define('SERVER_URL', "http://www.mxchange.org");
-//
This current patch level
-define('CURR_SVN_REVISION', "58
3
");
+//
Current SVN revision
+define('CURR_SVN_REVISION', "58
4
");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
diff --git
a/inc/functions.php
b/inc/functions.php
index 5a8a571579e5ef02b22f28984299b914590ac1cb..1a863f6df84c45ade91a2d65f417dd434b6d1749 100644
(file)
--- a/
inc/functions.php
+++ b/
inc/functions.php
@@
-2522,31
+2522,31
@@
function FILE_READABLE($fqfn) {
// Converts timestamp selections into a timestamp
function CONVERT_SELECTIONS_TO_TIMESTAMP(&$POST, &$DATA, &$id, &$skip) {
// Init test variable
// Converts timestamp selections into a timestamp
function CONVERT_SELECTIONS_TO_TIMESTAMP(&$POST, &$DATA, &$id, &$skip) {
// Init test variable
- $
TEST
2 = "";
+ $
test
2 = "";
// Get last three chars
// Get last three chars
- $
TEST
= substr($id, -3);
+ $
test
= substr($id, -3);
// Improved way of checking! :-)
// Improved way of checking! :-)
- if (in_array($
TEST
, array("_ye", "_mo", "_we", "_da", "_ho", "_mi", "_se"))) {
+ if (in_array($
test
, array("_ye", "_mo", "_we", "_da", "_ho", "_mi", "_se"))) {
// Found a multi-selection for timings?
// Found a multi-selection for timings?
- $
TEST
= substr($id, 0, -3);
- if ((isset($POST[$
TEST."_ye"])) && (isset($POST[$TEST."_mo"])) && (isset($POST[$TEST."_we"])) && (isset($POST[$TEST."_da"])) && (isset($POST[$TEST."_ho"])) && (isset($POST[$TEST."_mi"])) && (isset($POST[$TEST."_se"])) && ($TEST != $TEST
2)) {
+ $
test
= substr($id, 0, -3);
+ if ((isset($POST[$
test."_ye"])) && (isset($POST[$test."_mo"])) && (isset($POST[$test."_we"])) && (isset($POST[$test."_da"])) && (isset($POST[$test."_ho"])) && (isset($POST[$test."_mi"])) && (isset($POST[$test."_se"])) && ($test != $test
2)) {
// Generate timestamp
// Generate timestamp
- $POST[$
TEST] = CREATE_TIMESTAMP_FROM_SELECTIONS($TEST
, $POST);
- $DATA[] =
"$TEST='".$POST[$TEST]."'"
;
+ $POST[$
test] = CREATE_TIMESTAMP_FROM_SELECTIONS($test
, $POST);
+ $DATA[] =
sprintf("%s='%s'", $test, $POST[$test])
;
// Remove data from array
foreach (array("ye", "mo", "we", "da", "ho", "mi", "se") as $rem) {
// Remove data from array
foreach (array("ye", "mo", "we", "da", "ho", "mi", "se") as $rem) {
- unset($POST[$
TEST
."_".$rem]);
+ unset($POST[$
test
."_".$rem]);
} // END - foreach
// Skip adding
} // END - foreach
// Skip adding
- unset($id); $skip = true; $
TEST2 = $TEST
;
+ unset($id); $skip = true; $
test2 = $test
;
} // END - if
} else {
// Process this entry
} // END - if
} else {
// Process this entry
- $skip = false; $
TEST
2 = "";
+ $skip = false; $
test
2 = "";
}
}
// Reverts the german decimal comma into Computer decimal dot
}
}
// Reverts the german decimal comma into Computer decimal dot
diff --git
a/inc/modules/admin/admin-inc.php
b/inc/modules/admin/admin-inc.php
index ea7df656eade12a540ad1832e9b528b8ed1ad0b0..d6b6c0b65e459e6ebcd88095304250e1d8cadc58 100644
(file)
--- a/
inc/modules/admin/admin-inc.php
+++ b/
inc/modules/admin/admin-inc.php
@@
-656,10
+656,10
@@
function ADMIN_SAVE_SETTINGS (&$POST, $tableName="_config", $whereStatement="con
$test = (float)$val;
if ("".$val."" == "".$test."") {
// Add numbers
$test = (float)$val;
if ("".$val."" == "".$test."") {
// Add numbers
- $DATA[] =
$id."=".$val.""
;
+ $DATA[] =
sprintf("`%s`=%s%s", $id, $test)
;
} else {
// Add strings
} else {
// Add strings
- $DATA[] =
$id."='".trim($val)."'"
;
+ $DATA[] =
sprintf("`%s`='%s'", $id, trim($val))
;
}
// Update current configuration
}
// Update current configuration
@@
-672,9
+672,9
@@
function ADMIN_SAVE_SETTINGS (&$POST, $tableName="_config", $whereStatement="con
$result = false;
if (!$alwaysAdd) {
if (!empty($whereStatement)) {
$result = false;
if (!$alwaysAdd) {
if (!empty($whereStatement)) {
- $result = SQL_QUERY("SELECT * FROM
"._MYSQL_PREFIX.$tableName."
WHERE ".$whereStatement." LIMIT 1", __FILE__, __LINE__);
+ $result = SQL_QUERY("SELECT * FROM
`"._MYSQL_PREFIX.$tableName."`
WHERE ".$whereStatement." LIMIT 1", __FILE__, __LINE__);
} else {
} else {
- $result = SQL_QUERY("SELECT * FROM
"._MYSQL_PREFIX.$tableName."
LIMIT 1", __FILE__, __LINE__);
+ $result = SQL_QUERY("SELECT * FROM
`"._MYSQL_PREFIX.$tableName."`
LIMIT 1", __FILE__, __LINE__);
}
} // END - if
}
} // END - if
@@
-683,7
+683,11
@@
function ADMIN_SAVE_SETTINGS (&$POST, $tableName="_config", $whereStatement="con
$DATA_UPDATE = implode(", ", $DATA);
// Generate SQL string
$DATA_UPDATE = implode(", ", $DATA);
// Generate SQL string
- $SQL = "UPDATE "._MYSQL_PREFIX.$tableName." SET ".$DATA_UPDATE." WHERE ".$whereStatement." LIMIT 1";
+ $SQL = sprintf("UPDATE `"._MYSQL_PREFIX."%s` SET %s WHERE %s LIMIT 1",
+ $tableName,
+ $DATA_UPDATE,
+ $whereStatement
+ );
} else {
// Add Line (does only work with auto_increment!
$KEYs = array(); $VALUEs = array();
} else {
// Add Line (does only work with auto_increment!
$KEYs = array(); $VALUEs = array();
@@
-698,7
+702,11
@@
function ADMIN_SAVE_SETTINGS (&$POST, $tableName="_config", $whereStatement="con
$VALUEs = implode(", ", $VALUEs);
// Generate SQL string
$VALUEs = implode(", ", $VALUEs);
// Generate SQL string
- $SQL = "INSERT INTO "._MYSQL_PREFIX.$tableName." (".$KEYs.") VALUES (".$VALUEs.")";
+ $SQL = sprintf("INSERT INTO "._MYSQL_PREFIX."%s (%s) VALUES (%s)",
+ $tableName,
+ $KEYs,
+ $VALUEs
+ );
}
// Free memory
}
// Free memory
diff --git
a/inc/modules/admin/what-add_surfbar_url.php
b/inc/modules/admin/what-add_surfbar_url.php
index bfe1425c555c0d6f0691dbf051737f6994fb4714..d60a9d8602b34ca6055788a7c0857be7f0d87cd2 100644
(file)
--- a/
inc/modules/admin/what-add_surfbar_url.php
+++ b/
inc/modules/admin/what-add_surfbar_url.php
@@
-41,7
+41,13
@@
if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
ADD_DESCR("admin", __FILE__);
// Was an URL added?
ADD_DESCR("admin", __FILE__);
// Was an URL added?
-if ((isset($_POST['add'])) && (!empty($_POST['url'])) && (!empty($_POST['limit']))) {
+if ((isset($_POST['add'])) && (!empty($_POST['url']))) {
+ // Dummy variables
+ $DATA = array(); $id = "reload_ye"; $skip = false;
+
+ // Convert the "reload selections"
+ CONVERT_SELECTIONS_TO_TIMESTAMP($_POST, $DATA, $id, $skip);
+
// Then add this URL
if (SURFBAR_ADMIN_ADD_URL($_POST['url'], $_POST['limit'], $_POST['reload'])) {
// URL was added
// Then add this URL
if (SURFBAR_ADMIN_ADD_URL($_POST['url'], $_POST['limit'], $_POST['reload'])) {
// URL was added
@@
-52,8
+58,13
@@
if ((isset($_POST['add'])) && (!empty($_POST['url'])) && (!empty($_POST['limit']
}
} // END - if
}
} // END - if
+// Prepare content for template
+$content = array(
+ 'reload' => CREATE_TIME_SELECTIONS(0, "reload", "WDhms")
+);
+
// Load template
// Load template
-LOAD_TEMPLATE("admin_add_surfbar_url");
+LOAD_TEMPLATE("admin_add_surfbar_url"
, false, $content
);
//
?>
//
?>
diff --git
a/inc/modules/admin/what-config_newsletter.php
b/inc/modules/admin/what-config_newsletter.php
index d5f22e249ed5fef765403dfa23f1249eea68e8b2..d8564cec27bd2086de05267ef955ee75f838a42f 100644
(file)
--- a/
inc/modules/admin/what-config_newsletter.php
+++ b/
inc/modules/admin/what-config_newsletter.php
@@
-40,20
+40,18
@@
if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
// Add description as navigation point
ADD_DESCR("admin", __FILE__);
// Add description as navigation point
ADD_DESCR("admin", __FILE__);
-if (isset($_POST['ok']))
-{
+if (isset($_POST['ok'])) {
// Save data
$_POST['nl_charge'] = REVERT_COMMA($_POST['nl_charge']);
ADMIN_SAVE_SETTINGS($_POST);
// Save data
$_POST['nl_charge'] = REVERT_COMMA($_POST['nl_charge']);
ADMIN_SAVE_SETTINGS($_POST);
-}
- else
-{
+} else {
// Prepare contants for the template
define('__CHARGE_VALUE' , TRANSLATE_COMMA($_CONFIG['nl_charge'], false));
// Prepare constants and load template
LOAD_TEMPLATE("admin_config_newsletter", false);
}
// Prepare contants for the template
define('__CHARGE_VALUE' , TRANSLATE_COMMA($_CONFIG['nl_charge'], false));
// Prepare constants and load template
LOAD_TEMPLATE("admin_config_newsletter", false);
}
+
//
?>
//
?>
diff --git
a/inc/modules/admin/what-config_user.php
b/inc/modules/admin/what-config_user.php
index c097c77ddaa388c0b3684475c9d0ec85556254ba..f2fcbbcbc2cae7a6c4905fe23e4d7c629331c2b9 100644
(file)
--- a/
inc/modules/admin/what-config_user.php
+++ b/
inc/modules/admin/what-config_user.php
@@
-39,13
+39,10
@@
if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
// Add description as navigation point
ADD_DESCR("admin", __FILE__);
// Add description as navigation point
ADD_DESCR("admin", __FILE__);
-if (isset($_POST['ok']))
-{
+if (isset($_POST['ok'])) {
// Save settings
ADMIN_SAVE_SETTINGS($_POST);
// Save settings
ADMIN_SAVE_SETTINGS($_POST);
-}
- else
-{
+} else {
// Prepare constants for the template
define('__LIMIT_VALUE', $_CONFIG['user_limit']);
define('__ALPHA_VALUE', $_CONFIG['user_alpha']);
// Prepare constants for the template
define('__LIMIT_VALUE', $_CONFIG['user_limit']);
define('__ALPHA_VALUE', $_CONFIG['user_alpha']);
diff --git
a/templates/de/html/admin/admin_add_surfbar_url.tpl
b/templates/de/html/admin/admin_add_surfbar_url.tpl
index c45e3fa62dc80f04241688acab8e8602c3e0d82e..b9d766352e6243e4a0a1216b20699b1db282c533 100644
(file)
--- a/
templates/de/html/admin/admin_add_surfbar_url.tpl
+++ b/
templates/de/html/admin/admin_add_surfbar_url.tpl
@@
-14,7
+14,7
@@
</div>
<div class="admin_input" style="padding-top:5px;padding-bottom:5px" align="center">
</div>
<div class="admin_input" style="padding-top:5px;padding-bottom:5px" align="center">
- Reloadsperre:
<input type="text" name="reload" size="5" maxlength="20" value="0" /> {--_SECONDS--}<br />
+ Reloadsperre:
$content[reload]
<span class="admin_note">(0 = Standarteinstellungen)</span>
</div>
<span class="admin_note">(0 = Standarteinstellungen)</span>
</div>