version 1.2, 2010/03/08 16:19:22
|
version 1.4, 2010/03/21 18:06:04
|
Line 18 function chgk_db_menu() {
|
Line 18 function chgk_db_menu() {
|
'page arguments' => array(1), |
'page arguments' => array(1), |
'access callback' => "chgk_db_access", |
'access callback' => "chgk_db_access", |
); |
); |
|
$items['fb2'] = array( |
|
'path' => 'fb2', |
|
'page callback' => 'chgk_db_fb2', |
|
'page arguments' => array(1), |
|
'access callback' => "chgk_db_access", |
|
); |
return $items; |
return $items; |
} |
} |
|
|
Line 39 function chgk_db_theme() {
|
Line 45 function chgk_db_theme() {
|
); |
); |
$items['chgk_db_tour'] = array( |
$items['chgk_db_tour'] = array( |
'arguments' => array( |
'arguments' => array( |
'tour'=>NULL |
'tour'=>NULL, |
|
'alone' => TRUE |
), |
), |
'template'=>'templates/chgk_db_tour' |
'template'=>'templates/chgk_db_tour' |
); |
); |
|
|
|
$items['chgk_db_tour_fb2'] = array( |
|
'arguments' => array( |
|
'tour'=>NULL, |
|
'alone' => TRUE |
|
), |
|
'template'=>'templates/chgk_db_tour_fb2' |
|
); |
|
|
|
|
$items['chgk_db_question'] = array( |
$items['chgk_db_question'] = array( |
'arguments' => array( |
'arguments' => array( |
'question'=>NULL |
'question'=>NULL |
Line 51 function chgk_db_theme() {
|
Line 67 function chgk_db_theme() {
|
'template'=>'templates/chgk_db_question' |
'template'=>'templates/chgk_db_question' |
); |
); |
|
|
|
$items['chgk_db_question_fb2'] = array( |
|
'arguments' => array( |
|
'question'=>NULL |
|
), |
|
'template'=>'templates/chgk_db_question_fb2' |
|
); |
|
|
|
|
|
$items['chgk_db_jeopardy_question'] = array( |
|
'arguments' => array( |
|
'question'=>NULL |
|
), |
|
'template'=>'templates/chgk_db_jeopardy_question' |
|
); |
|
|
$items['chgk_db_champ_full'] = array( |
$items['chgk_db_champ_full'] = array( |
'arguments' => array( |
'arguments' => array( |
'tour' => NULL |
'tour' => NULL |
), |
), |
'template'=>'templates/chgk_db_champ_full' |
'template'=>'templates/chgk_db_champ_full' |
); |
); |
|
$items['chgk_db_fb2'] = array( |
|
'arguments' => array('tournament'=>''), |
|
'template' => 'templates/chgk_db_fb2' |
|
); |
return $items; |
return $items; |
} |
} |
|
|
Line 65 function chgk_db_print($string) {
|
Line 100 function chgk_db_print($string) {
|
print $tournament->getPrintVersion(); |
print $tournament->getPrintVersion(); |
} |
} |
|
|
|
function chgk_db_fb2($string) { |
|
$tournament = DbPackage::newFromDb($string); |
|
$tournament->getAll(); |
|
$xml = theme('chgk_db_fb2', $tournament); |
|
header("Content-Type: application/octet-stream"); |
|
header("Content-Disposition: attachment; filename=\"$string.fb2\"\n"); |
|
print $xml;; |
|
exit; |
|
#print $tournament->getFb2(); |
|
} |
|
|
|
|
function chgk_db_access() { |
function chgk_db_access() { |
return TRUE; |
return TRUE; |