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

📄 instal_en.php

📁 软件类别: PHP源码 / 文章管理 软件语言: 简体中文 授权方式: 商业版 文件大小: 308K
💻 PHP
📖 第 1 页 / 共 5 页
字号:
<?phperror_reporting(7);require("includes/getglobals.php");$version = "1.0.4 Pro";if (function_exists("set_time_limit") == 1) {  @set_time_limit(1200);}if (($step != "writeconfig") & ($step != "confirmempty") & ($step != "empty")) {  settype($step,"integer");}if (!$step) {  $step = 1;}function undoescapetext($string="") {  $string = str_replace("||| ||","|||||",$string);  $string = substr($string,1,-1);  return $string;}?><html><head><title>Install VirtuaNews <?php echo $version?></title><script language="javascript"><!--function confirmempty() {  if (confirm("You are about to clear ALL the contents from your database,\nthis is NOT reversable and you will loose EVERYTHING including any forum tables\n\nAre you sure?")) {    if (confirm("You have chosen to clear your ENTIRE MySQL database.\nVirtuaNews can hold no responsibility\nfor any loss of data incurred as a result of performing this action.\n\nDo you agree to these terms?")) {      return true;    } else {      return false;    }  } else {    return false;  }}--></script><link rel="StyleSheet" href="admin/style.css" type="text/css"></head><body><table cellspacing="0" cellpadding="2" class="header">  <tr>    <td class="header">Welcome to the VirtuaNews <?php echo $version; ?> install process</td>  </tr></table><table cellpadding="2" cellspacing="0" class="main"><?if ($step == "1") {  echo "  <tr>\n    <td>Running this install script will do a clean install of VirtuaNews on your server</td>\n  </tr>\n";  $perm_check_dir[] = "static";  $perm_check_dir[] = "static/sub_pages";  $perm_check_dir[] = "static/comment";  $perm_check_dir[] = "static/index";  $perm_check_dir[] = "static/polls";  $perm_check_dir[] = "pages/default";  $perm_check_dir[] = "pages/default/mod";  $perm_check_dir[] = "pages/user";  $perm_check_dir[] = "pages/user/mod";  foreach ($perm_check_dir AS $dir) {    $canwrite = @is_writeable($dir);    if (!$canwrite) {      if (!@chmod($dir,0773)) {        echo "  <tr>\n    <td>Error cannot write to $dir directory and cannot change the permissions of it.  You must set the file permissions to allow writing, usually chmod(0777).  Please do this then refresh the page</td>\n  </tr>\n";        $error = 1;      }    }  }  if (!$error) {    echo "  <tr>\n    <td>Click <a href=\"install.php?step=2\">here</a> to continue</td>\n  </tr>\n";  }}if ($step == "2") {  $fileexists = @file_exists("admin/config.php");  $canwrite = @fopen("admin/config.php","a");  @fclose($canwrite);  if (!$fileexists & !$canwrite) {?>  <tr>    <td>Cannot find config.php file and cannot create one</td>  </tr>  <tr>    <td>You must ensure you have uploaded this file to the admin directory and it looks something like this:</td>  </tr>  <tr>    <td>      <textarea cols="80" rows="15" class="form" readonly="readonly">&lt;?php// type of database running// (only mysql is supported at the moment)$dbservertype = "mysql";// hostname or ip of server$servername = "localhost";// username and password to log onto db server$dbusername = "root";$dbpassword = "";// name of database$dbname = "virtuanews";// technical email address, to specify multiple emails seperate each one with a space$technicalemail = "webmaster@yourhost.com";// 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";?&gt;      </textarea>    </td>  </tr><?php  }  if (!$fileexists & ($canwrite != 0)) {  ?>  <tr>    <td>Cannot find config.php file, going to create one now</td>  </tr>  <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="mysql" class="form" size="40"></td>        </tr>        <tr>          <td>Database Hostname Or IP:</td>          <td><input type="text" name="dbservername" value="localhost" class="form" size="40"></td>        </tr>        <tr>          <td>Database Username:</td>          <td><input type="text" name="dbusername" value="root" class="form" size="40"></td>        </tr>        <tr>          <td>Database Password:</td>          <td><input type="text" name="dbpassword" value="" class="form" size="40"></td>        </tr>        <tr>          <td>Database Name:</td>          <td><input type="text" name="dbname" value="VirtuaNews" 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="webmaster@<?php echo $SERVER_NAME?>" 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  }

⌨️ 快捷键说明

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