616 changed files with 61996 additions and 35 deletions
@ -0,0 +1,2 @@ |
|||
.vscode |
|||
config/database.ini |
@ -0,0 +1 @@ |
|||
8bec5d05184fa430e594cafd50a68020 |
@ -0,0 +1 @@ |
|||
202ca7f83350f7987b48c24211077c87 |
@ -0,0 +1,170 @@ |
|||
<?php |
|||
include_once(dirname(__FILE__)."/library/publicBase.php"); |
|||
|
|||
class run extends publicBase { |
|||
public $control_name; |
|||
public $control_func; |
|||
|
|||
public function __construct() { |
|||
$this->beforecheckpara(); |
|||
$this->checkpara(); |
|||
$this->aftercheckpara(); |
|||
$this->action(); |
|||
$this->display(); |
|||
} |
|||
|
|||
private function beforecheckpara() { |
|||
} |
|||
|
|||
private function checkpara() { |
|||
$argv = trim(trim($_GET['argv']),'/'); |
|||
if(empty($argv)) { |
|||
$this->control_name = 'weibo'; |
|||
$this->control_func = 'home'; |
|||
} else { |
|||
$array = explode('/', $argv); |
|||
$this->control_name = $array[0]; |
|||
$this->control_func = !isset($array[1]) || $array[1]=='' ? 'home' : $array[1]; |
|||
|
|||
if(preg_match('/^(login|loginout).*/', $this->control_name)){ |
|||
$this->control_name = 'index'; |
|||
$this->control_func = $array[0]; |
|||
} |
|||
} |
|||
|
|||
// 还原GET |
|||
if(!empty($array)) { |
|||
unset($_GET['argv']); |
|||
unset($array[0]); |
|||
unset($array[1]); |
|||
|
|||
$count = count($array); |
|||
for($i=1;$i<=$count/2;$i++) { |
|||
$_GET[$array[$i*2]] = $array[$i*2+1]; |
|||
} |
|||
} |
|||
|
|||
// 如果URI带有常规传参形式,并入$_GET |
|||
$pos = strpos($_SERVER['REQUEST_URI'], '?'); |
|||
if($pos!==false) { |
|||
$new_uri = substr($_SERVER['REQUEST_URI'], $pos+1); |
|||
$new_uri_arr = explode("&", $new_uri); |
|||
foreach($new_uri_arr as $v) { |
|||
$new_para = explode("=", $v); |
|||
$_GET[$new_para[0]] = $new_para[1]; |
|||
} |
|||
} |
|||
} |
|||
|
|||
private function aftercheckpara() { |
|||
session_start(); |
|||
session_write_close(); |
|||
|
|||
//登陆检查 |
|||
$needlogin = true; |
|||
if ($this->control_name == 'index') { |
|||
if (preg_match('/^(ajax_login).*/', $this->control_func)) { |
|||
$needlogin = false; |
|||
} |
|||
}elseif($this->control_name == 'callback'){ |
|||
$needlogin = false; |
|||
} |
|||
|
|||
if($_POST['str'] == FREE_LOGIN_STR){ |
|||
$needlogin = false; |
|||
|
|||
if($this->control_name !== 'weibo' || $this->control_func == 'home') $this->ajax_json(false, '暂无权限'); |
|||
} |
|||
|
|||
if ($needlogin) { |
|||
$data = $this->checkAuth(); |
|||
if (!$data) $this->ajax_json(false, $this->getError()); |
|||
|
|||
$uobj = new mUser(); |
|||
$user_info = $uobj->getAdminUserByOpenid($data['openid']); |
|||
if(empty($user_info) || $user_info['status'] != 1) $this->ajax_json(false, '登陆失败'); |
|||
|
|||
if($this->control_name == 'weibo' && $user_info['aid'] != 1 && $user_info['is_super_admin'] != 1) $this->ajax_json(false, '暂无权限'); |
|||
|
|||
$this->view['_user_info'] = $this->para['_user_info'] = $user_info; |
|||
} |
|||
} |
|||
|
|||
private function action() { |
|||
$control_func = empty($this->control_func) ? 'home' : $this->control_func; |
|||
|
|||
// 判断控制层文件是否存在 |
|||
$control_path = dirname(__FILE__).'/control/'.$this->control_name.'.php'; |
|||
if(!file_exists($control_path)) { |
|||
die('/'.$this->control_name.'.php not exist.'); |
|||
} |
|||
include_once ($control_path); |
|||
|
|||
// 判断控制层方法是否存在 |
|||
$obj = new $this->control_name; |
|||
##如下根据情况传递公共变量值################## |
|||
if (is_array($this->para)) { |
|||
foreach ($this->para as $k=>$v) { |
|||
$func = 'set' . $k; |
|||
$obj->$func($v); |
|||
} |
|||
} |
|||
##如上根据情况传递公共变量值################## |
|||
if (method_exists($obj, $control_func)) { |
|||
$res = $obj->$control_func(); |
|||
} else { |
|||
die('method '.$this->control_func.' not exist.'); |
|||
} |
|||
|
|||
if($obj->getViewFormat()=='json' && $res===false) { |
|||
echo urldecode($obj->getError()); |
|||
exit; |
|||
} |
|||
|
|||
$this->view = array_merge($this->view, $obj->getView()); |
|||
$this->viewFormat = $obj->getViewFormat(); |
|||
$this->viewTpl = $obj->getViewTpl(); |
|||
} |
|||
|
|||
private function display() { |
|||
if($this->viewFormat=='json') { |
|||
$display = new DisplayJson(); |
|||
} elseif($this->viewFormat=='string') { |
|||
$display = new DisplayNone(); |
|||
} else { |
|||
$tpl_path = $this->viewTpl=='' ? $this->control_name.'/'.$this->control_func.'.html' : $this->viewTpl; |
|||
if(!file_exists(dirname(__FILE__) . '/view/templates/'.$tpl_path)) { // 判断模板是否存在 |
|||
die("{$tpl_path} not exist."); |
|||
} |
|||
$display = new DisplaySmarty($tpl_path); |
|||
} |
|||
|
|||
$display->setView($this->view); |
|||
$display->execute(); |
|||
} |
|||
|
|||
private function checkAuth() { |
|||
$auth = $_SERVER['HTTP_AUTHORIZATION']; |
|||
if (empty($auth)) { |
|||
$this->setError('token为空'); |
|||
return false; |
|||
} |
|||
|
|||
$jwtobj = new mJwt(); |
|||
$data = $jwtobj->getJwtDecode($auth); |
|||
if (!$data) { |
|||
$this->setError($jwtobj->getError()); |
|||
return false; |
|||
} |
|||
if (time() > $data['exp']) { |
|||
$this->setError('token过期'); |
|||
return false; |
|||
} |
|||
|
|||
return $data; |
|||
} |
|||
} |
|||
|
|||
new run(); |
|||
|
|||
|
@ -0,0 +1,6 @@ |
|||
<?php /* Smarty version 2.6.26, created on 2025-07-08 16:37:03 |
|||
compiled from include/footer.html */ ?> |
|||
<div class="leftSideFooterNew"> |
|||
<p>© 2024-2025 仁心堂 , Inc. All rights reserved. </p> |
|||
<p><a href="https://beian.miit.gov.cn" target="_blank"> 京ICP备2024089600号-2</a></p> |
|||
</div> |
File diff suppressed because one or more lines are too long
@ -0,0 +1,349 @@ |
|||
<?php /* Smarty version 2.6.26, created on 2025-07-15 09:26:11 |
|||
compiled from weibo/comment_detail.html */ ?> |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
|
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title>知识库</title> |
|||
<link rel="stylesheet" href="<?php echo @CSS_URL; ?> |
|||
/css/common.css?v=<?php echo @CSS_JS_VERSION; ?> |
|||
"> |
|||
<link rel="stylesheet" href="<?php echo @CSS_URL; ?> |
|||
/css/index.css?v=<?php echo @CSS_JS_VERSION; ?> |
|||
8"> |
|||
<script src="<?php echo @CSS_URL; ?> |
|||
/js/jquery-3.6.0.min.js"></script> |
|||
<?php echo ' |
|||
<style> |
|||
.comment-con,.comment-detail,.small-image-wrapper,.small-video-cover{ |
|||
margin-top: 20px; |
|||
} |
|||
.comment-title{ |
|||
margin-bottom: 20px; |
|||
color: green; |
|||
} |
|||
.small-image-wrapper{ |
|||
margin-bottom: 20px; |
|||
} |
|||
.small-image-wrapper{ |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
column-gap: 10px; |
|||
row-gap: 10px; |
|||
} |
|||
.comment-txt img{ |
|||
width: 20px; |
|||
height: 20px; |
|||
} |
|||
.small-image-img{ |
|||
width: 100%; |
|||
height: 100%; |
|||
margin-bottom: 20px; |
|||
} |
|||
#next-page,#prev-page{ |
|||
cursor: pointer; |
|||
} |
|||
</style> |
|||
'; ?> |
|||
|
|||
</head> |
|||
|
|||
<body> |
|||
<div class="home-page"> |
|||
<?php $_smarty_tpl_vars = $this->_tpl_vars; |
|||
$this->_smarty_include(array('smarty_include_tpl_file' => "include/header.html", 'smarty_include_vars' => array())); |
|||
$this->_tpl_vars = $_smarty_tpl_vars; |
|||
unset($_smarty_tpl_vars); |
|||
?> |
|||
<div class="home-main-content"> |
|||
<div class="tab-list index-nav-wrap flex"> |
|||
<ul class="tab-wrap"> |
|||
<li class="index-nav-wrap-li" type="1"><span <?php if ($_GET['search_type'] == '1'): ?>class="active"<?php endif; ?>>选中评论</span></li> |
|||
<li class="index-nav-wrap-li" type="0"><span <?php if ($_GET['search_type'] == '0'): ?>class="active"<?php endif; ?>>剔除评论</span></li> |
|||
<li class="index-nav-wrap-li" type="-1"><span <?php if ($_GET['search_type'] == "-1"): ?>class="active"<?php endif; ?>>全部评论</span></li> |
|||
</ul> |
|||
</div> |
|||
|
|||
<div class="comment-con"> |
|||
<div class="comment-title">微博内容:</div> |
|||
|
|||
<div class="list_item_top flex"> |
|||
<div class="list_item_top_l"> |
|||
<span class="green">微博</span> |
|||
<b class="refer_text"></b> |
|||
<span class="name">张宝旬</span> |
|||
<span>录入:<?php echo $this->_tpl_vars['data']['created_at']; ?> |
|||
</span> |
|||
<a href="https://m.weibo.cn/detail/<?php echo $this->_tpl_vars['data']['wid']; ?> |
|||
" target="_blank">微博地址</a> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="comment-detail"> |
|||
<?php echo $this->_tpl_vars['data']['text']; ?> |
|||
|
|||
</div> |
|||
|
|||
<?php if ($this->_tpl_vars['data']['pic_arr']): ?> |
|||
<div class="small-image-wrapper"> |
|||
<?php $_from = $this->_tpl_vars['data']['pic_arr']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)): |
|||
foreach ($_from as $this->_tpl_vars['item']): |
|||
?> |
|||
<div class="small-image"> |
|||
<span class="small-image-desc">图片</span> |
|||
<img src="<?php echo $this->_tpl_vars['item']; ?> |
|||
" alt="Small Image" class="small-image-img"> |
|||
<img class="delete-btn hide" src="../images/delete-icon.svg" alt="Small Image"> |
|||
</div> |
|||
<?php endforeach; endif; unset($_from); ?> |
|||
</div> |
|||
<?php endif; ?> |
|||
|
|||
<?php if ($this->_tpl_vars['data']['video_url']): ?> |
|||
<div class="small-video-cover" href="<?php echo $this->_tpl_vars['data']['video_url']; ?> |
|||
"> |
|||
<span class="small-image-desc">视频</span> |
|||
<img class="small-video-show" src="<?php if ($this->_tpl_vars['data']['video_cover']): ?><?php echo $this->_tpl_vars['data']['video_cover']; ?> |
|||
<?php else: ?>'../images/vedio_img.png'<?php endif; ?>" alt="Video Cover"> |
|||
<img src="../images/play.svg" class="play-video" alt="...丢了"> |
|||
</div> |
|||
<?php endif; ?> |
|||
|
|||
<?php if ($this->_tpl_vars['comment_list']): ?> |
|||
<div class="comment-list"> |
|||
<div class="comment-title">评论内容:</div> |
|||
<?php $_from = $this->_tpl_vars['comment_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)): |
|||
foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['item']): |
|||
?> |
|||
<div class="list_item_top flex" style="margin-top: 20px;" idattr="<?php echo $this->_tpl_vars['item']['id']; ?> |
|||
"> |
|||
<div class="list_item_top_l"> |
|||
<!-- <span class="green">评论</span> --> |
|||
<b class="refer_text"></b> |
|||
<span class="name"><?php echo $this->_tpl_vars['key']+1; ?> |
|||
.<?php echo $this->_tpl_vars['item']['screen_name']; ?> |
|||
</span> |
|||
<span><?php echo $this->_tpl_vars['item']['comment_time']; ?> |
|||
<?php echo $this->_tpl_vars['item']['source']; ?> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="list_item_top flex" style="margin-top: 10px;"> |
|||
<div class="list_item_top_l"> |
|||
<span class="green">评论</span> |
|||
<b class="refer_text"></b> |
|||
<span class="name comment-txt"><?php echo $this->_tpl_vars['item']['content']; ?> |
|||
</span> |
|||
<span class="<?php if ($this->_tpl_vars['item']['is_search'] == 1): ?>green<?php elseif ($this->_tpl_vars['item']['is_search'] == 0): ?>red<?php elseif ($this->_tpl_vars['item']['is_search'] == 0): ?>grey<?php endif; ?>"><?php echo $this->_tpl_vars['search_status_list'][$this->_tpl_vars['item']['is_search']]; ?> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<?php endforeach; endif; unset($_from); ?> |
|||
</div> |
|||
<?php endif; ?> |
|||
</div> |
|||
|
|||
<div class="pagination" v-if="total > 0"> |
|||
<img id="prev-page" src="/images/prev.svg" alt=""> |
|||
|
|||
<ul id="page-numbers"> |
|||
<?php if ($this->_tpl_vars['last_page'] <= 6): ?> |
|||
<?php unset($this->_sections['num']); |
|||
$this->_sections['num']['name'] = 'num'; |
|||
$this->_sections['num']['loop'] = is_array($_loop=$this->_tpl_vars['last_page']) ? count($_loop) : max(0, (int)$_loop); unset($_loop); |
|||
$this->_sections['num']['show'] = true; |
|||
$this->_sections['num']['max'] = $this->_sections['num']['loop']; |
|||
$this->_sections['num']['step'] = 1; |
|||
$this->_sections['num']['start'] = $this->_sections['num']['step'] > 0 ? 0 : $this->_sections['num']['loop']-1; |
|||
if ($this->_sections['num']['show']) { |
|||
$this->_sections['num']['total'] = $this->_sections['num']['loop']; |
|||
if ($this->_sections['num']['total'] == 0) |
|||
$this->_sections['num']['show'] = false; |
|||
} else |
|||
$this->_sections['num']['total'] = 0; |
|||
if ($this->_sections['num']['show']): |
|||
|
|||
for ($this->_sections['num']['index'] = $this->_sections['num']['start'], $this->_sections['num']['iteration'] = 1; |
|||
$this->_sections['num']['iteration'] <= $this->_sections['num']['total']; |
|||
$this->_sections['num']['index'] += $this->_sections['num']['step'], $this->_sections['num']['iteration']++): |
|||
$this->_sections['num']['rownum'] = $this->_sections['num']['iteration']; |
|||
$this->_sections['num']['index_prev'] = $this->_sections['num']['index'] - $this->_sections['num']['step']; |
|||
$this->_sections['num']['index_next'] = $this->_sections['num']['index'] + $this->_sections['num']['step']; |
|||
$this->_sections['num']['first'] = ($this->_sections['num']['iteration'] == 1); |
|||
$this->_sections['num']['last'] = ($this->_sections['num']['iteration'] == $this->_sections['num']['total']); |
|||
?> |
|||
<span class="<?php if ($this->_tpl_vars['cur_page'] == ( $this->_sections['num']['index']+1 )): ?>pagActive<?php endif; ?>" page="<?php echo $this->_sections['num']['index']+1; ?> |
|||
"><?php echo $this->_sections['num']['index']+1; ?> |
|||
</span> |
|||
<?php endfor; endif; ?> |
|||
<?php endif; ?> |
|||
|
|||
<?php if ($this->_tpl_vars['last_page'] > 6): ?> |
|||
<?php if ($this->_tpl_vars['cur_page'] <= 5): ?> |
|||
<?php unset($this->_sections['num']); |
|||
$this->_sections['num']['name'] = 'num'; |
|||
$this->_sections['num']['loop'] = is_array($_loop=5) ? count($_loop) : max(0, (int)$_loop); unset($_loop); |
|||
$this->_sections['num']['show'] = true; |
|||
$this->_sections['num']['max'] = $this->_sections['num']['loop']; |
|||
$this->_sections['num']['step'] = 1; |
|||
$this->_sections['num']['start'] = $this->_sections['num']['step'] > 0 ? 0 : $this->_sections['num']['loop']-1; |
|||
if ($this->_sections['num']['show']) { |
|||
$this->_sections['num']['total'] = $this->_sections['num']['loop']; |
|||
if ($this->_sections['num']['total'] == 0) |
|||
$this->_sections['num']['show'] = false; |
|||
} else |
|||
$this->_sections['num']['total'] = 0; |
|||
if ($this->_sections['num']['show']): |
|||
|
|||
for ($this->_sections['num']['index'] = $this->_sections['num']['start'], $this->_sections['num']['iteration'] = 1; |
|||
$this->_sections['num']['iteration'] <= $this->_sections['num']['total']; |
|||
$this->_sections['num']['index'] += $this->_sections['num']['step'], $this->_sections['num']['iteration']++): |
|||
$this->_sections['num']['rownum'] = $this->_sections['num']['iteration']; |
|||
$this->_sections['num']['index_prev'] = $this->_sections['num']['index'] - $this->_sections['num']['step']; |
|||
$this->_sections['num']['index_next'] = $this->_sections['num']['index'] + $this->_sections['num']['step']; |
|||
$this->_sections['num']['first'] = ($this->_sections['num']['iteration'] == 1); |
|||
$this->_sections['num']['last'] = ($this->_sections['num']['iteration'] == $this->_sections['num']['total']); |
|||
?> |
|||
<span class="<?php if ($this->_tpl_vars['cur_page'] == ( $this->_sections['num']['index']+1 )): ?>pagActive<?php endif; ?>" page="<?php echo $this->_sections['num']['index']+1; ?> |
|||
"><?php echo $this->_sections['num']['index']+1; ?> |
|||
</span> |
|||
<?php endfor; endif; ?> |
|||
<span>...</span> |
|||
<span page="<?php echo $this->_tpl_vars['last_page']; ?> |
|||
"><?php echo $this->_tpl_vars['last_page']; ?> |
|||
</span> |
|||
<?php elseif ($this->_tpl_vars['cur_page'] > $this->_tpl_vars['last_page']-5): ?> |
|||
<span page="1">1</span> |
|||
<span>...</span> |
|||
|
|||
<?php unset($this->_sections['num']); |
|||
$this->_sections['num']['name'] = 'num'; |
|||
$this->_sections['num']['loop'] = is_array($_loop=5) ? count($_loop) : max(0, (int)$_loop); unset($_loop); |
|||
$this->_sections['num']['show'] = true; |
|||
$this->_sections['num']['max'] = $this->_sections['num']['loop']; |
|||
$this->_sections['num']['step'] = 1; |
|||
$this->_sections['num']['start'] = $this->_sections['num']['step'] > 0 ? 0 : $this->_sections['num']['loop']-1; |
|||
if ($this->_sections['num']['show']) { |
|||
$this->_sections['num']['total'] = $this->_sections['num']['loop']; |
|||
if ($this->_sections['num']['total'] == 0) |
|||
$this->_sections['num']['show'] = false; |
|||
} else |
|||
$this->_sections['num']['total'] = 0; |
|||
if ($this->_sections['num']['show']): |
|||
|
|||
for ($this->_sections['num']['index'] = $this->_sections['num']['start'], $this->_sections['num']['iteration'] = 1; |
|||
$this->_sections['num']['iteration'] <= $this->_sections['num']['total']; |
|||
$this->_sections['num']['index'] += $this->_sections['num']['step'], $this->_sections['num']['iteration']++): |
|||
$this->_sections['num']['rownum'] = $this->_sections['num']['iteration']; |
|||
$this->_sections['num']['index_prev'] = $this->_sections['num']['index'] - $this->_sections['num']['step']; |
|||
$this->_sections['num']['index_next'] = $this->_sections['num']['index'] + $this->_sections['num']['step']; |
|||
$this->_sections['num']['first'] = ($this->_sections['num']['iteration'] == 1); |
|||
$this->_sections['num']['last'] = ($this->_sections['num']['iteration'] == $this->_sections['num']['total']); |
|||
?> |
|||
<span class="<?php if ($this->_tpl_vars['cur_page'] == ( $this->_tpl_vars['last_page']-5+$this->_sections['num']['index']+1 )): ?>pagActive<?php endif; ?>" page="<?php echo $this->_tpl_vars['last_page']-5+$this->_sections['num']['index']+1; ?> |
|||
"><?php echo $this->_tpl_vars['last_page']-5+$this->_sections['num']['index']+1; ?> |
|||
</span> |
|||
<?php endfor; endif; ?> |
|||
|
|||
<?php else: ?> |
|||
<span page="1">1</span> |
|||
<span>...</span> |
|||
<?php unset($this->_sections['num']); |
|||
$this->_sections['num']['name'] = 'num'; |
|||
$this->_sections['num']['loop'] = is_array($_loop=5) ? count($_loop) : max(0, (int)$_loop); unset($_loop); |
|||
$this->_sections['num']['show'] = true; |
|||
$this->_sections['num']['max'] = $this->_sections['num']['loop']; |
|||
$this->_sections['num']['step'] = 1; |
|||
$this->_sections['num']['start'] = $this->_sections['num']['step'] > 0 ? 0 : $this->_sections['num']['loop']-1; |
|||
if ($this->_sections['num']['show']) { |
|||
$this->_sections['num']['total'] = $this->_sections['num']['loop']; |
|||
if ($this->_sections['num']['total'] == 0) |
|||
$this->_sections['num']['show'] = false; |
|||
} else |
|||
$this->_sections['num']['total'] = 0; |
|||
if ($this->_sections['num']['show']): |
|||
|
|||
for ($this->_sections['num']['index'] = $this->_sections['num']['start'], $this->_sections['num']['iteration'] = 1; |
|||
$this->_sections['num']['iteration'] <= $this->_sections['num']['total']; |
|||
$this->_sections['num']['index'] += $this->_sections['num']['step'], $this->_sections['num']['iteration']++): |
|||
$this->_sections['num']['rownum'] = $this->_sections['num']['iteration']; |
|||
$this->_sections['num']['index_prev'] = $this->_sections['num']['index'] - $this->_sections['num']['step']; |
|||
$this->_sections['num']['index_next'] = $this->_sections['num']['index'] + $this->_sections['num']['step']; |
|||
$this->_sections['num']['first'] = ($this->_sections['num']['iteration'] == 1); |
|||
$this->_sections['num']['last'] = ($this->_sections['num']['iteration'] == $this->_sections['num']['total']); |
|||
?> |
|||
<span class="<?php if ($this->_tpl_vars['cur_page'] == ( $this->_tpl_vars['cur_page']-2+$this->_sections['num']['index'] )): ?>pagActive<?php endif; ?>" page="<?php echo $this->_tpl_vars['cur_page']-2+$this->_sections['num']['index']; ?> |
|||
"><?php echo $this->_tpl_vars['cur_page']-2+$this->_sections['num']['index']; ?> |
|||
</span> |
|||
<?php endfor; endif; ?> |
|||
<span>...</span> |
|||
<span page="<?php echo $this->_tpl_vars['last_page']; ?> |
|||
"><?php echo $this->_tpl_vars['last_page']; ?> |
|||
</span> |
|||
<?php endif; ?> |
|||
<?php endif; ?> |
|||
</ul> |
|||
|
|||
<img id="next-page" src="/images/next.svg" alt=""> |
|||
<div class="input-page"> |
|||
<span>前往</span> |
|||
<input type="number" id="jump-to-page" min="1" placeholder="页码"> |
|||
<span>页</span> |
|||
</div> |
|||
<button id="go-to-page">跳转</button> |
|||
</div> |
|||
|
|||
</div> |
|||
<?php $_smarty_tpl_vars = $this->_tpl_vars; |
|||
$this->_smarty_include(array('smarty_include_tpl_file' => "include/footer.html", 'smarty_include_vars' => array())); |
|||
$this->_tpl_vars = $_smarty_tpl_vars; |
|||
unset($_smarty_tpl_vars); |
|||
?> |
|||
</div> |
|||
|
|||
<div id="hidecomments" style="display: none;"></div> |
|||
<div id="last_page" style="display: none;"><?php echo $this->_tpl_vars['last_page']; ?> |
|||
</div> |
|||
|
|||
</body> |
|||
|
|||
<?php echo ' |
|||
<script> |
|||
$(\'.index-nav-wrap-li\').click(function(){ |
|||
var type = $(this).attr(\'type\') |
|||
window.location.href = location.href.replace(/\\&search\\_type=(\\-)?\\d+/, \'\').replace(/\\&page=\\d+/, \'\') +\'&search_type=\'+type |
|||
}) |
|||
|
|||
$(\'#page-numbers span\').click(function(){ |
|||
var page = $(this).attr(\'page\') |
|||
if(!page) return; |
|||
location.href = location.href.replace(/\\&page=\\d+/, \'\') +\'&page=\'+page |
|||
}) |
|||
|
|||
$(\'#next-page\').click(function(){ |
|||
var page = parseInt($(\'#page-numbers span.pagActive\').attr(\'page\')) + 1 |
|||
if(page > parseInt($(\'#last_page\').text())) return; |
|||
|
|||
location.href = location.href.replace(/\\&page=\\d+/, \'\') +\'&page=\'+page |
|||
}) |
|||
|
|||
$(\'#prev-page\').click(function(){ |
|||
var page = parseInt($(\'#page-numbers span.pagActive\').attr(\'page\')) - 1 |
|||
if(page < 1) return; |
|||
location.href = location.href.replace(/\\&page=\\d+/, \'\') +\'&page=\'+page |
|||
}) |
|||
|
|||
$(\'#go-to-page\').click(function(){ |
|||
var page = $(\'#jump-to-page\').val() |
|||
if(page > parseInt($(\'#last_page\').text())) page = parseInt($(\'#last_page\').text()) |
|||
if(page < 1) page = 1 |
|||
location.href = location.href.replace(/\\&page=\\d+/, \'\') +\'&page=\'+page |
|||
}) |
|||
</script> |
|||
'; ?> |
|||
|
|||
|
|||
</html> |
@ -0,0 +1,192 @@ |
|||
<?php /* Smarty version 2.6.26, created on 2025-07-14 11:41:03 |
|||
compiled from weibo/home.html */ ?> |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
|
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title>知识库</title> |
|||
<link rel="stylesheet" href="<?php echo @CSS_URL; ?> |
|||
/css/common.css?v=<?php echo @CSS_JS_VERSION; ?> |
|||
"> |
|||
<link rel="stylesheet" href="<?php echo @CSS_URL; ?> |
|||
/css/index.css?v=<?php echo @CSS_JS_VERSION; ?> |
|||
"> |
|||
<script src="<?php echo @CSS_URL; ?> |
|||
/js/jquery-3.6.0.min.js"></script> |
|||
</head> |
|||
|
|||
<body> |
|||
<div class="home-page"> |
|||
<?php $_smarty_tpl_vars = $this->_tpl_vars; |
|||
$this->_smarty_include(array('smarty_include_tpl_file' => "include/header.html", 'smarty_include_vars' => array())); |
|||
$this->_tpl_vars = $_smarty_tpl_vars; |
|||
unset($_smarty_tpl_vars); |
|||
?> |
|||
|
|||
<div class="home-main-content"> |
|||
<div class="home-main"> |
|||
<div class="tab-list index-nav-wrap flex"> |
|||
<ul class="tab-wrap"> |
|||
<li class="index-nav-wrap-li" type="1"><span class="active">待审批</span></li> |
|||
<li class="index-nav-wrap-li" type="2"><span>已审批</span></li> |
|||
<li class="index-nav-wrap-li" type="3"><span>已删除</span></li> |
|||
</ul> |
|||
<button class="addNewBtn"> |
|||
<img src="<?php echo @CSS_URL; ?> |
|||
/images/add.svg" alt="">新增自录入 |
|||
</button> |
|||
</div> |
|||
|
|||
|
|||
<div class="list_all" id="data-list"> |
|||
</div> |
|||
|
|||
|
|||
<!-- 数据列表 --> |
|||
<!-- <ul id="data-list"></ul> --> |
|||
|
|||
<!-- 分页控件 --> |
|||
<div class="pagination hide"> |
|||
<img id="prev-page" src="<?php echo @CSS_URL; ?> |
|||
/images/prev.svg" alt=""> |
|||
<ul id="page-numbers"></ul> |
|||
<img id="next-page" src="<?php echo @CSS_URL; ?> |
|||
/images/next.svg" alt=""> |
|||
<div class="input-page"> |
|||
<span>前往</span> |
|||
<input type="number" id="jump-to-page" min="1" placeholder="页码"> |
|||
<span>页</span> |
|||
</div> |
|||
<button id="go-to-page">跳转</button> |
|||
</div> |
|||
|
|||
<!-- 放大后的图片容器 --> |
|||
<div id="large-image-container"> |
|||
<h2>预览</h2> |
|||
<img id="large-image" src="<?php echo @CSS_URL; ?> |
|||
/images/viewimg1.png" alt="Large Image"> |
|||
<span id="close-btn2">×</span> |
|||
</div> |
|||
|
|||
<!-- 放大后的视频容器 --> |
|||
<div id="large-video-container"> |
|||
<video id="large-video" controls> |
|||
<source id="large-viedo-url" src="" type="video/mp4"> |
|||
Your browser does not support the video tag. |
|||
</video> |
|||
<button id="close-btn">×</button> |
|||
</div> |
|||
|
|||
<!-- 弹框 --> |
|||
<div class="modal-overlay"></div> |
|||
<div class="modal"> |
|||
<div class="modal_top"> |
|||
<b id="header_title">编辑</b> |
|||
<img src="<?php echo @CSS_URL; ?> |
|||
/images/close_modal.svg" id="close_modal" alt=""> |
|||
</div> |
|||
|
|||
<div class="add-form"> |
|||
<div class="form-item radio-form"> |
|||
<input type="hidden" id="id" value=""> |
|||
<div class="form-left"> |
|||
录入形式 |
|||
</div> |
|||
<div class="form-right radio-wrap flex"> |
|||
<div class="radio_box radio_box_active"> |
|||
<input value="1" type="radio"id="edu1"> |
|||
<div></div> |
|||
<label >信息段录入</label> |
|||
</div> |
|||
<div class="radio_box"> |
|||
<input value="2" type="radio"id="edu2"> |
|||
<div></div> |
|||
<label >问答式录入</label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-item normal-form" style="display: none;"> |
|||
<div class="form-left"> |
|||
提问信息 |
|||
</div> |
|||
<div class="form-right"> |
|||
<div class="text-area-container"> |
|||
<textarea class="edit-input normal-input" ></textarea> |
|||
<div class="char-count wordNum">0/200</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-item"> |
|||
<div class="form-left common-input"> |
|||
回答信息 |
|||
</div> |
|||
<div class="form-right"> |
|||
<div class="text-area-container"> |
|||
<textarea class="edit-input answer-input" ></textarea> |
|||
<div class="char-count1 wordNum">0/200</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<?php echo ' |
|||
<script> |
|||
const maxLength = 100; // 设置最大字数限制 |
|||
$(\'.normal-input\').on(\'input\', function () { |
|||
var currentLength = $(this).val().length; |
|||
$(\'.char-count\').text(currentLength + \'/\' + maxLength); |
|||
if (currentLength > maxLength) { |
|||
$(\'.normal-input\').val($(\'.normal-input\').val().slice(0, maxLength)) |
|||
$(\'.char-count\').text(maxLength + \'/\' + maxLength); |
|||
} |
|||
}); |
|||
$(\'.answer-input\').on(\'input\', function () { |
|||
var currentLength = $(this).val().length; |
|||
$(\'.char-count1\').text(currentLength + \'/\' + maxLength); |
|||
if (currentLength > maxLength) { |
|||
$(\'.answer-input\').val($(\'.answer-input\').val().slice(0, maxLength)) |
|||
$(\'.char-count1\').text(maxLength + \'/\' + maxLength); |
|||
} |
|||
}); |
|||
</script> |
|||
'; ?> |
|||
|
|||
<div class="img_list2" style="display: none;"></div> |
|||
<div class="preview"></div> |
|||
|
|||
<div class="modal_upload_btn flex hide"> |
|||
<div class="flex modal_btns"> |
|||
<button id="upload-image-btn" class="button upload_btn"> |
|||
<img src="<?php echo @CSS_URL; ?> |
|||
/images/img_upload.svg" alt="">上传图片 |
|||
</button> |
|||
<button id="upload-video-btn" class="button upload_btn"> |
|||
<img src="<?php echo @CSS_URL; ?> |
|||
/images/vedio_upload.svg" alt="">上传视频 |
|||
</button> |
|||
</div> |
|||
<p>支持 jpg、png、mp4 格式,单个文件不超过 10MB</p> |
|||
</div> |
|||
<input type="file" id="upload-image" accept="image/*" style="display: none;" multiple> |
|||
<input type="file" id="upload-video" accept="video/*" style="display: none;" multiple> |
|||
<div class="buttons flex"> |
|||
<button id="submit" class="button ">仅保存</button> |
|||
<button id="savePass" class="button button-primary">保存并通过审批</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<?php $_smarty_tpl_vars = $this->_tpl_vars; |
|||
$this->_smarty_include(array('smarty_include_tpl_file' => "include/footer.html", 'smarty_include_vars' => array())); |
|||
$this->_tpl_vars = $_smarty_tpl_vars; |
|||
unset($_smarty_tpl_vars); |
|||
?> |
|||
</div> |
|||
</body> |
|||
<script src="<?php echo @CSS_URL; ?> |
|||
/js/index.js?v=<?php echo @CSS_JS_VERSION; ?> |
|||
"></script> |
|||
|
|||
</html> |
@ -0,0 +1,152 @@ |
|||
<?php /* Smarty version 2.6.26, created on 2025-07-08 17:04:01 |
|||
compiled from index/user_list.html */ ?> |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
|
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title>知识库</title> |
|||
<link rel="stylesheet" href="<?php echo @CSS_URL; ?> |
|||
/css/common.css?v=<?php echo @CSS_JS_VERSION; ?> |
|||
"> |
|||
<link rel="stylesheet" href="<?php echo @CSS_URL; ?> |
|||
/css/subCount.css?v=<?php echo @CSS_JS_VERSION; ?> |
|||
"> |
|||
<script src="https://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script> |
|||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"> |
|||
<script src="<?php echo @CSS_URL; ?> |
|||
/js/jquery-3.6.0.min.js"></script> |
|||
|
|||
</head> |
|||
|
|||
<body> |
|||
<div class="subCount-page"> |
|||
<?php $_smarty_tpl_vars = $this->_tpl_vars; |
|||
$this->_smarty_include(array('smarty_include_tpl_file' => "include/header.html", 'smarty_include_vars' => array())); |
|||
$this->_tpl_vars = $_smarty_tpl_vars; |
|||
unset($_smarty_tpl_vars); |
|||
?> |
|||
<div class="subCount-main-content"> |
|||
<div class="subCount-main"> |
|||
<div class="tab-list flex"> |
|||
<b>子账号管理</b> |
|||
<button class="addNewBtn"> |
|||
<img src="<?php echo @CSS_URL; ?> |
|||
/images/add.svg" alt="">新增自子账号 |
|||
</button> |
|||
</div> |
|||
<table id="dataTable"> |
|||
<thead> |
|||
<tr> |
|||
<?php if ($this->_tpl_vars['_user_info']['aid'] == 0): ?> |
|||
<th>AID</th> |
|||
<?php endif; ?> |
|||
<th>账号昵称</th> |
|||
<th>姓名</th> |
|||
<th>添加时间</th> |
|||
<th>启用状态</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody id="tbody-wrap"> |
|||
</tbody> |
|||
</table> |
|||
|
|||
<div id="editPopover" class="popover"> |
|||
<div> |
|||
<span>备注</span> |
|||
<input type="text" id="editInput"> |
|||
</div> |
|||
<div class="flex" style="justify-content: flex-end;"> |
|||
<button id="cancelBtn">取消</button> |
|||
<button id="confirmBtn">确定</button> |
|||
</div> |
|||
<!-- <img src="<?php echo @CSS_URL; ?> |
|||
/images/appendIcon.png" alt=""> --> |
|||
</div> |
|||
|
|||
|
|||
<!-- 分页控件 --> |
|||
<div class="pagination hide"> |
|||
<img id="prev-page" src="<?php echo @CSS_URL; ?> |
|||
/images/prev.svg" alt=""> |
|||
<ul id="page-numbers"></ul> |
|||
<img id="next-page" src="<?php echo @CSS_URL; ?> |
|||
/images/next.svg" alt=""> |
|||
<div class="input-page"> |
|||
<span>前往</span> |
|||
<input type="number" id="jump-to-page" min="1" placeholder="页码"> |
|||
<span>页</span> |
|||
</div> |
|||
<button id="go-to-page">跳转</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="modal-overlay"></div> |
|||
|
|||
<div class="addChildNumWrap"> |
|||
<h3>新增子账号</h3> |
|||
<?php if ($this->_tpl_vars['bind_user_info']): ?> |
|||
<img class="temImg" src="../../images/userTem.png" alt=""> |
|||
<?php else: ?> |
|||
<div id="login_container" class="temImg"> |
|||
<?php echo ' |
|||
<script> |
|||
var obj = new WxLogin({ |
|||
id: "login_container", |
|||
appid: "'; ?> |
|||
<?php echo $this->_tpl_vars['appid']; ?> |
|||
<?php echo '",
|
|||
scope: "snsapi_login", |
|||
redirect_uri: "'; ?> |
|||
<?php echo $this->_tpl_vars['redirect_uri']; ?> |
|||
<?php echo '",
|
|||
state: "'; ?> |
|||
<?php echo $this->_tpl_vars['state']; ?> |
|||
<?php echo '",
|
|||
style: "black", |
|||
href:\'data:text/css;base64,LmltcG93ZXJCb3ggLnFyY29kZSB7d2lkdGg6IDIyMHB4O2JvcmRlcjpub25lO21hcmdpbi10b3A6MHB4O30KLmltcG93ZXJCb3ggLnRpdGxlIHtkaXNwbGF5OiBub25lO30KLmltcG93ZXJCb3ggLmluZm8ge3dpZHRoOiAyMjBweDtkaXNwbGF5Om5vbmU7fQouc3RhdHVzX2ljb24ge2Rpc3BsYXk6IG5vbmV9Ci5pbXBvd2VyQm94IC5zdGF0dXMge3RleHQtYWxpZ246IGNlbnRlcjt9\' |
|||
}); |
|||
</script> |
|||
'; ?> |
|||
|
|||
</div> |
|||
<?php endif; ?> |
|||
<div class="scanSuccess code-filter column <?php if (! $this->_tpl_vars['bind_user_info']): ?>hide<?php endif; ?>"> |
|||
<img src="<?php echo @CSS_URL; ?> |
|||
/images/step_success.png" alt=""> |
|||
<span class="scanSuccessText"><?php echo $this->_tpl_vars['bind_user_info']['nickname']; ?> |
|||
,扫码成功</span> |
|||
</div> |
|||
<p class="flex" style="text-align: center;"> |
|||
<img src="<?php echo @CSS_URL; ?> |
|||
/images/weixin.svg" alt=""> |
|||
微信扫码,绑定子账号 |
|||
</p> |
|||
<div class="scanSuccess name column <?php if (! $this->_tpl_vars['bind_user_info']): ?>hide<?php endif; ?>"> |
|||
<div class="name-top flex"> |
|||
<img src="<?php echo @CSS_URL; ?> |
|||
/images/user.svg" alt=""> |
|||
姓名 |
|||
</div> |
|||
<input id="bind_realname" class="name-input" type="text" placeholder="可备注真实姓名"> |
|||
<input id="bind_id" type="hidden" value="<?php echo $this->_tpl_vars['bind_user_info']['id']; ?> |
|||
"> |
|||
</div> |
|||
<div class="btnGroups flex"> |
|||
<button class="button button-normal cancelBtn">取消</button> |
|||
<button class="scanSuccess button button-primary confirmBtn <?php if (! $this->_tpl_vars['bind_user_info']): ?>hide<?php endif; ?>">确定</button> |
|||
</div> |
|||
</div> |
|||
<?php $_smarty_tpl_vars = $this->_tpl_vars; |
|||
$this->_smarty_include(array('smarty_include_tpl_file' => "include/footer.html", 'smarty_include_vars' => array())); |
|||
$this->_tpl_vars = $_smarty_tpl_vars; |
|||
unset($_smarty_tpl_vars); |
|||
?> |
|||
</div> |
|||
</body> |
|||
<script src="<?php echo @CSS_URL; ?> |
|||
/js/subCount.js?v=<?php echo @CSS_JS_VERSION; ?> |
|||
"></script> |
|||
|
|||
</html> |
@ -0,0 +1,34 @@ |
|||
<?php /* Smarty version 2.6.26, created on 2025-05-23 09:36:20 |
|||
compiled from weibo/show_detail.html */ ?> |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
|
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta name="referrer" content="no-referrer"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title>详情</title> |
|||
<?php echo ' |
|||
<style> |
|||
html, body { |
|||
margin: 0; |
|||
padding: 0; |
|||
height: 100%; |
|||
overflow: hidden; |
|||
} |
|||
iframe { |
|||
border: none; |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
</style> |
|||
'; ?> |
|||
|
|||
</head> |
|||
|
|||
<body> |
|||
<iframe src="https://m.weibo.cn/detail/<?php echo $this->_tpl_vars['wid']; ?> |
|||
" frameborder="0"></iframe> |
|||
</body> |
|||
|
|||
</html> |
@ -0,0 +1,195 @@ |
|||
<?php /* Smarty version 2.6.26, created on 2025-07-14 18:27:22 |
|||
compiled from weibo/comments.html */ ?> |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
|
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title>知识库</title> |
|||
<link rel="stylesheet" href="<?php echo @CSS_URL; ?> |
|||
/css/common.css?v=<?php echo @CSS_JS_VERSION; ?> |
|||
"> |
|||
<link rel="stylesheet" href="<?php echo @CSS_URL; ?> |
|||
/css/index.css?v=<?php echo @CSS_JS_VERSION; ?> |
|||
"> |
|||
<script src="<?php echo @CSS_URL; ?> |
|||
/js/jquery-3.6.0.min.js"></script> |
|||
</head> |
|||
|
|||
<body> |
|||
<div class="home-page"> |
|||
<?php $_smarty_tpl_vars = $this->_tpl_vars; |
|||
$this->_smarty_include(array('smarty_include_tpl_file' => "include/header.html", 'smarty_include_vars' => array())); |
|||
$this->_tpl_vars = $_smarty_tpl_vars; |
|||
unset($_smarty_tpl_vars); |
|||
?> |
|||
|
|||
<div class="home-main-content"> |
|||
<div class="home-main"> |
|||
<div class="tab-list index-nav-wrap flex"> |
|||
<ul class="tab-wrap" style="display: none;"> |
|||
<li class="index-nav-wrap-li" type="1"><span class="active">待审批</span></li> |
|||
<li class="index-nav-wrap-li" type="2"><span>已审批</span></li> |
|||
<li class="index-nav-wrap-li" type="3"><span>已删除</span></li> |
|||
</ul> |
|||
<button class="addNewBtn" style="display: none;"> |
|||
<img src="<?php echo @CSS_URL; ?> |
|||
/images/add.svg" alt="">新增自录入 |
|||
</button> |
|||
</div> |
|||
|
|||
|
|||
<div class="list_all" id="data-list"> |
|||
</div> |
|||
|
|||
|
|||
<!-- 数据列表 --> |
|||
<!-- <ul id="data-list"></ul> --> |
|||
|
|||
<!-- 分页控件 --> |
|||
<div class="pagination hide"> |
|||
<img id="prev-page" src="<?php echo @CSS_URL; ?> |
|||
/images/prev.svg" alt=""> |
|||
<ul id="page-numbers"></ul> |
|||
<img id="next-page" src="<?php echo @CSS_URL; ?> |
|||
/images/next.svg" alt=""> |
|||
<div class="input-page"> |
|||
<span>前往</span> |
|||
<input type="number" id="jump-to-page" min="1" placeholder="页码"> |
|||
<span>页</span> |
|||
</div> |
|||
<button id="go-to-page">跳转</button> |
|||
</div> |
|||
|
|||
<!-- 放大后的图片容器 --> |
|||
<div id="large-image-container"> |
|||
<h2>预览</h2> |
|||
<img id="large-image" src="<?php echo @CSS_URL; ?> |
|||
/images/viewimg1.png" alt="Large Image"> |
|||
<span id="close-btn2">×</span> |
|||
</div> |
|||
|
|||
<!-- 放大后的视频容器 --> |
|||
<div id="large-video-container"> |
|||
<video id="large-video" controls> |
|||
<source id="large-viedo-url" src="" type="video/mp4"> |
|||
Your browser does not support the video tag. |
|||
</video> |
|||
<button id="close-btn">×</button> |
|||
</div> |
|||
|
|||
<!-- 弹框 --> |
|||
<div class="modal-overlay"></div> |
|||
<div class="modal"> |
|||
<div class="modal_top"> |
|||
<b id="header_title">编辑</b> |
|||
<img src="<?php echo @CSS_URL; ?> |
|||
/images/close_modal.svg" id="close_modal" alt=""> |
|||
</div> |
|||
|
|||
<div class="add-form"> |
|||
<div class="form-item radio-form"> |
|||
<input type="hidden" id="id" value=""> |
|||
<div class="form-left"> |
|||
录入形式 |
|||
</div> |
|||
<div class="form-right radio-wrap flex"> |
|||
<div class="radio_box radio_box_active"> |
|||
<input value="1" type="radio"id="edu1"> |
|||
<div></div> |
|||
<label >信息段录入</label> |
|||
</div> |
|||
<div class="radio_box"> |
|||
<input value="2" type="radio"id="edu2"> |
|||
<div></div> |
|||
<label >问答式录入</label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-item normal-form" style="display: none;"> |
|||
<div class="form-left"> |
|||
提问信息 |
|||
</div> |
|||
<div class="form-right"> |
|||
<div class="text-area-container"> |
|||
<textarea class="edit-input normal-input" ></textarea> |
|||
<div class="char-count wordNum">0/200</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-item"> |
|||
<div class="form-left common-input"> |
|||
回答信息 |
|||
</div> |
|||
<div class="form-right"> |
|||
<div class="text-area-container"> |
|||
<textarea class="edit-input answer-input" ></textarea> |
|||
<div class="char-count1 wordNum">0/200</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<?php echo ' |
|||
<script> |
|||
const maxLength = 100; // 设置最大字数限制 |
|||
$(\'.normal-input\').on(\'input\', function () { |
|||
var currentLength = $(this).val().length; |
|||
$(\'.char-count\').text(currentLength + \'/\' + maxLength); |
|||
if (currentLength > maxLength) { |
|||
$(\'.normal-input\').val($(\'.normal-input\').val().slice(0, maxLength)) |
|||
$(\'.char-count\').text(maxLength + \'/\' + maxLength); |
|||
} |
|||
}); |
|||
$(\'.answer-input\').on(\'input\', function () { |
|||
var currentLength = $(this).val().length; |
|||
$(\'.char-count1\').text(currentLength + \'/\' + maxLength); |
|||
if (currentLength > maxLength) { |
|||
$(\'.answer-input\').val($(\'.answer-input\').val().slice(0, maxLength)) |
|||
$(\'.char-count1\').text(maxLength + \'/\' + maxLength); |
|||
} |
|||
}); |
|||
</script> |
|||
'; ?> |
|||
|
|||
<div class="img_list2" style="display: none;"></div> |
|||
<div class="preview"></div> |
|||
|
|||
<div class="modal_upload_btn flex hide"> |
|||
<div class="flex modal_btns"> |
|||
<button id="upload-image-btn" class="button upload_btn"> |
|||
<img src="<?php echo @CSS_URL; ?> |
|||
/images/img_upload.svg" alt="">上传图片 |
|||
</button> |
|||
<button id="upload-video-btn" class="button upload_btn"> |
|||
<img src="<?php echo @CSS_URL; ?> |
|||
/images/vedio_upload.svg" alt="">上传视频 |
|||
</button> |
|||
</div> |
|||
<p>支持 jpg、png、mp4 格式,单个文件不超过 10MB</p> |
|||
</div> |
|||
<input type="file" id="upload-image" accept="image/*" style="display: none;" multiple> |
|||
<input type="file" id="upload-video" accept="video/*" style="display: none;" multiple> |
|||
<div class="buttons flex"> |
|||
<button id="submit" class="button ">仅保存</button> |
|||
<button id="savePass" class="button button-primary">保存并通过审批</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<?php $_smarty_tpl_vars = $this->_tpl_vars; |
|||
$this->_smarty_include(array('smarty_include_tpl_file' => "include/footer.html", 'smarty_include_vars' => array())); |
|||
$this->_tpl_vars = $_smarty_tpl_vars; |
|||
unset($_smarty_tpl_vars); |
|||
?> |
|||
</div> |
|||
|
|||
<div id="hidecomments" style="display: none;"></div> |
|||
|
|||
</body> |
|||
<script src="<?php echo @CSS_URL; ?> |
|||
/js/index.js?v=<?php echo @CSS_JS_VERSION; ?> |
|||
89"></script> |
|||
|
|||
</html> |
@ -0,0 +1,44 @@ |
|||
<?php /* Smarty version 2.6.26, created on 2025-07-14 11:50:19 |
|||
compiled from include/header.html */ ?> |
|||
<div class="header-wrap"> |
|||
<a href="/"><img class="home-logo" src="<?php echo @CSS_URL; ?> |
|||
/images/home-logo.png" alt=""></a> |
|||
<div class="header-right flex"> |
|||
<img src="<?php echo @CSS_URL; ?> |
|||
/images/home-more.png" alt=""> |
|||
<div class="dropdown"> |
|||
<button class="dropdown-toggle"> |
|||
<?php echo $this->_tpl_vars['_user_info']['nickname']; ?> |
|||
|
|||
<img class="icon" src="<?php echo @CSS_URL; ?> |
|||
/images/drop-icon.svg" alt=""> |
|||
</button> |
|||
<div class="dropdown-panel"> |
|||
<a href="/index/interlocution">问答</a> |
|||
<?php if ($this->_tpl_vars['_user_info']['is_super_admin']): ?> |
|||
<a href="/index/user_list">子账号管理</a> |
|||
<?php endif; ?> |
|||
<?php if ($this->_tpl_vars['_user_info']['is_super_admin']): ?> |
|||
<a href="/weibo/comments">微博评论</a> |
|||
<?php endif; ?> |
|||
<a href="/loginout">退出</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<?php echo ' |
|||
<script> |
|||
$(\'.dropdown-toggle\').click(function () { |
|||
const dropdownPanel = document.querySelector(\'.dropdown-panel\'); |
|||
const icon = document.querySelector(\'.icon\'); |
|||
// 切换面板的显示/隐藏 |
|||
if (dropdownPanel.style.display === \'block\') { |
|||
dropdownPanel.style.display = \'none\'; |
|||
icon.classList.remove(\'rotate\'); // 移除旋转效果 |
|||
} else { |
|||
dropdownPanel.style.display = \'block\'; |
|||
icon.classList.add(\'rotate\'); // 添加旋转效果 |
|||
} |
|||
}) |
|||
</script> |
|||
'; ?> |
@ -0,0 +1,152 @@ |
|||
<?php /* Smarty version 2.6.26, created on 2025-07-08 16:37:03 |
|||
compiled from index/login.html */ ?> |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
|
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title>登陆页</title> |
|||
<script src="<?php echo @CSS_URL; ?> |
|||
/js/jquery-3.6.0.min.js" type="text/javascript"></script> |
|||
<script src="https://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script> |
|||
<link rel="stylesheet" href="<?php echo @CSS_URL; ?> |
|||
/css/common.css?v=<?php echo @CSS_JS_VERSION; ?> |
|||
"> |
|||
<?php echo ' |
|||
<style> |
|||
.login-wrap { |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
flex: 1; |
|||
} |
|||
|
|||
.login-container { |
|||
padding: 40px; |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
width: calc(440px - 40px*2); |
|||
height: calc(429.32px - 40px*2); |
|||
border-radius: 16px; |
|||
opacity: 1; |
|||
background: #FFFFFF; |
|||
/* 蓝色阴影_常规 */ |
|||
box-shadow: 0px 4px 16px 0px rgba(17, 55, 143, 0.12); |
|||
position: relative; |
|||
} |
|||
.con-top{ |
|||
margin-bottom: 43px; |
|||
} |
|||
.con-top span{ |
|||
font-family: MiSans; |
|||
font-size: 20px; |
|||
font-weight: 600; |
|||
line-height: 24px; |
|||
display: flex; |
|||
align-items: center; |
|||
letter-spacing: 0px; |
|||
color: #1E2226; |
|||
margin-left: 8px; |
|||
} |
|||
.qrcode{ |
|||
margin-bottom: 12px; |
|||
} |
|||
.code-filter{ |
|||
width: 220px; |
|||
height: 220px; |
|||
opacity: 1; |
|||
background: rgba(255, 255, 255, 0.9); |
|||
backdrop-filter: blur(2px); |
|||
position: absolute; |
|||
cursor: pointer; |
|||
top: 117px; |
|||
} |
|||
.code-filter img{ |
|||
margin-bottom: 6px; |
|||
} |
|||
.weixin-log{ |
|||
margin-bottom: 6px; |
|||
} |
|||
.weixin-log img{ |
|||
margin-right: 4px; |
|||
} |
|||
.weixin-log + p{ |
|||
color: #1E2226; |
|||
letter-spacing: 0.08em; |
|||
} |
|||
.qrcode{ |
|||
height: 220px; |
|||
} |
|||
.login-main{ |
|||
width: 100%; |
|||
height: 100%; |
|||
background-size: 100% 100%; |
|||
background-image: url({$smarty.const.CSS_URL}/images/login_back.png); |
|||
flex-direction: column; |
|||
} |
|||
</style> |
|||
'; ?> |
|||
|
|||
</head> |
|||
|
|||
<body> |
|||
<div class="login-main flex"> |
|||
<div class="login-wrap"> |
|||
<div class="login-container"> |
|||
<div class="con-top center"> |
|||
<img src="<?php echo @CSS_URL; ?> |
|||
/images/login_top.svg" alt=""> |
|||
<span>私有云知识库</span> |
|||
</div> |
|||
<div id="login_container" class="qrcode"> |
|||
<?php echo ' |
|||
<script> |
|||
var obj = new WxLogin({ |
|||
id: "login_container", |
|||
appid: "'; ?> |
|||
<?php echo $this->_tpl_vars['appid']; ?> |
|||
<?php echo '",
|
|||
scope: "snsapi_login", |
|||
redirect_uri: "'; ?> |
|||
<?php echo $this->_tpl_vars['redirect_uri']; ?> |
|||
<?php echo '",
|
|||
state: "'; ?> |
|||
<?php echo $this->_tpl_vars['state']; ?> |
|||
<?php echo '",
|
|||
style: "black", |
|||
href:\'data:text/css;base64,LmltcG93ZXJCb3ggLnFyY29kZSB7d2lkdGg6IDE4OHB4O2JvcmRlcjpub25lO21hcmdpbi10b3A6MHB4O30KLmltcG93ZXJCb3ggLnRpdGxlIHtkaXNwbGF5OiBub25lO30KLmltcG93ZXJCb3ggLmluZm8ge3dpZHRoOiAxODhweDtkaXNwbGF5Om5vbmU7fQouc3RhdHVzX2ljb24ge2Rpc3BsYXk6IG5vbmV9Ci5pbXBvd2VyQm94IC5zdGF0dXMge3RleHQtYWxpZ246IGNlbnRlcjt9IAo=\' |
|||
}); |
|||
</script> |
|||
'; ?> |
|||
|
|||
</div> |
|||
<div class="code-filter column hide"> |
|||
<img src="<?php echo @CSS_URL; ?> |
|||
/images/refresh.svg" alt=""> |
|||
<span>点击刷新</span> |
|||
</div> |
|||
<div class="login-bottom "> |
|||
<div class="weixin-log center"> |
|||
<img src="<?php echo @CSS_URL; ?> |
|||
/images/login_weixin.svg" alt=""> |
|||
<span style="display: inline-block; height: 18px;"></span> |
|||
</div> |
|||
<p style="color: #626573;"> |
|||
扫码后请在手机上确认登录 |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<?php $_smarty_tpl_vars = $this->_tpl_vars; |
|||
$this->_smarty_include(array('smarty_include_tpl_file' => "include/footer.html", 'smarty_include_vars' => array())); |
|||
$this->_tpl_vars = $_smarty_tpl_vars; |
|||
unset($_smarty_tpl_vars); |
|||
?> |
|||
</div> |
|||
</body> |
|||
<script> |
|||
|
|||
</script> |
|||
</html> |
@ -1,5 +1,6 @@ |
|||
{ |
|||
"require": { |
|||
"firebase/php-jwt": "^6.0" |
|||
"firebase/php-jwt": "^6.0", |
|||
"elasticsearch/elasticsearch": "^5.5" |
|||
} |
|||
} |
|||
|
@ -0,0 +1,23 @@ |
|||
<?php |
|||
/** |
|||
* |
|||
*/ |
|||
include_once SERVER_ROOT . '/data/dBase.php'; |
|||
|
|||
class dWeiboComments extends dBase { |
|||
protected $fieldlist = array( |
|||
'spider_weibo_comments' => array( |
|||
'id', |
|||
'weibo_id', |
|||
'content', |
|||
'weibo_data_id', |
|||
'is_search', |
|||
'comment_time', |
|||
'create_time', |
|||
) |
|||
); |
|||
|
|||
protected $primary_keys = array( |
|||
); |
|||
} |
|||
|
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 118 KiB |
@ -0,0 +1,119 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
|
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title>Document</title> |
|||
<link rel="stylesheet" href="./style/css/common.css"> |
|||
<style> |
|||
.login-wrap { |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
flex: 1; |
|||
} |
|||
|
|||
.login-container { |
|||
padding: 40px; |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
width: calc(440px - 40px*2); |
|||
height: calc(429.32px - 40px*2); |
|||
border-radius: 16px; |
|||
opacity: 1; |
|||
background: #FFFFFF; |
|||
/* 蓝色阴影_常规 */ |
|||
box-shadow: 0px 4px 16px 0px rgba(17, 55, 143, 0.12); |
|||
position: relative; |
|||
} |
|||
.con-top{ |
|||
margin-bottom: 43px; |
|||
} |
|||
.con-top span{ |
|||
font-family: MiSans; |
|||
font-size: 20px; |
|||
font-weight: 600; |
|||
line-height: 24px; |
|||
display: flex; |
|||
align-items: center; |
|||
letter-spacing: 0px; |
|||
color: #1E2226; |
|||
margin-left: 8px; |
|||
} |
|||
.qrcode{ |
|||
margin-bottom: 12px; |
|||
} |
|||
.code-filter{ |
|||
opacity: 1; |
|||
background: rgba(255, 255, 255, 0.9); |
|||
backdrop-filter: blur(2px); |
|||
position: absolute; |
|||
cursor: pointer; |
|||
top: 117px; |
|||
} |
|||
.code-filter img{ |
|||
margin-bottom: 6px; |
|||
} |
|||
.weixin-log{ |
|||
margin-bottom: 6px; |
|||
} |
|||
.weixin-log img{ |
|||
margin-right: 4px; |
|||
} |
|||
.weixin-log + p{ |
|||
color: #1E2226; |
|||
letter-spacing: 0.08em; |
|||
} |
|||
.qrcode img, .code-filter{ |
|||
width: 220px; |
|||
height: 220px; |
|||
} |
|||
.login-main{ |
|||
width: 100%; |
|||
height: 100%; |
|||
background-size: 100% 100%; |
|||
background-image: url(./style/img/login_back.png); |
|||
flex-direction: column; |
|||
} |
|||
</style> |
|||
</head> |
|||
|
|||
<body> |
|||
<div class="login-main flex"> |
|||
<div class="login-wrap"> |
|||
<div class="login-container"> |
|||
<div class="con-top center"> |
|||
<img src="./style/img/login_top.svg" alt=""> |
|||
<span>私有云知识库</span> |
|||
</div> |
|||
<div class="qrcode"> |
|||
<!-- 暂时排版用 --> |
|||
<img src="./style/img/qrcode-tem.png" alt=""> |
|||
</div> |
|||
<div class="code-filter column "> |
|||
<img src="./style/img/refresh.svg" alt=""> |
|||
<span>点击刷新</span> |
|||
</div> |
|||
<div class="login-bottom "> |
|||
<div class="weixin-log center"> |
|||
<img src="./style/img/login_weixin.svg" alt=""> |
|||
<span>微信扫码登录</span> |
|||
</div> |
|||
<p style="color: #626573;"> |
|||
扫码后请在手机上确认登录 |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="leftSideFooterNew"> |
|||
<p>Copyright ©2012-2025 .</p> |
|||
<p><span>All Rights Reserved</span> 底部随便写的</p> |
|||
</div> |
|||
</div> |
|||
</body> |
|||
<script> |
|||
|
|||
</script> |
|||
</html> |
@ -0,0 +1,635 @@ |
|||
<?php |
|||
/** |
|||
* 进程Model |
|||
* @package model |
|||
*/ |
|||
|
|||
include_once(SERVER_ROOT."/model/mBase.php"); |
|||
|
|||
class mDaemon extends mBase { |
|||
private $ips; |
|||
private $daemon; |
|||
private $dconf; |
|||
private $proxy_list; |
|||
private $proxy_exec_list; |
|||
private $rd_slb_list; |
|||
|
|||
public function __construct() { |
|||
$this->obj = new dDaemon(); |
|||
|
|||
$this->ips = 'daemon_server_ips'; |
|||
$this->daemon = 'daemon_list'; |
|||
$this->dconf = 'daemon_conf'; |
|||
|
|||
$this->proxy_list = 'proxy_list'; |
|||
$this->proxy_exec_list = 'proxy_exec_list'; |
|||
|
|||
$this->rd_slb_list = "rd_slb_list"; |
|||
} |
|||
|
|||
/** |
|||
* 新增服务器 |
|||
* @param unknown $ip 服务器内网ip |
|||
* @return boolean|boolean|string |
|||
*/ |
|||
public function addServerIp($ip, $remark) { |
|||
if(empty($ip)) { |
|||
$this->setError('服务器内网IP不能为空'); |
|||
return false; |
|||
} |
|||
|
|||
$is_exist = $this->getServerIpInfo($ip); |
|||
if($is_exist) { |
|||
$this->setError('服务器已存在'); |
|||
return false; |
|||
} |
|||
|
|||
$res = $this->obj->insert($this->ips, array('ip'=>$ip, 'remark'=>$remark)); |
|||
if(!$res) { |
|||
$this->setError('服务器添加到数据库失败'); |
|||
return false; |
|||
} |
|||
return $res; |
|||
} |
|||
|
|||
public function updateServerIp($ip, $remark) { |
|||
$is_exist = $this->getServerIpInfo($ip); |
|||
if(!$is_exist) { |
|||
$this->setError('服务器不存在'); |
|||
return false; |
|||
} |
|||
|
|||
return $this->obj->update($this->ips, array('remark'=>$remark), array('sql'=>'`ip`=?', 'vals'=>array($ip))); |
|||
} |
|||
|
|||
/** |
|||
* 获取所有服务器 |
|||
*/ |
|||
public function getServerIps() { |
|||
return $this->obj->selectAll($this->ips, array()); |
|||
} |
|||
|
|||
/** |
|||
* 去除服务器 |
|||
* @param unknown $ip |
|||
*/ |
|||
public function delServerIp($ip) { |
|||
if(empty($ip)) { |
|||
$this->setError('服务器内网IP不能为空'); |
|||
return false; |
|||
} |
|||
|
|||
$is_exist = $this->getServerIpInfo($ip); |
|||
|
|||
// 删除server_ips表数据 |
|||
$res = $this->obj->delete($this->ips, array('sql'=>'`id`=? and `ip`=?', 'vals'=>array($is_exist['id'], $ip))); |
|||
if(_RC_SERVER_IP_OPEN && $res) { |
|||
$delres = $this->delRedisCache(sprintf(_RC_SERVER_IP, $ip)); |
|||
} |
|||
|
|||
// 删除daemon_conf表数据 |
|||
if(_RC_DAEMON_CONF_OPEN) { |
|||
$list = $this->getDaemonConfList($is_exist['id']); |
|||
foreach ($list as $info) { |
|||
if(empty($info)) continue; |
|||
|
|||
$rckey = sprintf(_RC_KL_DAEMON_CONF_BY_SID_DID, $is_exist['id'], $info['daemon_id']); |
|||
$rc_is_exist = $this->getRedisCache($rckey); |
|||
if(!$rc_is_exist) continue; |
|||
|
|||
$delres = $this->delRedisCache($rckey); |
|||
|
|||
} |
|||
} |
|||
$res = $this->obj->delete($this->dconf, array('sql'=>'`server_id`=?', 'vals'=>array($is_exist['id']))); |
|||
return true; |
|||
} |
|||
|
|||
/** |
|||
* 通过服务器内网ip获取服务器信息 |
|||
* @param unknown $ip |
|||
*/ |
|||
public function getServerIpInfo($ip) { |
|||
if(empty($ip)) { |
|||
$this->setError('服务器内网IP不能为空'); |
|||
return false; |
|||
} |
|||
|
|||
if(_RC_SERVER_IP_OPEN) { |
|||
$key = sprintf(_RC_SERVER_IP, $ip); |
|||
$info = $this->getRedisCache($key); |
|||
if($info != false) return $info; |
|||
} |
|||
|
|||
$info = $this->obj->select($this->ips, array('sql'=>'`ip`=?', 'vals'=>array($ip))); |
|||
if(_RC_SERVER_IP_OPEN && $info) { |
|||
$res = $this->setRedisCache($key, 600, $info); |
|||
} |
|||
return $info; |
|||
} |
|||
|
|||
/** |
|||
* 新增进程配置 |
|||
* @param unknown $server_id 服务器对应id |
|||
* @param unknown $daemon_id 进程对应id |
|||
* @param unknown $maxnum 启用最大进程数 |
|||
* @param number $maxtime 单任务允许最大时长(秒) |
|||
*/ |
|||
public function addDaemonConf($server_id, $daemon_id, $maxnum, $maxtime=0) { |
|||
if(empty($server_id)) { |
|||
$this->setError('服务器id不能为空'); |
|||
return false; |
|||
} |
|||
if(empty($daemon_id)) { |
|||
$this->setError('进程id不能为空'); |
|||
return false; |
|||
} |
|||
|
|||
$is_exist = $this->getDaemonConf($server_id, $daemon_id); |
|||
if($is_exist) { |
|||
$res = $this->updateDaemonConf($server_id, $daemon_id, $maxnum, $maxtime); |
|||
if(!$res) { |
|||
$this->setError('保存失败'); |
|||
return false; |
|||
} |
|||
return true; |
|||
} |
|||
|
|||
$data['server_id'] = $server_id; |
|||
$data['daemon_id'] = $daemon_id; |
|||
$data['maxnum'] = $maxnum; |
|||
if($maxtime) $data['maxtime'] = $maxtime; |
|||
|
|||
return $this->obj->insert($this->dconf, $data); |
|||
} |
|||
|
|||
/** |
|||
* 获取进程配置信息 |
|||
* @param unknown $server_id 服务器对应id |
|||
* @param unknown $daemon_id 进程对应id |
|||
*/ |
|||
public function getDaemonConf($server_id, $daemon_id) { |
|||
if(_RC_DAEMON_CONF_OPEN) { |
|||
$key = sprintf(_RC_KL_DAEMON_CONF_BY_SID_DID, $server_id, $daemon_id); |
|||
$info = $this->getRedisCache($key); |
|||
if($info != false) return $info; |
|||
} |
|||
|
|||
$info = $this->obj->select($this->dconf, array('sql'=>'`server_id`=? and `daemon_id`=?', 'vals'=>array($server_id, $daemon_id))); |
|||
if(_RC_DAEMON_CONF_OPEN && $info) { |
|||
$res = $this->setRedisCache($key, 600, $info); |
|||
} |
|||
return $info; |
|||
} |
|||
|
|||
/** |
|||
* 更新进程配置 |
|||
* @param unknown $server_id 服务器对应id |
|||
* @param unknown $daemon_id 进程对应id |
|||
* @param unknown $maxnum 启用最大进程数 |
|||
* @param unknown $maxtime 单任务允许最大时长(秒) |
|||
* @return boolean |
|||
*/ |
|||
public function updateDaemonConf($server_id, $daemon_id, $maxnum, $maxtime) { |
|||
$res = $this->obj->update($this->dconf, array('maxnum'=>$maxnum, 'maxtime'=>$maxtime), array('sql'=>'`server_id`=? and `daemon_id`=?', 'vals'=>array($server_id, $daemon_id))); |
|||
if(_RC_DAEMON_CONF_OPEN && $res) { |
|||
$key = sprintf(_RC_KL_DAEMON_CONF_BY_SID_DID, $server_id, $daemon_id); |
|||
$delres = $this->delRedisCache($key); |
|||
} |
|||
return $res; |
|||
} |
|||
|
|||
public function updateDaemonConfByIds($ids, $server_id) { |
|||
return $this->obj->updateIn($this->dconf, array('server_id'=>$server_id), array('id'=>$ids)); |
|||
} |
|||
|
|||
/** |
|||
* 获取服务器对应id 进程对应id 启用进程数关系 |
|||
* @return unknown |
|||
*/ |
|||
public function getServerid2Daemon2Info() { |
|||
$list = $this->obj->selectAll($this->dconf, array()); |
|||
foreach($list as $info) { |
|||
$nlist[$info['server_id']][$info['daemon_id']] = $info; |
|||
} |
|||
return $nlist; |
|||
} |
|||
|
|||
/** |
|||
* 获取所有/某服务器 所有进程/某进程 配置 |
|||
* @param number $server_id 服务器对应id |
|||
* @param number $daemon_id 进程对应id |
|||
*/ |
|||
public function getDaemonConfList($server_id=0, $daemon_id=0) { |
|||
$where['sql'] = '1=1'; |
|||
$where['vals'] = array(); |
|||
|
|||
if($server_id) { |
|||
$where['sql'] .= ' and `server_id`=?'; |
|||
$where['vals'][] = $server_id; |
|||
} |
|||
|
|||
if($daemon_id) { |
|||
$where['sql'] .= ' and `daemon_id`=?'; |
|||
$where['vals'][] = $daemon_id; |
|||
} |
|||
return $this->obj->selectAll($this->dconf, $where); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 新增进程 |
|||
* @param unknown $flag 进程标识 |
|||
* @param unknown $proc 进程执行路径 |
|||
* @param unknown $desc 进程说明 |
|||
*/ |
|||
public function addDaemon($flag, $proc, $desc) { |
|||
if(empty($flag)) { |
|||
$this->setError('进程标识不能为空'); |
|||
return false; |
|||
} |
|||
if(empty($proc)) { |
|||
$this->setError('进程路径不能为空'); |
|||
return false; |
|||
} |
|||
if(empty($desc)) { |
|||
$this->setError('进程说明不能为空'); |
|||
return false; |
|||
} |
|||
|
|||
$is_exist = $this->getDaemonByFlag($flag); |
|||
if($is_exist) { |
|||
$this->setError('进程标识已存在'); |
|||
return false; |
|||
} |
|||
|
|||
$data['flag'] = $flag; |
|||
$data['proc'] = $proc; |
|||
$data['desc'] = $desc; |
|||
return $this->obj->insert($this->daemon, $data); |
|||
} |
|||
|
|||
/** |
|||
* 批量获取进程列表 通过进程ids |
|||
* @param unknown $daemon_ids 进程id数组 array(id1,id2...) |
|||
*/ |
|||
public function getDaemonListByIds($daemon_ids) { |
|||
return $this->obj->selectIn($this->daemon, array('id'=>$daemon_ids)); |
|||
} |
|||
|
|||
/** |
|||
* 通过进程标识获取进程信息 |
|||
* @param unknown $flag 进程标识 |
|||
*/ |
|||
public function getDaemonByFlag($flag) { |
|||
if(_RC_DAEMON_OPEN) { |
|||
$key = sprintf(_RC_KL_DAEMON_BY_FLAG, $flag); |
|||
$info = $this->getRedisCache($key); |
|||
if($info != false) return $info; |
|||
} |
|||
$info = $this->obj->select($this->daemon, array('sql'=>'`flag`=?', 'vals'=>array($flag))); |
|||
if(_RC_DAEMON_OPEN && $info) { |
|||
$res = $this->setRedisCache($key, 600, $info); |
|||
} |
|||
return $info; |
|||
} |
|||
|
|||
/** |
|||
* 通过进程id获取进程信息 |
|||
* @param unknown $id 进程id |
|||
* @return boolean|mixed |
|||
*/ |
|||
public function getDaemonById($id) { |
|||
if(_RC_DAEMON_OPEN) { |
|||
$key = sprintf(_RC_KL_DAEMON_BY_ID, $id); |
|||
$info = $this->getRedisCache($key); |
|||
if($info != false) return $info; |
|||
} |
|||
|
|||
$info = $this->obj->select($this->daemon, array('sql'=>'`id`=?', 'vals'=>array($id))); |
|||
if(_RC_DAEMON_OPEN && $info) { |
|||
$res = $this->setRedisCache($key, 600, $info); |
|||
} |
|||
return $info; |
|||
} |
|||
|
|||
/** |
|||
* 更新进程信息 |
|||
* @param unknown $id |
|||
* @param unknown $data |
|||
*/ |
|||
public function updateDaemon($id, $data) { |
|||
$res = $this->obj->update($this->daemon, $data, array('sql'=>'`id`=?', 'vals'=>array($id))); |
|||
if(_RC_DAEMON_OPEN && $res) { |
|||
$key = sprintf(_RC_KL_DAEMON_BY_ID, $id); |
|||
$delres = $this->delRedisCache($key); |
|||
} |
|||
return $res; |
|||
} |
|||
|
|||
/** |
|||
* 获取所有进程列表 |
|||
* @return boolean |
|||
*/ |
|||
public function getDaemonList() { |
|||
return $this->obj->selectAll($this->daemon); |
|||
} |
|||
|
|||
/** |
|||
* 删除进程 |
|||
* @param unknown $daemon_id |
|||
*/ |
|||
public function delDaemon($daemon_id) { |
|||
$dinfo = $this->getDaemonById($daemon_id); |
|||
|
|||
// 删除daemon_list表数据 |
|||
if(_RC_DAEMON_OPEN) { |
|||
$delres = $this->delRedisCache(sprintf(_RC_KL_DAEMON_BY_ID, $daemon_id)); |
|||
$delres = $this->delRedisCache(sprintf(_RC_KL_DAEMON_BY_FLAG, $dinfo['flag'])); |
|||
} |
|||
$res = $this->obj->delete($this->daemon, array('sql'=>'`id`=?', 'vals'=>array($daemon_id))); |
|||
|
|||
// 删除daemon_conf表数据 |
|||
if(_RC_DAEMON_CONF_OPEN) { |
|||
$list = $this->getDaemonConfList(0, $daemon_id); |
|||
foreach ($list as $info) { |
|||
if(empty($info)) continue; |
|||
|
|||
$rckey = sprintf(_RC_KL_DAEMON_CONF_BY_SID_DID, $info['server_id'], $info['daemon_id']); |
|||
$rc_is_exist = $this->getRedisCache($rckey); |
|||
if(!$rc_is_exist) continue; |
|||
|
|||
$delres = $this->delRedisCache($rckey); |
|||
} |
|||
} |
|||
$this->obj->delete($this->dconf, array('sql'=>'`daemon_id`=?', 'vals'=>array($daemon_id))); |
|||
return true; |
|||
} |
|||
|
|||
/** |
|||
* 获取某进程启用进程数 |
|||
* @param unknown $server_ip 服务器对应id |
|||
* @param unknown $daemon 进程标识 |
|||
*/ |
|||
public function getDaemonNum($server_ip, $daemon_flag) { |
|||
$ipinfo = $this->getServerIpInfo($server_ip); |
|||
$daemon_inf = $this->getDaemonByFlag($daemon_flag); |
|||
$res = $this->getDaemonConf($ipinfo['id'], $daemon_inf['id']); |
|||
return $res['maxnum']+0; |
|||
} |
|||
|
|||
/** |
|||
* 获取开启进程数据 |
|||
* @param unknown $server_ip |
|||
*/ |
|||
public function getStartProcConf($server_ip) { |
|||
$server_inf = $this->getServerIpInfo($server_ip); |
|||
|
|||
$list = $this->getDaemonConfList($server_inf['id']); |
|||
foreach ($list as $conf) { |
|||
$daemonids[] = $conf['daemon_id']; |
|||
$daemonid2maxnum[$conf['daemon_id']] = $conf['maxnum']; |
|||
$daemonid2maxtime[$conf['daemon_id']] = $conf['maxtime']; |
|||
} |
|||
$daemon_list = $this->getDaemonListByIds($daemonids); |
|||
foreach ($daemon_list as $key => $daemon) { |
|||
$flag2proc[$daemon['flag']] = $daemon['proc']; |
|||
$flag2maxnum[$daemon['flag']] = $daemonid2maxnum[$daemon['id']]; |
|||
$flag2maxtime[$daemon['flag']] = $daemonid2maxtime[$daemon['id']]; |
|||
} |
|||
$nlist['flag2proc'] = $flag2proc; |
|||
$nlist['flag2maxnum'] = $flag2maxnum; |
|||
$nlist['flag2maxtime'] = $flag2maxtime; |
|||
return $nlist; |
|||
} |
|||
|
|||
/** |
|||
* 添加代理信息 |
|||
* @param unknown $server_ip |
|||
* @param unknown $server_port |
|||
* @param unknown $server_passwd |
|||
* @param unknown $client_port |
|||
* @param string $remark |
|||
* @return boolean|boolean|string |
|||
*/ |
|||
public function addProxy($server_ip, $server_port, $server_passwd, $client_port, $remark='') { |
|||
if(empty($server_ip)) { |
|||
$this->setError('服务器地址不能为空'); |
|||
return false; |
|||
} |
|||
$is_exist = $this->getProxyByServerip($server_ip); |
|||
if($is_exist) { |
|||
$this->setError('服务器地址已经存在'); |
|||
return false; |
|||
} |
|||
|
|||
if(empty($server_port)) { |
|||
$this->setError('服务器端口不能为空'); |
|||
return false; |
|||
} |
|||
if(empty($server_passwd)) { |
|||
$this->setError('服务器密码不能为空'); |
|||
return false; |
|||
} |
|||
if(empty($client_port)) { |
|||
$this->setError('客户端端口不能为空'); |
|||
return false; |
|||
} |
|||
|
|||
$data['server_ip'] = trim($server_ip); |
|||
$data['server_port'] = $server_port; |
|||
$data['server_passwd'] = trim($server_passwd); |
|||
$data['client_port'] = $client_port; |
|||
if(!empty($remark)) $data['remark'] = trim($remark); |
|||
|
|||
return $this->obj->insert($this->proxy_list, $data); |
|||
} |
|||
|
|||
/** |
|||
* 更新代理信息 |
|||
* @param unknown $id |
|||
* @param array $data |
|||
* @return boolean |
|||
*/ |
|||
public function updateProxy($id, $data=array()) { |
|||
if(empty($id)) { |
|||
$this->setError('代理id不能为空'); |
|||
return false; |
|||
} |
|||
if(empty($data)) { |
|||
$this->setError('更新信息不能为空'); |
|||
return false; |
|||
} |
|||
$proxy_inf = $this->getProxyById($id); |
|||
if(empty($proxy_inf)) { |
|||
$this->setError('代理信息不存在'); |
|||
return false; |
|||
} |
|||
if(isset($data['server_ip'])) { |
|||
$is_exist = $this->getProxyByServerip($data['server_ip']); |
|||
if($is_exist && $id != $is_exist['id']) { |
|||
$this->setError('服务器地址已经存在'); |
|||
return false; |
|||
} |
|||
} |
|||
|
|||
return $this->obj->update($this->proxy_list, $data, array('sql'=>'`id`=?', 'vals'=>array($id))); |
|||
} |
|||
|
|||
public function getProxyByServerip($ip) { |
|||
return $this->obj->select($this->proxy_list, array('sql'=>'`server_ip`=?', 'vals'=>array($ip))); |
|||
} |
|||
|
|||
/** |
|||
* 根据代理id获取代理信息 |
|||
* @param unknown $id |
|||
* @return boolean|boolean|mixed |
|||
*/ |
|||
public function getProxyById($id) { |
|||
if(empty($id)) { |
|||
$this->setError('代理id不能为空'); |
|||
return false; |
|||
} |
|||
return $this->obj->select($this->proxy_list, array('sql'=>'`id`=?', 'vals'=>array($id))); |
|||
} |
|||
|
|||
/** |
|||
* 根据代理id获取代理信息 |
|||
* @param unknown $id |
|||
* @return boolean|boolean|mixed |
|||
*/ |
|||
public function getProxyList() { |
|||
return $this->obj->selectAll($this->proxy_list, array(), 'remark'); |
|||
} |
|||
|
|||
/** |
|||
* 根据多代理id查询代理信息 |
|||
* @param unknown $ids |
|||
* @return boolean|boolean |
|||
*/ |
|||
public function getProxyListByIds($ids) { |
|||
if(empty($ids)) { |
|||
$this->setError('代理id数组不存在'); |
|||
return false; |
|||
} |
|||
return $this->obj->selectIn($this->proxy_list, array('id'=>$ids)); |
|||
} |
|||
|
|||
public function delProxy($id) { |
|||
if(empty($id)) { |
|||
$this->setError('代理id不能为空'); |
|||
return false; |
|||
} |
|||
$proxy_inf = $this->getProxyById($id); |
|||
if(empty($proxy_inf)) { |
|||
$this->setError('代理信息不存在'); |
|||
return false; |
|||
} |
|||
|
|||
$sqls[] = 'DELETE FROM '.$this->proxy_list.' WHERE `id`='.$id; |
|||
$sqls[] = 'DELETE FROM '.$this->proxy_exec_list.' WHERE `pid`='.$id; |
|||
|
|||
$res = $this->obj->execTrans($sqls); |
|||
if(!$res) { |
|||
$this->setError('删除失败'); |
|||
return false; |
|||
} |
|||
return true; |
|||
} |
|||
|
|||
public function getMaxClientPort() { |
|||
$sql = "SELECT MAX(`client_port`) as port FROM `{$this->proxy_list}`"; |
|||
$res = $this->obj->execute($sql, true, true); |
|||
return $res[0]['port']; |
|||
} |
|||
|
|||
public function getClientPort($ori_client_port) { |
|||
if (!$ori_client_port) return false; |
|||
|
|||
$port = $ori_client_port+1; |
|||
|
|||
$cmd = "ps aux|grep {$port} |grep -v grep| wc -l"; |
|||
$res = trim(shell_exec($cmd)); |
|||
if ($res) $this->getClientPort($port); |
|||
|
|||
return $port; |
|||
} |
|||
|
|||
|
|||
public function isStartProxy($pid) { |
|||
if($pid+0<=0) { |
|||
$this->setError('代理id为空'); |
|||
return false; |
|||
} |
|||
|
|||
$proxy_inf = $this->getProxyById($pid); |
|||
if(empty($proxy_inf)) { |
|||
$this->setError('代理信息不存在'); |
|||
return false; |
|||
} |
|||
|
|||
$is_start_proxy = $this->startProxyProcess($proxy_inf['server_ip'], $proxy_inf['server_port'], $proxy_inf['client_port'], $proxy_inf['server_passwd']); |
|||
if(!$is_start_proxy) { |
|||
$this->setError('代理启动失败|'.$this->getError()); |
|||
return false; |
|||
} |
|||
return $proxy_inf; |
|||
} |
|||
|
|||
|
|||
public function addProxyExecTask($ip, $pid) { |
|||
if(empty($ip)) { |
|||
$this->setError('代理启动服务器为空'); |
|||
return false; |
|||
} |
|||
if(empty($pid)) { |
|||
$this->setError('代理基本信息id为空'); |
|||
return false; |
|||
} |
|||
$data['ip'] = $ip; |
|||
$data['pid'] = $pid; |
|||
return $this->obj->insert($this->proxy_exec_list, $data); |
|||
} |
|||
|
|||
public function getProxyExecListByIp($ip) { |
|||
if(empty($ip)) { |
|||
$this->setError('服务器内网ip为空'); |
|||
return false; |
|||
} |
|||
return $this->obj->selectAll($this->proxy_exec_list, array('sql'=>'`ip`=?', 'vals'=>array($ip))); |
|||
} |
|||
|
|||
public function getProxyExecListByPid($pid) { |
|||
return $this->obj->selectAll($this->proxy_exec_list, array('sql'=>'`pid`=?', 'vals'=>array($pid))); |
|||
} |
|||
|
|||
public function getProxyExecListByPids($pids) { |
|||
return $this->obj->selectIn($this->proxy_exec_list, array('pid'=>$pids)); |
|||
} |
|||
|
|||
public function delProxyExecTask($pid, $ip) { |
|||
return $this->obj->delete($this->proxy_exec_list, array('sql'=>'`pid`=? and `ip`=?', 'vals'=>array($pid, $ip))); |
|||
} |
|||
|
|||
|
|||
public function addSlb($ip, $remark) { |
|||
$data = array(); |
|||
$data['remark'] = trim($remark); |
|||
|
|||
$info = $this->getSlb($ip); |
|||
if($info) { |
|||
return $this->obj->update($this->rd_slb_list, $data, array('sql'=>'`ip`=?', 'vals'=>array($ip))); |
|||
} |
|||
|
|||
$data['ip'] = $ip; |
|||
return $this->obj->insert($this->rd_slb_list, $data); |
|||
} |
|||
|
|||
public function getSlbList() { |
|||
return $this->obj->selectAll($this->rd_slb_list, array()); |
|||
} |
|||
|
|||
public function getSlb($ip) { |
|||
return $this->obj->select($this->rd_slb_list, array('sql'=>'`ip`=?', 'vals'=>array($ip))); |
|||
} |
|||
} |
@ -0,0 +1,158 @@ |
|||
<?php |
|||
/** |
|||
* |
|||
*/ |
|||
include_once(SERVER_ROOT . "/model/mBase.php"); |
|||
|
|||
|
|||
class mWeiboComments extends mBase { |
|||
private $obj; |
|||
private $tbl; |
|||
|
|||
public function __construct() { |
|||
$this->obj = new dWeiboComments(); |
|||
$this->tbl = 'spider_weibo_comments'; |
|||
} |
|||
|
|||
public function getCommentByWeiboId($weibo_id, $page = 0, $limit = 0, $order = 'id asc', $condition = array()) { |
|||
$where = "1=1 "; |
|||
if (!empty($condition)) { |
|||
foreach ($condition as $key => $val) { |
|||
if (is_array($val)) { |
|||
$val = implode(',', $val); |
|||
$where .= " and {$key} in ({$val})"; |
|||
} else { |
|||
$where .= " and {$key}={$val}"; |
|||
} |
|||
} |
|||
} |
|||
$where.= " and `weibo_id`={$weibo_id}"; |
|||
|
|||
$limit_info = array(); |
|||
if($page > 0 && $limit > 0) $limit_info = array(($page-1)*$limit, $limit); |
|||
return $this->obj->selectAll($this->tbl, array('sql' => $where, 'vals' => array()), $order, $limit_info); |
|||
} |
|||
|
|||
public function getCommentCountByWeiboId($weibo_id, $condition = array()) { |
|||
$where = "1=1 "; |
|||
if (!empty($condition)) { |
|||
foreach ($condition as $key => $val) { |
|||
if (is_array($val)) { |
|||
$val = implode(',', $val); |
|||
$where .= " and {$key} in ({$val})"; |
|||
} else { |
|||
$where .= " and {$key}={$val}"; |
|||
} |
|||
} |
|||
} |
|||
$where.= " and `weibo_id`={$weibo_id}"; |
|||
|
|||
return $this->obj->count($this->tbl, array('sql' => $where, 'vals' => array())); |
|||
} |
|||
|
|||
public function getCommentByWeiboDataId($weibo_data_id) { |
|||
return $this->obj->select($this->tbl, array('sql' => '`weibo_data_id`=?', 'vals' => array($weibo_data_id))); |
|||
} |
|||
|
|||
public function isNeedInsertData($weibo_id, $max_weibo_data_id, $comment_count) { |
|||
$max_weibo_data_id_info = $this->getCommentByWeiboId($max_weibo_data_id, 1, 1, 'id desc'); |
|||
if(empty($max_weibo_data_id_info) || $max_weibo_data_id_info['spider_comment_status']) return true; |
|||
return true; |
|||
} |
|||
|
|||
public function addComment($weibo_id, $source_json) { |
|||
$obj = new mWeibo(); |
|||
$weibo_info = $obj->getWeiboById($weibo_id); |
|||
if(empty($weibo_info)) { |
|||
$this->setError('微博不存在'); |
|||
$this->writeLog(ZHISHIKU_SPIDER_LOG, ZHISHIKU_SPIDER_COMMENT, '微博不存在:'.$weibo_id); |
|||
return false; |
|||
} |
|||
|
|||
$source_data = json_decode($source_json, true); |
|||
if($source_data['ok'] != 1) { |
|||
$this->setError('抓取失败'); |
|||
$this->writeLog(ZHISHIKU_SPIDER_LOG, ZHISHIKU_SPIDER_COMMENT, '抓取评论失败:'.$source_json); |
|||
return false; |
|||
} |
|||
|
|||
if(!is_dir(ZHISHIKU_SPIDER_TEMP_PATH)) { |
|||
mkdir(ZHISHIKU_SPIDER_TEMP_PATH, 0755, true); |
|||
chown(ZHISHIKU_SPIDER_TEMP_PATH, 'nobody'); |
|||
chgrp(ZHISHIKU_SPIDER_TEMP_PATH, 'nobody'); |
|||
} |
|||
|
|||
foreach($source_data['data'] as $key=>$comment) { |
|||
$weibo_data_id = $comment['id']+0; |
|||
$source_json_save_path = sprintf(ZHISHIKU_SPIDER_COMMENT_PATH, $weibo_info['wid'], $weibo_data_id); |
|||
$dir = dirname(dirname($source_json_save_path)); |
|||
if(!is_dir($dir)) { |
|||
mkdir($dir, 0755, true); |
|||
chown($dir, 'nobody'); |
|||
chgrp($dir, 'nobody'); |
|||
} |
|||
|
|||
$dir = dirname($source_json_save_path); |
|||
if(!is_dir($dir)) { |
|||
mkdir($dir, 0755, true); |
|||
chown($dir, 'nobody'); |
|||
chgrp($dir, 'nobody'); |
|||
} |
|||
|
|||
if(!is_dir($dir)) { |
|||
$this->writeLog(ZHISHIKU_SPIDER_LOG, ZHISHIKU_SPIDER_COMMENT, '创建目录失败:'.$source_json_save_path); |
|||
return false; |
|||
} |
|||
|
|||
if(file_exists($source_json_save_path)) continue; |
|||
|
|||
file_put_contents($source_json_save_path, json_encode($comment), LOCK_EX); |
|||
if(!file_exists($source_json_save_path) || filesize($source_json_save_path) < 10) { |
|||
$this->writeLog(ZHISHIKU_SPIDER_LOG, ZHISHIKU_SPIDER_COMMENT, '评论保存到文件失败:'.$source_json_save_path); |
|||
return false; |
|||
} |
|||
|
|||
chmod($source_json_save_path, 0755); |
|||
chown($source_json_save_path, 'nobody'); |
|||
chgrp($source_json_save_path, 'nobody'); |
|||
} |
|||
|
|||
$sqls = array(); |
|||
$max_id = 0; |
|||
foreach($source_data['data'] as $comment) { |
|||
$content = $comment['text']; |
|||
$weibo_data_id = $comment['id']+0; |
|||
$comment_time = date('Y-m-d H:i:s', strtotime($comment['created_at'])); |
|||
|
|||
$sqls[] = array( |
|||
'sql' => 'insert into '.$this->tbl.' (`weibo_id`, `weibo_data_id`, `content`, `comment_time`) values (?, ?, ?, ?) ON DUPLICATE KEY UPDATE `weibo_data_id`=?', |
|||
'vals' => array($weibo_id, $weibo_data_id, $content, $comment_time, $weibo_data_id), |
|||
); |
|||
$max_id = $weibo_data_id - 1; |
|||
} |
|||
|
|||
$rdata['total_number'] = $source_data['total_number']+0; |
|||
$rdata['max_id'] = $max_id; |
|||
$rdata['weibo_id'] = $weibo_id; |
|||
$rdata['count'] = empty($source_data['data']) ? 0 : count($source_data['data']); |
|||
$rdata['is_load_all'] = count($source_data['data']) <= 0 ? true : false; |
|||
if(empty($source_data['data']) || count($source_data['data']) <= 0) return $rdata; |
|||
|
|||
if(isset($source_data['max_id']) && $source_data['max_id'] == 0) { |
|||
$rdata['is_load_all'] = true; |
|||
if(empty($sqls)) return $rdata; |
|||
} |
|||
|
|||
$res = $this->obj->execTrans2($sqls); |
|||
if(!$res) { |
|||
$this->setError('保存评论失败'); |
|||
$this->writeLog(ZHISHIKU_SPIDER_LOG, ZHISHIKU_SPIDER_COMMENT, '保存评论失败:'.json_encode($sqls)); |
|||
return false; |
|||
} |
|||
|
|||
|
|||
|
|||
return $rdata; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,25 @@ |
|||
<?php |
|||
/** |
|||
* 微信小程序 |
|||
*/ |
|||
include_once(SERVER_ROOT . "/model/mBase.php"); |
|||
|
|||
class mWeixinMp extends mBase { |
|||
public function getOpenid($code) { |
|||
$appid = MP_APPID; |
|||
$secret = MP_SECRET; |
|||
|
|||
$get_openid_url = sprintf(MP_GET_OPENID_HREF, $appid, $secret, $code); |
|||
|
|||
$jsonres = $this->getCUrl($get_openid_url); |
|||
$get_openid_res = json_decode($jsonres, true); |
|||
if (empty($get_openid_res['openid'])) { |
|||
$this->writeLog('user', 'get_openid_error_log', $get_openid_url . "|" . $jsonres); |
|||
return false; |
|||
} |
|||
|
|||
return $get_openid_res['openid']; |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,11 @@ |
|||
[2025-03-19 10:23:22]kill:/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php|0_dcf0a1f522b7ee92f3a83338b41a6fc4|1742351002||7200 |
|||
[2025-05-26 18:02:37]kill:/data1/www_pengda/knowledge/queue/deal/get_weibo_behavior.php|0_62e4710720188c92e02855edb5f27315|1748253757||7200 |
|||
[2025-05-26 18:02:37]kill:/data1/www_pengda/knowledge/queue/deal/get_weibo_behavior.php|1_62e4710720188c92e02855edb5f27315|1748253757||7200 |
|||
[2025-05-26 18:02:37]kill:/data1/www_pengda/knowledge/queue/deal/get_weibo_behavior.php|2_62e4710720188c92e02855edb5f27315|1748253757||7200 |
|||
[2025-05-26 18:02:37]kill:/data1/www_pengda/knowledge/queue/deal/get_weibo_behavior.php|3_62e4710720188c92e02855edb5f27315|1748253757||7200 |
|||
[2025-05-26 18:02:37]kill:/data1/www_pengda/knowledge/queue/deal/get_weibo_behavior.php|4_62e4710720188c92e02855edb5f27315|1748253757||7200 |
|||
[2025-05-26 18:31:10]kill:/data1/www_pengda/knowledge/queue/deal/get_weibo_behavior.php|0_62e4710720188c92e02855edb5f27315|1748255470||7200 |
|||
[2025-05-26 18:31:10]kill:/data1/www_pengda/knowledge/queue/deal/get_weibo_behavior.php|1_62e4710720188c92e02855edb5f27315|1748255470||7200 |
|||
[2025-05-26 18:31:10]kill:/data1/www_pengda/knowledge/queue/deal/get_weibo_behavior.php|2_62e4710720188c92e02855edb5f27315|1748255470||7200 |
|||
[2025-05-26 18:31:10]kill:/data1/www_pengda/knowledge/queue/deal/get_weibo_behavior.php|3_62e4710720188c92e02855edb5f27315|1748255470||7200 |
|||
[2025-05-26 18:31:10]kill:/data1/www_pengda/knowledge/queue/deal/get_weibo_behavior.php|4_62e4710720188c92e02855edb5f27315|1748255470||7200 |
@ -0,0 +1 @@ |
|||
2025-05-26 17:41:44|get_weibo_behavior.php get_weibo_behavior |
@ -0,0 +1 @@ |
|||
2025-07-15 15:04:02|spider_weibo_comment.php spider_weibo_comment |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:00|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 18:02:36|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php getZmhttpIp.log |
@ -0,0 +1 @@ |
|||
2025-03-19 18:02:43|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php getZmhttpIp |
@ -0,0 +1 @@ |
|||
2025-03-20 17:13:01|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php |
@ -0,0 +1 @@ |
|||
2025-07-11 14:30:24|spider_weibo_comment.php |
@ -0,0 +1 @@ |
|||
2025-03-20 10:54:25|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-05-26 18:49:12|/data1/www_pengda/knowledge/queue/deal/get_weibo_behavior.php spider_weibo_behavior |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:00|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 17:59:54|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:02|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 17:59:55|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:00|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 17:59:45|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:00|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 17:59:57|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:00|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 17:59:55|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:01|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 17:59:58|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:00|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 17:59:58|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:02|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 17:59:57|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:01|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 17:59:58|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:02|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 17:59:57|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-07-15 14:56:58|spider_weibo_comment.php spider_weibo_comment |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:00|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-07-11 18:46:54|/data1/www_wujason/knowledge/queue/deal/spider_weibo_comment.php spider_weibo_comment |
@ -0,0 +1 @@ |
|||
2025-03-20 17:12:58|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php |
@ -0,0 +1 @@ |
|||
2025-03-20 10:54:37|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-05-26 18:49:20|/data1/www_pengda/knowledge/queue/deal/get_weibo_behavior.php spider_weibo_behavior |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:01|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 17:59:53|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:01|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 17:59:54|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:02|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 17:59:56|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:01|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 17:59:57|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:00|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 17:59:46|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:00|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 17:59:58|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:00|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 17:59:57|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:02|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 17:59:54|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:00|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 17:59:58|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:02|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-03-19 17:59:55|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-07-15 14:57:07|spider_weibo_comment.php spider_weibo_comment |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:00|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-07-11 18:32:22|/data1/www_wujason/knowledge/queue/deal/spider_weibo_comment.php spider_weibo_comment |
@ -0,0 +1 @@ |
|||
2025-03-20 10:54:25|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-05-26 18:49:09|/data1/www_pengda/knowledge/queue/deal/get_weibo_behavior.php spider_weibo_behavior |
@ -0,0 +1 @@ |
|||
2025-07-15 11:40:58|spider_weibo_comment.php spider_weibo_comment |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:01|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-07-11 18:32:23|/data1/www_wujason/knowledge/queue/deal/spider_weibo_comment.php spider_weibo_comment |
@ -0,0 +1 @@ |
|||
2025-03-20 10:54:25|/data1/www_pengda/knowledge/queue/deal/get_weibo_video.php spider_weibo_data |
@ -0,0 +1 @@ |
|||
2025-05-26 18:49:09|/data1/www_pengda/knowledge/queue/deal/get_weibo_behavior.php spider_weibo_behavior |
@ -0,0 +1 @@ |
|||
2025-07-15 11:41:02|spider_weibo_comment.php spider_weibo_comment |
@ -0,0 +1 @@ |
|||
2025-03-19 13:35:01|/data1/www_pengda/knowledge/queue/deal/get_weibo_data.php spider_weibo_data |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue