├── admin.automsg.php ├── admin.comments.php ├── admin.groups.php ├── admin.home.php ├── admin.messages.php ├── admin.mycomments.php ├── admin.settings.php ├── admin.upgrade.php ├── admin.users.php ├── cache └── online_cache.php ├── comment.php ├── config ├── .htaccess ├── config.php ├── index.html └── settings.php ├── demo.html ├── enter.php ├── guest.php ├── images ├── welive_off_cn.gif ├── welive_off_en.gif ├── welive_on_cn.gif └── welive_on_en.gif ├── includes ├── Class.Database.php ├── Class.Radio.php ├── Class.Select.php ├── index.html ├── javascript │ ├── Admin.js │ ├── Ajax.js │ ├── Support.js │ ├── WeLive.js │ └── x-win.js ├── welive.Admin.php ├── welive.Auth.php ├── welive.BaseUrl.php ├── welive.Core.php ├── welive.Functions.php ├── welive.GlobalFunctions.php └── welive.Support.php ├── index.php ├── ipdata ├── .htaccess ├── index.html └── tinyipdata.dat ├── languages ├── Chinese.php └── English.php ├── online.php ├── robots.txt ├── support.php ├── swaiting.php ├── templates ├── admin.css ├── images │ ├── btn_top.gif │ ├── footer_bg.gif │ ├── footer_bg2.gif │ ├── guest_send.gif │ ├── guest_user_bottom.gif │ ├── guest_user_middle.gif │ ├── guest_user_title.gif │ ├── header_bg.gif │ ├── header_bg2.gif │ ├── history.gif │ ├── history_en.gif │ ├── input_bg.png │ ├── li.gif │ ├── loading.gif │ ├── login_button.png │ ├── logo.gif │ ├── logo_s.gif │ ├── message.gif │ ├── message_en.gif │ ├── msg │ │ ├── e_blcorner.gif │ │ ├── e_border.gif │ │ ├── e_brcorner.gif │ │ ├── e_tlcorner.gif │ │ ├── e_trcorner.gif │ │ ├── s_blcorner.gif │ │ ├── s_border.gif │ │ ├── s_brcorner.gif │ │ ├── s_tlcorner.gif │ │ └── s_trcorner.gif │ ├── msg_bg.png │ ├── msg_pip_e.gif │ ├── msg_pip_i.gif │ ├── msg_pip_l.gif │ ├── msg_pip_r.gif │ ├── msn.gif │ ├── notice.gif │ ├── page_nav.jpg │ ├── panel_close.png │ ├── panel_close2.png │ ├── panel_foot.png │ ├── panel_main.png │ ├── panel_open.png │ ├── panel_open2.png │ ├── panel_open_bg.png │ ├── panel_title.png │ ├── panel_title_en.png │ ├── panel_top.png │ ├── smilies_bg.gif │ ├── status_err.gif │ ├── status_ok.gif │ ├── support_send.gif │ ├── timer_bg.gif │ ├── tools.gif │ ├── user_offline.gif │ ├── user_online.gif │ └── waitt.gif ├── smilies │ ├── 0.gif │ ├── 1.gif │ ├── 10.gif │ ├── 11.gif │ ├── 12.gif │ ├── 13.gif │ ├── 14.gif │ ├── 15.gif │ ├── 16.gif │ ├── 17.gif │ ├── 18.gif │ ├── 19.gif │ ├── 2.gif │ ├── 20.gif │ ├── 21.gif │ ├── 22.gif │ ├── 23.gif │ ├── 3.gif │ ├── 4.gif │ ├── 5.gif │ ├── 6.gif │ ├── 7.gif │ ├── 8.gif │ └── 9.gif ├── sound.swf ├── styles.css ├── support.css └── x-images │ ├── x-b1.png │ ├── x-ctrls.gif │ ├── x-l1.png │ ├── x-l2.png │ ├── x-r1.png │ ├── x-r2.png │ ├── x-t1.png │ ├── x-t2.png │ ├── x-t3.png │ └── x-tt.png ├── vvc.php ├── waiting.php ├── welive.php ├── welive_image.php ├── x-images ├── x-b1.png ├── x-ctrls.gif ├── x-l1.png ├── x-l2.png ├── x-r1.png ├── x-r2.png ├── x-t1.png ├── x-t2.png ├── x-t3.png └── x-tt.png └── 安装与使用帮助.txt /admin.automsg.php: -------------------------------------------------------------------------------- 1 | exe("UPDATE " . TABLE_PREFIX . "automsg SET ordernum = '".ForceInt($ordernums[$i])."', 35 | activated = '".ForceInt($activateds[$i])."', 36 | msg = '".ForceString($msgs[$i])."' 37 | WHERE msgid = '".ForceInt($msgids[$i])."'"); 38 | 39 | } 40 | 41 | GotoPage('admin.automsg.php'.Iif($page, '?p='.$page), 1); 42 | } 43 | 44 | //########### DELETE MESSAGES ########### 45 | 46 | if($action == 'deletemsgs'){ 47 | $deletemsgids = $_POST['deletemsgids']; 48 | $page = ForceIncomingInt('p'); 49 | 50 | for($i = 0; $i < count($deletemsgids); $i++){ 51 | $DB->exe("DELETE FROM " . TABLE_PREFIX . "automsg WHERE msgid = '".ForceInt($deletemsgids[$i])."'"); 52 | } 53 | 54 | GotoPage('admin.automsg.php'.Iif($page, '?p='.$page), 1); 55 | } 56 | 57 | //########### UPDATE OR ADD MSG ########### 58 | if($action == 'insertmsg' OR $action == 'updatemsg'){ 59 | $msgid = ForceIncomingInt('msgid'); 60 | $activated = ForceIncomingInt('activated'); 61 | $ordernum = ForceIncomingInt('ordernum'); 62 | $msg = ForceIncomingString('msg'); 63 | 64 | $deletemsg = ForceIncomingInt('deletemsg'); 65 | 66 | if($deletemsg){ 67 | $DB->exe("DELETE FROM " . TABLE_PREFIX . "automsg WHERE msgid = '$msgid'"); 68 | GotoPage('admin.automsg.php', 1); 69 | } 70 | 71 | if(strlen($msg) == 0){ 72 | $errors = '请输入短语内容!'; 73 | } 74 | 75 | if(isset($errors)){ 76 | $errortitle = Iif($msgid, '编辑短语错误', '添加短语错误'); 77 | $action = Iif($msgid, 'editmsg', 'addmsg'); 78 | }else{ 79 | if($action == 'updatemsg'){ 80 | $DB->exe("UPDATE " . TABLE_PREFIX . "automsg SET ordernum = '$ordernum', 81 | activated = '$activated', 82 | msg = '$msg' 83 | WHERE msgid = '$msgid'"); 84 | }else{ 85 | $DB->exe("INSERT INTO " . TABLE_PREFIX . "automsg (ordernum, activated, msg) VALUES (0, 1, '$msg')"); 86 | 87 | $newmsgid = $DB->insert_id(); 88 | $DB->exe("UPDATE " . TABLE_PREFIX . "automsg SET ordernum = '$newmsgid' WHERE msgid = '$newmsgid'"); 89 | } 90 | 91 | GotoPage('admin.automsg.php', 1); 92 | } 93 | } 94 | 95 | //########### ADD OR EDIT MESSAGE ########### 96 | 97 | if($action == 'editmsg' OR $action == 'addmsg'){ 98 | 99 | $msgid = ForceIncomingInt('msgid'); 100 | 101 | if(isset($errors)){ 102 | PrintErrors($errors, $errortitle); 103 | 104 | $msg = array('msgid' => $msgid, 105 | 'activated' => $activated, 106 | 'ordernum' => $ordernum, 107 | 'msg' => $_POST['msg']); 108 | 109 | } else if($msgid) { 110 | $msg = $DB->getOne("SELECT * FROM " . TABLE_PREFIX . "automsg WHERE msgid = '$msgid'"); 111 | }else{ 112 | $msg = array('msgid' => 0, 'activated' => 1); 113 | } 114 | 115 | echo '
116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | '; 129 | 130 | if($msgid){ 131 | echo ' 132 | 133 | 134 | 135 | 136 | 137 | 138 | '; 139 | } 140 | 141 | echo '
添加短语
短语内容:

说明:
1. 允许使用HTML代码, 如换行可输入<br>
2. 插入链接, 必须在新窗口打开, 否则在当前窗口打开链接将导致离线
如: <a href="链接地址" target="_blank">链接文字</a>
* 必填项
是否显示?
是否删除?:
'; 142 | 143 | PrintSubmit(Iif($msgid, '保存更新', '添加短语')); 144 | } 145 | 146 | //########### PRINT DEFAULT ########### 147 | 148 | if($action == 'default'){ 149 | $NumPerPage =10; 150 | $page = ForceIncomingInt('p', 1); 151 | $start = $NumPerPage * ($page-1); 152 | $search = ForceIncomingString('s'); 153 | if(IsGet('s')){ 154 | $search = urldecode($search); 155 | } 156 | 157 | $searchsql = Iif($search, "WHERE msg like '%".$search."%'", ""); 158 | 159 | $getmessages = $DB->query("SELECT * FROM " . TABLE_PREFIX . "automsg ".$searchsql." ORDER BY ordernum ASC LIMIT $start,$NumPerPage"); 160 | 161 | $maxrows = $DB->getOne("SELECT COUNT(msgid) AS value FROM " . TABLE_PREFIX . "automsg ".$searchsql); 162 | 163 | echo ' 164 | 165 | 166 | 171 | 172 |
   共有: '.$maxrows['value'].' 条短语     添加短语 167 | 168 | 关键字:      169 | 170 |
173 |
174 |
175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | '; 188 | 189 | if($maxrows['value'] < 1){ 190 | echo '
排序编号状态短语内容编辑 删除
暂无任何短语!
'; 191 | }else{ 192 | while($message = $DB->fetch($getmessages)){ 193 | echo ' 194 | 195 | 196 | 197 | '.Iif($message['activated'], '编辑', '编辑').' 198 | 199 | '; 200 | } 201 | 202 | $totalpages = ceil($maxrows['value'] / $NumPerPage); 203 | if($totalpages > 1){ 204 | echo ''.GetPageList('admin.automsg.php', $totalpages, $page, 10, 's', urlencode($search)).''; 205 | } 206 | 207 | echo ' 208 | 209 |
210 |        211 | 212 |
213 | '; 214 | } 215 | } 216 | 217 | PrintFooter(); 218 | 219 | ?> 220 | 221 | -------------------------------------------------------------------------------- /admin.comments.php: -------------------------------------------------------------------------------- 1 | var ajaxpending = "'. $ajaxpending .'";'; //用于AJAX 24 | 25 | //########### DELETE COMMENTS ########### 26 | 27 | if($action == 'deletecomments'){ 28 | $deletecommentids = $_POST['deletecommentids']; 29 | $page = ForceIncomingInt('p'); 30 | $uid = ForceIncomingInt('u'); 31 | 32 | for($i = 0; $i < count($deletecommentids); $i++){ 33 | $DB->exe("DELETE FROM " . TABLE_PREFIX . "comment WHERE commentid = '".ForceInt($deletecommentids[$i])."'"); 34 | } 35 | 36 | GotoPage('admin.comments.php'.Iif($page, '?p='.$page.Iif($uid, '&u='.$uid), Iif($uid, '?u='.$uid)), 1); 37 | } 38 | 39 | //########### FAST DELETE COMMENTS ########### 40 | 41 | if($action == 'fastdelete'){ 42 | $days = ForceIncomingInt('days'); 43 | $uid = ForceIncomingInt('u'); 44 | $realtime = time(); 45 | 46 | $searchsql = Iif($uid, " WHERE touserid ='$uid' ", ""); 47 | $searchsql .= Iif($searchsql, Iif($days, " AND created < " .$realtime - 3600*24*$days), Iif($days, " WHERE created < " .$realtime - 3600*24*$days)); 48 | 49 | $DB->exe("DELETE FROM " . TABLE_PREFIX . "comment ". $searchsql); 50 | 51 | GotoPage('admin.comments.php'.Iif($uid, '?u='.$uid), 1); 52 | } 53 | 54 | //########### PRINT DEFAULT ########### 55 | 56 | if($action == 'default'){ 57 | $NumPerPage =20; 58 | $page = ForceIncomingInt('p', 1); 59 | $start = $NumPerPage * ($page-1); 60 | $uid = ForceIncomingInt('u'); 61 | 62 | $searchsql = Iif($uid, "WHERE touserid ='$uid' ", ""); 63 | 64 | $getusers = $DB->query("SELECT userid, userfrontname FROM " . TABLE_PREFIX . "user WHERE usergroupid <>1 ORDER BY userid"); 65 | while($user = $DB->fetch($getusers)) { 66 | $users[$user['userid']] = $user['userfrontname']; 67 | $useroptions .= ''; 68 | } 69 | 70 | $getcomments = $DB->query("SELECT * FROM " . TABLE_PREFIX . "comment ".$searchsql." ORDER BY commentid DESC LIMIT $start,$NumPerPage"); 71 | 72 | $maxrows = $DB->getOne("SELECT COUNT(commentid) AS value FROM " . TABLE_PREFIX . "comment ".$searchsql); 73 | 74 | echo ' 75 | 76 | 77 | 82 | 88 | 89 |
   共有: '.$maxrows['value'].' 条留言 78 |
79 | 选择:      80 |
81 |
83 |
84 | 85 | 选择:        86 |
87 |
90 |
91 |
92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | '; 107 | 108 | if($maxrows['value'] < 1){ 109 | echo '
留言人IP地址留言内容留言给时间 删除
暂无任何留言!
'; 110 | }else{ 111 | while($comment = $DB->fetch($getcomments)){ 112 | echo ' 113 | ' . $comment['username'] . ' 114 | ' . Iif($comment['userip'], '' . $comment['userip'] . '
', ' ') . ' 115 | '.nl2br($comment['content']). ' 116 | '.Iif($users[$comment['touserid']], '' . $users[$comment['touserid']] . '', '已删除').' 117 | ' . DisplayDate($comment['created'], 0, 1) . ' 118 | 119 | '; 120 | } 121 | 122 | $totalpages = ceil($maxrows['value'] / $NumPerPage); 123 | if($totalpages > 1){ 124 | echo ''.GetPageList('admin.comments.php', $totalpages, $page, 10, 'u', $uid).''; 125 | } 126 | 127 | echo ' 128 | 129 |
130 | 131 |
132 | '; 133 | } 134 | } 135 | 136 | PrintFooter(); 137 | 138 | ?> 139 | 140 | -------------------------------------------------------------------------------- /admin.groups.php: -------------------------------------------------------------------------------- 1 | exe("UPDATE " . TABLE_PREFIX . "usergroup SET displayorder = '".ForceInt($displayorders[$i])."', 39 | groupname = '".Iif($groupname, $groupname, '未命名')."', 40 | groupename = '".Iif($groupename, $groupename, 'No name')."', 41 | activated = '".ForceInt($activateds[$i])."', 42 | description = '".ForceString($descriptions[$i])."', 43 | descriptionen = '".ForceString($descriptionens[$i])."' 44 | WHERE usergroupid = '".ForceInt($usergroupids[$i])."'"); 45 | } 46 | 47 | if(!storeCache()){ //更新小面板在线客服缓存文件 48 | $errortitle = '更新客服缓存错误'; 49 | $errors = '客服群组信息已保存到数据库, 但更新在线客服缓存文件失败, 前台客服小面板状态无法更新! 请检查cache/目录是否存在或可写?'; 50 | $action = 'default'; 51 | }else{ 52 | GotoPage('admin.groups.php', 1); 53 | } 54 | } 55 | 56 | //########### DELETE GROUPS ########### 57 | 58 | if($action == 'deletegroups'){ 59 | $deleteusergroupids = $_POST['deleteusergroupids']; 60 | 61 | for($i = 0; $i < count($deleteusergroupids); $i++){ 62 | $DB->exe("DELETE FROM " . TABLE_PREFIX . "usergroup WHERE usergroupid <>1 AND usergroupid = '".ForceInt($deleteusergroupids[$i])."'"); 63 | } 64 | 65 | 66 | GotoPage('admin.groups.php', 1); 67 | } 68 | 69 | //########### CREATE GROUP ########### 70 | 71 | if($action == 'creatgroup'){ 72 | $groupname = ForceIncomingString('groupname'); 73 | $groupename = ForceIncomingString('groupename'); 74 | $description = ForceIncomingString('description'); 75 | $descriptionen = ForceIncomingString('descriptionen'); 76 | 77 | if ($groupname == '') $errors[] = "群组名称不能为空!"; 78 | if ($groupename == '') $errors[] = "群组英文名称不能为空!"; 79 | 80 | if(isset($errors)){ 81 | $errortitle = '添加群组错误'; 82 | $action = 'default'; 83 | }else{ 84 | $DB->exe("INSERT INTO " . TABLE_PREFIX . "usergroup (displayorder, groupname, groupename, activated, description, descriptionen) VALUES (1, '$groupname', '$groupename', 1, '$description', '$descriptionen')"); 85 | 86 | $usergroupid = $DB->insert_id(); 87 | $DB->exe("UPDATE " . TABLE_PREFIX . "usergroup SET displayorder = '$usergroupid' WHERE usergroupid = '$usergroupid'"); 88 | 89 | GotoPage('admin.groups.php', 1); 90 | } 91 | } 92 | 93 | //########### PRINT DEFAULT ########### 94 | 95 | if($action == 'default'){ 96 | $usergroup = array('groupname' => '', 'groupename' => '', 'description' => '', 'descriptionen' => ''); 97 | 98 | if(isset($errors)){ 99 | PrintErrors($errors, $errortitle); 100 | if(!IsPost('updategroups')){ 101 | $usergroup = array('groupname' => $groupname, 'groupename' => $groupename, 'description' => $_POST['description'], 'descriptionen' => $_POST['descriptionen']); 102 | } 103 | } 104 | 105 | echo '
106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 118 | 119 | 120 | 123 | 124 | 125 | 126 | 128 | 129 | 130 | 133 | 134 | 135 |
创建新客服群组:
客服群组的名称: 117 | * 必填项中文说明: 121 | 允许HTML, 如换行插入<br> 122 |
客服群组的英文名称: 127 | * 必填项英文说明: 131 | 允许HTML, 如换行插入<br> 132 |
'; 136 | PrintSubmit('添加群组'); 137 | 138 | $getgroups = $DB->query("SELECT ug.*, COUNT(u.userid) AS users FROM " . TABLE_PREFIX . "usergroup ug LEFT JOIN " . TABLE_PREFIX . "user u ON (u.usergroupid = ug.usergroupid) WHERE ug.usergroupid <>1 GROUP BY ug.usergroupid ORDER BY ug.displayorder"); 139 | 140 | echo '

141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | '; 155 | 156 | while($group = $DB->fetch($getgroups)){ 157 | echo ' 158 | 161 | 162 | 163 | 164 | 165 | 166 | 171 | 172 | 173 | '; 174 | } 175 | 176 | echo ' 177 |
显示顺序群组名称群组英文名称中文说明英文说明状态客服人数删除
159 | 160 | 167 | ' . $group['users']. ' 0, 'disabled').'>
178 |
179 |        180 | 181 |
182 |
'; 183 | 184 | } 185 | 186 | PrintFooter(); 187 | 188 | ?> 189 | 190 | -------------------------------------------------------------------------------- /admin.home.php: -------------------------------------------------------------------------------- 1 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
'; 37 | 38 | if(!$updates){ 39 | echo ''; 40 | }else{ 41 | echo ' 42 | '; 58 | } 59 | 60 | echo '


61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 |
客服基本使用说明:
1. 系统默认安装后, 客服人员的登录密码与管理员相同, 请自行修改(只有客服登录后方可提供在线服务).
2. 在客服操作面板, 按Esc键: 快速关闭当前访客小窗口.
3. 在客服操作面板, 按Ctrl + Enter键: 快速提交当前访客小窗口中输入的内容.
4. 在客服操作面板, 按Ctrl + 下箭头键: 快速最小化访客小窗口.
5. 在客服操作面板, 按Ctrl + 上箭头键: 快速展开访客小窗口.
6. 在客服操作面板, 按Ctrl + 左或右箭头键: 快速在展开的访客小窗口中切换.
7. 在客服操作面板, 点击"挂起"后, 当访客点击当前客服时, 系统将检测是否有同组的, 在线且未挂起的客服, 如果有则自动转接到其他客服(挂起功能相当于忙碌自动转接功能).
'; 91 | 92 | 93 | PrintFooter(); 94 | 95 | ?> 96 | 97 | -------------------------------------------------------------------------------- /admin.messages.php: -------------------------------------------------------------------------------- 1 | query("DELETE FROM " . TABLE_PREFIX . "msg WHERE msgid = '".ForceInt($deletecommentids[$i])."'"); 30 | } 31 | 32 | GotoPage('admin.messages.php'.Iif($page, '?p='.$page.Iif($uid, '&u='.$uid), Iif($uid, '?u='.$uid)), 1); 33 | } 34 | 35 | //########### FAST DELETE COMMENTS ########### 36 | 37 | if($action == 'fastdelete'){ 38 | $days = ForceIncomingInt('days'); 39 | $uid = ForceIncomingInt('u'); 40 | $realtime = time(); 41 | 42 | $searchsql = Iif($uid, " WHERE fromid ='$uid' ", ""); 43 | $searchsql .= Iif($searchsql, Iif($days, " AND created < " .$realtime - 3600*24*$days), Iif($days, " WHERE created < " .$realtime - 3600*24*$days)); 44 | 45 | $DB->query("DELETE FROM " . TABLE_PREFIX . "msg ". $searchsql); 46 | 47 | GotoPage('admin.messages.php'.Iif($uid, '?u='.$uid), 1); 48 | } 49 | 50 | //########### PRINT DEFAULT ########### 51 | 52 | if($action == 'default'){ 53 | $NumPerPage =20; 54 | $page = ForceIncomingInt('p', 1); 55 | $start = $NumPerPage * ($page-1); 56 | $fromid = ForceIncomingInt('u'); 57 | $toid = ForceIncomingInt('toid'); 58 | /*$searchsql = Iif($uid, "WHERE touserid ='$uid' ", ""); 59 | */ 60 | //die ("SELECT userid, userfrontname FROM " . TABLE_PREFIX . "user WHERE usergroupid <>1 ORDER BY userid"); 61 | $getusers = $DB->query("SELECT userid, userfrontname FROM " . TABLE_PREFIX . "user WHERE usergroupid <>1 ORDER BY userid"); 62 | while($user = $DB->fetch($getusers)) { 63 | $users[$user['userid']] = $user['userfrontname']; 64 | $useroptions .= ''; 65 | } 66 | $getguest = $DB->query("SELECT guestid,guestip FROM " . TABLE_PREFIX . "guest"); 67 | while($guest = $DB->fetch($getguest)) { 68 | $guests[$guest['guestid']] = $guest['guestip']; 69 | } 70 | if($fromid){$searchsql="where `fromid`='$fromid'";} 71 | if($toid){$searchsql="where `toid`='$toid'";} 72 | $getcomments = $DB->query("SELECT * FROM " . TABLE_PREFIX . "msg ".$searchsql." ORDER BY created DESC LIMIT $start,$NumPerPage"); 73 | 74 | $maxrows = $DB->getOne("SELECT COUNT(msgid) AS value FROM " . TABLE_PREFIX . "msg ".$searchsql); 75 | 76 | echo ' 77 | 78 | 79 | 84 | 90 | 91 |
   共有: '.$maxrows['value'].' 条记录 80 |
81 | 选择:      82 |
83 |
85 |
86 | 87 | 选择:        88 |
89 |
92 |
93 |
94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | '; 108 | 109 | if($maxrows['value'] < 1){ 110 | echo '
来自发给记录内容时间 删除
暂无任何记录!
'; 111 | }else{ 112 | while($comment = $DB->fetch($getcomments)){ 113 | if($comment['type']){$from=$users[$comment['fromid']];$to=$guests[$comment['toid']];}else{$from=$guests[$comment['fromid']];$to=$users[$comment['toid']];} 114 | echo ' 115 | ' .$from . ' 116 | ' . $to . ' 117 | '.nl2br($comment['msg']). ' 118 | ' . DisplayDate($comment['created'], 0, 1) . ' 119 | 120 | '; 121 | } 122 | 123 | $totalpages = ceil($maxrows['value'] / $NumPerPage); 124 | if($totalpages > 1){ 125 | echo ''.GetPageList('admin.comments.php', $totalpages, $page, 10, 'u', $uid).''; 126 | } 127 | 128 | echo ' 129 | 130 |
131 | 132 |
133 | '; 134 | } 135 | } 136 | 137 | PrintFooter(); 138 | 139 | ?> -------------------------------------------------------------------------------- /admin.mycomments.php: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 | ' . SITE_TITLE . ' 26 | 27 | 28 | 29 | 30 | 31 | 34 | 35 | 36 | 37 |
38 | 42 |
43 |
'; 44 | 45 | 46 | //########### DELETE COMMENTS ########### 47 | 48 | if($action == 'deletecomments'){ 49 | $deletecommentids = $_POST['deletecommentids']; 50 | $page = ForceIncomingInt('p'); 51 | 52 | for($i = 0; $i < count($deletecommentids); $i++){ 53 | $DB->exe("DELETE FROM " . TABLE_PREFIX . "comment WHERE touserid ='$uid' AND commentid = '".ForceInt($deletecommentids[$i])."'"); 54 | } 55 | 56 | GotoPage('admin.mycomments.php'.Iif($page, '?p='.$page), 1); 57 | } 58 | 59 | //########### FAST DELETE COMMENTS ########### 60 | 61 | if($action == 'fastdelete'){ 62 | $days = ForceIncomingInt('days'); 63 | $realtime = time(); 64 | 65 | $searchsql = Iif($days, " AND created < " .$realtime - 3600*24*$days); 66 | 67 | $DB->exe("DELETE FROM " . TABLE_PREFIX . "comment WHERE touserid ='$uid' ". $searchsql); 68 | 69 | GotoPage('admin.mycomments.php', 1); 70 | } 71 | 72 | //########### PRINT DEFAULT ########### 73 | 74 | if($action == 'default'){ 75 | $NumPerPage =20; 76 | $page = ForceIncomingInt('p', 1); 77 | $start = $NumPerPage * ($page-1); 78 | 79 | $getcomments = $DB->query("SELECT * FROM " . TABLE_PREFIX . "comment WHERE touserid ='$uid' ORDER BY commentid DESC LIMIT $start,$NumPerPage"); 80 | 81 | $maxrows = $DB->getOne("SELECT COUNT(commentid) AS value FROM " . TABLE_PREFIX . "comment WHERE touserid ='$uid'"); 82 | 83 | echo ' 84 | 85 | 86 | 92 | 93 |
   共有: '.$maxrows['value'].' 条留言 87 |
88 | 89 | 选择:      90 |
91 |
94 |
95 |
96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | '; 110 | 111 | if($maxrows['value'] < 1){ 112 | echo '
留言人IP地址留言内容留言给时间 删除
暂无任何留言!
'; 113 | }else{ 114 | while($comment = $DB->fetch($getcomments)){ 115 | echo ' 116 | ' . $comment['username'] . ' 117 | ' . Iif($comment['userip'], '' . $comment['userip'] . '
', ' ') . ' 118 | '.nl2br($comment['content']). ' 119 | '.$userinfo['userfrontname'].' 120 | ' . DisplayDate($comment['created'], 0, 1) . ' 121 | 122 | '; 123 | } 124 | 125 | $totalpages = ceil($maxrows['value'] / $NumPerPage); 126 | if($totalpages > 1){ 127 | echo ''.GetPageList('admin.mycomments.php', $totalpages, $page, 10).''; 128 | } 129 | 130 | echo ' 131 | 132 |
133 | 134 |
135 | '; 136 | } 137 | } 138 | 139 | PrintFooter(); 140 | 141 | ?> 142 | 143 | -------------------------------------------------------------------------------- /admin.settings.php: -------------------------------------------------------------------------------- 1 | $value){ 42 | if($_CFG[$key] != $settings[$key]){ 43 | switch ($key) { 44 | case 'cKillRobotCode': 45 | $value = ForceString($value, $_CFG[$key]); 46 | break; 47 | case 'cUpdate': 48 | $value = ForceInt($value, 6); 49 | if($value < 3 OR $value > 20) $value = 6; 50 | break; 51 | case 'cPanalHeight': 52 | $value = ForceInt($value, 20); 53 | break; 54 | default: 55 | $value = ForceString($value); 56 | break; 57 | } 58 | 59 | $code = ForceString($key); 60 | $contents = preg_replace("/[$]_CFG\['$code'\]\s*\=\s*[\"'].*?[\"'];/is", "\$_CFG['$code'] = \"$value\";", $contents); 61 | } 62 | } 63 | 64 | if($contents != $oldcontents){ 65 | $fp = @fopen($filename, 'wb'); 66 | @fwrite($fp, $contents); 67 | @fclose($fp); 68 | } 69 | 70 | GotoPage('admin.settings.php', 1); 71 | } 72 | } 73 | 74 | //########### PRINT DEFAULT ########### 75 | 76 | if($action == 'displaysettings'){ 77 | 78 | echo '
79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 102 | 103 | 104 | 105 | 106 | 109 | 110 | 111 | 112 | 113 | 122 | 123 | 124 | 125 | 126 | 158 | 159 | 160 | 161 | 162 | 165 | 166 | 167 | 168 | 169 | 183 | 184 | 185 | 186 | 187 | 202 | 203 | 204 | 205 | 206 | 209 | 210 | 211 | 212 | 213 | 216 | 217 | 218 | 219 | 220 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 |
系统设置:
前台默认语言
当选择 \'自动\' 时, 将根据访客的浏览器语言自动选择语言, 中文浏览器进入中文, 其它语言浏览器自动进入英文.
'; 90 | $Langs = GetLangs(); 91 | 92 | $Select = NewObject('Select'); 93 | $Select->Name = 'settings[cLang]'; 94 | $Select->SelectedValue = $_CFG['cLang']; 95 | $Select->AddOption('Auto', '自动'); 96 | foreach($Langs as $val){ 97 | $Select->AddOption($val, $val); 98 | } 99 | 100 | echo $Select->Get(); 101 | echo '
客服小面板高度
调用WeLive客服系统时显示客服小面板的高度(像素). 随客服数量的增减, 需要设置此项调整面板显示高度.
107 | 108 |
系统状态
关闭或开启'.APP_NAME.'在线客服系统.
'; 114 | $Radio = NewObject('Radio'); 115 | $Radio->Name = 'settings[cActived]'; 116 | $Radio->SelectedID = $_CFG['cActived']; 117 | $Radio->AddOption(1, '开启', '  '); 118 | $Radio->AddOption(0, '关闭', '  '); 119 | 120 | echo $Radio->Get(); 121 | echo '
网站默认时区
'.APP_NAME.'在线客服系统将按默认时区显示日期和时间.
'; 127 | $Select->Clear(); 128 | $Select->Name = 'settings[cTimezone]'; 129 | $Select->SelectedValue = $_CFG['cTimezone']; 130 | $Select->AddOption(-12, '(GMT -12) Eniwetok,Kwajalein'); 131 | $Select->AddOption(-11, '(GMT -11) Midway Island,Samoa'); 132 | $Select->AddOption(-10, '(GMT -10) Hawaii'); 133 | $Select->AddOption(-9, '(GMT -9) Alaska'); 134 | $Select->AddOption(-8, '(GMT -8) Pacific Time(US & Canada)'); 135 | $Select->AddOption(-7, '(GMT -7) Mountain Time(US & Canada)'); 136 | $Select->AddOption(-6, '(GMT -6) Mexico City'); 137 | $Select->AddOption(-5, '(GMT -5) Bogota,Lima'); 138 | $Select->AddOption(-4, '(GMT -4) Caracas,La Paz'); 139 | $Select->AddOption(-3, '(GMT -3) Brazil,Buenos Aires,Georgetown'); 140 | $Select->AddOption(-2, '(GMT -2) Mid-Atlantic'); 141 | $Select->AddOption(-1, '(GMT -1) Azores,CapeVerde Islands'); 142 | $Select->AddOption(0, '(GMT) London,Lisbon,Casablanca'); 143 | $Select->AddOption(1, '(GMT +1) Paris,Brussels,Copenhagen'); 144 | $Select->AddOption(2, '(GMT +2) Kaliningrad,South Africa'); 145 | $Select->AddOption(3, '(GMT +3) Moscow,Baghdad,Petersburg'); 146 | $Select->AddOption(4, '(GMT +4) Abu Dhabi,Muscat,Baku,Tbilisi'); 147 | $Select->AddOption(5, '(GMT +5) Karachi,Islamabad,Tashkent'); 148 | $Select->AddOption(6, '(GMT +6) Almaty,Dhaka,Colombo'); 149 | $Select->AddOption(7, '(GMT +7) Bangkok,Hanoi,Jakarta'); 150 | $Select->AddOption(8, '(GMT +8) 北京, 香港, 新加坡'); 151 | $Select->AddOption(9, '(GMT +9) Tokyo,Osaka,Yakutsk'); 152 | $Select->AddOption(10, '(GMT +10) Australia,Guam,Vladivostok'); 153 | $Select->AddOption(11, '(GMT +11) Magadan,Solomon Islands'); 154 | $Select->AddOption(12, '(GMT +12) Auckland,Wellington,Fiji'); 155 | 156 | echo $Select->Get(); 157 | echo '
交互时间间隔
客服端检测服务器最新数据的时间间隔(秒).
可设置为3-20之间的整数, 数值越小交互速度越快, 但会增加服务器负担.
163 | 164 |
访客自动离线时间
访客停止发言多少分钟后, 自动转为离线状态, 同时允许其重新连线. 此功能可以降低系统资源的消耗.
'; 170 | $Select->Clear(); 171 | $Select->Name = 'settings[cAutoOffline]'; 172 | $Select->SelectedValue = $_CFG['cAutoOffline']; 173 | $Select->AddOption('6', "6分钟后"); 174 | $Select->AddOption('10', "10分钟后"); 175 | $Select->AddOption('14', "14分钟后"); 176 | $Select->AddOption('18', "18分钟后"); 177 | $Select->AddOption('22', "22分钟后"); 178 | $Select->AddOption('26', "26分钟后"); 179 | $Select->AddOption('30', "30分钟后"); 180 | 181 | echo $Select->Get(); 182 | echo '
日期格式
系统显示日期的格式.
'; 188 | $Select->Clear(); 189 | $Select->Name = 'settings[cDateFormat]'; 190 | $Select->SelectedValue = $_CFG['cDateFormat']; 191 | $Select->AddOption('Y-m-d', "2010-08-12"); 192 | $Select->AddOption('Y-n-j', "2010-8-12"); 193 | $Select->AddOption('Y/m/d', "2010/08/12"); 194 | $Select->AddOption('Y/n/j', "2010/8/12"); 195 | $Select->AddOption('Y年n月j日', "2010年8月12日"); 196 | $Select->AddOption('m-d-Y', "08-12-2010"); 197 | $Select->AddOption('m/d/Y', "08/12/2010"); 198 | $Select->AddOption('M j, Y', "Aug 12, 2010"); 199 | 200 | echo $Select->Get(); 201 | echo '
防恶意提交信息码
此码有效防止机器人恶意留言, 提交信息等, 可时常更换, 但不能设置为空.
207 | 208 |
中文页面标题
当用户使用中文浏览器时, 显示在浏览器顶部的标题名称.
214 | 215 |
英文页面标题
当用户使用非中文浏览器时, 显示在浏览器顶部的标题名称.
221 | 222 |
中文欢迎词
客人进入客服系统后显示的中文欢迎词. 允许HTML, 如换行插入<br>
英文欢迎词
客人进入客服系统后显示的英文欢迎词. 允许HTML, 如换行插入<br>
自动删除记录
客服或管理员登录后是否自动删除对话记录. 自动删除记录有助于提高对话速度, 达到系统自我维护的目的.
'; 238 | $Select->Clear(); 239 | $Select->Name = 'settings[cDeleteHistory]'; 240 | $Select->SelectedValue = $_CFG['cDeleteHistory']; 241 | $Select->AddOption('0', "从不删除"); 242 | $Select->AddOption('6', "6小时前"); 243 | $Select->AddOption('12', "12小时前"); 244 | $Select->AddOption('24', "24小时前"); 245 | $Select->AddOption('48', "48小时前"); 246 | $Select->AddOption('240', "10天前"); 247 | $Select->AddOption('480', "20天前"); 248 | $Select->AddOption('720', "30天前"); 249 | 250 | echo $Select->Get(); 251 | echo '
禁止IP地址
被禁止IP的访客无法进入客服或留言. 多个IP请用英文分号";" 隔开, 可使用通配符禁止IP地址段.
如: 168.192.*.*
'; 261 | 262 | PrintSubmit('保存设置'); 263 | 264 | } 265 | 266 | PrintFooter(); 267 | 268 | ?> 269 | 270 | -------------------------------------------------------------------------------- /admin.upgrade.php: -------------------------------------------------------------------------------- 1 | 已检测到升级程序, 请按提示进行升级!'; 43 | }else if($upgradefinished){ 44 | $updatestatus = '系统升级已完成!'; 45 | }else{ 46 | $updatestatus = '暂无可用的升级程序!'; 47 | } 48 | 49 | 50 | PrintHeader($userinfo['username'], 'upgrade'); 51 | 52 | echo '
'.$updatestatus.' 53 |
  • 请严格按升级说明进行系统升级, 升级说明一般随附在升级包中.
  • 54 |
  • 升级过程一般是先将升级包解压后, 设置FTP工具以 二进制方式 上传到网站替换原文件, 然后在后台运行升级程序.
  • 55 |
  • 建议: 升级完成后删除upgrade目录内的所有文件.
  • 56 |
57 |
'; 58 | 59 | BR(3); 60 | 61 | echo ' 62 | 63 |
'; 64 | 65 | if($availableupgrades){ 66 | include(BASEPATH . 'upgrade/version.php'); 67 | $disableupgrade = 'Disabled'; 68 | 69 | $new = str_replace ('.', '', $WeLiveNewVersion); 70 | $old = str_replace ('.', '', APP_VERSION); 71 | 72 | If(intval ($new) <= intval ($old)){ 73 | $messages = '您现在正在使用的版本高于或等于升级程序中的版本, 无需升级!'; 74 | }else{ 75 | $messages = ''; 76 | $disableupgrade = 'Enabled'; 77 | } 78 | 79 | $availableupgrades++; 80 | 81 | 82 | if($upgradefinished){ 83 | echo ' 84 | 85 |

系统升级成功! 建议删除升级文件.


86 |

87 | '; 88 | }else{ 89 | echo '
90 | 91 | 当前使用中的版本是: ' . APP_VERSION . '
92 | 正要升级到的版本是: ' . $WeLiveNewVersion . '
93 |

94 | ' . Iif($messages, $messages.'


') . ' 95 |

96 |
'; 97 | } 98 | 99 | }else{ 100 | echo '

暂无可用的升级程序!


'; 101 | } 102 | 103 | echo '
'; 104 | 105 | PrintFooter(); 106 | 107 | ?> -------------------------------------------------------------------------------- /cache/online_cache.php: -------------------------------------------------------------------------------- 1 | 6 | array ( 7 | 'groupname' => '企业设立咨询', 8 | 'groupename' => 'No name', 9 | 'description' => '', 10 | 'descriptionen' => '', 11 | 'user' => 12 | array ( 13 | 2 => 14 | array ( 15 | 'username' => 'kefu01', 16 | 'type' => '1', 17 | 'isonline' => '1', 18 | 'isbusy' => '0', 19 | 'userfrontname' => '客服01', 20 | 'userfrontename' => 'Ms.kefu01', 21 | ), 22 | 3 => 23 | array ( 24 | 'username' => 'kefu02', 25 | 'type' => '1', 26 | 'isonline' => '0', 27 | 'isbusy' => '0', 28 | 'userfrontname' => '客服02', 29 | 'userfrontename' => 'Ms.kefu02', 30 | ), 31 | ), 32 | ), 33 | 3 => 34 | array ( 35 | 'groupname' => '企业变更咨询', 36 | 'groupename' => 'No name', 37 | 'description' => '', 38 | 'descriptionen' => '', 39 | 'user' => 40 | array ( 41 | 4 => 42 | array ( 43 | 'username' => 'kefu03', 44 | 'type' => '1', 45 | 'isonline' => '0', 46 | 'isbusy' => '0', 47 | 'userfrontname' => '客服03', 48 | 'userfrontename' => 'Mr.kefu03', 49 | ), 50 | 5 => 51 | array ( 52 | 'username' => 'kefu04', 53 | 'type' => '1', 54 | 'isonline' => '0', 55 | 'isbusy' => '0', 56 | 'userfrontname' => '客服04', 57 | 'userfrontename' => 'Mr.kefu04', 58 | ), 59 | ), 60 | ), 61 | ); 62 | 63 | ?> -------------------------------------------------------------------------------- /comment.php: -------------------------------------------------------------------------------- 1 | 1 42 | AND ug.activated = 1"; 43 | 44 | $user = $DB->getOne($sql); 45 | 46 | if(!$user['userid']){ 47 | $error = $lang['er_noaccess']; 48 | }else{ 49 | $DB->exe("INSERT INTO ".TABLE_PREFIX."comment VALUES(NULL,'$uid','$gname','$content','".GetIP()."','".time()."')"); 50 | $er_info = '






