Esempio n. 1
0
      ... markaction=[opcode] ... do actions on marked texts
      ... del=[textid] ... do delete
      ... unarch=[textid] ... do unarchive
      ... op=Change ... do update
      ... chg=[textid] ... display edit screen 
      ... filterlang=[langid] ... language filter 
      ... sort=[sortcode] ... sort 
      ... page=[pageno] ... page  
      ... query=[titlefilter] ... title filter   
Manage archived texts
***************************************************************/
include "connect.inc.php";
include "settings.inc.php";
include "utilities.inc.php";
$currentlang = validateLang(processDBParam("filterlang", 'currentlanguage', '', 0));
$currentsort = processDBParam("sort", 'currentarchivesort', '1', 1);
$currentpage = processSessParam("page", "currentarchivepage", '1', 1);
$currentquery = processSessParam("query", "currentarchivequery", '', 0);
$currenttag1 = validateArchTextTag(processSessParam("tag1", "currentarchivetexttag1", '', 0), $currentlang);
$currenttag2 = validateArchTextTag(processSessParam("tag2", "currentarchivetexttag2", '', 0), $currentlang);
$currenttag12 = processSessParam("tag12", "currentarchivetexttag12", '', 0);
$wh_lang = $currentlang != '' ? ' and AtLgID=' . $currentlang : '';
$wh_query = convert_string_to_sqlsyntax(str_replace("*", "%", mb_strtolower($currentquery, 'UTF-8')));
$wh_query = $currentquery != '' ? ' and AtTitle like ' . $wh_query : '';
if ($currenttag1 == '' && $currenttag2 == '') {
    $wh_tag = '';
} else {
    if ($currenttag1 != '') {
        if ($currenttag1 == -1) {
            $wh_tag1 = "group_concat(AgT2ID) IS NULL";
        } else {
Esempio n. 2
0
      ... page=[pageno] ... page  
      ... query=[termtextfilter] ... term text filter   
      ... status=[statuscode] ... status filter   
      ... text=[textid] ... text filter   
      ... tag1=[tagid] ... tag filter 1   
      ... tag2=[tagid] ... tag filter 2   
      ... tag12=0/1 ... tag1-tag2 OR=0, AND=1   
Manage terms
***************************************************************/
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 != '') {
Esempio n. 3
0
      ... markaction=[opcode] ... do actions on marked tags
      ... allaction=[opcode] ... do actions on all tags
      ... del=[wordid] ... do delete
      ... op=Save ... do insert new 
      ... op=Change ... do update
      ... new=1 ... display new tag screen 
      ... chg=[wordid] ... display edit screen 
      ... sort=[sortcode] ... sort 
      ... page=[pageno] ... page  
      ... query=[tagtextfilter] ... tag text filter    
Manage tags
***************************************************************/
include "connect.inc.php";
include "settings.inc.php";
include "utilities.inc.php";
$currentsort = processDBParam("sort", 'currenttagsort', '1', 1);
$currentpage = processSessParam("page", "currenttagpage", '1', 1);
$currentquery = processSessParam("query", "currenttagquery", '', 0);
$wh_query = convert_string_to_sqlsyntax(str_replace("*", "%", $currentquery));
$wh_query = $currentquery != '' ? ' and (TgText like ' . $wh_query . ' or TgComment like ' . $wh_query . ')' : '';
pagestart('My Term Tags', true);
$message = '';
// MARK ACTIONS
if (isset($_REQUEST['markaction'])) {
    $markaction = $_REQUEST['markaction'];
    $message = "Multiple Actions: 0";
    if (isset($_REQUEST['marked'])) {
        if (is_array($_REQUEST['marked'])) {
            $l = count($_REQUEST['marked']);
            if ($l > 0) {
                $list = "(" . $_REQUEST['marked'][0];
Esempio n. 4
0
function getPreviousAndNextTextLinks($textid, $url, $onlyann, $add)
{
    global $tbpref;
    $currentlang = validateLang(processDBParam("filterlang", 'currentlanguage', '', 0));
    $wh_lang = $currentlang != '' ? ' and TxLgID=' . $currentlang : '';
    $currentquery = processSessParam("query", "currenttextquery", '', 0);
    $wh_query = convert_string_to_sqlsyntax(str_replace("*", "%", mb_strtolower($currentquery, 'UTF-8')));
    $wh_query = $currentquery != '' ? ' and TxTitle like ' . $wh_query : '';
    $currenttag1 = validateTextTag(processSessParam("tag1", "currenttexttag1", '', 0), $currentlang);
    $currenttag2 = validateTextTag(processSessParam("tag2", "currenttexttag2", '', 0), $currentlang);
    $currenttag12 = processSessParam("tag12", "currenttexttag12", '', 0);
    if ($currenttag1 == '' && $currenttag2 == '') {
        $wh_tag = '';
    } else {
        if ($currenttag1 != '') {
            if ($currenttag1 == -1) {
                $wh_tag1 = "group_concat(TtT2ID) IS NULL";
            } else {
                $wh_tag1 = "concat('/',group_concat(TtT2ID separator '/'),'/') like '%/" . $currenttag1 . "/%'";
            }
        }
        if ($currenttag2 != '') {
            if ($currenttag2 == -1) {
                $wh_tag2 = "group_concat(TtT2ID) IS NULL";
            } else {
                $wh_tag2 = "concat('/',group_concat(TtT2ID separator '/'),'/') like '%/" . $currenttag2 . "/%'";
            }
        }
        if ($currenttag1 != '' && $currenttag2 == '') {
            $wh_tag = " having (" . $wh_tag1 . ') ';
        } elseif ($currenttag2 != '' && $currenttag1 == '') {
            $wh_tag = " having (" . $wh_tag2 . ') ';
        } else {
            $wh_tag = " having ((" . $wh_tag1 . ($currenttag12 ? ') AND (' : ') OR (') . $wh_tag2 . ')) ';
        }
    }
    $currentsort = processDBParam("sort", 'currenttextsort', '1', 1);
    $sorts = array('TxTitle', 'TxID desc', 'TxID');
    $lsorts = count($sorts);
    if ($currentsort < 1) {
        $currentsort = 1;
    }
    if ($currentsort > $lsorts) {
        $currentsort = $lsorts;
    }
    if ($onlyann) {
        $sql = 'select TxID from ((' . $tbpref . 'texts left JOIN ' . $tbpref . 'texttags ON TxID = TtTxID) left join ' . $tbpref . 'tags2 on T2ID = TtT2ID), ' . $tbpref . 'languages where LgID = TxLgID AND LENGTH(TxAnnotatedText) > 0 ' . $wh_lang . $wh_query . ' group by TxID ' . $wh_tag . ' order by ' . $sorts[$currentsort - 1];
    } else {
        $sql = 'select TxID from ((' . $tbpref . 'texts left JOIN ' . $tbpref . 'texttags ON TxID = TtTxID) left join ' . $tbpref . 'tags2 on T2ID = TtT2ID), ' . $tbpref . 'languages where LgID = TxLgID ' . $wh_lang . $wh_query . ' group by TxID ' . $wh_tag . ' order by ' . $sorts[$currentsort - 1];
    }
    $list = array(0);
    $res = do_mysql_query($sql);
    while ($record = mysql_fetch_assoc($res)) {
        array_push($list, $record['TxID'] + 0);
    }
    mysql_free_result($res);
    array_push($list, 0);
    $listlen = count($list);
    for ($i = 1; $i < $listlen - 1; $i++) {
        if ($list[$i] == $textid) {
            if ($list[$i - 1] !== 0) {
                $title = tohtml(getTextTitle($list[$i - 1]));
                $prev = '<a href="' . $url . $list[$i - 1] . '" target="_top"><img src="icn/navigation-180-button.png" title="Previous Text: ' . $title . '" alt="Previous Text: ' . $title . '" /></a>';
            } else {
                $prev = '<img src="icn/navigation-180-button-light.png" title="No Previous Text" alt="No Previous Text" />';
            }
            if ($list[$i + 1] !== 0) {
                $title = tohtml(getTextTitle($list[$i + 1]));
                $next = '<a href="' . $url . $list[$i + 1] . '" target="_top"><img src="icn/navigation-000-button.png" title="Next Text: ' . $title . '" alt="Next Text: ' . $title . '" /></a>';
            } else {
                $next = '<img src="icn/navigation-000-button-light.png" title="No Next Text" alt="No Next Text" />';
            }
            return $add . $prev . ' ' . $next;
        }
    }
    return $add . '<img src="icn/navigation-180-button-light.png" title="No Previous Text" alt="No Previous Text" /> <img src="icn/navigation-000-button-light.png" title="No Next Text" alt="No Next Text" />';
}