Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 93 additions & 32 deletions dashboard/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,39 +364,100 @@ function doButton(value) {
<?php

if (isset($_POST['resethwid'])) {

$today = time();

$cooldown = $today + $appcooldown;
$un = $_SESSION['un'];
$url = "https://keyauth.win/api/seller/?sellerkey={$SellerKey}&type=resetuser&user={$un}";

$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_exec($curl);

$url = "https://keyauth.win/api/seller/?sellerkey={$SellerKey}&type=setcooldown&user={$un}&cooldown={$cooldown}";

$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_exec($curl);

echo '
<script type=\'text/javascript\'>
$un = $_SESSION['un'];
$url = "https://keyauth.win/api/seller/?sellerkey={$SellerKey}&type=userdata&user={$un}";

$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$resp = curl_exec($curl);
$json = json_decode($resp);
$usercooldown = $json->cooldown;
$today = time();
if (is_null($cooldown)) {
$cooldown = $today + $appcooldown;
$un = $_SESSION['un'];
$url = "https://keyauth.win/api/seller/?sellerkey={$SellerKey}&type=resetuser&user={$un}";

$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_exec($curl);

$url = "https://keyauth.win/api/seller/?sellerkey={$SellerKey}&type=setcooldown&user={$un}&cooldown={$cooldown}";

$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_exec($curl);

echo '
<script type=\'text/javascript\'>

const notyf = new Notyf();
notyf
.success({
message: \'Reset HWID!\',
duration: 3500,
dismissible: true
});
const notyf = new Notyf();
notyf
.success({
message: \'Reset HWID!\',
duration: 3500,
dismissible: true
});

</script>
';
echo "<meta http-equiv='Refresh' Content='2;'>";
</script>
';
echo "<meta http-equiv='Refresh' Content='2;'>";
}
else
{
if($today > $usercooldown)
{
$cooldown = $today + $appcooldown;
$un = $_SESSION['un'];
$url = "https://keyauth.win/api/seller/?sellerkey={$SellerKey}&type=resetuser&user={$un}";

$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_exec($curl);

$url = "https://keyauth.win/api/seller/?sellerkey={$SellerKey}&type=setcooldown&user={$un}&cooldown={$cooldown}";

$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_exec($curl);

echo '
<script type=\'text/javascript\'>

const notyf = new Notyf();
notyf
.success({
message: \'Reset HWID!\',
duration: 3500,
dismissible: true
});

</script>
';
echo "<meta http-equiv='Refresh' Content='2;'>";
}
else
{
echo '
<script type=\'text/javascript\'>

const notyf = new Notyf();
notyf
.error({
message: \'Wait Cooldown!\',
duration: 3500,
dismissible: true
});

</script>
';
}
}
}
?>
</body>
Expand Down Expand Up @@ -428,4 +489,4 @@ function doButton(value) {
}
*/
#endregion
?>
?>