From 841656d70d60cbd5f0768e12cf73a62aa643cf35 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 30 Oct 2009 02:54:32 +0000 Subject: [PATCH] More HTML code swapped into templates (#68 again) --- .gitattributes | 2 ++ inc/db/lib-mysql3.php | 16 ++++++++-------- inc/libs/payout_functions.php | 14 +++++++------- inc/modules/admin/what-logs.php | 2 +- templates/de/html/member/member_payout_li.tpl | 1 + templates/de/html/member/member_payout_list.tpl | 6 ++++++ 6 files changed, 25 insertions(+), 16 deletions(-) create mode 100644 templates/de/html/member/member_payout_li.tpl create mode 100644 templates/de/html/member/member_payout_list.tpl diff --git a/.gitattributes b/.gitattributes index 2270489aa9..fa4f96d32d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1464,6 +1464,8 @@ templates/de/html/member/member_order_send.tpl -text templates/de/html/member/member_payout.tpl -text templates/de/html/member/member_payout_form.tpl -text templates/de/html/member/member_payout_form_banner.tpl -text +templates/de/html/member/member_payout_li.tpl -text +templates/de/html/member/member_payout_list.tpl -text templates/de/html/member/member_payout_row.tpl -text templates/de/html/member/member_points.tpl -text templates/de/html/member/member_points_bonus_disabled.tpl -text diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index cb1d236f3d..e11f335446 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -83,7 +83,7 @@ function SQL_QUERY ($sqlString, $F, $L) { or addFatalMessage(__FUNCTION__, __LINE__, $F . ' (' . $L . '):' . mysql_error() . '
Query string:
' . $sqlString); - //* DEBUG: */ outputHtml(__LINE__ . ': numRows=' . SQL_NUMROWS($result) . ',affected=' . SQL_AFFECTEDROWS() . "
"); + //* DEBUG: */ print(__LINE__ . ': numRows=' . SQL_NUMROWS($result) . ',affected=' . SQL_AFFECTEDROWS() . "
"); // Ending time $querytimeAfter = array_sum(explode(' ', microtime())); @@ -363,7 +363,7 @@ function SQL_ESCAPE ($str, $secureString=true, $strip=true) { $ret = smartAddSlashes($str); } elseif (function_exists('mysql_real_escape_string')) { // The new and improved version - //* DEBUG: */ outputHtml(__FUNCTION__."(".__LINE__."):str={$str}
"); + //* DEBUG: */ print(__FUNCTION__."(".__LINE__."):str={$str}
"); $ret = mysql_real_escape_string($str, SQL_GET_LINK()); } elseif (function_exists('mysql_escape_string')) { // The obsolete function @@ -444,7 +444,7 @@ function SQL_ALTER_TABLE ($sql, $F, $L) { // 123 4 4 3 3 4 4 32 23 4 4 3 3 4 4 321 if (((SQL_NUMROWS($result) == 0) && (strpos($sql, 'ADD') !== false)) || ((SQL_NUMROWS($result) == 1) && (strpos($sql, 'DROP') !== false))) { // Do the query - //* DEBUG: */ outputHtml(__LINE__.':'.$sql."
"); + //* DEBUG: */ print(__LINE__.':'.$sql."
"); $result = SQL_QUERY($sql, $F, $L, false); } // END - if } elseif ((getConfig('_TABLE_TYPE') == 'InnoDB') && (strpos($sql, 'FULLTEXT') !== false)) { @@ -461,11 +461,11 @@ function SQL_ALTER_TABLE ($sql, $F, $L) { while (strpos($columnName, ',') !== false) { // Use last $columnName = str_replace('`', '', $tableArray[count($tableArray) - $begin]); - //* DEBUG: */ outputHtml(__LINE__.':'.$columnName."----------------".$begin."
"); + //* DEBUG: */ print(__LINE__.':'.$columnName."----------------".$begin."
"); // Remove brackes $columnName = str_replace('(', '', str_replace(')', '', $columnName)); - //* DEBUG: */ outputHtml(__LINE__.':'.$columnName."----------------".$begin."
"); + //* DEBUG: */ print(__LINE__.':'.$columnName."----------------".$begin."
"); // Continue $begin++; @@ -480,7 +480,7 @@ function SQL_ALTER_TABLE ($sql, $F, $L) { $skip = false; while ($content = SQL_FETCHARRAY($result)) { // Is it found? - //* DEBUG: */ outputHtml("
".print_r($content, true)."
"); + //* DEBUG: */ print("
".print_r($content, true)."
"); if (($content['Column_name'] == $columnName) || ($content['Key_name'] == $columnName)) { // Skip this query! //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Skiped: %s", $sql)); @@ -495,12 +495,12 @@ function SQL_ALTER_TABLE ($sql, $F, $L) { // Shall we run it? if ($skip === false) { // Send it to the SQL_QUERY() function - //* DEBUG: */ outputHtml(__LINE__.':'.$sql."
"); + //* DEBUG: */ print(__LINE__.':'.$sql."
"); $result = SQL_QUERY($sql, $F, $L, false); } // END - if } else { // Other ALTER TABLE query - //* DEBUG: */ outputHtml(__LINE__.':'.$sql."
"); + //* DEBUG: */ print(__LINE__.':'.$sql."
"); $result = SQL_QUERY($sql, $F, $L, false); } diff --git a/inc/libs/payout_functions.php b/inc/libs/payout_functions.php index a95ce7ce36..77d7121a2e 100644 --- a/inc/libs/payout_functions.php +++ b/inc/libs/payout_functions.php @@ -56,9 +56,6 @@ ORDER BY `type` ASC", array($points), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) > 0) { - outputHtml("
-
{--PAYOUT_NOW--}:

-
"); + // Load main template + loadTemplate('member_payout_list', true, $OUT); } else { // No payout types setup so far loadTemplate('admin_settings_saved', false, "
{--PAYOUT_NO_PAYOUT_TYPES--}".$file.""); + outputHtml('
  • ' . $file . '
  • '); } // END - foreach // Finish list diff --git a/templates/de/html/member/member_payout_li.tpl b/templates/de/html/member/member_payout_li.tpl new file mode 100644 index 0000000000..f62898db82 --- /dev/null +++ b/templates/de/html/member/member_payout_li.tpl @@ -0,0 +1 @@ +
  • {--PAYOUT_IN--}: $content[type] ({--PAYOUT_MAX--} $content[points] $content[type])
  • diff --git a/templates/de/html/member/member_payout_list.tpl b/templates/de/html/member/member_payout_list.tpl new file mode 100644 index 0000000000..0cdbc72f55 --- /dev/null +++ b/templates/de/html/member/member_payout_list.tpl @@ -0,0 +1,6 @@ +
    + {--PAYOUT_NOW--}:
    + +
    -- 2.30.2