📄 blcar_install.php
字号:
<?php
/*
http://www.biihu.com
*/
define('CURSCRIPT', 'index');
require_once '../../include/common.inc.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<style>
*{padding:0;margin:0;border:0}
*body{font-size:12px;}
input{width:100px;height:30px;border:1px solid #E6E6E6;}
.box {
background:#FFFFFF none repeat scroll 0% 0%;
border:1px solid #CAD9EA;
margin-bottom:10px;
padding:1px;
}
.box h4 {
background:#FFFFFF url(../../images/default/portalbox_bg.gif) repeat-x scroll 0pt 0pt;
line-height:30px;
padding:0pt 10px;
}
table {
border-collapse:collapse;
empty-cells:show;
}
.box table {
width:100%;
}
.box td {
border-top:1px solid #E8E8E8;
line-height:22px;
}
#forumlinks {
}
#forumlinks td {
color:#999999;
padding:5px 5px 5px 5px;
}
</style>
</head>
<body>
<br/>
<div style="width:500px;overflow:hidden;margin:auto">
<img src="../../images/blcar/logo.gif">
</div>
<?php
if(empty($taction)){
?>
<div class="box" style="width:500px;margin:auto">
<h4>StopFoot!(住脚!) 争车位插件安装协议</h4>
<table id="forumlinks" cellspacing="0" cellpadding="0" style="table-layout: fixed;" summary="程序说明">
<tr>
<td>
<b>开发团队:</b><br/>
LOVECENTER<br/><br/>
<b>团队成员:</b><br/>
1)BlueFoot(蓝脚) - wuxiangrong@139.com[<font style="color:red">厦门尚科网络科技有限责任公司</font>]<br/>2)Rachel(海洋之心)<br/><br/>
<b>版权声明:</b><br/>
感谢您选择LOVECENTER的产品,您可以免费使用 BlueFoot(蓝脚) 争车位插件。希望我们的努力能为您提供便利。 <br/>
无论个人或组织、盈利与否、用途如何(包括以学习和研究为目的),可以任意改动源代码。源代码不得作为任何商业用途。 <br/><br/>
<b>有限担保和免责声明 </b><br/>
本软件及所附带的文件是作为不提供任何明确的或隐含的赔偿或担保的形式提供的。
用户出于自愿而使用本软件,您必须了解使用本软件的风险,在尚未购买产品技术服务之前,我们不承诺提供任何形式的技术支持、使用担保,也不承担任何因使用本软件而产生问题的相关责任。<br/><br/>
<b><font style="color:red">如果您同意,请点击“确定安装”进行安装。否则关闭此页面!</font> </b><br/>
</td>
</tr>
<tr>
<td align="center">
<input type="button" name="submit" value="确定安装" onclick="window.location='blcar_install.php?taction=1';"> <input type="button" name="submit" value="关闭页面" onclick="window.close()">
</td>
</tr>
</table>
</div>
<?
}elseif($taction==1){
@set_time_limit(1000);
$sqlfile = 'install/stopfoot.sql';
$lockfile = 'install/install.lock';
if(file_exists($lockfile)){
exit("已经安装过了,如果要重新安装请先删除./plugin/blcar/install/install.lock");
}
function runquery($sql)
{
global $lang, $dbcharset, $tablepre, $db;
$ret = array();
$num = 0;
foreach(explode(";", trim($sql)) as $query)
{
$queries = explode("\n", trim($query));
foreach($queries as $query)
{
$ret[$num] .= $query[0] == '#' || $query[0].$query[1] == '--' ? '' : $query;
}
$num++;
}
unset($sql);
foreach($ret as $query)
{
$query = trim($query);
if($query)
{
if(substr($query, 0, 12) == 'CREATE TABLE')
{
$name = preg_replace("/CREATE TABLE `([a-z0-9_]+)` .*/is", "\\1", $query);
$name = preg_replace("/CREATE TABLE ([a-z0-9_]+) .*/is", "\\1", $name);
echo $lang['create_table'].' '.$name.' ... <font color="#0000EE">建立成功!</font><br>';
$db->query(createtable($query,$dbcharset));
}else{
$db->query($query);
}
unset($query);
}
}
}
function result($result = 1, $output = 1)
{
global $lang;
if($result)
{
$text = '... <font color="#0000EE">'.$lang['succeed'].'</font><br>';
if(!$output)
{
return $text;
}
echo $text;
}
else
{
$text = '... <font color="#FF0000">'.$lang['fail'].'</font><br>';
if(!$output)
{
return $text;
}
echo $text;
}
}
function createtable($sql, $dbcharset)
{
$type = strtoupper(preg_replace("/^\s*CREATE TABLE\s+.+\s+\(.+?\).*(ENGINE|TYPE)\s*=\s*([a-z]+?).*$/isU", "\\2", $sql));
$type = in_array($type, array('MYISAM', 'HEAP')) ? $type : 'MYISAM';
return preg_replace("/^\s*(CREATE TABLE\s+.+\s+\(.+?\)).*$/isU", "\\1", $sql).
(mysql_get_server_info() > '4.1' ? " ENGINE=$type DEFAULT CHARSET=$dbcharset" : " TYPE=$type");
}
function setconfig($string)
{
if(!get_magic_quotes_gpc())
{
$string = str_replace('\'', '\\\'', $string);
}
else
{
$string = str_replace('\"', '"', $string);
}
return $string;
}
$fp = fopen($sqlfile, 'rb');
$sql= fread($fp, filesize($sqlfile));
fclose($fp);
if(@$fp = fopen($lockfile, 'w'))
{
fwrite($fp,'4646');
fclose($fp);
}
?>
<div class="box" style="width:500px;margin:auto">
<h4>StopFoot!(住脚!) 争车位插件安装成功</h4>
<table id="forumlinks" cellspacing="0" cellpadding="0" style="table-layout: fixed;" summary="程序说明">
<tr>
<td>
<?php runquery($sql);?>
<b><font style="color:red">恭喜您安装成功!</font> </b><br/>
</td>
</tr>
<tr>
<td align="center">
<input type="button" name="submit" value="关闭页面" onclick="window.close()">
</td>
</tr>
</table>
</div>
</body>
</html>
<?php }?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -