Esempio n. 1
0
    $ann = getSetting('currentprintannotation');
}
if ($ann == '') {
    $ann = 3;
}
$show_rom = $ann & 2;
$show_trans = $ann & 1;
$show_tags = $ann & 4;
$status = getreq('status');
if ($status == '') {
    $status = getSetting('currentprintstatus');
}
if ($status == '') {
    $status = 14;
}
$whstatus = ' and (' . makeStatusCondition('WoStatus', $status) . ') ';
$annplcmnt = getreq('annplcmnt');
if ($annplcmnt == '') {
    $annplcmnt = getSetting('currentprintannotationplacement');
}
if ($annplcmnt == '') {
    $annplcmnt = 0;
}
$sql = 'select TxLgID, TxTitle from texts where TxID = ' . $textid;
$res = mysql_query($sql);
if ($res == FALSE) {
    die("Invalid Query: {$sql}");
}
$record = mysql_fetch_assoc($res);
$title = $record['TxTitle'];
$langid = $record['TxLgID'];
Esempio n. 2
0
require_once 'settings.inc.php';
require_once 'connect.inc.php';
require_once 'dbutils.inc.php';
require_once 'utilities.inc.php';
require_once 'simterms.inc.php';
$currentlang = validateLang(processDBParam("filterlang", 'currentlanguage', '', 0));
$currentsort = processDBParam("sort", 'currentwordsort', '1', 1);
$currentpage = processSessParam("page", "currentwordpage", '1', 1);
$currentquery = processSessParam("query", "currentwordquery", '', 0);
$currentstatus = processSessParam("status", "currentwordstatus", '', 0);
$currenttext = validateText(processSessParam("text", "currentwordtext", '', 0));
$currenttag1 = validateTag(processSessParam("tag1", "currentwordtag1", '', 0), $currentlang);
$currenttag2 = validateTag(processSessParam("tag2", "currentwordtag2", '', 0), $currentlang);
$currenttag12 = processSessParam("tag12", "currentwordtag12", '', 0);
$wh_lang = $currentlang != '' ? ' and WoLgID=' . $currentlang : '';
$wh_stat = $currentstatus != '' ? ' and ' . makeStatusCondition('WoStatus', $currentstatus) : '';
$wh_query = convert_string_to_sqlsyntax(str_replace("*", "%", mb_strtolower($currentquery, 'UTF-8')));
$wh_query = $currentquery != '' ? ' and (WoText like ' . $wh_query . ' or WoRomanization like ' . $wh_query . ' or WoTranslation like ' . $wh_query . ')' : '';
if ($currenttag1 == '' && $currenttag2 == '') {
    $wh_tag = '';
} else {
    if ($currenttag1 != '') {
        if ($currenttag1 == -1) {
            $wh_tag1 = "group_concat(WtTgID) IS NULL";
        } else {
            $wh_tag1 = "concat('/',group_concat(WtTgID separator '/'),'/') like '%/" . $currenttag1 . "/%'";
        }
    }
    if ($currenttag2 != '') {
        if ($currenttag2 == -1) {
            $wh_tag2 = "group_concat(WtTgID) IS NULL";