unset($_SESSION['table_id']);
}
$_SESSION['mno'] = $mc->get_cookie('mno', 136);
$mno = $mc->get_cookie('mno', 136);
header_remove();
# INITIALIZE
echo "<br><BR><BR><BR><BR>";
$nno = !empty($_GET['nno']) ? intval($_GET['nno']) : 0;
$table_id = !empty($_GET['id']) ? intval($_GET['id']) : 0;
$table_name = 'fs_postedarticles';
$modal['table_id'] = $_GET['id'];
$modal['table_name'] = $table_name;
echo " id " . $table_id;
# UPDATE NOTIFICATION AS VIEWED
# GET THE SPECIFIC MODAL INFO
$modal['modal'] = $mc->fs_postedarticles(array('aticle_type' => 'select', 'limit_start' => 0, 'limit_end' => 1, 'orderby' => 'artno desc', 'where' => "artno = {$table_id}"));
$modal['mno'] = $modal['modal'][0]['mno'];
# GET MORE MODALS
$modal['modal_more'] = $mc->fs_postedarticles(array('aticle_type' => 'select', 'limit_start' => 0, 'limit_end' => 30, 'orderby' => 'artno desc', 'where' => "mno = {$modal['mno']}"));
// print_r($modal['modal_more']);
# GET SPECIFIC MODAL COMMENT
# get first latest comment by cno
$modal['comments'] = $mc->posted_modals_comment_Query(array('table_name' => $table_name, 'table_id' => $table_id, 'orderby' => 'cno asc', 'limit_start' => 0, 'limit_end' => 10, 'comment_query' => 'get-comment-modal'));
# get total comment
$modal['comments_all'] = $mc->posted_modals_comment_Query(array('table_name' => $table_name, 'table_id' => $table_id, 'orderby' => 'cno asc', 'limit_start' => 0, 'limit_end' => 1000, 'comment_query' => 'get-comment-modal'));
$modal['comments_len'] = count($modal['comments_all']);
# get next prev
$modal['nextprev'] = $mc->db_result_next_prev($modal['table_name'], $modal['table_id'], $modal['modal_more'], 'all');
// $mc->print_r1( $modal['modal_more']);
// $modal['next']
// $modal['prev']
예제 #2
0
			break;   
		case 'upload-article-and-resize':
			 
            echo " This is the file name " . $_POST['file_name'];

            $fileName = ( !empty($_POST['fileName']) ) ? $_POST['fileName'] : null ;
            $fileUrl  = ( !empty($_POST['fileUrl']) )  ? $_POST['fileUrl'] : null ; 

		  		// echo " upload new article image and resize to thumbnail , home and so on. . .";  

		  		/** get latest article uploaded  */

		  		$response = $mc->fs_postedarticles( 
		  		 	array(  
		  			 	'aticle_type'=> 'select', 
		  		 		"where mno = $mno"
		  		 	)  
		  		);  

 				$mc->print_r1( $response ); 
 				$artno = $response[0]['artno'];  
 				$type = $response[0]['type'];  
 				/*
 				$id = $artno;  

 				/** get post attribute */
				/*
 				$dataDb = $database->selectV1('fs_post_attribute', '*', "table_id = $id"); 
 				print_r($dataDb); 
 				$file_name = $dataDb[0]['file_name'];
 				$slug = $dataDb[0]['slug'];