工会web
This commit is contained in:
89
GonghuiWeb/www/adminxx/weihu/b.php
Normal file
89
GonghuiWeb/www/adminxx/weihu/b.php
Normal file
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
include_once("../../../inc/admin.inc.php");
|
||||
include_once("../../../inc/class.php");
|
||||
include_once("../../../inc/admin.smarty.php");
|
||||
include_once("../../../inc/admin.power.php");
|
||||
|
||||
|
||||
exit;
|
||||
//µ¼ÈëÊý¾Ý
|
||||
/*AccountsInfo UserID
|
||||
AndroidLockInfo UserID
|
||||
IndividualDatum UserID
|
||||
|
||||
QPPlatformDB.dbo.UnionRoomInfo id
|
||||
|
||||
QPTreasureDB.dbo.GameScoreInfo UserID
|
||||
QPTreasureDB.dbo.GameUnion UnionID
|
||||
QPTreasureDB.dbo.GameUnionKind id
|
||||
QPTreasureDB.dbo.GameUnionMember UnionMemberID*/
|
||||
|
||||
$tabCon = [
|
||||
['table'=>'AccountsInfo','zid'=>'UserID'],
|
||||
['table'=>'AndroidLockInfo','zid'=>'UserID'],
|
||||
['table'=>'IndividualDatum','zid'=>'UserID'],
|
||||
['table'=>'QPPlatformDB.dbo.UnionRoomInfo','zid'=>'id'],
|
||||
['table'=>'QPTreasureDB.dbo.GameScoreInfo','zid'=>'UserID'],
|
||||
['table'=>'QPTreasureDB.dbo.GameUnion','zid'=>'UnionID'],
|
||||
['table'=>'QPTreasureDB.dbo.GameUnionKind','zid'=>'id'],
|
||||
['table'=>'QPTreasureDB.dbo.GameUnionMember','zid'=>'UnionMemberID']
|
||||
];
|
||||
|
||||
|
||||
function chu($arr){
|
||||
if(is_array($arr)){
|
||||
$all = [];
|
||||
foreach ($arr as $k => $v){
|
||||
if(is_object($v)){
|
||||
$obj = (array)$v;
|
||||
$all[] = "'".$obj['date']."'";
|
||||
}else{
|
||||
$all[] = "'".str_replace([',',"'"],['£¬','`'],$v)."'";
|
||||
}
|
||||
}
|
||||
//return $all;
|
||||
return "(".implode(',',$all).")";
|
||||
}
|
||||
}
|
||||
|
||||
$db->links('old');
|
||||
$num = $GG['num'] ? $GG['num'] : 0;
|
||||
$GG['page'] = $GG['page'] ? $GG['page'] : 1;
|
||||
if($num >= count($tabCon)){
|
||||
echo "OK";
|
||||
exit;
|
||||
}
|
||||
$all = $db->page([
|
||||
"sql"=>"select * from ".$tabCon[$num]['table']." order by ".$tabCon[$num]['zid']." asc",
|
||||
"count"=>"select count(*) from ".$tabCon[$num]['table'],
|
||||
"key"=>$tabCon[$num]['zid'],
|
||||
"table"=>$tabCon[$num]['table'],
|
||||
"page"=>$GG['page'],
|
||||
"pageSize"=>2
|
||||
]);
|
||||
if($all){
|
||||
foreach ($all['data'] as $k => $v){
|
||||
$data[] = chu($v);
|
||||
}
|
||||
$key = array_keys($all['data'][0]);
|
||||
$sql = "INSERT INTO ".$tabCon[$num]['table']." (".implode(',', $key).") VALUES ".implode(',',$data)." ";
|
||||
$db->links();
|
||||
print_r($sql);
|
||||
print_r($all);
|
||||
$db->query($sql);
|
||||
if($GG['page'] <= $all['page']['maxPage']){
|
||||
$page = $GG['page']+1;
|
||||
echo $tabCon[$num]['table']." = ".$GG['page']."/".$all['page']['maxPage'];
|
||||
//echo "<script>location.href='?num=".$num."&page=".$page."';</script>";
|
||||
}else{
|
||||
if($num < count($tabCon)){
|
||||
$num = $num+1;
|
||||
echo "<script>location.href='?num=".$num."';</script>";
|
||||
}else{
|
||||
echo "OK";
|
||||
}
|
||||
}
|
||||
}
|
||||
$db->close();
|
||||
unset($GG,$ppxq,$db);
|
||||
?>
|
||||
Reference in New Issue
Block a user