Changeset 13260 in spip-zone


Ignore:
Timestamp:
Jul 3, 2007, 2:13:19 PM (14 years ago)
Author:
cedric@…
Message:

"un bouton pour vider le cache"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/_test_/mnogosearch/exec/admin_mnogo.php

    r3843 r13260  
    3939                ecrire_metas();
    4040        }
     41        if (_request('vider_cache')!=NULL){
     42                spip_query("DELETE FROM spip_mnogosearch");
     43                spip_query("DELETE FROM spip_mnogosearch_summary");
     44        }
    4145
    4246        $mnogo_url_search = isset($GLOBALS['meta']['mnogo_url_search'])?$GLOBALS['meta']['mnogo_url_search']:"";
     
    5054        echo "</p></div></form>";
    5155
     56        echo generer_url_post_ecrire('admin_mnogo');
     57        echo "<div style='font:arial,helvetica,sans-serif;font-size:small;'>";
     58        $res = spip_query("SELECT COUNT(hash) AS n FROM spip_mnogosearch");
     59        $nb_results = spip_fetch_array($res);
     60        $nb_results = reset($nb_results);
     61        $res = spip_query("SELECT COUNT(hash) AS n FROM spip_mnogosearch_summary");
     62        $nb_recherches = spip_fetch_array($res);
     63        $nb_recherches = reset($nb_recherches);
     64        echo "La base contient en cache $nb_results r&eacute;sultats correspondants &agrave $nb_recherches recherches diff&eacute;rentes";
     65        echo "<p style='text-align:right;'>";
     66        echo "<input type='submit' name='vider_cache' value='"._T('bouton_vider_cache')."' class='fondo' />";
     67        echo "</p></div></form>";
    5268
    5369        fin_page();
Note: See TracChangeset for help on using the changeset viewer.