header('Content-Type: text/html; charset=utf-8');
#error_reporting(E_ALL);
#ini_set('display_errors', '1');
$onelaunch = 1;
session_start();
include("../db.php");
// coupon sender through nostr by regional offers. everybody can add
$dt = "guapas.org";
$dd = "guapas.org";
include("../metas.php");
$ads = 1;
$hidefeatured = 1;
include("../header2.php");
?>
#print_r($_REQUEST);
$stmt = $pdodb->prepare("SELECT ID,fname,kinaddress,mainpic,username FROM girls WHERE ID=:sessid LIMIT 1");
$stmt->bindParam(':sessid',$_REQUEST["pl"]);
$stmt->execute();
while($i3=$stmt->fetch()) {
$dfname = $i3["fname"];
$pid = $i3["ID"];
$aboutme = $i3["aboutme"];
$dapproved = $i3["approved"];
$mainpic = $i3["mainpic"];
$emailis = $i3["emailis"];
$username = $i3["username"];
$password = $i3["password"];
$country = $i3["country"];
$views = $i3["views"];
$lastact = $i3["lastact"];
$tviews = $i3["tviews"];
$dpoints = $i3["points"];
$bday = $i3["bday"];
$bmonth = $i3["bmonth"];
$byear = $i3["byear"];
$rstatus = $i3["rstatus"];
$city = $i3["city"];
$paying = $i3["paying"];
$lastvisitor = $i3["lastvisitor"];
$tfollowers = $i3["tfollowers"];
$tfollowing = $i3["tfollowing"];
$nphotos = $i3["nphotos"];
$nposts = $i3["nposts"];
$mailoften = $i3["mailoften"];
$jobdesc = $i3["jobdesc"];
$edu = $i3["edu"];
$credits = $i3["credits"];
$karma = $i3["karma"];
$socmedia = $i3["socmedia"];
$publickey = $i3["publickey"];
$tppics = $i3["tppics"];
$ipaddr = $i3["ipaddr"];
$laststatus = $i3["laststatus"];
$laststatusid = $i3["laststatusid"];
$banned = $i3["banned"];
$verified = $i3["verified"];
$payuntil = $i3["payuntil"];
$telegram = $i3["telegram"];
$paypal = $i3["paypal"];
$venmo = $i3["venmo"];
$cashapp = $i3["cashapp"];
$bitcoin = $i3["bitcoin"];
$twitter = $i3["twitter"];
$instagram = $i3["instagram"];
$onlyfans = $i3["onlyfans"];
$bitclout = $i3["bitclout"];
$dating = $i3["datingact"];
$npages = $i3["npages"];
$nostrnpub = $i3["nostrnpub"];
$favrelay = $i3["favrelay"];
$tags = $i3["tags"];
$dblat = $i3["dblat"];
$kinaddress = $i3["kinaddress"];
}
// Create a DateTime object for the current date and time
$currentDate = new DateTime();
// Assuming you have the sender and receiver IDs
$senderId = $_SESSION["uid"]; // Example sender ID from session
$receiverId = $_REQUEST["pl"]; // Example receiver ID from request
// Prepare a SQL query to select the 'activeuntil' date for the chat based on sender and receiver IDs
$stmt = $pdodb->prepare("SELECT activeuntil FROM chats WHERE fromid = :senderId AND toid = :receiverId");
$stmt->bindParam(':senderId', $senderId, PDO::PARAM_INT);
$stmt->bindParam(':receiverId', $receiverId, PDO::PARAM_INT);
$stmt->execute();
// Fetch the 'activeuntil' date from the query result
$row = $stmt->fetch(PDO::FETCH_ASSOC);
// Check if the query returned a row and the 'activeuntil' date is set
if ($row && isset($row['activeuntil'])) {
// Convert the 'activeuntil' date from the database to a DateTime object
$activeUntilDate = new DateTime($row['activeuntil']);
// Compare the current date to the 'activeuntil' date
if ($currentDate < $activeUntilDate) {
// Current date is less than the chat activation date
$isActive = true;
} else {
// Current date is not less than the chat activation date
$isActive = false;
}
} else {
// No row returned or 'activeuntil' is not set, handle as needed
$isActive = false; // or handle this situation as appropriate
}
// Use $isActive as needed, for example:
if ($isActive) {
?>
} else {
$_SESSION["activateid"] = $pid;
# echo "Chat is not active.";
}
?>
if($mainpic <> ""){
?>
}
?>
entra en el chat
if($_SESSION["uid"] == ""){
echo '
login or register to chat with this person
';
}else{
?>
}
?>
include('../footer.php');
?>