initial commit of file from CVS for e-smith-manager on Mon 7 Aug 11:32:16 BST 2023
This commit is contained in:
@@ -0,0 +1 @@
|
||||
no
|
@@ -0,0 +1 @@
|
||||
980
|
@@ -0,0 +1 @@
|
||||
localhost
|
@@ -0,0 +1 @@
|
||||
enabled
|
@@ -0,0 +1 @@
|
||||
service
|
@@ -0,0 +1,7 @@
|
||||
{
|
||||
my $admin = $DB->get('httpd-admin');
|
||||
return unless $admin;
|
||||
return if $admin->prop('TKTAuthSecret');
|
||||
use Data::UUID;
|
||||
$admin->set_prop('TKTAuthSecret', Data::UUID->new->create_str());
|
||||
}
|
153
root/etc/e-smith/events/actions/navigation-conf
Executable file
153
root/etc/e-smith/events/actions/navigation-conf
Executable file
@@ -0,0 +1,153 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# copyright (C) 1999-2006 Mitel Networks Corporation
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
#----------------------------------------------------------------------
|
||||
package esmith;
|
||||
|
||||
use strict;
|
||||
|
||||
use esmith::NavigationDB;
|
||||
use esmith::I18N;
|
||||
|
||||
use constant WEBFUNCTIONS => '/etc/e-smith/web/functions';
|
||||
use constant NAVIGATIONDIR => '/home/e-smith/db/navigation';
|
||||
use constant NEW_NAVDIR => '/home/e-smith/db';
|
||||
|
||||
my $navigation_ignore =
|
||||
"(\.\.?|navigation|noframes|online-manual|(internal|pleasewait)(-.*)?)";
|
||||
|
||||
my $i18n = new esmith::I18N;
|
||||
|
||||
my %navdbs;
|
||||
|
||||
opendir FUNCTIONS, WEBFUNCTIONS or
|
||||
die "Couldn't open ", WEBFUNCTIONS, "\n";
|
||||
|
||||
my @files = grep (!/^${navigation_ignore}$/, readdir (FUNCTIONS));
|
||||
my @langs = $i18n->availableLanguages();
|
||||
|
||||
use XML::Parser;
|
||||
my $parser = new XML::Parser (Style => 'Tree',
|
||||
ProtocolEncoding => 'UTF-8');
|
||||
|
||||
foreach my $file (@files)
|
||||
{
|
||||
next if (-d WEBFUNCTIONS . "/$file");
|
||||
next unless (-x WEBFUNCTIONS . "/$file");
|
||||
|
||||
#--------------------------------------------------
|
||||
# extract heading, description and weight information
|
||||
# from CGI script
|
||||
#--------------------------------------------------
|
||||
open(SCRIPT, WEBFUNCTIONS . "/$file");
|
||||
my $heading = undef;
|
||||
my $description = undef;
|
||||
my $heading_weight = undef;
|
||||
my $description_weight = undef;
|
||||
while ( <SCRIPT> )
|
||||
{
|
||||
$heading = $1 if (/^\s*#\s*heading\s*:\s*(.+?)\s*$/);
|
||||
|
||||
$description = $1
|
||||
if (/^\s*#\s*description\s*:\s*(.+?)\s*$/);
|
||||
|
||||
($heading_weight, $description_weight) = ($1, $2)
|
||||
if (/^\s*#\s*navigation\s*:\s*(\d+?)\s+(\d+?)\s*$/);
|
||||
|
||||
last if (defined $heading and
|
||||
defined $description and
|
||||
defined $heading_weight and
|
||||
defined $description_weight);
|
||||
}
|
||||
close SCRIPT;
|
||||
foreach my $lang (@langs)
|
||||
{
|
||||
#warn "updating script $file for lang $lang\n";
|
||||
my $navdb = $navdbs{$lang};
|
||||
my $navinfo = NAVIGATIONDIR . "/navigation.$lang";
|
||||
$navdb ||= esmith::NavigationDB->open($navinfo);
|
||||
$navdb ||= esmith::NavigationDB->create($navinfo) or
|
||||
die "Couldn't create $navinfo\n";
|
||||
$navdbs{$lang} ||= $navdb;
|
||||
my $rec = $navdb->get($file) ||
|
||||
$navdb->new_record($file, { type => 'panel' } );
|
||||
|
||||
my $lexicon = {};
|
||||
|
||||
foreach my $lfile ( "/etc/e-smith/locale/$lang/FormMagick/general",
|
||||
"/etc/e-smith/locale/$lang/etc/e-smith/web/functions/$file" )
|
||||
{
|
||||
if (-f $lfile)
|
||||
{
|
||||
# Do a quick and dirty parse of the lexicon file
|
||||
my $xmlstr = "";
|
||||
open(FILE, $lfile) or die "Couldn't open $lfile:\n$!";
|
||||
binmode(FILE, ":utf8");
|
||||
{
|
||||
local $^W = 0;
|
||||
while ( my $line = <FILE> ) {
|
||||
unless ( utf8::valid($line) ) {
|
||||
warn "$lfile not in UTF-8 format\n";
|
||||
utf8::encode($line);
|
||||
}
|
||||
$xmlstr .= $line;
|
||||
}
|
||||
}
|
||||
my $xml = $parser->parsestring($xmlstr);
|
||||
my @lexicon = @{$xml->[1]};
|
||||
shift @lexicon; # Remove lexicon attributes
|
||||
while (@lexicon)
|
||||
{
|
||||
my ($tag, $data) = splice(@lexicon, 0, 2);
|
||||
next unless $tag eq 'entry';
|
||||
my %entry_hash = ('attributes', @$data);
|
||||
my $base = $entry_hash{base};
|
||||
$base = @{$base}[2];
|
||||
my $trans = $entry_hash{trans};
|
||||
$trans = @{$trans}[2];
|
||||
next unless defined $base && defined $trans;
|
||||
$lexicon->{$base} = $trans;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
my $loc_heading = localise($lexicon, $heading);
|
||||
$loc_heading =~ s/^\s*(\w.*?)\s*$/$1/;
|
||||
my $loc_description = localise($lexicon, $description);
|
||||
$loc_description =~ s/^\s*(\w.*?)\s*$/$1/;
|
||||
$rec->merge_props(
|
||||
Heading => $loc_heading,
|
||||
Description => $loc_description,
|
||||
HeadingWeight => localise($lexicon, $heading_weight),
|
||||
DescriptionWeight => localise($lexicon, $description_weight));
|
||||
}
|
||||
}
|
||||
foreach my $lang (@langs)
|
||||
{
|
||||
#warn "trying to close for lang $lang\n";
|
||||
my $navdb = $navdbs{$lang};
|
||||
$navdb->close();
|
||||
}
|
||||
|
||||
sub localise {
|
||||
my ($lexicon, $string) = @_;
|
||||
$string = "" unless defined $string;
|
||||
return $lexicon->{$string} || $string;
|
||||
}
|
||||
|
@@ -0,0 +1,101 @@
|
||||
<lexicon lang="en-us">
|
||||
|
||||
<entry>
|
||||
<base>FORM_TITLE</base>
|
||||
<trans>Report a Bug</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>DO_NOT_PANIC</base>
|
||||
<trans>Don't Panic!</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>SME_EXPERIENCE</base>
|
||||
<trans>Unfortunately there is no software without bugs, and you probably came to this page because of an issue you are experiencing with your SME-server installation.</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>PLEASE_REPORT_HERE</base>
|
||||
<trans>In order to help developers to diagnose and fix your issue, please download one of the following text templates, fill it out and paste it into your bug report at</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>USE_TEMPLATE</base>
|
||||
<trans>Please refer to the following link on how to report efficiency a bug and use its template</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>FOLLOWING_REPORT_MIGHT_HELP</base>
|
||||
<trans>It will also help if you provide some vital information on the configuration of your SME-server in your bug report. By clicking on the "Create configuration report" button below, you can create and download a text file containing this information. Please attach this file to your bug report as well.</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>REPORT_CONTENT</base>
|
||||
<trans>The report will contain the following information</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>SME_VERSION</base>
|
||||
<trans>Koozali SME Server version</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>SERVER_MODE</base>
|
||||
<trans>Server mode</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>PREVIOUS_SERVER_MODE</base>
|
||||
<trans>Previous Server mode</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>KERNEL_AND_ARCH</base>
|
||||
<trans>Current running kernel version and architecture</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>INSTALLED_RPMS</base>
|
||||
<trans>A list of additional RPMs installed on your server</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>ALTERED_TEMPLATES</base>
|
||||
<trans>A list of SME templates that have been altered on your server from a base install</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>ALTERED_EVENTS</base>
|
||||
<trans>A list of SME events that have been altered on your server from a base install</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>YUM_REPOS</base>
|
||||
<trans>A list of additional software repositories configured on your server</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>PRIVACY</base>
|
||||
<trans>No privacy related data (ie. users, passwords, IP addresses) will be included in the report.</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>CREATE_REPORT</base>
|
||||
<trans>Create configuration report</trans>
|
||||
</entry>
|
||||
|
||||
<entry>
|
||||
<base>DONATING</base>
|
||||
<trans>Have you considered donating?</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>AWARE_SME</base>
|
||||
<trans>You are probaly aware that SME server is developed and supported by a collaborative community of volunteers from all over the world. While SME server is free to download and use, maintaining the infrastructure behind the project (eg. hosting the forums and wiki, providing repositories and build servers etc.) costs real money in the real world.</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>YOUR_HELP</base>
|
||||
<trans>In very much the same way you need us to address your current issue, we need YOUR help to keep this project alive!</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>CONSIDER_DONATING</base>
|
||||
<trans>Please consider donating to the project by clicking on the image link below:</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>THANK_YOU</base>
|
||||
<trans>Thank you for your support!</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>Download this report</base>
|
||||
<trans>Download this report !</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>Report a bug</base>
|
||||
<trans>Report a bug</trans>
|
||||
</entry>
|
||||
|
||||
</lexicon>
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
my $secret = ${'httpd-admin'}{TKTAuthSecret} || "34322500-7330-4400-423A-3A00434F5245";
|
||||
my $ManagerTimeout = ${'httpd-admin'}{ManagerTimeout} || "30m";
|
||||
$OUT .= "TKTAuthSecret $secret\n";
|
||||
$OUT .= "TKTAuthTimeout $ManagerTimeout\n";
|
||||
my $Cookie = ${'httpd-admin'}{Cookie} || "disabled";
|
||||
$OUT .= "TKTAuthCookieExpires $ManagerTimeout\n" if "$Cookie" eq "enabled";
|
||||
$OUT .= "TKTAuthDigestType SHA256";
|
||||
}
|
@@ -0,0 +1,229 @@
|
||||
{
|
||||
$OUT = <<'EOF';
|
||||
|
||||
|
||||
/* INSERT COPYRIGHT HERE */
|
||||
|
||||
/* This is the stylesheet used as the basis for older broswers.
|
||||
|
||||
Note that you CANNOT simly add styles here and hope they work. ONLY CSS
|
||||
level 1 styles should be in this file. Everyting else goes into the other 3
|
||||
files.
|
||||
|
||||
These basic styles ensire that browsers that don't understand the @import
|
||||
method will still be usable. All modern browsers will use the styles in
|
||||
sme_main.css, sme_menu.css or sme_header.css depending on the frame in which
|
||||
the page is found.
|
||||
*/
|
||||
|
||||
/* Default HTML styles */
|
||||
body {
|
||||
background: #ffffff;
|
||||
color: #000000;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
table, tr, td, div, p, form {
|
||||
color: #000000;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 8px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
form {
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
span {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.notsmall {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
h1, .h1 {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
color: #333333;
|
||||
font-size: 18px;
|
||||
margin-bottom: 4px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
h2, .h2 {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
color: #333333;
|
||||
font-size: 14px;
|
||||
margin-bottom: 3px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
h3, .h3 {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
color: #333333;
|
||||
font-size: 12px;
|
||||
margin-bottom: 2px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
h4, .h4 {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-style: italic;
|
||||
color: #333333;
|
||||
font-size: 12px;
|
||||
margin-bottom: 2px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
ol, ul, li {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
font-weight: normal;
|
||||
color: black;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style-type: circle;
|
||||
}
|
||||
|
||||
/* Core styles for use with sme_header.css*/
|
||||
body.header {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
background: #cccccc;
|
||||
margin-top: 0px;
|
||||
margin-right: 0px;
|
||||
margin-bottom: 0px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.hilightbar {
|
||||
background-color: #ffc50a;
|
||||
font-size: 4px;
|
||||
}
|
||||
|
||||
.infobar {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
background-color: #cccccc;
|
||||
}
|
||||
|
||||
.darkergrey {
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
td.darkgrey {
|
||||
background-color: #888888;
|
||||
}
|
||||
|
||||
a.update {
|
||||
color: red;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
background: #cccccc;
|
||||
}
|
||||
|
||||
/* Core styles for use with sme_menu.css */
|
||||
|
||||
body.menu {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
background-color: #e8f3e1;
|
||||
}
|
||||
|
||||
td.section {
|
||||
padding-bottom: 2px;
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
.section {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
background-color: #e8f3e1;
|
||||
}
|
||||
|
||||
a.item {
|
||||
color: #00008b;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
background: #e8f3e1;
|
||||
}
|
||||
|
||||
a.sl {
|
||||
color: green;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
background: #e8f3e1;
|
||||
}
|
||||
|
||||
a.alert {
|
||||
color: red;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
background: #e8f3e1;
|
||||
}
|
||||
|
||||
/* Core styles for use with sme_main.css */
|
||||
body.main {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
td.sme-noborders-label {
|
||||
font-weight: bold;
|
||||
width: 33%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
hr.sectionbar {
|
||||
color: #666666;
|
||||
background-color: #666666;
|
||||
height: 1px;
|
||||
width: 80%;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
hr.sme-copyrightbar {
|
||||
color: #dddddd;
|
||||
background-color: #dddddd;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.sme-copyright {
|
||||
color: #777777;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
/*These style definitions were found int he old css file (manager.css)
|
||||
but don't seem to ever be referenced in the code. They're here
|
||||
for reference.
|
||||
|
||||
.centerit {
|
||||
text-align: center;
|
||||
}
|
||||
.highlight {
|
||||
background: #ffc61e;
|
||||
}
|
||||
.subheading {
|
||||
background: #ffffff;
|
||||
color: #1e385b;
|
||||
}
|
||||
*/
|
||||
|
||||
EOF
|
||||
}
|
@@ -0,0 +1 @@
|
||||
/* DO NOT MODIFY THIS FILE! It is updated automatically */
|
@@ -0,0 +1,128 @@
|
||||
{
|
||||
$OUT = <<'EOF';
|
||||
|
||||
/* INSERT COPYRIGHT HERE */
|
||||
|
||||
/* This is the stylesheet used in the header panel only
|
||||
|
||||
This file inherits the styles use in sme_core in the "header" section, and
|
||||
as noted in the code below. Note that some of the styles here are empty.
|
||||
This is because the style definition has moved safely to sme_core.css
|
||||
and the placeholder is left here for reference or future use.
|
||||
|
||||
There are a lot of styles in here, so read carefully. Each one is documented.
|
||||
|
||||
Styles that were in the old stylesheets, but are not used in the UI are at the
|
||||
bottom, commented out. These can be removed at the end of the 6.0 cycle */
|
||||
|
||||
/* general table cell properties */
|
||||
td {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
table {
|
||||
width=100%;
|
||||
margin-top: 0px;
|
||||
margin-right: 0px;
|
||||
margin-bottom: 1px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
/* This is the class of the product bar, orange in the case of the 6000 MAS */
|
||||
.hilightbar {
|
||||
border-color: #888888 ;
|
||||
border-style: solid;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 0px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 0px;
|
||||
}
|
||||
|
||||
/* this is the class of the grey bar under the hilight bar, where text and
|
||||
buttons live.
|
||||
*/
|
||||
.infobar {
|
||||
border-color: #888888 ;
|
||||
border-style: solid;
|
||||
border-top-width: 0px;
|
||||
border-right-width: 0px;
|
||||
border-bottom-width: 10px;
|
||||
border-left-width: 0px;
|
||||
}
|
||||
|
||||
.darkergrey {
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
/* default class for links*/
|
||||
a:link, a:visited, a:hover, a:active {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
color: black;
|
||||
background: #cccccc;
|
||||
text-decoration: none;
|
||||
text-align: left;
|
||||
border-color: #cccccc #cccccc #cccccc #cccccc ;
|
||||
margin-top: 0px;
|
||||
margin-right: 0px;
|
||||
margin-bottom: 0px;
|
||||
margin-left: 0px;
|
||||
border-style: solid;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
background: #e8f3e1;
|
||||
border-color: #000000 #000000 #000000 #000000;
|
||||
}
|
||||
|
||||
a:active {
|
||||
color: white;
|
||||
background: black;
|
||||
border-color: #000000 #000000 #000000 #000000;
|
||||
}
|
||||
|
||||
|
||||
/* These a classes define the update link appearance, using a pseudoclass
|
||||
called "update" */
|
||||
a.update:link, a.update:visited, a.update:hover, a.update:active {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
color: #ffffff;
|
||||
background-color: #ee0000;
|
||||
text-decoration: none;
|
||||
text-align: left;
|
||||
border-color: #cccccc ;
|
||||
margin-top: 0px;
|
||||
margin-right: 0px;
|
||||
margin-bottom: 0px;
|
||||
margin-left: 0px;
|
||||
border-style: solid;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
a.update:hover {
|
||||
background: #FF8080;
|
||||
border-color: #ff0000;
|
||||
}
|
||||
|
||||
a.update:active {
|
||||
color: #ff0000;
|
||||
background: #ffffff;
|
||||
border-color: #ff0000;
|
||||
}
|
||||
|
||||
EOF
|
||||
}
|
@@ -0,0 +1 @@
|
||||
/* DO NOT MODIFY THIS FILE! It is updated automatically */
|
@@ -0,0 +1,418 @@
|
||||
{
|
||||
$OUT = <<'EOF';
|
||||
|
||||
/* INSERT COPYRIGHT HERE */
|
||||
|
||||
/* This is the stylesheet used in the main panels only.
|
||||
|
||||
This file inherits the styles use in sme_core in the "header" section, and
|
||||
as noted in the code below. Note that some of the styles here are empty.
|
||||
This is because the style definition has moved safely to sme_core.css
|
||||
and the placeholder is left here for reference or future use.
|
||||
|
||||
There are a lot of styles in here, so read carefully. Each one is documented.
|
||||
|
||||
Styles that were in the old stylesheets, but are not used in the UI are at the
|
||||
bottom, commented out. These can be removed at the end of the 6.0 cycle */
|
||||
|
||||
/* general page properties */
|
||||
body, body.main {
|
||||
margin-top: 5px;
|
||||
margin-right: 20px;
|
||||
margin-bottom: 5px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
|
||||
/* Table properties ****************************************/
|
||||
/* There are THREE types of tables
|
||||
1. *.sme-layout* is used for layout purposes. It is the "master
|
||||
container" on a page. It controls the top-level table
|
||||
inside of which everything else is put.
|
||||
2. *.sme-noborders* is used for layout, and defines a borderless table and
|
||||
cells used within it.
|
||||
2. *.sme-border* is used for tabular data, and defines a header row and borders
|
||||
for tables that need borders
|
||||
|
||||
*/
|
||||
|
||||
/*First, some defaults */
|
||||
td {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
sme-layout* : Used for top-level layout
|
||||
*/
|
||||
|
||||
table.sme-layout {
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 2px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
tr.sme-layout {
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
td.sme-layout {
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
/*This special style is actually used only for the button row along the bottom of each page*/
|
||||
th.sme-layout {
|
||||
border: 1px solid #dddddd;
|
||||
background-color: #e8f3e1;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 9pt;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
text-align: right;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
/*
|
||||
sme-noborders* : Used for mid-level layout
|
||||
*/
|
||||
table.sme-noborders {
|
||||
padding: 0px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 20px;
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
td.sme-noborders-label {
|
||||
font-weight: bold;
|
||||
/*width: 250px;*/
|
||||
text-align: right;
|
||||
/*vertical-align: top;*/
|
||||
background-color: #e8f3e1;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
td.sme-noborders-content {
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
td.sme-noborders-info, div.sme-noborders-info {
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
/* Used for a left-most column of radio buttons (see date/time panel) */
|
||||
td.sme-radiobutton {
|
||||
width: 30px;
|
||||
}
|
||||
/*
|
||||
sme-border* : Used for tabular data
|
||||
*/
|
||||
table.sme-border {
|
||||
border-collapse: collapse;
|
||||
border: 2px solid #cccccc;
|
||||
empty-cells: show;
|
||||
margin: 5px 5px 5px 2px;
|
||||
}
|
||||
td.sme-border,
|
||||
td.sme-border-warning,
|
||||
td.sme-border-right,
|
||||
td.sme-border-center {
|
||||
border: 1px solid #cccccc;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
font-weight: normal;
|
||||
color: #000000;
|
||||
text-align: left;
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
td.sme-border-warning {
|
||||
color: red;
|
||||
}
|
||||
td.sme-border-right {text-align: right;}
|
||||
td.sme-border-center {text-align: center;}
|
||||
th.sme-border {
|
||||
border: 1px solid #cccccc;
|
||||
background-color: #bee6a2;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
text-align: center;
|
||||
vertical-align: bottom;
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px;
|
||||
/*border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #F2F0EE #75736E #75736E #F2F0EE ;*/
|
||||
}
|
||||
td.sme-border a, td.sme-border-right a, td.sme-border-center a {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
/* misc layout stuff*/
|
||||
/* these two are for any error messages that pop up*/
|
||||
div.error, div.sme-error, span.error, span.sme-error {
|
||||
color: red;
|
||||
background-color: #ffffff;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: red ;
|
||||
padding: 2px;
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
margin-top:0px;
|
||||
margin-bottom:0px;
|
||||
|
||||
}
|
||||
|
||||
div.error-noborders, div.sme-error-noborders,
|
||||
span.error-noborders, span.sme-error-noborders
|
||||
{
|
||||
color: red;
|
||||
background-color: #ffffff;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
div.error h2, span.error h2,
|
||||
div.error p, span.error p
|
||||
{
|
||||
color: red;
|
||||
}
|
||||
/* These are for the special case of a link being inside an error message */
|
||||
div.sme-error a, div.error a, span.error a, span.sme-error a,
|
||||
div.error-noborders a, div.sme-error-noborders a,
|
||||
span.error-noborders a, span.sme-error-noborders a
|
||||
{
|
||||
color: #ff0000;
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* For when a link is the error message */
|
||||
a.error:link, a.error:visited, a.error:hover, a.error:active {
|
||||
color: #ff0000;
|
||||
font-weight: normal;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* these two are for any success messages that pop up*/
|
||||
div.success, span.success {
|
||||
color: #006400;
|
||||
background-color: #ffffff;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #006400 ;
|
||||
padding: 2px;
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
margin-top:0px;
|
||||
margin-bottom:0px;
|
||||
|
||||
}
|
||||
|
||||
/* These two are for the special case of a link being inside a success message */
|
||||
div.success a, span.success a
|
||||
{
|
||||
color: #006400;
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
div.success h2, span.success h2,
|
||||
div.success p, span.success p
|
||||
{
|
||||
color: green;
|
||||
}
|
||||
|
||||
/*These two define the copyright footer styles, one for the line and one for the text*/
|
||||
hr.sme-copyrightbar {
|
||||
}
|
||||
.sme-copyright {
|
||||
}
|
||||
|
||||
/* These ones define styles for the links that are made to look like
|
||||
standard form submit buttons */
|
||||
a.button-like:link,
|
||||
a.button-like:visited,
|
||||
a.button-like:hover,
|
||||
a.button-like:active,
|
||||
a.button-like-small:link,
|
||||
a.button-like-small:visited,
|
||||
a.button-like-small:hover,
|
||||
a.button-like-small:active {
|
||||
font-family: sans-serif;
|
||||
font-size: 13px;
|
||||
color: black;
|
||||
background: #D4D0C8;
|
||||
text-decoration: none;
|
||||
text-align: left;
|
||||
border-color: #F2F0EE #75736E #75736E #F2F0EE ;
|
||||
margin-top: 10px;
|
||||
margin-right: 2px;
|
||||
margin-bottom: 10px;
|
||||
margin-left: 2px;
|
||||
border-style: solid;
|
||||
border-top-width: 2px;
|
||||
border-right-width: 2px;
|
||||
border-bottom-width: 2px;
|
||||
border-left-width: 2px;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
}
|
||||
a.button-like-small:link,
|
||||
a.button-like-small:visited,
|
||||
a.button-like-small:hover,
|
||||
a.button-like-small:active {
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
font-size: 10px;
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
padding-left: 1px;
|
||||
padding-right: 1px;
|
||||
}
|
||||
a.button-like:active,
|
||||
a.button-like-small:active {
|
||||
border-color: #75736E #F2F0EE #F2F0EE #75736E ;
|
||||
}
|
||||
|
||||
/* EXPERIMENTAL SECTION */
|
||||
/* These are styles used to experiment with. */
|
||||
|
||||
/* class for links, similar to the class in sme_menu.css, but for a red button */
|
||||
a.button-like-red:link,
|
||||
a.button-like-red:visited,
|
||||
a.button-like-red:hover,
|
||||
a.button-like-red:active {
|
||||
border-left: #F1726C 2px solid;
|
||||
border-right: #B42025 2px solid;
|
||||
border-top: #F1726C 2px solid;
|
||||
border-bottom: #B42025 2px solid;
|
||||
}
|
||||
a.button-like-red:active {
|
||||
border-color: #75736E #F2F0EE #F2F0EE #75736E ;
|
||||
}
|
||||
|
||||
/*These are style definitions found in the UI but not defined in any file I
|
||||
could locate. They're listed here for historical purposes, but have been
|
||||
removed from the UI
|
||||
|
||||
pagedescription (used in the first paragraph of text on a page) [HTML.pm]
|
||||
label (used in forms) [HTML.pm]
|
||||
field (used in forms) [HTML.pm]
|
||||
fielddescription (used ???)[HTML.pm]
|
||||
buttons (used in forms) [HTML.pm]
|
||||
*/
|
||||
/*td.sme-submitbutton {
|
||||
text-align: right;
|
||||
}
|
||||
*/
|
||||
|
||||
/*These style definitions were found int he old css file (manager.css)
|
||||
but don't seem to ever be referenced in the code. They're here
|
||||
for reference.
|
||||
|
||||
.banner {
|
||||
background: #000000;
|
||||
color: #ffffff;
|
||||
}
|
||||
.banner-right {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
background: #e17200;
|
||||
color: #ffffff;
|
||||
}
|
||||
.border {
|
||||
background: #000000;
|
||||
color: #000000;
|
||||
border-color: #000000;
|
||||
}
|
||||
.sidebar {
|
||||
width: 200px;
|
||||
background: #ffffff;
|
||||
font-size: smaller;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-weight: normal;
|
||||
}
|
||||
.sidebar-title {
|
||||
background: #1e385b;
|
||||
color: #ffffff;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-weight: bold;
|
||||
}
|
||||
.newsitem {
|
||||
background: #ffffff;
|
||||
color: #000000;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.newsitem-title {
|
||||
background: #cccccc;
|
||||
color: #ffffff;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-weight: bold;
|
||||
}
|
||||
.newsitem-footer {
|
||||
background: #cccccc;
|
||||
color: #000000;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: smaller;
|
||||
text-align: right;
|
||||
}
|
||||
.newsitem-detail {
|
||||
font-size: smaller;
|
||||
font-weight: normal;
|
||||
}
|
||||
.formlabel {
|
||||
background: #c0c0c0;
|
||||
color: #000000;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: small;
|
||||
font-weight: bold;
|
||||
text-align: right;
|
||||
}
|
||||
.welcome-link {
|
||||
background: #ffffff;
|
||||
color: #1e385b;
|
||||
}
|
||||
.littlelink {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
}
|
||||
#textlayer {
|
||||
position: absolute;
|
||||
visibility: inherit;
|
||||
top: 160px;
|
||||
left: 50px;
|
||||
z-index: 2;
|
||||
}
|
||||
#para {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
}
|
||||
#title {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-weight: bold;
|
||||
padding: 7px 7px 7px 7px;
|
||||
color: #ffffff;
|
||||
}
|
||||
*/
|
||||
|
||||
EOF
|
||||
}
|
@@ -0,0 +1 @@
|
||||
/* DO NOT MODIFY THIS FILE! It is updated automatically */
|
@@ -0,0 +1,227 @@
|
||||
{
|
||||
$OUT = <<'EOF';
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
* copyright (C) 1999-2003 Mitel Networks Corporation
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Technical support for this program is available from Mitel Networks
|
||||
* Please visit our web site www.mitel.com for details.
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* This is the stylesheet used in the navigation panel only
|
||||
|
||||
This file inherits the styles use in sme_core in the "navigation" section,
|
||||
and as noted in the code below. Note that some of the styles here are empty.
|
||||
This is because the style definition has moved safely to sme_core.css and
|
||||
the placeholder is left here for reference or future use.
|
||||
|
||||
There are a lot of styles in here, so read carefully. Each one is
|
||||
documented.
|
||||
|
||||
Styles that were in the old stylesheets, but are not used in the UI are at
|
||||
the bottom, commented out. These can be removed at the end of the 6.0
|
||||
cycle */
|
||||
|
||||
/* Sets the general page properties */
|
||||
body, body.menu {
|
||||
margin-top: 0px;
|
||||
margin-right: 0px;
|
||||
margin-bottom: 0px;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
/* This is the section heading style */
|
||||
.section {
|
||||
}
|
||||
|
||||
td.menu-cell {
|
||||
margin-top: 0px;
|
||||
margin-right: 0px;
|
||||
margin-bottom: 0px;
|
||||
margin-left: 0px;
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
All the a links use pseudoclasses to control the two visual link styles.
|
||||
For example:
|
||||
a.item:link the general link item
|
||||
a.item-current:link: the active link item
|
||||
|
||||
The switch from item to item-current is done with a javascript script in the head of the
|
||||
navigation page, using the onClick event.
|
||||
|
||||
We are making heavy use of the cascade with these.
|
||||
*/
|
||||
|
||||
/* a:link controls the look of a link when the mouse is nowhere near it */
|
||||
a.item:link, a.item-current:link,
|
||||
a.warn:link, a.warn-current:link {
|
||||
display: block;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
color: black;
|
||||
background: #e8f3e1;
|
||||
text-decoration: none;
|
||||
text-align: left;
|
||||
border-color: #e8f3e1;
|
||||
margin-top: 0px;
|
||||
margin-right: 0px;
|
||||
margin-bottom: 0px;
|
||||
margin-left: 0px;
|
||||
border-style: solid;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
padding-top: 0px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
/* a:visited controls the look of a visited link (one that has been clicked) */
|
||||
a.item:visited, a.item-current:visited,
|
||||
a.warn:visited, a.warn-current:visited {
|
||||
display: block;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
color: black;
|
||||
background: #e8f3e1;
|
||||
text-decoration: none;
|
||||
border-color: #e8f3e1;
|
||||
margin-top: 0px;
|
||||
margin-right: 0px;
|
||||
margin-bottom: 0px;
|
||||
margin-left: 0px;
|
||||
border-style: solid;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
padding-bottom: 2px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* a:hover controls the look of a link under the curser*/
|
||||
a.item:hover, a.item-current:hover,
|
||||
a.warn:hover, a.warn-current:hover {
|
||||
display: block;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
background: #cccccc;
|
||||
border-color: #888888;
|
||||
margin-top: 0px;
|
||||
margin-right: 0px;
|
||||
margin-bottom: 0px;
|
||||
margin-left: 0px;
|
||||
border-style: solid;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
padding-bottom: 2px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* a:active controls the look of a link as it is selected*/
|
||||
a.item:active, a.item-current:active,
|
||||
a.warn:active, a.warn-current:active {
|
||||
display: block;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
color: white;
|
||||
background: black;
|
||||
text-decoration: none ;
|
||||
border-color: #000000;
|
||||
margin-top: 0px;
|
||||
margin-right: 0px;
|
||||
margin-bottom: 0px;
|
||||
margin-left: 0px;
|
||||
border-style: solid;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
padding-bottom: 2px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/*
|
||||
These styles are to ensure that a selected link appears selected, even if the link
|
||||
opens in another frame. This uses a javascript chunk in the head of the navigation
|
||||
frame to change the style using the onClick event.
|
||||
*/
|
||||
a.item-current:link, a.warn-current:link,
|
||||
a.item-current:visited, a.warn-current:visited,
|
||||
a.item-current:active, a.warn-current:active,
|
||||
a.item-current:hover, a.warn-current:hover {
|
||||
display: block;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
background: #ffffff;
|
||||
border-color: #888888;
|
||||
margin-top: 0px;
|
||||
margin-right: 0px;
|
||||
margin-bottom: 0px;
|
||||
margin-left: 0px;
|
||||
border-style: solid;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
padding-bottom: 2px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* these two add a border on the styles defined directly above when
|
||||
the mouse is hovering over them */
|
||||
a.item-current:hover, a.warn-current:hover {
|
||||
border-color: #888888;
|
||||
}
|
||||
|
||||
/* These redefine a few elements to make room for the icon to the left of the warn class*/
|
||||
a.warn:link, a.warn-current:link,
|
||||
a.warn:visited, a.warn-current:visited,
|
||||
a.warn:active, a.warn-current:active,
|
||||
a.warn:hover, a.warn-current:hover {
|
||||
background-image: url(/server-common/warn.gif);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 10px;
|
||||
padding-left: 25px;
|
||||
}
|
||||
/*end*/
|
||||
|
||||
EOF
|
||||
}
|
@@ -0,0 +1 @@
|
||||
/* DO NOT MODIFY THIS FILE! It is updated automatically */
|
@@ -0,0 +1,89 @@
|
||||
{
|
||||
$OUT = <<'EOF';
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
* copyright (C) 1999-2003 Mitel Networks Corporation
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Technical support for this program is available from Mitel Networks
|
||||
* Please visit our web site www.mitel.com for details.
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* This set of classes is intended for use as a tabbed menu in a panel. The
|
||||
* menu itself is built out of an itemized list, with the navmenu style applied
|
||||
* to it. In this way, if the browser does not support CSS 2.0, a standard
|
||||
* itemized list will be seen instead. This also makes the menu perfectly
|
||||
* workable in Lynx.
|
||||
*
|
||||
* To make use of this menu, see the new menu attribute of the page tab in
|
||||
* FormMagick, perl-CGI-FormMagick-0.91-09. Use that callback to output your
|
||||
* itemized list with this style, and set the 'here' class to indicate the
|
||||
* current position in the menu.
|
||||
*
|
||||
* This code is currently being tested using inline styles in the Teleworker
|
||||
* product, version 3.1 or higher, and the mps_2004_05_21-16_16_27 branch of
|
||||
* e-smith-backup. Look to those initially for examples of use.
|
||||
*
|
||||
* While this does not yet support nested tabs, it would not be difficult to
|
||||
* add.
|
||||
*/
|
||||
|
||||
#navmenu {
|
||||
border-bottom : 1px solid #ccc;
|
||||
margin : 0;
|
||||
padding-bottom : 19px;
|
||||
padding-left : 10px;
|
||||
}
|
||||
|
||||
#navmenu ul, #navmenu li {
|
||||
display : inline;
|
||||
list-style-type : none;
|
||||
margin : 0;
|
||||
padding : 0;
|
||||
}
|
||||
|
||||
#navmenu a {
|
||||
background : #e8f0e8;
|
||||
border : 1px solid #ccc;
|
||||
color : #666;
|
||||
float : left;
|
||||
font-size : small;
|
||||
font-weight : normal;
|
||||
line-height : 14px;
|
||||
margin-right : 8px;
|
||||
padding : 2px 10px 2px 10px;
|
||||
text-decoration : none;
|
||||
}
|
||||
|
||||
#navmenu a:link.active, #navmenu a:visited.active, #navmenu a.here {
|
||||
background : #fff;
|
||||
border-bottom : 1px solid #fff;
|
||||
color : #000;
|
||||
}
|
||||
|
||||
#navmenu a:hover {
|
||||
color : #f00;
|
||||
}
|
||||
|
||||
#navmenu ul a:hover {
|
||||
color : #f00 !important;
|
||||
}
|
||||
|
||||
/* End sme panel menu. */
|
||||
|
||||
EOF
|
||||
}
|
@@ -0,0 +1 @@
|
||||
/* DO NOT MODIFY THIS FILE! It is updated automatically */
|
@@ -0,0 +1,36 @@
|
||||
{
|
||||
$OUT =<<'HERE';
|
||||
/* mod_auth_tkt example css */
|
||||
|
||||
BODY {background-image: url(../smeserver_login.jpg);
|
||||
background-repeat: no-repeat;
|
||||
/*background-size: 600px 40px; */
|
||||
background-position: center top;
|
||||
font-family: arial, helvetica, sans-serif;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
P, TH, TD {
|
||||
font-family: arial, helvetica, sans-serif;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
H1, H2, H3, H4, H5, H6 { color: #006600; }
|
||||
H1 { font-size: x-large; }
|
||||
H2 { font-size: large; }
|
||||
H3 { font-size: medium; }
|
||||
|
||||
.warning { color: #c00; font-size: medium; font-weight: bold; }
|
||||
|
||||
TABLE {
|
||||
background-color: #eee;
|
||||
color: #666;
|
||||
border: 1px solid #ccc;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
|
||||
/* arch-tag: ac35e093-c2c0-4994-bc18-2d25715b1192 */
|
||||
|
||||
HERE
|
||||
}
|
@@ -0,0 +1 @@
|
||||
/* DO NOT MODIFY THIS FILE! It is updated automatically */
|
@@ -0,0 +1,20 @@
|
||||
\{
|
||||
# we can snag lexical $fi_filename from Text::Template to find out how
|
||||
# we were called
|
||||
$NO_FRAMES = ($fi_filename =~ /noframes_.*\.tmpl$/) ? 1 : 0;
|
||||
$OUT;
|
||||
\}
|
||||
<HR class="sme-copyrightbar">
|
||||
<FONT class="sme-copyright">
|
||||
\{
|
||||
use esmith::ConfigDB;
|
||||
my $db = esmith::ConfigDB->open();
|
||||
|
||||
my $sysconfig = $db->get("sysconfig");
|
||||
|
||||
my $lang = (split(/,/, $ENV\{"HTTP_ACCEPT_LANGUAGE"\}))[0];
|
||||
# convert xx_XX lang format to xx-xx
|
||||
($lang = lc($lang)) =~ s/_/-/;
|
||||
|
||||
my $releaseVersion = $sysconfig->prop("ReleaseVersion");
|
||||
|
@@ -0,0 +1,10 @@
|
||||
$OUT .= "Copyright 1999-2006 Mitel Corporation<BR>";
|
||||
|
||||
use Locale::gettext;
|
||||
use esmith::I18N;
|
||||
my $i18n = esmith::I18N->new();
|
||||
$i18n->setLocale('foot.tmpl', $i18n->preferredLanguage());
|
||||
$OUT .= gettext("All rights reserved.");
|
||||
$OUT;
|
||||
\}
|
||||
|
@@ -0,0 +1,10 @@
|
||||
</FONT>
|
||||
</BODY>
|
||||
\{
|
||||
if ($NO_FRAMES)
|
||||
\{
|
||||
$OUT .= "</NOFRAMES>\n";
|
||||
\}
|
||||
$OUT;
|
||||
\}
|
||||
</HTML>
|
@@ -0,0 +1,12 @@
|
||||
\{
|
||||
# we can snag lexical $fi_filename from Text::Template to find out how
|
||||
# we were called
|
||||
$NO_FRAMES = ($fi_filename =~ /noframes_.*\.tmpl$/) ? 1 : 0;
|
||||
$USER_PASSWORD = ($fi_filename =~ /userpassword_.*\.tmpl$/) ? 1 : 0;
|
||||
$OUT;
|
||||
\}
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
@@ -0,0 +1,15 @@
|
||||
\{
|
||||
unless ($NO_FRAMES)
|
||||
\{
|
||||
$OUT .= <<EOF;
|
||||
<link rev="made" href="mailto:bugs%40koozali.org">
|
||||
<meta name="copyright" content="(head.tmpl)Copyright 2003-2004 Mitel Corporation">
|
||||
<link rel="stylesheet" type="text/css" href="/server-common/css/sme_core.css">
|
||||
<style type="text/css">
|
||||
\@import url("/server-common/css/sme_main.css");
|
||||
</style>
|
||||
EOF
|
||||
\}
|
||||
$OUT;
|
||||
\}
|
||||
</head>
|
@@ -0,0 +1,54 @@
|
||||
\{
|
||||
if ($NO_FRAMES)
|
||||
\{
|
||||
$OUT .= <<EOF;
|
||||
<frameset rows="68,*" cols="*" frameborder="NO" border="0" framespacing="0">
|
||||
<frame src="/server-manager/header.htm" name="header" scrolling="NO" noresize >
|
||||
<frameset rows="*" cols="192,*" framespacing="0" frameborder="NO" border="0">
|
||||
<frame src="/server-manager/navigation" name="navigation" scrolling="auto" noresize>
|
||||
<frame src="/server-manager/initial.cgi" name="main">
|
||||
</frameset>
|
||||
</frameset>
|
||||
|
||||
</FRAMESET>
|
||||
|
||||
<NOFRAMES>
|
||||
EOF
|
||||
\}
|
||||
else
|
||||
\{
|
||||
my $panel = "Server manager";
|
||||
my $img = "smeserver_logo.jpg";
|
||||
|
||||
$OUT .= <<EOF;
|
||||
<body>
|
||||
EOF
|
||||
\}
|
||||
|
||||
if( $ENV\{REQUEST_URI\} =~ m/(server-manager)/) \{
|
||||
|
||||
$DB = esmith::ConfigDB->open();
|
||||
$OUT .= qq(<div class="sme-error"><h5>
|
||||
Warning: you have not yet changed the default system password.</h5></div>)
|
||||
unless ($DB->get('PasswordSet')->value eq "yes");
|
||||
|
||||
$OUT .= qq(<div class="sme-error"><h5>
|
||||
Warning: a reconfigure and reboot is required before proceeding! Failure to do so now
|
||||
may leave your system in an unknown state!</h5></div>)
|
||||
if ($DB->get('bootstrap-console') and $DB->get('bootstrap-console')->prop('Run') eq 'yes') ||
|
||||
($DB->get('UnsavedChanges') and $DB->get('UnsavedChanges')->value eq 'yes');
|
||||
|
||||
# SME v10 End of Life message
|
||||
use POSIX qw(strftime);
|
||||
my $curdate = strftime '%Y%m%d', localtime;
|
||||
$OUT .= qq(<div class="sme-error"><h5>
|
||||
URGENT NOTICE: As per June 30th 2024, SME Server 10 is obsolete, and potentially INSECURE. NO support will be offered for any issue found with this installed version.
|
||||
Please migrate IMMEDIATELY to Koozali SME Server 11 or higher version. Failure to upgrade may lead to the compromise of this server.
|
||||
</br>Please, consult <a href="https://wiki.koozali.org/SME_Server:Download" target="_blank">https://wiki.koozali.org/SME_Server:Download</a> to get last available version.</h5></div>)
|
||||
if ( "$curdate" >= "20240630");
|
||||
|
||||
$OUT;
|
||||
|
||||
\}
|
||||
|
||||
\}
|
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Untitled Document</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" type="text/css" href="/server-common/css/sme_core.css">
|
||||
<link rel="stylesheet" type="text/css" href="/server-common/css/sme_panel_menu.css">
|
||||
<style type="text/css">
|
||||
@import url("/server-common/css/sme_header.css");
|
||||
</style>
|
||||
</head>
|
@@ -0,0 +1 @@
|
||||
<body class=header leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
|
@@ -0,0 +1,7 @@
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="hilightbar">
|
||||
<img src="/server-common/spacer.gif" height="6" width="1">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
@@ -0,0 +1,15 @@
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td align=left nowrap class="infobar">
|
||||
<img src="/server-common/spacer.gif" height="14" width="1" align="left">
|
||||
<b>admin@{ "${SystemName}.${DomainName}" }</b>
|
||||
|
||||
<!-- <a href="#">Logout</a> --></td>
|
||||
<td align=right nowrap class="infobar">
|
||||
<!-- <a class="update" target="main" href="/server-manager/cgi-bin/blades">Update Available</a>|-->
|
||||
<a target="main" href="/server-manager/cgi-bin/online-manual"> <b> ? </b> </a> </td>
|
||||
<td nowrap class="infobar">
|
||||
<a target="_parent" href="/server-common/cgi-bin/logout"><b>Logout</b></a> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@@ -0,0 +1,2 @@
|
||||
</body>
|
||||
</html>
|
@@ -0,0 +1,10 @@
|
||||
<!--
|
||||
#------------------------------------------------------------
|
||||
# DO NOT MODIFY THIS FILE! It is updated automatically by the
|
||||
# SME Server software. Instead, modify the source template in
|
||||
# an /etc/e-smith/templates-custom directory. For more
|
||||
# information, see http://www.e-smith.org/custom/
|
||||
#
|
||||
# copyright (C) 2002 Mitel Networks Corporation
|
||||
#------------------------------------------------------------
|
||||
-->
|
@@ -0,0 +1,22 @@
|
||||
{
|
||||
#---------------------------------------------------------------------
|
||||
# Grab ValidFrom access list property of httpd-admin
|
||||
# SSL enabled virtual hosts should only allow access from IP's in
|
||||
# this list, as well as local networks.
|
||||
#---------------------------------------------------------------------
|
||||
use esmith::NetworksDB;
|
||||
|
||||
my $ndb = esmith::NetworksDB->open_ro();
|
||||
|
||||
my @localAccess = $ndb->local_access_spec();
|
||||
my $validFrom = ${'httpd-admin'}{'ValidFrom'};
|
||||
if ($validFrom)
|
||||
{
|
||||
push @localAccess, split /,/, $validFrom;
|
||||
}
|
||||
$localAccess .= join ' ',
|
||||
map { s:/255.255.255.255::; $_ }
|
||||
@localAccess;
|
||||
|
||||
"";
|
||||
}
|
@@ -0,0 +1,169 @@
|
||||
{
|
||||
$OUT .= "Listen 127.0.0.1:${'httpd-admin'}{TCPPort}\n";
|
||||
|
||||
$OUT .= <<HERE;
|
||||
|
||||
HostnameLookups off
|
||||
|
||||
ServerAdmin admin@$DomainName
|
||||
ServerRoot /etc/httpd
|
||||
ServerTokens ProductOnly
|
||||
|
||||
User admin
|
||||
Group admin
|
||||
|
||||
ErrorLog /var/log/httpd/admin_error_log
|
||||
LogLevel warn
|
||||
HERE
|
||||
|
||||
foreach (qw(
|
||||
env
|
||||
log_config
|
||||
mime
|
||||
negotiation
|
||||
status
|
||||
info
|
||||
include
|
||||
autoindex
|
||||
dir
|
||||
cgi
|
||||
asis
|
||||
imap
|
||||
imagemap
|
||||
actions
|
||||
userdir
|
||||
proxy
|
||||
proxy_http
|
||||
alias
|
||||
rewrite
|
||||
access
|
||||
authz_host
|
||||
authz_user
|
||||
auth
|
||||
auth_anon
|
||||
auth_digest
|
||||
expires
|
||||
headers
|
||||
usertrack
|
||||
setenvif
|
||||
mpm_prefork
|
||||
access_compat
|
||||
unixd
|
||||
authn_core
|
||||
authz_core
|
||||
systemd
|
||||
))
|
||||
{
|
||||
next unless -f "/usr/lib/httpd/modules/mod_${_}.so" ||
|
||||
-f "/usr/lib64/httpd/modules/mod_${_}.so";
|
||||
$OUT .= "LoadModule ${_}_module modules/mod_${_}.so\n";
|
||||
}
|
||||
|
||||
$OUT .= <<HERE;
|
||||
PidFile /var/run/httpd-admin.pid
|
||||
ScoreBoardFile /var/run/httpd-admin.scoreboard
|
||||
UseCanonicalName off
|
||||
LogFormat "%h %l %u %t \\"%r\\" %>s %b" common
|
||||
LogFormat "%{User-agent}i" agent
|
||||
|
||||
CustomLog /var/log/httpd/admin_access_log common
|
||||
|
||||
KeepAlive On
|
||||
MaxKeepAliveRequests 100
|
||||
KeepAliveTimeout 15
|
||||
|
||||
MaxClients 150
|
||||
MaxRequestsPerChild 100
|
||||
|
||||
ServerName www.$DomainName
|
||||
|
||||
MinSpareServers 1
|
||||
MaxSpareServers 5
|
||||
StartServers 1
|
||||
Timeout 300
|
||||
|
||||
DefaultIcon /icons/unknown.gif
|
||||
DirectoryIndex index.htm index.html index.shtml index.cgi
|
||||
IndexOptions FancyIndexing VersionSort NameWidth=*
|
||||
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
|
||||
AccessFileName .htaccess
|
||||
|
||||
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
|
||||
AddIconByType (TXT,/icons/text.gif) text/*
|
||||
AddIconByType (IMG,/icons/image2.gif) image/*
|
||||
AddIconByType (SND,/icons/sound2.gif) audio/*
|
||||
AddIconByType (VID,/icons/movie.gif) video/*
|
||||
DefaultType none
|
||||
TypesConfig /etc/mime.types
|
||||
|
||||
AddEncoding x-compress Z
|
||||
AddEncoding x-gzip gz
|
||||
|
||||
AddIcon /icons/binary.gif .bin .exe
|
||||
AddIcon /icons/binhex.gif .hqx
|
||||
AddIcon /icons/tar.gif .tar
|
||||
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
|
||||
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
|
||||
AddIcon /icons/a.gif .ps .ai .eps
|
||||
AddIcon /icons/layout.gif .html .shtml .htm .pdf
|
||||
AddIcon /icons/text.gif .txt
|
||||
AddIcon /icons/c.gif .c
|
||||
AddIcon /icons/p.gif .pl .py
|
||||
AddIcon /icons/f.gif .for
|
||||
AddIcon /icons/dvi.gif .dvi
|
||||
AddIcon /icons/uuencoded.gif .uu
|
||||
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
|
||||
AddIcon /icons/tex.gif .tex
|
||||
AddIcon /icons/bomb.gif core
|
||||
|
||||
AddIcon /icons/back.gif ..
|
||||
AddIcon /icons/hand.right.gif README
|
||||
AddIcon /icons/folder.gif ^^DIRECTORY^^
|
||||
AddIcon /icons/blank.gif ^^BLANKICON^^
|
||||
|
||||
AddLanguage en .en
|
||||
AddLanguage fr .fr
|
||||
AddLanguage de .de
|
||||
AddLanguage da .da
|
||||
AddLanguage el .el
|
||||
AddLanguage it .it
|
||||
|
||||
LanguagePriority en fr de
|
||||
|
||||
AddType text/html .shtml
|
||||
AddType application/x-pkcs7-crl .crl
|
||||
|
||||
AddType application/x-x509-ca-cert .crt
|
||||
|
||||
BrowserMatch "Mozilla/2" nokeepalive
|
||||
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
|
||||
BrowserMatch "RealPlayer 4\.0" force-response-1.0
|
||||
BrowserMatch "Java/1\.0" force-response-1.0
|
||||
BrowserMatch "JDK/1\.0" force-response-1.0
|
||||
|
||||
AddHandler cgi-script .cgi
|
||||
AddHandler server-parsed .shtml
|
||||
AddHandler imap-file map
|
||||
|
||||
DocumentRoot /etc/e-smith/web/panels/manager/html
|
||||
|
||||
ScriptAlias /server-common/cgi-bin/ /etc/e-smith/web/common/cgi-bin/
|
||||
Alias /server-common/ /etc/e-smith/web/common/
|
||||
ScriptAlias /server-manager/noframes /etc/e-smith/web/panels/manager/cgi-bin/noframes
|
||||
ScriptAlias /server-manager/support /etc/e-smith/web/panels/manager/cgi-bin/support
|
||||
ScriptAlias /server-manager/navigation /etc/e-smith/web/panels/manager/cgi-bin/navigation
|
||||
|
||||
# e-smith manager panel
|
||||
ScriptAlias /server-manager/cgi-bin /etc/e-smith/web/panels/manager/cgi-bin
|
||||
Alias /server-manager /etc/e-smith/web/panels/manager/html
|
||||
|
||||
# e-smith password panel
|
||||
ScriptAlias /user-password /etc/e-smith/web/panels/password/cgi-bin/userpassword
|
||||
|
||||
Alias /server-resources/ /home/e-smith/files/server-resources/
|
||||
|
||||
Alias /icons/ /usr/share/httpd/icons/
|
||||
|
||||
HERE
|
||||
}
|
||||
|
@@ -0,0 +1,7 @@
|
||||
{
|
||||
$OUT .= "LoadModule auth_tkt_module modules/mod_auth_tkt.so\n";
|
||||
|
||||
my $secret = ${'httpd-admin'}{TKTAuthSecret} || "34322500-7330-4400-423A-3A00434F5245";
|
||||
$OUT .= "TKTAuthSecret \"$secret\"\n";
|
||||
$OUT .= "TKTAuthDigestType SHA256\n";
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
|
||||
# First, we configure the "default" to be a very restrictive set of
|
||||
# permissions.
|
||||
|
||||
<Directory />
|
||||
Options None
|
||||
AllowOverride None
|
||||
Require all denied
|
||||
</Directory>
|
||||
|
@@ -0,0 +1,8 @@
|
||||
# Server resources access configuration
|
||||
|
||||
<Directory /home/e-smith/files/server-resources>
|
||||
Options +Indexes
|
||||
{
|
||||
$OUT .= " Require ip $localAccess\n";
|
||||
}
|
||||
</Directory>
|
@@ -0,0 +1,10 @@
|
||||
#------------------------------------------------------------
|
||||
# e-smith files shared by manager and other control packages
|
||||
#------------------------------------------------------------
|
||||
|
||||
<Directory "/home/e-smith/web/common">
|
||||
Options Indexes Includes
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
@@ -0,0 +1,41 @@
|
||||
#------------------------------------------------------------
|
||||
# e-smith files shared by manager and other control packages
|
||||
#------------------------------------------------------------
|
||||
|
||||
<Directory "/etc/e-smith/web/common/cgi-bin">
|
||||
AllowOverride None
|
||||
Options ExecCGI
|
||||
<RequireAll>
|
||||
Require ip { $localAccess }
|
||||
</RequireAll>
|
||||
</Directory>
|
||||
|
||||
<Directory "/etc/e-smith/web/common">
|
||||
Options Includes
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
<FilesMatch ".*\.tmpl">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
</Directory>
|
||||
|
||||
<Directory "/etc/e-smith/web/panels/manager/common">
|
||||
Options Includes FollowSymLinks
|
||||
AllowOverride None
|
||||
AuthType basic
|
||||
TKTAuthLoginURL /server-common/cgi-bin/login
|
||||
{
|
||||
my $ManagerTimeout = ${'httpd-admin'}{ManagerTimeout} || "30m";
|
||||
$OUT = " TKTAuthTimeout $ManagerTimeout\n";
|
||||
my $Cookie = ${'httpd-admin'}{Cookie} || "disabled";
|
||||
$OUT .= " TKTAuthCookieExpires $ManagerTimeout\n" if "$Cookie" eq "enabled";
|
||||
my $ManagerTimeoutReset = ${'httpd-admin'}{ManagerTimeoutReset} || "0.66";
|
||||
$OUT .= " TKTAuthTimeoutRefresh $ManagerTimeoutReset\n";
|
||||
}
|
||||
TKTAuthUnauthURL /server-common/cgi-bin/logout
|
||||
<RequireAll>
|
||||
require valid-user
|
||||
Require all granted
|
||||
</RequireAll>
|
||||
</Directory>
|
||||
|
@@ -0,0 +1,42 @@
|
||||
|
||||
#------------------------------------------------------------
|
||||
# e-smith-manager panel
|
||||
#------------------------------------------------------------
|
||||
|
||||
<Directory "/etc/e-smith/web/panels/manager/html" >
|
||||
Options Includes FollowSymLinks ExecCGI
|
||||
AllowOverride None
|
||||
AuthType Basic
|
||||
TKTAuthLoginURL /server-common/cgi-bin/login
|
||||
{
|
||||
my $ManagerTimeout = ${'httpd-admin'}{ManagerTimeout} || "30m";
|
||||
$OUT = " TKTAuthTimeout $ManagerTimeout\n";
|
||||
# $OUT .= " TKTAuthCookieExpires $ManagerTimeout";
|
||||
}
|
||||
TKTAuthTimeoutRefresh 0.66
|
||||
TKTAuthUnauthURL /server-common/cgi-bin/logout
|
||||
<RequireAll>
|
||||
require user admin
|
||||
Require ip { $localAccess }
|
||||
</RequireAll>
|
||||
</Directory>
|
||||
|
||||
<Directory "/etc/e-smith/web/panels/manager/cgi-bin">
|
||||
Options Includes FollowSymLinks ExecCGI
|
||||
AllowOverride None
|
||||
AuthType Basic
|
||||
TKTAuthLoginURL /server-common/cgi-bin/login
|
||||
{
|
||||
my $ManagerTimeout = ${'httpd-admin'}{ManagerTimeout} || "30m";
|
||||
$OUT = " TKTAuthTimeout $ManagerTimeout\n";
|
||||
my $Cookie = ${'httpd-admin'}{Cookie} || "disabled";
|
||||
$OUT .= " TKTAuthCookieExpires $ManagerTimeout\n" if "$Cookie" eq "enabled";
|
||||
my $ManagerTimeoutReset = ${'httpd-admin'}{ManagerTimeoutReset} || "0.66";
|
||||
$OUT .= " TKTAuthTimeoutRefresh $ManagerTimeoutReset\n";
|
||||
}
|
||||
TKTAuthUnauthURL /server-common/cgi-bin/logout
|
||||
<RequireAll>
|
||||
require user admin
|
||||
Require ip { $localAccess }
|
||||
</RequireAll>
|
||||
</Directory>
|
@@ -0,0 +1,13 @@
|
||||
|
||||
#------------------------------------------------------------
|
||||
# e-smith-password panel
|
||||
#------------------------------------------------------------
|
||||
<Directory "/etc/e-smith/web/panels/password/html">
|
||||
Require ip { $localAccess }
|
||||
</Directory>
|
||||
|
||||
<Directory "/etc/e-smith/web/panels/password/cgi-bin">
|
||||
Options Includes FollowSymlinks
|
||||
Require ip { $localAccess }
|
||||
</Directory>
|
||||
|
@@ -0,0 +1,36 @@
|
||||
{
|
||||
# vim: ft=perl:
|
||||
|
||||
$haveSSL = (exists ${modSSL}{status} and ${modSSL}{status} eq "enabled") ? 'yes' : 'no';
|
||||
$plainTextAccess = ${'httpd-admin'}{PermitPlainTextAccess} || 'no';
|
||||
|
||||
$OUT = '';
|
||||
foreach $place ('server-manager','server-common','user-password')
|
||||
{
|
||||
if (($port eq $httpPort) && ($haveSSL eq 'yes') && ($plainTextAccess ne 'yes'))
|
||||
{
|
||||
$OUT .= ' RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1$' . "\n";
|
||||
$OUT .= " RewriteRule ^/$place(/.*|\$) https://%{HTTP_HOST}/$place\$1 [L,R]\n";
|
||||
}
|
||||
if ($port eq $httpsPort)
|
||||
{
|
||||
# mod_auth_tkt needs to know the protocol to write 307 redirection
|
||||
$OUT .= " RequestHeader set X-Forwarded-Proto \"https\"\n";
|
||||
}
|
||||
$OUT .= " ProxyPass /$place http://127.0.0.1:${'httpd-admin'}{TCPPort}/$place\n";
|
||||
$OUT .= " ProxyPassReverse /$place http://127.0.0.1:${'httpd-admin'}{TCPPort}/$place\n";
|
||||
|
||||
$OUT .= " <Location /$place>\n";
|
||||
if ($port eq $httpPort)
|
||||
{
|
||||
$OUT .= ' Require ip 127.0.0.1' . "\n";
|
||||
}
|
||||
elsif (($haveSSL eq 'yes') && (($port eq $httpsPort) || ($plainTextAccess ne 'yes')))
|
||||
{
|
||||
$OUT .= " Require ip $localAccess $externalSSLAccess\n";
|
||||
} else {
|
||||
$OUT .= " Require ip $localAccess\n";
|
||||
}
|
||||
$OUT .= " </Location>\n";
|
||||
}
|
||||
}
|
1
root/etc/e-smith/templates/etc/services/20http-admin
Normal file
1
root/etc/e-smith/templates/etc/services/20http-admin
Normal file
@@ -0,0 +1 @@
|
||||
http-admin { ${'httpd-admin'}{TCPPort} }/tcp # admin HTTP server
|
355
root/etc/e-smith/web/common/cgi-bin/login
Normal file
355
root/etc/e-smith/web/common/cgi-bin/login
Normal file
@@ -0,0 +1,355 @@
|
||||
#!/usr/bin/perl -w
|
||||
#
|
||||
# mod_auth_tkt sample login script - runs as a vanilla CGI, under
|
||||
# mod_perl 1 via Apache::Registry, and under mod_perl2 via
|
||||
# ModPerl::Registry.
|
||||
#
|
||||
# This script can run in a few different modes, depending on how it is
|
||||
# named. Copy the script to a cgi-bin area, and create appropriately
|
||||
# named symlinks to access the different behaviours.
|
||||
# Modes:
|
||||
# - login mode (default): request a username and password and test via
|
||||
# $validate_sub - if successful, issue an auth ticket and redirect to
|
||||
# the back location
|
||||
# - guest mode ('guest.cgi'): automatically issues an auth ticket a
|
||||
# special username (as defined in $guest_sub, default 'guest'), and
|
||||
# redirect to the back location (now largely obsolete - use
|
||||
# TKTAuthGuestLogin instead)
|
||||
# - autologin mode ('autologin.cgi'): [typically used to allow tickets
|
||||
# across multiple domains] if no valid auth ticket exists, redirect
|
||||
# to the login (or guest) version; otherwise automatically redirect
|
||||
# to the back location passing the current auth ticket as a GET
|
||||
# argument. mod_auth_tkt (>= 1.3.8) will turn this new ticket into
|
||||
# an auth cookie for the new domain if none already exists.
|
||||
#
|
||||
|
||||
use File::Basename;
|
||||
use lib dirname($ENV{SCRIPT_FILENAME});
|
||||
use Apache::AuthTkt 0.03;
|
||||
use CGI qw(:standard);
|
||||
use CGI::Cookie;
|
||||
use URI::Escape;
|
||||
use URI;
|
||||
use strict;
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# Configure this section to taste
|
||||
|
||||
# CSS stylesheet to use (optional)
|
||||
my $STYLESHEET = '/server-common/css/tkt.css';
|
||||
# Page title (optional)
|
||||
my $TITLE = 'SME Server manager';
|
||||
# For autologin, mode to fallback to if autologin fails ('login' or 'guest')
|
||||
my $AUTOLOGIN_FALLBACK_MODE = 'login';
|
||||
# Boolean flag, whether to fallback to HTTP_REFERER for back link
|
||||
my $BACK_REFERER = 0;
|
||||
|
||||
# For login mode (if used), setup username/password validation
|
||||
# (modify or point $validate_sub somewhere appropriate).
|
||||
# The validation routine should return a true value (e.g. 1) if the
|
||||
# given username/password combination is valid, and a false value
|
||||
# (e.g. 0) otherwise.
|
||||
# This version uses Apache::Htpasswd and a standard htpasswd file.
|
||||
sub validate
|
||||
{
|
||||
my ($username, $password) = @_;
|
||||
unless (open(PWAUTH, "|/usr/bin/pwauth"))
|
||||
{
|
||||
warn "Could not open pipe to pwauth: $!";
|
||||
return 0;
|
||||
}
|
||||
print PWAUTH "$username\n";
|
||||
print PWAUTH "$password\n";
|
||||
return close(PWAUTH) ? 1 : 0;
|
||||
#require Apache::Htpasswd;
|
||||
# my $ht = Apache::Htpasswd->new({
|
||||
# passwdFile => '/etc/httpd/conf/htpasswd', ReadOnly => 1 });
|
||||
# return $ht->htCheckPassword($username, $password);
|
||||
}
|
||||
my $validate_sub = \&validate;
|
||||
|
||||
# For guest mode (if used), setup guest username
|
||||
# Could use a counter or a random suffix etc.
|
||||
sub guest_user
|
||||
{
|
||||
return 'guest';
|
||||
}
|
||||
my $guest_sub = \&guest_user;
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# Main code begins
|
||||
my $debug = 0;
|
||||
my $at = Apache::AuthTkt->new(conf => "/etc/e-smith/web/common/cgi-bin/AuthTKT.cfg");
|
||||
my $q = CGI->new;
|
||||
my $x_f = $q->http('X-Forwarded-Host');
|
||||
#warn "X-Forwarded-Host is $x_f\n" if $x_f;
|
||||
#warn "HTTP_HOST is $ENV{HTTP_HOST}\n" if $ENV{HTTP_HOST};
|
||||
my ($server_name, $server_port) = split /:/, $q->http('X-Forwarded-Host') || $ENV{HTTP_HOST};
|
||||
$server_name ||= $ENV{SERVER_NAME} if $ENV{SERVER_NAME};
|
||||
$server_port ||= $ENV{SERVER_PORT} if $ENV{SERVER_PORT};
|
||||
#my $AUTH_DOMAIN = $at->domain || $server_name;
|
||||
my $AUTH_DOMAIN = $server_name;
|
||||
#warn "AUTH_DOMAIN is $AUTH_DOMAIN\n";
|
||||
#warn "AuthTkt->domain was set\n" if $at->domain;
|
||||
my @auth_domain = $AUTH_DOMAIN && $AUTH_DOMAIN =~ /\./ ? ( -domain => $AUTH_DOMAIN ) : ();
|
||||
my $ticket = $q->cookie($at->cookie_name);
|
||||
my $probe = $q->cookie('auth_probe');
|
||||
my $back = $q->cookie($at->back_cookie_name) if $at->back_cookie_name;
|
||||
#warn "back from cookie is $back\n" if $back;
|
||||
my $have_cookies = $ticket || $probe || $back || '';
|
||||
$back ||= $q->param($at->back_arg_name) if $at->back_arg_name;
|
||||
#warn "back from cgi param is $back\n" if $back;
|
||||
$back ||= $ENV{HTTP_REFERER} if $ENV{HTTP_REFERER} && $BACK_REFERER;
|
||||
$back = uri_unescape($back) if $back && $back =~ m/^https?%3A%2F%2F/i;
|
||||
$back =~ s/^http:/https:/ if $server_name ne 'localhost' && defined($back);
|
||||
#warn "back is $back\n";
|
||||
if ($back && $back =~ m!^/!) {
|
||||
my $hostname = $server_name;
|
||||
my $port = $server_port;
|
||||
$hostname .= ':' . $port if $port && $port != 80 && $port != 443;
|
||||
$back = sprintf "http%s://%s%s", ($port == 443 ? 's' : ''), $hostname, $back;
|
||||
#warn "back is $back\n";
|
||||
} elsif ($back && $back !~ m/^http/i) {
|
||||
$back = 'http://' . $back;
|
||||
#warn "back is $back\n";
|
||||
}
|
||||
|
||||
#warn "back is $back\n";
|
||||
my $back_esc = uri_escape($back) if $back;
|
||||
my $back_html = escapeHTML($back) if $back;
|
||||
|
||||
my ($fatal, @errors);
|
||||
my ($mode, $location, $suffix) = fileparse($ENV{SCRIPT_NAME}, '\.cgi', '\.pl');
|
||||
$mode = 'login' unless $mode eq 'guest' || $mode eq 'autologin';
|
||||
my $self_redirect = $q->param('redirect') || 0;
|
||||
my $username = lc($q->param('username')||'');
|
||||
my $password = $q->param('password');
|
||||
my $timeout = $q->param('timeout');
|
||||
my $unauth = $q->param('unauth');
|
||||
my $ip_addr = $at->ignore_ip ? undef : $ENV{REMOTE_ADDR};
|
||||
my $redirected = 0;
|
||||
|
||||
my $b = URI->new($back);
|
||||
# If $back domain doesn't match $AUTH_DOMAIN, stop there do not give opportunity to log in
|
||||
my $domain = $AUTH_DOMAIN || $server_name;
|
||||
if (! defined($back)) {
|
||||
$fatal="Missing redirection parameter: \"back\" <br />\nPlease manually enter the address you were trying to reach if you followed a link.<br />\n";
|
||||
}
|
||||
if (defined($back) && $b->host !~ m/\b$domain$/i) {
|
||||
$fatal="Bad redirection parameter: \"$back\" is not an authorized redirection.<br />\nYou may be experiencing an attack.<br />\nLogin is not possible on the above URL for your own security.<br />\nPlease manually enter the address you were trying to reach if you followed a link.";
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# Set the auth cookie and redirect to $back
|
||||
my $set_cookie_redirect = sub {
|
||||
my ($tkt, $back) = @_;
|
||||
my @expires = $at->cookie_expires ?
|
||||
( -expires => sprintf("+%ss", $at->cookie_expires) ) :
|
||||
();
|
||||
my $cookie = CGI::Cookie->new(
|
||||
-name => $at->cookie_name,
|
||||
-value => $tkt,
|
||||
-path => '/',
|
||||
-secure => $at->require_ssl,
|
||||
@expires,
|
||||
@auth_domain,
|
||||
);
|
||||
|
||||
# If no $back, just set the auth cookie and hope for the best
|
||||
if (! $back) {
|
||||
print $q->header( -cookie => $cookie );
|
||||
print $q->start_html, $q->p("Login successful"), $q->end_html;
|
||||
return 0;
|
||||
}
|
||||
|
||||
# Set (local) cookie, and redirect to $back
|
||||
print $q->header( -cookie => $cookie );
|
||||
#return 0 if $debug;
|
||||
|
||||
# For some reason, using a Location: header doesn't seem to then see the
|
||||
# cookie, but a meta refresh one does - weird
|
||||
print $q->start_html(
|
||||
-head => meta({ -http_equiv => 'refresh', -content => "0;URL=$back" }),
|
||||
),
|
||||
$q->end_html;
|
||||
return 1;
|
||||
};
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# Actual processing
|
||||
|
||||
# If no cookies found, first check whether cookies are supported
|
||||
if (! $have_cookies) {
|
||||
# If this is a self redirect warn the user about cookie support
|
||||
if ($self_redirect) {
|
||||
$fatal = "Your browser does not appear to support cookies or has cookie support disabled.<br />\nThis site requires cookies - please turn cookie support on or try again using a different browser.";
|
||||
}
|
||||
# If no cookies and not a redirect, redirect to self to test cookies
|
||||
else {
|
||||
my $extra = '';
|
||||
$extra .= 'timeout=1' if $timeout;
|
||||
$extra .= 'unauth=1' if $unauth;
|
||||
$extra = "&$extra" if $extra;
|
||||
print $q->header(
|
||||
-cookie => CGI::Cookie->new(-name => 'auth_probe', -value => 1, @auth_domain),
|
||||
);
|
||||
# For some reason, a Location: redirect doesn't seem to then see the cookie,
|
||||
# but a meta refresh one does - go figure
|
||||
print $q->start_html(
|
||||
-head => meta({
|
||||
-http_equiv => 'refresh', -content => ("0;URL=" . sprintf("%s%s%s?redirect=%s&%s=%s%s",
|
||||
$location, $mode, $suffix, $self_redirect + 1, $at->back_arg_name,
|
||||
$back_esc || '', $extra))
|
||||
}));
|
||||
$redirected = 1;
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($mode eq 'autologin') {
|
||||
# If we have a ticket, redirect to $back, including ticket as GET param
|
||||
if ($ticket && $back && ! $timeout) {
|
||||
my $b = URI->new($back);
|
||||
$back .= $b->query ? '&' : '?';
|
||||
$back .= $at->cookie_name . '=' . $ticket;
|
||||
print $q->redirect($back);
|
||||
$redirected = 1;
|
||||
}
|
||||
# Can't autologin - change mode to either guest or login
|
||||
else {
|
||||
$mode = $AUTOLOGIN_FALLBACK_MODE;
|
||||
}
|
||||
}
|
||||
|
||||
unless ($fatal || $redirected) {
|
||||
if (! $at) {
|
||||
$fatal = "AuthTkt error: " . $at->errstr;
|
||||
}
|
||||
elsif ($mode eq 'login') {
|
||||
if ($username && $validate_sub->($username, $password)) {
|
||||
# my $user_data = join(':', encrypt($password), time(), $ip_addr);
|
||||
my $user_data = join(':', time(), $ip_addr || ''); # Optional
|
||||
my $tkt = $at->ticket(uid => $username, data => $user_data, ip_addr => $ip_addr, debug => $debug);
|
||||
if (! @errors) {
|
||||
$redirected = $set_cookie_redirect->($tkt, $back);
|
||||
$fatal = "Login successful.";
|
||||
}
|
||||
}
|
||||
elsif ($username) {
|
||||
push @errors, "Invalid username or password.";
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($mode eq 'guest') {
|
||||
# Generate a guest ticket and redirect to $back
|
||||
my $tkt = $at->ticket(uid => $guest_sub->(), ip_addr => $ip_addr);
|
||||
if (! @errors) {
|
||||
$redirected = $set_cookie_redirect->($tkt, $back);
|
||||
$fatal = "No back link found.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
my @style = $STYLESHEET ? ('-style' => { src => $STYLESHEET }) : ();
|
||||
$TITLE ||= "\u$mode Page";
|
||||
unless ($redirected) {
|
||||
# If here, either some kind of error or a login page
|
||||
if ($fatal) {
|
||||
print $q->header,
|
||||
$q->start_html(
|
||||
-title => $TITLE,
|
||||
@style,
|
||||
);
|
||||
}
|
||||
else {
|
||||
push @errors, qq(Your session has timed out.) if $timeout;
|
||||
push @errors, qq(You are not authorised to access this area.) if $unauth;
|
||||
print $q->header,
|
||||
$q->start_html(
|
||||
-title => $TITLE,
|
||||
-onLoad => "getFocus()",
|
||||
@style,
|
||||
-script => qq(
|
||||
function getFocus() {
|
||||
document.forms[0].elements[0].focus();
|
||||
document.forms[0].elements[0].select();
|
||||
}));
|
||||
}
|
||||
print <<EOD;
|
||||
<div align="center">
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<h2>Welcome to SME server</h2>
|
||||
EOD
|
||||
|
||||
if ($debug) {
|
||||
my $cookie_name = $at->cookie_name;
|
||||
my $back_cookie_name = $at->back_cookie_name || '';
|
||||
my $back_cookie_path = $q->cookie($at->back_cookie_name) || '';
|
||||
my $back_arg_name = $at->back_arg_name || '';
|
||||
my $cookie_expires = $at->cookie_expires || 0;
|
||||
my $referer = $ENV{HTTP_REFERER};
|
||||
print <<EOD;
|
||||
<pre>
|
||||
server_name: $server_name
|
||||
server_port: $server_port
|
||||
domain: $AUTH_DOMAIN
|
||||
mode: $mode
|
||||
suffix: $suffix
|
||||
cookie_name: $cookie_name
|
||||
cookie_expires: $cookie_expires
|
||||
back_cookie_name: $back_cookie_name
|
||||
back_cookie_path: $back_cookie_path
|
||||
back_arg_name: $back_arg_name
|
||||
referer: $referer
|
||||
back: $back
|
||||
back_esc: $back_esc
|
||||
back_html: $back_html
|
||||
have_cookies: $have_cookies
|
||||
ip_addr: $ip_addr
|
||||
</pre>
|
||||
EOD
|
||||
}
|
||||
|
||||
if ($fatal) {
|
||||
print qq(<p class="error">$fatal</p>\n);
|
||||
}
|
||||
|
||||
else {
|
||||
print qq(<p class="error">\n), join(qq(<br />\n), @errors), "</p>\n"
|
||||
if @errors;
|
||||
print <<EOD;
|
||||
<form name="login" method="post" action="$mode$suffix">
|
||||
<table border="0" cellpadding="5">
|
||||
<tr><th>Username:</th><td><input type="text" name="username" /></td></tr>
|
||||
<tr><th>Password:</th><td><input type="password" name="password" /></td></tr>
|
||||
<tr><td colspan="2" align="center">
|
||||
<input type="submit" value="Login" />
|
||||
</td></tr>
|
||||
</table>
|
||||
EOD
|
||||
print qq(<input type="hidden" name="back" value="$back_html" />\n) if $back_html;
|
||||
print qq(</form>\n);
|
||||
}
|
||||
|
||||
# print qq(<p><a href="$back_html">Previous Page</a></p>\n) if $back_html;
|
||||
print <<EOD;
|
||||
<!-- Start Donate section -->
|
||||
<p>Remember that SME Server is <i>free to download</i> and use, but it is <i><b>not</b>
|
||||
free to build</i></p>
|
||||
<p>Please help the project</p>
|
||||
<p><a href="https://wiki.koozali.org/Donate" target="_blank"><img
|
||||
src="../btn_donateCC_LG.gif"
|
||||
alt="https://wiki.koozali.org/Donate" align="middle"></a>
|
||||
</p>
|
||||
<p>-- The SME Server Team --</p>
|
||||
<!-- Finish Donate section -->
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
EOD
|
||||
}
|
||||
|
||||
# arch-tag: 1cac856d-534c-4c81-9e9a-34e39d26f4f2
|
||||
# vim:sw=2:sm:cin
|
||||
|
127
root/etc/e-smith/web/common/cgi-bin/logout
Normal file
127
root/etc/e-smith/web/common/cgi-bin/logout
Normal file
@@ -0,0 +1,127 @@
|
||||
#!/usr/bin/perl -w
|
||||
#
|
||||
# mod_auth_tkt sample logout script
|
||||
#
|
||||
# Note that this needs script needs to be available locally on all domains
|
||||
# if using multiple domains (unlike login.cgi, which only needs to exist
|
||||
# on one domain).
|
||||
#
|
||||
|
||||
use File::Basename;
|
||||
use lib dirname($ENV{SCRIPT_FILENAME});
|
||||
use Apache::AuthTkt 0.03;
|
||||
use CGI qw(:standard);
|
||||
use URI::Escape;
|
||||
use URI;
|
||||
use strict;
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# Configure this section to taste
|
||||
|
||||
# CSS stylesheet to use (optional)
|
||||
my $STYLESHEET = '/server-common/css/tkt.css';
|
||||
# Page title (optional)
|
||||
my $TITLE = '';
|
||||
# Boolean flag, whether to fallback to HTTP_REFERER for back link
|
||||
my $BACK_REFERER = 1;
|
||||
# Additional cookies to clear on logout e.g. PHPSESSID
|
||||
my @NUKE_COOKIES = qw();
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# Main code begins
|
||||
my $debug = 0;
|
||||
my $at = Apache::AuthTkt->new(conf => "/etc/e-smith/web/common/cgi-bin/AuthTKT.cfg");
|
||||
my $q = CGI->new;
|
||||
my ($server_name, $server_port) = split /:/, $q->http('X-Forwarded-Host') || $ENV{HTTP_HOST};
|
||||
#warn "servername is $server_name; HOST is $ENV{HTTP_HOST}\n";
|
||||
$server_name ||= $ENV{SERVER_NAME};
|
||||
$server_port = ( $server_name eq 'localhost' ) ? '80' : '443';
|
||||
my $AUTH_DOMAIN = $server_name;
|
||||
my $back = $q->cookie($at->back_cookie_name) if $at->back_cookie_name;
|
||||
$back ||= $q->param($at->back_arg_name) if $at->back_arg_name;
|
||||
$back ||= $ENV{HTTP_REFERER} if $BACK_REFERER;
|
||||
$back = "/server-manager/";
|
||||
if ($back && $back =~ m!^/!) {
|
||||
my $hostname = $server_name;
|
||||
my $port = $server_port;
|
||||
$hostname .= ':' . $port if $port && $port != 80 && $port != 443;
|
||||
$back = sprintf "http%s://%s%s", ($port == 443 ? 's' : ''), $hostname, $back;
|
||||
} elsif ($back && $back !~ m/^http/i) {
|
||||
$back = 'http://' . $back;
|
||||
}
|
||||
$back = uri_unescape($back) if $back =~ m/^https?%3A%2F%2F/;
|
||||
my $back_html = escapeHTML($back) if $back;
|
||||
|
||||
# Logout by resetting the auth cookie
|
||||
my @cookies = cookie(-name => $at->cookie_name, -value => '', -expires => '-1h',
|
||||
($AUTH_DOMAIN && $AUTH_DOMAIN =~ /\./ ? (-domain => $AUTH_DOMAIN) : ()));
|
||||
push @cookies, map { cookie(-name => $_, -value => '', -expires => '-1h') } @NUKE_COOKIES;
|
||||
|
||||
my $redirected = 0;
|
||||
if ($back) {
|
||||
my $b = URI->new($back);
|
||||
# If $back domain doesn't match $AUTH_DOMAIN, add ticket reset to back
|
||||
if ($b->host !~ m/\b$AUTH_DOMAIN$/i) {
|
||||
$back .= $b->query ? '&' : '?';
|
||||
$back .= $at->cookie_name . '=';
|
||||
}
|
||||
|
||||
if ($debug) {
|
||||
print $q->header(-cookie => \@cookies);
|
||||
}
|
||||
|
||||
else {
|
||||
# Set (local) cookie, and redirect to $back
|
||||
print $q->header(
|
||||
-cookie => \@cookies,
|
||||
# -location => $back,
|
||||
);
|
||||
# For some reason, a Location: redirect doesn't seem to then see the cookie,
|
||||
# but a meta refresh one does - weird
|
||||
print $q->start_html(
|
||||
-head => meta({
|
||||
-http_equiv => 'refresh', -content => "0;URL=$back"
|
||||
}));
|
||||
$redirected = 1;
|
||||
}
|
||||
}
|
||||
|
||||
# If no $back, just set the auth cookie and hope for the best
|
||||
else {
|
||||
print $q->header(-cookie => \@cookies);
|
||||
}
|
||||
|
||||
my @style = $STYLESHEET ? ('-style' => { src => $STYLESHEET }) : ();
|
||||
$TITLE ||= 'Logout Page';
|
||||
unless ($redirected) {
|
||||
# If here, either some kind of error or no back ref found
|
||||
print $q->start_html(
|
||||
-title => $TITLE,
|
||||
@style,
|
||||
);
|
||||
print <<EOD;
|
||||
<div align="center">
|
||||
<h1>$TITLE</h1>
|
||||
EOD
|
||||
if ($debug) {
|
||||
print <<EOD;
|
||||
<pre>
|
||||
back: $back
|
||||
back_html: $back_html
|
||||
</pre>
|
||||
EOD
|
||||
}
|
||||
print <<EOD;
|
||||
<p>You are now logged out.</p>
|
||||
EOD
|
||||
print qq(<p><a href="$back_html">Return to server manager login</a></p>\n) if $back_html;
|
||||
print <<EOD;
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
EOD
|
||||
}
|
||||
|
||||
# arch-tag: 09c96fc6-5119-4c79-8086-6c6b24951f96
|
||||
# vim:sw=2:sm:cin
|
||||
|
53
root/etc/e-smith/web/common/configuration_report.tmpl
Normal file
53
root/etc/e-smith/web/common/configuration_report.tmpl
Normal file
@@ -0,0 +1,53 @@
|
||||
Configuration report created {$report_creation_time}
|
||||
|
||||
==================
|
||||
Base configuration
|
||||
==================
|
||||
|
||||
SME server version: {$releaseversion}
|
||||
SME server mode: {$systemmode}
|
||||
SME server previous mode: {$previoussystemmode }
|
||||
Running Kernel: {$curkernel}
|
||||
|
||||
|
||||
===========================
|
||||
New RPMs not in base system
|
||||
===========================
|
||||
|
||||
{ foreach $i (@newrpms) {
|
||||
$OUT .= "$i";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
===========================
|
||||
Custom and modified templates
|
||||
===========================
|
||||
{ foreach $i (@templates) {
|
||||
$OUT .= "$i";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
===========================
|
||||
Modified events
|
||||
===========================
|
||||
{ foreach $i (@events) {
|
||||
$OUT .= "$i";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
=======================
|
||||
Additional repositories
|
||||
=======================
|
||||
|
||||
{ foreach $r (@repositories) {
|
||||
$OUT .= "$r";
|
||||
}
|
||||
}
|
||||
|
||||
DONE!
|
32
root/etc/e-smith/web/common/css/tkt.css
Normal file
32
root/etc/e-smith/web/common/css/tkt.css
Normal file
@@ -0,0 +1,32 @@
|
||||
/* mod_auth_tkt example css */
|
||||
|
||||
BODY {background-image: url(../smeserver_logo.jpg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 600px 40px;
|
||||
background-position: top;
|
||||
|
||||
font-family: arial, helvetica, sans-serif;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
P, TH, TD {
|
||||
font-family: arial, helvetica, sans-serif;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
H1, H2, H3, H4, H5, H6 { color: #006; }
|
||||
H1 { font-size: x-large; }
|
||||
H2 { font-size: large; }
|
||||
H3 { font-size: medium; }
|
||||
|
||||
.warning { color: #c00; font-size: medium; font-weight: bold; }
|
||||
|
||||
TABLE {
|
||||
background-color: #eee;
|
||||
color: #666;
|
||||
border: 1px solid #ccc;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
|
||||
/* arch-tag: ac35e093-c2c0-4994-bc18-2d25715b1192 */
|
BIN
root/etc/e-smith/web/common/sl_icon.gif
Normal file
BIN
root/etc/e-smith/web/common/sl_icon.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 942 B |
BIN
root/etc/e-smith/web/common/spacer.gif
Normal file
BIN
root/etc/e-smith/web/common/spacer.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 43 B |
BIN
root/etc/e-smith/web/common/warn.gif
Normal file
BIN
root/etc/e-smith/web/common/warn.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 77 B |
59
root/etc/e-smith/web/functions/bugreport
Normal file
59
root/etc/e-smith/web/functions/bugreport
Normal file
@@ -0,0 +1,59 @@
|
||||
#!/usr/bin/perl -wT
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# heading : Miscellaneous
|
||||
# description : Report a bug
|
||||
# navigation : 7000 7300
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use esmith::TestUtils;
|
||||
use esmith::FormMagick::Panel::bugreport;
|
||||
|
||||
my $f = esmith::FormMagick::Panel::bugreport->new();
|
||||
$f->display() if $f;
|
||||
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
bugreport -- report a bug
|
||||
|
||||
=head2 DESCRIPTION
|
||||
|
||||
This screen helps the administrator to submit helpful bug reports
|
||||
|
||||
=begin testing
|
||||
|
||||
=end testing
|
||||
|
||||
=cut
|
||||
|
||||
__DATA__
|
||||
<form
|
||||
title="FORM_TITLE"
|
||||
header="/etc/e-smith/web/common/head.tmpl"
|
||||
footer="/etc/e-smith/web/common/foot.tmpl">
|
||||
|
||||
<page name="First" pre-event="print_status_message()"
|
||||
post-event="create_configuration_report">
|
||||
|
||||
<subroutine src="display_page()"/>
|
||||
|
||||
<subroutine src="print_button('CREATE_REPORT')" />
|
||||
|
||||
<subroutine src="display_donation()"/>
|
||||
</page>
|
||||
|
||||
<page name="ConfigReportPage" >
|
||||
<subroutine src="show_config_report()" />
|
||||
|
||||
</page>
|
||||
</form>
|
36
root/etc/e-smith/web/functions/index.cgi
Normal file
36
root/etc/e-smith/web/functions/index.cgi
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/perl -wT
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# copyright (C) 1999-2006 Mitel Networks Corporation
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use esmith::FormMagick;
|
||||
|
||||
my $fm = new esmith::FormMagick;
|
||||
$fm->display();
|
||||
|
||||
exit 0;
|
||||
|
||||
__DATA__
|
||||
<form title="FORM_TITLE" header="/etc/e-smith/web/common/noframes_head.tmpl" footer="/etc/e-smith/web/common/noframes_foot.tmpl">
|
||||
<page name="First">
|
||||
<description>NOFRAMES_BODY</description>
|
||||
</page>
|
||||
|
||||
</form>
|
36
root/etc/e-smith/web/functions/initial.cgi
Normal file
36
root/etc/e-smith/web/functions/initial.cgi
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/perl -wT
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# copyright (C) 1999-2006 Mitel Networks Corporation
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
#----------------------------------------------------------------------
|
||||
use strict;
|
||||
use esmith::FormMagick;
|
||||
|
||||
my $fm = new esmith::FormMagick;
|
||||
|
||||
$fm->display();
|
||||
|
||||
exit 0;
|
||||
|
||||
__DATA__
|
||||
<form title="FORM_TITLE" header="/etc/e-smith/web/common/head.tmpl" footer="/etc/e-smith/web/common/foot.tmpl">
|
||||
<page name="First">
|
||||
<description>FRAMES_BODY</description>
|
||||
</page>
|
||||
|
||||
</form>
|
340
root/etc/e-smith/web/functions/navigation
Executable file
340
root/etc/e-smith/web/functions/navigation
Executable file
@@ -0,0 +1,340 @@
|
||||
#!/usr/bin/perl -wT
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# e-smith manager functions: navigation
|
||||
#
|
||||
# copyright (C) 2002 Mitel Networks Corporation
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Technical support for this program is available from Mitel Networks
|
||||
# Please visit our web site www.e-smith.com for details.
|
||||
#----------------------------------------------------------------------
|
||||
package esmith;
|
||||
|
||||
use strict;
|
||||
use CGI ':no_xhtml', ':all';
|
||||
use CGI::Carp qw(fatalsToBrowser);
|
||||
|
||||
use esmith::cgi;
|
||||
use esmith::config;
|
||||
use esmith::NavigationDB;
|
||||
use esmith::util;
|
||||
use esmith::I18N;
|
||||
|
||||
sub determineGroup;
|
||||
sub showNavigation ($);
|
||||
|
||||
BEGIN
|
||||
{
|
||||
# Clear PATH and related environment variables so that calls to
|
||||
# external programs do not cause results to be tainted. See
|
||||
# "perlsec" manual page for details.
|
||||
|
||||
$ENV {'PATH'} = '';
|
||||
$ENV {'SHELL'} = '/bin/bash';
|
||||
delete $ENV {'ENV'};
|
||||
}
|
||||
|
||||
esmith::util::setRealToEffective ();
|
||||
|
||||
$CGI::POST_MAX=1024 * 100; # max 100K posts
|
||||
$CGI::DISABLE_UPLOADS = 1; # no uploads
|
||||
|
||||
# Use the one script for navigation and noframes
|
||||
my $NO_FRAMES = ($0 =~ /noframes/);
|
||||
|
||||
my %conf;
|
||||
tie %conf, 'esmith::config';
|
||||
|
||||
my $q = new CGI;
|
||||
|
||||
showNavigation ($q);
|
||||
exit (0);
|
||||
|
||||
|
||||
#------------------------------------------------------
|
||||
# subroutine to determine which group a user belongs to
|
||||
#------------------------------------------------------
|
||||
|
||||
sub determineGroup
|
||||
{
|
||||
my ($user) = shift;
|
||||
|
||||
# Group file for authentication
|
||||
my $group_file = '/etc/group';
|
||||
open ( GF, $group_file )
|
||||
or die "Cannot open group file: $group_file: $!\n";
|
||||
|
||||
# list of groups this user belongs to
|
||||
my @groupList;
|
||||
while (<GF>)
|
||||
{
|
||||
if (/[:,]$user\b/)
|
||||
{
|
||||
my ($groupName, undef) = split(/:/);
|
||||
push @groupList, $groupName;
|
||||
}
|
||||
}
|
||||
close GF;
|
||||
return @groupList;
|
||||
}
|
||||
|
||||
#------------------------------------------------------------
|
||||
# subroutine to display navigation bar
|
||||
#------------------------------------------------------------
|
||||
|
||||
sub showNavigation ($)
|
||||
{
|
||||
my $q = shift;
|
||||
|
||||
# enable utf8 binmode so new translations work
|
||||
binmode STDOUT, ":utf8";
|
||||
|
||||
# Use this variable throughout to keep track of files
|
||||
# list of just the files
|
||||
my $c = "1";
|
||||
my @files = ();
|
||||
my %files_hash = ();
|
||||
my @panel_group = $ENV{'REMOTE_USER'} eq "admin" ?
|
||||
("admin") : determineGroup($ENV{'REMOTE_USER'});
|
||||
|
||||
#-----------------------------------------------------
|
||||
# Determine the directory where the functions are kept
|
||||
#-----------------------------------------------------
|
||||
|
||||
my $navigation_ignore =
|
||||
"(\.\.?|navigation|noframes|online-manual|(internal|pleasewait)(-.*)?)";
|
||||
|
||||
my $cgidir = 'nowhere';
|
||||
if ($panel_group[0] eq 'admin')
|
||||
{
|
||||
$cgidir = '/etc/e-smith/web/panels/manager/cgi-bin/';
|
||||
|
||||
if (opendir (DIR, $cgidir))
|
||||
{
|
||||
@files = grep (!/^${navigation_ignore}$/,
|
||||
readdir (DIR));
|
||||
closedir (DIR);
|
||||
}
|
||||
else
|
||||
{
|
||||
warn "Can't open directory $cgidir\n";
|
||||
}
|
||||
|
||||
foreach my $file (@files)
|
||||
{
|
||||
next if (-d "$cgidir/$file");
|
||||
$files_hash{$file} = $cgidir;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach my $panel (@panel_group)
|
||||
{
|
||||
$cgidir = "/etc/e-smith/web/panels/manager/$panel/cgi-bin";
|
||||
|
||||
if (opendir (DIR, $cgidir))
|
||||
{
|
||||
@files = grep (!/^${navigation_ignore}$/,
|
||||
readdir (DIR));
|
||||
closedir (DIR);
|
||||
foreach my $file (@files)
|
||||
{
|
||||
next if (-d "$cgidir/$file");
|
||||
$files_hash{$file} = $cgidir;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
warn "Can't open directory $cgidir\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#--------------------------------------------------
|
||||
# For each script, extract the description and category
|
||||
# information. Build up an associative array mapping headings
|
||||
# to heading structures. Each heading structure contains the
|
||||
# total weight for the heading, the number of times the heading
|
||||
# has been encountered, and another associative array mapping
|
||||
# descriptions to description structures. Each description
|
||||
# structure contains the filename of the particular cgi script
|
||||
# and a weight.
|
||||
#--------------------------------------------------
|
||||
my %nav = ();
|
||||
|
||||
use constant NAVIGATIONDIR => '/home/e-smith/db/navigation';
|
||||
use constant WEBFUNCTIONS => '/etc/e-smith/web/functions';
|
||||
|
||||
my $i18n = new esmith::I18N;
|
||||
|
||||
my $language = $i18n->preferredLanguage( $ENV{HTTP_ACCEPT_LANGUAGE} );
|
||||
|
||||
my $navinfo = NAVIGATIONDIR . "/navigation.$language";
|
||||
|
||||
my $navdb = esmith::NavigationDB->open_ro( $navinfo ) or
|
||||
die "Couldn't open $navinfo\n";
|
||||
|
||||
# Check the navdb for anything with a UrlPath, which means that it doesn't
|
||||
# have a cgi file to be picked up by the above code. Ideally, only pages
|
||||
# that exist should be in the db, but that's not the case. Anything
|
||||
# without a cgi file will have to remove themselves on uninstall from the
|
||||
# navigation dbs.
|
||||
foreach my $rec ($navdb->get_all)
|
||||
{
|
||||
if ($rec->prop('UrlPath'))
|
||||
{
|
||||
$files_hash{$rec->{key}} = $cgidir;
|
||||
}
|
||||
}
|
||||
|
||||
foreach my $file (keys %files_hash)
|
||||
{
|
||||
my $heading = 'Unknown';
|
||||
my $description = $file;
|
||||
my $headingWeight = 99999;
|
||||
my $descriptionWeight = 99999;
|
||||
my $urlpath = '';
|
||||
|
||||
my $rec = $navdb->get($file);
|
||||
|
||||
if (defined $rec)
|
||||
{
|
||||
$heading = $rec->prop('Heading');
|
||||
$description = $rec->prop('Description');
|
||||
$headingWeight = $rec->prop('HeadingWeight');
|
||||
$descriptionWeight = $rec->prop('DescriptionWeight');
|
||||
$urlpath = $rec->prop('UrlPath') || '';
|
||||
}
|
||||
|
||||
#--------------------------------------------------
|
||||
# add heading, description and weight information to data structure
|
||||
#--------------------------------------------------
|
||||
|
||||
unless (exists $nav {$heading})
|
||||
{
|
||||
$nav {$heading} = { COUNT => 0, WEIGHT => 0, DESCRIPTIONS => [] };
|
||||
}
|
||||
|
||||
$nav {$heading} {'COUNT'} ++;
|
||||
$nav {$heading} {'WEIGHT'} += $headingWeight;
|
||||
|
||||
# Check for manager panel, and assign the appropriate
|
||||
# cgi-bin prefix for the links.
|
||||
# Grab the last 2 directories by splitting for '/'s and
|
||||
# then concatenating the last 2
|
||||
# probably a better way, but I don't know it.
|
||||
my @filename = split /\//, $files_hash{$file};
|
||||
my $path = ($cgidir eq '/etc/e-smith/web/panels/manager/cgi-bin/') ?
|
||||
"/$filename[scalar @filename - 1]" :
|
||||
"/$filename[scalar @filename - 2]/$filename[scalar @filename - 1]";
|
||||
|
||||
push @{ $nav {$heading} {'DESCRIPTIONS'} },
|
||||
{ DESCRIPTION => $description,
|
||||
WEIGHT => $descriptionWeight,
|
||||
FILENAME => $urlpath ? $urlpath : "$path/$file",
|
||||
CGIPATH => $path
|
||||
};
|
||||
}
|
||||
|
||||
#--------------------------------------------------
|
||||
# generate list of headings sorted by average weight
|
||||
#--------------------------------------------------
|
||||
if ( $NO_FRAMES )
|
||||
{
|
||||
esmith::cgi::genNoframesHeader ($q);
|
||||
}
|
||||
else
|
||||
{
|
||||
esmith::cgi::genNavigationHeader ($q, undef);
|
||||
print "\n<TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">\n";
|
||||
}
|
||||
|
||||
print '<script language="JavaScript" type="text/javascript">
|
||||
<!-- Hide script
|
||||
//This swap the class of the selected item.
|
||||
function swapClass() {
|
||||
var i,x,tB,j=0,tA=new Array(),arg=swapClass.arguments;
|
||||
if(document.getElementsByTagName){for(i=4;i<arg.length;i++){tB=document.getElementsByTagName(arg[i]);
|
||||
for(x=0;x<tB.length;x++){tA[j]=tB[x];j++;}}for(i=0;i<tA.length;i++){
|
||||
if(tA[i].className){if(tA[i].id==arg[1]){if(arg[0]==1){
|
||||
tA[i].className=(tA[i].className==arg[3])?arg[2]:arg[3];}else{tA[i].className=arg[2];}
|
||||
}else if(arg[0]==1 && arg[1]==\'none\'){if(tA[i].className==arg[2] || tA[i].className==arg[3]){
|
||||
tA[i].className=(tA[i].className==arg[3])?arg[2]:arg[3];}
|
||||
}else if(tA[i].className==arg[2]){tA[i].className=arg[3];}}}}}
|
||||
';
|
||||
print "
|
||||
//This swap the class of the selected item.
|
||||
function swapClasses() {
|
||||
var arg=swapClasses.arguments;
|
||||
swapClass(0,'none','item-current','item','a');
|
||||
swapClass(0,'none','warn-current','warn','a');
|
||||
swapClass(0,arg[0],'item-current','item','a');
|
||||
}
|
||||
|
||||
// End script hiding -->
|
||||
</script>
|
||||
";
|
||||
|
||||
foreach my $h (sort {
|
||||
($nav{$a}{'WEIGHT'}/$nav{$a}{'COUNT'}) <=>
|
||||
($nav{$b}{'WEIGHT'}/$nav{$b}{'COUNT'}) } keys %nav)
|
||||
{
|
||||
if ( $NO_FRAMES )
|
||||
{
|
||||
print $q->h2 ($h);
|
||||
}
|
||||
else
|
||||
{
|
||||
print "\n", $q->Tr ($q->td({class => "section"},$q->span({class => "section"}, $h)));
|
||||
}
|
||||
|
||||
#--------------------------------------------------
|
||||
# generate list of descriptions sorted by weight
|
||||
#--------------------------------------------------
|
||||
print "<ul>\n" if ( $NO_FRAMES );
|
||||
|
||||
foreach (sort { $a->{'WEIGHT'} <=> $b->{'WEIGHT'} } @{$nav {$h}{'DESCRIPTIONS'}})
|
||||
{
|
||||
my $href = "/server-manager" . $_->{'FILENAME'};
|
||||
if ( $NO_FRAMES )
|
||||
{
|
||||
print $q->li ($q->a ({href => "$href?noframes=1"}, $_->{'DESCRIPTION'}));
|
||||
}
|
||||
else
|
||||
{
|
||||
print "\n",$q->Tr(
|
||||
$q->td ({-class => "menu-cell"},
|
||||
$q->a ({-id => "sme$c",
|
||||
-class => "item",
|
||||
-onClick => "swapClasses('sme$c')",
|
||||
href => $href,
|
||||
target => 'main'},
|
||||
$_->{'DESCRIPTION'})
|
||||
));
|
||||
}
|
||||
$c++;
|
||||
|
||||
}
|
||||
print "</ul>\n" if ($NO_FRAMES);
|
||||
}
|
||||
|
||||
unless ( $NO_FRAMES )
|
||||
{
|
||||
print "\n</TABLE>\n";
|
||||
esmith::cgi::genNavigationFooter ($q);
|
||||
}
|
||||
}
|
1
root/etc/e-smith/web/functions/noframes
Symbolic link
1
root/etc/e-smith/web/functions/noframes
Symbolic link
@@ -0,0 +1 @@
|
||||
navigation
|
25
root/usr/lib/systemd/system/httpd-admin.service
Normal file
25
root/usr/lib/systemd/system/httpd-admin.service
Normal file
@@ -0,0 +1,25 @@
|
||||
[Unit]
|
||||
Description=httpd-admin The Koozali SME Server Server-Manager web service
|
||||
After=network.target remote-fs.target
|
||||
Documentation=man:httpd(8)
|
||||
Documentation=man:apachectl(8)
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
EnvironmentFile=/etc/sysconfig/httpd
|
||||
ExecStartPre=/sbin/e-smith/service-status httpd-admin
|
||||
ExecStartPre=/sbin/e-smith/expand-template /etc/httpd/admin-conf/httpd.conf
|
||||
ExecStart=/usr/sbin/httpd -f /etc/httpd/admin-conf/httpd.conf -DFOREGROUND
|
||||
ExecReload=/usr/sbin/httpd -f /etc/httpd/admin-conf/httpd.conf -k graceful
|
||||
ExecStop=/bin/kill -WINCH ${MAINPID}
|
||||
# We want systemd to give httpd some time to finish gracefully, but still want
|
||||
# it to kill httpd after TimeoutStopSec if something went wrong during the
|
||||
# graceful stop. Normally, Systemd sends SIGTERM signal right after the
|
||||
# ExecStop, which would kill httpd. We are sending useless SIGCONT here to give
|
||||
# httpd time to finish.
|
||||
KillSignal=SIGCONT
|
||||
PrivateTmp=true
|
||||
|
||||
[Install]
|
||||
WantedBy=sme-server.target
|
||||
|
@@ -0,0 +1,173 @@
|
||||
#!/usr/bin/perl -w
|
||||
package esmith::FormMagick::Panel::bugreport;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use esmith::ConfigDB;
|
||||
use esmith::FormMagick;
|
||||
use Text::Template;
|
||||
use File::Basename;
|
||||
|
||||
our @ISA = qw(esmith::FormMagick Exporter);
|
||||
|
||||
our @EXPORT = qw();
|
||||
|
||||
our $VERSION = sprintf '%d.%03d', q$Revision: 1.6 $ =~ /: (\d+).(\d+)/;
|
||||
|
||||
our $db = esmith::ConfigDB->open or die "Couldn't open ConfigDB\n";
|
||||
|
||||
# Get some basic info on the current SME install
|
||||
our $sysconfig = $db->get('sysconfig');
|
||||
our $systemmode = $db->get_value('SystemMode');
|
||||
our $previoussystemmode = $sysconfig->prop('PreviousSystemMode');
|
||||
our $releaseversion = $sysconfig->prop('ReleaseVersion');
|
||||
|
||||
# Prepare some filehandles for templates and reports
|
||||
our $templatefile = '/tmp/bugreport_template.txt';
|
||||
our $configreportfile = '/tmp/configreport.txt';
|
||||
|
||||
sub new {
|
||||
shift;
|
||||
my $self = esmith::FormMagick->new();
|
||||
$self->{calling_package} = (caller)[0];
|
||||
if (defined($self->cgi->param('action')) && $self->cgi->param('action') eq 'download_config_report') {
|
||||
download_config_report();
|
||||
return 0;
|
||||
}
|
||||
bless $self;
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub create_template
|
||||
{
|
||||
# TBD
|
||||
}
|
||||
|
||||
sub display_page
|
||||
{
|
||||
my $self = shift;
|
||||
print "<tr><td colspan=\"2\"><p><p><b>". $self->localise('DO_NOT_PANIC') ."</b></p>\n";
|
||||
print "\t<p>". $self->localise('SME_EXPERIENCE') ."</p>\n";
|
||||
print "\t<p>". $self->localise('USE_TEMPLATE') .": <a href=\"https://wiki.koozali.org/Bugzilla_Help#Reporting_Bugs\" target=\"_blank\">https://wiki.koozali.org/Bugzilla_Help#Reporting_Bugs</a>. </p>\n";
|
||||
print "\t<p>". $self->localise('PLEASE_REPORT_HERE') .": <a href=\"https://bugs.koozali.org\" target=\"_blank\">https://bugs.koozali.org</a>.</p>";
|
||||
print "</p></td>";
|
||||
print "</tr>\n ";
|
||||
print "<tr><td colspan=\"2\"><p><p>". $self->localise('FOLLOWING_REPORT_MIGHT_HELP') ."</p>\n";
|
||||
print "\t<p>". $self->localise('REPORT_CONTENT') .":</p>\n";
|
||||
print "\t<ul>\n";
|
||||
print "\t\t<li>". $self->localise('SME_VERSION') ."</li>\n";
|
||||
print "\t\t<li>". $self->localise('SERVER_MODE') ."</li>\n";
|
||||
print "\t\t<li>". $self->localise('PREVIOUS_SERVER_MODE') ."</li>\n";
|
||||
print "\t\t<li>". $self->localise('KERNEL_AND_ARCH') ."</li>\n";
|
||||
print "\t\t<li>". $self->localise('INSTALLED_RPMS') ."</li>\n";
|
||||
print "\t\t<li>". $self->localise('ALTERED_TEMPLATES') ."</li>\n";
|
||||
print "\t\t<li>". $self->localise('ALTERED_EVENTS') ."</li>\n";
|
||||
print "\t\t<li>". $self->localise('YUM_REPOS') ."</li>\n";
|
||||
print "</ul>\n";
|
||||
print "\t<p>". $self->localise('PRIVACY') ."</p>\n";
|
||||
print "</p></td>";
|
||||
print "</tr>\n";
|
||||
return '';
|
||||
}
|
||||
|
||||
sub display_donation
|
||||
{
|
||||
my $self = shift;
|
||||
print "<tr><td colspan=\"2\"><p><p><b>". $self->localise('DONATING') ."</b></p>\n";
|
||||
print "\t<p>". $self->localise('AWARE_SME') ."</p>\n";
|
||||
print "\t<p><b>". $self->localise('YOUR_HELP') ."</b></p>\n";
|
||||
print "\t<p>". $self->localise('CONSIDER_DONATING') ."</p>\n";
|
||||
print '<p>
|
||||
<a href="https://wiki.koozali.org/Donate" target="_blank">
|
||||
<img src="/server-common/btn_donateCC_LG.gif" alt="https://wiki.koozali.org/Donate"
|
||||
align="middle"></a>
|
||||
</p>';
|
||||
|
||||
print "\t<p>". $self->localise('THANK_YOU') ."</p>\n";
|
||||
print "</p></td>";
|
||||
print "</tr>\n ";
|
||||
return '';
|
||||
|
||||
}
|
||||
|
||||
|
||||
sub create_configuration_report
|
||||
{
|
||||
my $fm = shift;
|
||||
my $q = $fm->{'cgi'};
|
||||
|
||||
# TBD: possibly check $q for a boolean value eg. from a checkbox
|
||||
# indicating the user has read privacy warning etc.
|
||||
|
||||
# create the reporting template
|
||||
my $configreport_template = Text::Template->new(TYPE => 'FILE', SOURCE => '/etc/e-smith/web/common/configuration_report.tmpl', UNTAINT => 1);
|
||||
my $report_creation_time = $fm->gen_locale_date_string;
|
||||
|
||||
# curent kernel
|
||||
my $curkernel = `uname -r`;
|
||||
|
||||
# get additional RPMs
|
||||
my @newrpms = `/sbin/e-smith/audittools/newrpms`;
|
||||
|
||||
# get additional Repositories
|
||||
my @repositories = `/sbin/e-smith/audittools/repositories`;
|
||||
#print @repositories;
|
||||
|
||||
# get templates
|
||||
my @templates = `/sbin/e-smith/audittools/templates`;
|
||||
|
||||
# get events
|
||||
my @events = `/sbin/e-smith/audittools/events`;
|
||||
|
||||
|
||||
# set template variables
|
||||
my %vars = (report_creation_time => \$report_creation_time,
|
||||
releaseversion => \$releaseversion,
|
||||
curkernel => \$curkernel,
|
||||
systemmode => \$systemmode,
|
||||
previoussystemmode => \$previoussystemmode,
|
||||
newrpms => \@newrpms,
|
||||
templates => \@templates,
|
||||
events => \@events,
|
||||
repositories => \@repositories,
|
||||
);
|
||||
|
||||
# prcess template
|
||||
my $result = $configreport_template->fill_in(HASH => \%vars);
|
||||
|
||||
# write processed template to file
|
||||
open (my $cfgrep, '>', $configreportfile) or die "Could not create temporary file for config report!";
|
||||
print $cfgrep $result;
|
||||
close $cfgrep;
|
||||
}
|
||||
|
||||
sub show_config_report {
|
||||
my $fm = shift;
|
||||
my $q = $fm->{'cgi'};
|
||||
print "<PRE>";
|
||||
open (my $cfgrep, '<', $configreportfile) or die "Could not find temporary config report file!";
|
||||
print while <$cfgrep>;
|
||||
close $cfgrep;
|
||||
print "</PRE>";
|
||||
# that would be too easy!?
|
||||
print "<a href=\"bugreport?action=download_config_report\">".$fm->localise('Download this report')."</a>";
|
||||
return "";
|
||||
|
||||
|
||||
}
|
||||
|
||||
sub download_config_report {
|
||||
my $fm = shift;
|
||||
my $q = $fm->{'cgi'};
|
||||
open (DLFILE, "<$configreportfile") or die "Could not access temporary file for config report!";
|
||||
my @fileholder = <DLFILE>;
|
||||
close (DLFILE) || Error ('close', 'file');
|
||||
print "Content-Type:text/plain\n";#application/x-downloadn";
|
||||
print "Content-Disposition:attachment;filename=" . basename($configreportfile);
|
||||
print "\n\n";
|
||||
print @fileholder ;
|
||||
return "";
|
||||
|
||||
}
|
||||
|
||||
1;
|
0
root/var/.gitignore
vendored
Normal file
0
root/var/.gitignore
vendored
Normal file
Reference in New Issue
Block a user