<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Approval list</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" integrity="sha512-Pwb0n8JH0BDI+u+S5vW5vGnwP5cTrhMOzoJ54oIT1ed2bLE8kvUd9JyA4uJSqcMXT0KtJd65fAMTyyF8SkVTKQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />

<style>
  .card {
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 120vh;
    margin: 30px auto;
    background-color: white;
  }

 

.buttonclss {
    color: white;
    width: 65px;
    background-color: #00cc44;
    height: 32px;
    border: none;
    border-radius: 8px;
    transition: background-color 0.3s ease; /* Add transition for smooth effect */
	
}

.buttonclss:hover {
    background-color: #008000; /* Change to a darker shade of green on hover */
}
.bckbntnn
{
	color: white;
    width: 65px;
    background-color:gray;
    height: 32px;
    border: none;
    border-radius: 8px;
    transition: background-color 0.3s ease; /* Add transition for smooth effect */
	float:right;
}
.bckbntnn:hover {
	color:white;
    background-color:black; /* Change to a darker shade of green on hover */
}
.approved
{
   color: white;
    width: 80px;
    background-color:#00cc66;
    height: 32px;
    border: none;
    border-radius: 8px;
    transition: ba	
}
.approved:hover
{
	
    background-color:#008040; /* Change to a darker shade of green on hover */
}
.rejects
{
	color: white;
    width: 80px;
    background-color:#ff0000;
    height: 32px;
    border: none;
    border-radius: 8px;
    transition: ba	
}
.rejects:hover
{
	    background-color:#b30000; /* Change to a darker shade of green on hover */



}

 .popup-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 9999;
  }
</style>
</head>
<body>
 <button type="button" id="backbtn" class="bckbntnn" onclick="backprof();">Back</button>

  <h2>User Details</h2>
  <?php
  
  session_start();

require("connect.php");	

$username = $_SESSION['username'];
 $rolemaster_id = $_SESSION['rolemaster_id'];
 
 $id=$_REQUEST['id'];
 //echo $id;
 $sql2 = $con->query("SELECT * FROM `user_master`where id='$id'");

      $profiledtils = $sql2->fetch(PDO::FETCH_ASSOC);
	  
		 
		  
		  $rolemasterid=$profiledtils['role_master_id'];
		  
		  $getuserdetials=$con->query("SELECT * FROM `profile_details` where rolemaster_id='$rolemasterid'");
	
            $uerdetails = $getuserdetials->fetch(PDO::FETCH_ASSOC);
			
			
  ?>
 <div style="display:flex;justify-content:space-between;">
<label style="font-size:20px;"><img src="/rythm/assets/user-account.png" style="height:25px;width:25px;">&nbsp;<?php echo  ucfirst($profiledtils['name'].''.$profiledtils['last_name']); ?></label>
<label  style="font-size:20px;"><img src="/rythm/assets/gmail.png" style="height:25px;width:25px;">&nbsp;&nbsp;<?php echo  ucfirst($profiledtils['email']); ?></label>
</div><br>

<div style="display:flex;justify-content:space-between;">
<label  style="font-size:20px;"><img src="/rythm/assets/call.png" style="height:25px;width:25px;">&nbsp;&nbsp;<?php echo  $profiledtils['mobile_no']; ?></label>
<label  style="font-size:25px;"><img src="/rythm/assets/title.png" style="height:30px;width:30px;">&nbsp;<?php echo  ucfirst($profiledtils['title']); ?></label>
<label  style="font-size:20px;"><img src="/rythm/assets/gps.png" style="height:28px;width:28px;"><?php echo  ucfirst($profiledtils['location']); ?></label>
</div>	
<br>
<hr><br>
<label style="font-size:26px;"><span style="color:blue;">About :</span> &nbsp;<?php echo ucfirst($uerdetails['about']);?></label>
<br><br>

<div style="display:flex;justify-content:space-between;">
<a href='<?php $uerdetails['facebook'];?>' style="text-decoration:none;color:black"><label style="font-size:18px;"><img src="/rythm/assets/facebook.png" style="height:25px;width:25px;">&nbsp;&nbsp;<?php echo $uerdetails['facebook'];?></label></a><br><br>

<a href='<?php $uerdetails['twitter'];?>' style="text-decoration:none;color:black"><label style="font-size:18px;"><img src="/rythm/assets/twitter.png" style="height:25px;width:25px;">&nbsp;&nbsp;<?php echo $uerdetails['twitter'];?></label></a>
</div>
<br>

<div style="display:flex;justify-content:space-between;">
<a href='<?php $uerdetails['instagram'];?>' style="text-decoration:none;color:black"><label style="font-size:18px;"><img src="/rythm/assets/instagram.png" style="height:25px;width:25px;">&nbsp;&nbsp;<?php echo $uerdetails['instagram'];?></label></a><br><br>

<a href='<?php $uerdetails['youtube'];?>' style="text-decoration:none;color:black"><label style="font-size:18px;"><img src="/rythm/assets/youtube.png" style="height:25px;width:25px;">&nbsp;&nbsp;<?php echo $uerdetails['youtube'];?></label></a>
</div>
<br>
<div style="display:flex;justify-content:space-between;">
    <label style="font-size:25px;display:flex;align-items:center;" onclick="poryfolioll();">
        Portfolio&nbsp;<img src="/rythm/assets/downnn.png" style="height:25px;width:25px;">
    </label>
    <label style="font-size:25px;display:flex;align-items:center;" onclick="achivementsfunction();">
        Achivements&nbsp;<img src="/rythm/assets/downnn.png" style="height:25px;width:25px;">
    </label>
    <label style="font-size:25px;display:flex;align-items:center;" onclick="projectfunc()">
        Project&nbsp;<img src="/rythm/assets/downnn.png" style="height:25px;width:25px;">
    </label>
</div>
<br><br>

<div class="portfolio" id="portofolliooo" style="display:none;">
    <?php
    // Get the image path from the database
    $imagePath = $uerdetails['imagevedioprotfloio'];
    
    // Remove /wamp62/www/ from the image path
    $imagePathWithoutWamp = str_replace("/wamp62/www/", "", $imagePath);
    ?>
    <img src="<?php echo '/'.$imagePathWithoutWamp; ?>" style="height: 150px; width: 150px;display:flex;margin:0 auto;">
</div>
<br><br>




<div class="achivemtnssss" id="achivemtnsssid" style="display:none;">
    <?php
	//echo $uerdetails['title_2'].'kjhygfds';
	
    if($uerdetails['title_1']!='')
	{
	?>
	<div style="margin-left:365px;">
	<label style="font-size:20px;">Title1:<?php echo $uerdetails['title_1'];?></label><br><br>

	<label style="font-size:20px;">Year1:<?php echo $uerdetails['year_1'];?></label><br><br>

	<label style="font-size:20px;">Awardedby:<?php echo $uerdetails['awardedby_1'];?></label><br><br>

	<label style="font-size:20px;">Description:<?php echo $uerdetails['description_1'];?></label><br><br>

	<label style="font-size:20px;">Image:<?php echo $uerdetails['image_1'];?></label><br><br>

	<label style="font-size:20px;">YoutubeLink:<?php echo $uerdetails['youtubeLink_1'];?></label><br><br>
</div><br><br>
	
	
	<?php
	}
	
	if($uerdetails['title_2']!='')
	{
		//echo $uerdetails['title_2'].'kjhygfds';
	?>
	<div style="margin-left:365px;">
	<label style="font-size:20px;">Title2:<?php echo $uerdetails['title_2'];?></label><br><br>

	<label style="font-size:20px;">Year2:<?php echo $uerdetails['year_2'];?></label><br><br>

	<label style="font-size:20px;">Awardedby2:<?php echo $uerdetails['awardedby_2'];?></label><br><br>

	<label style="font-size:20px;">Description2:<?php echo $uerdetails['description_2'];?></label><br><br>

	<label style="font-size:20px;">Image2:<?php echo $uerdetails['image_2'];?></label><br><br>

	<label style="font-size:20px;">YoutubeLink2:<?php echo $uerdetails['youtubeLink_2'];?></label><br><br>
</div><br><br>
	<?php
	}
	if($uerdetails['title_3']!='')
	{

    ?>
	<div style="margin-left:365px;">
	<label style="font-size:20px;">Title3:<?php echo $uerdetails['title_3'];?></label><br><br>

	<label style="font-size:20px;">Year3:<?php echo $uerdetails['year_3'];?></label><br><br>

	<label style="font-size:20px;">Awardedby3:<?php echo $uerdetails['awardedby_3'];?></label><br><br>

	<label style="font-size:20px;">Description3:<?php echo $uerdetails['description_3'];?></label><br><br>

	<label style="font-size:20px;">Image3:<?php echo $uerdetails['image_1'];?></label><br><br>

	<label style="font-size:20px;">YoutubeLink3:<?php echo $uerdetails['youtubeLink_3'];?></label><br><br>
</div><br><br>
	<?php
	}
	if($uerdetails['title_4']!='')
	{
	?>
	<div style="margin-left:365px;">
	<label style="font-size:20px;">Title4:<?php echo $uerdetails['title_4'];?></label><br><br>

	<label style="font-size:20px;">Year4:<?php echo $uerdetails['year_4'];?></label><br><br>

	<label style="font-size:20px;">Awardedby4:<?php echo $uerdetails['awardedby_4'];?></label><br><br>

	<label style="font-size:20px;">Description4:<?php echo $uerdetails['description_4'];?></label><br><br>

	<label style="font-size:20px;">Image4:<?php echo $uerdetails['image_4'];?></label><br><br>

	<label style="font-size:20px;">YoutubeLink4:<?php echo $uerdetails['youtubeLink_4'];?></label><br><br>
</div><br><br>
	<?php

	}
	if($uerdetails['title_5']!='')
	{
	?>
	<div style="margin-left:365px;">
	<label style="font-size:20px;">Title5:<?php echo $uerdetails['title_5'];?></label><br><br>

	<label style="font-size:20px;">Year5:<?php echo $uerdetails['year_5'];?></label><br><br>

	<label style="font-size:20px;">Awardedby5:<?php echo $uerdetails['awardedby_5'];?></label><br><br>

	<label style="font-size:20px;">Description5:<?php echo $uerdetails['description_5'];?></label><br><br>

	<label style="font-size:20px;">Image5:<?php echo $uerdetails['image_5'];?></label><br><br>

	<label style="font-size:20px;">YoutubeLink5:<?php echo $uerdetails['youtubeLink_5'];?></label><br><br>
</div><br><br>
	<?php
	}
	if($uerdetails['title_6']!='')
	{
	?>
	<div style="margin-left:365px;">
	<label style="font-size:20px;">Title6:<?php echo $uerdetails['title_6'];?></label><br><br>

	<label style="font-size:20px;">Year6:<?php echo $uerdetails['year_6'];?></label><br><br>

	<label style="font-size:20px;">Awardedby6:<?php echo $uerdetails['awardedby_6'];?></label><br><br>

	<label style="font-size:20px;">Description6:<?php echo $uerdetails['description_6'];?></label><br><br>

	<label style="font-size:20px;">Image6:<?php echo $uerdetails['image_5'];?></label><br><br>

	<label style="font-size:20px;">YoutubeLink6:<?php echo $uerdetails['youtubeLink_6'];?></label><br><br>
</div><br><br>
	<?php 
	}
	if($uerdetails['title_7']!='')
	{
	?>
	<div style="margin-left:365px;">
	<label style="font-size:20px;">Title7:<?php echo $uerdetails['title_7'];?></label><br><br>

	<label style="font-size:20px;">Year7:<?php echo $uerdetails['year_7'];?></label><br><br>

	<label style="font-size:20px;">Awardedby7:<?php echo $uerdetails['awardedby_7'];?></label><br><br>

	<label style="font-size:20px;">Description7:<?php echo $uerdetails['description_7'];?></label><br><br>

	<label style="font-size:20px;">Image7:<?php echo $uerdetails['image_7'];?></label><br><br>

	<label style="font-size:20px;">YoutubeLink7:<?php echo $uerdetails['youtubeLink_7'];?></label><br><br>
</div><br><br>
	<?php
	}
	if($uerdetails['title_8']!='')
	{
	?>
	<div style="margin-left:365px;">
	<label style="font-size:20px;">Title8:<?php echo $uerdetails['title_8'];?></label><br><br>

	<label style="font-size:20px;">Year8:<?php echo $uerdetails['year_8'];?></label><br><br>

	<label style="font-size:20px;">Awardedby8:<?php echo $uerdetails['awardedby_8'];?></label><br><br>

	<label style="font-size:20px;">Description8:<?php echo $uerdetails['description_8'];?></label><br><br>

	<label style="font-size:20px;">Image8:<?php echo $uerdetails['image_8'];?></label><br><br>

	<label style="font-size:20px;">YoutubeLink8:<?php echo $uerdetails['youtubeLink_8'];?></label><br><br>
</div><br><br>
	<?php
	}
	if($uerdetails['title_9']!='')
	{
	?>
	<div style="margin-left:365px;">
	<label style="font-size:20px;">Title9:<?php echo $uerdetails['title_9'];?></label><br><br>

	<label style="font-size:20px;">Year9:<?php echo $uerdetails['year_9'];?></label><br><br>

	<label style="font-size:20px;">Awardedby9:<?php echo $uerdetails['awardedby_9'];?></label><br><br>

	<label style="font-size:20px;">Description9:<?php echo $uerdetails['description_9'];?></label><br><br>

	<label style="font-size:20px;">Image9:<?php echo $uerdetails['image_9'];?></label><br><br>

	<label style="font-size:20px;">YoutubeLink9:<?php echo $uerdetails['youtubeLink_9'];?></label><br><br>
</div><br><br>
	<?php 
	}
	if($uerdetails['title_10']!='')
	{
		
	?>
	<div style="margin-left:365px;">
	<label style="font-size:20px;">Title10:<?php echo $uerdetails['title_10'];?></label><br><br>

	<label style="font-size:20px;">Year10:<?php echo $uerdetails['year_10'];?></label><br><br>

	<label style="font-size:20px;">Awardedby10:<?php echo $uerdetails['awardedby_10'];?></label><br><br>

	<label style="font-size:20px;">Description10:<?php echo $uerdetails['description_10'];?></label><br><br>

	<label style="font-size:20px;">Image10:<?php echo $uerdetails['image_10'];?></label><br><br>

	<label style="font-size:20px;">YoutubeLink10:<?php echo $uerdetails['youtubeLink_10'];?></label><br><br>
</div><br><br>
	<?php
	}
	if($uerdetails['title_1']=='' && $uerdetails['title_2']=='' && $uerdetails['title_3']=='' && $uerdetails['title_4']=='' && $uerdetails['title_5']=='' && $uerdetails['title_6']=='' && $uerdetails['title_7']=='' && $uerdetails['title_8']=='' && $uerdetails['title_9']=='' && $uerdetails['title_10']=='')
	{
			
	?>
	<label style="font-size:25px;text-align:center;color;red">Data Not Found</label><br><br>
	<?php 
	}
	
	?>
</div>
<br><br>













<div class="projectss" id="projectsiddd" style="display:none;">
    <?php
	//echo $uerdetails['title_2'].'kjhygfds';
	
    if($uerdetails['pjtitle_1']!='')
	{
	?>
	<div style="margin-left:365px;">
	<label style="font-size:20px;">Title1:<?php echo $uerdetails['pjtitle_1'];?></label><br><br>

	<label style="font-size:20px;">link_1_1:<?php echo $uerdetails['link_1_1'];?></label><br><br>

	<label style="font-size:20px;">link_1_2:<?php echo $uerdetails['link_1_2'];?></label><br><br>

	<label style="font-size:20px;">link_1_3:<?php echo $uerdetails['link_1_3'];?></label><br><br>

	<label style="font-size:20px;">link_1_4:<?php echo $uerdetails['link_1_4'];?></label><br><br>

	<label style="font-size:20px;">link_1_5:<?php echo $uerdetails['link_1_5'];?></label><br><br>
</div><br><br>
	
	
	<?php
	}
	
	if($uerdetails['pjtitle_2']!='')
	{
		//echo $uerdetails['title_2'].'kjhygfds';
	?>
	<div style="margin-left:365px;">
	<label style="font-size:20px;">Title1:<?php echo $uerdetails['pjtitle_2'];?></label><br><br>

	<label style="font-size:20px;">link_2_1:<?php echo $uerdetails['link_2_1'];?></label><br><br>

	<label style="font-size:20px;">link_2_2:<?php echo $uerdetails['link_2_2'];?></label><br><br>

	<label style="font-size:20px;">link_2_3:<?php echo $uerdetails['link_2_3'];?></label><br><br>

	<label style="font-size:20px;">link_2_4:<?php echo $uerdetails['link_2_4'];?></label><br><br>

	<label style="font-size:20px;">link_2_5:<?php echo $uerdetails['link_2_5'];?></label><br><br>
</div><br><br>
	<?php
	}
	if($uerdetails['pjtitle_3']!='')
	{

    ?>
	<div style="margin-left:365px;">
	<label style="font-size:20px;">Title1:<?php echo $uerdetails['pjtitle_3'];?></label><br><br>

	<label style="font-size:20px;">link_3_1:<?php echo $uerdetails['link_3_1'];?></label><br><br>

	<label style="font-size:20px;">link_3_3:<?php echo $uerdetails['link_3_2'];?></label><br><br>

	<label style="font-size:20px;">link_3_3:<?php echo $uerdetails['link_3_3'];?></label><br><br>

	<label style="font-size:20px;">link_3_4:<?php echo $uerdetails['link_3_4'];?></label><br><br>

	<label style="font-size:20px;">link_3_5:<?php echo $uerdetails['link_3_5'];?></label><br><br>
</div><br><br>
	<?php
	}
	if($uerdetails['pjtitle_4']!='')
	{
	?>
	<div style="margin-left:365px;">
	<label style="font-size:20px;">Title1:<?php echo $uerdetails['pjtitle_4'];?></label><br><br>

	<label style="font-size:20px;">link_4_1:<?php echo $uerdetails['link_4_1'];?></label><br><br>

	<label style="font-size:20px;">link_4_2:<?php echo $uerdetails['link_4_2'];?></label><br><br>

	<label style="font-size:20px;">link_4_3:<?php echo $uerdetails['link_4_3'];?></label><br><br>

	<label style="font-size:20px;">link_4_4:<?php echo $uerdetails['link_4_4'];?></label><br><br>

	<label style="font-size:20px;">link_4_5:<?php echo $uerdetails['link_4_5'];?></label><br><br>
</div><br><br>
	<?php

	}
	if($uerdetails['pjtitle_5']!='')
	{
	?>
	<div style="margin-left:365px;">
	<label style="font-size:20px;">Title1:<?php echo $uerdetails['pjtitle_1_5'];?></label><br><br>

	<label style="font-size:20px;">link_1_1:<?php echo $uerdetails['link_5_1'];?></label><br><br>

	<label style="font-size:20px;">link_1_2:<?php echo $uerdetails['link_5_2'];?></label><br><br>

	<label style="font-size:20px;">link_1_3:<?php echo $uerdetails['link_5_3'];?></label><br><br>

	<label style="font-size:20px;">link_1_4:<?php echo $uerdetails['link_5_4'];?></label><br><br>

	<label style="font-size:20px;">link_1_5:<?php echo $uerdetails['link_5_5'];?></label><br><br>
</div><br><br>
	<?php
	}
	if($uerdetails['pjtitle_6']!='')
	{
	?>
	<div style="margin-left:365px;">
	<label style="font-size:20px;">Title1:<?php echo $uerdetails['pjtitle_6'];?></label><br><br>

	<label style="font-size:20px;">link_6_1:<?php echo $uerdetails['link_6_1'];?></label><br><br>

	<label style="font-size:20px;">link_6_2:<?php echo $uerdetails['link_6_2'];?></label><br><br>

	<label style="font-size:20px;">link_6_3:<?php echo $uerdetails['link_6_3'];?></label><br><br>

	<label style="font-size:20px;">link_6_4:<?php echo $uerdetails['link_6_4'];?></label><br><br>

	<label style="font-size:20px;">link_6_5:<?php echo $uerdetails['link_6_5'];?></label><br><br>
</div><br><br>
	<?php 
	}
	if($uerdetails['pjtitle_7']!='')
	{
	?>
	<div style="margin-left:365px;">
	<label style="font-size:20px;">Title1:<?php echo $uerdetails['pjtitle_7'];?></label><br><br>

	<label style="font-size:20px;">link_7_1:<?php echo $uerdetails['link_7_1'];?></label><br><br>

	<label style="font-size:20px;">link_7_2:<?php echo $uerdetails['link_7_2'];?></label><br><br>

	<label style="font-size:20px;">link_7_3:<?php echo $uerdetails['link_7_3'];?></label><br><br>

	<label style="font-size:20px;">link_7_4:<?php echo $uerdetails['link_7_4'];?></label><br><br>

	<label style="font-size:20px;">link_7_5:<?php echo $uerdetails['link_7_5'];?></label><br><br>
</div><br><br>
	<?php
	}
	if($uerdetails['pjtitle_8']!='')
	{
	?>
	<div style="margin-left:365px;">
	<label style="font-size:20px;">Title1:<?php echo $uerdetails['pjtitle_8'];?></label><br><br>

	<label style="font-size:20px;">link_8_1:<?php echo $uerdetails['link_8_1'];?></label><br><br>

	<label style="font-size:20px;">link_8_2:<?php echo $uerdetails['link_8_2'];?></label><br><br>

	<label style="font-size:20px;">link_8_3:<?php echo $uerdetails['link_8_3'];?></label><br><br>

	<label style="font-size:20px;">link_8_4:<?php echo $uerdetails['link_8_4'];?></label><br><br>

	<label style="font-size:20px;">link_8_5:<?php echo $uerdetails['link_8_5'];?></label><br><br>
</div><br><br>
	<?php
	}
	if($uerdetails['pjtitle_9']!='')
	{
	?>
	<div style="margin-left:365px;">
	<label style="font-size:20px;">Title1:<?php echo $uerdetails['pjtitle_9'];?></label><br><br>

	<label style="font-size:20px;">link_9_1:<?php echo $uerdetails['link_9_1'];?></label><br><br>

	<label style="font-size:20px;">link_9_2:<?php echo $uerdetails['link_9_2'];?></label><br><br>

	<label style="font-size:20px;">link_9_3:<?php echo $uerdetails['link_9_3'];?></label><br><br>

	<label style="font-size:20px;">link_9_4:<?php echo $uerdetails['link_9_4'];?></label><br><br>

	<label style="font-size:20px;">link_9_5:<?php echo $uerdetails['link_9_5'];?></label><br><br>
</div><br><br>
	<?php 
	}
	if($uerdetails['pjtitle_10']!='')
	{
		
	?>
	<div style="margin-left:365px;">
	<label style="font-size:20px;">Title1:<?php echo $uerdetails['pjtitle_10'];?></label><br><br>

	<label style="font-size:20px;">link_10_1:<?php echo $uerdetails['link_10_1'];?></label><br><br>

	<label style="font-size:20px;">link_10_2:<?php echo $uerdetails['link_10_2'];?></label><br><br>

	<label style="font-size:20px;">link_10_3:<?php echo $uerdetails['link_10_3'];?></label><br><br>

	<label style="font-size:20px;">link_10_4:<?php echo $uerdetails['link_10_4'];?></label><br><br>

	<label style="font-size:20px;">link_10_5:<?php echo $uerdetails['link_10_5'];?></label><br><br>
</div><br><br>
	<?php
	}
	if($uerdetails['pjtitle_1']=='' && $uerdetails['pjtitle_2']=='' && $uerdetails['pjtitle_3']=='' && $uerdetails['pjtitle_4']=='' && $uerdetails['pjtitle_5']=='' && $uerdetails['pjtitle_6']=='' && $uerdetails['pjtitle_7']=='' && $uerdetails['pjtitle_8']=='' && $uerdetails['pjtitle_9']=='' && $uerdetails['pjtitle_10']=='')
	{
			
	?>
	<label style="font-size:25px;text-align:center;color;red">Data Not Found</label><br><br>
	<?php 
	}
	
	?>
