Location: PHPKode > projects > BBViewer > BBViewerApp/bbviewer/admin/upload.php
<?PHP

require('/library/webserver/auth.inc'); 
require('config.php');
require('connect.php');

?>

<TITLE><?php echo $domain ?> - Upload Pictures</TITLE>

<?php
if ($img1_name != "") {

        @copy("$img1" , "$imagepath/$img1_name")

        and

        @copy("$img2" , "$imagepath/$img2_name")

        or die("Couldn't Upload Your File.");

} else {

$sql = "INSERT INTO pics (short,pictype,filename,message,postdate,thumbname) VALUES ('$short','$pictype','$filename','$message','$postdate','$thumbname')";

$result = mysql_query($sql);

die("

<script language='JavaScript'>

function redirect()

	{ window.location = 'http://baby.brynteson.info/admin/'}

	setTimeout('redirect();', 500)
	
</script>

<TITLE><?php echo $domain ?> - admin utilities</TITLE>

<HEAD>

<title>Upload Files to Server</title>

<MAP NAME='babybrynteson'>

<AREA SHAPE='rect' HREF='../news.php' COORDS='0,0 92,30'>

<AREA SHAPE='rect' HREF='../pics.php' COORDS='94,0 186,30'>

<AREA SHAPE='rect' HREF='../video.php' COORDS='188,0 280,30'>

<AREA SHAPE='rect' HREF='../store.php' COORDS='282,0 374,30'>

<AREA SHAPE='rect' HREF='index.php' COORDS='376,0 468,30'>

<AREA SHAPE='rect' HREF='../index.php' COORDS='470,0 562,30'>

<AREA SHAPE='rect' HREF='http://www.brynteson.info' COORDS='564,0 650,30'>

</MAP>

<IMG SRC='../images/new_admin.gif' BORDER='0' style='POSITION: absolute; TOP: 0px; LEFT: 0px; Z-INDEX: 25'>

<IMG USEMAP='#babybrynteson' SRC='../images/new_title.gif' border='0' style='POSITION: absolute; TOP: 70px; LEFT: 0px; Z-INDEX: 25'>

<div style='POSITION: absolute; TOP: 125px; LEFT: 5px;  width: 650px; Z-INDEX: 25'>

Your picture has been uploaded to the server. <p>

You will now be redirected to the Web Admin Page.

");

}

?>

<TITLE><?php echo $domain ?> - admin utilities</TITLE>

<HEAD>

<title>Upload Files to Server</title>

<MAP NAME="babybrynteson">

<AREA SHAPE="rect" HREF="../news.php" COORDS="0,0 92,30">

<AREA SHAPE="rect" HREF="../pics.php" COORDS="94,0 186,30">

<AREA SHAPE="rect" HREF="../video.php" COORDS="188,0 280,30">

<AREA SHAPE="rect" HREF="../store.php" COORDS="282,0 374,30">

<AREA SHAPE="rect" HREF="index.php" COORDS="376,0 468,30">

<AREA SHAPE="rect" HREF="../index.php" COORDS="470,0 562,30">

<AREA SHAPE="rect" HREF="http://www.brynteson.info" COORDS="564,0 650,30">

</MAP>

<IMG SRC='../images/new_admin.gif' BORDER='0' style="POSITION: absolute; TOP: 0px; LEFT: 0px; Z-INDEX: 25">

<IMG USEMAP="#babybrynteson" SRC='../images/new_title.gif' border='0' style="POSITION: absolute; TOP: 70px; LEFT: 0px; Z-INDEX: 25">

<div style="POSITION: absolute; TOP: 125px; LEFT: 5px;  width: 650px; Z-INDEX: 25">

<FORM ENCTYPE="multipart/form-data" ACTION="<?php echo $PHP_SELF?>" METHOD="POST">

<P><CENTER><B><FONT FACE="Verdana">Upload</FONT></B></CENTER></P>

<P><CENTER><TABLE WIDTH="450" BORDER="0" CELLSPACING="0" CELLPADDING="0">

  <TR>

    <TD WIDTH="100%" BGCOLOR="#000000">

    <TABLE WIDTH="450" BORDER="0" CELLSPACING="1" CELLPADDING="2">

      <TR>

        <TD COLSPAN="2" BGCOLOR="#295e85">

        <B><FONT COLOR="#ffffff" SIZE="-1" FACE="Verdana">Select Files</FONT></B></TD>

      </TR><?php echo $html; ?>

      <TR>

        <TD COLSPAN="2" BGCOLOR="#295e85">

        <B><FONT COLOR="#ffffff" SIZE="-1" FACE="Verdana">File & Upload Info</FONT></B></TD>

      </TR>

      <TR>

      <TD BGCOLOR="#295e85"><FONT COLOR="#ffffff" SIZE="-1" FACE="Verdana">File Name:</FONT></TD>

      <TD BGCOLOR="#ffffff"><INPUT NAME="filename" TYPE="text" SIZE="39" value="<?php echo "$img1_name"; ?>">

      </TR>

      <TR>

      <TD BGCOLOR="#295e85"><FONT COLOR="#ffffff" SIZE="-1" FACE="Verdana">Thumbnail Name:</FONT></TD>

      <TD BGCOLOR="#ffffff"><INPUT NAME="thumbname" TYPE="text" SIZE="39" value="<?php echo "$img2_name"; ?>">

      </TR>

      <TR>

      <TD BGCOLOR="#295e85"><FONT COLOR="#ffffff" SIZE="-1" FACE="Verdana">Upload Date:</FONT></TD>

      <TD BGCOLOR="#ffffff"><INPUT NAME="postdate" TYPE="text" SIZE="39">

      </TR>

      <TR>

      <TD BGCOLOR="#295e85"><FONT COLOR="#ffffff" SIZE="-1" FACE="Verdana">Picture Type:</FONT></TD>

      <TD BGCOLOR="#ffffff"><INPUT NAME="pictype" TYPE="text" SIZE="39">

      </TR>

      <TR>

      <TD BGCOLOR="#295e85"><FONT COLOR="#ffffff" SIZE="-1" FACE="Verdana">Short Description:</FONT></TD>

      <TD BGCOLOR="#ffffff"><INPUT NAME="short" TYPE="text" SIZE="39">

      </TR>

      <TR>

      <TD BGCOLOR="#295e85"><FONT COLOR="#ffffff" SIZE="-1" FACE="Verdana">Picture Description:</FONT></TD>

      <TD BGCOLOR="#ffffff"><textarea rows="5" cols="55" id="text4" name="message" value="none"></textarea>

      </TR>

    </TABLE></TD>

  </TR>

</TABLE></CENTER></P>

<P><CENTER><INPUT NAME="doupload" TYPE="submit" VALUE="Input Information"></CENTER></FORM>

<H1>File Upload Successful!</H1>

<P>Successfully Sent: <?php echo "$img1_name"; ?> , a <?php echo "$img1_size"; ?> byte file with the extension type of <?php echo "$img1_type"; ?> </P>

<P>Successfully Sent: <?php echo "$img2_name"; ?> , a <?php echo "$img2_size"; ?> byte file with the extension type of <?php echo "$img2_type"; ?> </P>

<? INCLUDE("../bottom.inc")?>

</div>
Return current item: BBViewer