Location: PHPKode > projects > infoboard > infoboard/_req/saveicon.php
<?
session_start();
include("../data/connect.php");
include("../data/_uconfig.php");
include("../_class/lang.php");
include("../_class/lang_".$iscon["getlang"].".php");

include("../_class/_func.php");
include("../_class/class.global.php");

$infoboard = new global_infoboard();
$infoboard->checksess();
$infoboard->adminsess();

$count = $infoboard->isread("../data/icon.dat");
$write="";
$num = $count+1;
for($i=1; $i<=4; $i++){
	   if($_FILES["image".$i]["size"]){
		     $ext = strtolower($infoboard->getlast($_FILES["image".$i]["name"]));
			 if($ext == "gif"){
				  if(move_uploaded_file($_FILES["image".$i]["tmp_name"], "../data/icon/i".$num.".gif")){
					    $infoboard->iswrite("../data/icon.dat", $num);
					   $num++;
					   $write=1;
				  }
			 }
	   }
}

if($write){
	 refurl($iscon["lang"][105], $_SERVER['HTTP_REFERER']);
}else{
	 refurl("", $_SERVER['HTTP_REFERER']);
}

?>
Return current item: infoboard