function getStatusData()
 {
     global $db;
     $scache = new scache('group_status');
     if ($scache->existsdata() == TRUE) {
         $this->statusdata = $scache->importdata();
     } else {
         $cresult = $db->query("SELECT id, admin, guest, title, core FROM {$db->pre}groups ORDER BY core DESC", __LINE__, __FILE__);
         while ($row = $db->fetch_assoc($cresult)) {
             $this->statusdata[$row['id']] = $row;
         }
         $scache->exportdata($this->statusdata);
     }
 }
function cache_spiders()
{
    global $db;
    $scache = new scache('spiders');
    if ($scache->existsdata() == TRUE) {
        $bot = $scache->importdata();
    } else {
        $result = $db->query("SELECT id, user_agent, bot_ip, name, type FROM {$db->pre}spider", __LINE__, __FILE__);
        $bot = array();
        while ($row = $db->fetch_assoc($result)) {
            $bot[$row['id']] = $row;
        }
        $scache->exportdata($bot);
    }
    return $bot;
}
function save_error_data($fc)
{
    global $gpc;
    $fid = md5(microtime());
    $scache = new scache('temp/errordata/' . $fid, '');
    foreach ($fc as $key => $row) {
        $fc[$key] = $gpc->unescape($row);
    }
    $scache->exportdata($fc);
    return $fid;
}
示例#4
0
        while ($row = $db->fetch_array($result)) {
            $emails[] = $row[0];
        }
    }
    $emails = array_unique($emails);
    $anz = count($emails);
    if ($anz == 0) {
        echo head();
        error('admin.php?action=members&job=newsletter', 'Keine E-Mail-Adressen gefunden!');
    }
    $int2 = $gpc->get('int2', int, 100);
    $steps = ceil($anz / $int2);
    $db->query('INSERT INTO ' . $db->pre . 'newsletter (receiver, title, content, time) VALUES ("' . $int1 . '","' . $gpc->get('temp1', str) . '","' . $gpc->get('temp2', str) . '","' . time() . '")');
    $lid = $db->affected_rows();
    $scache = new scache('newsletter_session');
    $scache->exportdata($emails);
    $htmlhead .= '<meta http-equiv="refresh" content="2; url=admin.php?action=members&job=newsletter3&id=' . $lid . '&int2=' . $int2 . '&page=1">';
    echo head();
    ?>
 <table class="border" border="0" cellspacing="0" cellpadding="4" align="center">
  <tr> 
   <td class="obox"><b>Schritt 1 von <?php 
    echo $steps + 1;
    ?>
</b></td>
  </tr>
  <tr> 
   <td class="mbox">Die Daten wurden gespeichert<br>Die Emails werden nun in Staffeln versandt.</td>
  </tr>
 </table>	
<?php 
 function cache_smileys()
 {
     global $db, $bbcode;
     $scache = new scache('smileys');
     if ($scache->existsdata() == TRUE) {
         $cache = $scache->importdata();
     } else {
         $bbresult = $db->query("SELECT * FROM {$db->pre}smileys", __LINE__, __FILE__);
         $cache = array();
         while ($bb = $db->fetch_assoc($bbresult)) {
             $cache[] = $bb;
         }
         $scache->exportdata($cache);
     }
     $this->smileys = $cache;
 }
<?php

$scache = new scache('grabrss');
if ($scache->existsdata() == TRUE) {
    $grabrss_cache = $scache->importdata();
} else {
    $cresult = $db->query("SELECT id, file, title, entries, max_age FROM {$db->pre}grab", __LINE__, __FILE__);
    $grabrss_cache = array();
    while ($row = $db->fetch_assoc($cresult)) {
        $row['title'] = htmlentities($row['title'], ENT_QUOTES);
        $grabrss_cache[$row['id']] = $row;
    }
    $scache->exportdata($grabrss_cache);
}
<?php

