Location: PHPKode > projects > Netautor Professional > netautor/napro4/appl/mediapool/mp_detail.php
<?php
/* +----------------------------------------------------------------------+
   | Netautor Professional Application Server                             |
   +----------------------------------------------------------------------+
   | Copyright (C) 1998-2005 digiconcept GmbH. <www.digiconcept.net>      |
   +----------------------------------------------------------------------+
   | This file is subject to license, that is bundled with this package   |
   | in the file LICENSE.TXT, and is available at through the             |
   | world-wide-web at http://www.netautor.com/license/                   |
   |                                                                      |
   | If you did not receive a copy of the license and are unable to       |
   | obtain it through the world-wide-web, please send a note to          |
   | hide@address.com so we can mail you a copy.                      |
   +----------------------------------------------------------------------+
   | Authors: Stefan Rottensteiner <hide@address.com>    |
   |          Marek  Kadziela      <hide@address.com>	      |
   |          Gregor Wollner                                              |
   |          Christian Unger                                             |
   |          Helli  Kleinhans  									      |
   +----------------------------------------------------------------------+*/

   /**
    * Detailanzeige eines Elements aus dem Medienpool
	*
	* @version 	$Revision: 1.6 $
	* @author	Stefan Rottensteiner
	*/

	require_once('../../include/init.inc');

	if(!$USER->check_feature('Admin') && !$USER->check_feature('ac_mediapool'))
	{
		$USER->login_call();
	}

	$LOCALE->textdomain('mediapool');

	$location_path		= strval($_GET['location_path']);
	$location_folder	= strval($_GET['location_folder']);
	$files_mask			= strval($_GET['files_mask']);
	$file_name			= strval($_GET['file_name']);

	//	include necessary functions
	includeNaPro('filetype');

	$file_location		= $location_path.$location_folder.'/'.$file_name;

	clearstatcache();

	$mime_info = array();
	ext2mime($file_name, $mime_info );

	$file_size		= filesize($file_location);
	$file_size_sign	= 'Bytes';

	if ($file_size > 1024 )	
	{
		$file_size = $file_size / 1024;
		$file_size_sign = 'Kb';
	}

	if ($file_size > 1024 )	
	{
		$file_size = $file_size / 1024;
		$file_size_sign = 'Mb';
	}

?><html>
<head>
	<title>/digiconcept/netautor/mediapool</title>
	<link href="../../include/netautor.css" rel="stylesheet" type="text/css" src="../include/netautor.css">
</head>

<body class="brown">

<form>
<br>
<table width="650" border="0" cellspacing="0" cellpadding="0">

	<tr>
		<td colspan="2" width="650" align="center" valign="top">
			<span class="head">
			<?php echo $file_name?><br>
			</span>
			<img src="../../grafik/pixel.gif" width="650" height="8"><br>
		</td>
	</tr>

	<tr>
		<td width="325" align="right" valign="top" class="textgrey">
			Medien Pool:&nbsp;&nbsp;<br>
		</td>
		<td width="325" align="left" valign="top" class="text">
			<?php echo $location_name; ?> / <?php echo $location_folder; ?><br>
		</td>
	</tr>

	<tr>
		<td width="325" align="right" valign="top" class="textgrey">
			<?php echo( $LOCALE->gettext('file_size') ); ?>:&nbsp;&nbsp;<br>
		</td>
		<td width="325" align="left" valign="top" class="text">
			<?php echo ($file_size_sign=='Bytes' ? $file_size : number_format($file_size,2) );?> <?php echo $file_size_sign;?> <?php 

			$size  = GetImageSize($file_location);
			if ($size[0]*$size[1])
			{
				echo "[".$size[0]."x".$size[1]."]";
			}
			?><br>
		</td>
	</tr>

	<tr>
		<td width="325" align="right" valign="top" class="textgrey">
			<?php echo( $LOCALE->gettext('file_type') ); ?>:&nbsp;&nbsp;<br>
		</td>
		<td width="325" align="left" valign="top" class="text">
			<?php echo strtoupper( substr($file_name,strrpos($file_name,'.') + 1) ); ?><br>
		</td>
	</tr>

	<tr>
		<td colspan="2" width="650" align="center" valign="top">
			<img src="../../grafik/pixel.gif" width="650" height="8"><br>
			<input type="button" value="<?php echo( $LOCALE->gettext('button_close') ); ?>" class="clear" onClick="parent.document.getElementById('f_mediapool').rows='130,*,40,0';"><br>
		</td>
	</tr>
</table>

<img src="../../grafik/pixel.gif" width="1" height="3"><br>
<img src="../../grafik/spacer_grey.gif" width="650" height="15"><br>
<img src="../../grafik/pixel.gif" width="1" height="5"><br>

<table width="650" border="0" cellspacing="0" cellpadding="0" align="center">
	<tr>
		<td colspan="2" width="650" align="center" valign="top">
			<a href="#" onClick="parent.document.getElementById('f_mediapool').rows='130,*,40,0';" ><img src="<?php echo $GLOBALS['DC_ENV']->indexpath; ?>/wrapper/jpegs.php?filename=<?php echo rawurlencode($file_location);?>" border="0" ></a><br>
			<img src="../../grafik/pixel.gif" width="650" height="8"><br>
		</td>
	</tr>
</table>

<br><br>

</form>

</body>
</html>
Return current item: Netautor Professional