-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings_picture.php
More file actions
39 lines (31 loc) · 1.13 KB
/
settings_picture.php
File metadata and controls
39 lines (31 loc) · 1.13 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
<?php
session_start();
$StreamIdentity = $_SESSION['StreamName'];
$StreamKey = $_SESSION['StreamKey'];
$StreamGame = $_SESSION['StreamGame'];
$c = mysql_connect("localhost", "user", "password");
$bancheck = "SELECT * FROM `wolfstream`.`accounts` WHERE `stream_name` = '$StreamIdentity'";
$e = mysql_query($bancheck, $c);
while($row = mysql_fetch_array($e)) {
$banned = (int) "{$row['banned']}";
$banreason = "{$row['banreason']}";
}
$enablePicture = mysql_escape_string(stripslashes($_POST['strmenable_picture']));
if($enablePicture == 'yes') {
$changepicturestatus = "UPDATE `wolfstream`.`accounts` SET `enablePicture` = 1 WHERE `stream_name` = '$StreamIdentity'";
$e2 = mysql_query($changepicturestatus,$c);
if(!$e2) {
die(mysql_error());
}
mysql_close($c);
header("Location: editstream.php");
}else{
$changepicturestatus = "UPDATE `wolfstream`.`accounts` SET `enablePicture` = 0 WHERE `stream_name` = '$StreamIdentity'";
$e2 = mysql_query($changepicturestatus,$c);
if(!$e2) {
die(mysql_error());
}
mysql_close($c);
header("Location: editstream.php");
}
?>