工会web

This commit is contained in:
cyw
2026-02-24 09:25:17 +08:00
parent 6444f9f72e
commit ab4066dd14
801 changed files with 74278 additions and 0 deletions

51
GonghuiWeb/inc/class.php Normal file
View File

@@ -0,0 +1,51 @@
<?php
ini_set('memory_limit', '-1'); //不限制内存
date_default_timezone_set('Asia/Shanghai'); //中国时间
header("Content-Type: text/html; charset=gbk");//输出编码
include_once("config.php");
function config(){
$WebUrl = $_SERVER['HTTP_HOST'];
$FileName = $_SERVER['PHP_SELF'];
$Folders = count(explode('/', $FileName));
if($Folders > 2){
for($i=3;$i<=$Folders;$i++){
$Folder.="../";
}
}
list($WebUrl0,$WebUrl1,$WebUrl2,$WebUrl3)=explode('.', $WebUrl);
if($WebUrl3){
$WebUrla=$WebUrl1.".".$WebUrl2.".".$WebUrl3;
}else{
if (preg_match('/com|cn|net|org/i',$WebUrl1)){
$WebUrla=$WebUrl0.".".$WebUrl1;
}else{
$WebUrla=$WebUrl1.".".$WebUrl2;
}
}
if(!preg_match('/com|cn|net|org/i',$WebUrl1)) {
$WebUrlb=$WebUrl1;
}else{
$WebUrlb=$WebUrl0;
}
if($_SERVER['QUERY_STRING']){
$Website=$FileName."?".$_SERVER['QUERY_STRING'];
}else{
$Website=$FileName;
}
return $array=array('Config'=>array(
'WebUrl'=>$WebUrl,//admin.szhan.com
'Url'=>$WebUrla,//szhan.com
'Website'=>$WebUrl.$Website,//admin.szhan.com/admin/adm/topic.php
'Home'=>"www.".$WebUrla,//www.szhan.com
'FileName'=>$FileName,// /admin/adm/topic.php
'Folder'=>$Folder,//../../
'Template'=>$WebUrlb,//szhan
'Date'=>date("Y-m-d H:i:s")
));
}
$GG=array_merge(array_change_key_case($_GET,CASE_LOWER),$_POST,config());
function __autoload($class_name){
global $GG;
include($GG['Config']['Folder']."../class/".$class_name.".php");
}
?>