Location: PHPKode > scripts > PHPhotoalbum > phphotoalbum/upload.php
<?
/*************************************************
 * PHPhotoalbum v0.5
 * by: Henning Støverud
 * e-mail: hide@address.com
 * URL: http://www.stoverud.com/PHPhotoalbum/
 *************************************************/

session_start(); 
 
include("config.inc.php");
include("functions.php");
pageheader("Upload"); ?>

<? navmenu(450); ?>

<!-- 1px BORDER -->
<table width="450" align="center">
 <td bgcolor="#000000" width="450">
<!-- 1px BORDER -->

<!-- MAIN TABLE -->
	<table bgcolor="#ffe7c6" width="448">
	  <tr>
		<td>
<!-- MAIN TABLE SECTION -->


<table width="100%" bgcolor="<? echo $config['color_main']; ?>">

  <tr>
  	<td colspan="2" bgcolor="<? echo $config['color_comment_heading']; ?>">
	<b>Upload picture &gt;&gt;</b>
	</td>
  </tr>
  <tr>
	<td valign="top">
	<form method="post" action="db_input.php" ENCTYPE="multipart/form-data">
	Album
	</td>
	<td valign="top" bgcolor="<?echo $config['color_comment_body']; ?>">
	  <? 
		$albums = getAlbumsUploadable(); 
		if(count($albums) > 0){
			echo "<select name=\"album\" STYLE=\"FONT-FAMILY:VERDANA, GENEVA, ARIAL, HELVETICA; WIDTH: 120; FONT-SIZE:9px; BORDER-STYLE : groove;\">\n";
			foreach($albums as $album)
		     	echo "<option value=\"$album[aid]\">". $album['description'] . "  (id ". $album['aid'] .")</option>\n";
		    echo "</select>\n"; 
		}
		else
		{
		 echo "<font size='1'>No albums with upload permission.</font>";
		}
	  ?>
	</td>
</tr>
<tr>
	<td valign="top">	
	<input type="hidden" name="event" value="picture">
	<input type="hidden" name="date" value="<? echo date("Y-m-d H:i:s"); ?>">
	Local file<br>
	</td>
	<td valign="top" bgcolor="<? echo $config['color_comment_body']; ?>">
	<input type="file" name="userpicture"  STYLE="FONT-FAMILY:VERDANA, GENEVA, ARIAL, HELVETICA; FONT-SIZE:9px;	BORDER-STYLE : groove;"><br>
	</td>
  </tr>
  <tr>
  	<td valign="top">
	&nbsp;
	</td>
	<td valign="middle" bgcolor="<? echo $config['color_comment_body']; ?>"><img src="images/spacer.gif" width="1" height="5"><br>
	<input type="submit" value="Insert picture" STYLE="width:100; FONT-FAMILY:VERDANA, GENEVA, ARIAL, HELVETICA; FONT-SIZE:9px;">
	</form>
	</td>
  </tr>



	
</table>

<table width="100%">
  <tr>
  	<td colspan="2">
	<hr>
	</td>
  </tr>
  <tr>
	<td valign="top" width="50%">
	<div class="pictureinfo">
	<b>Recent comments</b><br>
	<? lastcomments(5); ?>
	<br>
	<b>Top 5 Pictures</b><br>
	<? toplist(5,20) ?>
	</div>
	</td>
	<td valign="top">
	<div class="pictureinfo">
	<b>Recent uploads</b><br>
	<? lastuploads(5); ?>
	<br>
	<b>Some statistics</b><br>
	 Number of pictures: <? countpics(); ?><br>
	 Number of comments: <? countcomments(); ?><br>
	 Number of picture views: <? countpicviews() ?>
	</div>
	</td>
  </tr>
</table>


	
<!-- /MAIN TABLE SECTION -->
		</td>
      </tr>
	</table>
<!-- /MAIN TABLE SECTION -->


<!-- /1px BORDER -->
 </td>
</table>
<!-- /1px BORDER -->

<? pagefooter(450); ?>



Return current item: PHPhotoalbum