一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

php 网站在线安装源码

时间:2009-06-25 编辑:简简单单 来源:一聚教程网

 /*
 +-------------------------------------------
 |
 |   Technology of WeSpace Software
 |   ========================================
 |   Powered by WeSpace
 |   (c) 2006 wane.net
 |   F_Space Ver3.x
 |   ========================================
 |   Site: http://www.wesofts.com
 |
 +-------------------------------------------
 |   Autohr : wsfuyibing
 | Email : websearch@163.com
 | MSN  : websearch@163.com
 +-------------------------------------------
 */
 error_reporting(E_ERROR | E_WARNING | E_PARSE);
 set_magic_quotes_runtime(0);
 define('IN_www.111com.net',true);
 define('IN_LICENSED',true);
 define('WANE_ROOT','../');
 $timestamp = time();
 $configfile = '../config.inc.php';
 /*
 +-------------------------------------------
 + Check PHP version
 +-------------------------------------------
 */
 if (@phpversion() < '4.1.0')
 {
     $_COOKIE = &$HTTP_COOKIE_VARS;
        $_SERVER = &$HTTP_SERVER_VARS;
        $_FILES = &$HTTP_POST_FILES;
        $_GET = &$HTTP_GET_VARS;
        $_POST = &$HTTP_POST_VARS;
 }
 /*
 +-------------------------------------------
 + Language
 +-------------------------------------------
 */
 $lang = in_array($_GET['lang'],array('gbk','big5','utf-8-gbk','utf-8-big5')) ? $_GET['lang'] : 'utf-8-gbk';
 $charset = substr($lang ,0,5);
 if (!file_exists('./'.$lang.'/language.php'))
 {
  exit('Can not load language file . ');
 }
 else
 {
  require_once './'.$lang.'/language.php';
 }
 /*
 +-------------------------------------------
 + Step
 +-------------------------------------------
 */
 $step  = file_exists('../upload/install.lock') ? '0' : ($_GET['step'] ? $_GET['step'] : '1');
 $steps = 16;
 $step = $step > $steps ? $steps : $step;
 /*
 +-------------------------------------------
 + Template
 +-------------------------------------------
 */
 $tpl_header  = ''."\n">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n";
 $tpl_header .= ''."\n">http://www.w3.org/1999/xhtml">'."\n";
 $tpl_header .= ''."\n";
 $tpl_header .= ''."\n";
 $tpl_header .= ''.$tplang['title'].''."\n";
 $tpl_header .= 'css" rel="stylesheet" type="text/css" />'."\n";
 $tpl_header .= ''."\n";
 $tpl_header .= ''."\n";
 $tpl_header .= '

'."\n\t".''."\n\t\t".''."\n\t\t".''."\n\t".''."\n".'
'.$tplang['title'].''.($step > 1 ? $tplang['lang_'.$lang].'
' : '').$tplang['step_name'].': '.$tplang['step'.$step].'('.$tplang['step_cur'].$step.$tplang['step_unit'].'/'.$tplang['step_total'].$steps.$tplang['step_unit'].')
'."\n";
 $tpl_footer  = ''."\n\t".''."\n\t\t".''."\n\t".''."\n".'
'."\n".''."\n";
 $tpl_footer .= '';
 /*
 +-------------------------------------------
 + Start Install
 +-------------------------------------------
 */
 if (file_exists('../upload/install.lock'))
 {
  echo $tpl_header;
  ?>
   
    
     
    
   

       
     

     echo $tpl_footer;
 }
 elseif ($step == '1')
 {
  echo $tpl_header;
  ?>
  

   

        

  1.      
        

  2.     

  3.      
        

  4.     

  5.      
        

  6.     

  7.      
        

  8.    

  

     echo $tpl_footer;
 }
 elseif ($step == '2')
 {
  echo $tpl_header;
  ?>
   

    
   

   
    
     
    
   

       
       
     

     echo $tpl_footer;
 }
 elseif ($step == '3')
 {
  function filewrite()
  {
   return (file_exists('../config.inc.php') && is_writable('../config.inc.php')) ? ''.$GLOBALS['tplang']['yes'].'' : ''.$GLOBALS['tplang']['no'].'';
  }
  function dirwrite($folder)
  {
   $filename = '../'.$folder.'/index.htm';
   $fp = @fopen($filename,'w+');
   if (!$fp)
   {
    return ''.$GLOBALS['tplang']['no'].'';
   }
   else
   {
    @fwrite($fp,'   ');
    fclose($fp);
    return ''.$GLOBALS['tplang']['yes'].'';
   }
  }
  echo $tpl_header;
 ?>
  

   

        

  1.      
        

  2.    

  

  

   

        

  1.     

  2.      
        

  3.     

  4.      
        

  5.     

  6.      
        

  7.     

  8.      
        

  9.     

  10.      
        

  11.     

  12.      
        

  13.     

  14.      
        

  15.    

  

  
   
    
   
  

      
      
    

    echo $tpl_footer;
 }
 elseif ($step == '4')
 {
  function filewrite()
  {
   return (file_exists('../config.inc.php') && is_writable('../config.inc.php')) ? ''.$GLOBALS['tplang']['yes'].'' : ''.$GLOBALS['tplang']['no'].'';
  }
  if (!file_exists($configfile))
  {
   echo $tpl_header;
   ?>
   
    
     
    
   

       
     

       echo $tpl_footer;
  }
  else
  {
   require_once $configfile;
   echo $tpl_header;
   ?>
   

    

         

  1.       
         

  2.     

   

   

   
   $val){?>
             
               
               
             
   
   $val){?>
             
               
               
             
   
             
               
             
           

     
     
     
     
    

   

       echo $tpl_footer;
  }
 }
 elseif ($step == '5')
 {
  require_once WANE_ROOT.'install/query/5.php';
  header("location:install.php?lang={$lang}&step=6");
 }
 elseif ($step == '6')
 {
  if (!file_exists($configfile))
  {
   echo $tpl_header;
   ?>
   
    
     
    
   

       
     

       echo $tpl_footer;
  }
  else
  {
   require_once $configfile;
   $conn = @mysql_connect($conf['dbserver'],$conf['dbuser'],$conf['dbpass']);
   echo $tpl_header;
   if (!$conn)
   {
    ?>
    
     
      
     
    

        
      

        }
   else
   {
    ?>
    
     
      
     
    

        
      

         $sels = @mysql_select_db($conf['dbname'],$conn);
    if (!$sels)
    {
     ?>
     
      
       
      
     

         
       

          }
    else
    {
     ?>
     
      
       
      
     

         
       

     
      
       
      
     

         
         
       

          }
   }
   echo $tpl_footer;
  }
 }
 elseif ($step == '7')
 {
  if (!file_exists($configfile))
  {
   echo $tpl_header;
   ?>
   
    
     
    
   

       
     

       echo $tpl_footer;
  }
  else
  {
   echo $tpl_header;
   $sqlfile = './sql/struct.php';
   if (!file_exists($sqlfile))
   {
    ?>
    
     
      
     
    

         ()
      

        }
   else
   {
    $fp = @fopen($sqlfile,'r');
    if (!$fp)
    {
     ?>
     
      
       
      
     

          ()
       

          }
    else
    {
     require_once WANE_ROOT.'install/query/7.php';
     ?>
     
      
       
      
     

         
       

     
      
       
      
     

         
         
       

          }
   }
   echo $tpl_footer;
  }
 }
 elseif ($step >= '8' && $step <= '14')
 {
  if (!file_exists($configfile))
  {
   echo $tpl_header;
   ?>
   
    
     
    
   

       
     

       echo $tpl_footer;
  }
  else
  {
   echo $tpl_header;
   $sqlfile = './'.$lang.'/data'.$step.'.php';
   if (!file_exists($sqlfile))
   {
    ?>
    
     
      
     
    

         ()
      

        }
   else
   {
    $fp = @fopen($sqlfile,'r');
    if (!$fp)
    {
     ?>
     
      
       
      
     

          ()
       

          }
    else
    {
     require_once WANE_ROOT.'install/query/8-14.php';
     ?>
     
      
       
      
     

         
       

     
      
       
      
     

         
         
       

          }
   }
   echo $tpl_footer;
  }
 }
 elseif ($step == '15')
 {
  echo $tpl_header;
  ?>
   

   
             
               
               
             
             
               
               
             
             
               
               
             
             
               
               
             
             
               
             
           

    
               
    

     
     
    

   

     echo $tpl_footer;
 }
 else
 {
  $configsubmit = trim($_POST['configsubmit']);
  if ($step == '16' && $configsubmit)
  {
   $magic = @get_magic_quotes_gpc();
   function cutempty($varchar)
   {
    global $magic,$_POST;
    $varchar = $magic ? stripslashes($_POST[$varchar]) : $_POST[$varchar];
    return addslashes(htmlspecialchars(str_replace(array(" ","\n","\t","\r"),array("","","",""),$varchar)));
   }
   $username = substr(cutempty('username'),0,15);
   $password = cutempty('password');
   $email = cutempty('email');
   $sex = cutempty('sex');
   if (!$username || !$password || !$email || !$sex)
   {
    echo $tpl_header;
    ?>
    
     
      
     
    

       

       


       
       
 
  
      

         echo $tpl_footer;
   }
   else
   {
    require_once WANE_ROOT.'install/query/16.php';
    echo $tpl_header;
    ?>
    
     
      
     
    

       

       


       
       
 
    
      

    
     
      
     
    

       

       :

       :

       :

       :


      

         echo $tpl_footer;
   }
  }
  else
  {
   echo $tpl_header;
   ?>
    
     
      
     
    

       

       


       
       
 
    
      

       echo $tpl_footer;
  }
 }
?>

热门栏目