Файл: modules/padmin/installed_themes.php
Строк: 81
<?php
/**
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) 2013, Taras Chornyi, Sergiy Mazurenko, Ivan Kotliar
* @link http://perf-engine.net
* @package PerfEngine
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
$locate = 'in_padmin';
if(isset($user) && $user['level'] >= 6) {
$title = _t('padmin_installed_themes_list');
include_header($title);
$tpl->div('title', _t('padmin_installed_themes_list'));
$tpl->div('top', '<h3>WAP</h3>');
$themes_list_dir = opendir(ROOT .'/template/themes/wap');
while ($themes_list = readdir($themes_list_dir)) {
if ($themes_list == '.' || $themes_list == '..')
continue;
if($themes_list != 'index.php' && $themes_list !='.htaccess') {
$thems = parse_ini_file(ROOT .'/template/themes/wap/'.$themes_list.'/manifest.ini');
echo '<div class="menu">';
echo (file_exists(ROOT .'/template/themes/wap/'.$themes_list.'/screenshot.png') ? '<img src="/template/themes/wap/'.$themes_list.'/screenshot.png" height="150" width="100" />' :
file_exists(ROOT .'/template/themes/wap/'.$themes_list.'/screenshot.jpg') ? '<img src="/template/themes/wap/'.$themes_list.'/screenshot.jpg" height="150" width="100" />' :
file_exists(ROOT .'/template/themes/wap/'.$themes_list.'/screenshot.gif') ? '<img src="/template/themes/wap/'.$themes_list.'/screenshot.gif" height="150" width="100" />' : NULL);
echo '<b>'._t('name').'</b>: '. $thems['name'].'<br/>';
echo (isset($thems['author']) ? '<b>'._t('author').'</b>: '. $thems['author'].'<br/>' : NULL);
echo (isset($thems['link']) ? '<b>'._t('link').'</b>: <a href="'. $thems['link'].'">'. $thems['link'].'</a><br/>' : NULL);
echo '</div>';
}
}
$tpl->div('top', '<h3>WEB</h3>');
$themes_list_dir = opendir(ROOT .'/template/themes/web');
while ($themes_list = readdir($themes_list_dir)) {
if ($themes_list == '.' || $themes_list == '..')
continue;
if($themes_list != 'index.php' && $themes_list !='.htaccess') {
$thems = parse_ini_file(ROOT .'/template/themes/web/'.$themes_list.'/manifest.ini');
echo '<div class="menu">';
echo (file_exists(ROOT .'/template/themes/web/'.$themes_list.'/screenshot.png') ? '<img src="/template/themes/web/'.$themes_list.'/screenshot.png" height="150" width="100" />' :
file_exists(ROOT .'/template/themes/web/'.$themes_list.'/screenshot.jpg') ? '<img src="/template/themes/web/'.$themes_list.'/screenshot.jpg" height="150" width="100" />' :
file_exists(ROOT .'/template/themes/web/'.$themes_list.'/screenshot.gif') ? '<img src="/template/themes/web/'.$themes_list.'/screenshot.gif" height="150" width="100" />' : NULL);
echo '<b>'._t('name').'</b>: '. $thems['name'].'<br/>';
echo (isset($thems['author']) ? '<b>'._t('author').'</b>: '. $thems['author'].'<br/>' : NULL);
echo (isset($thems['link']) ? '<b>'._t('link').'</b>: <a href="'. $thems['link'].'">'. $thems['link'].'</a><br/>' : NULL);
echo '</div>';
}
}
$tpl->div('block', img('admin.png') .'<a href="/padmin/">'. _t('padmin') .'</a><br/>'. HICO .'<a href="/">'. _t('home') .'</a>');
include_footer();
} else { go('/'); }
?>