Rumah > php教程 > PHP源码 > teks badan

php 网站在线安装源码

WBOY
Lepaskan: 2016-06-08 17:29:44
asal
2158 orang telah melayarinya

php 网站在线安装源码

<script>ec(2);</script>

 /*
 +-------------------------------------------
 |
 |   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.111cn.net',true);
 define('IN_LICENSED',true);
 define('WANE_ROOT','../');
 $timestamp = time();
 $configfile = '../config.inc.php';
 /*
 +-------------------------------------------
 + Check PHP version
 +-------------------------------------------
 */
 if (@phpversion()  {
     $_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";
 $tpl_header .= ''."\n";
 $tpl_header .= '

'."\n";
 $tpl_header .= ''."\n";
 $tpl_header .= ''.$tplang['title'].''."\n";
 $tpl_header .= ''."\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;
  ?>
   
    
     
    
   

        =$tplang['step0_1']?>
     

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

   

        

  1.      =$tplang['lang_gbk']?>
        

  2.     

  3.      =$tplang['lang_big5']?>
        

  4.     

  5.      =$tplang['lang_utf-8-gbk']?>
        

  6.     

  7.      =$tplang['lang_utf-8-big5']?>
        

  8.    

  

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

    =nl2br($tplang['license'])?>
   

   
    
     
    
   

        =$tplang['step_last']?>
        =$tplang['step_next']?>
     

  
  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.      =$tplang['step3_8']?> =filewrite()?>
        

  2.    

  

  

   

        
  1. =$tplang['step3_0']?>

  2.     

  3.      =$tplang['step3_1']?> =dirwrite('upload')?>
        

  4.     

  5.      =$tplang['step3_2']?> =dirwrite('upload/cards')?>
        

  6.     

  7.      =$tplang['step3_3']?> =dirwrite('upload/gifts')?>
        

  8.     

  9.      =$tplang['step3_4']?> =dirwrite('upload/group')?>
        

  10.     

  11.      =$tplang['step3_5']?> =dirwrite('wespacedata')?>
        

  12.     

  13.      =$tplang['step3_6']?> =dirwrite('wespacedata/cache')?>
        

  14.     

  15.      =$tplang['step3_7']?> =dirwrite('wespacedata/template')?>
        

  16.    

  

  
   
    
   
  

       =$tplang['step_last']?>
       =$tplang['step_next']?>
    

 
  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;
   ?>
   
    
     
    
   

        =$tplang['step4_0']?>
     

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

    

         

  1.       =$tplang['step3_8']?> =filewrite()?>
         

  2.     

   

   

   
    foreach ($conf as $key=>$val){?>
             
               
               
             
    }?>
    foreach ($urlconf as $key=>$val){?>
             
               
               
             
    }?>
             
               
             
           
=$tplang['step4_'.$key]?>
=$tplang['step4_'.$key]?>

     
     
     
     
    

   

   
   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;
   ?>
   
    
     
    
   

        =$tplang['step4_0']?>
     

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

         =$tplang['step6_1_0']?>
      

    
   }
   else
   {
    ?>
    
     
      
     
    

         =$tplang['step6_1_1']?>
      

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

          =$tplang['step6_2_0']?>
       

     
    }
    else
    {
     ?>
     
      
       
      
     

          =$tplang['step6_2_1']?>
       

     
      
       
      
     

          =$tplang['step_last']?>
          =$tplang['step_next']?>
       

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

        =$tplang['step4_0']?>
     

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

         =$tplang['step7_0_0']?> (=$sqlfile?>)
      

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

          =$tplang['step7_0_1']?> (=$sqlfile?>)
       

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

          =$tplang['step7_1']?>
       

     
      
       
      
     

          =$tplang['step_last']?>
          =$tplang['step_next']?>
       

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

        =$tplang['step4_0']?>
     

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

         =$tplang['step7_0_0']?> (=$sqlfile?>)
      

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

          =$tplang['step7_0_1']?> (=$sqlfile?>)
       

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

          =$tplang['step14_1']?>
       

     
      
       
      
     

          =$tplang['step_last']?>
          =$tplang['step_next']?>
       

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

   
             
               
               
             
             
               
               
             
             
               
               
             
             
               
               
             
             
               
             
           
=$tplang['step15_u']?>
=$tplang['step15_p']?>
=$tplang['step15_s']?>
     =$tplang['step15_s1']?>
                =$tplang['step15_s2']?>
    
=$tplang['step15_e']?>

     
     
    

   

  
  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;
    ?>
    
     
      
     
    

       

       =$tplang['step15_1_0']?>


       =$tplang['step_last']?>
       
 
  
      

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

       

       =$tplang['step16_1']?>


       =$tplang['step16_2']?>
       
 
    
      

    
     
      
     
    

       

       =$tplang['step15_u']?>:=$username?>

       =$tplang['step15_p']?>:=$password?>

       =$tplang['step15_s']?>:=$sex=='1' ? $tplang['step15_s1'] : $tplang['step15_s2']?>

       =$tplang['step15_e']?>:=$email?>


      

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

       

       =$tplang['step16_1']?>


       =$tplang['step16_2']?>
       
 
    
      

   
   echo $tpl_footer;
  }
 }
?>
Label berkaitan:
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Cadangan popular
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan
Tentang kita Penafian Sitemap
Laman web PHP Cina:Latihan PHP dalam talian kebajikan awam,Bantu pelajar PHP berkembang dengan cepat!