/** * show a page */ function controller_show($args) { // most of these checks are only necessary if the client calls // page/show directly page_canonical($args[0][0]); $page = $args[0][0]; if (!page_exists($page)) { log_msg('info', 'controller_show: page ' . quot($page) . ' not found, serving 404'); hotglue_error(404); } // serve from page if possible if (0 < CACHE_TIME && is_cached('page', $page, CACHE_TIME)) { serve_cached('page', $page); die; } // otherwise create page on the fly load_modules('glue'); default_html(false); $cache_page = true; render_page(array('page' => $page, 'edit' => false)); // the $cache_page parameter is set by the html_finalize() $html = html_finalize($cache_page); echo $html; // and cache it if (0 < CACHE_TIME && $cache_page) { cache_output('page', $page, $html); } }
<div style="height: 40px"></div> <table> <thead><tr><td><?php echo T_('From'); ?> </td><td><?php echo T_('To'); ?> </td><td></td></tr></thead> <tbody> <?php function browserMigration() { $names = array("i" => 'Internet Explorer', "f" => 'Firefox', "o" => 'Opera', "s" => 'Safari', "n" => 'Netscape', "c" => 'Chrome', "" => '?'); $q = mysql_query('SELECT fromn,ton,COUNT(*) as num FROM `updates` WHERE fromv<22 GROUP BY fromn, ton HAVING num>1000 ORDER BY num DESC'); while ($a = mysql_fetch_assoc($q)) { if ($names[$a['fromn']] == "" || $names[$a['fromn']] == "?") { continue; } echo '<tr><td>' . $names[$a['fromn']] . '</td><td>' . $names[$a['ton']] . '</td><td>' . $a['num'] . '</td></tr>'; } } echo cache_output('browserMigration'); ?> </tbody> </table> <?php include "footer.php";
{ require_once "config.php"; $r = mysql_query("SELECT COUNT(*) FROM updates") or die(mysql_error() . $q); list($num) = mysql_fetch_row($r); return $num; } ?> <div class="numbs"> <p> <?php echo sprintf(T_('<strong class="number">%s</strong> sites are using the Browser-Update.org script.'), number_format(intval(cache_output('countSites')), 0, ".", " ")); ?> </p> <p> <?php echo sprintf(T_('<strong class="number">%s</strong> visitors have already upgraded their browser.'), number_format(intval(cache_output('countUpdates')), 0, ".", " ")); ?> </p> </div> <h2><?php echo T_('How it works'); ?> </h2> <ol class="steps"> <li><div> <?php echo sprintf(T_('Include our small javascript <a href="%s">notification</a> on your website'), '#install'); ?> </div></li> <li><div> <?php