( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ
<?php
if ($_POST['action'] == 'get_info' && (int)$_POST['id'] > 0) {
$catalogid = $_GET["catalogid"];
require_once('../system/classes/CMySQL.php'); // include service classes to work with database and comments
require_once('../system/classes/CMyComments.php');
include('../Connections/videoondemand.php');
require("../DbSql.inc.php");
require("../NewsSql.inc.php");
$db = new NewsSQL($DBName);
// get photo info
$iPid = (int)$_POST['id'];
$aImageInfo = $GLOBALS['MySQL']->getRow("SELECT * FROM `reporta` WHERE catalogid = $catalogid and `newsid` = '{$iPid}'");
// prepare last 10 comments
$sCommentsBlock = $GLOBALS['MyComments']->getComments($iPid);
$aItems = $GLOBALS['MySQL']->getAll("SELECT * FROM `reporta` ORDER by `adddate` ASC"); // get photos info
// Prev & Next navigation
$sNext = $sPrev = '';
$iPrev = (int)$GLOBALS['MySQL']->getOne("SELECT `newsid` FROM `reporta` WHERE catalogid = $catalogid and `newsid` < '{$iPid}' ORDER BY `newsid` DESC LIMIT 1");
$iNext = (int)$GLOBALS['MySQL']->getOne("SELECT `newsid` FROM `reporta` WHERE catalogid = $catalogid and `newsid` > '{$iPid}' ORDER BY `newsid` ASC LIMIT 1");
$sPrevBtn = ($iPrev) ? '<div class="preview_prev" onclick="getPhoto(\''.$iPrev.'\')"><img src="system/template/images/prev.png" alt="prev" /></div>' : '';
$sNextBtn = ($iNext) ? '<div class="preview_next" onclick="getPhoto(\''.$iNext.'\')"><img src="system/template/images/next.png" alt="next" /></div>' : '';
$nameinfo2 = $db->getallugccatalogname();
if (!empty($nameinfo2)){
while (list($key,$val)=each($nameinfo2)) {
$tempcatalogid2 = stripslashes($val["catalogid"]);
$catalogname = stripslashes($val["catalogname"]);
if ($aImageInfo['yanani']==$tempcatalogid2)
{
$link = "$siteaddress2/ugcchannel.php?pic=$iPid&slug=SamanthaBridal";
$catalognameX = "<strong>:</strong> $catalogname <br />
<strong>Link:</strong> $link ";
}
}
}
$nameinfoE = $db->getepisode($aImageInfo['episodeid']);
if (!empty($nameinfoE)){
while (list($key,$val)=each($nameinfoE)) {
$catalogid = stripslashes($val["catalogid"]);
$episodename = stripslashes($val["catalogname"]);
$episodenameX = "<strong>Filed Under:</strong> $episodename";
}
}
$socialmedia = '<iframe width="100%" src="system/socialone.php?url='.$link.'" height="25" frameborder="0" scrolling="no"></iframe>' ;
$socialmedia2 = '<iframe width="100%" height="400" src="system/socialtwo.php?url='.$link.'" height="25" frameborder="0" scrolling="no"></iframe>' ;
require_once('../system/classes/Services_JSON.php');
$oJson = new Services_JSON();
header('Content-Type:text/javascript');
echo $oJson->encode(array(
'data1' => '<img class="fileUnitSpacer" src="'. $siteaddress2.'/taswira.php?width=800&image=/v/uploads/picdir/'. $aImageInfo['original'] .'">' . $sPrevBtn . $sNextBtn,
'data2' => $sCommentsBlock,'data3' => $aImageInfo['title'] , 'data4' => $aImageInfo['content'] , 'data5' => 'Published:'.$aImageInfo['adddate'] , 'data6' => $catalognameX, 'data7' => 'http://www.eziki.tv/'. $aImageInfo['slug'] , 'data8' => $episodenameX , 'data12' => $socialmedia,'data13' => $socialmedia2 , 'data9' => 'Comments('.$aImageInfo['comments_count'] .')'
));
exit;
}