global $gpc;
$stime = times();
$today = $stime - gmmktime(0, 0, 0, gmdate('m', $stime), gmdate('d', $stime), gmdate('Y', $stime), date('I', $stime)) - 60;
$scache = new scache('birthday_module');
if ($scache->existsdata($today) == TRUE) {
    $data = $scache->importdata();
} else {
    $result = $db->query("SELECT id, name, birthday FROM {$db->pre}user WHERE RIGHT( birthday, 5 ) = '" . gmdate('m-d', times()) . "' ORDER BY name", __LINE__, __FILE__);
    $data = array();
    while ($e = $db->fetch_assoc($result)) {
        $e['name'] = $gpc->prepare($e['name']);
        $e['birthday'] = explode('-', $e['birthday']);
        $e['age'] = getAge($e['birthday']);
        $data[] = $e;
    }
    $scache->exportdata($data);
}
if (count($data) > 0) {
    $tpl->globalvars(compact("data"));
    echo $tpl->parse($dir . "birthday_box");
}
示例#8
0
        $clang = $scache->importdata();
    } else {
        $clang = array();
        $d = dir("classes/geshi");
        while (false !== ($entry = $d->read())) {
            if (get_extension($entry, TRUE) == 'php' && !is_dir("classes/geshi/" . $entry)) {
                include_once "classes/geshi/" . $entry;
                $short = str_replace('.php', '', $entry);
                $clang[$short]['file'] = $entry;
                $clang[$short]['name'] = $language_data['LANG_NAME'];
                $clang[$short]['short'] = $short;
            }
        }
        $d->close();
        asort($clang);
        $scache->exportdata($clang);
    }
    echo $tpl->parse("popup/header");
    $mymodules->load('popup_code_top');
    echo $tpl->parse("popup/code");
} elseif ($_GET['action'] == "showpost") {
    echo $tpl->parse("popup/header");
    $result = $db->query("\n\tSELECT t.status, t.prefix, r.topic_id, r.board, r.edit, r.dosmileys, r.dowords, r.id, r.topic, r.comment, r.date, u.name as uname, r.name as gname, u.id as mid, u.groups, u.fullname, u.hp, u.pic, r.email as gmail, u.signature, u.regdate, u.location \n\tFROM {$db->pre}replies AS r LEFT JOIN {$db->pre}user AS u ON r.name=u.id LEFT JOIN {$db->pre}topics AS t ON t.id = r.topic_id\n\tWHERE r.id = '{$_GET['id']}' LIMIT 1", __LINE__, __FILE__);
    $found = $db->num_rows($result);
    if ($found == 1) {
        $row = $gpc->prepare($db->fetch_object($result));
        $my->p = $slog->Permissions($row->board);
        if (empty($row->topic_id)) {
            $row->topic_id = $row->id;
        }
    }
 function navigation()
 {
     global $config, $my, $tpl, $db, $myini;
     $scache = new scache('modules_navigation');
     if ($scache->existsdata() == TRUE) {
         $menu = $scache->importdata();
     } else {
         $result = $db->query("SELECT id, name, link, param, groups, sub, module FROM {$db->pre}menu WHERE active = '1' AND FIND_IN_SET('navigation', position) ORDER BY ordering, id", __LINE__, __FILE__);
         $menu = array();
         while ($row = $db->fetch_assoc($result)) {
             if (!isset($menu[$row['sub']])) {
                 $menu[$row['sub']] = array();
             }
             $menu[$row['sub']][] = $row;
         }
         $scache->exportdata($menu);
     }
     foreach ($menu[0] as $row) {
         if ($row['module'] == 0 && isset($menu[$row['id']])) {
             if ($this->GroupCheck($row['groups'])) {
                 $nav_s = array();
                 foreach ($menu[$row['id']] as $sub) {
                     if ($this->GroupCheck($sub['groups'])) {
                         $sub['sub'] = array();
                         if (isset($menu[$sub['id']])) {
                             foreach ($menu[$sub['id']] as $subsub) {
                                 if ($this->GroupCheck($subsub['groups'])) {
                                     $sub['sub'][] = $subsub;
                                 }
                             }
                         }
                         $nav_s[] = $sub;
                     }
                 }
                 $tpl->globalvars(compact("row", "nav_s", "nav_ss"));
                 echo $tpl->parse("modules/navigation");
             }
         } else {
             if ($row['module'] == 1 && ($row['groups'] == NULL || $this->GroupCheck($row['groups']) == TRUE)) {
                 $dir = 'modules/' . $row['link'] . '/';
                 $ini = $myini->read($dir . "config.ini");
                 if (count($ini) > 0 && file_exists($dir . $ini['php'][0])) {
                     include $dir . $ini['php'][0];
                 }
                 unset($dir, $ini);
             }
         }
     }
 }
$slog = new slog();
$my = $slog->logged();
$lang->init($my->language);
$tpl = new tpl();
$my->p = $slog->Permissions();
$cid = $gpc->get('cid', int);
$scache = new scache('components');
if ($scache->existsdata() == TRUE) {
    $cache = $scache->importdata();
} else {
    $cresult = $db->query("SELECT id, file FROM {$db->pre}component WHERE active = '1'", __LINE__, __FILE__);
    $cache = array();
    while ($comp = $db->fetch_assoc($cresult)) {
        $cache[$comp['id']] = $comp;
    }
    $scache->exportdata($cache);
}
if (isset($cache[$cid])) {
    DEFINE('COM_ID', $cache[$_GET['cid']]['id']);
    DEFINE('COM_DIR', 'components/' . COM_ID . '/');
    $ini = $myini->read(COM_DIR . 'components.ini');
    $mod = $gpc->get('file', str, 'frontpage');
    if (!isset($ini['module'][$mod])) {
        DEFINE('COM_MODULE', 'frontpage');
    } else {
        DEFINE('COM_MODULE', $mod);
    }
    DEFINE('COM_MODULE_FILE', $ini['module'][COM_MODULE]);
    DEFINE('COM_FILE', $ini['module']['frontpage']);
    if (!file_exists(COM_DIR . COM_FILE)) {
        error($lang->phrase('section_not_available'));
function cache_spiders()
{
    global $db;
    $s3cache = new scache('spiders');
    if ($s3cache->existsdata() == TRUE) {
        $botua = $s3cache->importdata();
    } else {
        $cresult = $db->query("SELECT user_agent, name, type FROM {$db->pre}spider", __LINE__, __FILE__);
        $botua = array();
        while ($catc = $db->fetch_assoc($cresult)) {
            $botua[] = $catc;
        }
        $s3cache->exportdata($botua);
    }
    return $botua;
}