?? class.php
字號(hào):
<?
####################################################################################################
# 900mm(900mm天空軟件下載小偷系統(tǒng)) #
#--------------------------------------------------------------------------------------------------#
# 主頁(yè): http://www.900mm.com/ #
# 演示:http://www.900mm.com/free8/down/ #
#--------------------------------------------------------------------------------------------------#
# #
# 此程序 為免費(fèi)程序,您可以任意傳播和使用她,除了界面 #
# 上的美化外,您不得對(duì)此程序的其他部分作任何修改.(不支持界面美化,現(xiàn)在界面我 #
# 覺得作為網(wǎng)站管理員使用應(yīng)該可以了).本軟件為免費(fèi)軟件.本人不承擔(dān)由本軟件帶 #
# 來(lái)的任何損失! #
#--------------------------------------------------------------------------------------------------#
# 此程序采用文本數(shù)據(jù)庫(kù),需要 PHP(4.1.0以上版本)支持. #
#--------------------------------------------------------------------------------------------------#
# 版權(quán)信息不得刪除 #
#--------------------------------------------------------------------------------------------------#
# 版權(quán)所有 *夢(mèng)幻星空*工作室 #
# Copyright (C) 2005-2008 *夢(mèng)幻星空* #
# Powered by: *夢(mèng)幻星空*(E-mail:webmaster@900mm.com QQ:304949475) #
#--------------------------------------------------------------------------------------------------#
####################################################################################################
if(!defined('MEC_DESIGN')) {
exit('Access Denied');
}
class start{
function getdemo($file,$type=''){
global $fromurl,$referer;
if($type){
$file=$fromurl.'/'.$type.'/'.$file;
}else{
$file=$fromurl.$file;
}
if($open=file($file)){
$count=count($open);
for($i=0;$i<$count;$i++){
$theget.=$open[$i];
}
}else{
die('404錯(cuò)誤!<a href=http://www.900mm.com/>5秒鐘后轉(zhuǎn)向首頁(yè)</a><br><meta http-equiv="refresh" content="3;URL=http://www.900mm.com/">');
}
return $theget;
}
function daddslashes($string, $force = 0) {
if(!$GLOBALS['magic_quotes_gpc'] || $force) {
if(is_array($string)) {
foreach($string as $key => $val) {
$string[$key] = daddslashes($val, $force);
}
} else {
$string = addslashes($string);
}
}
return $string;
}
function open($file,$cachename='',$type=''){
global $timestamp,$flush;
if(!file_exists($cachename)){
if($type){
$data= $this -> getdemo($file,$type);
}else{
$data= $this ->getdemo($file);
}
return $data;
}else{
$lastflesh=@filemtime($cachename);
if($lastflesh + ($flush * 60) < $timestamp ){
if($type){
$data=$this -> getdemo($file,$type);
}else{
$data=$this ->getdemo($file);
}
return $data;
}
}
}
function add_str($string) {
$string = AddSlashes($string);
$string = str_replace("\n","",$string);
$string = str_replace("\r","",$string);
return $string;
}
function un_str($string) {
$string = StripSlashes($string);
return $string;
}
function readfromfile($file_name) {
if($filenum=@fopen($file_name,"r")){
@flock($filenum,LOCK_SH);
$file_data=fread($filenum,@filesize($file_name));
@fclose($filenum);
return $file_data;
}else{
return false;
}
}
function writetofile($file_name,$data,$method="w") {
if($filenum=@fopen($file_name,$method)){
@flock($filenum,LOCK_EX);
$file_data=@fwrite($filenum,$data);
@fclose($filenum);
return $file_data;
}else{
return false;
}
}
function cut($file,$from,$end){
$message=explode($from,$file);
$message=explode($end,$message[1]);
return $message[0];
}
function credithide($message){
return stripslashes($message);
}
function template($file, $templateid = 0, $tpldir = '') {
global $mec_root, $tplrefresh,$referer,$timestamp,$noteinfo;
$tpldir = $tpldir ? $tpldir : TPLDIR;
$templateid = $templateid ? $templateid : TEMPLATEID;
$checku="cache/".md5($referer).".php";
$tplfile = $mec_root.'./'.$tpldir.'/'.$file.'.htm';
$objfile = $mec_root.'./temp/'.$templateid.'_'.$file.'.tpl.php';
if(TEMPLATEID != 1 && $templateid != 1 && !file_exists($tplfile)) {
return $this -> template($file, 1, './html/');
}
if($tplrefresh == 1 || ($tplrefresh > 1 && substr($GLOBALS['timestamp'], -1) > $tplrefresh)) {
if(@filemtime($tplfile) > @filemtime($objfile)) {
require_once $mec_root.'./template.php';
parse_template($file, $templateid, $tpldir);
}
}
return $objfile;
}
function updatecache($file,$cache=''){
global $timestamp,$flush;
if(!file_exists($file)){
$this -> writetofile($file,$cache);
$return=$cache;
}elseif(@filemtime($file) < $timestamp - ($flush * 60)){
$this -> writetofile($file,$cache);
$return=$cache;
}else{
$return=$this -> readfromfile($file);
}
return $return;
}
function dhtml($string) {
if(is_array($string)) {
foreach($string as $key => $val) {
$string[$key] = $this -> dhtml($val);
}
} else {
$string = str_replace('&', '&', $string);
$string = str_replace('\r', '', $string);
$string = str_replace('\n', '', $string);
$string = str_replace('"', '"', $string);
$string = str_replace('<', '<', $string);
$string = str_replace('>', '>', $string);
$string = preg_replace('/&(#\d{3,5};)/', '&\\1', $string);
}
return $string;
}
}
?>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -