Example #1
0
                }
                echo '
       </div> 
   </div>
    
   <div class="tab">
       <input type="radio" id="tab-2" name="tab-group-1">
       <label for="tab-2">' . $section5 . '</label>
       
       <div class="content">';
                $query_random = mysql_query("SELECT DISTINCT * FROM articles where visible = '1' AND category_id='5' ORDER by RAND() LIMIT 4", $db);
                if (mysql_num_rows($query_random) > 0) {
                    $row1 = mysql_fetch_array($query_random);
                    do {
                        echo '
                <a href="http://weird-world.ru/view/' . $row1["article_id"] . '-' . ftranslite($row1["title"]) . '">
                <div class="aside_item">
                <div class="hoverread"><div class="read"><i class="icon-forward"></i><br>READ MORE</div></div>
                <div class="aside_image"><img src="http://weird-world.ru/uploads_images/' . $row1['image'] . '" width="230" height="126" alt="' . $row1["title"] . '"></div>
                <div class="a_title">' . $row1['title'] . '</div>
                </div></a>

                ';
                    } while ($row1 = mysql_fetch_array($query_random));
                }
                echo '
       </div> 
   </div>
    
    <div class="tab">
       <input type="radio" id="tab-3" name="tab-group-1">
Example #2
0
<?php

include 'include/connection.php';
include 'include/functions.php';
$id = clear_string($_GET["id"]);
$result = mysql_query("SELECT * FROM articles WHERE id='{$id}' AND visible='1'", $db);
if (mysql_num_rows($result) > 0) {
    $row = mysql_fetch_array($result);
    $title = $row["title"];
    $title1 = ftranslite($row["title"]);
    $keywords = $row['meta_key'];
    $description = $row['meta_desc'];
    $id = $row['id'];
    $img = $row['main_image'];
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>WEIRD WORLD | <?php 
echo $title;
?>
</title>
	<?php 
include 'include/assets.php';
?>

	<meta property="og:type" content="article">
    <meta property="og:title" content="<?php 
Example #3
0
$query = mysql_query("SELECT * FROM articles WHERE visible=1 ORDER BY id DESC", $db);
while ($row = mysql_fetch_array($query)) {
    if ($row["category_id"] == 1) {
        $cat = 'travel';
    }
    echo '
	    <figure class="effect-bubba">
		<img src="uploads_images/main/' . $row["main_image"] . '" alt="' . $row["title"] . '"/>
		<figcaption>';
    if ($row["is_title"] == 1) {
        echo '
			<h2>' . $row["title"] . '</h2>
			<p>' . $row["small_title"] . '</p>';
    }
    echo '
			<a href="' . $cat . '/' . $row["id"] . '-' . ftranslite($row["title"]) . '/">View more</a>
		</figcaption>			
		</figure>';
}
?>
	</div>	
</div>
</div>



<div id="weareintro" class="container-fluid flow grey">
  	<div class="row">
      <div class="headertext tac">
        <p>The "Weird World" site was created just for fun. It contains some ammount of photos from my lovely city - St. Petersburg, Russia and other places where I have been.
        <br>So, welcome in my weird world.</p>
Example #4
0
                $color = 'blue';
            }
            if ($row["category_id"] == 2) {
                $color = 'red';
            }
            if ($row["category_id"] == 3) {
                $color = 'yellow';
            }
            if ($row["category_id"] == 4) {
                $color = 'green';
            }
            if ($row["category_id"] == 5) {
                $color = 'purple';
            }
            echo '
	<a class="post-link" href="http://weird-world.ru/view/' . $row["article_id"] . '-' . ftranslite($row["title"]) . '">
    <div class="post">
    <div  class="layout1" style="background: url(http://weird-world.ru/uploads_images/' . $row['image'] . ')no-repeat; background-size: 100%;"></div>

    <div class="layout2">

        <div class="read_more">
            <i class="fa fa-share fa-3x"></i><br>
            <span><strong>READ MORE</strong></span>
        </div>

        <span class="date">' . $row['date'] . '</span>
    </div>

    <div class="layout3"><span class="title">' . $row['title'] . '</span><br>' . htmlspecialchars_decode($row['mini_description']) . '</div>
    </a>
