2013-01-24 16:42:34 +04:00
|
|
|
<?php
|
2013-04-13 00:45:24 +04:00
|
|
|
@define('CONST_ConnectionBucket_PageType', 'Status');
|
2013-01-24 16:42:34 +04:00
|
|
|
|
2013-04-13 00:45:24 +04:00
|
|
|
require_once(dirname(dirname(__FILE__)).'/lib/init-website.php');
|
2013-01-24 16:42:34 +04:00
|
|
|
|
2014-01-23 20:48:20 +04:00
|
|
|
function statusError($sMsg)
|
|
|
|
{
|
|
|
|
header("HTTP/1.0 500 Internal Server Error");
|
|
|
|
echo "ERROR: ".$sMsg;
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2013-04-13 00:45:24 +04:00
|
|
|
$oDB =& getDB();
|
2013-01-24 16:42:34 +04:00
|
|
|
if (!$oDB || PEAR::isError($oDB))
|
|
|
|
{
|
2014-01-23 20:48:20 +04:00
|
|
|
statusError("No database");
|
2013-01-24 16:42:34 +04:00
|
|
|
}
|
|
|
|
|
2014-01-23 20:06:43 +04:00
|
|
|
$sStandardWord = $oDB->getOne("select make_standard_name('a')");
|
|
|
|
if (PEAR::isError($sStandardWord))
|
|
|
|
{
|
2014-01-23 20:48:20 +04:00
|
|
|
statusError("Module failed");
|
2014-01-23 20:06:43 +04:00
|
|
|
}
|
|
|
|
if ($sStandardWord != 'a')
|
|
|
|
{
|
2014-01-23 20:48:20 +04:00
|
|
|
statusError("Module call failed");
|
2014-01-23 20:06:43 +04:00
|
|
|
}
|
|
|
|
|
2013-04-10 21:50:38 +04:00
|
|
|
$iWordID = $oDB->getOne("select word_id,word_token, word, class, type, country_code, operator, search_name_count from word where word_token in (' a')");
|
2013-01-24 16:42:34 +04:00
|
|
|
if (PEAR::isError($iWordID))
|
|
|
|
{
|
2014-01-23 20:48:20 +04:00
|
|
|
statusError("Query failed");
|
2013-01-24 16:42:34 +04:00
|
|
|
}
|
|
|
|
if (!$iWordID)
|
|
|
|
{
|
2014-01-23 20:48:20 +04:00
|
|
|
statusError("No value");
|
2013-01-24 16:42:34 +04:00
|
|
|
}
|
2014-01-23 20:48:20 +04:00
|
|
|
|
2013-01-24 16:42:34 +04:00
|
|
|
echo "OK";
|
|
|
|
exit;
|
|
|
|
|