Subversion Repositories slis

Compare Revisions

Ignore whitespace Rev 5516 → Rev 5517

/slim/sources/tags/slis-slim/2.0.5~rc5/welcome.php
New file
0,0 → 1,61
<?PHP
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management welcome page
 
include_once("general.php");
include_once("utils.php");
include_once("updates/checkVersion.php");
 
// Update admin e-mail
$adm = $User->select_by_key("admin");
$adm->email=$mail_admin;
$adm->modify();
$stringName = $slim_user->firstname." ".$slim_user->name;
if (!$stringName){
$stringName = $slim_user->login;
}
$title = sprintf(__("Bienvenue %s sur %s"), $stringName, $slim_name." v". $current_SLIM_Version);
 
print html_header($title);
 
print "<center>\n";
print html_img("slimlogo.gif", $slim_name);
print "<h1>$title</h1>\n";
 
$dayleft=round(($slim_user->getExpireDate_Timestamp()-time()) / (3600*24));
 
if ( $slim_user->login!="admin") {
print sprintf(__("Mot de passe expire le: %s (dans %s jours)"), date("Y-m-j h:i:s T",$slim_user->getExpireDate_Timestamp()),$dayleft );
if ($dayleft< 10) {
print html_link("scripts/account/password.php","<h1><blink>".__("Attention votre mot de passe va bientot expirer! Cliquez ici pour le changer.")."</blink></h1>");
}
}
 
 
 
print "<p>";
print "<table cellspacing=10><tr align=center>\n";
print "<td>".html_img("php.gif", php_version())."</td>\n";
print "<td>".html_img("tux.gif", linux_version())."</td>\n";
print "<td>".html_img("postgres.gif",postgres_version())."</td>\n";
print "</tr></table>\n";
print "</center>\n";
 
print html_footer();
 
?>
Property changes:
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/dashboard.php
New file
0,0 → 1,146
<?
 
include_once("include/general.php");
include_once("include/Form.php");
include_once("include/FormField.php");
include_once("include/Button.php");
include_once("include/Slis.php");
include_once("include/Table.php");
include_once("include/Field.php");
include_once("include/OptionField.php");
include_once("include/ColField.php");
include_once("include/HiddenField.php");
include_once("include/LinkField.php");
include_once("include/UpdaterField.php");
include_once("include/Status.php");
 
$versions=array(
"1.%" => "1.%",
"2.0" => "2.0",
"2.1" => "2.1",
"3.0" => "3.0",
);
$title="SLIM DASHBOARD";
 
print html_header($title);
 
print "<CENTER><H2>SLIM DASHBOARD</H2></CENTER><P>";
$cell_beginning_code="<td".$slim_theme->td_code(0)."> <font".$slim_theme->font_code().">";
$title_cell_beginning_code="<td".$slim_theme->th_code(0)."> <font".$slim_theme->font_code().">";
 
$statuses =& $Status->select("","name");
if (count($statuses) != 0) {
print "<table".$slim_theme->table_code().">\n";
print "<TR>";
print "$title_cell_beginning_code<B>Status</B></font></TD>";
foreach ($versions as $version) {
print "$title_cell_beginning_code<B>v$version</B></font></TD>";
}
print "$title_cell_beginning_code<B>Total</B></font></TD>";
print "</TR>\n";
foreach ($statuses as $status) {
print "<TR>";
print "$cell_beginning_code". $status->name ."</font></TD>";
foreach ($versions as $version) {
$sliss =& $Slis->select("status_id=$status->id and version like '$version'", "");
print "$cell_beginning_code". count($sliss) ."</font></TD>\n";
}
$sliss =& $Slis->select("status_id=$status->id", "");
print "<td".$slim_theme->td_code(1)."><font".$slim_theme->font_code()."><B>";
print "<A HREF=dashboard.php?select_request=". urlencode("status_id=$status->id") .">";
print count($sliss) ."</A></B></font></TD>\n";
print "</TR>\n";
}
print "</TABLE>\n";
}
 
print "<P>\n";
 
$pops =& $Pop->select("","name");
if (count($pops) != 0) {
print "<table".$slim_theme->table_code().">\n";
print "<TR>";
print "$title_cell_beginning_code<B>Pop</B></font></TD>";
foreach ($versions as $version) {
print "$title_cell_beginning_code<B>v$version</B></font></TD>";
}
print "$title_cell_beginning_code<B>Total</B></font></TD>";
print "</TR>\n";
foreach ($pops as $pop) {
print "<TR>$cell_beginning_code". $pop->name ."</font></TD>";
foreach ($versions as $version) {
$sliss =& $Slis->select("pop_id=$pop->id and version like '$version'", "");
print "$cell_beginning_code". count($sliss) ."</font></TD>\n";
}
$sliss =& $Slis->select("pop_id=$pop->id", "");
print "<td".$slim_theme->td_code(1)."><font".$slim_theme->font_code()."><B>";
print "<A HREF=dashboard.php?select_request=". urlencode("pop_id=$pop->id") .">";
print count($sliss) ."</A></B></font></TD>\n";
print "</TR>\n";
}
print "</TABLE>\n";
}
 
print "<P>\n";
 
$types =& $Type->select("","name");
if (count($types) != 0) {
print "<table".$slim_theme->table_code().">\n";
print "<TR>";
print "$title_cell_beginning_code<B>Type</B></font></TD>";
foreach ($versions as $version) {
print "$title_cell_beginning_code<B>v$version</B></font></TD>";
}
print "$title_cell_beginning_code<B>Total</B></font></TD>";
print "</TR>\n";
foreach ($types as $type) {
print "<TR>$cell_beginning_code". $type->name ."</font></TD>";
foreach ($versions as $version) {
$sliss =& $Slis->select("type='$type->name' and version like '$version'", "");
print "$cell_beginning_code". count($sliss) ."</font></TD>\n";
}
$sliss =& $Slis->select("type='$type->name'", "");
$url="type='". $type->name ."'";
print "<td".$slim_theme->td_code(1)."><font".$slim_theme->font_code()."><B>";
print "<A HREF=dashboard.php?select_request=". urlencode($url) .">";
print count($sliss) ."</A></B></font></TD>\n";
print "</TR>\n";
}
print "</TABLE>\n";
}
 
if ($select_request) { $select_request=stripslashes(urldecode($select_request)); }
$sliss =& $Slis->select("$select_request", "name");
 
$table = new Table(1);
$table->set_title("%d Slis", count($sliss));
 
if ($nat)
{
$table->add_field(new UpdaterField("ip_wan", "IP Internet", $field));
}
if ($field && !$nat)
{
$table->add_field(new UpdaterField("name", "Nom", $field));
}
else if ($group)
{
$table->add_field(new Field("", "Nom", "", "get_group_link"));
}
else
{
$table->add_field(new LinkField("name", "Nom", "view-slis.php"));
// $table->add_field(new Field("name", "Nom", "view.php"));
}
$table->add_field(new LinkField("site_code", "Etab.", "view-etab.php"));
$table->add_field(new Field("", "Status","","get_status"));
if ($online || $ping) $table->add_field(new Field("", "Status","","get_online"));
 
print "<hr>\n";
print $table->build_code($sliss);
 
print html_footer();
 
?>
 
Property changes:
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/README
New file
0,0 → 1,0
Config is in include/config.php
Property changes:
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/FormField.php
New file
0,0 → 1,152
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Form Field class
 
class FormField
{
function FormField($name, $title, $value = "", $size = 0, $not_null = 0) // Form Field constructor
{
$this->name = $name;
$this->title = $title;
$this->value = $value;
$this->size = $size;
$this->not_null = $not_null;
}
 
function format_code(&$form) // return HTML code for formatting fields (redefined)
{
return "";
}
 
function header_code(&$form) // return HTML code for the first <td> tag of a form field
{
global $slim_theme;
 
$str = "<td align=right nowrap".$slim_theme->form_cell_code($this->not_null).">\n";
if ($this->title)
{
$str .= "<font".$slim_theme->font_code().">";
$str .= "<b>".__($this->title)." :</b>";
$str .= "</font>";
}
else $str .= "&nbsp;";
$str .= "</td>\n";
return $str;
}
 
function cell_code(&$form) // return HTML code for the second <td> tag of a form field
{
global $slim_theme;
 
$str = "<td".$slim_theme->form_cell_code($this->not_null);
if ($this->help_url)
{
$str .= ' nowrap';
}
$str .= ">\n";
$str .= "<font".$slim_theme->font_code().">";
$str .= '<input type="'.$this->field_type().'" name="'.$this->name.'"';
if ($this->value)
{
$str .= ' value="'.html_quote($this->value).'"';
}
if ($this->size)
{
$str .= " size=\"$this->size\"";
}
if ($this->readonly)
{
$str .= " readonly onfocus='blur()'";
}
 
$str .= ">";
 
if ($this->extra_code)
{
$str .= " $this->extra_code";
}
 
if ($this->help_url)
{
$str .= ' <input type="submit" value=" ... " onclick=\'help=window.open("'.$this->help_url.'","help","toolbar=no,menubar=no,scrollbars=yes,width='.$this->help_width.',height='.$this->help_height.',resizable=yes");help.opener=self;return false\'>';
}
if ($this->erase)
{
if ($this->other_field)
$str2 = 'document.forms[0].'.$this->other_field.'.value="'.$this->other_value.'";';
else
$str2 = "";
$str .= ' <input type="submit" value=" x " onclick=\'document.forms[0].'.$this->name.'.value="'.$this->erase_value.'";'.$str2.'return false\'>';
}
$str .= "</font>";
$str .= "</td>\n";
return $str;
}
 
function field_type() // return HTML type to the field (can be redefined)
{
return "text";
}
 
function set_valign($valign) // set vertical alignement for the field
{
$this->valign = $valign;
}
 
function update_object(&$object) // update an object from a field value (can be redefined)
{
$field_name = $this->name;
$object->$field_name = $GLOBALS[$field_name];
if ($field_name == "gateway_type" && $GLOBALS[$field_name] == "") {
$object->$field_name = "0";
}
if ($this->not_null && !$object->$field_name)
{
html_error("Le champ \"%s\" doit être renseigné", __($this->title));
}
}
 
function set_help($url, $readonly = 0, $width = 500, $height = 500) // set help button for the field
{
$this->help_url = $url;
$this->help_width = $width;
$this->help_height = $height;
$this->readonly = $readonly;
}
 
function set_readonly() // set field in readonly mode
{
$this->readonly = 1;
}
 
function set_extra_code($code) // add extra code after the field
{
$this->extra_code = $code;
}
 
function set_erase($value = "", $other_field = "", $other_value = "") // set help button for the field
{
$this->erase = 1;
$this->erase_value = html_quote($value);
$this->other_field = $other_field;
$this->other_value = html_quote($other_value);
}
 
}
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/Slis.php
New file
0,0 → 1,369
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for Slim sliss
 
include_once("DBClass.php");
include_once("Pop.php");
include_once("Network.php");
include_once("IPAddress.php");
include_once("Tunel.php");
include_once("HAdminUser.php");
include_once("SlisGroup.php");
include_once("Type.php");
include_once("Status.php");
 
class Slis extends DBClass
{
function get_new() // return a new instance of the class
{
return new Slis();
}
 
function db_table() // return the database table for the class
{
return "slis";
}
 
function db_fields() // return the database fields for the class
{
return array(
"name" => "string",
"status_id" => "string",
"site_code" => "string",
"type" => "string",
"pop_id" => "number",
"profile" => "string",
"version" => "string",
"version_dks" => "number",
"version_dkb" => "number",
"version_cd" => "number",
"ip_wan" => "string",
"ip_gateway" => "string",
"ip_lan" => "string",
"netmask_wan" => "string",
"netmask_lan" => "string",
"gateway_user" => "string",
"gateway_passwd" => "string",
"mail_user" => "string",
"mail_passwd" => "string",
"gateway_type" => "number",
"is_cyber_school" => "boolean",
"is_fetchmail" => "boolean",
"is_isdn" => "boolean",
"creation_date" => "date",
"install_date" => "date",
"installer" => "string",
"comment" => "string",
);
}
 
function db_key() // return the database key for the class
{
return "name";
}
 
function url_site() // return the url to the Slis site
{
if ($this->site_code) return "../Sites/view.php?code=".urlencode($this->site_code);
else return "";
}
 
function get_cddkbdks() // return the cddkbdks of the Slis
{
return "cd$this->version_cd"."dkb$this->version_dkb"."dks$this->version_dks";
}
 
function get_pop_name() // return the pop name of the Slis
{
if ($this->pop_id)
{
global $Pop;
$pop = $Pop->select_by_key($this->pop_id);
return $pop->name;
}
else return "";
}
 
function get_status() // return the status of the Slis
{
if ($this->status_id)
{
global $Status;
$status = $Status->select_by_key($this->status_id);
return $status->name;
}
else return "";
}
 
function get_pop_link() // return the link to the Slis pop
{
if ($this->pop_id)
{
global $Pop;
$pop = $Pop->select_by_key($this->pop_id);
return '<a href="../Pops/view.php?id='.$this->pop_id.'">'.$pop->name.'</a>';
}
else return "";
}
 
function get_internet_ip() // return the Internet IP of the Slis
{
return "$this->ip_wan/$this->netmask_wan";
}
 
function get_intranet_ip() // return the Intranet IP of the Slis
{
return "$this->ip_lan/$this->netmask_lan";
}
 
function get_network_link() // return the link to the Slis network
{
global $Network;
$networks =& $Network->select("slis_name='".$this->name."'");
if (count($networks) == 1)
{
$network = $networks[0];
return '<a href="../Networks/view.php?name='.urlencode($network->name).'">'.$network->name.'</a>';
}
else return "";
}
 
function get_network_name() // return the name of the Slis network
{
global $Network;
$networks =& $Network->select("slis_name='".$this->name."'");
if (count($networks) == 1)
{
$network = $networks[0];
return $network->name;
}
else return "";
}
 
function get_network() // return the Slis network object
{
global $Network;
$networks =& $Network->select("slis_name='".$this->name."'");
if (count($networks) == 1)
{
$network = $networks[0];
}
return $network ;
}
 
function get_nat_link() // return the link to the Slis nat ip
{
global $IPAddress;
$ips =& $IPAddress->select("ip_nat='".$this->ip_wan."'");
if (count($ips) == 1)
{
$ipn = $ips[0];
return '<a href="../IPAddress/view.php?ip='.urlencode($ipn->ip).'">'.$ipn->ip.'</a>';
}
else return "";
}
 
function get_nat_name() // return the name of the Slis nat ip
{
global $IPAddress;
$ips =& $IPAddress->select("ip_nat='".$this->ip_wan."'");
if (count($ips) == 1)
{
$ipn = $ips[0];
return $ipn->ip;
}
else return "";
}
 
function get_nat() // return the Slis nat ip
{
global $IPAddress;
$ips =& $IPAddress->select("ip_nat='".$this->ip_wan."'");
if (count($ips) == 1)
{
$ipn = $ips[0];
}
return $ipn;
}
 
function get_tunel() // return the Slis tunel
{
global $Tunel;
$tuns =& $Tunel->select("slis_name='".$this->name."'");
if (count($tuns) == 1)
{
$tun = $tuns[0];
}
return $tun;
}
 
function get_group_link() // return the link to add a slis to a group
{
global $group;
if ($this->name)
return '<b><a target="slim" href="'.$REQUEST_URI.'"onclick=\'window.opener.location.href="../Admin/group_view.php?id='.$group.'&add_slis='.urlencode($this->name).'";window.close();return false\'>'.$this->name.'</a></b>';
else
return "";
}
 
function get_types() // return the possible types in a hash table
{
global $Type;
$objects =& $Type->select("", "name");
if ($objects) {
foreach ( $objects as $object) {
$type=$object->name;
$types["$type"]=$type;
}
$types[""]="";
return $types;
}
else {
return array("" => "",
"std" => "std",
"nat" => "nat",
"numstd" => "numstd",
"numnat" => "numnat",
"adsl" => "adsl",
"cable" => "cable",
"numcrd" => "numcrd",
"in" => "in",
"rr" => "rr",
"dmz1" => "dmz1",
"dmz2" => "dmz2",
"dmz3" => "dmz3",
"other1" => "other1",
"other2" => "other2",
"other3" => "other3",
"other4" => "other4",
"other5" => "other5",
);
}
}
 
function get_statuss() // return the possible status in a hash table
{
global $Status;
$objects =& $Status->select("", "");
if ($objects) {
foreach ( $objects as $object) {
$status=$object->name;
$statuss["$status"]=$status;
}
}
$statuss[""]="";
return $statuss;
}
 
function get_router_conf_filenames() // return the possible routers conf filenames in a hash table
{
return array(
"conf-761.upload" => "conf-760.upload",
"conf-101l.chat" => "conf-101l.chat",
"conf-801.config" => "conf-801.config",
"conf-ap.chat" => "conf-ap.chat",
"conf-congo.chat" => "conf-congo.chat",
);
}
 
function &get_admin_users() // return the Slis admin users
{
global $HAdminUser;
$users =& $HAdminUser->select("slis_name='$this->name'", "login");
return $users;
}
function get_admin() // return the Slis admin user which login is admin if exists
{
global $HAdminUser;
$users =& $HAdminUser->select("slis_name='$this->name' and login='admin'");
if ($users) { return $users[0]; }
}
 
function &get_slis_groups() // return the Slis groups
{
global $SlisGroup;
$sgs =& $SlisGroup->select("slis_name='$this->name'");
return $sgs;
}
 
function make_datasheet($domain) // return the printable datasheet of the SLIS
{
global $Site,$Pop;
$site=$Site->select_by_key($this->site_code);
$pop=$Pop->select_by_key($this->pop_id);
$nat=$this->get_nat();
$admin=$this->get_admin();
 
$txt="\n". __("SLIS PARAMETERS") .": ". $this->name ."\n";
$txt.= "================================================================\n\n\n";
$txt.=__("SITE") ."\n";
$txt.=" ". __("Code") .": ". $this->site_code ."\n";
$txt.=" ". __("Nom") .": ". $site->name ."\n";
$txt.=" ". __("Ville") .": ". $site->city .", ". $site->zipcode ."\n";
$txt.="\nSLIS: \n";
$txt.=" ". __("Version") .": ". $this->version ."cd". $this->version_cd ."dkb". $this->version_dkb ."dks". $this->version_dks ."\n";
if ($this->is_cyber_school == "t") {
$txt.=" ". __("Option CyberEcole active") ."\n";
}
$txt.=" ". __("Pop") .": ". $pop->name ."\n";
if ($this->gateway_type == 9) { $gt="9 (Modem ADSL/Cable PPPOE)"; $adsl=1;}
else { $gt=$this->gateway_type; $adsl=0;}
$txt.=" ". __("Type routeur") .": $gt\n";
$txt.=" ". __("Network at INTERNET level") .": \n";
if ($adsl) {
$txt .=" ". __("PPPOE: No interconnection network") ."\n";
}
else {
$txt.=" ". __("Adresse IP") .": ". $this->ip_wan ."\n";
if ($nat) {
$txt.=" ". __("Adresse Nat") .": ". $nat->ip ."\n";
}
$txt.=" ". __("Masque") .": ". $this->netmask_wan ."\n";
$txt.=" ". __("IP routeur") .": ". $this->ip_gateway ."\n";
}
$txt.=" ". __("Network at INTRANET level") .": \n";
$txt.=" ". __("Adresse IP") .": ". $this->ip_lan ."\n";
$txt.=" ". __("Masque") .": ". $this->netmask_lan ."\n";
$txt.=" ". __("Domain name") .": ". $this->name .".". $domain ."\n";
$txt.="\n". __("INTERFACE D'ADMINISTRATION LOCALE") .": \n";
$txt.=" ". __("Admin url") .": \n http://". $this->name .".". $domain .":1098\n";
if ($admin) {
$txt.=" ". __("Admin user") .": \n";
$txt.=" ". __("Utilisateur") .": ". $admin->login ."\n";
$txt.=" ". __("Mot de passe") .": ". $admin->password ."\n";
}
$txt.= "\n\n\n================================================================\n";
$txt.= "http://slis.ac-grenoble.fr\n";
return $txt;
}
 
function get_online() // return the online status of the Slis
{
$name=$this->name;
exec("/usr/local/phpexec/ping -c 1 -w 1 $name",$null,$r);
if ($r) return "Offline";
else return "ONLINE";
}
 
 
}
 
$Slis = Slis::get_new();
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/DBClass.php
New file
0,0 → 1,493
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
 
class DBClass
{
function get_new() // return a new instance of the class
{
return new DBClass();
}
 
function db_table() // return the database table for the class
{
return "";
}
 
function db_fields() // return the database fields for the class
{
return array();
}
 
function db_key() // return the database key for the class
{
return "";
}
 
function quoted($value, $type) // return a value with quotes if type needs it
{
if ($type == "number")
{
return $value;
}
else if ($type == "boolean")
{
if ($value && $value != "f") return "true";
else return "false";
}
else
{
return "'$value'";
}
}
 
function select_by_key($value) // select an object in the database by its key
{
global $slim_db;
 
$fields = $this->db_fields();
$key = $this->db_key();
$query = "select ";
foreach($fields as $field => $type)
{
$query .= $sep.$field;
$sep=",";
}
$query .= ' from "'.$this->db_table();
$query .= '" where ';
$query .= $key;
$query .= " = ";
$query .= $this->quoted($value, $fields[$key]);
 
$result = pg_exec($slim_db,$query);
if (!$result)
{
html_db_error($query);
}
$numrow = pg_numrows($result);
if ($numrow != 1)
{
return 0;
}
$row = pg_fetch_row($result,0);
$i = 0;
$object = $this->get_new();
foreach($fields as $field => $type)
{
$trow=trim($row[$i++]);
$object->$field = $trow;
}
return $object;
}
 
function &select($cond = "", $order = "") // select objects in the database by a condition
{
global $slim_db;
 
$objects = array();
$fields = $this->db_fields();
$key = $this->db_key();
$query = "select ";
foreach($fields as $field => $type)
{
$query .= $sep.$field;
$sep=",";
}
$query .= ' from "'.$this->db_table().'"';
if ($cond)
{
$query .= " where $cond";
}
if ($order)
{
$query .= " order by $order";
}
$result = pg_exec($slim_db,$query);
if (!$result)
{
html_db_error($query);
}
$numrow = pg_numrows($result);
 
for($crow = 0; $crow < $numrow; $crow++)
{
$row = pg_fetch_row($result,$crow);
$i = 0;
$object = $this->get_new();
foreach($fields as $field => $type)
{
$object->$field = trim($row[$i++]);
}
array_push($objects, $object);
}
return $objects;
}
 
function &var_select($what="*",$cond = "", $order = "") // select objects in the database by a condition
{
global $slim_db;
 
$objects = array();
$key = $this->db_key();
$query = "select $what";
$query .= ' from "'.$this->db_table().'"';
if ($cond)
{
$query .= " where $cond";
}
if ($order)
{
$query .= " order by $order";
}
$result = pg_exec($slim_db,$query);
if (!$result)
{
html_db_error($query);
}
$numrow = pg_numrows($result);
 
for($crow = 0; $crow < $numrow; $crow++)
{
$row = pg_fetch_row($result,$crow);
$i = 0;
$object = $this->get_new();
$object->variable = $row[0];
array_push($objects, $object);
}
return $objects;
}
 
function change_field($field, $value) // change the value of a field and save it in the database
{
global $slim_db;
 
$fields = $this->db_fields();
$key = $this->db_key();
 
$query = 'update "';
$query .= $this->db_table();
$query .= '" set '.$field." = ";
$query .= $this->quoted($value, $fields[$field]);
$query .= " where ";
$query .= $key;
$query .= " = ";
$query .= $this->quoted($this->$key, $fields[$key]);
 
$result = pg_exec($slim_db,$query);
if (!$result)
{
html_db_error($query);
}
 
$this->$field = $value;
}
function modify() // save a modified object in the database
{
global $slim_db;
 
$fields = $this->db_fields();
$key = $this->db_key();
 
$query = 'update "';
$query .= $this->db_table();
$query .= '" set ';
foreach ($fields as $field => $type)
{
if (isset($this->$field))
{
if ($type == "number" && !is_numeric($this->$field)) continue;
if ($type == "date" && !$this->$field) continue;
$query .= $sep.$field." =";
$query .= $this->quoted($this->$field, $type);
$sep=',';
}
}
$query .= " where ";
$query .= $key;
$query .= " = ";
$query .= $this->quoted($this->$key, $fields[$key]);
 
$result = pg_exec($slim_db,$query);
if (!$result)
{
html_db_error($query);
}
}
 
function add() // add an object in the database
{
global $slim_db;
 
$fields = $this->db_fields();
$key = $this->db_key();
 
foreach ($fields as $field => $type)
{
if (isset($this->$field))
{
if ($type == "number" && !is_numeric($this->$field)) continue;
if ($type == "date" && !$this->$field) continue;
$str1 .= $sep.$field;
$str2 .= $sep.$this->quoted($this->$field, $type);
$sep=',';
}
}
 
$query = 'insert into "';
$query .= $this->db_table();
$query .= '"'." ($str1) values ($str2)";
$result = pg_exec($slim_db,$query);
if (!$result)
{
html_db_error($query);
}
}
 
function delete() // delete an object in the database
{
global $slim_db;
 
$key = $this->db_key();
 
$query = 'delete from "';
$query .= $this->db_table();
$query .= '" where ';
$query .= $key;
$query .= " = ";
$query .= $this->quoted($this->$key, $fields[$key]);
 
$result = pg_exec($slim_db,$query);
if (!$result)
{
html_db_error($query);
}
}
 
function update_from_fields(&$fields) // update an object from field values
{
foreach ($fields as $field)
{
$field->update_object($this);
}
}
 
function import_file($file, $sep) // import objects from a CSV file
{
global $slim_db;
 
$nba = 0;
$nbm = 0;
$fp = fopen($file, "r");
if (!$fp) html_error("Impossible d'ouvrir le fichier %s", $file);
$fields = fgetcsv ($fp, 1000, $sep);
$fields2 = $this->db_fields();
$key = $this->db_key();
foreach ($fields as $field)
{
if (!$field) continue;
$field = preg_replace("/\([^\)]*\)/", "", $field);
$found = 0;
foreach ($fields2 as $field2 => $type)
{
if ($field2 == $field)
{
$found = 1;
break;
}
}
if (!$found)
{
html_error("Champ \"%s\" inconnu", $field);
}
}
 
$result = pg_exec($slim_db,"begin transaction"); // begin a database transaction
 
$objects = array();
while ($values = fgetcsv ($fp, 1000, $sep))
{
$i = 0;
$object = $this->get_new();
foreach ($values as $value)
{
$field = $fields[$i++];
if ($field && $value != "NULL")
{
if (preg_match("/([^\(]*)\(([^\)]*)\)/", $field, $m))
{
$field = $m[1];
$meth = $m[2];
$object->$field = $object->$meth($value);
}
else
$object->$field = $value;
}
}
if (isset($object->$key))
$object2 = $this->select_by_key($object->$key);
if ($object2)
{
$object->modify();
$nbm++;
}
else
{
$object->add();
$nba++;
}
}
fclose($fp);
 
$result = pg_exec($slim_db,"commit"); // end the database transaction
 
return array($nba, $nbm);
}
 
function export_file($sep) // export objects in a CSV file
{
$fields = $this->db_fields();
$str = "";
$sep2 = "";
foreach ($fields as $field => $type)
{
$str .= $sep2.$field;
$sep2 = $sep;
}
$str .= "\n";
$objects =& $this->select();
foreach ($objects as $object)
{
$sep2 = "";
foreach ($fields as $field => $type)
{
if (isset($object->$field))
{
if ($type == "string")
{
$str2 = preg_replace("/\n/", "\\n", $object->$field);
$str2 = preg_replace("/\'/", "\\'", $object->$field);
$str .= $sep2.$str2;
}
else $str .= $sep2.$object->$field;
}
else
$str .= $sep2."NULL";
$sep2 = $sep;
}
$str .= "\n";
}
return $str;
}
function &get_defaults($type = "", $all = 0) // return the default values of a type for the class
{
global $Defvalue;
 
$cond = "tablename='".$this->db_table()."'";
if (!$all)
{
$cond .= " and type='$type'";
}
$defaults =& $Defvalue->select($cond, "type,fieldname");
return $defaults;
}
 
function set_defaults($type = "") // set the default value of the object fields
{
$defaults =& $this->get_defaults($type);
foreach ($defaults as $default)
{
$default->set_value($this);
}
}
 
function &get_file_defaults($type = "", $pop_id = "", $file="setup.data",$all = 0) // return the default values of a type for the class
{
global $FileDefvalue;
 
if (!$all)
{
$cond .= " pop_id='$pop_id' and type='$type' and file='$file'";
}
else { $cond .= "file='$file'"; }
$defaults =& $FileDefvalue->select($cond, "type,pop_id,variable");
return $defaults;
}
 
function set_file_defaults($type = "",$pop_id="") // set the default value of the object fields
{
$defaults =& $this->get_file_defaults($type,$pop_id);
foreach ($defaults as $default)
{
$default->set_value($this);
}
}
 
 
function get_fields() // return the fields name for the class
{
$fields = $this->db_fields();
$fields2 = array();
$fields2[""] = "";
foreach($fields as $key => $val)
{
$fields2[$key] = $key;
}
ksort($fields2);
return $fields2;
}
 
function get_methods() // return the value methods name for the class
{
$methods = get_class_methods(get_class($this));
$methods2 = array();
$methods2[""] = "";
foreach($methods as $method)
{
if (strncmp($method, "val_", 4) == 0)
$methods2[$method] = $method;
}
ksort($methods2);
return $methods2;
}
 
function val_today() // return the current date
{
$tm = localtime();
return sprintf("%04d-%02d-%02d", $tm[5]+1900, $tm[4]+1, $tm[3]);
}
 
function val_random_string() // return the current date
{
$chars = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',
'0','1','2','3','4','5','6','7','8','9',
'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');
 
$str = "";
srand((double) microtime() * 1000000);
$nbc = count($chars)-1;
for ($i = 0; $i < 8; $i++)
{
$str .= $chars[rand(0, $nbc)];
}
return $str;
}
}
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/Button.php
New file
0,0 → 1,76
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Form Button class
 
class Button
{
function Button($value, $name = "") // Form Button constructor
{
$this->value = $value;
$this->name = $name;
}
 
function set_confirm() // set a confirm message for the button (i18n)
{
$nb_args = func_num_args();
$args = func_get_args();
$msg = __(array_shift($args));
if ($nb_args > 1)
{
array_unshift($args, $msg);
$msg = call_user_func_array('sprintf', $args);
}
$this->confirm = html_quote($msg);
}
 
function set_disable() // set a disable message for the button (i18n)
{
$nb_args = func_num_args();
$args = func_get_args();
$msg = __(array_shift($args));
if ($nb_args > 1)
{
array_unshift($args, $msg);
$msg = call_user_func_array('sprintf', $args);
}
$this->disable = html_quote($msg);
}
 
function cell_code(&$form) // return HTML code for the second <td> tag of a form field
{
global $slim_theme;
 
$str = '<input type="submit" value="'.__($this->value).'"';
if ($this->name)
{
$str .= " name=\"$this->name\"";
}
if ($this->disable)
{
$str .= " onclick='alert(\"$this->disable\"); return false;'";
}
else if ($this->confirm)
{
$str .= " onclick='if (confirm(\"$this->confirm\")) return true; else return false;'";
}
$str .= ">\n";
return $str;
}
}
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/OptionField.php
New file
0,0 → 1,55
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Option Field class
 
include_once("FormField.php");
 
class OptionField extends FormField
{
function OptionField($name, $title, $values, $selected = "", $i18n = 1) // Option Field constructor
{
$parent = get_parent_class($this);
$this->$parent($name, $title, $selected);
$this->values = $values;
$this->i18n = $i18n;
}
 
function cell_code(&$form) // return HTML code for the second <td> tag of a form field
{
global $slim_theme;
 
$str = "<td".$slim_theme->form_cell_code().">\n";
$str .= "<font".$slim_theme->font_code().">";
$str .= '<select name="'.$this->name.'"';
$str .= ">\n";
foreach ($this->values as $key => $val)
{
$str .= "<option value=\"$key\"";
if ($this->value == $key) $str .= " selected";
$str .= '>';
if ($this->i18n && $val) $str .= __($val);
else $str .= $val;
$str .= "\n";
}
$str .= "</select>\n";
$str .= "</td>\n";
return $str;
}
}
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/Right.php
New file
0,0 → 1,68
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for Slim rights
 
include_once("DBClass.php");
include_once("ProfileRight.php");
 
class Right extends DBClass
{
function get_new() // return a new instance of the class
{
return new Right();
}
 
function db_table() // return the database table for the class
{
return "right";
}
 
function db_fields() // return the database fields for the class
{
return array(
"name" => "string",
"comment" => "string",
);
}
 
function db_key() // return the database key for the class
{
return "name";
}
 
function &get_profiles() // return the profiles linked to the right
{
global $ProfileRight;
$profiles =& $ProfileRight->select("right_name='$this->name'", "profile_id");
return $profiles;
}
 
function get_profile_link() // return the link to add a right to a profile
{
global $profile;
if ($this->name)
return '<b><a target="slim" href="'.$REQUEST_URI.'"onclick=\'window.opener.location.href="profile_view.php?id='.$profile.'&add_right='.urlencode($this->name).'";window.close();return false\'>'.$this->name.'</a></b>';
else
return "";
}
 
}
 
$Right = Right::get_new();
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/ResetButton.php
New file
0,0 → 1,55
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Reset Button class
 
include_once("Button.php");
 
class ResetButton extends Button
{
function ResetButton($value = "Réinitialiser") // Reset Button constructor
{
$parent = get_parent_class($this);
$this->$parent($value);
}
 
function cell_code(&$form) // return HTML code for the second <td> tag of a form field
{
global $slim_user;
 
$str = '<input type="reset" value="'.__($this->value).'"';
foreach ($form->fields as $field)
{
if ($field->field_type() == "hidden" && $field->name)
{
$reset_code .= 'document.forms[0].'.$field->name.'.value="'.html_quote($field->value).'";';
}
}
if ($this->confirm)
{
$str .= " onClick='if (confirm(\"$this->confirm\")) {".$reset_code."return true;} else return false;'";
}
else if ($reset_code)
{
$str .= " onClick='".$reset_code."return true;'";
}
$str .= ">\n";
return $str;
}
}
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/User.php
New file
0,0 → 1,146
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for Slim users
 
include_once("DBClass.php");
include_once("Profile.php");
 
class User extends DBClass
{
function get_new() // return a new instance of the class
{
return new User();
}
 
function db_table() // return the database table for the class
{
return "slim_user";
}
 
function db_fields() // return the database fields for the class
{
return array(
"login" => "string",
"password" => "string",
"name" => "string",
"lang" => "string",
"theme" => "string",
"email" => "string",
"profile_id" => "number",
);
}
 
function db_key() // return the database key for the class
{
return "login";
}
 
function url_access() // return the url for user edition
{
global $slim_user;
global $SCRIPT_NAME;
 
if ($slim_user->login != "admin") return ""; // restrict access to "admin" user
 
if ($this->login == "admin") return ""; // do not edit admin user
else
{
return "$SCRIPT_NAME?login=$this->login";
}
}
 
function get_langs() // return the possible languages in a hash table
{
global $SCRIPT_FILENAME;
$langs = array();
if (preg_match ("/(.*)scripts/", $SCRIPT_FILENAME, $m))
{
$lang_dir = $m[1]."/include/lang";
$dd = opendir($lang_dir);
while ($file = readdir($dd))
{
if (file_exists("$lang_dir/$file/msgs.php"))
{
$langs[$file] = $file;
}
}
closedir($dd);
}
return $langs;
}
 
function get_themes() // return the possible themes in a hash table
{
global $SCRIPT_FILENAME;
$themes = array();
if (preg_match ("/(.*)scripts/", $SCRIPT_FILENAME, $m))
{
$theme_dir = $m[1]."/include/themes";
$dd = opendir($theme_dir);
while ($file = readdir($dd))
{
if (file_exists("$theme_dir/$file/theme.php"))
{
$themes[$file] = $file;
}
}
closedir($dd);
}
return $themes;
}
 
function url_profile() // return the url for user profile
{
if ($this->profile_id) return "profile_view.php?id=$this->profile_id";
else return "";
}
 
function get_profile_name() // return the name of the user profile
{
if ($this->profile_id)
{
global $Profile;
$profile = $Profile->select_by_key($this->profile_id);
return $profile->name;
}
else return "";
}
 
function has_right($right) // return 1 if user has the right
{
if ($this->login == "admin") return 1; // admin has all rights
 
if (!$this->profile_id) return 0; // no profile -> no rights
 
global $ProfileRight;
$rights = $ProfileRight->select("profile_id=".$this->profile_id." and right_name='$right'");
return count($rights);
}
 
function check_right($right) // print an error if user has not the right
{
if (!$this->has_right($right))
{
html_error("L'utilisateur %s ne possède pas le droit '%s'", $this->login, $right);
}
}
}
 
