]> git.mxchange.org Git - mailer.git/commitdiff
Added new files from EL branch
authorRoland Häder <roland@mxchange.org>
Fri, 28 May 2010 18:26:44 +0000 (18:26 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 28 May 2010 18:26:44 +0000 (18:26 +0000)
inc/modules/admin/what-list_network_array_translation.php [new file with mode: 0644]
templates/de/html/admin/admin_add_network_array_translation.tpl [new file with mode: 0644]
templates/de/html/select/select_network_type_box.tpl [new file with mode: 0644]
templates/de/html/select/select_network_type_option.tpl [new file with mode: 0644]
templates/de/html/tlock_message.tpl [new file with mode: 0644]

diff --git a/inc/modules/admin/what-list_network_array_translation.php b/inc/modules/admin/what-list_network_array_translation.php
new file mode 100644 (file)
index 0000000..0777636
--- /dev/null
@@ -0,0 +1,151 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 04/22/2010 *
+ * ===================                          Last change: 04/22/2010 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : what-list_network_array_translation.php          *
+ * -------------------------------------------------------------------- *
+ * Short description : List/manage network API query parameters         *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Verwaltet API-Abfrageparameter                   *
+ * -------------------------------------------------------------------- *
+ * $Revision:: 1794                                                   $ *
+ * $Date:: 2010-05-28 19:55:19 +0200 (Fri, 28 May 2010)               $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author:: quix0r                                                   $ *
+ * Needs to be in all Files and every File needs "svn propset           *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
+ * -------------------------------------------------------------------- *
+ * 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 *
+ * 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 ((!defined('__SECURITY')) || (!isAdmin())) {
+       die();
+} // END - if
+
+// Add description as navigation point
+addMenuDescription('admin', __FILE__);
+
+// These are expert settings!
+if (doVerifyExpertSettings() != 'agreed') {
+       // Abort here
+       return;
+} // END - if
+
+// By default we should display list/add new forms
+$GLOBALS['network_display'] = true;
+
+// Handle form here
+doNetworkHandleForm();
+
+// Display forms?
+if ($GLOBALS['network_display'] === false) {
+       // Abort here
+       return;
+} // END - if
+
+// Do we have a network selected?
+if (isGetRequestParameterSet('network')) {
+       // Get its data for template
+       $networkData = getNetworkDataById(getRequestParameter('network'));
+
+       // Is a network type selected?
+       if (!isGetRequestParameterSet('network_type')) {
+               // Then present a new selection form
+               outputHtml(generateAdminNetworkTypeList(getRequestParameter('network'), getRequestParameter('network_type')));
+
+               // Abort any other processing
+               return;
+       } // END - if
+
+       // Init disabled list
+       $GLOBALS['network_array_translation_disabled'] = array();
+
+       // Load all advert codes for given network
+       $result = SQL_QUERY_ESC("SELECT
+       p.`network_array_id`, t.`network_type_id`, t.`network_type_handle`, p.`network_array_index`, p.`network_index_translation`
+FROM
+       `{?_MYSQL_PREFIX?}_network_array_translation` AS p
+INNER JOIN
+       `{?_MYSQL_PREFIX?}_network_types` AS t
+ON
+       p.`network_type_id`=t.`network_type_id`
+WHERE
+       p.`network_id`=%s AND
+       p.`network_type_id`=%s
+ORDER BY
+       t.`network_type_handle` ASC,
+       p.`network_array_id` ASC",
+               array(
+                       bigintval(getRequestParameter('network')),
+                       bigintval(getRequestParameter('network_type'))
+               ), __FILE__, __LINE__);
+
+       // Do we have entries?
+       if (SQL_NUMROWS($result) > 0) {
+               // List all entries
+               $OUT = ''; $SW = 2;
+               while ($row = SQL_FETCHARRAY($result)) {
+                       // Add/translate some data
+                       $row['sw'] = $SW;
+
+                       // Add it to network if the type matches selected
+                       if ($row['network_type_id'] == getRequestParameter('network_type_id')) {
+                               // Matches, then add it for disabling this entry
+                               $GLOBALS['network_array_translation_disabled'][$row['network_array_index']] = true;
+                       } // END - if
+
+                       // Add row template and switch color
+                       $OUT .= loadTemplate('admin_list_network_array_translation_row', true, $row);
+                       $SW = 3 - $SW;
+               } // END - while
+
+               // Prepare data for template
+               $content = array(
+                       'rows'            => $OUT,
+                       'network_id'      => bigintval(getRequestParameter('network')),
+                       'network_title'   => $networkData['network_title'],
+                       'network_reflink' => $networkData['network_reflink'],
+               );
+
+               // Load main template
+               loadTemplate('admin_list_network_array_translation', false, $content);
+       } else {
+               // No entries found
+               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_ARRAY_TRANSLATION_404', $networkData['network_title']));
+       }
+
+       // Free result
+       SQL_FREERESULT($result);
+
+       // Add options list for network type
+       $networkData['type_options'] = generateNetworkTypeOptions(getRequestParameter('network_type_id'));
+
+       // Add form for adding new array_translation pair
+       loadTemplate('admin_add_network_array_translation', false, $networkData);
+} else {
+       // Generate network list for this script
+       outputHtml(generateAdminNetworkList());
+}
+
+// [EOF]
+?>
diff --git a/templates/de/html/admin/admin_add_network_array_translation.tpl b/templates/de/html/admin/admin_add_network_array_translation.tpl
new file mode 100644 (file)
index 0000000..0c5ae2e
--- /dev/null
@@ -0,0 +1,46 @@
+<div align="center">
+<form accept-charset="utf-8" action="{%url=modules.php?module=admin&amp;what=list_network_params&amp;do=addnetworkparam&amp;network=[%network%]&amp;network_type={%pipe,getRequestParameter=network_type%}%}" method="post">
+<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed">
+       <tr>
+               <td class="admin_title bottom" colspan="2" align="center">
+                       <strong>{--ADMIN_NETWORK_ARRAY_TRANSLATION_ADD_TITLE--}</strong>
+                       <div class="tiny">
+                               (<a href="$content[network_reflink]" title="$content[network_title]" target="_blank">$content[network_title]</a>)
+                       </div>
+               </td>
+       </tr>
+       <tr>
+               <td align="right" width="250">{--ADMIN_NETWORK_TYPE_SELECT--}:</td>
+               <td>
+                       <select name="network_type_id" class="admin_select" size="1">
+                               {%pipe,generateNetworkTypeOptions=[%network%]%}
+                       </select>
+               </td>
+       </tr>
+       <tr>
+               <td align="right" width="250">{--ADMIN_NETWORK_ARRAY_TRANSLATION_INDEX--}:</td>
+               <td>
+                       <select name="request_param_key" class="admin_select" size="1">
+                               {%pipe,generateNetworkArrayTranslationOptions%}
+                       </select>
+               </td>
+       </tr>
+       <tr>
+               <td class="bottom" align="right" width="250">{--ADMIN_NETWORK_ARRAY_TRANSLATION_INDEX_TRANSLATION--}:</td>
+               <td class="bottom">
+                       <input type="text" name="index_translation" class="admin_normal" size="10" maxlength="255" />
+               </td>
+       </tr>
+       <tr>
+               <td class="admin_footer" colspan="2" align="center">
+                       <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" />
+                       <input type="submit" name="ok" class="admin_submit" value="{--ADMIN_NETWORK_ARRAY_TRANSLATION_ADD--}" />
+               </td>
+       </tr>
+</table>
+</form>
+</div>
+
+<div class="admin_note">
+       {--ADMIN_NETWORK_ARRAY_TRANSLATION_ADD_NOTE--}
+</div>
diff --git a/templates/de/html/select/select_network_type_box.tpl b/templates/de/html/select/select_network_type_box.tpl
new file mode 100644 (file)
index 0000000..0fee2b9
--- /dev/null
@@ -0,0 +1,28 @@
+<div align="center">
+<form accept-charset="utf-8" action="{?URL?}/modules.php" method="get">
+<input type="hidden" name="module" value="$content[module]" />
+<input type="hidden" name="what" value="$content[what]" />
+<input type="hidden" name="network" value="[%network%]" />
+<div class="admin_table dashed">
+       <div class="admin_title bottom">
+               <div>
+                       <strong>{--ADMIN_NETWORK_TYPE_SELECT_TITLE--}</strong>
+               </div>
+
+               <div class="tiny">
+                       (<a href="{%network,getNetworkDataById,network_reflink=[%network%]%}"
+                        title="{%network,getNetworkDataById,network_title=[%network%]%}"
+                        target="_blank">{%network,getNetworkDataById,network_title=[%network%]%}</a>)
+               </div>
+       </div>
+
+       <div class="bottom">
+               $content[selection_box]
+       </div>
+
+       <div class="admin_footer">
+               <input type="submit" class="admin_submit" value="{--ADMIN_NETWORK_TYPE_CHOOSE--}" />
+       </div>
+</div>
+</form>
+</div>
diff --git a/templates/de/html/select/select_network_type_option.tpl b/templates/de/html/select/select_network_type_option.tpl
new file mode 100644 (file)
index 0000000..652a9ba
--- /dev/null
@@ -0,0 +1 @@
+<option value="$content[network_type_id]">$content[network_type_handle]</option>
diff --git a/templates/de/html/tlock_message.tpl b/templates/de/html/tlock_message.tpl
new file mode 100644 (file)
index 0000000..d4d6610
--- /dev/null
@@ -0,0 +1,12 @@
+<div>
+       {--MEMBER_URL_TIME_LOCK--}
+</div>
+<div>
+       {--CONFIG_URL_TLOCK--}
+       $content[hours] {--_HOURS--},
+       $content[minutes] {--_MINUTES--} {--_AND--}
+       $content[seconds] {--_SECONDS--}
+</div>
+<div>
+       {--MEMBER_LAST_TLOCK--}: $content[timestamp]
+</div>