Вход Регистрация
Файл: Luxe-Shop v6.0/application/views/admin/templatesadm/default/review.php
Строк: 62
<style>
    #cont {
    width: 805px;
    }
    #left_review {
    float:left;
    width:400px;
    }
    #right_review {
    float:right;
    width:400px;
    }
                        #comment {
                        width:400px;
                        min-height:50px;
                        margin-top:15px;
                        border-radius:2px;
                        }
                        #comment_name {
                        padding:5px;
                        float:left;
                        color:#111111;
                        font-size:12px;
                        }
                        #comment_time {
                        float:right;
                        color:#111111;
                        font-size:12px;
                        padding:5px;
                        }
                        #comment_text {
                        width:390px;
                        padding:5px;
                        font-size:13px;
                        color:#333333;
                        margin-top:-10px;
                        }
                        </style>
                        <div id="cont">
<div id="left_review">
<? 
                        
$query 
mysql_query("SELECT * FROM `review` WHERE `review`='1' ORDER BY `id` DESC");
while(
$arr mysql_fetch_array($query)) {
if(
== $arr['review']) {
$style 'style="background: #5ff096;margin-top:15px;width:400px;border-radius:2px;"';
}
else {
$style 'style="background: #f8456f;margin-top:15px;width:400px;border-radius:2px;"';
}
echo 
'<div '.$style.' "id="comment">';
echo 
'<div id="comment_name">'.$arr['name'].'</div>';
echo 
'<div id="comment_time">'.$arr['date'].' '.$arr['time'].'</div><br>';
echo 
'<div style="margin-top:5px;"id="comment_text">'.$arr['text'].'</div>';
echo 
'<form method="POST" name="spam" style="display:block;" >
<div style="float:right;color:#333;margin-top:-23px;margin-right:5px;font-size:11px;">
<input name="id" style="display:none;"value="'
.$arr['id'].'">
<input type="submit" name="spam" value="Удалить"></form></div>'
;
echo 
'</div>';
}

                        
?>
                        </div>
                        <div id="right_review">
                        <? 
                        
$query 
mysql_query("SELECT * FROM `review` WHERE `review` = '0' ORDER BY `id` DESC");
while(
$arr mysql_fetch_array($query)) {
if(
== $arr['review']) {
$style 'style="background: #5ff096;margin-top:15px;width:400px;border-radius:2px;"';
}
else {
$style 'style="background: #f8456f;margin-top:15px;width:400px;border-radius:2px;"';
}
echo 
'<div '.$style.' "id="comment">';
echo 
'<div id="comment_name">'.$arr['name'].'</div>';
echo 
'<div id="comment_time">'.$arr['date'].' '.$arr['time'].'</div><br>';
echo 
'<div style="margin-top:5px;"id="comment_text">'.$arr['text'].'</div>';
echo 
'<form method="POST" name="spam" style="display:block;" >
<div style="float:right;color:#333;margin-top:-23px;margin-right:5px;font-size:11px;">
<input name="id" style="display:none;"value="'
.$arr['id'].'">
<input type="submit" name="spam" value="Удалить"></form></div>'
;
echo 
'</div>';
}

                        
?>
                        </div></div>
                        <? 
if(isset($_POST['spam'])) {
mysql_query("DELETE FROM `review` WHERE `id` = '".$_POST['id']."'");
echo 
"<script>alert('Отзыв удален.');</script>";
echo 
'<meta http-equiv="Refresh" content="1; URL=/admin/review">';
}
?>
Онлайн: 1
Реклама