{"id":42,"date":"2021-10-29T06:51:10","date_gmt":"2021-10-29T06:51:10","guid":{"rendered":"https:\/\/demo.iris-spa.it\/?page_id=42"},"modified":"2021-10-29T10:22:18","modified_gmt":"2021-10-29T10:22:18","slug":"riservato","status":"publish","type":"page","link":"https:\/\/demo.iris-spa.it\/index.php\/riservato\/","title":{"rendered":"Riservato"},"content":{"rendered":"\n<p>Da questa pagina gli utenti autorizzati possono accedere ai servizi aggiuntivi&#8230;<\/p>\n\n\n<p><!--?php\nsession_start(); \/\/ Starting Session\nrequire 'setupdata.inc';\n$error=''; \/\/ Variable To Store Error Message\nif (isset($_POST['submit'])) {\nif (empty($_POST['username']) || empty($_POST['password'])) {\n$error = \"Username or Password is invalid\";\n}\nelse\n{\n\/\/ Define $username and $password\n$username=$_POST['username'];\n$password=$_POST['password'];\n\/\/ Establishing Connection with Server by passing server_name, user_id and password as a parameter\n\/\/$connection = mysql_connect(\"localhost\", \"root\", \"\");\n$connection = mysql_connect(\"127.0.0.1\", $db_user, $db_passwd);\n\/\/ To protect MySQL injection for Security purpose\n$username = stripslashes($username);\n$password = stripslashes($password);\n$username = mysql_real_escape_string($username);\n$password = mysql_real_escape_string($password);\n\/\/ Selecting Database\n\/\/$db = mysql_select_db(\"company\", $connection);\n$db = mysql_select_db($db_name, $connection);\n\/\/ SQL query to fetch information of registerd users and finds user match.\n\/\/$query = mysql_query(\"select * from login where password='$password' AND username='$username'\", $connection);\n $query = mysql_query(\"select * from agenti where agepassword='$password' AND agenomeut='$username'\", $connection);\n \n$rows = mysql_num_rows($query);\nif ($rows == 1) {\n$_SESSION['login_user']=$username; \/\/ Initializing Session\nheader(\"location: profile.php\"); \/\/ Redirecting To Other Page\n} else {\n$error = \"Username or Password is invalid\";\n}\nmysql_close($connection); \/\/ Closing Connection\n}\n}\n?--><\/p>","protected":false},"excerpt":{"rendered":"<p>Da questa pagina gli utenti autorizzati possono accedere ai servizi aggiuntivi&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-42","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/demo.iris-spa.it\/index.php\/wp-json\/wp\/v2\/pages\/42","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demo.iris-spa.it\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/demo.iris-spa.it\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/demo.iris-spa.it\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/demo.iris-spa.it\/index.php\/wp-json\/wp\/v2\/comments?post=42"}],"version-history":[{"count":16,"href":"https:\/\/demo.iris-spa.it\/index.php\/wp-json\/wp\/v2\/pages\/42\/revisions"}],"predecessor-version":[{"id":72,"href":"https:\/\/demo.iris-spa.it\/index.php\/wp-json\/wp\/v2\/pages\/42\/revisions\/72"}],"wp:attachment":[{"href":"https:\/\/demo.iris-spa.it\/index.php\/wp-json\/wp\/v2\/media?parent=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}