public function actionMobile1() { require_once 'hawhaw.php'; $myPage = new HAW_deck("Welcome"); $myText = new HAW_text("Hello WAP!"); $myPage->add_text($myText); $myPage->create_page(); }
/* $DemoPage = new HAW_deck("Tiki", HAW_ALIGN_CENTER); $title = new HAW_text("Tiki", HAW_TEXTFORMAT_BOLD); $DemoPage->add_text($title); //$link1 = new HAW_link("Forum","forum.php"); $link2 = new HAW_link("Wiki","tiki-index.php?mode=wap"); $link3 = new HAW_link("Blogs","tiki-list_blogs.php?mode=wap"); $linkset = new HAW_linkset(); //$linkset->add_link($link1); if($prefs['feature_wiki'] == 'y') { $linkset->add_link($link2); } if($prefs['feature_blogs'] == 'y') { $linkset->add_link($link3); } $DemoPage->add_linkset($linkset); $DemoPage->create_page(); */ $TikiPage = new HAW_deck("Tiki", HAW_ALIGN_CENTER); $text1 = new HAW_text("Attention!", HAW_TEXTFORMAT_BOLD); $text1->set_br(2); $TikiPage->add_text($text1); $text2 = new HAW_text("Usage of tiki-wap.php is deprecated! The HAWHAW-enabled Tiki is available at:"); $text2->set_br(2); $TikiPage->add_text($text2); $newLink = new HAW_link("tiki-mobile.php", "tiki-mobile.php"); $newLink->set_br(2); $TikiPage->add_link($newLink); $text3 = new HAW_text("Reason: This URL is not restricted to WAP only. It can be used by PDA's, voice browser and other mobile devices too."); $TikiPage->add_text($text3); $TikiPage->create_page();
function error($message, $parser, $line = 0) { // if line argument is provided ==> display current line and line number global $err; global $line_buffer; global $log_hawxy_errors; global $error_skin; $myDeck = new HAW_deck($err[4]); if ($error_skin) { $myDeck->use_simulator("http://www.hawhaw.de/skin/error/skin.css"); } if ($line > 0) { // add line number to message $message = $err[10] . " " . $line . ": " . $message; } $myText2 = new HAW_text($message, HAW_TEXTFORMAT_BOLD); $myDeck->add_text($myText2); if ($line > 0) { // display wrong line $myRule = new HAW_rule(); $myDeck->add_rule($myRule); $wrong = new HAW_text($line_buffer[$line - 1]); $myDeck->add_text($wrong); } $myDeck->set_width("80%"); $myDeck->create_page(); xml_parser_free($parser); if ($log_hawxy_errors == true) { error_log("Hawxy error: " . $message); } exit; // there is nothing else to do }
} } $db = NewADOConnection(CAMILA_DB_DSN); $page = new HAW_deck('DB Init (reset)'); $page->use_simulator(''); if (is_dir(CAMILA_TABLES_DIR)) { if ($dh = opendir(CAMILA_TABLES_DIR)) { while (($file = readdir($dh)) !== false) { if ($file != '.' && $file != '..' && substr($file, -3) == 'xml') { $result = create_table(CAMILA_TABLES_DIR . '/' . $file, CAMILA_APPLICATION_PREFIX, $db); if ($result['result'] == 2) { $text = new HAW_text($file . ' - OK'); } else { $text = new HAW_text($file . ' - KO - ' . $result['sql'], HAW_TEXTFORMAT_BOLD); } $page->add_text($text); } } closedir($dh); } } if (is_dir(CAMILA_TABLES_DIR)) { if ($dh = opendir(CAMILA_TABLES_DIR)) { while (($file = readdir($dh)) !== false) { if ($file != '.' && $file != '..' && substr($file, -3) == 'csv') { $result = CSV_import(CAMILA_TABLES_DIR . '/' . $file, CAMILA_APPLICATION_PREFIX . substr($file, 0, -4), $db); if ($result['result'] == 2) { $text = new HAW_text($file . ' - inserted: ' . $result['processed']); } else { $text = new HAW_text($file . ' - error: ' . $result['error'] . ', failed: ' . $result['failed'] . ', inserted: ' . $result['processed'], HAW_TEXTFORMAT_BOLD); }