if($last_str == 'ич') {
$text = 'Уважаемый ...';
} else
{
$text = 'Уважаемая ...';
}
<div class="container"
<div class="block-news">
<?
$result = mysql_query(" SELECT * FROM news ORDER BY id DESC");
mysql_close();
while($row = mysql_fetch_assoc($result)): ?>
<div class='item_news' style='margin-bottom: 15px;'>
<h1><?= $row['title']?></h1>
<p class="text"><?= $row['text']?><p>
<p class="date">Дата публикации: <?= $row['date']?></p>
<p class="time">Время публикации: <?= $row['time']?></p>
<p class="author">Автор: <?= $row['author']?>
</div>
<?php endwhile
?>
</div>
</div>
public function actionCreate() {
$model = new MyGallery;
if (isset($_POST['MyGallery'])) {
$model->attributes = $_POST['MyGallery'];
if(!empty($_FILES)){
move_uploaded_file($_FILES['file']['tmp_name'],
Yii::app()->request->baseUrl . 'images/upload/' . '13' . $_FILES['file']['name']);
$model->img_url = $_FILES['file']['name'];
};
if ($model->save())
$this->redirect(array('view', 'id' => $model->id));
}
$this->render('create', array(
'model' => $model,
));
}