Topic Text   Topic Comments (0)   Topic Properties   Topic Information ab1234124@wer...
Topic title: My first test Monday March 2, 2009 06:18:05

Download topic text | View in variable-width font | Tab width set to 8 (change to 4)

Files in topic:  
[Jump to] theme.php   {+24,-0}

[Add General Comment] to topic.

File theme.php (Revision 1.0) [Add File Comment] [Top]
 
1 <?php
2 require_once './include/common.inc.php';
3 require_once './include/admin.inc.php';
4 checkcreator();
5 !isset($get_action) && $get_action = '';
6 if($get_action == '') {
7 $paths = readpathtoarray(AK_ROOT.'/themes', 1);
8 $themes = '';
9 foreach($paths as $path) {
10 if(substr($path, 0, 1) == '.' || !is_dir(AK_ROOT.'/themes/'.$path)) continue;
11 $readme = readfromfile(AK_ROOT.'/themes/'.$path.'/readme.txt');
12 $readme = nl2br($readme);
13 $themes .= "<tr><td width=\"50\" valign=\"top\">{$path}</td><td valign=\"top\"><b>{$lan['readme']}</b><br>{$readme}</td><td width=\"50\" align=\"center\" valign=\"middle\"><a href=\"theme.php?action=import&theme={$path}\">".$lan['install']."</a></td><td width=\"100\" align=\"center\" valign=\"middle\"><a href=\"theme.php?action=import&theme={$path}&sql=1\">".$lan['installandimportdata']."</a></td></tr>";
14 }
15 $smarty->assign('themes', $themes);
16 displaytemplate('admincp_themes.htm');
17 } elseif($get_action == 'import') {
18 if(isset($get_theme)) $theme = $get_theme;
19 if($theme == '') exit('error');
20 installtheme($theme, isset($get_sql));
21 adminmsg($lan['themeinstallsuccess'], 'http://www.akcms.com/themes/'.$theme.'.htm');
22 }
23 aexit();
24 ?>
 
  
Legend:
Removed 
Changed
 Added

[Add General Comment] to topic.