include "admin/include/setup.php"; initSetup(); session_start(); header("Cache-control: private"); if (isset($_POST) && !empty($_POST)) { $username = $_POST["email"]; $password = $_POST["password"]; $sqlUser = "Select `users`.id, `users`.link from `users` where login=\"$username\" and password=\"$password\""; $queryUser = mysql_query($sqlUser); if (mysql_num_rows($queryUser) != 0) { while ($rows = mysql_fetch_assoc($queryUser)) { $clone = $rows["link"]; $id = $rows["id"]; } $_SESSION["id"] = $id; $_SESSION["loginuser"] = md5("1"); if (!file_exists("../database/_companies/$clone")) { $url = "view.php?id=0"; } else { $url = "view.php?id=$id"; } $html = implode('',file("templates/landing.htm")); $html = str_replace("[logout]", "logout.php", $html); $html = str_replace("[url]", $url, $html); echo $html; exit; } else { $_GET["type"] = "invalid"; } } ?>
|
|
|||||||||||||||
|
|
|
||||||||||||||