⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 class.php

📁 900mm天空下载小偷系统最终修正版 很好的下载系统
💻 PHP
字号:
<?
####################################################################################################
#                                900mm(900mm天空软件下载小偷系统)                                  #
#--------------------------------------------------------------------------------------------------#
#                               主页: http://www.900mm.com/                                       #
#                             演示:http://www.900mm.com/free8/down/                               #
#--------------------------------------------------------------------------------------------------#
#                                                                                                  #
#                                          此程序 为免费程序,您可以任意传播和使用她,除了界面       #
#             上的美化外,您不得对此程序的其他部分作任何修改.(不支持界面美化,现在界面我             #
#             觉得作为网站管理员使用应该可以了).本软件为免费软件.本人不承担由本软件带              #
#             来的任何损失!                                                                        #
#--------------------------------------------------------------------------------------------------#
#                          此程序采用文本数据库,需要 PHP(4.1.0以上版本)支持.                       #
#--------------------------------------------------------------------------------------------------#
#                                          版权信息不得删除                                        #
#--------------------------------------------------------------------------------------------------#
#                                   版权所有 *梦幻星空*工作室                                      #
#                                    Copyright (C) 2005-2008 *梦幻星空*                            #
#                  Powered by: *梦幻星空*(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错误!<a href=http://www.900mm.com/>5秒钟后转向首页</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('&', '&amp;', $string);
			$string = str_replace('\r', '', $string);
			$string = str_replace('\n', '', $string);
			$string = str_replace('"', '&quot;', $string);
			$string = str_replace('<', '&lt;', $string);
			$string = str_replace('>', '&gt;', $string);
			$string = preg_replace('/&amp;(#\d{3,5};)/', '&\\1', $string);
		}
		return $string;
	}
}
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -