Example #1
0
     exit($_AL['main.cache.choose']);
 }
 if (substr($cachetype, 0, 4) == 'all,') {
     $cachetype = 'all';
 }
 //Clear products in cart 7 days ago
 $d = $_SYS['time'] - 7 * 24 * 3600;
 $db->row_delete("orderdetails", "orderid=0 and addtime<{$d}");
 //Build Cache
 $types = explode(",", $cachetype);
 if ($cachetype == 'all' || in_array('langs', $types)) {
     writeLangsCache();
 }
 if ($cachetype == 'all' || in_array('settings', $types)) {
     writeGlobalCache();
     writeSettingsCache();
 }
 if ($cachetype == 'all' || in_array('contact', $types)) {
     writeContactCache();
 }
 if ($cachetype == 'all' || in_array('channels', $types)) {
     writeChannelsCache();
 }
 if ($cachetype == 'all' || in_array('procates', $types)) {
     writeProductsCateCache();
 }
 if ($cachetype == 'all' || in_array('links', $types)) {
     writeLinksCache();
 }
 if ($cachetype == 'all' || in_array('votes', $types)) {
     writeVotesCache();
Example #2
0
function reBuildLang()
{
    global $db, $_SYS;
    $rows = $db->row_select("langs", "ishidden=0", 0, "*", "isdefault desc,ordernum");
    $langs = array();
    foreach ($rows as $row) {
        $_SYS['alangid'] = $row['id'];
        writeSettingsCache();
        writeLinksCache();
        writeChannelsCache();
        writeProductsCateCache();
        writeContactCache();
        writeVotesCache();
        writeTemplatevarsCache();
    }
}