<?php require_once "../../includes/functions.inc"; if (Tools::isUserLogged() and $guid = Tools::valueGet("guid")) { $_SESSION['last_child'] = $guid; } Tools::redirect("../../index.php");
<?php require_once "includes/functions_no_session.inc"; $stat_message = ""; if ($id = Tools::isUserLogged()) { Tools::redirect("index.php"); } if ($u = Tools::valuePost("user") and $p = Tools::valuePost("pass") and Tools::valueGet("login") == 1) { if (Tools::signin($u, $p)) { Tools::redirect("index.php"); } else { Tools::redirect("signin.php?status=1"); } } if ($value = Tools::valueGet('status')) { if ($value == 1) { $stat_message = "<div class=\"alert animated fadeIn alert-danger text-center\">Wrong Username or Password!</div>"; } elseif ($value == 2) { $stat_message = "<div class=\"alert animated fadeIn alert-danger text-center\">Missing Credentials!</div>"; } elseif ($value == 3) { $stat_message = "<div class=\"alert animated fadeIn alert-success text-center\">Signup successful, login with your email or chosen username!</div>"; } elseif ($value == 4) { $stat_message = "<div class=\"alert animated fadeIn alert-success text-center\">Password successfully reset login with new password.</div>"; } } ?> <!DOCTYPE html> <html class="signin no-js" lang="en"> <head> <title>Grade Access - SIGN IN</title>
<?php require_once "../../includes/functions.inc"; $notifications = null; $new_message = null; $notif_alert = null; $end_product = null; if (Tools::isUserLogged()) { $user = new User($_SESSION['id']); if (Tools::valuePost("chat_id")) { $chat = new Chat(Tools::valuePost("chat_id")); if (Tools::valuePost("action") == "check_chat") { /*GET NEW CHAT MESSAGES FROM THE SERVER*/ $lastChat = Tools::valuePost("lastChat"); //echo ($_POST['lastChat']); if (Tools::valuePost("lastChat") == 'undefined') { $lastChat = 0; } if ($messages = $chat->getMessagesFrom($lastChat, $user->getID())) { $user->clearChatNotification($chat->getID()); foreach ($messages as $id) { $message = new Message($id); $sender = new User($message->getSenderID()); $time = strtotime($message->getTime()); $new_message .= "\n <div id=\"{$id}\" class=\"animated fadeIn chatbox-user right\">\n <a href=\"javascript:;\" class=\"chat-avatar pull-right\"> \n <img src=\"img/faceless.jpg\" class=\"img-circle\" title=\"user name\" alt=\"\">\n </a>\n\n <div class=\"message\">\n <div class=\"panel\">\n <div class=\"panel-heading\">\n {$sender->getFullName()}\n </div>\n\n <div class=\"panel-body\">\n <p>{$message->getMessage()}</p>\n </div>\n </div>\n\n <small class=\"chat-time\">\n <i class=\"ti-time mr5\"></i>\n <span data-livestamp=\"{$time}\"></span>\n <i class=\"ti-check text-success\"></i>\n </small>\n\n </div>\n </div>"; } echo $new_message; } } elseif (Tools::valuePost("action") == "send_chat") { /*SEND NEW CHAT MESSAGE TO THE SERVER*/ if (!empty(Tools::valuePost("message"))) {