ok
Direktori : /home2/globaltriumphfou/public_html/admin_panel/ |
Current File : /home2/globaltriumphfou/public_html/admin_panel/function.php |
<?php function file_upload_productimg($filename,$efile,$tempname,$files_folder) { if($filename) { $asd=explode(".", $filename); $asdp=str_replace(' ', '_', $asd[0]); $asde=end($asd); $newfilename=$asdp.'_'.time().rand().'.'.$asde; if(!empty($efile)) unlink($files_folder.$efile); move_uploaded_file($tempname, $files_folder.$newfilename); } else { $newfilename=$efile; } return $newfilename; } function image_validation($filetype) { $mimes = array('image/jpeg','image/gif','image/png','image/jpg'); if(in_array($filetype,$mimes)){ return 1; } else return 0; } function get_awcat($connection) { $query=mysqli_query($connection,"select * from award_category order by `aw_name` asc "); while($rows=mysqli_fetch_assoc($query)) { $rowsa[]=$rows; } return $rowsa; } function no_data($connection,$tablename,$date) { $num=0; $query=mysqli_query($connection,"select * from $tablename where create_date like '%$date%'"); $num=mysqli_num_rows($query); return $num; } ?>