<?php
// +---------------------------------------------+
// | Copyright 2008 - 2018 weenBizz |
// | http://www.weentech.com |
// | This file may not be redistributed. |
// +---------------------------------------------+
error_reporting(E_ALL & ~E_NOTICE);
$rootpath = '../';
// ############################## INCLUDE VERSION ##############################
include($rootpath . 'install/version.php');
$default_server = "http://". $_SERVER['HTTP_HOST'] . str_replace("/install/index.php","",$_SERVER['SCRIPT_NAME']) . "/";
// ############################## HEADER AND FOOTER ############################
echo '<html>
<head>
<title>weenBizz闻名在线客服系统-安装程序</title>
<link rel="stylesheet" href="./styles.css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table width="480" cellpadding="0" cellspacing="1" border="0" align="center" class="box">
<tr>
<td class="title">weenBizz闻名在线客服系统 '.$weenbizzversion.' 安装程序</td>
</tr>
<tr>
<td valign="top" style="padding: 5px;"><br />';
// store the footer in a var since it will be used in different parts of this file
$footer = ' </td>
</tr>
</table>
</body>
</html>';
// ################# CHECK IF WEENBIZZ IS ALREADY INSTALLED ##################
@include($rootpath . 'includes/config.php');
if(defined('WEENBIZZINSTALLED'))
{
echo '<font class=ohred><b>weenBizz闻名在线客服系统已经安装!</b></font><br />
weenBizz闻名在线客服系统已经安装,如果您希望删除原数据并重新安装,请先清除config.php文件的内容。
<BR>(' . $default_server . 'includes/config.php)<BR><BR>';
echo $footer;
exit();
}
// #################### CHECK CONFIG EXISTS AND IS WRITABLE ####################
if(!file_exists($rootpath . 'includes/config.php'))
{
echo '<font class=ohred><b>config.php文件不存在!</b></font><br/>
config.php文件不存在! 请用记事本编辑一个空文件并上传到includes目录。<br /><br />
Unix或Linux服务器系统下,需要先将config.php文件属性设置为766。<br />
为了安全起见,安装完成后需将config.php文件属性设置为644。<br /><br />';
echo $footer;
exit();
}
else if(!is_writable($rootpath . 'includes/config.php'))
{
@chmod($rootpath . "includes/config.php", 0776);
if(!is_writable($rootpath . 'includes/config.php'))
{
echo '<font class=ohred><b>config.php文件不可写!</b></font><br />
config.php文件不可写! Unix或Linux服务器系统下,需要先将config.php文件属性设置为766。<br /><br />
为了安全起见,安装完成后需将config.php文件属性设置为644。<br /><br />';
}
echo $footer;
exit();
}
else
{
// Also try and actually open the file in case we are running on Windows
// as they user may not have access to the file
if(!$fp = @fopen($rootpath . 'includes/config.php', "w"))
{
echo '<font class=ohred><b>config.php文件不可写!</b></font><br />
config.php文件不可写! 需要先将config.php文件属性设置为可写。<br /><br />
为了安全起见,安装完成后需将config.php文件属性设置为不可写。<br /><br />';
echo $footer;
exit();
}
}
// ############################### GET POST VARS ###############################
$servername = isset($_POST['install']) ? $_POST['servername'] : 'localhost';
$dbname = isset($_POST['install']) ? $_POST['dbname'] : '';
$dbusername = isset($_POST['install']) ? $_POST['dbusername'] : '';
$dbpassword = isset($_POST['install']) ? $_POST['dbpassword'] : '';
$tableprefix = isset($_POST['install']) ? $_POST['tableprefix'] : 'bizz_';
$username = isset($_POST['install']) ? $_POST['username'] : '';
$password = isset($_POST['install']) ? $_POST['password'] : '';
$confirmpassword = isset($_POST['install']) ? $_POST['confirmpassword'] : '';
if(substr($tableprefix, -1) <> '_'){$tableprefix .= '_';}
// ############################ INSTALL WEENBIZZ #############################
if(isset($_POST['install']))
{
// check for errors
if(strlen($username) == 0)
$installerrors[] = '请输入系统管理用户名.';
if(strlen($password) == 0)
$installerrors[] = '请输入系统管理密码.';
if($password != $confirmpassword)
$installerrors[] = '管理密码与确认密码不匹配.';
// Determine if MySql is installed
if(function_exists('mysql_connect'))
{
// attempt to connect to the database
if($connection = @MYSQL_CONNECT($servername, $dbusername, $dbpassword))
{
$sqlversion = @mysql_get_server_info();
if(empty($sqlversion)){$sqlversion='5.0';}
if($sqlversion >= '4.1'){
mysql_query("set names 'utf8'");
mysql_query("SET COLLATION_CONNECTION='utf8_general_ci'");
mysql_query("ALTER DATABASE $dbname DEFAULT CHARACTER SET utf8 COLLATE 'utf8_general_ci'");
}
if($sqlversion >= '5.0') {
mysql_query("SET sql_mode=''");
}
// connected, now lets select the database
if(!@MYSQL_SELECT_DB($dbname, $connection))
{
// The database does not exist... try to create it:
if(!@DB_Query("CREATE DATABASE $dbname"))
{
$installerrors[] = '创建数据库 "' . $dbname . '" 失败! 您的用户名可能没有创建数据库的权限.<br />' . mysql_error();
}
else
{
if($sqlversion >= '4.1'){
mysql_query("set names 'utf8'");
mysql_query("SET COLLATION_CONNECTION='utf8_general_ci'");
mysql_query("ALTER DATABASE $dbname DEFAULT CHARACTER SET utf8 COLLATE 'utf8_general_ci'");
}
if($sqlversion >= '5.0') {
mysql_query("SET sql_mode=''");
}
// Success! Database created
MYSQL_SELECT_DB($dbname, $connection);
}
}
}
else
{
// could not connect
$installerrors[] = '无法连接MySql数据库服务器, 信息:<br />' . mysql_error();
}
}
else
{
// mysql extensions not installed
$installerrors[] = '网站服务器环境不支持MySql扩展.';
}
if(!isset($installerrors))
{
define('TABLE_PREFIX', $tableprefix);
// Drop weenBizz tables for fresh install
DB_Query("DROP TABLE IF EXISTS " . TABLE_PREFIX . "lines");
DB_Query("DROP TABLE IF EXISTS " . TABLE_PREFIX . "online");
DB_Query("DROP TABLE IF EXISTS " . TABLE_PREFIX . "mainsettings");
DB_Query("DROP TABLE IF EXISTS " . TABLE_PREFIX . "sessions");
DB_Query("DROP TABLE IF EXISTS " . TABLE_PREFIX . "users");
DB_Query("DROP TABLE IF EXISTS " . TABLE_PREFIX . "usergroups");
DB_Query ("CREATE TABLE " . TABLE_PREFIX . "online (
usr_id integer NOT NULL,
usr_name varchar(64) NOT NULL,
usr_ip varchar(15) NOT NULL,
rtime integer NOT NULL,
isbaned tinyint(1) NOT NULL,
iskickouted tinyint(1) NOT NULL,
isserviceman tinyint(1) NOT NULL,
serviceman_id integer NOT NULL
) TYPE=HEAP MAX_ROWS=15000;" );
DB_Query ("CREATE TABLE " . TABLE_PREFIX . "lines (
line_id integer NOT NULL,
from_id integer NOT NULL,
from_name varchar(64) NOT NULL,
line_stamp integer NOT NULL,
line_txt varchar(255) NOT NULL,
line_biu varchar(3) NOT NULL,
line_clr varchar(32) NOT NULL,
to_id integer UNSIGNED NOT NULL,
to_name varchar(64) NOT NULL
) TYPE=HEAP MA
没有合适的资源?快使用搜索试试~ 我知道了~
PHP在线客服源码完整版
共156个文件
png:53个
gif:53个
php:36个
3星 · 超过75%的资源 需积分: 41 91 下载量 39 浏览量
2009-10-22
10:12:26
上传
评论 3
收藏 178KB RAR 举报
温馨提示
PHP在线客服源码完整版,肯定可以使用。上传到网站然后/install/按提示完成安装就行。
资源推荐
资源详情
资源评论
收起资源包目录
PHP在线客服源码完整版 (156个子文件)
style.css 3KB
style.css 3KB
login.css 2KB
menu.css 1KB
styles.css 670B
msie.css 280B
logo_weentech.gif 3KB
top_bg.gif 3KB
top_bg_en.gif 3KB
folderforbidden1.gif 2KB
folderforbidden2.gif 2KB
folderup1.gif 2KB
folderup2.gif 2KB
folder1.gif 2KB
folder2.gif 2KB
editablefile1.gif 2KB
editablefile2.gif 2KB
link.gif 2KB
trash.gif 2KB
configure.gif 2KB
magnifying_glass.gif 2KB
notrash.gif 1KB
foot_bg.gif 1KB
logo.gif 1KB
enabletiny.gif 1KB
disabletiny.gif 1KB
wenlo.gif 1KB
waitt.gif 699B
login_box_legal_bg.gif 586B
oem_foot_default.gif 556B
section_top_right.gif 524B
section_top_left.gif 478B
header_left.gif 460B
header_right.gif 459B
classbg_default.gif 433B
section_bottom_right.gif 408B
section_bottom_left.gif 406B
section_top_bg.gif 285B
section_top_right2.gif 272B
menu_1.gif 195B
menu_category_bg.gif 163B
td2_top.gif 155B
btn_bg.gif 148B
list_off.gif 148B
btn_bg.gif 148B
td2_bottom.gif 145B
section_bottom_bg.gif 143B
list_on.gif 136B
header_bg.gif 130B
section_top_left2.gif 99B
td1_top.gif 99B
menu_2.gif 98B
section_top_bg2.gif 97B
td1_bottom.gif 93B
gradient.gif 80B
section_middle_left.gif 64B
section_middle_right.gif 64B
open.gif 64B
closed.gif 62B
index.htm 13B
smilies.inc 1KB
login_box_bg.jpg 6KB
login_box_bottom.jpg 1KB
userweenbizzlite.js 8KB
weenbizzlite.js 8KB
admin_functions.js 2KB
index.php 19KB
users.php 14KB
adminfunctions.php 10KB
usergroups.php 7KB
menu.php 7KB
authenticate.php 6KB
weenbizz_room.php 6KB
userweenbizz_room.php 6KB
mysql.php 5KB
main.php 5KB
mysql_functions.php 5KB
customerservice.php 5KB
mphome.php 4KB
userweenbizz.php 4KB
userroom.php 4KB
weenbizz.php 4KB
mainsettings.php 4KB
index.php 4KB
aroom.php 3KB
core.php 2KB
login.php 2KB
adminlogin_weenbizz.php 2KB
login.php 2KB
userlogin.php 2KB
english.php 1KB
chinese.php 1KB
userhead.php 1KB
head.php 1KB
info.php 756B
dialog.php 690B
userclose.php 537B
info.php 533B
userexchange.php 281B
config.php 203B
共 156 条
- 1
- 2
资源评论
- wanglei_1042012-05-14经过测试总是出现错误
- wangjie6682014-03-13测试总是出现错误
- 噹哩个噹2022-06-05不建议下载使用
- jay02cn2012-12-05出错地方很多,改不胜改。
jorsh
- 粉丝: 2
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功