Expose the theme RSS feeds
[rockboxthemes.git] / private / preamble.inc.php
blobc3ed2cd797824204acd089ff82d7f910d68dfa4b
1 <?php
2 /***************************************************************************
3 * __________ __ ___.
4 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
5 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
6 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
7 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
8 * \/ \/ \/ \/ \/
9 * $Id$
11 * Copyright (C) 2009 Jonas Häggqvist
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
21 ****************************************************************************/
23 require_once('../private/config.inc.php');
24 require_once('themesite.class.php');
25 require_once('templater.class.php');
27 /* temporary shit */
29 unlink(config::dbfile);
30 unlink(sprintf("%s/176x220/widecabbie/%s", config::datadir, 'widecabbie.zip'));
31 unlink(sprintf("%s/176x220/widecabbie/%s", config::datadir, 'widecabbie-menu.png'));
32 unlink(sprintf("%s/176x220/widecabbie/%s", config::datadir, 'widecabbie-wide.png'));
33 rmdir(sprintf("%s/176x220/widecabbie", config::datadir));
34 /* Delete the above */
36 $site = new themesite(config::privdir .'/' . config::dbfile);
37 $t = new templater(config::smartydir);
38 $t->assign('datadir', config::datadir);
39 $t->assign('root', config::path);
40 $t->assign('hostname', config::hostname);
41 $t->assign('maxuploadsize', config::maxzippedsize);
43 /* More temporary shit */
44 //$site->addtarget('e200', 'Sandisk Sansa E200', '176x220', 'e200-small.png', '16');
45 //$site->addtarget('ipodnano', 'Apple Ipod Nano 1G', '176x132', 'ipodnano-small.png', '16');
46 /* Delete this as well */
48 $values = array();