More HTML swapped and admin contact link rewritten. Resolves #91
authorRoland Häder <roland@mxchange.org>
Mon, 23 Feb 2009 01:38:28 +0000 (01:38 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 23 Feb 2009 01:38:28 +0000 (01:38 +0000)
20 files changed:
.gitattributes
inc/functions.php
inc/install-inc.php
inc/language/de.php
inc/libs/admins_functions.php
inc/libs/rallye_functions.php
inc/libs/surfbar_functions.php
inc/modules/admin/overview-inc.php
inc/modules/admin/what-admins_mails.php
inc/modules/admin/what-config_admins.php
inc/modules/admin/what-config_stats.php
inc/modules/admin/what-list_task.php
inc/modules/admin/what-theme_import.php
inc/modules/member/what-themes.php
inc/mysql-manager.php
templates/de/html/admin/admin_theme_import_form.tpl [new file with mode: 0644]
templates/de/html/admin/admin_theme_import_none.tpl [new file with mode: 0644]
templates/de/html/admin/admin_theme_import_row.tpl [new file with mode: 0644]
templates/de/html/install/install_page1.tpl
templates/de/html/member/member_surfbar_list_form.tpl [new file with mode: 0644]

index 78c45ab..73ea2da 100644 (file)
@@ -1174,6 +1174,9 @@ templates/de/html/admin/admin_theme_404.tpl -text
 templates/de/html/admin/admin_theme_edit.tpl -text
 templates/de/html/admin/admin_theme_edit_row.tpl -text
 templates/de/html/admin/admin_theme_import.tpl -text
+templates/de/html/admin/admin_theme_import_form.tpl -text
+templates/de/html/admin/admin_theme_import_none.tpl -text
+templates/de/html/admin/admin_theme_import_row.tpl -text
 templates/de/html/admin/admin_theme_installed.tpl -text
 templates/de/html/admin/admin_theme_list.tpl -text
 templates/de/html/admin/admin_undelete_surfbar_urls.tpl -text
@@ -1452,6 +1455,7 @@ templates/de/html/member/member_surfbar_delete_action_form.tpl -text
 templates/de/html/member/member_surfbar_edit_action_form.tpl -text
 templates/de/html/member/member_surfbar_link.tpl -text
 templates/de/html/member/member_surfbar_list.tpl -text
+templates/de/html/member/member_surfbar_list_form.tpl -text
 templates/de/html/member/member_surfbar_list_row.tpl -text
 templates/de/html/member/member_surfbar_start_dynamic.tpl -text
 templates/de/html/member/member_surfbar_start_static.tpl -text
index 2b393d7..6fc7d1b 100644 (file)
@@ -1403,31 +1403,31 @@ function CREATE_TIME_SELECTIONS ($timestamp, $prefix="", $display="", $align="ce
                $OUT .= "<tr>\n";
 
                if (ereg('Y', $display) || (empty($display))) {
-                       $OUT .= "  <td align=\"center\" class=\"admin_title bottom\"><div class=\"tiny\">"._YEARS."</strong></td>\n";
+                       $OUT .= "  <td align=\"center\" class=\"admin_title bottom\"><div class=\"tiny\">{--_YEARS--}</strong></td>\n";
                }
 
                if (ereg("M", $display) || (empty($display))) {
-                       $OUT .= "  <td align=\"center\" class=\"admin_title bottom\"><div class=\"tiny\">"._MONTHS."</strong></td>\n";
+                       $OUT .= "  <td align=\"center\" class=\"admin_title bottom\"><div class=\"tiny\">{--_MONTHS--}</strong></td>\n";
                }
 
                if (ereg("W", $display) || (empty($display))) {
-                       $OUT .= "  <td align=\"center\" class=\"admin_title bottom\"><div class=\"tiny\">"._WEEKS."</strong></td>\n";
+                       $OUT .= "  <td align=\"center\" class=\"admin_title bottom\"><div class=\"tiny\">{--_WEEKS--}</strong></td>\n";
                }
 
                if (ereg("D", $display) || (empty($display))) {
-                       $OUT .= "  <td align=\"center\" class=\"admin_title bottom\"><div class=\"tiny\">"._DAYS."</strong></td>\n";
+                       $OUT .= "  <td align=\"center\" class=\"admin_title bottom\"><div class=\"tiny\">{--_DAYS--}</strong></td>\n";
                }
 
                if (ereg("h", $display) || (empty($display))) {
-                       $OUT .= "  <td align=\"center\" class=\"admin_title bottom\"><div class=\"tiny\">"._HOURS."</strong></td>\n";
+                       $OUT .= "  <td align=\"center\" class=\"admin_title bottom\"><div class=\"tiny\">{--_HOURS--}</strong></td>\n";
                }
 
                if (ereg("m", $display) || (empty($display))) {
-                       $OUT .= "  <td align=\"center\" class=\"admin_title bottom\"><div class=\"tiny\">"._MINUTES."</strong></td>\n";
+                       $OUT .= "  <td align=\"center\" class=\"admin_title bottom\"><div class=\"tiny\">{--_MINUTES--}</strong></td>\n";
                }
 
                if (ereg("s", $display) || (empty($display))) {
-                       $OUT .= "  <td align=\"center\" class=\"admin_title bottom\"><div class=\"tiny\">"._SECONDS."</strong></td>\n";
+                       $OUT .= "  <td align=\"center\" class=\"admin_title bottom\"><div class=\"tiny\">{--_SECONDS--}</strong></td>\n";
                }
 
                $OUT .= "</tr>\n";
@@ -1438,7 +1438,7 @@ function CREATE_TIME_SELECTIONS ($timestamp, $prefix="", $display="", $align="ce
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"".$prefix."_ye\" size=\"1\">\n";
                        for ($idx = 0; $idx <= 10; $idx++) {
                                $OUT .= "    <option class=\"mini_select\" value=\"".$idx."\"";
-                               if ($idx == $Y) $OUT .= " selected default";
+                               if ($idx == $Y) $OUT .= " selected=\"selected\"";
                                $OUT .= ">".$idx."</option>\n";
                        }
                        $OUT .= "  </select></td>\n";
@@ -1452,7 +1452,7 @@ function CREATE_TIME_SELECTIONS ($timestamp, $prefix="", $display="", $align="ce
                        for ($idx = 0; $idx <= 11; $idx++)
                        {
                                        $OUT .= "  <option class=\"mini_select\" value=\"".$idx."\"";
-                               if ($idx == $M) $OUT .= " selected default";
+                               if ($idx == $M) $OUT .= " selected=\"selected\"";
                                $OUT .= ">".$idx."</option>\n";
                        }
                        $OUT .= "  </select></td>\n";
@@ -1465,7 +1465,7 @@ function CREATE_TIME_SELECTIONS ($timestamp, $prefix="", $display="", $align="ce
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"".$prefix."_we\" size=\"1\">\n";
                        for ($idx = 0; $idx <= 4; $idx++) {
                                $OUT .= "  <option class=\"mini_select\" value=\"".$idx."\"";
-                               if ($idx == $W) $OUT .= " selected default";
+                               if ($idx == $W) $OUT .= " selected=\"selected\"";
                                $OUT .= ">".$idx."</option>\n";
                        }
                        $OUT .= "  </select></td>\n";
@@ -1478,7 +1478,7 @@ function CREATE_TIME_SELECTIONS ($timestamp, $prefix="", $display="", $align="ce
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"".$prefix."_da\" size=\"1\">\n";
                        for ($idx = 0; $idx <= 31; $idx++) {
                                $OUT .= "  <option class=\"mini_select\" value=\"".$idx."\"";
-                               if ($idx == $D) $OUT .= " selected default";
+                               if ($idx == $D) $OUT .= " selected=\"selected\"";
                                $OUT .= ">".$idx."</option>\n";
                        }
                        $OUT .= "  </select></td>\n";
@@ -1491,7 +1491,7 @@ function CREATE_TIME_SELECTIONS ($timestamp, $prefix="", $display="", $align="ce
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"".$prefix."_ho\" size=\"1\">\n";
                        for ($idx = 0; $idx <= 23; $idx++)      {
                                $OUT .= "  <option class=\"mini_select\" value=\"".$idx."\"";
-                               if ($idx == $h) $OUT .= " selected default";
+                               if ($idx == $h) $OUT .= " selected=\"selected\"";
                                $OUT .= ">".$idx."</option>\n";
                        }
                        $OUT .= "  </select></td>\n";
@@ -1504,7 +1504,7 @@ function CREATE_TIME_SELECTIONS ($timestamp, $prefix="", $display="", $align="ce
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"".$prefix."_mi\" size=\"1\">\n";
                        for ($idx = 0; $idx <= 59; $idx++) {
                                $OUT .= "  <option class=\"mini_select\" value=\"".$idx."\"";
-                               if ($idx == $m) $OUT .= " selected default";
+                               if ($idx == $m) $OUT .= " selected=\"selected\"";
                                $OUT .= ">".$idx."</option>\n";
                        }
                        $OUT .= "  </select></td>\n";
@@ -1517,7 +1517,7 @@ function CREATE_TIME_SELECTIONS ($timestamp, $prefix="", $display="", $align="ce
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"".$prefix."_se\" size=\"1\">\n";
                        for ($idx = 0; $idx <= 59; $idx++) {
                                $OUT .= "  <option class=\"mini_select\" value=\"".$idx."\"";
-                               if ($idx == $s) $OUT .= " selected default";
+                               if ($idx == $s) $OUT .= " selected=\"selected\"";
                                $OUT .= ">".$idx."</option>\n";
                        }
                        $OUT .= "  </select></td>\n";
@@ -1559,9 +1559,10 @@ function CREATE_TIMESTAMP_FROM_SELECTIONS ($prefix, $POST) {
        // Return calculated value
        return $ret;
 }
+
 // Sends out mail to all administrators
 // IMPORTANT: Please use SEND_ADMIN_NOTIFCATION() for now!
-function SEND_ADMIN_EMAILS_PRO($subj, $template, $content, $UID) {
+function SEND_ADMIN_EMAILS_PRO ($subj, $template, $content, $UID) {
        // Trim template name
        $template = trim($template);
 
@@ -1585,17 +1586,28 @@ function SEND_ADMIN_EMAILS_PRO($subj, $template, $content, $UID) {
                $aids = array();
                while (list($aid) = SQL_FETCHROW($result)) {
                        $aids[] = $aid;
-               }
+               } // END - while
 
                // Free memory
                SQL_FREERESULT($result);
 
+               // Init result
+               $result = false;
+
                // "implode" IDs and query string
                $aid = implode(",", $aids);
                if ($aid == "-1") {
-                       // Add line to userlog
-                       USERLOG_ADD_LINE($subj, $msg, $UID);
-                       return;
+                       if (EXT_IS_ACTIVE("events")) {
+                               // Add line to user events
+                               USERLOG_ADD_LINE($subj, $msg, $UID);
+                       } else {
+                               // Log error for debug
+                               DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Extension 'events' missing: tpl=%s,subj=%s,UID=%s",
+                                       $template,
+                                       $subj,
+                                       $UID
+                               ));
+                       }
                } elseif ($aid == "0") {
                        // Select all email adresses
                        $result = SQL_QUERY("SELECT email FROM `{!_MYSQL_PREFIX!}_admins` ORDER BY `id`", __FILE__, __LINE__);
@@ -1608,7 +1620,7 @@ function SEND_ADMIN_EMAILS_PRO($subj, $template, $content, $UID) {
        // Load email addresses and send away
        while (list($email) = SQL_FETCHROW($result)) {
                SEND_EMAIL($email, $subj, $msg);
-       }
+       } // END - while
 
        // Free memory
        SQL_FREERESULT($result);
@@ -3238,6 +3250,34 @@ function REDIRCT_ON_UNINSTALLED_EXTENSION ($ext_name) {
        } // END - if
 }
 
+// Generate a "link" for the given admin id (aid)
+function GENERATE_AID_LINK ($aid) {
+       // No assigned admin is default
+       $admin = "<div class=\"admin_note\">{--ADMIN_NO_ADMIN_ASSIGNED--}</div>";
+
+       // Zero? = Not assigned
+       if ($aid == "0") {
+               // Load admin's login
+               $login = GET_ADMIN_LOGIN($aid);
+               if ($login != "***") {
+                       // Is the extension there?
+                       if (EXT_IS_ACTIVE("admins")) {
+                               // Admin found
+                               $admin = "<a href=\"".ADMINS_CREATE_EMAIL_LINK(GET_ADMIN_EMAIL($aid))."\">".$login."</a>";
+                       } else {
+                               // Extension not found
+                               $admin = sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), "admins");
+                       }
+               } else {
+                       // Maybe deleted?
+                       $admin = "<div class=\"admin_note\">".ADMIN_ID_404_1.$aid.ADMIN_ID_404_2."</div>";
+               }
+       } // END - if
+
+       // Return result
+       return $admin;
+}
+
 //////////////////////////////////////////////////
 // AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS //
 //////////////////////////////////////////////////
index c2aa8b0..eb85791 100644 (file)
@@ -149,12 +149,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
                break;
 
        case "1": // Server path, base URL
-               define('__PATH_LEN'     , strlen(PATH));
-               define('__BURL_LEN'     , strlen($burl));
-               define('__TITLE_LEN'    , strlen(MAIN_TITLE));
-               define('__SLOGAN_LEN'   , strlen(SLOGAN));
-               define('__WEBMASTER_LEN', (strlen(WEBMASTER) * 3));
-
+               // @Profi-Concept: Hab meine Meinung doch geaendert! :-)
                // Load template
                LOAD_TEMPLATE("install_page1");
                break;
index 82c16b7..3c2d2d2 100644 (file)
@@ -829,16 +829,6 @@ define('MEMBER_ORDER_PAGE1_INTRO', "Mailbuchung - Schritt 1 von 4: PLZ eingeben"
 define('MEMBER_ORDER_PAGE2_INTRO', "Mailbuchung - Schritt 2 von 4: Daten eingeben");
 define('MEMBER_ORDER_PAGE3_INTRO', "Mailbuchung - Schritt 3 von 4: Frame-Killer Test und Absenden");
 define('MEMBER_ORDER_PAGE4_INTRO', "Mailbuchung - Schritt 4 von 4: Vielen Dank!");
-define('MEMBER_ORDER_PAGE1_NOTE', "Geben Sie hier die ersten ein bis drei Stellen der Postleitzahl ein, in der gesendet werden soll.<br />
-<br />
-Beispiele:
-<ul>
-       <li><strong>1</strong> : Sendet nur an Mitglieder, deren Postleitzahl mit 1 anf&auml;ngt.</li>
-       <li><strong>12</strong> : Sendet nur an Mitglieder, deren Postleitzahl mit 12 anf&auml;ngt.</li>
-       <li><strong>123</strong> : Sendet nur an Mitglieder, deren Postleitzahl mit 123 anf&auml;ngt.</li>
-</ul>
-<br />
-Oder geben Sie nichts ein, wenn Sie diese Option nicht w&uuml;nschen.");
 define('MEMBER_ENTER_ZIP_CODE', "PLZ eingeben");
 define('ORDER_PAGE_2', "Weiter zur Seite 2");
 define('UNCONFIRMED_USERIDS', "Unbest./Gesperrte Accounts");
index e23ef16..2ee0d45 100644 (file)
@@ -130,7 +130,7 @@ function ADMINS_CHECK_ACL($act, $wht) {
 }
 
 // Create email link to admins's account
-function ADMINS_CREATE_EMAIL_LINK($email, $mod="admin") {
+function ADMINS_CREATE_EMAIL_LINK ($email, $mod="admin") {
        $locked = " AND `status`='CONFIRMED'";
        if (IS_ADMIN()) $locked = "";
        if (strpos("@", $email) > 0) {
index c09d6c5..3304a5f 100644 (file)
@@ -714,23 +714,20 @@ function RALLYE_TEMPLATE_SELECTION($name="template", $default="")
        closedir($dir);
 
        // Do we have found templates which we can link with the new rallye?
-       if (!empty($ral[0]))
-       {
+       if (!empty($ral[0])) {
                // Generate selection box for all found templates
+               // @TODO Rewrite this to our API function
                $OUT  = "<select name=\"".$name."\" size=\"1\" class=\"admin_select\">
-  <option value=\"\">".SELECT_NONE."</option>\n";
-               foreach ($ral as $rallye)
-               {
+  <option value=\"\">{--SELECT_NONE--}</option>\n";
+               foreach ($ral as $rallye) {
                     $OUT .= "  <option value=\"".$rallye."\"";
-                       if ($default == $rallye) $OUT .= " selected default";
+                       if ($default == $rallye) $OUT .= " selected=\"selected\"";
                        $OUT .= ">".$rallye."</option>\n";
                }
                $OUT .= "</select>\n";
-       }
-        else
-       {
+       } else {
                // No rallye templates found
-               $OUT = RALLYE_NO_TEMPLATES_FOUND;
+               $OUT = getMessage('RALLYE_NO_TEMPLATES_FOUND');
        }
 
        // Return selection
index bddf3e2..5d7c8f9 100644 (file)
@@ -184,13 +184,7 @@ function SURFBAR_MEMBER_ACTIONS ($urlId, $status) {
        // "Walk" through all actions and create forms
        foreach ($actionArray as $actionId=>$action) {
                // Add form for this action
-               $OUT .= sprintf("       <td align=\"center\" width=\"%d%%\">
-               <form action=\"{!URL!}/modules.php?module=login&amp;what=surfbar_list\" method=\"post\" style=\"padding-bottom:0px\">
-                       <input type=\"hidden\" name=\"id\" value=\"%s\" />
-                       <input type=\"hidden\" name=\"action\" value=\"%s\" />
-                       <input type=\"submit\" class=\"member_submit\" name=\"ok\" title=\"{--MEMBER_SURFBAR_ACTION_%s_TITLE--}\" value=\"{--MEMBER_SURFBAR_ACTION_%s_SUBMIT--}\" />
-               </form>
-       </td>\n",
+               $OUT .= sprintf(LOAD_TEMPLATE("member_surfbar_list_form", true),
                        $width,
                        bigintval($urlId),
                        strtolower($action),
index f421185..f2f05f9 100644 (file)
@@ -386,21 +386,11 @@ function OUTPUT_SELECTED_TASKS ($POST, $result_tasks) {
                LOAD_TEMPLATE("admin_overview_header");
                $SW = 2;
                while (list($id, $admin, $uid, $type, $subj, $text, $created) = SQL_FETCHROW($result_tasks)) {
+                       // Init infos
                        $infos = "---";
-                       if ($admin == "0") {
-                               // No admin currently is assigned
-                               $admin = "<div class=\"admin_note\">{--ADMIN_NO_ADMIN_ASSIGNED--}</div>";
-                       } else {
-                               // Load admin's data
-                               $login = GET_ADMIN_LOGIN($admin);
-                               if ($login != "***") {
-                                       // Admin found
-                                       $admin = "<a href=\"{!URL!}/modules.php?module=admin&amp;what=admins_contct&amp;admin=".$admin."\">".$login."</a>";
-                               } else {
-                                       // Maybe deleted?
-                                       $admin = "<div class=\"admin_note\">".ADMIN_ID_404_1.$admin.ADMIN_ID_404_2."</div>";
-                               }
-                       }
+
+                       // Generate assign link
+                       $admin = GENERATE_AID_LINK($admin);
 
                        // Get task type
                        $type_out = constant('ADMIN_TASK_IS_'.strtoupper($type).'');
index 45ad906..3305017 100644 (file)
@@ -46,26 +46,24 @@ if (isset($_POST['edit']))
        $SEL = SELECTION_COUNT($_POST['sel']);
        if ($SEL > 0)
        {
-               // Add option for userlog
+               // Add option for events
                $cacheArray['admins'] = ADD_OPTION_LINES("admins", "id", "login", "", "email");
                $SW = 2; $rowNameS = "";
-               foreach ($_POST['sel'] as $template => $sel)
-               {
+               foreach ($_POST['sel'] as $template => $sel) {
                        // First of all load data from DB
                        $result = SQL_QUERY_ESC("SELECT admin_id, id FROM `{!_MYSQL_PREFIX!}_admins_mails` WHERE mail_template='%s' ORDER BY `id`",
                         array($template), __FILE__, __LINE__);
                        $OUT = ""; $aid = 0; $aid2 = 0;
-                       while (list($aid, $id) = SQL_FETCHROW($result))
-                       {
+                       while (list($aid, $id) = SQL_FETCHROW($result)) {
+                               // @TODO Can this be rewritten???
                                $OUT .= "<select name=\"admin_id[".$id."]\" size=\"1\" class=\"admin_select\">
 <option value=\"0\"";
-                               if ($aid == "0") $OUT .= " selected default";
-                               $OUT .=">".ADMINS_ALL_ADMINS."</option>\n";
-                               if (EXT_IS_ACTIVE("userlog"))
-                               {
+                               if ($aid == "0") $OUT .= " selected=\"selected\"";
+                               $OUT .=">{--ADMINS_ALL_ADMINS--}</option>\n";
+                               if (EXT_IS_ACTIVE("events")) {
                                        $OUT .= "<option value=\"-1\"";
-                                       if ($aid == "-1") $OUT .= " selected default";
-                                       $OUT .= ">".ADMINS_TO_USERLOG."</option>\n";
+                                       if ($aid == "-1") $OUT .= " selected=\"selected\"";
+                                       $OUT .= ">{--ADMINS_TO_USERLOG--}</option>\n";
                                }
                                $OUT .= ADD_OPTION_LINES("admins", "id", "login", $aid, "email");
                                $OUT .= "</select><br />\n";
@@ -152,28 +150,13 @@ ORDER BY m.admin_id, m.mail_template", __FILE__, __LINE__);
 
                // List found entries
                $SW = 2; $OUT = "";
-               while (list($id, $aid, $admin, $templ) = SQL_FETCHROW($result))
-               {
-                       if ($aid > 0)
-                       {
-                               // Admin assigned
-                               $admin_link = "<a href=\"{!URL!}/modules.php?module=admin&amp;what=admins_contct&amp;admin=".$aid."\">".$admin."</a>";
-                       }
-                        elseif ($aid == 0)
-                       {
-                               // All admins
-                               $admin_link = "<em>".ADMINS_ALL_ADMINS."</em>";
-                       }
-                        elseif (($aid == -1) && (EXT_IS_ACTIVE("usrlog")))
-                       {
-                               // To userlog
-                               $admin_link = "<em>".ADMINS_TO_USERLOG."</em>";
-                       }
+               while ($data = SQL_FETCHARRAY($result)) {
+                       // Prepare content
                        $content = array(
                                'sw'   => $SW,
-                               'id'   => $id,
-                               'tpl'  => $templ,
-                               'alnk' => $admin_link
+                               'id'   => $data['id'],
+                               'tpl'  => $data['mail_template'],
+                               'alnk' => GENERATE_AID_LINK($data['admin_id'])
                        );
 
                        // Load row template
@@ -187,12 +170,11 @@ ORDER BY m.admin_id, m.mail_template", __FILE__, __LINE__);
 
                // Load template
                LOAD_TEMPLATE("admin_admins_mails_list");
-       }
-        else
-       {
+       } else {
                // No entries found
                LOAD_TEMPLATE("admin_settings_saved", false, ADMINS_MAILS_NO_ENTRIES);
        }
 }
+
 //
 ?>
index 6c64683..9f1a9fa 100644 (file)
@@ -109,20 +109,13 @@ if ((isset($_POST['edit'])) && ($SEL > 0)) {
 
                // Prepare variables
                if (empty($act)) $act = "---";
-               if (empty($wht)) $wht   = "---";
+               if (empty($wht)) $wht = "---";
 
                // Get admin mode
                $mode = constant('ADMINS_'.strtoupper($mode).'_MODE');
 
-               // Load admin's data
-               $login = GET_ADMIN_LOGIN($admin);
-               if ($login != "***") {
-                       // Admin found
-                       $admin = "<a href=\"{!URL!}/modules.php?module=admin&amp;what=admins_contct&amp;admin=".$admin."\">".$login."</a>";
-               } else {
-                       // Maybe deleted?
-                       $admin = "<div class=\"admin_note\">".ADMIN_ID_404_1.$admin.ADMIN_ID_404_2."</div>";
-               }
+               // Generate link
+               $admin = GENERATE_AID_LINK($admin);
 
                // Prepare data for the row template
                $content = array(
@@ -230,21 +223,11 @@ VALUES ('%s','%s','%s','%s')",
                        // Get mode
                        $mode = constant('ADMINS_'.strtoupper($mode).'_MODE');
 
-                       // Load admin's data
-                       $login = GET_ADMIN_LOGIN($admin);
-                       if ($login != "***") {
-                               // Admin found
-                               $admin = "<a href=\"{!URL!}/modules.php?module=admin&amp;what=admins_contct&amp;admin=".$admin."\">".$login."</a>";
-                       } else {
-                               // Maybe deleted?
-                               $admin = "<div class=\"admin_note\">".ADMIN_ID_404_1.$admin.ADMIN_ID_404_2."</div>";
-                       }
-
                        // Prepare data for the row template
                        $content = array(
                                'sw'     => $SW,
                                'id'     => $id,
-                               'admin'  => $admin,
+                               'admin'  => GENERATE_AID_LINK($admin),
                                'action' => $act,
                                'what'   => $wht,
                                'mode'   => $mode,
index dd24fbe..d765918 100644 (file)
@@ -49,21 +49,21 @@ if (isset($_POST['ok'])) {
        switch (getConfig('guest_stats'))
        {
        case "MEMBERS":
-               define('__MEMBERS_RADIO', " checked selected");
+               define('__MEMBERS_RADIO', " selected=\"selected\"");
                define('__MODULES_RADIO', "");
                define('__INACTIVE_RADIO', "");
                break;
 
        case "MODULES":
                define('__MEMBERS_RADIO', "");
-               define('__MODULES_RADIO', " checked selected");
+               define('__MODULES_RADIO', " selected=\"selected\"");
                define('__INACTIVE_RADIO', "");
                break;
 
        case "INACTIVE":
                define('__MEMBERS_RADIO', "");
                define('__MODULES_RADIO', "");
-               define('__INACTIVE_RADIO', " checked selected");
+               define('__INACTIVE_RADIO', " selected=\"selected\"");
                break;
        }
 
index 652fb04..c4a4540 100644 (file)
@@ -127,21 +127,11 @@ ORDER BY userid DESC, task_type DESC, subject, task_created DESC", __FILE__, __L
                ));
                $SW = 2;
                while (list($id, $admin, $uid, $type, $subj, $text, $created) = SQL_FETCHROW($result_tasks)) {
+                       // Init infos
                        $infos = "---";
-                       if ($admin == "0") {
-                               // No admin currently is assigned
-                               $admin = "<div class=\"admin_note\">{--ADMIN_NO_ADMIN_ASSIGNED--}</div>";
-                       } else {
-                               // Load admin's data
-                               $login = GET_ADMIN_LOGIN($admin);
-                               if ($login != "***") {
-                                       // Admin found
-                                       $admin = "<a href=\"{!URL!}/modules.php?module=admin&amp;what=admins_contct&amp;admin=".$admin."\">".$login."</a>";
-                               } else {
-                                       // Maybe deleted?
-                                       $admin = "<div class=\"admin_note\">".ADMIN_ID_404_1.$admin.ADMIN_ID_404_2."</div>";
-                               }
-                       }
+
+                       // Generate link
+                       $admin = GENERATE_AID_LINK($admin);
 
                        // Get admin task
                        $type_out = constant('ADMIN_TASK_IS_'.strtoupper($type).'');
index cde282b..0ca4421 100644 (file)
@@ -119,46 +119,41 @@ array_pk_sort($THEMES, array("theme_name"));
 // Generate output lines for the template
 $OUT = ""; $SW = 2;
 foreach ($THEMES['theme_unix'] as $key => $unix) {
+       // Already installed is default
+       $FOUND = "<div class=\"admin_note\">{--ADMIN_THEME_ALREADY_INSTALLED--}</div>";
+
        // Check if current theme is already imported or not
-       if (THEME_CHECK_EXIST($unix)) {
-               // Already installed
-               $FOUND = "<div class=\"admin_note\">{--ADMIN_THEME_ALREADY_INSTALLED--}</div>";
-       } else {
+       if (!THEME_CHECK_EXIST($unix)) {
                // Theme not installed
-               $FOUND = "<form action=\"{!URL!}/modules.php?module=admin&amp;what=theme_import\" method=\"POST\">
-  <input type=\"submit\" name=\"ok\" class=\"admin_submit\" value=\"{--ADMIN_INSTALL_THEME--}\" />
-  <input type=\"hidden\" name=\"theme\" value=\"".$unix."\" />
-</form>";
-       }
+               $FOUND = LOAD_TEMPLATE("admin_theme_import_form", true, $unix);
+       } // END - if
 
-       // Add row
-       $OUT .= "<tr>
-  <td class=\"switch_sw".$SW." bottom2 right2\" align=\"center\" height=\"30\">".$unix."</td>
-  <td class=\"switch_sw".$SW." bottom2 right2\" align=\"center\">".$THEMES['theme_name'][$key]."</td>
-  <td class=\"switch_sw".$SW." bottom2 right2\" align=\"center\">
-    <a href=\"mailto:".$THEMES['theme_email'][$key]."?Subject=[Theme:] ".$THEMES['theme_name'][$key]." (".$unix.")"."\">".$THEMES['theme_author'][$key]."</a>
-  </td>
-  <td class=\"switch_sw".$SW." bottom2 right2\" align=\"center\">
-    <a href=\"".DEREFERER($THEMES['theme_url'][$key])."\" target=\"_blank\">".$THEMES['theme_url'][$key]."</a>
-  </td>
-  <td class=\"switch_sw".$SW." bottom2 right2\" align=\"center\">v".$THEMES['theme_ver'][$key]."</td>
-  <td class=\"switch_sw".$SW." bottom2\" align=\"center\">
-    ".$FOUND."
-  </td>
-</tr>\n";
+       // Prepare content
+       $content = array(
+               'sw'      => $SW,
+               'unix'    => $unix,
+               'name'    => $THEMES['theme_name'][$key],
+               'email'   => $THEMES['theme_email'][$key],
+               'author'  => $THEMES['theme_author'][$key],
+               'link'    => DEREFERER($THEMES['theme_url'][$key]),
+               'url'     => $THEMES['theme_url'][$key],
+               'version' => $THEMES['theme_ver'][$key],
+               'form'    => $FOUND
+       );
+
+       // Add row template
+       $OUT .= LOAD_TEMPLATE("admin_theme_import_row", true, $content);
 
        // Switch color
        $SW = 3 - $SW;
-}
+} // END - foreach
 
 if (empty($OUT)) {
        // No themes found???
-       $OUT .= "<tr>
-  <td colspan=\"6\" class=\"bottom2\" height=\"80\">
-    ".LOAD_TEMPLATE("admin_settings_saved", true, getMessage('ADMIN_NO_THEMES_FOUND'))."
-  </td>
-</tr>\n";
+       $OUT .= LOAD_TEMPLATE("admin_theme_import_none", true, LOAD_TEMPLATE("admin_settings_saved", true, getMessage('ADMIN_NO_THEMES_FOUND')));
 } // END - if
+
+// Set the generated list
 define('__THEME_LIST', $OUT);
 
 // Load template
index e260fae..03cadb0 100644 (file)
@@ -100,7 +100,7 @@ array_pk_sort($THEMES, array("theme_name"));
 $OUT = ""; $SW = 2;
 foreach ($THEMES['theme_unix'] as $key => $unix) {
        $default = "";
-       if (get_session('mxchange_theme') == $unix) $default = " checked selected";
+       if (get_session('mxchange_theme') == $unix) $default = " selected=\"selected\"";
 
        // Add row
        $OUT .= "<tr>
index 98c45fe..fa65d85 100644 (file)
@@ -1337,8 +1337,7 @@ function GET_CURRENT_ADMIN_ID () {
 }
 
 // Get password hash from administrator's login name
-function GET_ADMIN_HASH ($aid)
-{
+function GET_ADMIN_HASH ($aid) {
        global $cacheArray;
        $ret = "-1";
        if (isset($cacheArray['admins']['password'][$aid])) {
@@ -1460,7 +1459,7 @@ function ADD_OPTION_LINES ($table, $id, $name, $default="", $special="", $where=
                        // Both are arrays
                        foreach ($id as $idx => $value) {
                                $ret .= "<option value=\"".$value."\"";
-                               if ($default == $value) $ret .= " selected checked";
+                               if ($default == $value) $ret .= " selected=\"selected\"";
                                $ret .= ">".$name[$idx]."</option>\n";
                        } // END - foreach
                } // END - if
@@ -1477,7 +1476,7 @@ function ADD_OPTION_LINES ($table, $id, $name, $default="", $special="", $where=
                        while (list($value, $title, $add) = SQL_FETCHROW($result)) {
                                if (empty($special)) $add = "";
                                $ret .= "<option value=\"".$value."\"";
-                               if ($default == $value) $ret .= " selected checked";
+                               if ($default == $value) $ret .= " selected=\"selected\"";
                                if (!empty($add)) $add = " (".$add.")";
                                $ret .= ">".$title.$add."</option>\n";
                        } // END - while
diff --git a/templates/de/html/admin/admin_theme_import_form.tpl b/templates/de/html/admin/admin_theme_import_form.tpl
new file mode 100644 (file)
index 0000000..458ddee
--- /dev/null
@@ -0,0 +1,4 @@
+<form action="{!URL!}/modules.php?module=admin&amp;what=theme_import" method="POST">
+  <input type="hidden" name="theme" value="$content" />
+  <input type="submit" name="ok" class="admin_submit" value="{--ADMIN_INSTALL_THEME--}" />
+</form>
diff --git a/templates/de/html/admin/admin_theme_import_none.tpl b/templates/de/html/admin/admin_theme_import_none.tpl
new file mode 100644 (file)
index 0000000..f7919c1
--- /dev/null
@@ -0,0 +1,5 @@
+<tr>
+  <td colspan="6" class="bottom2" height="80">
+    $content
+  </td>
+</tr>
diff --git a/templates/de/html/admin/admin_theme_import_row.tpl b/templates/de/html/admin/admin_theme_import_row.tpl
new file mode 100644 (file)
index 0000000..c98d5b1
--- /dev/null
@@ -0,0 +1,14 @@
+<tr>
+  <td class="switch_sw$content[sw] bottom2 right2" align="center" height="30">$content[unix]</td>
+  <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[name]</td>
+  <td class="switch_sw$content[sw] bottom2 right2" align="center">
+    <a href="mailto:$content[email]?Subject=[Theme:] $content[name] ($content[unix])"."">$content[author]</a>
+  </td>
+  <td class="switch_sw$content[sw] bottom2 right2" align="center">
+    <a href="$content[link]" target="_blank">$content[url]</a>
+  </td>
+  <td class="switch_sw$content[sw] bottom2 right2" align="center">v$content[version]</td>
+  <td class="switch_sw$content[sw] bottom2" align="center">
+    $content[form]
+  </td>
+</tr>
index 20d34bb..020a471 100644 (file)
@@ -1,7 +1,5 @@
-<form action="{!__BURL_ACTION!}/install.php?page=2" method="POST"
-       target="_self">
-<table border="0" cellspacing="0" cellpadding="0"
-       class="install_content">
+<form action="{!__BURL_ACTION!}/install.php?page=2" method="POST" target="_self">
+<table border="0" cellspacing="0" cellpadding="0" class="install_content">
        <tr>
                <td colspan="3" align="center"><div class="install">{--HEADER_TEXT_PAGE1--}</STRONG>
                </td>
@@ -19,8 +17,7 @@
        </tr>
        <tr>
                <td align="right" class="install">{--SERVER_PATH--}&nbsp;:&nbsp;</td>
-               <td><input type="text" name="spath" size="{!__PATH_LEN!}"
-                       value="{!PATH!}" class="install_normal"></td>
+               <td><input type="text" name="spath" size="20" value="{!PATH!}" class="install_normal" /></td>
        </tr>
        <tr>
                <td colspan="2" height="10" class="seperator">&nbsp;</td>
        <tr>
                <td align="right" class="install">{--BASE_URL--}&nbsp;:&nbsp;
                ({--BASE_URL_NOTE--})</td>
-               <td><input type="text" name="burl" size="{!__BURL_LEN!}"
-                       value="{!__BURL_ACTION!}" class="install_normal"></td>
+               <td><input type="text" name="burl" size="20" value="{!__BURL_ACTION!}" class="install_normal" /></td>
        </tr>
        <tr>
                <td colspan="2" height="10" class="seperator">&nbsp;</td>
        </tr>
        <tr>
                <td align="right" class="install">{--HP_TITLE--}&nbsp;:&nbsp;</td>
-               <td><input type="text" name="title" size="{!__TITLE_LEN!}"
-                       maxlength="255" value="{!MAIN_TITLE!}" class="install_normal"></td>
+               <td><input type="text" name="title" size="20" maxlength="255" value="{!MAIN_TITLE!}" class="install_normal" /></td>
        </tr>
        <tr>
                <td colspan="2" height="10" class="seperator">&nbsp;</td>
        </tr>
        <tr>
                <td align="right" class="install">{--HP_SLOGAN--}&nbsp;:&nbsp;</td>
-               <td><input type="text" name="slogan" size="{!__SLOGAN_LEN!}"
-                       maxlength="255" value="{!SLOGAN!}" class="install_normal"></td>
+               <td><input type="text" name="slogan" size="30" maxlength="255" value="{!SLOGAN!}" class="install_normal" /></td>
        </tr>
        <tr>
                <td colspan="2" height="10" class="seperator">&nbsp;</td>
        </tr>
        <tr>
                <td align="right" class="install">{--HP_EMAIL--}&nbsp;:&nbsp;</td>
-               <td><input type="text" name="email" size="{!__WEBMASTER_LEN!}"
-                       maxlength="255" value="{!WEBMASTER!}" class="install_normal"></td>
+               <td><input type="text" name="email" size="20" maxlength="255" value="{!WEBMASTER!}" class="install_normal" /></td>
        </tr>
        <tr>
                <td colspan="3" height="21" class="seperator">&nbsp;</td>
diff --git a/templates/de/html/member/member_surfbar_list_form.tpl b/templates/de/html/member/member_surfbar_list_form.tpl
new file mode 100644 (file)
index 0000000..e6ff250
--- /dev/null
@@ -0,0 +1,7 @@
+<td align="center" width="%d%%">
+       <form action="{!URL!}/modules.php?module=login&amp;what=surfbar_list" method="post" style="padding-bottom:0px">
+               <input type="hidden" name="id" value="%s" />
+               <input type="hidden" name="action" value="%s" />
+               <input type="submit" class="member_submit" name="ok" title="{--MEMBER_SURFBAR_ACTION_%s_TITLE--}" value="{--MEMBER_SURFBAR_ACTION_%s_SUBMIT--}" />
+       </form>
+</td>