feat: 后端全量更新 - 含所有本次需求

- Contract.php: 返回合约账户余额(balance_contract)
- My.php: 地址管理增加BTC/ETH
- AppContract.php: 一键平仓(closeall)
- AppProxy.php: 代理专属注册链接 + 分级权限(L1/L2)
- site.php: 手续费减半(0.018→0.009)
- agent_permission_setup.sql: 代理权限SQL
- crypto_news_crawler.py: 新闻自动采集脚本
This commit is contained in:
li
2026-03-30 20:16:32 +08:00
commit 1b24994e74
6721 changed files with 1308571 additions and 0 deletions
+68
View File
@@ -0,0 +1,68 @@
<?php
class imageExifPlugin extends PluginBase{
function __construct(){
parent::__construct();
//扩展缺失提示
if( !function_exists('exif_read_data')){
$this->appPackage();
$this->packageData['configItem'] = array(
"sep001" => '<div class="alert alert-danger m-30">'.LNG('imageExif.Config.missLib').'</div>',
);
}
}
public function regiest(){
$this->hookRegiest(array(
'user.commonJs.insert' => 'imageExifPlugin.echoJs',
'share.image' => 'imageExifPlugin.imageCheck',
'explorer.image' => 'imageExifPlugin.imageCheck',
));
}
public function echoJs($st,$act){
if( !function_exists('exif_read_data')){
return;
}
//$this->echoFile('static/main.js');
}
public function getExif(){
$path = _DIR($this->in['path']);
$exif = @exif_read_data($path);
show_json($exif,!!$exif);
}
//根据Orientation 自动旋转图片
//http://blog.csdn.net/ouyangtianhan/article/details/29825885
//https://gxnotes.com/article/126807.html
//https://zhuanlan.zhihu.com/p/25216999
public function imageCheck(){
if( !function_exists('exif_read_data')){
return;
}
$path = _DIR($this->in['path']);
$exif = @exif_read_data($path);
if(!file_exists($path) || !$exif || !isset($exif['Orientation'])) return;
if( $exif['Orientation']< 3) return;
$img = ImageThumb::image($path);
if(!$img) return;
$ort = $exif['Orientation'];
if($ort == 5 || $ort == 6){
$img = imagerotate($img, 270, null);
}
if($ort == 3 || $ort == 4){
$img = imagerotate($img, 180, null);
}
if($ort == 7 || $ort == 8){
$img = imagerotate($img, 90, null);
}
if($ort == 4 || $ort == 5 || $ort == 7){
imageflip($img,IMG_FLIP_HORIZONTAL);
}
$ext = get_path_ext($path);
$imagefun = 'image'.($ext=='jpg'?'jpeg':$ext);
$res = $imagefun($img, $path);
imagedestroy($img);
//show_json($exif,$res);
}
}
@@ -0,0 +1,7 @@
<?php
return array(
'imageExif.meta.name' => 'Image EXIF',
'imageExif.meta.title' => 'Image EXIF Get',
'imageExif.meta.desc' => 'Picture EXIF access; camera phone to take pictures automatically correct direction',
'imageExif.Config.missLib' => "Lack php exif extensions, try again after installation"
);
@@ -0,0 +1,7 @@
<?php
return array(
'imageExif.meta.name' => '图片EXIF',
'imageExif.meta.title' => '图片EXIF获取',
'imageExif.meta.desc' => '图片EXIF获取;手机拍摄图片方向自动校正',
'imageExif.Config.missLib' => "缺少php扩展exif,请安装后再试",
);
@@ -0,0 +1,26 @@
{
"id":"imageExif",
"name":"{{LNG.imageExif.meta.name}}",
"title":"{{LNG.imageExif.meta.title}}",
"version":"1.2",
"category":"media",
"source":{
"className":"font-icon icon-info bg-blue-7"
},
"description":"{{LNG.imageExif.meta.desc}}",
"auther":{
"copyright":"kodcloud",
"homePage":"http://kodcloud.com"
},
"configItem":{
"formStyle":{"className":"form-box-title-right"},
"pluginAuth":{
"type":"userSelect",
"value":"all:1",
"display":"{{LNG.Plugin.config.auth}}",
"desc":"{{LNG.Plugin.config.authDesc}}",
"require":1
}
}
}
@@ -0,0 +1,52 @@
// fileHistoryPlugin
kodReady.push(function(){
var menuOpt = {
'image-exif':{
name:LNG['imageExif.meta.name'],
className:"image-exif",
icon:" icon-info",
callback:function(action,option){
if(option.selector == '.menu-tree-file'){
var param = ui.tree.makeParam();
}else{
var param = ui.path.makeParam();
}
var request = '{{pluginApi}}getExif&path='+urlEncode(param.path);
console.log(param.path);
$.ajax({
url:request,
dataType:'json',
beforeSend: function(){
Tips.loading(LNG.loading);
},
error:core.ajaxError,
success:function(data){
Tips.close(data);
if(data.code){
console.log(data.data);
}
}
});
}
}
}
$.contextMenu.menuAdd(menuOpt,'.menu-file',false,'.info');
$.contextMenu.menuAdd(menuOpt,'.menu-tree-file',false,'.info');
//显示隐藏 [ 只在自己的目录;自己所在的群组目录文件有历史记录权限]
Hook.bind('rightMenu.show.menu-file',function($menuAt,$theMenu){
if($('.context-menu-active').hasClass('menu-tree-file') ){
var param = ui.tree.makeParam();
}else{
var param = ui.path.makeParam();
}
var ext = core.pathExt(param.path);
var hideClass = 'hidden';//'disabled' hideClass
if (inArray(['jpg','jpeg','png','bmp'],ext)){
$theMenu.find('.image-exif').removeClass(hideClass);
}else{
$theMenu.find('.image-exif').addClass(hideClass);
}
});
});