GIF89a;
| Direktori : /home/serb/www/ |
| Current File : /home/serb/www/add-myvideos.php |
<?
session_start();
if(!($_SESSION['islogin']))
{
?>
<script language="javascript">
location.href="index.php";
</script>
<? }
include("lib/globals.php");
include("lib/common.php");
include("lib/functions.php");
?>
<?
if ($_POST)
{
$title=$_POST['title'];
$video_name=$_POST['video_name'];
if($_POST['video_type'] == 'Upload Video')
{
if($_FILES['video_upload']['tmp_name'])
{
$ad_videoname=time().$_FILES['video_upload']['name'];
move_uploaded_file($_FILES['video_upload']['tmp_name'],'avtar/'.$ad_videoname);
$sel = "SELECT vid_you2 FROM escort_details where user_id='".$_SESSION['userid']."'";
$res = execute_query($sel);
$row = mysql_fetch_array($res);
if($row['vid_you2'] != "" && file_exists('avtar/'.$row['vid_you2']))
{
unlink('avtar/'.$row['vid_you2']);
}
$sql_ind_escort2="update escort_details set vid_you_title='$title',vid_you2='$ad_videoname',vid_you='' where user_id='".$_SESSION['userid']."'";
execute_query($sql_ind_escort2);
?>
<script language="javascript">
location.href="add-myvideos.php?msg=success";
</script>
<?
}
else
{
?>
<script language="javascript">
location.href="add-myvideos.php?msg=upload_video_error";
</script>
<?
}
}
else if($_POST['video_type'] == 'You Tube')
{
$sel = "SELECT vid_you2 FROM escort_details where id='".$_GET['id']."' and user_id='".$_SESSION['userid']."'";
$res = execute_query($sel);
$row = mysql_fetch_array($res);
if($row['vid_you2'] != "" && file_exists('avtar/'.$row['vid_you2']))
{
unlink('avtar/'.$row['vid_you2']);
}
$sql_ind_escort2="update escort_details set vid_you_title='$title',vid_you='$video_name',vid_you2='' where user_id='".$_SESSION['userid']."'";
execute_query($sql_ind_escort2);
?>
<script language="javascript">
location.href="add-myvideos.php?msg=success";
</script>
<?
}
else
{
?>
<script language="javascript">
location.href="add-myvideos.php?msg=select_video_type";
</script>
<?
}
}
?>
<? include "includes/header_top.php";?>
<body>
<script language="javascript">
function validate()
{
if(document.f22.video_name.value=="" && document.f22.video_upload.value=="")
{
alert("Enter your either Video url or upload a video.");
document.f22.video_name.focus();
return false;
}
}
</script>
<script>
function del_record(id)
{
var msg="Sure to delete your Video with all it's references ? ";
var choice=confirm(msg);
if(choice)
{
var target="delete_video.php?id="+id;
//alert(target);
window.location.href=target;
}
}
</script>
<link rel="stylesheet" href="css/elements.css" />
<script src="js/my_js.js"></script>
<?
$sql_gen="select * from escort_details where user_id='".$_SESSION['userid']."'";
$res_gen=execute_query($sql_gen);
$row_gen=mysql_fetch_array($res_gen);
if($row_gen['gender']=='Male')
{
include "includes/boys-header.php";
} else
{
include "includes/header.php";
}
?>
<div class="main_bg">
<div style="height:32px;"></div>
<div style="width:1000px; margin:0 auto;">
<div class="statedetails">
<div class="stdtls_header">
<span style="color:#000;">Home/My Account
</div>
<div class="stdtls_midder">
<div style="height:10px;"></div>
<?
$sql_postad="select * from escort_details where user_id='".$_SESSION['userid']."' AND status='a'";
$res_postad=execute_query($sql_postad);
$num_postad=mysql_num_rows($res_postad);
$row_postad=mysql_fetch_array($res_postad);
?>
<div class="left_containmain">
<div style=" width:980px; margin:0 auto; margin:0 auto; font-family:'Open Sans',sans-serif; font-size:14px; color:#000;">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<?
$sql_pstad="select * from escort_details where user_id='".$_SESSION['userid']."' ";
$res_pstad=execute_query($sql_pstad);
$num_pstad=mysql_num_rows($res_pstad);
$row_pstad=mysql_fetch_array($res_pstad);
if($num_pstad>0)
{
if($row_pstad['status']=='a')
{
?>
<td class="updatehdrstyle23"><a href="myaccount.php"><img src="images/edit_profile.png" style="vertical-align:middle;" /><br/>My Profile</a></td>
<? }
else
{?>
<td class="updatehdrstyle23"><img src="images/edit_profile.png" style="vertical-align:middle;" /><br/>My Profile</td>
<? }
} else
{ ?>
<td class="updatehdrstyle23"><a href="userpostad.php"><img src="images/add_escort.png" style="vertical-align:middle;" /><br/>Post ad</a></td>
<? } ?>
<td width="20" align="center"><img src="images/accmenudivider.png" /></td>
<td class="updatehdrstyle23"><a href="escortimages.php"><img src="images/my_photo.png" style="width:52px; height:52px; vertical-align:middle" /><br/>My Photos</a></td>
<td width="20" align="center"><img src="images/accmenudivider.png" /></td>
<td class="updatehdrstyle23"><a href="#"><img src="images/my_videos.png" style="width:55px; height:55px; vertical-align:middle" /><br/>My Videos</a></td>
<td width="20" align="center"><img src="images/accmenudivider.png" /></td>
<td class="updatehdrstyle23"><a href="verifyimage.php"><img src="images/verifyimage.png" style="width:55px; height:55px; vertical-align:middle" /><br/> 100% verify</a></td>
<td width="20" align="center"><img src="images/accmenudivider.png" /></td>
<td class="updatehdrstyle23"><a href="add-mytours.php"><img src="images/my_tour.png" style="width:55px; height:55px; vertical-align:middle" /><br/> My Tours</a></td>
<td width="20" align="center"><img src="images/accmenudivider.png" /></td>
<td class="updatehdrstyle23"><img src="images/my_reviews.png" style="width:55px; height:55px; vertical-align:middle" /><br/> My Reviews</td>
<td width="20" align="center"><img src="images/accmenudivider.png" /></td>
<td class="updatehdrstyle23"><a href="blacklist.php"><img src="images/blacklist.png" style="width:55px; height:55px; vertical-align:middle" /><br/>Black List</a></td>
<td width="20" align="center"><img src="images/accmenudivider.png" /></td>
<?
if( $num_postad>0)
{
if($row_postad['ft_ad_status']=='Yes')
{
$todaydate=date('Y-m-d');
$exp=$row_postad['ft_ad_expair'];
if($todaydate>$exp)
{?>
<td class="updatehdrstyle23"><a href="advertise-vipmember.php?estid=<?=$row_postad['id']?>"><img src="images/premium.png" style="width:55px; height:55px; vertical-align:middle" /><br/>Premium</a></td>
<? }
else
{ ?>
<td class="updatehdrstyle23"><img src="images/premium.png" onclick ="div_show()" style="width:55px; height:55px; vertical-align:middle" /><br/>Premium</td>
<? }
}
else
{?>
<td class="updatehdrstyle23"><a href="advertise-vipmember.php?estid=<?=$row_postad['id']?>"><img src="images/premium.png" style="width:55px; height:55px; vertical-align:middle" /><br/>Premium</a></td>
<? } ?>
<? }
else
{?>
<td class="updatehdrstyle23"><img src="images/premium.png" style="width:55px; height:55px; vertical-align:middle" /><br/>Premium</td>
<? } ?>
</tr>
<tr height="8"></tr>
<tr>
<td class="updatehdrstyle23"><a href="escort-harrasment.php"><img src="images/blacklist.png" style="width:55px; height:55px; vertical-align:middle" /><br/>Report Harrasers</a></td>
<td width="20" align="center"><img src="images/accmenudivider.png" /></td>
<td class="updatehdrstyle23"><a href="contact_us.php"><img src="images/support.png" style="width:55px; height:55px; vertical-align:middle" /><br/>Support</a></td>
<td width="20" align="center"><img src="images/accmenudivider.png" /></td>
<td class="updatehdrstyle23"><a href="password-setting.php"><img src="images/settings.png" style="width:55px; height:55px; vertical-align:middle" /><br/>Settings</a></td>
<td width="20" align="center"><img src="images/accmenudivider.png" /></td>
<td class="updatehdrstyle23"><a href="view-own-ad.php?name=<?=$row_postad['nickname']?>&phone=<?=$row_postad['tel_national']?>"><img src="images/viewad.png" style="width:55px; height:55px; vertical-align:middle" /><br/>View Ad</a></td>
<td width="20" align="center"><img src="images/accmenudivider.png" /></td>
<td class="updatehdrstyle23"><a href="remove-account.php"><img src="images/removeacc.png" style="width:55px; height:55px; vertical-align:middle" /><br/>Remove Account/AD</a></td>
<td width="20" align="center"><img src="images/accmenudivider.png" /></td>
<td class="updatehdrstyle23"><a href="mybanner.php"><img src="images/bannericon2.png" style="width:55px; height:55px; vertical-align:middle" /><br/>My Banner</a></td>
<td width="20" align="center"><img src="images/accmenudivider.png" /></td>
<td class="updatehdrstyle23"><a href="logout.php"><img src="images/logout.png" style="width:55px; height:55px; vertical-align:middle" /><br/>Logout</a></td>
</tr>
</table>
</div>
<div id="abc">
<div id="popupContact">
<div class="contactin" >
<!--<form action="sendmail-process.php" method="post" id="form11" name="f1" onSubmit="return validate();" >-->
<div class="deliveredmsg" id="avt25">
<table border="0" cellpadding="0" cellspacing="0" style="margin:0 auto;">
<tr>
<td class="wanttext">
<? $todaydate=date('Y-m-d');
$exp=$row_postad['ft_ad_expair'];
$diff=(strtotime($exp) - strtotime($todaydate)) / (60 * 60 * 24);
$diffday=explode('.',$diff)
?>
<span class="messagetext">You have a current featured ad in progress and it can be renewed in <?=$diffday[0]?> amount of days. </span>
</td>
</tr>
<tr height="10"></tr>
<tr>
<td>
<div style="height:35px;">
</div>
</td>
</tr>
<tr height="10"></tr>
<tr>
<td align="center">
<a href="add-myvideos.php"><img src="images/close.png" /></a>
</td>
</tr>
<tr height="20">
<td></td>
</tr>
</table>
</div>
</div>
</div>
</div>
<br/>
<div style=" width:960px; margin:0 auto; font-family:'Open Sans',sans-serif; font-size:14px; color:#000;">
<div class="postadpagebody">
<h1>My Videos</h1>
<div class="addtourlist">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
function textCounter(field,field2,maxlimit)
{
var countfield = document.getElementById(field2);
if ( field.value.length > maxlimit ) {
field.value = field.value.substring( 0, maxlimit );
return false;
} else {
countfield.value = maxlimit - field.value.length;
}
}
$(document).ready(function() {
$('.regcomactbar').click(function() {
$(this).closest("div").next().slideToggle();
});
$("#regcombutton").click(function () {
$("#regcomcontain").slideToggle();
});
});
</script>
<div id="regcombutton" class="addtourbotton" style="text-align:left !important;">
<img src="images/addvideos.png" /><br/><br/>
</div>
<div id="regcomcontain" style="display:none;">
<form action="<?=$_SERVER['PHP_SELF'] ?>" enctype="multipart/form-data" method="post" name="f22" style="padding: 5px;" onSubmit="return validate();">
<table border="0" cellpadding="0" cellspacing="0" style="margin:0 auto;">
<tr height="10"></tr>
<tr>
<td class="jointext222">Video Title(Optional) :</td>
<td>
<input type="text" id="title" class="main_input" name="title">
</td>
</tr>
<tr height="8"></tr>
<tr>
<td class="jointext222">Video Type</td>
<td><input type="radio" id="video_type1" name="video_type" value="You Tube" onClick="hideshow_video(this.value)"> You Tube <input type="radio" id="video_type2" name="video_type" value="Upload Video" onClick="hideshow_video(this.value)"> Upload Video </td>
</tr>
<tr height="8"></tr>
<tr>
<td id="video_url_td1" class="jointext222"></td>
<td style="display:none;" id="video_url_td2"><input type="text" name="video_name" class="main_input" /><br/>
e.g. http://www.youtube.com/watch?v=LsmnLdeEWdk</td>
</tr>
<tr>
<td id="video_upload_td1" class="jointext222"></td>
<td style="display:none;" id="video_upload_td2"><input type="file" name="video_upload" id="video_upload" class="main_input" />
</td>
</tr>
<tr height="15"></tr>
<tr>
<td colspan="2" align="center">
<input type="image" src="images/submit.png" />
<input type="hidden" name="postid" value="<?=$_GET['pid']?>" />
</td>
</tr>
<tr height="15"></tr>
</table>
</form>
</div>
</div>
<div class="tourlist">
<br/>
<?
$sql_video="Select * from escort_details where user_id='".$_SESSION['userid']."'";
$res_video=execute_query($sql_video);
$num_video=mysql_num_rows($res_video);
$row_profile=mysql_fetch_array($res_video);
$video=explode("=",$row_profile['vid_you']);
$vid_id=end($video);
$vidoe="select * from default_video where id='1'";
$resvid=execute_query($vidoe);
$rowvid=mysql_fetch_array($resvid);
$def_vid=explode("=",$rowvid['video_url']);
$vdef=end($def_vid);
?>
<div style="width:650px; margin-top:10px; margin:0 auto;"><? if($vid_id!=""){?>
<iframe width="450" height="320" src="//www.youtube.com/embed/<?=$vid_id?>?modestbranding=1&rel=0&showinfo=0" frameborder="0" allowfullscreen></iframe>
<? }else if ($row_profile['vid_you2']!=''){
?>
<video width="400" controls>
<source src="avtar/<?php echo $row_profile['vid_you2'];?>" type="video/mp4">
Your browser does not support HTML5 video.
</video>
<?php
}
else if($row_profile['def_video']=='u'){?>
<iframe width="450" height="320" src="//www.youtube.com/embed/<?=$vdef?>?modestbranding=1&rel=0&showinfo=0" frameborder="0" allowfullscreen></iframe>
<? } else {?>
<div> </div>
<? }?>
<br/><br/>
<?
if($row_profile['vid_you']!="" || $row_profile['vid_you2']!='')
{?>
<div style="width:650px; margin:0 auto; text-align:center;">
<a href="javascript:;" onClick="del_record('<?=$row_profile['id'];?>');"> <img src="images/delete.png" /></a><br/><br/>
</div>
<? } ?>
</div>
<br/>
</div>
</div>
<br class="spacer" />
</div>
<br class="spacer" />
</div>
</div>
<div class="stdtls_footer"></div>
</div>
<br class="spacer" />
</div>
</div>
<? include "includes/footer.php";?>
<script language="javascript">
function hideshow_video(value)
{
if(value == 'You Tube')
{
document.getElementById('video_upload_td1').innerHTML='';
document.getElementById('video_upload_td2').style.display='none';
document.getElementById('video_url_td1').innerHTML='Video URL: ';
document.getElementById('video_url_td2').style.display='block';
}
else if(value == 'Upload Video')
{
document.getElementById('video_url_td1').innerHTML='';
document.getElementById('video_url_td2').style.display='none';
document.getElementById('video_upload_td1').innerHTML='Upload Video: ';
document.getElementById('video_upload_td2').style.display='block';
}
}
</script>