[ Index ]

PHP Cross Reference of phpwcms V1.4.7 _r403 (01.11.10)

title

Body

[close]

/ -> phpwcms.php (source)

   1  <?php
   2  /*************************************************************************************
   3     Copyright notice
   4     
   5     (c) 2002-2010 Oliver Georgi (oliver@phpwcms.de) // All rights reserved.
   6  
   7  This script is part of PHPWCMS. The PHPWCMS web content management system is
   8  free software; you can redistribute it and/or modify it under the terms of
   9  the GNU General Public License as published by the Free Software Foundation;
  10  either version 2 of the License, or (at your option) any later version.
  11  
  12  The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html
  13  A copy is found in the textfile GPL.txt and important notices to the license
  14  from the author is found in LICENSE.txt distributed with these scripts.
  15  
  16  This script is distributed in the hope that it will be useful, but WITHOUT ANY
  17  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  18  PARTICULAR PURPOSE.  See the GNU General Public License for more details.
  19  
  20  This copyright notice MUST APPEAR in all copies of the script!
  21  *************************************************************************************/
  22  
  23  // set page processiong start time
  24  list($usec, $sec) = explode(' ', microtime());
  25  $phpwcms_rendering_start = $usec + $sec;
  26  
  27  session_start();
  28  
  29  //define used var names
  30  $body_onload                = '';
  31  $forward_to_message_center    = false;
  32  $wcsnav                     = array();
  33  $indexpage                     = array();
  34  $phpwcms                     = array();
  35  $BL                            = array();
  36  $BE                            = array('HTML' => '', 'BODY_OPEN' => array(), 'BODY_CLOSE' => array(), 'HEADER' => array(), 'LANG' => 'en');
  37  
  38  // check against user's language
  39  if(!empty($_SESSION["wcs_user_lang"]) && preg_match('/[a-z]{2}/i', $_SESSION["wcs_user_lang"])) {
  40      $BE['LANG'] = $_SESSION["wcs_user_lang"];
  41  }
  42  
  43  require_once ('config/phpwcms/conf.inc.php');
  44  require_once  ('include/inc_lib/default.inc.php');
  45  require_once  (PHPWCMS_ROOT.'/include/inc_lib/dbcon.inc.php');
  46  require_once  (PHPWCMS_ROOT.'/include/inc_lib/general.inc.php');
  47  checkLogin();
  48  require_once  (PHPWCMS_ROOT.'/include/inc_lib/backend.functions.inc.php');
  49  require_once  (PHPWCMS_ROOT.'/include/inc_lib/default.backend.inc.php');
  50  
  51  //load default language EN
  52  require_once  (PHPWCMS_ROOT.'/include/inc_lang/backend/en/lang.inc.php');
  53  $BL['modules']                = array();
  54  
  55  if(!empty($_SESSION["wcs_user_lang_custom"])) {
  56      //use custom lang if available -> was set in login.php
  57      $BL['merge_lang_array'][0]        = $BL['be_admin_optgroup_label'];
  58      $BL['merge_lang_array'][1]        = $BL['be_cnt_field'];    
  59      include(PHPWCMS_ROOT.'/include/inc_lang/backend/'. $BE['LANG'] .'/lang.inc.php');
  60      $BL['be_admin_optgroup_label']    = array_merge($BL['merge_lang_array'][0], $BL['be_admin_optgroup_label']);
  61      $BL['be_cnt_field']                = array_merge($BL['merge_lang_array'][1], $BL['be_cnt_field']);
  62      unset($BL['merge_lang_array']);
  63  }
  64  
  65  require_once  (PHPWCMS_ROOT.'/include/inc_lib/navi_text.inc.php');
  66  require_once  (PHPWCMS_ROOT.'/include/inc_lib/checkmessage.inc.php');
  67  require_once  (PHPWCMS_ROOT.'/config/phpwcms/conf.template_default.inc.php');
  68  require_once  (PHPWCMS_ROOT.'/config/phpwcms/conf.indexpage.inc.php');
  69  require_once  (PHPWCMS_ROOT.'/include/inc_lib/imagick.convert.inc.php');
  70  
  71  // check modules 
  72  require_once  (PHPWCMS_ROOT.'/include/inc_lib/modules.check.inc.php');    
  73  
  74  $BL['be_admin_struct_index'] = html_specialchars($indexpage['acat_name']);
  75  
  76  
  77  $subnav                                = ''; //Sub Navigation
  78  $p                                    = isset($_GET["p"])  ? intval($_GET["p"]) : 0; //which page should be opened
  79  $do                                    = isset($_GET["do"]) ? $_GET["do"] : 'default'; //which backend section and which $do action
  80  $module                                = isset($_GET['module'])  ? clean_slweg($_GET['module']) : ''; //which module
  81  $phpwcms['be_parse_lang_process']    = false; // limit parsing for BBCode/BraceCode languages only to some sections
  82  
  83  switch ($do) {
  84  
  85      case "articles":    //articles
  86                          include (PHPWCMS_ROOT.'/include/inc_lib/admin.functions.inc.php');
  87                          $wcsnav["articles"] = "<strong class=\"navtexta\">".$wcsnav["articles"]."</strong>";
  88                          include (PHPWCMS_ROOT.'/include/inc_lib/article.contenttype.inc.php'); //loading array with actual content types
  89                          include (PHPWCMS_ROOT.'/include/inc_lib/article.functions.inc.php'); //loading article funtions
  90                          $subnav .= subnavtext($BL['be_subnav_article_center'], "phpwcms.php?do=articles", $p, "", 0);
  91                          $subnav .= subnavtext($BL['be_subnav_article_new'], "phpwcms.php?do=articles&amp;p=1&amp;struct=0", $p, "1", 0);
  92                          $subnav .= '<tr><td colspan="2"><img src="img/leer.gif" height="5" width="1" alt="" /></td></tr>'."\n";
  93                          $subnav .= subnavtext($BL['be_news'], "phpwcms.php?do=articles&amp;p=3", $p, "3", 0);
  94                          break;
  95  
  96      case "files":        //files
  97                          $wcsnav["files"] = "<strong class=\"navtexta\">".$wcsnav["files"]."</strong>";
  98                          $subnav .= subnavtext($BL['be_subnav_file_center'], "phpwcms.php?do=files", $p, "", 0);
  99                          $subnav .= subnavtext($BL['be_subnav_file_ftptakeover'], "phpwcms.php?do=files&amp;p=8", $p, "8", 0);
 100                          $subnav .= subnavtext($BL['be_file_multiple_upload'], "phpwcms.php?do=files&amp;p=9", $p, "9", 0);
 101                          break;
 102  
 103      case "modules":        //modules
 104                          $wcsnav["modules"] = "<strong class=\"navtexta\">".$wcsnav["modules"]."</strong>";
 105                          if($phpwcms["gt_mod"]) { //enabled/disable GT MOD
 106                              include (PHPWCMS_ROOT.'/include/inc_module/mod_graphical_text/inc_lang/backend/en/lang.inc.php');
 107                              if($BE['LANG'] != 'en' && is_file(PHPWCMS_ROOT.'/include/inc_module/mod_graphical_text/inc_lang/backend/'.$BE['LANG'].'/lang.inc.php')) {
 108                                  include(PHPWCMS_ROOT.'/include/inc_module/mod_graphical_text/inc_lang/backend/'.$BE['LANG'].'/lang.inc.php');
 109                              }
 110                              $subnav .= subnavtext($BL['be_subnav_graphicaltext_mod'], "phpwcms.php?do=modules&amp;p=2", $p, "2", 0);
 111                          }
 112                          
 113                          foreach($phpwcms['modules'] as $value) {
 114                          
 115                              $subnav .= subnavtext($BL['modules'][ $value['name'] ]['backend_menu'], 'phpwcms.php?do=modules&amp;module='.$value['name'], $module, $value['name'], 0);
 116                          
 117                          }
 118                          
 119                          break;
 120  
 121      case "messages":    //messages
 122                          $wcsnav["messages"] = "<strong class=\"navtexta\">".$wcsnav["messages"]."</strong>";
 123                          if(isset($_SESSION["wcs_user_admin"]) && $_SESSION["wcs_user_admin"] == 1) {
 124                              $subnav .= subnavtext($BL['be_subnav_msg_newslettersend'], "phpwcms.php?do=messages&amp;p=3", $p, "3", 0);
 125                              $subnav .= subnavtext($BL['be_subnav_msg_subscribers'], "phpwcms.php?do=messages&amp;p=4", $p, "4", 0);
 126                              $subnav .= subnavtext($BL['be_subnav_msg_newsletter'], "phpwcms.php?do=messages&amp;p=2", $p, "2", 0);
 127                              
 128                              if(!empty($phpwcms['enable_messages'])) {
 129                                  $subnav .= '<tr><td colspan="2"><img src="img/leer.gif" height="5" width="1" alt="" /></td></tr>'."\n";
 130                              }
 131                          }
 132                          if(!empty($phpwcms['enable_messages'])) {
 133                              $subnav .= subnavtext($BL['be_subnav_msg_center'], "phpwcms.php?do=messages", $p, "", 0);
 134                              $subnav .= subnavtext($BL['be_subnav_msg_new'], "phpwcms.php?do=messages&amp;p=1", $p, "1", 0);
 135                          }
 136                          break;
 137  
 138      case "discuss":        //discuss
 139                          $wcsnav["discuss"] = "<strong class=\"navtexta\">".$wcsnav["discuss"]."</strong>";
 140                          break;
 141  
 142      case "chat":        //chat
 143                          $wcsnav["chat"] = "<strong class=\"navtexta\">".$wcsnav["chat"]."</strong>";
 144                          $subnav .= subnavtext($BL['be_subnav_chat_main'], "phpwcms.php?do=chat", $p, "", 0);
 145                          $subnav .= subnavtext($BL['be_subnav_chat_internal'], "phpwcms.php?do=chat&amp;p=1", $p, "1", 0);
 146                          break;
 147  
 148      case "profile":        //profile
 149                          $wcsnav["profile"] = "<strong class=\"navtexta\">".$wcsnav["profile"]."</strong>";
 150                          if(!empty($_POST["form_aktion"])) {
 151                              switch($_POST["form_aktion"]) { //Aktualisieren der wcs account & profile Daten
 152                                  case "update_account":    include (PHPWCMS_ROOT.'/include/inc_lib/profile.updateaccount.inc.php');
 153                                                          break;
 154                                  case "update_detail":    include (PHPWCMS_ROOT.'/include/inc_lib/profile.update.inc.php'); 
 155                                                          break;
 156                                  case "create_detail":    include (PHPWCMS_ROOT.'/include/inc_lib/profile.create.inc.php'); 
 157                                                          break;
 158                              }
 159                          }
 160                          $subnav .= subnavtext($BL['be_subnav_profile_login'], "phpwcms.php?do=profile", $p, "", 0);
 161                          $subnav .= subnavtext($BL['be_subnav_profile_personal'], "phpwcms.php?do=profile&amp;p=1", $p, "1", 0);
 162                          break;
 163  
 164      case "logout":        //Logout
 165                          $sql  = "UPDATE ".DB_PREPEND."phpwcms_userlog SET ";
 166                          $sql .= "logged_change=".time().", logged_in=0 ";
 167                          $sql .= "WHERE logged_user='".$_SESSION["wcs_user"]."' AND logged_in=1";
 168                          @mysql_query($sql, $db);
 169                          session_destroy();
 170                          headerRedirect(PHPWCMS_URL.get_login_file());
 171                          break;
 172  
 173      case "admin":        //Admin
 174                          if(isset($_SESSION["wcs_user_admin"]) && $_SESSION["wcs_user_admin"] == 1) {
 175                              include (PHPWCMS_ROOT.'/include/inc_lib/admin.functions.inc.php');
 176                              $subnav .= subnavtext($BL['be_subnav_admin_sitestructure'], "phpwcms.php?do=admin&amp;p=6", $p, "6", 0);
 177                              $subnav .= '<tr><td colspan="2"><img src="img/leer.gif" height="5" width="1" alt="" /></td></tr>'."\n";
 178                              $subnav .= subnavtext($BL['be_subnav_admin_pagelayout'], "phpwcms.php?do=admin&amp;p=8", $p, "8", 0);
 179                              $subnav .= subnavtext($BL['be_subnav_admin_templates'], "phpwcms.php?do=admin&amp;p=11", $p, "11", 0);
 180                              $subnav .= subnavtext($BL['be_subnav_admin_css'], "phpwcms.php?do=admin&amp;p=10", $p, "10", 0);
 181                              $subnav .= '<tr><td colspan="2"><img src="img/leer.gif" height="5" width="1" alt="" /></td></tr>'."\n";
 182                              $subnav .= subnavtext($BL['be_subnav_admin_users'], "phpwcms.php?do=admin", $p, "", 0);
 183                              //$subnav .= subnavtext($BL['be_subnav_admin_groups'], "phpwcms.php?do=admin&amp;p=1", $p, "1", 0);
 184                              $subnav .= '<tr><td colspan="2"><img src="img/leer.gif" height="15" width="1" alt="" /></td></tr>'."\n";
 185                              //$subnav .= subnavtext($BL['be_admin_keywords'], "phpwcms.php?do=admin&amp;p=5", $p, "5", 0);
 186                              $subnav .= subnavtext($BL['be_subnav_admin_filecat'], "phpwcms.php?do=admin&amp;p=7", $p, "7", 0);
 187                              $subnav .= subnavtext($BL['be_subnav_admin_starttext'], "phpwcms.php?do=admin&amp;p=12", $p, "12", 0);
 188                              $subnav .= subnavtext($BL['be_article_urlalias'].' ('.$BL['be_ftptakeover_active'].')', 'phpwcms.php?do=admin&amp;p=13', $p, "4", 0);
 189                              $subnav .= '<tr><td colspan="2"><img src="img/leer.gif" height="15" width="1" alt="" /></td></tr>'."\n";
 190                              //$subnav .= subnavtext($BL['be_cnt_cache_update'], 'include/inc_act/act_cache.php', 1, 0, 0);
 191                              //$subnav .= subnavtext($BL['be_cnt_cache_delete'], 'include/inc_act/act_cache.php?do=9', 1, 0, 0, 'onclick="return confirm(\''.$BL['be_cnt_cache_delete_msg'].'\');" ');
 192                              $subnav .= subnavtext($BL['be_cnt_move_deleted'], 'include/inc_act/act_file.php?movedeletedfiles='. $_SESSION["wcs_user_id"], 1, 0, 0, 'onclick="return confirm(\''.$BL['be_cnt_move_deleted_msg'].'\');" ');
 193                              $subnav .= '<tr><td colspan="2"><img src="img/leer.gif" height="15" width="1" alt="" /></td></tr>'."\n";
 194                              $subnav .= subnavtextext('phpinfo()', 'include/inc_act/act_phpinfo.php', '_blank', 0);
 195                              if($phpwcms["phpmyadmin"]) {
 196                                  $subnav .= subnavtextext('phpMyAdmin', 'include/inc_ext/phpMyAdmin/', '_blank', 0);
 197                              }
 198                          }
 199                          break;
 200                          
 201          default:        include (PHPWCMS_ROOT.'/include/inc_lib/article.contenttype.inc.php'); //loading array with actual content types
 202  
 203  } //Ende Auswahl Aktion
 204  
 205  
 206  //Subnav Wrap Text Tabelle
 207  if($subnav) {
 208      $subnav  = '<table border="0" cellpadding="0" cellspacing="0" summary="">'.LF.$subnav;
 209      $subnav .= "<tr><td colspan=\"2\"><img src=\"img/leer.gif\" width=\"1\" height=\"15\" alt=\"\" /></td></tr>\n</table>";
 210  }
 211  
 212  //Wenn der User kein Admin ist, anderenfalls
 213  if(empty($_SESSION["wcs_user_admin"])) {
 214      unset($wcsnav["admin"]);
 215  } elseif($do  == "admin") {
 216      $wcsnav["admin"] = '<strong class="navtexta">'.$wcsnav["admin"].'</strong>';
 217  }
 218  
 219  //script chaching to allow header redirect
 220  ob_start(); //without Compression
 221  
 222  // set correct content type for backend
 223  header('Content-Type: text/html; charset='.PHPWCMS_CHARSET);
 224  
 225  ?>
 226  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 227  <html>
 228  <head>
 229      <title><?php echo $BL['be_page_title'].' - '.PHPWCMS_HOST ?></title>
 230      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 231  <link href="include/inc_css/phpwcms.css" rel="stylesheet" type="text/css">
 232      <link href="include/inc_css/additional.css" rel="stylesheet" type="text/css">
 233      <meta name="robots" content="noindex, nofollow">
 234  <?php
 235  
 236  initMootools();
 237  $BE['HEADER']['phpwcms.js']            = getJavaScriptSourceLink('include/inc_js/phpwcms.js');
 238  //$BE['HEADER']['browserSniffer.js']    = getJavaScriptSourceLink('include/inc_js/browserSniffer.js');
 239  
 240  
 241  if($do == "messages" && $p == 1) {
 242  
 243      include (PHPWCMS_ROOT.'/include/inc_lib/message.sendjs.inc.php');
 244  
 245  } elseif($do == "articles") {
 246  
 247      if($p == 2 && isset($_GET["aktion"]) && intval($_GET["aktion"]) == 2) {
 248          initJsOptionSelect();
 249      }
 250      if(($p == 1) || ($p == 2 && isset($_GET["aktion"]) && intval($_GET["aktion"]) == 1)) {
 251          initJsCalendar();
 252      }
 253  
 254  } elseif($do == 'admin' && ($p == 6 || $p == 11)) {
 255  
 256      // struct editor
 257      initJsOptionSelect();
 258  
 259  }
 260  
 261  if($BE['LANG'] == 'ar') {
 262      $BE['HEADER'][] = '<style type="text/css">' . LF . '<!--' . LF . '* {direction: rtl;}' . LF . '// -->' . LF . '</style>';
 263  }
 264  
 265  ?>
 266  <!-- phpwcms HEADER -->
 267  </head>
 268  
 269  <body<?php echo $body_onload ?>><!-- phpwcms BODY_OPEN -->
 270  <table width="770" border="0" align="center" cellpadding="0" cellspacing="0" summary="main layout structure">
 271      <tr>
 272        <td colspan="6"><img src="img/leer.gif" alt="" width="1" height="7"></td>
 273    </tr>
 274      <tr>
 275          <td colspan="6">
 276          <div style="position:relative">
 277                <a href="phpwcms.php" target="_top"><img src="img/backend/backend_r1_c3.jpg" alt="phpwcms v<?php echo  html_specialchars($phpwcms["release"]); ?>" width="95" height="24" border="0" hspace="15"></a>
 278              <a href="<?php echo PHPWCMS_URL ?>" class="v10" style="position:absolute;right:15px;bottom:4px;color:#FFFFFF" target="_blank"><?php echo PHPWCMS_HOST ?></a>
 279          </div>
 280          </td>
 281      </tr>
 282      <tr>
 283        <td colspan="6"><img src="img/leer.gif" alt="" width="1" height="7"></td>
 284    </tr>
 285      <tr bgcolor="#FFFFFF">
 286       <td valign="top" style="background-image:url(img/backend/backend_r3_c4.jpg); background-repeat:repeat-x; "><img src="img/backend/backend_r3_c1.jpg" alt="" width="15" height="40"></td>
 287        <td colspan="4" valign="top" style="background-image:url(img/backend/backend_r3_c4.jpg); background-repeat:repeat-x; "><table width="740" border="0" cellpadding="0" cellspacing="0" summary="sub structure">
 288          <tr>
 289            <td colspan="2"><img src="img/leer.gif" alt="" width="1" height="9"></td>
 290          </tr>
 291          <tr>
 292            <td valign="top" class="navtext"><?php 
 293            
 294            // create backend main navigation
 295            if($do == 'default') {
 296                echo '<strong class="navtexta"><a href="phpwcms.php">HOME</a></strong>&nbsp;&nbsp;&nbsp;';
 297            } else {
 298                echo '<a href="phpwcms.php">HOME</a>&nbsp;&nbsp;&nbsp;';
 299            }
 300            echo implode('&nbsp;&nbsp;&nbsp;', $wcsnav);
 301  
 302  
 303                  ?></td>
 304            <td align="right" valign="top" class="navtext"><a href="phpwcms.php?do=logout" target="_top"><?php echo $BL['be_nav_logout'] ?></a></td>
 305          </tr>
 306        </table></td>
 307        <td valign="top" style="background-image:url(img/backend/backend_r3_c4.jpg); background-repeat:repeat-x; "><img src="img/backend/backend_r3_c7.jpg" alt="" width="15" height="40"></td>
 308    </tr>
 309      <tr bgcolor="#FFFFFF">
 310        <td width="15" bgcolor="#FFFFFF" style="background-image:url(img/backend/preinfo2_r7_c2.gif);background-repeat:repeat-y;"><img src="img/leer.gif" alt="" width="15" height="1"></td>
 311          <td width="175" valign="top" bgcolor="#FFFFFF"><?php 
 312  
 313          echo $subnav . LF;
 314          echo '<img src="img/leer.gif" width="1" height="5" alt="" /><br /><span class="title">';
 315          echo $BL['usr_online'];
 316          echo '</span><br /><img src="img/leer.gif" width="1" height="3" alt="" /><br />';
 317          echo online_users($db, "<br />", "<span class=\"subnavinactive\">|</span>");
 318  
 319          ?><img src="img/leer.gif" alt="" width="175" height="1"></td>
 320        <td width="10" bgcolor="#FFFFFF"><img src="img/leer.gif" alt="" width="10" height="1"></td>
 321        <td width="15" bgcolor="#FFFFFF" style="background-image:url(img/backend/dividerA.gif);background-repeat:repeat-y;"><img src="img/leer.gif" alt="" width="15" height="200"></td>
 322        <td width="540" valign="top" bgcolor="#FFFFFF" class="v11b width540" id="be_main_content">{STATUS_MESSAGE}{BE_PARSE_LANG}<!--BE_MAIN_CONTENT_START//-->
 323  <?php
 324           
 325        switch($do) {
 326  
 327            case "profile":    //Profile
 328            switch($p) {
 329                case 1:        include (PHPWCMS_ROOT.'/include/inc_tmpl/profile.data.tmpl.php');
 330                            break;
 331                default:    include (PHPWCMS_ROOT.'/include/inc_tmpl/profile.account.tmpl.php');
 332            }
 333            break;
 334            
 335            case 'filecenter':
 336                            include(PHPWCMS_ROOT.'/include/inc_tmpl/filecenter.tmpl.php');
 337                            
 338                            break;
 339  
 340            case "files":    //Hochladen sowie Downloaden und Verwalten von Dateien
 341            switch($p) {
 342                case 8:        //FTP File upload
 343                          include (PHPWCMS_ROOT.'/include/inc_lib/files.create.dirmenu.inc.php');
 344                          include (PHPWCMS_ROOT.'/include/inc_tmpl/files.ftptakeover.tmpl.php');
 345                          break;
 346                      
 347                          // Multiple, queued file upload
 348              case 9:        include (PHPWCMS_ROOT.'/include/inc_lib/files.create.dirmenu.inc.php');
 349                          include (PHPWCMS_ROOT.'/include/inc_lib/files.multipleupload.inc.php');
 350                          include (PHPWCMS_ROOT.'/include/inc_tmpl/files.multipleupload.tmpl.php');
 351                          break;
 352                          
 353                default:    include (PHPWCMS_ROOT.'/include/inc_tmpl/files.reiter.tmpl.php'); //Files Navigation/Reiter
 354                switch($files_folder) {
 355                    case 0:    //Listing der Privaten Dateien
 356                    if(isset($_GET["mkdir"]) || (isset($_POST["dir_aktion"]) && intval($_POST["dir_aktion"]) == 1) ) {
 357                      include (PHPWCMS_ROOT.'/include/inc_tmpl/files.private.newdir.tmpl.php');
 358                  }
 359                    if(isset($_GET["editdir"]) || (isset($_POST["dir_aktion"]) && intval($_POST["dir_aktion"]) == 2) ) {
 360                      include (PHPWCMS_ROOT.'/include/inc_tmpl/files.private.editdir.tmpl.php');
 361                  }
 362                    if(isset($_GET["upload"]) || (isset($_POST["file_aktion"]) && intval($_POST["file_aktion"]) == 1) ) {
 363                        include (PHPWCMS_ROOT.'/include/inc_lib/files.create.dirmenu.inc.php');
 364                        include (PHPWCMS_ROOT.'/include/inc_tmpl/files.private.upload.tmpl.php');
 365                    }
 366                    if(isset($_GET["editfile"]) || (isset($_POST["file_aktion"]) && intval($_POST["file_aktion"]) == 2) ) {
 367                        include (PHPWCMS_ROOT.'/include/inc_lib/files.create.dirmenu.inc.php');
 368                        include (PHPWCMS_ROOT.'/include/inc_tmpl/files.private.editfile.tmpl.php');
 369                    }
 370                    include (PHPWCMS_ROOT.'/include/inc_lib/files.private-functions.inc.php'); //Listing-Funktionen einfügen
 371                    include (PHPWCMS_ROOT.'/include/inc_lib/files.private.additions.inc.php'); //Zusätzliche Private Funktionen
 372                    break;
 373                    case 1: //Funktionen zum Listen von Public Files
 374                    include (PHPWCMS_ROOT.'/include/inc_lib/files.public-functions.inc.php'); //Public Listing-Funktionen einfügen
 375                    include (PHPWCMS_ROOT.'/include/inc_tmpl/files.public.list.tmpl.php'); //Elemetares für Public Listing
 376                    break;
 377                    case 2:    //Dateien im Papierkorb
 378                    include (PHPWCMS_ROOT.'/include/inc_tmpl/files.private.trash.tmpl.php');
 379                    break;
 380                    case 3:    //Dateisuche
 381                    include (PHPWCMS_ROOT.'/include/inc_tmpl/files.search.tmpl.php');
 382                    break;
 383                }
 384                include (PHPWCMS_ROOT.'/include/inc_tmpl/files.abschluss.tmpl.php'); //Abschließende Tabellenzeile = dicke Linie
 385            }
 386            break;
 387  
 388            case "chat":    //Chat
 389            switch($p) {
 390                case 0: include (PHPWCMS_ROOT.'/include/inc_tmpl/chat.main.tmpl.php'); break; //Chat Startseite
 391                case 1: include (PHPWCMS_ROOT.'/include/inc_tmpl/chat.list.tmpl.php'); break; //Chat/Listing
 392            }
 393            break;
 394  
 395          case "messages":    //Messages
 396            switch($p) {
 397                case 0: include (PHPWCMS_ROOT.'/include/inc_tmpl/message.center.tmpl.php'); break; //Messages Overview
 398                case 1: include (PHPWCMS_ROOT.'/include/inc_tmpl/message.send.tmpl.php');   break;    //New Message
 399                case 2: //Newsletter subscription
 400                if($_SESSION["wcs_user_admin"] == 1) include (PHPWCMS_ROOT.'/include/inc_tmpl/message.subscription.tmpl.php');
 401                break;
 402                case 3: //Newsletter
 403                if($_SESSION["wcs_user_admin"] == 1) include (PHPWCMS_ROOT.'/include/inc_tmpl/newsletter.list.tmpl.php');
 404                break;
 405                case 4: //Newsletter subscribers
 406                if($_SESSION["wcs_user_admin"] == 1) {
 407                  include (PHPWCMS_ROOT.'/include/inc_tmpl/message.subscribers.tmpl.php');
 408              }
 409                break;    
 410            }
 411            break;
 412  
 413            case "modules":    //Modules
 414          
 415              if($p == 2 && $phpwcms["gt_mod"]) { //enabled/disable GT MOD
 416                  // include language vars for Jérôme's Graphical Text MOD
 417                    include (PHPWCMS_ROOT.'/include/inc_module/mod_graphical_text/main.inc.php');
 418                }
 419              
 420              // if a module is selected
 421              if(isset($phpwcms['modules'][$module])) {
 422              
 423                  include($phpwcms['modules'][$module]['path'].'backend.default.php');
 424              
 425              }
 426              
 427              break;
 428  
 429            case "admin":    //Administration
 430            if($_SESSION["wcs_user_admin"] == 1) {
 431                switch($p) {
 432                    case 0: //User Administration
 433                    switch(!empty($_GET['s']) ? intval($_GET["s"]) : 0) {
 434                        case 1: include (PHPWCMS_ROOT.'/include/inc_tmpl/admin.newuser.tmpl.php');  break; //New User
 435                        case 2: include (PHPWCMS_ROOT.'/include/inc_tmpl/admin.edituser.tmpl.php'); break; //Edit User
 436                    }
 437                    include (PHPWCMS_ROOT.'/include/inc_tmpl/admin.listuser.tmpl.php');
 438                    break;
 439                  
 440                  case 1: //Users and Groups
 441                  include(PHPWCMS_ROOT.'/include/inc_lib/admin.groups.inc.php');
 442                  include(PHPWCMS_ROOT.'/include/inc_tmpl/admin.groups.'.$_entry['mode'].'.tmpl.php');                
 443                  break;
 444                  
 445                  case 2: //Settings
 446                  include (PHPWCMS_ROOT.'/include/inc_tmpl/admin.settings.tmpl.php');                
 447                  break;
 448                  
 449                  case 5: //Keywords
 450                  include (PHPWCMS_ROOT.'/include/inc_tmpl/admin.keyword.tmpl.php');    
 451                  break;
 452                  
 453                    case 6: //article structure
 454                  
 455                    include (PHPWCMS_ROOT.'/include/inc_lib/admin.structure.inc.php');
 456                    if(isset($_GET["struct"])) {
 457                      include (PHPWCMS_ROOT.'/include/inc_lib/article.contenttype.inc.php'); //loading array with actual content types
 458                        include (PHPWCMS_ROOT.'/include/inc_tmpl/admin.structform.tmpl.php');
 459                    } else {
 460                        include (PHPWCMS_ROOT.'/include/inc_tmpl/admin.structlist.tmpl.php');
 461                      $phpwcms['be_parse_lang_process'] = true;
 462                    }
 463                    break;
 464                    
 465                  case 7:    //File Categories
 466                    include (PHPWCMS_ROOT.'/include/inc_tmpl/admin.filecat.tmpl.php');
 467                    break;
 468                  
 469                    case 8:    //Page Layout
 470                    include (PHPWCMS_ROOT.'/include/inc_tmpl/admin.pagelayout.tmpl.php');
 471                    break;
 472                    
 473                  case 10:    //Frontend CSS
 474                    include (PHPWCMS_ROOT.'/include/inc_tmpl/admin.frontendcss.tmpl.php');
 475                    break;
 476                    
 477                  case 11:    //Templates
 478                    include (PHPWCMS_ROOT.'/include/inc_tmpl/admin.templates.tmpl.php');
 479                    break;
 480                  
 481                    case 12:    //Default backend starup HTML
 482                    include (PHPWCMS_ROOT.'/include/inc_tmpl/admin.startup.tmpl.php');
 483                    break;
 484                  
 485                  //Default backend sitemap HTML
 486                  case 13: 
 487                  include (PHPWCMS_ROOT.'/include/inc_tmpl/admin.aliaslist.tmpl.php');
 488                  break;
 489  
 490                }
 491            }
 492            break;
 493  
 494          // articles
 495            case "articles":
 496              $_SESSION['image_browser_article'] = 0; //set how image file browser should work
 497              switch($p) {
 498                  
 499                  // List articles
 500                  case 0: 
 501                      include (PHPWCMS_ROOT.'/include/inc_tmpl/article.structlist.tmpl.php');
 502                      $phpwcms['be_parse_lang_process'] = true;
 503                      break;
 504                  
 505                  // Edit/create article
 506                  case 1:
 507                  case 2: 
 508                      include (PHPWCMS_ROOT.'/include/inc_lib/article.editcontent.inc.php');
 509                      break;
 510                  
 511                  // News
 512                  case 3:
 513                      include (PHPWCMS_ROOT.'/include/inc_lib/news.inc.php');
 514                      include (PHPWCMS_ROOT.'/include/inc_tmpl/news.tmpl.php');
 515                      break;
 516              }
 517              break;
 518          
 519          // about phpwcms
 520          case "about":
 521              include (PHPWCMS_ROOT.'/include/inc_tmpl/about.tmpl.php');
 522              break;
 523          
 524          // start
 525          default:
 526              include (PHPWCMS_ROOT.'/include/inc_tmpl/be_start.tmpl.php');
 527              include(PHPWCMS_TEMPLATE.'inc_default/startup.php');
 528              $phpwcms['be_parse_lang_process'] = true;
 529  
 530      }
 531  
 532  ?>
 533      
 534      <!--BE_MAIN_CONTENT_END//--></td>
 535        <td width="15" bgcolor="#FFFFFF" style="background-image:url(img/backend/preinfo2_r7_c7.gif);background-repeat:repeat-y;background-position:right;"><img src="img/leer.gif" alt="" width="15" height="1"></td>
 536      </tr>
 537      <tr>
 538        <td><img src="img/backend/backend_a_r1_c1.gif" alt="" width="15" height="15" border="0"></td>
 539        <td colspan="4" valign="bottom" bgcolor="#FFFFFF" class="navtext"><img src="img/backend/backend_r6_c2.jpg" alt="" width="740" height="15" border="0"></td>
 540        <td valign="bottom" class="navtext"><img src="img/backend/backend_a_r1_c7.gif" alt="" width="15" height="15" border="0"></td>
 541    </tr>
 542      <tr>
 543        <td width="15"><img src="img/leer.gif" alt="" width="14" height="17"></td>
 544        <td colspan="5" valign="bottom" class="navtext" style="padding: 8px 0 15px 0;">
 545            <a href="phpwcms.php?do=about" title="<?php echo $BL['be_aboutlink_title'] ?>">phpwcms <?php echo $phpwcms["release"] ?> 
 546              &copy; 2003&#8212;<?php echo date('Y'); ?> Oliver Georgi. Licensed under GPL. Extensions are copyright
 547              of their respective owners.</a></td>
 548    </tr>
 549  </table>
 550  <?php
 551  
 552  //Set Focus for chat insert filed
 553  set_chat_focus($do, $p);
 554  
 555  //If new message was sent -> automatic forwarding to message center
 556  forward_to($forward_to_message_center, PHPWCMS_URL."phpwcms.php?do=messages", 2500);
 557  
 558  $BE['BODY_CLOSE']['wz_tooltip.js'] = getJavaScriptSourceLink('include/inc_js/wz_tooltip.js', '');
 559  
 560  ?>
 561  <!-- phpwcms BODY_CLOSE -->
 562  </body>
 563  </html>
 564  <?php
 565  
 566  // retrieve complete processing time
 567  list($usec, $sec) = explode(' ', microtime());
 568  header('X-phpwcms-Page-Processed-In: ' . number_format(1000*($usec + $sec - $phpwcms_rendering_start), 3) .' ms');
 569  
 570  $BE['HTML'] = ob_get_contents();
 571  ob_end_clean();
 572  
 573  //    parse for backend languages
 574  backend_language_parser();
 575  
 576  //    replace special backend sections -> good for additional code like custom JavaScript, CSS and so on
 577  //    <!-- phpwcms BODY_CLOSE -->
 578  //    <!-- phpwcms BODY_OPEN -->
 579  //    <!-- phpwcms HEADER -->
 580  
 581  // special body onload JavaScript
 582  if($body_onload) {
 583      $BE['HTML'] = str_replace('<body>', '<body '.$body_onload.'>', $BE['HTML']);
 584  }
 585  
 586  $BE['HEADER'][] = '  <!--[if lte IE 7]><style type="text/css">body{behavior:url("'.TEMPLATE_PATH.'inc_css/specific/csshover3.htc");}</style><![endif]-->';
 587  
 588  // html head section
 589  $BE['HTML'] = str_replace('<!-- phpwcms HEADER -->', implode(LF, $BE['HEADER']), $BE['HTML']);
 590  
 591  // body open area
 592  $BE['HTML'] = str_replace('<!-- phpwcms BODY_OPEN -->', implode(LF, $BE['BODY_OPEN']), $BE['HTML']);
 593  
 594  // body close area
 595  $BE['HTML'] = str_replace('<!-- phpwcms BODY_CLOSE -->', implode(LF, $BE['BODY_CLOSE']), $BE['HTML']);
 596  
 597  // Show global system status message
 598  $BE['HTML'] = str_replace('{STATUS_MESSAGE}', show_status_message(true), $BE['HTML']);
 599  
 600  // return all
 601  echo $BE['HTML'];
 602  
 603  ?>


Generated: Tue Nov 16 22:51:00 2010 Cross-referenced by PHPXref 0.7