<?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 include "includes/functions.inc"; $news = null; $next_link = null; $previous_link = null; $del = Tools::valueGet("news_id"); if ($news_id = Tools::valueGet("news_id")) { $news = new Newsletter($news_id); $newsletter = $news->getFields(); $del = $news_id; } else { $news = new Newsletter($school->getLastNewsId()); $newsletter = $news->getFields(); $del = $news->getID(); } if ($news_id = $news->getNextId($school->getId())) { $next_link = $news_id; } else { $next_link = $school->getLastNewsId(); } if ($news_id = $news->getPreviousId($school->getId())) { $previous_link = $news_id; } else { $previous_link = $school->getLastNewsId(); } //echo $user->getType(); if ($user->getType() == "parent") { include "app/parent/news_letter.php"; } elseif ($user->getType() == "admin") { $delete_link = "process/workers/del_news.php?guid={$del}";
<?php $main = null; if (Tools::valueGet("action") == "") { $main = "app/modules/admin/news"; } elseif (Tools::valueGet("action") == "create") { $main = "app/modules/admin/create_news"; } $page['title'] = "Manage Newsletter"; $page['css'] = "<link rel=\"stylesheet\" href=\"plugins/summernote/dist/summernote.css\">"; $page['main'] = $main; $page['js'] = "<script src=\"plugins/summernote/dist/summernote.min.js\"></script>"; $page['js_scripts'] = "<script>\n \$(document).ready(function() {\n \$('#summernote').summernote({\n height: 500\n });\n \$('.note-toolbar').addClass('ml0');\n \$('.note-toolbar').append('<div class=\\'note-style btn-group\\'>' +\n '<a href=\\'javascript:;\\' class=\\'btn btn-primary\\' data-loading-text=\\'Saving...\\' id=\\'summersavebtn\\'>Save!</a>'+\n '</div>');\n //alert(\$('#summernote').code());\n\n //WHEN SAVE BUTTON IS CLICKED\n var action;\n\n if(\$('div#summernote').data('news-id') == 'new'){\n action = 'create_news';\n } else{\n action = 'save_news';\n }\n\n \$('#summersavebtn').click(function() {\n //alert( \$('#summernote').code());\n \$('#summersavebtn').button('loading');\n \$.ajax({\n type: 'POST',\n url: 'process/workers/ajax_summernote_save.php',\n dataType: 'text',\n data: {\n action: action,\n id: \$('div#summernote').data('news-id'),\n title: \$('input#title').val(),\n content: \$('#summernote').code()\n },\n success: function (response) {\n alert(response);\n \$('#summersavebtn').button('reset');\n //var data = \$.parseJSON(response);\n },\n error: function (response) {\n \$('#summersavebtn').button('reset');\n alert('An error occurred, please save again or check your internet connection!');\n }\n });\n });\n });\n</script>"; include "app/admin/admin_page.php";
<div class="center-content"> <div class="row no-m"> <div class="col-xs-12 col-sm-6 col-sm-offset-3 col-md-4 col-md-offset-4 col-lg-2 col-lg-offset-5 text-center mb0"> <a href="index.php"> <img class="" src="img/logo.png" alt="Grade Access logo" /> </a> </div> <div class="col-xs-12 col-sm-6 col-sm-offset-3 col-md-4 col-md-offset-4 col-lg-8 col-lg-offset-2 text-center mt25"> <section class="panel bg-white no-b"> <ul class="switcher-dash-action"> <li><a href="signin.php" class="selected">Sign in</a></li> <li class="active"><a href="javascript:;" class="">Signup</a></li> </ul> <div class="p15"> <?php if ($err = Tools::valueGet("status")) { if ($err == 1) { echo "<div class=\"alert alert-info animated fadeIn\">The token does not exist, contact the school you are trying to signup to.</div>"; } elseif ($err == 2) { echo "<div class=\"alert alert-danger animated fadeIn\">The email is already being used<br>\n <a href=\"forgot.php\" class=\"btn btn-danger btn-outline\">Click here</a> to reset your password, if you forgot it\n </div>\n "; } elseif ($err == 3) { echo "<div class=\"alert alert-danger animated fadeIn\">The phone number is already being used<br>\n <a href=\"forgot.php\" class=\"btn btn-danger btn-outline\">Click here</a> to reset your password, if you forgot it\n </div>"; } elseif ($err == 4) { echo "<div class=\"alert alert-danger animated fadeIn\">Something went wrong<br>\n <a href=\"bug.php\" class=\"btn btn-primary btn-outline\">Please go to this page</a> to get it fixed\n </div>\n "; } } ?> <form class="form" class="parsley-form" method="post" action="process/forms/signup.php" data-parsley-validate> <div class="row"> <div class="col-xs-12 col-lg-3">
<?php require_once "../../includes/functions.inc"; if (Tools::isUserLogged() and $guid = Tools::valueGet("guid")) { $_SESSION['last_child'] = $guid; } Tools::redirect("../../index.php");
<?php include "includes/functions.inc"; if ($p = Tools::valueGet("guid")) { if (!($profile = new User($p))) { $profile = $user; $me = true; } else { $me = false; } if ($p == $user->getID()) { $me = true; } } else { $profile = $user; $me = true; } if ($user->getType() == "parent") { include "app/parent/profile.php"; } elseif ($user->getType() == "teacher") { include "app/teacher/profile.php"; } elseif ($user->getType() == "admin") { include "app/admin/profile.php"; }
<?php require_once "../../includes/functions.inc"; $teacher = new Teacher(Tools::valueGet("guid")); if (Tools::valueGet("method") == "activate") { $teacher->authorize(); } if (Tools::valueGet("method") == "deactivate") { $teacher->unauthorize(); } if (Tools::valueGet("method") == "delete") { $teacher = new User(Tools::valueGet("guid")); $teacher->delete(); } Tools::redirect("../../a_activate_staff.php?success=1");
include "includes/functions.inc"; if ($user->getType() == "parent") { } $sessions = $school->getAllSessions(); $terms = $school->getAllTerms(); $current_session = $school->getCurrentSession(); $current_term = $school->getCurrentTermID(); $options = null; $options1 = null; $period_reminder = null; $c_teacher = null; $scores = null; //print_r($terms); if ($psu_check) { if ($get_year = Tools::valueGet("year") and $get_term = Tools::valueGet("term")) { //FOR THE HEADER PANEL SELECTS $year = null; $term = null; foreach ($sessions as $key => $value) { if ($value == $get_year) { $options .= "<option selected value=\"{$value}\">{$value} SESSION</option>"; $year = $value; } else { $options .= "<option value=\"{$value}\">{$value} SESSION</option>"; } } foreach ($terms as $key => $value) { if ($value['term_id'] == $get_term) { $options1 .= "<option selected value=\"{$value['term_id']}\">{$value['nice_name']}</option>"; $term = $value['nice_name'];
<?php require_once "../../includes/functions.inc"; if ($id = Tools::valueGet("guid")) { $news = new Newsletter($id); $news->delete($school->getID()); } Tools::redirect("../../news_letter.php");
<?php include "includes/functions.inc"; $chat = false; if ($get_chat_id = Tools::valueGet("chat_id")) { $chat = new Chat($get_chat_id); if (!$chat->checkUser($user->getID())) { Tools::redirect("index.php"); } //$messages = $chat->getMessages(); } elseif ($u_id = Tools::valueGet("user")) { $ch_user = new User($u_id); $insert_id = null; if ($u_id != $user->getID()) { if ($user->getChatsID() and $ch_user->getChatsID()) { if ($chat_id = array_intersect($user->getChatsID(), $ch_user->getChatsID())) { $chat_id = current($chat_id); $chat = new Chat($chat_id); } else { $insert_id = App::startChat($user->getID(), $ch_user->getID()); $chat = new Chat($insert_id); } } else { $insert_id = App::startChat($user->getID(), $ch_user->getID()); $chat = new Chat($insert_id); } } else { Tools::redirect("messages.php"); } } else { Tools::redirect("messages.php");
<?php require_once "../../includes/functions.inc"; if ($reg = Tools::valueGet("reg_no") and Tools::valueGet("last_name") and Tools::valueGet("birth_day")) { $date = strtotime(Tools::valueGet("birth_day")); $school = new School($user->getSchoolID()); echo $user->getSchoolID(); //die($id = $school->findStudentByRegNo($reg)); if ($id = $school->findStudentByRegNo($reg)) { $stu = new Student($id); $fields = $stu->getFields(); $dbdate = $fields['dob']; $id = $fields['student_id']; $dbdate = strtotime($dbdate); if ($date == $dbdate) { $parent->linkChild($id); Tools::redirect("../../link.php?success=1"); } else { echo "Birthday different"; echo $date; echo $dbdate; Tools::redirect("../../link.php?success=3"); } } else { echo "No id match found"; Tools::redirect("../../link.php?success=2"); } }