DATEIVERGLEICH
Erstellt: 22.05.2005 00:11:24
   
Modus: Alle Zeilen  
   
Linke Datei: D:\Localhost_2\nuke5.5\html\admin.php     Rechte Datei: D:\Localhost\CP-Light\html\admin.php  
1 <?php = 1 <?php
2     2  
3 /************************************************************************/ <> 3 ##################################################################
4 /* PHP-NUKE: Advanced Content Management System                       */   4 # Copyright by Roman Mahr ( www.thedogman.de )
5 /* ============================================                         */   5 # know as: Dogman
6 /*                                                                      */   6 # Email: dogman@thedogman.de
7 /* Copyright (c) 2002 by Francisco Burzi (fbc@mandrakesoft.com)         */   7 # Modified for CP v2.0 at www.phpnuke-community.de
8 /* http://phpnuke.org                                                   */   8 # This file is not free!
9 /*                                                                      */   9 # Do not Remove the Copyright!
10 /* This program is free software. You can redistribute it and/or modify */   10 # admin.php CAN NOT be renamed.
11 /* it under the terms of the GNU General Public License as published by */   11 # admin.php CAN NOT be ported.
12 /* the Free Software Foundation; either version 2 of the License.       */   12 # This package CAN NOT be mirrored.
13 /************************************************************************/   13 # Support: http://phpnuke-community.de
      14 # Only http://phpnuke-style.de is allowed to sell admin.php!
      15 ###################################################################*
14   = 16  
    -+ 17 $checkurl = getenv("REQUEST_URI");
    = 18  
    -+ 19 if (preg_match("/\?admin/", "$checkurl")) {
      20   echo "die";
      21   exit;
      22 }
    = 23  
15 require_once("mainfile.php");   24 require_once("mainfile.php");
    -+ 25 require_once("includes/cpfunctions.php");
16 get_lang(admin); = 26 get_lang(admin);
17     27  
18 function create_first($name, $url, $email, $pwd, $user) {   28 function create_first($name, $url, $email, $pwd, $user) {
19     global $prefix, $dbi, $user_prefix;   29     global $prefix, $dbi, $user_prefix;
20     $first = sql_num_rows(sql_query("select * from ".$prefix."_authors", $dbi),$dbi);   30     $first = sql_num_rows(sql_query("select * from ".$prefix."_authors", $dbi),$dbi);
21     if ($first == 0) {   31     if ($first == 0) {
22         $pwd = md5($pwd); <> 32         $pwd = md5($pwd);
23         $the_adm = "God";   33         $the_adm = "God";
24         $result = sql_query("insert into ".$prefix."_authors values ('$name', '$the_adm', '$url', '$email', '$pwd', 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, '')", $dbi);   34         $result = sql_query("insert into ".$prefix."_authors values ('$name','$the_adm','$url','$email','$pwd',0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,'')", $dbi);
25         if ($user == 1) {      
26             $user_regdate = date("M d, Y");   35             $user_regdate = date("d M, Y");
27             $user_avatar = "blank.gif";   36             $user_avatar = "blank.gif";
28             $commentlimit = 4096;   37             $commentlimit = 4096;
29             $result = sql_query("insert into ".$user_prefix."_users values (NULL,'','$name','$email','','$url','$user_avatar','$user_regdate','','','','','','0','','','','','$pwd',10,'','0','0','0','','0','','$Default_Theme','$commentlimit','0','0','0','0','0','1')", $dbi);   38            $result = sql_query("insert into ".$user_prefix."_users values (NULL,'','$name','$email','$email','$url','$user_avatar','$user_regdate','','','','','','0','NULL','','','','$pwd',10,'','0','0','0','','0','','$Default_Theme','$commentlimit','0','0','0','0','0','2','1','','0','','+1', NULL,'german','j.m.Y - G:H:s','0','0','0',NULL,'1','1','1','1','1','0','0','1','1','3',NULL,NULL,NULL,'2','2','YES','0000-00-00 00:00:00','0000-00-00 00:00:00','')", $dbi);
30         }      
31         login();   39         login();
32     } = 40     }
33 }   41 }
34     42  
35 $the_first = sql_num_rows(sql_query("select * from ".$prefix."_authors", $dbi), $dbi);   43 $the_first = sql_num_rows(sql_query("select * from ".$prefix."_authors", $dbi), $dbi);
36 if ($the_first == 0) {   44 if ($the_first == 0) {
37     if (!$name) {   45     if (!$name) {
38     include("header.php");   46     include("header.php");
39     title("$sitename: "._ADMINISTRATION."");   47     title("$sitename: "._ADMINISTRATION."");
40     OpenTable();   48     OpenTable();
41     echo "<center><b>"._NOADMINYET."</b></center><br><br>"   49     echo "<center><b>"._NOADMINYET."</b></center><br><br>"
42         ."<form action=\"admin.php\" method=\"post\">" <> 50         ."<form action=\"admin.php\" method=\"post\">"
43         ."<table border=\"0\">"   51         ."<table border=\"0\">"
44         ."<tr><td><b>"._NICKNAME.":</b></td><td><input type=\"text\" name=\"name\" size=\"30\" maxlength=\"25\"></td></tr>"   52         ."<tr><td><b>"._NICKNAME.":</b></td><td><input type=\"text\" name=\"name\" size=\"30\" maxlength=\"25\"></td></tr>"
45         ."<tr><td><b>"._HOMEPAGE.":</b></td><td><input type=\"text\" name=\"url\" size=\"30\" maxlength=\"255\" value=\"http://\"></td></tr>"   53         ."<tr><td><b>"._HOMEPAGE.":</b></td><td><input type=\"text\" name=\"url\" size=\"30\" maxlength=\"255\" value=\"http://\"></td></tr>"
46         ."<tr><td><b>"._EMAIL.":</b></td><td><input type=\"text\" name=\"email\" size=\"30\" maxlength=\"255\"></td></tr>"   54         ."<tr><td><b>"._EMAIL.":</b></td><td><input type=\"text\" name=\"email\" size=\"30\" maxlength=\"255\"></td></tr>"
47         ."<tr><td><b>"._PASSWORD.":</b></td><td><input type=\"password\" name=\"pwd\" size=\"11\" maxlength=\"10\"></td></tr>"   55         ."<tr><td><b>"._PASSWORD.":</b></td><td><input type=\"password\" name=\"pwd\" size=\"11\" maxlength=\"10\"></td></tr>"
48         ."<tr><td colspan=\"2\">"._CREATEUSERDATA."  <input type=\"radio\" name=\"user\" value=\"1\" checked>"._YES."&nbsp;&nbsp;<input type=\"radio\" name=\"user\" value=\"0\">"._NO."</td></tr>"      
49         ."<tr><td><input type=\"hidden\" name=\"fop\" value=\"create_first\">"   56         ."<tr><td><input type=\"hidden\" name=\"fop\" value=\"create_first\">"
50         ."<input type=\"submit\" value=\""._SUBMIT."\">"   57         ."<input type=\"submit\" value=\""._SUBMIT."\">"
51         ."</td></tr></table></form>";   58         ."</td></tr></table></form>";
52     CloseTable(); = 59     CloseTable();
53     include("footer.php");   60     include("footer.php");
54     }   61     }
55     switch($fop) {   62     switch($fop) {
56         case "create_first": <> 63         case "create_first":
57         create_first($name, $url, $email, $pwd, $user);   64         create_first($name, $url, $email, $pwd, $user);
58         break;   65         break;
59     } = 66     }
60     die();   67     die();
61 }   68 }
62     69  
63 require("auth.php");   70 require("auth.php");
64     71  
65 if(!isset($op)) { $op = "adminMain"; }   72 if(!isset($op)) { $op = "adminMain"; }
66 $pagetitle = "- "._ADMINMENU."";   73 $pagetitle = "- "._ADMINMENU."";
67     74  
    -+ 75 ## Admin Secure Begin
      76 /*if ($admintest && ($op != "logout")) {
      77     asec_checkAdminAccess();
      78 }*/
      79 ## Admin Secure End
