├── README.md ├── ajax.php ├── config.php ├── cron.php ├── index.php ├── init.php ├── install ├── index.php └── install.sql ├── lib ├── api.php ├── class.tieba.php ├── commom.php ├── func.mysqli.php └── ui.php ├── login.php └── templates ├── css └── main.css ├── footer.php ├── header.php ├── index.php ├── js ├── ajax.js └── zepto.min.js ├── robot.php └── setting.php /README.md: -------------------------------------------------------------------------------- 1 | TBRobot_Simple 2 | ============== 3 | 百度贴吧机器人,可回复@和楼中楼对话 4 | 5 | ## 使用方法: 6 | 7 | 1. 访问 你的应用域名/install 进行安装 8 | 2. 登陆 进行相关设置 9 | 3. 设置 cron.php 的cron。 10 | 11 | ## The MIT License (MIT) 12 | 13 | Copyright (c) 2014 Giuem. 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE. 32 | -------------------------------------------------------------------------------- /ajax.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM user"); 11 | if($res) $row = $res->fetch_row(); 12 | if(!empty($row)){ 13 | header('Location: ..'); 14 | exit(); 15 | } 16 | } 17 | ?> 18 | 19 | 20 |
21 | 22 | 23 |请保证每一个项目都支持,否则不能正常使用
项目 | 检测结果 |
---|---|
CURL | '.check(function_exists('curl_init')).' |
MYSQLi | '.check(class_exists('mysqli')).' |
config.php是否可编辑 | '.check(is_writable($config_file)).'(如不可写请手动编辑) |
'.htmlspecialchars($config_content).'',1); 93 | } 94 | $un = addslashes($_POST['un']); 95 | $upwd = $_POST['upwd']; 96 | if(!$un || !$upwd) { 97 | showmsg('您输入的信息不完整',0); 98 | return ; 99 | } 100 | $upwd = md5($upwd); 101 | $sql = file_get_contents(dirname(__FILE__).'/install.sql'); 102 | $sql .= PHP_EOL."INSERT INTO user SET un='{$un}', upwd='{$upwd}';"; 103 | $m->multi_query($sql); 104 | echo '
安装完成,请配置机器人信息,然后设置 cron.php 每分钟一次的计划任务
'; 105 | echo '完成'; 106 | } 107 | 108 | 109 | function check($c){ 110 | if($c) 111 | return '支持'; 112 | else 113 | return '不支持'; 114 | } 115 | function showmsg($msg,$type=0){ 116 | $content = "Design by Giuem© Copyright 2014
4 |