first commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
$must_login = true ;
|
||||
$require_path = '../../../' ;
|
||||
$require_sub = '../../' ;
|
||||
require( $require_sub.'header.php' ) ;
|
||||
|
||||
if ( $boolean_login ){
|
||||
$status = '300' ;
|
||||
|
||||
$title = $array['title'] ;
|
||||
$photos = $array['photos'] ;
|
||||
|
||||
if ( $title != '' && $array['photos'] != '' && count( $photos ) > 0 ){
|
||||
if ( checkExists($photos) ){
|
||||
foreach ( $photos as $k => $v ){
|
||||
if ( $v['type'] == 'local' ){
|
||||
$file_upload = ( $v['file'] ) ;
|
||||
$upload = uploadImage( 'TrainingGallery', time(), $file_upload ) ;
|
||||
if ( $upload['status'] != '200' ){
|
||||
$count_upload++ ;
|
||||
}else{
|
||||
$mysqli->query( "INSERT INTO training_gallery
|
||||
( branch_id, staff_id, title, file, filetype ) VALUES
|
||||
( '".$array['branch_id']."', '".$staff_info['staff_id']."', '".$title."', '".$upload['data']['file_name']."', '".$upload['data']['file_type']."' )" ) ;
|
||||
$status = '200' ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
require( $require_sub.'footer.php' ) ;
|
||||
?>
|
||||
Reference in New Issue
Block a user