Example #1
0
<?php

require_once 'comm/inc.session.php';
require_once 'lib/class.contents.php';
require_once 'lib/class.favorites.php';
$contentIdx = $_GET['idx'];
$searchWord = $_GET['k'];
$Content = new clsContents($DB->getConnection());
$Favorite = new clsFavorites($DB->getConnection());
$contentData = $Content->getData($contentIdx);
$contentInfo = json_decode($contentData['c_info']);
if ($contentData['c_type'] == "image") {
    $dataUrl = $contentInfo->href;
    $imageUrl = $contentInfo->imgURL;
} else {
    if ($contentData['c_type'] == "music") {
        $dataUrl = $contentInfo->url;
    } else {
        if ($contentData['c_type'] == "video") {
            $dataUrl = $contentInfo->href;
            //$videoUrl = $contentInfo->url;
            $videoUrl = "http://www.youtube.com/embed/" . $contentInfo->id . "?wmode=opaque";
        } else {
            if ($contentData['c_type'] == "doc") {
                $dataUrl = $contentInfo->href;
            }
        }
    }
}
$isFavorite = false;
if (isset($_SESSION['USER_IDX']) && $_SESSION['USER_IDX'] != "") {