X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-guestedit.php;h=79051b7e125b5e0ac7f31100f0cbedd426fc1cba;hp=df50fcd50582533110ebf5fc81235f0d34087316;hb=414570c5081d337bb6c28dcf521bd8bca02f69e7;hpb=c78089215285d52d483760699d07a96dfbbe0671 diff --git a/inc/modules/admin/what-guestedit.php b/inc/modules/admin/what-guestedit.php index df50fcd505..79051b7e12 100644 --- a/inc/modules/admin/what-guestedit.php +++ b/inc/modules/admin/what-guestedit.php @@ -10,7 +10,12 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Menue fuer die Gaeste editieren * * -------------------------------------------------------------------- * - * * + * $Revision:: 856 $ * + * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. Mär 2009) $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: stelzi $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2008 by Roland Haeder * * For more information visit: http://www.mxchange.org * @@ -59,7 +64,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) define('__SUB_VALUE', $SUB); define('__CHK_VALUE', $chk); - $cnt = 0; $SW = 2; $OUT = ""; + $cnt = 0; $OUT = ""; $SW = 2; foreach (REQUEST_POST('sel') as $sel => $confirm) { if ($confirm == 1) @@ -269,13 +274,14 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) } else { // List sub menus $result = SQL_QUERY_ESC("SELECT `id`, `action`, `what`, `title`, `sort` FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC", - array($SUB), __FILE__, __LINE__); + array($SUB), __FILE__, __LINE__); } // Get number of menu entries $max = SQL_NUMROWS($result); if ($max > 0) { // Set sub value + // @TODO Rewrite this constant define('__SUB_VALUE', $SUB); // Init variables @@ -283,28 +289,30 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) $cnt = 0; $OUT = ""; - while (list($id, $act, $wht, $title, $sort) = SQL_FETCHROW($result)) { + // Process all menu entries + while ($content = SQL_FETCHARRAY($result)) { $cnt++; - if (($sort == 0) || (($sort == 1) && (!empty($SUB)))) { + if (($content['sort'] == 0) || (($content['sort'] == 1) && (!empty($SUB)))) { // Is highest position - $NAVI = "{--LOWER--}"; + $NAVI = "{--LOWER--}"; } elseif ($cnt == $max) { // Is lowest position - $NAVI = "{--HIGHER--}"; - } elseif ($sort > 0) { + $NAVI = "{--HIGHER--}"; + } elseif ($content['sort'] > 0) { // Anything else between highest and lowest - $NAVI = "{--HIGHER--}/{--LOWER--}"; + $NAVI = "{--HIGHER--}/{--LOWER--}"; } - if (empty($act)) $act = " "; - if (empty($wht)) $wht = " "; - if (empty($title)) $title = " "; + if (empty($content['action'])) $content['action'] = " "; + if (empty($content['what'])) $content['what'] = " "; + if (empty($content['title'])) $content['title'] = " "; + $content = array( 'sw' => $SW, - 'id' => $id, - 'action' => $act, - 'what' => $wht, - 'title' => $title, + 'id' => $content['id'], + 'action' => $content['action'], + 'what' => $content['what'], + 'title' => $content['title'], 'navi' => $NAVI, 'mode' => "guest" );