////////////////////////////////////////////////////////////////////// // // index.php - Cwfm // // By Vincenzo Valvano - vival@cometweb.it // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License as // published by the Free Software Foundation; either version 2 of // the License, or (at your option) any later version. This program // is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public // License for more details. You should have received a copy of the // GNU General Public License along with this program; if not, write // to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, // Boston, MA 02111-1307 USA ////////////////////////////////////////////////////////////////////// header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header ("Cache-Control: no-cache, must-revalidate"); header ("Pragma: no-cache"); if( isset($switch) ) { @session_start(); @session_unset(); @session_destroy(); } @session_start(); include_once("Global.php"); if( !@is_dir("data") ) { if( !@mkdir("data", 0300) ) { include_once("English.php"); echo "\n"; exit; } } if( file_exists("Cwfmini.php") ) { include_once("Cwfmini.php"); $ok = false; if( @copy("Cwfmini.php", "data/Cwfmini.php") ) { if( @chmod("data/Cwfmini.php", 0400) ) { if( @unlink("Cwfmini.php") ) $ok = true; } } if( !$ok ) { include_once("English.php"); echo "\n"; exit; } } else if( file_exists("data/Cwfmini.php") ) include_once("data/Cwfmini.php"); else $Language = "English"; include_once("Userdb.php"); include_once("lang/$Language.php"); if( !@is_dir("tmp") ) { if( !@mkdir("tmp", 0300) ) { echo "\n"; exit; } } // Moves data files to 'data' directory if( file_exists("user.dat.php") ) { $ok = false; if( @copy("user.dat.php", "data/user.dat.php") ) { if( @chmod("data/user.dat.php", 0600) ) { if( @unlink("user.dat.php") ) $ok = true; } } if( !$ok ) { echo "\n"; exit; } } if( file_exists("desc.dat.php") ) { $ok = false; if( @copy("desc.dat.php", "data/desc.dat.php") ) { if( @chmod("data/desc.dat.php", 0600) ) { if( @unlink("desc.dat.php") ) $ok = true; } } if( !$ok ) { echo "\n"; exit; } } if( file_exists("desc.idx.php") ) { $ok = false; if( @copy("desc.idx.php", "data/desc.idx.php") ) { if( @chmod("data/desc.idx.php", 0600) ) { if( @unlink("desc.idx.php") ) $ok = true; } } if( !$ok ) { echo "\n"; exit; } } UpgradeUserDb(); ?>