-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
126 lines (116 loc) · 3.26 KB
/
index.php
File metadata and controls
126 lines (116 loc) · 3.26 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?php
$command = escapeshellcmd('C:\Users\hp\Anaconda3\python python/fetch_data.py');
$output = shell_exec($command);
//echo "hello";
//echo $output;
?>
<?php
$command = escapeshellcmd('C:\Users\hp\Anaconda3\python python/Movie_Recommender_User_Input.py');
$output = shell_exec($command);
//echo "hey";
//echo $output;
?>
<?php
session_start();
if (!isset($_SESSION['access_token']))
{
header('Location: login.php');
exit();
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>User Profile</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
<script type="text/javascript">
function logout() {
FB.logout(function(response) {
console.log("out");
});
}
</script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header class="text-right fixed">
<nav>
<ul>
<li><a href="index.php">Movies</a></li>
<li><a href="index_books.php">Books</a></li>
<li><a href="about.php">About</a></li>
<li class="logout"><a href="logout.php">Logout</a></li>
<li class="logo"><img style="height:60px; width:60px" src="<?php echo $_SESSION['userData']['picture']['url'] ?>" size=20px></li>
</ul>
</nav>
</header>
<div class="container" style="margin-top: 100px">
<div class="row text-center">
<div class="col mb-5">
<h1>Recommender System</h1>
</div>
</div>
<!-- <div class="row">
<div class="col text-right">
<a href="logout.php">Logout</a>
</div>
</div> -->
<!-- <div class="row justify-content-center">
<div class="col-md-3">
<img src="<?php echo $_SESSION['userData']['picture']['url'] ?>">
</div>
<div class="col-md-9">
<table class="table table-hover table-bordered">
<tbody>
<tr>
<td>ID</td>
<td><?php echo $_SESSION['userData']['id'] ?></td>
</tr>
<tr>
<td>First Name</td>
<td><?php echo $_SESSION['userData']['first_name'] ?></td>
</tr>
<tr>
<td>Last Name</td>
<td><?php echo $_SESSION['userData']['last_name'] ?></td>
</tr>
<tr>
<td>Email</td>
<td><?php echo $_SESSION['userData']['email'] ?></td>
</tr>
</tbody>
</table>
</div>
</div>
-->
<div class="row" style="margin-top: 40px">
<div class="col-6">
<h2>Personalized only for you!(Recommendations)</h2>
</div>
<!-- <div class="col-6 text-right">
<a href="index_books.php">Click Here to get recommended books</a>
</div> -->
</div>
<div class="row" style="margin-top: 40px">
<?php
$command = escapeshellcmd('python python/req_movies_poster.py');
$output = shell_exec($command);
echo $output;
?>
</div>
<div class="row" style="margin-top: 40px">
<h2>Popular Movies</h2>
</div>
<div class="row" style="margin-top: 40px">
<?php
$command = escapeshellcmd('python python/pop_movies_poster.py');
$output = shell_exec($command);
echo $output;
?>
</div>
</div>
</body>
</html>