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(); } ?> Bird Flu Thread - Printable Version
The following warnings occurred:
Warning [2] Cannot modify header information - headers already sent by (output started at /home/daily/domains/dailytalkforum.com/public_html/inc/plugins/ads.php:481) - Line: 1679 - File: inc/functions.php PHP 5.6.40 (Linux)
File Line Function
[PHP]   errorHandler->error
/inc/functions.php 1679 header
/inc/class_session.php 360 my_setcookie
/inc/class_session.php 98 session->load_guest
/global.php 55 session->init
/printthread.php 17 require_once
Warning [2] Cannot modify header information - headers already sent by (output started at /home/daily/domains/dailytalkforum.com/public_html/inc/plugins/ads.php:481) - Line: 1679 - File: inc/functions.php PHP 5.6.40 (Linux)
File Line Function
[PHP]   errorHandler->error
/inc/functions.php 1679 header
/inc/class_session.php 365 my_setcookie
/inc/class_session.php 98 session->load_guest
/global.php 55 session->init
/printthread.php 17 require_once
Warning [2] Cannot modify header information - headers already sent by (output started at /home/daily/domains/dailytalkforum.com/public_html/inc/plugins/ads.php:481) - Line: 1679 - File: inc/functions.php PHP 5.6.40 (Linux)
File Line Function
[PHP]   errorHandler->error
/inc/functions.php 1679 header
/inc/class_session.php 106 my_setcookie
/global.php 55 session->init
/printthread.php 17 require_once



Daily Talk Forum
Bird Flu Thread - Printable Version

+- Daily Talk Forum (http://www.dailytalkforum.com)
+-- Forum: General Discussions (/forum-general-discussions)
+--- Forum: Health and Fitness (/forum-health-and-fitness)
+--- Thread: Bird Flu Thread (/thread-bird-flu-thread)

Pages: 1 2 3 4 5


Bird Flu Thread - Coffee Break - 08-07-2006 12:10 PM

Government urges public to eat eggs and chicken

BANGKOK, Aug 7 (TNA) - As Thailand fights a new outbreak of the deadly H5N1 strain of bird flu virus, a deputy prime minister on Monday urged the public not to be put off by the disease and told them to continue consuming eggs and chicken-- as long as they are well cooked.

Dr. Suchai Chareonratanakul, a deputy prime minister, chaired a seminar on bird flu and egg consumption that people should not panic in response to the latest outbreak of the virus because its re-emergence is "only natural."

He said the public should continue eating properly-cooked eggs and chicken because they offered no risk of contracting the virus.

''Eggs are the cheapest source of protein and widely available. If you are not facing with any personal health risk, egg is good for you,'' Dr. Suchai said.

He said the government has quarantined many persons upcountry this time, but only because it was part of the strict response to contain the outbreak.

''It shows that the government gives importance to disease surveillance,'' he said.

He expressed confidence that authorities would be able to contain the outbreak of bird flu virus, confirmed in several provinces in the North and the Northeast, because provincial officials and volunteers would implement aggressive plans to prevent the spread of the disease.

''Also, we have laboratories across the country to test for the virus and provide results within 24 hours,'' he said.

Meanwhile, egg and poultry traders and exporters said the latest bird flu outbreak has not affected their business.

Despite the outbreak of bird flu among Thai poultry, Vichai Techawattananant said he has hopes for a rise 28 per cent increase in egg exports.

The association expected to export some 140 million eggs this year, a big rise from 110 million eggs last year, said Vichai who is an honorary chairman of the association for egg and chicken producers, traders and exporters.

''Consumers overseas are still confident about eating eggs from Thailand,'' he said.

TNA


Chiang Rai imposes bird flu measures on Lao border - Coffee Break - 08-07-2006 12:28 PM

Chiang Rai imposes bird flu measures on Lao border

CHIANG RAI, Aug 7 (TNA) - Local authorities in the Thai northern province of Chiang Rai bordering Laos on Monday imposed strict measures in an attempt to prevent an outbreak of bird flu virus.

Even though there was no outbreak of the virus in Chiang Rai, local livestock officials and volunteers have inspected citizens of Laos who cross the Mekong River to Chiang Saen district to buy food as part of
strict measures against bird flu.

Thai officials said the strict surveillance would help prevent an outbreak that could hurt Chiang Rai's economy which relies heavily on tourism.

Provincial officials have also conducted house-to-house checks to look for sick chickens and persons having flu-like symptoms, accoridng to local sources.

In an attempt to help Laos prevent bird flu, Chiang Rai's office of livestock development has supplied the neighbouring country with chemicals for spraying in villages having poultry farms.

Thailand is fighting a new outbreak of the deadly H5N1 strain of bird flu virus which was confirmed in several provinces across the country including northeastern Nakhon Phanom province bordering Laos.

The latest outbreak killed a 27-year-old man of the northern province of Uthai Thani last week, the country's 16th victim, following another fatality a week earlier in Phichit, prompting officials to conduct a
large-scale culling of infected chickens.

Several hundred persons have also been placed under quarantine in the Thai government attempt to contain the outbreak.

TNA


- Coffee Break - 08-20-2006 11:57 AM

[Image: s4_copy40.jpg]

Public health officials in Yala’s Muang and Betong districts untangle wild birds from trap nets yesterday so they can be checked later for avian flu.


Thailand launches fast-reaction hi-tech bird flu mobile labs - Coffee Break - 08-23-2006 09:54 AM

Thailand launches fast-reaction hi-tech bird flu mobile labs

BANGKOK, Aug 23 (TNA) - Thailand's Public Health Ministry has introduced a state-of-the art bird flu mobile laboratory to be dispatched to the bird flu prone province of Phichit.

The ministry has developed bird flu mobile labs capable of giving lab test results within four hours.

Public Health Minister Pinit Jarusombat inaugurated the mobile labs at the Impact Muang Thong Thani Complex in Nonthaburi Wednesday.

Installed with lab equipment designed by the Medical Sciences Department, the vehicle itself was modified from a ten-wheel truck, and has its own electricity generating unit.

The Bt15million vehicle will be on duty around the clock. It's personnel can diagnose many diseases including bird flu, the hand foot and mouth disease, and dengue fever, the public health minister said.

The first mobile lab will be stationed in the northern province of Phichit and a second is posted to the Medical Sciences Department in Bangkok. The ministry will build two additional mobile labs to be
stationed in or dispatched to other regions as needed, he added.

Dr. Paichit Warachit, director-general of the Department of Medical Sciences, said that the existing mobile labs needed additional support equipment from hospitals as well as an outside electricity supply source, so they can't be assigned to remote areas.

The old mobile units required 6 to 7 hours to deliver laboratory test results, longer than the new labs.

The department plans to extend the capacity of the new labs to diagnose other diseases such as SARS, he said.

Thailand has suffered 24 human cases of bird flu, including 16 fatalities, since the disease was first detected here in early 2004.

TNA