$wid = $_GET['id']; $sql = "select * from hangee_words where id={$wid}"; $res = mysql_query($sql, $dbconn); if (!$res) { die("query failed: {$sql} :" . mysql_error($dbconn)); } $row = mysql_fetch_array($res); $id = $row['id']; $page = $row['page']; $word = $row['word']; $sense = htmlspecialchars(stripslashes($row['sense'])); $dict = htmlspecialchars(stripslashes($row['dictionary'])); $xajax = new xajax(); $xajax->registerFunction("edit_word_record"); $xajax->processRequest(); hangee_popup_header("HanGEE: Word record edit"); $xajax->printJavascript("xajax"); ?> <script language="javascript" type="text/javascript"> <!--// function strpos(haystack, needle, offset) { var i = (haystack+'').indexOf(needle, (offset || 0)); return i == -1 ? false : i; } function close_and_reload_parent(ch) { if (typeof(window.opener.reload_parent) == 'function')
////////////////////////////////////////////////////////////////////////////////////////// function search_dict($form) { $key = trim($form['key']); if (empty($key)) { return; } $response = new xajaxResponse(); $togo = "dict.php?word={$key}"; $response->script("document.location.href='{$togo}'"); return $response; } $xajax = new xajax(); $xajax->registerFunction("search_dict"); $xajax->processRequest(); hangee_popup_header("HanGEE: Dictionary"); $xajax->printJavascript("xajax"); $word = strtolower($word); $gmp3 = "http://www.gstatic.com/dictionary/static/sounds/de/0/{$word}.mp3"; ?> <div id='hidden_player'> <embed id='gsay_player' src='<?php echo $gmp3; ?> ' type='application/x-mplayer2' autostart='false' loop='false' volume='100' hidden='true' enablejavascript='true' /> </div> <!--// Keyboard shortcut code is from http://www.openjs.com/scripts/events/keyboard_shortcuts/ //--> <script language='javascript' type='text/javascript' src='js/shortcut.js'></script>