feat: 全面代码更新 - ECharts 5.4.2 重构、新增量化分析模块、前端库升级
- 升级 ECharts 到 5.4.2,重构 lib/ 目录结构 - 新增 DataTables 2.x 和 FixedColumns 插件 - 新增 quant/ 宏观研究报告模块 - 重构图表页面:stock_trend、hkholdbycode 等采用 JS fetch API.doorcome.cn 模式 - 新增 CLAUDE.md 补充页面文档和新数据流说明 - 更新 inc/config.php TuShare API 配置 - 更新新闻联播分析模块 news/ 和相关研究报告 research/ - 新增 api_document/ 参考文档 - 清理 .gitignore,排除 uploads/xls/.mcp.json/ source maps 等非代码文件 - 所有 PHP 文件通过 php -l 语法检查 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+2
-59
@@ -12,65 +12,8 @@
|
||||
|
||||
<span style='color:grey;font-size:small;'>
|
||||
<?php
|
||||
ini_set("display_errors", "1");
|
||||
$mysqli = new mysqli('localhost','myquant','_H(lU1_fF*9baRTp','myquant');
|
||||
function log_pv(){
|
||||
#echo "start log";
|
||||
global $mysqli;
|
||||
$vpage = addslashes($_SERVER['PHP_SELF']);
|
||||
$ua = addslashes($_SERVER['HTTP_USER_AGENT']);
|
||||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
$qs = addslashes($_SERVER['QUERY_STRING']);
|
||||
$vtime = date("Y-m-d H:i:s");
|
||||
|
||||
$sql="insert into pv_log(vpage,querystring,remoteip,ua,vtime)
|
||||
values ('".$vpage."','".$qs."','".$ip."', '".$ua."','".$vtime."')";
|
||||
|
||||
$mysqli->query($sql);
|
||||
|
||||
}
|
||||
function pv_counter($user=''){
|
||||
global $mysqli;
|
||||
$hits=0; //set default page hits 0;
|
||||
$page=$_SERVER['PHP_SELF'];
|
||||
|
||||
$lmtime=date("Y-m-d H:i:s");
|
||||
|
||||
$sql="select hits from pv_counter where page_name='".$page."'";
|
||||
$result=$mysqli->query($sql);
|
||||
$rt=$result->fetch_all(MYSQLI_ASSOC);
|
||||
|
||||
$n=count($rt);
|
||||
if($n<1){
|
||||
$sql = "insert into pv_counter(page_id,Page_name,hits,lm_date,lm_ip,lm_user)
|
||||
values (null,
|
||||
'".$page."','1','".$lmtime."',
|
||||
'".$_SERVER['REMOTE_ADDR']."','".$user."')";
|
||||
|
||||
$mysqli->query($sql);
|
||||
$hits=1;
|
||||
}
|
||||
if($n==1){
|
||||
$hits=$rt[0]['hits'];
|
||||
$hits++;
|
||||
$sql="update pv_counter set hits='".$hits."',lm_date='".$lmtime."',
|
||||
lm_ip='".$_SERVER['REMOTE_ADDR']."',lm_user='".$user."' where page_name='".$page."'";
|
||||
$mysqli->query($sql);
|
||||
}
|
||||
if($n>1){
|
||||
$display= "<p align='center'>There is error on pv_counter </p>";
|
||||
return $display;
|
||||
}
|
||||
$sql="select sum(hits) hits_all from pv_counter";
|
||||
$result=$mysqli->query($sql);
|
||||
$hits_all=$result->fetch_all(MYSQLI_ASSOC);
|
||||
$display="Page hits: ".$hits." Total: ".$hits_all[0]['hits_all'];
|
||||
echo $display;
|
||||
|
||||
}
|
||||
log_pv();
|
||||
pv_counter($user='');
|
||||
$mysqli->close();
|
||||
include_once __DIR__ . "/../inc/functions.inc.php";
|
||||
page_counter();
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user