Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.81 KB | None | 0 0
  1. <?php
  2. require_once "includes/db.php";
  3. ?>
  4. <!DOCTYPE html>
  5. <html>
  6. <head>
  7. <title><?php echo $config['title']; ?></title>
  8. <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
  9. <link rel="stylesheet" type="text/css" href="style/style.css">
  10. <body>
  11. <?php
  12. require_once "includes/header.php";
  13. ?>
  14. <?php
  15. $home = mysqli_query($connection, "SELECT * FROM `forum_head` ORDER BY `id` DESC LIMIT 10 ");
  16.  
  17.  
  18. ?>
  19.  
  20.  
  21.  
  22. <h3 id="title_up" style="text-align: center;">Записи из форума:</h3>
  23.  
  24. <?php
  25.  
  26. while ($out_home = mysqli_fetch_assoc($home)) {
  27. $prem = 0;     
  28. $file = "image/".$out_home['foto'];;
  29. $exif = exif_read_data ($file, 'COMPUTED');
  30. $height = $exif['COMPUTED']['Height'];
  31. $width = $exif['COMPUTED']['Width'];
  32.        
  33.  
  34. if ($height > $width) {
  35.    
  36.  
  37.  
  38. }elseif($height < $width){
  39.  
  40. }
  41.  
  42.  elseif($height = $width){
  43.  
  44.  
  45.  }
  46.  
  47. ?>
  48. <div onclick="location.href='ForumNode.php?id=<?php echo $out_home['forum_id'];?>&title= " id="content_blank" style="">
  49.  
  50.  
  51.  
  52.     <div style="width: 100%; height: 1px;"></div>
  53.     <div id="image">
  54.     <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'];?>" >
  55. </div>
  56. <div id="text">
  57.     <p></p>
  58.     <p>
  59.     <a href="ForumNode.php?id=<?php echo $out_home['forum_id'];?>&title="><?php echo mb_substr($out_home['comment'], 0, 350); ?></a>
  60.        
  61.        
  62.         </a>
  63.     </p>
  64. </div>
  65.  
  66.  
  67. </div>
  68.  
  69.  
  70.  
  71.  
  72.  
  73. <?php
  74. }
  75.  
  76. ?>
  77. <div id="more_info" style="">
  78.     <a style="text-align: center;" href="main_theme.php">Посмотреть больше</a>
  79. </div>
  80. </div> 
  81. </div>
  82.  
  83.  
  84.  
  85.  
  86.  
  87. <style type="text/css">
  88. a:active { outline: 0; }
  89.  
  90. #more_info a{
  91. text-decoration: none;
  92. color: #FFEAD1;
  93. margin-left: 13%;
  94. margin-top: -10px;
  95. font-size: 20px;
  96.  
  97. }
  98.     #content_blank a{
  99.         text-decoration: none;
  100.         color: #000;
  101.     }
  102. #content_blank{
  103.     width: 100%; margin-left: auto; margin-right: auto; margin-top: 30px;  background-color: #efefef; margin-top: 50px; border-radius: 15px;
  104. }
  105. img{
  106. width: 270px; height: 260px;
  107.  
  108. }
  109. #text{
  110.    
  111. }
  112. #more_info{
  113.     width: 220px; margin-left: auto; margin-right: auto; border-radius: 65px; height: 40px; margin-top: 60px; background-color: #EC6550
  114. }
  115. @media screen and (min-width: 768px){
  116.     #title_up{
  117.         margin-left: auto;
  118. margin-right: auto;
  119.     }
  120.     #image{
  121.         margin-right: 21%;
  122.        
  123.     }
  124.     #content_blank{
  125.         width: 420px;
  126.     }
  127.     img{
  128.         width: 310px;
  129.         height: 310px;
  130.  
  131.        
  132.     }
  133.  
  134.  
  135.     #text{
  136.         margin-top: 60px;
  137.     width: 400px;
  138. }
  139. #more_info{
  140.     margin-left: auto;
  141. margin-right: auto;
  142. }
  143.  
  144. @media screen and (min-width: 1024px){
  145.     #content_blank{
  146.         width: 570px;
  147.         height: 360px;
  148.     }
  149. #image{
  150.     margin-left: 20px;
  151.     height: 290px;
  152.     width: 300px;
  153. }
  154. #text{
  155.     width: 200px;
  156.     margin-left: 350px;
  157.     margin-top: -300px;
  158. }
  159.  
  160. }
  161. </style>
  162.  
  163.  
  164.  
  165. </body>
  166. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement