Please fill the required information below :

'; break; case'create': if(empty($_POST['server']) OR empty($_POST['user']) OR empty($_POST['dbname']) ){ echo 'as we said fill all the information back'; }else{ $connect = mysql_connect($_POST['server'],$_POST['user'],$_POST['password']); if($connect){ $_SESSION['connect'] =$_POST; if (is_writable('config.php')){ $handle = fopen("config.php", "w"); $data=" connect(\$dbname,\$dbserver,\$dbuser,\$dbpass); \$settings = getSettings(); \$config['dir']=ABSPATH; \$config['url']=\$settings['url']; \$config['title']=\$settings['sitename']; \$config['curency']=\$settings['curency']; \$config['perPage']=\$settings['perPage']; \$config['theme']=\$settings['theme']; \$config['gantType']=1; // you can use 1 for days or 2 for weeks or 3 for moths require_once(\$config['dir'].'/lib/php/smarty/Smarty.class.php'); class skin extends Smarty{ function skin(){ global \$config; \$this->Smarty(); \$this->template_dir =\$config['dir'].'/themes/'.\$config['theme'].'/'; \$this->compile_dir =\$config['dir'].'/themes/'.\$config['theme'].'/temp'; \$this->config_dir =\$config['dir'].'/themes/'.\$config['theme'].'/config/'; \$this->load_filter('output','move_to_head'); } } session_start(); ?>"; fwrite($handle, $data); fclose($handle); echo 'We are done now lets go to the next step Create Db'; }else{ echo 'the file db.connection.php is not writable'; } }else{ echo 'we couldont connect to the database server .. start a gain Start'; } } break; case 'sql1': $connect = mysql_connect($_SESSION['connect']['server'],$_SESSION['connect']['user'],$_SESSION['connect']['password']); $sql = 'CREATE DATABASE '.$_SESSION['connect']['dbname']; if(mysql_query($sql,$connect)){ echo 'Database has been created lets imports some data first ..Import'; }else{ echo 'We couldnt create the db , make sure that everything is okay ..Create Db'; } break; case 'import': require_once('lib/php/classes/db.class.php'); $db = new db; $db->connect($_SESSION['connect']['dbname'],$_SESSION['connect']['server'],$_SESSION['connect']['user'],$_SESSION['connect']['password']); $dbcreate = file_get_contents('dbFiles/mysql.sql') ; $dbs = explode(";",$dbcreate); foreach($dbs as $query){ $query = trim($query); if($query){ @mysql_query($query)or mysql_error(); } } echo 'We Have Created your db now lets Populate some data inside .. final'; break; case 'import2': require_once('lib/php/classes/db.class.php'); $db = new db; $db->connect($_SESSION['connect']['dbname'],$_SESSION['connect']['server'],$_SESSION['connect']['user'],$_SESSION['connect']['password']); $recordSettings = array( "id"=>$db->sqlsafe('1'), "url"=>$db->sqlsafe('http://'.$_SERVER['HTTP_HOST'].$_SESSION['connect']['directory'].''), "sitename"=>$db->sqlsafe('My Simple Project Management System'), "theme"=>$db->sqlsafe('default'), "perPage"=>$db->sqlsafe('10'), "curency"=>$db->sqlsafe('$') ); $insertSettings = $db->insert('settings',$recordSettings); $dbcreate = file_get_contents('dbFiles/insert.sql') ; $dbs = explode(";",$dbcreate); foreach($dbs as $query){ $query = trim($query); if($query){ @mysql_query($query)or mysql_error(); } } if(@unlink('install.php')){ echo 'We Have Finished.
now you have to make sure that the cache & the theme temp directory are writables ( 775 or 777 ).'; }else{ echo 'We Have Finished , you have to delete the install.php file.
now you have to make sure that the cache & the theme temp directory are writables ( 775 or 777 ).'; } break; default: echo 'The Installation will start now .. , all you have to do is just relax and press'; echo ' start'; } ?>