Add files via upload

This commit is contained in:
Justin 2022-07-20 09:39:59 -04:00 committed by GitHub
commit fa36df8a0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 1737 additions and 1 deletions

24
inc/view.php Normal file
View file

@ -0,0 +1,24 @@
<?php
require_once("../inc/conx.php");
$gtoken = safe($_GET['t']);
$gid = safe($_GET['i']);
if($gtoken == $u_token && $logged_in == true && $gid) {
$ver = mysqli_query($conx, "SELECT uid,app_uqid,view_link,viewed FROM notifs WHERE id='$gid'");
$s = mysqli_fetch_assoc($ver);
$notif_uid = $s['uid'];
$napp_uqid = $s['app_uqid'];
$napp_href = $s['view_link'];
$napp_viewed = $s['viewed'];
if($notif_uid == $u_uid) {
if($napp_viewed == 'no') {
mysqli_query($conx, "UPDATE notifs SET viewed='yes' WHERE id='$gid'");
}
header("location: $napp_href");
exit();
}
exit();
}
else {
exit();
}
?>