$User = User::get_new();
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/i18n.php
New file
0,0 → 1,35
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management internationalisation
 
include_once("lang/$lang/msgs.php");
 
function __($msg) // convert a message in the current slim language
{
global $slim_msgs;
global $slim_msg;
 
if ($slim_msgs[$msg]) return $slim_msgs[$msg];
else
{
$slim_msg = $slim_msgs["???"];
return "[$msg]*";
}
}
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/Type.php
New file
0,0 → 1,64
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for Slim types
 
include_once("DBClass.php");
 
class Type extends DBClass
{
function get_new() // return a new instance of the class
{
return new Type();
}
 
function db_table() // return the database table for the class
{
return "type";
}
 
function db_fields() // return the database fields for the class
{
return array(
"id" => "number",
"name" => "string",
);
}
 
function db_key() // return the database key for the class
{
return "id";
}
 
function get_bb_list() // return the list of all types in a hash table
{
global $Type;
$types =& $Type->select("","name");
$bbs = array();
$bbs[""] = "";
foreach ($types as $type)
{
$bbs[$type->id] = $type->name;
}
return $bbs;
}
 
}
 
$Type = Type::get_new();
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/BiUpdaterField.php
New file
0,0 → 1,70
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Table BiUpdater Field class
 
include_once("Field.php");
 
class BiUpdaterField extends Field
{
function BiUpdaterField($name, $title, $field = "", $field2 = "", $fmt_str = "", $fmt_meth = "", $fmt_str2 = "", $fmt_meth2 = "") // Table BiUpdater Field constructor
{
$parent = get_parent_class($this);
$this->$parent($name, $title, $fmt_str, $fmt_meth);
$this->field = $field;
$this->field2 = $field2;
$this->fmt_str2 = $fmt_str2;
$this->fmt_meth2 = $fmt_meth2;
}
 
function obj_code(&$object) // return HTML code for an object cell (can be redefined)
{
$attr = $this->name;
if ($this->fmt_meth)
{
$meth = $this->fmt_meth;
$txt = $object->$meth();
}
else if ($this->fmt_str)
{
$txt = sprintf($this->fmt_str, $object->$attr);
}
else
{
$txt = $object->$attr;
}
 
if ($this->fmt_meth2)
{
$meth = $this->fmt_meth2;
$txt2 = $object->$meth();
}
else if ($this->fmt_str2)
{
$txt2 = sprintf($this->fmt_str2, $object->$attr);
}
else
{
$txt2 = $object->$attr;
}
 
if ($this->field) return '<b><a href="'.$REQUEST_URI.'" onclick=\'window.opener.document.forms[0].'.$this->field.'.value = "'.$txt.'";window.opener.document.forms[0].'.$this->field2.'.value = "'.$txt2.'";window.close();return false\'>'.$txt.'</a></b>';
else return $txt;
}
}
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/Status.php
New file
0,0 → 1,65
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for Slim statuss
 
include_once("DBClass.php");
 
class Status extends DBClass
{
function get_new() // return a new instance of the class
{
return new Status();
}
 
function db_table() // return the database table for the class
{
return "status";
}
 
function db_fields() // return the database fields for the class
{
return array(
"id" => "number",
"name" => "string",
"comment" => "string",
);
}
 
function db_key() // return the database key for the class
{
return "id";
}
 
function get_status_list() // return the list of all statuss in a hash table
{
global $Status;
$statuss =& $Status->select("","name");
$bbs = array();
$bbs[""] = "";
foreach ($statuss as $status)
{
$bbs[$status->id] = $status->name;
}
return $bbs;
}
 
}
 
$Status = Status::get_new();
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/DNS.php
New file
0,0 → 1,112
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for Slim DNS entries
 
include_once("DBClass.php");
include_once("Machine.php");
include_once("Pop.php");
include_once("IPAddress.php");
 
class DNS extends DBClass
{
function get_new() // return a new instance of the class
{
return new DNS();
}
 
function db_table() // return the database table for the class
{
return "dns_entry";
}
 
function db_fields() // return the database fields for the class
{
return array(
"id" => "number",
"host" => "string",
"domain" => "string",
"cname_parent" => "number",
);
}
 
function db_key() // return the database key for the class
{
return "id";
}
 
function get_name() // return the complete name of the DNS entry
{
return $this->host.".".$this->domain;
}
 
function get_parent_link() // return the link to the DNS parent
{
if ($this->cname_parent)
{
global $DNS;
$dns = $DNS->select_by_key($this->cname_parent);
return '<a href="view.php?id='.$this->cname_parent.'">'.$dns->get_name().'</a>';
}
else return "";
}
 
function get_parent_name() // return the name of the DNS parent
{
if ($this->cname_parent)
{
global $DNS;
$dns = $DNS->select_by_key($this->cname_parent);
return $dns->get_name();
}
else return "";
}
 
function get_machine() // return the DNS machine
{
global $Machine;
$host = $Machine->select_by_key($this->id);
return $host;
}
 
function &get_aliases() // return the DNS aliases
{
global $DNS;
$aliases =& $DNS->select("cname_parent=$this->id", "domain,host");
return $aliases;
}
 
function &get_linked_pops() // return the pops linked to the DNS
{
global $Pop;
$pops =& $Pop->select("proxy=$this->id or primary_dns=$this->id or secondary_dns=$this->id or smtp=$this->id or mailhost=$this->id", "name");
return $pops;
}
 
function &get_linked_ip_addresses() // return the IP addresses linked to the DNS
{
global $IPAddress;
$ips =& $IPAddress->select("dns_id=$this->id");
usort($ips, "ipaddress_ip_cmp");
return $ips;
}
 
}
 
$DNS = DNS::get_new();
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/HelpButton.php
New file
0,0 → 1,42
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Reset Button class
 
include_once("Button.php");
 
class HelpButton extends Button
{
function HelpButton($value, $url, $width = 500, $height = 500) // Help Button constructor
{
$parent = get_parent_class($this);
$this->$parent($value);
$this->help_url = $url;
$this->help_width = $width;
$this->help_height = $height;
}
 
function cell_code(&$form) // return HTML code for the second <td> tag of a form field
{
$str = '<input type="submit" value="'.__($this->value).'"';
$str .= ' onclick=\'help=window.open("'.$this->help_url.'","help","toolbar=no,menubar=no,scrollbars=yes,width='.$this->help_width.',height='.$this->help_height.',resizable=yes");help.opener=self;return false\'';
$str .= ">\n";
return $str;
}
}
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/MailField.php
New file
0,0 → 1,65
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Table Mail Field class
 
include_once("Field.php");
 
class MailField extends Field
{
function MailField($name, $title, $mail_attr = "", $mail_meth = "", $fmt_str = "", $fmt_meth = "") // Table Mail Field constructor
{
$parent = get_parent_class($this);
$this->$parent($name, $title, $fmt_str, $fmt_meth);
if ($mail_attr) $this->mail_attr = $mail_attr;
else $this->mail_attr = $name;
$this->mail_meth = $mail_meth;
}
 
function obj_code(&$object) // return HTML code for an object cell (can be redefined)
{
$attr = $this->name;
$attr2 = $this->mail_attr;
if ($this->mail_meth)
{
$meth = $this->mail_meth;
$mail = $object->$meth();
}
else
{
$mail = urlencode($object->$attr2);
}
if ($this->fmt_meth)
{
$meth = $this->fmt_meth;
$txt = $object->$meth();
}
else if ($this->fmt_str)
{
$txt = sprintf($this->fmt_str, $object->$attr);
}
else
{
$txt = $object->$attr;
}
 
if ($mail) return '<a href="mailto:'.$mail.'">'.$txt.'</a>';
else return $txt;
}
}
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/SlisGroup.php
New file
0,0 → 1,98
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for Slim Slis groups
 
include_once("DBClass.php");
include_once("Group.php");
include_once("Slis.php");
 
class SlisGroup extends DBClass
{
function get_new() // return a new instance of the class
{
return new SlisGroup();
}
 
function db_table() // return the database table for the class
{
return "slis_group";
}
 
function db_fields() // return the database fields for the class
{
return array(
"id" => "number",
"group_id" => "number",
"slis_name" => "string",
);
}
 
function db_key() // return the database key for the class
{
return "id";
}
 
function url_group() // return the url to the user group
{
if ($this->group_id) return "../Admin/group_view.php?id=".$this->group_id;
else return "";
}
 
function url_slis() // return the url to the user Slis
{
if ($this->slis_name) return "../Slis/view.php?name=".urlencode($this->slis_name);
else return "";
}
 
function get_group_id_from_group_name($name) // return the id of a group selected by its name
{
global $Group;
$groups =& $Group->select("name='$name'");
if (count($groups) == 1)
{
$group = $groups[0];
return $group->id;
}
else return "";
}
 
function get_group_name() // return the name of the user group
{
global $Group;
if ($this->group_id)
{
$group = $Group->select_by_key($this->group_id);
if ($group) return $group->name;
}
return "";
}
 
function get_rm_link() // return the link to remove a slis from a group
{
return html_link("group_view.php?id=$this->group_id&rm_slis=$this->id", html_img("trash.gif",__("Retrait du Slis")), "", sprintf(__("Voulez-vous réellement retirer le Slis %s du groupe %s ?"), $this->slis_name, $this->get_group_name()));
}
 
function get_rm_link2() // return the link to remove a group from a slis
{
return html_link("view.php?name=".urlencode($this->slis_name)."&rm_group=$this->id", html_img("trash.gif",__("Retrait du groupe")), "", sprintf(__("Voulez-vous réellement retirer le groupe %s du Slis %s ?"), $this->get_group_name(), $this->slis_name));
}
}
 
$SlisGroup = SlisGroup::get_new();
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/Network.php
New file
0,0 → 1,106
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for Slim networks
 
include_once("DBClass.php");
include_once("Backbone.php");
include_once("IPAddress.php");
 
class Network extends DBClass
{
function get_new() // return a new instance of the class
{
return new Network();
}
 
function db_table() // return the database table for the class
{
return "network";
}
 
function db_fields() // return the database fields for the class
{
return array(
"name" => "string",
"ip" => "string",
"mask" => "string",
"backbone_id" => "number",
"slis_name" => "string",
"comment" => "string",
);
}
 
function db_key() // return the database key for the class
{
return "name";
}
 
function get_bb_id_from_bb_name($name) // return the id of a backbone selected by its name
{
global $Backbone;
$backbones =& $Backbone->select("name='$name'");
if (count($backbones) == 1)
{
$backbone = $backbones[0];
return $backbone->id;
}
else return "";
}
 
function get_bb_name() // return the name of the network backbone
{
global $Backbone;
if ($this->backbone_id)
{
$backbone = $Backbone->select_by_key($this->backbone_id);
if ($backbone) return $backbone->name;
}
return "";
}
 
function url_slis() // return the url to the network Slis
{
if ($this->slis_name) return "../Slis/view.php?name=".urlencode($this->slis_name);
else return "";
}
 
function &get_routes() // return the routes linked to the network
{
global $Route;
$routes =& $Route->select("network_name='$this->name'", "gateway_ip");
return $routes;
}
 
function &get_ip_addresses() // return the IP addresses linked to the network
{
global $IPAddress;
$ips =& $IPAddress->select("network_name='$this->name'");
usort($ips, "ipaddress_ip_cmp");
return $ips;
}
 
}
 
$Network = Network::get_new();
 
function network_name_cmp($a, $b) // compare to networks
{
return strnatcmp($a->name, $b->name);
}
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/lang/en/msgs.php
New file
0,0 → 1,470
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
 
// Slis Management english messages
 
$slim_msgs = array(
"???" => "* This message has not been internationalized",
"Bienvenue %s sur %s" => "Welcome %s on %s",
"Merci %s d'avoir utilisé %s" => "Thanks %s to have used %s",
"Quitter" => "Logout",
"Prefs" => "Prefs",
"Préférences utilisateur" => "User preferences",
"Mot de passe" => "Password",
"Changement du mot de passe utilisateur" => "Change user passord",
"Langue" => "Language",
"Changement de langue" => "Change language",
"Thème" => "Theme",
"Changement du thème de l'utilisateur" => "Change user theme",
"Nouveau mot de passe" => "New password",
"Encore une fois" => "One more time",
"Valider" => "Submit",
"Réinitialiser" => "Reset",
"Editer" => "Edit",
"Ajouter" => "Add",
"Créer" => "Create",
"Modifier" => "Modify",
"Supprimer" => "Delete",
"Annuler" => "Cancel",
"Importer" => "Import",
"Exporter" => "Export",
"Rechercher" => "Search",
"Retour" => "Back",
"Votre mot de passe a été modifié" => "Your password has been changed",
"Vous devrez le saisir à la prochaine action" => "You will have to enter it at the next action",
"Vous devez saisir deux fois le même mot de passe" => "You have to enter the same password twice",
"Nom" => "Name",
"Compte" => "Account",
"Comptes" => "Accounts",
"Utilisateurs" => "Users",
"Utilisateurs SLIM" => "SLIM users",
"Le compte %s existe déjà" => "Account %s already exists",
"Le champ \"%s\" doit être renseigné" => "Field \"%s\" must be set",
"Documents" => "Documents",
"Index" => "Index",
"Documentation" => "Documentation",
"Index des documents" => "Documents index",
"Nouveau compte" => "New account",
"Liste des comptes" => "Accounts list",
"Edition de compte" => "Account edition",
"Voulez-vous réellement supprimer le compte %s ?" => "Do you really want to delete account %s?",
"Sites" => "Sites",
"Etablissements" => "School sites",
"Etablissement" => "School site",
"Import" => "Import",
"Import d'établissements" => "Import school sites",
"Export" => "Export",
"Export d'établissements" => "Export school sites",
"Fichier d'import" => "Import file",
"Séparateur" => "Separator",
"Champ \"%s\" inconnu" => "Field \"%s\" unknown",
"District \"%s\" inconnu" => "District \"%s\" unknown",
"Etablissements ajoutés" => "Added sites",
"Etablissements modifiés" => "Modified sites",
"Total" => "Total",
"Liste" => "List",
"Liste des établissements" => "School sites list",
"Mots-clés" => "Keywords",
"Erreur base de données sur la requête :" => "Database error on query:",
"%d établissements" => "%d school sites",
"%d établissement" => "%d school site",
"Ville" => "City",
"Dep." => "Zip.",
"Code" => "Code",
"Type" => "Type",
"Département" => "Zipcode",
"Téléphone" => "Phone",
"Recherche simple" => "Simple search",
"Recherche avancée" => "Advanced search",
"Recherche" => "Search",
"Ecole" => "Ecole",
"Collège" => "Collège",
"Lycée" => "Lycée",
"Circonscription" => "District",
"Circ." => "Dist.",
"Autre" => "Other",
"Fiche établissement" => "School site form",
"Pas de fiche pour %s" => "No form for %s",
"Etab." => "Site",
"Slis" => "Slis",
"Liste des Slis" => "Slis list",
"%d Slis" => "%d Slis",
"Import de Slis" => "Import Slis",
"Export de Slis" => "Export Slis",
"Slis ajoutés" => "Added Slis",
"Slis modifiés" => "Modified Slis",
"Pops" => "Pops",
"Pop" => "Pop",
"Liste des pops" => "Pops list",
"%d pops" => "%d pops",
"%d pop" => "%d pop",
"Import de pops" => "Import pops",
"Export de pops" => "Export pops",
"Pops ajoutés" => "Added pops",
"Pops modifiés" => "Modified pops",
"Fiche Slis" => "Slis form",
"Version" => "Version",
"cddkbdks" => "cddkbdks",
"cd" => "cd",
"dkb" => "dkb",
"dks" => "dks",
"Adresse IP" => "IP address",
"Masque" => "Mask",
"IP Internet" => "Internet IP",
"IP Intranet" => "Intranet IP",
"Masque Internet" => "Internet mask",
"Masque Intranet" => "Intranet mask",
"IP routeur" => "Router IP",
"Login routeur" => "Router login",
"Mot de passe routeur" => "Router password",
"Type routeur" => "Router type",
"Date de création" => "Creation date",
"Date d'installation" => "Installation date",
"Installateur" => "Installer",
"Commentaire" => "Comment",
"Cyberécole" => "Cyberschool",
"Fetchmail" => "Fetchmail",
"Isdn" => "Isdn",
"Options" => "Options",
"Voulez-vous réellement supprimer le Slis %s ?" => "Do you really want to delete Slis %s?",
"Non implémenté !" => "Not implemented!",
"Choix d'un établissement" => "Choose a school site",
"Choix d'une circonscription" => "Choose a district",
"Réseaux" => "Networks",
"Réseau" => "Network",
"Liste des réseaux" => "Networks list",
"Import de réseaux" => "Import networks",
"Export de réseaux" => "Export networks",
"%d réseaux" => "%d networks",
"%d réseau" => "%d network",
"Backbones" => "Backbones",
"Backbone" => "Backbone",
"Liste des backbones" => "Backbones list",
"Nouveau backbone" => "New backbone",
"Fiche backbone" => "Backbone form",
"Voulez-vous réellement supprimer le backbone %s ?" => "Do you really want to delete backbone %s?",
"Réseau ajoutés" => "Added networks",
"Réseau modifiés" => "Modified networks",
"Fiche réseau" => "Network form",
"Install." => "Install.",
"Fiche pop" => "Pop form",
"Lieu géographique" => "Location",
"Proxy" => "Proxy",
"DNS primaire" => "Primary DNS",
"DNS secondaire" => "Secondary DNS",
"Serveur SMTP" => "SMTP server",
"Serveur de mail" => "Mail host",
"Voulez-vous réellement supprimer le pop %s ?" => "Do you really want to delete pop %s?",
"DNS" => "DNS",
"Entrées DNS" => "DNS entries",
"Entrée DNS" => "DNS entry",
"Liste des entrées DNS" => "DNS entries list",
"%d entrées DNS" => "%d DNS entries",
"%d entrée DNS" => "%d DNS entry",
"Entrées DNS ajoutées" => "Added DNS entries",
"Entrées DNS modifiées" => "Modified DNS entries",
"Import d'entrées DNS" => "Import DNS entries",
"Export d'entrées DNS" => "Export DNS entries",
"Fiche entrée DNS" => "DNS entry form",
"Machine" => "Host",
"Machines" => "Hosts",
"Domaine" => "Domain",
"Alias de" => "Alias for",
"Voulez-vous réellement supprimer l'entrée DNS %s ?" => "Do you really want to delete DNS entry %s?",
"Choix d'une entrée DNS" => "Choose a DNS entry",
"Choix d'un Slis" => "Choose a Slis",
"Voulez-vous réellement supprimer le réseau %s ?" => "Do you really want to delete network %s?",
"Voulez-vous réellement supprimer l'établissement %s ?" => "Do you really want to delete site %s?",
"IP" => "IP",
"Adresses IP" => "IP addresses",
"Liste des adresses IP" => "IP addresses list",
"%d adresses IP" => "%d IP addresses",
"%d adresse IP" => "%d IP address",
"Import d'adresses IP" => "Import IP addresses",
"Export d'adresses IP" => "Export IP addresses",
"Adresses IP ajoutées" => "Added IP addresses",
"Adresses IP modifiées" => "Modified IP addresses",
"Adresse Nat" => "Nat address",
"Routeur Nat" => "Nat router",
"Fiche adresse IP" => "IP address form",
"Voulez-vous réellement supprimer l'adresse IP %s ?" => "Do you really want to delete IP address %s?",
"Choix d'un réseau" => "Choose a network",
"Choix d'une adresse Nat de Slis" => "Choose a Slis Nat address",
"Choix d'une adresse IP" => "Choose a IP address",
"Import tun." => "Import tun.",
"Import de tunnels" => "Import tunels",
"Export tun." => "Export tun.",
"Export de tunnels" => "Export tunels",
"Tunnels ajoutés" => "Added tunels",
"Tunnels modifiés" => "Modified tunels",
"Utilisateur" => "User",
"Tunnel Slis" => "Slis tunel",
"IP serveur" => "Server IP",
"Port" => "Port",
"Proto" => "Proto",
"IP tunnel Slis" => "Slis tunnel IP",
"IP tunnel serveur" => "Server tunnel IP",
"Fiche tunnel Slis" => "Slis tunel form",
"Voulez-vous réellement supprimer le tunnel Slis %s ?" => "Do you really want to delete Slis tunel %s?",
"Créer tunnel" => "Create tunnel",
"Liste des machines" => "Hosts list",
"Import mach." => "Import hst.",
"Import de machines" => "Import hosts",
"Export mach." => "Export hst.",
"Export de machines" => "Export hosts",
"Machines ajoutées" => "Added hosts",
"Machines modifiées" => "Modified hosts",
"Fiche machine" => "Host form",
"Créer machine" => "Create host",
"OS" => "OS",
"Modèle" => "Model",
"Disque" => "Disk",
"CPU" => "CPU",
"Constructeur" => "Constructor",
"Type OS" => "OS type",
"Version OS" => "OS version",
"Mémoire" => "Memory",
"serveur" => "server",
"routeur" => "router",
"switch" => "switch",
"imprimante" => "printer",
"Voulez-vous réellement supprimer la machine %s ?" => "Do you really want to delete host %s?",
"Menu simple" => "Simple menu",
"Menu étendu" => "Extented menu",
"Lignes" => "Lines",
"Import lign." => "Import lin.",
"Import de lignes" => "Import lines",
"Export lign." => "Export lin.",
"Export de lignes" => "Export lines",
"Liste des lignes" => "Lines list",
"Numéro" => "Number",
"Lignes ajoutées" => "Added lines",
"Lignes modifiées" => "Modified lines",
"Fiche ligne" => "Line form",
"Canaux" => "Channels",
"Créer ligne" => "Create line",
"Voulez-vous réellement supprimer la ligne %s ?" => "Do you really want to delete line %s?",
"Le Slis %s existe déjà" => "Slis %s already exists",
"La ligne %s existe déjà" => "Line %s already exists",
"Liste des groupes" => "Groups list",
"Liste des groupes de SLIS" => "SLIS Groups list",
"Groupes" => "Groups",
"Groupe" => "Group",
"%d groupes" => "%d groups",
"%d groupe" => "%d group",
"Import de groupes" => "Import groups",
"Export de groupes" => "Export groups",
"Groupes ajoutés" => "Added groups",
"Groupes modifiés" => "Modified groups",
"Fiche groupe" => "Group form",
"Nouveau groupe" => "New group",
"Voulez-vous réellement supprimer le groupe %s ?" => "Do you really want to delete group %s?",
"Admin" => "Admin",
"Administrateurs" => "Admin users",
"Liste des administrateurs" => "Admin users list",
"Nouvel administrateur" => "New admin user",
"%d administrateurs" => "%d admin users",
"%d administrateur" => "%d admin user",
"Import grp." => "Import grp.",
"Export grp." => "Export grp.",
"Import d'administrateurs" => "Import admin users",
"Export d'administrateurs" => "Export admin users",
"Administrateurs ajoutés" => "Added admin users",
"Administrateurs modifiés" => "Modified admin users",
"Fiche administrateur" => "Admin user form",
"Voulez-vous réellement supprimer l'administrateur %s ?" => "Do you really want to delete admin user %s?",
"L'administrateur %s existe déjà" => "Admin user %s already exists",
"Retrait du Slis" => "Remove Slis",
"Retrait du groupe" => "Remove group",
"Voulez-vous réellement retirer le Slis %s du groupe %s ?" => "Do you really want to remove Slis %s from group %s?",
"Voulez-vous réellement retirer le groupe %s du Slis %s ?" => "Do you really want to remove group %s from Slis %s?",
"Choix d'un groupe" => "Choose a group",
"IP Passerelle" => "Gateway IP",
"%d routes" => "%d routes",
"%d route" => "%d route",
"Fiche route" => "Route form",
"Tunnels" => "Tunels",
"Liste des tunnels Slis" => "Slis tunels list",
"Choix d'un tunnel Slis" => "Choose a Slis tunel",
"%d tunnels Slis" => "%d Slis tunels",
"%d tunnel Slis" => "%d Slis tunel",
"Id" => "Id",
"Voulez-vous réellement supprimer la route %s ?" => "Do you really want to delete route %s?",
"%d lignes" => "%d lines",
"%d ligne" => "%d line",
"%d CILs" => "%d CILs",
"%d CIL" => "%d CIL",
"Prénom" => "First name",
"Nom de famille" => "Last name",
"Import CIL." => "Import CIL.",
"Import de CILs" => "Import CILs",
"Export CIL." => "Export CIL.",
"Export de CILs" => "Export CILs",
"CILs ajoutés" => "Added CILs",
"CILs modifiés" => "Modified CILs",
"Adresse E-Mail" => "E-Mail address",
"CILs" => "CILs",
"Liste des CILs" => "CILs list",
"Adresse postale" => "Postal address",
"Fiche CIL" => "CIL form",
"Voulez-vous réellement supprimer le CIL %s ?" => "Do you really want to delete CIL %s?",
"Nouvelle ligne" => "New line",
"Nouveau CIL" => "New CIL",
"Nouvelle entrée DNS" => "New DNS entry",
"Nouvelle adresse IP" => "New IP address",
"L'adresse IP %s existe déjà" => "IP address %s already exists",
"Nouveau réseau" => "New network",
"Le réseau %s existe déjà" => "Network %s already exists",
"Nouveau pop" => "New pop",
"Nouvel établissement" => "New site",
"L'établissement %s existe déjà" => "Site %s already exists",
"Défauts" => "Defaults",
"Valeurs par défaut" => "Default values",
"Liste des valeurs par défaut %s" => "%s default values list",
"Champ" => "Field",
"Valeur" => "Value",
"Méthode" => "Method",
"Nouvelle valeur par défaut" => "New default value",
"Nouvelle valeur par défaut %s" => "New %s default value",
"Fiche valeur par défaut %s" => "%s default value form",
"Voulez-vous réellement supprimer la valeur par défaut %s %s ?" => "Do you really want to delete %s default value %s?",
"Nouveau Slis pour %s" => "New Slis for %s",
"Impossible de supprimer le groupe %s car il possède des administrateurs" => "Unable to delete group %s because it has admin users",
"Impossible de supprimer le groupe %s car il est lié à des Slis" => "Unable to delete group %s because it is linked to some Slis",
"Impossible de supprimer l'entrée DNS %s car elle est liée à une machine" => "Unable to delete DNS entry %s because it is linked to a host",
"%d aliases" => "%d aliases",
"%d alias" => "%d alias",
"Impossible de supprimer l'entrée DNS %s car elle possède des aliases" => "Unable to delete DNS entry %s because it has aliases",
"%d adresses IP" => "%d IP addresses",
"%d adresse IP" => "%d IP address",
"Impossible de supprimer l'entrée DNS %s car elle est liée à des pops" => "Unable to delete DNS entry %s because it is linked to some pops",
"Impossible de supprimer l'entrée DNS %s car elle est liée à des adresses IP" => "Unable to delete DNS entry %s because it is linked to some IP addresses",
"Impossible de supprimer le réseau %s car il possède des routes" => "Unable to delete network %s because it has routes",
"Impossible de supprimer le réseau %s car il est lié à des adresses IP" => "Unable to delete network %s because it is linked to some IP addresses",
"Impossible de supprimer le pop %s car il possède des lignes" => "Unable to delete pop %s because it has lines",
"Impossible de supprimer le pop %s car il est lié à des Slis" => "Unable to delete pop %s because it is linked to some Slis",
"Impossible de supprimer l'établissement %s car il possède des CILs" => "Unable to delete site %s because it has CILs",
"Impossible de supprimer l'établissement %s car il est lié à des Slis" => "Unable to delete site %s because it is linked to some Slis",
"Impossible de supprimer le Slis %s car il est lié à un réseau" => "Unable to delete Slis %s because it is linked to a network",
"Impossible de supprimer le Slis %s car il est lié à des groupes" => "Unable to delete Slis %s because it is linked to some groups",
"Impossible de supprimer le Slis %s car il possède des administrateurs" => "Unable to delete Slis %s because it has admin users",
"Impossible de supprimer le Slis %s car il possède un tunnel" => "Unable to delete Slis %s because it has a tunel",
"Impossible de supprimer le tunnel Slis %s car il possède des routes" => "Unable to delete Slis tunel %s because it has routes",
"Profile" => "Profile",
"Profiles" => "Profiles",
"Liste des profiles" => "Profiles list",
"Nouveau profile" => "New profile",
"Fiche profile" => "Profile form",
"%d droits" => "%d rights",
"%d droit" => "%d right",
"%d comptes" => "%d accounts",
"%d compte" => "%d account",
"Voulez-vous réellement supprimer le profile %s ?" => "Do you really want to delete profile %s?",
"Droits" => "Rights",
"Liste des droits" => "Rights list",
"Nouveau droit" => "New right",
"Fiche droit" => "Right form",
"%d profiles" => "%d profiles",
"%d profile" => "%d profile",
"Voulez-vous réellement supprimer le droit %s ?" => "Do you really want to delete right %s?",
"Choix d'un droit" => "Choose a right",
"Retrait du droit" => "Remove right",
"Voulez-vous réellement retirer le droit %s du profile %s ?" => "Do you really want to remove right %s from profile %s?",
"Retrait du profile" => "Remove profile",
"Voulez-vous réellement retirer le profile %s du droit %s ?" => "Do you really want to remove profile %s from right %s?",
"Choix d'un profile" => "Choose a profile",
"Impossible de supprimer le droit %s car il est lié à des profiles" => "Unable to delete right %s because it is linked to some profiles",
"Impossible de supprimer le profile %s car il possède des droits" => "Unable to delete profile %s because it has rights",
"Impossible de supprimer le profile %s car il possède des comptes" => "Unable to delete profile %s because it has comptes",
"Import dr." => "Import ri.",
"Import de droits" => "Import rights",
"Export dr." => "Export ri.",
"Export de droits" => "Export rights",
"Droits ajoutés" => "Added rights",
"Droits modifiés" => "Modified rights",
"Import de profile" => "Import profile",
"Le droit %s existe déjà" => "Right %s already exists",
"Le droit %s n'existe pas" => "Right %s doesn't exist",
"L'utilisateur %s ne possède pas le droit '%s'" => "User %s doesn't have right '%s'",
"FixKeys" => "FixKeys",
"Sequences fixing from max ids in tables" => "Sequences fixing from max ids in tables,and patches",
"Reparation des sequences, apres avoir fait des imports" => "Sequences fixing, because of importations",
"Operation not allowed" => "Operation not allowed",
"Setup.data" => "Setup.data",
"Setup.data default values" => "Setup.data default values",
"Variable" => "Variable",
"DKS center" => "DKS center",
"DKS (setup disk) generation tools" => "DKS (setup disk) generation tools",
"Make" => "Make",
"Making of setup disks" => "Automatic making of setup disks",
"Setup disk" => "Setup disk",
"Selection des SLIS a generer" => "Selecting the SLIS(s) to make",
"Date de creation posterieure a" => "Creation date after: ",
"Requete avancee" => "Advanced request",
"Envoyer requete de conf a l'administrateur du domaine" => "Send a config request to domain administrator",
"Error making setup disk for %s: Directory %s/MATRIX/ does not exists!" => "Error making setup disk for %s: Directory %s/MATRIX/ does not exists!",
"Mot de passe ou clef" => "Secret or key",
"Vues" => "Views",
"Definition des vues" => "Views edition",
"Liste des Vues" => "Views list",
"Table" => "Table",
"Requete" => "Request",
"Nouvelle vue" => "New view",
"Cust.script" => "Cust.script",
"Custom scripts" => "Customizable scripts",
"Routes.tun" => "Routes.tun",
"Routes default values into the database for tunels" => "Default routes creation when creating a new tunel",
"Tun" => "Tunel",
"Tunel creation defaults" => "Default values when creating a new tunel",
"Tunel routes" => "Tunel routes",
"Tunel" => "Tunel",
"SLIS PARAMETERS" => "SLIS PARAMETERS",
"SITE" => "SITE",
"code" => "code",
"Option CyberEcole active" => "CyberSchool option active",
"Network at INTERNET level" => "Network at INTERNET level (to router)",
"Network at INTRANET level" => "Network at INTRANET level (LAN side)",
"PPPOE: No interconnection network" => "PPPOE: No interconnection network",
"Domain name" => "Domain name",
"Admin url" => "Administration interface's URL",
"Admin user" => "Admin user to connect to the interface",
"INTERFACE D'ADMINISTRATION LOCALE" => "LOCAL ADMINISTRATION INTERFACE",
"Pour generer automatiquement la DKS" => "To automatically generate the DKS",
"Unable to open %s for writing!" => "Unable to open %s for writing!",
"Custom post-one-slis-generation script" => "Custom post-one-slis-generation script",
"script" => "script",
"types" => "types",
"Types" => "Types",
"Definition des types de SLIS" => "SLIS types definition",
"Liste des types" => "Types list",
"Nouveau type" => "New type",
"Fiche type" => "Type edition",
"Voulez-vous réellement supprimer le type %s ?" => "Do you really want to delete the type %s?",
"status" => "status",
"Status" => "Status",
"Statuss" => "Statuses",
"statuss" => "statuses",
"Definition des statuss de SLIS" => "SLIS statuses definition",
"Liste des status" => "Status list",
"Nouveau status" => "New status",
"Fiche status" => "Status edition",
"Voulez-vous réellement supprimer le status %s ?" => "Do you really want to delete the status %s?",
"Description" => "Description",
"Adresse MAC" => "MAC address",
);
?>
Property changes:
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/lang/fr/msgs.php
New file
0,0 → 1,470
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
 
// Slis Management french messages
 
