<?php 
require "../Run.php";
if($admin!=1&&$admin!=2){
die("非法操作");
}
echo head('上传文件类型过滤');
echo '<div class="title">上传类型设置</div>';
echo '<div class="tip">请输入允许上传的文件类型，多个用|分割</div>';
if($_GET['add'] == 'yes'){
	file_put_contents("../lib/".WAPID."_uploadtype.txt",$_POST['type']);
}
if(!is_file("../lib/".WAPID."_uploadtype.txt")){
  file_put_contents("../lib/".WAPID."_uploadtype.txt",NULL);
}
$type = file_get_contents("../lib/".WAPID."_uploadtype.txt");
echo "<form method=\"post\" enctype=\"multipart/form-data\" action=\"?add=yes\">  ";    
    echo "<input type=\"text\" name=\"type\"  value=\"".$type."\"><br>";
    echo "<input type=\"submit\" value=\"提交保存\"><br>";
	echo '<div class="mylink"><a href="wap_admin.php">管理后台</a></div>';
echo footer(1);
?>