return "<font title=\"File <wikihiero.{$ext}> not found!\">" . strtoupper($ext) . "</font>"; } } function WH_Table($table) { global $lang; $url = "wh_table.php?table=" . urlencode($table) . '&lang=' . urlencode($lang); $encUrl = htmlspecialchars(Xml::encodeJsVar($url)); echo "<a href=\"#\" onClick=\"MyWindow=window.open({$encUrl},'{$table}','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=400,height=300,left=20,top=20'); return false;\" title =\"" . WH_Text($table) . "\">{$table}</a>"; } # # Main code # $start_time = microtime(); list($a_dec, $a_sec) = explode(" ", $start_time); $html = WikiHiero($text, $mode, $scale, $line); list($b_dec, $b_sec) = explode(" ", microtime()); $process_time = sprintf("%0.3f sec", $b_sec - $a_sec + $b_dec - $a_dec); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML> <HEAD> <TITLE>WikiHiero</TITLE> <META http-equiv="Content-type" content="text/html; charset=UTF-8"> <META name="Author" content="Guillaume Blanchard"> <META name="Copyright" content="© 2004 Guillaume Blanchard, Under free GNU Public Licence"> <LINK rel="shortcut icon" href="/favicon.ico"> <SCRIPT type="text/javascript"> function LangLink(l) {
<?php echo "<option value=\"0\">" . WH_Text("Syntax") . "</option>\n"; echo "<option>----</option>\n"; foreach ($syntax as $v) { echo "<option value=\"{$v}\"> {$v} " . WH_Text($v) . "</option>"; } ?> </select> </td><td align="right"> <input type="submit" value="Submit"> <input type="button" value="Reset" onClick="hierobox.value='';"> </td></tr> <tr><td colspan="3"> <?php // Stupid, but it works: echo preg_replace("|" . WH_IMG_DIR . WH_IMG_PRE . "|", "{$wikihiero_url}/" . WH_IMG_DIR . WH_IMG_PRE, WikiHiero($hierobox, WH_MODE_HTML)); ?> </td></tr> </table> </form> <?php // Based on Wikihiero's WH_Text in its index.php function WH_Text($index) { global $wh_language; global $lang; if (isset($wh_language[$index])) { if (isset($wh_language[$index][$lang])) { return $wh_language[$index][$lang]; } else { return $wh_language[$index]["en"];