コード例 #1
0
ファイル: init.php プロジェクト: EntityFX/QuikiJAR
function delVideo($postParams)
{
    //$user = new UserFull();
    //$userId = $user->id;
    $userId = 13;
    $se = new VideoThing();
    $vId = $postParams["id"];
    $visitor = $postParams["userId"];
    if ($visitor == $userId) {
        $state = $se->deleteFromMyvideos($userId, $vId) ? "Удалено." : "Ошибка.";
    } else {
        $state = "Ошибка удаления.";
    }
    return iconv("windows-1251", "utf-8", $state);
}
コード例 #2
0
ファイル: init.php プロジェクト: EntityFX/QuikiJAR
function drawOneVideo($videoId)
{
    $dr = new VideoThing();
    $resArr = $dr->getVideo($videoId);
    $url = "http://www.youtube.com/v/" . $videoId . "?fs=1";
    $title = $resArr["VideoTitle"];
    $obj = "<object width=\"425\" height=\"344\">\n\t\t<param name=\"movie\" value=\"{$url}\"></param>\n\t\t<param name=\"allowFullScreen\" value=\"true\"></param>\n\t\t<embed src=\"{$url}\"\n\t\t  type=\"application/x-shockwave-flash\"\n\t\t  allowfullscreen=\"true\"\n\t\t  width=\"425\" height=\"344\">\n\t\t</embed>\n\t\t</object>";
    $addInput = "<input type=\"button\" id=\"addVideo{$videoId}\" value=\"Добавить к себе\" onClick=\"addVideo('{$videoId}','{$title}')\">";
    $delInput = "<input type=\"button\" id=\"delVideo{$videoId}\" value=\"Удалить\" onClick=\"delVideo('{$key['id']}','{$visitor}')\"> ";
    $div = "<div> {$obj} </div> <div>{$title} </div>";
    return $div;
}