Example #1
0
<?php

/*
	This file is part of myTinyTodo.
	(C) Copyright 2009-2010 Max Pozdeev <*****@*****.**>
	Licensed under the GNU GPL v3 license. See file COPYRIGHT for details.
*/
require_once './init.php';
$lang = Lang::instance();
if ($lang->rtl()) {
    Config::set('rtl', 1);
}
if (!is_int(Config::get('firstdayofweek')) || Config::get('firstdayofweek') < 0 || Config::get('firstdayofweek') > 6) {
    Config::set('firstdayofweek', 1);
}
use_mobile();
define('TEMPLATEPATH', MTTPATH . 'themes/' . Config::get(MTT_TEMPLATE_VAR) . '/');
require TEMPLATEPATH . 'index.php';
Example #2
0
function get_mttinfo($v)
{
    global $_mttinfo;
    if (isset($_mttinfo[$v])) {
        return $_mttinfo[$v];
    }
    use_mobile();
    switch ($v) {
        case 'template_url':
            $_mttinfo['template_url'] = get_mttinfo('mtt_url') . 'themes/' . Config::get(MTT_TEMPLATE_VAR) . '/';
            return $_mttinfo['template_url'];
        case 'url':
            $_mttinfo['url'] = Config::get('url');
            if ($_mttinfo['url'] == '') {
                $_mttinfo['url'] = 'http://' . $_SERVER['HTTP_HOST'] . ($_SERVER['SERVER_PORT'] != 80 ? ':' . $_SERVER['SERVER_PORT'] : '') . url_dir(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['SCRIPT_NAME']);
            }
            return $_mttinfo['url'];
        case 'mtt_url':
            $_mttinfo['mtt_url'] = Config::get('mtt_url');
            if ($_mttinfo['mtt_url'] == '') {
                $_mttinfo['mtt_url'] = url_dir(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['SCRIPT_NAME']);
            }
            return $_mttinfo['mtt_url'];
        case 'title':
            $_mttinfo['title'] = Config::get('title') != '' ? htmlarray(Config::get('title')) : __('My Tiny Todolist');
            return $_mttinfo['title'];
    }
}