</div>
<br><br>






 <button type="button" id="approvedbtn" class="approved" onclick="approved(<?php echo $id;?>);">Approve</button>

 <button type="button" id="rejectbtn" class="rejects" onclick="rejects();" style="margin-left:50px;">Reject</button>

<div id="popupCard" class="popup-card">
<img src="/rythm/assets/blkcolorcross.png" style="height:25px;width:25px;float:right;" onclick="closepopcard();">
  <h3>Reason for Rejection</h3>
  <textarea id="rejectReason" rows="4" cols="50"></textarea><br><br>
  <button onclick="saveRejectionReason(<?php echo $id;?>)" class="approved">Save</button>
</div>
</body>
</html>
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
	<Script>
	
	function poryfolioll()
	{
		$("#achivemtnsssid").slideUp();
		$("#projectsiddd").slideUp();
		$("#portofolliooo").slideDown();
		
	}
	function achivementsfunction()
	{
		
		$("#portofolliooo").slideUp();
		$("#projectsiddd").slideUp();
		$("#achivemtnsssid").slideDown();
	}
	function projectfunc()
	{
		$("#achivemtnsssid").slideUp();
		$("#portofolliooo").slideUp();
		$("#projectsiddd").slideDown();
	}
	function backprof()
	{
		window.location.href="/rythm/adminlogin/adminappravalpage.php";
	}
	function approved(id)
	{
		//debugger;
		$.ajax({
			url: 'approvedstsupdate.php?id='+id, // Replace with your server-side script URL
			type: 'POST',
			// Pass useriddd to the server
			success: function(data) {
				if(data==1)
				{
					alert('Approved For This Profile SuccessFully!..');
					window.location.href="/rythm/adminlogin/adminappravalpage.php";
				}
				else
				{
					alert('Not Approved For This Profile');
					window.location.href="/rythm/adminlogin/adminappravalpage.php";
				}
			
			
				//console.warn(data);
				//$('.card').html(data);
			},
			error: function(xhr, status, error) {
				// Handle errors
				console.error(xhr, status, error);
			}
		});
	}
