Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once "includes/db.php";
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title><?php echo $config['title']; ?></title>
- <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
- <link rel="stylesheet" type="text/css" href="style/style.css">
- <body>
- <?php
- require_once "includes/header.php";
- ?>
- <?php
- $home = mysqli_query($connection, "SELECT * FROM `forum_head` ORDER BY `id` DESC LIMIT 10 ");
- ?>
- <h3 id="title_up" style="text-align: center;">Записи из форума:</h3>
- <?php
- while ($out_home = mysqli_fetch_assoc($home)) {
- $prem = 0;
- $file = "image/".$out_home['foto'];;
- $exif = exif_read_data ($file, 'COMPUTED');
- $height = $exif['COMPUTED']['Height'];
- $width = $exif['COMPUTED']['Width'];
- if ($height > $width) {
- }elseif($height < $width){
- }
- elseif($height = $width){
- }
- ?>
- <div onclick="location.href='ForumNode.php?id=<?php echo $out_home['forum_id'];?>&title= " id="content_blank" style="">
- <div style="width: 100%; height: 1px;"></div>
- <div id="image">
- <img id="image1<?php echo ++$prem; ?> " onclick="location.href='ForumNode.php?id=<?php echo $out_home['forum_id'];?>&title='" style="" src="image/<?php echo $out_home['foto'];?>" >
- </div>
- <div id="text">
- <p></p>
- <p>
- <a href="ForumNode.php?id=<?php echo $out_home['forum_id'];?>&title="><?php echo mb_substr($out_home['comment'], 0, 350); ?></a>
- </a>
- </p>
- </div>
- </div>
- <?php
- }
- ?>
- <div id="more_info" style="">
- <a style="text-align: center;" href="main_theme.php">Посмотреть больше</a>
- </div>
- </div>
- </div>
- <style type="text/css">
- a:active { outline: 0; }
- #more_info a{
- text-decoration: none;
- color: #FFEAD1;
- margin-left: 13%;
- margin-top: -10px;
- font-size: 20px;
- }
- #content_blank a{
- text-decoration: none;
- color: #000;
- }
- #content_blank{
- width: 100%; margin-left: auto; margin-right: auto; margin-top: 30px; background-color: #efefef; margin-top: 50px; border-radius: 15px;
- }
- img{
- width: 270px; height: 260px;
- }
- #text{
- }
- #more_info{
- width: 220px; margin-left: auto; margin-right: auto; border-radius: 65px; height: 40px; margin-top: 60px; background-color: #EC6550
- }
- @media screen and (min-width: 768px){
- #title_up{
- margin-left: auto;
- margin-right: auto;
- }
- #image{
- margin-right: 21%;
- }
- #content_blank{
- width: 420px;
- }
- img{
- width: 310px;
- height: 310px;
- }
- #text{
- margin-top: 60px;
- width: 400px;
- }
- #more_info{
- margin-left: auto;
- margin-right: auto;
- }
- @media screen and (min-width: 1024px){
- #content_blank{
- width: 570px;
- height: 360px;
- }
- #image{
- margin-left: 20px;
- height: 290px;
- width: 300px;
- }
- #text{
- width: 200px;
- margin-left: 350px;
- margin-top: -300px;
- }
- }
- </style>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement