Ejemplo n.º 1
0
Call: edit_archivedtexts.php?....
      ... 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";
Ejemplo n.º 2
0
function getSetting($key)
{
    global $tbpref;
    $val = get_first_value('select StValue as value from ' . $tbpref . 'settings where StKey = ' . convert_string_to_sqlsyntax($key));
    if (isset($val)) {
        $val = trim($val);
        if ($key == 'currentlanguage') {
            $val = validateLang($val);
        }
        if ($key == 'currenttext') {
            $val = validateText($val);
        }
        return $val;
    } else {
        return '';
    }
}