Ejemplo n.º 1
0
         while (list($sid, $aid, $title, $time, $url, $topic, $informant, $ihome) = sql_fetch_row($result)) {
             if (ctrl_aff($ihome, 0)) {
                 $tab_sid[$x]['sid'] = $sid;
                 $tab_sid[$x]['aid'] = $aid;
                 $tab_sid[$x]['title'] = $title;
                 $tab_sid[$x]['time'] = $time;
                 $tab_sid[$x]['url'] = $url;
                 $tab_sid[$x]['topic'] = $topic;
                 $tab_sid[$x]['informant'] = $informant;
                 $x++;
             }
         }
     }
 }
 if ($SuperCache) {
     $cache_obj->endCachingObjet($cache_clef, $tab_sid);
 }
 echo '
   <table id ="search_result" data-toggle="table" data-striped="true" data-mobile-responsive="true" data-icons-prefix="fa" data-icons="icons">
      <thead>
         <tr>
            <th data-sortable="true">' . translate("Results") . '</th>
         </tr>
      </thead>
      <tbody>';
 if ($x < $offset) {
     $increment = $x;
 }
 if ($min + $offset <= $x) {
     $increment = $offset;
 }
Ejemplo n.º 2
0
function charg_metalang()
{
    global $SuperCache, $CACHE_TIMINGS, $REQUEST_URI;
    global $NPDS_Prefix;
    if ($SuperCache) {
        $racine = parse_url(basename($REQUEST_URI));
        $cache_clef = "[metalang]==>" . $racine['path'] . ".common";
        $CACHE_TIMINGS[$cache_clef] = 86400;
        $cache_obj = new cacheManager();
        $glossaire = $cache_obj->startCachingObjet($cache_clef);
    } else {
        $cache_obj = new SuperCacheEmpty();
    }
    if ($cache_obj->genereting_output == 1 or $cache_obj->genereting_output == -1 or !$SuperCache) {
        $result = sql_query("SELECT def, content, type_meta, type_uri, uri FROM " . $NPDS_Prefix . "metalang WHERE type_meta='mot' OR type_meta='meta' OR type_meta='smil'");
        while (list($def, $content, $type_meta, $type_uri, $uri) = sql_fetch_row($result)) {
            // la syntaxe est presque la même que pour les blocs (on n'utilise que la racine de l'URI)
            // si type_uri="-" / uri site les URIs où les meta-mot NE seront PAS actifs (tous sauf ...)
            // si type_uri="+" / uri site les URI où les meta-mot seront actifs (seulement ...)
            // Le séparateur entre les URI est l'ESPACE
            // => Exemples : index.php user.php forum.php static.php
            if ($uri != "") {
                $match = match_uri($racine['path'], $uri);
                if ($match and $type_uri == "+" or !$match and $type_uri == "-") {
                    $glossaire[$def]['content'] = $content;
                    $glossaire[$def]['type'] = $type_meta;
                }
            } else {
                $glossaire[$def]['content'] = $content;
                $glossaire[$def]['type'] = $type_meta;
            }
        }
    }
    if ($SuperCache) {
        $cache_obj->endCachingObjet($cache_clef, $glossaire);
    }
    return $glossaire;
}