~~ssh~~ https auto update

This commit is contained in:
lhy6305 2024-09-23 22:34:15 +08:00
parent e8d454d461
commit 0ad0337259
4 changed files with 17 additions and 17 deletions

16
api.php
View File

@ -73,22 +73,6 @@ $team_id=explode(":", $team_token)[0];
$team_id="team_".$team_id;
//change $action[1](cid) based on $alias2cid_l
if(count($action)>1&&strlen($action[1])>0) {
require(__DIR__."/phplib/libvar_alias2cid.php");
$alias2cid=[];
if(array_key_exists($game, $alias2cid_l)) {
$alias2cid=$alias2cid_l[$game];
}
unset($alias2cid_l);
if(array_key_exists($action[1], $alias2cid)) {
$action[1]=$alias2cid[$action[1]];
}
unset($alias2cid);
}
//require files depends on the request
//$action, $game, $ginfo, $team_id, $team_token is set

View File

@ -5,6 +5,21 @@ if(count($action)<2) {
exit;
}
//change $action[1](cid) based on $alias2cid_l
if(count($action)>1&&strlen($action[1])>0) {
require(__DIR__."/phplib/libvar_alias2cid.php");
$alias2cid=[];
if(array_key_exists($game, $alias2cid_l)) {
$alias2cid=$alias2cid_l[$game];
}
unset($alias2cid_l);
if(array_key_exists($action[1], $alias2cid)) {
$action[1]=$alias2cid[$action[1]];
}
unset($alias2cid);
}
$cid=$action[1];
require(__DIR__."/phplib/libvar_cid2tid.php");

View File

@ -14,7 +14,7 @@ $alias2cid_l=[
],
"wood-2"=>[
"wp24-mc-1"=>"cid_200",
"wp24-mc-1"=>"cid_106",
],
];

View File

@ -30,6 +30,7 @@ $cid2tid_l=[
"cid_88"=>"tid_4",
"cid_90"=>"tid_5",
"cid_87"=>"tid_6",
"cid_106"=>"tid_7",
],
];