Location: PHPKode > scripts > Banner Rotator with admin panel > banner-rotator-with-admin-panel/chbanner2.php
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 7 December 2008), see www.w3.org">
<title>Banner rotator Control Panel</title>
<link rel="stylesheet" href="style.css" type="text/css" media=
"screen">
</head>
<body>
	<!-- http://TheAleksandar.com -->

<div id="page">
<div id="header"></div>
<div id="menulinks"><a href="chpass.php">Change password</a>
<a href="chbanner.php">Banner images</a> <a href="chadsense.php">Banner link URLs</a> <a href=
"banneroveral.php">Main page</a></div>

<div id="mainarea">
<div id="contentarea"><?php

//       UPLOAD IMAGE

 function getExtension($str) {
         $i = strrpos($str,".");
         if (!$i) { return ""; }
         $l = strlen($str) - $i;
         $ext = substr($str,$i+1,$l);
         return $ext;
 }
 
 
 
$image=$_FILES['fajlbaner']['name'];

$filename = stripslashes($_FILES['fajlbaner']['name']);
        $extension = getExtension($filename);
        $extension = strtolower($extension);

$image_name=time().".".$extension;

$banner="banners/".$image_name;

$copied = copy($_FILES['fajlbaner']['tmp_name'], $banner);
if (!$copied) 
{
        echo '<h1>Copy unsuccessfull!</h1>';
        $errors=1;
}
else
{

echo "You have successfully uploaded this banner <br /> <img src='".$banner."' width='200'>";
echo "<br /><br />";
echo "Click <a href='chbanner.php'> here </a> to continue ";

}


?></div>
</div>
<div id="footer">
<p></p>
</div>
</div>
</body>
</html>
Return current item: Banner Rotator with admin panel