load((int)$uid); } catch (PAException $e) { $msg = "Error occured in retreiving user information\n"; $msg .= "
".$e->message."
"; $error = TRUE; } } $login_name = $user->login_name; $first_name = $user->first_name; $last_name = $user->last_name; $email = $user->email; $user_picture = $user->picture; if ($user->picture) { $img_path = $base_url."/files/".$user->picture; } else { $img_path = $base_url."/images/default.jpg"; } // Image album delete try { if(($_GET['action']=='delete_album') && ($uid == $_SESSION['user']['id'])) { $type = "VIDEO_ALBUM"; $album = new Album($type); $album->collection_id = $_GET['alb_id']; $album->album_type = $type; $album->delete(); } } catch (PAException $e) { $msg = "$e->message"; $error = TRUE; } // deleting images try { if($_GET['action']=='delete') { foreach ($_POST as $k=>$v) { $delete_videos_id[] = $k; } array_pop($delete_videos_id); foreach ($delete_videos_id as $id) { $new_image = new Video(); $new_image->content_id = $id; $new_image->delete($id); } } } catch (PAException $e) { $msg = "$e->message"; $error = TRUE; } // FOR VIDEO UPLOAD - START if ($_POST['submit_video'] && !empty($_FILES['userfile_video']['name'])) { $upload = uihelper_upload_gallery ($uid, $_POST, $_FILES, '_video'); if ($upload[3] == TRUE) { $uploaded = TRUE; $msg1 = "Video Uploaded"; } } // Load Video Albums $video_albums = Album::load_all($uid, VIDEO_ALBUM); $video_data = array(); $j=0; foreach ($video_albums as $albums) { $new_album = new Album(VIDEO_ALBUM); $video_data[$j]['album_name'] = $albums['description']; $video_data[$j]['album_id'] = $albums['collection_id']; $new_album->collection_id = $albums['collection_id']; $video_ids = $new_album->get_contents_for_collection(); if (!empty($video_ids)) { $k=0; $ids = array(); for ($i=0; $iload_many($ids); foreach ($data as $d) { $video_data[$j]['video_data'][$k]['content_id'] = $d['content_id']; $video_data[$j]['video_data'][$k]['video_file'] = $d['video_file']; $video_data[$j]['video_data'][$k]['video_caption'] = $d['video_caption']; $video_data[$j]['video_data'][$k]['title'] = $d['title']; $video_data[$j]['video_data'][$k]['body'] = $d['body']; $video_data[$j]['video_data'][$k]['created'] = $d['created']; $k++; } } $j++; } $parameter = js_includes("base"); html_header("user gallery", $parameter); ?> set('msg', $msg); } $content->set('login_name', $login_name); $content->set('first_name', $first_name); $content->set('last_name', $last_name); $content->set('base_url', $base_url); $content->set('uid', $uid); $content->set('msg', $msg); $content->set('error', $upload[1]); $content->set('video_data', $video_data); // header $header = & new Template(CURRENT_THEME_FSPATH."/header.tpl"); $header->set('current_theme_path', $current_theme_path); //$header->set('current_theme_path', $current_theme_path); $header->tier_one_tab = $main_tier; $header->tier_two_tab = $second_tier; $header->tier_three_tab = $third_tier; if ($network_info) { $header->set_object('network_info', $network_info); } $content->set('header', $header); $left_panel = & new Template(CURRENT_THEME_FSPATH."/left_page.tpl"); $left_panel->set('img_path', $img_path); $content->set('left_panel', $left_panel); echo $content->fetch(); $footer = & new Template(CURRENT_THEME_FSPATH."/footer.tpl"); echo $footer->fetch(); ?>