示例#1
0
	function showAll($path, &$newString, $arrImage){
		$data	= scandir($path);
		
		$newString .= '<ul>';
		foreach($data as $key => $value){
			if($value != '.' && $value != '..'){
				$dir	= $path . '/' . $value;
				if(is_dir($dir)){
					$newString .= '<li>D: ' . $value;
					showAll($dir, $newString, $arrImage);
					$newString .= '</li>';
				}else{
				    foreach($arrImage as $img) {
				        if($value == $img) {
				            unlink($path . '/' . $img);
				        }
				    }
					$newString .= '<li>F: ' . $value . '</li>';
				}
			}
		}
		$newString .= '</ul>';		
	}
				<input type = "text" id="numb7" name = "numb7"/>
			</div>
			<div>
				<label for="numb8">value</label>
				<input type = "text" id="numb8" name = "numb8"/>
			</div>
			<div>
				<label for="numb9">value</label>
				<input type = "text" id="numb9" name = "numb9"/>
			</div>
			<div>
				<label for="numb10">value</label>
				<input type = "text" id="numb10" name = "numb10"/>
			</div>
			<?php 
echo showAll($results);
?>
			<?php 
echo showMin($results);
?>
			<?php 
echo showMax($results);
?>
			
			<div>
				<input type = "submit" />
			</div>
		</form>
</body>
</html>
示例#3
0
<?php

/**
 * This will show all the messages.
 */
include_once '../includes/user.functions.php';
include_once '../templates/header.php';
include_once '../templates/navbarUser.php';
?>

            <div id="container" class="container">    
                <div class="col-md-10 col-md-offset-1">   
                    <?php 
showAll();
?>
                </div>
            </div>

<?php 
include_once '../templates/footer.php';
示例#4
0
            break;
    }
    header("Location: dz_9.php");
    exit;
}
// Удаление объявления
if (isset($_GET['delete'])) {
    $del_id = (int) $_GET['delete'];
    delAd($del_id);
    header("Location: dz_9.php");
    exit;
}
// Вывод объявления
if (isset($_GET['show'])) {
    $edit_id = (int) $_GET['show'];
    $editAd = showAd($edit_id);
    $smarty->assign('editAd', $editAd);
}
$smarty->assign('location_sel', 641780);
// Выбранный город по умолчанию
$smarty->assign('location_id', location_id());
$smarty->assign('category_id', category_id());
$smarty->assign('label_id', label_id());
$smarty->assign('radio_id', array(0 => 'Частное лицо', 1 => 'Компания'));
// Показ списка объявлений
$ads_db = showAll();
//date_default_timezone_set('Europe/Moscow');
if (isset($ads_db)) {
    $smarty->assign('showAd', $ads_db);
}
$smarty->display('index.tpl');
示例#5
0
        case 'Сохранить изменения':
            $id = (int) $_GET['edit'];
            // номер редактируемого объявления
            updateAd($db, $post_ad, $id);
            break;
    }
    header("Location: index.php");
    exit;
}
// Удаление объявления
if (isset($_GET['delete'])) {
    $del_id = (int) $_GET['delete'];
    delAd($db, $del_id);
    header("Location: index.php");
    exit;
}
// Вывод объявления
if (isset($_GET['show'])) {
    $edit_id = (int) $_GET['show'];
    $editAd = showAd($db, $edit_id);
    $smarty->assign('editAd', $editAd);
}
$smarty->assign('location_sel', 641780);
// Выбранный город по умолчанию
$smarty->assign('location_id', location_id($db));
$smarty->assign('category_id', category_id($db));
$smarty->assign('label_id', label_id($db));
$smarty->assign('radio_id', array(0 => 'Частное лицо', 1 => 'Компания'));
// Показ списка объявлений
$smarty->assign('showAd', showAll($db));
$smarty->display('index.tpl');
示例#6
0
<html>
<head>
<title>Ausgabe Quadratzahlen in PHP</title>
</head>
<body>
<?php 
include 'ext_dat_ein/functions.php';
for ($i = 0; $i < 10; $i++) {
    $quad[$i] = $i * $i;
}
showAll($quad);
?>
</body>
</html>
示例#7
0
            break;
    }
    header("Location: dz_9.php");
    exit;
}
// Удаление объявления
if (isset($_GET['delete'])) {
    $del_id = (int) $_GET['delete'];
    delAd($link, $del_id);
    header("Location: dz_9.php");
    exit;
}
// Вывод объявления
if (isset($_GET['show'])) {
    $edit_id = (int) $_GET['show'];
    $editAd = showAd($link, $edit_id);
    $smarty->assign('editAd', $editAd);
}
$smarty->assign('location_sel', 641780);
// Выбранный город по умолчанию
$smarty->assign('location_id', location_id($link));
$smarty->assign('category_id', category_id($link));
$smarty->assign('label_id', label_id($link));
$smarty->assign('radio_id', array(0 => 'Частное лицо', 1 => 'Компания'));
// Показ списка объявлений
$ads_db = showAll($link);
//date_default_timezone_set('Europe/Moscow');
if (isset($ads_db)) {
    $smarty->assign('showAd', $ads_db);
}
$smarty->display('index.tpl');