home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.ee.pdx.edu
/
2014.02.ftp.ee.pdx.edu.tar
/
ftp.ee.pdx.edu
/
oss
/
cvs-2004
/
bahasa
/
web
/
update.php,v
< prev
next >
Wrap
Text File
|
2003-10-20
|
24KB
|
1,235 lines
head 1.9;
access;
symbols
Initial:1.1.1.1 bule:1.1.1;
locks; strict;
comment @# @;
1.9
date 2003.10.20.00.21.46; author bule; state Exp;
branches;
next 1.8;
1.8
date 2003.10.18.00.33.42; author bule; state Exp;
branches;
next 1.7;
1.7
date 2003.10.06.00.39.27; author bule; state Exp;
branches;
next 1.6;
1.6
date 2003.10.01.06.51.30; author bule; state Exp;
branches;
next 1.5;
1.5
date 2003.09.04.07.27.00; author bule; state Exp;
branches;
next 1.4;
1.4
date 2003.09.03.07.11.10; author bule; state Exp;
branches;
next 1.3;
1.3
date 2003.08.31.18.48.47; author bule; state Exp;
branches;
next 1.2;
1.2
date 2003.08.19.19.24.21; author bule; state Exp;
branches;
next 1.1;
1.1
date 2003.08.12.19.18.23; author bule; state Exp;
branches
1.1.1.1;
next ;
1.1.1.1
date 2003.08.12.19.18.23; author bule; state Exp;
branches;
next ;
desc
@@
1.9
log
@*** empty log message ***
@
text
@<?
session_start();
require_once("../php/Indonesia.php");
require_once("../php/Web.php");
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
// Project Name: Bahasa Indonesia Dictionary
// Directory: bahasa/web
// File Name: update.php
// Author(s): John L. Whiteman
// Created: June 23, 2003
// Modified: October 19, 2003
// Description: The purpose of this restricted access PHP web
// client page is to allow an administrator to update
// an existing entry in the dictionary table of the
// the database.
//
// Copyright (c) 2003 John L. Whiteman
//
// Permission is herby granted, free of charge, to any person obtaining a
// copy of this software, data, and associated documentation files
// (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHERE IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING IN THE SOFTWARE.
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
$web = new Web();
if (!$_SESSION['ADMIN']) {
$web->redirect("login.php");
exit;
}
$indonesia = new Indonesia();
$status = $indonesia->get_dictionary_status();
if ($status["status"] == 1 || $status["status"] == 2) {
$web->redirect("admin.php");
exit;
}
?>
<html>
<head>
<title>Bahasa Indonesia Dictionary: Update Word(s)</title>
<link href="bahasa.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="bahasa.js"></script>
<script language="Javascript" type="text/javascript">
<!--
//////////////////////////////////////////////////////////////////////////////
function verify_search() {
stoken = document.search.stoken.value;
stoken = trim(stoken);
if (is_white_space(stoken)) {
alert("You need to specify a search word value!");
document.search.stoken.focus();
return(false);
}
if (stoken.length > 255) {
alert(
"You need to specify a search word 1 to 255 characters " +
"in length!");
document.search.stoken.focus();
return(false);
}
return(true);
}
//////////////////////////////////////////////////////////////////////////////
function verify_update() {
english = document.update.english.value;
english = trim(english);
if (is_white_space(english)) {
alert(
"You must enter an English value!");
document.update.english.focus();
return(false);
}
if (english.length > 255) {
alert(
"The English value must be 255 characters or less!");
document.update.english.focus();
return(false);
}
indonesian = document.update.indonesian.value;
indonesian = trim(indonesian);
if (is_white_space(indonesian)) {
alert(
"You must enter an Indonesian value!");
document.update.indonesian.focus();
return(false);
}
if (indonesian.length > 255) {
alert(
"The Indonesian value must be 255 characters or less!");
document.update.indonesian.focus();
return(false);
}
if (document.update.pos.value == "") {
alert(
"You must select a Part of Speech Category!");
document.update.pos.focus();
return(false);
}
pronunciation = document.update.pronunciation.value;
if (pronunciation.length > 255) {
alert(
"The Pronunciation value must be 255 characters or less!");
document.update.pronunciation.focus();
return(false);
}
ipa = document.update.pronunciation_ipa.value;
if (ipa.length > 255) {
alert(
"The International Phonetic Alphabet (IPA) value " +
"must be 255 characters or less!");
document.update.pronunciation_ipa.focus();
return(false);
}
password = document.update.password.value;
if (is_white_space(password)) {
alert(
"You must enter a password value!");
document.update.password.focus();
return(false);
}
return(true);
}
//////////////////////////////////////////////////////////////////////////////
// -->
</script>
</head>
<body>
<?
$web->show_logo("Update Word(s)");
?>
<a href="admin.php">Administration</a>
|
<a href="editor.php">Search</a>
<?
show_search_form($web, $indonesia);
if (
($_SESSION['NODUP_UPDATES']) &&
(isset($_POST['id'])) &&
(isset($_POST['update_entry'])) &&
($_SESSION['NODUP_UPDATES'] == $_POST['id'])) {
//Do nothing...prevents refresh duplication of last action
} else if (isset($_POST['stoken'])) {
search_all($web, $indonesia, $_POST['stoken']);
} else if (
(isset($_POST['password'])) &&
(isset($_POST['pkey'])) &&
(isset($_POST['english'])) &&
(isset($_POST['indonesian'])) &&
(isset($_POST['pos'])) &&
(isset($_POST['id'])) &&
(isset($_POST['spelling_flag'])) &&
(isset($_POST['update_entry']))) {
if ($_SESSION['NODUP_UPDATES']) {
unset($_SESSION['NODUP_UPDATES']);
}
$errstr = $indonesia->login($_SESSION['ADMIN'], $_POST['password']);
if ($errstr != "") {
print
"<br><hr><b>Permission denied!</b><hr><br>\n";
} else {
$rc =
update(
$web, $indonesia, $_POST['pkey'],
$_POST['english'], $_POST['indonesian'],
$_POST['pos'], $_POST['spelling_flag'],
$_POST['pronunciation'], $_POST['pronunciation_ipa'],
$_POST['comments']);
if (!$rc) {
$_SESSION['NODUP_UPDATES'] = $_POST['id'];
}
}
} else if (isset($_POST['pkey'])) {
show_update_form($web, $indonesia, $_POST['pkey']);
}
?>
</body>
</html>
<?
///////////////////////////////////////////////////////////////////////////////
function search_all($web, $indonesia, $stoken) {
$results = array();
$stoken = $web->strip($stoken);
if ($stoken == "") {
print
"<hr><b>You must specify a search value!" .
"</b><hr><br>\n" .
"<script language=\"Javascript\" type=\"text/javascript\">\n" .
"document.search.stoken.focus();\n" .
"</script>\n";
return;
}
$errstr = $indonesia->search_all($results, $stoken);
if ($errstr != "") {
print "<hr><b>${errstr}</b><hr><br>\n";
return;
}
$total_results = count($results);
print
"<hr><b>Found ${total_results} match(es) for search entry: " .
"'${stoken}'</b>" .
"<hr>\n";
if ($total_results == 0) {
return;
}
$results_str = "";
$pkeys = "";
$results_str .=
"<form name=\"delete_entries\" method=\"post\" " .
"onSubmit='return verify_delete_selected()'>\n" .
"<table cellpadding=\"3\" cellspacing=\"3\" border=\"1\">\n";
for($i = 0; $i < $total_results; $i++) {
if ($i == 0) {
$results_str .=
"<tr>\n" .
"<th>PKEY</th>\n" .
"<th>Language</th>\n" .
"<th>English</th>\n" .
"<th>Indonesian</th>\n" .
"<th>Part of Speech</th>\n" .
"<th>Pronunciation</th>\n" .
"<th>IPA</th>\n" .
"<th>Comments</th>\n" .
"<th>Created</th>\n" .
"<th>Modified</th>\n" .
"<th>Action</th>\n" .
"</tr>\n";
}
$pkey = $web->tohtml($results[$i]["pkey"]);
$language = $web->tohtml($results[$i]["language"]);
$english = $web->tohtml($results[$i]["english"]);
$indonesian = $web->tohtml($results[$i]["indonesian"]);
$pos = $web->tohtml($results[$i]["pos"]);
$pronunciation = $web->tohtml($results[$i]["pronunciation"]);
$ipa = $web->tohtml($results[$i]["ipa"]);
$comments = $web->tohtml($results[$i]["comments"]);
$created = $web->tohtml($results[$i]["created"]);
$modified = $web->tohtml($results[$i]["modified"]);
$pkeys .=
"<input type=\"hidden\" name=\"${pkey}\" " .
"value=\"delete_entry\">\n";
$results_str .=
"<tr>\n" .
"<td>${pkey} </td>\n" .
"<td>${language} </td>\n" .
"<td>${english} </td>\n" .
"<td>${indonesian} </td>\n" .
"<td>${pos} </td>\n" .
"<td>${pronunciation} </td>\n" .
"<td>${ipa} </td>\n" .
"<td>${comments} </td>\n" .
"<td>${created} </td>\n" .
"<td>${modified} </td>\n" .
"<td>\n" .
"<form name=\"update_entry\" method=\"post\">\n" .
"<input type=\"submit\" value=\"Update!\">\n" .
"<input type=\"hidden\" name=\"pkey\" \n" .
"value=\"${pkey}\">\n" .
"</form>\n" .
"</td>\n" .
"</tr>\n";
}
$results_str .= "</table></form>\n";
print $results_str;
return;
}
///////////////////////////////////////////////////////////////////////////////
function show_search_form($web, $indonesia) {
print <<<EOFSSF
<form name="search" method="post" onSubmit='return verify_search()'>
<table cellpadding="3" cellspacing="3" border="0">
<tr>
<td>Enter search entry to update:</td>
<td>
<input type="text" name="stoken" maxlength="255" size="30">
</td>
</tr><tr>
<td colspan="2" align="right">
<input type="submit" value="Search Dictionary!">
</td>
</tr>
</table>
</form>
<script language="Javascript" type="text/javascript">
document.search.stoken.focus();
</script>
EOFSSF;
return;
}
///////////////////////////////////////////////////////////////////////////////
function show_update_form($web, $indonesia, $spkey) {
$results = array();
$id = uniqid(rand(), true);
$spkey = $web->strip($spkey);
if ($spkey == "") {
print
"<hr><b>No primary key specified!" .
"</b><hr><br>\n" .
"<script language=\"Javascript\" type=\"text/javascript\">\n" .
"document.search.stoken.focus();\n" .
"</script>\n";
return;
}
$errstr = $indonesia->search_pkey($results, $spkey);
if ($errstr != "") {
print "<hr><b>${errstr}</b><hr><br>\n";
return;
}
$total_results = count($results);
if ($total_results != 1) {
print
"<hr><b>Primary key $pkey not found!</b><hr><br>\n";
return;
}
$pkey = $web->tohtml($results[0]["pkey"]);
$english = $web->tohtml($results[0]["english"]);
$indonesian = $web->tohtml($results[0]["indonesian"]);
$pos = $web->tohtml($results[0]["part_of_speech"]);
$created = $web->tohtml($results[0]["created"]);
$modified = $web->tohtml($results[0]["modified"]);
$spelling_flag = $web->tohtml($results[0]["spelling_flag"]);
$pronunciation = $web->tohtml($results[0]["pronunciation"]);
$pronunciation_ipa = $web->tohtml($results[0]["pronunciation_ipa"]);
$comments = $web->tohtml($results[0]["comments"]);
$spelling_html = "";
if ($spelling_flag == 0) {
$spelling_html =
"<input type=\"radio\" name=\"spelling_flag\" value=\"1\">" .
"Before 1972" .
" " .
"<input type=\"radio\" name=\"spelling_flag\" value=\"0\" " .
"checked>Modern\n";
} else {
$spelling_html =
"<input type=\"radio\" name=\"spelling_flag\" value=\"1\" " .
"checked>Before 1972" .
" " .
"<input type=\"radio\" name=\"spelling_flag\" value=\"0\">" .
"Modern\n";
}
$parts_of_speech = array();
$errstr = $indonesia->get_parts_of_speech($parts_of_speech);
if ($errstr != "") {
return(
"Can't get parts of speech categories.");
}
$pos_total = count($parts_of_speech);
$pos_html =
"<select name=\"pos\">\n";
for($i = 0; $i < $pos_total; $i++) {
$pos_pkey = $web->tohtml($parts_of_speech[$i]["pkey"]);
$pos_pos = $web->tohtml($parts_of_speech[$i]["part_of_speech"]);
if ($pos_pkey != $pos) {
$pos_html .=
"<option value=\"${pos_pkey}\">${pos_pos}\n";
} else {
$pos_html .=
"<option value=\"${pos_pkey}\" selected>${pos_pos}\n";
}
}
$pos_html .= "</select>\n";
print <<<EOFSUF
<hr>
<form name="update" method="post" onsubmit='return verify_update()'>
<table cellpadding="3" cellspacing="5" border="0">
<tr>
<td>English (1 to 255 characters):</td>
</tr><tr>
<td>
<input type="text" name="english" value="${english}"
maxlength="255" size="50">
</td>
</tr><tr>
<td><hr></td>
</tr><tr>
<td>Indonesian (1 to 255 characters):</td>
</tr><tr>
<td>
<input type="text" name="indonesian" value="${indonesian}"
maxlength="255" size="50">
</td>
</tr><tr>
<td><hr></td>
</tr><tr>
<td>Spelling Convention:</td>
</tr><tr>
<td>${spelling_html}</td>
</tr><tr>
<td><hr></td>
</tr><tr>
<td>Part of Speech:</td>
</tr><tr>
<td>
${pos_html}
</td>
</tr><tr>
<td><hr></td>
</tr><tr>
<td>Pronunciation (1 to 255 characters):</td>
</tr><tr>
<td>
<input type="text" name="pronunciation" value="${pronunciation}"
maxlength="255" size="50">
</td>
</tr><tr>
<td><hr></td>
</tr><tr>
<td>International Phonetic Alphabet (1 to 255 characters):</td>
</tr><tr>
<td>
<input type="text" name="pronunciation_ipa" value="${pronunciation_ipa}"
maxlength="255" size="50">
</td>
</tr><tr>
<td><hr></td>
</tr><tr>
<td>Comments:</td>
</tr><tr>
<td>
<textarea name="comments" wrap="soft"
rows="5" cols="55">${comments}</textarea>
</td>
</tr><tr>
<td><hr></td>
</tr><tr>
<td>Password:</td>
</tr><tr>
<td>
<input type="password" name="password" size="50">
</td>
</tr><tr>
<td><hr></td>
</tr><tr>
<td align="right">
<input type="reset" value="Reset Form">
<input type="submit" value="Update Entry!">
</td></tr>
</table>
<input type="hidden" name="pkey" value="${pkey}">
<input type="hidden" name="update_entry" value="1">
<input type="hidden" name="id" value="${id}">
</form>
<script language="Javascript" type="text/javascript">
document.update.english.focus();
</script>
EOFSUF;
return("");
}
///////////////////////////////////////////////////////////////////////////////
function update($web, $indonesia, $pkey,
$english, $indonesian, $pos, $spelling_flag,
$pronunciation, $pronunciation_ip, $comments) {
$errstr =
$indonesia->update_entry($pkey,
$english, $indonesian, $spelling_flag,
$pos, $pronunciation,
$pronunciation_ipa, $comments);
if ($errstr != "") {
print "<hr><b>${errstr}</b><hr>\n";
return(1);
}
print "<hr><b>Successful Update!</b><hr>\n";
return(0);
}
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
?>
@
1.8
log
@*** empty log message ***
@
text
@d12 1
a12 1
// Modified: October 17, 2003
d64 2
@
1.7
log
@*** empty log message ***
@
text
@d12 1
a12 1
// Modified: October 05, 2003
d65 2
d68 1
a68 25
//////////////////////////////////////////////////////////////////////////////
function is_white_space(stoken) {
if (stoken == null) return(true);
if (stoken == '') return(true);
if (stoken == "") return(true);
return(false);
}
//////////////////////////////////////////////////////////////////////////////
function trim(stoken) {
if (is_white_space(stoken)) {
return(stoken);
}
stoken = stoken.replace(/^\s*/, "");
stoken = stoken.replace(/\s*$/, "");
return(stoken);
}
d198 2
@
1.6
log
@*** empty log message ***
@
text
@d12 1
a12 1
// Modified: September 30, 2003
d223 3
a225 1
<h2>Bahasa Indonesia Dictionary: Update Word(s)</h2>
@
1.5
log
@*** empty log message ***
@
text
@d12 1
a12 1
// Modified: September 03, 2003
d42 1
a42 1
if (!session_is_registered("ADMIN")) {
d234 1
a234 1
(session_is_registered("NODUP_UPDATES")) &&
d255 1
a255 1
if (session_is_registered("NODUP_UPDATES")) {
d257 1
a257 1
session_unregister("NODUP_UPDATES");
d279 1
a279 3
$NODUP_UPDATES = $_POST['id'];
session_register("NODUP_UPDATES");
@
1.4
log
@*** empty log message ***
@
text
@d12 1
a12 1
// Modified: September 02, 2003
d255 5
d515 2
d520 1
a520 1
foreach($parts_of_speech as $p) {
d522 1
a522 1
if ($p->pkey != $pos) {
d524 6
a529 2
$pos_html .=
"<option value=\"$p->pkey\">$p->part_of_speech\n";
d534 1
a534 2
"<option value=\"$p->pkey\" " .
"selected>$p->part_of_speech\n";
@
1.3
log
@*** empty log message ***
@
text
@d12 1
a12 1
// Modified: August 31, 2003
a48 9
if (session_is_registered("NODUP_UPDATE_ENTRY")) {
session_unregister("NODUP_UPDATE_ENTRY");
$web->redirect("admin.php");
exit;
}
d63 1
a63 1
<title>Bahasa Indonesia Dictionary: Update Entry</title>
d94 1
a94 1
stoken = document.update.stoken.value;
d100 12
a111 1
alert("You must enter a search word(s) value!");
d113 1
a113 1
document.update.stoken.focus();
d193 1
a193 1
ipa = document.update.ipa.value;
d201 1
a201 1
document.update.ipa.focus();
d223 1
a223 1
<h2>Bahasa Indonesia Dictionary: Update Entry</h2>
d226 2
d231 2
d234 12
d250 2
a251 1
(isset($_POST['pos'])) &&
d253 1
a253 1
(isset($_POST['update_entry']))) {
d259 1
a259 1
print
d264 1
a264 1
$rc =
d270 1
a270 1
$_POST['comments']);
d274 1
a274 1
$NODUP_UPDATE_ENTRY = 1;
d276 1
a276 1
session_register("NODUP_UPDATE_ENTRY");
d282 1
a282 1
$errstr =
a283 23
if ($errstr != "") {
show_search_form();
print
"<br><hr><b>${errstr}</b><hr><br>";
}
} else if (
(isset($_POST['stoken'])) &&
(isset($_POST['method'])) &&
(isset($_POST['language']))) {
show_search_form();
search(
$web, $indonesia,
$_POST['stoken'], $_POST['method'], $_POST['language']);
} else {
show_search_form();
d292 1
a292 2
///////////////////////////////////////////////////////////////////////////////
function search($web, $indonesia, $stoken, $method, $language) {
d294 3
a296 1
$stoken = trim($stoken);
d300 6
a305 1
print "You must enter a search value.";
d308 1
a308 1
}
d310 1
a310 1
$method = trim($method);
d312 1
a312 1
if ($method == "") {
d314 1
a314 1
print "You must choose a search method.";
d319 1
a319 1
$language = trim($language);
d321 4
a324 16
if ($method == "exact") {
search_exact($web, $indonesia, $stoken, $language);
} else if ($method == "fuzzy") {
print "This feature has not been implemented yet.";
}
return;
}
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
function search_exact($web, $indonesia, $stoken, $language) {
$results = array();
d326 1
a326 10
$language = strtolower($language);
$sql =
"SELECT * FROM dictionary WHERE ${language}=\"$stoken\"";
$errstr = $indonesia->search($sql, $results);
if ($errstr != "") {
print "$errstr";
d331 1
a331 3
$matches = count($results);
if (!$matches) {
d333 1
a333 2
print
"<hr><b>Found ${matches} matches!</b><hr><br>";
d335 4
a338 11
return;
}
print
"<hr><b>Found ${matches} exact " .
"matches for ${language} word(s) ${stoken}!</b><hr>\n";
print
"<hr>" .
"<table cellpadding=\"3\" cellspacing=\"3\" border=\"1\" " .
"width=\"50%\">\n";
d340 1
a340 1
for($i = 0; $i < $matches; $i++) {
d344 1
a344 1
print
d347 1
a350 3
"<th>Created</th>\n" .
"<th>Modified</th>\n" .
"<th>Spelling Flag</th>\n" .
d354 2
d358 1
a358 1
}
d360 14
a373 10
$pkey = $web->tohtml($results[$i]->pkey);
$eng = $web->tohtml($results[$i]->english);
$indo = $web->tohtml($results[$i]->indonesian);
$pos = $web->tohtml($results[$i]->part_of_speech);
$created = $web->tohtml($results[$i]->created);
$modified = $web->tohtml($results[$i]->modified);
$spelling_flag = $web->tohtml($results[$i]->spelling_flag);
$p = $web->tohtml($results[$i]->pronunciation);
$pipa = $web->tohtml($results[$i]->pronunciation_ipa);
$comments = $web->tohtml($results[$i]->comments);
d375 1
a375 1
print
d378 3
a380 2
"<td>${eng} </td>\n" .
"<td>${indo} </td>\n" .
d382 3
a386 4
"<td>${spelling_flag} </td>\n" .
"<td>${p} </td>\n" .
"<td>${pipa} </td>\n" .
"<td>${comments} </td>\n" .
d388 1
a388 1
"<form name=\"update\" method=\"post\">\n" .
d390 4
a393 3
"<input type=\"hidden\" name=\"pkey\" " .
"value=\"${pkey}\"> " .
"</form></td>\n" .
d395 3
a397 1
}
d399 1
a399 1
print "</table><hr>\n";
d402 1
a402 2
}
///////////////////////////////////////////////////////////////////////////////
d404 1
a404 1
function show_search_form() {
d407 1
a407 1
<form name="update" method="post" onsubmit='return verify_search()'>
d410 1
a410 10
<td colspan="2">Enter Search Word(s) to UPDATE:
</td>
</tr><tr>
<td colspan="2">
<textarea name="stoken" rows="5" cols="50" wrap="soft"></textarea>
</td>
</tr><tr>
<td>
<input type="radio" name="method" value="exact" checked>
</td>
d412 1
a412 1
Search dictionary for exact matches only
d415 2
a416 13
<td>
<input type="radio" name="method" value="fuzzy">
</td>
<td>
Search dictionary for exact and/or close matches
</td>
</tr><tr>
<td colspan="2"></td>
</tr><tr>
<td align="right" colspan="2">
<input type="submit" name="language" value="English">
<input type="submit" name="language" value="Indonesian">
d422 2
a423 2
document.update.stoken.focus();
</script>
d429 1
a429 2
///////////////////////////////////////////////////////////////////////////////
function show_update_form($web, $indonesia, $pkey) {
d433 3
a435 1
$pkey = addslashes($pkey);
d437 1
a437 2
$sql =
"SELECT * FROM dictionary WHERE pkey=\"${pkey}\"";
d439 11
a449 1
$errstr = $indonesia->search($sql, $results);
d453 3
a455 1
return("$errstr");
d458 3
a460 1
$matches = count($results);
d462 2
a463 1
if ($matches != 1) {
d465 1
a465 2
return(
"Found ${matches} matches! Should be 1 only.");
d468 10
a477 10
$pkey = $web->tohtml($results[0]->pkey);
$english = $web->tohtml($results[0]->english);
$indonesian = $web->tohtml($results[0]->indonesian);
$pos = $web->tohtml($results[0]->part_of_speech);
$created = $web->tohtml($results[0]->created);
$modified = $web->tohtml($results[0]->modified);
$spelling_flag = $web->tohtml($results[0]->spelling_flag);
$pronunciation = $web->tohtml($results[0]->pronunciation);
$pronunciation_ipa = $web->tohtml($results[0]->pronunciation_ipa);
$comments = $web->tohtml($results[0]->comments);
d531 1
d536 1
a536 1
<td>English (255 characters maximum):</td>
d539 2
a540 2
<textarea name="english" wrap="soft" rows="2"
cols="55">${english}</textarea>
d547 1
a547 1
<td>Indonesian (255 characters maximum):</td>
d550 2
a551 2
<textarea name="indonesian" wrap="soft" rows="2"
cols="55">${indonesian}</textarea>
d576 1
a576 1
<td>Pronunciation (255 characters maximum):</td>
d579 2
a580 2
<textarea name="pronunciation" wrap="soft"
rows="2" cols="55">${pronunciation}</textarea>
d587 1
a587 1
<td>International Phonetic Alphabet (255 characters maximum):</td>
d590 2
a591 2
<textarea name="ipa" wrap="soft"
rows="2" cols="55">$pronunciation_ipa</textarea>
d612 1
a612 1
<input type="password" name="password">
d627 1
d649 1
a649 1
print "<br><hr><b>${errstr}</b><hr><br>\n";
d655 1
a655 1
print "<br><hr><b>Successful Update!</b><hr><br>\n";
d662 1
@
1.2
log
@*** empty log message ***
@
text
@d12 1
a12 1
// Modified: August 19, 2003
a223 1
<br><br>
d354 2
a355 1
print "<h3>Found ${matches} matches!</h3>";
d361 2
a362 2
"<h3>Found ${matches} exact " .
"matches for ${language} word(s) ${stoken}!</h3>\n";
d383 1
a383 1
"<th>IPA Pronunciation</th>\n" .
@
1.1
log
@Initial revision
@
text
@d5 34
a688 1
@
1.1.1.1
log
@Bahasa Indonesia Dictionary
@
text
@@