View file modules/news/views/index/editArticle.php

File size: 1.21Kb
<div class="title"><b><?=Lang::get('news_edit_article', 'news'); ?></b></div>
<div class="menu">
<form action="/news/edit-<?=$news['id']?>?save" method="post">
<?=Lang::get('news_name', 'news'); ?>:<br/>
<input type="text" id="name" value="<?=$news['name']?>" name="name"/><br/>
<?=Lang::get('news_text', 'news'); ?>:<br/>
<?=System::textarea('10', '67%', 'text', $news['text']); ?>
<select name="category">
<option value="0" <?php if($news['category_id'] == 0): ?> selected="selected" <?php endif; ?>><?=Lang::get('news_no_category', 'news'); ?></option>
<?php foreach ($categories as $category): ?>
<option value="<?=$category['id']; ?>" <?php if ($news['category_id'] == $category['id']): ?> selected="selected" <?php endif; ?>><?=$category['name']; ?></option>
<?php endforeach; ?>
</select><br/>
<input type="submit" value="<?=Lang::get('save'); ?>" />
</form>
</div>

<div class="block">
<?=System::image('nav.png'); ?> <a href="/news/edit-<?=$news['id']?>?delete"><?=Lang::get('news_delete_article', 'news'); ?></a><br/>
<?=System::image('back.png'); ?> <a href="/news/index"><?=Lang::get('news_title', 'news'); ?></a><br/>
<?=System::image('back.png'); ?> <a href="/"><?=Lang::get('mainpage'); ?></a>
</div>