'.$lang['thanksfor'].'
'; 51 | header_utf8(); 52 | die($er_info); 53 | } 54 | } 55 | 56 | }else{ 57 | 58 | $vvckey = ForceIncomingString('vvckey'); 59 | $code = authcode(base64_decode($_GET['code']), 'DECODE', $vvckey); 60 | 61 | if(!$uid OR !$code OR !$vvckey){ 62 | $error = $lang['er_verify']; 63 | }elseif($code !== COOKIE_KEY . $uid){ 64 | $error = $lang['er_verify']; 65 | }elseif(IsBannedIP(GetIP())){ 66 | $error = $lang['er_bannedip']; 67 | }else{ 68 | $sql = "SELECT u.userid, u.userfrontname, u.userfrontename FROM " . TABLE_PREFIX . "user u 69 | LEFT JOIN " . TABLE_PREFIX . "usergroup ug ON ug.usergroupid = u.usergroupid 70 | WHERE u.userid = '$uid' 71 | AND u.activated = 1 72 | AND u.usergroupid <> 1 73 | AND ug.activated = 1"; 74 | 75 | $user = $DB->getOne($sql); 76 | 77 | if(!$user['userid'] OR $code !== COOKIE_KEY . $user['userid']){ 78 | $error = $lang['er_verify']; 79 | }elseif($user['isonline']){ 80 | //跳转到服务窗口 81 | } 82 | } 83 | //以上需要添加禁止IP的验证 84 | 85 | //根据语言选择客服的信息 86 | if(IS_CHINESE){ 87 | $username = $user['userfrontname']; 88 | }else{ 89 | $username = $user['userfrontename']; 90 | } 91 | } 92 | 93 | if(isset($error)){ 94 | header_utf8(); 95 | $er_info = '






//1
'; 96 | die(str_replace('//1', $error, $er_info)); 97 | } 98 | 99 | $welcome_info = preg_replace('/\/\/1/i', ''.$username.'', $lang['welcome2']); 100 | $vvckey = CreateVVC(); 101 | 102 | 103 | //以下输出页面 104 | echo ' 105 | 106 | 107 | 108 | '.SITE_TITLE.' 109 | 110 | 111 | 112 | 113 | 114 |
115 |
116 | 117 |
'.$welcome_info.'
118 |
119 | 120 |
121 |
122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 |
'.$lang['msg_to'].':  '.$username.' 
'.$lang['fullname'].':   *
'.$lang['content'].':
'.$lang['content_info'].'
*
 
'.$lang['vvc'].':   *
 
151 |
152 |
153 | 154 |
155 |
156 |
157 | 158 |
159 |
160 | 161 | 173 | 174 | '; 175 | 176 | ?> 177 | -------------------------------------------------------------------------------- /config/.htaccess: -------------------------------------------------------------------------------- 1 | Deny from all -------------------------------------------------------------------------------- /config/config.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /config/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /config/settings.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /demo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 客服系统 6 | 7 | 8 | 9 |


10 | 11 | 12 | 13 |
 
14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /enter.php: -------------------------------------------------------------------------------- 1 | 1 31 | AND ug.activated = 1"; 32 | 33 | $user = $DB->getOne($sql); 34 | 35 | if(!$user['userid'] OR $code !== COOKIE_KEY . $user['userid']){ 36 | $error = $lang['er_verify']; 37 | }elseif(!$user['isonline']){ 38 | $error = $lang['er_uoffline']; 39 | }else{ 40 | $transfer_uid = checkbusy($uid); //这里判断是否需要转接到其他客服 41 | if($transfer_uid){ 42 | $sql = "SELECT u.* FROM " . TABLE_PREFIX . "user u 43 | LEFT JOIN " . TABLE_PREFIX . "usergroup ug ON ug.usergroupid = u.usergroupid 44 | WHERE u.userid = '$transfer_uid' 45 | AND u.activated = 1 46 | AND u.usergroupid <> 1 47 | AND ug.activated = 1"; 48 | 49 | $user = $DB->getOne($sql); 50 | 51 | if(!$user['userid'] OR !$user['isonline']){ 52 | $error = $lang['er_uoffline']; 53 | }else{ 54 | $uid = $user['userid']; //更改UID 55 | } 56 | } 57 | } 58 | } 59 | 60 | if(isset($error)){ 61 | header_utf8(); 62 | $er_info = '






//1
'; 63 | die(str_replace('//1', $error, $er_info)); 64 | } 65 | 66 | //根据语言选择客服的信息 67 | if(IS_CHINESE){ 68 | $username = $user['userfrontname']; 69 | $userinfo = html($user['infocn']); 70 | $useradv = html($user['advcn']); 71 | $history_imgurl = TURL. 'images/history.gif'; 72 | $message_imgurl = TURL. 'images/message.gif'; 73 | }else{ 74 | $username = $user['userfrontename']; 75 | $userinfo = html($user['infoen']); 76 | $useradv = html($user['adven']); 77 | $history_imgurl = TURL. 'images/history_en.gif'; 78 | $message_imgurl = TURL. 'images/message_en.gif'; 79 | } 80 | 81 | //验证成功后写入或核实客人信息 82 | $realtime = time(); 83 | 84 | //访客自动离线时间 85 | $offline_time = ForceInt($_CFG['cAutoOffline']); 86 | $offline_time = Iif($offline_time, $offline_time, 10); 87 | 88 | if($gid){ 89 | $guest = $DB->getOne("SELECT guestid FROM " . TABLE_PREFIX . "guest WHERE guestid = '$gid'"); 90 | } 91 | 92 | if(!$gid OR !$guest['guestid']){ 93 | $userAgent = get_userAgent($_SERVER['HTTP_USER_AGENT']); 94 | 95 | $DB->exe("INSERT INTO " . TABLE_PREFIX . "guest (guestip, browser, lang, created, isonline, isbanned, serverid, fromurl) VALUES ('".GetIP()."', '$userAgent', '".IS_CHINESE."', '$realtime', 0, 0, '$uid', '$fromurl')"); 96 | 97 | $gid = $DB->insert_id(); 98 | setcookie('weliveGID'.COOKIE_KEY, $gid, ($realtime+60*60*24), "/"); 99 | }else{ 100 | $DB->exe("UPDATE " . TABLE_PREFIX . "guest SET fromurl = '$fromurl' WHERE guestid = '$gid'"); 101 | } 102 | 103 | setcookie('weliveG'.COOKIE_KEY, md5($gid.WEBSITE_KEY.$uid.$_CFG['cKillRobotCode']), 0, "/"); //用于AJAX验证 104 | $ajaxpending = 'uid=' . $uid . '&gid=' . $gid; //用于将客服ID和客人ID附加到AJAX URL 105 | $welcome_info = preg_replace('/\/\/1/i', ''.$gid.'', $lang['welcome']); 106 | 107 | $smilies = ''; //添加表情图标 108 | for($i = 0; $i < 24; $i++){ 109 | $smilies .= ''; 110 | } 111 | 112 | //添加颜色 113 | $colors = array('000000','6C6C6C','969696','FF0000','FF6600','FFCC00','916200','CD8447','2B8400','2FEA00','999900','0000CC','0066FF','35A2C1','701B76','C531D0'); 114 | $color_squares = ''; 115 | foreach($colors as $key => $value){ 116 | $color_squares .= '
'; 117 | } 118 | 119 | 120 | $js_var = "pagetitle=\"".SITE_TITLE."\",newmsg=\"$lang[newmsg]\",soundon=\"$lang[soundon]\",soundoff=\"$lang[soundoff]\",er_kickout=\"$lang[er_kickout]\",er_useroffline=\"$lang[er_useroffline]\",er_banned=\"$lang[er_banned]\",er_autooffline=\"$lang[er_autooffline]\",doonline=\"$lang[doonline]\",reonline=\"$lang[reonline]\",unbanned=\"$lang[unbanned]\",sender_sys=\"$lang[system]\",guestname=\"$lang[isay]\",username=\"$username\", t_url=\"".TURL."\""; 121 | 122 | //下以输出页面 123 | ?> 124 | 125 | 126 | 127 | 128 | <?php echo SITE_TITLE?> 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 |
137 |
138 | 139 |
140 |
00:00
141 |
142 | 143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 | 152 | 153 | 154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 | 163 |
164 | 165 |
166 |
167 |
168 |
169 |
170 | 171 |
172 |
      
