598 lines
21 KiB
PHP
598 lines
21 KiB
PHP
|
|
<?php
|
||
|
|
/* $Id: browse_classifieds.php 152 2009-04-02 20:50:48Z john $ */
|
||
|
|
|
||
|
|
$page = "general";
|
||
|
|
include "header.php";
|
||
|
|
|
||
|
|
function grabcomments()
|
||
|
|
{
|
||
|
|
global $url, $id, $database;
|
||
|
|
$query = $database->database_query("SELECT * FROM bate_videocomments WHERE object_id='".$id."' ORDER BY id DESC");
|
||
|
|
while($row=$database->database_fetch_array($query))
|
||
|
|
{
|
||
|
|
$owner1=new SEUser(Array($row["authoruser_id"]));
|
||
|
|
|
||
|
|
?>
|
||
|
|
<div style="margin-top: 10px; margin-bottom: 20px;"><div style="float: left; text-align: center; width: 90px;"><a href="<?=$url->url_create('profile', $owner1->user_info["user_username"])?>">
|
||
|
|
|
||
|
|
<?php $profilepicture=$owner1->user_photo("./images/nophoto.png");
|
||
|
|
echo $owner1->userprofiledot($profilepicture, "75px");?>
|
||
|
|
|
||
|
|
</a></div><div style="overflow: hidden;"><div class="profile_comment_author"><a href="<?=$url->url_create('profile', $owner1->user_info["user_username"])?>"><b><?=$owner1->user_displayname?></b></a></div><div class="profile_comment_date"><?=date('n/j/Y g:i A', $row["date"])?></div><div class="profile_comment_body" id="profile_comment_body_14612"><?=$row["body"]?></div><div class="profile_comment_links"><a data-toggle="modal" data-target="#myModal" href="user_messages_new.php?to_user=<?=$owner->user_info["user_username"]?>&to_id=<?=$owner->user_info["user_username"]?>">Message</a> </div></div></div>
|
||
|
|
<?
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
function general()
|
||
|
|
{
|
||
|
|
global $database, $user;
|
||
|
|
if(isset($_POST['id'])) { $id = $_POST['id']; } elseif(isset($_GET['id'])) { $id = $_GET['id']; } else { $id = 0; }
|
||
|
|
$query = $database->database_query("SELECT * FROM bate_videos WHERE id='".$database->database_real_escape_string($id)."' AND approved=1");
|
||
|
|
$row = $database->database_fetch_assoc($query);
|
||
|
|
?>
|
||
|
|
<style>
|
||
|
|
.jp-controls button, .jp-volume-controls button, .jp-toggles button{
|
||
|
|
box-sizing: border-box;
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
.watermark{position:absolute; top:20px; z-index: 10000;}
|
||
|
|
</style>
|
||
|
|
|
||
|
|
|
||
|
|
<span style="font-size:15pt; font-weight:bold; "><?php echo $row["title"];?></span><br>
|
||
|
|
<br>
|
||
|
|
|
||
|
|
<?php echo html_entity_decode($row["description"]);?>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<br>
|
||
|
|
<br>
|
||
|
|
|
||
|
|
|
||
|
|
<script type="text/javascript" src="https://n2h5a5n4.ssl.hwcdn.net/include/videoplayer/start/java/FWDUVPlayer.js"></script>
|
||
|
|
|
||
|
|
<!-- Setup video player-->
|
||
|
|
<script type="text/javascript">
|
||
|
|
FWDUVPUtils.onReady(function(){
|
||
|
|
|
||
|
|
new FWDUVPlayer({
|
||
|
|
//main settings
|
||
|
|
instanceName:"player1",
|
||
|
|
parentId:"myDiv",
|
||
|
|
playlistsId:"playlists",
|
||
|
|
mainFolderPath:"https://n2h5a5n4.ssl.hwcdn.net/include/videoplayer/start/content",
|
||
|
|
skinPath:"classic_skin_dark",
|
||
|
|
displayType:"responsive",
|
||
|
|
initializeOnlyWhenVisible:"no",
|
||
|
|
useVectorIcons:"no",
|
||
|
|
fillEntireVideoScreen:"no",
|
||
|
|
fillEntireposterScreen:"yes",
|
||
|
|
goFullScreenOnButtonPlay:"no",
|
||
|
|
playsinline:"yes",
|
||
|
|
privateVideoPassword:"428c841430ea18a70f7b06525d4b748a",
|
||
|
|
youtubeAPIKey:"",
|
||
|
|
useHEXColorsForSkin:"no",
|
||
|
|
normalHEXButtonsColor:"#666666",
|
||
|
|
googleAnalyticsTrackingCode:"",
|
||
|
|
useResumeOnPlay:"no",
|
||
|
|
useDeepLinking:"no",
|
||
|
|
showPreloader:"yes",
|
||
|
|
preloaderBackgroundColor:"#000000",
|
||
|
|
preloaderFillColor:"#FFFFFF",
|
||
|
|
addKeyboardSupport:"no",
|
||
|
|
autoScale:"yes",
|
||
|
|
showButtonsToolTip:"yes",
|
||
|
|
stopVideoWhenPlayComplete:"no",
|
||
|
|
playAfterVideoStop:"no",
|
||
|
|
autoPlay:"no",
|
||
|
|
loop:"no",
|
||
|
|
shuffle:"no",
|
||
|
|
showErrorInfo:"yes",
|
||
|
|
maxWidth:1160,
|
||
|
|
maxHeight:552,
|
||
|
|
volume:.8,
|
||
|
|
buttonsToolTipHideDelay:1.5,
|
||
|
|
backgroundColor:"#000000",
|
||
|
|
videoBackgroundColor:"#000000",
|
||
|
|
posterBackgroundColor:"#000000",
|
||
|
|
buttonsToolTipFontColor:"#5a5a5a",
|
||
|
|
//logo settings
|
||
|
|
showLogo:"yes",
|
||
|
|
hideLogoWithController:"no",
|
||
|
|
logoPosition:"topRight",
|
||
|
|
logoLink:"",
|
||
|
|
logoPath:"/images/watermark1.png",
|
||
|
|
logoMargins:10,
|
||
|
|
//playlists/categories settings
|
||
|
|
showPlaylistsSearchInput:"no",
|
||
|
|
usePlaylistsSelectBox:"no",
|
||
|
|
showPlaylistsButtonAndPlaylists:"no",
|
||
|
|
showPlaylistsByDefault:"no",
|
||
|
|
thumbnailSelectedType:"opacity",
|
||
|
|
startAtPlaylist:0,
|
||
|
|
buttonsMargins:15,
|
||
|
|
thumbnailMaxWidth:350,
|
||
|
|
thumbnailMaxHeight:350,
|
||
|
|
horizontalSpaceBetweenThumbnails:40,
|
||
|
|
verticalSpaceBetweenThumbnails:40,
|
||
|
|
inputBackgroundColor:"#333333",
|
||
|
|
inputColor:"#999999",
|
||
|
|
//playlist settings
|
||
|
|
showPlaylistButtonAndPlaylist:"yes",
|
||
|
|
playlistPosition:"bottom",
|
||
|
|
showPlaylistByDefault:"yes",
|
||
|
|
showPlaylistName:"yes",
|
||
|
|
showSearchInput:"no",
|
||
|
|
showLoopButton:"yes",
|
||
|
|
showShuffleButton:"yes",
|
||
|
|
showPlaylistOnFullScreen:"no",
|
||
|
|
showNextAndPrevButtons:"yes",
|
||
|
|
showThumbnail:"yes",
|
||
|
|
forceDisableDownloadButtonForFolder:"yes",
|
||
|
|
addMouseWheelSupport:"yes",
|
||
|
|
startAtRandomVideo:"no",
|
||
|
|
stopAfterLastVideoHasPlayed:"no",
|
||
|
|
addScrollOnMouseMove:"no",
|
||
|
|
randomizePlaylist:'no',
|
||
|
|
folderVideoLabel:"VIDEO ",
|
||
|
|
playlistRightWidth:310,
|
||
|
|
playlistBottomHeight:150,
|
||
|
|
startAtVideo:0,
|
||
|
|
maxPlaylistItems:50,
|
||
|
|
thumbnailWidth:71,
|
||
|
|
thumbnailHeight:71,
|
||
|
|
spaceBetweenControllerAndPlaylist:1,
|
||
|
|
spaceBetweenThumbnails:1,
|
||
|
|
scrollbarOffestWidth:10,
|
||
|
|
scollbarSpeedSensitivity:.5,
|
||
|
|
playlistBackgroundColor:"#000000",
|
||
|
|
playlistNameColor:"#FFFFFF",
|
||
|
|
thumbnailNormalBackgroundColor:"#1b1b1b",
|
||
|
|
thumbnailHoverBackgroundColor:"#313131",
|
||
|
|
thumbnailDisabledBackgroundColor:"#272727",
|
||
|
|
searchInputBackgroundColor:"#000000",
|
||
|
|
searchInputColor:"#bdbdbd",
|
||
|
|
youtubeAndFolderVideoTitleColor:"#FFFFFF",
|
||
|
|
folderAudioSecondTitleColor:"#999999",
|
||
|
|
youtubeOwnerColor:"#bdbdbd",
|
||
|
|
youtubeDescriptionColor:"#bdbdbd",
|
||
|
|
mainSelectorBackgroundSelectedColor:"#FFFFFF",
|
||
|
|
mainSelectorTextNormalColor:"#FFFFFF",
|
||
|
|
mainSelectorTextSelectedColor:"#000000",
|
||
|
|
mainButtonBackgroundNormalColor:"#212021",
|
||
|
|
mainButtonBackgroundSelectedColor:"#FFFFFF",
|
||
|
|
mainButtonTextNormalColor:"#FFFFFF",
|
||
|
|
mainButtonTextSelectedColor:"#000000",
|
||
|
|
//controller settings
|
||
|
|
showController:"yes",
|
||
|
|
showControllerWhenVideoIsStopped:"yes",
|
||
|
|
showNextAndPrevButtonsInController:"no",
|
||
|
|
showRewindButton:"yes",
|
||
|
|
showPlaybackRateButton:"yes",
|
||
|
|
showVolumeButton:"yes",
|
||
|
|
|
||
|
|
showTime:"yes",
|
||
|
|
showQualityButton:"yes",
|
||
|
|
showInfoButton:"no",
|
||
|
|
showDownloadButton:"no",
|
||
|
|
showShareButton:"no",
|
||
|
|
showEmbedButton:"no",
|
||
|
|
showChromecastButton:"yes",
|
||
|
|
showFullScreenButton:"yes",
|
||
|
|
disableVideoScrubber:"no",
|
||
|
|
showScrubberWhenControllerIsHidden:"yes",
|
||
|
|
showMainScrubberToolTipLabel:"yes",
|
||
|
|
showDefaultControllerForVimeo:"no",
|
||
|
|
repeatBackground:"no",
|
||
|
|
controllerHeight:42,
|
||
|
|
controllerHideDelay:3,
|
||
|
|
startSpaceBetweenButtons:10,
|
||
|
|
spaceBetweenButtons:10,
|
||
|
|
scrubbersOffsetWidth:2,
|
||
|
|
mainScrubberOffestTop:16,
|
||
|
|
timeOffsetLeftWidth:2,
|
||
|
|
timeOffsetRightWidth:3,
|
||
|
|
timeOffsetTop:0,
|
||
|
|
volumeScrubberHeight:80,
|
||
|
|
volumeScrubberOfsetHeight:12,
|
||
|
|
timeColor:"#bdbdbd",
|
||
|
|
youtubeQualityButtonNormalColor:"#bdbdbd",
|
||
|
|
youtubeQualityButtonSelectedColor:"#FFFFFF",
|
||
|
|
scrubbersToolTipLabelBackgroundColor:"#FFFFFF",
|
||
|
|
scrubbersToolTipLabelFontColor:"#5a5a5a",
|
||
|
|
//advertisement on pause window
|
||
|
|
aopwTitle:"Advertisement",
|
||
|
|
aopwWidth:400,
|
||
|
|
aopwHeight:240,
|
||
|
|
aopwBorderSize:6,
|
||
|
|
aopwTitleColor:"#FFFFFF",
|
||
|
|
//subtitle
|
||
|
|
subtitlesOffLabel:"Subtitle off",
|
||
|
|
//popup add windows
|
||
|
|
showPopupAdsCloseButton:"yes",
|
||
|
|
//embed window and info window
|
||
|
|
embedAndInfoWindowCloseButtonMargins:15,
|
||
|
|
borderColor:"#333333",
|
||
|
|
mainLabelsColor:"#FFFFFF",
|
||
|
|
secondaryLabelsColor:"#bdbdbd",
|
||
|
|
shareAndEmbedTextColor:"#5a5a5a",
|
||
|
|
inputBackgroundColor:"#000000",
|
||
|
|
inputColor:"#FFFFFF",
|
||
|
|
//login
|
||
|
|
playIfLoggedIn:"no",
|
||
|
|
playIfLoggedInMessage:"Please <a href='https://google.com' target='_blank'>login</a> to play this video.",
|
||
|
|
//audio visualizer
|
||
|
|
audioVisualizerLinesColor:"#0099FF",
|
||
|
|
audioVisualizerCircleColor:"#FFFFFF",
|
||
|
|
//lightbox settings
|
||
|
|
closeLightBoxWhenPlayComplete:"no",
|
||
|
|
lightBoxBackgroundOpacity:.6,
|
||
|
|
lightBoxBackgroundColor:"#000000",
|
||
|
|
//sticky on scroll
|
||
|
|
stickyOnScroll:"no",
|
||
|
|
stickyOnScrollShowOpener:"yes",
|
||
|
|
stickyOnScrollWidth:"700",
|
||
|
|
stickyOnScrollHeight:"394",
|
||
|
|
//sticky display settings
|
||
|
|
showOpener:"yes",
|
||
|
|
showOpenerPlayPauseButton:"yes",
|
||
|
|
verticalPosition:"bottom",
|
||
|
|
horizontalPosition:"center",
|
||
|
|
showPlayerByDefault:"yes",
|
||
|
|
animatePlayer:"yes",
|
||
|
|
openerAlignment:"right",
|
||
|
|
mainBackgroundImagePath:"https://n2h5a5n4.ssl.hwcdn.net/include/videoplayer/start/content/minimal_skin_dark/main-background.png",
|
||
|
|
openerEqulizerOffsetTop:-1,
|
||
|
|
openerEqulizerOffsetLeft:3,
|
||
|
|
offsetX:0,
|
||
|
|
offsetY:0,
|
||
|
|
//playback rate / speed
|
||
|
|
defaultPlaybackRate:1, //0.25, 0.5, 1, 1.25, 1.2, 2
|
||
|
|
//cuepoints
|
||
|
|
executeCuepointsOnlyOnce:"no",
|
||
|
|
//annotations
|
||
|
|
showAnnotationsPositionTool:"no",
|
||
|
|
//ads
|
||
|
|
openNewPageAtTheEndOfTheAds:"no",
|
||
|
|
adsButtonsPosition:"left",
|
||
|
|
skipToVideoText:"You can skip to video in: ",
|
||
|
|
skipToVideoButtonText:"Skip Ad",
|
||
|
|
adsTextNormalColor:"#bdbdbd",
|
||
|
|
adsTextSelectedColor:"#FFFFFF",
|
||
|
|
adsBorderNormalColor:"#444444",
|
||
|
|
adsBorderSelectedColor:"#FFFFFF",
|
||
|
|
//a to b loop
|
||
|
|
useAToB:"yes",
|
||
|
|
atbTimeBackgroundColor:"transparent",
|
||
|
|
atbTimeTextColorNormal:"#888888",
|
||
|
|
atbTimeTextColorSelected:"#FFFFFF",
|
||
|
|
atbButtonTextNormalColor:"#888888",
|
||
|
|
atbButtonTextSelectedColor:"#FFFFFF",
|
||
|
|
atbButtonBackgroundNormalColor:"#FFFFFF",
|
||
|
|
atbButtonBackgroundSelectedColor:"#000000",
|
||
|
|
//thumbnails preview
|
||
|
|
thumbnailsPreviewWidth:196,
|
||
|
|
thumbnailsPreviewHeight:110,
|
||
|
|
thumbnailsPreviewBackgroundColor:"#000000",
|
||
|
|
thumbnailsPreviewBorderColor:"#666",
|
||
|
|
thumbnailsPreviewLabelBackgroundColor:"#666",
|
||
|
|
thumbnailsPreviewLabelFontColor:"#FFF",
|
||
|
|
// context menu
|
||
|
|
showContextmenu:'yes',
|
||
|
|
showScriptDeveloper:"no",
|
||
|
|
contextMenuBackgroundColor:"#1f1f1f",
|
||
|
|
contextMenuBorderColor:"#1f1f1f",
|
||
|
|
contextMenuSpacerColor:"#333",
|
||
|
|
contextMenuItemNormalColor:"#666666",
|
||
|
|
contextMenuItemSelectedColor:"#FFFFFF",
|
||
|
|
contextMenuItemDisabledColor:"#333"
|
||
|
|
});
|
||
|
|
});
|
||
|
|
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<div id="myDiv" style="position:relative; left:0px; top:0px;"></div>
|
||
|
|
|
||
|
|
<ul id="playlists" style="display:none;">
|
||
|
|
|
||
|
|
|
||
|
|
<li data-source="mixedPlaylist" data-playlist-name="" data-thumbnail-path="">
|
||
|
|
<p class="fwduvp-categories-title"><span class="fwduvp-header">Title: </span><span class="fwduvp-title"></span></p>
|
||
|
|
<p class="fwduvp-categories-type"><span class="fwduvp-header">Type: </span>HTML</p>
|
||
|
|
<p class="fwduvp-categories-description"><span class="fwduvp-header">Description: </span>Favorited Videos</p>
|
||
|
|
</li>
|
||
|
|
|
||
|
|
|
||
|
|
</ul>
|
||
|
|
|
||
|
|
<!-- HTML playlist -->
|
||
|
|
|
||
|
|
|
||
|
|
<!-- HTML mixed playlist -->
|
||
|
|
<ul id="mixedPlaylist" style="display:none;">
|
||
|
|
<?php
|
||
|
|
$videoplay="<li data-thumb-source=\"https://n2h5a5n4.ssl.hwcdn.net/bate_videos/".$id."_thumb.jpg\" data-video-source=\"[";
|
||
|
|
|
||
|
|
if($row["1080"]==1){$videoplay.="{source:'https://n2h5a5n4.ssl.hwcdn.net/bate_videos/".$id."-1080.mp4', label:'1080p'}";}
|
||
|
|
if($row["720"]==1){if($row["1080"]==1){$videoplay.=",";}
|
||
|
|
$videoplay.="{source:'https://n2h5a5n4.ssl.hwcdn.net/bate_videos/".$id."-720.mp4', label:'720p'}";}
|
||
|
|
if($row["480"]==1){if($row["1080"]==1||$row["720"]==1){$videoplay.=",";}
|
||
|
|
$videoplay.="{source:'https://n2h5a5n4.ssl.hwcdn.net/bate_videos/".$id."-480.mp4', label:'480p'}";}
|
||
|
|
if($row["240"]==1){if($row["1080"]==1||$row["720"]==1||$row["480"]==1){$videoplay.=",";}
|
||
|
|
$videoplay.="{source:'https://n2h5a5n4.ssl.hwcdn.net/bate_videos/".$id."-240.mp4', label:'240p'}";}
|
||
|
|
if($row["1080"]==0&&$row["720"]==0&&$row["240"]==0&&$row["480"]==0){$videoplay.="{source:'https://n2h5a5n4.ssl.hwcdn.net/".$row["video"]."', label:'1080p'}";}
|
||
|
|
/*
|
||
|
|
{if $video.720==1}{if $video.1080==1},{/if}{literal}{source:'https://n2h5a5n4.ssl.hwcdn.net/batortraining/{/literal}{$video_id}-720.mp4', label:'720p'{literal} }{/literal}{/if}
|
||
|
|
{if $video.480==1}{if $video.1080==1||$video.720==1},{/if}{literal}{source:'https://n2h5a5n4.ssl.hwcdn.net/batortraining/{/literal}{$video_id}-480.mp4', label:'480'{literal} }{/literal}{/if}
|
||
|
|
{if $video.240==1}{if $video.1080==1||$video.720==1||$video.480==1},{/if}{literal}{source:'https://n2h5a5n4.ssl.hwcdn.net/batortraining/{/literal}{$video_id}-240.mp4', label:'240'{literal} }{/literal}{/if}
|
||
|
|
{if $video.1080==0&&$video.720==0&&$video.480==0&&$video.240==0}{literal}{source:'{/literal}https://n2h5a5n4.ssl.hwcdn.net/batortraining/{$video_id}.mp4{literal}', label:''}{/literal}{/if}]
|
||
|
|
data-video-source=\"https://n2h5a5n4.ssl.hwcdn.net/batortraining/".$id.".mp4\" data-start-at-video=\"0\"
|
||
|
|
*/
|
||
|
|
|
||
|
|
$videoplay.="]\""; echo $videoplay; ?> data-start-at-video="0" data-poster-source="<?php echo $row["picture"];?>" data-downloadable="no">
|
||
|
|
<div data-video-short-description="">
|
||
|
|
<div>
|
||
|
|
<p class="fwduvp-thumbnail-title"><?php echo $row["title"];?></p>
|
||
|
|
<p class="fwduvp-thumbnail-description"></p>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div data-video-long-description="">
|
||
|
|
<div>
|
||
|
|
<p class="fwduvp-video-title"><?php echo $row["title"];?></p>
|
||
|
|
<p class="fwduvp-video-main-description"></p>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</li>
|
||
|
|
|
||
|
|
</ul>
|
||
|
|
<?php
|
||
|
|
$total_likes=$database->database_result($database->database_query("SELECT COUNT(*) FROM likedbatetube WHERE media_id='".$id."'"),0);
|
||
|
|
|
||
|
|
$likedmedia=$database->database_query("SELECT * FROM likedbatetube, se_users WHERE likedbatetube.user_id='".$user->user_info["user_id"]."' AND likedbatetube.user_id=se_users.user_id AND media_id={$id}");
|
||
|
|
if($database->database_num_rows($likedmedia)>0){$likedmedia=1;}else{$likedmedia=0;}
|
||
|
|
|
||
|
|
|
||
|
|
?>
|
||
|
|
<div style='float: left; padding-left: 25px; padding-top: 5px;'><a href="javascript:void(0);" onclick="likecontent('batetube', '<?php echo $id;?>', 'blogomedia', '', '');" class="hoverme">
|
||
|
|
<img id="blogomedia" class="blogo <?php if($likedmedia==1){echo "liked";}?>" src="images/clearblogo.png"> <span id="liketext">Like<?php if($likedmedia==1){echo "d";}?></span></a></div>
|
||
|
|
<div class="pull-right" class="padding-top: 5px;"><a href="javascript:void(0);" onclick="showthelikes();" data-toggle="modal" data-target="#myModal">Likes: <span id="blogomedialikes"><?php if($total_likes==""){echo 0;}else{echo $total_likes;}?></span></a></div>
|
||
|
|
<div class="clearfix"></div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
Long videos may take some time to buffer
|
||
|
|
|
||
|
|
<br>
|
||
|
|
<br>
|
||
|
|
<div class="col-sm-11">
|
||
|
|
|
||
|
|
|
||
|
|
<?php $commentcount = $database->database_result($database->database_query("SELECT COUNT(*) FROM bate_videocomments WHERE object_id='".$id."'"),0);
|
||
|
|
if($commentcount==""){$commentcount=0;}
|
||
|
|
if($row["is_converted"]==0){}else{
|
||
|
|
?>
|
||
|
|
<div id="profile_<?php echo $row["id"];?>_postcomment"><div class="comment_headline">Comments (<span class="tc" id="totalcomments"><?php echo $commentcount;?></span>)</div>
|
||
|
|
|
||
|
|
<form action="comments.php" method="post" onsubmit="return updatecount1();"><div class="profile_postcomment"><textarea name="comment" id="comment_body" cols="25" class="comment_area" style="overflow: hidden; height: 70px;" placeholder="Write Something..."></textarea><div style="margin-top: 5px;">Allowed HTML Tags: b, img, a, br</div><div style="text-align: right; margin-top: 5px;">
|
||
|
|
|
||
|
|
<input type="submit" id="comment_submit" class="button" value="Post Comment" />
|
||
|
|
<input type="hidden" name="object_id" id="object_id" value="<?php echo $row["id"];?>">
|
||
|
|
<input type="hidden" name="user" id="user" value="<?php echo $user->user_info["user_id"];?>">
|
||
|
|
<input type="hidden" name="object" id="object" value="bate_videocomments">
|
||
|
|
|
||
|
|
<input type="hidden" name="task" id="task" value="comment_post">
|
||
|
|
<input type="hidden" name="type" id="type" value="bate_video">
|
||
|
|
<input type="hidden" name="iden" id="iden" value="id">
|
||
|
|
<input type="hidden" name="value" id="value" value="<?php echo $row["id"];?>">
|
||
|
|
<input type="hidden" name="object_owner" id="object_owner" value="bate_video">
|
||
|
|
<input type="hidden" name="object_owner_id" id="object_owner_id" value="<?php echo $row["id"];?>">
|
||
|
|
<input type="hidden" name="tab" id="tab" value="bate_video">
|
||
|
|
<input type="hidden" name="col" id="col" value="bate_video">
|
||
|
|
<input type="hidden" name="child" id="child" value="1"></div><div id="comment_error" style="color: #FF0000; display: none;"></div></div></form>
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
<div id="bate_video_profile_comments" style='margin-left: auto; margin-right: auto;'></div>
|
||
|
|
<?php }?>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
|
||
|
|
function loadXMLDoc(page)
|
||
|
|
{/*
|
||
|
|
var xmlhttp;
|
||
|
|
|
||
|
|
if (window.XMLHttpRequest)
|
||
|
|
{// code for IE7+, Firefox, Chrome, Opera, Safari
|
||
|
|
xmlhttp=new XMLHttpRequest();
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{// code for IE6, IE5
|
||
|
|
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
||
|
|
}
|
||
|
|
xmlhttp.onreadystatechange=function()
|
||
|
|
{
|
||
|
|
|
||
|
|
if (xmlhttp.readyState==4 && xmlhttp.status==200)
|
||
|
|
{
|
||
|
|
|
||
|
|
|
||
|
|
document.getElementById("{/literal}batortraining_profile_comments{literal}").innerHTML=xmlhttp.responseText;
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
xmlhttp.open("GET","{/literal}grabprofilecomments.php?user={$owner->user_info.user_username}&url={$smarty.server.PHP_SELF}{if $smarty.server.QUERY_STRING!=""}?{$smarty.server.QUERY_STRING|urlencode}{/if}&p="+page+"&type=batortraining&tab=batortraining&child=1&col=batortraining&focus=id&object_owner=batortraining&object_owner_id={$video.id}&id={$video.id}{literal}",true);
|
||
|
|
|
||
|
|
xmlhttp.send();*/
|
||
|
|
jQuery("#bate_video_profile_comments").load("grabprofilecomments.php?user=<?php echo $owner->user_info.user_username;?>&url=<?php echo $_SERVER["PHP_SELF"]; if($_SERVER["QUERY_STRING"]!="")echo "?"; echo urlencode($_SERVER["QUERY_STRING"]);?>}&p="+page+"&type=bate_video&customcomments=1&tab=bate_video&child=1&col=bate_video&focus=id&object_owner=bate_video&object_owner_id=<?php echo $row["id"];?>&id=<?php echo $row["id"];?>", function(responseTxt, statusTxt, xhr){
|
||
|
|
if(xhr.state() == "resolved"){
|
||
|
|
// alert(statusTxt);
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
e.preventdefault();
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
//alert(xhr.state());
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
function editVideo(id, title, desc, search, privacy, comments)
|
||
|
|
{
|
||
|
|
|
||
|
|
$('video_id').value = id;
|
||
|
|
|
||
|
|
$('video_title').defaultValue = title;
|
||
|
|
|
||
|
|
$('video_title').value = title;
|
||
|
|
|
||
|
|
$('video_desc').defaultValue = desc;
|
||
|
|
|
||
|
|
$('video_desc').value = desc;
|
||
|
|
|
||
|
|
if( $('video_search_'+search) )
|
||
|
|
|
||
|
|
{
|
||
|
|
|
||
|
|
$('video_search_'+search).checked = true;
|
||
|
|
|
||
|
|
$('video_search_'+search).defaultChecked = true;
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
if( $('privacy_'+privacy) )
|
||
|
|
|
||
|
|
{
|
||
|
|
|
||
|
|
$('privacy_'+privacy).checked = true;
|
||
|
|
|
||
|
|
$('privacy_'+privacy).defaultChecked = true;
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
if( $('comments_'+comments) )
|
||
|
|
|
||
|
|
{
|
||
|
|
|
||
|
|
$('comments_'+comments).checked = true;
|
||
|
|
|
||
|
|
$('comments_'+comments).defaultChecked = true;
|
||
|
|
|
||
|
|
}
|
||
|
|
opendivmodal('editvideo');
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
</script>
|
||
|
|
<script type="text/javascript">
|
||
|
|
var video_id = 0;
|
||
|
|
|
||
|
|
jQuery(function(){
|
||
|
|
|
||
|
|
loadXMLDoc(1);
|
||
|
|
|
||
|
|
document.getElementById('comment_body').value="";
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
function editComment1(commentID)
|
||
|
|
{
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
//var commentContainerElement = $(this.options.type + '_' + this.options.typeID + '_comments');
|
||
|
|
//var commentElement = commentContainerElement.getElement('profile_comment_body_' + commentID);
|
||
|
|
var commentElement = $('profile_comment_body_' + commentID);
|
||
|
|
|
||
|
|
var height = commentElement.offsetHeight + 10;
|
||
|
|
var commentText = commentElement.innerHTML.replace(/<br>/gi, '\r\n').replace(/>/gi, '>');
|
||
|
|
|
||
|
|
var innerHTML = '';
|
||
|
|
innerHTML += "<form action='comments.php' method='post' target='ajaxframe' name='editCommentForm' id='editCommentForm'>";
|
||
|
|
innerHTML += "<textarea name='comment_edit' id='comment_edit_" + commentID + "' style='height: " + height +" px; width: 100%;' onblur='doCommentEdit("+commentID+")'>" + commentText + "</textarea>";
|
||
|
|
innerHTML += "<input type='hidden' name='task' value='comment_edit'>";
|
||
|
|
innerHTML += "<input type='hidden' name='comment_id' value='" + commentID + "'>";
|
||
|
|
innerHTML += "<input type='hidden' name='object_id' value='{$video.id}'><input type='hidden' name='user' value='{$user->user_info.user_id}'><input type='hidden' name='object' value='batortrainingcomments'>";
|
||
|
|
innerHTML += "<input type='hidden' name='type' value='batortraining'>";
|
||
|
|
innerHTML += "<input type='hidden' name='iden' value='id'>";
|
||
|
|
innerHTML += "<input type='hidden' name='value' value='{/literal}{$video.id}{literal}'>";
|
||
|
|
|
||
|
|
innerHTML +=
|
||
|
|
'<input type="hidden" name="tab" value="users">';
|
||
|
|
|
||
|
|
innerHTML +=
|
||
|
|
'<input type="hidden" name="col" value="user">';
|
||
|
|
|
||
|
|
/* if( this.options.typeTabParent ) innerHTML +=
|
||
|
|
'<input type="hidden" name="tab_parent" value="' + this.options.typeTabParent + '">';
|
||
|
|
|
||
|
|
if( this.options.typeColParent ) innerHTML +=
|
||
|
|
'<input type="hidden" name="col_parent" value="' + this.options.typeColParent + '">';
|
||
|
|
|
||
|
|
if( this.options.typeChild ) innerHTML +=
|
||
|
|
'<input type="hidden" name="child" value="1">';
|
||
|
|
*/
|
||
|
|
|
||
|
|
innerHTML += "</form>";
|
||
|
|
|
||
|
|
|
||
|
|
// Inject
|
||
|
|
commentElement.innerHTML = innerHTML;
|
||
|
|
textarea_autogrow('comment_edit_' + commentID);
|
||
|
|
$('comment_edit_' + commentID).focus();
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</script>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
<br>
|
||
|
|
<br>
|
||
|
|
<div id='wholiked' style="display:none;">
|
||
|
|
|
||
|
|
<div class="modal-dialog"><button type="button" class="close main-bg-color alt-text-color orangebg" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i></button><div class="modal-content" style="text-align:left;">
|
||
|
|
Users who liked this video:<br>
|
||
|
|
<?php
|
||
|
|
$likedmedia1=$database->database_query("SELECT * FROM likedbatetube, se_users WHERE likedbatetube.user_id=se_users.user_id AND media_id={$id} ORDER by likedbatetube.id DESC");
|
||
|
|
while($row2=$database->database_fetch_array($likedmedia1))
|
||
|
|
{
|
||
|
|
?>
|
||
|
|
<a href="profile.php?user=<?php echo $row2["user_username"];?>"><?php echo $row2["user_username"];?></a><br>
|
||
|
|
<?php
|
||
|
|
}
|
||
|
|
?>
|
||
|
|
|
||
|
|
|
||
|
|
<br />
|
||
|
|
<br />
|
||
|
|
</div></div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<?php
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
include "footer.php";
|
||
|
|
?>
|