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

📄 admin_popup.php

📁 easy cms for getion you image with high qualite
💻 PHP
📖 第 1 页 / 共 2 页
字号:
		Note : To upload more file, please use FTP instead.		<?	}}function dir_rename(){	if(post_param('submit') && post_param('album_name')){		$old_name = get_param('id');		$new_name = post_param('album_name');		if($old_name == '' OR $new_name == ''){			exit('Please type the gallery name.');		}		if(!is_dir('./gallery/'.$old_name)){			exit($dir_to_create.' is not a directory. Click <a href="#" onClick="window.history.go(-1)">here</a> to try again.');		}		if(rename('./gallery/'.$old_name, './gallery/'.$new_name)){			echo 'Gallery renamed! You need to re-generate the thumbnails.';		}else{			echo 'Cannot rename gallery. Please rename it using FTP instead.';		}		?>	    <br /><br /><a href="javascript:tutupWindow();">Close</a>	    <script language="JavaScript">	        <!--	        function tutupWindow() {	        opener.location.reload();	        self.close();	        }	        // -->	    </script>		<?	}else{		?>		<h1>Rename Album</h1>		<form action="?pop=dir_rename&id=<?=get_param('id')?>" method="POST">			Album Name<br />			<input type="text" name="album_name" value="<?=get_param('id')?>" style="width:300px;" /><br />			<input type="submit" name="submit" value="Submit" /> <input type="button" name="cancel" value="Cancel" onclick="window.close();" />		</form>		<?	}}function dir_delete(){	if(post_param('submit') && get_param('id')){		$dir_to_create = get_param('id');		if($dir_to_create == ''){			exit('Please type the gallery name.');		}		if(is_dir('./gallery/'.$dir_to_create)){			if(RemoveDirectory('./gallery/'.$dir_to_create)){			   echo 'Gallery deleted!';			}else{			   echo 'Cannot delete gallery directory. Please remove it using FTP instead.';			}		}		?>	    <br /><br /><a href="javascript:tutupWindow();">Close</a>	    <script language="JavaScript">	        <!--	        function tutupWindow() {	        opener.location.reload();	        self.close();	        }	        // -->	    </script>		<?	}else{		?>		<h1>Delete Album</h1>		<form action="?pop=dir_delete&id=<?=get_param('id')?>" method="POST">			Are you sure to delete ? All photos under this album will be delete too.<br />			<input type="submit" name="submit" value="Submit" /> <input type="button" name="cancel" value="Cancel" onclick="window.close();" />		</form>		<?	}}function file_rename(){	if(post_param('submit') && get_param('id') && post_param('file_name')){		$file_to_rename = base64_decode(get_param('id'));		$file_to_rename_arr = explode(']|[', $file_to_rename);		$dir = $file_to_rename_arr[0];		//echo ' - ';		$old_file_name = $file_to_rename_arr[1];		//echo ' - ';		$get_file_ext = substr($old_file_name, -4);		$new_file_name = str_replace(' ','_',post_param('file_name')) . $get_file_ext;		//echo ' - ';		unlink('data/thumbdata_'.get_param('id').'.jpg');		if(@rename('./gallery/'.$dir . '/' . $old_file_name, './gallery/'.$dir . '/' . $new_file_name)){			echo 'Photo filename renamed.';	        require('includes/thumbnailer.php');			if(!file_exists('data/thumbdata_'.base64_encode($dir.']|['.$new_file_name.']|['.filectime('gallery/'.$dir.'/'.$new_file_name)).'.jpg') AND (substr(strtolower($new_file_name), -3) == 'jpg' || substr(strtolower($new_file_name), -3) == 'gif')){				$tis = new ThumbnailImage();				$tis->src_file  = 'gallery/'.$dir.'/'.$new_file_name;				$tis->dest_type = THUMB_JPEG;				//$tis->dest_file = 'data/thumbdata_'.base64_encode($current_dir.']|['.$file . ']|[' . filemtime('gallery/'.$current_dir.'/'.$file)).'.jpg';				$tis->dest_file = 'data/thumbdata_'.base64_encode($dir.']|['.$new_file_name . ']|[' . filectime('gallery/'.$dir.'/'.$new_file_name)).'.jpg';				$tis->max_width = 120;				$tis->max_height = 4000;				$tis->Output();			}		}else{			echo 'Cannot rename this photo. If it uploaded using FTP, please rename it using FTP program.';		}		?>	    <br /><br /><a href="javascript:tutupWindow();">Close</a>	    <script language="JavaScript">	        <!--	        function tutupWindow() {	        opener.location.reload();	        self.close();	        }	        // -->	    </script>		<?	}else{		$file_id = base64_decode(get_param('id'));		$file_meta_arr = explode(']|[', $file_id);		$file_name = str_replace('_',' ',substr($file_meta_arr[1], 0, -4));		?>		<h1>Photo Rename</h1>		<form action="?pop=file_rename&id=<?=get_param('id')?>" method="POST">			Photo Name<br />			<input type="text" name="file_name" value="<?=$file_name?>" style="width:300px;" /><br />			<input type="submit" name="submit" value="Submit" /> <input type="button" name="cancel" value="Cancel" onclick="window.close();" />		</form>		<?	}}function file_desc(){	if(post_param('submit') && get_param('id') && post_param('file_desc')){		$file_id = get_param('id');		$content = post_param('file_desc');		$fp = fopen('data/desc_'.$file_id.'.desc', 'w');		fwrite($fp, $content);		fclose($fp);		echo 'Description updated.';		?>	    <br /><br /><a href="javascript:tutupWindow();">Close</a>	    <script language="JavaScript">	        <!--	        function tutupWindow() {	        opener.location.reload();	        self.close();	        }	        // -->	    </script>		<?	}else{		if(file_exists('data/desc_'.get_param('id').'.desc')){			$file_description = implode ('', file ('data/desc_'.get_param('id').'.desc'));		}else{			$file_description = '';		}		?>		<h1>Photo Description</h1>		<form action="?pop=file_desc&id=<?=get_param('id')?>" method="POST">			Description<br />			<input type="text" name="file_desc" value="<?=$file_description?>" style="width:400px;" /><br />			<input type="submit" name="submit" value="Submit" />			<input type="button" name="cancel" value="Cancel" onclick="window.close();" />		</form>		<?	}}function file_del(){	if(post_param('submit') && get_param('id')){		$file_to_delete = get_param('id');		$file_to_delete_arr = explode(']|[', base64_decode($file_to_delete));		if(@unlink('./gallery/'.$file_to_delete_arr[0].'/'.$file_to_delete_arr[1])){			echo 'Photo deleted.';		}else{			echo 'Cannot delete this photo. If it uploaded using FTP, please delete it using FTP program.';		}		?>	    <br /><br /><a href="javascript:tutupWindow();">Close</a>	    <script language="JavaScript">	        <!--	        function tutupWindow() {	        opener.location.reload();	        self.close();	        }	        // -->	    </script>		<?	}else{		?>		<h1>Delete Photo</h1>		<form action="?pop=file_delete&id=<?=get_param('id')?>" method="POST">			Are you sure to delete this photo?<br />			<input type="submit" name="submit" value="Submit" />			<input type="button" name="cancel" value="Cancel" onclick="window.close();" />		</form>		<?	}}function html_interface(){	?>	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">	<html xmlns="http://www.w3.org/1999/xhtml">	<head>	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />	<title>iFoto - My Simple Photo Gallery</title>	<style type="text/css">	<!--	html, body {font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #494949; background-color:#DDDDDD; text-align:center;}	h1 { font-size:12px; padding:5px; border:1px solid #CCCCCC; background:#E2E2E2;}	a:link {color: #006699; text-decoration: none;}	a:visited {text-decoration: none; color: #006699;}	a:hover {text-decoration: underline; color: #000000;}	a:active {text-decoration: none; color: #006699;}	-->	</style>	</head>	<body>		<?php popup_content(); ?>	</body>	</html>	<?}?>

⌨️ 快捷键说明

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