-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdashboard.php
More file actions
27 lines (22 loc) · 774 Bytes
/
dashboard.php
File metadata and controls
27 lines (22 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
require 'api/callApi.php';
include 'front/req_header.php';
include 'front/temp_header.php';
session_start();
$_SESSION['companionName']='';
$_SESSION['companionUserId']='';
if(sizeof($_SESSION)==0){
header('Location: '.'/LocalNetworkChat');
}
$response=callGetCompanions($_SESSION['myUserId']);
checkResponse($response);
include 'front/temp_dashboard_main.php';
include 'front/temp_newChat.php';
include 'front/temp_footer.php';
if(isset($_POST['sendBtn'])){
$response=callGetUserFromName($_POST['companionUserName']);
checkResponse($response);
$response=callSendMsg($_SESSION['myUserId'],$response->user->id,$_POST['msg']);
checkResponse($response);
header('Location: '.'/LocalNetworkChat/dashboard.php');
}