require_once "../uti/Ureaddir.php"; require_once "../uti/MysqlHieroglyphics.php"; //if(!isset($_REQUEST["oldroot"])) die("'oldroot' is not set."); //if(!isset($_REQUEST["newroot"])) die("'newroot' is not set."); $oldroot = $_REQUEST["oldroot"]; $newroot = $_REQUEST["newroot"]; print "oldroot=" . MysqlHieroglyphics::htm_img($oldroot) . ",newroot=" . MysqlHieroglyphics::htm_img($newroot) . ", confirm=" . $_REQUEST["confirm"] . "<br><br>"; //$oldroot = "A53"; //$newroot = "---"; if (strlen($oldroot) == 0) { die(" oldroot is empty."); } if (strlen($newroot) == 0) { die(" newroot is empty."); } $harr = new MysqlHieroglyphics(); $sql = "SELECT hid, hink FROM Hieroglyphics WHERE hink LIKE '%{$oldroot},%'"; $myarr = $harr->query($sql); foreach ($myarr as $row) { $hid = $row['hid']; print MysqlHieroglyphics::htm_img($hid); print "<a>==</a>"; $orglnk = $row['hink']; print MysqlHieroglyphics::htm_img($orglnk); print "<br>"; $newlnk = MysqlHieroglyphics::replace_root_of_links($oldroot, $newroot, $orglnk); //preg_replace("/$oldroot/i", $newroot, $orglnk); print $newlnk . "<br>"; print MysqlHieroglyphics::htm_img($hid); print "<a>==</a>"; print MysqlHieroglyphics::htm_img($newlnk);
echo "<tr>"; foreach ($ret[0] as $key => $val) { if (is_numeric($key)) { continue; } echo "<td>"; echo $key; echo "</td>\r\n"; } echo "</tr>"; foreach ($ret as $row) { $this->htm_tr($row); } echo "</table>\r\n"; } } //class //exit(0); if (isset($_GET["test"]) && $_GET["test"] == 1) { //================= //usage sample //================= print "<br>======<br>"; /////////////////// $db = new MysqlHieroglyphics(); //$sql="SELECT * FROM `Jiaguwen`"; //$ar = $db->query($sql); //print_r($ar); $db->showimg(); } //if
} else { echo '#11eeee'; } ?> "> <?php require_once "../tpl/atpl.php"; atpl::printent("../tpl/mmdiv.php"); ?> <?php require_once "../uti/Ureaddir.php"; require_once "../uti/HieroglyphicsImgFiles.php"; require_once "../uti/MysqlHieroglyphics.php"; $hdb = new MysqlHieroglyphics(); $HidLinksArr = $hdb->getAssocHidLinks(); $destDir = "../../odb/hiero/ds/compound"; if (isset($_REQUEST["dir"])) { $destDir = $_REQUEST["dir"]; } $roots = new HieroglyphicsImgFiles($destDir); $myarr = HieroglyphicsImgFiles::GetClassifiedNamesDirs(); print "<div class='workingarea'>"; ///create menu-list. print "<div class='menu_container'>\r\n"; $indx = 0; foreach ($myarr as $key => $dir) { //$dir = basename( $dir ); $indx++; $indx = $indx % 2;
float: left; border-color: #0000ff; border-style: solid; border-width: 1px; } </style> <?php $d = new MysqlJiaguwen(); $d->print_js_colnames_Jia(); $d = new MysqlHieroglyphics(); $d->print_js_colnames_Hia(); ?> <script type="text/javascript"> jQuery(document).ready(function(){ $("body").mousemove(function(e){ //$("#a1").attr("src", "../audio/c.wav" ); $("#aa").html("<embed src='../audio/a.wav' hidden=true autostart=true loop=false>"); $("#aa").html("<embed src='../audio/c.wav' hidden=true autostart=true loop=false>"); //$("#info").css("font-size","10px").text(e.pageX +', '+ e.pageY); $("#mv2").show(); var zz = $.cookie("zz"); if( null == zz || "0"==zz) { return;
//"jink".$i; if ($name != "jink") { continue; } //if( !isset($_REQUEST[$name])) contin; if (strlen($val) < 1) { continue; } $val = trim($val); if ($hid == $val) { die("err: self jink error"); } $arr[] = $val; } if (count($arr) == 0) { die("err: no jink val"); } $arr = array_unique($arr); sort($arr); $linkjidcodes = ""; foreach ($arr as $val) { $linkjidcodes .= $val . ","; } $jgw = new MysqlHieroglyphics(); $sql = "UPDATE Hieroglyphics SET hink='{$linkjidcodes}' WHERE hid='{$hid}'"; //0:idx,1:hid,2:zid,3:freq $ret = $jgw->execute($sql); //if( !$ret) die("err: $sql"); //print_r( $result ); printf("update ret=%d : %s-->%s", $ret, $hid, $linkjidcodes); print_r($_REQUEST);
<?php require_once "../MysqlHieroglyphics.php"; //mysql_query("UPDATE Persons SET Age = '36' //WHERE FirstName = 'Peter' AND LastName = 'Griffin'"); //"UPDATE animals SET animal_name='bruce' WHERE animal_name='troy'" //print_r($_REQUEST); if (!isset($_REQUEST["jid"])) { die("err= no hid"); } $hid = $_REQUEST["jid"]; $jgw = new MysqlHieroglyphics(); $sql = "SELECT hink FROM Hieroglyphics WHERE hid='{$hid}'"; //0:idx,1:jid,2:zid,3:freq $ret = $jgw->query($sql); //print_r($ret); if (isset($ret[0])) { print $ret[0]["hink"]; } else { print "err: no ret"; } //print_r( $result ); //printf("update ret=%d : %s-->%s",$ret, $jid, $linkjidcodes); //print_r($_REQUEST);
$jidstr = ""; foreach ($ret as $indx => $row) { $jidstr .= $row[0] . ","; } //print_r($ret); //echo $jidarr; //syslog(0, "jidstr=". $jidstr); //echo $jidstr; return $jidstr; } } $h2j = new Hid2jinks(); //echo $jc->get_jinks($hid); $sql = "SELECT hid FROM Hieroglyphics"; // $hiero = new MysqlHieroglyphics(); $ret = $hiero->query($sql); foreach ($ret as $indx => $row) { $hid = $row[0]; $htoj = $h2j->get_jinks($hid); if ("" == $htoj) { continue; } //echo $htoj ; //echo "<br>"; $sql = "UPDATE Hieroglyphics SET htoj='{$htoj}' WHERE hid='{$hid}'"; $sql = "UPDATE Hieroglyphics SET htoj='{$htoj}' WHERE hid='{$hid}'"; $ret = $hiero->execute($sql); echo $sql . "<br>"; } die;
</head> <body bgcolor="<?php echo '#eeeeee'; ?> "> <?php require_once "../tpl/atpl.php"; atpl::printent("../tpl/mmdiv.php"); ?> <?php require_once "../uti/Ureaddir.php"; require_once "../uti/MysqlHieroglyphics.php"; //$rootdir = $_REQUEST["dir"]; $harr = new MysqlHieroglyphics(); $myarr = $harr->getRootsStatistic(); arsort($myarr); print "[total roots = " . count($myarr) . "]"; if (0) { print "<table border='1'>"; $i = 0; foreach ($myarr as $key => $ar) { $freq = $ar["freq"]; $i++; print "<tr><td>{$i}</td>"; $src = MysqlHieroglyphics::imgsrc($key); print "<td><img class='db' name='{$key}' src={$src} /><a>{$key}</a></td>"; print "<td><a>{$freq}</a></td>"; print "</tr>\r\n"; }
die(" err: hid is empty"); } if (!isset($_REQUEST["roots"])) { die("err: no roots"); } $roots = $_REQUEST["roots"]; syslog(0, "to delete a root=" . $roots); if (strlen($roots) == 0) { die(" err: roots is empty"); } if ($hid == $roots) { die("delete self err "); } $roots .= ","; $linkjidcodes = ""; $jgw = new MysqlHieroglyphics(); $sql = "SELECT hink FROM Hieroglyphics WHERE hid='{$hid}'"; $ret = $jgw->query($sql); //print_r($ret); $linksRead = ""; if (isset($ret[0])) { $linksRead = $ret[0]["hink"]; $linksRead = ltrim($linksRead, ","); syslog(0, "linksRead=" . $linksRead); } else { die("err: no ret"); } if (strlen($linksRead) > 0) { $linkjidcodes = str_replace($roots, "", $linksRead); syslog(0, "hink after detele=" . $linkjidcodes); } else {
} } ?> </div> configuration Set<br> <div class="cfg"> <form action="" method="GET"> UPDATE <font color="blue">Hieroglyphics</font> SET <select size='13'> <?php $d = new MysqlHieroglyphics(); $arr = $d->get_colnames(); foreach ($arr as $colname) { print "<option>{$colname}</option>"; } ?> </select> = <select size="3"><option>Add</option><option>Delete</option></select> <select size="3"><option>var</option>a<option>fixed</option></select> WHERE <font color="blue">jid</font>= <a>?????</a> <br> <button type="submit">OK</button> </form> </div>
<?php session_start(); require_once "../MysqlJiaguwen.php"; require_once "../MysqlHieroglyphics.php"; //mysql_query("UPDATE Persons SET Age = '36' //WHERE FirstName = 'Peter' AND LastName = 'Griffin'"); //"UPDATE animals SET animal_name='bruce' WHERE animal_name='troy'" //print_r($_REQUEST); if (isset($_SESSION["database"]) && isset($_SESSION["sql_undo"])) { $odb = null; if ("Jiaguwen" == $_SESSION["database"]) { $odb = new MysqlJiaguwen(); } else { if ("Hieroglyphics" == $_SESSION["database"]) { $odb = new MysqlHieroglyphics(); } else { print_r($_SESSION); die("err _SESSION[database] "); } } syslog(0, "undo::" . $_SESSION["sql_undo"]); $ret = $odb->execute($_SESSION["sql_undo"]); die("ok undo,ret={$ret}, sql=" . $_SESSION["sql_undo"]); } echo "err undo"; print_r($_SESSION);
$ret = ""; $arr = preg_split("/[,]/i", $linkedroots); foreach ($arr as $bname) { if ('0' == $bname || strlen($bname) == 0) { continue; } $fname = "../../odb/hiero/ccer-h/{$bname}.gif"; $ret .= "<img class='links{$clsid}' title='[del]:{$hid}:{$bname}' src='{$fname}'/>"; $ret .= "<a class='links' title='rev:{$bname}'>{$bname}</a>\r\n"; } for ($i = 0; $i < 5; $i++) { $ret .= "<img class='links empty' src=''/><a class='links'></a>\r\n"; } return $ret; } $hdb = new MysqlHieroglyphics(); //$HidLinksArr = $hdb->getAssocHidLinks(); $HidLinksArr = $hdb->getAssoc_Hid_rows(); $destDir = "../../odb/hiero/ds/compound"; if (isset($_REQUEST["dir"])) { $destDir = $_REQUEST["dir"]; } $roots = new HieroglyphicsImgFiles($destDir); $myarr = HieroglyphicsImgFiles::GetClassifiedNamesDirs(); print "<div class='workingarea'>"; ///create menu-list. print "<div class='menu_container'>\r\n"; $indx = 0; foreach ($myarr as $key => $dir) { //$dir = basename( $dir ); $indx++;
syslog(0, "err type of str jink:" . $sql); die("err mixed type for update"); } syslog(0, "to run sql:" . $sql); $ret = $odb->execute($sql); if (0 == $ret) { die("err " . $sql); } print $sql; die(""); } else { if ("Hieroglyphics" == $db) { $sql = "SELECT * FROM Hieroglyphics WHERE hid='{$keyId}'"; syslog(0, "sql=" . $sql); //die("err test"); $odb = new MysqlHieroglyphics(); $ret = $odb->query($sql); if (count($ret) != 1) { die("err query:" . $sql); } $row = $ret[0]; $dbstr = "row | "; foreach ($row as $key => $val) { syslog(0, "Hieroglyphics prepare for undo:" . $key . "=" . $val); if (is_numeric($key)) { continue; } $dbstr .= $key . "=" . $val . " | "; } syslog(0, $dbstr); if (!isset($row[$sc])) {
"> <select id="sql" name="sql"> <option></option> <option>SELECT * FROM Hieroglyphics</option> <option>SELECT * FROM Hieroglyphics LIMIT 0,10</option> <option>SELECT * FROM Hieroglyphics WHERE hink LIKE '%,%'</option> <option>SELECT * FROM Hieroglyphics WHERE hink LIKE '%,%'</option> </select> <button type="submit">OK</button> </form> <?php require_once "../uti/Ureaddir.php"; require_once "../uti/MysqlHieroglyphics.php"; $againstDir = "../uti/jgw/mer/compound/p/"; $againstDir = "../../odb/tbi/img/jgif/"; $jia = new MysqlHieroglyphics(); $sql = "SELECT * FROM Jiaguwen ORDER BY jid"; $sql = "SELECT * FROM Hieroglyphics"; if (isset($_REQUEST["sql"]) && strlen($_REQUEST["sql"]) > 0) { $sql = $_REQUEST["sql"]; } echo $sql . "<br>\n"; $ret = $jia->query($sql); echo "count=" . count($ret) . "<br>"; $jia->show_table($ret); ?> </body> </html>
session_start(); require_once "../MysqlJiaguwen.php"; require_once "../MysqlHieroglyphics.php"; //mysql_query("UPDATE Persons SET Age = '36' //WHERE FirstName = 'Peter' AND LastName = 'Griffin'"); //"UPDATE animals SET animal_name='bruce' WHERE animal_name='troy'" //print_r($_REQUEST); if (!isset($_REQUEST["sql"])) { die("err: no sql"); } $sql = $_REQUEST["sql"]; if (strlen($sql) < 5) { die("err: {$sql}"); } syslog(0, "sql=: " . $sql); //return; $odb = null; if (strpos($sql, "Jiaguwen") > 0) { $odb = new MysqlJiaguwen(); syslog(0, "MysqlJiaguwen: " . $sql); } else { $odb = new MysqlHieroglyphics(); syslog(0, "MysqlHieroglyphics: " . $sql); } $ret = $odb->execute($sql); if (0 == $ret) { die("err " . $sql); } print "Success:" . $sql; die("");
if ("Jiaguwen" == $db) { $sql = "SELECT * FROM Jiaguwen WHERE jid='{$keyval}'"; 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();