<?php

include "admin/config/config.php";
include "admin/include/function.php";
$time = date("Y-m-d H:i:s");
if (isset($_GET["cancel"])) {
    cancel_request($_GET["cancel"]);
}
if (isset($_GET["reject"])) {
    reject_request($_GET["reject"]);
}
if (isset($_GET["unfriend"])) {
    unfriend_request($_GET["unfriend"]);
}
예제 #2
0
    </div>
    <div class="content">
      <div class="content_bg">
        <div class="mainbar">
          <div class="article">
			
			<?php 
if (isset($_POST["confirm"]) && isset($_POST["user_request"])) {
    if ($_POST["approve"] = "accept") {
        if (make_friend($_SESSION["username"], $_POST["user_request"])) {
        } else {
            echo "<div class=\"error\" There occured some problem></div>";
        }
    } else {
        if ($_POST["approve"] = "cancel") {
            if (cancel_request($_SESSION["username"], $_POST["user_request"])) {
            } else {
                echo "<div class=\"error\" There occured some problem></div>";
            }
        }
    }
}
?>
		
			<?php 
global $connection;
$user_name = $_SESSION["username"];
$query = "select requests from login_info where user_name ='{$user_name}'";
$result = mysqli_query($connection, $query) or die("Database query failed: " . mysqli_error($connection));
$row = mysqli_fetch_assoc($result);
$res = $row["requests"];
예제 #3
0
global $page;
$page = $_REQUEST["page"];
if ($_REQUEST["action"] == 'create_student') {
    $message = create_student();
}
if ($_REQUEST["action"] == 'create_tutor') {
    $message = create_tutor();
}
if ($_REQUEST["action"] == 'create_tutor_request') {
    $message = create_tutor_request();
}
if ($_REQUEST["action"] == 'edit_request') {
    $message = edit_request();
}
if ($_REQUEST["action"] == 'cancel_request') {
    $message = cancel_request();
}
if ($_REQUEST["action"] == 'login') {
    $message = login();
}
if ($_REQUEST["action"] == 'logout') {
    $message = logout();
}
if ($_REQUEST["action"] == 'confirm') {
    $message = confirm();
}
include 'header.php';
if ($page == '') {
    ?>
    <div class="main">
    <?php 
예제 #4
0
                     delete_student();
                 } else {
                     if ($_REQUEST["action"] == 'delete_tutor') {
                         delete_tutor();
                     } else {
                         if ($_REQUEST["action"] == 'delete_request') {
                             delete_request();
                         } else {
                             if ($_REQUEST["action"] == 'delete_match') {
                                 delete_match();
                             } else {
                                 if ($_REQUEST["action"] == 'save_calling_screen') {
                                     save_calling_screen();
                                 } else {
                                     if ($_REQUEST["action"] == 'cancel_request') {
                                         cancel_request();
                                     } else {
                                         if ($_REQUEST["action"] == '') {
                                         } else {
                                             show_error("action: " . $_REQUEST['action'] . " not understood");
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }