Example #1
0
if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}
/*
	вывод изображений слайдером/каруселью из заданного каталога
*/
$subdir = mso_get_option('default_header_image', 'templates', false);
if ($subdir === false) {
    return;
}
// не определены опции
if ($subdir == '-template-') {
    // каталог шаблона
    $imgs = get_path_files(getinfo('template_dir') . 'images/headers/', getinfo('template_url') . 'images/headers/');
} else {
    $imgs = get_path_files(getinfo('uploads_dir') . $subdir . '/', getinfo('uploads_url') . $subdir . '/');
}
// каталог в uploads
shuffle($imgs);
// случайный порядок
// высота блока: height 250px
// <script type="text/javascript" src="' . getinfo('template_url') . 'components/js/jquery.nivo.slider.pack.js"></script>
echo mso_load_jquery('jquery.nivo.slider.js') . '
	<script type="text/javascript">
		$(window).load(function() {
			$("#slider-header").nivoSlider({controlNav:false, pauseTime:4000, prevText: "&lt;", nextText: "&gt;"});
		});
	</script>
	';
// вывод блока слайдера
echo '<div id="slider-header" class="nivoSlider">';
Example #2
0
    $all = array_merge($all, $all_add);
}
if (file_exists(getinfo('template_dir') . 'custom/my_options.php')) {
    require getinfo('template_dir') . 'custom/my_options.php';
}
if (file_exists(getinfo('template_dir') . 'custom/my_options.ini')) {
    $all_add = mso_get_ini_file(getinfo('template_dir') . 'custom/my_options.ini');
    // и свой
    $all = array_merge($all, $all_add);
}
// подключим все опции компонентов в components/options
// в них ini-файлы, а также php-файлы, обслуживающие ini (для PHP_START PHP_END)
// поэтому подключаем все php-файлы, после все ini-файлы
// подключаем только те опции и ini компонентов, которые реально существуют
// все компоненты
$all_component = get_path_files(getinfo('template_dir') . 'components/', getinfo('template_dir') . 'components/', true, array('php'));
// проверяем опции
foreach ($all_component as $file) {
    $file = str_replace('/components/', '/components/options/', $file);
    if (file_exists($file)) {
        require $file;
    }
    // php-файлы
}
// проверяем ini в options
foreach ($all_component as $file) {
    $file = str_replace('/components/', '/components/options/', $file);
    $file = str_replace('.php', '.ini', $file);
    if (file_exists($file)) {
        $all_add = mso_get_ini_file($file);
        // css-файлы
Example #3
0
					<select name="sel_path" onchange="submit()">
						<option value="">-选择磁盘-</option>
						<option value="C:/">C:/</option>
						<option value="D:/">D:/</option>
						<option value="E:/">E:/</option>
						<option value="F:/">F:/</option>
					</select>
				</caption>
				<tr align="center"><td colspan="13"><strong>所选文件夹 : <?php 
echo empty($_GET['sel_path']) ? "D:/" : $_GET['sel_path'];
?>
</strong></td></tr>
				<tr><td>文件名</td><td>类型</td><td>大小</td><td>创建时间</td><td>修改时间</td><td>可读</td><td>可写</td><td>可执行</td><td>是否链接</td><td>绝对路径</td><td colspan="3">操作</td></tr>
				<?php 
$dir_path = empty($_GET['sel_path']) ? "D:/" : $_GET['sel_path'];
$file_paths = get_path_files($dir_path);
$file_nums = count($file_paths['real_path']);
$dir_free_size = disk_free_space($dir_path);
$dir_total_size = disk_total_space($dir_path);
$dir_used_size = 0;
foreach ($file_paths['real_path'] as $file) {
    $file_info = get_file_info($file);
    $file_url = is_dir($file) ? $file . '\\' : '';
    echo "<tr><td><a href='?sel_path={$file_url}'>" . basename($file) . "</a></td>";
    foreach ($file_info as $info) {
        if ($info === TRUE) {
            $info = '是';
        } elseif ($info === FALSE) {
            $info = '否';
        }
        echo "<td>" . $info . "</td>";
Example #4
0
 function default_header_logo()
 {
     $all = get_path_files(getinfo('template_dir') . 'images/logos/', getinfo('template_url') . 'images/logos/', false);
     return implode($all, '#');
 }