$slim_msgs = array(
"???" => "* Ce message n'a pas été internationalisé",
"Bienvenue %s sur %s" => "Bienvenue %s sur %s",
"Merci %s d'avoir utilisé %s" => "Merci %s d'avoir utilisé %s",
"Quitter" => "Quitter",
"Prefs" => "Prefs",
"Préférences utilisateur" => "Préférences utilisateur",
"Mot de passe" => "Mot de passe",
"Changement du mot de passe utilisateur" => "Changement du mot de passe utilisateur",
"Langue" => "Langue",
"Changement de langue" => "Changement de langue",
"Thème" => "Thème",
"Changement du thème de l'utilisateur" => "Changement du thème de l'utilisateur",
"Nouveau mot de passe" => "Nouveau mot de passe",
"Encore une fois" => "Encore une fois",
"Editer" => "Editer",
"Valider" => "Valider",
"Réinitialiser" => "Réinitialiser",
"Ajouter" => "Ajouter",
"Créer" => "Créer",
"Modifier" => "Modifier",
"Supprimer" => "Supprimer",
"Annuler" => "Annuler",
"Importer" => "Importer",
"Exporter" => "Exporter",
"Rechercher" => "Rechercher",
"Retour" => "Retour",
"Votre mot de passe a été modifié" => "Votre mot de passe a été modifié",
"Vous devrez le saisir à la prochaine action" => "Vous devrez le saisir à la prochaine action",
"Vous devez saisir deux fois le même mot de passe" => "Vous devez saisir deux fois le même mot de passe",
"Nom" => "Nom",
"Compte" => "Compte",
"Comptes" => "Comptes",
"Utilisateurs" => "Utilisateurs",
"Utilisateurs SLIM" => "Utilisateurs SLIM",
"Le compte %s existe déjà" => "Le compte %s existe déjà",
"Le champ \"%s\" doit être renseigné" => "Le champ \"%s\" doit être renseigné",
"Documents" => "Documents",
"Index" => "Index",
"Documentation" => "Documentation",
"Index des documents" => "Index des documents",
"Nouveau compte" => "Nouveau compte",
"Liste des comptes" => "Liste des comptes",
"Edition de compte" => "Edition de compte",
"Voulez-vous réellement supprimer le compte %s ?" => "Voulez-vous réellement supprimer le compte %s ?",
"Sites" => "Sites",
"Etablissements" => "Etablissements",
"Etablissement" => "Etablissement",
"Import" => "Import",
"Import d'établissements" => "Import d'établissements",
"Export" => "Export",
"Export d'établissements" => "Export d'établissements",
"Fichier d'import" => "Fichier d'import",
"Séparateur" => "Séparateur",
"Champ \"%s\" inconnu" => "Champ \"%s\" inconnu",
"District \"%s\" inconnu" => "District \"%s\" inconnu",
"Etablissements ajoutés" => "Etablissements ajoutés",
"Etablissements modifiés" => "Etablissements modifiés",
"Total" => "Total",
"Liste" => "Liste",
"Liste des établissements" => "Liste des établissements",
"Mots-clés" => "Mots-clés",
"Erreur base de données sur la requête :" => "Erreur base de données sur la requête :",
"%d établissements" => "%d établissements",
"%d établissement" => "%d établissement",
"Ville" => "Ville",
"Dep." => "Dep.",
"Code" => "Code",
"Type" => "Type",
"Département" => "Département",
"Téléphone" => "Téléphone",
"Recherche simple" => "Recherche simple",
"Recherche avancée" => "Recherche avancée",
"Recherche" => "Recherche",
"Ecole" => "Ecole",
"Collège" => "Collège",
"Lycée" => "Lycée",
"Circonscription" => "Circonscription",
"Circ." => "Circ.",
"Autre" => "Autre",
"Fiche établissement" => "Fiche établissement",
"Pas de fiche pour %s" => "Pas de fiche pour %s",
"Etab." => "Etab.",
"Slis" => "Slis",
"Liste des Slis" => "Liste des Slis",
"%d Slis" => "%d Slis",
"Import de Slis" => "Import de Slis",
"Export de Slis" => "Export de Slis",
"Slis ajoutés" => "Slis ajoutés",
"Slis modifiés" => "Slis modifiés",
"Pops" => "Pops",
"Pop" => "Pop",
"Liste des pops" => "Liste des pops",
"%d pops" => "%d pops",
"%d pop" => "%d pop",
"Import de pops" => "Import de pops",
"Export de pops" => "Export de pops",
"Pops ajoutés" => "Pops ajoutés",
"Pops modifiés" => "Pops modifiés",
"Fiche Slis" => "Fiche Slis",
"Version" => "Version",
"cddkbdks" => "cddkbdks",
"cd" => "cd",
"dkb" => "dkb",
"dks" => "dks",
"Adresse IP" => "Adresse IP",
"Masque" => "Masque",
"IP Internet" => "IP Internet",
"IP Intranet" => "IP Intranet",
"Masque Internet" => "Masque Internet",
"Masque Intranet" => "Masque Intranet",
"IP routeur" => "IP routeur",
"Login routeur" => "Login routeur",
"Mot de passe routeur" => "Mot de passe routeur",
"Type routeur" => "Type routeur",
"Date de création" => "Date de création",
"Date d'installation" => "Date d'installation",
"Installateur" => "Installateur",
"Commentaire" => "Commentaire",
"Cyberécole" => "Cyberécole",
"Fetchmail" => "Fetchmail",
"Isdn" => "Isdn",
"Options" => "Options",
"Voulez-vous réellement supprimer le Slis %s ?" => "Voulez-vous réellement supprimer le Slis %s ?",
"Non implémenté !" => "Non implémenté !",
"Choix d'un établissement" => "Choix d'un établissement",
"Choix d'une circonscription" => "Choix d'une circonscription",
"Réseaux" => "Réseaux",
"Réseau" => "Réseau",
"Liste des réseaux" => "Liste des réseaux",
"Import de réseaux" => "Import de réseaux",
"Export de réseaux" => "Export de réseaux",
"%d réseaux" => "%d réseaux",
"%d réseau" => "%d réseau",
"Backbones" => "Backbones",
"Backbone" => "Backbone",
"Liste des backbones" => "Liste des backbones",
"Nouveau backbone" => "Nouveau backbone",
"Fiche backbone" => "Fiche backbone",
"Voulez-vous réellement supprimer le backbone %s ?" => "Voulez-vous réellement supprimer le backbone %s ?",
"Réseaux ajoutés" => "Réseaux ajoutés",
"Réseaux modifiés" => "Réseaux modifiés",
"Fiche réseau" => "Fiche réseau",
"Install." => "Install.",
"Fiche pop" => "Fiche pop",
"Lieu géographique" => "Lieu géographique",
"Proxy" => "Proxy",
"DNS primaire" => "DNS primaire",
"DNS secondaire" => "DNS secondaire",
"Serveur SMTP" => "Serveur SMTP",
"Serveur de mail" => "Serveur de mail",
"Voulez-vous réellement supprimer le pop %s ?" => "Voulez-vous réellement supprimer le pop %s ?",
"DNS" => "DNS",
"Entrées DNS" => "Entrées DNS",
"Entrée DNS" => "Entrée DNS",
"Liste des entrées DNS" => "Liste des entrées DNS",
"%d entrées DNS" => "%d entrées DNS",
"%d entrée DNS" => "%d entrée DNS",
"Entrées DNS ajoutées" => "Entrées DNS ajoutées",
"Entrées DNS modifiées" => "Entrées DNS modifiées",
"Import d'entrées DNS" => "Import d'entrées DNS",
"Export d'entrées DNS" => "Export d'entrées DNS",
"Fiche entrée DNS" => "Fiche entrée DNS",
"Machine" => "Machine",
"Machines" => "Machines",
"Domaine" => "Domaine",
"Alias de" => "Alias de",
"Voulez-vous réellement supprimer l'entrée DNS %s ?" => "Voulez-vous réellement supprimer l'entrée DNS %s ?",
"Choix d'une entrée DNS" => "Choix d'une entrée DNS",
"Choix d'un Slis" => "Choix d'un Slis",
"Voulez-vous réellement supprimer le réseau %s ?" => "Voulez-vous réellement supprimer le réseau %s ?",
"Voulez-vous réellement supprimer l'établissement %s ?" => "Voulez-vous réellement supprimer l'établissement %s ?",
"IP" => "IP",
"Adresses IP" => "Adresses IP",
"Liste des adresses IP" => "Liste des adresses IP",
"%d adresses IP" => "%d adresses IP",
"%d adresse IP" => "%d adresse IP",
"Import d'adresses IP" => "Import d'adresses IP",
"Export d'adresses IP" => "Export d'adresses IP",
"Adresses IP ajoutées" => "Adresses IP ajoutées",
"Adresses IP modifiées" => "Adresses IP modifiées",
"Adresse Nat" => "Adresse Nat",
"Routeur Nat" => "Routeur Nat",
"Fiche adresse IP" => "Fiche adresse IP",
"Voulez-vous réellement supprimer l'adresse IP %s ?" => "Voulez-vous réellement supprimer l'adresse IP %s ?",
"Choix d'un réseau" => "Choix d'un réseau",
"Choix d'une adresse Nat de Slis" => "Choix d'une adresse Nat de Slis",
"Choix d'une adresse IP" => "Choix d'une adresse IP",
"Import tun." => "Import tun.",
"Import de tunnels" => "Import de tunnels",
"Export tun." => "Export tun.",
"Export de tunnels" => "Export de tunnels",
"Tunnels ajoutés" => "Tunnels ajoutés",
"Tunnels modifiés" => "Tunnels modifiés",
"Utilisateur" => "Utilisateur",
"Tunnel Slis" => "Tunnel Slis",
"IP serveur" => "IP serveur",
"Port" => "Port",
"Proto" => "Proto",
"IP tunnel Slis" => "IP tunnel Slis",
"IP tunnel serveur" => "IP tunnel serveur",
"Fiche tunnel Slis" => "Fiche tunnel Slis",
"Voulez-vous réellement supprimer le tunnel Slis %s ?" => "Voulez-vous réellement supprimer le tunnel Slis %s ?",
"Créer tunnel" => "Créer tunnel",
"Liste des machines" => "Liste des machines",
"Import mach." => "Import mach.",
"Import de machines" => "Import de machines",
"Export mach." => "Export mach.",
"Export de machines" => "Export de machines",
"Machines ajoutées" => "Machines ajoutées",
"Machines modifiées" => "Machines modifiées",
"Fiche machine" => "Fiche machine",
"Créer machine" => "Créer machine",
"OS" => "OS",
"Modèle" => "Modèle",
"Disque" => "Disque",
"CPU" => "CPU",
"Constructeur" => "Constructeur",
"Type OS" => "Type OS",
"Version OS" => "Version OS",
"Mémoire" => "Mémoire",
"serveur" => "serveur",
"routeur" => "routeur",
"switch" => "switch",
"imprimante" => "imprimante",
"Voulez-vous réellement supprimer la machine %s ?" => "Voulez-vous réellement supprimer la machine %s ?",
"Menu simple" => "Menu simple",
"Menu étendu" => "Menu étendu",
"Lignes" => "Lignes",
"Import lign." => "Import lign.",
"Import de lignes" => "Import de lignes",
"Liste des lignes" => "Liste des lignes",
"Export lign." => "Export lign.",
"Export de lignes" => "Export de lignes",
"Numéro" => "Numéro",
"Lignes ajoutées" => "Lignes ajoutées",
"Lignes modifiées" => "Lignes modifiées",
"Fiche ligne" => "Fiche ligne",
"Canaux" => "Canaux",
"Créer ligne" => "Créer ligne",
"Voulez-vous réellement supprimer la ligne %s ?" => "Voulez-vous réellement supprimer la ligne %s ?",
"Le Slis %s existe déjà" => "Le Slis %s existe déjà",
"La ligne %s existe déjà" => "La ligne %s existe déjà",
"Liste des groupes" => "Liste des groupes",
"Liste des groupes de SLIS" => "Liste des groupes de SLIS",
"Groupes" => "Groupes",
"Groupe" => "Groupe",
"%d groupes" => "%d groupes",
"%d groupe" => "%d groupe",
"Import de groupes" => "Import de groupes",
"Export de groupes" => "Export de groupes",
"Groupes ajoutés" => "Groupes ajoutés",
"Groupes modifiés" => "Groupes modifiés",
"Fiche groupe" => "Fiche groupe",
"Nouveau groupe" => "Nouveau groupe",
"Voulez-vous réellement supprimer le groupe %s ?" => "Voulez-vous réellement supprimer le groupe %s ?",
"Admin" => "Admin",
"Administrateurs" => "Administrateurs",
"Liste des administrateurs" => "Liste des administrateurs",
"Nouvel administrateur" => "Nouvel administrateur",
"%d administrateurs" => "%d administrateurs",
"%d administrateur" => "%d administrateur",
"Import grp." => "Import grp.",
"Export grp." => "Export grp.",
"Import d'administrateurs" => "Import d'administrateurs",
"Export d'administrateurs" => "Export d'administrateurs",
"Administrateurs ajoutés" => "Administrateurs ajoutés",
"Administrateurs modifiés" => "Administrateurs modifiés",
"Fiche administrateur" => "Fiche administrateur",
"Voulez-vous réellement supprimer l'administrateur %s ?" => "Voulez-vous réellement supprimer l'administrateur %s ?",
"L'administrateur %s existe déjà" => "L'administrateur %s existe déjà",
"Retrait du Slis" => "Retrait du Slis",
"Retrait du groupe" => "Retrait du groupe",
"Voulez-vous réellement retirer le Slis %s du groupe %s ?" => "Voulez-vous réellement retirer le Slis %s du groupe %s ?",
"Voulez-vous réellement retirer le groupe %s du Slis %s ?" => "Voulez-vous réellement retirer le groupe %s du Slis %s ?",
"Choix d'un groupe" => "Choix d'un groupe",
"IP Passerelle" => "IP Passerelle",
"%d routes" => "%d routes",
"%d route" => "%d route",
"Fiche route" => "Fiche route",
"Tunnels" => "Tunnels",
"Liste des tunnels Slis" => "Liste des tunnels Slis",
"Choix d'un tunnel Slis" => "Choix d'un tunnel Slis",
"%d tunnels Slis" => "%d tunnels Slis",
"%d tunnel Slis" => "%d tunnel Slis",
"Id" => "Id",
"Voulez-vous réellement supprimer la route %s ?" => "Voulez-vous réellement supprimer la route %s ?",
"%d lignes" => "%d lignes",
"%d ligne" => "%d ligne",
"%d CILs" => "%d CILs",
"%d CIL" => "%d CIL",
"Prénom" => "Prénom",
"Nom de famille" => "Nom de famille",
"Import CIL." => "Import CIL.",
"Import de CILs" => "Import de CILs",
"Export CIL." => "Export CIL.",
"Export de CILs" => "Export de CILs",
"CILs ajoutés" => "CILs ajoutés",
"CILs modifiés" => "CILs modifiés",
"Adresse E-Mail" => "Adresse E-Mail",
"CILs" => "CILs",
"Liste des CILs" => "Liste des CILs",
"Adresse postale" => "Adresse postale",
"Fiche CIL" => "Fiche CIL",
"Voulez-vous réellement supprimer le CIL %s ?" => "Voulez-vous réellement supprimer le CIL %s ?",
"Nouvelle ligne" => "Nouvelle ligne",
"Nouveau CIL" => "Nouveau CIL",
"Nouvelle entrée DNS" => "Nouvelle entrée DNS",
"Nouvelle adresse IP" => "Nouvelle adresse IP",
"L'adresse IP %s existe déjà" => "L'adresse IP %s existe déjà",
"Nouveau réseau" => "Nouveau réseau",
"Le réseau %s existe déjà" => "Le réseau %s existe déjà",
"Nouveau pop" => "Nouveau pop",
"Nouvel établissement" => "Nouvel établissement",
"L'établissement %s existe déjà" => "L'établissement %s existe déjà",
"Défauts" => "Défauts",
"Valeurs par défaut" => "Valeurs par défaut",
"Liste des valeurs par défaut %s" => "Liste des valeurs par défaut %s",
"Champ" => "Champ",
"Valeur" => "Valeur",
"Méthode" => "Méthode",
"Nouvelle valeur par défaut" => "Nouvelle valeur par défaut",
"Nouvelle valeur par défaut %s" => "Nouvelle valeur par défaut %s",
"Fiche valeur par défaut %s" => "Fiche valeur par défaut %s",
"Voulez-vous réellement supprimer la valeur par défaut %s %s ?" => "Voulez-vous réellement supprimer la valeur par défaut %s %s ?",
"Nouveau Slis pour %s" => "Nouveau Slis pour %s",
"Impossible de supprimer le groupe %s car il possède des administrateurs" => "Impossible de supprimer le groupe %s car il possède des administrateurs",
"Impossible de supprimer le groupe %s car il est lié à des Slis" => "Impossible de supprimer le groupe %s car il est lié à des Slis",
"Impossible de supprimer l'entrée DNS %s car elle est liée à une machine" => "Impossible de supprimer l'entrée DNS %s car elle est liée à une machine",
"%d aliases" => "%d aliases",
"%d alias" => "%d alias",
"Impossible de supprimer l'entrée DNS %s car elle possède des aliases" => "Impossible de supprimer l'entrée DNS %s car elle est possède des aliases",
"%d adresses IP" => "%d adresses IP",
"%d adresse IP" => "%d adresse IP",
"Impossible de supprimer l'entrée DNS %s car elle est liée à des pops" => "Impossible de supprimer l'entrée DNS %s car elle est liée à des pops",
"Impossible de supprimer l'entrée DNS %s car elle est liée à des adresses IP" => "Impossible de supprimer l'entrée DNS %s car elle est liée à des adresses IP",
"Impossible de supprimer le réseau %s car il possède des routes" => "Impossible de supprimer le réseau %s car il possède des routes",
"Impossible de supprimer le réseau %s car il est lié à des adresses IP" => "Impossible de supprimer le réseau %s car il est lié à des adresses IP",
"Impossible de supprimer le pop %s car il possède des lignes" => "Impossible de supprimer le pop %s car il possède des lignes",
"Impossible de supprimer le pop %s car il est lié à des Slis" => "Impossible de supprimer le pop %s car il est lié à des Slis",
"Impossible de supprimer l'établissement %s car il possède des CILs" => "Impossible de supprimer l'établissement %s car il possède des CILs",
"Impossible de supprimer l'établissement %s car il est lié à des Slis" => "Impossible de supprimer l'établissement %s car il est lié à des Slis",
"Impossible de supprimer le Slis %s car il est lié à un réseau" => "Impossible de supprimer le Slis %s car il est lié à un réseau",
"Impossible de supprimer le Slis %s car il est lié à des groupes" => "Impossible de supprimer le Slis %s car il est lié à des groupes",
"Impossible de supprimer le Slis %s car il possède des administrateurs" => "Impossible de supprimer le Slis %s car il possède des administrateurs",
"Impossible de supprimer le Slis %s car il possède un tunnel" => "Impossible de supprimer le Slis %s car il possède un tunnel",
"Impossible de supprimer le tunnel Slis %s car il possède des routes" => "Impossible de supprimer le tunnel Slis %s car il possède des routes",
"Profile" => "Profile",
"Profiles" => "Profiles",
"Liste des profiles" => "Liste des profiles",
"Nouveau profile" => "Nouveau profile",
"Fiche profile" => "Fiche profile",
"%d droits" => "%d droits",
"%d droit" => "%d droit",
"%d comptes" => "%d comptes",
"%d compte" => "%d compte",
"Voulez-vous réellement supprimer le profile %s ?" => "Voulez-vous réellement supprimer le profile %s ?",
"Droits" => "Droits",
"Liste des droits" => "Liste des droits",
"Nouveau droit" => "Nouveau droit",
"Fiche droit" => "Fiche droit",
"%d profiles" => "%d profiles",
"%d profile" => "%d profile",
"Voulez-vous réellement supprimer le droit %s ?" => "Voulez-vous réellement supprimer le droit %s ?",
"Choix d'un droit" => "Choix d'un droit",
"Retrait du droit" => "Retrait du droit",
"Voulez-vous réellement retirer le droit %s du profile %s ?" => "Voulez-vous réellement retirer le droit %s du profile %s ?",
"Retrait du profile" => "Retrait du profile",
"Voulez-vous réellement retirer le profile %s du droit %s ?" => "Voulez-vous réellement retirer le profile %s du droit %s ?",
"Choix d'un profile" => "Choix d'un profile",
"Impossible de supprimer le droit %s car il est lié à des profiles" => "Impossible de supprimer le droit %s car il est lié à des profiles",
"Impossible de supprimer le profile %s car il possède des droits" => "Impossible de supprimer le profile %s car il possède des droits",
"Impossible de supprimer le profile %s car il possède des comptes" => "Impossible de supprimer le profile %s car il possède des comptes",
"Import dr." => "Import dr.",
"Import de droits" => "Import de droits",
"Export dr." => "Export dr.",
"Export de droits" => "Export de droits",
"Droits ajoutés" => "Droits ajoutés",
"Droits modifiés" => "Droits modifiés",
"Import de profile" => "Import de profile",
"Le droit %s existe déjà" => "Le droit %s existe déjà",
"Le droit %s n'existe pas" => "Le droit %s n'existe pas",
"L'utilisateur %s ne possède pas le droit '%s'" => "L'utilisateur %s ne possède pas le droit '%s'",
"FixKeys" => "Repar.Clefs",
"Sequences fixing from max ids in tables" => "Sequences fixing from max ids in tables,and patches",
"Reparation des sequences, apres avoir fait des imports" => "Reparation des sequences, apres avoir fait des imports",
"Operation not allowed" => "Operation interdite avec les droits d'acces que vous possedez",
"Setup.data" => "Setup.data",
"Setup.data default values" => "Valeurs par defaut des variables du fichier de la DKS",
"Variable" => "Variable",
"DKS center" => "DKS center",
"DKS (setup disk) generation tools" => "DKS (setup disk) generation tools",
"Make" => "Generation",
"Making of setup disks" => "Generation automatique des disquettes setup",
"Setup disk" => "Disquette setup",
"Selection des SLIS a generer" => "Selection des SLIS &agrave; g&eacute;n&eacute;rer",
"Date de creation posterieure a" => "Date de cr&eacute;ation post&eacute;rieure &agrave;",
"Envoyer requete de conf a l'administrateur du domaine" => "Envoyer requete de conf &agrave; l'administrateur du domaine",
"Requete avancee" => "Requete avanc&eacute;e",
"Error making setup disk for %s: Directory %s/MATRIX/ does not exists!" => "Erreur au moment de la creation de la disquette setup pour %s: Le repertoire %s/MATRIX/ n'existe pas!",
"Mot de passe ou clef" => "Mot de passe ou clef",
"Vues" => "Vues",
"Definition des vues" => "D&eacute;finition des vues",
"Liste des Vues" => "Liste des Vues",
"Table" => "Table",
"Requete" => "Requete",
"Nouvelle vue" => "Nouvelle vue",
"Cust.script" => "Script perso",
"Custom scripts" => "Scripts personnalis&eacute;s",
"Routes.tun" => "Routes.tun",
"Routes default values into the database for tunels" => "Creation de routes par defaut lors de la creation d'un tunnel",
"Tun" => "Tunel",
"Tunel creation defaults" => "Valeurs par defaut de la fiche de creation de tunnel",
"Tunel routes" => "Routes vers le tunnel d'un SLIS",
"Tunel" => "Tunnel",
"SLIS PARAMETERS" => "PARAMETRES DU SLIS",
"SITE" => "SITE",
"code" => "code",
"Option CyberEcole active" => "Option CyberEcole active",
"Network at INTERNET level" => "Reseau niveau INTERNET (vers routeur)",
"Network at INTRANET level" => "Reseau niveau INTRANET (vers le LAN)",
"PPPOE: No interconnection network" => "PPPOE: Il n'y a pas de reseau d'interconnexion",
"Domain name" => "Nom de domaine",
"Admin url" => "URL de l'interface d'administration",
"Admin user" => "Utilisateur pour se connecter a l'interface",
"INTERFACE D'ADMINISTRATION LOCALE" => "INTERFACE D'ADMINISTRATION LOCALE",
"Pour generer automatiquement la DKS" => "Pour generer automatiquement la DKS",
"Unable to open %s for writing!" => "Impossible d'ouvrir %s en ecriture!",
"Custom post-one-slis-generation script" => "Script perso pour la post-generation d'un SLIS",
"script" => "script",
"types" => "types",
"Types" => "Types",
"Definition des types de SLIS" => "Definition des types de SLIS",
"Liste des types" => "Liste des types",
"Nouveau type" => "Nouveau type",
"Fiche type" => "Fiche type",
"Voulez-vous réellement supprimer le type %s ?" => "Voulez-vous réellement supprimer le type %s ?",
"status" => "etat",
"Status" => "Etat",
"Statuss" => "Etats",
"statuss" => "etats",
"Definition des statuss de SLIS" => "Definition des etats de SLIS",
"Liste des status" => "Liste des etats",
"Nouveau status" => "Nouvel etat",
"Fiche status" => "Fiche etat",
"Voulez-vous réellement supprimer le status %s ?" => "Voulez-vous réellement supprimer l'etat %s ?",
"Description" => "Description",
"Adresse MAC" => "Adresse MAC",
);
?>
Property changes:
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/Defvalue.php
New file
0,0 → 1,80
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for Slim default values
include_once("DBClass.php");
 
class Defvalue extends DBClass
{
function get_new() // return a new instance of the class
{
return new Defvalue();
}
 
function db_table() // return the database table for the class
{
return "defvalue";
}
 
function db_fields() // return the database fields for the class
{
return array(
"id" => "number",
"tablename" => "string",
"fieldname" => "string",
"type" => "string",
"value" => "string",
"method" => "string",
);
}
 
function db_key() // return the database key for the class
{
return "id";
}
 
function set_value(&$object) // set the defvalue value for an object
{
$field = $this->fieldname;
$method = $this->method;
if ($method)
{
$object->$field = $object->$method();
}
else
{
$object->$field = $this->value;
}
return $object->$field;
}
 
function url_access() // return the url for default value edition
{
global $slim_user;
global $SCRIPT_NAME;
 
if ($slim_user->login != "admin") return ""; // restrict access to "admin" user
 
return "$SCRIPT_NAME?id=$this->id";
}
 
}
 
$Defvalue = Defvalue::get_new();
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/FileDefvalue.php
New file
0,0 → 1,114
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for setup.data file default values
include_once("DBClass.php");
 
class FileDefvalue extends DBClass
{
function get_new() // return a new instance of the class
{
return new FileDefvalue();
}
 
function db_table() // return the database table for the class
{
return "file_defvalue";
}
 
function db_fields() // return the database fields for the class
{
return array(
"id" => "number",
"variable" => "string",
"value" => "string",
"type" => "string",
"pop_id" => "number",
"value" => "string",
"method" => "string",
"file" => "string",
);
}
 
function db_key() // return the database key for the class
{
return "id";
}
 
function set_value(&$object) // set the defvalue value for an object
{
$field = $this->fieldname;
$method = $this->method;
if ($method)
{
$object->$field = $object->$method();
}
else
{
$object->$field = $this->value;
}
return $object->$field;
}
 
function url_access() // return the url for default value edition
{
global $slim_user;
global $SCRIPT_NAME;
 
if ($slim_user->login != "admin") return ""; // restrict access to "admin" user
 
return "$SCRIPT_NAME?id=$this->id";
}
 
function get_pop_link() // return the link to the Slis pop
{
if ($this->pop_id)
{
global $Pop;
$pop = $Pop->select_by_key($this->pop_id);
return '<a href="../Pops/view.php?id='.$this->pop_id.'">'.$pop->name.'</a>';
}
else return "";
}
 
function get_setup_value($variable,$type="",$pop_id=0) // return the default value for a setup.data variable
{
global $FileDefvalue;
$file_defaults=$FileDefvalue->select("variable='$variable' and file='setup.data'",value,type,pop_id);
$value_pop=""; $value_type=""; $value_bigdefault="";
foreach ($file_defaults as $file_default)
{
if ($type == $file_default->type && $pop_id == $file_default->pop_id)
{ return $file_default->value; }
elseif ($file_default->type == "" && $pop_id == $file_default->pop_id)
{ $value_pop=$file_default->value; }
elseif ($file_default->pop_id == 0 && $type == $file_default->type)
{ $value_type=$file_default->value; }
elseif ($file_default->pop_id == 0 && $file_default->type == "")
{ $value_bigdefault=$file_default->value; }
}
if ($value_pop != "") { return $value_pop; }
elseif ($value_type != "") { return $value_type; }
else {return $value_bigdefault;}
}
 
}
 
$FileDefvalue = FileDefvalue::get_new();
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/Group.php
New file
0,0 → 1,73
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for Slim groups
 
include_once("DBClass.php");
 
class Group extends DBClass
{
function get_new() // return a new instance of the class
{
return new Group();
}
 
function db_table() // return the database table for the class
{
return "group";
}
 
function db_fields() // return the database fields for the class
{
return array(
"id" => "number",
"name" => "string",
"comment" => "string",
);
}
 
function db_key() // return the database key for the class
{
return "id";
}
 
function get_group_list() // return the list of all groups in a hash table
{
global $Group;
$groups =& $Group->select("","name");
$grs = array();
$grs["0"] = "";
foreach ($groups as $group)
{
$grs[$group->id] = $group->name;
}
return $grs;
}
 
function get_slis_link() // return the link to add a group to a slis
{
global $slis;
if ($this->name)
return '<b><a target="slim" href="'.$REQUEST_URI.'"onclick=\'window.opener.location.href="../Slis/view.php?name='.$slis.'&add_group='.$this->id.'";window.close();return false\'>'.$this->name.'</a></b>';
else
return "";
}
}
 
$Group = Group::get_new();
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/Route.php
New file
0,0 → 1,104
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for Slim routes
 
include_once("DBClass.php");
include_once("Tunel.php");
include_once("Network.php");
 
class Route extends DBClass
{
function get_new() // return a new instance of the class
{
return new Route();
}
 
function db_table() // return the database table for the class
{
return "route";
}
 
function db_fields() // return the database fields for the class
{
return array(
"id" => "number",
"network_name" => "string",
"gateway_ip" => "string",
"tunel_id" => "number",
);
}
 
function db_key() // return the database key for the class
{
return "id";
}
 
function get_tunel_link() // return the link to the route tunel
{
if ($this->tunel_id)
{
global $Tunel;
$tunel = $Tunel->select_by_key($this->tunel_id);
return '<a href="../Slis/view.php?name='.urlencode($tunel->slis_name).'">'.$tunel->slis_name.'</a>';
}
else return "";
}
 
function get_network_link() // return the link to the route network
{
if ($this->network_name)
{
global $Network;
$network = $Network->select_by_key($this->network_name);
return '<a href="../Networks/view.php?name='.urlencode($network->name).'">'.$network->name.'</a>';
}
else return "";
}
 
function get_tunel_name() // return the route tunel name
{
if ($this->tunel_id)
{
global $Tunel;
$tunel = $Tunel->select_by_key($this->tunel_id);
return $tunel->slis_name;
}
else return "";
}
 
function url_gateway() // return the url to the route gateway
{
if ($this->gateway_ip) return "../IPAddress/view.php?ip=".urlencode($this->gateway_ip);
else return "";
}
 
function url_tunel_id() // return the url to the route with tunel and id
{
if ($this->tunel_id)
{
global $Tunel;
$tunel = $Tunel->select_by_key($this->tunel_id);
return "../Networks/route_edit.php?id=$this->id&tunel=".urlencode($tunel->slis_name);
}
else return "";
}
}
 
$Route = Route::get_new();
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/PwdField.php
New file
0,0 → 1,37
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Password Field class
 
include_once("FormField.php");
 
class PwdField extends FormField
{
function PwdField($name, $title, $value = "", $size = 0, $not_null = 0) // Password Field constructor
{
$parent = get_parent_class($this);
$this->$parent($name, $title, $value, $size, $not_null);
}
 
function field_type() // return HTML type to the field (can be redefined)
{
return "password";
}
 
}
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/HAdminUser.php
New file
0,0 → 1,89
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for Slim Admin users
 
include_once("DBClass.php");
include_once("Group.php");
 
class HAdminUser extends DBClass
{
function get_new() // return a new instance of the class
{
return new HAdminUser();
}
 
function db_table() // return the database table for the class
{
return "hadmin_user";
}
 
function db_fields() // return the database fields for the class
{
return array(
"login" => "string",
"id" => "number",
"password" => "string",
"group_id" => "number",
"slis_name" => "string",
);
}
 
function db_key() // return the database key for the class
{
return "id";
}
 
function url_group() // return the url to the user group
{
if ($this->group_id) return "../Admin/group_view.php?id=".$this->group_id;
else return "";
}
 
function url_slis() // return the url to the user Slis
{
if ($this->slis_name) return "../Slis/view.php?name=".urlencode($this->slis_name);
else return "";
}
 
function get_group_id_from_group_name($name) // return the id of a group selected by its name
{
global $Group;
$groups =& $Group->select("name='$name'");
if (count($groups) == 1)
{
$group = $groups[0];
return $group->id;
}
else return "";
}
 
function get_group_name() // return the name of the user group
{
global $Group;
if ($this->group_id)
{
$group = $Group->select_by_key($this->group_id);
if ($group) return $group->name;
}
return "";
}
}
 
$HAdminUser = HAdminUser::get_new();
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/ButtonForm.php
New file
0,0 → 1,66
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Button Form class
 
include_once("Form.php");
 
class ButtonForm extends Form
{
function ButtonForm(&$button, $action = "", $type = 0) // Button Form constructor
{
$parent = get_parent_class($this);
$this->$parent($action, $type);
$this->add_button($button);
}
 
function build_code() // return HTML code for a button form
{
global $slim_theme;
 
$str = "<form action=\"$this->action\">\n";
 
foreach ($this->fields as $field)
{
if ($field->field_type() == "hidden")
{
if ($fmt = $field->format_code($this))
{
$str .= $fmt;
}
}
}
 
$str .= "<table cellspacing=0 border=0>\n";
if ($this->title)
{
$str .= "<caption><b><font".$slim_theme->font_code().">$this->title</font></b></caption>\n";
}
$str .= "<tr><td><font".$slim_theme->font_code().">\n";
foreach ($this->buttons as $button)
{
$str .= $button->cell_code($this);
}
$str .= "</font></td></tr>\n";
$str .= "</table>\n";
$str .= "</form>\n";
return $str;
}
 
}
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/HiddenField.php
New file
0,0 → 1,63
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Hidden Field class
 
include_once("FormField.php");
 
class HiddenField extends FormField
{
function HiddenField($name, $value, $title = "", $not_null = 0) // Hidden Field constructor
{
$parent = get_parent_class($this);
$this->$parent($name, $title, $value, 0, $not_null);
}
 
function format_code(&$form) // return HTML code for formatting fields (redefined)
{
if (!$this->title) return '<input type="'.$this->field_type().'" name="'.$this->name.'" value="'.$this->value.'">'."\n";
;
}
 
function cell_code(&$form) // return HTML code for the second <td> tag of a form field
{
global $slim_theme;
 
$str = "<td".$slim_theme->form_cell_code($this->not_null).">\n";
$str .= "<font".$slim_theme->font_code().">";
if (isset($this->value))
{
if ($this->name)
{
$str .= '<input type="'.$this->field_type().'" name="'.$this->name.'"';
$str .= ' value="'.html_quote($this->value).'"';
$str .= ">";
}
$str .= $this->value;
}
$str .= "</font></td>\n";
return $str;
}
 
function field_type() // return HTML type to the field (can be redefined)
{
return "hidden";
}
 
}
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/Backbone.php
New file
0,0 → 1,64
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for Slim backbones
 
include_once("DBClass.php");
 
class Backbone extends DBClass
{
function get_new() // return a new instance of the class
{
return new Backbone();
}
 
function db_table() // return the database table for the class
{
return "backbone";
}
 
function db_fields() // return the database fields for the class
{
return array(
"id" => "number",
"name" => "string",
);
}
 
function db_key() // return the database key for the class
{
return "id";
}
 
function get_bb_list() // return the list of all backbones in a hash table
{
global $Backbone;
$backbones =& $Backbone->select("","name");
$bbs = array();
$bbs[""] = "";
foreach ($backbones as $backbone)
{
$bbs[$backbone->id] = $backbone->name;
}
return $bbs;
}
 
}
 
$Backbone = Backbone::get_new();
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/Site.php
New file
0,0 → 1,112
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for Slim sites
 
include_once("DBClass.php");
include_once("CIL.php");
include_once("Slis.php");
 
class Site extends DBClass
{
function get_new() // return a new instance of the class
{
return new Site();
}
 
function db_table() // return the database table for the class
{
return "site";
}
 
function db_fields() // return the database fields for the class
{
return array(
"code" => "string",
"name" => "string",
"city" => "string",
"zipcode" => "string",
"phone" => "string",
"type" => "string",
"address" => "string",
"administrative_status" => "string",
"district_code" => "string",
"subtype" => "string",
);
}
 
function db_key() // return the database key for the class
{
return "code";
}
 
function get_deps() // return the possible departements in a hash table
{
return array("" => "",
"07" => "07",
"26" => "26",
"38" => "38",
"73" => "73",
"74" => "74",
);
}
 
function get_types() // return the possible types in a hash table
{
return array("" => "",
"ecole" => "Ecole",
"college" => "Collège",
"lycee" => "Lycée",
"circ" => "Circonscription",
"autres" => "Autre",
);
}
 
function url_district() // return the url to the site district
{
if ($this->district_code) return "view.php?code=".urlencode($this->district_code);
else return "";
}
 
function get_type_name() // return the i18n type name of the site
{
if ($this->type)
{
$types = $this->get_types();
return __($types[$this->type]);
}
else return "";
}
 
function &get_CILs() // return the site CILs
{
global $CIL;
$cils =& $CIL->select("site_code='$this->code'", "last_name,first_name");
return $cils;
}
function &get_linked_slis() // return the list of slis linked to the site
{
global $Slis;
$sliss =& $Slis->select("site_code='$this->code'", "name");
return $sliss;
}
}
 
