Category Company Email Destination Actions
function uplaod_handle_image_upload($file) { if (isset($file['name'])) { // Check file type $file_info = wp_check_filetype($file['name']); if ($file_info['ext'] && !in_array($file_info['ext'], array('jpg', 'jpeg', 'png', 'gif'))) { // Handle invalid file type return false; } // Check for a successful upload if ($file['error'] !== UPLOAD_ERR_OK) { return false; } // Handle the upload using move_uploaded_file $file_name = basename($file['name']); $upload_dir = wp_upload_dir(); $file_path = $upload_dir['path'] . $file_name; // Replace '/path/to/upload/directory/' with your desired upload directory if (!move_uploaded_file($file['tmp_name'], $file_path)) { // Handle the case where move_uploaded_file returns false return false; } // Create attachment post $attachment = array( 'post_mime_type' => $file_info['type'], 'post_title' => $file_name, 'post_content' => '', 'post_status' => 'inherit' ); $attachment_id = wp_insert_attachment($attachment, $file_path); if (is_wp_error($attachment_id)) { // Handle the case where wp_insert_attachment returns an error return false; } if (!function_exists('custom_generate_attachment_metadata')) { function custom_generate_attachment_metadata($attachment_id, $file_path) { //echo "string" . $metadata; // Check if file exists if (!file_exists($file_path)) { return new WP_Error('file_not_found', 'File not found.'); } // Get file information $file_info = wp_check_filetype($file_path); $mime_type = $file_info['type']; // Generate attachment metadata $metadata = array( 'width' => 0, 'height' => 0, 'file' => basename($file_path), 'sizes' => array(), 'image_meta' => array() ); // Set image dimensions if the file is an image if (substr($mime_type, 0, 5) === 'image') { $image_size = getimagesize($file_path); if ($image_size) { $metadata['width'] = $image_size[0]; $metadata['height'] = $image_size[1]; } } return $metadata; } } // Generate attachment metadata and update attachment post $attachment_data = custom_generate_attachment_metadata($attachment_id, $file_path); if (is_wp_error($attachment_data)) { // Error occurred, handle it echo 'Error generating attachment metadata: ' . $attachment_data->get_error_message(); } else { // Metadata generated successfully, update attachment if (wp_update_attachment_metadata($attachment_id, $attachment_data)) { //echo 'Attachment metadata updated successfully.'; } else { echo 'Error updating attachment metadata.'; } } return $attachment_id; } } add_shortcode('company_user', 'companyProfileShortcode'); Air China to Launch Geneva – Beijing Service | ittn.ie
HomeTravel NewsAir China to Launch Geneva – Beijing Service

Air China to Launch Geneva – Beijing Service

Star Alliance carrier Air China is to launch four times-weekly services between Geneva and Beijing from 7th May 2013. The non-stop services will operate on Tuesday, Thursday, Saturday and Sunday, using a two-class A330-200 aircraft.

Flights will depart Beijing at 13.30, arriving Geneva at 18.25, with the return flight departing Geneva at 20.25, and arriving in Beijing at 12.55 the following day.

Air China Logo

The route will be Air China’s 12th destination in Europe, joining cities including Frankfurt, Munich, Dusseldorf, London, Paris, Stockholm, Milan, Rome and Madrid.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Logo
3,040 Followers
Follow

Must Read