View file worldnews/read.php

File size: 1.81Kb
<?php
$id = intval($_GET["news"]);


define('HOME', $_SERVER[DOCUMENT_ROOT]);

include_once HOME.'/sys/inc/start.php';
$doc = new document(0);
$doc->title = "Новости мира";
echo '<style type="text/css">
.img_news{
	border: 1px #CCCCCC solid;
	 -moz-border-radius: 6px; 
	 -webkit-border-radius: 6px; 
	 -khtml-border-radius:6px; 
	 border-radius: 6px; 
	margin: 12px;
	text-align: center;
}
</style>';

//////

$query = mysql_query("SELECT * FROM `wn_set`");
$row = mysql_fetch_array($query);
$social = $row["social_buttons"];
//////



$query = mysql_query("SELECT * FROM `wn_news` WHERE `id` = '$id'");
if($row = mysql_fetch_array($query))
	{
		

		$listing = new listing();
		if($user->group == 6){
			$post = $listing->post();
			$post->content = '
			<span class = "message">Действия: <a href = "/worldnews/locations/actions.php?act=del&amp;news='.$row["id"].'"><img src = "/sys/images/icons/complaint.png" title = "Удалить"></img></a></span>';
			
		}
		$post = $listing->post();

		$post->title = __('<b>'.$row["title"].'</b> ');
		$post = $listing->post();
		if(!empty($row["image_full"]))
			{
				$img = '<center><img class = "img_news" align = "center" src = "/worldnews/focus.ua/full_img/'.$row["image_full"].'.gif"></img></center>';
			}
			else{
				$img = ' ';
			}
		$post->content = $img.''.$row["text"];
		


		$listing->display();

		if($social == 1){
			echo '<script type="text/javascript" src="//yandex.st/share/share.js"
		charset="utf-8"></script>
		<div class="yashare-auto-init" data-yashareL10n="ru"
		 data-yashareType="none" data-yashareQuickServices="vkontakte,facebook,twitter,odnoklassniki,moimir"

		></div><br />';
		}
		
	}else{
		header("Location: /");
	}

$doc->act('К списку','/worldnews/');






?>