當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Video::load_video方法代碼示例

本文整理匯總了PHP中Video::load_video方法的典型用法代碼示例。如果您正苦於以下問題:PHP Video::load_video方法的具體用法?PHP Video::load_video怎麽用?PHP Video::load_video使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Video的用法示例。


在下文中一共展示了Video::load_video方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: User

}
// To Check private or public page
// tier_one=public&uid=$_SESSION['user']['id'];
if ($_GET['tier_one'] == 'public') {
    $page_type = 'public';
} else {
    if ($uid != $_SESSION['user']['id']) {
        $page_type = 'public';
    }
}
// loading images
$pictures = Image::load_images($uid, 10);
// loading audio
$audios = Audio::load_audio($uid, 10);
// loading video
$videos = Video::load_video($uid, 10);
if ($_SESSION['user']['id']) {
    $user = new User();
    $user->load((int) $uid);
} else {
    header("Location: homepage.php?error=1");
}
// accessing page settings data
$setting_data = ModuleSetting::load_setting(4, $uid);
// user general info
$user_data_general = array();
$user_generaldata = User::load_user_profile($uid, (int) $_SESSION['user']['id'], GENERAL);
for ($i = 0; $i < count($user_generaldata); $i++) {
    $name = $user_generaldata[$i]['name'];
    $value = $user_generaldata[$i]['value'];
    $perm_name = $name . "_perm";
開發者ID:CivicCommons,項目名稱:oldBellCaPA,代碼行數:31,代碼來源:user_privatepage_test.php

示例2: render

 function render()
 {
     $pictures = array();
     $audios = array();
     $videos = array();
     global $base_url, $login_uid;
     $uid_gal = $this->uid;
     if (!empty($uid_gal)) {
         $this->view_all_url = "{$base_url}/media_gallery.php?uid={$uid_gal}";
     }
     if ($this->page == 'homepage') {
         if (isset($_SESSION['user']['id'])) {
             $my_id = $_SESSION['user']['id'];
             $this->uid = $_SESSION['user']['id'];
         } else {
             $my_id = 0;
         }
         if ($this->uid) {
             $u_id = $this->uid;
         } else {
             $u_id = 0;
         }
         $pic = Image::load_recent_media_image(0, $my_id);
         $aud = Audio::load_recent_media_audio(0, $my_id);
         $vid = Video::load_recent_media_video(0, $my_id);
         //even if we got more media, we can display only 6
         if (count($pic) < 6) {
             $max = count($pic);
         } else {
             $max = 6;
         }
         $pictures = array();
         for ($i = 0; $i < $max; $i++) {
             $pictures[$i] = $pic[$i];
         }
         if (count($aud) < 6) {
             $max = count($aud);
         } else {
             $max = 6;
         }
         for ($i = 0; $i < $max; $i++) {
             $audios[$i] = $aud[$i];
         }
         if (count($vid) < 6) {
             $max = count($vid);
         } else {
             $max = 6;
         }
         for ($i = 0; $i < $max; $i++) {
             $videos[$i] = $vid[$i];
         }
     } else {
         if ($this->page == 'grouppage') {
             $pic = Image::load_images_for_collection_id((int) $this->group_details['collection_id']);
             $aud = Audio::load_audios_for_collection_id((int) $this->group_details['collection_id']);
             //$this->links = $audios;
             $vid = Video::load_videos_for_collection_id((int) $this->group_details['collection_id']);
             if (count($pic) < 6) {
                 $max = count($pic);
             } else {
                 $max = 6;
             }
             for ($i = 0; $i < $max; $i++) {
                 $pictures[$i] = $pic[$i];
             }
             if (count($aud) < 6) {
                 $max = count($aud);
             } else {
                 $max = 6;
             }
             for ($i = 0; $i < $max; $i++) {
                 $audios[$i] = $aud[$i];
             }
             if (count($vid) < 6) {
                 $max = count($vid);
             } else {
                 $max = 6;
             }
             for ($i = 0; $i < $max; $i++) {
                 $videos[$i] = $vid[$i];
             }
         } else {
             $pic = Image::load_images($this->uid, 10, $login_uid);
             //$this->links = $pictures;
             $aud = Audio::load_audio($this->uid, 10, $login_uid);
             //$this->links = $audios;
             $vid = Video::load_video($this->uid, 10, $login_uid);
             if (count($pic) < 6) {
                 $max = count($pic);
             } else {
                 $max = 6;
             }
             for ($i = 0; $i < $max; $i++) {
                 $pictures[$i] = $pic[$i];
             }
             if (count($aud) < 6) {
                 $max = count($aud);
             } else {
                 $max = 6;
             }
//.........這裏部分代碼省略.........
開發者ID:CivicCommons,項目名稱:oldBellCaPA,代碼行數:101,代碼來源:ImagesModule.php


注:本文中的Video::load_video方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。