?? 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!(住腳!) 爭車位插件安裝協(xié)議</h4>
<table id="forumlinks" cellspacing="0" cellpadding="0" style="table-layout: fixed;" summary="程序說明">
<tr>
<td>
<b>開發(fā)團隊:</b><br/>
LOVECENTER<br/><br/>
<b>團隊成員:</b><br/>
1)BlueFoot(藍(lán)腳) - wuxiangrong@139.com[<font style="color:red">廈門尚科網(wǎng)絡(luò)科技有限責(zé)任公司</font>]<br/>2)Rachel(海洋之心)<br/><br/>
<b>版權(quán)聲明:</b><br/>
感謝您選擇LOVECENTER的產(chǎn)品,您可以免費使用 BlueFoot(藍(lán)腳) 爭車位插件。希望我們的努力能為您提供便利。 <br/>
無論個人或組織、盈利與否、用途如何(包括以學(xué)習(xí)和研究為目的),可以任意改動源代碼。源代碼不得作為任何商業(yè)用途。 <br/><br/>
<b>有限擔(dān)保和免責(zé)聲明 </b><br/>
本軟件及所附帶的文件是作為不提供任何明確的或隱含的賠償或擔(dān)保的形式提供的。
用戶出于自愿而使用本軟件,您必須了解使用本軟件的風(fēng)險,在尚未購買產(chǎn)品技術(shù)服務(wù)之前,我們不承諾提供任何形式的技術(shù)支持、使用擔(dān)保,也不承擔(dān)任何因使用本軟件而產(chǎn)生問題的相關(guān)責(zé)任。<br/><br/>
<b><font style="color:red">如果您同意,請點擊“確定安裝”進行安裝。否則關(guān)閉此頁面!</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="關(guān)閉頁面" 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("已經(jīng)安裝過了,如果要重新安裝請先刪除./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="關(guān)閉頁面" onclick="window.close()">
</td>
</tr>
</table>
</div>
</body>
</html>
<?php }?>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -