File:  [Local Repository] / db / prgsrc / drupal / modules / chgk_db / chgk_db.module
Revision 1.3: download - view: text, annotated - select for diffs - revision graph
Sat Mar 20 17:23:42 2010 UTC (14 years, 2 months ago) by roma7
Branches: MAIN
CVS tags: HEAD
issue http://db.chgk.info/v2/node/10

    1: <?php
    2: /**********************
    3: *
    4: * Tournament
    5: *
    6: *********************/
    7: 
    8: require_once(dirname(__FILE__)."/classes/DbPackage.class.php");
    9: 
   10: 
   11: /**
   12:  * Implementation of hook_menu().
   13:  */
   14: function chgk_db_menu() {
   15:   $items['print'] = array(
   16:     'path'  => 'print',
   17:     'page callback' => 'chgk_db_print',
   18:     'page arguments' => array(1),
   19:     'access callback' => "chgk_db_access",
   20:   );
   21:   return $items;
   22: }
   23: 
   24: /**
   25:  * Implementation of hook_theme().
   26:  */
   27: function chgk_db_theme() {
   28:   $items['chgk_db_print'] = array(
   29:     'arguments' => array(
   30:       'title' =>'',
   31:       'content' => ''
   32:     ),
   33:     'template'=>'templates/chgk_db_print' 
   34:   );
   35:   $items['chgk_db_field'] = array(
   36:     'arguments' => array(
   37:       'field' => NULL
   38:     )  
   39:   );
   40:   $items['chgk_db_tour'] = array(
   41:     'arguments' => array(
   42:       'tour'=>NULL,
   43:       'alone' => TRUE
   44:     ),
   45:     'template'=>'templates/chgk_db_tour'
   46:   );
   47: 
   48:   $items['chgk_db_question'] = array(
   49:     'arguments' => array(
   50:       'question'=>NULL
   51:     ),
   52:     'template'=>'templates/chgk_db_question'
   53:   );
   54: 
   55:   $items['chgk_db_jeopardy_question'] = array(
   56:     'arguments' => array(
   57:       'question'=>NULL
   58:     ),
   59:     'template'=>'templates/chgk_db_jeopardy_question'
   60:   );
   61: 
   62:   $items['chgk_db_champ_full'] = array(
   63:     'arguments' => array(
   64:         'tour' => NULL
   65:     ),
   66:     'template'=>'templates/chgk_db_champ_full'
   67:   );
   68:   return $items;
   69: }
   70: 
   71: function chgk_db_print($string) {
   72:   $tournament = DbPackage::newFromDb($string);
   73:   print $tournament->getPrintVersion();
   74: }
   75: 
   76: 
   77: function chgk_db_access() {
   78:   return TRUE;
   79: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>