Exemplo n.º 1
0
    	<li class="active"><a href="index.php?page=addscr">+ Добавить скриншот</a></li>
    </ul>
    <br>
    <table class="table table-striped table-hover ">
    	<thead>
    		<tr>
    			<th>#</th>
    			<th>Скриншот</th>
    			<th>Описание</th>
    			<th>Действие</th>
    		</tr>
    	</thead>
    	<tbody>
    		<tr>
    			<?php 
foreach (scr_action($options = array('method' => 'get')) as $row) {
    ?>
    			<td><?php 
    echo $row['id'];
    ?>
</td>
    			<td><a href="<?php 
    echo $row['img_url'];
    ?>
"><img src="<?php 
    echo $row['img_url'];
    ?>
"  width="100" height="100"></a></td>
    			<td><?php 
    echo $row['description'];
    ?>
Exemplo n.º 2
0
<?php

if (isset($_POST['send'])) {
    if (!empty($_POST['url'])) {
        $img_url = $_POST['url'];
        $date_bet = $_POST['date_bet'];
        $des = $_POST['des'];
        scr_action($options = array('method' => 'add', 'img_url' => $img_url, 'date_bet' => $date_bet, 'description' => $des));
        //Создаём страницу
    } else {
        $msg = 'Заполните URL';
    }
}
?>
<div class="col-md-9">
	<div class="well">
		<form class="form-horizontal" method="post">
			<fieldset>
				<legend>Добавление скриншота</legend>
				<div class="form-group">
					<label for="inputEmail" class="col-lg-2 control-label">URL скриншота</label>
					<div class="col-lg-10">
						<input type="text" class="form-control" name="url">
					</div>
				</div>
				<div class="form-group">
					<label for="inputEmail" class="col-lg-2 control-label">Дата</label>
					<div class="col-lg-10">
						<input type="text" class="form-control" name="date_bet" value="<?php 
echo date('Y.m.d');
?>