</script>	
<script>
  function rejects() {
    document.getElementById('popupCard').style.display = 'block';
  }

  function saveRejectionReason() {
    var reason = document.getElementById('rejectReason').value;
    // Here you can handle saving the rejection reason with AJAX or other means
    console.log('Rejection Reason:', reason);
    // For now, let's close the popup card
    document.getElementById('popupCard').style.display = 'none';
  }
  
  
  function closepopcard()
  {
	 document.getElementById('popupCard').style.display = 'none'; 
  }
  function saveRejectionReason(id)
  {
	  var reason=$("#rejectReason").val();
	 $.ajax({
			url: 'rejectwithremarkstsupdate.php?id='+id, // Replace with your server-side script URL
			type: 'POST',
			data: {
            reason: reason // Pass the reason as data to the server
        },
			success: function(data) {
				if(data==1)
				{
					alert('Rejection For This Profile!..');
					window.location.href="/rythm/adminlogin/adminappravalpage.php";
				}
				else
				{
					alert('Not Rejection For This Profile');
					window.location.href="/rythm/adminlogin/adminappravalpage.php";
				}
			
			
				//console.warn(data);
				//$('.card').html(data);
			},
			error: function(xhr, status, error) {
				// Handle errors
				console.error(xhr, status, error);
			}
		}); 
  }
</script>