-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgroupadmin.php
More file actions
29 lines (25 loc) · 869 Bytes
/
groupadmin.php
File metadata and controls
29 lines (25 loc) · 869 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
28
29
<?php
include_once('Smarty.class.php');
$main_smarty = new Smarty;
include('config.php');
include(mnminclude.'html1.php');
include(mnminclude.'link.php');
include(mnminclude.'tags.php');
include(mnminclude.'smartyvariables.php');
check_referrer();
if(isset($_REQUEST["role"])){
$id = $_REQUEST["id"];
$userid = $_REQUEST["userid"];
if(!is_numeric($id) || !is_numeric($userid)){die();}
$role = $db->escape($_REQUEST["role"]);
$sql = "UPDATE " . table_group_member . " set member_role='".$role."' WHERE member_user_id =".$userid." and member_group_id =".$id."";
//echo $sql;
$db->query($sql);
//page redirect
$redirect = '';
$redirect = getmyurl("group_story", $id);
header("Location: $redirect");
//$db->query("UPDATE " . table_group_member . " set member_role='".$role."' WHERE member_user_id =".$userid." and member_group_id =".$id."");
die;
}
?>