|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/abtechsci/mmc15/ezupload/cp/ |
Upload File : |
<?php
require("header.php");
ini_set("register_globals","1");
$upload_dir=$_POST["upload_dir"];
$existing=$_POST["existing"];
$sizemax=$_POST["sizemax"];
$extensions= $_POST["extensions"];
$widthmax=$_POST["widthmax"];
$heightmax=$_POST["heightmax"];
$autodel_files=$_POST["autodel_files"];
/*
if ( $extensions != "" ){
$extensions="- " . implode(" " , $extensions);
}
*/
if ( $existing != "" ){
$existing="addnumber" ;
}
else{
$existing="overwrite" ;
}
$submit=$_POST["submit"];
//echo $upload_dir . "----------->" . $existing . "----------->" . $sizemax . "----------->" . $extensions . "----------->" . $widthmax . "----------->" . $heightmax . "----------->" . $autodel_files ;
if($submit != "" )
{
if(1=="" )
{
print("<font color=red ><b>Cannot save. </b></font>");
$error="Cannot save.";
}
else
{
$upload_setting=new upload_setting();
$upload_setting->update( $upload_dir, $existing, $sizemax, $extensions, $widthmax, $heightmax, $autodel_files);
if(!file_exists($upload_dir))
{ mkdir($upload_dir);
}
}
}
else
{
$upload_setting=new upload_setting();
$temp=$upload_setting->get();
$upload_dir=$temp[0]->upload_dir;
$existing=$temp[0]->existing;
$sizemax=$temp[0]->sizemax;
$extensions=$temp[0]->extensions ;
$widthmax=$temp[0]->widthmax;
$heightmax=$temp[0]->heightmax;
$autodel_files=$temp[0]->autodel_files;
}
?>
<HTML><HEAD><TITLE>Control Panel</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<SCRIPT language="JavaScript1.2" src="f_files/help_tips/main.js" type="text/javascript"></SCRIPT>
<!--For help tooltips-->
<LINK href="f_files/global.css" type=text/css rel=stylesheet>
<script language="javascript" type="text/javascript" src="js/main.js"></script>
</HEAD>
<BODY >
<!--For help tooltips-->
<DIV id="TipLayer" style="visibility:hidden;position:absolute;z-index:1000;top:-100;"></DIV>
<SCRIPT language="JavaScript1.2" src="f_files/help_tips/style.js" type="text/javascript"></SCRIPT>
<table width="100" align="center" cellpadding="0" cellspacing="0" class="main_table" id="table1">
<tr>
<td>
<TABLE height="461" cellSpacing=0 cellPadding=0 width="770" id="table2" bgcolor="#FFFFFF">
<?php require("cp_header.php")?>
<tr>
<TD height=285 bgcolor="#FFFFFF">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="748" id="table3" height="208">
<form method="POST" action="fs.php">
<tr>
<td width="748" height="187">
<div align="center"><a href="" onMouseOver="stm(fs[0],Style);" onClick="return false;" onMouseOut="htm()"><img src="f_files/help_icon_small.jpg" alt="" width="40" height="40" border="0"></a>
<br>
<table width="630" border="1" cellpadding="0" cellspacing="0" bordercolor="#8FABFF" class="main_table" id="table4">
<tr>
<td colspan="2" valign="middle" bgcolor="#C1D1FF" class="t_header">Settings</td>
</tr>
<tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
<td width="264" align="left" valign="middle" class="td_1">
<div class="div_1">
Uploading directory</div></td>
<td width="360" valign="middle" class="td_2">
<div class="div_1"><input type="text" name=upload_dir value="<?php echo $upload_dir ; ?>" size="25" ></div></td>
</tr>
<tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
<td width="264" align="left" valign="middle" bgcolor="#ECF1FF" class="td_1">
<div class="div_1">Rename uploaded files to prevent
replacement</div></td>
<td width="360" valign="middle" bgcolor="#ECF1FF" class="td_2">
<div class="div_1"><input type="checkbox" name="existing" <?php
if ( $existing == "addnumber" ){
echo "CHECKED" ;
}
?> ></div></td>
</tr>
<tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
<td width="264" align="left" valign="middle" class="td_1"> <div class="div_1">Maximum file size</div></td>
<td width="360" valign="middle" class="td_2">
<div class="div_1"><input type="text" name=sizemax value="<?php echo $sizemax ; ?>" size="7"> KBytes</div></td>
</tr>
<tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
<td width="264" align="left" valign="middle" bgcolor="#ECF1FF" class="td_1"> <div class="div_1">Allowed file types </div></td>
<td width="360" bgcolor="#ECF1FF" class="td_2">
<div class="div_1"><input type="text" name="extensions" size="25" maxlength="200" value="<?php echo $extensions?>">
<br>
Enter extensions separated by space e.g. (gif jpg png psd)<br>
Leave blank to allow all file types<br>
</div></td>
</tr>
<tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
<td width="264" align="left" valign="middle" class="td_1"> <div class="div_1">Maximum image dimension</div></td>
<td width="360" valign="middle" class="td_2"><div class="div_1">
Width
<input type="text" name=widthmax value="<?php echo $widthmax ; ?>" size="7">
Height
<input type="text" name=heightmax value="<?php echo $heightmax ; ?>" size="7">
(in pixels)</div></td>
</tr>
</table>
<br>
<input name="submit" type="submit" class="button" value=" Save ">
</div> </td>
</tr>
<tr>
<td>
<p align="center"> </p>
<p align="center"><a href="upload.php">Back </a><br>
</td>
</tr>
</form>
</table>
</div> </TD>
</tr>
</TABLE> </td>
</tr>
<?php include("footer.php"); ?>
</table>
<p align="center"> </p>
</BODY></HTML>