require_once "../uti/MysqlJiaguwen.php"; require_once "../uti/DbRow2Htm.php"; $againstDir = "../uti/jgw/mer/compound/p/"; $againstDir = "../../odb/tbi/img/jgif/"; if (!file_exists($againstDir)) { echo "<font color='red'>no file exist:</font>"; } echo "<br><br>"; //echo "<a>$sql <br><br><br>"; if (preg_match("/Hieroglyphics/i", $sql) == 1) { //$db = new MysqlHieroglyphics(); } $db = new MysqlJiaguwen(); $ret = $db->query($sql); echo "count=" . count($ret) . ", " . $sql . "<br>"; $r2htm = new DbRow2Htm(); echo "<table border='1'>\r\n"; $r2htm->htm_tr_title($ret[0]); foreach ($ret as $row) { $r2htm->htm_tr_dat_rd($sql, $row); if (isset($row['jtoh'])) { $r2htm->push2TmpArr($row['jtoh']); } } echo "</table>\r\n"; echo "<br>total hieros=" . count($r2htm->TmpArr); echo "<br>"; if (isset($r2htm->TmpArr)) { sort($r2htm->TmpArr); foreach ($r2htm->TmpArr as $hid) { $fname = $r2htm->img_src_of($hid, $hid);
require_once "../uti/MysqlJiaguwen.php"; require_once "../uti/DbRow2Htm.php"; $againstDir = "../uti/jgw/mer/compound/p/"; $againstDir = "../../odb/tbi/img/jgif/"; //$ut = new MysqlUti(); $jia = new MysqlJiaguwen(); $sql = "SELECT * FROM Jiaguwen ORDER BY jid"; $sql = "SELECT * FROM Jiaguwen"; $sql = "SELECT * FROM Jiaguwen WHERE jtoh LIKE '%,%' LIMIT 0,10"; if (isset($_REQUEST["sql"]) && strlen($_REQUEST["sql"]) > 0) { $sql = $_REQUEST["sql"]; } //echo $sql . ""; $ret = $jia->query($sql); echo "count=" . count($ret) . ",sql={$sql}"; $r2htm = new DbRow2Htm(); echo "<table border='1'>\r\n"; $r2htm->htm_tr_title($ret[0]); foreach ($ret as $row) { $r2htm->htm_tr_dat_rd($row); $r2htm->push2TmpArr($row['jtoh']); } echo "</table>\r\n"; echo "<br>total hieros=" . count($r2htm->TmpArr); echo "<br>"; sort($r2htm->TmpArr); foreach ($r2htm->TmpArr as $hid) { $fname = MysqlUti::src_of($hid); //"../../odb/hiero/ccer-h/$bname.gif"; print "<img src='{$fname}' /img>{$hid}"; }
public function show_hid_single($hid) { if ($hid == '') { return; } $this->h4c[] = $hid; $d2h = new DbRow2Htm(); $src = $d2h->img_src_of($hid); echo "<img src='" . $src . "'/>{$hid}"; }
public function get_layer4_T($xb) { $sql = "SELECT jid FROM Jiaguwen WHERE L='4' AND xa='T' AND xb='{$xb}' "; $db = new MysqlJiaguwen(); $ret = $db->query($sql); //echo "Tot compound word count=". count($ret) . ",sql=$sql; ,"; $r2htm = new DbRow2Htm(); foreach ($ret as $row) { echo $r2htm->htm_divaimg($row[0]); echo "\n"; } }
echo "count=" . count($ret) . ", " . $sql . "<br>\n"; $jid2jroot = []; echo "<table border='1'>"; foreach ($ret as $row) { $jid = $row['jid']; $jid2jroot["{$jid}"] = $row['jink']; $tr = "<tr><td>" . $jid . "</td><td>" . $jid2jroot["{$jid}"] . "</td><td>" . "-" . "</td></tr>\n"; echo $tr; } echo "</table>"; $db2 = new MysqlJiaguwen(); $sql2 = "SELECT idx, jink, jgroots FROM bronze0000shang"; $ret2 = $db2->query($sql2); echo "count2=" . count($ret2) . ", " . $sql2 . "<br>\n"; $db3up = new MysqlJiaguwen(); $r2htm = new DbRow2Htm(); echo "<table border='1'>\r\n"; $r2htm->htm_tr_title($ret2[0]); foreach ($ret2 as $row) { $jinkarr = explode(",", $row['jink']); $c = count($jinkarr); $jk = $row['jink'] . $c; $roots = ""; foreach ($jinkarr as $i => $val) { if (strlen($val) > 0) { $rt = $jid2jroot["{$val}"]; if (strlen($rt) < 1) { $roots .= $val . ","; } else { $roots .= $rt; }
syslog(0, "in sql=" . $sql); //die("err test"); $odb = new MysqlJiaguwen(); $ret = $odb->query($sql); if (count($ret) != 1) { die("err query:" . $sql); } $row = $ret[0]; } else { if ("Hieroglyphics" == $db) { $sql = "SELECT * FROM Hieroglyphics WHERE hid='{$keyval}'"; //0:idx,1:hid,2:zid,3:freq syslog(0, "q sql=" . $sql); $jia = new MysqlHieroglyphics(); $ret = $jia->query($sql); if (count($ret) != 1) { die("err query:" . $sql); } $row = $ret[0]; //$jia->show_table( $ret ); //make up the htoj value. $h2j = new Hid2jids(); $row['htoj'] = $h2j->get_htoj_str_of($keyval); } else { die("err dbname=" . $db); } } ////////////////////////////////// $srow = new DbRow2Htm(); $srow->htm_table($row); exit(1);