Example #5
0
 for ($i = 0; $i < count($_FILES['upload_img']['name']); $i++) {
     $error_gallery = "";
     if ($_FILES['upload_img']['name'][$i]) {
         $galleryimgType = $_FILES['upload_img']['type'][$i];
         //тип файла
         $types = array("image/gif", "image/png", "image/jpeg", "image/jpg", "image/pjpeg", "image/x-png");
         //массив
         //расширение картинки
         $imgext = strtolower(preg_replace("#.+\\.([a-z]+)\$#i", "\$1", $_FILES['upload_img']['name'][$i]));
         //папка для загрузки
         $uploaddir = '../uploads_images/';
         //новое сгенерированное имя файла
         if ($_POST["img_title"]) {
             $newfilename = ftranslite($_POST["img_title"]) . '-' . $id . rand(10, 100) . '.' . $imgext;
         } else {
             $newfilename = ftranslite($_POST["article_title"]) . '-' . $id . rand(10, 100) . '.' . $imgext;
         }
         //путь к файлу(папка.файл)
         $uploadfile = $uploaddir . $newfilename;
         if (!in_array($galleryimgType, $types)) {
             $error_gallery = "<p id='form-error'>Допустимые расширения - .gif, .jpeg, .png</p>";
             $_SESSION['answer'] = $error_gallery;
             continue;
         }
         if (empty($error_gallery)) {
             if (@move_uploaded_file($_FILES['upload_img']['tmp_name'][$i], $uploadfile)) {
                 $title = htmlspecialchars($_POST['img_title'], ENT_QUOTES);
                 mysql_query("INSERT INTO uploads_images(item_id, image, title)\n\t\t\t\t\t\t\tVALUES (\n\t\t\t\t\t\t\t\t'" . $article_id . "',\n\t\t\t\t\t\t\t\t'" . $newfilename . "',\n\t\t\t\t\t\t\t\t'" . $title . "'\n\t\t\t\t\t\t\t\t)", $db);
             } else {
                 $_SESSION['answer'] = "Ошибка загрузки файла";
             }
Example #6
0
            </li>
            <li class="google">
              <a class="google-link" href="https://plus.google.com/115226520722662755599">
              <i class="fa fa-google-plus fa-stack-2x"></i>               
              </a>
            </li>
            <li class="instagram">
              <a class="instagram-link" href="http://instagram.com/weird_world.ru/">
              <i class="fa fa-instagram  fa-stack-2x"></i>              
              </a>
            </li>
            </ul>
          </div>     
    </div>
  </div>
</nav>

<template id="nav-template">
  <ul class="nav">
    <li><a href="/">Главная/Main</a></li>
    <li class="sect-title">Места/Places</li>
    <?php 
$query = mysql_query("SELECT * FROM articles WHERE visible=1 and category_id=1 ORDER BY id DESC", $db);
while ($row = mysql_fetch_array($query)) {
    echo '
    <li><a href="http://weird-world.ru/travel/' . $row["id"] . '-' . ftranslite($row["title"]) . '/">' . $row["title"] . '</a></li>';
}
?>

  </ul>
</template>
            $height = intval($ratio * $height);
        } else {
            $img_path = "/images/no-image.png";
            $width = 110;
            $height = 200;
        }
        // Количество отзывов
        $query_reviews = mysql_query("SELECT * FROM table_reviews WHERE products_id = '{$row["products_id"]}' AND moderat='1'", $link);
        $count_reviews = mysql_num_rows($query_reviews);
        echo '
  
  <li>
  <div class="block-images-grid" >
  <img src="' . $img_path . '" width="' . $width . '" height="' . $height . '" />
  </div>
  <p class="style-title-grid" ><a href="http://shop//mobile/' . $row["products_id"] . '-' . ftranslite($row["title"]) . '/" >' . $row["title"] . '</a></p>
  <ul class="reviews-and-counts-grid">
  <li><img src="/images/eye-icon.png" /><p>' . $row["count"] . '</p></li>
  <li><img src="/images/comment-icon.png" /><p>' . $count_reviews . '</p></li>
  </ul>
  <a class="add-cart-style-grid" tid="' . $row["products_id"] . '" ></a>
  <p class="style-price-grid" ><strong>' . group_numerals($row["price"]) . '</strong> руб.</p>
  <div class="mini-features" >
  ' . $row["mini_features"] . '
  </div>
  </li>
  
  ';
    } while ($row = mysql_fetch_array($result));
}
?>