GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: Git mirror of the CMS Made Simple 2.0 rewrite
Homepage: http://cmsmadesimple.org
Clone URL: git://github.com/tedkulp/cmsmadesimple-2-0.git
nuno (author)
Sat Sep 13 09:44:10 -0700 2008
commit  388eda473f76d8cc0020e59a1450c84231097dd8
tree    e85465cd95bfd8ec15ce5896f214b2b7675d5a9b
parent  79e7ea4f6e42030e9504303632229079628463d0
cmsmadesimple-2-0 / admin / menu.php
100644 139 lines (102 sloc) 2.915 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
<div id="navcontainer">
 
<?php
 
$userid = get_userid();
global $gCms;
$db =& $gCms->GetDb();
 
?>
 
<div id="welcome">
<?php if (isset($_SESSION['cms_admin_username'])) echo lang('welcomemsg', array($_SESSION['cms_admin_username']))?>
</div>
 
<div>
 
<a href="listcontent.php"><?php echo lang('contentmanagement')?></a>
 
<?php
 
if (check_permission($userid, 'Add Templates') || check_permission($userid, 'Remove Templates') || check_permission($userid, 'Modify Templates'))
{
 
?>
<a href="listtemplates.php"><?php echo lang('templatemanagement')?></a>
<?php
 
}
 
if (check_permission($userid, 'Add Stylesheets') || check_permission($userid, 'Remove Stylesheets') || check_permission($userid, 'Modify Stylesheets'))
{
 
?>
<a href="listcss.php"><?php echo lang('cssmanagement')?></a>
<?php
 
}
 
?>
<a href="listhtmlblobs.php"><?php echo lang('blobmanagement')?></a>
<a href="listusers.php"><?php echo lang('usermanagement')?></a>
<?php
 
if (check_permission($userid, 'Add Groups') || check_permission($userid, 'Remove Groups') || check_permission($userid, 'Modify Groups') || check_permission($userid, 'Modify Groups Assignments') || check_permission($userid, 'Modify Permissions'))
{
 
?>
<a href="listgroups.php"><?php echo lang('groupmanagement')?></a>
<?php
 
}
 
if (check_permission($userid, 'Modify Files'))
{
 
?>
<a href="files.php"><?php echo lang('filemanagement')?></a>
<?php
 
}
 
?>
<a href="plugins.php"><?php echo lang('pluginmanagement')?></a>
<?php
 
if (check_permission($userid, 'Modify Site Preferences'))
{
 
?>
<a href="siteprefs.php"><?php echo lang('siteprefs')?></a>
<?php
 
}
 
?>
<a href="adminlog.php"><?php echo lang('adminlog')?></a>
<a href="<?php
 
if (isset($config['assume_mod_rewrite']) && $config['assume_mod_rewrite'] == true)
{
  $query = "SELECT content_alias, content_id FROM " . cms_db_prefix() . "content WHERE default_content = '1'";
  $result = $db->query($query);
  if ($result && $result->RecordCount() > 0)
  {
    $row = $result->FetchRow();
    if ($row['content_alias'] != '')
    {
      echo "../" . $row['content_alias'] . $config["page_extension"];
    }
    else
    {
      echo "../" . $row['content_id'] . $config["page_extension"];
    }
  }
  else
  {
    echo "../index.php";
  }
}
else
{
  echo "../index.php";
}
 
?>" rel="external"><?php echo lang('showsite')?></a>
<a href="editprefs.php"><?php echo lang('userprefs')?></a>
<a href="logout.php"><?php echo lang('logout')?></a>
 
<?php
 
  $cmsmodules = $gCms->modules;
 
  $displaymodules = "";
 
  foreach ($cmsmodules as $key=>$value)
  {
    if (isset($cmsmodules[$key]['object'])
      && $cmsmodules[$key]['installed'] == true
      && $cmsmodules[$key]['active'] == true
      && $cmsmodules[$key]['object']->HasAdmin()
    )
    {
      $displaymodules .= "<a href=\"moduleinterface.php?module=$key\">$key</a>";
    }
  }
 
  if ($displaymodules != "") {
    echo "<div class=\"menutitle\">".lang('modules')."</div>";
    echo $displaymodules;
  }
 
?>
 
</div>
 
<br />
 
</div>