Файл: магазин/e-proger/modules/post/post.php
Строк: 318
<style>
#tbn1 {
width: 398px;
height: 55px;
margin-left: 7px;
overflow: hidden;
}
#tbn1 div {
width: 400px;
height: 55px;
margin: 0;
}
#tbn1 img {
width: 400px;
height: 55px;
margin: 0px 70px 0px 0px;
}
</style>
<div style="width: 830px;margin-top: 19px;padding-top: 1px;">
</div>
<?
$config_post = $pdo->Query("SELECT * from php_tovar WHERE id = '" . $_GET['id']. "' LIMIT 1");
if($config_post->RowCount()!=0){
$config_post=$config_post->fetch(PDO::FETCH_BOTH);
}else{
echo '<script type="text/javascript">
window.location = "/404.php"
</script>';
exit;}
$config_upl = $pdo->Query("SELECT * from php_upload WHERE tovar = '" . $_GET['id']. "' LIMIT 1")->fetch(PDO::FETCH_BOTH);
$config_pr = $pdo->Query("SELECT * from php_user WHERE id = '" . $config_post['user'] . "' LIMIT 1")->fetch(PDO::FETCH_BOTH);
$pdo->Query("UPDATE php_tovar SET view = view+'1' WHERE id = '" . intval($_GET['id']). "'");
/*---Дата последнего входа---*/
$month = array( 'янв', 'фев', 'мар', 'апр', 'мая', 'июня', 'июля', 'авг', 'сен', 'окт', 'ноя', 'дек' );
if ( date( 'd.m.Y', $config_post['data'] ) == date( 'd.m.Y', time() ) ) {
$frd_date = 'сегодня в ' . date( 'H:i', $config_post['data'] ) . '';
} else {
$frd_date = '' . ( int ) date( 'd', $config_post['data'] ) . ' ' . $month[( int ) date( 'm', $config_post['data'] ) - 1] . ' ' . date( 'Y', $config_post['data'] ) . '';
}
$key_tovar = sha1($config_post['cena'].$_GET['id']);
if ( $_SESSION['id'] ) {
$btn_mess_reg = '<a class="fb3 round3" onclick="showDialog(' . $config_pr['id'] . ', '' . substr( md5( $message_md5 . $config_pr['id'] ), 0, 22 ) . '');return false;">Написать продавцу</a>';
} else {
$btn_mess_reg = '';
}
?>
<style>
/* Базовые стили слоя затемнения и модального окна */
.overlay {
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 10;
display: none;
/* фон затемнения */
background-color: rgba(0, 0, 0, 0.65);
position: fixed; /* фиксированное поцизионирование */
cursor: default; /* тип курсара */
}
/* активируем слой затемнения */
.overlay:target {
display: block;
}
/* стили модального окна */
.popup {
top: -100%;
right: 0;
left: 50%;
font-size: 14px;
z-index: 20;
margin: 0;
width: 85%;
min-width: 320px;
max-width: 600px;
position: fixed;
padding: 15px;
background: #fefefe;
font: 14px/18px 'Tahoma', Arial, sans-serif;
-webkit-box-shadow: 0 15px 20px rgba(0,0,0,.22),0 19px 60px rgba(0,0,0,.3);
-moz-box-shadow: 0 15px 20px rgba(0,0,0,.22),0 19px 60px rgba(0,0,0,.3);
-ms-box-shadow: 0 15px 20px rgba(0,0,0,.22),0 19px 60px rgba(0,0,0,.3);
box-shadow: 0 15px 20px rgba(0,0,0,.22),0 19px 60px rgba(0,0,0,.3);
-webkit-transform: translate(-50%, -500%);
-ms-transform: translate(-50%, -500%);
-o-transform: translate(-50%, -500%);
transform: translate(-50%, -500%);
-webkit-transition: -webkit-transform 0.6s ease-out;
-moz-transition: -moz-transform 0.6s ease-out;
-o-transition: -o-transform 0.6s ease-out;
transition: transform 0.6s ease-out;
}
/* активируем модальный блок */
.overlay:target+.popup {
-webkit-transform: translate(-50%, 0);
-ms-transform: translate(-50%, 0);
-o-transform: translate(-50%, 0);
transform: translate(-50%, 0);
top: 20%;
}
/* формируем кнопку закрытия */
.close {
top: -10px;
right: -10px;
width: 20px;
height: 20px;
position: absolute;
padding: 0;
border: 2px solid #ccc;
background-color: rgb(45, 102, 175);
-webkit-box-shadow: 0px 0px 10px #000;
-moz-box-shadow: 0px 0px 10px #000;
box-shadow: 0px 0px 10px #000;
text-align: center;
text-decoration: none;
font: 13px/20px 'Tahoma', Arial, sans-serif;
font-weight: bold;
-webkit-transition: all ease .8s;
-moz-transition: all ease .8s;
-ms-transition: all ease .8s;
-o-transition: all ease .8s;
transition: all ease .8s;
}
.close:before {
color: rgba(255, 255, 255, 0.9);
content: "X";
text-shadow: 0 -1px rgba(0, 0, 0, 0.9);
font-size: 12px;
}
.close:hover {
background-color: rgb(236, 144, 14);
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
/* изображения внутри окна */
.popup img {
width: 100%;
height: auto;
}
/* миниатюры слева/справа */
.pic-left,
.pic-right {
width: 25%;
height: auto;
}
.pic-left {
float: left;
margin: 5px 15px 5px 0;
}
.pic-right {
float: right;
margin: 5px 0 5px 15px;
}
/* элементы м-медиа, фреймы */
.popup embed,
.popup iframe {
top: 0;
right: 0;
bottom: 0;
left: 0;
display:block;
margin: auto;
min-width: 320px;
max-width: 600px;
width: 100%;
}
.popup h2 { /* заголовок 2 */
margin: 0;
color: #008000;
padding: 5px 0px 10px;
text-align: left;
text-shadow: 1px 1px 3px #adadad;
font-weight: 500;
font-size: 1.4em;
font-family: 'Tahoma', Arial, sans-serif;
line-height: 1.3;
}
/* параграфы */
.popup p {margin: 0; padding: 5px 0}
</style>
<div class="big_topics bor_top round3 FFF hr" style="margin-top: 5px;">
<div class="buy_block">
<?if ( $_SESSION['id'] == $config_post['user'] )
{
?>
<input type="submit" class="fb1 round3" value="Ваш товар" />
<a href="/my" class="fb1 round3" style="margin-top: 5px;background: #f1a548 !important; white-space: nowrap;" >Список моих товаров<a/>
<style>
.gallery_block {
position: absolute;
width: 175px;
max-width: 175px;
right: 23px;
top: 160px;
height: 135px;
max-height: 135px;
overflow: hidden;
}
</style>
<?
}else{
?>
<?
if ( !isset( $_SESSION['id'] ) ) {
?>
<form method="GET" action="<?=ROOT?>/offline">
<input type="hidden" name="summa" value="<?=$config_post['cena']?>"/>
<input type="hidden" name="tovar" value="<?=$_GET['id']?>"/>
<input type="hidden" name="key" value="<?=$key_tovar?>"/>
<input type="submit" name="ok" class="fb1 round3" value="Купить" />
<input type="text" name="user_mail" class="iii round3" placeholder="Ваш Email" style="margin-left:0px; margin-top:5px; text-align:center;"/>
</form>
<style>
.gallery_block {
position: absolute;
width: 175px;
max-width: 175px;
right: 23px;
top: 160px;
height: 135px;
max-height: 135px;
overflow: hidden;
}
</style>
<?
} else {
?>
<form method="GET" action="<?=ROOT?>/oplata">
<input type="hidden" name="summa" value="<?=$config_post['cena']?>"/>
<input type="hidden" name="user_mail" value="<?=$_SESSION['id']?>"/>
<input type="hidden" name="tovar" value="<?=$_GET['id']?>"/>
<input type="hidden" name="key" value="<?=$key_tovar?>"/>
<input type="submit" name="ok" class="fb1 round3" value="Купить" />
</form>
<style>
.gallery_block {
position: absolute;
width: 175px;
max-width: 175px;
right: 23px;
top: 160px;
height: 135px;
max-height: 135px;
overflow: hidden;
}
</style>
<a href="#win1" class="fb1 round3" style="margin-top: 5px;background: #f1a548 !important; white-space: nowrap;" >Оставить отзыв <a/>
<?
}
?>
<?}?>
</div>
<div class="gallery_block round3">
<div id='gallery'>
<?
$sql = $pdo->Query("SELECT * FROM `php_gallery` WHERE `tovar` = '".$_GET['id']."'");
while($scr = $sql->Fetch()) {
$patch = $scr['patch'];
?>
<a href="http://e-proger.ru/temp/scrin/<?=$patch?>">
<img src="http://e-proger.ru/gallery.php?id=100&s=50&f=temp/scrin/<?=$patch?>" title="Скриншот" width="167">
</a>
<?}?>
</div>
</div>
<div class="main_top hr_menu"><h1><?=$config_post['title']?></h1><div style="margin: -25px 0px 0 0; float: right;"><i class="fa fa-eye" aria-hidden="true"></i> Просмотров: <b><?=$config_post['view']?></b>
</div></div>
<div class="top_games_small hr_menu" style="border-bottom: solid 1px rgb(255, 255, 255);">Информация о товаре и продавце:</div>
<div class="dev"><br />
<div id="stext_top" style="padding-bottom: 0px;">
Размер: <div style="float:right;"><font color="#1F2124"><b><?=$config_upl['size']?></b></font></div>
<div class="clr3"></div>
Количество продаж данного товара: <div style="float:right;"><font color="#1F2124"> <b><?=$config_post['buy']?></b></font> </div>
<div class="clr3"></div>
Дата размещения: <div style="float:right;"><font color="#1F2124"><b><?=$frd_date?></b></font></div>
<div class="clr3"></div>
Стоимость: <div style="float:right;"><font color="#1F2124"><b><?=$config_post['cena']?> </b><i class="fa fa-rouble"></i></font></div>
<div class="clr3"></div>
Продавец: <div style="float:right;"><font color="#1F2124"><b><?=$config_pr['login']?></b> <?if ( $_SESSION['id'] == $config_post['user'] ){}else{?><?=$btn_mess_reg?><?}?></font></div>
<div class="clr3"></div>
Рейтинг продавца: <div style="float:right;"><font color="#1F2124"><b><?=$config_pr['reyt']?></b></font></div>
<div class="clr3"></div>
Всего продаж у продавца: <div style="float:right;"><font color="#1F2124"><b><?=$config_pr['buy_ok']?></b></font></div>
</div>
</div>
<div class="top_games_small hr_menu">Описание товара:</div>
<table border="0" cellpadding="0" cellspacing="0" id="tables" style="width: 791px;margin-top: 0px;border-bottom: 1px solid rgb(224, 224, 224);border-left: 1px solid rgb(224, 224, 224);border-right: 1px solid rgb(224, 224, 224);border-top: none;">
<tbody>
</tbody><thead>
<tr>
<td align="left" style="padding-left:10px;"><img src="/img/vn.png" align="left" style="margin-top: -1px;margin-right: 10px;" width="20px">Администрация E-PROGER рекоммендует хостинг провайдера AllHostings</td>
<td align="center"><a href="https://allhostings.ru/billing/aff.php?aff=361" target="_blank" class="button -green -cash" style="padding: 5px 15px 5px;">Регистрация!</a></td>
</tr>
</thead>
</table>
<div id="stext"><?=parce_bb_code($config_post['polnaya'])?><br><br>
</div>
<div class="top_games_small hr_menu">Отзывы:</div>
<br>
<?
$sql = $pdo->Query("SELECT * FROM `php_coment` WHERE `idtovar` = '".$_GET[id]."' ORDER BY `id` DESC");
if($sql->RowCount()!=0){
while($depos = $sql->Fetch()) {
$avatar=$pdo->Query("SELECT avatar FROM `php_user` WHERE `id` = '".$depos['iduser']."'")->Fetch();
?>
<div class="comm_bls">
<div class="ava_cooms"><img src="<?=ROOT?>/temp/avatar/<?=$avatar[avatar]?>" alt=""></div>
<div class="name_title_lcom">Пользователь: <?=$depos[user]?> <br><font style="color: #000;font-size: 10px;"> <?= date("Y-m-d H:i:s",$depos[cdate])?></font>
<div style="float:right;margin-right: -60px;width: 110px;margin-top: -10px;" class="rating">
<div class="vote-wrap">
<div class="vote-hover" style="padding: 0px 4px; height: 20px; width: 160px;">
<div class="vote-block">
<div class="vote-stars" style="background: transparent url("img/stars.png") repeat scroll left top / 20px auto; height: 20px; width: 100px;">
</div>
<div class="vote-active" style="background: transparent url("img/stars.png") repeat scroll left bottom / 20px auto; height: 20px; width: <?=20*$depos[reyting]?>px;">
</div>
</div>
</div>
<div class="vote-result">
</div>
<div class="vote-success">
</div>
</div>
</div>
</div>
<div class="short_name_lcom"><?=$depos[coment]?></div>
</div>
<?
}
}else{ echo ' <div class="note note-info" style="margin: 1px 0px 10px 20px;width: 89%;"> Отзывов нет</div>'; }
?>
</div>
<!-- Модальное окно №1 -->
<a href="#x" class="overlay" id="win1"></a>
<div class="popup">
<script type="text/javascript">
$(function(){
$('#rating_1').rating({
fx: 'full',
image: 'img/stars.png'
});
})
</script>
<script type="text/javascript">
function set() {
$.ajax ({
url: 'ajax.php?func=coment',
type: 'POST',
dataType: 'html',
data: $("#set").serialize(),
success: function(data) {
if (data == 1) {
location.href='/post<?=$_GET['id']?>';
}else{
$("#errc").html(data).fadeIn("slow").delay( 900 ).fadeOut("slow");
}
}
});
}
</script>
<form style="margin-left:10px;" method="POST" id="set">
<div id="errc" class="note note-danger" style="display:none; margin-bottom: -10px;"></div>
<div class="padd10"></div><div class="top_games_mini">Оценка:</div> <div id="rating_1"><input name="vote-id" value="1" type="hidden"></div>
<input name="idtovar" value="<?=$_GET['id']?>" type="hidden">
<div class="padd10"></div><div class="top_games_mini">Комментарий:</div><textarea class="round3" maxlength="500" placeholder="комментарий" style="width:97% !important; padding: 10px 5px; height: 50px; resize: vertical; background:#f7f7f7; border: solid 1px #DDD;" rows="7" id="coment" name="coment"></textarea>
<div class="padd10"></div><input type="submit" style="padding:10px 25px;margin-left:225px;" class="fb round3" value="Отправить" onclick="set(); return false;"></form>
<a class="close"title="Закрыть" href="#close"></a>
</div>