Размер файла: 2.12Kb
<?php
###################################################
# Скрипт портфолио #
# Версия системы: 1.0 #
# Автор: RonsoN #
# ICQ: 7-191-321 #
# Email: [email protected] #
###################################################
$id_work = int($_GET['id_work']);
if ($db->query("SELECT * FROM `works` WHERE `id` = '". $id_work ."' LIMIT 1")->rowCount() == 0) {
header('Location: /pages/404.xhtml');
exit();
}
if(empty($_COOKIE[$id_work])) { $db->query("UPDATE `works` SET `look` = `look` + 1 WHERE `id` = '".$id_work."' "); }
setcookie($id_work, 1, time() + 259200);
$work = $db->query("SELECT * FROM `works` WHERE `id` = '". $id_work ."' LIMIT 1")->fetch();
$system['page_title'] = $work['title'];
require_once(HOME .'/system/header.php');
echo '<div class="menu">'.$work['title'].'</div>';
if(!empty($work['scr'])) { echo '<div class="main"><a href="'.URL.'/files/screens/'.$work['scr'].'"><img src="'.URL.'/system/resize.php?image='.URL.'/files/screens/'.$work['scr'].'" alt="'.$work['scr'].'" /></a></div>'; }
if(!empty($work['text'])) { echo '<div class="main"><b>Описание:</b><br/>'.out($work['text']).'</div>'; }
echo '<div class="main">';
if(!empty($work['status'])) { echo '<b>Статус</b>: '.status($work['status']).'<br/>'; }
if(!empty($work['cost'])) { echo '<b>Цена</b>: '.$work['cost'].' '.$work['pre'].'<br/>'; }
if(!empty($work['look'])) { echo '<b>Просмотров</b>: '.$work['look'].'<br/>'; }
if(!empty($work['date'])) { echo '<b>Дата добавления</b>: '.vtime($work['date']).''; }
echo '</div>';
if(!empty($work['file'])) { echo '<div class="main">'.SAVE.'<a href="/files/loads/'.$work['file'].'">Скачать файл '.$work['title'].'</a> ('.formatsize(filesize(HOME.'/files/loads/'.$work['file'].'')).')</div>'; }
echo '<div class="navi">
'.NAVI.'<a href="/category/'.$work['id_category'].'.xhtml">В категорию</a><br/>
'.INDEX.'<a href="/">Главная</a>
</div>';
require_once(HOME.'/system/footer.php');
?>