...

View Full Version : Picture



thickandthin
11-06-2003, 12:37 AM
Hello, I need this script to only allow gif and jpg files instead of html and php:


<div style="width: 410px;">
<?php
if(empty($_GET['page']))
{
include("images/screenshots/nopicture.html");
}
elseif(file_exists("includes/".$_GET['page'].".html"))
{
include("includes/".$_GET['page'].".html");
}
elseif(file_exists("includes/".$_GET['page'].".php"))
{
include("includes/".$_GET['page'].".php");
}
else
{
?>
<div style="background-color:#7E7E7E; border: 1px solid black; padding: 1px;">
<div style="border: 1px solid black; height: 17; background-image: url(images/menubg.gif); text-align: left;">
<img src="images/headers/error.gif" width="140" height="15" alt=""></div></div>
<img src="images/spacer.gif" width="3" height="3" alt=""><br>
<div style="background-color:#7E7E7E; border: 1px solid black; padding: 1px;">
<div style="border: 1px solid black; height: 17; background-color: #151515; text-align: center; padding: 10px;">
The page cannot be found<br><br>
The page you are looking for might have been removed, had its name changed, or is
temporarily unavailable.</div></div>
<?
}
?>
</div>


Thanks!!

x_goose_x
11-06-2003, 04:17 AM
<div style="width: 410px;">
<?php

if( empty ( $_GET['page'] ) ) {
print '<img src="images/screenshots/nopicture.html" border="0">';
} else if ( file_exists ( 'includes/'.$_GET['page'].'.gif' ) ) {
print '<img src="includes/'.$_GET['page'].'.gif" border="0">');
}else if ( file_exists( 'includes/'.$_GET['page'].'.jpg' ) ) {
print '<img src="includes/'.$_GET['page'].'.jpg" border="0">');
} else {

?>
<div style="background-color:#7E7E7E; border: 1px solid black; padding: 1px;">
<div style="border: 1px solid black; height: 17; background-image: url(images/menubg.gif); text-align: left;">
<img src="images/headers/error.gif" width="140" height="15" alt=""></div></div>
<img src="images/spacer.gif" width="3" height="3" alt=""><br>
<div style="background-color:#7E7E7E; border: 1px solid black; padding: 1px;">
<div style="border: 1px solid black; height: 17; background-color: #151515; text-align: center; padding: 10px;">
The page cannot be found<br><br>
The page you are looking for might have been removed, had its name changed, or is
temporarily unavailable.</div></div>
<?
}
?>
</div>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum