Please make sure IN_MYBB is defined."); } $plugins->add_hook("global_start", "ads_globals"); $plugins->add_hook("admin_config_menu", "ads_nav"); $plugins->add_hook("admin_config_action_handler", "ads_actionhandler"); $plugins->add_hook("admin_load", "ads_admin"); function ads_info() { return array( "name" => "Ad Rotation system", "description" => "This Pluging will display an ad on the main page from a database", "website" => "http://nitemare.ca", "author" => "Nitemare", "authorsite" => "http://nitemare.ca", "version" => "5.0.1", "guid" => "", "compatibility" => "16*" ); } function ads_install(){ global $db; $db->query("CREATE TABLE `".TABLE_PREFIX."ads` (`aid` int(11) NOT NULL auto_increment,`code` text NOT NULL,`mode` int(11) NOT NULL default '0',`shown` int(11) NOT NULL default '0',`max` int(11) NOT NULL default '0',PRIMARY KEY (`aid`)) ;"); } function ads_is_installed() { global $db; if($db->table_exists("ads")){ return true; } return false; } function ads_activate(){ require MYBB_ROOT.'/inc/adminfunctions_templates.php'; find_replace_templatesets( "footer", '#'.preg_quote('
').'#', '
{$banner}
' ); } function ads_deactivate(){ require MYBB_ROOT.'/inc/adminfunctions_templates.php'; find_replace_templatesets( "header", '#'.preg_quote('
{$banner}
').'#', '
', 0 ); } function ads_uninstall() { global $db; $db->drop_table("ads"); } function ads_globals(){ global $db, $templates, $footer, $banner, $config; $blah = "0"; $x = 0; $count = $db->query("SELECT * FROM ".TABLE_PREFIX."ads WHERE `mode` != 4 OR `mode` != 3"); $count2 = $db->query("SELECT * FROM ".TABLE_PREFIX."ads"); $num = Array(); While ($row = $db->fetch_array($count, MYSQL_BOTH)){ $num[]= $row; } $ran = rand(0,count($num)-1); $random = $db->fetch_field($count,"aid",$ran); if ($db->num_rows($count2) == "0"){ $blah = "1"; $empty = true; } $query = $db->query("SELECT * FROM ".TABLE_PREFIX."ads WHERE aid='".$random."'"); $ads['aid'] = $db->fetch_field($query,"aid",$i); $ads['code'] = $db->fetch_field($query,"code",$i); $ads['mode'] = $db->fetch_field($query,"mode",$i); $ads['shown'] = $db->fetch_field($query,"shown",$i); $ads['max'] = $db->fetch_field($query,"max",$i); if ($ads['aid'] == $ran and $ads['mode'] != "3" and $ads['mode'] != "4"){ $blah = "1"; } //echo "3: ".$blah."
"; // $x = $x + 1; // } //echo "4: ".$blah."
"; if ($ads['mode'] == 2){ $new = $ads['shown']+1; if ($new < $ads['max']){ $db->query("UPDATE ".TABLE_PREFIX."ads SET shown='".$new."' WHERE aid='".$ads['aid']."'"); }else{ $db->query("UPDATE ".TABLE_PREFIX."ads SET mode='4' WHERE aid='".$ads['aid']."'"); } }else if ($ads['mode'] == 1) { $new = $ads['shown']+1; $db->query("UPDATE ".TABLE_PREFIX."ads SET shown='".$new."' WHERE aid='".$ads['aid']."'"); } $banner = $ads['code'] ; } function ads_nav($sub_menu){ $sub_menu[] = array( "id" => "ads", "title" => "Ad Rotation Manager", "link" => "index.php?module=config/ads" ); } function ads_actionhandler(&$action) { $action['ads'] = array('active' => 'ads', 'file' => ''); } function ads_admin(){ global $mybb, $db, $page, $lang; require_once("../inc/functions_time.php"); if($page->active_action != "ads") { return; } if ($mybb->input['add']){ $page->add_breadcrumb_item("Ad Rotation system"); $page->output_header("Ad Rotation Management system"); ads_add_form(); $page->output_footer(); exit; }elseif ($mybb->input['do_add']){ $page->add_breadcrumb_item("Ad Rotation system"); $page->output_header("Ad Rotation Management system"); if (!$mybb->input['code']){ flash_message("You must enter the code for the Ad", 'error'); ads_add_form(); }else{ if ($mybb->input['max'] == "" || $mybb->input['max'] == "0"){ $mode = 1; }else{ $mode = 2; } $stuff = Array( "code" => $db->escape_string($mybb->input['code']), "max" => $mybb->input['max'], "mode" => $mode); $db->insert_query("ads", $stuff); flash_message("Ad added sucessfully.", 'success'); admin_redirect("index.php?module=config/ads"); } $page->output_footer(); exit; }elseif ($mybb->input['edit']){ $page->add_breadcrumb_item("Ad Rotation system"); $page->output_header("Ad Rotation Management system"); if (!$mybb->input['aid']){ flash_message("You must select an ad to edit first", 'error'); admin_redirect("index.php?module=config/ads"); }else{ ads_edit_form(); } $page->output_footer(); exit; }elseif ($mybb->input['do_edit']){ $page->add_breadcrumb_item("Ad Rotation system"); $page->output_header("Ad Rotation Management system"); if (!$mybb->input['code']){ flash_message("You must enter the code for the Ad", 'error'); ads_edit_form(); }else{ if ($mybb->input['max'] == "" || $mybb->input['max'] == "0"){ $mode = 1; }else{ $mode = 2; } $stuff = Array( "code" => $db->escape_string($mybb->input['code']), "max" => $mybb->input['max'], "mode" => $mode); $db->update_query("ads", $stuff, "aid = '".$mybb->input['aid']."'"); flash_message("Message with ID:".$mybb->input['aid']." edited sucessfully.", 'success'); admin_redirect("index.php?module=config/ads"); } $page->output_footer(); exit; }elseif ($mybb->input['reset']){ if (!$mybb->input['aid']){ flash_message("You mustselect an Ad fist", 'error'); admin_redirect("index.php?module=config/ads"); }else{ $query = $db->query("SELECT * FROM ".TABLE_PREFIX."ads WHERE aid = '".$mybb->input['aid']."'"); $message = $db->fetch_array($query); $page->add_breadcrumb_item("Ad Rotation system"); $page->output_header("Ad Rotation Management system"); $form = new Form("index.php?module=config/ads", "post"); $table = new Table; $table->construct_header("Reset Ad Veiws",array('class' => 'align_center', 'colspan' => 1)); $table->construct_cell("Are you sure you want to the advertisment views with ID:".$message['aid'],array('class' => 'align_center')); $table->construct_row(); $table->construct_cell($form->generate_hidden_field('aid', $message['aid']). $form->generate_submit_button("Reset Views", array('name' => 'do_reset')) ." ". $form->generate_submit_button("Cancel", array('name' => 'cancel')) ,array('class' => 'align_center')); $table->construct_row(); $table->output("
Ad Rotar System
"); $form->end(); $page->output_footer(); exit; } }elseif ($mybb->input['do_reset']){ $db->update_query("ads",Array("shown" => "0", "mode" => "2"), "aid = '".$mybb->input['aid']."'"); flash_message("Ad views with ID:".$mybb->input['aid']." reset sucessfully.", 'success'); admin_redirect("index.php?module=config/ads"); }elseif ($mybb->input['disable']){ if ($mybb->input['aid'] == ""){ flash_message("Ad with ID:".$mybb->input['aid']." disabled sucessfully.", 'success'); admin_redirect("index.php?module=config/ads"); }else{ $query = $db->query("SELECT * FROM ".TABLE_PREFIX."ads WHERE aid = '".$mybb->input['aid']."'"); $message = $db->fetch_array($query); if ($message['mode'] == "3"){ if ($message['max'] == "0"){ $new_mode = "1"; }else{ $new_mode = "2"; } $db->update_query("ads",Array("mode" => $new_mode), "aid = '".$mybb->input['aid']."'"); flash_message("Ad with ID:".$mybb->input['aid']." enabled sucessfully.", 'success'); admin_redirect("index.php?module=config/ads"); }else{ $db->update_query("ads",Array("mode" => "3"), "aid = '".$mybb->input['aid']."'"); flash_message("Ad with ID:".$mybb->input['aid']." disabled sucessfully.", 'success'); admin_redirect("index.php?module=config/ads"); } } }elseif ($mybb->input['delete']){ if (!$mybb->input['aid']){ flash_message("You mustselect an Ad fist", 'error'); admin_redirect("index.php?module=config/ads"); }else{ $query = $db->query("SELECT * FROM ".TABLE_PREFIX."ads WHERE aid = '".$mybb->input['aid']."'"); $message = $db->fetch_array($query); $page->add_breadcrumb_item("Ad Rotation system"); $page->output_header("Ad Rotation Management system"); $form = new Form("index.php?module=config/ads", "post"); $table = new Table; $table->construct_header("Delete Alert",array('class' => 'align_center', 'colspan' => 1)); $table->construct_cell("Are you sure you want to delete the message with ID:".$message['aid'],array('class' => 'align_center')); $table->construct_row(); $table->construct_cell($form->generate_hidden_field('aid', $message['aid']). $form->generate_submit_button("Delete", array('name' => 'do_delete')) ." ". $form->generate_submit_button("Cancel", array('name' => 'cancel')) ,array('class' => 'align_center')); $table->construct_row(); $table->output("
Emergency Message System
"); $form->end(); $page->output_footer(); exit; } }elseif ($mybb->input['do_delete']){ $db->delete_query("ads", "aid = '".$mybb->input['aid']."'"); flash_message("Ad with ID:".$mybb->input['aid']." deleted sucessfully.", 'success'); admin_redirect("index.php?module=config/ads"); }else{ $query = $db->query("SELECT * FROM ".TABLE_PREFIX."ads"); $sql = Array(); While ($row = $db->fetch_array($query)){ $sql[]= $row; } $ads = $sql; $page->add_breadcrumb_item("Ad Rotation system"); $page->output_header("Ad Rotation Management system"); $table = new Table; $table->construct_header("Current Ads",array('class' => 'align_center', 'colspan' => 6)); $form = new Form("index.php?module=config/ads", "post"); $table->construct_cell("Ad ID",array('class' => 'align_center','width' => '65')); $table->construct_cell("Ad",array('class' => 'align_center')); $table->construct_cell("Mode", array('class' => 'align_center','width' => '100')); $table->construct_cell("Number of views", array('class' => 'align_center','width' => '150')); $table->construct_cell("Max views", array('class' => 'align_center','width' => '150')); $table->construct_row(); for ($i = 0; $i <= count($ads)-1; $i++) { switch($ads[$i]['mode']){ Case "1": $mode = "Infinite"; $bgcolour = ""; break; Case "2": $mode = "Limited"; $bgcolour = ""; break; Case "3": $mode = "Disabled"; $bgcolour = "background-color: #CCCCFF;"; break; Case "4": $mode = "Exipred"; $bgcolour = "background-color: #FFCCCC;"; break; Default: $mode = "Error!"; $bgcolour = "background-color: #FF0000;"; } if ($ads[$i]['mode'] == "1"){ $max = "∞"; }else{ $max = $ads[$i]['max']; } $table->construct_cell($form->generate_radio_button("aid", $ads[$i]['aid'], $ads[$i]['aid']),array('class' => 'align_center','style' => $bgcolour, 'width' => '75')); $table->construct_cell($ads[$i]['code'],array('class' => 'align_center','style' => $bgcolour)); $table->construct_cell($mode,array('class' => 'align_center','style' => $bgcolour)); $table->construct_cell($ads[$i]['shown'],array('class' => 'align_center','style' => $bgcolour)); $table->construct_cell($max,array('class' => 'align_center','style' => $bgcolour)); $table->construct_row(); } $table->construct_cell( $form->generate_submit_button("Add", array('name' => 'add')) ." ". $form->generate_submit_button("Edit", array('name' => 'edit')) ." ". $form->generate_submit_button("Disable/Enable", array('name' => 'disable')) ." ". $form->generate_submit_button("Reset View", array('name' => 'reset')) ." ". $form->generate_submit_button("Delete", array('name' => 'delete')) ,array('colspan' => '6','class' => 'align_center')); $table->construct_row(); $table->output("
Rotation system
"); $form->end(); $page->output_footer(); exit; } } function ads_Add_form($message_text = ""){ global $db, $mybb, $page; $form = new Form("index.php?module=config/ads", "post"); $table = new Table; $table->construct_header("Add Advertisment",array('class' => 'align_center', 'colspan' => 1)); $table->construct_cell($form->generate_text_area("code",$message_text),array('class' => 'align_center')); $table->construct_row(); $table->construct_cell("Maximum number of views before ad is deleted (leave blank for infinite)
".$form->generate_text_box("max"),array('class' => 'align_center')); $table->construct_row(); $table->construct_cell( $form->generate_submit_button("Add", array('name' => 'do_add')) ." ". $form->generate_reset_button("Reset", array('name' => 'reset')) ,array('class' => 'align_center')); $table->construct_row(); $table->output("
Ad Rotar system
"); $form->end(); } function ads_edit_form(){ global $db, $mybb, $page; $query = $db->query("SELECT * FROM ".TABLE_PREFIX."ads WHERE aid = '".$mybb->input['aid']."'"); $message = $db->fetch_array($query); $form = new Form("index.php?module=config/ads", "post"); $table = new Table; $table->construct_header("Edit Advertisment",array('class' => 'align_center', 'colspan' => 1)); $table->construct_cell($form->generate_text_area("code",$message['code']),array('class' => 'align_center')); $table->construct_row(); $table->construct_cell("Maximum number of views before ad is deleted (leave blank for infinite)
".$form->generate_text_box("max",$message['max']),array('class' => 'align_center')); $table->construct_row(); $table->construct_cell($form->generate_hidden_field('aid', $message['aid']). $form->generate_submit_button("Edit", array('name' => 'do_edit')) ." ". $form->generate_reset_button("Reset", array('name' => 'reset')) ,array('class' => 'align_center')); $table->construct_row(); $table->output("
Ad Rotar system
"); $form->end(); } ?> Daily Talk Forum - Airbus A380 Superjumbo

Daily Talk Forum

You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
Thailand awaits arrival of Airbus A380

Thailand Tuesday eagerly awaited the arrival of the new A380 superjumbo on its first trip to the country, a day after European plane maker Airbus promised no more delays in delivery of the aircraft.


The surprise trip to Bangkok's new Suvarnabhumi Airport is widely seen a move by Airbus to convince Thai Airways not cancel its order for six planes after the flag carrier demanded compensation for the hold up.

The A380 is flying direct from Toulouse, France to Suvarnabhumi and is due to land at about 1.00 pm (0600 GMT). It leaves Bangkok and returns to France on Thursday.

Bangkok was noticeably missing from the A380's globe-spanning test that wrapped up last week although the world's largest plane stopped in several other Asian countries.

Airbus' director of product marketing, Richard Carcaillet, on Monday declined to comment on the negotiations with Thai Airways over possible compensation for the delays but insisted that Airbus would stick to the latest delivery schedule.

"We are very confident there will be no delay," he said. "Thai's delivery will be on time."

Thai has ordered six of the A380s, with three now scheduled for delivery in 2011, delayed from 2009. No delivery date has been set for the remaining three aircraft.

If Thai canceled its order, it would be Airbus's first loss of a contract for the passenger version of the plane.

Thai Airways president Apinan Sumanaseni said Saturday that the airline was in talks with Airbus on compensation for the delays.

Thai Airways had planned to use the superjumbos on some of its most popular routes, flying from Bangkok to Frankfurt, London and Tokyo.

Agence France-Presse
Airbus aircraft wingtip nips Suvarnabhumi maintenance centre

BANGKOK, Sept 1 (TNA) - A wingtip of a latest technology Airbus 380 aircraft currently being tested by Thai Airways International (THAI) Saturday morning hit a hangar entrance door at the Suvarnabhumi airport maintenance centre as the plane was about to take off for Chiang Mai, causing a delay.


No injuries were reported in the accident which took place at 9.45am local time (0245 GMT) when the wingtip of the A380 hit the door of the THAI maintenance hangar at the airport east of Bangkok in Samut Prakan.

Several prominent personalities were on the test flight. Among them were Royal Thai Air Force chief Air Chief Marshal Chalit Phukphasuk and a number of journalists. The ill-fated plane was due to fly to Chiang Mai and return to Suvarnabhumi airport later Saturday before proceeding to Toulouse, France.

The test flight was offered by Airbus Industrie as part of its marketing campaign for A380 for countries which have ordered for a purchase.

THAI president Apinan Sumanaserani said the accident did not result from pilot error, but that it may have occurred from the size of the aircraft which was larger than the safety line marked for aircraft making a U-turn.

Mr. Apinan said the plane could fly again after repairs which were expected to take about an hour.

TNA

[attachment=208]
Ground miscommunication thought to cause airport accident

CHIANG MAI, Sept 1 (TNA) - Senior executives of Thai Airways International (THAI) and Airbus Industrie, the French-based manufacturer of the latest technology Airbus 380 aircraft, said Saturday's accident in which the left winglet of the showcase aircraft hit a hangar entrance at Bangkok's Suvarnabhumi international airport east of the capital, receiving only slight damage, could have resulted from miscommunication between the pilots and ground staff.


The accident occurred Saturday morning when the aircraft was about to take off from Suvarnabhumi international airport to Chiang Mai on a test run and the winglet on the plane's left wingtip accidentally hit the door of the THAI maintenance hangar.

No injuries were reported but the plane was delayed almost two hours. Some 150 senior Thai Airways executives and journalists were on board the plane.

Terry Lutz, the aircraft’s captain said the accident could have resulted from miscommunication between the pilots and ground staff. The damage would not pose any effect on the plane's safety and potential because the damaged winglet was removed before the plane took off.

He said the damage would not affect the plane's aerodynamic system and the safety of passengers.

Edouard Ullmo, Airbus sales executive vice president for Asia-Pacific and Africa, said the accident was minor and could happen anywhere in the world.

However, he said test flights in Vietnam, Hong Kong and South Korea would continue as planned although the plane would fly without left wing.

THAI president Apinan Sumanaserani said the accident could be considered as "minor incident" and ground staff had been warned on their performance after he had talked with the pilots of the plane.

He admitted that THAI hangar was probably too small for A380 and the airline company must now have to find ways in solving the problem from reoccurring in future because THAI had ordered for six A380s. The first A380 aircraft is scheduled for delivery to the Thai national carrier in 2010.

TNA

[attachment=209]
Quote:However, he said test flights in Vietnam, Hong Kong and South Korea would continue as planned although the plane would fly without left wing.

You would have to be a little worried if you were flying onto Vietnam, Hong Kong and South Korea with no left wing Icon_eek
Pages: 1 2 3 4 5 6 7
Reference URL's
  • Daily Talk Forum: http://www.dailytalkforum.com/index.php
  • :