403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.48
Web Server : Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12
System : Windows NT DESKTOP-3H4FHQJ 10.0 build 19045 (Windows 10) AMD64
User : win 10 ( 0)
PHP Version : 8.2.12
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  D:/xamppkk/htdocs-coblaa/cb_image/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : D:/xamppkk/htdocs-coblaa/cb_image/auto_page.php
<?php 
//$message_text = mysqli_real_escape_string($con,$message_text);
//include('db_b.php'); 
include('db.php');
session_start();
$status = $_GET['status'];
//////////////////////////////////////////////////////////
$curr_day = date("d");
$curr_month = date("m");
$curr_year = date("Y");
$qiz_earn =200;


/////////////////////////////////////////////////////////////// 
?>
<div style="display:none;">
<?php
$user_ip = getenv('REMOTE_ADDR');
$geo = unserialize(file_get_contents("http://www.geoplugin.net/php.gp?ip=$user_ip"));
$city = $geo["geoplugin_city"];
$region = $geo["geoplugin_regionName"];
$country = $geo["geoplugin_countryName"];
/*echo"$user_ip";
echo "City: ".$city."<br>";
echo "Region: ".$region."<br>";
echo "Country: ".$country."<br>";
/*
geoplugin_request
geoplugin_status
geoplugin_credit
geoplugin_city
geoplugin_region
geoplugin_areaCode
geoplugin_dmaCode
geoplugin_countryCode
geoplugin_countryName
geoplugin_continentCode
geoplugin_latitude
geoplugin_longitude
geoplugin_regionCode
geoplugin_regionName
geoplugin_currencyCode
geoplugin_currencySymbol
geoplugin_currencySymbol_UTF8
geoplugin_currencyConverter
*/
?> 
</div>
<?php
//////////////////////////////////////////////////////////////
if($status =="insert_category")
{
   $my_id = $_GET['my_id'];
   $category_input = $_GET['category_input'];
   
   if($category_input ==""){echo"Field Empty";}else{
   
   $get_cat = "select * from categorytb where category ='$category_input'";
   $run_get_cat = mysqli_query($con,$get_cat);
   $check_get_cat = mysqli_num_rows($run_get_cat);
   
   if($check_get_cat >0){echo"This Category Already Available";}else{
   
   
   $insert_cat ="insert into categorytb(my_id,category,cur_country,cur_city,cur_date,cur_time)values('$my_id','$category_input','$country','$city',CURDATE(),CURTIME() )";
   $run_insert_cat = mysqli_query($con,$insert_cat);
}
}
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =="insert_new_studio")
{
   $my_id = $_GET['my_id'];
   $studio_name = $_GET['studio_name'];
   $studio_description = $_GET['studio_description'];
   
   $studio_name = mysqli_real_escape_string($con,$studio_name);
   $studio_description = mysqli_real_escape_string($con,$studio_description);
   
     if($studio_name =="" OR $studio_description ==""){echo"Fill Empty Fields";}else{
		 
   $get_studio = "select * from studio_usertb where channel_name ='$studio_name'";
   $run_get_studio = mysqli_query($con,$get_studio);
   $studio_check = mysqli_num_rows($run_get_studio);
   
   if($studio_check >0){echo"Studio Name Already Available";}else{
    
   $insert_studio ="insert into studio_usertb(my_id,channel_name,description,image_url,cur_country,cur_city,cur_day,cur_month,cur_year,cur_time)
   values('$my_id','$studio_name','$studio_description','avatar2.jpg','$country','$city','$curr_day','$curr_month','$curr_year',CURTIME() )";
   $run_insert_studio = mysqli_query($con,$insert_studio);
   if($run_insert_studio){?> <input id='vicent' value="good to go" /><?php }	
}
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status == 'disp_category_option')
{
	   $get_cat_disp = "select * from categorytb ";
       $run_get_cat = mysqli_query($con,$get_cat_disp);
	   while($row_get_cat_disp = mysqli_fetch_array($run_get_cat))
	   {
		   $category = $row_get_cat_disp['category'];
		   ?>

		 <option class="sel_category" > <?php echo"$category"; ?>  </option> 

		   <?php
	   }   

}
///////////////////////////////////////////////////////////////////////////////////// 




///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 

if($status =='insert_new_image') 
{
	$my_id = $_GET['my_id'];
	$category_option = $_GET['category_option'];
	$post_name_input = $_GET['post_name_input'];
	$vid_position = $_GET['vid_position'];
	$fileName = $_FILES['image_input']['name'];
	$tmp_file = $_FILES['image_input']['tmp_name'];
	
	if($fileName ==""){
		
      $random_name =""; $file_type =""; $file_dot ="";
      }else{
		  
		    // $ffmpeg = "D:\\my_ffmpeg\\bin\\ffmpeg";		
	$ffmpeg = "C:\\my_ffmpeg\\bin\\ffmpeg";
    $imageFile = $random_name = rand().'.jpg';
    $size = "480*480";
    $getFromSecond = $vid_position;
   // $cmd = "$ffmpeg -i $tmp_file -an -ss $getFromSecond -s $size C:\\xampp\\htdocs\\crane_image\\thumb_image\\$imageFile";
	//$cmd = "$ffmpeg -i $tmp_file -an -ss $getFromSecond -s $size D:\\xampp\\htdocs\\craneblue.ga\\cb_image\\thumb_image\\$imageFile";
	
	$cmd = "$ffmpeg -i $tmp_file -an -ss $getFromSecond -s $size C:\\xampp\htdocs\\cb_image\\thumb_image\\$imageFile";
	
	

	//C:\xampp\htdocs\cb_image\thumb_image
    if(!shell_exec($cmd)){echo"$getFromSecond";}else{ echo"Thumbnail Not Uploaded";}
		  
	/*$ffmpeg = "C:\\my_ffmpeg\\bin\\ffmpeg";	
    $imageFile = $random_name = rand().'.jpg';
    $size = "480*480";
    $getFromSecond = $vid_position;
    $cmd = "$ffmpeg -i $tmp_file -an -ss $getFromSecond -s $size C:\\xampp\\htdocs\\crane_image\\thumb_image\\$imageFile";
    if(!shell_exec($cmd)){echo"$getFromSecond";}else{ echo"Thumbnail Not Uploaded";}*/		
		  
	
    $file_type = explode('.',$fileName);
    $file_type = end($file_type);
    $file_dot =".";
    $random_name = rand();
	

	
	$random_name = mysqli_real_escape_string($con,$random_name);
	$file_type = mysqli_real_escape_string($con,$file_type);
	
	$category_option = mysqli_real_escape_string($con,$category_option);
	$post_name_input = mysqli_real_escape_string($con,$post_name_input);
	
	 $studio_user ="select * from studio_usertb where my_id='$my_id' ";
	 $run_studio = mysqli_query($con,$studio_user);
	 while($row_studio = mysqli_fetch_array($run_studio))
	 {
		$studio_id = $row_studio['id'];
	
	 }

    $insert_image ="insert into crane_imgtb (my_id,studio_id,image_url,vid_thumbnail,category,post_name,cur_country,cur_city,cur_date,cur_time) values
	('$my_id','$studio_id','$random_name$file_dot$file_type','$imageFile','$category_option','$post_name_input','$country','$city',CURDATE(),CURTIME())";
	$run_insert_image = mysqli_query($con,$insert_image);
	
	if($run_insert_image)
	{
		move_uploaded_file($tmp_file,"post_image/$random_name.$file_type");
		echo"<script>window.open('index.php','_self')</script>";	echo"<span style='color:green;'>Post uploaded, Thanks</span>";
	}else{echo"Image Not Uploaded, Something Went Wrong.";}
}
	
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////// 
if($status =='insert_new_text_post')
{
	$my_id = $_GET['my_id'];
	$text_post = $_GET['text_post'];
	$post_title = $_GET['post_title'];
	$category_option_output = $_GET['category_option_output'];
	$text_tmp = $_GET['text_tmp'];
	$text_font = $_GET['text_font'];
	
	$text_post = mysqli_real_escape_string($con,$text_post);
	$post_title = mysqli_real_escape_string($con,$post_title);
	$text_tmp = mysqli_real_escape_string($con,$text_tmp);
	$text_font = mysqli_real_escape_string($con,$text_font);
	
	 $studio_user ="select * from studio_usertb where my_id='$my_id' ";
	 $run_studio = mysqli_query($con,$studio_user);
	 while($row_studio = mysqli_fetch_array($run_studio))
	 {
		$studio_id = $row_studio['id'];
		echo $studio_id;
	 }

    $insert_text_post ="insert into crane_imgtb (my_id,studio_id,post_text,category,post_name,tmp_css,font_css,cur_country,cur_city,cur_date,cur_time) values
	('$my_id','$studio_id','$text_post','$category_option_output','$post_title','$text_tmp','$text_font','$country','$city',CURDATE(),CURTIME())";
	$run_insert_text_post = mysqli_query($con,$insert_text_post);	
	

}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 

if($status =="disp_post_img")
{
	// $my_id = $_GET['my_id'];
	$new_load_limit = $_GET['new_load_limit'];
	$displaying_now = $_GET['displaying_now'];
		?>
	<div class="main_single_post_div" >
	<input id="cur_load_limit" value="<?php echo $new_load_limit ?>" style='display:none;' />
	<input id="cur_disp" value="<?php echo $displaying_now ?>" style='display:none;' />
	

	
	<?php

if($displaying_now == 'all'){	
	
	$get_post_img ="select * from crane_imgtb ORDER BY id DESC limit $new_load_limit";
}
if($displaying_now == 'mot'){	
	
	$get_post_img ="select * from crane_imgtb WHERE category='Motivational' ORDER BY id DESC limit $new_load_limit";
}
if($displaying_now == 'bib'){	
	
	$get_post_img ="select * from crane_imgtb WHERE category='Biblical' ORDER BY id DESC limit $new_load_limit";
}
if($displaying_now == 'isl'){	
	
	$get_post_img ="select * from crane_imgtb WHERE category='Islamic' ORDER BY id DESC limit $new_load_limit";
}
	$run_get_post_img = mysqli_query($con,$get_post_img);
    while($row_get_post_img = mysqli_fetch_array($run_get_post_img))
{
	$post_text = $row_get_post_img['post_text'];
	$post_img = $row_get_post_img['image_url'];
	$studio_id = $row_get_post_img['studio_id'];
	$post_img_id = $row_get_post_img['id'];
	$post_name = $row_get_post_img['post_name'];
	$vid_thumbnail = $row_get_post_img['vid_thumbnail'];
	$post_text_style1 = $row_get_post_img['tmp_css'];
	$text_font1 = $row_get_post_img['font_css'];
	
	//$text_post_leng = strlen($post_text);
	$text_post_leng = substr($post_text,0,250);

	$file_type = explode('.',$post_img);
    $file_type = end($file_type);


	
	 $studio_user ="select * from studio_usertb where id='$studio_id' ";
	 $run_studio = mysqli_query($con,$studio_user);
	 while($row_studio = mysqli_fetch_array($run_studio))
	 {
		$my_id_studio = $row_studio['id'];
		$channel_name = $row_studio['channel_name'];
		$image_url = $row_studio['image_url'];
		$channel_description = $row_studio['description'];


	if($post_text !==""){
		$post_img ='kvtq';
    if($post_text_style1 =="tmp1"){

	?>	 
	 
<div id="post_image_div" class="post_image_div" style="backgroundk:#000;" >
 
	 <a href="profile?sel=<?php echo $post_img;?>&pro=<?php echo $my_id_studio;?>&imi=<?php echo $post_img_id;?>&npost=<?php echo $post_name;?>">
	 <div class="img_post_header" >

	 <?php
   
   if($image_url == 'avatar2.jpg' ){
?>
	   <img src="avatar_image/avatar2.jpg" class="user_profile_img"  />
	   
	 <?php }else{	?>
	  <img src="avatar_image/ <?php  echo $image_url	?>" class="user_profile_img" />
	 <?php  }	?>
	   <div class="user_name"  style="color:#fff;" ><?php echo $channel_name;?></div>
	   <div class="channel_description" style="color:#ccc;" ><?php echo $post_name;?></div>
	   
	   	   <div style="float:right;margin-right:10px;" >
	   <img src="main_icon/eye1.png" width="20px" height="20px" style="float:left;margin-top:5px;" />
	   
	   <?php

	$get_view_img ="select * from img_viewtb where img_id='$post_img_id' ";
	$run_view_img = mysqli_query($con,$get_view_img);
	$check_view_img = mysqli_num_rows($run_view_img);
	if($check_view_img >0){

	echo"<span style='float:left;font-size:0.8em;margin-top:8px;margin-left:3px;color:#EF1058;'>$check_view_img</span>";
	}	   
	   ?></div>
	   
	 </div> 
	 
	 	<div id="single_image_div" class="single_image_div"  >
		
		<?php if($text_font1 =="tfont1"){ ?>
		
	    <div class="post_text" style="background:#000;font-family:Arial Black, sans-serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont2"){  ?>
				
	    <div class="post_text" style="background:#000;font-family:Impact, sans-serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont3"){ ?>
			    <div class="post_text" style="background:#000;font-family:Times New Roman, serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont4"){ ?>
			    <div class="post_text" style="background:#000;font-family:Luminari, fantasy;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php } ?>
		
      </div>
	  <div class="img_cover" ></div> </a>
	  
</div>

 <?php }elseif($post_text_style1 =="tmp2"){ ?>
 
 
 
 <div class="post_image_div" style="background:#fff;" >
 
	 <a href="profile?sel=<?php echo $post_img;?>&pro=<?php echo $my_id_studio;?>&imi=<?php echo $post_img_id;?>&npost=<?php echo $post_name;?>">	
	 <div class="img_post_header" >
	 
	 <?php
   
   if($image_url == 'avatar2.jpg' ){
?>
	   <img src="avatar_image/avatar2.jpg" class="user_profile_img"  />
	   
	 <?php }else{	?>
	  <img src="avatar_image/ <?php  echo $image_url	?>" class="user_profile_img"  />
	 <?php  }	?>
	   <div class="user_name" ><?php echo $channel_name;?></div>
	   
	   <div style="float:right;margin-right:10px;" >
	   <img src="main_icon/eye1.png" width="20px" height="20px" style="float:left;margin-top:5px;" />
	   
	   <?php

	$get_view_img ="select * from img_viewtb where img_id='$post_img_id' ";
	$run_view_img = mysqli_query($con,$get_view_img);
	$check_view_img = mysqli_num_rows($run_view_img);
	if($check_view_img >0){

	echo"<span style='float:left;font-size:0.8em;margin-top:8px;margin-left:3px;color:#EF1058;'>$check_view_img</span>";
	}	   
	   ?></div>
	   
	   <div class="channel_description" style="color:#505252;" ><?php echo $post_name;?></div>
	 </div>
	 
	 
	 
	 	<div class="single_image_div" style="background:#fff;" >
		
		<?php if($text_font1 =="tfont1"){ ?>
		
	    <!--div class="post_text" style="background:#fff;color:#000;" > 
		<?php echo $text_post_leng; ?>
	
		</div-->
				
		
		<div class="post_text" style="background:#fff;color:#000;font-family:Arial Black,sans-serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont2"){  ?>
				
	    <div class="post_text" style="background:#fff;color:#000;font-family:Impact,sans-serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont3"){ ?>
			    <div class="post_text" style="background:#fff;color:#000;font-family:Times New Roman,serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont4"){ ?>
			    <div class="post_text" style="background:#fff;color:#000;font-family:Baskerville,serif;displayk:none;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php } ?>	
		
      </div>
	  <div class="img_cover" ></div> </a>
	  
</div>
 
 
  <?php } ?>
 
 
 
	 
	 <?php }elseif($file_type=='mp4'){ ?>
	 
<div class="post_image_div" >
 
	 <a href="profile?sel=<?php echo $post_img;?>&pro=<?php echo $my_id_studio;?>&imi=<?php echo $post_img_id;?>&npost=<?php echo $post_name;?>">	
	 <div class="img_post_header" >
	 
	 <?php
   
   if($image_url == 'avatar2.jpg' ){
?>
	   <img src="avatar_image/avatar2.jpg" class="user_profile_img"  />
	   
	 <?php }else{	?>
	  <img src="avatar_image/ <?php  echo $image_url	?>" class="user_profile_img"  />
	 <?php  }	?>
	   <div class="user_name" ><?php echo $channel_name;?></div>
	   
	   	   <div style="float:right;margin-right:10px;" >
	   <img src="main_icon/eye1.png" width="20px" height="20px" style="float:left;margin-top:5px;" />
	   
	   <?php

	$get_view_img ="select * from img_viewtb where img_id='$post_img_id' ";
	$run_view_img = mysqli_query($con,$get_view_img);
	$check_view_img = mysqli_num_rows($run_view_img);
	if($check_view_img >0){

	echo"<span style='float:left;font-size:0.8em;margin-top:8px;margin-left:3px;color:#EF1058;'>$check_view_img</span>";
	}	   
	   ?></div>
	   
	   <div class="channel_description" style="color:#505252;" ><?php echo $post_name;?></div>
	 </div>
	 
	 	  <div class="single_image_div" >
	    <!--video  class="post_image" >
		  <source src="post_image/<?php echo $post_img; ?>" type="video/mp4">
           <source src="post_image/<?php echo $post_img; ?>" type="video/ogg">
          Your browser does not support the video tag.
		</video-->
		<img src="main_icon/play_btn.png" class="play_btn_icon" />
		<img src="thumb_image/<?php echo $vid_thumbnail; ?>" class="post_image" />
		</div>
		
	  
	  <div class="img_cover" ></div></a>
</div>
	  
	 <?php }else{ ?>
	 
<div class="post_image_div" >
 
	 <a href="profile?sel=<?php echo $post_img;?>&pro=<?php echo $my_id_studio;?>&imi=<?php echo $post_img_id;?>&npost=<?php echo $post_name;?>">	
	 <div class="img_post_header" >
	 
	 <?php
   
   if($image_url == 'avatar2.jpg' ){
?>
	   <img src="avatar_image/avatar2.jpg" class="user_profile_img"  />
	   
	 <?php }else{	?>
	  <img src="avatar_image/ <?php  echo $image_url	?>" class="user_profile_img"  />
	 <?php  }	?>
	   <div class="user_name" ><?php echo $channel_name;?></div>
	   
	   	   <div style="float:right;margin-right:10px;" >
	   <img src="main_icon/eye1.png" width="20px" height="20px" style="float:left;margin-top:5px;" />
	   
	   <?php

	$get_view_img ="select * from img_viewtb where img_id='$post_img_id' ";
	$run_view_img = mysqli_query($con,$get_view_img);
	$check_view_img = mysqli_num_rows($run_view_img);
	if($check_view_img >0){

	echo"<span style='float:left;font-size:0.8em;margin-top:8px;margin-left:3px;color:#EF1058;'>$check_view_img</span>";
	}	   
	   ?></div>
	   
	   <div class="channel_description" style="color:#505252;" ><?php echo $post_name;?></div>
	 </div>	 
	 
	  <div class="single_image_div" >
	    <img src="post_image/<?php echo $post_img; ?>" class="post_image" />
      </div>
	  <div class="img_cover" ></div>
</div>
	  
	  <?php }	?>
	  
	   
    </a>

	<?php 
}
}
?>
</div>

<?php
}

/////////////////////////////////////////////////////////////////////////////////////////////   

if($status =='disp_text_post')
{
	$post_txt_id = $_GET['cur_post_di'];
	$get_post_txt ="select * from crane_imgtb where id='$post_txt_id' ";
	$run_get_post_txt = mysqli_query($con,$get_post_txt);
    while($row_get_post_txt = mysqli_fetch_array($run_get_post_txt))
  {
	$post_text = $row_get_post_txt['post_text'];
	?>
	<div class="text_disp_div">
	<?php echo $post_text; ?>
	</div>
	<div class="img_cover" style="background:purple;display:none;" ></div>
	<?php
	
  }
}




///////////////////////////////////////////////////////////////////////////////////////////  

if($status =='curr_image') 
{
	$limit_data = $_GET['limit_data'];
	$studio_id = $_GET['studio_id'];
	
		?>
	<input id="cur_load_limit" value="<?php echo $limit_data; ?>" style='display:none;' />

<?php
	
	$get_post_img ="select * from crane_imgtb where studio_id='$studio_id' ORDER BY id DESC limit $limit_data ";
	$run_get_post_img = mysqli_query($con,$get_post_img);
    while($row_get_post_img = mysqli_fetch_array($run_get_post_img))
{
	$post_img = $row_get_post_img['image_url'];
	$post_name = $row_get_post_img['post_name'];
	$img_id = $row_get_post_img['id'];
	$post_text = $row_get_post_img['post_text'];
	$text_post_leng = substr($post_text,0,150);
	$vid_thumbnail = $row_get_post_img['vid_thumbnail'];
	$post_text_style1 = $row_get_post_img['tmp_css'];
	$text_font1 = $row_get_post_img['font_css'];
	
	$file_type = explode('.',$post_img);
    $file_type = end($file_type);

	if($post_text !==""){
		$post_img ='kvtq';
    if($post_text_style1 =="tmp1"){	
	
		?>	 
	 
<div id="<?php echo $post_name; ?>" onClick="disp_zoomed_img_name(this.id);" class="single_right_help" >	 
<div onClick="show_img_id(this.id)" id="<?php echo $img_id; ?>" class="single_right_div" style="background:#000;backgroundk:blue; " >

<!--div id="<?php echo $post_text; ?>" onClick="disp_zoomed_img(this.id);" class="post_txt">
 <?php echo $text_post_leng; ?>
</div-->





		<?php if($text_font1 =="tfont1"){ ?>
		
	    <div id="<?php echo $post_text; ?>" onClick="disp_zoomed_img(this.id);" class="post_txt" style="color:#fff;font-family:Arial Black, sans-serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont2"){  ?>
				
	    <div id="<?php echo $post_text; ?>" onClick="disp_zoomed_img(this.id);" class="post_txt" style="color:#fff;font-family:Impact, sans-serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont3"){ ?>
			    <div id="<?php echo $post_text; ?>" onClick="disp_zoomed_img(this.id);" class="post_txt" style="color:#fff;font-family:Times New Roman, serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont4"){ ?>
			    <div id="<?php echo $post_text; ?>" onClick="disp_zoomed_img(this.id);" class="post_txt" style="color:#fff;font-family:Luminari, fantasy;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php } ?>






</div>	 
<div class="single_div_name" ><?php echo $post_name; ?></div>
</div>
 
 
  <?php }elseif($post_text_style1 =="tmp2"){ ?>
	
<div id="<?php echo $post_name; ?>" onClick="disp_zoomed_img_name(this.id);" class="single_right_help" >	 
<div onClick="show_img_id(this.id)" id="<?php echo $img_id; ?>" class="single_right_div" style="background:#fff;" >

<!--div id="<?php echo $post_text; ?>" onClick="disp_zoomed_img(this.id);" class="post_txt" >
 <?php //echo $text_post_leng; ?>
</div-->
	<?php if($text_font1 =="tfont1"){ ?>
		
	    <div id="<?php echo $post_text; ?>" onClick="disp_zoomed_img(this.id);" class="post_txt" style="background:#fff;color:#000;font-family:Arial Black, sans-serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont2"){  ?>
				
	    <div id="<?php echo $post_text; ?>" onClick="disp_zoomed_img(this.id);" class="post_txt" style="background:#fff;color:#000;font-family:Impact, sans-serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont3"){ ?>
			    <div id="<?php echo $post_text; ?>" onClick="disp_zoomed_img(this.id);" class="post_txt" style="background:#fff;color:#000;font-family:Times New Roman, serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont4"){ ?>
			    <div id="<?php echo $post_text; ?>" onClick="disp_zoomed_img(this.id);" class="post_txt" style="background:#fff;color:#000;font-family:Luminari, fantasy;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php } ?>

</div>	 
<div class="single_div_name" stylek="background:#fff;color:#000;" ><?php echo $post_name; ?></div>
</div>
	

  <?php } ?>	
	<?php	 }elseif($file_type=='mp4'){
	
	?>
<div id="<?php echo $post_name; ?>" onClick="disp_zoomed_img_name(this.id);" class="single_right_help"  >
<div onClick="show_img_id(this.id)" id="<?php echo $img_id; ?>" class="single_right_div" style="background:#000;"  >

<!--img name="<?php echo $post_img; ?>" onClick="disp_zoomed_img(this.name)" src="post_image/<?php echo $post_img; ?>" class="post_image" /-->

 <!--video id="<?php echo $post_img; ?>" onClick="disp_zoomed_img(this.id);" class="post_video" >
		  <source src="post_image/<?php echo $post_img; ?>" type="video/mp4">
          <source src="post_image/<?php echo $post_img; ?>" type="video/ogg">
          Your browser does not support the video tag.
 </video-->	
		<img src="main_icon/play_btn.png" id="<?php echo $post_img; ?>" onClick="disp_zoomed_img(this.id);" class="play_btn_icon" />
		<img src="thumb_image/<?php echo $vid_thumbnail; ?>" id="<?php echo $post_img; ?>" onClick="disp_zoomed_img(this.id);" class="post_image" />
</div>
<!--div class="post_video_name" >Your browser does not support the video tag show.</div-->
<div class="single_div_name" ><?php echo $post_name; ?></div>
</div>

	 <?php }else{ ?>
<div id="<?php echo $post_name; ?>" onClick="disp_zoomed_img_name(this.id);" class="single_right_help" >	 
<div onClick="show_img_id(this.id)" id="<?php echo $img_id; ?>" class="single_right_div" style="background:#000;" >

<img name="<?php echo $post_img; ?>" id="<?php echo $post_name; ?>" onClick="disp_zoomed_img(this.name)" onmousedown="disp_zoomed_img_name(this.id);" src="post_image/<?php echo $post_img; ?>" class="post_image" />

</div>	 
<div class="single_div_name" ><?php echo $post_name; ?></div>
</div>
<?php
	 }
}

}

//////////////////////////////////////////////////////////////////// 

if($status =='disp_search_sub')
{
	$coming_search = $_GET['coming_search'];
	/*$get_search_result ="select * from crane_imgtb where category LIKE '%$coming_search%'";
	$run_get_search_result = mysqli_query($con,$get_search_result);
    while($row_get_search_result = mysqli_fetch_array($run_get_search_result))
{
	$sea_category = $row_get_search_result['category'];
	
	echo"<div>$sea_category</div>";
 }*/
 
?>
<div id="search_title" class="search_title" >Search Result For '<?php echo $coming_search ?>'</div>
<?php
/*$get_post_img ="select * from crane_imgtb where category LIKE '$coming_search%' OR post_name LIKE '$coming_search%' ";
	$run_get_post_img = mysqli_query($con,$get_post_img);
	$check_post_img = mysqli_num_rows($run_get_post_img);*/
	
	
	
	
	
	
	
	 $studio_user ="select * from studio_usertb where channel_name LIKE '$coming_search%' ";
	 $run_studio = mysqli_query($con,$studio_user);
	 $check_studio = mysqli_num_rows($run_studio);
	 if($check_studio >0){
	 
	 while($row_studio = mysqli_fetch_array($run_studio))
	 {
		 $id_studio = $row_studio['id'];

	//echo"<script>window.open('http://craneblue.com','_self')</script>";	

	$get_post_img ="select * from crane_imgtb where studio_id ='$id_studio' ";
	$run_get_post_img = mysqli_query($con,$get_post_img);
		
    while($row_get_post_img = mysqli_fetch_array($run_get_post_img))
{


		?>
		 <div class="main_single_post_div" >

	<?php
	$post_img = $row_get_post_img['image_url'];
	$post_my_id = $row_get_post_img['my_id'];
	$post_img_id = $row_get_post_img['id'];
	$post_text = $row_get_post_img['post_text'];
	$studio_id = $row_get_post_img['studio_id'];
    $vid_thumbnail = $row_get_post_img['vid_thumbnail'];
	$post_name = $row_get_post_img['post_name'];
	
	$post_text_style1 = $row_get_post_img['tmp_css'];
	$text_font1 = $row_get_post_img['font_css'];
	
	//$text_post_leng = strlen($post_text);
	$text_post_leng = substr($post_text,0,200);

	$file_type = explode('.',$post_img);
    $file_type = end($file_type);	
	
	 $studio_user ="select * from studio_usertb where id='$studio_id' ";
	 $run_studio = mysqli_query($con,$studio_user);
	 while($row_studio = mysqli_fetch_array($run_studio))
	 {
		$my_id_studio = $row_studio['id'];
		$channel_name = $row_studio['channel_name'];
		$image_url = $row_studio['image_url'];
		$channel_description = $row_studio['description'];


	if($post_text !==""){
		$post_img ='kvtq';
    if($post_text_style1 =="tmp1"){

	?>	 
	 
<div class="post_image_div" style="background:#000;" >
 
	 <a href="profile?sel=<?php echo $post_img;?>&pro=<?php echo $my_id_studio;?>&imi=<?php echo $post_img_id;?>&npost=<?php echo $post_name;?>">	
	 <div class="img_post_header" >
	 
	 <?php
   
   if($image_url == 'avatar2.jpg' ){
?>
	   <img src="avatar_image/avatar2.jpg" class="user_profile_img"  />
	   
	 <?php }else{	?>
	  <img src="avatar_image/ <?php  echo $image_url	?>" class="user_profile_img" />
	 <?php  }	?>
	   <div class="user_name"  style="color:#fff;" ><?php echo $channel_name;?></div>
	   <div class="channel_description" ><?php echo $post_name;?></div>
	 </div> 
	 
	 	<div class="single_image_div"  >
		
		<?php if($text_font1 =="tfont1"){ ?>
		
	    <div class="post_text" style="background:#000;font-family:Arial Black, sans-serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont2"){  ?>
				
	    <div class="post_text" style="background:#000;font-family:Impact, sans-serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont3"){ ?>
			    <div class="post_text" style="background:#000;font-family:Times New Roman, serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont4"){ ?>
			    <div class="post_text" style="background:#000;font-family:Luminari, fantasy;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php } ?>
		
      </div>
	  <div class="img_cover"" ></div> </a>
	  
</div>

 <?php }elseif($post_text_style1 =="tmp2"){ ?>
 
 
 
 <div class="post_image_div" style="background:#fff;" >
 
	 <a href="profile?sel=<?php echo $post_img;?>&pro=<?php echo $my_id_studio;?>&imi=<?php echo $post_img_id;?>&npost=<?php echo $post_name;?>">	
	 <div class="img_post_header" >
	 
	 <?php
   
   if($image_url == 'avatar2.jpg' ){
?>
	   <img src="avatar_image/avatar2.jpg" class="user_profile_img"  />
	   
	 <?php }else{	?>
	  <img src="avatar_image/ <?php  echo $image_url	?>" class="user_profile_img"  />
	 <?php  }	?>
	   <div class="user_name" ><?php echo $channel_name;?></div>
	   <div class="channel_description" ><?php echo $post_name;?></div>
	 </div>
	 
	 
	 
	 	<div class="single_image_div" style="background:#fff;" >
		
		<?php if($text_font1 =="tfont1"){ ?>
		
	    <!--div class="post_text" style="background:#fff;color:#000;" >
		<?php echo $text_post_leng; ?>
	
		</div-->
		
		
		
		
		<div class="post_text" style="background:#fff;color:#000;font-family:Arial Black, sans-serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont2"){  ?>
				
	    <div class="post_text" style="background:#fff;color:#000;font-family:Impact, sans-serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont3"){ ?>
			    <div class="post_text" style="background:#fff;color:#000;font-family:Times New Roman, serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont4"){ ?>
			    <div class="post_text" style="background:#fff;color:#000;font-family:Baskerville, serif;displayk:none;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php } ?>	
		
      </div>
	  <div class="img_cover" ></div> </a>
	  
</div>
 
 
  <?php } ?>
 
 
 
	 
	 <?php }elseif($file_type=='mp4'){?>
	 
<div class="post_image_div" >
 
	 <a href="profile?sel=<?php echo $post_img;?>&pro=<?php echo $my_id_studio;?>&imi=<?php echo $post_img_id;?>&npost=<?php echo $post_name;?>">	
	 <div class="img_post_header" >
	 
	 <?php
   
   if($image_url == 'avatar2.jpg' ){
?>
	   <img src="avatar_image/avatar2.jpg" class="user_profile_img"  />
	   
	 <?php }else{	?> 
	  <img src="avatar_image/ <?php  echo $image_url	?>" class="user_profile_img"  />
	 <?php  }	?>
	   <div class="user_name" ><?php echo $channel_name;?></div>
	   <div class="channel_description" ><?php echo $post_name;?></div>
	 </div>
	 
	 	  <div class="single_image_div" >
	    <!--video  class="post_image" >
		  <source src="post_image/<?php echo $post_img; ?>" type="video/mp4">
           <source src="post_image/<?php echo $post_img; ?>" type="video/ogg">
          Your browser does not support the video tag.
		</video-->
		<img src="main_icon/play_btn.png" class="play_btn_icon" />
		<img src="thumb_image/<?php echo $vid_thumbnail; ?>" class="post_image" />
		</div>
		
	  
	  <div class="img_cover" ></div></a>
</div>
	  
	 <?php }else{ ?>
	 
<div class="post_image_div" >
 
	 <a href="profile?sel=<?php echo $post_img;?>&pro=<?php echo $my_id_studio;?>&imi=<?php echo $post_img_id;?>&npost=<?php echo $post_name;?>">	
	 <div class="img_post_header" >
	 
	 <?php
   
   if($image_url == 'avatar2.jpg' ){
?>
	   <img src="avatar_image/avatar2.jpg" class="user_profile_img"  />
	   
	 <?php }else{	?>
	  <img src="avatar_image/ <?php  echo $image_url	?>" class="user_profile_img"  />
	 <?php  }	?>
	   <div class="user_name" ><?php echo $channel_name;?></div>
	   <div class="channel_description" ><?php echo $post_name;?></div>
	 </div>	 
	 
	  <div class="single_image_div" > 
	    <img src="post_image/<?php echo $post_img; ?>" class="post_image" />
      </div>
	  <div class="img_cover" ></div>
</div>
	  
	  <?php }	?>
	  
	   
    </a>


 
	<?php 
}
}
	 }
	}else{
	
	
	$get_post_img ="select * from crane_imgtb where category LIKE '$coming_search%' OR post_name LIKE '$coming_search%' ";
	$run_get_post_img = mysqli_query($con,$get_post_img);
	$check_post_img = mysqli_num_rows($run_get_post_img);
	


		?>
		 <div class="main_single_post_div" >

	<?php

    while($row_get_post_img = mysqli_fetch_array($run_get_post_img))
{
	$post_text = $row_get_post_img['post_text'];
	$post_img = $row_get_post_img['image_url'];
	$studio_id = $row_get_post_img['studio_id'];
	$post_img_id = $row_get_post_img['id'];
	$post_name = $row_get_post_img['post_name'];
	$vid_thumbnail = $row_get_post_img['vid_thumbnail'];
	$post_text_style1 = $row_get_post_img['tmp_css'];
	$text_font1 = $row_get_post_img['font_css'];
	
	//$text_post_leng = strlen($post_text);
	$text_post_leng = substr($post_text,0,200);

	$file_type = explode('.',$post_img);
    $file_type = end($file_type);	
	
	 $studio_user ="select * from studio_usertb where id='$studio_id' ";
	 $run_studio = mysqli_query($con,$studio_user);
	 while($row_studio = mysqli_fetch_array($run_studio))
	 {
		$my_id_studio = $row_studio['id'];
		$channel_name = $row_studio['channel_name'];
		$image_url = $row_studio['image_url'];
		$channel_description = $row_studio['description'];


	if($post_text !==""){
		$post_img ='kvtq';
    if($post_text_style1 =="tmp1"){

	?>	 
	 
<div class="post_image_div" style="background:#000;" >
 
	 <a href="profile?sel=<?php echo $post_img;?>&pro=<?php echo $my_id_studio;?>&imi=<?php echo $post_img_id;?>&npost=<?php echo $post_name;?>">	
	 <div class="img_post_header" >
	 
	 <?php
   
   if($image_url == 'avatar2.jpg' ){
?>
	   <img src="avatar_image/avatar2.jpg" class="user_profile_img"  />
	   
	 <?php }else{	?>
	  <img src="avatar_image/ <?php  echo $image_url	?>" class="user_profile_img" />
	 <?php  }	?>
	   <div class="user_name"  style="color:#fff;" ><?php echo $channel_name;?></div>
	   <div class="channel_description" ><?php echo $post_name;?></div>
	 </div> 
	 
	 	<div class="single_image_div"  >
		
		<?php if($text_font1 =="tfont1"){ ?>
		
	    <div class="post_text" style="background:#000;font-family:Arial Black, sans-serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont2"){  ?>
				
	    <div class="post_text" style="background:#000;font-family:Impact, sans-serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont3"){ ?>
			    <div class="post_text" style="background:#000;font-family:Times New Roman, serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont4"){ ?>
			    <div class="post_text" style="background:#000;font-family:Luminari, fantasy;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php } ?>
		
      </div>
	  <div class="img_cover" ></div> </a>
	  
</div>

 <?php }elseif($post_text_style1 =="tmp2"){ ?>
 
 
 
 <div class="post_image_div" style="background:#fff;" >
 
	 <a href="profile?sel=<?php echo $post_img;?>&pro=<?php echo $my_id_studio;?>&imi=<?php echo $post_img_id;?>&npost=<?php echo $post_name;?>">	
	 <div class="img_post_header" >
	 
	 <?php
   
   if($image_url == 'avatar2.jpg' ){
?>
	   <img src="avatar_image/avatar2.jpg" class="user_profile_img"  />
	   
	 <?php }else{	?>
	  <img src="avatar_image/ <?php  echo $image_url	?>" class="user_profile_img"  />
	 <?php  }	?>
	   <div class="user_name" ><?php echo $channel_name;?></div>
	   <div class="channel_description" ><?php echo $post_name;?></div>
	 </div>
	 
	 
	 
	 	<div class="single_image_div" style="background:#fff;" >
		
		<?php if($text_font1 =="tfont1"){ ?>
		
	    <!--div class="post_text" style="background:#fff;color:#000;" >
		<?php echo $text_post_leng; ?>
	
		</div-->
		
		
		
		
		<div class="post_text" style="background:#fff;color:#000;font-family:Arial Black, sans-serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont2"){  ?>
				
	    <div class="post_text" style="background:#fff;color:#000;font-family:Impact, sans-serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont3"){ ?>
			    <div class="post_text" style="background:#fff;color:#000;font-family:Times New Roman, serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont4"){ ?>
			    <div class="post_text" style="background:#fff;color:#000;font-family:Baskerville, serif;displayk:none;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php } ?>	
		
      </div>
	  <div class="img_cover" ></div> </a>
	  
     </div>
 
 
  <?php } ?>
 
	 
	 <?php }elseif($file_type=='mp4'){?>
	 
<div class="post_image_div" >
 
	 <a href="profile?sel=<?php echo $post_img;?>&pro=<?php echo $my_id_studio;?>&imi=<?php echo $post_img_id;?>&npost=<?php echo $post_name;?>">	
	 <div class="img_post_header" >
	 
	 <?php
   
   if($image_url == 'avatar2.jpg' ){
?>
	   <img src="avatar_image/avatar2.jpg" class="user_profile_img"  />
	   
	 <?php }else{	?>
	  <img src="avatar_image/ <?php  echo $image_url	?>" class="user_profile_img"  />
	 <?php  }	?>
	   <div class="user_name" ><?php echo $channel_name;?></div>
	   <div class="channel_description" ><?php echo $post_name;?></div>
	 </div>
	 
	 	  <div class="single_image_div" >
	    <!--video  class="post_image" >
		  <source src="post_image/<?php echo $post_img; ?>" type="video/mp4">
           <source src="post_image/<?php echo $post_img; ?>" type="video/ogg">
          Your browser does not support the video tag.
		</video-->
		<img src="main_icon/play_btn.png" class="play_btn_icon" />
		<img src="thumb_image/<?php echo $vid_thumbnail; ?>" class="post_image" />
		</div>
		
	  
	  <div class="img_cover" ></div></a>
</div>
	  
	 <?php }else{ ?>
	 
<div class="post_image_div" >
 
	 <a href="profile?sel=<?php echo $post_img;?>&pro=<?php echo $my_id_studio;?>&imi=<?php echo $post_img_id;?>&npost=<?php echo $post_name;?>">	
	 <div class="img_post_header" >
	 
	 <?php
   
   if($image_url == 'avatar2.jpg' ){
?>
	   <img src="avatar_image/avatar2.jpg" class="user_profile_img"  />
	   
	 <?php }else{	?>
	  <img src="avatar_image/ <?php  echo $image_url	?>" class="user_profile_img"  />
	 <?php  }	?>
	   <div class="user_name" ><?php echo $channel_name;?></div>
	   <div class="channel_description" ><?php echo $post_name;?></div>
	 </div>	 
	 
	  <div class="single_image_div" >
	    <img src="post_image/<?php echo $post_img; ?>" class="post_image" />
      </div>
	  <div class="img_cover" ></div>
</div>
	  
	  <?php }	?>
	  
	   
    </a>

	<?php 
}	


	
	
	/*
 <div class="post_image_div" >
 
	 <a href="profile?sel=<?php echo $post_img;?>&pro=<?php echo $my_id_studio;?>&imi=<?php echo $post_img_id;?>">	
	 <div class="img_post_header" >

	   <img src="avatar_image/avatar2.jpg" class="user_profile_img"  />
	   
	   <div class="user_name" ><?php echo $channel_name;?></div>
	   <div class="channel_description" ><?php echo $channel_description;?></div>
	 
	 </div>
	 
	  <div class="single_image_div" >
	    <img src="post_image/<?php echo $post_img; ?>" class="post_image" />
      </div>
	  <!--div class="img_cover" ></div-->
	  
    </a>
 </div>
	<?php 
}
}
		
		}*/
	 }
}

}

////////////////////////////////////////////////////////////////////////////////// 

if($status =='img_download_count_insert')
{
    $my_id = $_GET['my_id'];
    $id_img = $_GET['id_img'];
	
	$get_down_count_img ="select * from img_down_counttb where my_ip='$user_ip' AND img_id='$id_img' ";
	$run_down_count_img = mysqli_query($con,$get_down_count_img);
	$check_downl_count_img = mysqli_num_rows($run_down_count_img);
	if($check_downl_count_img >0){}else{
	
	$insert_img_downl_count ="insert into img_down_counttb(my_id,my_ip,img_id,cur_country,cur_city,cur_day,cur_month,cur_year,cur_time) 
	values('$my_id','$user_ip','$id_img','$country','$city','$curr_day','$curr_month','$curr_year',CURTIME() )";
	$run_insert_img_downl_count = mysqli_query($con,$insert_img_downl_count);
	}	
}

if($status =='display_img_downl_conut')
{
    $img_id = $_GET['img_id'];
	$get_down_count_img ="select * from img_down_counttb where img_id='$img_id' ";
	$run_down_count_img = mysqli_query($con,$get_down_count_img);
	$check_downl_count_img = mysqli_num_rows($run_down_count_img);
	if($check_downl_count_img >0){

	echo $check_downl_count_img;
 }
	
}

//////////////////////////////////////////////////////////////////////////////////// 

if($status =='img_view_insert')
{
	    
	$my_id = $_GET['my_id'];
    $id_img = $_GET['id_img'];
	$studio_id = $_GET['studio_id'];
	
	$get_view_img ="select * from img_viewtb where my_ip='$user_ip' AND img_id='$id_img' ";
	$run_view_img = mysqli_query($con,$get_view_img);
	$check_view_img = mysqli_num_rows($run_view_img);
	if($check_view_img >0){}else{
	
	$insert_img_view ="insert into img_viewtb(my_id,my_ip,studio_id,img_id,cur_country,cur_city,cur_day,cur_month,cur_year,cur_time) 
	values('$my_id','$user_ip','$studio_id','$id_img','$country','$city','$curr_day','$curr_month','$curr_year',CURTIME() )";
	$run_insert_img_downl_count = mysqli_query($con,$insert_img_view);
}
}

if($status =='display_img_view_conut')
{
    $img_id = $_GET['img_id'];
	$get_view_img ="select * from img_viewtb where img_id='$img_id' ";
	$run_view_img = mysqli_query($con,$get_view_img);
	$check_view_img = mysqli_num_rows($run_view_img);
	if($check_view_img >0){

	echo $check_view_img;
 }
	
}

//////////////////////////////////////////////////////////////////////////////////////// 

if($status =="zoomed_post_name") 
{
	$image_on = $_GET['image_on'];
	$get_post_img ="select * from crane_imgtb where image_url ='$image_on' ";
	$run_get_post_img = mysqli_query($con,$get_post_img);	
    while($row_get_post_img = mysqli_fetch_array($run_get_post_img))
{
	$post_name = $row_get_post_img['describe_actions'];

if($post_name !==""){
	echo"<div  class='post_name_out_mob' > $post_name</div>";
}
}
}

/////////////////////////////////////////////////////////////////////////////////////// 

if($status =="save_comment")
{
	$my_id = $_GET['my_id'];
	$post_id = $_GET['post_id'];
	$comm_input = $_GET['comm_input']; 
	$insert_comm ="insert into commenttb (my_id,post_id,comment_text,country,city,cur_date,cur_time) 
	values('$my_id','$post_id','$comm_input','$country','$city',CURDATE(),CURTIME() )";
	$run_insert_comm =mysqli_query($con,$insert_comm);
	
}	

if($status =="display_comment")
{
	
	$post_id = $_GET['post_id'];
	$disp_comment = "select * from commenttb where post_id='$post_id' order by id desc ";
	$run_disp_comment = mysqli_query($con,$disp_comment);
	while($row_disp_comment = mysqli_fetch_array($run_disp_comment))
	{
	$comment_text = $row_disp_comment['comment_text'];
	$my_id = $row_disp_comment['my_id'];

 $con = mysqli_connect('localhost','root','2019khalaf','cranebule_userdb');
 if(! $con){echo"You have not connected to the database.";}
 else{
	  $get_user = "select * from cb_userstb where id='$my_id' ";
	  $run_get_user = mysqli_query($con,$get_user);	
      while($row_get_user = mysqli_fetch_array($run_get_user)){	

      $profile_img = $row_get_user['profile_image'];
      $user_name = $row_get_user['lname'];	



?>  


<div style="width:100%;float:left;backgroundk:red;">	
<img src="avatar_image/avatar2.jpg" class="user_profile" />

<div class="com_name"><?php echo"$user_name"; ?></div>
<div class="single_com"><?php echo $comment_text; ?></div>
</div>
<?php	 
} }
}
}




////////////////////////////////////////////////////////////////////////////////////////////// 

if($status =='disp_comm_count')
{
	$post_id = $_GET['post_id'];
	$disp_comment = "select * from commenttb where post_id='$post_id' ";
	$run_disp_comment = mysqli_query($con,$disp_comment);
	$check_comment = mysqli_num_rows($run_disp_comment);
	if($check_comment >0){
	echo $check_comment;
	}

}

///////////////////////////////////////////////////////////////////////////////////////////// 

if($status =="disp_user_post")
{
	$my_id = $_GET['my_id'];
	//$new_load_limit = $_GET['new_load_limit'];
		?>
		 <div class="main_single_post_div" >
	<input id="cur_load_limit" value="<?php echo $new_load_limit ?>" style='display:none;' />
	<?php
	$get_post_img ="select * from crane_imgtb where my_id='$my_id' ORDER BY id DESC";// limit $new_load_limit";
	$run_get_post_img = mysqli_query($con,$get_post_img);
    while($row_get_post_img = mysqli_fetch_array($run_get_post_img))
{
	$post_text = $row_get_post_img['post_text'];
	$post_img = $row_get_post_img['image_url'];
	$studio_id = $row_get_post_img['studio_id'];
	$post_img_id = $row_get_post_img['id'];
	$post_name = $row_get_post_img['post_name'];
	$vid_thumbnail = $row_get_post_img['vid_thumbnail'];
	
	
	$post_text_style1 = $row_get_post_img['tmp_css'];
	$text_font1 = $row_get_post_img['font_css'];
	
	//$text_post_leng = strlen($post_text);
	$text_post_leng = substr($post_text,0,200);

	$file_type = explode('.',$post_img);
    $file_type = end($file_type);	
	
	 $studio_user ="select * from studio_usertb where id='$studio_id' ";
	 $run_studio = mysqli_query($con,$studio_user);
	 while($row_studio = mysqli_fetch_array($run_studio))
	 {
		$my_id_studio = $row_studio['id'];
		$channel_name = $row_studio['channel_name'];
		$image_url = $row_studio['image_url'];
		$channel_description = $row_studio['description'];


	if($post_text !==""){
		$post_img ='kvtq';
    if($post_text_style1 =="tmp1"){

	?>	 
	 
<div class="post_image_div" style="background:#000;" >
 
	 <a href="profile?sel=<?php echo $post_img;?>&pro=<?php echo $my_id_studio;?>&imi=<?php echo $post_img_id;?>&npost=<?php echo $post_name;?>">	
	 <div class="img_post_header" >
	 
	 <?php
   
   if($image_url == 'avatar2.jpg' ){
?>
	   <img src="avatar_image/avatar2.jpg" class="user_profile_img"  />
	   
	 <?php }else{	?>
	  <img src="avatar_image/ <?php  echo $image_url	?>" class="user_profile_img" />
	 <?php  }	?>
	   <div class="user_name"  style="color:#fff;" ><?php echo $channel_name;?></div>
	   <div class="channel_description" ><?php echo $post_name;?></div>
	 </div> 
	 
	 	<div class="single_image_div"  >
		
		<?php if($text_font1 =="tfont1"){ ?>
		
	    <div class="post_text" style="background:#000;font-family:Arial Black, sans-serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont2"){  ?>
				
	    <div class="post_text" style="background:#000;font-family:Impact, sans-serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont3"){ ?>
			    <div class="post_text" style="background:#000;font-family:Times New Roman, serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont4"){ ?>
			    <div class="post_text" style="background:#000;font-family:Luminari, fantasy;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php } ?>
		
      </div>
	  <div class="img_cover" ></div> </a>
	  
</div>

 <?php }elseif($post_text_style1 =="tmp2"){ ?>
 
 
 
 <div class="post_image_div" style="background:#fff;" >
 
	 <a href="profile?sel=<?php echo $post_img;?>&pro=<?php echo $my_id_studio;?>&imi=<?php echo $post_img_id;?>&npost=<?php echo $post_name;?>">	
	 <div class="img_post_header" >
	 
	 <?php
   
   if($image_url == 'avatar2.jpg' ){
?>
	   <img src="avatar_image/avatar2.jpg" class="user_profile_img"  />
	   
	 <?php }else{	?>
	  <img src="avatar_image/ <?php  echo $image_url	?>" class="user_profile_img"  />
	 <?php  }	?>
	   <div class="user_name" ><?php echo $channel_name;?></div>
	   <div class="channel_description" ><?php echo $post_name;?></div>
	 </div>
	 
	 
	 
	 	<div class="single_image_div" style="background:#fff;" >
		
		<?php if($text_font1 =="tfont1"){ ?>
		
	    <!--div class="post_text" style="background:#fff;color:#000;" >
		<?php echo $text_post_leng; ?>
	
		</div-->
		
		
		
		
		<div class="post_text" style="background:#fff;color:#000;font-family:Arial Black, sans-serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont2"){  ?>
				
	    <div class="post_text" style="background:#fff;color:#000;font-family:Impact, sans-serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont3"){ ?>
			    <div class="post_text" style="background:#fff;color:#000;font-family:Times New Roman, serif;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php }elseif($text_font1 =="tfont4"){ ?>
			    <div class="post_text" style="background:#fff;color:#000;font-family:Baskerville, serif;displayk:none;" >
		<?php echo $text_post_leng; ?>
		</div>
		<?php } ?>	
		
      </div>
	  <div class="img_cover" ></div> </a>
	  
</div>
 
 
  <?php } ?>
 
 
 
	 
	 <?php }elseif($file_type=='mp4'){?>
	 
<div class="post_image_div" >
 
	 <a href="profile?sel=<?php echo $post_img;?>&pro=<?php echo $my_id_studio;?>&imi=<?php echo $post_img_id;?>&npost=<?php echo $post_name;?>">	
	 <div class="img_post_header" >
	 
	 <?php
   
   if($image_url == 'avatar2.jpg' ){
?>
	   <img src="avatar_image/avatar2.jpg" class="user_profile_img"  />
	   
	 <?php }else{	?>
	  <img src="avatar_image/ <?php  echo $image_url	?>" class="user_profile_img"  />
	 <?php  }	?>
	   <div class="user_name" ><?php echo $channel_name;?></div>
	   <div class="channel_description" ><?php echo $post_name;?></div>
	 </div>
	 
	 	  <div class="single_image_div" >
		  	<img src="main_icon/play_btn.png" class="play_btn_icon" />
		  <img src="thumb_image/<?php echo $vid_thumbnail; ?>" class="post_image" />

	  </div>
	  <div class="img_cover" ></div></a>

</div>
	  
	 <?php }else{ ?>
	 
<div class="post_image_div" >
 
	 <a href="profile?sel=<?php echo $post_img;?>&pro=<?php echo $my_id_studio;?>&imi=<?php echo $post_img_id;?>&npost=<?php echo $post_name;?>">	
	 <div class="img_post_header" >
	 
	 <?php
   
   if($image_url == 'avatar2.jpg' ){
?>
	   <img src="avatar_image/avatar2.jpg" class="user_profile_img"  />
	   
	 <?php }else{	?>
	  <img src="avatar_image/ <?php  echo $image_url	?>" class="user_profile_img"  />
	 <?php  }	?>
	   <div class="user_name" ><?php echo $channel_name;?></div>
	   <div class="channel_description" ><?php echo $post_name;?></div>
	 </div>	 
	 
	  <div class="single_image_div" >
	    <img src="post_image/<?php echo $post_img; ?>" class="post_image" />
      </div>
	  <div class="img_cover" ></div>
</div>
	  
	  <?php }	?>
	  
	   
    </a>

	<?php 
}
}
?>
</div>

<?php
}

///////////////////////////////////////////////////////////////////////////////////////////// 

if($status =='disp_post_count')
{
	$my_id = $_GET['my_id'];
	$get_post_img ="select * from crane_imgtb where my_id='$my_id' ";
	$run_get_post_img = mysqli_query($con,$get_post_img);
	$check_post = mysqli_num_rows($run_get_post_img);
	echo $check_post;
	
}
//////////////////////////////////////////////////////////////////////////////////////////////////
if($status =='disp_point_count')
{
	$my_id = $_GET['my_id'];
	$get_post_img ="select * from crane_imgtb where my_id='$my_id' ";
	$run_get_post_img = mysqli_query($con,$get_post_img);
	$check_post = mysqli_num_rows($run_get_post_img);
	$cur_points = $check_post * 10;
	echo $cur_points;echo"sn";
	
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
if($status =='disp_ugx_earnings')
{
	$my_id = $_GET['my_id'];
	$get_post_img ="select * from crane_imgtb where my_id='$my_id' ";
	$run_get_post_img = mysqli_query($con,$get_post_img);
	$check_post = mysqli_num_rows($run_get_post_img);
	$ugx_earn = $check_post * 100;
	echo $ugx_earn;
	
}

////////////////////////////////////////////////////////////////////////////////////////////////////////// 
if($status =='insert_post_like')
{
	$my_id = $_GET['my_id'];
    $postid = $_GET['postid'];
//	$studio_id = $_GET['studio_id'];
	
	$get_view_img ="select * from liketb where user_ip='$user_ip' AND post_id='$postid' ";
	$run_view_img = mysqli_query($con,$get_view_img);
	$check_view_img = mysqli_num_rows($run_view_img);
	if($check_view_img >0){}else{
	
	$insert_post_like ="insert into liketb(my_id,user_ip,post_id,cur_country,cur_city,cur_date,cur_month,cur_year,cur_time) 
	values('$my_id','$user_ip','$postid','$country','$city','$curr_day','$curr_month','$curr_year',CURTIME() )";
	$run_insert_post_like = mysqli_query($con,$insert_post_like);
}

}

if($status =='delete_post_like')
{
	$my_id = $_GET['my_id'];
    $postid = $_GET['postid'];
	$del_like ="DELETE FROM liketb WHERE post_id='$postid' AND user_ip='$user_ip' ";
	$run_del_like = mysqli_query($con,$del_like);
	echo"you";
}


/////////////////////////////////////////////////////////////////////////////////////////////////////////////
if($status =='display_reward')
{  
	$user_ip = $_GET['ipuser'];
	$get_rewardview ="select * from reward_viewtb where ipuser='$user_ip' AND cur_date='$curr_year-$curr_month-$curr_day' ";
	$run_rewardview = mysqli_query($con,$get_rewardview);
	$check_rewardview = mysqli_num_rows($run_rewardview);
	if($check_rewardview <1){ echo"$curr_year-$curr_month-$curr_day";
		echo"<input id='reward1' value='None' style='display:none;' />";
		echo"<input id='reward2' value='None' style='display:none;' />";
		echo"<input id='reward3' value='None' style='display:none;' />";
		}else{
	while($row_rewardview = mysqli_fetch_array($run_rewardview))

	{
		$user_id = $row_rewardview['my_id'];
		$user_adres = $row_rewardview['ipuser'];
		$waiting_tym = $row_rewardview['next_reward_tym'];
		$reward1 = $row_rewardview['reward1'];
		$reward2 = $row_rewardview['reward2'];
		$reward3 = $row_rewardview['reward3'];

        echo"<input id='waiting_tym' value='$waiting_tym' style='display:none;' />";
		if($reward1==""){ echo"<input id='reward1' value='' style='display:none;' />";}else{echo"<input id='reward1' value='$reward1' style='display:none;' />";}
		if($reward2==""){ echo"<input id='reward2' value='' style='display:none;' />";}else{echo"<input id='reward2' value='$reward2' style='display:none;' />";}
		if($reward3==""){ echo"<input id='reward3' value='' style='display:none;' />";}else{echo"<input id='reward3' value='$reward3' style='display:none;' />";}
	}
	}
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='save_rwd_status')
{
	$ipuser = $_GET['ipuser'];
	$my_id = $_GET['my_id'];
	$next_rwd_tym = $_GET['next_rwd_tym'];
	$insert_rwd ="insert into reward_viewtb(my_id,ipuser,reward1,reward2,next_reward_tym,cur_country,cur_city,cur_date,cur_time) 
	values('$my_id','$ipuser','Done','On','$next_rwd_tym','$country','$city',CURDATE(),CURTIME() )";
	$run_insert_rwd = mysqli_query($con,$insert_rwd);	
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='update_rwd_status2')
{
	$ipuser = $_GET['ipuser'];
	$my_id = $_GET['my_id'];
	$next_rwd_tym = $_GET['next_rwd_tym'];
   $update_rwd = "update reward_viewtb set my_id='$my_id',reward2='Done',reward3='On',next_reward_tym='$next_rwd_tym' where ipuser='$ipuser' AND cur_date='$curr_year-$curr_month-$curr_day' ";
   $run_update_rwd = mysqli_query($con,$update_rwd);
}

///////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='update_rwd_status3')
{
	$ipuser = $_GET['ipuser'];
	$my_id = $_GET['my_id'];
	
   $update_rwd3 = "update reward_viewtb set my_id='$my_id',reward3='Done' where ipuser='$ipuser' AND cur_date='$curr_year-$curr_month-$curr_day' ";
   $run_update_rwd3 = mysqli_query($con,$update_rwd3);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='insert_spin_tempts')
{
	$user_ip = $_GET['ipuser'];
	$my_id = $_GET['my_id'];
	$spin_cont = $_GET['spin_cont'];
    $win_amt = $_GET['won_amt2'];
	
	$get_spin_count ="select * from spin_tmptstb where ref_no='$my_id' AND ipuser='$user_ip' AND cur_date='$curr_year-$curr_month-$curr_day' ";
	$run_get_spin_count  = mysqli_query($con,$get_spin_count);
	$check_get_spin_count  = mysqli_num_rows($run_get_spin_count);
	if($check_get_spin_count <1){
	
	$insert_tempts ="insert into spin_tmptstb(ref_no,tempt_no,win_amount,ipuser,cur_country,cur_city,cur_date,cur_time) 
	values('$my_id','$spin_cont','$win_amt','$user_ip','$country','$city',CURDATE(),CURTIME() )";
	$run_insert_tempts = mysqli_query($con,$insert_tempts);
	
	}else{
		
   $update_spin_count= "update spin_tmptstb set ref_no='$my_id',tempt_no='$spin_cont',win_amount='$win_amt' where ref_no='$my_id' AND ipuser='$user_ip' AND cur_date='$curr_year-$curr_month-$curr_day' ";
   $run_update_rwd = mysqli_query($con,$update_spin_count);
	}
	
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='display_spin_chances')
{
	//$user_ip = $_GET['ipuser'];
	$my_id = $_GET['my_id'];
	$check_spin_trans ="select * from coot_transactiontb where user_ref_no='$my_id' AND cur_date='$curr_day' AND cur_month='$curr_month' AND cur_year='$curr_year' AND trans_status='Deposit' ";
	$run_check_spin_trans = mysqli_query($con,$check_spin_trans);
	$check_trans  = mysqli_num_rows($run_check_spin_trans);
	
if($check_trans >0){echo"<input id='spin_tmp_status' value='1' />"; echo"<input id='spin_tmp_done' value='' />";}else{
	
	$check_spin_count ="select * from spin_tmptstb where ref_no='$my_id' AND cur_date='$curr_year-$curr_month-$curr_day' AND tempt_no='3' ";
	$run_check_spin_count  = mysqli_query($con,$check_spin_count);
	$check_spin_tmpts  = mysqli_num_rows($run_check_spin_count);
	if($check_spin_tmpts >0){ echo"<input id='spin_tmp_status' value='1' />";}
	else{ echo"<input id='spin_tmp_status' value='2' />";}
	while($row_spin_tmpts = mysqli_fetch_array($run_check_spin_count))
	{
	 $tmpts_done = $row_spin_tmpts['tempt_no'];
	 echo"<input id='spin_tmp_done' value='$tmpts_done' />";
	}
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if($status =='display_spin_position') 
{
	//$user_ip = $_GET['ipuser'];
	$my_id = $_GET['my_id'];
	
	$spin_count_position ="select * from spin_tmptstb where ref_no='$my_id' AND cur_date='$curr_year-$curr_month-$curr_day'";
	$run_spin_count_position  = mysqli_query($con,$spin_count_position);
	while($row_spin_count_position = mysqli_fetch_array($run_spin_count_position))
	{
	 $tmpts_done = $row_spin_count_position['tempt_no'];
	 echo"<input id='spin_tmp_done' stylek='display:none;' value='$tmpts_done' />";
	}

}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='insert_spin_trans')
{
	$user_ip = $_GET['ipuser'];
	$my_id = $_GET['my_id'];

	$spin_amt_check ="select * from spin_tmptstb where ref_no='$my_id' AND ipuser='$user_ip' AND cur_date='$curr_year-$curr_month-$curr_day'";
	$run_spin_amt_check=mysqli_query($con,$spin_amt_check);
	while($row_spin_amt_check = mysqli_fetch_array($run_spin_amt_check))
	{
		
	 $reward_amt = $row_spin_amt_check['win_amount'];
	 
	$insert_rwd_trans ="insert into coot_transactiontb(user_ref_no,amount,trans_status,ipuser,cur_country,cur_city,cur_date,cur_month,cur_year,cur_time) 
	values('$my_id','$reward_amt','Deposit','$user_ip','$country','$city','$curr_day','$curr_month','$curr_year',CURTIME() )";
	$run_insert_rwd_trans = mysqli_query($con,$insert_rwd_trans);	

    if($run_insert_rwd_trans){
	$bnk_amt ="select * from coot_banktb where user_ref_no='$my_id' ";
	$run_bnk_amt  = mysqli_query($con,$bnk_amt);
	$check_bnk_amt = mysqli_num_rows($run_bnk_amt);
	
	if($check_bnk_amt >0){
		
	while($row_bnk_amt = mysqli_fetch_array($run_bnk_amt))
	{
	  $cur_bnk_amt = $row_bnk_amt['final_amount'];
	  $new_bnk_amt = $cur_bnk_amt + $reward_amt;
	  
	$update_bnk= "update coot_banktb set final_amount='$new_bnk_amt' where user_ref_no='$my_id' ";
    $run_update_bnk = mysqli_query($con,$update_bnk);
	    
	}
		
	}else{
		
	$insert_bnk_amt ="insert into coot_banktb(user_ref_no,final_amount,cur_country,cur_city,cur_date,cur_month,cur_year,cur_time) 
	values('$my_id','$reward_amt','$country','$city','$curr_day','$curr_month','$curr_year',CURTIME() )";
	$run_insert_bnk_amt = mysqli_query($con,$insert_bnk_amt);		
	
	}

}
}
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='disp_bnk_amt')
{
	$my_id = $_GET['my_id'];

	$get_bnk_amt ="select * from coot_banktb where user_ref_no='$my_id' ";
	$run_get_bnk_amt  = mysqli_query($con,$get_bnk_amt);
	while($row_get_bnk_amt = mysqli_fetch_array($run_get_bnk_amt))
	{
	  $bnk_amt = $row_get_bnk_amt['final_amount'];
      echo $bnk_amt;
	  ?> <input id="cur_spin_amt" value="<?php echo $bnk_amt; ?>" style="display:none;" /> <?php
	}
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if($status =='disp_referral')
{
	$my_id = $_GET['my_id'];

	$get_refer_code ="select * from coot_referraltb where user_ref_no='$my_id' ";
	$run_refer_code = mysqli_query($con,$get_refer_code);
	while($row_refer_code = mysqli_fetch_array($run_refer_code))
	{
	$refer_code = $row_refer_code['referral_code'];
     echo $refer_code;
	  
	}

}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if($status =='disp_user')
{
	$my_id = $_GET['my_id'];

	$con = mysqli_connect('localhost','root','2019khalaf','cranebule_userdb');
      if(! $con){echo"You have not connected to the database.";}
      else{
	$user_profile = "select * from cb_userstb where my_id='$my_id' ";
	$run_user_profile = mysqli_query($con,$user_profile);
	while($row_user_profile = mysqli_fetch_array($run_user_profile))
	{
	  $fname = $row_user_profile['fname'];
      echo $fname;
	  
	}
}
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//include('db.php'); 
if($status =='disp_trans_history')
{ 
	$my_id = $_GET['my_id'];


	$get_trans_history = "select * from coot_transactiontb where user_ref_no='$my_id' ORDER BY id desc ";
	$run_get_trans_history = mysqli_query($con,$get_trans_history);
	while($row_get_trans_history = mysqli_fetch_array($run_get_trans_history))
	{
	  $amount = $row_get_trans_history['amount'];
	  $trans_status = $row_get_trans_history['trans_status'];
	  $cur_date = $row_get_trans_history['cur_date'];
	  $cur_month = $row_get_trans_history['cur_month'];
	  $cur_year = $row_get_trans_history['cur_year'];
	  ?>
	  <span >
	  <span class="history_output" ><?php echo"$cur_date-$cur_month-$cur_year";  ?></span>
     <span class="history_output" ><?php echo"$trans_status";  ?></span>
     <span class="history_output" ><?php echo"$amount";  ?></span>
	  </span>
	  <?php
      
	  
	}
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='save_transfer')
{
	$my_id = $_GET['my_id'];
	$transf_toacc = $_GET['transf_toacc'];
	$transf_amt = $_GET['transf_amt'];
	$transf_pass = $_GET['transf_pass'];
	$my_id = $_GET['my_id'];
	
		$con = mysqli_connect('localhost','root','2019khalaf','cranebule_userdb');
      if(! $con){echo"You have not connected to the database.";}
      else{
	$user_profile = "select * from cb_userstb where my_id='$my_id' ";
	$run_user_profile = mysqli_query($con,$user_profile);
	while($row_user_profile = mysqli_fetch_array($run_user_profile))
	{
	  $password = $row_user_profile['password'];
	  $cb_userfname = $row_user_profile['fname'];
	  $cb_userlname = $row_user_profile['lname'];
	  $transfer_from_name = $cb_userfname.' '.$cb_userlname;
	  if($password !== $transf_pass ){ ?> <input id="final_output" value="0" /> <?php }else{ 
	  
	  ?> <!--input id="final_output" value="1" /--> <?php 
	  include('db.php'); 
	  	$get_bnk_amt ="select * from coot_banktb where user_ref_no='$my_id' ";
	$run_get_bnk_amt  = mysqli_query($con,$get_bnk_amt);
	while($row_get_bnk_amt = mysqli_fetch_array($run_get_bnk_amt))
	{
	  $bnk_amt = $row_get_bnk_amt['final_amount'];
	  
	  if($bnk_amt < $transf_amt){ ?> <input id="final_output" value="1" /> <?php  }else{
		  ?> <input id="final_output" value="2" /> <?php 
		  
	$new_dwn_amt = $bnk_amt - $transf_amt;
		  
	$update_bnk= "update coot_banktb set final_amount='$new_dwn_amt' where user_ref_no='$my_id' ";
    $run_update_bnk = mysqli_query($con,$update_bnk);
	if($run_update_bnk){
	
	$insert_rwd_trans ="insert into coot_transactiontb(user_ref_no,amount,trans_status,ipuser,cur_country,cur_city,cur_date,cur_month,cur_year,cur_time) 
	values('$my_id','$transf_amt','Transfer','$user_ip','$country','$city','$curr_day','$curr_month','$curr_year',CURTIME() )";
	$run_insert_rwd_trans = mysqli_query($con,$insert_rwd_trans);
	
	
	 $con = mysqli_connect('localhost','root','2019khalaf','cranepaydb');
 if(! $con){echo"You have not connected to the database.";}
 else{
 
   
   
         $get_receiver_bank_info ="select * from banktb where account_no='$transf_toacc' ";
	     $run_get_receiver_bank_info = mysqli_query($con,$get_receiver_bank_info);
	     while($row_get_receiver_bank_info = mysqli_fetch_array($run_get_receiver_bank_info))
	    {
        $bk_my_id = $row_get_receiver_bank_info['my_id'];
	    $recev_fname = $row_get_receiver_bank_info['fname'];
	    $recev_lname = $row_get_receiver_bank_info['lname'];		
	     $receiver_be4_amt = $row_get_receiver_bank_info['acc_amount'];
		 $receiver_name = $recev_fname.' '.$recev_lname; 
         $received_total_amt = $receiver_be4_amt+$transf_amt;

		 
			
		$update_receiver_bank_acc = "UPDATE banktb SET acc_amount='$received_total_amt' WHERE account_no='$transf_toacc' ";
		$run_update_receiver_bank_acc = mysqli_query($con,$update_receiver_bank_acc);
		if($run_update_receiver_bank_acc){ //echo"<script>window.open('transaction', '_self')</script>";

	$insert_send_money ="insert into bank_transtb(my_id,receive_account,receive_name,amount,transaction_type,charges,description,status,from_account,from_name,user_country,user_city,
	cur_date,cur_month,cur_year,curtime)
	values ('$bk_my_id','$transf_toacc','$receiver_name','$transf_amt','Transfer','0','Transfer','Success','$my_id','$transfer_from_name','$country','$city','$curr_day','$curr_month','$curr_year',CURTIME() )";
	$run_insert_send_money = mysqli_query($con,$insert_send_money);
	if($run_insert_send_money){}		
	
		}
 
 }
		  
	}  
}    
}	  	  
}	 
}	 
}
}
	
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='disp_emirc')
{
    $my_id = $_GET['my_id'];
	$get_crim = "select * from crimetb where user_ref_no='$my_id' AND action_status='active' ";
	$run_get_crim = mysqli_query($con,$get_crim);
	$check_get_crim = mysqli_num_rows($run_get_crim);
	if($check_get_crim >0){ ?> <input id="cm_waste" value="23" />  <?php }else{  ?> <input id="cm_waste" value="33" />  <?php }



}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='disp_quzi_lebal')
{
    $my_id = $_GET['my_id'];
	
	$check_ansed_qz = "select * from quzi_answertb where user_ref_no='$my_id' AND cur_date='$curr_day' AND cur_month='$curr_month' AND cur_year='$curr_year' ";
	$run_check_ansed_qz = mysqli_query($con,$check_ansed_qz);
	$check_quzi = mysqli_num_rows($run_check_ansed_qz);
	if($check_quzi >2){ ?>
		
  <div class="qtn_div_comp" >
  <span class="qtn_comp_title">Today's quzi completed</span>
  <span class="qoute_name_comp">Read more quotes to prepare for the next quzi tomorrow</span>
  </div>
		
	 <?php }else{
		 


	

	$get_quzi_lebal = "select * from quzitb ORDER BY RAND () LIMIT 1";
	$run_get_quzi_lebal = mysqli_query($con,$get_quzi_lebal);
	$check_quzi_lebal = mysqli_num_rows($run_get_quzi_lebal);
	
    while($row_get_quzi_lebal = mysqli_fetch_array($run_get_quzi_lebal))
	{	
	$qtn_id = $row_get_quzi_lebal['id'];
	$quote_name = $row_get_quzi_lebal['quote_name'];
    $question = $row_get_quzi_lebal['question'];
    $answer1 = $row_get_quzi_lebal['answer1'];
    $answer2 = $row_get_quzi_lebal['answer2'];
    $answer3 = $row_get_quzi_lebal['answer3'];
    $answer4 = $row_get_quzi_lebal['answer4'];
    $correct_ans = $row_get_quzi_lebal['correct_answer'];
	
		
	?> 
	
<div id="qtn_div" class="qtn_div" >
<span class="qtn_title">Testing your reading skills</span>
<span class="qtn_title" style="color:#4AD367;" >Award ugx 200</span>
<span class="qtn_test">Qtn. <?php echo $question; ?></span>

<span id="1" onClick="compare_ans(this.id);" class="ans_span"><span class=""><?php echo $answer1;?></span><span class="ans_indica"><span id="indi1" class="ans_indica_in"></span></span></span>
<span id="2" onClick="compare_ans(this.id);" class="ans_span"><span class=""><?php echo $answer2; ?></span><span class="ans_indica"><span id="indi2" class="ans_indica_in"></span></span></span>
<span id="3" onClick="compare_ans(this.id);" class="ans_span"><span class=""><?php echo $answer3; ?></span><span class="ans_indica"><span id="indi3" class="ans_indica_in"></span></span></span>
<span id="4" onClick="compare_ans(this.id);" class="ans_span"><span class=""><?php echo $answer4; ?></span><span class="ans_indica"><span id="indi4" class="ans_indica_in"></span></span></span>
<input id="qtn_id" value="<?php echo $qtn_id; ?>" style='display:none;' /> 
<button id="qtn_ans_btn" onClick="show_cor_answer();" class="qtn_ans_btn">Answer</button>
<button id="next_qtn_btn" onClick="disp_quzi_lebal();" class="qtn_ans_btn" style="display:none;" >Next</button>
</div>
<input id="corr_ans" value=" <?php echo $correct_ans; ?>" style='display:none;' /> 
	
    <div id="qtn_div_lebal" class="qtn_div_lebal" >
    <span class="qtn_title">Find & read the quote to answer the quzi</span>
    <span class="qoute_name"><?php echo $quote_name; ?></span>
    <span class="ans_span">Earn for each quzi you pass</span>

    <button onClick="show_quzi_qtn();" class="qtn_ans_btn">Take quzi</button>
    </div>


	<?php

}
}
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='save_answer')
{
   $my_id = $_GET['my_id'];
   $qtn_id = $_GET['qtn_id'];
   $correct_ans = $_GET['correct_ans'];
   $selected_ans = $_GET['selected_ans'];
   
   if($correct_ans == $selected_ans){$ans_status='Pass';}else{$ans_status='Failed';}
   
   $insert_quzi_ans ="insert into quzi_answertb(user_ref_no,question_id,answer,ans_position,ipuser,cur_country,cur_city,cur_date,cur_month,cur_year,cur_time ) 
   values('$my_id','$qtn_id','$selected_ans','$ans_status','$user_ip','$country','$city','$curr_day','$curr_month','$curr_year',CURTIME() )";
   $run_insert_quzi_ans = mysqli_query($con,$insert_quzi_ans);
   if($run_insert_quzi_ans){
   if($correct_ans == $selected_ans){
	   
  	$get_bnk_amt ="select * from coot_banktb where user_ref_no='$my_id' ";
	$run_get_bnk_amt  = mysqli_query($con,$get_bnk_amt);
	while($row_get_bnk_amt = mysqli_fetch_array($run_get_bnk_amt))
	{
	  $bnk_amt = $row_get_bnk_amt['final_amount'];
	  

	$new_dwn_amt = $bnk_amt + $qiz_earn;
		  
	$update_bnk= "update coot_banktb set final_amount='$new_dwn_amt' where user_ref_no='$my_id' ";
    $run_update_bnk = mysqli_query($con,$update_bnk);
	if($run_update_bnk){
	
	$insert_rwd_trans ="insert into coot_transactiontb(user_ref_no,amount,trans_status,ipuser,cur_country,cur_city,cur_date,cur_month,cur_year,cur_time) 
	values('$my_id','$qiz_earn','Quiz award','$user_ip','$country','$city','$curr_day','$curr_month','$curr_year',CURTIME() )";
	$run_insert_rwd_trans = mysqli_query($con,$insert_rwd_trans);
	}
	}
	} 
   }
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='disp_corr_ans') 
{
	$my_id = $_GET['my_id'];
	$get_corr_ans = "select * from quzi_answertb where user_ref_no='$my_id' ";
	$run_get_corr_ans = mysqli_query($con,$get_corr_ans);
    while($row_get_corr_ans = mysqli_fetch_array($run_get_corr_ans))
	{
		
	 $qtn_id = $row_get_corr_ans['question_id'];
     $answer = $row_get_corr_ans['answer'];
     $cur_date = $row_get_corr_ans['cur_date'];
	 $cur_month = $row_get_corr_ans['cur_month'];
	 $cur_year = $row_get_corr_ans['cur_year'];
	 $ans_position = $row_get_corr_ans['ans_position'];
	 
	$get_quzi_lebal = "select * from quzitb where id='$qtn_id' ";
	$run_get_quzi_lebal = mysqli_query($con,$get_quzi_lebal);
    while($row_get_quzi_lebal = mysqli_fetch_array($run_get_quzi_lebal))
	{

	$quote_name = $row_get_quzi_lebal['quote_name'];
    $question = $row_get_quzi_lebal['question'];
	 
	 
	 
   ?>
   
   <div class="compelete_qtn_div" >
   <span class="qtn_lebal" ><?php echo $question; ?></span>
   <span class="qoute_lebal" >Quote: <?php echo $quote_name; ?></span>
   <?php if($ans_position == 'Pass'){ ?>
   <span class="qtn_awade" >Earned 200</span>
   <?php }else{ ?>
   <span class="qtn_awade" style="background:red;" >Earned 0</span>
    <?php } ?>
   <span class="qtn_ans_date" ><?php echo"$cur_date-$cur_month-$cur_year"; ?></span>
   <?php if($ans_position == 'Pass'){ ?>
   <span class="qtn_status" >Completed</span>
   <?php }else{ ?>
   <span class="qtn_status" style="background:red;" >Completed</span>
    <?php } ?>
   </div>
   
   <?php
	}
	}
}

///////////////////////////index///////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='show_cor_answer')
{

   $taken_ans = $_GET['taken_ans'];
   $correct_ans = $_GET['correct_ans'];
   //$qtn_id = $_GET['qtn_id'];
  // $my_id = $_GET['my_id'];
   
   
   if($correct_ans == $taken_ans ){ ?> <input id="chosen_ans_status" value="1" style='display:none;' /> <?php }else{ ?> <input id="chosen_ans_status" value="2" style='display:none;' /> <?php }
	
}

///////////////////////////index///////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='check_comp_qiz')
{

   $qtn_id = $_GET['qtn_id'];
   $my_id = $_GET['my_id'];
   
   
   	$get_comp_qtn = "select * from quzi_answertb where user_ref_no='$my_id' AND question_id='$qtn_id' ";
	$run_get_comp_qtn = mysqli_query($con,$get_comp_qtn);
	$check_get_comp_qtn = mysqli_num_rows($run_get_comp_qtn);
	if($check_get_comp_qtn >0){ ?> <input id="check_qiz_comp" value="3" style='display:none;' />	<?php 
	}else{ ?> <input id="check_qiz_comp" value="4" style='display:none;' />	<?php }
}

///////////////////quzi//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if($status =='add_new_qtn')
{  
   $my_id = $_GET['my_id'];
   $qout_name = $_GET['qout_name'];
   $main_qtn = $_GET['main_qtn'];
   $ans1 = $_GET['ans1'];
   $ans2 = $_GET['ans2'];
   $ans3 = $_GET['ans3'];
   $ans4 = $_GET['ans4'];
   $corr_ans = $_GET['corr_ans'];
   
   $insert_new_qtn="insert into quzitb (my_id,quote_name,question,answer1,answer2,answer3,answer4,correct_answer,ipuser,cur_country,cur_city,cur_date,cur_time) 
   values('$my_id','$qout_name','$main_qtn','$ans1','$ans2','$ans3','$ans4','$corr_ans','$user_ip','$country','$city',CURDATE(),CURTIME()) ";
   $run_insert_new_qtn = mysqli_query($con,$insert_new_qtn);
   if($run_insert_new_qtn){echo"New question added.";}else{echo"Something went wrong.";}
 
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////





















?>

Youez - 2016 - github.com/yon3zu
LinuXploit