-
Notifications
You must be signed in to change notification settings - Fork 1
/
social.php
43 lines (42 loc) · 1.46 KB
/
social.php
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<html>
<?php require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'header.html' ?>
<?php
session_start();
if(empty($_SESSION['login_user'])){
header("location: land.php");exit();
}
require_once './config.php';
$con = mysqli_connect($hostname, $username, $password, $databasename);
if (mysqli_connect_errno()) {
header("location: error.html");//die("Failed to connect");
}
?>
<body>
<div class="demo-layout mdl-layout mdl-js-layout mdl-layout--fixed-drawer mdl-layout--fixed-header">
<?php require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'header_bar.html' ?>
<?php require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'sidebar.php' ?>
<?php
$q1="select uname from user where isPm=true";
$rs1=mysqli_query($con,$q1);
if(mysqli_errno($con)){
header("location: error.php");exit();
}
while($r1=mysqli_fetch_array($rs1)){
$q2="select uname from user where allotedto='$r1[0]'";
$rs2=mysqli_query($con,$q2);
if(mysqli_errno($con)){
header("location: error.php");exit();
}
while($r2=mysqli_fetch_array($rs2)){
// print here.
}
}
?>
<main class="mdl-layout__content mdl-color--grey-100">
<div class="mdl-grid demo-content">
</div>
</main>
</div>
<script src="../../material.min.js"></script>
</body>
</html>