173 |
174 | 175 |
176 |
177 | 178 | 193 | 194 | -------------------------------------------------------------------------------- /guest.php: -------------------------------------------------------------------------------- 1 | exe("UPDATE " . TABLE_PREFIX . "guest SET isonline = 0 WHERE guestid = '$gid'"); 33 | 34 | }elseif($act == 'online'){ 35 | $DB->exe("UPDATE " . TABLE_PREFIX . "guest SET isonline = 1, created = '$realtime', serverid = '$uid' WHERE guestid = '$gid'"); 36 | 37 | $welcome = Iif(IS_CHINESE, html($_CFG['cWelcome']), html($_CFG['cWelcome_en'])); 38 | 39 | $lines[] = WeLive(0, Iif($welcome, $welcome, $lang['guest_login']), 1); 40 | 41 | WeLiveSend($realtime + $minitime, $lines, $ajax_last, $DB->errno); 42 | } 43 | 44 | 45 | ?> 46 | 47 | -------------------------------------------------------------------------------- /images/welive_off_cn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/images/welive_off_cn.gif -------------------------------------------------------------------------------- /images/welive_off_en.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/images/welive_off_en.gif -------------------------------------------------------------------------------- /images/welive_on_cn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/images/welive_on_cn.gif -------------------------------------------------------------------------------- /images/welive_on_en.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/images/welive_on_en.gif -------------------------------------------------------------------------------- /includes/Class.Database.php: -------------------------------------------------------------------------------- 1 | printerror = $printerror; 33 | $this->conn = $pconnect ? @mysql_pconnect($dbhost, $dbuser, $dbpassword) : @mysql_connect($dbhost, $dbuser, $dbpassword, true); 34 | 35 | if (!$this->conn) { 36 | $this->error('Connect database failed! The dbuser, dbpassoword or dbhost not correct.'); 37 | } 38 | 39 | $dbVersion = @mysql_get_server_info($this->conn); 40 | if ($dbVersion >= "4.1") { 41 | @mysql_query("SET NAMES '".$this->dbcharset."'", $this->conn); //使用UTF8存取数据库, mysql 4.1以上支持 42 | } 43 | 44 | if($dbVersion > '5.0.1'){ 45 | @mysql_query("SET sql_mode=''", $this->conn); //设置sql_model 46 | } 47 | 48 | $this->select_db($dbname); 49 | } 50 | 51 | /* 52 | * 选择数据库, 用于选择不同的数据库或未选择数据库进行多库操作, 不需要任何返回值, 如果有错误, 在查询语句中将输出 53 | */ 54 | function select_db($dbname) { 55 | $this->dbname = $dbname; 56 | @mysql_select_db($dbname, $this->conn); 57 | } 58 | 59 | /* 60 | * 只能是"insert|delete|update|replace", select查询使用getAll或getOne或query 61 | * @return 返回受影响行数, 在"insert|replace"的情况下, 用 $this->insert_id 记录新插入的ID 62 | */ 63 | function exe($query) { 64 | $this->query_nums++; 65 | 66 | $this->query_id = @mysql_query($query, $this->conn); 67 | if (!$this->query_id){ 68 | $this->error("Invalid SQL: ".$query); //查询失败输出错误 69 | } 70 | 71 | if (preg_match("/^(insert|replace)\s+/i", $query)){ 72 | $this->insert_id = @mysql_insert_id($this->conn); //记录新插入的ID 73 | } 74 | 75 | $this->result_nums = @mysql_affected_rows($this->conn); //记录影响的行数 76 | return $this->result_nums; //返回影响的行数 77 | } 78 | 79 | /* 80 | * 只能是"select"查询, 用$this->result_nums记录查询结果数 81 | * @return query_id 82 | */ 83 | function query($query) { 84 | $this->query_nums++; 85 | 86 | $this->query_id = @mysql_query($query, $this->conn); 87 | if(!$this->query_id){ 88 | $this->error("Invalid SQL: ".$query); //查询失败输出错误 89 | } 90 | 91 | $this->result_nums = @mysql_num_rows($this->query_id); //记录查询结果数 92 | 93 | return $this->query_id; //返回查询资源 94 | } 95 | 96 | /* 97 | * 对查询资源ID进行fetch 98 | * @return query_id 99 | */ 100 | function fetch($queryId) { 101 | return @mysql_fetch_array($queryId, MYSQL_ASSOC); //返回二维数组 102 | } 103 | 104 | /* 105 | * 查询结果集 106 | * @return 默认返回对象数组, $out_array=1时返回二维数组 107 | */ 108 | function getAll($query){ 109 | $results = array(); //没有查询记录时返回空数组, 使数组遍历时不产生错误 110 | $query_id = $this->query($query); 111 | while ($row = $this->fetch($query_id)){ 112 | $results[] = $row; 113 | } 114 | 115 | return $results; 116 | } 117 | 118 | /* 119 | * 查询一条数据 120 | * @return 对象或一维数组 121 | */ 122 | function getOne($query){ 123 | return @mysql_fetch_assoc($this->query($query)); 124 | } 125 | 126 | /* 127 | * 获取最后一次select查询的字段数 128 | * @return number 129 | */ 130 | function getFields(){ 131 | return @mysql_num_fields($this->query_id); 132 | } 133 | 134 | /* 135 | * 获取最后一次insert查询插入的ID值 136 | * @return number 137 | */ 138 | function insert_id(){ 139 | return $this->insert_id; 140 | } 141 | 142 | /* 143 | * 关闭当前数据库连接, 一般无需使用. 连接会随php脚本结束自动关闭 144 | */ 145 | function close(){ 146 | return @mysql_close($this->conn); 147 | } 148 | 149 | /* 150 | * 释放查询结果及内存, PHP程序会在结束时自动释放, 一般不调用 151 | */ 152 | function free_result() { 153 | @mysql_free_result($this->query_id); 154 | $this->query_id = 0; 155 | } 156 | 157 | /* 158 | * @return 错误代码 159 | */ 160 | function geterrno() { 161 | return $this->errno; 162 | } 163 | 164 | /* 165 | * 输出错误 166 | */ 167 | function error($msg = ''){ 168 | $this->errno = @mysql_errno($this->conn); 169 | 170 | if($this->printerror){ 171 | $error_desc = @mysql_error($this->conn); 172 | 173 | $message = "Database Query Error Info:\r\n\r\n"; 174 | $message .= $msg."\r\n\r\n"; 175 | $message .= "Error: ". $error_desc ."\r\n"; 176 | $message .= "Error No: ".$errno."\r\n"; 177 | $message .= "File: ". $_SERVER['PHP_SELF'] . "\r\n"; 178 | 179 | echo '




Database Query Error Info
'; 180 | 181 | exit(); 182 | } 183 | } 184 | } 185 | 186 | ?> -------------------------------------------------------------------------------- /includes/Class.Radio.php: -------------------------------------------------------------------------------- 1 | aOptions[] = array('IdValue' => $IdValue, 'DisplayValue' => $DisplayValue, 'ItemAppend' => $ItemAppend); 22 | } 23 | 24 | function AddOptionArray($Array, $KeyPrefix) { 25 | while (list($key, $val) = each($Array)) { 26 | $this->AddOption($KeyPrefix.$key, $val); 27 | } 28 | } 29 | 30 | function Clear() { 31 | $this->Name = ''; 32 | $this->SelectedID = 0; 33 | $this->CssClass = ''; 34 | $this->Attributes = ''; 35 | $this->aOptions = array(); 36 | } 37 | 38 | function ClearOptions() { 39 | $this->aOptions = array(); 40 | } 41 | 42 | function Get() { 43 | $sReturn = ''; 44 | $OptionCount = count($this->aOptions); 45 | $i = 0; 46 | for ($i = 0; $i < $OptionCount ; $i++) { 47 | $sReturn .= 'Attributes.' id="Radio_'.$this->Name.$i.'" value="'.$this->aOptions[$i]['IdValue'].'"'; 48 | if ($this->aOptions[$i]['IdValue'] == $this->SelectedID) $sReturn .= ' checked="checked"'; 49 | if ($this->CssClass != '') $sReturn .= ' class="'.$this->CssClass.'"'; 50 | 51 | $sReturn .= ' />'.$this->aOptions[$i]['ItemAppend']; 52 | } 53 | return $sReturn; 54 | } 55 | 56 | function Radio() { 57 | $this->Clear(); 58 | } 59 | 60 | function Write() { 61 | echo($this->Get()); 62 | } 63 | } 64 | ?> -------------------------------------------------------------------------------- /includes/Class.Select.php: -------------------------------------------------------------------------------- 1 | aOptions[] = array('IdValue' => $IdValue, 'DisplayValue' => $DisplayValue, 'Attributes' => $Attributes); 22 | } 23 | 24 | function AddOptionArray($Array, $KeyPrefix) { 25 | while (list($key, $val) = each($Array)) { 26 | $this->AddOption($KeyPrefix.$key, $val); 27 | } 28 | } 29 | 30 | function Clear() { 31 | $this->Name = ''; 32 | $this->CssClass = 'LargeSelect'; 33 | $this->Attributes = ''; 34 | $this->aOptions = array(); 35 | } 36 | 37 | function ClearOptions() { 38 | $this->aOptions = array(); 39 | } 40 | 41 | function Count() { 42 | return count($this->aOptions); 43 | } 44 | 45 | function Get() { 46 | $sReturn = ' 68 | '; 69 | return $sReturn; 70 | } 71 | 72 | function RemoveOption($IdValue) { 73 | if ($IdValue == $this->SelectedValue) $this->SelectedValue = ''; 74 | $OptionCount = count($this->aOptions); 75 | $i = 0; 76 | for($i = 0; $i < $OptionCount; $i++) { 77 | if ($this->aOptions[$i]['IdValue'] == $IdValue) { 78 | array_splice($this->aOptions, $i, 1); 79 | break; 80 | } 81 | } 82 | } 83 | 84 | function Select() { 85 | $this->Clear(); 86 | } 87 | 88 | function Write() { 89 | echo($this->Get()); 90 | } 91 | } 92 | 93 | ?> -------------------------------------------------------------------------------- /includes/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /includes/javascript/Admin.js: -------------------------------------------------------------------------------- 1 | 2 | function $(id) { 3 | return typeof id == "string" ? document.getElementById(id) : id; 4 | } 5 | 6 | function isUndefined(variable) { 7 | return typeof variable == 'undefined' ? true : false; 8 | } 9 | 10 | function in_array(needle, haystack) { 11 | if(typeof needle == 'string' || typeof needle == 'number') { 12 | for(var i in haystack) { 13 | if(haystack[i] == needle) { 14 | return true; 15 | } 16 | } 17 | } 18 | return false; 19 | } 20 | 21 | function GetObjByE(e) { 22 | if (isUndefined(e)) e = window.event; 23 | var Obj = document.all ? e.srcElement : e.target; 24 | 25 | return Obj; 26 | } 27 | 28 | function select_deselectAll (formname, elm, group) { 29 | var frm = document.forms[formname]; 30 | 31 | for (i=0; i35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('c $(j){l 1U j=="46"?J.4w(j):j}c 2o(47){l 1U 47==\'4F\'?R:E}c 21(2C,3l){7(1U 2C==\'46\'||1U 2C==\'4y\'){11(9 i 1p 3l){7(3l[i]==2C){l R}}}l E}c 4D(e){7(2o(e))e=2U.3C;9 4c=J.4r?e.4q:e.2W;l 4c}c 4k(){44(38);1D=1;38=4v(c(){7(1D==1){J.1g=\'【新消息】\'+3j;1D=2}p{J.1g=\'【   】\'+3j;1D=1}},2c)}c 4u(){7(1D!=0){1D=0;44(38);J.1g=3j}}c 2A(){9 2d=2R 4G();c 2x(B,39){9 i;B=""+B;7(B.L<39){11(i=0;i<(39-B.L);i++)B="0"+B}l B}l 2x(2d.4V(),2)+\':\'+2x(2d.4T(),2)+\':\'+2x(2d.53(),2)}c 52(8,34,2O,1S){1S=!1S?8:1S;7(8.3U){8.3U(34,2O,E)}p 7(1S.3Y){8.3Y(\'1Q\'+34,2O)}}c 3Z(){7(1B>=59){1B=0;1z+=1}p{1B+=1}7(1z>=60){1z=0;1T+=1}4h();W(\'3Z()\',41)}c 4h(){9 2p,2n,1R;7(1B<10){2p="0"+1B}p{2p=1B}7(1z<10){2n="0"+1z}p{2n=1z}7(1T<10){7(1T>0){1R="0"+1T+":"}p{1R=""}}p{1R=1T+":"}$("4H").z=1R+2n+":"+2p}c 4L(8,4j){9 2y=8.u;8.u=\'3R\'+4j+\'4J\';8.17=c(){3A.u=2y}}c 4S(8){7(1F==1){8.1g=4Z}p{8.1g=51}}c 2a(j){9 8=$("P"+j);7(8)8.1h()}c 4B(j,S){I(1r);2a(j);9 1j=$("3e"+j);7(!1j)l;9 1e=$("3x"+j);9 1d=$("3y"+j);1j.u=\'4t\';1r=W(c(){1e.h.v=\'C\';1d.h.v=\'Z\';1d.37=c(){I(1r)};1d.17=c(){I(1r);1r=W(c(){1d.h.v=\'C\';7(1L=="0"){1j.u=\'4i\'}p{1j.u=\'2i\'}},2c)}},(S||S==0)?S:3g);1j.17=c(){I(1r);1r=W(c(){1d.h.v=\'C\';7(1L=="0"){1j.u=\'4i\'}p{1j.u=\'2i\'}},3h)}}c 4K(j,19){9 3k=$("P"+j);7(!3k)l;1L=19;3k.1h();11(9 k 1p t){9 8=$(\'3e\'+t[k]);9 q=$("P"+t[k]);7(!8||!q)1k;8.u=\'2i\';q.h.1c="#"+19}}c 4s(j,S){I(1o);2a(j);9 1u=$("4p"+j);7(!1u)l;9 1e=$("3x"+j);9 1d=$("3y"+j);1u.u=\'4E\';1o=W(c(){1d.h.v=\'C\';1e.h.v=\'Z\';1e.37=c(){I(1o)};1e.17=c(){I(1o);1o=W(c(){1e.h.v=\'C\';1u.u=\'3q\'},2c)}},(S||S==0)?S:3g);1u.17=c(){I(1o);1o=W(c(){1e.h.v=\'C\';1u.u=\'3q\'},3h)}}c 4U(j,19){9 8=$("P"+j);7(!8)l;9 12=J.12;8.1h();19+=\' \';7(!2o(8.1v)){9 3B=8.1v+0;8.B=8.B.1i(0,8.1v)+19+8.B.1i(8.3E)}p 7(12&&12.2F){9 1w=12.2F();1w.3f=19;1w.3O(\'3u\',-19.L)}p{8.B+=19}}c 4Y(j,S){I(1f);2a(j);9 1b=$("3M"+j);7(!1b)l;36=j;9 Y=$("3J");9 e=2U.3C||3P.4R.4I.3P[0];9 3s=e.4P;9 3K=e.4W;1b.u=\'4N\';1f=W(c(){Y.h.4O=3K-4Q+\'3Q\';Y.h.4M=3s-4X+\'3Q\';Y.h.3I=3I+54;Y.h.v=\'Z\';Y.37=c(){I(1f)};Y.17=c(){I(1f);1f=W(c(){Y.h.v=\'C\';1b.u=\'3c\'},2c)}},(S||S==0)?S:3g);1b.17=c(){I(1f);1f=W(c(){Y.h.v=\'C\';1b.u=\'3c\'},3h)}}c 4x(8){9 2y=8.u;8.u=\'4C\';8.17=c(){3A.u=2y}}c 4z(3L){9 8=$("P"+36);7(!8)l;9 D=3L.z;7(D==\'\')l;9 12=J.12;8.1h();7(!2o(8.1v)){9 3B=8.1v+0;8.B=8.B.1i(0,8.1v)+D+8.B.1i(8.3E)}p 7(12&&12.2F){9 1w=12.2F();1w.3f=D;1w.3O(\'3u\',-D.L)}p{8.B+=D}I(1f);9 Y=$("3J");Y.h.v=\'C\';9 1b=$("3M"+36);7(1b)1b.u=\'3c\'}c 4f(j){9 8;9 q=$("P"+j);7(1F==0){8=$(\'3a\'+j);7(8)8.u=\'5S\'}7(1L!=\'0\'){8=$(\'3e\'+j);7(8)8.u=\'2i\';7(q)q.h.1c="#"+1L}7(1V==\'1\'){8=$(\'2N\'+j);7(8)8.u=\'5Q\';7(q)q.h.3r=\'25\'}7(20==\'1\'){8=$(\'2I\'+j);7(8)8.u=\'5P\';7(q)q.h.3N=\'2u\'}7(22==\'1\'){8=$(\'2P\'+j);7(8)8.u=\'5R\';7(q)q.h.3D=\'2j\'}}c 5U(j,1A){9 8=$(\'3R\'+1A+\'5T\'+j);9 q=$("P"+j);7(!8||!q)l;7(1A==\'4l\'){7(1F==1){1F=0;3n(\'2f\')}p{1F=1;3n(\'1Q\')}}p 7(1A==\'25\'){7(1V==\'1\'){1V=\'0\';2M(\'2f\',\'3G\')}p{1V=\'1\';2M(\'1Q\',\'25\')}}p 7(1A==\'2u\'){7(20==\'1\'){20=\'0\';2Q(\'2f\',\'3G\')}p{20=\'1\';2Q(\'1Q\',\'2u\')}}p 7(1A==\'2j\'){7(22==\'1\'){22=\'0\';2H(\'2f\',\'C\')}p{22=\'1\';2H(\'1Q\',\'2j\')}}8.17=3w;q.1h()}c 5J(j){9 q=$("P"+j);7(!q)l;q.B=\'\';q.1h()}c 3n(h){11(9 k 1p t){9 8=$(\'3a\'+t[k]);7(!8)1k;8.u=\'3a\'+h}}c 2M(1H,1I){11(9 k 1p t){9 8=$(\'2N\'+t[k]);9 q=$("P"+t[k]);7(!8||!q)1k;8.u=\'2N\'+1H;q.h.3r=1I}}c 2Q(1H,1I){11(9 k 1p t){9 8=$(\'2I\'+t[k]);9 q=$("P"+t[k]);7(!8||!q)1k;8.u=\'2I\'+1H;q.h.3N=1I}}c 2H(1H,1I){11(9 k 1p t){9 8=$(\'2P\'+t[k]);9 q=$("P"+t[k]);7(!8||!q)1k;8.u=\'2P\'+1H;q.h.3D=1I}}c 2l(1C){7(2k==1C)l;2k=1C;7(1C==0){2v.h.v="C";2t.h.v="Z";2s.h.v="C"}p 7(1C==1){2v.h.v="Z";2t.h.v="C";2s.h.v="C"}p{2v.h.v="C";2t.h.v="C";2s.h.v="Z"}}c V(A,2w,3S,1K,31,1O){7(!1O)1O="5M";7(!1K)1K="1K";7(!2w)2w=3V;A+=(A.55("?")+1)?"&":"?";A+="2K="+2K+"&"+5V;5W.67({"A":A,"68":2w,"69":c(1C){2l(0)},"31":31,"1O":1O,"65":3S,"1K":1K});l E}c 64(){V("1l.13?16=5X",1n)}c 5Z(){V("1l.13?16=1x");2z()}c 1P(){V("1l.13?16=1P",1n);9 8=$(\'1P\');7(8)8.z=\'解除挂起 !!!\'}c 2X(){V("1l.13?16=2X",1n);9 8=$(\'1P\');7(8)8.z=\'挂起 \'}c 1Y(f){V("1l.13?16=1Y&f="+f,1n);9 8=$(\'1W\'+f);7(8)8.z=\'\'+45+\'&Q;&Q;|&Q;&Q;踢出\';7(21(f,t)){t[\'g\'+f][\'1Y\']=1;2E(f+\'|||0|||\'+1t+f+5E+\'|||0|||1M|||0^^^\')}}c 2e(f){V("1l.13?16=2e&f="+f,1n);9 8=$(\'1W\'+f);7(8)8.z=\'\'+1W+\'&Q;&Q;|&Q;&Q;踢出\';7(21(f,t)){2E(f+\'|||0|||\'+1t+f+5F+\'|||1|||1M|||0^^^\')}}c 1X(f){V("1l.13?16=1X&f="+f,1n);9 H=$(\'g\'+f);7(H)2D.4n(H);1s=$("4a"+f);t[\'g\'+f]=3w;11(9 k 1p t){7(t[k]==f){t.5h(k,1);5j}}7(1s){9 2V=48(1s.5k("5m"));J.5l.4n(1s);7(2V>0){5f(2V)}}}c 3m(f,2T){9 8=$(\'3i\'+f);7(8){7(8.z!=\'\'){7(8.h.v==\'Z\'){8.h.v=\'C\'}p{8.h.v=\'Z\'}}p{V("1l.13?16=3m&2T="+2T,c(G){4o(f,G)})}}}c 4o(f,G){9 8=$(\'3i\'+f);7(8){8.h.v=\'Z\';8.z=G}}c 1n(){l}c 3T(j){7(2k==0||2k==2)l;9 j=j?j:49();7(1U t[\'g\'+j]==\'5e\'){7(t[\'g\'+j][\'1x\']==0)l}9 q=$("P"+j);7(!q)l;7(1Z==0){9 1N=q.B.O(/(^\\s+)|\\s+$/g,"").O(/\\^\\^\\^|\\|\\|\\|/g,"");7(1N.L>0){1N=1N.O(/\\?/g,\'%3F\').O(/&/g,\'%26\').O(/\\+/g,\'%2B\').O(/\\r\\n|\\n|\\r/g,"<3X>");9 A="43.13?16=3T&5b="+1N+"&5c="+1V+20+22+"&5o="+1L+"&f="+j;V(A)}q.B=""}q.1h()}c 2z(){1Z=0;I(3p);3p=W(\'2G()\',5y*41)}c 2G(){7(1Z==0){1Z=1;V("43.13");2z()}}c 5D(){2D=$(\'2G\');4m=$(\'5C\');2Z=$(\'5x\');2v=$(\'5w\');2t=$(\'5r\');2s=$(\'5q\')}c 3V(G){2l(1);9 14,2Y=0,N=\'\',T,f,3o,H,y,1s;9 M=G;M=M.28(\'||||||\');2K=M[0];14=M[1];7(14==2){2l(2);l}p 7(!14||14.L<18){l}1Z=1;I(3p);7(M[2]){N=M[2]}14=14.28(\'^^^\');11(9 i=0;i<14.L;i++){T=14[i].28(\'|||\');7(!T[1])1k;3o=T[4];f=T[0];7(3o==1){2Y+=1;H=$(\'g\'+f);7(!H){H=J.1m("5t");H.35("j","g"+f);y=J.1m("1G");y.z=\'\'+1t+f+\' (0)\';y.u=\'5v\';H.1y(y);y=J.1m("1G");y.35("j","2L"+f);y.z=2A();H.1y(y);y=J.1m("1G");y.z=\'\'+T[1]+\'<3X>\';H.1y(y);y=J.1m("1G");y.z=T[2]+\' (\'+(T[3]==1?\'中文\':\'5s\')+\')\';H.1y(y);y=J.1m("1G");y.z=3b(T[6],50);H.1y(y);y=J.1m("1G");y.35("j","1W"+f);7(T[5]==1){y.z=\'\'+45+\'\'}p{y.z=\'\'+1W+\'\'}y.z=y.z+\'&Q;&Q;|&Q;&Q;踢出\';H.1y(y);2D.58(H,2D.5g[0]);4e(f,1t+f);N=f+\'|||0|||\'+5K+\'|||1|||1M|||0^^^\'+(N.L>18?N.O(/\\r\\n|\\n|\\r/g,\'\'):\'\');4f(f)}p 7(21(f,t)&&t[\'g\'+f][\'1x\']==0){t[\'g\'+f][\'1x\']=1;9 1J=$("2L"+f);7(1J)1J.z=2A();N=f+\'|||0|||\'+1t+f+63+\'|||1|||1M|||0^^^\'+(N.L>18?N.O(/\\r\\n|\\n|\\r/g,\'\'):\'\')}}p{7(!21(f,t)||t[\'g\'+f][\'1x\']==0)1k;t[\'g\'+f][\'1x\']=0;9 1J=$("2L"+f);7(1J)1J.z=\'已离线\';1s=$("4a"+f);7(1s){N=(N.L>18?N.O(/\\r\\n|\\n|\\r/g,\'\'):\'\')+f+\'|||0|||\'+1t+f+61+\'|||0|||1M|||0^^^\'}}}7(2Y==0){2Z.h.v=\'Z\'}p{2Z.h.v=\'C\'}7(N.L>18){2E(N)}2z()}c 2E(G){9 1q,1E,M,1a,f,23,5L,D,24,2g,2b,27,1c,h;9 32=G.28(\'^^^\');9 2S=49();9 2h=R;11(9 i=0;i<32.L;i++){1a=32[i].28(\'|||\');7(1a[2]){f=1a[0];1E=$("2R"+f);7(f!=2S&&1E){1E.z=48(1E.z)+1;1E.h.5O=\'1c:29;2J-4b:25;\'}1q=$("5Y"+f);7(!1q)1k;23=""+2A()+"";24=1a[1];2g=3z(1a[2]);2b=1a[3];27=1a[4];1c=1a[5];h=\'\';7(1c!=0)h="1c:#"+1c+";";7(27.3d(/1\\d\\d/i))h+="2J-4b:25;";7(27.3d(/\\4d\\d/i))h+="2J-h:2u;";7(27.3d(/\\d\\4d/i))h+="3f-56:2j;";7(2b==2){D=""+2g+""}p{D=2g}7(24==0){7(2b==0){M=\'\'+D+\'\'}p{M=\'\'+D+\'\'}}p 7(24==1){M=\'\'+D+\'\'+23+\'\';2h=E}p 7(24==2){M=\'\'+D+\'\'+23+\'\'}1q.z=1q.z+M+\'\';1q.5d=1q.5a}}7(1F==1&&2h){4m.z=4l}7(2h)4k();2U.1h();2a(2S)}c 3z(G){G=G.O(/((K=\\"|\\\')?(((6a?|6b):\\/\\/)|3v\\.)([\\w\\-]+\\.)+[\\w\\.\\/=\\?%\\-&~\\\':+!#]*)/3H,c($1){l 3b($1)});G=G.O(/([\\-\\.\\w]+@[\\.\\-\\w]+(\\.\\w+)+)/3H,\'$1\');G=G.O(/\\[:(\\d*):\\]/g,\'<5N 5I="\'+5H+\'66/$1.57">\');l G}c 3b(A,2r){7(A.1i(0,5).3t()==\'K=\')l A;7(!2r)2r=60;9 33=\'\';7(A.L>2r){A=A.1i(0,30)+\' ... \'+A.1i(A.L-18)}33+=A+\'\';l 33}',62,384,'|||||||if|obj|var|||function|||gid||style||id||return|div|||else|eMessage|||guest|className|display||class|cell|innerHTML|url|value|none|msg|false|span|data|row|clearTimeout|document|href|length|newdata|allmsgs|replace|message_|nbsp|true|delay|aguest|javascript|ajax|setTimeout|onclick|eMsgs|block||for|selection|php|allguests|hidefocus|act|onmouseout||code|aline|eTools_msg|color|eColors|eSmilies|ttttt|title|focus|substr|eTools_color|continue|support|createElement|donothing|ttt|in|eHistory|tt|gwin|guestname|eTools_smile|selectionStart|sel|online|appendChild|minutes|tool|seconds|status|flashtitle_step|eNews|allow_sound|td|tstyle|mstyle|eLogin|loading|ajaxC|000|ajaxLine|method|setbusy|on|hours_display|eventobj|hours|typeof|ajaxB|ban|kickout|banned|lock|ajaxI|in_array|ajaxU|time|stype|bold||biu|split|red|setFocus|ctype|200|date|unbanned|off|content|do_flashTitle|tools_color_on|underline|sys_status|setStatus|msg_i|mins_display|isUndefined|sec_display|msg_b|limit|eStatus_err2|eStatus_err|italic|eStatus_ok|callback|addZeros|oldClassName|waiting|getLocalTime||needle|eWelive|output_win|createRange|welive|setUnderlineStyle|tools_italic_|font|ajax_last|login|setBoldStyle|tools_bold_|func|tools_underline_|setItalicStyle|new|lastid|ip|window|currentNo|target|unsetbusy|onlines|eNoguest||format|lines|urllink|evt|setAttribute|msgId|onmouseover|tttt|len|tools_sound_|getURL|tools_msg_off|match|tools_color_|text|300|280|ip_|pagetitle|me|haystack|iplocation|setSoundStyle|isonline|response_tout|tools_smile_off|fontWeight|xx|toLowerCase|character|www|null|smilies_|colors_|format_output|this|opn|event|textDecoration|selectionEnd||normal|ig|zIndex|msgs_div|yy|msgobj|tools_msg_|fontStyle|moveStart|arguments|px|tools_|updating|sending|addEventListener|welive_output|ico|br|attachEvent|timer_start|_blank|1000|pip|swaiting|clearInterval|unban|string|variable|parseInt|get_lastopen|win|weight|Obj|d1|openwin|InitMyWin|msg_t|displaytime|tools_color_off|newClassName|flashTitle|sound|eSounder|removeChild|showlocation|tools_smile_|srcElement|all|showSmilies|tools_color_hover|stopFlashTitle|setInterval|getElementById|chClass|number|insertMsgs|http|showColors|msgs_line_hover|GetObjByE|tools_smile_hover|undefined|Date|timer|caller|_hover|insertColors|chClassname|left|tools_msg_hover|top|clientX|340|callee|chSoundTitle|getMinutes|insertSmilies|getHours|clientY|290|showMsgs|soundoff||soundon|_attachEvent|getSeconds|100|indexOf|decoration|gif|insertBefore||scrollHeight|ajaxline|ajaxbiu|scrollTop|object|sort_min|childNodes|splice|green|break|getAttribute|body|Minno|clear|ajaxcolor|o_bg|status_err2|status_err|English|tr|IP|first|status_ok|noguest|refresh_time|g_bg|e_bg|i_bg|sounder|initObj|baninfo|unbaninfo|mailto|t_url|src|ResetInput|newguest|sender|POST|img|cssText|tools_italic_on|tools_bold_on|tools_underline_on|tools_sound_off|_|toggleTools|ajaxpending|jx|offline|history_|setOnline||er_goffline|FF3300|reonline|setOffline|update|smilies|bind|onSuccess|onError|https|ftp'.split('|'),0,{})) 2 | -------------------------------------------------------------------------------- /includes/javascript/WeLive.js: -------------------------------------------------------------------------------- 1 | eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('7 $(1Q){q 2O 1Q=="3l"?11.3q(1Q):1Q}7 1X(2H){q 2O 2H==\'3v\'?3d:12}7 2U(){2T(2b);1f=1;2b=3o(7(){6(1f==1){11.1c=\'【\'+3s+\'】\'+2c;1f=2}f{11.1c=\'【   】\'+2c;1f=1}},1Y)}7 23(){6(1f!=0){1f=0;2T(2b);11.1c=2c}}7 39(){u 1J=3W 3V();7 1M(B,2f){u i;B=""+B;6(B.M<2f){3c(i=0;i<(2f-B.M);i++)B="0"+B}q B}q 1M(1J.3M(),2)+\':\'+1M(1J.3L(),2)+\':\'+1M(1J.3D(),2)}7 2q(b,28,2h,1x){1x=!1x?b:1x;6(b.2x){b.2x(28,2h,12)}f 6(1x.33){b.33(\'3Y\'+28,2h)}}7 37(){6(X>=3n){X=0;14+=1}f{X+=1}6(14>=2G){14=0;1w+=1}32();J(\'37()\',38)}7 32(){u 1D,1C,1j;6(X<10){1D="0"+X}f{1D=X}6(14<10){1C="0"+14}f{1C=14}6(1w<10){6(1w>0){1j="0"+1w+":"}f{1j=""}}f{1j=1w+":"}$("3r").15=1j+1C+":"+1D}7 3u(b,2X){u 35=b.m;b.m=\'2o\'+2X+\'3w\';b.1d=7(){3p.m=35}}7 3m(b){6(1q==1){b.1c=3Q}f{b.1c=3x}}7 3S(){1i=$(\'3X\');3U=$(\'3B\');3y=$(\'U\');C=$(\'3z\');3g=$(\'3E\');T=$(\'3P\');S=$(\'3H\');Q=$(\'2n\');1k=$(\'3G\');1K=$(\'3I\');1N=$(\'3J\');1L=$(\'3K\');1I=$("c*o*p*y*r*i*g*h*t".A(/\\*/E,""));u 2s=2w("/"+"W*e*L*i*v*e*".A(/\\*/E,"")+"/E");u 2m=2w("/"+"w*e*e*n*t*e*c*h".A(/\\*/E,"")+"/E");6(!1I||!1I.15.P(2s)||!1I.15.P(2m))2l=2u}7 O(){C.2e()}7 3A(1b){u b=$(\'2o\'+1b);6(1b==\'2S\'){6(1q==1){1q=0;b.m="3C"}f{1q=1;b.m="3T"}}f 6(1b==\'2g\'){6(1U==\'1\'){1U=\'0\';b.m="3O";C.9.2y="2N"}f{1U=\'1\';b.m="3N";C.9.2y="2g"}}f 6(1b==\'2a\'){6(1S==\'1\'){1S=\'0\';b.m="3R";C.9.2R="2N"}f{1S=\'1\';b.m="3k";C.9.2R="2a"}}f 6(1b==\'29\'){6(1T==\'1\'){1T=\'0\';b.m="3t";C.9.2P="D"}f{1T=\'1\';b.m="3i";C.9.2P="29"}}b.1d=2u;O()}7 3j(){C.B=\'\';C.2e()}7 4c(K){F(R);O();S.m=\'4P\';R=J(7(){Q.9.x=\'D\';T.9.x=\'1m\';T.2J=7(){F(R)};T.1d=7(){F(R);R=J(7(){T.9.x=\'D\';6(1G=="0"){S.m=\'2A\'}f{S.m=\'2r\'}},1Y)}},(K||K==0)?K:2I);S.1d=7(){F(R);R=J(7(){T.9.x=\'D\';6(1G=="0"){S.m=\'2A\'}f{S.m=\'2r\'}},2K)}}7 4N(I){C.9.U="#"+I;1G=I;O()}7 4S(K){F(V);O();1k.m=\'4O\';V=J(7(){T.9.x=\'D\';Q.9.x=\'1m\';Q.2J=7(){F(V)};Q.1d=7(){F(V);V=J(7(){Q.9.x=\'D\';1k.m=\'2F\'},1Y)}},(K||K==0)?K:2I);1k.1d=7(){F(V);V=J(7(){Q.9.x=\'D\';1k.m=\'2F\'},2K)}}7 4M(I){u b=C;u 1g=11.1g;O();I+=\' \';6(!1X(b.1V)){u 4C=b.1V+0;b.B=b.B.19(0,b.1V)+I+b.B.19(b.4x)}f 6(1g&&1g.2M){u 1W=1g.2M();1W.31=I;1W.4K(\'4H\',-I.M)}f{b.B+=I}}7 4G(1e){23();6(1X(1e))1e=2z.1e;6(1e.4B==13){21()}q 12}7 1y(Y){6(1H==Y)q;1H=Y;6(Y==0){1K.9.x="D";1N.9.x="1m";1L.9.x="D"}f 6(Y==1){1K.9.x="1m";1N.9.x="D";1L.9.x="D"}f{1K.9.x="D";1N.9.x="D";1L.9.x="1m"}}7 1u(k,1F,2t,16,1Z,1v){6(!1v)1v="4I";6(!16)16="16";6(!1F)1F=24;k+=(k.4J("?")+1)?"&":"?";k+="1B="+1B+"&"+4D;2l.4y({"k":k,"4z":1F,"4A":7(Y){1y(0)},"1Z":1Z,"1v":1v,"4L":2t,"16":16});q 12}7 3b(){q}7 22(){F(2v);2v=J(7(){3f();H=1;24(1B+\'||||||0|||\'+4Q+\' \'+4v+\'|||0|||1a|||0\')},4a*3Z)}7 3f(){6(H==1)q;1u("3e.1P?20=25",3b)}7 3a(){H=0;1u("3e.1P?20=49");17();22()}7 17(){6(H==1)q;1o=0;F(2d);2d=J(\'2Z()\',4b*38)}7 2Z(){6(H==1)q;6(1o==0){1o=1;1u("17.1P");17()}}7 21(){6(1H==0||1H==2||1r==0||1t==1||H==1)q;6(1o==0){u 1l=C.B.A(/(^\\s+)|\\s+$/g,"").A(/\\^\\^\\^|\\|\\|\\|/g,"");6(1l.M>0){1l=1l.A(/\\?/g,\'%3F\').A(/&/g,\'%26\').A(/\\+/g,\'%2B\').A(/\\r\\n|\\n|\\r/g,"<4w>");u k="17.1P?20=21&4e="+1l+"&4d="+1U+1S+1T+"&48="+1G;1u(k);22()}C.B=""}O()}7 24(G){1y(1);u j=G;j=j.2i(\'||||||\');1B=j[0];j=j[1];6(j==2){1y(2);q}6(j.P(/H\\^\\^\\^/i)){H=1;j=j.A(/H\\^\\^\\^/E,\'0|||\'+47+\'|||0|||1a|||0^^^\')}6(j.P(/25\\^\\^\\^/i)){6(1r==1){1r=0;j=j.A(/25\\^\\^\\^/E,\'0|||\'+3h+42+\'|||0|||1a|||0^^^\')}f{q}}f 6(1r==0){1r=1;j=\'0|||\'+3h+41+\'|||1|||1a|||0^^^\'+j}6(j.P(/27\\^\\^\\^/i)){6(1t==0){1t=1;j=j.A(/27\\^\\^\\^/E,\'0|||\'+40+\'|||0|||1a|||0^^^\')}f{j=j.A(/27\\^\\^\\^/E,\'\')}}f 6(1t==1){1t=0;j=\'0|||\'+43+\'|||1|||1a|||0^^^\'+j}6(j.M>18){1o=1;F(2d);u N,1p,44,z,1n,1z,1A,1s,U,9;u 2j=j.2i(\'^^^\');j="";u 1E=3d;3c(u i=0;i<2j.M;i++){N=2j[i].2i(\'|||\');6(N[1]){1p=""+39()+"";1n=N[0];1z=2p(N[1]);1A=N[2];1s=N[3];U=N[4];9=\'\';6(U!=0)9="U:#"+U+";";6(1s.P(/1\\d\\d/i))9+="2V-46:2g;";6(1s.P(/\\2W\\d/i))9+="2V-9:2a;";6(1s.P(/\\d\\2W/i))9+="31-45:29;";6(1A==2){z=""+1z+""}f{z=1z}6(1n==0){6(1A==0){z=\'<8 l="z e"><8 l="1R 4f"><8 l="36"><8 l="1O">\'+z+\'\'}f{z=\'<8 l="z i"><8 l="1R 4g"><8 l="36"><8 l="1O">\'+z+\'\'}}f 6(1n==1){z=\'<8 l="z o"><8 l="34"><8 l="1R 4q"><8 l="1O">\'+z+\'<8 l="2Y">\'+1p+\'\'}f 6(1n==2){z=\'<8 l="z g"><8 l="34"><8 l="1R 4p"><8 l="1O">\'+z+\'<8 l="2Y">\'+1p+\'\';1E=12}j=j+z+\'<8 l="4r">\'}}1i.15=1i.15+j;6(1q==1&&1E){3g.15=2S}6(1E)2U();1i.4s=1i.4u;2z.2e();O();17()}}7 2p(G){G=G.A(/((1h=\\"|\\\')?(((4t?|4o):\\/\\/)|2L\\.)([\\w\\-]+\\.)+[\\w\\.\\/=\\?%\\-&~\\\':+!#]*)/E,7($1){q 2C($1)});G=G.A(/([\\-\\.\\w]+@[\\.\\-\\w]+(\\.\\w+)+)/E,\'$1\');G=G.A(/\\[:(\\d*):\\]/g,\'<4i 4h="\'+4j+\'2n/$1.4k">\');q G}7 2C(k){6(k.19(0,5).2Q()==\'1h=\')q k;u 2k=\'\';6(k.M>2G){k=k.19(0,30)+\' ... \'+k.19(k.M-18)}2k+=k+\'\';q 2k}2q(11,\'4l\',23);',62,304,'||||||if|function|div|style||obj||||else||||newdata|url|class|className||||return||||var|||display||msg|replace|value|eMessage|none|ig|clearTimeout|data|kickout|code|setTimeout|delay||length|aline|setFocus|match|eSmilies|tt|eTools_color|eColors|color|ttt||seconds|status|span||document|false||minutes|innerHTML|loading|waiting||substr|000|tool|title|onmouseout|event|flashtitle_step|selection|href|eHistory|hours_display|eTools_smile|ajaxLine|block|stype|lock|time|allow_sound|is_online|biu|is_banned|ajax|method|hours|eventobj|setStatus|content|ctype|ajax_last|mins_display|sec_display|do_flashTitle|callback|ajaxC|sys_status|eMyCrighter|date|eStatus_ok|eStatus_err2|addZeros|eStatus_err|msg_i|php|id|msg_b|ajaxI|ajaxU|ajaxB|selectionStart|sel|isUndefined|200|format|act|sending|autoOffline|stopFlashTitle|welive_output|offline||banned|evt|underline|italic|tttt|pagetitle|response_tout|focus|len|bold|func|split|lines|urllink|jx|re2|smilies|tools_|format_output|_attachEvent|tools_color_on|re1|updating|null|ttttt|eval|addEventListener|fontWeight|window|tools_color_off||getURL|_blank|target|tools_smile_off|60|variable|300|onmouseover|280|www|createRange|normal|typeof|textDecoration|toLowerCase|fontStyle|sound|clearInterval|flashTitle|font|d1|newClassName|msg_t|welive||text|displaytime|attachEvent|pip|oldClassName|ico|timer_start|1000|getLocalTime|setOnline|donothing|for|true|guest|setOffline|eSounder|username|tools_underline_on|ResetInput|tools_italic_on|string|chSoundTitle|59|setInterval|this|getElementById|timer|newmsg|tools_underline_off|chClassname|undefined|_hover|soundon|eColor|message|toggleTools|smile|tools_sound_off|getSeconds|sounder||tools_smile|tools_color|status_ok|status_err|status_err2|getMinutes|getHours|tools_bold_on|tools_bold_off|colors|soundoff|tools_italic_off|initObj|tools_sound_on|eSmile|Date|new|history|on|60000|er_banned|reonline|er_useroffline|unbanned|sender|decoration|weight|er_kickout|ajaxcolor|online|offline_time|refresh_time|showColors|ajaxbiu|ajaxline|e_bg|i_bg|src|img|t_url|gif|mousedown|http|mailto|ftp|g_bg|o_bg|clear|scrollTop|https|scrollHeight|doonline|br|selectionEnd|bind|onSuccess|onError|keyCode|opn|ajaxpending|greenb|ctrlKey|ctrlEnter|character|POST|indexOf|moveStart|update|insertSmilies|insertColors|tools_smile_hover|tools_color_hover|er_autooffline|javascript|showSmilies|onclick'.split('|'),0,{})) 2 | -------------------------------------------------------------------------------- /includes/javascript/x-win.js: -------------------------------------------------------------------------------- 1 | var userAgent=navigator.userAgent.toLowerCase();var is_ie=window.ActiveXObject&&userAgent.indexOf('msie')!=-1&&userAgent.substr(userAgent.indexOf('msie')+5,3);var MyWin=0,CurrentId=0;var zIndex=1000;function openwin(id,title){var o=$('win'+id);if(o){MyWin.Show('win'+id,'max');var eHistory=$("history_"+id);if(eHistory)eHistory.scrollTop=eHistory.scrollHeight}else{if(!MyWin)MyWin=new DialogWin();var winbody=x_win_content.replace(/guestid/ig,id);MyWin.Create(id,title,winbody)}}function DialogWin(){this.Create=function(id,title,wbody){guest.push(id);guest["g"+id]={'gid':id,'online':1};var Winid="win"+id;var w=560;var h=506;var strollleft=document.documentElement&&document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft;var strolltop=document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;var l=strollleft+(guest.length==1?(document.documentElement.clientWidth-w)/2:parseInt(Math.random()*(document.documentElement.clientWidth-w)/2));var t=strolltop+(guest.length==1?(document.documentElement.clientHeight-h)/2:parseInt(Math.random()*(document.documentElement.clientHeight-h)/2));var mywin=document.createElement("DIV");mywin.setAttribute("id",Winid);mywin.setAttribute("Min",0);mywin.setAttribute("Minno",0);mywin.className="x-win";mywin.onmousedown=function(){MyWin.Show(Winid)};mywin.style.cssText="width:"+w+"px;height:"+h+"px;left:0px;top:0px";mywin.style.zIndex=zIndex;mywin.style.display='none';document.body.appendChild(mywin);var mytitle=document.createElement("DIV");var mybody=document.createElement("DIV");var mybottom=document.createElement("DIV");mytitle.className="x-title";mybody.className="x-body";mybottom.className="x-bottom";mywin.appendChild(mytitle);mywin.appendChild(mybody);mywin.appendChild(mybottom);var wintag=[mytitle,mytitle,mytitle,mybody,mybody,mybody,mybottom,mybottom,mybottom];for(var i=0;i<9;i++){var temp=document.createElement("DIV");wintag[i].appendChild(temp);if(i==0){temp.className="x-titleleft"}else if(i==1){temp.className="x-titlemid";temp.style.cssText="width:"+(w-30)+"px;"}else if(i==2){temp.className="x-titleright"}else if(i==3){temp.className="x-bodyleft";temp.style.cssText="height:"+(h-45)+"px;"}else if(i==4){temp.className="x-bodymid";temp.style.cssText="height:"+(h-47)+"px;width:"+(w-32)+"px;"}else if(i==5){temp.className="x-bodyright";temp.style.cssText="height:"+(h-45)+"px;"}else if(i==6){temp.className="x-bottomleft"}else if(i==7){temp.className="x-bottomid";temp.style.cssText="width:"+(w-30)+"px;"}else if(i==8){temp.className="x-bottomright"}if(i!=4&&i!=2)temp.onmousedown=function(e){MyWin.Move(Winid,e?e:window.event)}}mytitle.childNodes[1].innerHTML="
";this.Title(Winid,title+" ");this.Body(Winid,wbody);this.Move_e(Winid,l,t)};this.Title=function(Id,title){if(Id==null)return;var o=$(Id);if(!o)return;o.childNodes[0].childNodes[1].childNodes[0].innerHTML=title};this.Body=function(Id,wbody){if(Id==null)return;var o=$(Id);if(!o)return;o.childNodes[1].childNodes[1].innerHTML=wbody};this.Show=function(Id,max){if(Id==null)return;var o=$(Id);if(!o)return;o.style.display='block';o.style.zIndex=++zIndex;o.childNodes[0].childNodes[1].childNodes[0].className="x-usernow";var State=o.getAttribute("Min");if(max&&State!=0){this.Max(Id)}if(Id!=CurrentId){var old=$(CurrentId);if(old)old.childNodes[0].childNodes[1].childNodes[0].className="x-user";CurrentId=Id}if(State==0){var gid=Id.replace(/win/ig,"");var eNews=$("new"+gid);if(eNews){eNews.innerHTML=0;eNews.style.cssText=''}setFocus(gid)}};this.Move=function(Id,evt){if(Id==null)return;var o=$(Id);if(!o)return;if(o.getAttribute("Min")!=0)return;evt=evt?evt:window.event;var obj=evt.srcElement?evt.srcElement:evt.target;if(obj.id=="min"+Id||obj.id=="max"+Id||obj.id=="close"+Id)return;var w=o.offsetWidth;var h=o.offsetHeight;var l=o.offsetLeft;var t=o.offsetTop;var div=document.createElement("DIV");document.body.appendChild(div);div.style.cssText="filter:alpha(Opacity=10,style=0);opacity:0.2;width:"+w+"px;height:"+h+"px;top:"+t+"px;left:"+l+"px;position:absolute;background:#000;cursor:move;";div.setAttribute("id",Id+"temp");this.Move_r(Id,evt)};this.Move_r=function(Id,evt){var o=$(Id+"temp");if(!o)return;o.style.zIndex=zIndex+1;evt=evt?evt:window.event;var relLeft=evt.clientX-o.offsetLeft;var relTop=evt.clientY-o.offsetTop;if(!window.captureEvents){o.setCapture()}else{window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP)}document.onmousemove=function(e){if(!o)return;window.getSelection?window.getSelection().removeAllRanges():document.selection.empty();e=e?e:window.event;if(e.clientX-relLeft<=0){o.style.left=0+"px"}else if(e.clientX-relLeft>=document.documentElement.clientWidth-o.offsetWidth-2){o.style.left=(document.documentElement.clientWidth-o.offsetWidth-2)+"px"}else{o.style.left=e.clientX-relLeft+"px"}if(e.clientY-relTop<=1){o.style.top=1+"px"}else if(e.clientY-relTop>=document.documentElement.clientHeight-o.offsetHeight-2){o.style.top=(document.documentElement.clientHeight-o.offsetHeight-2)+"px"}else{o.style.top=e.clientY-relTop+"px"}};document.onmouseup=function(){if(!o)return;if(!window.captureEvents){o.releaseCapture()}else{window.releaseEvents(Event.MOUSEMOVE|Event.MOUSEUP)}var l=o.offsetLeft;var t=o.offsetTop;MyWin.Move_e(Id,l,t);document.body.removeChild(o);o=null}};this.Move_e=function(Id,l,t){var o=$(Id);if(!o)return;o.style.left=l+"px";o.style.top=t+"px"};this.Close=function(Id){var o=$(Id);if(!o)return;var currentNo=parseInt(o.getAttribute("Minno"));var gid=Id.replace(/win/ig,"");if(guest['g'+gid]['online']==0){guest['g'+gid]=null;var row=$('g'+gid);if(row)eWelive.removeChild(row);for(var k in guest){if(guest[k]==gid){guest.splice(k,1);break}}document.body.removeChild(o);if(currentNo>0){sort_min(currentNo)}}else{o.style.display='none';if(currentNo>0){o.setAttribute("Minno",0);sort_min(currentNo)}}var lastID=get_lastopen();if(lastID)MyWin.Show("win"+lastID)};this.Resize_e=function(Id,w,h){if(Id==null)return;var o=$(Id);if(!o)return;o.style.height=h+"px";o.childNodes[1].childNodes[0].style.height=(h-45)+"px";o.childNodes[1].childNodes[1].style.height=(h-47)+"px";o.childNodes[1].childNodes[2].style.height=(h-45)+"px";o.style.width=w+"px";o.childNodes[0].childNodes[1].style.width=(w-30)+"px";o.childNodes[2].childNodes[1].style.width=(w-30)+"px";o.childNodes[1].childNodes[1].style.width=(w-32)+"px"};this.Min=function(Id){var o=$(Id);if(!o)return;var State=o.getAttribute("Min");if(State!=0)return;var l=o.offsetLeft;var t=o.offsetTop;var t0=document.documentElement.clientHeight-76;var minnum=get_minnum();var l0=(minnum<=0)?0:minnum*170;this.Resize_e(Id,180,47);this.Move_e(Id,l0,t0);o.setAttribute("Min",l+","+t);o.setAttribute("Minno",minnum+1);var me=$('min'+Id);me.onmouseover=null;me.onmouseout=null;me.onclick=null;me.title="";me.className="x-min3";var max=$('max'+Id);if(max){max.onmouseover=function(){this.className='x-max2'};max.onmouseout=function(){this.className='x-max'};max.onclick=function(){MyWin.Max(Id)};max.title="恢复";max.className="x-max"}var lastID=get_lastopen();if(lastID)MyWin.Show("win"+lastID)};this.Max=function(Id){var o=$(Id);if(!o)return;var State=o.getAttribute("Min");if(State==0)return;State=State.split(",");this.Move_e(Id,State[0],State[1]);this.Resize_e(Id,560,506);o.setAttribute("Min",0);var currentNo=parseInt(o.getAttribute("Minno"));if(currentNo>0){o.setAttribute("Minno",0);sort_min(currentNo)}var me=$('max'+Id);me.onmouseover=null;me.onmouseout=null;me.onclick=null;me.title="";me.className="x-max3";var min=$('min'+Id);if(min){min.onmouseover=function(){this.className='x-min2'};min.onmouseout=function(){this.className='x-min'};min.onclick=function(){MyWin.Min(Id)};min.title="最小化";min.className="x-min"}var gid=Id.replace(/win/ig,"");var eNews=$("new"+gid);if(eNews){eNews.innerHTML=0;eNews.style.cssText=''}setFocus(gid)}}function sort_min(currentNo){for(var k in guest){var Obj=$("win"+guest[k]);if(!Obj)continue;var aMinno=parseInt(Obj.getAttribute("Minno"));if(aMinno>0&&aMinno>currentNo){Obj.setAttribute("Minno",aMinno-1);MyWin.Move_e("win"+guest[k],(aMinno-2)*170,Obj.offsetTop)}}}function sort_max(){var xId=0,xIndex=1000000000;for(var k in guest){var o=$("win"+guest[k]);if(o&&o.style.display!='none'&&o.getAttribute("Minno")==0){var ozIndex=parseInt(o.style.zIndex);if(ozIndexxIndex){xId=guest[k];xIndex=ozIndex}}}return xId}function get_lastmin(){var xId=0,xIndex=0;for(var k in guest){var o=$("win"+guest[k]);if(o&&o.getAttribute("Minno")!=0){var ozIndex=parseInt(o.style.zIndex);if(ozIndex>xIndex){xId=guest[k];xIndex=ozIndex}}}return xId}function get_last(){var xId=0,xIndex=0;for(var k in guest){var o=$("win"+guest[k]);if(o&&o.style.display!='none'){var ozIndex=parseInt(o.style.zIndex);if(ozIndex>xIndex){xId=guest[k];xIndex=ozIndex}}}return xId}function resetKey(e){stopFlashTitle();var e=e?e:window.event;var actualCode=e.keyCode?e.keyCode:e.charCode;if(actualCode==13){sending()}else if(actualCode==27){var lastID=get_last();if(lastID)MyWin.Close("win"+lastID)}else if(e.ctrlKey&&actualCode==40){var lastID=get_lastopen();if(lastID)MyWin.Min("win"+lastID)}else if(e.ctrlKey&&actualCode==38){var lastID=get_lastmin();if(lastID)MyWin.Show("win"+lastID,'max')}else if(e.ctrlKey&&(actualCode==37||actualCode==39)){sort_max()}}_attachEvent(document,'keydown',resetKey);_attachEvent(document,'mousedown',stopFlashTitle); -------------------------------------------------------------------------------- /includes/welive.Auth.php: -------------------------------------------------------------------------------- 1 | getOne("SELECT u.userid, u.usergroupid FROM " . TABLE_PREFIX . "session s 50 | LEFT JOIN " . TABLE_PREFIX . "user u ON u.userid = s.userid 51 | WHERE sessionid = '$sessionid'"); 52 | 53 | $DB->exe("UPDATE " . TABLE_PREFIX . "user SET isonline = 0 WHERE userid = '$user[userid]' "); 54 | $DB->exe("DELETE FROM " . TABLE_PREFIX . "session WHERE sessionid = '$sessionid' "); 55 | $DB->exe("DELETE FROM " . TABLE_PREFIX . "vvc WHERE date < " . ($realtime - 3600*8)); 56 | $DB->exe("DELETE FROM " . TABLE_PREFIX . "session WHERE created < " . ($realtime - 3600*48)); 57 | 58 | if($user['usergroupid'] != 1){ 59 | refreshCache($user['userid'], 'isonline', '0'); //仅客服退出时更新缓存 60 | } 61 | } 62 | 63 | setcookie(COOKIE_NAME, "", 0, "/"); 64 | LogIn(); 65 | 66 | } else { 67 | 68 | $sessionid = ForceIncomingCookie(COOKIE_NAME); 69 | 70 | if($sessionid AND IsPass($sessionid)){ 71 | $sql = "SELECT u.*, (select COUNT(*) FROM " . TABLE_PREFIX . "comment WHERE touserid = s.userid) AS comments FROM " . TABLE_PREFIX . "session s 72 | LEFT JOIN " . TABLE_PREFIX . "user u ON u.userid = s.userid 73 | WHERE s.sessionid = '$sessionid' 74 | AND s.ipaddress = '" . GetIP() . "' 75 | AND u.activated = 1"; 76 | 77 | $userinfo = $DB->getOne($sql); 78 | 79 | if(!$userinfo OR !$userinfo['userid']){ 80 | unset($userinfo); 81 | setcookie(COOKIE_NAME, "", 0, "/"); 82 | LogIn(); 83 | } 84 | } else { 85 | LogIn(); 86 | } 87 | 88 | } 89 | 90 | 91 | unset($userid, $loginusername, $loginpassword, $sessionid); 92 | 93 | // #################################################################### 94 | 95 | function LogIn(){ 96 | global $logininfo, $DB, $_CFG, $lang; 97 | 98 | $vvckey = PassGen(8); 99 | 100 | echo ' 101 | 102 | 103 | 104 | ' . SITE_TITLE . ' 105 | 106 | 107 | 112 | 113 | 114 | 130 | 131 | '; 132 | 133 | exit(); 134 | } 135 | 136 | function LoginUser($loginusername, $loginpassword){ 137 | global $DB, $_CFG; 138 | 139 | $loginpassword = md5($loginpassword); 140 | 141 | $user = $DB->getOne("SELECT userid FROM " . TABLE_PREFIX . "user WHERE username = '$loginusername' AND password = '$loginpassword' AND activated = 1 AND type = 1"); 142 | 143 | return $user['userid']; 144 | } 145 | 146 | 147 | function CreateSession($userid){ 148 | global $DB, $_CFG; 149 | 150 | $userip = GetIP(); 151 | $timenow = time(); 152 | $sessionid = md5(uniqid($userid . COOKIE_KEY)); 153 | 154 | $DB->exe("INSERT INTO " . TABLE_PREFIX . "session (sessionid, userid, ipaddress, created) 155 | VALUES ('$sessionid', '$userid', '$userip', '$timenow') "); 156 | $DB->exe("UPDATE " . TABLE_PREFIX . "user SET lastlogin = '$timenow' WHERE userid = '$userid' "); 157 | $DB->exe("DELETE FROM " . TABLE_PREFIX . "guest WHERE created < " . ($timenow - 3600*24)); 158 | 159 | $deletehistory = ForceInt($_CFG['cDeleteHistory']); 160 | 161 | if($deletehistory){ 162 | $DB->exe("DELETE FROM " . TABLE_PREFIX . "msg WHERE created < " . ($timenow - 3600*$deletehistory)); 163 | } 164 | 165 | setcookie(COOKIE_NAME, $sessionid, 0, "/"); 166 | setcookie('last'.COOKIE_KEY, $timenow, 0, "/"); 167 | 168 | setcookie('weliveU'.COOKIE_KEY, md5(WEBSITE_KEY.$userid.$_CFG['cKillRobotCode']), 0, "/"); //用于AJAX验证 169 | } 170 | 171 | 172 | ?> -------------------------------------------------------------------------------- /includes/welive.BaseUrl.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /includes/welive.Core.php: -------------------------------------------------------------------------------- 1 | '. APP_NAME .' '.base64_decode('5Zyo57q/5a6i5pyN57O757uf ').'(v'. APP_VERSION . ')'); 35 | 36 | if(defined('AUTH')){ //客服和管理员只显示中文, 且需要授权 37 | include(BASEPATH . 'includes/welive.Support.php'); 38 | 39 | define('IS_CHINESE', 1); 40 | define('SITE_TITLE', $_CFG['cTitle']); 41 | @include(BASEPATH . 'languages/Chinese.php'); 42 | if(!defined('AJAX')){ //客服的AJAX操作无需授权 43 | include(BASEPATH.'includes/welive.Auth.php'); 44 | } 45 | 46 | }elseif($_CFG['cActived']){ //客人自动选择语言 47 | include(BASEPATH . 'includes/welive.Functions.php'); 48 | 49 | $sitelang = ForceIncomingCookie('LANG'.COOKIE_KEY); 50 | 51 | if(!$sitelang){ 52 | if($_CFG['cLang'] == 'Auto'){ 53 | if (strstr(strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']), 'zh-cn') OR strstr(strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']), 'zh-tw')) { 54 | $sitelang = 'Chinese'; 55 | }else{ 56 | $sitelang = 'English'; 57 | } 58 | }else{ 59 | $sitelang = $_CFG['cLang']; 60 | } 61 | } 62 | 63 | define('SITE_LANG', $sitelang); 64 | define('IS_CHINESE', Iif(SITE_LANG == 'Chinese', 1, 0)); 65 | define('SITE_TITLE', Iif(IS_CHINESE, $_CFG['cTitle'], $_CFG['cTitle_en'])); 66 | @include(BASEPATH . 'languages/' . SITE_LANG . '.php'); 67 | } 68 | 69 | 70 | ?> -------------------------------------------------------------------------------- /includes/welive.Functions.php: -------------------------------------------------------------------------------- 1 | 0){ 21 | foreach($addresses as $ip){ 22 | if(strpos($ip, '*') === false){ 23 | if($ip == $clientip) return true; 24 | }elseif(preg_match('/'.$ip.'/i', $clientip)){ 25 | return true; 26 | } 27 | } 28 | } 29 | 30 | return false; 31 | } 32 | 33 | // ##################### 34 | 35 | function get_userAgent($userAgent){ 36 | if(!$userAgent) return "unknown"; 37 | 38 | $knownAgents = array("opera", "msie", "chrome", "safari", "firefox", "netscape", "mozilla"); 39 | 40 | $userAgent = strtolower($userAgent); 41 | foreach ($knownAgents as $agent) { 42 | if (strstr($userAgent, $agent)) { 43 | if (preg_match("/" . $agent . "[\\s\/]?(\\d+(\\.\\d+(\\.\\d+(\\.\\d+)?)?)?)/", $userAgent, $matches)) { 44 | $ver = $matches[1]; 45 | if ($agent == 'safari') { 46 | if (preg_match("/version\/(\\d+(\\.\\d+(\\.\\d+)?)?)/", $userAgent, $matches)) { 47 | $ver = $matches[1]; 48 | } else { 49 | $ver = "1 or 2 (build " . $ver . ")"; 50 | } 51 | if (preg_match("/mobile\/(\\d+(\\.\\d+(\\.\\d+)?)?)/", $userAgent, $matches)) { 52 | $userAgent = "iPhone " . $matches[1] . " ($agent $ver)"; 53 | break; 54 | } 55 | } 56 | 57 | $userAgent = ucfirst($agent) . " " . $ver; 58 | break; 59 | } 60 | } 61 | } 62 | 63 | return $userAgent; 64 | } 65 | 66 | // ##################### 67 | 68 | function WeLive($sender, $content, $ctype = 2, $biu = '000', $color = '0') { 69 | return $sender .'|||'.$content .'|||'.$ctype .'|||'.$biu .'|||'.$color; 70 | } 71 | 72 | // ##################### 73 | 74 | function WeLiveSend($realtime, $lines, $ajax_last, $error = 0) { 75 | $info = ''; 76 | 77 | if($error){ 78 | $info = $ajax_last . '||||||2'; 79 | }else{ 80 | if(is_array($lines)) { 81 | foreach($lines as $value) { 82 | $info .= $value . '^^^'; 83 | } 84 | 85 | $info = $realtime . '||||||' . $info; 86 | }else{ 87 | $info = $realtime . '||||||' . $lines; 88 | } 89 | } 90 | 91 | echo $info; 92 | } 93 | 94 | // ##################### 95 | 96 | function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0) { 97 | 98 | $ckey_length = 4; 99 | $key = md5($key ? $key : 'default_key'); 100 | $keya = md5(substr($key, 0, 16)); 101 | $keyb = md5(substr($key, 16, 16)); 102 | $keyc = $ckey_length ? ($operation == 'DECODE' ? substr($string, 0, $ckey_length): substr(md5(microtime()), -$ckey_length)) : ''; 103 | 104 | $cryptkey = $keya.md5($keya.$keyc); 105 | $key_length = strlen($cryptkey); 106 | 107 | $string = $operation == 'DECODE' ? base64_decode(substr($string, $ckey_length)) : sprintf('%010d', $expiry ? $expiry + time() : 0).substr(md5($string.$keyb), 0, 16).$string; 108 | $string_length = strlen($string); 109 | 110 | $result = ''; 111 | $box = range(0, 255); 112 | 113 | $rndkey = array(); 114 | for($i = 0; $i <= 255; $i++) { 115 | $rndkey[$i] = ord($cryptkey[$i % $key_length]); 116 | } 117 | 118 | for($j = $i = 0; $i < 256; $i++) { 119 | $j = ($j + $box[$i] + $rndkey[$i]) % 256; 120 | $tmp = $box[$i]; 121 | $box[$i] = $box[$j]; 122 | $box[$j] = $tmp; 123 | } 124 | 125 | for($a = $j = $i = 0; $i < $string_length; $i++) { 126 | $a = ($a + 1) % 256; 127 | $j = ($j + $box[$a]) % 256; 128 | $tmp = $box[$a]; 129 | $box[$a] = $box[$j]; 130 | $box[$j] = $tmp; 131 | $result .= chr(ord($string[$i]) ^ ($box[($box[$a] + $box[$j]) % 256])); 132 | } 133 | 134 | if($operation == 'DECODE') { 135 | if((substr($result, 0, 10) == 0 || substr($result, 0, 10) - time() > 0) && substr($result, 10, 16) == substr(md5(substr($result, 26).$keyb), 0, 16)) { 136 | return substr($result, 26); 137 | } else { 138 | return ''; 139 | } 140 | } else { 141 | return $keyc.str_replace('=', '', base64_encode($result)); 142 | } 143 | 144 | } 145 | 146 | ?> -------------------------------------------------------------------------------- /includes/welive.Support.php: -------------------------------------------------------------------------------- 1 | = 16 && $iparray[1] <= 31))) { 35 | $return = '- LAN'; 36 | } elseif($iparray[0] > 255 || $iparray[1] > 255 || $iparray[2] > 255 || $iparray[3] > 255) { 37 | $return = '- 无效的IP地址!'; 38 | } else { 39 | $tinyipfile = BASEPATH . 'ipdata/tinyipdata.dat'; 40 | 41 | if(@file_exists($tinyipfile)) { 42 | $return = convertip_tiny($ip, $tinyipfile); 43 | } else { 44 | $return = '- IP数据库文件未上传!'; 45 | } 46 | } 47 | } 48 | 49 | return $return; 50 | 51 | } 52 | 53 | // ##################### 54 | function convertip_tiny($ip, $ipdatafile) { 55 | 56 | static $fp = NULL, $offset = array(), $index = NULL; 57 | 58 | $ipdot = explode('.', $ip); 59 | $ip = pack('N', ip2long($ip)); 60 | 61 | $ipdot[0] = (int)$ipdot[0]; 62 | $ipdot[1] = (int)$ipdot[1]; 63 | 64 | if($fp === NULL && $fp = @fopen($ipdatafile, 'rb')) { 65 | $offset = @unpack('Nlen', @fread($fp, 4)); 66 | $index = @fread($fp, $offset['len'] - 4); 67 | } elseif($fp == FALSE) { 68 | return '- IP数据库文件不可用'; 69 | } 70 | 71 | $length = $offset['len'] - 1028; 72 | $start = @unpack('Vlen', $index[$ipdot[0] * 4] . $index[$ipdot[0] * 4 + 1] . $index[$ipdot[0] * 4 + 2] . $index[$ipdot[0] * 4 + 3]); 73 | 74 | for ($start = $start['len'] * 8 + 1024; $start < $length; $start += 8) { 75 | 76 | if ($index{$start} . $index{$start + 1} . $index{$start + 2} . $index{$start + 3} >= $ip) { 77 | $index_offset = @unpack('Vlen', $index{$start + 4} . $index{$start + 5} . $index{$start + 6} . "\x0"); 78 | $index_length = @unpack('Clen', $index{$start + 7}); 79 | break; 80 | } 81 | } 82 | 83 | @fseek($fp, $offset['len'] + $index_offset['len'] - 1024); 84 | if($index_length['len']) { 85 | return '- '.@fread($fp, $index_length['len']); 86 | } else { 87 | return '- 未知'; 88 | } 89 | 90 | } 91 | 92 | ?> -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | query("SELECT msg FROM " . TABLE_PREFIX . "automsg WHERE activated =1 ORDER BY ordernum ASC LIMIT 40"); 20 | $automsgs = ''; 21 | $automsgs_line = 1; 22 | while($getmsg = $DB->fetch($getmsgs)){ 23 | $automsgs .= '
'.$automsgs_line.'.
'.html($getmsg['msg']).'
'; 24 | 25 | ++$automsgs_line; 26 | } 27 | 28 | header_nocache(); 29 | 30 | $uid = $userinfo['userid']; 31 | $gid = 0; 32 | $realtime = time(); 33 | 34 | setcookie('weliveU'.COOKIE_KEY, md5(WEBSITE_KEY.$uid.$_CFG['cKillRobotCode']), 0, "/"); //用于AJAX验证 35 | $ajaxpending = 'uid=' . $uid; //需要动态变化, 用于将客服ID附加到AJAX URL 36 | 37 | $smilies = ''; //添加表情图标 38 | for($i = 0; $i < 24; $i++){ 39 | $smilies .= ''; 40 | } 41 | 42 | //添加颜色 43 | $colors = array('000000','6C6C6C','969696','FF0000','FF6600','FFCC00','916200','CD8447','2B8400','2FEA00','999900','0000CC','0066FF','35A2C1','701B76','C531D0'); 44 | $color_squares = ''; 45 | foreach($colors as $key => $value){ 46 | $color_squares .= '
'; 47 | } 48 | 49 | $js_var = "pagetitle=\"".SITE_TITLE."\",soundon=\"$lang[soundon]\",soundoff=\"$lang[soundoff]\",newguest=\"$lang[newguest]\",ban=\"$lang[ban]\",baninfo=\"$lang[baninfo]\",unban=\"$lang[unban]\",unbaninfo=\"$lang[unbaninfo]\",reonline=\"$lang[reonlineg]\",er_system=\"$lang[er_system]\",er_goffline=\"$lang[er_goffline]\",sender_sys=\"$lang[system]\",guestname=\"$lang[guest]\",username=\"$lang[isay]\", t_url=\"".TURL."\""; 50 | 51 | //窗口内容 52 | $x_win_content = '
发送
'; 53 | 54 | 55 | echo ' 56 | 57 | 58 | 59 | ' . SITE_TITLE . ' 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
69 | 74 |
75 |
76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 |
访客上线时间IP地址浏览器来自页面操作
91 |
92 |
'.$lang['noguest'].'
93 |
94 |
95 |
96 | 102 | 103 | 146 | 147 | '; 148 | 149 | ?> -------------------------------------------------------------------------------- /ipdata/.htaccess: -------------------------------------------------------------------------------- 1 | Deny from all -------------------------------------------------------------------------------- /ipdata/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ipdata/tinyipdata.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/ipdata/tinyipdata.dat -------------------------------------------------------------------------------- /languages/Chinese.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /languages/English.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /online.php: -------------------------------------------------------------------------------- 1 | 26 | 27 | 28 | 29 | 43 | 44 | '; 45 | 46 | foreach ($welive_onlines AS $usergroup) { 47 | if(IS_CHINESE){ 48 | $groupname = $usergroup['groupname']; 49 | $description = $usergroup['description']; 50 | }else{ 51 | $groupname = $usergroup['groupename']; 52 | $description = $usergroup['descriptionen']; 53 | } 54 | 55 | echo '
' . $groupname. '
56 | '.Iif($description, '
'.html($description).'
').' 57 |
    '; 58 | 59 | foreach ($usergroup['user'] AS $userid => $user) { 60 | $userfrontname = Iif(IS_CHINESE, $user['userfrontname'], $user['userfrontename']); 61 | if(!$userfrontname){ 62 | $userfrontname = $user['username']; 63 | } 64 | 65 | switch ($user['type']) { 66 | case 1: 67 | $vvckey = PassGen(8); 68 | $code = base64_encode(authcode(COOKIE_KEY . $userid, 'ENCODE', $vvckey, 3600)); 69 | 70 | if($user['isonline']){ 71 | echo '
  • 72 | 73 | ' . $userfrontname. ' [' . $lang['chat'] . ']
  • '; 74 | 75 | }else{ 76 | echo '
  • 77 | 78 | ' . $userfrontname. ' [' . $lang['msg'] . ']
  • '; 79 | } 80 | break; 81 | 82 | case 2: 83 | echo '
  • QQ '.$userfrontname.'
  • '; 84 | break; 85 | 86 | case 3: 87 | echo '
  • MSN '.$userfrontname.'
  • '; 88 | break; 89 | 90 | case 4: 91 | echo '
  • Skype '.$userfrontname.'
  • '; 92 | break; 93 | 94 | case 5: 95 | echo '
  • '.$userfrontname.'
  • '; 96 | break; 97 | } 98 | } 99 | 100 | echo '
'; 101 | } 102 | 103 | echo ''; 104 | 105 | 106 | } 107 | 108 | ?> 109 | 110 | -------------------------------------------------------------------------------- /robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: / -------------------------------------------------------------------------------- /support.php: -------------------------------------------------------------------------------- 1 | exe("UPDATE " . TABLE_PREFIX . "user SET isonline = 0 WHERE userid = '$uid'"); 36 | refreshCache($uid, 'isonline', '0'); //更新缓存 37 | break; 38 | 39 | case 'online': 40 | $DB->exe("UPDATE " . TABLE_PREFIX . "user SET isonline = 1 WHERE userid = '$uid'"); 41 | refreshCache($uid, 'isonline', '1'); //更新缓存 42 | WeLiveSend($realtime + $minitime, $guests, $msgs, $ajax_last, $DB->errno); 43 | break; 44 | 45 | case 'banned': 46 | if($gid){ 47 | $DB->exe("UPDATE " . TABLE_PREFIX . "guest SET isbanned = 1 WHERE guestid = '$gid'"); 48 | } 49 | break; 50 | 51 | case 'unbanned': 52 | if($gid){ 53 | $DB->exe("UPDATE " . TABLE_PREFIX . "guest SET isbanned = 0 WHERE guestid = '$gid'"); 54 | } 55 | break; 56 | 57 | case 'kickout': 58 | if($gid){ 59 | $DB->exe("DELETE FROM " . TABLE_PREFIX . "guest WHERE guestid = '$gid'"); 60 | } 61 | break; 62 | 63 | case 'iplocation': 64 | $ip = ForceIncomingString('ip'); 65 | echo convertip($ip); 66 | break; 67 | 68 | case 'setbusy': //设置为忙碌状态 69 | refreshCache($uid, 'isbusy', '1'); //更新缓存 70 | break; 71 | 72 | case 'unsetbusy': //解除忙碌状态 73 | refreshCache($uid, 'isbusy', '0'); //更新缓存 74 | break; 75 | } 76 | 77 | ?> 78 | 79 | -------------------------------------------------------------------------------- /swaiting.php: -------------------------------------------------------------------------------- 1 | query("SELECT guestid, guestip, browser, lang, isonline, isbanned, fromurl FROM " . TABLE_PREFIX . "guest WHERE serverid = '$uid' AND created > $lastlogin ORDER BY created ASC"); 36 | 37 | while($guest=$DB->fetch($getguests)){ 38 | $guests .= $guest['guestid'] .'|||'.$guest['guestip'] .'|||'.$guest['browser'] .'|||'.$guest['lang'] .'|||'.$guest['isonline'] .'|||'.$guest['isbanned'] .'|||'.$guest['fromurl'] .'^^^'; 39 | } 40 | 41 | $getmsgs = $DB->query("SELECT fromid, msg, biu, color FROM " . TABLE_PREFIX . "msg WHERE toid = '$uid' AND type = 0 AND (created + minitime) > $ajax_last ORDER BY msgid ASC"); 42 | 43 | while($msg = $DB->fetch($getmsgs)){ 44 | $msgs .= $msg['fromid'] . '|||2|||'.html($msg['msg']) .'|||2|||'.$msg['biu'] .'|||'.$msg['color'] .'^^^'; 45 | } 46 | 47 | if($gid AND $act == 'sending'){ //发表信息 48 | $ajaxline = ForceIncomingString('ajaxline'); 49 | $ajaxbiu = ForceIncomingString('ajaxbiu', '000'); 50 | $ajaxcolor = ForceIncomingString('ajaxcolor', '0'); 51 | 52 | $DB->exe("INSERT INTO " . TABLE_PREFIX . "msg (fromid, toid, msg, biu, color, created, minitime, type) VALUES ('$uid', '$gid', '$ajaxline', '$ajaxbiu', '$ajaxcolor', '$realtime', '$minitime', 1)"); 53 | 54 | $msgs .= $gid . '|||1|||'.html($ajaxline) .'|||2|||'.$ajaxbiu .'|||'.$ajaxcolor .'^^^'; 55 | } 56 | 57 | 58 | WeLiveSend($realtime + $minitime, $guests, $msgs, $ajax_last, $DB->errno); 59 | 60 | ?> 61 | 62 | -------------------------------------------------------------------------------- /templates/admin.css: -------------------------------------------------------------------------------- 1 | /* CSS Document */ 2 | .welive_div ul li{text-align:left;padding:0 0 5px 20px; line-height:1.8; background:url(images/li.gif) no-repeat 5px 8px;} 3 | 4 | .note{ border-bottom:1px dashed #F66;color:#D14A10;} 5 | .note2{ border-bottom:1px dashed #F66;} 6 | 7 | #header .spec {color:#11F7EB;} 8 | #header a {font-weight:700;text-decoration:none;} 9 | #header a:hover {font-weight:700;} 10 | 11 | #memu {float:left;display:inline;padding:7px 18px 0 30px;color:#B9B9B9;} 12 | #memu a {color:#11F7EB;padding:4px 10px;*padding:6px 10px 4px 10px;} 13 | #memu a:hover {color:#E06907;} 14 | #memu .on {color:#E06907;background:#D4D4D4;} 15 | 16 | #header .loginout {float:right;display:inline;padding:6px 58px 0 20px;color:#C0BEBE;} 17 | #header .loginout a {color:#FF3300;} 18 | #header .loginout a:hover {color:#FF6600;} 19 | 20 | table.normal td {color:#666;border-bottom:1px solid #ccc;padding: 12px 8px;text-align:left;} 21 | 22 | table.maintable th, table.moreinfo th {background:#EAF8FB;font-size:14px;font-weight:normal;color:#1D485E;padding:4px 8px;border-bottom:2px solid #A09C9C;text-align:left;} 23 | table.maintable td {color:#666;border-bottom:1px solid #ccc;padding:12px 8px;text-align:left;} 24 | table.maintable .last, table.moreinfo .last {border:0;background:none;} 25 | 26 | table.moreinfo td {color:#666;border-bottom:1px solid #ccc;padding:6px 8px;text-align:left;} 27 | 28 | /* msg */ 29 | #sysinfo_error { width:400px; margin:0 auto; padding-top:12px;padding-bottom:12px;color:#000;line-height:18px;} 30 | #sysinfo_success { width:400px; margin:0 auto; padding-top:12px;padding-bottom:12px;color:#000;line-height:18px;} 31 | .e_lborder {background:#FFE1E1 url(images/msg/e_border.gif) repeat-y left bottom;} 32 | .e_rborder {background:transparent url(images/msg/e_border.gif) repeat-y right top;} 33 | .e_tborder {background:transparent url(images/msg/e_border.gif) repeat-x;} 34 | .e_bborder {background:transparent url(images/msg/e_border.gif) repeat-x center bottom;} 35 | .e_tlcorner {background:transparent url(images/msg/e_tlcorner.gif) no-repeat;} 36 | .e_trcorner {background:transparent url(images/msg/e_trcorner.gif) no-repeat right top;padding:12px 20px;overflow:auto;} 37 | .e_blcorner {background:transparent url(images/msg/e_blcorner.gif) no-repeat left bottom;} 38 | .e_brcorner {background:transparent url(images/msg/e_brcorner.gif) no-repeat right bottom;} 39 | 40 | .s_lborder {background:#DEFBC6 url(images/msg/s_border.gif) repeat-y left bottom;} 41 | .s_rborder {background:transparent url(images/msg/s_border.gif) repeat-y right top;} 42 | .s_tborder {background:transparent url(images/msg/s_border.gif) repeat-x;} 43 | .s_bborder {background:transparent url(images/msg/s_border.gif) repeat-x center bottom;} 44 | .s_tlcorner {background:transparent url(images/msg/s_tlcorner.gif) no-repeat;} 45 | .s_trcorner {background:transparent url(images/msg/s_trcorner.gif) no-repeat right top;padding:12px 20px;overflow:auto;} 46 | .s_blcorner {background:transparent url(images/msg/s_blcorner.gif) no-repeat left bottom;} 47 | .s_brcorner {background:transparent url(images/msg/s_brcorner.gif) no-repeat right bottom;} 48 | 49 | /* pages */ 50 | .PageListDiv {text-align:center;font-family: 'Trebuchet MS', Verdana, Tahoma, Arial, sans-serif; font-size:14px;line-height:30px;font-weight:bold;} 51 | .PageList {margin:0;padding:0; list-style:none;} 52 | .PageList li {display:inline;} 53 | .PageList a, .PageList li a {font-family: 'Trebuchet MS', Verdana, Tahoma, Arial, sans-serif !important;font-size:14px !important;background: #C5E0AB;padding: 2px 7px 2px 7px;text-decoration:none !important;color:#3354aa !important;} 54 | .PageList span.CurrentPage{background: #E8F3DE;padding: 2px 7px 2px 7px;border: 1px solid #996600;color:#ACA8AA;} 55 | .PageList li a.PagePrev{background:#fff url(images/page_nav.jpg) top left no-repeat !important;} 56 | .PageList li a.PageNext{background:#fff url(images/page_nav.jpg) top right no-repeat !important;} 57 | .PageList li span.NoPagePrev{background:#fff url(images/page_nav.jpg) top left no-repeat;padding: 2px 7px 2px 7px;color:#ACA8AA;} 58 | .PageList li span.NoPageNext{background:#fff url(images/page_nav.jpg) top right no-repeat;padding: 2px 7px 2px 7px;color:#ACA8AA;} 59 | -------------------------------------------------------------------------------- /templates/images/btn_top.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/btn_top.gif -------------------------------------------------------------------------------- /templates/images/footer_bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/footer_bg.gif -------------------------------------------------------------------------------- /templates/images/footer_bg2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/footer_bg2.gif -------------------------------------------------------------------------------- /templates/images/guest_send.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/guest_send.gif -------------------------------------------------------------------------------- /templates/images/guest_user_bottom.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/guest_user_bottom.gif -------------------------------------------------------------------------------- /templates/images/guest_user_middle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/guest_user_middle.gif -------------------------------------------------------------------------------- /templates/images/guest_user_title.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/guest_user_title.gif -------------------------------------------------------------------------------- /templates/images/header_bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/header_bg.gif -------------------------------------------------------------------------------- /templates/images/header_bg2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/header_bg2.gif -------------------------------------------------------------------------------- /templates/images/history.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/history.gif -------------------------------------------------------------------------------- /templates/images/history_en.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/history_en.gif -------------------------------------------------------------------------------- /templates/images/input_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/input_bg.png -------------------------------------------------------------------------------- /templates/images/li.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/li.gif -------------------------------------------------------------------------------- /templates/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/loading.gif -------------------------------------------------------------------------------- /templates/images/login_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/login_button.png -------------------------------------------------------------------------------- /templates/images/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/logo.gif -------------------------------------------------------------------------------- /templates/images/logo_s.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/logo_s.gif -------------------------------------------------------------------------------- /templates/images/message.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/message.gif -------------------------------------------------------------------------------- /templates/images/message_en.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/message_en.gif -------------------------------------------------------------------------------- /templates/images/msg/e_blcorner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/msg/e_blcorner.gif -------------------------------------------------------------------------------- /templates/images/msg/e_border.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/msg/e_border.gif -------------------------------------------------------------------------------- /templates/images/msg/e_brcorner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/msg/e_brcorner.gif -------------------------------------------------------------------------------- /templates/images/msg/e_tlcorner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/msg/e_tlcorner.gif -------------------------------------------------------------------------------- /templates/images/msg/e_trcorner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/msg/e_trcorner.gif -------------------------------------------------------------------------------- /templates/images/msg/s_blcorner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/msg/s_blcorner.gif -------------------------------------------------------------------------------- /templates/images/msg/s_border.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/msg/s_border.gif -------------------------------------------------------------------------------- /templates/images/msg/s_brcorner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/msg/s_brcorner.gif -------------------------------------------------------------------------------- /templates/images/msg/s_tlcorner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/msg/s_tlcorner.gif -------------------------------------------------------------------------------- /templates/images/msg/s_trcorner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/msg/s_trcorner.gif -------------------------------------------------------------------------------- /templates/images/msg_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/msg_bg.png -------------------------------------------------------------------------------- /templates/images/msg_pip_e.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/msg_pip_e.gif -------------------------------------------------------------------------------- /templates/images/msg_pip_i.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/msg_pip_i.gif -------------------------------------------------------------------------------- /templates/images/msg_pip_l.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/msg_pip_l.gif -------------------------------------------------------------------------------- /templates/images/msg_pip_r.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/msg_pip_r.gif -------------------------------------------------------------------------------- /templates/images/msn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/msn.gif -------------------------------------------------------------------------------- /templates/images/notice.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/notice.gif -------------------------------------------------------------------------------- /templates/images/page_nav.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/page_nav.jpg -------------------------------------------------------------------------------- /templates/images/panel_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/panel_close.png -------------------------------------------------------------------------------- /templates/images/panel_close2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/panel_close2.png -------------------------------------------------------------------------------- /templates/images/panel_foot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/panel_foot.png -------------------------------------------------------------------------------- /templates/images/panel_main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/panel_main.png -------------------------------------------------------------------------------- /templates/images/panel_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/panel_open.png -------------------------------------------------------------------------------- /templates/images/panel_open2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/panel_open2.png -------------------------------------------------------------------------------- /templates/images/panel_open_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/panel_open_bg.png -------------------------------------------------------------------------------- /templates/images/panel_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/panel_title.png -------------------------------------------------------------------------------- /templates/images/panel_title_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/panel_title_en.png -------------------------------------------------------------------------------- /templates/images/panel_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/panel_top.png -------------------------------------------------------------------------------- /templates/images/smilies_bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/smilies_bg.gif -------------------------------------------------------------------------------- /templates/images/status_err.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/status_err.gif -------------------------------------------------------------------------------- /templates/images/status_ok.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/status_ok.gif -------------------------------------------------------------------------------- /templates/images/support_send.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/support_send.gif -------------------------------------------------------------------------------- /templates/images/timer_bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/timer_bg.gif -------------------------------------------------------------------------------- /templates/images/tools.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/tools.gif -------------------------------------------------------------------------------- /templates/images/user_offline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/user_offline.gif -------------------------------------------------------------------------------- /templates/images/user_online.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/user_online.gif -------------------------------------------------------------------------------- /templates/images/waitt.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/images/waitt.gif -------------------------------------------------------------------------------- /templates/smilies/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/0.gif -------------------------------------------------------------------------------- /templates/smilies/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/1.gif -------------------------------------------------------------------------------- /templates/smilies/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/10.gif -------------------------------------------------------------------------------- /templates/smilies/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/11.gif -------------------------------------------------------------------------------- /templates/smilies/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/12.gif -------------------------------------------------------------------------------- /templates/smilies/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/13.gif -------------------------------------------------------------------------------- /templates/smilies/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/14.gif -------------------------------------------------------------------------------- /templates/smilies/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/15.gif -------------------------------------------------------------------------------- /templates/smilies/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/16.gif -------------------------------------------------------------------------------- /templates/smilies/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/17.gif -------------------------------------------------------------------------------- /templates/smilies/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/18.gif -------------------------------------------------------------------------------- /templates/smilies/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/19.gif -------------------------------------------------------------------------------- /templates/smilies/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/2.gif -------------------------------------------------------------------------------- /templates/smilies/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/20.gif -------------------------------------------------------------------------------- /templates/smilies/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/21.gif -------------------------------------------------------------------------------- /templates/smilies/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/22.gif -------------------------------------------------------------------------------- /templates/smilies/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/23.gif -------------------------------------------------------------------------------- /templates/smilies/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/3.gif -------------------------------------------------------------------------------- /templates/smilies/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/4.gif -------------------------------------------------------------------------------- /templates/smilies/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/5.gif -------------------------------------------------------------------------------- /templates/smilies/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/6.gif -------------------------------------------------------------------------------- /templates/smilies/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/7.gif -------------------------------------------------------------------------------- /templates/smilies/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/8.gif -------------------------------------------------------------------------------- /templates/smilies/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/smilies/9.gif -------------------------------------------------------------------------------- /templates/sound.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/sound.swf -------------------------------------------------------------------------------- /templates/styles.css: -------------------------------------------------------------------------------- 1 | /* CSS Document */ 2 | body{font-family:Verdana,Arial; margin:0; padding:0; font-size:12px; color:#292929;} 3 | h1,h2,h3,h4,h5,h6,ul,ol,li,dl,dt,dd,form,img,p{margin:0; padding:0; border:none; list-style-type:none;} 4 | table{width:100%;border-collapse:collapse;} 5 | 6 | html, body{height:100%;} 7 | input,select,textarea{font-family:Verdana,Arial;font-size:12px; color:#0f0f0f} 8 | 9 | a {color:#0A53B6;text-decoration:none;} 10 | a:hover {color:#CC0000;text-decoration:underline;} 11 | 12 | /*颜色字体*/ 13 | .black{color:#000;} 14 | .blackb{color:#000;font-weight:bold;} 15 | .red{color:red;} 16 | .redb{color:red;font-weight:bold;} 17 | .orange {color:#FF9900;} 18 | .orangeb{color:#FF9900;font-weight:bold;} 19 | .blue{color:blue;} 20 | .blueb{color:blue;font-weight:bold;} 21 | .green{color:#51B400;} 22 | .greenb{color:#51B400;font-weight:bold;} 23 | .grey{color:#AEABAA;} 24 | .greyb{color:#AEABAA;font-weight:bold;} 25 | .spec{color:#11F7EB;} 26 | 27 | /*客人窗口 start*/ 28 | #guest {background:#E1E1E1;height:100%;width:100%;} 29 | #guest_top {background:url(images/header_bg2.gif) repeat-x;position:absolute;top:0px;left:0px;width:100%;height:32px;line-height:32px;overflow:hidden;} 30 | #guest_top .logo {float:left;display:inline;padding-left:50px;background:url(images/logo_s.gif) no-repeat 24px 6px;color:#FFF;font-weight:700;} 31 | #guest_top #guestinfo {float:left;padding-left:30px;color:#C3C3C3;*padding-top:2px;} 32 | #guest_top .timer_div {float:right;display:inline;padding:0 30px 0 22px;background:url(images/timer_bg.gif) no-repeat 0 8px;color:#C0BEBE;font-size:16px;font-weight:700;} 33 | 34 | /*留言窗口*/ 35 | #guest .comment{color:#414141;position:absolute;padding:6px;top:40px;left:24px;line-height:20px;} 36 | .comment input.input-text{height:18px;padding:4px 0 4px 6px;border:1px solid #898787;background:#fff url(images/input_bg.png) repeat-x;line-height:16px} 37 | .comment textarea.content{height:200px;width:400px;padding:4px 0 0 6px;margin-bottom:8px;border:1px solid #898787;line-height:20px;} 38 | .comment img.vvc{border:1px solid #898787;cursor:pointer;} 39 | 40 | /*对话记录栏*/ 41 | #guest .ico_history{position:absolute;width:20px;top:40px;padding-left:4px;} 42 | #guest #history{color:#414141;position:absolute;border:1px solid #717171;background: url(images/msg_bg.png);width:498px;height:334px;top:40px;left:24px;padding-top:6px;overflow:auto;overflow-x:hidden;} 43 | #guest #history img {vertical-align:middle;} 44 | #guest .guest_right{position:absolute;width:120px;height:340px;top:40px;left:532px;overflow:hidden;} 45 | #guest .user_title{color:#9C861B;background:url(images/guest_user_title.gif) no-repeat;font-weight:bold;height:26px;line-height:26px;padding-left:16px;white-space:nowrap;overflow:hidden;} 46 | #guest .user_middle{color:#9A9A9A;background:url(images/guest_user_middle.gif) repeat-y;padding:6px;line-height:18px;} 47 | #guest .user_bottom{background:url(images/guest_user_bottom.gif) no-repeat;height:5px;font-size:0;overflow:hidden;} 48 | #guest .adv{text-align:center;line-height:18px;margin-top:8px;} 49 | #history a {color:#717171;text-decoration:none;border-bottom:1px dashed #717171;} 50 | #history a:hover {color:#CC0000;text-decoration:none;border-bottom:1px dashed #CC0000;} 51 | 52 | .clear{clear:both;width:0;height:0;line-height:0;overflow:hidden;} 53 | 54 | .msg{position: relative;margin-bottom: 6px;} 55 | 56 | .msg.o{float: left;} 57 | .msg.g{float: right;} 58 | 59 | .msg .pip{position: absolute;bottom: 3px;width:13px;height: 15px;background-repeat: no-repeat;} 60 | .msg.o .pip{background-image: url(images/msg_pip_l.gif);left: 0;} 61 | .msg.g .pip{background-image: url(images/msg_pip_r.gif);right: 0;} 62 | .msg .ico{float:left;padding-top:0px;padding-right:6px;width:20px;height:20px;} 63 | .msg.i .ico{background: url(images/msg_pip_i.gif) no-repeat;} 64 | .msg.e .ico{background: url(images/msg_pip_e.gif) no-repeat;} 65 | 66 | .msg_b{ 67 | padding: 2px 5px 2px 5px; 68 | border-radius: 5px; 69 | -moz-border-radius: 5px; 70 | -webkit-border-radius: 5px; 71 | -webkit-box-shadow: 0 1px 1px #eff1f3, inset 0 0px 0px 1px #fff; 72 | -moz-box-shadow: 0 1px 1px #eff1f3, inset 0 0px 0px 1px #fff; 73 | box-shadow: 0 1px 1px #eff1f3, inset 0 0px 0px 1px #fff; 74 | } 75 | 76 | .msg.g .msg_b{text-align: right;float:right;margin-right: 11px;border: solid 1px #ccc;color: #666;display:inline;} 77 | .msg.o .msg_b{text-align: left;float:left;margin-left: 11px;border: solid 1px #bcd2ed;color: #03127a;display:inline;} 78 | .msg.i .msg_b{width:280px;margin:0 auto;text-align: left;border: solid 1px #a4f984;color: #218903;} 79 | .msg.e .msg_b{width:280px;margin:0 auto;text-align: left;border: solid 1px #f9d093;color: #ff3333;} 80 | 81 | .o_bg {background:#E7F0F8;} 82 | .g_bg{background:#F2F2F2;} 83 | .i_bg{background:#dffdd5;} 84 | .e_bg{background:#fdf2e1;} 85 | 86 | .msg_i{word-wrap: break-word;line-height:18px;} 87 | .msg.g .msg_i, .msg.o .msg_i{_width:expression(this.offsetWidth<25?"25px":this.offsetWidth>380?"380px":true);min-width: 25px;max-width: 380px;} 88 | .msg_t{color: #ccc;font-size: 10px;top: 0px;} 89 | .msg.g .msg_t{float: right;padding:6px 8px 0 0;} 90 | .msg.o .msg_t{float: left;padding:6px 0 0 8px;} 91 | 92 | /*工具栏*/ 93 | #guest #guest_tools{position:absolute;width:468px;height:28px;line-height:28px;top:388px;left:24px;overflow:hidden;padding:0 16px;margin:0;} 94 | #guest .smilies_div{position:absolute;top:308px;width:360px;left:76px;height:60px;background:#FDF4D0;overflow:hidden;border:1px solid #DB9106;padding:6px} 95 | #guest .smilies_div img {padding:3px;cursor:pointer;} 96 | #guest .colors_div{position:absolute;top:308px;width:256px;left:112px;height:60px;background:#FDF4D0;overflow:hidden;border:1px solid #DB9106;padding:6px} 97 | #guest .color_squares{float:left;width:26px;height:26px;margin:0 4px 4px 0;border:1px solid #6C6C6C;cursor:pointer;} 98 | 99 | .tools_sound_on, .tools_sound_hover, .tools_sound_off, 100 | .tools_color_on, .tools_color_hover, .tools_color_off, 101 | .tools_smile_on, .tools_smile_hover, .tools_smile_off, 102 | .tools_bold_on, .tools_bold_hover, .tools_bold_off, 103 | .tools_italic_on, .tools_italic_hover, .tools_italic_off, 104 | .tools_underline_on, .tools_underline_hover, .tools_underline_off, 105 | .tools_reset_hover, .tools_reset_off 106 | {float:left;margin-left:8px;height:28px;width:28px;line-height:28px;background:url(images/tools.gif) no-repeat;cursor:pointer;} 107 | 108 | .tools_sound_on {margin-left:0;background-position:0px -28px;} 109 | .tools_sound_hover {margin-left:0;background-position:0px 0px;} 110 | .tools_sound_off {margin-left:0;background-position:0px -56px;} 111 | 112 | .tools_color_on {background-position:-28px -28px;} 113 | .tools_color_hover {background-position:-28px 0px;} 114 | .tools_color_off {background-position:-28px -56px;} 115 | 116 | .tools_smile_on {background-position:-56px -28px;} 117 | .tools_smile_hover {background-position:-56px 0px;} 118 | .tools_smile_off {margin-left:8px;background-position:-56px -56px;} 119 | 120 | .tools_bold_on {background-position:-84px -28px;} 121 | .tools_bold_hover {background-position:-84px 0px;} 122 | .tools_bold_off {background-position:-84px -56px;} 123 | 124 | .tools_italic_on {background-position:-112px -28px;} 125 | .tools_italic_hover {background-position:-112px 0px;} 126 | .tools_italic_off {background-position:-112px -56px;} 127 | 128 | .tools_underline_on {background-position:-140px -28px;} 129 | .tools_underline_hover {background-position:-140px 0px;} 130 | .tools_underline_off {background-position:-140px -56px;} 131 | 132 | .tools_reset_hover {margin-left:224px;background-position:-224px 0;} 133 | .tools_reset_off {margin-left:224px;background-position:-224px -56px;} 134 | 135 | /*发表信息栏*/ 136 | #guest .ico_message{position:absolute;width:20px;top:420px;padding-left:4px;} 137 | #guest .message_div{position:absolute;border:1px solid #AB8104;background:#fff;width:486px;height:70px;top:420px;left:24px;padding:0 6px;overflow:hidden;} 138 | #guest .message{outline:none;resize:none;border:0;width:492px;height:70px;overflow:auto;overflow-x:hidden;padding:2px 0;margin:0;line-height:16px;} 139 | #guest .tools_send_div{position:absolute;width:120px;height:70px;top:420px;left:532px;overflow:hidden;} 140 | #guest .tools_send, #guest .tools_send_hover{color:#5F5F5F;font-size:18px;font-weight:700;text-align:center;background:url(images/guest_send.gif) no-repeat;height:70px;line-height:56px;white-space:nowrap;overflow:hidden;cursor:pointer;} 141 | #guest .tools_send_hover {color:#E37200;background-position:0px -70px;} 142 | 143 | /*底部*/ 144 | #guest_bottom{background:url(images/footer_bg2.gif) repeat-x;position:absolute;bottom:0px;left:0px;width:100%;height:22px;overflow:hidden} 145 | #guest .sysinfo_div {float:left;padding:4px 20px 0 8px;} 146 | #guest .status_ok {color:green;} 147 | #guest .status_err {color:#FF3300;display:none;} 148 | #guest #loading{float:left;padding:7px 20px 0 0;display:none;} 149 | #guest .copyright {float:right;display:inline;padding:4px 8px 0 0;color:#E1E1E1;} 150 | #guest_bottom a {color:#11F7EB;text-decoration:underline;} 151 | /*客人窗口 end*/ 152 | -------------------------------------------------------------------------------- /templates/x-images/x-b1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/x-images/x-b1.png -------------------------------------------------------------------------------- /templates/x-images/x-ctrls.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/x-images/x-ctrls.gif -------------------------------------------------------------------------------- /templates/x-images/x-l1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/x-images/x-l1.png -------------------------------------------------------------------------------- /templates/x-images/x-l2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/x-images/x-l2.png -------------------------------------------------------------------------------- /templates/x-images/x-r1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/x-images/x-r1.png -------------------------------------------------------------------------------- /templates/x-images/x-r2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/x-images/x-r2.png -------------------------------------------------------------------------------- /templates/x-images/x-t1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/x-images/x-t1.png -------------------------------------------------------------------------------- /templates/x-images/x-t2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/x-images/x-t2.png -------------------------------------------------------------------------------- /templates/x-images/x-t3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/x-images/x-t3.png -------------------------------------------------------------------------------- /templates/x-images/x-tt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/templates/x-images/x-tt.png -------------------------------------------------------------------------------- /vvc.php: -------------------------------------------------------------------------------- 1 | 450) 56 | { 57 | $red = mt_rand(0,255); 58 | $green = mt_rand(0,255); 59 | $blue = mt_rand(0,255); 60 | } 61 | 62 | $color=imagecolorallocate($buffer,$red,$green,$blue); 63 | imagestring($buffer,5,0,0,substr($password,$i,1),$color); 64 | 65 | imagecopyresized($buffer2,$buffer,2,-5,0,0,mt_rand(30,40),mt_rand(30,40),10,14); 66 | $buffer=imagerotate($buffer2,mt_rand(-25,25),$color_white); 67 | 68 | $xpos=$i/$stringlength*($width-30)+(($width-30)/$stringlength/2)+5+mt_rand(-8,8); 69 | $ypos=(($height-50)/2)+5+mt_rand(-8,8); 70 | 71 | imagecolortransparent($buffer,$color_white); 72 | 73 | imagecopymerge($image,$buffer,$xpos,$ypos,0,0,imagesx($buffer),imagesy($buffer),100); 74 | imagedestroy($buffer); 75 | imagedestroy($buffer2); 76 | } 77 | 78 | for($i=0;$i<12;$i++){ 79 | $color=imagecolorallocatealpha($image,mt_rand(0,200),mt_rand(0,200),mt_rand(0,200),110); 80 | imagefilledellipse($image,mt_rand(0,$width),mt_rand(0,$height),mt_rand(10,40),mt_rand(10,40),$color); 81 | } 82 | 83 | for($i=0;$i<12;$i++){ 84 | $color=imagecolorallocatealpha($image,mt_rand(0,200),mt_rand(0,200),mt_rand(0,200),110); 85 | imagesetthickness($image,mt_rand(8,20)); 86 | imageline($image,mt_rand(-$width*0.25,$width*1.25),mt_rand(-$height*0.25,$height*1.25), 87 | mt_rand(-$width*0.25,$width*1.25),mt_rand(-$height*0.25,$height*1.25), $color); 88 | imagesetthickness($image,1); 89 | } 90 | 91 | $sindivide=mt_rand(1,20); 92 | $sinwidth=mt_rand(1,$sindivide)/4; 93 | for ($i=0;$i<$height;$i++){ 94 | $buffer=imagecreatetruecolor($width,1); 95 | imagecopy($buffer,$image,0,0,0,$i,$width,1); 96 | imageline($image,0,$i,$width,$i,$color_white); 97 | imagecopy($image,$buffer,(sin($i/$sindivide)-.5)*2*$sinwidth,$i,0,0,$width,1); 98 | imagedestroy($buffer); 99 | } 100 | 101 | $sindivide=mt_rand(1,20); 102 | $sinwidth=mt_rand(1,$sindivide)/4; 103 | for ($i=0;$i<$width;$i++){ 104 | $buffer=imagecreatetruecolor(1,$height); 105 | imagecopy($buffer,$image,0,0,$i,0,1,$height); 106 | imageline($image,$i,0,$i,$width,$color_white); 107 | imagecopy($image,$buffer,$i,(sin($i/$sindivide)-.5)*2*$sinwidth,0,0,1,$height); 108 | imagedestroy($buffer); 109 | } 110 | 111 | $red_from=mt_rand(0,255); $red_to=mt_rand(0,255); 112 | $green_from=mt_rand(0,255); $green_to=mt_rand(0,255); 113 | $blue_from=mt_rand(0,255); $blue_to=mt_rand(0,255); 114 | 115 | for ($i=0;$i<$height;$i++){ 116 | $color=imagecolorallocatealpha($image,$red_from+($red_to-$red_from)/$height*$i,$green_from+($green_to-$green_from)/$height*$i,$blue_from+($blue_to-$blue_from)/$height*$i,100); 117 | imageline($image,0,$i,$width,$i,$color); 118 | } 119 | 120 | $red_from=mt_rand(0,255); $red_to=mt_rand(0,255); 121 | $green_from=mt_rand(0,255); $green_to=mt_rand(0,255); 122 | $blue_from=mt_rand(0,255); $blue_to=mt_rand(0,255); 123 | 124 | for ($i=0;$i<$width;$i++){ 125 | $color=imagecolorallocatealpha($image,$red_from+($red_to-$red_from)/$width*$i,$green_from+($green_to-$green_from)/$width*$i,$blue_from+($blue_to-$blue_from)/$width*$i,100); 126 | imageline($image,$i,0,$i,$height,$color); 127 | } 128 | 129 | $key = ForceIncomingInt('key'); 130 | 131 | if($key){ 132 | @$DB->exe("UPDATE ".TABLE_PREFIX."vvc SET code = '$password' WHERE vvcid = '$key'"); 133 | } 134 | 135 | header("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT"); 136 | header('Content-Type: image/png'); 137 | 138 | imagepng($image); 139 | imagedestroy($image); 140 | 141 | } 142 | 143 | Create_VVC_Image(); 144 | 145 | ?> -------------------------------------------------------------------------------- /waiting.php: -------------------------------------------------------------------------------- 1 | query("SELECT msg, biu, color FROM " . TABLE_PREFIX . "msg WHERE toid = '$gid' AND type = 1 AND fromid ='$uid' AND (created + minitime) > $ajax_last ORDER BY msgid ASC"); 32 | 33 | while($msg = $DB->fetch($getmsgs)){ 34 | $lines[] = WeLive(1, html($msg['msg']), 2, $msg['biu'], $msg['color']); 35 | } 36 | 37 | $sql = "SELECT u.userid, u.activated, u.isonline AS uisonline, g.guestid, g.isonline AS gisonline, g.isbanned FROM " . TABLE_PREFIX . "user u 38 | LEFT JOIN " . TABLE_PREFIX . "guest g ON g.serverid = u.userid AND g.guestid = '$gid' 39 | WHERE u.userid = '$uid' 40 | AND u.usergroupid <> 1"; 41 | 42 | $uginfo = $DB->getOne($sql); 43 | 44 | //验证客服和访客的状态 45 | if(!$uginfo['userid'] OR !$uginfo['activated'] OR !$uginfo['uisonline']){ 46 | $lines[] = 'offline'; 47 | }elseif(!$uginfo['guestid']){ 48 | $lines[] = 'kickout'; 49 | }elseif($uginfo['isbanned']){ 50 | $lines[] = 'banned'; 51 | }elseif($uginfo['guestid'] AND $act == 'sending'){ //发表信息 52 | $ajaxline = ForceIncomingString('ajaxline'); 53 | $ajaxbiu = ForceIncomingString('ajaxbiu', '000'); 54 | $ajaxcolor = ForceIncomingString('ajaxcolor', '0'); 55 | 56 | $DB->exe("INSERT INTO " . TABLE_PREFIX . "msg (fromid, toid, msg, biu, color, created, minitime, type) VALUES ('$gid', '$uid', '$ajaxline', '$ajaxbiu', '$ajaxcolor', '$realtime', '$minitime', 0)"); 57 | 58 | $lines[] = WeLive(2, html($ajaxline), 2, $ajaxbiu, $ajaxcolor); 59 | } 60 | 61 | if(!$uginfo['gisonline'] AND $uginfo['guestid']){ //客人如果不在线, 更新为在线状态 62 | $DB->exe("UPDATE " . TABLE_PREFIX . "guest SET isonline = 1, created = '$realtime' WHERE guestid = '$gid'"); 63 | } 64 | 65 | 66 | WeLiveSend($realtime + $minitime, $lines, $ajax_last, $DB->errno); 67 | 68 | ?> 69 | 70 | -------------------------------------------------------------------------------- /welive.php: -------------------------------------------------------------------------------- 1 | 0){ 60 | percent=Math.ceil(percent); 61 | }else{ 62 | percent=Math.floor(percent); 63 | } 64 | document.getElementById("welive-righDiv").style.top = parseInt(document.getElementById("welive-righDiv").style.top)+percent+"px"; 65 | document.getElementById("welive-closeDiv").style.top = parseInt(document.getElementById("welive-closeDiv").style.top)+percent+"px"; 66 | welive_lastScrollY=welive_lastScrollY+percent; 67 | } 68 | 69 | window.setInterval("welive_move()",1); 70 | 71 | var welive_panel_top = "" + 72 | 73 | "
" + 74 | 75 | "
" + 76 | 77 | "
" + 78 | 79 | "
"; 80 | 81 | var welive_panel_main = "
"; 82 | 83 | var welive_panel_foot = "
"; 84 | 85 | document.write(welive_panel_top); 86 | document.write(welive_panel_main); 87 | document.write(welive_panel_foot);'; 88 | 89 | } 90 | 91 | ?> 92 | 93 | -------------------------------------------------------------------------------- /welive_image.php: -------------------------------------------------------------------------------- 1 | getOne("SELECT u.userid FROM " . TABLE_PREFIX . "usergroup ug LEFT JOIN " . TABLE_PREFIX . "user u ON ug.usergroupid = u.usergroupid WHERE ug.usergroupid <>1 AND ug.activated = 1 AND u.activated = 1 AND u.isonline =1"); 31 | } 32 | 33 | 34 | if($_CFG['cActived']){ 35 | $thisUrl = urlencode(base64_encode($_SERVER['HTTP_REFERER'])); 36 | $iframe_height = $_CFG['cPanalHeight']; 37 | 38 | echo 'var welive_tt = 0; 39 | function welive_intval(v){ 40 | v = parseInt(v); 41 | return isNaN(v) ? 0 : v; 42 | } 43 | 44 | function welive_getpos(e){ 45 | var l = 0; 46 | var t = 0; 47 | while (e.offsetParent){ 48 | l += e.offsetLeft + (e.currentStyle?welive_intval(e.currentStyle.borderLeftWidth):0); 49 | t += e.offsetTop + (e.currentStyle?welive_intval(e.currentStyle.borderTopWidth):0); 50 | e = e.offsetParent; 51 | } 52 | l += e.offsetLeft + (e.currentStyle?welive_intval(e.currentStyle.borderLeftWidth):0); 53 | t += e.offsetTop + (e.currentStyle?welive_intval(e.currentStyle.borderTopWidth):0); 54 | return {x:l, y:t}; 55 | } 56 | 57 | function ShowWeLive(me) { 58 | clearTimeout(welive_tt); 59 | var ei = document.getElementById("welive-righDiv2"); 60 | if(!ei) return; 61 | 62 | var me_pos = welive_getpos(me); 63 | 64 | ei.style.top = me_pos.y + me.offsetHeight + "px"; 65 | ei.style.left = me_pos.x + "px"; 66 | ei.style.display = "block"; 67 | 68 | var welive_main2 = document.getElementById("welive_main2"); 69 | if(welive_main2){ 70 | welive_main2.innerHTML = ""; 71 | } 72 | 73 | ei.onmouseover = function() { 74 | clearTimeout(welive_tt); 75 | }; 76 | 77 | ei.onmouseout = function() { 78 | clearTimeout(welive_tt); 79 | welive_tt = setTimeout(function(){ 80 | ei.style.display = "none"; 81 | }, 200); 82 | }; 83 | 84 | me.onmouseover = function() { 85 | clearTimeout(welive_tt); 86 | }; 87 | 88 | me.onmouseout = function() { 89 | clearTimeout(welive_tt); 90 | welive_tt = setTimeout(function(){ 91 | ei.style.display = "none"; 92 | }, 800); 93 | }; 94 | } 95 | 96 | var welive_panel_top = "" + 97 | 98 | ""; 105 | 106 | document.write(welive_panel_top); 107 | document.write(welive_panel_main); 108 | document.write(welive_panel_foot);'; 109 | 110 | } 111 | 112 | ?> 113 | 114 | -------------------------------------------------------------------------------- /x-images/x-b1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/x-images/x-b1.png -------------------------------------------------------------------------------- /x-images/x-ctrls.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/x-images/x-ctrls.gif -------------------------------------------------------------------------------- /x-images/x-l1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/x-images/x-l1.png -------------------------------------------------------------------------------- /x-images/x-l2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/x-images/x-l2.png -------------------------------------------------------------------------------- /x-images/x-r1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/x-images/x-r1.png -------------------------------------------------------------------------------- /x-images/x-r2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/x-images/x-r2.png -------------------------------------------------------------------------------- /x-images/x-t1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/x-images/x-t1.png -------------------------------------------------------------------------------- /x-images/x-t2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/x-images/x-t2.png -------------------------------------------------------------------------------- /x-images/x-t3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/x-images/x-t3.png -------------------------------------------------------------------------------- /x-images/x-tt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/x-images/x-tt.png -------------------------------------------------------------------------------- /安装与使用帮助.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zsion/serverchat/93c9b28375ca5c5d06603db8a59f793503475371/安装与使用帮助.txt --------------------------------------------------------------------------------