68 /*********************************************************/ = 80 /*********************************************************/
69 /* Login Function                                        */   81 /* Login Function                                        */
70 /*********************************************************/   82 /*********************************************************/
71     83  
72 function login() {   84 function login() {
73     include ("header.php");   85     include ("header.php");
74     OpenTable();   86     OpenTable();
75     echo "<center><font class=\"title\"><b>"._ADMINLOGIN."</b></font></center>";   87     echo "<center><font class=\"title\"><b>"._ADMINLOGIN."</b></font></center>";
76     CloseTable();   88     CloseTable();
77     echo "<br>";   89     echo "<br>";
78     OpenTable();   90     OpenTable();
79     echo "<form action=\"admin.php\" method=\"post\">"   91     echo "<form action=\"admin.php\" method=\"post\">"
80         ."<table border=\"0\">"   92         ."<table border=\"0\">"
81         ."<tr><td>"._ADMINID."</td>" <> 93         ."<tr><td>"._ADMINID."</td>"
82         ."<td><input type=\"text\" NAME=\"aid\" SIZE=\"20\" MAXLENGTH=\"20\"></td></tr>"   94         ."<td><input type=\"text\" NAME=\"aid\" SIZE=\"20\" MAXLENGTH=\"20\"></td></tr>"
83         ."<tr><td>"._PASSWORD."</td>"   95         ."<tr><td>"._PASSWORD."</td>"
84         ."<td><input type=\"password\" NAME=\"pwd\" SIZE=\"20\" MAXLENGTH=\"18\"></td></tr>"   96         ."<td><input type=\"password\" NAME=\"pwd\" SIZE=\"20\" MAXLENGTH=\"18\"></td></tr>"
85         ."<tr><td>"   97         ."<tr><td>"
86         ."<input type=\"hidden\" NAME=\"op\" value=\"login\">"   98         ."<input type=\"hidden\" NAME=\"op\" value=\"login\">"
87         ."<input type=\"submit\" VALUE=\""._LOGIN."\">"   99         ."<input type=\"submit\" VALUE=\""._LOGIN."\">"
88         ."</td></tr></table>"   100         ."</td></tr></table>"
89         ."</form>";   101         ."</form>";
90     CloseTable(); = 102     CloseTable();
91     include ("footer.php");   103     include ("footer.php");
92 }   104 }
93     105  
    <> 106 ## QuickFix 2.1 Begin
