Repository navigation
Expand file tree
/
Copy pathadmincontrols2.php
More file actions
85 lines (75 loc) · 2.89 KB
/
Copy pathadmincontrols2.php
File metadata and controls
85 lines (75 loc) · 2.89 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
<div id="admincontrols">
<div class="admincontrolsheader">
Administration Controls
</div>
<?php
$keepalive = 'update user_profiles set date_last = NOW() where user_id = '.$_SESSION['user_id'];
$resultID = mysql_query($keepalive, $linkID);
if ($msg = mysql_error())
echo __LINE__ . ' of ' . __FILE__ . '<pre>' . $keepalive . '</pre><br /> (caused: ' . $msg .')';
$user_group = $_SESSION["user_group"];
$getpermissions = '
SELECT * FROM `group_permissions`
WHERE `group_id` = '.$user_group;
$resultID = mysql_query($getpermissions, $linkID);
if ($msg = mysql_error())
echo __LINE__ . ' of ' . __FILE__ . '<pre>' . $getpermissions . '</pre><br /> (caused: ' . $msg .')';
$permissions = mysql_fetch_array($resultID);
?>
<SCRIPT language="JavaScript">
function OnSubmitForm()
{
if(document.pressed == 'editmode')
{
document.all.task.value ="editmode";
}
else
if(document.pressed == 'editmodelist')
{
document.all.task.value ="editmodelist";
}
return true;
}
</SCRIPT>
<form id="admincontrols" action="index.php" method="post" onSubmit="return OnSubmitForm();">
<input type="hidden" name="page_id" value="<?= $current ?>" />
<?php
if($permissions['pages_edit'])
{
echo "<input type=\"button\" name=\"editmode\" value=\"editmode\" class=\"button\"
onClick=\"document.pressed=this.value\"/>";
}
if($permissions['pages'])
{
echo "<input type=\"submit\" name=\"editmodelist\" value=\"Page Management\" class=\"button\"
onClick=\"document.pressed=this.value\"/>";
} /*
if($permissions['users'])
{
echo "<form id=\"editusersform\" action=\"index.php\" method=\"post\" >
<div><input type=\"hidden\" name=\"task\" value=\"edituser\" />
<input type=\"submit\" name=\"edit\" value=\"Manage Users\" class=\"button\" /></div>
</form>";
}
if($permissions['groups'])
{
echo "<form id=\"editgroupform\" action=\"index.php\" method=\"post\" >
<div><input type=\"hidden\" name=\"task\" value=\"editgroup\" />
<input type=\"submit\" name=\"groupedit\" value=\"Manage Groups\" class=\"button\" /></div>
</form>";
}
echo "<form id=\"userprofileform\" action=\"index.php\" method=\"post\" >
<div><input type=\"hidden\" name=\"task\" value=\"editprofile\" />
<input type=\"hidden\" name=\"user_id\" value=\"$_SESSION[user_id]\" />
<input type=\"submit\" name=\"profileedit\" value=\"Edit My Profile\" class=\"button\" /></div>
</form>";
echo "<form name=\"logoutform\" action=\"index.php\" method=\"post\" >
<div><input type=\"hidden\" name=\"task\" value=\"logout\" />
<input type=\"submit\" name=\"logout\" value=\"Logout\" class=\"button\" /></div>
</form>";
*/
?>
</form>
</div>
<!--<input style="border:0px;background:none;width:1px;height:1px" type="button" id="show" accesskey="o" onclick="MM_showHideLayers('admincontrols','','show')">
<input style="border:0px;background:none;width:1px;height:1px" type="button" id="hide" accesskey="p" onclick="MM_showHideLayers('admincontrols','','hide')">-->