forked from lucasvaltl/Pano
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.php
More file actions
186 lines (149 loc) · 7.91 KB
/
Copy pathsettings.php
File metadata and controls
186 lines (149 loc) · 7.91 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<?php
//ob_start needed to allow redirecting after login
ob_start();
//session_start() needed to use global session variabls $_SESSION etc
session_start();
include('includes/config.php');
if(isset($_GET['error'])){
$error = $_GET['error'];
}
//make sure upload variable is false, even when just logging in (usually it would be null at this point)
if (!isset($_SESSION['uploadSuccessful'])) {
$_SESSION['uploadSuccessful'] = false;
}
require_once('includes/dbconnect.php');
include('includes/validatesettingchange.php');
if(!isset($error)){
include('includes/updateprofilepic.php');
}
?>
<!DOCTYPE html>
<html>
<head>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
<script src="https://use.fontawesome.com/ed51c90fe4.js"></script>
<link rel="stylesheet" href="css/offset.css">
<link rel="stylesheet" href="dropzone.css">
<link rel="stylesheet" href="css/style.css">
<title>Pano - Settings</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
<meta name="theme-color" content="#ffffff">
<meta property="og:title" content="Pano" />
<meta property="og:image" content="https://apppanoblob.blob.core.windows.net/assets/ogimage.jpg" />
<meta property="og:description" content="The social network taking a wider perspective " />
</head>
<body id="gradhome">
<?php
include('includes/header.php');
?>
<main>
<div >
<br />
<p>
<h2>Change Profile Picture:</h2>
</p>
<div class="drag-in">
<form action="<?=SITE_ROOT?>/includes/upload.php" class="dropzone dropzone-profilepic <?php if (isset($error) && $error == 'upload-error'){
echo 'inputbox-error';
}?>" type="post">
<input type="hidden" name="hashname" value="<?=$_SESSION['UserID']?>">
<input type="hidden" name="picType" value="profilepics">
<div class="dz-message data-dz-message"><?php if (isset($error) && $error == 'upload-error') : ?>
<span class="alert alert-danger">Please add a profile picture. Only jpg files of less than 6mb are allowed.</span>
<?php else: ?>
<span>Drag your profile picture into here - Or just click*</span>
<?php endif; ?></div><br>
</form>
</div>
<form action="<?= $_SERVER['PHP_SELF'];?>" method="post" class="padding-top-20 larger-font">
<input type="submit" name="confirmPic" class="btn btn-default lv-button" value="Confirm Pic" />
</form>
<div class="seperator-settings">
<hr/>
<div class="seperator-settings-inner">
</div>
</div>
<h2>Change Settings:</h2>
<?php if ($successful_change) : ?>
<p class="alert alert-success fade in">Successfully changed settings.</p>
<?php endif;?>
<div class="privacy-options drag-in">
<h3>Privacy Options:</h3>
<form action="<?= $_SERVER['PHP_SELF']; ?>" method="post" class="form-group">
<br />
<p>
<label class="radio-inline"><input type="radio" name="SettingID" value="1"
<?php if ($_SESSION['SettingID'] == 1) : ?>checked<?php endif; ?>
> Friends Only</label>
</p>
<br />
<p>
<label class="radio-inline"><input type="radio" name="SettingID" value="2"
<?php if ($_SESSION['SettingID'] == 2) : ?>checked<?php endif; ?>
> Friends of Friends</label>
</p>
<br />
<p>
<label class="radio-inline"><input type="radio" name="SettingID" value="3"
<?php if ($_SESSION['SettingID'] == 3) : ?>checked<?php endif; ?>
> Public</label>
</p>
<div class="row">
<?php if ($invalid_credentials) : ?>
<p class="alert alert-danger">Invalid credentials. Please try again.</p>
<?php endif; ?>
<br />
<label for="pwd">Please type your password for confirmation:</label>
<input type="password" class="form-control" id="pwd" name="Password" placeholder="Password">
<br>
<h3>Change Password:</h3>
<label for="pwd">New Password: (Only type something if you wish to change your password)</label>
<input type="password" class="form-control" id="pwd" name="NewPassword" placeholder="Password">
<br>
<input type="submit" name="submit" class="btn btn-default lv-button" value="Save Settings" />
<br />
</div>
</div>
</form>
<div class="larger-font">
<br />
<a href="logout.php" type="button" class="btn btn-default lv-button">Sign Out</a>
</div>
<br />
<br />
<h4>About:</h4>
<div class="container about">
<p>
Pano is a social network that takes a wider perspective. It is specifically tailerd towards enjoying panoaramic pictures in a desktop environment. This website was created by Johannes Landgraf, Florian Obst, Li Xie and Lucas Valtl as part of a coursework requirement for the COMPGC06 Course taken at University College London. It is currently in a proof of concept stage. None of the features, or the site itself, are guaranteed to work. Should the site be unexpectedly be down, it is presumably because we have run out hosting credits..;)
</p>
</div>
<br />
<h5> Disclaimer: </h5>
<div class="container">
<div class="legal-policy">
<p>
The information contained in this website is for general information purposes only. The information is provided by Johannes Landgraf, Florian Obst, Li Xie and Lucas Valtl ("we", "us") and while we endeavour to keep the information up to date and correct, we make no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the website or the information, products, services, or related graphics contained on the website for any purpose. Any reliance you place on such information is therefore strictly at your own risk.
</p>
<p>
In no event will we be liable for any loss or damage including without limitation, indirect or consequential loss or damage, or any loss or damage whatsoever arising from loss of data or profits arising out of, or in connection with, the use of this website.
Through this website you are able to link to other websites which are not under the control of us We have no control over the nature, content and availability of those sites. The inclusion of any links does not necessarily imply a recommendation or endorse the views expressed within them.
</p>
<p>
Every effort is made to keep the website up and running smoothly. However, we take no responsibility for, and will not be liable for, the website being temporarily unavailable due to technical issues.
</p>
</div>
</div>
</main>
<?php
include('includes/footer.php');
?>
</body>
<script src="dropzone.js"></script>
</html>