upgrade.php

来自「下在管理系统2.0」· PHP 代码 · 共 92 行

PHP
92
字号
<?php
require "include/config.inc.php";
require "include/class_basic_record_file.php";
require "include/classes.php";

if($action == "upgrade"){
 upgrade($f_srcpath, $f_despath);
 exit;
}

// prompt to input source and destination file path
printHeader();
echo"
<b>欢乐使用PKY产品升级程序-------</b><br>
<hr>
注意:<br>
1、此程序用于将pky下载系统V1.01的数据转换为新版本(V1.5)数据;<br>
2、旧版本与新版本请不要使用相同数据目录,以避免数据冲突;<br>
3、此版本为测试版,转换完成后,请保留就系统与数据,作为备份;<br>
4、转换后数据将添加到新版本数据中,如果要再次转换,请先清除以避免重复。<br>
</td></tr>
<form method=post action='upgrade.php'>
<input type=hidden name=action value=\"upgrade\">
<tr>
<td colspan = 2 align = center><br><br><input type=submit value=\"开始转换\">
</tr></table></form>
";
printFooter();

function printHeader()
{
     echo "<HTML><HEAD><TITLE>PKY产品升级程序[pkyDown V1.01->V1.5(2.0)]</TITLE>
	      <meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">
          <style type=\"text/css\">
          <!--
          A:link {text-decoration:none}
          A:visited {text-decoration:none}
          A:hover {  text-decoration:underline;  color:brown;}
          p,br,body,td,table,tr,input,select, option, textarea, form {font-family: \"MS Shell Dlg\",\"Verdana\", \"宋体\"; color:black; font-size:9pt;}
          -->
          </style>
          </HEAD>
          <BODY bgcolor=\"f5f5f5\" text=\"000000\" leftmargin=\"10\" topmargin=\"10\" marginwidth=\"10\" marginheight=\"10\" link=\"000000\" vlink=\"000000\" alink=\"000000\"><br><center>
		  <table width=\"88%\" height=\"88%\"border=\"0\" cellspacing=\"1\" cellpadding=\"3\" bgcolor=\"6394bd\">
          <tr>
          <td bgcolor=\"dee7ef\" align=center><table width=\"76%\"border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
          <tr>
          <td align=\"left\">";
}

function printFooter()
{
     echo "</td>
          </tr>
          </table><center><p>
          Copyright &copy; 2002 <a href=\"http://www.puterkey.com\" target=_blank>欢乐家庭网</a>. All rights Reserved
          </center>    </td>
          </tr>
          </table>
          </BODY>
          </HTML>";   
}

function upgrade($srcpath, $despath)
{
  $aUser = new CUser;
  $aUser->checkSystem();

  $newSoft = new CSoft;
  $newSoft->open();
  $newSoft->moveFirst();
  for($i = 0; $i <$newSoft->getRecordCount(); $i++)
  {
    $newSoft->canshow = "1";
	$newSoft->keywords = "";
	$newSoft->username = "admin";
	$newSoft->canhtml = "0";
	$newSoft->update();
	$newSoft->moveNext();
  }
  $newSoft->close();
  MsgBox();
}

function MsgBox()
{
  printHeader();
      echo "<center>PKY产品升级程序</center><p><center>
          <b>欢迎您使用欢乐家庭网的最新软件</b><br>
          <br><br>  <font color=red>您已经成功升级了您的系统。</font><br><br><b><a href=\"index.php\"> &gt;&gt; 系统首页 &lt;&lt;</a></b>";
	printFooter();
}

⌨️ 快捷键说明

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