94 function deleteNotice($id, $table, $op_back) {   107 function deleteNotice($id) {
95     global $dbi;   108     global $prefix, $dbi;
96     sql_query("delete from $table WHERE id = $id", $dbi);   109     $id = intval($id);
      110     sql_query("DELETE FROM ".$prefix."_reviews_add WHERE id = '$id'", $dbi);
97     Header("Location: admin.php?op=$op_back");   111     Header("Location: admin.php?op=reviews");
98 } = 112 }
99   <> 113 ## QuickFix 2.1 End
100 /*********************************************************/ = 114 /*********************************************************/
101 /* Administration Menu Function                          */   115 /* Administration Menu Function                          */
102 /*********************************************************/   116 /*********************************************************/
103     117  
104 function adminmenu($url, $title, $image) {   118 function adminmenu($url, $title, $image) {
105     global $counter, $admingraphic; <>    
106     if ($admingraphic == 1) {      
107         $img = "<img src=\"images/admin/$image\" border=\"0\" alt=\"\"></a><br>";      
108         $close = "";      
109     } else {   119  
110         $image = "";   120 $image = "";
111         $close = "</a>";   121 $close = "</a>";
112     }   122 echo "<a href=\"$url\">$img<b>$title</b>$close</font><br>";
113     echo "<td align=\"center\"><font class=\"content\"><a href=\"$url\">$img<b>$title</b>$close</font></td>";      
114     if ($counter == 5) {      
115         echo "</tr><tr>";      
116         $counter = 0;      
117     } else {      
118         $counter++;      
119     }   123  
120 } = 124 }
121     125  
122 function GraphicAdmin() {   126 function GraphicAdmin() {
123     global $aid, $admingraphic, $language, $admin, $banners, $prefix, $dbi; <> 127 global $prefix, $user_prefix, $dbi, $aid, $cookie;
124     $result = sql_query("SELECT qid FROM ".$prefix."_queue", $dbi);   128  
125     $newsubs = sql_num_rows($result, $dbi);   129 if ( ! isset( $_COOKIE["msa_resolution"] ) ) {
126     $result = sql_query("select radminarticle,radmintopic,radminuser,radminsurvey,radminsection,radminlink,radminephem,radminfaq,radmindownload,radminreviews,radminnewsletter,radminforum,radmincontent,radminency,radminsuper from ".$prefix."_authors where aid='$aid'", $dbi);   130       ?>
127     list($radminarticle,$radmintopic,$radminuser,$radminsurvey,$radminsection,$radminlink,$radminephem,$radminfaq,$radmindownload,$radminreviews,$radminnewsletter,$radminforum,$radmincontent,$radminency,$radminsuper) = sql_fetch_array($result, $dbi);   131       <script language="javascript"><!--
128     OpenTable();   132       writeCookie();
129     echo "<center><b><a class=\"storycat\" href=\"admin.php\">"._ADMINMENU."</a></b>";   133       function writeCookie()
130     if ($radminsuper==1) {   134       {
131         echo"&nbsp;&nbsp;&nbsp;<b><a class=\"storycat\" href=\"admin.php?op=BannersAdmin\">"._BANNERSADMIN."</a></b>";   135          var today = new Date();
      136          var the_date = new Date("December 31, 2023");
      137          var the_cookie_date = the_date.toGMTString();
      138          var the_cookie = "msa_resolution="+ screen.width +"x"+ screen.height +"x"+ screen.colorDepth;
      139          var the_cookie = the_cookie + ";expires=" + the_cookie_date;
      140          document.cookie=the_cookie;
132     }   141       }
      142       //--></script>
133     echo "<br><br>";   143       <?
134     echo"<table border=\"0\" width=\"100%\" cellspacing=\"1\"><tr>";   144       $overflowheight = $_COOKIE["msa_resolution"];
135     $linksdir = dir("admin/links");   145       $overflowheight = explode("x", $overflowheight);
136     while($func=$linksdir->read()) {   146       $overflowheight = $overflowheight[1];
137         if(substr($func, 0, 6) == "links.") {   147       if ($overflowheight == "768"){
      148           $overflowheight = 350;
      149       } elseif ($overflowheight == "864"){
      150           $overflowheight = 450;
      151       } elseif ($overflowheight == "1024"){
      152           $overflowheight = 550;
      153       } elseif ($overflowheight == "1200"){
      154           $overflowheight = 650;
138            $menulist .= "$func ";   155       } else {
      156           $overflowheight = 300;
139         }   157       }
      158    } else {
      159       $overflowheight = $_COOKIE["msa_resolution"];
      160       $overflowheight = explode("x", $overflowheight);
      161       $overflowheight = $overflowheight[1];
      162       if ($overflowheight == "768"){
      163           $overflowheight = 350;
      164       } elseif ($overflowheight == "864"){
      165           $overflowheight = 450;
      166       } elseif ($overflowheight == "1024"){
      167           $overflowheight = 550;
      168       } elseif ($overflowheight == "1200"){
      169           $overflowheight = 650;
      170       } else {
      171           $overflowheight = 300;
140     }   172       }
141    closedir($linksdir->handle);   173 }
142     $menulist = explode(" ", $menulist);   174  
143     sort($menulist);   175  
144     for ($i=0; $i < sizeof($menulist); $i++) {   176 $result = sql_query("select radminsuper from ".$prefix."_authors where aid='$aid'", $dbi);
      177 list($radminsuper) = sql_fetch_array($result, $dbi);
145         if($menulist[$i]!="") {   178  
146             $counter = 0;   179  
147             include($linksdir->path."/$menulist[$i]");   180 echo "<table width=\"100%\" border=\"0\"><tr>";
      181 echo "<td style=\"width: 20%; height: ".$overflowheight."px;\" valign=\"top\" ><div style=\"width: 100%; height: ".$overflowheight."px; overflow : auto;\">";
      182 echo "<table width=\"100%\" border=\"0\"><tr><td>"._ADMINSORTEXT."</td></tr><tr><td>";
148         }   183  
      184 echo "<a href=\"admin.php\"><b>"._ADMINMENU."</b></a><br>\n"
      185      ."<a href=\"admin.php?op=logout\"><b>Logout</b></a><br>\n"
      186      ."<a href=\"index.php\"><b>Home</b></a><br>\n";
      187     if ($radminsuper==1) {
    = 188  
149     }   189     }
150     adminmenu("admin.php?op=logout", ""._ADMINLOGOUT."", "exit.gif"); <> 190  
151     echo"</tr></table></center>";   191 echo "</td></tr></table><br>";
152     CloseTable();   192  
      193 prepareLinks();
153     echo "<br>";   194  
      195 echo "</div><br>&copy; <a href=\"http://www.thedogman.de\" target=\"_blank\">Dogman</a><td>"
      196      ."<td style=\"width: 80%; height: ".$overflowheight."px;\" valign=\"top\"><div style=\"width: 100%; height: ".$overflowheight."px; overflow : auto;\">";
    = 197  
154 }   198 }
155     199  
156 /*********************************************************/   200 /*********************************************************/
157 /* Administration Main Function                          */   201 /* Administration Main Function                          */
158 /*********************************************************/   202 /*********************************************************/
159     203  
160 function adminMain() {   204 function adminMain() {
161     global $language, $admin, $aid, $prefix, $file, $dbi, $sitename;   205     global $language, $admin, $aid, $prefix, $file, $dbi, $sitename;
      206  
    -+ 207     ## NoGOD Begin
      208     $result = sql_query("select radminarticle, radminsurvey, radminsuper,admlanguage from ".$prefix."_authors where aid='$aid'", $dbi);
      209     list($radminarticle, $radminsurvey, $radminsuper, $admlanguage) = sql_fetch_array($result, $dbi);
      210     ## NoGOD End
    = 211  
162     include ("header.php");   212     include ("header.php");
163     $dummy = 0;   213     $dummy = 0;
164     GraphicAdmin();   214     GraphicAdmin();
165     $result2 = sql_query("select radminarticle, radminsuper, admlanguage from ".$prefix."_authors where aid='$aid'", $dbi); <> 215  
166     list($radminarticle, $radminsuper, $admlanguage) = sql_fetch_row($result2, $dbi);      
167     if ($admlanguage != "" ) { = 216     if ($admlanguage != "" ) {
168         $queryalang = "WHERE alanguage='$admlanguage' "; <> 217         $queryalang = "WHERE alanguage='$admlanguage' ";
169     } else { = 218     } else {
170         $queryalang = ""; <> 219         $queryalang = "";
171     } = 220     }
172     $main_m = sql_query("select main_module from ".$prefix."_main", $dbi);   221     $main_m = sql_query("select main_module from ".$prefix."_main", $dbi);
173     list($main_module) = sql_fetch_row($main_m, $dbi);   222     list($main_module) = sql_fetch_row($main_m, $dbi);
174     OpenTable(); +-    
175     echo "<center><b>$sitename: "._DEFHOMEMODULE."</b><br><br>" = 223     echo "<center><b>$sitename: "._DEFHOMEMODULE."</b><br><br>"
176         .""._MODULEINHOME." <b>$main_module</b><br>[ <a href=\"admin.php?op=modules\">"._CHANGE."</a> ]</center>"; <> 224         .""._MODULEINHOME." <b>$main_module</b><br>";
      225     if ($radminsuper == 1) {
      226         echo "[ <a href=\"admin.php?op=modules\">"._CHANGE."</a> ]</center>";
177     CloseTable();   227     } else {
178     echo "<br>";   228         echo "</center>";
179     OpenTable();   229     }
180     $result = sql_query("SELECT username FROM ".$prefix."_session where guest=1", $dbi); = 230     $result = sql_query("SELECT username FROM ".$prefix."_session where guest=1", $dbi);
181     $guest_online_num = sql_num_rows($result, $dbi);   231     $guest_online_num = sql_num_rows($result, $dbi);
182     $result = sql_query("SELECT username FROM ".$prefix."_session where guest=0", $dbi);   232     $result = sql_query("SELECT username FROM ".$prefix."_session where guest=0", $dbi);
183     $member_online_num = sql_num_rows($result, $dbi);   233     $member_online_num = sql_num_rows($result, $dbi);
184     $who_online_num = $guest_online_num + $member_online_num;   234     $who_online_num = $guest_online_num + $member_online_num;
185     $who_online = "<center><font class=\"option\">"._WHOSONLINE."</font><br><br><font class=\"content\">"._CURRENTLY." $guest_online_num "._GUESTS." $member_online_num "._MEMBERS."<br>";   235     $who_online = "<center><font class=\"option\">"._WHOSONLINE."</font><br><br><font class=\"content\">"._CURRENTLY." $guest_online_num "._GUESTS." $member_online_num "._MEMBERS."<br>";
186     echo "<center>$who_online</center>";   236     echo "<center>$who_online</center>";
187     CloseTable(); <>    
188     echo "<br>";   237  
189     OpenTable();   238 if (($radminarticle==1) OR ($radminsuper==1)) {
190     echo "<center><b>"._AUTOMATEDARTICLES."</b></center><br>"; = 239     echo "<center><b>"._AUTOMATEDARTICLES."</b></center><br>";
191     $count = 0;   240     $count = 0;
192     $result = sql_query("select anid, aid, title, time, alanguage from ".$prefix."_autonews $queryalang order by time ASC", $dbi);   241     $result = sql_query("select anid, aid, title, time, alanguage from ".$prefix."_autonews $queryalang order by time ASC", $dbi);
193     while(list($anid, $said, $title, $time, $alanguage) = sql_fetch_row($result, $dbi)) {   242     while(list($anid, $said, $title, $time, $alanguage) = sql_fetch_row($result, $dbi)) {
194         if ($alanguage == "") { <> 243         if ($alanguage == "") {
195             $alanguage = ""._ALL."";   244             $alanguage = ""._ALL."";
196         }   245         }
197         if ($anid != "") {   246         if ($anid != "") {
198             if ($count == 0) {   247             if ($count == 0) {
199                 echo "<table border=\"1\" width=\"100%\">";   248                 echo "<table border=\"1\" width=\"100%\">";
200                 $count = 1;   249                 $count = 1;
201             }   250             }
202             $time = ereg_replace(" ", "@", $time);   251             $time = ereg_replace(" ", "@", $time);
203             if (($radminarticle==1) OR ($radminsuper==1)) {   252             if (($radminarticle==1) OR ($radminsuper==1)) {
204                 if (($radminarticle==1) AND ($aid == $said) OR ($radminsuper==1)) {   253                 if (($radminarticle==1) AND ($aid == $said) OR ($radminsuper==1)) {
205                     echo "<tr><td nowrap>&nbsp;(<a href=\"admin.php?op=autoEdit&amp;anid=$anid\">"._EDIT."</a>-<a href=\"admin.php?op=autoDelete&amp;anid=$anid\">"._DELETE."</a>)&nbsp;</td><td width=\"100%\">&nbsp;$title&nbsp;</td><td align=\"center\">&nbsp;$alanguage&nbsp;</td><td nowrap>&nbsp;$time&nbsp;</td></tr>"; /* Multilingual Code : added column to display language */   254                         echo "<tr><td nowrap>&nbsp;(<a href=\"admin.php?op=autoEdit&amp;anid=$anid\">"._EDIT."</a>-<a href=\"admin.php?op=autoDelete&amp;anid=$anid\">"._DELETE."</a>)&nbsp;</td><td width=\"100%\">&nbsp;$title&nbsp;</td><td align=\"center\">&nbsp;$alanguage&nbsp;</td><td nowrap>&nbsp;$time&nbsp;</td></tr>"; /* Multilingual Code : added column to display language */
206                 } else {   255                 } else {
207                     echo "<tr><td>&nbsp;("._NOFUNCTIONS.")&nbsp;</td><td width=\"100%\">&nbsp;$title&nbsp;</td><td align=\"center\">&nbsp;$alanguage&nbsp;</td><td nowrap>&nbsp;$time&nbsp;</td></tr>"; /* Multilingual Code : added column to display language */   256                     echo "<tr><td>&nbsp;("._NOFUNCTIONS.")&nbsp;</td><td width=\"100%\">&nbsp;$title&nbsp;</td><td align=\"center\">&nbsp;$alanguage&nbsp;</td><td nowrap>&nbsp;$time&nbsp;</td></tr>"; /* Multilingual Code : added column to display language */
208                 }   257                 }
209             } else {   258             } else {
210                 echo "<tr><td width=\"100%\">&nbsp;$title&nbsp;</td><td align=\"center\">&nbsp;$alanguage&nbsp;</td><td nowrap>&nbsp;$time&nbsp;</td></tr>"; /* Multilingual Code : added column to display language */   259                 echo "<tr><td width=\"100%\">&nbsp;$title&nbsp;</td><td align=\"center\">&nbsp;$alanguage&nbsp;</td><td nowrap>&nbsp;$time&nbsp;</td></tr>"; /* Multilingual Code : added column to display language */
211             }   260             }
212         }   261         }
213     } = 262     }
214     if (($anid == "") AND ($count == 0)) {   263     if (($anid == "") AND ($count == 0)) {
215         echo "<center><i>"._NOAUTOARTICLES."</i></center>"; <> 264         echo "<center><i>"._NOAUTOARTICLES."</i></center>";
216     } = 265     }
217     if ($count == 1) {   266     if ($count == 1) {
218         echo "</table>";   267         echo "</table>";
219     }   268     }
220     CloseTable(); <>    
221     echo "<br>";   269  
222     OpenTable();      
223     echo "<center><b>"._LAST." 20 "._ARTICLES."</b></center><br>"; = 270     echo "<center><b>"._LAST." 20 "._ARTICLES."</b></center><br>";
224     $result = sql_query("select sid, aid, title, time, topic, informant, alanguage from ".$prefix."_stories $queryalang order by time desc limit 0,20", $dbi); <> 271  
      272     if($radminsuper==1 AND $queryalang != "") $zusatz="";
      273     // else $zusatz="and informant='$aid'";
      274     else $zusatz="";#"WHERE informant='$aid'";
      275     ###
      276    # echo "Abfrage: "."select sid, aid, title, time, topic, informant, alanguage, display_order from ".$prefix."_stories $queryalang ".$zusatz." ORDER BY display_order desc, time desc limit 0,20" ;
    = 277  
    -+ 278     $result = sql_query("select sid, aid, title, time, topic, informant, alanguage, display_order from ".$prefix."_stories $queryalang ".$zusatz." ORDER BY display_order desc, time desc limit 0,20", $dbi);
225     echo "<center><table border=\"1\" width=\"100%\" bgcolor=\"$bgcolor1\">"; = 279     echo "<center><table border=\"1\" width=\"100%\" bgcolor=\"$bgcolor1\">";
    -+ 280     echo "<tr><td align=\"center\"><b>Story-ID</b></td>"
      281              ."<td align=\"center\"><b>Priorit&auml;t</b></td>"
      282              ."<td align=\"center\"><b>Titel</b></td>"
      283              ."<td align=\"center\"><b>Sprache</b></td>"
    = 284  
    -+ 285              ## Intermediate CP-Light NoTopics Begin
      286              //."<td align=\"center\"><b>Thema</b></td>"
      287              ## Intermediate CP-Light NoTopics End
    = 288  
    -+ 289              ."<td align=\"center\"><b>Bearbeiten</b></td></tr>";
    = 290  
    <> 291     ##Letzten 20 Artikel auflisten
226     while(list($sid, $said, $title, $time, $topic, $informant, $alanguage) = sql_fetch_row($result, $dbi)) {   292     while(list($sid, $said, $title, $time, $topic, $informant, $alanguage, $display_order) = sql_fetch_row($result, $dbi))
      293     {
    = 294  
    <> 295         $disporder = is_null($display_order)?"&nbsp;":$display_order;
227         $ta = sql_query("select topicname from ".$prefix."_topics where topicid=$topic", $dbi);   296         $ta = sql_query("select topicname from ".$prefix."_topics where topicid=$topic", $dbi);
228         list($topicname) = sql_fetch_row($ta, $dbi);   297         list($topicname) = sql_fetch_row($ta, $dbi);
229         if ($alanguage == "") {   298         if ($alanguage == "")
      299          {
230             $alanguage = ""._ALL."";   300             $alanguage = ""._ALL."";
231         }   301          }
232         formatTimestamp($time);   302         formatTimestamp($time);
233         echo "<tr><td align=\"right\"><b>$sid</b>"   303         echo "<tr><td align=\"center\"><b>$sid</b>"
      304             ."</td><td align=\"center\">$disporder"
234             ."</td><td align=\"left\" width=\"100%\"><a href=\"modules.php?name=News&file=article&sid=$sid\">$title</a>"   305             ."</td><td align=\"center\" width=\"100%\"><a href=\"modules.php?name=pdNewsSimpleSE&file=article&sid=$sid\">$title</a>"
235             ."</td><td align=\"center\">$alanguage"   306             ."</td><td align=\"center\">".$alanguage;
    = 307  
    <> 308             ## Intermediate CP-Light NoTopics Begin
236             ."</td><td align=\"right\">$topicname";   309            //."</td><td align=\"center\">$topicname";
      310             ## Intermediate CP-Light NoTopics End
    = 311  
237         if (($radminarticle==1) OR ($radminsuper==1)) { <> 312         if (($radminarticle==1) OR ($radminsuper==1)) {
238             if (($radminarticle==1) AND ($aid == $said) OR ($radminsuper==1)) {   313             if (($radminarticle==1) AND ($aid == $said) OR ($radminsuper==1)) {
239                 echo "</td><td align=\"right\" nowrap>(<a href=\"admin.php?op=EditStory&sid=$sid\">"._EDIT."</a>-<a href=\"admin.php?op=RemoveStory&sid=$sid\">"._DELETE."</a>)"   314                 echo "</td><td align=\"center\" nowrap>(<a href=\"admin.php?op=EditStory&sid=$sid\">"._EDIT."</a>-<a href=\"admin.php?op=RemoveStory&sid=$sid\">"._DELETE."</a>)"
240                     ."</td></tr>";   315                     ."</td></tr>";
241             } else {   316             } else {
242                 echo "</td><td align=\"right\" nowrap><font class=\"content\"><i>("._NOFUNCTIONS.")</i></font>"   317                 echo "</td><td align=\"center\" nowrap><font class=\"content\"><i>("._NOFUNCTIONS.")</i></font>"
243                     ."</td></tr>";   318                     ."</td></tr>";
244             }   319             }
245         } else {   320         } else {
246             echo "</td></tr>";   321             echo "</td></tr>";
      322         }
247         }   323  
    = 324  
248     }   325     }
      326  
      327  
249     echo "</table>";   328     echo "</table>";
250     if (($radminarticle==1) OR ($radminsuper==1)) {   329     if (($radminarticle==1) OR ($radminsuper==1)) {
251         echo "<center>" <> 330         echo "<center>"
252             ."<form action=\"admin.php\" method=\"post\">"   331             ."<form action=\"admin.php\" method=\"post\">"
253             .""._STORYID.": <input type=\"text\" NAME=\"sid\" SIZE=\"10\">"   332             .""._STORYID.": <input type=\"text\" NAME=\"sid\" SIZE=\"10\">"
254             ."<select name=\"op\">"   333             ."<select name=\"op\">"
255             ."<option value=\"EditStory\" SELECTED>"._EDIT."</option>"   334             ."<option value=\"EditStory\" SELECTED>"._EDIT."</option>"
256             ."<option value=\"RemoveStory\">"._DELETE."</option>"   335             ."<option value=\"RemoveStory\">"._DELETE."</option>"
257             ."</select>"   336             ."</select>"
258             ."<input type=\"submit\" value=\""._GO."\">"   337             ."<input type=\"submit\" value=\""._GO."\">"
259             ."</form></center>";   338             ."</form></center>";
260     } = 339     }
      340  
    -+ 341     ## Intermediate CP-Light NoSubmissions Begin
    = 342  
    -+ 343     /*OpenTable();
      344     echo "<center><font class=\"title\"><b>"._SUBMISSIONSADMIN." -queue</b></font></center>";
261     CloseTable(); = 345     CloseTable();
262     $result = sql_query("SELECT pollID, pollTitle FROM ".$prefix."_poll_desc WHERE artid='0' ORDER BY pollID DESC limit 1", $dbi); +-    
263     $object = sql_fetch_object($result, $dbi);      
264     $pollID = $object->pollID;      
265     $pollTitle = $object->pollTitle;      
266     echo "<br>"; = 346     echo "<br>";
267     OpenTable();   347     OpenTable();
    -+ 348    # echo "Abfrage: "."SELECT qid, subject, timestamp, alanguage FROM ".$prefix."_queue order by timestamp DESC" ;
      349         $result = sql_query("SELECT qid, subject, timestamp, alanguage FROM ".$prefix."_queue order by timestamp DESC", $dbi);
      350         if(sql_num_rows($result, $dbi) == 0) {
      351             echo "<table width=\"100%\"><tr><td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._NOSUBMISSIONS."</b></td></tr></table>\n";
      352         } else {
      353             echo "<center><font class=\"content\"><b>"._NEWSUBMISSIONS."</b></font><form action=\"admin.php\" method=\"post\"><table width=\"100%\" border=\"1\" bgcolor=\"$bgcolor2\">\n";
      354             while (list($qid, $subject, $timestamp, $alanguage) = sql_fetch_row($result, $dbi)) {
      355                 $hour = "AM";
      356                 ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $timestamp, $datetime);
      357                 if ($datetime[4] > 12) { $datetime[4] = $datetime[4]-12; $hour = "PM"; }
      358                 $datetime = date(""._DATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
      359                 echo "<tr>\n"
      360                     ."<td align=\"center\"><font class=\"content\">&nbsp;(<a href=\"admin.php?op=DeleteStory&amp;qid=$qid\">"._DELETE."</a>)&nbsp;</td>\n"
      361                         ."<td width=\"100%\"><font class=\"content\">\n";
      362                 if ($subject == "") {
      363                     echo "&nbsp;<a href=\"admin.php?op=DisplayStory&amp;qid=$qid\">"._NOSUBJECT."</a></font>\n";
      364                 } else {
      365                     echo "&nbsp;<a href=\"admin.php?op=DisplayStory&amp;qid=$qid\">$subject</a></font>\n";
      366                 }
      367                 if ($alanguage == "") {
      368                     $alanguage = _ALL;
      369                 }
      370                 echo "</td><td align=\"center\"><font size=\"2\">$alanguage</font>\n";
      371                 $timestamp = ereg_replace(" ", "@", $timestamp);
      372                 echo "</td><td align=\"right\"><font class=\"content\">&nbsp;$timestamp&nbsp;</font></td></tr>\n";
      373                 $dummy++;
      374             }
      375             if ($dummy < 1) {
      376                 echo "<tr><td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._NOSUBMISSIONS."</b></form></td></tr></table>\n";
      377             } else {
      378                 echo "</table></form>\n";
      379             }
      380         }
    = 381  
      382  
    -+ 383     if ($radminsuper==1) {
      384         echo "<br><center>"
      385             ."[ <a href=\"admin.php?op=subdelete\">"._DELETE."</a> ]"
      386             ."</center><br>";
      387     }
    = 388  
      389  
    -+ 390     CloseTable();*/
    = 391  
    -+ 392     ## Intermediate CP-Light NoSubmissions End
    = 393  
      394  
    -+ 395 }
    = 396  
    <> 397     if(($radminsurvey == 1) AND file_exists("modules/Surveys/index.php"))
      398      {
      399       $result = sql_query("SELECT pollID, pollTitle FROM ".$prefix."_poll_desc WHERE artid='0' ORDER BY pollID DESC limit 1", $dbi);
      400       $object = sql_fetch_object($result, $dbi);
      401       $pollID = $object->pollID;
      402       $pollTitle = $object->pollTitle;
268     echo "<center><b>"._CURRENTPOLL.":</b> $pollTitle [ <a href=\"admin.php?op=polledit&pollID=$pollID\">"._EDIT."</a> | <a href=\"admin.php?op=create\">"._ADD."</a> ]</center>";   403       echo "<center><b>"._CURRENTPOLL.":</b> $pollTitle [ <a href=\"admin.php?op=polledit&pollID=$pollID\">"._EDIT."</a> | <a href=\"admin.php?op=create\">"._ADD."</a> ]</center>";
269     CloseTable();   404      }
      405     echo "</div></td></tr></table>";
270     include ("footer.php"); = 406     include ("footer.php");
271 }   407 }
272     408  
273 if($admintest) {   409 if($admintest) {
274     410  
275     switch($op) {   411     switch($op) {
276     412  
    -+ 413         case "addModule":
      414         addModule($admodules, $catmodules);
      415         break;
    = 416  
    -+ 417         /*case "sortModules":
      418         sortModules();
      419         break;*/
    = 420  
277         case "deleteNotice": <> 421         case "deleteNotice":
      422         ## QuickFix 2.1 Begin
278         deleteNotice($id, $table, $op_back);   423         deleteNotice($id);
      424         ## QuickFix 2.1 End
279         break;   425         break;
280   = 426  
281         case "GraphicAdmin": <> 427         case "GraphicAdmin":
282         GraphicAdmin(); = 428         GraphicAdmin();
283         break;   429         break;
284     430  
285         case "adminMain": <> 431         case "adminMain":
286         adminMain();   432         adminMain();
287         break;   433         break;
288   = 434  
289         case "logout": <> 435         case "logout":
290         setcookie("admin");   436         setcookie ("admin", "", time() - 60);
291         include("header.php");   437         include("header.php");
      438         GraphicAdmin();
292         OpenTable();   439         OpenTable();
293         echo "<center><font class=\"title\"><b>"._YOUARELOGGEDOUT."</b></font></center>";   440         echo "<center><font class=\"title\"><b>"._YOUARELOGGEDOUT."</b></font></center>";
      441         echo "<META HTTP-EQUIV=\"refresh\" content=\"5; URL=index.php\">";
294         CloseTable();   442         CloseTable();
295         include("footer.php");   443         include("footer.php");
296         break;   444         break;
297   = 445  
298         case "login"; <> 446         case "login";
299         unset($op);   447         unset($op);
300   = 448  
301         default: <> 449         default:
302         $casedir = dir("admin/case");   450         $casedir = dir("admin/case");
303         while($func=$casedir->read()) {   451         while($func=$casedir->read()) {
304             if(substr($func, 0, 5) == "case.") {   452             if(substr($func, 0, 5) == "case.") {
305                 include($casedir->path."/$func");   453                 include($casedir->path."/$func");
306             }   454             }
307         }   455         }
308         closedir($casedir->handle);   456         closedir($casedir->handle);
309         break;   457         break;
310   = 458  
311         } <> 459         }
312   = 460  
313 } else {   461 } else {
314     462  
315     login();   463     login();
316     464  
317 }   465 }
318     466  
319 ?>   467 ?>