All pastes #2049074 Raw Edit

Unnamed

public php v1 · immutable
#2049074 ·published 2011-04-21 17:10 UTC
rendered paste body
<html><head></head><body>        <!--include external scripts-->        <?php                 require_once("kaltura-php5-client/KalturaClient.php");                //define constants                require_once("ksu-settings.php");        //construct Kaltura objects for session initiation                $config           = new KalturaConfiguration(KALTURA_PARTNER_ID);    $config->serviceUrl = KALTURA_SERVICE_URL;    $client           = new KalturaClient($config);    print_r($client);    $ks               = $client->session->start(KALTURA_PARTNER_WEB_SERVICE_ADMIN_SECRET, KALTURA_PARTNER_ID, KalturaSessionType::ADMIN);    if (!isset($ks)) {      die("Could not establish Kaltura session.session Please verify that you are using valid Kaltura partner credentials.");    }                $client->setKs($ks);  // set the session in the client                                $filter = new KalturaMediaEntryFilter();                $filter->statusEqual = KalturaEntryStatus::READY;                $filter->mediaTypeEqual = KalturaMediaType::VIDEO;                $pager = new KalturaFilterPager();                $pager->pageSize = 50;                $pager->pageIndex = 1;                $list = $client->media->listAction($filter,$pager); // list all of the media items in the partner                //var_dump($list);        ?>        <div id="KalturaGallary" style="position:relative;overflow:hidden;">                <table>                        <?php foreach ($list->objects as $mediaEntry): ?>                                <?php                                         $name     = $mediaEntry->name; // get the entry name                                        $id       = $mediaEntry->id;                                        $thumbUrl = $mediaEntry->thumbnailUrl;  // get the entry thumbnail URL                                        $description = $mediaEntry->description;                                ?>                                <td>                                        <ul style="list-style:none;">                                                <li style="width:120px; height:90px;"><a href="javascript:LoadMedia('<?php echo $id; ?>')">                                                        <img border="0" src="<?php echo $thumbUrl; ?>" >                                                </a></li>                                                <li style="width:120px; height:40px;"><?php echo $name; ?></li>                                        </ul>                                </td>                        <?php endforeach; ?>                </table>        </div>        <script language="javascript">        function LoadMedia(entryId) {                alert (entryId);                console.log(entryId);         }        </script></body></html>