//New skin of eqq dialog box: qq-style
//2009-11-2
add skins/kefu/dialog/qq/*.*
modified kf.php
modified /kefu/client.inc.php
======================================================================
//New template for eqq whole system
//2009-11-4
add template\web\default\*.htm (48 files)
modified {root}\*.php (25 files)
======================================================================
// Count Function Update
// 2009-11-7
//table modify
insert into kefu_function(keyname,title,isused,price,days,content) values(‘count’,'Count’,1,10,30,’count for guest’);
// file: member/check.php
function MyGrade($g){
//modified by sam for Count Grade function
if($g==’count’&&!CheckGrade($g)) return false;
global $grade,$cid,$username;
if($cid==$username)return true;
return @in_array($g,explode(‘,’,$grade)) ? true : false;
}
======================================================================
// JQuery mix code.inc.php script $ symbol
// 2009-11-7
// file: images/img2.js
jQuery(document).ready(function() {
_$ = jQuery.noConflict();
_$(‘.mycarousels’).css(‘marginLeft’, ‘0px’);
//4 item carousel
jQuery(".mycarousels").jcarousel({
itemVisible: 3,
itemScroll: 1,
scrollAnimation:"1000"
});
});
======================================================================
// New Style Add
// 2009-11-7
// file: /template/web/default/*.htm
// /media/banner1.swf
// /images/*.*
// /css/css.css /css/css1.css
// /*.php
======================================================================
//agent apply function
//
//database table add kefu_agentapply
CREATE TABLE IF NOT EXISTS `kefu_agentapply` (
`id` int(11) NOT NULL auto_increment,
`company` char(50) default NULL,
`name` char(50) default NULL,
`phone` char(50) default NULL,
`atype` char(50) default NULL,
`url` char(50) default NULL,
`address` char(100) default NULL,
`fax` char(50) default NULL,
`zip` char(50) default NULL,
`qq` char(50) default NULL,
`applytime` datetime default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;
//add template
template/web/defualt/agent_apply.htm template for agent.php?act=apply
//add php action handler
agent/apply.php
//add action to admin
switch($action){
case’menu’:
…
array(‘代理商管理’,
array(
‘agent_prov’=>’代理范围设定’,
‘agent_apply’=>’代理商申请’
)
),
…
//add case judge to admin/admin.php
case’agent_apply’:
$title=’代理商申请’;
$agent=$db->record("agentapply","company,name,phone,atype,url,address,fax,zip,qq,applytime");
include("agent_apply.php");
break;
//add admin template for agent_apply action
admin/agent_apply.php
======================================================================
//article category function add
//2009-11-13
//alert table kefu_article
ALTER TABLE `kefu_article` ADD `category` CHAR( 30 ) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL AFTER `ntype`
//add table kefu_category
CREATE TABLE IF NOT EXISTS `kefu_category` (
`id` int(11) NOT NULL auto_increment,
`title` char(30) default NULL,
`desc` char(100) default NULL,
`image` char(255) default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;
************************************************un-completed*********
=====================================================================
//set default style ‘qq’
//member/member.php
//2009-11-20
case ’style’:
if($db->rows("style","companyid=’$cid’")==0)
$db->insert("style","companyid,posx,x,posy,y,iconstyle,liststyle,tipstyle,dialogstyle","$cid|right|0|top|0|001|QQ2006|001|qq");
//kf.php
if($db->rows("style","companyid=’$cid’")==0)
$db->insert("style","companyid,posx,x,posy,y,iconstyle,liststyle,tipstyle,dialogstyle","$cid|right|0|top|0|001|QQ2006|001|qq");
======================================================================
//company logo upload function
//2009-11-20
//add action to member/save.php for upload backend
// Count Function Update
// 2009-11-7
//table modify
insert into kefu_function(keyname,title,isused,price,days,content) values(‘count’,'Count’,1,10,30,’count for guest’);
// file: member/check.php
function MyGrade($g){
//modified by sam for Count Grade function
if($g==’count’&&!CheckGrade($g)) return false;
global $grade,$cid,$username;
if($cid==$username)return true;
return @in_array($g,explode(‘,’,$grade)) ? true : false;
}
======================================================================
// JQuery mix code.inc.php script $ symbol
// 2009-11-7
// file: images/img2.js
jQuery(document).ready(function() {
_$ = jQuery.noConflict();
_$(‘.mycarousels’).css(‘marginLeft’, ‘0px’);
//4 item carousel
jQuery(".mycarousels").jcarousel({
itemVisible: 3,
itemScroll: 1,
scrollAnimation:"1000"
});
});
======================================================================
// New Style Add
// 2009-11-7
// file: /template/web/default/*.htm
// /media/banner1.swf
// /images/*.*
// /css/css.css /css/css1.css
// /*.php
======================================================================
//agent apply function
//
//database table add kefu_agentapply
CREATE TABLE IF NOT EXISTS `kefu_agentapply` (
`id` int(11) NOT NULL auto_increment,
`company` char(50) default NULL,
`name` char(50) default NULL,
`phone` char(50) default NULL,
`atype` char(50) default NULL,
`url` char(50) default NULL,
`address` char(100) default NULL,
`fax` char(50) default NULL,
`zip` char(50) default NULL,
`qq` char(50) default NULL,
`applytime` datetime default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;
//add template
template/web/defualt/agent_apply.htm template for agent.php?act=apply
//add php action handler
agent/apply.php
//add action to admin
switch($action){
case’menu’:
…
array(‘代理商管理’,
array(
‘agent_prov’=>’代理范围设定’,
‘agent_apply’=>’代理商申请’
)
),
…
//add case judge to admin/admin.php
case’agent_apply’:
$title=’代理商申请’;
$agent=$db->record("agentapply","company,name,phone,atype,url,address,fax,zip,qq,applytime");
include("agent_apply.php");
break;
//add admin template for agent_apply action
admin/agent_apply.php
======================================================================
//article category function add
//2009-11-13
//alter table kefu_article
ALTER TABLE `kefu_article` ADD `category` CHAR( 30 ) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL AFTER `ntype`
//add table kefu_category
CREATE TABLE IF NOT EXISTS `kefu_category` (
`id` int(11) NOT NULL auto_increment,
`title` char(30) default NULL,
`desc` char(100) default NULL,
`image` char(255) default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;
************************************************un-completed*********
=====================================================================
//set default style ‘qq’
//member/member.php
//2009-11-20
case ’style’:
if($db->rows("style","companyid=’$cid’")==0)
$db->insert("style","companyid,posx,x,posy,y,iconstyle,liststyle,tipstyle,dialogstyle","$cid|right|0|top|0|001|QQ2006|001|qq");
//kf.php
if($db->rows("style","companyid=’$cid’")==0)
$db->insert("style","companyid,posx,x,posy,y,iconstyle,liststyle,tipstyle,dialogstyle","$cid|right|0|top|0|001|QQ2006|001|qq");
======================================================================
//company logo upload function
//2009-11-20
//add processor to member/save.php config action for upload backend
//comment by sam 2009-11-19
//$logo=Char_Cv("logo_");
…
$path = "../images/logo_upload/";
$allow_types=array(‘gif’,'png’,'jpg’);
$allow_max_filesize = 100; //100 KB
//init
$arr_keys = array_keys($_FILES);
$file = $_FILES[$arr_keys[0]];
$file_name = $file['name'];
if($file_name){
$file_type = get_file_extention($file_name,false);
$file_tmpname = $file['tmp_name'];
$file_error = $file['error'];
$file_size = $file['size'];
$file_ext=get_file_extention($file_name);
$file_newname = md5(time()).$file_ext;
if($file_error!=0){
ero("LOGO上传被中断,请重试。","member.php?action=config");
}
//file type filter
if(!in_array($file_type, $allow_types)){
ero("图片允许的格式为:.gif, .jpg, .png","member.php?action=config");
}
//file size filter
if($file_size > $allow_max_filesize*1024){
ero("图片文件须小于".$allow_max_filesize." KB","member.php?action=config");
}
@move_uploaded_file($file_tmpname,$path.$file_newname) or ero("LOGO文件上传有误","member.php?action=config");
$logo = $file_newname;
$db->update("setting","logo","$logo","companyid=’$cid’");
}
//modified member/config.php template
<tr>
<td align="right" height="20">网站图标:</td>
<td>
<?=setinput("file","logo_file","","",52,100)?><img src="../images/membercp/view.gif" title="<img src=’../images/membercp/view_icon.gif’>" style="cursor:pointer"><font color="#999999">48*48</font>
</td>
</tr>
//modified kf.php for query db-table setting->logo
// added by sam 2009-11-19
$companylogo = $setting[0]['logo'];
//modified kefu/client.inc.php for show company logo
<div class="logo"<?if($companylogo){?> style="background:url(images/logo_upload/<?=$companylogo?>) no-repeat;"<?}?>><?=$dialogtitle?></div>
//create a dir to store logo files
mkdir images/logo_upload
=====================================================================
//worker avatar upload/choice function add
//2009-11-25
//alter table kefu_worker, add avatar field
ALTER TABLE `kefu_worker` ADD `avatar` CHAR( 255 ) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL AFTER `style`
************************************************un-completed*********
=====================================================================
//fetion offline sms function
//2009-11-27
/include/javascript/dialog.js
function send modified myfun part
function sendSms modified myfun part
modified getdata/content/client.php
getdata/save.php
add ntype = imsg
include/fetion/class_fetion.php modified(*old fetion api url is updated)
//communicate url
private static $sd_url = ‘http://221.130.44.194/ht/sd.aspx’;
//sign in url
private static $sign_in_url = "https://uid.fetion.com.cn/ssiportal/SSIAppSignIn.aspx";
=====================================================================
//worker avatar select function
//2009-11-30
add /include/javascript/jquery-1.3.2.min.js
add /images/logo_upload/*.gif
modified /member/member.php action config
add db->load($avatar)
modified /member/modify.php
add <script> include jQuery
add <style> for #popup box etc.
modified
<?=setinput("text","avatar",$avatar,"readonly",52,20)?><input type="button" value="选择" id="btn_upload" />
<div id="popup">
<ul id="lst_avatar">
<!–avatar auto-generator place holder–>
</ul>
</div>
modified /member/save.php action config
$avatar = $_POST['avatar'];
db->write($avatar);
======================================================================
//online status bug fix
modified kf.php
//2009-12-1
//$db -> update("worker", "online", "0", "companyid=’$cid’ and lasttime<" . ($time-20)); ->
$db -> update("worker", "online", "0", "companyid=’$cid’ and updatetime<" . ($time-20));
======================================================================
//kefu hide/show function
//2009-12-2
add images/kefu/tab.gif
modified js function closediv
function CloseDiv(){
//$("frame_div").style.display=’none’;
//floatstop=true;
window.frame_div_innerHTML = $("frame_div").innerHTML;
$("frame_div").innerHTML = ‘<div style="background:url(images/kefu/tab.gif);color:white;width:20px;height=60px;float:right;" onclick="$(\’frame_div\’).innerHTML=window.frame_div_innerHTML"></div>’;
}
======================================================================
Comments