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
/
reference.php,v
< prev
next >
Wrap
Text File
|
2003-10-26
|
9KB
|
530 lines
head 1.10;
access;
symbols
Initial:1.1.1.1 bule:1.1.1;
locks; strict;
comment @# @;
1.10
date 2003.10.26.01.53.10; author bule; state Exp;
branches;
next 1.9;
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.17.00.39.36; author bule; state Exp;
branches;
next 1.6;
1.6
date 2003.10.06.00.39.27; author bule; state Exp;
branches;
next 1.5;
1.5
date 2003.09.11.05.28.22; author bule; state Exp;
branches;
next 1.4;
1.4
date 2003.09.05.06.42.30; author bule; state Exp;
branches;
next 1.3;
1.3
date 2003.09.04.07.27.00; 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.10
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: reference.php
// Author(s): John L. Whiteman
// Created: June 23, 2003
// Modified: October 20, 2003
// Description: The purpose of this unrestricted access PHP web
// client page is to provide a reference for the
// the Indonesian language.
//
// 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();
$indonesia = new Indonesia();
$status = $indonesia->get_dictionary_status();
if (
($status["status"] == 1) ||
($status["status"] == 2) ||
($status["status"] == 3)) {
$web->redirect("offline.php");
exit;
}
?>
<html>
<head>
<title>Bahasa Indonesia Dictionary: Reference</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="bahasa.css" rel="stylesheet" type="text/css">
</head>
<body>
<?
$web->show_logo("Reference");
?>
<a class="menu" href="search.php">Search Dictionary</a>
|
<a class="menu" href="email.php">Send Us E-mail</a>
|
<a class="menu" href="request.php">Request a New Word</a>
|
<a class="menu" href="admin.php">Administration</a>
<br><br>
<?
show_alphabet($web, $indonesia);
show_pronunciation($web, $indonesia);
show_parts_of_speech($web, $indonesia);
$web->show_footer();
?>
</body>
</html>
<?
//////////////////////////////////////////////////////////////////////////////
function show_alphabet($web, $indonesia) {
$alphabet = array();
$errstr = $indonesia->get_alphabet($alphabet);
if ($errstr != "") {
print "<br><hr><b>${errstr}</b><hr><br>\n";
return;
}
if (count($alphabet) == 0) {
return;
}
$new_form = "<td>Old (Before 1972):</b></td>";
$old_form = "<td>New:</td>";
foreach($alphabet as $letter) {
$new_letter = $web->tohtml($letter->new);
$old_letter = $web->tohtml($letter->old);
if ($old_letter != $new_letter) {
$new_form .= "<td><b>${new_letter}</b></td>\n";
$old_form .= "<td><b>${old_letter}</b></td>\n";
} else {
$new_form .= "<td>${new_letter}</td>\n";
$old_form .= "<td>${old_letter}</td>\n";
}
}
print <<<EOFSA
<h3><u>The Indonesian Alphabet</u></h3>
<table cellspacing="4" cellpadding="4" border="0">
<tr>
$new_form
</tr><tr>
$old_form
</tr>
</table>
EOFSA;
return;
}
//////////////////////////////////////////////////////////////////////////////
function show_parts_of_speech($web, $indonesia) {
$parts_of_speech = array();
$errstr = $indonesia->get_parts_of_speech($parts_of_speech);
if ($errstr != "") {
print "<br><hr><b>${errstr}</b><hr><br>\n";
return;
}
if (count($parts_of_speech) == 0) {
return;
}
$pos_html =
"<table cellpadding=\"3\" cellspacing=\"3\" border=\"0\">\n" .
"<tr>\n" .
"<th>Part of Speech</th>\n" .
"<th>Description</th>\n" .
"</tr>\n";
$total_pos = count($parts_of_speech);
for($i = 0; $i < $total_pos; $i++) {
$part_of_speech =
$web->tohtml($parts_of_speech[$i]["part_of_speech"]);
$description =
$web->tohtml($parts_of_speech[$i]["description"]);
$pos_html .=
"<tr>\n" .
"<td>${part_of_speech}:</td>\n" .
"<td>${description}</td>\n" .
"</tr>\n";
}
$pos_html .= "</table>\n";
print <<<EOFSPOS
<br>
<hr>
<h3><u>Parts of Speech</u></h3>
$pos_html
EOFSPOS;
return;
}
//////////////////////////////////////////////////////////////////////////////
function show_pronunciation($web, $indonesia) {
$pronunciations = array();
$errstr = $indonesia->get_pronunciations($pronunciations);
if ($errstr != "") {
print "<br><hr><b>${errstr}</b><hr><br>\n";
return;
}
if (count($pronunciations) == 0) {
return;
}
$pronunciation_html =
"<table cellpadding=\"3\" cellspacing=\"3\" border=\"0\">\n" .
"<tr>\n" .
"<th>Symbol</th>\n" .
"<th>Category</th>\n" .
"<th>Pronunciation</th>\n" .
"<th>IPA Pronunciation</th>\n" .
"<th>Description</th>\n" .
"</tr>\n";
$total_pronunciations = count($pronunciations);
for($i = 0; $i < $total_pronunciations; $i++) {
$symbol = $web->tohtml($pronunciations[$i]["symbol"]);
$category = $web->tohtml($pronunciations[$i]["category"]);
$pronunciation =
$web->tohtml($pronunciations[$i]["pronunciation"]);
$ipa = $web->tohtml($pronunciations[$i]["ipa"]);
$description = $web->tohtml($pronunciations[$i]["description"]);
$pronunciation_html .=
"<tr>\n" .
"<td>${symbol} </td>\n" .
"<td>${category} </td>\n" .
"<td>${pronunciation} </td>\n" .
"<td>${ipa};</td>\n" .
"<td>${description} </td>\n" .
"</tr>\n";
}
$pronunciation_html .= "</table>\n";
print <<<EOFSP
<br>
<hr>
<h3><u>Pronunciation</u></h3>
$pronunciation_html
EOFSP;
return;
}
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
?>
@
1.9
log
@*** empty log message ***
@
text
@d12 1
a12 1
// Modified: October 19, 2003
d68 1
a68 1
<a href="search.php">Search Dictionary</a>
d70 1
a70 1
<a href="email.php">Send Us E-mail</a>
d72 1
a72 1
<a href="request.php">Request a New Word</a>
d74 1
a74 1
<a href="admin.php">Administration</a>
@
1.8
log
@*** empty log message ***
@
text
@d12 1
a12 1
// Modified: October 17, 2003
d57 1
d59 3
@
1.7
log
@*** empty log message ***
@
text
@d12 1
a12 1
// Modified: October 15, 2003
d56 1
a56 3
<title>
Bahasa Indonesia Dictionary: Reference
</title>
@
1.6
log
@*** empty log message ***
@
text
@d12 1
a12 1
// Modified: October 05, 2003
d80 2
@
1.5
log
@*** empty log message ***
@
text
@d12 1
a12 1
// Modified: September 05, 2003
d62 3
a64 2
<h2>Bahasa Indonesia Dictionary: Reference</h2>
d104 1
a104 1
$new_form = "<td>New:</b></td>";
d106 1
a106 1
$old_form = "<td>Old:<br>(Before 1972)</td>";
@
1.4
log
@*** empty log message ***
@
text
@d12 1
a12 1
// Modified: September 04, 2003
d66 7
d218 1
a218 1
"<th>Comments</th>\n" .
d234 1
a234 1
$comments = $web->tohtml($pronunciations[$i]["comments"]);
d242 1
a242 1
"<td>${comments} </td>\n" .
@
1.3
log
@*** empty log message ***
@
text
@d12 1
a12 1
// Modified: September 03, 2003
d188 1
a188 1
$pronunciation = array();
d190 1
a190 1
$errstr = $indonesia->get_pronunciation($pronunciation);
d199 1
a199 1
if (count($pronunciation) == 0) {
d214 1
a214 1
foreach($pronunciation as $p) {
d216 1
a216 1
$symbol = $web->tohtml($p->symbol);
d218 1
a218 1
$category = $web->tohtml($p->category);
d220 1
a220 1
$non_ipa = $web->tohtml($p->non_ipa);
d222 2
a223 1
$ipa = $web->tohtml($p->ipa);
d225 3
a227 1
$comments = $web->tohtml($p->comments);
d233 1
a233 1
"<td>${non-ipa} </td>\n" .
@
1.2
log
@*** empty log message ***
@
text
@d12 1
a12 1
// Modified: August 19, 2003
d65 1
a65 1
<a href="search.php">Search</a>
d158 1
a158 1
foreach($parts_of_speech as $pos) {
d160 1
a160 1
$part_of_speech = $web->tohtml($pos->part_of_speech);
d162 5
a166 1
$description = $web->tohtml($pos->description);
@
1.1
log
@Initial revision
@
text
@d5 33
a37 1
@
1.1.1.1
log
@Bahasa Indonesia Dictionary
@
text
@@