More HTML code swapped into templates (#68 again)
authorRoland Häder <roland@mxchange.org>
Fri, 30 Oct 2009 02:54:32 +0000 (02:54 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 30 Oct 2009 02:54:32 +0000 (02:54 +0000)
.gitattributes
inc/db/lib-mysql3.php
inc/libs/payout_functions.php
inc/modules/admin/what-logs.php
templates/de/html/member/member_payout_li.tpl [new file with mode: 0644]
templates/de/html/member/member_payout_list.tpl [new file with mode: 0644]

index 2270489..fa4f96d 100644 (file)
@@ -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
index cb1d236..e11f335 100644 (file)
@@ -83,7 +83,7 @@ function SQL_QUERY ($sqlString, $F, $L) {
                or addFatalMessage(__FUNCTION__, __LINE__, $F . ' (' . $L . '):' . mysql_error() . '<br />
 Query string:<br />
 ' . $sqlString);
-       //* DEBUG: */ outputHtml(__LINE__ . ': numRows=' . SQL_NUMROWS($result) . ',affected=' . SQL_AFFECTEDROWS() . "<br />");
+       //* DEBUG: */ print(__LINE__ . ': numRows=' . SQL_NUMROWS($result) . ',affected=' . SQL_AFFECTEDROWS() . "<br />");
 
        // 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__."(<font color=\"#0000aa\">".__LINE__."</font>):str={$str}<br />");
+               //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):str={$str}<br />");
                $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."<br />");
+                       //* DEBUG: */ print(__LINE__.':'.$sql."<br />");
                        $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."<br />");
+                               //* DEBUG: */ print(__LINE__.':'.$columnName."----------------".$begin."<br />");
 
                                // Remove brackes
                                $columnName = str_replace('(', '', str_replace(')', '', $columnName));
-                               //* DEBUG: */ outputHtml(__LINE__.':'.$columnName."----------------".$begin."<br />");
+                               //* DEBUG: */ print(__LINE__.':'.$columnName."----------------".$begin."<br />");
 
                                // 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("<pre>".print_r($content, true)."</pre>");
+                       //* DEBUG: */ print("<pre>".print_r($content, true)."</pre>");
                        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."<br />");
+                       //* DEBUG: */ print(__LINE__.':'.$sql."<br />");
                        $result = SQL_QUERY($sql, $F, $L, false);
                } // END - if
        } else {
                // Other ALTER TABLE query
-               //* DEBUG: */ outputHtml(__LINE__.':'.$sql."<br />");
+               //* DEBUG: */ print(__LINE__.':'.$sql."<br />");
                $result = SQL_QUERY($sql, $F, $L, false);
        }
 
index a95ce7c..77d7121 100644 (file)
@@ -56,9 +56,6 @@ ORDER BY
        `type` ASC",
                        array($points), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) > 0) {
-                       outputHtml("<br /><div align=\"center\">
-<div align=\"center\"><strong>{--PAYOUT_NOW--}:</strong></div><br />
-<ul>");
                        // Now let's check
                        while ($content = SQL_FETCHARRAY($result)) {
                                // Compile the type
@@ -66,13 +63,16 @@ ORDER BY
 
                                // Are these points enougth?
                                if ($points >= $content['min_points']) {
-                                       // Ok we found one
-                                       $P = translateComma($points * $content['rate'] - 0.5);
-                                       outputHtml("<li>{--PAYOUT_IN--}: <strong><a href=\"{?URL?}/modules.php?module=login&amp;what=payout&amp;payout=".$content['id']."\">".$content['type']." ({--PAYOUT_MAX--} ".$P." ".$content['type'].")</a></strong></li>");
+                                       // Prepare content for template
+                                       $content['points'] = translateComma($points * $content['rate'] - 0.5);
+
+                                       // Load row template
+                                       $OUT .= loadTemplate('member_payout_li', true, $content);
                                } // END - if
                        } // END - while
 
-                       outputHtml("</ul></div>");
+                       // Load main template
+                       loadTemplate('member_payout_list', true, $OUT);
                } else {
                        // No payout types setup so far
                        loadTemplate('admin_settings_saved', false, "<div class=\"guest_failed\">{--PAYOUT_NO_PAYOUT_TYPES--}</div");
index 51ff5df..6d244e9 100644 (file)
@@ -101,7 +101,7 @@ if (isGetRequestElementSet('access')) {
                        $file = basename($file);
 
                        // Okay, add it
-                       outputHtml("<li><a href=\"{?URL?}/modules.php?module=admin&amp;what=".getWhat()."&amp;access=".urlencode($file)."\">".$file."</a></li>");
+                       outputHtml('<li><a href="{?URL?}/modules.php?module=admin&amp;what=' . getWhat() . '&amp;access=' . urlencode($file) . '">' . $file . '</a></li>');
                } // 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 (file)
index 0000000..f62898d
--- /dev/null
@@ -0,0 +1 @@
+<li>{--PAYOUT_IN--}: <strong><a href="{?URL?}/modules.php?module=login&amp;what=payout&amp;payout=$content[id]">$content[type] ({--PAYOUT_MAX--} $content[points] $content[type])</a></strong></li>
diff --git a/templates/de/html/member/member_payout_list.tpl b/templates/de/html/member/member_payout_list.tpl
new file mode 100644 (file)
index 0000000..0cdbc72
--- /dev/null
@@ -0,0 +1,6 @@
+<div align="center">
+       <strong>{--PAYOUT_NOW--}:</strong></div>
+       <ul>
+               $content
+       </ul>
+</div>