Example #1
0
            $tz = $mytz;
        } else {
            $tz = "-5:00";
        }
    }
    if ($rev) {
        $tzp = split(":", $tz);
        $ho = preg_match("/^-(.*)/", $tzp[0], $m) ? "+{$m['1']}" : "-{$m['1']}";
        $tz = $ho . ":" . $tzp[1];
    }
    return "convert_tz({$col}, \"-0:00\", \"{$tz}\")";
}
# Template stuff
require "Template.php";
$t = new Template();
$t->register_function(page_info, "template_page_info");
$t->template_dir = "../templates/";
$t->compile_dir = $t->template_dir . "compile/";
$t->cache_dir = $t->template_dir . "cache/";
// Because you should never touch smarty files, store your custom smarty functions, modifiers, etc. in /include
$t->plugins_dir = array('plugins', '../smarty_plugins');
// Change comment on these when you're done developing to improve performance
#$t->force_compile = true;
#$t->caching = true;
$t->compile_check = true;
if ($my_id) {
    $t->assign("my_id", $my_id);
}
if ($my_username) {
    #$t->assign("user", $username);
    $t->assign("username", $my_username);