ajax.php

来自「创建虚拟磁盘。用户可以创建磁盘」· PHP 代码 · 共 42 行

PHP
42
字号
<?php 
##
#	Project: PHPDisk
#	This is NOT a freeware, use is subject to license terms.
#
#	Site: http://www.phpdisk.com
#
#	$Id: ajax.php 268 2009-03-11 08:33:08Z along $
#
#	Copyright (C) 2008-2009 PHPDisk Team. All Rights Reserved.
#
##

include "includes/commons.inc.php";

switch($action){
	case 'public':
		$file_id = (int)gpc('file_id','G',0);
		
		$str = "";
		$rs = $db->fetch_one_array("select file_id,file_key,is_image from pd_publics where file_id='$file_id'");
		if($rs['is_image'] ==1){
			$str = urr("thumb","action=$action&file_id=".$rs['file_id']."&file_key=".$rs['file_key']);
		}
		unset($rs);
		echo $str;
	break;
	default:
		$file_id = (int)gpc('file_id','G',0);
		
		$str = "";
		$rs = $db->fetch_one_array("select file_id,file_key,is_image from pd_files where file_id='$file_id'");
		if($rs['is_image'] ==1){
			$str = urr("thumb","action=default&file_id=".$rs['file_id']."&file_key=".$rs['file_key']);
		}
		unset($rs);
		echo $str;
	
}
include PHPDISK_ROOT."./includes/footer.inc.php";

?>

⌨️ 快捷键说明

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