$Site = Site::get_new();
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/Menu.php
New file
0,0 → 1,146
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management Menu class
 
class Menu
{
function Menu($level = 0) // Menu constructor
{
$this->level = $level;
}
 
function get_offset($level) // return blank image cooresponding to level
{
if ($level)
return html_img("0.gif", "", 0, $level*10);
else
return "";
}
 
function get_link($file, $level = 0) // return html link corresponding to a PHP script
{
global $slim_theme;
 
$fd = fopen($file, "r");
if (!$fd) return ""; // can't open script file
$found = 0;
$script_level = 0;
while (!feof ($fd))
{
$line = fgets($fd, 4096);
$line = chop($line);
if (preg_match ("/\/\/\s*level\s*=\s*(.*)/", $line, $m))
{
$script_level = trim($m[1]);
}
if (preg_match ("/\/\/\s*name\s*=\s*(.*)/", $line, $m))
{
$name = trim($m[1]);
$found++;
}
if (preg_match ("/\/\/\s*desc\s*=\s*(.*)/", $line, $m))
{
$desc = trim($m[1]);
$found++;
}
if ($found == 2) break;
}
fclose($fd);
if ($found == 2 && $script_level <= $this->level)
{
if ($script_level > 0) {
return "<tr valign=center><td nowrap><font".$slim_theme->menu_font_code()."><I>".$this->get_offset($level).html_link($file, html_img("doc.gif", __($desc)))." ".html_link($file, __($name))."</I></font></td></tr>\n";
}
else {
return "<tr valign=center><td nowrap><font".$slim_theme->menu_font_code().">".$this->get_offset($level).html_link($file, html_img("doc.gif", __($desc)))." ".html_link($file, __($name))."</font></td></tr>\n";
}
}
else
{
return "";
}
}
 
function get_tree($root, $level = 0) // return html tree from a root menu (recursive)
{
global $slim_theme;
 
if (!file_exists("$root/README")) return ""; // ignored directory
 
$fd = fopen("$root/README", "r");
if (!$fd) return ""; // can't open README file
 
$str = "";
$sdstr = "";
 
while (!feof ($fd))
{
$line = fgets($fd, 4096);
$line = chop($line);
if (preg_match ("/([^=]+)=(.*)/", $line, $m))
{
$key = trim($m[1]);
$val = trim($m[2]);
$dir_info[$key] = $val;
}
}
fclose($fd);
 
if ($dir_info["level"] > $this->level) return "";
 
if (!$dir_info["hide"])
{
$str .= "<tr valign=center><td nowrap><font".$slim_theme->menu_font_code().">";
if ($dir_info["line"]) $str .= "<hr>";
else $str .= "<br>";
$str .= $this->get_offset($level);
$str .= html_img("dir.gif", __($dir_info["desc"]))." <b>".__($dir_info["name"]);
$str .= "</b></font></td></tr>\n";
$level++;
}
 
$dd = opendir($root);
if (!$dd) return $str; // can't open directory
 
$files = array();
while ($file = readdir($dd))
{
array_push($files, $file);
}
closedir($dd);
sort($files);
foreach ($files as $file)
{
if (substr($file,0,1) == ".") continue; // file ignored
if (is_dir("$root/$file"))
{
$sdstr .= $this->get_tree("$root/$file", $level);
}
else if (substr($file,-4) == ".php")
{
$str .= $this->get_link("$root/$file", $level);
}
}
 
$str .= $sdstr;
 
return $str;
}
}
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/config.php
New file
0,0 → 1,38
<?
/* $Id$
 
This script has been written by Bruno Bzeznik
Copyright (C) 2002 Bruno Bzeznik <Bruno@ac-grenoble.fr>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2002 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
$include_dir= "/var/www/html/carmi-internet/slis/slimplugins/dashboard/include";
 
$slim_name = "SLIM DASHBOARD";
$slim_msg = "";
 
$slim_db_host = "sql.ac-grenoble.fr";
$slim_db_port = "5432";
$slim_db_name = "slimplugins";
$slim_db_user = "slimdashboard";
$slim_db_pass = "mypass";
 
$lang = "fr";
$theme = "default";
 
$online = "0"; // If set to 1, then a ping test will be done and a status
// coll added with the online status of each SLIS.
 
// Don't edit bellow
ini_set("include_path",".:$include_dir");
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/CIL.php
New file
0,0 → 1,76
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for Slim CILs
 
include_once("DBClass.php");
include_once("Site.php");
 
class CIL extends DBClass
{
function get_new() // return a new instance of the class
{
return new CIL();
}
 
function db_table() // return the database table for the class
{
return "cil";
}
 
function db_fields() // return the database fields for the class
{
return array(
"id" => "number",
"site_code" => "string",
"first_name" => "string",
"last_name" => "string",
"email" => "string",
"telephone_number" => "string",
"postal_address" => "string",
);
}
 
function db_key() // return the database key for the class
{
return "id";
}
 
function get_full_name() // return the CIL full name
{
return "$this->last_name $this->first_name";
}
 
function url_site() // return the url to the CIL site
{
if ($this->site_code) return "../Sites/view.php?code=".urlencode($this->site_code);
else return "";
}
 
function get_site_link() // return the link to the CIL site
{
if ($this->site_code)
{
return '<a href="../Sites/view.php?code='.$this->site_code.'">'.$this->site_code.'</a>';
}
else return "";
}
}
 
$CIL = CIL::get_new();
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/UpdaterField.php
New file
0,0 → 1,53
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Table Updater Field class
 
include_once("Field.php");
 
class UpdaterField extends Field
{
function UpdaterField($name, $title, $field = "", $fmt_str = "", $fmt_meth = "") // Table Updater Field constructor
{
$parent = get_parent_class($this);
$this->$parent($name, $title, $fmt_str, $fmt_meth);
$this->field = $field;
}
 
function obj_code(&$object) // return HTML code for an object cell (can be redefined)
{
$attr = $this->name;
if ($this->fmt_meth)
{
$meth = $this->fmt_meth;
$txt = $object->$meth();
}
else if ($this->fmt_str)
{
$txt = sprintf($this->fmt_str, $object->$attr);
}
else
{
$txt = $object->$attr;
}
 
if ($this->field) return '<b><a href="'.$REQUEST_URI.'" onclick=\'window.opener.document.forms[0].'.$this->field.'.value = "'.$txt.'";window.close();return false\'>'.$txt.'</a></b>';
else return $txt;
}
}
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/View.php
New file
0,0 → 1,78
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for setup.data file default values
include_once("DBClass.php");
 
class View extends DBClass
{
function get_new() // return a new instance of the class
{
return new View();
}
 
function db_table() // return the database table for the class
{
return "views";
}
 
function db_fields() // return the database fields for the class
{
return array(
"id" => "number",
"table_name" => "string",
"name" => "string",
"request" => "string",
);
}
 
function db_key() // return the database key for the class
{
return "id";
}
 
function set_value(&$object) // set the defvalue value for an object
{
$field = $this->fieldname;
$method = $this->method;
if ($method)
{
$object->$field = $object->$method();
}
else
{
$object->$field = $this->value;
}
return $object->$field;
}
 
function url_access() // return the url for default value edition
{
global $slim_user;
global $SCRIPT_NAME;
 
if ($slim_user->login != "admin") return ""; // restrict access to "admin" user
 
return "$SCRIPT_NAME?id=$this->id";
}
 
}
 
$View = View::get_new();
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/general.php
New file
0,0 → 1,28
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
include_once("config.php");
// include_once("user.php");
include_once("i18n.php");
include_once("html.php");
 
$slim_db= pg_connect("host=$slim_db_host port=$slim_db_port dbname=$slim_db_name user=$slim_db_user password=$slim_db_pass");
pg_query($slim_db,"SET add_missing_from TO TRUE;");
 
 
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/IPAddress.php
New file
0,0 → 1,166
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for Slim IP address
 
include_once("DBClass.php");
include_once("DNS.php");
include_once("Slis.php");
 
class IPAddress extends DBClass
{
function get_new() // return a new instance of the class
{
return new IPAddress();
}
 
function db_table() // return the database table for the class
{
return "ipaddress";
}
 
function db_fields() // return the database fields for the class
{
return array(
"ip" => "string",
"ip_nat" => "string",
"nat_router_ip" => "string",
"comment" => "string",
"network_name" => "string",
"dns_id" => "number",
"mac" => "string",
);
}
 
function db_key() // return the database key for the class
{
return "ip";
}
 
function get_dns_id_from_dns_name($name) // return the dns id corresponding to a dns name
{
if (preg_match ("/^([^\.]*)\.(.*)$/", $name, $m))
{
global $DNS;
$dnss =& $DNS->select("host='$m[1]' and domain='$m[2]'");
if (count($dnss) == 1)
{
$dns = $dnss[0];
return $dns->id;
}
}
return "";
}
 
function url_network() // return the url to the ipaddress network
{
if ($this->network_name) return "../Networks/view.php?name=".urlencode($this->network_name);
else return "";
}
 
function url_dns() // return the url to the ipaddress DNS
{
if ($this->dns_id) return "../DNS/view.php?id=".$this->dns_id;
else return "";
}
 
function get_dns_name() // return the name of the IPAddress DNS
{
if ($this->dns_id)
{
global $DNS;
$dns = $DNS->select_by_key($this->dns_id);
return $dns->get_name();
}
else return "";
}
 
function get_router_ip_from_router_name($name) // return the ip address corresponding to a router name
{
if ($name)
{
list($host,$domain)=explode(".",$name,2);
global $IPAddress;
$ips=& $IPAddress->select("dns_id in (select cname_parent from dns_entry where host='$host' and domain='$domain')");
if (count($ips) == 1)
{
$ip = $ips[0];
return $ip->ip;
}
$ips =& $IPAddress->select("dns_id in (select id from dns_entry where host='$host' and domain='$domain')");
if (count($ips) == 1)
{
$ip = $ips[0];
return $ip->ip;
}
else return $name;
}
else return "";
}
 
function url_router() // return the url to the ipaddress router
{
if ($this->nat_router_ip) return "view.php?ip=".$this->nat_router_ip;
else return "";
}
 
function url_slis() // return the url to the ipaddress slis
{
if ($this->ip_nat)
{
global $Slis;
$sliss =& $Slis->select("ip_wan='$this->ip_nat'");
if (count($sliss) == 1)
{
$slis = $sliss[0];
return "../Slis/view.php?name=".$slis->name;
}
}
return "";
}
 
function get_router_name() // return the name of the IPAddress router name
{
if ($this->nat_router_ip)
{
global $IPAddress;
$ipr = $IPAddress->select_by_key($this->nat_router_ip);
return $ipr->get_dns_name();
}
else return "";
}
 
}
 
$IPAddress = IPAddress::get_new();
 
function ipaddress_ip_cmp($a, $b) // compare to ip addresses
{
return strnatcmp($a->ip, $b->ip);
}
 
function is_rfc1918($ip) // return 1 if the ip is RCF1918
{
list($a,$b,$c,$d)=explode(".",$ip);
if ($a == 10) { return 1; }
if ($a == 192 && $b == 168) { return 1; }
if ($a == 172 && $b < 32 && $b > 15) { return 1; }
return 0;
}
 
?>
Property changes:
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/ImageButton.php
New file
0,0 → 1,62
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Image Button class
 
include_once("Button.php");
 
class ImageButton extends Button
{
function ImageButton($src, $name = "", $text = "", $i18n = 1, $border = 0) // Image Button constructor
{
$parent = get_parent_class($this);
$this->$parent($src, $name);
$this->i18n = $i18n;
$this->border = $border;
$this->text = $text;
}
 
function cell_code(&$form) // return HTML code for the second <td> tag of a form field
{
global $slim_user;
 
if ($this->i18n) $str = '<input type="image" src="/slimg/'.$slim_user->theme.'/'.$slim_user->lang.'/'.$this->value.'"';
else $str = '<input type="image" src="/slimg/'.$slim_user->theme.'/'.$this->value.'"';
if ($this->name)
{
$str .= " name=\"$this->name\"";
}
$str .= " border=\"$this->border\"";
if ($this->text)
{
$text2 = html_quote($this->text);
$str .= " alt=\"$text2\" title=\"$text2\"";
}
if ($this->disable)
{
$str .= " onclick='alert(\"$this->disable\"); return false;'";
}
else if ($this->confirm)
{
$str .= " onClick='if (confirm(\"$this->confirm\")) return true; else return false;'";
}
$str .= ">\n";
return $str;
}
}
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/user.php
New file
0,0 → 1,28
<?PHP
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
 
// Slis Management connect to database and get slim_user
 
include_once("User.php");
 
$slim_db= pg_connect("host=$slim_db_host port=$slim_db_port dbname=$slim_db_name user=$slim_db_user password=$slim_db_pass");
pg_query($slim_db,"SET add_missing_from TO TRUE;");
 
$slim_user = $User->select_by_key($PHP_AUTH_USER);
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/ColField.php
New file
0,0 → 1,41
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML New Column Field class
 
include_once("FormField.php");
 
class ColField extends FormField
{
function ColField() // New Column Field constructor
{
}
 
function format_code(&$form) // return HTML code for formatting fields (redefined)
{
global $slim_theme;
$form->cols++;
return "</table></td>\n<td><table".$slim_theme->form_code2().">\n";
}
 
function update_object(&$object) // update an object from a field value (can be redefined)
{
}
 
}
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/FileField.php
New file
0,0 → 1,37
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML File Upload Field class
 
include_once("FormField.php");
 
class FileField extends FormField
{
function FileField($name, $title, $size = 0) // File Upload Field constructor
{
$parent = get_parent_class($this);
$this->$parent($name, $title, "", $size);
}
 
function field_type() // return HTML type to the field (can be redefined)
{
return "file";
}
 
}
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/Field.php
New file
0,0 → 1,79
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Table Field class
 
class Field
{
function Field($name, $title, $fmt_str = "", $fmt_meth = "") // Table Field constructor
{
$this->name = $name;
$this->title = $title;
$this->fmt_str = $fmt_str;
$this->fmt_meth = $fmt_meth;
}
 
function header_code() // return HTML code for the <th> tag of a field
{
global $slim_theme;
 
$str = "<th".$slim_theme->th_code().">\n";
if ($this->title)
{
$str .= "<font".$slim_theme->font_code().">";
$str .= __($this->title);
$str .= "</font>";
}
else $str .= "&nbsp;";
$str .= "</th>\n";
return $str;
}
 
function cell_code(&$object, $ofs) // return HTML code for the <td> tag of a field
{
global $slim_theme;
 
$str = "<td".$slim_theme->td_code($ofs).">\n";
$str .= "<font".$slim_theme->font_code().">";
$str2 = $this->obj_code(&$object);
if ($str2)
$str .= $str2;
else
$str .= "&nbsp;";
$str .= "</font>";
$str .= "</td>\n";
return $str;
}
 
function obj_code(&$object) // return HTML code for an object cell (can be redefined)
{
if ($this->fmt_meth)
{
$meth = $this->fmt_meth;
return $object->$meth();
}
$attr = $this->name;
if ($this->fmt_str)
{
return sprintf($this->fmt_str, $object->$attr);
}
return $object->$attr;
}
 
}
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/Table.php
New file
0,0 → 1,88
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Table class
 
class Table
{
function Table($num = 0) // Table constructor
{
$this->fields = array();
$this->num = $num;
}
 
function add_field(&$field) // add a field to the table
{
array_push($this->fields, $field);
}
 
function set_title() // set the table title
{
$nb_args = func_num_args();
$args = func_get_args();
$title = __(array_shift($args));
if ($nb_args > 1)
{
array_unshift($args, $title);
$title = call_user_func_array('sprintf', $args);
}
$this->title = $title;
}
 
function build_code(&$objects) // return HTML code for a table filled with objects
{
global $slim_theme;
 
$str = "<table".$slim_theme->table_code().">\n";
if ($this->title)
{
$str .= "<caption><b><font".$slim_theme->font_code().">$this->title</font></b></caption>\n";
}
$str .= "<tr align=\"center\">\n";
if ($this->num)
{
$str .= "<td".$slim_theme->th_code().">".html_img("count.gif", count($objects))."</td>\n";
}
foreach ($this->fields as $field)
{
$str .= $field->header_code();
}
$ofs = 0;
$num = 1;
foreach ($objects as $object)
{
$str .= "<tr>\n";
if ($this->num)
{
$str .= "<td align=center".$slim_theme->th_code()."><font size=\"-1\">$num</font></td>\n";
}
foreach ($this->fields as $field)
{
$str .= $field->cell_code(&$object, $ofs);
}
$ofs = 1 - $ofs;
$str .= "</tr>\n";
$num++;
}
$str .= "</tr>\n";
$str .= "</table>\n";
return $str;
}
 
}
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/Line.php
New file
0,0 → 1,118
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for Slim lines
 
include_once("DBClass.php");
include_once("Pop.php");
include_once("IPAddress.php");
 
class Line extends DBClass
{
function get_new() // return a new instance of the class
{
return new Line();
}
 
function db_table() // return the database table for the class
{
return "pop_line";
}
 
function db_fields() // return the database fields for the class
{
return array(
"pop_id" => "number",
"router_ip" => "string",
"type" => "string",
"number" => "string",
"channels" => "number",
"comment" => "string",
);
}
 
function db_key() // return the database key for the class
{
return "number";
}
 
function get_router_ip_from_router_name($name) // return the ip address corresponding to a router name
{
if (preg_match ("/^([^\.]*)\.(.*)$/", $name, $m))
{
global $IPAddress;
$ips =& $IPAddress->select("dns_id in (select id from dns_entry where host='$m[1]' and domain='$m[2]')");
if (count($ips) == 1)
{
$ip = $ips[0];
return $ip->ip;
}
else return $name;
}
else return "";
}
 
function get_pop_id_from_pop_name($name) // return the id of a pop selected by its name
{
global $Pop;
$pops =& $Pop->select("name='$name'");
if (count($pops) == 1)
{
$pop = $pops[0];
return $pop->id;
}
else return "";
}
 
function url_pop() // return the url to the line pop
{
if ($this->pop_id) return "view.php?id=".$this->pop_id;
else return "";
}
 
function get_pop_name() // return the line pop name
{
if ($this->pop_id)
{
global $Pop;
$pop = $Pop->select_by_key($this->pop_id);
return $pop->name;
}
else return "";
}
 
function url_router() // return the url to the line router
{
if ($this->router_ip) return "../IPAddress/view.php?ip=".urlencode($this->router_ip);
else return "";
}
 
function get_pop_link() // return the link to the line pop
{
if ($this->pop_id)
{
global $Pop;
$pop = $Pop->select_by_key($this->pop_id);
return '<a href="view.php?id='.$this->pop_id.'">'.$pop->name.'</a>';
}
else return "";
}
}
 
$Line = Line::get_new();
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/Tunel.php
New file
0,0 → 1,97
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for Slim tunels
 
include_once("DBClass.php");
include_once("Route.php");
 
class Tunel extends DBClass
{
function get_new() // return a new instance of the class
{
return new Tunel();
}
 
function db_table() // return the database table for the class
{
return "slis_tunel";
}
 
function db_fields() // return the database fields for the class
{
return array(
"id" => "number",
"slis_name" => "string",
"server_ip" => "string",
"port" => "number",
"proto" => "string",
"tun_slis_ip" => "string",
"tun_svr_ip" => "string",
"login" => "string",
"password" => "string",
"type" => "string",
);
}
 
function db_key() // return the database key for the class
{
return "id";
}
 
function get_protos() // return the possible tunel protos in a hash table
{
return array("tcp" => "tcp",
"udp" => "udp",
);
}
 
function get_types() // return the possible tunel protos in a hash table
{
return array("vtun" => "vtun",
"ipsec" => "ipsec",
);
}
 
function url_server() // return the url to the Slis server
{
if ($this->server_ip) return "../IPAddress/view.php?ip=".urlencode($this->server_ip);
else return "";
}
 
function url_slis() // return the url to the tunel Slis
{
if ($this->slis_name) return "view.php?name=".urlencode($this->slis_name);
else return "";
}
 
function get_slis_name() // return the tunel Slis name
{
return $this->slis_name;
}
 
function &get_routes() // return the tunel routes
{
global $Route;
$routes =& $Route->select("tunel_id='$this->id'", "id");
return $routes;
}
}
 
$Tunel = Tunel::get_new();
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/TextField.php
New file
0,0 → 1,74
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Form Field class
 
include_once("FormField.php");
 
class TextField extends FormField
{
function TextField($name, $title, $value = "", $rows = 0, $cols = 0, $wrap = 1, $not_null = 0) // Text Field constructor
{
$parent = get_parent_class($this);
$this->$parent($name, $title, $value, 0, $not_null);
$this->rows = $rows;
$this->cols = $cols;
$this->wrap = $wrap;
}
 
function cell_code(&$form) // return HTML code for the second <td> tag of a form field
{
global $slim_theme;
 
$str = "<td".$slim_theme->form_cell_code($this->not_null).">\n";
$str .= "<font".$slim_theme->font_code().">";
$str .= '<textarea name="'.$this->name.'"';
if ($this->wrap)
{
$str .= ' wrap="hard"';
}
if ($this->rows)
{
$str .= ' rows="'.$this->rows.'"';
}
if ($this->cols)
{
$str .= ' cols="'.$this->cols.'"';
}
if ($this->readonly)
{
$str .= " readonly onfocus='blur()'";
}
$str .= ">$this->value</textarea></font>";
if ($this->help_url)
{
$str .= ' <input type="submit" value=" ... " onclick=\'help=window.open("'.$this->help_url.'","help","toolbar=no,menubar=no,scrollbars=yes,width='.$this->help_width.',height='.$this->help_height.',resizable=yes");help.opener=self;return false\'>';
}
if ($this->erase)
{
if ($this->other_field)
$str2 = 'document.forms[0].'.$this->other_field.'.value="'.$this->other_value.'";';
else
$str2 = "";
$str .= ' <input type="submit" value=" x " onclick=\'document.forms[0].'.$this->name.'.value="'.$this->erase_value.'";'.$str2.'return false\'>';
}
$str .= "</td>\n";
return $str;
}
}
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/CheckboxField.php
New file
0,0 → 1,66
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Checkbox Field class
 
include_once("FormField.php");
 
class CheckboxField extends FormField
{
function CheckboxField($name, $title, $value = "") // Checkbox Field constructor
{
$parent = get_parent_class($this);
$this->$parent($name, $title, $value, 0, 0);
}
 
function cell_code(&$form) // return HTML code for the second <td> tag of a form field
{
global $slim_theme;
 
$str = "<td".$slim_theme->form_cell_code($this->not_null).">\n";
$str .= "<font".$slim_theme->font_code().">";
$str .= '<input type="'.$this->field_type().'" name="'.$this->name.'" value="t"';
if ($this->value == "t")
{
$str .= ' checked';
}
$str .= "></font>";
$str .= "</td>\n";
return $str;
}
 
function field_type() // return HTML type to the field (can be redefined)
{
return "checkbox";
}
 
function update_object(&$object) // update an object from a field value (can be redefined)
{
$field_name = $this->name;
if ($GLOBALS[$field_name])
{
$object->$field_name = "t";
}
else
{
$object->$field_name = "f";
}
}
 
}
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/LineField.php
New file
0,0 → 1,40
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Line Separator Field class
 
include_once("FormField.php");
 
class LineField extends FormField
{
function LineField() // New Line Separator Field constructor
{
}
 
function format_code(&$form) // return HTML code for formatting fields (redefined)
{
global $slim_theme;
return "<tr><td colspan=2><hr></td></tr>\n";
}
 
function update_object(&$object) // update an object from a field value (can be redefined)
{
}
 
}
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/Pop.php
New file
0,0 → 1,196
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for Slim pops
 
include_once("DBClass.php");
include_once("Backbone.php");
include_once("DNS.php");
include_once("Slis.php");
include_once("Line.php");
 
class Pop extends DBClass
{
function get_new() // return a new instance of the class
{
return new Pop();
}
 
function db_table() // return the database table for the class
{
return "pop";
}
 
function db_fields() // return the database fields for the class
{
return array(
"id" => "number",
"backbone_id" => "number",
"name" => "string",
"location" => "string",
"proxy" => "number",
"primary_dns" => "number",
"secondary_dns" => "number",
"smtp" => "number",
"mailhost" => "number",
);
}
 
function db_key() // return the database key for the class
{
return "id";
}
 
function get_bb_name() // return the name of the network backbone
{
global $Backbone;
if ($this->backbone_id)
{
$backbone = $Backbone->select_by_key($this->backbone_id);
if ($backbone) return $backbone->name;
}
return "";
}
 
function get_proxy_name() // return the name of the pop proxy
{
if ($this->proxy)
{
global $DNS;
$dns = $DNS->select_by_key($this->proxy);
return $dns->get_name();
}
else return "";
}
 
function get_primary_dns_name() // return the name of the pop primary DNS
{
if ($this->primary_dns)
{
global $DNS;
$dns = $DNS->select_by_key($this->primary_dns);
return $dns->get_name();
}
else return "";
}
 
function get_primary_dns() // return the name of the pop primary DNS
{
if ($this->primary_dns)
{
global $DNS;
$dns = $DNS->select_by_key($this->primary_dns);
return $dns->ip;
}
else return "";
}
 
function get_secondary_dns_name() // return the name of the pop secondary DNS
{
if ($this->secondary_dns)
{
global $DNS;
$dns = $DNS->select_by_key($this->secondary_dns);
return $dns->get_name();
}
else return "";
}
 
function get_smtp_name() // return the name of the pop smtp
{
if ($this->smtp)
{
global $DNS;
$dns = $DNS->select_by_key($this->smtp);
return $dns->get_name();
}
else return "";
}
 
function get_mailhost_name() // return the name of the pop mailhost
{
if ($this->mailhost)
{
global $DNS;
$dns = $DNS->select_by_key($this->mailhost);
return $dns->get_name();
}
else return "";
}
 
function get_pop_list() // return the list of all pops in a hash table
{
global $Pop;
$pops =& $Pop->select("","name");
$pps = array();
$pps["0"] = "";
foreach ($pops as $pop)
{
$pps[$pop->id] = $pop->name;
}
return $pps;
}
 
function &get_lines() // return the pop lines
{
global $Line;
$lines =& $Line->select("pop_id=$this->id");
return $lines;
}
 
function url_proxy() // return the url to the pop proxy
{
if ($this->proxy) return "../DNS/view.php?id=".$this->proxy;
else return "";
}
 
function url_primary_dns() // return the url to the pop primary dns
{
if ($this->primary_dns) return "../DNS/view.php?id=".$this->primary_dns;
else return "";
}
 
function url_secondary_dns() // return the url to the pop secondary dns
{
if ($this->secondary_dns) return "../DNS/view.php?id=".$this->secondary_dns;
else return "";
}
 
function url_smtp() // return the url to the pop smtp
{
if ($this->smtp) return "../DNS/view.php?id=".$this->smtp;
else return "";
}
 
function url_mailhost() // return the url to the pop mailhost
{
if ($this->mailhost) return "../DNS/view.php?id=".$this->mailhost;
else return "";
}
 
function &get_linked_slis() // return the list of slis linked to the pop
{
global $Slis;
$sliss =& $Slis->select("pop_id=$this->id", "name");
return $sliss;
}
 
}
 
$Pop = Pop::get_new();
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/ProfileRight.php
New file
0,0 → 1,86
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for Slim profile right links
 
include_once("DBClass.php");
include_once("Profile.php");
 
class ProfileRight extends DBClass
{
function get_new() // return a new instance of the class
{
return new ProfileRight();
}
 
function db_table() // return the database table for the class
{
return "profile_right";
}
 
function db_fields() // return the database fields for the class
{
return array(
"id" => "number",
"profile_id" => "number",
"right_name" => "string",
);
}
 
function db_key() // return the database key for the class
{
return "id";
}
 
function url_right() // return the url to the ProfileRight right
{
if ($this->right_name) return "right_view.php?name=".urlencode($this->right_name);
else return "";
}
 
function url_profile() // return the url to the ProfileRight profile
{
if ($this->profile_id) return "profile_view.php?id=".$this->profile_id;
else return "";
}
 
function get_rm_link() // return the link to remove a ProfileRight
{
return html_link("profile_view.php?id=$this->profile_id&rm_right=$this->id", html_img("trash.gif",__("Retrait du droit")), "", sprintf(__("Voulez-vous réellement retirer le droit %s du profile %s ?"), $this->right_name, $this->get_profile_name()));
}
 
function get_rm_link2() // return the link to remove a ProfileRight
{
return html_link("right_view.php?name=".urlencode($this->right_name)."&rm_profile=$this->id", html_img("trash.gif",__("Retrait du profile")), "", sprintf(__("Voulez-vous réellement retirer le profile %s du droit %s ?"), $this->get_profile_name(), $this->right_name));
}
 
function get_profile_name() // return the name of the ProfileRight profile
{
global $Profile;
if ($this->profile_id)
{
$profile = $Profile->select_by_key($this->profile_id);
if ($profile) return $profile->name;
}
return "";
}
 
}
 
$ProfileRight = ProfileRight::get_new();
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/default/dir.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/default/tux.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/default/trash.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/default/theme.php
New file
0,0 → 1,56
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
 
// Slis Management default theme definition
 
include_once("Theme.php");
 
$slim_theme = new Theme("default");
 
$slim_theme->font_face = "Helvetica,Arial";
$slim_theme->menu_font_size = "-1";
 
$slim_theme->menu_width = 120;
$slim_theme->menu_height = 34;
 
$slim_theme->bg_color = "white";
$slim_theme->link_color = "#CC0000";
$slim_theme->vlink_color = "#CC0000";
 
$slim_theme->menu_bg_color = "#9999CC";
$slim_theme->menu_text_color = "white";
$slim_theme->menu_link_color = "white";
$slim_theme->menu_vlink_color = "white";
$slim_theme->menu_alink_color = "#660000";
 
$slim_theme->topleft_bg_color = "#AAAAAA";
$slim_theme->topleft_bg_pixmap = "topleftbg.jpg";
 
$slim_theme->table_border = 2;
$slim_theme->cell_spacing = 0;
$slim_theme->th_bg_color = "#CCCCFF";
$slim_theme->td_bg_color0 = "#EEEEFF";
$slim_theme->td_bg_color1 = "#FFEEFF";
 
$slim_theme->form_border = 2;
$slim_theme->form_margin = 5;
$slim_theme->form_spacing = 1;
$slim_theme->form_bg_color = "#DDDDFF";
$slim_theme->form_bg_color2 = "#DDFFFF";
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/default/slimlogo.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/default/php.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/default/count.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/default/0.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/default/topleftbg.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/default/more.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/default/slim.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/default/doc.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/default/less.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/default/postgres.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/default/logout.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix/more.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix/bg.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix/slim.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix/doc.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix/less.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix/postgres.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix/logout.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix/dir.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix/tux.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix/trash.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix/theme.php
New file
0,0 → 1,54
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
 
// Slis Management default theme definition
 
include_once("Theme.php");
 
$slim_theme = new Theme("matrix");
 
$slim_theme->font_face = "Helvetica,Arial";
$slim_theme->menu_font_size = "-1";
 
$slim_theme->menu_width = 130;
$slim_theme->menu_height = 28;
 
$slim_theme->bg_color = "black";
$slim_theme->bg_pixmap = "bg.jpg";
$slim_theme->text_color = "white";
$slim_theme->link_color = "#00FF00";
$slim_theme->vlink_color = "#00FF00";
$slim_theme->alink_color = "#00FF00";
 
$slim_theme->menu_bg_color = "black";
$slim_theme->menu_bg_pixmap = "menubg.jpg";
 
$slim_theme->table_border = 1;
$slim_theme->cell_spacing = 0;
$slim_theme->cell_padding = 5;
$slim_theme->th_bg_color = "black";
$slim_theme->td_bg_color0 = "#668866";
$slim_theme->td_bg_color1 = "#446644";
 
$slim_theme->form_border = 1;
$slim_theme->form_margin = 5;
$slim_theme->form_spacing = 5;
$slim_theme->form_bg_color = "#446644";
$slim_theme->form_bg_color2 = "#668866";
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix/slimlogo.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix/php.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix/menubg.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix/count.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix/0.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/mozilla/tux.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/mozilla/trash.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/mozilla/theme.php
New file
0,0 → 1,51
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
 
// Slis Management mozilla theme definition
 
include_once("Theme.php");
 
$slim_theme = new Theme("mozilla");
 
$slim_theme->font_face = "Helvetica,Arial";
$slim_theme->menu_font_size = "-1";
 
$slim_theme->menu_width = 120;
$slim_theme->menu_height = 34;
 
$slim_theme->bg_color = "#C5D2DE";
$slim_theme->link_color = "black";
$slim_theme->vlink_color = "#444444";
 
$slim_theme->menu_bg_pixmap = "menubg.jpg";
 
$slim_theme->table_border = 2;
$slim_theme->cell_spacing = 0;
$slim_theme->cell_padding = 4;
$slim_theme->th_bg_color = "#D5D6D5";
$slim_theme->th_bg_pixmap = "thbg.jpg";
$slim_theme->td_bg_color0 = "#FFFFFF";
$slim_theme->td_bg_color1 = "#EEEEEE";
 
$slim_theme->form_border = 2;
$slim_theme->form_margin = 2;
$slim_theme->form_spacing = 4;
$slim_theme->form_bg_color = "#EEF4F4";
$slim_theme->form_bg_pixmap2 = "formbg2.jpg";
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/mozilla/slimlogo.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/mozilla/php.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/mozilla/menubg.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/mozilla/count.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/mozilla/0.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/mozilla/thbg.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/mozilla/more.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/mozilla/slim.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/mozilla/doc.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/mozilla/less.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/mozilla/postgres.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/mozilla/formbg2.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/mozilla/logout.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/mozilla/dir.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
Added: svn:mime-type
+ application/octet-stream
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix_compact/theme.php
New file
0,0 → 1,55
<?PHP
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
 
// Slis Management default theme definition
 
include_once("Theme.php");
 
$slim_theme = new Theme("matrix");
 
$slim_theme->font_face = "Helvetica,Arial";
$slim_theme->menu_font_size = "-2";
$slim_theme->font_size = "-1";
 
$slim_theme->menu_width = 105;
$slim_theme->menu_height = 28;
 
$slim_theme->bg_color = "black";
$slim_theme->bg_pixmap = "bg.jpg";
$slim_theme->text_color = "white";
$slim_theme->link_color = "#00FF00";
$slim_theme->vlink_color = "#00FF00";
$slim_theme->alink_color = "#00FF00";
 
$slim_theme->menu_bg_color = "black";
$slim_theme->menu_bg_pixmap = "menubg.jpg";
 
$slim_theme->table_border = 1;
$slim_theme->cell_spacing = 0;
$slim_theme->cell_padding = 3;
$slim_theme->th_bg_color = "black";
$slim_theme->td_bg_color0 = "#668866";
$slim_theme->td_bg_color1 = "#446644";
 
$slim_theme->form_border = 1;
$slim_theme->form_margin = 3;
$slim_theme->form_spacing = 3;
$slim_theme->form_bg_color = "#446644";
$slim_theme->form_bg_color2 = "#668866";
 
?>
Property changes:
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix_compact/slimlogo.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix_compact/php.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix_compact/count.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:keywords
+ Id
Added: svn:mime-type
+ application/octet-stream
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix_compact/menubg.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix_compact/0.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix_compact/more.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix_compact/bg.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix_compact/slim.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:keywords
+ Id
Added: svn:mime-type
+ application/octet-stream
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix_compact/doc.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix_compact/less.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix_compact/postgres.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix_compact/logout.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix_compact/dir.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix_compact/tux.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/themes/matrix_compact/trash.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/Profile.php
New file
0,0 → 1,90
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for Slim profiles
 
include_once("DBClass.php");
include_once("User.php");
include_once("ProfileRight.php");
 
class Profile extends DBClass
{
function get_new() // return a new instance of the class
{
return new Profile();
}
 
function db_table() // return the database table for the class
{
return "profile";
}
 
function db_fields() // return the database fields for the class
{
return array(
"id" => "number",
"name" => "string",
"comment" => "string",
);
}
 
function db_key() // return the database key for the class
{
return "id";
}
 
function get_prof_list() // return the list of all profiles in a hash table
{
global $Profile;
$profiles =& $Profile->select("","name");
$bbs = array();
$bbs["0"] = "";
foreach ($profiles as $profile)
{
$bbs[$profile->id] = $profile->name;
}
return $bbs;
}
 
function &get_accounts() // return the profile accounts
{
global $User;
$accounts =& $User->select("profile_id='$this->id'", "login");
return $accounts;
}
 
function &get_rights() // return the profile rights
{
global $ProfileRight;
$rights =& $ProfileRight->select("profile_id='$this->id'", "right_name");
return $rights;
}
 
function get_right_link() // return the link to add a profile to a right
{
global $right;
if ($this->name)
return '<b><a target="slim" href="'.$REQUEST_URI.'"onclick=\'window.opener.location.href="right_view.php?name='.urlencode($right).'&add_profile='.$this->id.'";window.close();return false\'>'.$this->name.'</a></b>';
else
return "";
}
 
}
 
$Profile = Profile::get_new();
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/GroupField.php
New file
0,0 → 1,62
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Group Field class
 
include_once("FormField.php");
 
class GroupField extends FormField
{
function GroupField($title, $not_null = 0) // Group Field constructor
{
$parent = get_parent_class($this);
$this->$parent("", $title, "", 0, $not_null);
$this->fields = array();
}
 
function add_field(&$field) // add a field to the group
{
array_push($this->fields, &$field);
}
 
function cell_code(&$form) // return HTML code for the second <td> tag of a form field
{
global $slim_theme;
 
$str = "<td".$slim_theme->form_cell_code($this->not_null).">\n";
$str .= "<table width=100% border=0 cellpadding=0 cellspacing=0><tr>\n";
$sep = "";
foreach ($this->fields as $field)
{
$str .= $field->header_code($this);
$str .= $field->cell_code($this);
}
$str .= "</tr></table></td>\n";
return $str;
}
 
function update_object(&$object) // update an object from a field value (can be redefined)
{
foreach ($this->fields as $field)
{
$field->update_object($object);
}
}
 
}
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/LinkField.php
New file
0,0 → 1,68
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Table Link Field class
 
include_once("Field.php");
 
class LinkField extends Field
{
function LinkField($name, $title, $url_script = "", $url_attr = "", $url_meth = "", $fmt_str = "", $fmt_meth = "") // Table Link Field constructor
{
global $SCRIPT_NAME;
$parent = get_parent_class($this);
$this->$parent($name, $title, $fmt_str, $fmt_meth);
if ($url_script) $this->url_script = $url_script;
else $this->url_script = $SCRIPT_NAME;
if ($url_attr) $this->url_attr = $url_attr;
else $this->url_attr = $name;
$this->url_meth = $url_meth;
}
 
function obj_code(&$object) // return HTML code for an object cell (can be redefined)
{
$attr = $this->name;
$attr2 = $this->url_attr;
if ($this->url_meth)
{
$meth = $this->url_meth;
$url = $object->$meth();
}
else
{
$url = $this->url_script."?".$this->url_attr."=".urlencode($object->$attr2);
}
if ($this->fmt_meth)
{
$meth = $this->fmt_meth;
$txt = $object->$meth();
}
else if ($this->fmt_str)
{
$txt = sprintf($this->fmt_str, $object->$attr);
}
else
{
$txt = $object->$attr;
}
 
if ($url) return '<a href="'.$url.'">'.$txt.'</a>';
else return $txt;
}
}
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/Theme.php
New file
0,0 → 1,405
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management Theme class
 
class Theme
{
function Theme($theme_name) // Theme constructor
{
$this->name = $theme_name;
}
 
function get_menu_width() // return menu width of the theme
{
if ($this->menu_width)
{
return $this->menu_width;
}
else
{
return 120; // default value;
}
}
 
function get_menu_height() // return menu height of the theme
{
if ($this->menu_height)
{
return $this->menu_height;
}
else
{
return 30; // default value;
}
}
 
function body_code() // return HTML code included in <body> tag
{
$str = "";
if ($this->text_color)
{
$str .= " text=\"$this->text_color\"";
}
if ($this->link_color)
{
$str .= " link=\"$this->link_color\"";
}
if ($this->vlink_color)
{
$str .= " vlink=\"$this->vlink_color\"";
}
if ($this->alink_color)
{
$str .= " alink=\"$this->alink_color\"";
}
if ($this->bg_color)
{
$str .= " bgcolor=\"$this->bg_color\"";
}
if ($this->bg_pixmap)
{
$str .= " background=\"include/themes/$this->name/$this->bg_pixmap\"";
}
return $str;
}
 
function menu_body_code() // return HTML code included in <body> tag of menu
{
$str = "";
if ($this->menu_text_color)
{
$str .= " text=\"$this->menu_text_color\"";
}
else if ($this->text_color)
{
$str .= " text=\"$this->text_color\"";
}
if ($this->menu_link_color)
{
$str .= " link=\"$this->menu_link_color\"";
}
else if ($this->link_color)
{
$str .= " link=\"$this->link_color\"";
}
if ($this->menu_vlink_color)
{
$str .= " vlink=\"$this->menu_vlink_color\"";
}
else if ($this->vlink_color)
{
$str .= " vlink=\"$this->vlink_color\"";
}
if ($this->menu_alink_color)
{
$str .= " alink=\"$this->menu_alink_color\"";
}
else if ($this->alink_color)
{
$str .= " alink=\"$this->alink_color\"";
}
if ($this->menu_bg_color)
{
$str .= " bgcolor=\"$this->menu_bg_color\"";
}
else if ($this->bg_color)
{
$str .= " bgcolor=\"$this->bg_color\"";
}
if ($this->menu_bg_pixmap)
{
$str .= " background=\"/slimg/$this->name/$this->menu_bg_pixmap\"";
}
else if ($this->bg_pixmap)
{
$str .= " background=\"/slimg/$this->name/$this->bg_pixmap\"";
}
return $str;
}
 
function font_code() // return HTML code included in main <font> tag
{
$str = "";
if ($this->font_face)
{
$str .= " face=\"$this->font_face\"";
}
if ($this->font_color)
{
$str .= " color=\"$this->font_color\"";
}
if ($this->font_size)
{
$str .= " size=\"$this->font_size\"";
}
return $str;
}
 
function menu_font_code() // return HTML code included in main <font> tag of menu
{
$str = "";
if ($this->menu_font_face)
{
$str .= " face=\"$this->menu_font_face\"";
}
else if ($this->font_face)
{
$str .= " face=\"$this->font_face\"";
}
if ($this->menu_font_color)
{
$str .= " color=\"$this->menu_font_color\"";
}
else if ($this->font_color)
{
$str .= " color=\"$this->font_color\"";
}
if ($this->menu_font_size)
{
$str .= " size=\"$this->menu_font_size\"";
}
else if ($this->font_size)
{
$str .= " size=\"$this->font_size\"";
}
return $str;
}
 
function topleft_body_code() // return HTML code included in <body> tag of topleft
{
$str = "";
if ($this->topleft_text_color)
{
$str .= " text=\"$this->topleft_text_color\"";
}
else if ($this->menu_text_color)
{
$str .= " text=\"$this->menu_text_color\"";
}
else if ($this->text_color)
{
$str .= " text=\"$this->text_color\"";
}
if ($this->topleft_link_color)
{
$str .= " link=\"$this->topleft_link_color\"";
}
else if ($this->menu_link_color)
{
$str .= " link=\"$this->menu_link_color\"";
}
else if ($this->link_color)
{
$str .= " link=\"$this->link_color\"";
}
if ($this->topleft_vlink_color)
{
$str .= " vlink=\"$this->topleft_vlink_color\"";
}
else if ($this->menu_vlink_color)
{
$str .= " vlink=\"$this->menu_vlink_color\"";
}
else if ($this->vlink_color)
{
$str .= " vlink=\"$this->vlink_color\"";
}
if ($this->topleft_alink_color)
{
$str .= " alink=\"$this->topleft_alink_color\"";
}
else if ($this->menu_alink_color)
{
$str .= " alink=\"$this->menu_alink_color\"";
}
else if ($this->alink_color)
{
$str .= " alink=\"$this->alink_color\"";
}
if ($this->topleft_bg_color)
{
$str .= " bgcolor=\"$this->topleft_bg_color\"";
}
else if ($this->menu_bg_color)
{
$str .= " bgcolor=\"$this->menu_bg_color\"";
}
else if ($this->bg_color)
{
$str .= " bgcolor=\"$this->bg_color\"";
}
if ($this->topleft_bg_pixmap)
{
$str .= " background=\"/slimg/$this->name/$this->topleft_bg_pixmap\"";
}
else if ($this->menu_bg_pixmap)
{
$str .= " background=\"/slimg/$this->name/$this->menu_bg_pixmap\"";
}
else if ($this->bg_pixmap)
{
$str .= " background=\"/slimg/$this->name/$this->bg_pixmap\"";
}
return $str;
}
 
function topleft_font_code() // return HTML code included in main <font> tag of topleft
{
$str = "";
if ($this->topleft_font_face)
{
$str .= " face=\"$this->topleft_font_face\"";
}
else if ($this->menu_font_face)
{
$str .= " face=\"$this->menu_font_face\"";
}
else if ($this->font_face)
{
$str .= " face=\"$this->font_face\"";
}
if ($this->topleft_font_color)
{
$str .= " color=\"$this->topleft_font_color\"";
}
else if ($this->menu_font_color)
{
$str .= " color=\"$this->menu_font_color\"";
}
else if ($this->font_color)
{
$str .= " color=\"$this->font_color\"";
}
if ($this->topleft_font_size)
{
$str .= " size=\"$this->topleft_font_size\"";
}
else if ($this->menu_font_size)
{
$str .= " size=\"$this->menu_font_size\"";
}
else if ($this->font_size)
{
$str .= " size=\"$this->font_size\"";
}
return $str;
}
 
function table_code() // return HTML code included in <table> tag
{
$str = "";
if (isset($this->table_border))
{
$str .= " border=\"$this->table_border\"";
}
if (isset($this->cell_spacing))
{
$str .= " cellspacing=\"$this->cell_spacing\"";
}
if (isset($this->cell_padding))
{
$str .= " cellpadding=\"$this->cell_padding\"";
}
return $str;
}
 
function th_code() // return HTML code included in <th> tag (field header)
{
$str = "";
if ($this->th_bg_color)
{
$str .= " bgcolor=\"$this->th_bg_color\"";
}
if ($this->th_bg_pixmap)
{
$str .= " background=\"/slimg/$this->name/$this->th_bg_pixmap\"";
}
return $str;
}
 
function td_code($ofs) // return HTML code included in <td> tag (field row cell)
{
$str = "";
$col = "td_bg_color$ofs";
$pix = "td_bg_pixmap$ofs";
if ($this->$col)
{
$str .= ' bgcolor="'.$this->$col.'"';
}
if ($this->$pix)
{
$str .= ' background="/slimg/$this->name/'.$this->$pix.'"';
}
return $str;
}
 
function form_code() // return HTML code included in main <table> tag a form
{
$str = " cellspacing=0";
if (isset($this->form_border))
{
$str .= " border=\"$this->form_border\"";
}
if (isset($this->form_margin))
{
$str .= " cellpadding=\"$this->form_margin\"";
}
return $str;
}
 
function form_code2() // return HTML code included in second <table> tag a form
{
$str = " cellspacing=0 border=0";
if (isset($this->form_spacing))
{
$str .= " cellpadding=\"$this->form_spacing\"";
}
return $str;
}
 
function form_cell_code($not_null = 0) // return HTML code included in <td> tag of form field
{
$str = "";
if ($not_null)
{
if ($this->form_bg_color2)
{
$str .= " bgcolor=\"$this->form_bg_color2\"";
}
if ($this->form_bg_pixmap2)
{
$str .= " background=\"/slimg/$this->name/$this->form_bg_pixmap2\"";
}
}
else
{
if ($this->form_bg_color)
{
$str .= " bgcolor=\"$this->form_bg_color\"";
}
if ($this->form_bg_pixmap)
{
$str .= " background=\"/slimg/$this->name/$this->form_bg_pixmap\"";
}
}
return $str;
}
 
}
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/Form.php
New file
0,0 → 1,107
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Form class
 
class Form
{
function Form($action = "", $type = 0) // Form constructor
{
global $SCRIPT_NAME;
if ($action) $this->action = $action;
else $this->action = $SCRIPT_NAME;
$this->type = $type; // for future use (file upload...)
$this->fields = array();
$this->buttons = array();
$this->cols = 1;
}
 
function set_title() // set the form title
{
$nb_args = func_num_args();
$args = func_get_args();
$title = __(array_shift($args));
if ($nb_args > 1)
{
array_unshift($args, $title);
$title = call_user_func_array('sprintf', $args);
}
$this->title = $title;
}
 
function add_field(&$field) // add a field to the form
{
array_push($this->fields, &$field);
}
 
function add_button(&$button) // add a button to the form
{
array_push($this->buttons, &$button);
}
 
function build_code() // return HTML code for a form
{
global $slim_theme;
 
$str = "<form action=\"$this->action\"";
if ($this->type == 1) // file upload
{
$str .= " enctype=\"multipart/form-data\" method=post";
}
$str .= ">\n";
$str .= "<table".$slim_theme->form_code().">";
if ($this->title)
{
$str .= "<caption><b><font".$slim_theme->font_code().">$this->title</font></b></caption>\n";
}
$str .= "<tr><td".$slim_theme->form_cell_code().">\n";
$str .= "<table border=0 cellspacing=0 cellpadding=0><tr valign=top><td>\n";
$str .= "<table".$slim_theme->form_code2().">\n";
foreach ($this->fields as $field)
{
if ($fmt = $field->format_code($this))
{
$str .= $fmt;
}
else
{
if ($field->valign) $str .= "<tr valign=$field->valign>";
else $str .= "<tr>";
$str .= $field->header_code($this);
$str .= $field->cell_code($this);
$str .= "</tr>\n";
}
}
$str .= "</table></td></tr>\n";
if (count($this->buttons))
{
$str .= "<tr><td colspan=$this->cols align=center".$slim_theme->form_cell_code()."><hr><font".$slim_theme->font_code().">\n";
foreach ($this->buttons as $button)
{
$str .= $button->cell_code($this);
}
$str .= "</font></td></tr>\n";
}
$str .= "</table>\n";
$str .= "</td></tr></table>\n";
$str .= "</form>\n";
return $str;
}
 
}
 
?>
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/Machine.php
New file
0,0 → 1,132
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management class for Slim machines
 
include_once("DBClass.php");
include_once("DNS.php");
 
class Machine extends DBClass
{
function get_new() // return a new instance of the class
{
return new Machine();
}
 
function db_table() // return the database table for the class
{
return "machine";
}
 
function db_fields() // return the database fields for the class
{
return array(
"name" => "number",
"type" => "string",
"constructor" => "string",
"model" => "string",
"cpu" => "string",
"disk" => "string",
"memory" => "number",
"os" => "string",
"os_version" => "string",
"comment" => "string",
);
}
 
function db_key() // return the database key for the class
{
return "name";
}
 
function set_long_name() // load the DNS name of the machine
{
global $DNS;
$dns = $DNS->select_by_key($this->name);
$this->long_name = $dns->get_name();
}
 
function url_dns() // return the url to the machine DNS
{
if ($this->name) return "view.php?id=".$this->name;
else return "";
}
 
function get_dns_id_from_dns_name($name) // return the dns id corresponding to a dns name
{
if (preg_match ("/^([^\.]*)\.(.*)$/", $name, $m))
{
global $DNS;
$dnss =& $DNS->select("host='$m[1]' and domain='$m[2]'");
if (count($dnss) == 1)
{
$dns = $dnss[0];
return $dns->id;
}
}
return "";
}
 
function get_model() // get complete model
{
return "$this->constructor $this->model";
}
 
function get_os() // get complete os
{
return "$this->os $this->os_version";
}
 
function get_memory() // get memory with unit
{
if ($this->memory < 1024)
{
return "$this->memory Mo";
}
else
{
$value = $this->memory / 1024;
return sprintf("%.1f Go", $value);
}
}
 
function get_type() // get i18n type
{
if ($this->type)
return __($this->type);
else
return "";
}
 
function get_types() // return the possible machine types in a hash table
{
return array("serveur" => "serveur",
"routeur" => "routeur",
"switch" => "switch",
"imprimante" => "imprimante",
);
}
}
 
$Machine = Machine::get_new();
 
function machine_name_cmp($a, $b) // compare two machine name
{
return strnatcmp($a->long_name, $b->long_name);
}
 
?>
Property changes:
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/dashboard/include/html.php
New file
0,0 → 1,214
<?
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management html utils
 
include_once("themes/$theme/theme.php");
 
function html_header($title, $type = 0, $target = "") // return standard HTML header
{
global $slim_user;
global $slim_theme;
global $header_type;
$header_type = $type;
 
$str = "";
$str .= "<!doctype html public \"-//w3c//dtd html 3.2+//$slim_user->lang\">\n";
$str .= "<html>\n";
$str .= "<head>\n";
$str .= "<title>$title</title>\n";
if ($target)
{
$str .= "<base target=\"$target\">\n";
}
$str .= "</head>\n";
if ($header_type == 1) // frameset header
{
}
else if ($header_type == 2) // menu header
{
$str .= "<body";
$str .= $slim_theme->menu_body_code();
$str .= ">\n";
$str .= "<font";
$str .= $slim_theme->menu_font_code();
$str .= ">\n";
}
else if ($header_type == 3) // topleft header
{
$str .= "<body";
$str .= $slim_theme->topleft_body_code();
$str .= ">\n";
$str .= "<font";
$str .= $slim_theme->topleft_font_code();
$str .= ">\n";
}
else // standard header
{
$str .= "<body";
$str .= $slim_theme->body_code();
$str .= ">\n";
$str .= "<font";
$str .= $slim_theme->font_code();
$str .= ">\n";
}
return $str;
}
 
function html_footer() // return standard HTML footer
{
global $slim_msg;
 
$str = "";
if ($slim_msg)
{
$str .= "<p align=right><i>$slim_msg</i></p>\n";
}
if ($header_type == 1) // frameset header
{
}
else
{
$str .= "</font>\n";
}
$str .= "</body>\n";
$str .= "</html>\n";
 
global $slim_db;
pg_close($slim_db);
 
return $str;
}
 
function html_link($link, $text, $target = "", $confirm = "") // return HTML code for a link
{
$str = "";
if ($link && $text)
{
$str .= "<a href=\"$link\"";
if ($target)
{
$str .= " target=\"$target\"";
}
if ($confirm)
{
$str .= " onclick='if (confirm(\"".html_quote($confirm)."\")) return true; else return false;'";
}
$str .= ">$text</a>";
}
else if ($text) $str .= $text;
 
return $str;
}
 
function html_mail_link($link, $text = "") // return HTML code for a maito link
{
$str = "";
if (!$text)
{
$text = $link;
}
if ($link)
{
$str .= "<a href=\"mailto:$link\"";
$str .= ">$text</a>";
}
else if ($text) $str .= $text;
 
return $str;
}
 
function html_img($src, $text = "", $i18n = 0, $width = 0, $height = 0, $align = "", $border = 0) // return HTML code for an image
{
global $slim_user;
 
$str = "";
 
if ($i18n) $str .= "<img src=\"/slimg/$slim_user->theme/$slim_user->lang/$src\"";
else $str .= "<img src=\"/slimg/$slim_user->theme/$src\"";
 
if (isset($text))
{
$text2 = html_quote($text);
$str .= " alt=\"$text2\" title=\"$text2\"";
}
if ($width)
{
$str .= " width=$width";
}
if ($height)
{
$str .= " height=$height";
}
if ($align)
{
$str .= " align=$align";
}
$str .= " border=$border>";
 
return $str;
}
 
function html_error() // return html error page with i18n msg
{
$nb_args = func_num_args();
$args = func_get_args();
$msg = __(array_shift($args));
if ($nb_args > 1)
{
array_unshift($args, $msg);
$msg = call_user_func_array('sprintf', $args);
}
print "<hr><font size=5 color=#FF0000>".$msg."</font>";
print "<form>\n";
print '<input type="submit" value="'.__("Retour").'" onClick=\'history.back();return false\'>'."\n";
print "</form>\n";
 
print html_footer();
exit();
}
 
function html_db_error($query) // return html error page for database query
{
print "<hr><font size=5 color=#FF0000>".__("Erreur base de données sur la requête :")."</font>\n";
print "<p>\n";
print "<font size=5 color=#44AA44>$query</font>\n";
print "<p>\n";
print "<font size=5 color=#4444AA>".pg_ErrorMessage()."</font>\n";
print html_footer();
exit();
}
 
function html_quote($txt) // change ",' chars to &quot;,&#39; in a string
{
$patterns = array("/\"/", "/'/");
$replace = array("&quot;", "&#39;");
return preg_replace($patterns, $replace, $txt);
}
 
function html_br($txt) // change \n chars to <br> in a string
{
return preg_replace("/\n/", "<br>", $txt);
}
 
function html_redirect($url) // redirect page to an URL
{
header("Location: $url");
exit();
}
 
?>
Property changes:
Added: svn:executable
+
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/counter/config.inc.php
New file
0,0 → 1,11
<?PHP
 
$PG_SERVER="sql.ac-grenoble.fr";
$PG_BASE="slimplugins";
$PG_USER="slimcounter";
$PG_PASSWORD="PASSWORD";
 
$QUERY="select count(*) from slis where install_date is not null;";
// $QUERY="select count(*) from slis where status_id=6;";
 
?>
Property changes:
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/plugins/counter/counter.php
New file
0,0 → 1,23
<?PHP
 
include "config.inc.php";
 
$db=pg_connect("host=$PG_SERVER port=5432 dbname=$PG_BASE user=$PG_USER password=$PG_PASSWORD");
pg_query($db,"SET add_missing_from TO TRUE;");
 
$result=pg_exec($db,$QUERY);
print pg_errormessage($db);
 
$img = ImageCreate(38,13);
$bg = ImageColorAllocate($img,255,255,255);
$bg = ImageColorTransparent($img,$bg);
$tx = ImageColorAllocate($img,255,128,128);
ImageFilledRectangle($img,0,0,50,20,$bg);
ImageString($img,5,1,0,pg_result($result,0,0),$tx);
 
header("content-type: image/png");
ImagePNG($img);
 
?>
 
 
Property changes:
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/debian/rules
New file
0,0 → 1,99
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
 
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
 
 
 
 
CFLAGS = -Wall -g
 
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
 
configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
 
touch configure-stamp
 
 
build: build-stamp
 
build-stamp: configure-stamp
dh_testdir
 
# Add here commands to compile the package.
$(MAKE)
#docbook-to-man debian/slis-slim.sgml > slis-slim.1
 
touch build-stamp
 
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
 
# Add here commands to clean up after the build process.
[ ! -f Makefile ] || $(MAKE) clean
debconf-updatepo
 
dh_clean
 
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
 
# Add here commands to install the package into debian/slis-slim.
$(MAKE) install DESTDIR=$(CURDIR)/debian/slis-slim
 
 
# Build architecture-independent files here.
binary-indep: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
# dh_install
# dh_installmenu
dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
dh_installcron
# dh_installinfo
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
# dh_python
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
 
# Build architecture-dependent files here.
binary-arch: build install
# We have nothing to do by default.
 
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
Property changes:
Added: svn:keywords
+ Id
Added: svn:executable
+ *
/slim/sources/tags/slis-slim/2.0.5~rc5/debian/README
New file
0,0 → 1,6
The Debian Package slis-slim
----------------------------
 
Comments regarding the Package
 
Bruno Bzeznik <Bzizou@slis.fr>, Tue, 21 Feb 2006 08:54:39 +0100
Property changes:
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/debian/po/POTFILES.in
New file
0,0 → 1,0
[type: gettext/rfc822deb] templates
/slim/sources/tags/slis-slim/2.0.5~rc5/debian/po/templates.pot
New file
0,0 → 1,317
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: slis-slim@packages.debian.org\n"
"POT-Creation-Date: 2008-05-06 15:49+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
 
#. Type: boolean
#. Description
#: ../templates:1001
msgid "Create a self signed certificate for apache ?"
msgstr ""
 
#. Type: boolean
#. Description
#: ../templates:1001
msgid ""
"If you want to create a self signed certificate for the https Apache SLIM "
"server, choose yes If you do not, you'll have to install a valid certificate "
"by yourself. It's the good moment to do so. Go into another console and "
"install the certificate into '/etc/slis-slim/ssl/'."
msgstr ""
 
#. Type: note
#. Description
#: ../templates:2001
msgid "A valid certificate is necessary"
msgstr ""
 
#. Type: note
#. Description
#: ../templates:2001
msgid ""
"Remember that you need to install a valid certificate and private into /etc/"
"slis-slim/ssl/. You need also to update the config files in /etc/slis-slim/ "
"and modify symlinks /var/www/slim/scripts/monitoring/get/slimcert.pem "
"according to your ssl certificate(s) and key(s). It's possible to use two "
"differents certificates for apache and the monitoring scripts."
msgstr ""
 
#. Type: boolean
#. Description
#: ../templates:3001
msgid "Automaticaly configure postgres and the postgresql SLIM database?"
msgstr ""
 
#. Type: boolean
#. Description
#: ../templates:3001
msgid ""
"If you install SLIM on a dedicated host, this package can configure your "
"freshly installed postgres to fit SLIM's needs. If you don't want, you'll "
"have to configure postgres and create the initial slim database yourself, "
"maybe using the doc here: /usr/share/doc/slis-slim/ And don't forget to "
"edit /etc/slis-slim/config.php and /etc/slis-slim/htaccess to fit your needs."
msgstr ""
 
#. Type: boolean
#. Description
#: ../templates:4001
msgid "Modify the php configuration to fit SLIM needs?"
msgstr ""
 
#. Type: boolean
#. Description
#: ../templates:4001
msgid ""
"SLIM needs some configuration directives into the php configuration files. "
"Those are:\n"
" display_errors= Off\n"
" file_uploads = On\n"
" upload_max_filesize= 2M\n"
" allow_url_fopen= On\n"
" allow_url_include= On\n"
" log_errors = On\n"
" register_globals = On\n"
" zend.ze1_compatibility_mode= On"
msgstr ""
 
#. Type: string
#. Description
#: ../templates:5001
msgid "Domain name:"
msgstr ""
 
#. Type: string
#. Description
#: ../templates:6001
msgid "Mail address of the SLIM administrator:"
msgstr ""
 
#. Type: string
#. Description
#: ../templates:7001
msgid "Mail address where SLIM will send tickets:"
msgstr ""
 
#. Type: string
#. Description
#: ../templates:8001
msgid "FROM address that SLIM will use when sending mails:"
msgstr ""
 
#. Type: string
#. Description
#: ../templates:9001
msgid "TO address which are notified the status migrations:"
msgstr ""
 
#. Type: boolean
#. Description
#: ../templates:10001
msgid "Do you want sample data into SLIM?"
msgstr ""
 
#. Type: boolean
#. Description
#: ../templates:10001
msgid ""
"It is STRONGLY RECOMMENDED that you accept to have sample data into your "
"SLIM as the interface may have problems with a totaly empty database. But if "
"you want to restore SLIM from an older version, perhaps have you got a dump "
"to put into the slim and the slismonitoring databases and you know what you "
"are doing..."
msgstr ""
 
#. Type: boolean
#. Description
#: ../templates:11001
msgid "Should the slim database and associated user be dropped ?"
msgstr ""
 
#. Type: boolean
#. Description
#: ../templates:12001
msgid "Do you want to use monitoring capabilities into SLIM?"
msgstr ""
 
#. Type: boolean
#. Description
#: ../templates:13001
msgid "Is your monitor database on another host?"
msgstr ""
 
#. Type: boolean
#. Description
#: ../templates:13001
msgid ""
"It is recommended to separate the machine hosting SLIM and the one hosting "
"the PostgreSQL database containing the monitoring data for security and "
"performance reasons. If you answer YES, you made the good choice, but you'll "
"have to work a bit: you must create a user/password with rights to create a "
"new database on your external postgresql server from this host."
msgstr ""
 
#. Type: string
#. Description
#: ../templates:14001
msgid "IP Address of the monitoring Database:"
msgstr ""
 
#. Type: string
#. Description
#: ../templates:14001
msgid ""
" Enter the hostname or ip of the postgresql server hosting the monitoring "
"database."
msgstr ""
 
#. Type: string
#. Description
#: ../templates:15001
msgid "Name of the monitoring database:"
msgstr ""
 
#. Type: string
#. Description
#: ../templates:16001
msgid "Login of the user with read/write access to the monitoring database:"
msgstr ""
 
#. Type: password
#. Description
#: ../templates:17001
msgid "Password of the user with read/write access to the monitoring database:"
msgstr ""
 
#. Type: boolean
#. Description
#: ../templates:18001
msgid ""
"Do you want to automaticaly configure and initiate the monitoring database?"
msgstr ""
 
#. Type: boolean
#. Description
#: ../templates:18001
msgid ""
"This will create the database structure and populate with the default datas."
msgstr ""
 
#. Type: note
#. Description
#: ../templates:19001
msgid "Warning: you have to create the user \"slismonitor\""
msgstr ""
 
#. Type: note
#. Description
#: ../templates:19001
msgid ""
"You have to create another user called \"slismonitor\" on your PostgreSQL "
"monitoring host. (you can't change the name, it MUST be \"slismonitor\"). "
"This user will be used by the SLIS servers to feed the database with the "
"monitoring data. This user will be allowed to insert data into the monitor "
"database, but with no select rights."
msgstr ""
 
#. Type: password
#. Description
#: ../templates:20001
msgid "Password of the \"slismonitor\" user:"
msgstr ""
 
#. Type: note
#. Description
#: ../templates:21001
msgid "Please, check that your PostgreSQL monitoring host is ready"
msgstr ""
 
#. Type: note
#. Description
#: ../templates:21001
msgid "Now, to continue, you must be sure that you have:"
msgstr ""
 
#. Type: note
#. Description
#: ../templates:21001
msgid ""
"- Created the postgres user with the createdb right on the monitor server\n"
" (like that: \"create user slimmonitor with password 'slimmonitorpass' "
"createdb nocreateuser;\")\n"
"- Created the postgres user for SLIS access (slismonitor)\n"
" (like that: \"create user slismonitor with password 'slismonitorpass' "
"nocreatedb nocreateuser;\")\n"
"- Allowed the SLIM host to connect to the postgreSQL monitor host\n"
" Here's an exemple of what would like the pg_hba.conf:"
msgstr ""
 
#. Type: note
#. Description
#: ../templates:21001
msgid ""
" local all slimmonitor password\n"
" host slimmonitor slimmonitor <slim_ip> <slim_mask> password\n"
" local all slismonitor password\n"
" host slimmonitor slismonitor 0.0.0.0 0.0.0.0 password"
msgstr ""
 
#. Type: note
#. Description
#: ../templates:22001
msgid "First login"
msgstr ""
 
#. Type: note
#. Description
#: ../templates:22001
msgid ""
"To log into SLIM, take your favourite browser and go into https://"
"<your_host>/slim and then enter the login \"admin\" and password \"slim\". "
"You'll probably be asked to make an upgrade of the database code as the "
"scripts contained into this package are newer than the SQL structure. Don't "
"forget to quickly change the admin password."
msgstr ""
 
#. Type: boolean
#. Description
#: ../templates:23001
msgid "Do you want to modify the apache2 listen port to 443 ?"
msgstr ""
 
#. Type: boolean
#. Description
#: ../templates:23001
msgid ""
"SLIM has been designed to be used with https protocol. This will modify the "
"file /etc/apache2/ports.conf to make apache2 listen only on the port 443."
msgstr ""
 
#. Type: note
#. Description
#: ../templates:24001
msgid "Get slis configuration from Internet"
msgstr ""
 
#. Type: note
#. Description
#: ../templates:24001
msgid ""
"There is now the possiblity to create and get a slis configuration from the "
"Internet with the name of the slis and the hadmin password stored into slim "
"database. This is possible with the url : 'http://<slim>/getconf/?"
"slisname=<slis>&version=<version>'."
msgstr ""
/slim/sources/tags/slis-slim/2.0.5~rc5/debian/templates
New file
0,0 → 1,145
Template: slis-slim/self_signed_certificate
Type: boolean
Default: true
_Description: Create a self signed certificate for apache ?
If you want to create a self signed certificate for the https Apache SLIM server, choose yes
If you do not, you'll have to install a valid certificate by yourself. It's the good moment
to do so. Go into another console and install the certificate into '/etc/slis-slim/ssl/'.
 
Template: slis-slim/no_self_signed_certificate
Type: note
_Description: A valid certificate is necessary
Remember that you need to install a valid certificate and private into /etc/slis-slim/ssl/. You need also to update the config files in /etc/slis-slim/ and modify symlinks /var/www/slim/scripts/monitoring/get/slimcert.pem according to your ssl certificate(s) and key(s). It's possible to use two differents certificates for apache and the monitoring scripts.
 
Template: slis-slim/postgres_config
Type: boolean
Default: true
_Description: Automaticaly configure postgres and the postgresql SLIM database?
If you install SLIM on a dedicated host, this package can configure your freshly installed postgres to fit SLIM's needs. If you don't want, you'll have to configure postgres and create the initial slim database yourself, maybe using the doc here: /usr/share/doc/slis-slim/
And don't forget to edit /etc/slis-slim/config.php and /etc/slis-slim/htaccess to fit your needs.
 
Template: slis-slim/php_config
Type: boolean
Default: true
_Description: Modify the php configuration to fit SLIM needs?
SLIM needs some configuration directives into the php configuration files. Those are:
display_errors= Off
file_uploads = On
upload_max_filesize= 2M
allow_url_fopen= On
allow_url_include= On
log_errors = On
register_globals = On
zend.ze1_compatibility_mode= On
 
Template: slis-slim/def_domain
Type: string
_Description: Domain name:
 
Template: slis-slim/mail_admin
Type: string
_Description: Mail address of the SLIM administrator:
 
Template: slis-slim/mail_tickets
Type: string
_Description: Mail address where SLIM will send tickets:
 
Template: slis-slim/mail_from
Type: string
_Description: FROM address that SLIM will use when sending mails:
 
Template: slis-slim/mail_notified_migrations
Type: string
_Description: TO address which are notified the status migrations:
 
Template: slis-slim/sample_data
Type: boolean
Default: true
_Description: Do you want sample data into SLIM?
It is STRONGLY RECOMMENDED that you accept to have sample data into your SLIM as the interface may have problems with a totaly empty database. But if you want to restore SLIM from an older version, perhaps have you got a dump to put into the slim and the slismonitoring databases and you know what you are doing...
 
Template: slis-slim/drop_database
Type: boolean
Default: true
_Description: Should the slim database and associated user be dropped ?
 
Template: slis-slim/monitor
Type: boolean
Default: true
_Description: Do you want to use monitoring capabilities into SLIM?
 
Template: slis-slim/external_monitor_db
Type: boolean
Default: false
_Description: Is your monitor database on another host?
It is recommended to separate the machine hosting SLIM and the one hosting the PostgreSQL database containing the monitoring data for security and performance reasons. If you answer YES, you made the good choice, but you'll have to work a bit: you must create a user/password with rights to create a new database on your external postgresql server from this host.
 
Template: slis-slim/monitor_db_host
Type: string
_Description: IP Address of the monitoring Database:
Enter the hostname or ip of the postgresql server hosting the monitoring database.
 
Template: slis-slim/monitor_db_name
Type: string
Default: slimmonitor
_Description: Name of the monitoring database:
 
Template: slis-slim/monitor_db_user
Type: string
Default: slimmonitor
_Description: Login of the user with read/write access to the monitoring database:
 
Template: slis-slim/monitor_db_password
Type: password
_Description: Password of the user with read/write access to the monitoring database:
 
Template: slis-slim/auto_monitor_db
Type: boolean
Default: true
_Description: Do you want to automaticaly configure and initiate the monitoring database?
This will create the database structure and populate with the default datas.
 
Template: slis-slim/monitor_slismonitor
Type: note
_Description: Warning: you have to create the user "slismonitor"
You have to create another user called "slismonitor" on your PostgreSQL monitoring host.
(you can't change the name, it MUST be "slismonitor").
This user will be used by the SLIS servers to feed the database with the monitoring data.
This user will be allowed to insert data into the monitor database, but with no select rights.
 
Template: slis-slim/monitor_slismonitor_password
Type: password
_Description: Password of the "slismonitor" user:
 
Template: slis-slim/monitor_checklist_auto
Type: note
_Description: Please, check that your PostgreSQL monitoring host is ready
Now, to continue, you must be sure that you have:
.
- Created the postgres user with the createdb right on the monitor server
(like that: "create user slimmonitor with password 'slimmonitorpass' createdb nocreateuser;")
- Created the postgres user for SLIS access (slismonitor)
(like that: "create user slismonitor with password 'slismonitorpass' nocreatedb nocreateuser;")
- Allowed the SLIM host to connect to the postgreSQL monitor host
Here's an exemple of what would like the pg_hba.conf:
.
local all slimmonitor password
host slimmonitor slimmonitor <slim_ip> <slim_mask> password
local all slismonitor password
host slimmonitor slismonitor 0.0.0.0 0.0.0.0 password
 
Template: slis-slim/login
Type: note
_Description: First login
To log into SLIM, take your favourite browser and go into https://<your_host>/slim and then enter the login "admin" and password "slim". You'll probably be asked to make an upgrade of the database code as the scripts contained into this package are newer than the SQL structure. Don't forget to quickly change the admin password.
 
Template: slis-slim/apache_ports_listen
Type: boolean
_Description: Do you want to modify the apache2 listen port to 443 ?
SLIM has been designed to be used with https protocol. This will modify the file
/etc/apache2/ports.conf to make apache2 listen only on the port 443.
 
Template: slis-slim/getconf
Type: note
_Description: Get slis configuration from Internet
There is now the possiblity to create and get a slis configuration from the Internet with the name of the slis and the hadmin password stored into slim database. This is possible with the url : 'http://<slim>/getconf/?slisname=<slis>&version=<version>'.
Property changes:
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/debian/control
New file
0,0 → 1,20
Source: slis-slim
Section: misc
Priority: optional
Maintainer: Philippe Le Brouster <plb@ac-grenoble.fr>
Uploaders: Laurent Cooper <laurent@ac-grenoble.fr>
Build-Depends: debhelper (>= 4.0.0), po-debconf
Build-Depends-Indep: dblatex, docbook-xml (>= 4.4), docbook-xsl, xsltproc, docbook-to-man
Standards-Version: 3.7.2
 
Package: slis-slim
Architecture: all
Depends: apache2 (>= 2.2.3), postgresql-8.1, libapache2-mod-auth-pgsql, php5, curl, libapache2-mod-php5, php5-pgsql, php5-curl, php5-gd, cracklib-runtime, wfrench, wamerican, libdbd-pg-perl, libnetaddr-ip-perl, debconf, apg, wget, postgresql-contrib-8.1, zip
Description: SLIM: SLIS Management (from the SLIS project)
SLIM is the central monitoring, deployment and assistance tool to manage a
large number of linux gateways. It is especially developed for the SLIS
project (Serveur Linux pour l'Internet Scolaire : Linux Server for the
Internet into Schools) but can be used for other gateways or routers.
.
For any information consult http://slis.ac-grenoble.fr
Property changes:
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/debian/dirs
New file
0,0 → 1,10
usr/bin
usr/sbin
usr/lib/slis-slim
usr/lib/slis-slim/bin
usr/share/slis-slim
usr/share/doc/slis-slim/
usr/share/doc/slis-slim/install_guide
etc/slis-slim
etc/slis-slim/ssl
var/www/slim
Property changes:
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/debian/postinst
New file
0,0 → 1,497
#!/bin/bash
# postinst script for slis-slim
#
# see: dh_installdeb(1)
 
set -e
#set -x
 
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
#
 
. /usr/share/debconf/confmodule
 
# Locations
APACHE_SSL_DIR="/etc/apache2/ssl"
APACHE_MOD_DIR="/etc/apache2/mods-enabled"
APACHE_SITE_DIR="/etc/apache2/sites-enabled"
 
PHP_ETC_DIR="/etc/php5"
 
PG_ETC_DIR="/etc/postgresql/8.1/main"
PG_HBA_CONF="$PG_ETC_DIR/pg_hba.conf"
 
SLIM_ETC_DIR="/etc/slis-slim"
SLIM_WWW_HTACCESS="$SLIM_ETC_DIR/htaccess"
SLIM_SSL_DIR="$SLIM_ETC_DIR/ssl"
SLIM_WWW_DIR="/var/www/slim"
SLIM_SHARE_DIR="/usr/share/slis-slim"
SLIM_LIB_DIR="$SLIM_SHARE_DIR"
 
# SQL dumps for SLIM
SQL_VERSION="2.0.3"
SQL_STRUCT="$SLIM_LIB_DIR/sql/base/slim.$SQL_VERSION.struct.sql"
SQL_TABLE_USERS="$SLIM_LIB_DIR/sql/base/slim.$SQL_VERSION.table_slim_user.sql"
SQL_TABLE_CHILDR="$SLIM_LIB_DIR/sql/base/slim.$SQL_VERSION.table_child_rights.sql"
SQL_TABLE_CVIEWI="$SLIM_LIB_DIR/sql/base/slim.$SQL_VERSION.table_custom_view_items.sql"
SQL_TABLE_DEFVAL="$SLIM_LIB_DIR/sql/base/slim.$SQL_VERSION.table_defvalue.sql"
Sql_TABLE_FDEFVAL="$SLIM_LIB_DIR/sql/base/slim.$SQL_VERSION.table_file_defvalue.sql"
SQL_TABLE_GROUP="$SLIM_LIB_DIR/sql/base/slim.$SQL_VERSION.table_group.sql"
SQL_TABLE_RIGHT="$SLIM_LIB_DIR/sql/base/slim.$SQL_VERSION.table_right.sql"
SQL_TABLE_SINFO="$SLIM_LIB_DIR/sql/base/slim.$SQL_VERSION.table_slim_info.sql"
SQL_TABLE_DNSDEF="$SLIM_LIB_DIR/sql/base/slim.$SQL_VERSION.table_slis_dns_default.sql"
SQL_EXAMPLE_DATA="$SLIM_LIB_DIR/sql/base/slim.2.0.3.example_data.sql"
 
# SQL dumps for the monitoring database
MONITOR_STRUCT="$SLIM_LIB_DIR/sql/monitor/slismonitor_base_struct.sql"
MONITOR_CHECK_STRUCT="$SLIM_LIB_DIR/sql/monitor/slismonitor_checks_struct.sql"
MONITOR_TABLE_GLOBAL="$SLIM_LIB_DIR/sql/monitor/slismonitor_table_monitor_global.sql"
MONITOR_TABLE_CHECK="$SLIM_LIB_DIR/sql/monitor/slismonitor_table_monitor_check.sql"
MONITOR_CUSTOM_VIEW="$SLIM_LIB_DIR/sql/monitor/slim.$SQL_VERSION.table_custom_view_items.sql"
MONITOR_EXAMPLE_DATA="$SLIM_LIB_DIR/sql/monitor/slismonitor_example_data.sql"
 
PASSWORD=""
 
function invoke
{
if [ -f /usr/sbin/invoke-rc.d ]; then
invoke-rc.d $1 $2 >&2 || true
else
/etc/init.d/$1 $2 >&2 || true
fi
}
 
 
#
# Check and install SSL Certificate
#
function check_and_install_certificates
{
if [ -f "$SLIM_SSL_DIR/slim.cert" -o -f "$SLIM_SSL_DIR/slim.key" ]; then
#
# Use certificate found in $SLIM_SSL_DIR
#
echo "$SLIM_SSL_DIR/slim.cert or $SLIM_SSL_DIR/slim.key found. Using it." >&2
else
#
# Self-signed certificate creation
#
db_get slis-slim/self_signed_certificate
if [ "$RET" = "true" ]; then
echo -n "Generating Self-signed certificate"
export RANDFILE=/dev/random
openssl req -batch -config $SLIM_SHARE_DIR/ssleay.cnf \
-new -x509 -nodes -out $SLIM_SSL_DIR/slim.cert \
-keyout $SLIM_SSL_DIR/slim.key -days 365 &> /dev/null
chmod 640 $SLIM_SSL_DIR/slim.key || true
 
# I don't know if this is really secure:
chgrp www-data $SLIM_SSL_DIR/slim.key || true
# But how could I do for PHP to access the private key to be able
# to sign the monitoring script? On my SLIM (Grenoble), I have
# another couple of private/public keys, different from the apache
# ssl certificate.
chmod 644 $SLIM_SSL_DIR/slim.cert || true
echo "."
fi
fi
 
#
# Create symlink for monitoring only there is not file present
#
if [ -f "$SLIM_SSL_DIR/slim.cert" -a ! -f "$SLIM_WWW_DIR/scripts/monitor/get/slimcert.pem" ]; then
echo "Creating the symlink $SLIM_WWW_DIR/scripts/monitor/get/slimcert.pem to $SLIM_SSL_DIR/slim.cert"
ln -sf $SLIM_SSL_DIR/slim.cert $SLIM_WWW_DIR/scripts/monitor/get/slimcert.pem || true
else
echo "The file $SLIM_WWW_DIR/scripts/monitor/get/slimcert.pem exist. Not creating symlink."
fi
}
 
 
#
# APACHE CONFIGURATION
#
function check_and_configure_apache
{
# Create an empty httpd.conf if not exist
#touch /etc/apache2/httpd.conf
 
# Enable mod ssl
if [ ! -f "$APACHE_MOD_DIR/ssl.load" ]; then
echo -n "enabling ssl into apache2"; a2enmod ssl &>/dev/null || true; echo "."
fi
 
# Enable mod auth_pgsql
if [ ! -f "$APACHE_MOD_DIR/auth_pgsql.load" ]; then
echo -n "enabling auth_pgsql into apache2"; a2enmod auth_pgsql &>/dev/null || true; echo "."
fi
echo -n "Enabling SLIM site into apache2"
# Enable SLIM site
if [ ! -f "/etc/apache2/sites-available/slim.conf" ]; then
ln -sf $SLIM_ETC_DIR/apache.conf /etc/apache2/sites-available/slim.conf &>/dev/null
fi
if [ ! -f "$APACHE_SITE_DIR/slim.conf" ]; then
a2ensite slim.conf &>/dev/null || true
fi
echo "."
 
# Disable default site
if [ -f "$APACHE_SITE_DIR/000-default" ]; then
echo -n "disabling default site into apache2"; a2dissite 000-default &>/dev/null || true; echo "."
fi
# Change apache listen port
db_get slis-slim/apache_ports_listen
if [ "$RET" = "true" ]; then
echo "Listen 443" > /etc/apache2/ports.conf
else
RET=""
if [ -f "/etc/apache2/ports.conf" ]; then
RET=`grep 443 /etc/apache2/ports.conf | grep Listen`
fi
if [ "$RET" = "" ]; then
echo "WARNING: Be sure that apache2 listen on port 443 (see /etc/apache2/ports.conf)"
fi
fi
 
# Reload apache2
invoke apache2 force-reload
}
 
#
# Postgres configuration
#
function check_and_configure_postgresql81
{
PASSWORD=`apg -a 0 -n 1 -q -MNCL -m 12`
 
db_get slis-slim/postgres_config
if [ "$RET" = "true" ]
then
# Create a user
su - postgres -c "psql -tqc \"revoke all on pg_shadow from public;\" template1" || true
su - postgres -c "psql -tqc \"create user slim with password '$PASSWORD' createdb nocreateuser;\" template1" || true
 
# Configure authorization file
if [ "`grep slim $PG_HBA_CONF`" = "" ]
then
cp -f $PG_HBA_CONF $PG_HBA_CONF.slim_pkg_orig
echo > $PG_HBA_CONF
echo "local all postgres ident sameuser" >> $PG_HBA_CONF
echo "local all slim password" >> $PG_HBA_CONF
echo "host slim slim 127.0.0.1 255.255.255.255 password" >> $PG_HBA_CONF
MONITOR_CUSTOM_VIEW_=""
 
db_get slis-slim/monitor
if [ "$RET" = "true" ]
then
MONITOR_CUSTOM_VIEW_=$MONITOR_CUSTOM_VIEW
db_get slis-slim/external_monitor_db
if [ "$RET" = "false" ]
then
echo "local all slimmonitor password" >> $PG_HBA_CONF
echo "host slismonitor slimmonitor 127.0.0.1 255.255.255.255 password" >> $PG_HBA_CONF
echo "local all slismonitor password" >> $PG_HBA_CONF
echo "host slismonitor slismonitor 0.0.0.0 0.0.0.0 password" >> $PG_HBA_CONF
fi
fi
 
perl -pi -e "s/(^local.*all.*all.*ident sameuser)/#\$1/" $PG_HBA_CONF
perl -pi -e "s/.*tcpip_socket.*=.*/tcpip_socket = true/" $PG_ETC_DIR/postgresql.conf
 
#
# Restart postgresql
#
invoke postgresql-8.1 restart
sleep 2
fi
#
# Import the initial database
#
export PGUSER="slim"
export PGPASSWORD="$PASSWORD"
psql -tqc "create database slim encoding 'LATIN1'" template1 >&2 || true
TMPFILE=`mktemp`
 
db_get slis-slim/sample_data
if [ ! "$RET" = "false" ]
then
for i in $SQL_STRUCT $SQL_TABLE_USERS $SQL_TABLE_CHILDR $SQL_TABLE_CVIEWI \
$SQL_TABLE_DEFVAL $SQL_TABLE_FDEFVAL $SQL_TABLE_GROUP $SQL_TABLE_DNSDEF \
$SQL_TABLE_RIGHT $SQL_TABLE_SINFO $MONITOR_CUSTOM_VIEW_ $SQL_EXAMPLE_DATA
do
echo -n "Populating SQL from $i..." >&2
egrep -v "SET client_encoding|SET SESSION AUTHORIZATION|COMMENT ON SCHEMA" $i | psql -q slim > $TMPFILE 2>&1|| true
grep -v "NOTICE" $TMPFILE >&2 || true
echo "done." >&2
done
fi
rm -f $TMPFILE
fi
}
 
 
#
# PHP CONFIGURATION
#
function check_and_configure_php5
{
db_get slis-slim/php_config
if [ "$RET" = "true" ]
then
if [ ! -f $PHP_ETC_DIR/apache2/conf.d/php_slim.ini ]; then
ln -sf $SLIM_ETC_DIR/php_slim.ini $PHP_ETC_DIR/apache2/conf.d/php_slim.ini
fi
fi
}
 
 
#
# SLIM CONFIGURATION
#
function check_and_configure_slim
{
# Cracklib
crack_mkdict /usr/share/dict/french /usr/share/dict/american-english | crack_packer /var/cache/cracklib/cracklib_dict >/dev/null || true
perl -pi -e "s/slim_db_pass.*=.*/slim_db_pass = \"$PASSWORD\";/" $SLIM_ETC_DIR/config.php || true
for i in def_domain mail_admin mail_tickets mail_from mail_notified_migrations
do
db_get slis-slim/$i
RET=`echo $RET|sed "s/@/\\\\\@/"`
perl -pi -e "s/$i.*=.*/$i = \"$RET\";/" $SLIM_ETC_DIR/config.php || true
done
# HTACCESS
echo "AuthName SLIM" > $SLIM_WWW_HTACCESS
echo "AuthType Basic" >> $SLIM_WWW_HTACCESS
echo "AuthBasicAuthoritative Off" >> $SLIM_WWW_HTACCESS
echo "Auth_PG_host localhost" >> $SLIM_WWW_HTACCESS
echo "Auth_PG_port 5432" >> $SLIM_WWW_HTACCESS
echo "Auth_PG_user slim" >> $SLIM_WWW_HTACCESS
echo "Auth_PG_pwd $PASSWORD" >> $SLIM_WWW_HTACCESS
echo "Auth_PG_database slim" >> $SLIM_WWW_HTACCESS
echo "Auth_PG_pwd_table slim_user" >> $SLIM_WWW_HTACCESS
echo "Auth_PG_uid_field login" >> $SLIM_WWW_HTACCESS
echo "Auth_PG_pwd_field password" >> $SLIM_WWW_HTACCESS
echo "<LIMIT GET POST>" >> $SLIM_WWW_HTACCESS
echo "Require valid-user" >> $SLIM_WWW_HTACCESS
echo "</LIMIT>" >> $SLIM_WWW_HTACCESS
 
chown root:www-data $SLIM_WWW_HTACCESS
chmod 640 $SLIM_WWW_HTACCESS
 
# SLIM MONITORING CONFIGURATION
db_get slis-slim/monitor
if [ "$RET" = "true" ]
then
db_get slis-slim/external_monitor_db
if [ "$RET" = "true" ]
then
db_get slis-slim/monitor_db_host
export PGHOST="$RET"
PSQL_HOST="$RET"
SLISMONITORIP="$PSQL_HOST"
db_get slis-slim/monitor_db_name
export PGDATABASE="$RET"
db_get slis-slim/monitor_db_user
export PGUSER="$RET"
db_get slis-slim/monitor_db_password
export PGPASSWORD="$RET"
db_get slis-slim/auto_monitor_db
if [ "$RET" = "true" ]; then
echo "Creating $PGDATABASE base into $PSQL_HOST with user $PGUSER..." >&2
psql -tqc "create database $PGDATABASE encoding 'LATIN1'" template1 >&2 || true
fi
else
PSQL_HOST="localhost"
SLISMONITORIP=`hostname -i|head -1|cut -d" " -f1`
export PGDATABASE="slismonitor"
export PGUSER="slimmonitor"
export PGPASSWORD=`apg -a 0 -n 1 -q -MNCL -m 12`
SLISMONITORPASSWORD=`apg -a 0 -n 1 -q -MNCL -m 12`
 
 
echo "Creating $PGUSER user into $PSQL_HOST..." >&2
su - postgres -c "psql -tqc \"create user $PGUSER with password '$PGPASSWORD' createdb nocreateuser;\" template1" || true
 
db_get slis-slim/auto_monitor_db
if [ "$RET" = "true" ]; then
echo "Creating slismonitor user into $PSQL_HOST..." >&2
su - postgres -c "psql -tqc \"create user slismonitor with password '$SLISMONITORPASSWORD' createdb nocreateuser;\" template1" || true
psql -tqc "create database $PGDATABASE encoding 'LATIN1'" template1 >&2 || true
fi
fi
perl -pi -e "s/monitor=\"\"/monitor=\"yes\"/" $SLIM_ETC_DIR/config_monitor.php || true
db_get slis-slim/def_domain
perl -pi -e "s/ac-grenoble\.fr/$RET/" $SLIM_ETC_DIR/config_monitor.php || true
perl -pi -e "s/.*monitor_db_host.*=.*/\\\$monitor_db_host=\"$PSQL_HOST\";/" $SLIM_ETC_DIR/config_monitor.php || true
perl -pi -e "s/.*monitor_db_name.*=.*/\\\$monitor_db_name=\"$PGDATABASE\";/" $SLIM_ETC_DIR/config_monitor.php || true
perl -pi -e "s/.*monitor_db_user.*=.*/\\\$monitor_db_user=\"$PGUSER\";/" $SLIM_ETC_DIR/config_monitor.php || true
perl -pi -e "s/.*monitor_db_pass.*=.*/\\\$monitor_db_pass=\"$PGPASSWORD\";/" $SLIM_ETC_DIR/config_monitor.php || true
perl -pi -e "s'.*slim_privkey.*=.*'\$slim_privkey=\"$SLIM_ETC_DIR/ssl/slim.key\";'" $SLIM_ETC_DIR/config_monitor.php || true
MONITOR_TABLE_CHECK_TMP=`mktemp`
cp -f $MONITOR_TABLE_CHECK $MONITOR_TABLE_CHECK_TMP
perl -pi -e "s/CHANGEME/$SLISMONITORPASSWORD/" $MONITOR_TABLE_CHECK_TMP
perl -pi -e "s/sql_server_ip_here/$SLISMONITORIP/" $MONITOR_TABLE_CHECK_TMP
 
db_get slis-slim/auto_monitor_db
if [ "$RET" = "true" ]; then
#
# database creation and initialisation
#
db_get slis-slim/sample_data
if [ "$RET" = "false" ]
then
MONITOR_EXAMPLE_DATA=""
fi
 
TMPFILE=`mktemp`
for i in $MONITOR_STRUCT $MONITOR_CHECK_STRUCT $MONITOR_TABLE_GLOBAL \
$MONITOR_TABLE_CHECK_TMP $MONITOR_EXAMPLE_DATA
do
echo -n "Populating SQL (monitor) from $i..." >&2
egrep -v "SET client_encoding|SET SESSION AUTHORIZATION|COMMENT ON SCHEMA" $i | psql -q $PGDATABASE > $TMPFILE 2>&1|| true
grep -v "NOTICE" $TMPFILE >&2 || true
echo "done." >&2
done
rm -f $TMPFILE $MONITOR_TABLE_CHECK_TMP
fi
else
perl -pi -e "s/monitor=\"yes\"/monitor=\"\"/" $SLIM_ETC_DIR/config_monitor.php || true
fi
 
}
 
 
#
# Fix permissions
#
function fix_permissions
{
chown -R www-data:www-data $SLIM_WWW_DIR/download || true
chown -R www-data:www-data $SLIM_WWW_DIR/upload || true
chmod 775 $SLIM_WWW_DIR/download || true
chmod 775 -R $SLIM_WWW_DIR/download/v*dks* || true
}
 
 
 
function create_symlinks
{
if [ ! -f "$SLIM_WWW_DIR/.htaccess" ]; then
ln -sf $SLIM_WWW_HTACCESS $SLIM_WWW_DIR/.htaccess
else
echo "The file $SLIM_WWW_DIR/.htaccess exist. Not creating the symlink"
fi
 
if [ ! -f "$SLIM_WWW_DIR/include/config.php" ]; then
ln -sf $SLIM_ETC_DIR/config.php $SLIM_WWW_DIR/include/config.php
else
echo "The file $SLIM_WWW_DIR/include/config.php exist. Not creating the symlink"
fi
 
if [ ! -f "$SLIM_WWW_DIR/include/config_monitor.php" ]; then
ln -sf $SLIM_ETC_DIR/config_monitor.php $SLIM_WWW_DIR/include/config_monitor.php
else
echo "The file $SLIM_WWW_DIR/include/config_monitor.php exist. Not creating the symlink"
fi
}
 
 
function configure_first_install
{
 
# SSL Certificats
check_and_install_certificates
 
# Postgresql 8.1
check_and_configure_postgresql81
 
# Slim
check_and_configure_slim
 
# Php5
check_and_configure_php5
 
# Apache configuration
check_and_configure_apache
 
# Fix permissions
fix_permissions
 
# Create conf. symlinks
create_symlinks
}
 
function configure_upgrade
{
# SSL Certificats
check_and_install_certificates
 
# Php5
check_and_configure_php5
 
# Apache configuration
check_and_configure_apache
 
# Postgresql 8.1 (not yet ready for that)
#check_and_configure_postgresql81
# Slim (not yet ready for that)
#check_and_configure_slim
 
# Fix permissions
fix_permissions
 
# Create conf. symlinks
create_symlinks
}
 
 
 
case "$1" in
configure)
# Check if this is the first install or an upgrade
if [ "$2" = "" ]; then
configure_first_install
else
configure_upgrade $2
fi
echo "Upgrading package to 2.0.5 not yet finished ..."
 
db_stop
;;
 
abort-upgrade|abort-remove|abort-deconfigure)
;;
 
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
 
#DEBHELPER#
 
exit 0
 
 
Property changes:
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/debian/compat
New file
0,0 → 1,0
4
Property changes:
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/debian/cron.d
New file
0,0 → 1,0
14 22 * * * root export LANG=C;wget --no-check-certificate -q -O /var/log/monitor_cleanDB.log https://localhost/slim/scripts/monitor/get/monitor_cleanDB.php
Property changes:
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/debian/postrm
New file
0,0 → 1,80
#!/bin/sh
set -e
 
. /usr/share/debconf/confmodule
 
APACHE_SSL_DIR="/etc/apache2/ssl"
SLIM_DIR="/var/www/slim"
SLIM_SHARE_DIR="/usr/share/slim"
PHP_ETC_DIR="/etc/php5"
PG_ETC_DIR="/etc/postgresql/8.1/main"
PG_HBA_CONF="$PG_ETC_DIR/pg_hba.conf"
 
function rm_symlink_if_exist
{
[ -h "$1" ] && rm -f "$1"
}
 
function remove_slim
{
a2dissite slim.conf || true
rm_symlink_if_exist $PHP_ETC_DIR/apache2/conf.d/php_slim.ini
rm_symlink_if_exist $SLIM_WWW_DIR/include/config.php
rm_symlink_if_exist $SLIM_WWW_DIR/include/config_monitor.php
}
 
 
function purge_slim
{
db_input medium slis-slim/drop_database
db_go
db_get slis-slim/drop_database
if [ "$RET" = "true" ]
then
su - postgres -c "psql -tqc \"drop database slim;\" template1" >&2 || true
su - postgres -c "psql -tqc \"drop user slim;\" template1" >&2 || true
db_get slis-slim/external_monitor_db
if [ "$RET" = "false" ]
then
su - postgres -c "psql -tqc \"drop database slismonitor;\" template1" >&2 || true
su - postgres -c "psql -tqc \"drop user slimmonitor;\" template1" >&2 || true
su - postgres -c "psql -tqc \"drop user slismonitor;\" template1" >&2 || true
fi
fi
db_get slis-slim/self_signed_certificate
if [ "$RET" = "true" ]
then
rm -f $APACHE_SSL_DIR/slim.cert
rm -f $APACHE_SSL_DIR/slim.key
fi
rm -f /etc/apache2/sites-available/slim.conf
cp -f $PG_HBA_CONF $PG_HBA_CONF.slim_pkg_purge || true
cp -f $PG_HBA_CONF.slim_pkg_orig $PG_HBA_CONF || true
perl -pi -e "s/.*slim.*all.*password//" /var/lib/postgres/data/pg_hba.conf || true
rm -f $SLIM_DIR/.htaccess
rm -f /var/www/slim/scripts/monitor/get/slimcert.pem
db_stop
}
 
 
case "$1" in
purge)
purge_slim
;;
 
remove)
remove_slim
;;
 
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
 
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
esac
 
#DEBHELPER#
 
exit 0
 
Property changes:
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/debian/config
New file
0,0 → 1,101
#!/bin/bash
 
. /usr/share/debconf/confmodule
 
set -e
 
# SSL CERTIFICATE
if [ ! -f /etc/apache2/ssl/slim.cert ]
then
db_input high slis-slim/self_signed_certificate || true
db_go
db_get slis-slim/self_signed_certificate
if [ "$RET" = "false" ]
then
db_input high slis-slim/no_self_signed_certificate || true
db_go
fi
fi
 
# Postgres
db_input high slis-slim/postgres_config || true
db_go
 
db_input high slis-slim/sample_data || true
db_go
 
# Php
db_input high slis-slim/php_config || true
db_go
 
# Apache
db_input high slis-slim/apache_ports_listen || true
db_go
 
# SLIM CONFIG VARIABLES
DOMAIN=`hostname -d`
db_get slis-slim/def_domain
[ "$RET" = "" ] && db_set slis-slim/def_domain "$DOMAIN"
db_input high slis-slim/def_domain || true
db_go
db_get slis-slim/def_domain
DOMAIN=$RET
db_get slis-slim/mail_admin
[ "$RET" = "" ] && db_set slis-slim/mail_admin "slim-admin@$DOMAIN"
db_get slis-slim/mail_tickets
[ "$RET" = "" ] && db_set slis-slim/mail_tickets "incident-list@$DOMAIN"
db_get slis-slim/mail_from
[ "$RET" = "" ] && db_set slis-slim/mail_from "slim@$DOMAIN"
for i in mail_admin mail_tickets mail_from mail_notified_migrations
do
if [ "$i" = "mail_notified_migrations" ]
then
db_get slis-slim/mail_admin
MAIL_ADMIN="$RET"
db_get slis-slim/mail_notified_migrations
[ "$RET" = "" ] && db_set slis-slim/mail_notified_migrations "$MAIL_ADMIN"
fi
db_input high slis-slim/$i || true
db_go
done
 
# SLIM MONITORING VARIABLES
db_input high slis-slim/monitor || true
db_go
db_get slis-slim/monitor
if [ "$RET" = "true" ]
then
db_input high slis-slim/external_monitor_db || true
db_go
db_get slis-slim/external_monitor_db
if [ "$RET" = "true" ]
then
db_get slis-slim/monitor_db_host
[ "$RET" = "" ] && db_set slis-slim/monitor_db_host "sql.$DOMAIN"
db_go
db_input high slis-slim/monitor_db_host || true
db_input high slis-slim/monitor_db_name || true
db_input high slis-slim/monitor_db_user || true
db_input high slis-slim/monitor_db_password || true
db_input high slis-slim/monitor_slismonitor || true
db_input high slis-slim/monitor_slismonitor_password || true
fi
db_input high slis-slim/auto_monitor_db || true
db_go
db_get slis-slim/auto_monitor_db
if [ "$RET" = "true" ]
then
db_get slis-slim/external_monitor_db
if [ "$RET" = "true" ]
then
db_input high slis-slim/monitor_checklist_auto || true
db_go
fi
fi
fi
 
db_input high slis-slim/login || true
db_go
 
# End debconf
db_stop
Property changes:
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/debian/changelog
New file
0,0 → 1,264
slis-slim (2.0.5~rc5) slim-dev; urgency=low
 
[ Laurent Cooper ]
* Added lcs.conf and virtualization variables in slis.conf
* Modified make.php in order to construct lcs.conf
 
[ Philippe Le Brouster ]
* Fixed slis.conf in the 4.1dks1 template
* Renamed some field titles corresponding to the slis version supervision
scripts in the web page
* Removed several obselete variables in slis.conf
* Add monitoring variables in lcs.conf
* For version 4.1, DOMAIN is contructed to correspond the the site domain at
the dks generation
* Visual cleaning in ZDKS/make.php
* Add lcs access for slis 4.1 in rootShell
* Add Host access for slis 4.1 in rootShell
* Add version selection in the supervision monitor check list
* Add version selection in the user config
* Remove the comments that were specific to a language when getting the monitor
checks with monitor_getscript.php
* Fixed the default right path of the private key file '/etc/slis-slim/ssl/slim.key'
* Added the possibility to add all default routes to the all existing tunels.
* Added some French translations.
* Added new default value tables for SLIS 4.1 / LCS 2.0 configuration
generation
* Moved setup.data script in the ZDKS directory and change the title page to
"SLIS 3.x - 4.0"
* Added a new parameter to the FileDefvalue->get_setup_data function in
order to specify the corresponding file. By default it is 'setup.data' to
keep the compatibility.
* Fixed error in the default slis 4.1 dks config (rsync module).
* Added a custom script that enable a subset of supervision scripts for a
subset of slis in /usr/share/doc/slis-slim/.
 
-- Philippe Le Brouster <plb@ac-grenoble.fr> Thu, 25 Sep 2008 13:46:08 +0200
 
slis-slim (2.0.5~rc4) slim-dev; urgency=low
 
[ Philippe Le Brouster ]
* Fix: change default log filename extension to .log for apache2 to be sure
that apache2 logrotate rule is effective.
* Changed TransfertLog to CustomLog directive into apache2 config file.
* Removed old references to 'xen' in 4.0dks1 matrix slis.conf
* Changed default repositories to ftp.slis.fr in matrix 4.x
* postinst set now recursivly group of /var/www/slim/upload to www-data
* Fixed misspelled option log_errors in slim_php.ini
* Fixed bugs in monitor_getscript.php and rewrite it to be more efficient
(only 2 sql queries for getting scriptsi by monitoring)
* Added option 'allow_url_include= On' in php configuration file to allow
include of monitor_getdisplayscript.php file
* Removed section directive in php_slim.ini configuration file
* Changed 'slimpass' location in system scripts to /etc/slis-slim/slimpass
* Removed useless comments in config_monitor.php
* postinst test now if monitoring database must be initialized
* Added zend php4 model object compatibility in slim_php.ini
* Changed default value of $DB_PASSWORD to /etc/slis-slim/slimpass in
slim_generate_dks.pl
* Fix: Added /var/www/slim/download/tmp folder
* Fix: FormField with name "" (empty) are not processed in DBClass->update_from_fields
* Fix: set add_missing_from after every pg_connect to avoid "missing
FROM-clause entry for table" error
* Moved plugins locations to /var/www/slim/plugins
* Updated the documentation for the new installation process
* Reverted change about the right "view_slis_comment" (because not really
ready).
* Added the check of the apache listen port configuration before asking in
debian/config.
* Added some checks (symlinks, apache2 modules) in postinst to avoid some
tasks when they are useless.
 
-- Philippe Le Brouster <plb@ac-grenoble.fr> Wed, 14 May 2008 08:48:24 +0200
 
slis-slim (2.0.5~rc3) slim-dev; urgency=low
 
[ Bruno TERRAS ]
* Fix monitor_getscript.php error.
* Add translations.
* Correction for slis delete (also delete slishistory)
* Modified User.php for slis create with user!=admin & error with groups and
also to permit view slis to "super_glob" users with 'ALL' view, even if there's
no group for this slis (when you delete a slis ....)
* Add right (and it's management) for Slis comments view (cool, we can now
injury installers ... :)
* BugFix: monitor_check_view, reload when add slis to check
 
[ Philippe Le Brouster ]
* Now use zip & gzip format file to make dks
(update also getconf example)
* in debian/control, architecture is now 'all'
* Fix slim.key path for config_monitor.php in debian/postinst
* Fix the .htaccess link creation in debian/postinst
 
[ Laurent COOPER ]
* Added myself as uploader
* Modified lsstatus to manage slis-version in SLIM (bterras)
* Modified update script to add default slis-compat to checks
* modified ZDKS/make.php to accept both old and new interface name : EXTERNAL_IF_IP and IPADDR0
[ Philippe Le Brouster ]
* Use now php5 with register_global=On
* Fix: update de ssl key to use in config_monitor.php
* Rearrange and clean debian/postinst
* Symlinks for the config files in /etc/slis-slim are now regenerated in case of
upgrading
* Use conf.d for php5 configuration
* Added some tips into documentation docs/install_guide/slis-slim.xml
* Fix: use the right URL in cron file to launch clean database
* Moved documentations into docs/howto
* Added 4.1dks matrix
 
-- Philippe Le Brouster <plb@ac-grenoble.fr> Fri, 18 Apr 2008 17:16:29 +0200
 
slis-slim (2.0.5~rc2) testing; urgency=low
 
* Update the database structure (now 2.0.5) to add the possibility to make
the monitoring script corresponding to a slis version
* Add the 4.0-xendks1 matrix for slis4 (lcslis)
* Add into doc a script (From versailles) allow to download the slis
configuration with the slisname and the hadmin password
* Change the mirror in the sources.list for the 4.0-xendks1
* Change the default LDAP_SERVER and the lcs update parameters in slis.conf for the 4.0-xendks1
* Add 'per version' script monitoring possibility.
* Remove the router configuration file from the 4.0-xendks1 config
* Now treat all files in /var/www/slim/download as conffile
 
-- Philippe Le Brouster <plb@ac-grenoble.fr> Mon, 17 Dec 2007 15:10:38 +0100
 
slis-slim (2.0.5~rc1) testing; urgency=low
 
* This package is now for debian etch
* Move config files into /etc/slim directory
* Add templates i18n system
* Add to Depends apache2 (>= 2.2.3) and postgresql (>= 7.4)
* Make the templates conform to the debian policy
 
-- Philippe Le Brouster <plb@ac-grenoble.fr> Thu, 11 Oct 2007 15:31:56 +0200
 
slis-slim (2.0.5~dev.1) unstable; urgency=low
 
* Change Depends: wenglish to wenglish | wamercian
* Modify Makefile to create /etc/apache/ssl directory
* Add /etc/apache2/httpd.conf if not exist
* Add apache2.2 configuration and use it if necessary
* detect if postgresql come from sarge or from etch (some file path changes)
* Change makefile clean call in debian/rules to respect the debian policy
 
-- Philippe Le Brouster <plb@ac-grenoble.fr> Tue, 09 Oct 2007 15:14:43 +0200
 
slis-slim (2.0.4-14) testing; urgency=low
 
* Bugfix: missing join into the function that searches for the
"default_group" right.
 
-- Bruno Bzeznik <bzeznik@trinity.ac-grenoble.fr> Wed, 5 Jul 2006 10:50:44 +0200
 
slis-slim (2.0.4-13) testing; urgency=low
 
* parent_slis did not work into monitoring
 
-- Bruno Bzeznik <bzizou@slis.fr> Thu, 1 Jun 2006 14:31:37 +0200
 
slis-slim (2.0.4-12) testing; urgency=low
 
* Added "REVOKE ALL ON pg_shadow FROM PUBLIC" before creating users into
postgres
* Fixed example data (parent_slisname not known into initial release 2.0.3)
 
-- Bruno Bzeznik <bzizou@localhost.localdomain> Fri, 28 Apr 2006 15:36:37 +0200
 
slis-slim (2.0.4-11) testing; urgency=low
 
* Patch from olecam for the slim proxy to manage SLISv4 interface
 
-- Bruno Bzeznik <bzeznik@trinity.ac-grenoble.fr> Tue, 25 Apr 2006 09:24:31 +0200
 
slis-slim (2.0.4-10) testing; urgency=low
 
* Bugfix: connexion speed problem fixed
(see https://svn.ac-grenoble.fr/cgi-bin/viewcvs.cgi/slim/include/updates/m1.0.php?rev=2260&r1=1138&r2=2260)
 
-- Bruno Bzeznik <bzeznik@trinity.ac-grenoble.fr> Tue, 18 Apr 2006 16:49:32 +0200
 
slis-slim (2.0.4-9) testing; urgency=low
 
* Minor changes: Slisrootshell enhancement by olecam and SLIS 4.0 DKS
compliant
 
-- Bruno Bzeznik <bzeznik@trinity.ac-grenoble.fr> Mon, 3 Apr 2006 15:23:49 +0200
 
slis-slim (2.0.4-8) testing; urgency=low
 
* Removed erroneous default value for CURL_PROXY configuration variable
* Fixes from Olivier Le Cam: Accept vtun login and passwd up to 64 bytes
long., Bugfixes with modify_admin_user/create_hadmin_user/delete_hadmin_user
rights, Added %slis_version% variable, Get curl more verbose in case of
error connecting the remote host, olecam: if the user is member of the
slis group ALL, SLIM will list all the groups
* Added slis_rootshell script into utils
 
-- Bruno Bzeznik <bzeznik@trinity.ac-grenoble.fr> Tue, 28 Mar 2006 11:31:55 +0200
 
slis-slim (2.0.4-7) testing; urgency=low
 
* Added monitoring sample data and updated the monitoring checks
 
-- Bruno Bzeznik <bzeznik@trinity.ac-grenoble.fr> Mon, 27 Mar 2006 18:12:19 +0200
 
slis-slim (2.0.4-6) testing; urgency=low
 
* Sample data are working. But still missing sample monitoring data and
custom view with them. Also, I need to update the monitor checks with the
newest ones.
 
-- Bruno Bzeznik <bzeznik@trinity.ac-grenoble.fr> Thu, 23 Mar 2006 14:03:44 +0100
 
slis-slim (2.0.4-5) testing; urgency=low
 
* Misc bug fixed (especially the default variables that we could not
change). Still needs debugging: sample data not finished, error while
inserting.
 
-- Bruno Bzeznik <bzeznik@trinity.ac-grenoble.fr> Tue, 21 Mar 2006 13:57:01 +0100
 
slis-slim (2.0.4-4) testing; urgency=low
 
* This version contains the sample data
 
-- Bruno Bzeznik <bzeznik@trinity.ac-grenoble.fr> Mon, 6 Mar 2006 12:11:50 +0100
 
slis-slim (2.0.4-3) testing; urgency=low
 
* A lot of fixes. This package is must more functional, but still missing
the example entries
 
-- Bruno Bzeznik <bzeznik@trinity.ac-grenoble.fr> Fri, 3 Mar 2006 16:22:44 +0100
 
slis-slim (2.0.4-2) testing; urgency=low
 
* Moved slim into /slim of the document root to correspond to default values
into SLIS
* Upgraded the DKS to 3.2dks2
 
-- Bruno Bzeznik <bzeznik@trinity.ac-grenoble.fr> Thu, 2 Mar 2006 15:28:58 +0100
 
slis-slim (2.0.4-1) testing; urgency=low
 
* First usable version of this package!
 
-- Bruno Bzeznik <bzeznik@trinity.ac-grenoble.fr> Thu, 23 Feb 2006 17:52:10 +0100
 
slis-slim (2.0.3-1) unstable; urgency=low
 
* Files copied
 
-- Bruno Bzeznik <bzeznik@trinity.ac-grenoble.fr> Tue, 21 Feb 2006 10:53:14 +0100
 
slis-slim (2.0.3) unstable; urgency=low
 
* Initial Release.
 
-- Bruno Bzeznik <Bzizou@slis.fr> Tue, 21 Feb 2006 08:54:39 +0100
 
 
Property changes:
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/debian/conffiles
New file
0,0 → 1,67
/var/www/slim/download/mkvars.pl
/var/www/slim/download/v3.2dks2/MATRIX/conf-adsl
/var/www/slim/download/v3.2dks2/MATRIX/post-install
/var/www/slim/download/v3.2dks2/MATRIX/routes
/var/www/slim/download/v3.2dks2/MATRIX/setup
/var/www/slim/download/v3.2dks2/MATRIX/conf-ap.chat
/var/www/slim/download/v3.2dks2/MATRIX/conf-101l
/var/www/slim/download/v3.2dks2/MATRIX/conf-837
/var/www/slim/download/v3.2dks2/MATRIX/smb.conf.slis
/var/www/slim/download/v3.2dks2/MATRIX/conf-efficient-5861.chat
/var/www/slim/download/v3.2dks2/MATRIX/splash.xpm.gz
/var/www/slim/download/v3.2dks2/MATRIX/diald-filters.vtun
/var/www/slim/download/v3.2dks2/MATRIX/conf-877
/var/www/slim/download/v3.2dks2/MATRIX/conf-101l.chat
/var/www/slim/download/v3.2dks2/MATRIX/conf-congo
/var/www/slim/download/v3.2dks2/MATRIX/conf-760
/var/www/slim/download/v3.2dks2/MATRIX/conf-congo.chat
/var/www/slim/download/v3.2dks2/MATRIX/conf-801.config
/var/www/slim/download/v3.2dks2/MATRIX/default_filters
/var/www/slim/download/v3.2dks2/MATRIX/syslog.conf
/var/www/slim/download/v3.2dks2/MATRIX/issue.slis
/var/www/slim/download/v3.2dks2/MATRIX/README.ipsec
/var/www/slim/download/v3.2dks2/MATRIX/COPYING
/var/www/slim/download/v3.2dks2/MATRIX/diald-filters
/var/www/slim/download/v3.2dks2/MATRIX/ipsec.secrets
/var/www/slim/download/v3.2dks2/MATRIX/conf-efficient-5861
/var/www/slim/download/v3.2dks2/MATRIX/setup.data
/var/www/slim/download/v3.2dks2/MATRIX/slis-core-patch.tgz
/var/www/slim/download/v3.2dks2/MATRIX/logo.gif
/var/www/slim/download/v3.2dks2/MATRIX/users
/var/www/slim/download/v3.2dks2/MATRIX/remplace
/var/www/slim/download/v3.2dks2/MATRIX/README.slis-core-patch
/var/www/slim/download/v3.2dks2/MATRIX/default_schedule
/var/www/slim/download/v3.2dks2/MATRIX/README
/var/www/slim/download/v3.2dks2/MATRIX/conf-877.config
/var/www/slim/download/v3.2dks2/MATRIX/conf-101l.stty
/var/www/slim/download/v3.2dks2/MATRIX/README.TLS
/var/www/slim/download/v3.2dks2/MATRIX/backup-1.x.bash
/var/www/slim/download/v3.2dks2/MATRIX/sources.list
/var/www/slim/download/v3.2dks2/MATRIX/CREDITS
/var/www/slim/download/v3.2dks2/MATRIX/rc.local
/var/www/slim/download/v3.2dks2/MATRIX/routes.tun
/var/www/slim/download/v3.2dks2/MATRIX/conf-ap
/var/www/slim/download/v3.2dks2/MATRIX/conf-760.upload
/var/www/slim/download/v3.2dks2/MATRIX/subnets
/var/www/slim/download/v3.2dks2/MATRIX/conf-837.config
/var/www/slim/download/v3.2dks2/MATRIX/conf-801
/var/www/slim/download/v3.2dks2/MATRIX/setup.slis
/var/www/slim/download/v3.2dks2/MATRIX/isdn.conf.slis
/var/www/slim/download/v3.2dks2/MATRIX/mksquidconf
/var/www/slim/download/v4.0dks1/MATRIX/part.data.template1
/var/www/slim/download/v4.0dks1/MATRIX/routes
/var/www/slim/download/v4.0dks1/MATRIX/ssleay.cnf
/var/www/slim/download/v4.0dks1/MATRIX/part.data.template2
/var/www/slim/download/v4.0dks1/MATRIX/default_schedule
/var/www/slim/download/v4.0dks1/MATRIX/slis.conf
/var/www/slim/download/v4.0dks1/MATRIX/sources.list
/var/www/slim/download/v4.0dks1/MATRIX/routes.tun
/var/www/slim/download/v4.0dks1/MATRIX/default_subnets
/var/www/slim/download/v4.1dks1/MATRIX/slis.conf
/var/www/slim/download/v4.1dks1/MATRIX/lcs.conf
/var/www/slim/download/v4.1dks1/MATRIX/sources.list
/var/www/slim/download/v4.1dks1/MATRIX/ssleay.cnf
/var/www/slim/download/v4.1dks1/MATRIX/routes
/var/www/slim/download/v4.1dks1/MATRIX/routes.tun
/var/www/slim/download/v4.1dks1/MATRIX/default_subnets
/var/www/slim/download/v4.1dks1/MATRIX/default_schedule
Property changes:
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/debian/copyright
New file
0,0 → 1,28
This is slis-slim, written by Bruno Bzeznick <bzizou@slis.fr> and
maintained by Philippe Le Brouster <plb@ac-grenoble.fr>
 
The original source can always be found at:
ftp://ftp.debian.org/dists/unstable/main/source/
 
Copyright (C) 2005-2006 Bruno Bzeznik
Copyright (C) 2007 Philippe Le Brouster
 
License:
 
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 package; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301, USA.
 
On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL'.
Property changes:
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/debian/docs
___________________________________________________________________
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/GroupField.php
New file
0,0 → 1,62
<?PHP
/* $Id: GroupField.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Group Field class
 
include_once("gui/FormField.php");
 
class GroupField extends FormField
{
function GroupField($title, $not_null = 0) // Group Field constructor
{
$parent = get_parent_class($this);
$this->$parent("", $title, "", 0, $not_null);
$this->fields = array();
}
 
function add_field(&$field) // add a field to the group
{
array_push($this->fields, &$field);
}
 
function cell_code(&$form) // return HTML code for the second <td> tag of a form field
{
global $slim_theme;
 
$str = "<td".$slim_theme->form_cell_code($this->not_null).">\n";
$str .= "<table width=100% border=0 cellpadding=0 cellspacing=0><tr>\n";
$sep = "";
foreach ($this->fields as $field)
{
$str .= $field->header_code($this);
$str .= $field->cell_code($this);
}
$str .= "</tr></table></td>\n";
return $str;
}
 
function update_object(&$object) // update an object from a field value (can be redefined)
{
foreach ($this->fields as $field)
{
$field->update_object($object);
}
}
 
}
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/LinkField.php
New file
0,0 → 1,81
<?PHP
/* $Id: LinkField.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Table Link Field class
 
include_once("gui/Field.php");
 
class LinkField extends Field
{
function LinkField($name, $title, $url_script = "", $url_attr = "", $url_meth = "", $fmt_str = "", $fmt_meth = "", $url_suffix="",$attr_repl="") // Table Link Field constructor
{
global $SCRIPT_NAME;
$parent = get_parent_class($this);
$this->$parent($name, $title, $fmt_str, $fmt_meth);
if ($url_script) $this->url_script = $url_script;
else $this->url_script = $SCRIPT_NAME;
if ($url_attr) $this->url_attr = $url_attr;
else $this->url_attr = $name;
$this->url_meth = $url_meth;
$this->url_suffix=$url_suffix;
$this->attr_repl=$attr_repl;
}
 
function obj_code(&$object) // return HTML code for an object cell (can be redefined)
{
$attr = $this->name;
$attr2 = $this->url_attr;
if ($this->url_meth)
{
$meth = $this->url_meth;
$url = $object->$meth();
}
else
{
if ($object->$attr2) {
if ($this->attr_repl)
$url = $this->url_script."?".$this->attr_repl."=".urlencode($object->$attr2);
else
$url = $this->url_script."?".$this->url_attr."=".urlencode($object->$attr2);
}
else
$url=0;
}
if ($this->fmt_meth)
{
$meth = $this->fmt_meth;
$txt = $object->$meth();
}
else if ($this->fmt_str)
{
$txt = sprintf($this->fmt_str, $object->$attr);
}
else
{
$txt = $object->$attr;
}
if ($this->url_suffix){
$url.=$this->url_suffix;
}
 
if ($url) return '<a href="'.$url.'">'.$txt.'</a>';
else return $txt;
}
}
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/RadioField.php
New file
0,0 → 1,53
<?PHP
/* $Id: TextField.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Form Field class
 
// olecam: this class strongly needs to be rewritten by a object PHP guru!
// I wrote it for the "shell root" check script of the monitor
 
include_once("gui/FormField.php");
 
class RadioField extends FormField
{
function RadioField($name, $title, $radio_options, $default) // Radio Field constructor
{
$parent = get_parent_class($this);
$this->$parent($name, $title, "", 0, $not_null);
$this->radio_options = $radio_options;
$this->default = $default;
}
 
function cell_code(&$form) // return HTML code for the second <td> tag of a form field
{
global $slim_theme;
 
$str = "<tr>\n";
$str .= "<font".$slim_theme->font_code().">\n";
$str .= "<td>\n";
$i = 0;
foreach ($this->radio_options as $key=>$value) {
$checked = ($this->default == $i++) ? " checked" : "";
$str .= sprintf ("<br><input type='radio' name='%s' value='%s'%s>%s\n",
$this->name, $key, $checked, $value);
}
$str .= "</td></tr>\n";
return $str;
}
}
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/Theme.php
New file
0,0 → 1,431
<?PHP
/* $Id: Theme.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management Theme class
 
class Theme
{
function Theme($theme_name) // Theme constructor
{
$this->name = $theme_name;
}
 
function get_menu_width() // return menu width of the theme
{
if ($this->menu_width)
{
return $this->menu_width;
}
else
{
return 120; // default value;
}
}
 
function get_menu_height() // return menu height of the theme
{
if ($this->menu_height)
{
return $this->menu_height;
}
else
{
return 30; // default value;
}
}
 
function body_code() // return HTML code included in <body> tag
{
$str = "";
if ($this->text_color)
{
$str .= " text=\"$this->text_color\"";
}
if ($this->link_color)
{
$str .= " link=\"$this->link_color\"";
}
if ($this->vlink_color)
{
$str .= " vlink=\"$this->vlink_color\"";
}
if ($this->alink_color)
{
$str .= " alink=\"$this->alink_color\"";
}
if ($this->bg_color)
{
$str .= " bgcolor=\"$this->bg_color\"";
}
if ($this->bg_pixmap)
{
$str .= " background=\"/slimg/$this->name/$this->bg_pixmap\"";
}
return $str;
}
 
function menu_body_code() // return HTML code included in <body> tag of menu
{
$str = "";
if ($this->menu_text_color)
{
$str .= " text=\"$this->menu_text_color\"";
}
else if ($this->text_color)
{
$str .= " text=\"$this->text_color\"";
}
if ($this->menu_link_color)
{
$str .= " link=\"$this->menu_link_color\"";
}
else if ($this->link_color)
{
$str .= " link=\"$this->link_color\"";
}
if ($this->menu_vlink_color)
{
$str .= " vlink=\"$this->menu_vlink_color\"";
}
else if ($this->vlink_color)
{
$str .= " vlink=\"$this->vlink_color\"";
}
if ($this->menu_alink_color)
{
$str .= " alink=\"$this->menu_alink_color\"";
}
else if ($this->alink_color)
{
$str .= " alink=\"$this->alink_color\"";
}
if ($this->menu_bg_color)
{
$str .= " bgcolor=\"$this->menu_bg_color\"";
}
else if ($this->bg_color)
{
$str .= " bgcolor=\"$this->bg_color\"";
}
if ($this->menu_bg_pixmap)
{
$str .= " background=\"/slimg/$this->name/$this->menu_bg_pixmap\"";
}
else if ($this->bg_pixmap)
{
$str .= " background=\"/slimg/$this->name/$this->bg_pixmap\"";
}
return $str;
}
 
function font_code() // return HTML code included in main <font> tag
{
$str = "";
if ($this->font_face)
{
$str .= " face=\"$this->font_face\"";
}
if ($this->font_color)
{
$str .= " color=\"$this->font_color\"";
}
if ($this->font_size)
{
$str .= " size=\"$this->font_size\"";
}
return $str;
}
 
function alert_font_code() // return HTML code included in main <font> tag
{
if ($this->font_alert_color) {
$color=$this->font_alert_color;
} else {
$color="red";
}
$str = "";
if ($this->font_face)
{
$str .= " face=\"$this->font_face\"";
}
// if ($this->font_color)
{
$str .= " color=\"$color\"";
}
if ($this->font_size)
{
$str .= " size=\"$this->font_size\"";
}
return $str;
}
 
function menu_font_code() // return HTML code included in main <font> tag of menu
{
$str = "";
if ($this->menu_font_face)
{
$str .= " face=\"$this->menu_font_face\"";
}
else if ($this->font_face)
{
$str .= " face=\"$this->font_face\"";
}
if ($this->menu_font_color)
{
$str .= " color=\"$this->menu_font_color\"";
}
else if ($this->font_color)
{
$str .= " color=\"$this->font_color\"";
}
if ($this->menu_font_size)
{
$str .= " size=\"$this->menu_font_size\"";
}
else if ($this->font_size)
{
$str .= " size=\"$this->font_size\"";
}
return $str;
}
 
function topleft_body_code() // return HTML code included in <body> tag of topleft
{
$str = "";
if ($this->topleft_text_color)
{
$str .= " text=\"$this->topleft_text_color\"";
}
else if ($this->menu_text_color)
{
$str .= " text=\"$this->menu_text_color\"";
}
else if ($this->text_color)
{
$str .= " text=\"$this->text_color\"";
}
if ($this->topleft_link_color)
{
$str .= " link=\"$this->topleft_link_color\"";
}
else if ($this->menu_link_color)
{
$str .= " link=\"$this->menu_link_color\"";
}
else if ($this->link_color)
{
$str .= " link=\"$this->link_color\"";
}
if ($this->topleft_vlink_color)
{
$str .= " vlink=\"$this->topleft_vlink_color\"";
}
else if ($this->menu_vlink_color)
{
$str .= " vlink=\"$this->menu_vlink_color\"";
}
else if ($this->vlink_color)
{
$str .= " vlink=\"$this->vlink_color\"";
}
if ($this->topleft_alink_color)
{
$str .= " alink=\"$this->topleft_alink_color\"";
}
else if ($this->menu_alink_color)
{
$str .= " alink=\"$this->menu_alink_color\"";
}
else if ($this->alink_color)
{
$str .= " alink=\"$this->alink_color\"";
}
if ($this->topleft_bg_color)
{
$str .= " bgcolor=\"$this->topleft_bg_color\"";
}
else if ($this->menu_bg_color)
{
$str .= " bgcolor=\"$this->menu_bg_color\"";
}
else if ($this->bg_color)
{
$str .= " bgcolor=\"$this->bg_color\"";
}
if ($this->topleft_bg_pixmap)
{
$str .= " background=\"/slimg/$this->name/$this->topleft_bg_pixmap\"";
}
else if ($this->menu_bg_pixmap)
{
$str .= " background=\"/slimg/$this->name/$this->menu_bg_pixmap\"";
}
else if ($this->bg_pixmap)
{
$str .= " background=\"/slimg/$this->name/$this->bg_pixmap\"";
}
return $str;
}
 
function topleft_font_code() // return HTML code included in main <font> tag of topleft
{
$str = "";
if ($this->topleft_font_face)
{
$str .= " face=\"$this->topleft_font_face\"";
}
else if ($this->menu_font_face)
{
$str .= " face=\"$this->menu_font_face\"";
}
else if ($this->font_face)
{
$str .= " face=\"$this->font_face\"";
}
if ($this->topleft_font_color)
{
$str .= " color=\"$this->topleft_font_color\"";
}
else if ($this->menu_font_color)
{
$str .= " color=\"$this->menu_font_color\"";
}
else if ($this->font_color)
{
$str .= " color=\"$this->font_color\"";
}
if ($this->topleft_font_size)
{
$str .= " size=\"$this->topleft_font_size\"";
}
else if ($this->menu_font_size)
{
$str .= " size=\"$this->menu_font_size\"";
}
else if ($this->font_size)
{
$str .= " size=\"$this->font_size\"";
}
return $str;
}
 
function table_code() // return HTML code included in <table> tag
{
$str = "";
if (isset($this->table_border))
{
$str .= " border=\"$this->table_border\"";
}
if (isset($this->cell_spacing))
{
$str .= " cellspacing=\"$this->cell_spacing\"";
}
if (isset($this->cell_padding))
{
$str .= " cellpadding=\"$this->cell_padding\"";
}
return $str;
}
 
function th_code() // return HTML code included in <th> tag (field header)
{
$str = "";
if ($this->th_bg_color)
{
$str .= " bgcolor=\"$this->th_bg_color\"";
}
if ($this->th_bg_pixmap)
{
$str .= " background=\"/slimg/$this->name/$this->th_bg_pixmap\"";
}
return $str;
}
 
function td_code($ofs) // return HTML code included in <td> tag (field row cell)
{
$str = "";
$col = "td_bg_color$ofs";
$pix = "td_bg_pixmap$ofs";
if ($this->$col)
{
$str .= ' bgcolor="'.$this->$col.'"';
}
if ($this->$pix)
{
$str .= ' background="/slimg/$this->name/'.$this->$pix.'"';
}
return $str;
}
 
function form_code() // return HTML code included in main <table> tag a form
{
$str = " cellspacing=0";
if (isset($this->form_border))
{
$str .= " border=\"$this->form_border\"";
}
if (isset($this->form_margin))
{
$str .= " cellpadding=\"$this->form_margin\"";
}
return $str;
}
 
function form_code2() // return HTML code included in second <table> tag a form
{
$str = " cellspacing=0 border=0";
if (isset($this->form_spacing))
{
$str .= " cellpadding=\"$this->form_spacing\"";
}
return $str;
}
 
function form_cell_code($not_null = 0) // return HTML code included in <td> tag of form field
{
$str = "";
if ($not_null)
{
if ($this->form_bg_color2)
{
$str .= " bgcolor=\"$this->form_bg_color2\"";
}
if ($this->form_bg_pixmap2)
{
$str .= " background=\"/slimg/$this->name/$this->form_bg_pixmap2\"";
}
}
else
{
if ($this->form_bg_color)
{
$str .= " bgcolor=\"$this->form_bg_color\"";
}
if ($this->form_bg_pixmap)
{
$str .= " background=\"/slimg/$this->name/$this->form_bg_pixmap\"";
}
}
return $str;
}
 
}
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/Form.php
New file
0,0 → 1,141
<?PHP
/* $Id: Form.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Form class
 
class Form
{
function Form($action = "", $type = 0) // Form constructor
{
global $SCRIPT_NAME;
if ($action) $this->action = $action;
else $this->action = $SCRIPT_NAME;
$this->type = $type; // for future use (file upload...)
$this->fields = array();
$this->buttons = array();
$this->cols = 1;
}
function setTarget($targetName){
$this->target = $targetName;
}
 
function set_no_i8n() {
$this->no_i8n=true;
}
function set_title() // set the form title
{
$nb_args = func_num_args();
$args = func_get_args();
if ($this->no_i8n) {
$title = array_shift($args);
} else {
$title = __(array_shift($args));
}
if ($nb_args > 1)
{
array_unshift($args, $title);
$title = call_user_func_array('sprintf', $args);
}
$this->title = $title;
}
 
function add_field(&$field,$readolny = false) // add a field to the form
{
array_push($this->fields, &$field);
$this->lastAddedField= &$field;
if ($readolny) {
$field->set_readonly();
}
if ($this->no_i8n) {
$field->set_no_i8n();
}
}
 
function add_button(&$button) // add a button to the form
{
array_push($this->buttons, &$button);
}
 
function build_code($nosecu=false) // return HTML code for a form
{
global $slim_theme;
 
$str = "<form method=post action=\"$this->action\"";
if ($this->target) {
$str.=" TARGET = ".$this->target;
}
 
if ($this->type == 1) // file upload
{
$str .= " enctype=\"multipart/form-data\"";
}
$str .= ">\n";
$str .= "<table".$slim_theme->form_code().">";
if ($this->title)
{
$str .= "<caption><b><font".$slim_theme->font_code().">$this->title</font></b></caption>\n";
}
$str .= "<tr><td".$slim_theme->form_cell_code().">\n";
$str .= "<table border=0 cellspacing=0 cellpadding=0><tr valign=top><td>\n";
$str .= "<table".$slim_theme->form_code2().">\n";
foreach ($this->fields as $field)
{
if ($fmt = $field->format_code($this))
{
$str .= $fmt;
}
else
{
if ($field->valign) $str .= "<tr valign=$field->valign>";
else $str .= "<tr valign=top>";
$str .= $field->header_code($this);
$str .= $field->cell_code($this);
$str .= "</tr>\n";
}
}
$str .= "</table></td></tr>\n";
if (count($this->buttons))
{
$str .= "<tr><td colspan=$this->cols align=center".$slim_theme->form_cell_code()."><hr><font".$slim_theme->font_code().">\n";
foreach ($this->buttons as $button)
{
$str .= $button->cell_code($this,$nosecu);
}
$str .= "</font></td></tr>\n";
}
$str .= "</table>\n";
$str .= "</td></tr></table>\n";
$str .= "</form>\n";
return $str;
}
 
function getFields() {
$retval="";
foreach ($this->fields as $field){
$retval.= $field->name." ";
}
return $retval;
}
 
}
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/html.php
New file
0,0 → 1,403
<?PHP
/* $Id: html.php 258 2004-09-20 15:30:56Z xav $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management html utils
 
include_once("themes/$slim_user->theme/theme.php");
 
 
function html_header($title, $type = 0, $target = "", $meta = "", $javascript ="" ) // return standard HTML header
{
global $slim_user;
global $slim_theme;
global $header_type,$slim_maintenance;
$header_type = $type;
 
$str = "";
$str .= "<!doctype html public \"-//w3c//dtd html 3.2+//$slim_user->lang\">\n";
$str .= "<html>\n";
$str .= "<head>\n";
$str .= "<title>$title</title>\n";
if ($meta)
{
$str .= "<meta $meta>\n";
}
if ($target)
{
$str .= "<base target=\"$target\">\n";
}
if ($javascript)
{
$str .= $javascript."\n";
}
 
$str .= "</head>\n";
if ($header_type == 1) // frameset header
{
}
else if ($header_type == 2) // menu header
{
$str .= "<body";
$str .= $slim_theme->menu_body_code();
$str .= ">\n";
$str .= "<font";
$str .= $slim_theme->menu_font_code();
$str .= ">\n";
}
else if ($header_type == 3) // topleft header
{
$str .= "<body";
$str .= $slim_theme->topleft_body_code();
$str .= ">\n";
$str .= "<font";
$str .= $slim_theme->topleft_font_code();
$str .= ">\n";
}
else // standard header
{
$str .= "<body";
$str .= $slim_theme->body_code();
$str .= ">\n";
$str .= "<font";
$str .= $slim_theme->font_code();
$str .= ">\n";
}
if ($header_type == "" && $slim_maintenance) {
$str.="<center><h1><blink>/!\ FLAG Maintenance positionn&#233; /!\</blink></h1></center>";
}
return $str;
}
 
function html_footer() // return standard HTML footer
{
global $slim_msg;
 
$str = "";
if ($slim_msg)
{
$str .= "<p align=right><i>$slim_msg</i></p>\n";
}
if ($header_type == 1) // frameset header
{
}
else
{
$str .= "</font>\n";
}
$str .= "</body>\n";
$str .= "</html>\n";
 
global $slim_db;
pg_close($slim_db);
 
return $str;
}
 
function html_link($link, $text, $target = "", $confirm = "") // return HTML code for a link
{
$str = "";
if ($link && ($text|| $text=="0"))
{
$str .= "<a href=\"$link\"";
if ($target)
{
$str .= " target=\"$target\"";
}
if ($confirm)
{
$str .= " onclick='if (confirm(\"".html_quote($confirm)."\")) return true; else return false;'";
}
$str .= ">$text</a>";
}
else if ($text || $text=="0") $str .= $text;
 
return $str;
}
 
 
function html_link_v2($link, $text, $desc, $target = "", $confirm = "") // return HTML code for a link v2
{
$str = "";
if ($link && ($text|| $text=="0")){
$str .= "<a href=\"$link\"";
if ($target){
$str .= " target=\"$target\"";
}
if ($confirm){
$str .= " onclick='if (confirm($confirm)) return true; else return false;'";
}
if ($desc){
$str .= "title='".html_quote($desc)."' onMouseOver=\"moveover('".html_quote_backslash($desc)."'); return true;\"";
}
 
$str .= ">$text</a>";
}
else if ($text|| $text=="0") $str .= $text;
 
return $str;
 
}
 
function html_span_withpopup($text, $desc="",$click="" ) // return HTML code for a span with a desc. popup and an optional clickAction
{
$str = "";
if ($text){
$str .= "<span ";
if ($click){
$str .= "style=\"cursor: pointer; \"";
}
if ($desc){
$str .= "title='".html_quote_backslash($desc)."' onMouseOver=\"moveover('".html_quote_backslash($desc)."'); return true;\"";
}
if ($click){
$str .= " onClick='$click; return true;'";
}
 
$str .= ">$text</span>";
};
return $str;
 
}
 
 
function html_mail_link($link, $text = "") // return HTML code for a maito link
{
$str = "";
if (!$text)
{
$text = $link;
}
if ($link)
{
$str .= "<a href=\"mailto:$link\"";
$str .= ">$text</a>";
}
else if ($text) $str .= $text;
 
return $str;
}
 
function html_img($src, $text = "", $i18n = 0, $width = 0, $height = 0, $align = "", $border = 0) // return HTML code for an image
{
global $slim_user,$slim_theme_path;
$str = "";
 
if ($i18n) {
if (file_exists("$slim_theme_path/{$slim_user->theme}/{$slim_user->lang}/$src"))
$str .= "<img src=\"/slimg/{$slim_user->theme}/{$slim_user->lang}/$src\"";
else
{
if (file_exists("$slim_theme_path/default/{$slim_user->lang}/$src"))
$str .= "<img src=\"/slimg/default/{$slim_user->lang}/$src\"";
else
$str .= "<img src=\"/slimg/default/$src\"";
}
}
else {
if (file_exists("$slim_theme_path/{$slim_user->theme}/$src"))
$str .= "<img src=\"/slimg/{$slim_user->theme}/$src\"";
else
{
if (file_exists("$slim_theme_path/default/{$slim_user->theme}/$src"))
$str .= "<img src=\"/slimg/default/{$slim_user->theme}/$src\"";
else
$str .= "<img src=\"/slimg/default/$src\"";
}
}
if (isset($text))
{
$text2 = html_quote($text);
$str .= " alt=\"$text2\" title=\"$text2\"";
}
if ($width)
{
$str .= " width=\"$width\"";
}
if ($height)
{
$str .= " height=\"$height\"";
}
if ($align)
{
$str .= " align=\"$align\"";
}
$str .= " border=\"$border\">";
 
return $str;
}
 
function formatErrorMessage($msg) // return the "error formated" msg
{
return "<font size=5 color=#FF0000>".$msg."</font>";
}
 
function html_error() // return html error page with i18n msg
{
$nb_args = func_num_args();
$args = func_get_args();
$msg = __(array_shift($args));
if ($nb_args > 1)
{
array_unshift($args, $msg);
$msg = call_user_func_array('sprintf', $args);
}
print "<hr>". formatErrorMessage ($msg);
print "<form>\n";
print '<input type="submit" value="'.__("Retour").'" onClick=\'history.back();return false\'>'."\n";
print "</form>\n";
 
print html_footer();
exit();
}
 
function html_db_error($query,$className="") // return html error page for database query
{
if ($className) {
print "<hr><font size=5>ClassName : $className</font>\n";
}
print "<hr><font size=5 color=#FF0000>".__("Erreur base de données sur la requête :")."</font>\n";
print "<p>\n";
print "<font size=5 color=#44AA44>$query</font>\n";
print "<p>\n";
print "<font size=5 color=#4444AA>".pg_ErrorMessage()."</font>\n";
print "<p>\n";
print backtrace();
print html_footer();
exit();
}
 
function html_quote($txt) // change ",' chars to &quot;,&#39; in a string
{
$patterns = array("/\"/", "/'/");
$replace = array("&quot;", "&#39;");
return preg_replace($patterns, $replace, $txt);
}
 
function html_quote_backslash($txt) // change ",' chars to \" et \' in a string
{
$patterns = array("/\"/", "/'/");
$replace = array("\\\"", "\\'");
return preg_replace($patterns, $replace, $txt);
}
 
 
 
function html_br($txt) // change \n chars to <br> in a string
{
return preg_replace("/\n/", "<br>", $txt);
}
 
function html_redirect($url) // redirect page to an URL
{
session_write_close();
header("Location: $url");
exit();
}
 
 
function NamedColor2RGB($color) {
$colornames = array(
"white" => "#ffffff",
"black" => "#000000",
"red" => "#ff0000",
"green" => "#00ff00",
"blue" => "#0000ff",
);
$color = strtolower($color);
if (!isset($colornames[$color]))
return $color;
return $colornames[$color];
}
 
function MyImageColorAllocate($img,$html_color) {
$html_color=NamedColor2RGB($html_color);
if( eregi( "[#]?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})", $html_color, $ret ) )
{
$red = hexdec( $ret[1] );
$green = hexdec( $ret[2] );
$blue = hexdec( $ret[3] );
}
 
return ImageColorAllocate($img, $red, $green, $blue );
}
 
function backtrace()
{
$output = "<div style='text-align: left; font-family: monospace;'>\n";
$output .= "<b>Backtrace:</b><br />\n";
$backtrace = debug_backtrace();
 
foreach ($backtrace as $bt) {
$args = '';
foreach ($bt['args'] as $a) {
if (!empty($args)) {
$args .= ', ';
}
switch (gettype($a)) {
case 'integer':
case 'double':
$args .= $a;
break;
case 'string':
$a = htmlspecialchars(substr($a, 0, 64)).((strlen($a) > 64) ? '...' : '');
$args .= "\"$a\"";
break;
case 'array':
$args .= 'Array('.count($a).')';
break;
case 'object':
$args .= 'Object('.get_class($a).')';
break;
case 'resource':
$args .= 'Resource('.strstr($a, '#').')';
break;
case 'boolean':
$args .= $a ? 'True' : 'False';
break;
case 'NULL':
$args .= 'Null';
break;
default:
$args .= 'Unknown';
}
}
if ($bt['function']!="backtrace") {
$output .= "<br />\n";
$output .= "<b>file:</b> {$bt['line']} - {$bt['file']}<br />\n";
$output .= "<b>call:</b> {$bt['class']}{$bt['type']}{$bt['function']}($args)<br />\n";
}
}
$output .= "</div>\n";
return $output;
}
 
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/FormField.php
New file
0,0 → 1,171
<?PHP
/* $Id: FormField.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Form Field class
include_once('security.php');
class FormField
{
function FormField($name, $title, $value = "", $size = 0, $not_null = 0,$nosecu=false) // Form Field constructor
{
$this->name = $name;
$this->title = $title;
$this->value = $value;
$this->size = $size;
$this->not_null = $not_null;
$this->nosecu = $nosecu;
}
 
function format_code(&$form) // return HTML code for formatting fields (redefined)
{
return "";
}
 
function set_no_i8n() {
$this->no_i8n= true;
}
 
function header_code(&$form) // return HTML code for the first <td> tag of a form field
{
global $slim_theme;
 
$str = "<td align=right nowrap".$slim_theme->form_cell_code($this->not_null).">\n";
if ($this->title) {
if (!$this->alert) {
$str .= "<font".$slim_theme->font_code().">";
} else {
$str .= "<font".$slim_theme->alert_font_code().">";
}
// $str .= "<font".$slim_theme->font_code().">";
if ($this->no_i8n) {
$str .= "<b>".$this->title." :</b>";
} else {
$str .= "<b>".__($this->title)." :</b>";
}
$str .= "</font>";
}
else $str .= "&nbsp;";
$str .= "</td>\n";
return $str;
}
 
function cell_code(&$form) // return HTML code for the second <td> tag of a form field
{
global $slim_theme;
 
$str = "<td".$slim_theme->form_cell_code($this->not_null);
if ($this->help_url) {
$str .= ' nowrap';
}
$str .= ">\n";
$str .= "<font".$slim_theme->font_code().">";
$str .= '<input type="'.$this->field_type().'" name="'.$this->name.'"';
if ($this->value) {
if ($this->nosecu)
$obj_code = $this->value;
else
$obj_code = remove_cross_scripting($this->value);
$str .= ' value="'.html_quote($obj_code).'"';
}
if ($this->size) {
$str .= " size=\"$this->size\"";
}
if ($this->readonly) {
$str .= " readonly onfocus='blur()'";
}
 
$str .= ">";
 
if ($this->extra_code) {
$str .= " $this->extra_code";
}
 
if ($this->help_url) {
$str .= ' <input type="submit" value=" ... " onclick=\'help=window.open("'.$this->help_url.'","help","toolbar=no,menubar=no,scrollbars=yes,width='.$this->help_width.',height='.$this->help_height.',resizable=yes");help.opener=self;return false\'>';
}
if ($this->erase) {
if ($this->other_field)
$str2 = 'document.forms[0].'.$this->other_field.'.value="'.$this->other_value.'";';
else
$str2 = "";
$str .= ' <input type="submit" value=" x " onclick=\'document.forms[0].'.$this->name.'.value="'.$this->erase_value.'";'.$str2.'return false\'>';
}
$str .= "</font>";
$str .= "</td>\n";
return $str;
}
 
function field_type() // return HTML type to the field (can be redefined)
{
return "text";
}
 
function set_valign($valign) // set vertical alignement for the field
{
$this->valign = $valign;
}
 
function update_object(&$object) // update an object from a field value (can be redefined)
{
$field_name = $this->name;
$object->$field_name = $GLOBALS[$field_name];
if ($field_name == "gateway_type" && $GLOBALS[$field_name] == "") {
$object->$field_name = "0";
}
if ($this->not_null && !$object->$field_name)
{
html_error("Le champ \"%s\" doit être renseigné", __($this->title));
}
}
 
function set_help($url, $readonly = 0, $width = 500, $height = 500) // set help button for the field
{
$this->help_url = $url;
$this->help_width = $width;
$this->help_height = $height;
$this->readonly = $readonly;
}
 
function set_readonly() // set field in readonly mode
{
$this->readonly = 1;
}
 
function set_extra_code($code) // add extra code after the field
{
$this->extra_code = $code;
}
 
function set_erase($value = "", $other_field = "", $other_value = "") // set help button for the field
{
$this->erase = 1;
$this->erase_value = html_quote($value);
$this->other_field = $other_field;
$this->other_value = html_quote($other_value);
}
function setAlert($alert=true){
$this->alert=$alert;
}
 
}
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/UpdaterField.php
New file
0,0 → 1,53
<?PHP
/* $Id: UpdaterField.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Table Updater Field class
 
include_once("gui/Field.php");
 
class UpdaterField extends Field
{
function UpdaterField($name, $title, $field = "", $fmt_str = "", $fmt_meth = "") // Table Updater Field constructor
{
$parent = get_parent_class($this);
$this->$parent($name, $title, $fmt_str, $fmt_meth);
$this->field = $field;
}
 
function obj_code(&$object) // return HTML code for an object cell (can be redefined)
{
$attr = $this->name;
if ($this->fmt_meth)
{
$meth = $this->fmt_meth;
$txt = $object->$meth();
}
else if ($this->fmt_str)
{
$txt = sprintf($this->fmt_str, $object->$attr);
}
else
{
$txt = $object->$attr;
}
 
if ($this->field) return '<b><a href="'.$REQUEST_URI.'" onclick=\'window.opener.document.forms[0].'.$this->field.'.value = "'.$txt.'";window.close();return false\'>'.$txt.'</a></b>';
else return $txt;
}
}
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/Button.php
New file
0,0 → 1,84
<?PHP
/* $Id: Button.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Form Button class
 
class Button
{
function Button($value, $name = "", $onclick="") // Form Button constructor
{
$this->value = $value;
$this->name = $name;
$this->onclick = $onclick;
}
 
function set_confirm() // set a confirm message for the button (i18n)
{
$nb_args = func_num_args();
$args = func_get_args();
$msg = __(array_shift($args));
if ($nb_args > 1)
{
array_unshift($args, $msg);
$msg = call_user_func_array('sprintf', $args);
}
$this->confirm = html_quote($msg);
}
 
function set_disable() // set a disable message for the button (i18n)
{
$nb_args = func_num_args();
$args = func_get_args();
$msg = __(array_shift($args));
if ($nb_args > 1)
{
array_unshift($args, $msg);
$msg = call_user_func_array('sprintf', $args);
}
$this->disable = html_quote($msg);
}
 
function cell_code(&$form) // return HTML code for the second <td> tag of a form field
{
global $slim_theme,$slim_debug;
 
if ($slim_debug) {
$str = '<input title="action: '.$form->action.'name:'.$this->name . 'param: '. $form->getFields() .'" type="submit" value="'.__($this->value).'"';
} else {
$str = '<input type="submit" value="'.__($this->value).'"';
}
if ($this->name){
$str .= " name=\"$this->name\"";
}
if ($this->disable){
$onclick= " onclick='alert(\"$this->disable\"); return false;'";
} else if ($this->confirm){
$onclick= " onclick='if (confirm(\"$this->confirm\")) return true; else return false;'";
} else if ($this->onclick){
$onclick = "onclick='$this->onclick;return false;'";
}
if ($onclick)
$str.=$onclick;
$str .= ">\n";
return $str;
}
}
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/OptionField.php
New file
0,0 → 1,60
<?PHP
/* $Id: OptionField.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Option Field class
 
include_once("gui/FormField.php");
 
class OptionField extends FormField
{
function OptionField($name, $title, $values, $selected = "", $i18n = 1) // Option Field constructor
{
$parent = get_parent_class($this);
$this->$parent($name, $title, $selected);
$this->values = $values;
$this->i18n = $i18n;
}
 
function cell_code(&$form) // return HTML code for the second <td> tag of a form field
{
global $slim_theme;
 
$str = "<td".$slim_theme->form_cell_code().">\n";
$str .= "<font".$slim_theme->font_code().">";
$str .= '<select name="'.$this->name.'"';
if ($this->readonly)
{
$str .= " readonly onfocus='blur()'";
}
 
$str .= ">\n";
foreach ($this->values as $key => $val)
{
$str .= "<option value=\"$key\"";
if ($this->value == $key) $str .= " selected";
$str .= '>';
if ($this->i18n && $val) $str .= __($val);
else $str .= $val;
$str .= "\n";
}
$str .= "</select>\n";
$str .= "</td>\n";
return $str;
}
}
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/ImageButton.php
New file
0,0 → 1,62
<?PHP
/* $Id: ImageButton.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Image Button class
 
include_once("gui/Button.php");
 
class ImageButton extends Button
{
function ImageButton($src, $name = "", $text = "", $i18n = 1, $border = 0) // Image Button constructor
{
$parent = get_parent_class($this);
$this->$parent($src, $name);
$this->i18n = $i18n;
$this->border = $border;
$this->text = $text;
}
 
function cell_code(&$form) // return HTML code for the second <td> tag of a form field
{
global $slim_user;
 
if ($this->i18n) $str = '<input type="image" src="/slimg/'.$slim_user->theme.'/'.$slim_user->lang.'/'.$this->value.'"';
else $str = '<input type="image" src="/slimg/'.$slim_user->theme.'/'.$this->value.'"';
if ($this->name)
{
$str .= " name=\"$this->name\"";
}
$str .= " border=\"$this->border\"";
if ($this->text)
{
$text2 = html_quote($this->text);
$str .= " alt=\"$text2\" title=\"$text2\"";
}
if ($this->disable)
{
$str .= " onclick='alert(\"$this->disable\"); return false;'";
}
else if ($this->confirm)
{
$str .= " onClick='if (confirm(\"$this->confirm\")) return true; else return false;'";
}
$str .= ">\n";
return $str;
}
}
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/ResetButton.php
New file
0,0 → 1,55
<?PHP
/* $Id: ResetButton.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Reset Button class
 
include_once("gui/Button.php");
 
class ResetButton extends Button
{
function ResetButton($value = "Réinitialiser") // Reset Button constructor
{
$parent = get_parent_class($this);
$this->$parent($value);
}
 
function cell_code(&$form) // return HTML code for the second <td> tag of a form field
{
global $slim_user;
 
$str = '<input type="reset" value="'.__($this->value).'"';
foreach ($form->fields as $field)
{
if ($field->field_type() == "hidden" && $field->name)
{
$reset_code .= 'document.forms[0].'.$field->name.'.value="'.html_quote($field->value).'";';
}
}
if ($this->confirm)
{
$str .= " onClick='if (confirm(\"$this->confirm\")) {".$reset_code."return true;} else return false;'";
}
else if ($reset_code)
{
$str .= " onClick='".$reset_code."return true;'";
}
$str .= ">\n";
return $str;
}
}
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/ColField.php
New file
0,0 → 1,41
<?PHP
/* $Id: ColField.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML New Column Field class
 
include_once("gui/FormField.php");
 
class ColField extends FormField
{
function ColField() // New Column Field constructor
{
}
 
function format_code(&$form) // return HTML code for formatting fields (redefined)
{
global $slim_theme;
$form->cols++;
return "</table></td>\n<td><table".$slim_theme->form_code2().">\n";
}
 
function update_object(&$object) // update an object from a field value (can be redefined)
{
}
 
}
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/BiUpdaterField.php
New file
0,0 → 1,70
<?PHP
/* $Id: BiUpdaterField.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Table BiUpdater Field class
 
include_once("gui/Field.php");
 
class BiUpdaterField extends Field
{
function BiUpdaterField($name, $title, $field = "", $field2 = "", $fmt_str = "", $fmt_meth = "", $fmt_str2 = "", $fmt_meth2 = "") // Table BiUpdater Field constructor
{
$parent = get_parent_class($this);
$this->$parent($name, $title, $fmt_str, $fmt_meth);
$this->field = $field;
$this->field2 = $field2;
$this->fmt_str2 = $fmt_str2;
$this->fmt_meth2 = $fmt_meth2;
}
 
function obj_code(&$object) // return HTML code for an object cell (can be redefined)
{
$attr = $this->name;
if ($this->fmt_meth)
{
$meth = $this->fmt_meth;
$txt = $object->$meth();
}
else if ($this->fmt_str)
{
$txt = sprintf($this->fmt_str, $object->$attr);
}
else
{
$txt = $object->$attr;
}
 
if ($this->fmt_meth2)
{
$meth = $this->fmt_meth2;
$txt2 = $object->$meth();
}
else if ($this->fmt_str2)
{
$txt2 = sprintf($this->fmt_str2, $object->$attr);
}
else
{
$txt2 = $object->$attr;
}
 
if ($this->field) return '<b><a href="'.$REQUEST_URI.'" onclick=\'window.opener.document.forms[0].'.$this->field.'.value = "'.$txt.'";window.opener.document.forms[0].'.$this->field2.'.value = "'.$txt2.'";window.close();return false\'>'.$txt.'</a></b>';
else return $txt;
}
}
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/Field.php
New file
0,0 → 1,148
<?PHP
/* $Id: Field.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Table Field class
include_once('security.php');
class Field
{
function Field($name, $title, $fmt_str = "", $fmt_meth = "",$nosecu=false) // Table Field constructor
{
$this->name = $name;
$this->title = $title;
$this->fmt_str = $fmt_str;
$this->fmt_meth = $fmt_meth;
$this->nosecu = $nosecu;
}
 
function set_no_i8n() {
$this->no_i8n= true;
}
 
function header_code($sort_html_code="") // return HTML code for the <th> tag of a field
{
global $slim_theme;
 
$str = "<th".$slim_theme->th_code().">\n";
if ($this->checkable) {
$str .="<input name=\"allbox\" type=\"checkbox\" onClick=\"CA();\" title=\"Select or de-select all messages\" >";
}
 
if ($this->title){
$str .= "<font".$slim_theme->font_code().">";
if ($this->no_i8n) {
$str .= $this->title;
} else {
$str .= __($this->title);
}
$str .= "</font>";
}
else
$str .= "&nbsp;";
if ($sort_html_code)
$str .=$sort_html_code;
$str .= "</th>\n";
return $str;
}
 
function get_href($str) {
$sep="href=\"";
$sep="onclick='window.opener.location.href=\"";
$pos_href = strpos($str,$sep);
$tmp = substr($str,$pos_href+strlen($sep));
// echo $pos_href." ".$tmp."<br>";
$len = strpos($tmp,"\"");
return substr($tmp,0,$len);
}
 
function cell_code(&$object, $ofs) // return HTML code for the <td> tag of a field
{
global $slim_theme;
$obj_code = $this->obj_code(&$object);
if ($this->nosecu)
$obj_code = $obj_code;
else
$obj_code = remove_cross_scripting($obj_code);
if ($object->local_color!="") {
$str = "<td bgcolor= \"{$object->local_color}\" >\n";
} else {
$str = "<td".$slim_theme->td_code($ofs).">\n";
}
$str .= "<font".$slim_theme->font_code().">";
 
if ($this->checkable) {
$str .="<input type=\"checkbox\" name=\"".$this->get_href($obj_code)."\">";
}
if ($obj_code)
$str .= $obj_code;
else {
$db_fields= $object->db_fields();
// is this field defined in the table's structure
if ($db_fields[$this->name]) {
// YES: we must check if the type is an integer to print even if it is equal to zero
if ($fieldtype = $db_fields[$this->name]=="number") {
$str .= $obj_code;
} else {
$str .= "&nbsp;";
}
} else {
// NO : we print it
$str .= $obj_code;
}
}
$str .= "</font>";
$str .= "</td>\n";
return $str;
}
 
function obj_code(&$object) // return HTML code for an object cell (can be redefined)
{
if ($this->fmt_meth) {
$meth = $this->fmt_meth;
return $object->$meth();
}
$attr = $this->name;
if ($this->fmt_str) {
return sprintf($this->fmt_str, $object->$attr);
}
return $object->$attr;
}
 
function setCheckable() {
$this->checkable=true;
}
 
function isCheckable() {
return $this->checkable;
}
 
}
 
 
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/FileField.php
New file
0,0 → 1,37
<?PHP
/* $Id: FileField.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML File Upload Field class
 
include_once("gui/FormField.php");
 
class FileField extends FormField
{
function FileField($name, $title, $size = 0) // File Upload Field constructor
{
$parent = get_parent_class($this);
$this->$parent($name, $title, "", $size);
}
 
function field_type() // return HTML type to the field (can be redefined)
{
return "file";
}
 
}
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/HelpButton.php
New file
0,0 → 1,42
<?PHP
/* $Id: HelpButton.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Reset Button class
 
include_once("gui/Button.php");
 
class HelpButton extends Button
{
function HelpButton($value, $url, $width = 800, $height = 750) // Help Button constructor
{
$parent = get_parent_class($this);
$this->$parent($value);
$this->help_url = $url;
$this->help_width = $width;
$this->help_height = $height;
}
 
function cell_code(&$form) // return HTML code for the second <td> tag of a form field
{
$str = '<input type="submit" value="'.__($this->value).'"';
$str .= ' onclick=\'help=window.open("'.$this->help_url.'","help","toolbar=no,menubar=no,scrollbars=yes,width='.$this->help_width.',height='.$this->help_height.',resizable=yes");help.opener=self;return false\'';
$str .= ">\n";
return $str;
}
}
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/js.inc.php
New file
0,0 → 1,33
<?php
 
function get_popup_JS(){
global $slim_debug;
 
if ($slim_debug) {
return "<script language=\"JavaScript\">
function moveover(txt) {
return false;
};
</script>
\n";
 
 
}
else {
 
return "<script language=\"JavaScript\">
function moveover(txt) {
window.status = txt;
setTimeout(\"erase()\",10000);
}
function erase() {
window.status=\"\";
}
</script>
\n";
 
}
}
 
?>
Property changes:
Added: svn:executable
+ *
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/MailField.php
New file
0,0 → 1,65
<?PHP
/* $Id: MailField.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Table Mail Field class
 
include_once("gui/Field.php");
 
class MailField extends Field
{
function MailField($name, $title, $mail_attr = "", $mail_meth = "", $fmt_str = "", $fmt_meth = "") // Table Mail Field constructor
{
$parent = get_parent_class($this);
$this->$parent($name, $title, $fmt_str, $fmt_meth);
if ($mail_attr) $this->mail_attr = $mail_attr;
else $this->mail_attr = $name;
$this->mail_meth = $mail_meth;
}
 
function obj_code(&$object) // return HTML code for an object cell (can be redefined)
{
$attr = $this->name;
$attr2 = $this->mail_attr;
if ($this->mail_meth)
{
$meth = $this->mail_meth;
$mail = $object->$meth();
}
else
{
$mail = urlencode($object->$attr2);
}
if ($this->fmt_meth)
{
$meth = $this->fmt_meth;
$txt = $object->$meth();
}
else if ($this->fmt_str)
{
$txt = sprintf($this->fmt_str, $object->$attr);
}
else
{
$txt = $object->$attr;
}
 
if ($mail) return '<a href="mailto:'.$mail.'">'.$txt.'</a>';
else return $txt;
}
}
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/Table.php
New file
0,0 → 1,250
<?PHP
/* $Id: Table.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Table class
 
class Table
{
function Table($num = 0) // Table constructor
{
$this->fields = array();
$this->num = $num;
}
 
function add_field(&$field) // add a field to the table
{
array_push($this->fields, &$field);
$this->lastAddedField= &$field;
if ($this->no_i8n) {
$field->set_no_i8n();
}
}
function set_name($name) // set the table name
{
$this->name= $name;
}
function set_no_i8n() {
$this->no_i8n=true;
}
 
function set_title() // set the table title
{
$nb_args = func_num_args();
$args = func_get_args();
if ($this->no_i8n) {
$title = array_shift($args);
} else {
$title = __(array_shift($args));
}
if ($nb_args > 1) {
array_unshift($args, $title);
$title = call_user_func_array('sprintf', $args);
}
$this->title = $title;
}
 
function setSearchParams($params)
{
$this->searchParams=$params;
}
 
function setSortParams($sort_field,$sort_order)
{
$this->sort_field=$sort_field;
$this->sort_order=$sort_order;
}
/* function setCheckableField($field_name)
{
$this->checkableField=$field_name;
}*/
function build_code(&$objects,$nosecu=false) // return HTML code for a table filled with objects
{
global $slim_theme;
$str="";
$str.= "<table".$slim_theme->table_code().">\n";
if ($this->title) {
$str .= "<caption><b><font".$slim_theme->font_code().">$this->title</font></b></caption>\n";
}
$str .= "<tr align=\"center\">\n";
if ($this->num){
$str .= "<td".$slim_theme->th_code().">".html_img("count.gif", count($objects))."</td>\n";
}
foreach ($this->fields as $field) {
$sort_str="";
if ($field->isCheckable()) {
//echo ("found checkable field!");
$checkableField=true;
}
 
if ($this->searchParams) {
if ($field->name==$this->sort_field && $this->sort_order=="ASC") {
$sort_str.=html_img("sort_asc1.gif","/\\");
} else {
$sort_str.= "<A HREF={$this->searchParams}";
if (strpos($this->searchParams,"?")===false){
$sort_str.="?";
} else {
$sort_str.="&";
}
 
$sort_str.="sort_field={$field->name}&sort_order=ASC>".html_img("sort_asc.gif","/\\")."</A>";
}
 
if ($field->name==$this->sort_field && $this->sort_order=="DESC") {
$sort_str.=html_img("sort_desc1.gif","/\\");
} else {
$sort_str.= "<A HREF={$this->searchParams}";
if (strpos($this->searchParams,"?")===false){
$sort_str.="?";
} else {
$sort_str.="&";
}
$sort_str.="sort_field={$field->name}&sort_order=DESC>".html_img("sort_desc.gif","/\\")."</A>";
 
}
if ($sort_str) $sort_str=" ".$sort_str;
}
$str .= $field->header_code($sort_str);
}
$ofs = 0;
$num = 1;
global $table_maxrows;
$table_maxrows =count($objects);
global $table_currow;
$table_currow=1;
foreach ($objects as $object) {
$str .= "<tr>\n";
if ($this->num) {
$str .= "<td align=center".$slim_theme->th_code()."><font size=\"-1\">$num</font></td>\n";
}
foreach ($this->fields as $field) {
$str .=$field->cell_code(&$object, $ofs);
}
$ofs = 1 - $ofs;
$str .= "</tr>\n";
$num++;
$table_currow++;
 
}
$str .= "</tr>\n";
if (count($objects) == 0) {
$ncol=count($this->fields);
if ($this->num) $ncol++;
$str .= "<tr><td colspan=$ncol align=center".$slim_theme->td_code($ofs);
$str .= "><i><font size=\"-1\">".__("Empty table")."</font></i></td></tr>\n";
}
 
$str .= "</table>\n";
if ($checkableField) {
$str.="<script language=\"JavaScript\">
// Check/Uncheck All
function CA(){
for (var i=0;i<frm.elements.length;i++) {
var e=frm.elements[i];
if ((e.name != 'allbox') && (e.type=='checkbox')){
e.checked=frm.allbox.checked;
}
}
}
 
function sendrequests() {
var stillreload=false;
if (bot<frm.elements.length && count>-1){
var e=frm.elements[bot];
if ((e.name != 'allbox') && (e.type=='checkbox')){
if (e.checked) {
count-=1;
if (count>0){
d = new Image;
d.src=e.name;
d.checked=false;
setTimeout (\"sendrequests()\", 300);
stillreload=true;
} else {
window.opener.location.href=e.name+'&reload=yes';
}
}
}
bot++;
if (!stillreload){
sendrequests();
}
} else {
// No more checked box!
window.close();
}
}
function validchecked() {
var d;
count=0;
// First loop : count the checked boxes
for (var i=0;i<frm.elements.length;i++) {
var e=frm.elements[i];
if ((e.name != 'allbox') && (e.type=='checkbox')){
if (e.checked) {
count+=1;
}
}
}
// Second loop : call URLs for all-1
if (count>0) {
bot=0;
setTimeout (\"sendrequests()\", 1);
}
}
var frm = document.{$this->name};
var inter;
var count,bot;
</script>";
 
$str="<FORM NAME=\"{$this->name}\" >\n".$str;
$str.= "\n<input type=\"button\" value=\"". __("Valider") ."\" onclick=validchecked();></FORM>\n";
}
 
return $str;
}
 
}
 
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/TextField.php
New file
0,0 → 1,77
<?PHP
/* $Id: TextField.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Form Field class
 
include_once("gui/FormField.php");
 
class TextField extends FormField
{
function TextField($name, $title, $value = "", $rows = 0, $cols = 0, $wrap = 1, $not_null = 0) // Text Field constructor
{
$parent = get_parent_class($this);
$this->$parent($name, $title, $value, 0, $not_null);
$this->rows = $rows;
$this->cols = $cols;
$this->wrap = $wrap;
}
 
function cell_code(&$form) // return HTML code for the second <td> tag of a form field
{
global $slim_theme;
 
$str = "<td".$slim_theme->form_cell_code($this->not_null).">\n";
$str .= "<font".$slim_theme->font_code().">";
$str .= '<textarea name="'.$this->name.'"';
if ($this->wrap==1){
$str .= ' wrap="hard"';
}
if ($this->wrap==2){
$str .= ' wrap="virtual"';
}
if ($this->rows)
{
$str .= ' rows="'.$this->rows.'"';
}
if ($this->cols)
{
$str .= ' cols="'.$this->cols.'"';
}
if ($this->readonly)
{
$str .= " readonly onfocus='blur()'";
}
$str .= ">$this->value</textarea></font>";
if ($this->help_url)
{
$str .= ' <input type="submit" value=" ... " onclick=\'help=window.open("'.$this->help_url.'","help","toolbar=no,menubar=no,scrollbars=yes,width='.$this->help_width.',height='.$this->help_height.',resizable=yes");help.opener=self;return false\'>';
}
if ($this->erase)
{
if ($this->other_field)
$str2 = 'document.forms[0].'.$this->other_field.'.value="'.$this->other_value.'";';
else
$str2 = "";
$str .= ' <input type="submit" value=" x " onclick=\'document.forms[0].'.$this->name.'.value="'.$this->erase_value.'";'.$str2.'return false\'>';
}
$str .= "</td>\n";
return $str;
}
}
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/CheckboxField.php
New file
0,0 → 1,68
<?PHP
/* $Id: CheckboxField.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Checkbox Field class
 
include_once("gui/FormField.php");
 
class CheckboxField extends FormField
{
function CheckboxField($name, $title, $value = "") // Checkbox Field constructor
{
$parent = get_parent_class($this);
$this->$parent($name, $title, $value, 0, 0);
}
 
function cell_code(&$form) // return HTML code for the second <td> tag of a form field
{
global $slim_theme;
 
$str = "<td".$slim_theme->form_cell_code($this->not_null).">\n";
$str .= "<font".$slim_theme->font_code().">";
$str .= '<input type="'.$this->field_type().'" name="'.$this->name.'" value="t"';
if ($this->value == "t"){
$str .= ' checked';
}
if ($this->readonly){
$str .= " readonly onclick='this.checked=\"{$this->value}\"'";
}
$str .= "></font>";
$str .= "</td>\n";
return $str;
}
 
function field_type() // return HTML type to the field (can be redefined)
{
return "checkbox";
}
 
function update_object(&$object) // update an object from a field value (can be redefined)
{
$field_name = $this->name;
if ($GLOBALS[$field_name])
{
$object->$field_name = "t";
}
else
{
$object->$field_name = "f";
}
}
 
}
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/LineField.php
New file
0,0 → 1,40
<?PHP
/* $Id: LineField.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Line Separator Field class
 
include_once("gui/FormField.php");
 
class LineField extends FormField
{
function LineField() // New Line Separator Field constructor
{
}
 
function format_code(&$form) // return HTML code for formatting fields (redefined)
{
global $slim_theme;
return "<tr><td colspan=2><hr></td></tr>\n";
}
 
function update_object(&$object) // update an object from a field value (can be redefined)
{
}
 
}
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/PwdField.php
New file
0,0 → 1,37
<?PHP
/* $Id: PwdField.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Password Field class
 
include_once("gui/FormField.php");
 
class PwdField extends FormField
{
function PwdField($name, $title, $value = "", $size = 0, $not_null = 0) // Password Field constructor
{
$parent = get_parent_class($this);
$this->$parent($name, $title, $value, $size, $not_null);
}
 
function field_type() // return HTML type to the field (can be redefined)
{
return "password";
}
 
}
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/phpBarGraph.php
New file
0,0 → 1,84
<?php
// phpBarGraph version 1.0
// Bar Graph Generator for PHP
// Written By TJ Hunter (tjhunter@airswitch.net)
// Released Under the GNU Public License.
// http://www.ruistech.com/phpBarGraph
 
function phpBarGraph($image, $x, $y, $width, $height, $amounts, $colors, $line, $barSpacing, $buff)
{
// Setup the margins
$topMargin = 0;
$bottomMargin = 30;
$leftMargin = 0;
$rightMargin = $barSpacing+1;
 
// setup the color for the box
$lineColor = ImageColorAllocate($image, $line[0], $line[1], $line[2]);
 
// draw the box
ImageRectangle($image, $leftMargin + $x, $topMargin + $y, $width-$rightMargin+$barSpacing + $x, $height-$bottomMargin + $y, $lineColor);
 
// Figure out how wide each bar is going to be.
$barWidth = ($width-($leftMargin+$rightMargin+1)-(count($amounts)*$barSpacing)) / count($amounts);
 
// Find out what the smallest and largest amount is.
$minBh = $amounts[0][1];
$maxBh = $amounts[0][1];
for ($i=1; $i < count($amounts); $i++)
{
if ($minBh > $amounts[$i][1])
{
$minBh = $amounts[$i][1];
}
if ($maxBh < $amounts[$i][1])
{
$maxBh = $amounts[$i][1];
}
}
// Figure out how tall the tallest and smallest bar are going to be.
$newMin = $minBh-($minBh * $buff + 1);
 
#echo "$newMin: $minBh";
 
$newMax = $maxBh * ($buff + 1);
$wa = $height - $bottomMargin - $topMargin - 1;
// Print out all the bars
$j=0;
for ($i=1; $i<=count($amounts); $i++)
{
// Cycle through all the colors
if ($j == count($colors))
{
$j=0;
}
$j++;
// setup the color for this bar
$myColor = ImageColorAllocate($image, $colors[$j-1][0], $colors[$j-1][1], $colors[$j-1][2]);
 
// Get the bar height for this bar.
$newBh = ($wa / ($newMax - $newMin) * ($amounts[$i-1][1] - $newMin));
// Figure out where we're going to put this bar..
$x1 = $leftMargin + 1 + (($i-1) * $barWidth) + ($i * $barSpacing);
$y1 = $height - $bottomMargin - 1 - ($newBh);
$x2 = $leftMargin + (($i-1) * $barWidth) + ($i * $barSpacing) + $barWidth;
$y2 = $height - $bottomMargin - 1;
 
// Print the bar
ImageFilledRectangle($image, $x1 + $x, $y1 + $y, $x2 + $x, $y2 + $y, $myColor);
ImageRectangle($image, $x1 + $x, $y1 + $y, $x2 + $x, $y2 + $y+1, $line);
 
// Print the amount of the bar
// Imagestring($image, 1, $x1 + $x, $height-($bottomMargin/2)-10 + $y, $amounts[$i-1][1], $myColor);
Imagestring($image, 1, $x1 + $x + 2, $y1 + $y - 8, $amounts[$i-1][1], $line);
 
// Print out the name of the bar.
Imagestring($image, 1, $x1 + $x, $height-($bottomMargin/2) + $y - 5, $amounts[$i-1][0], $myColor);
}
}
 
?>
Property changes:
Added: svn:executable
+ *
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/HiddenField.php
New file
0,0 → 1,78
<?PHP
/* $Id: HiddenField.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Hidden Field class
 
include_once("gui/FormField.php");
include_once('security.php');
 
class HiddenField extends FormField
{
function HiddenField($name, $value, $title = "", $not_null = 0, $nosecu=false) // Hidden Field constructor
{
$parent = get_parent_class($this);
$this->$parent($name, $title, $value, 0, $not_null);
$this->nosecu = $nosecu;
}
 
function format_code(&$form) // return HTML code for formatting fields (redefined)
{
if (!$this->title) return '<input type="'.$this->field_type().'" name="'.$this->name.'" value="'.$this->value.'">'."\n";
;
}
 
function cell_code(&$form) // return HTML code for the second <td> tag of a form field
{
global $slim_theme;
 
$str = "<td".$slim_theme->form_cell_code($this->not_null).">\n";
// if (!$this->alert) {
$str .= "<font".$slim_theme->font_code().">";
/* } else {
$str .= "<font".$slim_theme->alert_font_code().">";
}*/
if (isset($this->value))
{
if ($this->name)
{
$str .= '<input type="'.$this->field_type().'" name="'.$this->name.'"';
$str .= ' value="'.html_quote($this->value).'"';
$str .= ">";
}
if ($this->nosecu){
$obj_code = $this->value;
} else {
$obj_code = remove_cross_scripting($this->value);
}
$str.= $obj_code;
// $str .= $this->value;
}
$str .= "</font></td>\n";
return $str;
}
 
function field_type() // return HTML type to the field (can be redefined)
{
return "hidden";
}
 
 
}
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/gui/ButtonForm.php
New file
0,0 → 1,67
<?PHP
/* $Id: ButtonForm.php 240 2004-09-14 09:09:43Z bzizou $
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
// Slis Management HTML Button Form class
 
include_once("gui/Form.php");
 
class ButtonForm extends Form
{
function ButtonForm(&$button, $action = "", $type = 0) // Button Form constructor
{
$parent = get_parent_class($this);
$this->$parent($action, $type);
$this->add_button($button);
}
 
 
function build_code() // return HTML code for a button form
{
global $slim_theme;
 
$str = "<form method=post action=\"$this->action\">\n";
 
foreach ($this->fields as $field)
{
if ($field->field_type() == "hidden")
{
if ($fmt = $field->format_code($this))
{
$str .= $fmt;
}
}
}
 
$str .= "<table cellspacing=0 border=0>\n";
if ($this->title)
{
$str .= "<caption><b><font".$slim_theme->font_code().">$this->title</font></b></caption>\n";
}
$str .= "<tr><td><font".$slim_theme->font_code().">\n";
foreach ($this->buttons as $button)
{
$str .= $button->cell_code($this);
}
$str .= "</font></td></tr>\n";
$str .= "</table>\n";
$str .= "</form>\n";
return $str;
}
 
}
 
?>
/slim/sources/tags/slis-slim/2.0.5~rc5/include/themes/default/tux.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/include/themes/default/trash.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Id
/slim/sources/tags/slis-slim/2.0.5~rc5/include/themes/default/theme.php
New file
0,0 → 1,56
<?PHP
/* $Id$
 
This script has been written by Joel Savignon
Copyright (C) 2002 Joel Savignon <js@neosystem.com>
 
This script is released under GNU Public Licence (GPL)
http://www.gnu.org/licenses/gpl.html
 
This script is part of the SLIS Project initiated by
the CARMI-Internet (Academie de Grenoble - France 38).
 
SLIS : Serveur de communications Linux pour l'Internet Scolaire.
Copyright (C) 1998-2001 Bruno Bzeznik
 
--------------------------------------------------------------*/
 
 
// Slis Management default theme definition
 
include_once("gui/Theme.php");
 
$slim_theme = new Theme("default");
 
$slim_theme->font_face = "Helvetica,Arial";
$slim_theme->menu_font_size = "-1";
 
$slim_theme->menu_width = 120;
$slim_theme->menu_height = 34;
 
$slim_theme->bg_color = "white";
$slim_theme->link_color = "#CC0000";
$slim_theme->vlink_color = "#CC0000";
 
$slim_theme->menu_bg_color = "#9999CC";
$slim_theme->menu_text_color = "white";
$slim_theme->menu_link_color = "white";
$slim_theme->menu_vlink_color = "white";
$slim_theme->menu_alink_color = "#660000";
 
$slim_theme->topleft_bg_color = "#AAAAAA";
$slim_theme->topleft_bg_pixmap = "topleftbg.jpg";
 
$slim_theme->table_border = 2;
$slim_theme->cell_spacing = 0;
$slim_theme->th_bg_color = "#CCCCFF";
$slim_theme->td_bg_color0 = "#EEEEFF";
$slim_theme->td_bg_color1 = "#FFEEFF";
 
$sli