View file themes/adaptiv/template/user.news-add.php

File size: 2.03Kb
<form method="post" name="save" action="" enctype="multipart/form-data">
  <div class="form-group">
    <input type="text" class="form-control" value="<?=isset($_SESSION['news_title']) ? $_SESSION['news_title'] : false?>" placeholder="Заголовок" name="title">
    <small class="form-text text-muted">max 128 симв.</small>
  </div>
	<div class="form-group">
	<select class="form-control" name="razd">
	<?
		foreach ($razd AS $p) {
			?> <option value="<?=$p['id']?>" <?=($p['id'] == isset($_SESSION['news_razd']) ? $_SESSION['news_razd'] : 1 ? 'selected="selected"':'')?>><?=output($p['name'], 'html')?></option><?
		}
	?>
	</select>
	<small class="form-text text-muted">Важно указать правильный раздел</small>
	</div>

    <div class="form-group">
    <textarea placeholder="Описание новости"  style="height: 220px;" class="form-control" name="text"><?=isset($_SESSION['news_text']) ? $_SESSION['news_text'] : false?></textarea>
    <small class="form-text text-muted">max 30k симв.</small>
  </div> 
   <div class="form-group">
    <textarea placeholder="Keywords" class="form-control" name="keywords"><?=isset($_SESSION['news_keywords']) ? $_SESSION['news_keywords'] : false?></textarea>
    <small class="form-text text-muted">max 256 симв.</small>
  </div>  
  
   <div class="form-group">
    <textarea placeholder="Description" class="form-control" name="description"><?=isset($_SESSION['news_description']) ? $_SESSION['news_description'] : false?></textarea>
    <small class="form-text text-muted">max 256 симв.</small>
  </div>  
   
 <div class="form-group">
    <label for="exampleFormControlFile1">Обложка</label>
    <input name="file" type="file" class="form-control-file" id="exampleFormControlFile1">
  </div>
  
  <button type="submit" name="save" class="btn btn-primary">Добавить</button><br/>
 Нажимая кнопку "Добавить" Вы соглашаетесь с <a href="/main/rules/">соглашением</a> сайта
</form>