⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 instal_en.php

📁 软件类别: PHP源码 / 文章管理 软件语言: 简体中文 授权方式: 商业版 文件大小: 308K
💻 PHP
📖 第 1 页 / 共 5 页
字号:
  if ($fileexists & !$canwrite) {    include("admin/config.php");?>  <tr>    <td>Please confirm the details below, only continue if they are correct</td>  </tr>  <tr>    <td>      <table width="50%" cellpadding="5" cellspacing="0">        <tr>          <td>Database Server Type:</td>          <td><?php echo $dbservertype?></td>        </tr>        <tr>          <td>Database Hostname Or IP:</td>          <td><?php echo $dbservername?></td>        </tr>        <tr>          <td>Database Username:</td>          <td><?php echo $dbusername?></td>        </tr>        <tr>          <td>Database Password:</td>          <td><?php echo $dbpassword?></td>        </tr>        <tr>          <td>Database Name:</td>          <td><?php echo $dbname?></td>        </tr>        <tr>          <td>Technical Email:</td>          <td><?php echo $technicalemail?></td>        </tr>        <tr>          <td colspan="2">Click <a href="install.php?step=3">here</a> to continue</td>        </tr>      </table>      </form>    </td>  </tr><?php  }  if ($fileexists & ($canwrite != 0)) {    include("admin/config.php");?>  <tr>    <td>Please confirm the details below</td>  </tr>  <tr>    <td>      <form action="install.php" method="post" name="form">      <input type="hidden" name="step" value="writeconfig">      <table width="50%" cellpadding="5" cellspacing="0">        <tr>          <td>Database Server Type:</td>          <td><input type="text" name="dbservertype" value="<?php echo $dbservertype?>" class="form" size="40"></td>        </tr>        <tr>          <td>Database Hostname Or IP:</td>          <td><input type="text" name="dbservername" value="<?php echo $dbservername?>" class="form" size="40"></td>        </tr>        <tr>          <td>Database Username:</td>          <td><input type="text" name="dbusername" value="<?php echo $dbusername?>" class="form" size="40"></td>        </tr>        <tr>          <td>Database Password:</td>          <td><input type="text" name="dbpassword" value="<?php echo $dbpassword?>" class="form" size="40"></td>        </tr>        <tr>          <td>Database Name:</td>          <td><input type="text" name="dbname" value="<?php echo $dbname?>" class="form" size="40"></td>        </tr>        <tr>          <td>Technical Email:<br>Seperate multiple emails with a space</td>          <td><input type="text" name="technicalemail" value="<?php echo $technicalemail?>" class="form" size="40"></td>        </tr>        <tr>          <td colspan="2"><input type="submit" name="submit" value="提交" class="form"> <input type="reset" name="reset" value="重置" class="form"></td>        </tr>      </table>      </form>    </td>  </tr><?php  }}if ($step == "writeconfig") {  $dbservertype = strtolower($dbservertype);  $configfile = "<"."?php// type of database running// (only mysql is supported at the moment)\$dbservertype = \"$dbservertype\";// hostname or ip of server\$dbservername = \"$dbservername\";// username and password to log onto db server\$dbusername = \"$dbusername\";\$dbpassword = \"$dbpassword\";// name of database\$dbname = \"$dbname\";// technical email address, to specify multiple emails seperate each one with a space\$technicalemail = \"$technicalemail\";// set the staff ids for the users which can prune the admin log// enter a single id, or a string of ids seperated by a , eg. \"1,5,7\"\$canprunelog = \"1\";// 0 shows no debug info// 1 allows creation times to be viewed by adding showqueries=1 onto the query string,// also displays the time in the admin panel// 2 allows sql queries to be viewed also by adding showqueries=1 onto the query string\$debug = 1;// If you have a problem having the directory /admin/ on your server then change this variable below// Please ensure you do not have a / as the first or that last character// You must also edit the file admin/toggle.js to replace admin/ with whatever you want// Also, you MUST edit global.php and admin.php and edit the line saying require(\"admin/config.php\");// to point it to this file\$admindirectory = \"admin\";?>";  $file = fopen("admin/config.php","w");  fwrite($file,$configfile);  $file = fclose($file);  $step = 3;}if ($step == 3) {  include("admin/config.php");  include("includes/db_$dbservertype.php");  $db = vn_connect(0);  if (geterrno() == 1049) {    echo "  <tr>\n    <td>Database Not Real, trying to create one now..</td>\n  </tr>\n";    query("CREATE DATABASE $dbname",0);    if (geterrno() != 0) {      echo "  <tr>\n    <td>Unable to create database:<br>Error Number: ".geterrno()."<br>Error Description: ".geterrordesc()."</td>\n  </tr>\n";      echo "  <tr>\n    <td>Please create it manually or contact your system administrator for help</td>\n  </tr>\n";    } else {      echo "  <tr>\n    <td>Database now created</td>\n  </tr>\n";      echo "  <tr>\n    <td>Click <a href=\"install.php?step=4\">here</a> to continue</td>\n  </tr>\n";    }  } elseif (geterrno() == 0) {      echo "  <tr>\n    <td>Connect succeeded, database already exists, checking for database contents....</td>\n  </tr>\n";      $gettables = query("SHOW TABLES");      if (countrows($gettables)) {        echo "  <tr>\n    <td>The database exists, however it is NOT empty</td>\n  </tr>\n";        echo "  <tr>\n    <td>If you would like to empty the database please click <a href=\"install.php?step=confirmempty\" onclick=\"return confirmempty()\">here</a>.  <font class=\"red\">THIS WILL UNCONDITIONALLY ERASE ALL THE DATE FROM YOUR DATABASE.   DO NOT DO THIS IF YOU PLAN TO USE A FORUM FOR YOUR USER TABLES.</font></td>\n  </tr>\n";        echo "  <tr>\n    <td>Click <a href=\"install.php?step=4\">here</a> to continue to the next step if you wish to leave your database intact</td>\n  </tr>\n";      } else {        echo "  <tr>\n    <td>The database exists and is empty</td>\n  </tr>\n";        echo "  <tr>\n    <td>Click <a href=\"install.php?step=4\">here</a> to continue</td>\n  </tr>\n";      }  } else {    echo "  <tr>\n    <td>Unable to conntect to server:<br>Error Number: ".geterrno()."<br>Error Description: ".geterrordesc()."</td>\n  </tr>\n";    echo "  <tr>\n    <td>Please go back and check the details in config.php and try again.</td>\n  </tr>\n";  }}if ($step == "confirmempty") {  echo "  <tr>\n    <td><font class=\"red\">YOU ARE ABOUT TO DELETE ALL THE DATA FROM YOUR DATABASE.  VIRTUANEWS CANNOT BE HELD RESPONSABLE FOR ANY LOSS OF DATA CAUSED BY THIS ACTION.  DO NOT DO THIS IF YOU PLAN TO USE YOUR FORUM FOR YOUR USER TABLES.</font></td>\n  </tr>\n";  echo "  <tr>\n    <td>If you agree to these terms then please click <a href=\"install.php?step=empty&agree=1\" onclick=\"return confirmempty()\">here</a> otherwise click <a href=\"install.php?step=4\">here</a> to continue to the next step without erasing your data.</td>\n  </tr>\n";}if (($step == "empty") & ($agree == 1)) {  include("admin/config.php");  include("includes/db_$dbservertype.php");  $db = vn_connect();  $gettables = query("SHOW TABLES");  while ($table_arr = fetch_array($gettables)) {    $query[$table_arr[0]] = "DROP TABLE $table_arr[0]";  }  echo "  <tr>\n    <td>VirtuaNews is wiping your database:</tr>\n";

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -