korsygfhrtzangaiide
Elepffwdsff
/
home3
/
nmslyumy
/
www
/
odishaexpress
/
oe-admin
/
model
/
Upload FileeE
HOME
<?php class Favicon extends CommonAll { public function updateFavicon() { $sp="home.php?page=fav"; $ep="home.php?page=fav"; $hpimage=time().$_FILES['holidayimg']['name']; $tmp_ad_img = $_FILES['holidayimg']['tmp_name']; $dest_folder="@upload_img/@favicon_img@/"; $valid_ext=array(".png",".jpg",".jpeg",".gif",".GIF",".JPG",".JPEG",".PNG",".ico"); $ext=strrchr($hpimage,'.'); $basename_img=basename($hpimage,$ext); $its_date=date("Y/m/d"); $tab="its_favicon"; $ucolname="its_fid"; $uval='1'; $colval="its_fav_image='".$hpimage."',its_date='".$its_date."'"; if($_FILES['holidayimg']['name']!="") { if(in_array($ext,$valid_ext)) { if(move_uploaded_file($tmp_ad_img,$dest_folder.$hpimage)) { $this->UpdateRecord($tab,$colval,$ucolname,$uval,$sp,$ep); } } else { echo "invalid file"; } } } } $apcon=new Favicon; if(isset($_POST["save"])) { $ups=$apcon->updateFavicon(); } //GET aLL rECORD $grs=$conn->query("select * from its_favicon"); $upcal=$grs->fetch_array(); ?>