Subversion Repositories ALCASAR

Compare Revisions

No changes between revisions

Regard whitespace Rev 39 → Rev 40

/alcasar.sh
0,0 → 1,1274
#!/bin/sh
 
# alcasar.sh
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
# This script is distributed under the Gnu General Public License (GPL)
 
# Install script for ALCASAR (a secured and authenticated Internet access control captive portal)
# Script d'installation d'ALCASAR (Application Libre pour le Contrôle d'Accès Sécurisé et Authentifié au Réseau)
 
# ALCASAR is based on a stripped Mandriva (LSB) with the following open source softwares :
# ALCASAR est architecturé autour d'une distribution Linux Mandriva minimaliste et les logiciels libres suivants :
# Coovachilli (a fork of chillispot), freeradius, mysql, apache, netfilter, squid, dansguardian, mondo, mindi, dialupadmin, awstat, ntpd, dhcpd, openssl bind and firewalleyes
 
# Options :
# -install
# -uninstall
 
# Funtions :
# testing : Tests de connectivité et de téléchargement avant installation
# init : Installation des RPM et des scripts
# network : Paramètrage du réseau
# gestion : Installation de l'interface de gestion
# AC : Initialisation de l'autorité de certification. Création des certificats
# init_db : Création de la base 'radius' sur le serveur MySql
# param_radius : Configuration du serveur d'authentification FreeRadius
# param_web_radius: Configuration de l'interface de gestion de FreeRadius (dialupadmin)
# param_chilli : Configuration du daemon 'coova-chilli' et de la page d'authentification
# param_squid : Configuration du proxy squid en mode 'cache'
# param_dansguardian : Configuration de l'analyseur de contenu DansGuardian
# firewall : Mise en place des règles du parefeu et de l'interface WEB FirewallEyes
# param_awstats : Configuration de l'interface des statistiques de consultation WEB
# bind : Configuration du serveur de noms
# cron : Mise en place des exports de logs (+ chiffrement)
 
 
VERSION="1.9a"
MDV_NEEDED="2010.0"
DATE=`date '+%d %B %Y - %Hh%M'`
DATE_SHORT=`date '+%d/%m/%Y'`
# ******* Files parameters - paramètres fichiers *********
DIR_INSTALL=`pwd` # répertoire d'installation
DIR_GESTION="$DIR_INSTALL/gestion" # répertoire d'installation contenant l'interface de gestion
DIR_CONF="$DIR_INSTALL/conf" # répertoire d'installation contenant les fichiers de configuration
DIR_SCRIPTS="$DIR_INSTALL/scripts" # répertoire d'installation contenant les scripts
DIR_SAVE="/var/Save" # répertoire de sauvegarde (ISO, backup, etc.)
DIR_WEB="/var/www/html" # répertoire du centre de gestion
DIR_DEST_BIN="/usr/local/bin" # répertoire des scripts
DIR_DEST_SBIN="/usr/local/sbin" # répertoire des scripts d'admin
DIR_DEST_ETC="/usr/local/etc" # répertoire des fichiers de conf
FIC_PARAM="/root/ALCASAR-parameters.txt" # fichier texte résumant les paramètres d'installation
FIC_PASSWD="/root/ALCASAR-passwords.txt" # fichier texte contenant les mots de passe et secrets partagés
# ******* DBMS parameters - paramètres SGBD ********
DB_RADIUS="radius" # nom de la base de données utilisée par le serveur FreeRadius
DB_USER="radius" # nom de l'utilisateur de la base de données
# ******* Network parameters - paramètres réseau *******
DOMAIN="localdomain" # domaine local
EXTIF="eth0" # ETH0 est l'interface connectée à Internet (Box FAI)
INTIF="eth1" # ETH1 est l'interface connectée au réseau local de consultation
CUSTOM_PRIVATE_NETWORK_MASK="192.168.182.0/24" # adresse du réseau de consultation proposée par défaut
SQUID_PORT="3128" # Port d'écoute du proxy Squid
UAMPORT="3990"
# ****** Paths - chemin des commandes *******
SED="/bin/sed -i"
# ****** Alcasar needed RPMS - paquetages nécessaires au fonctionnement d'Alcasar ******
PACKAGES="freeradius freeradius-mysql freeradius-ldap freeradius-web apache-mpm-prefork apache-mod_ssl apache-mod_php squid dansguardian postfix MySQL logwatch ntp awstats mondo cdrecord buffer vim-enhanced bind-utils wget arpscan ulogd dhcp-server openssh-server php-xml coova-chilli pam_ccreds rng-utils lsb-release bind"
# ****************** End of global parameters *********************
 
header_install ()
{
clear
echo "-----------------------------------------------------------------------------"
echo " Installation d'ALCASAR V$VERSION"
echo "Application Libre pour le Contrôle d'Accès Sécurisé et Authentifié au Réseau"
echo "-----------------------------------------------------------------------------"
} # End of header_install ()
 
##################################################################
## Fonction TESTING ##
## - Test de la connectivité Internet ##
## - Test la mise à jour système ##
## - Test l'installation des RPM additionnels ##
##################################################################
testing ()
{
echo -n "Tests des paramètres réseau : "
# On teste l'état du lien des interfaces réseau
for i in $EXTIF $INTIF
do
/sbin/ifconfig $i up
sleep 2
if [ "`/usr/sbin/ethtool $i|grep Link|cut -d' ' -f3`" != "yes" ]
then
echo "Échec"
echo "Le lien réseau de la carte $i n'est pas actif."
echo "Réglez ce problème avant de poursuivre l'installation d'ALCASAR."
exit 0
fi
done
# On teste la présence d'un routeur par défaut (Box FAI)
if [ `/sbin/route -n|grep -c ^0.0.0.0` -ne "1" ] ; then
echo "Échec"
echo "Vous n'avez pas configuré l'accès à Internet ou le câble réseau n'est pas sur la bonne carte."
echo "Réglez ce problème avant de poursuivre."
exit 0
fi
# On traite le cas où l'interface configurée lors de l'installation est "eth1" au lieu de "eth0" (mystère sur certains BIOS et sur VirtualBox)
if [ `/sbin/route -n|grep ^0.0.0.0|grep -c eth1` -eq "1" ] ; then
echo "Échec. La configuration des cartes réseau va être corrigée."
/etc/init.d/network stop
mv -f /etc/sysconfig/network-scripts/ifcfg-eth1 /etc/sysconfig/network-scripts/ifcfg-eth0
$SED "s?eth1?eth0?g" /etc/sysconfig/network-scripts/ifcfg-eth0
/etc/init.d/network start
echo 0 > /proc/sys/net/ipv4/conf/all/log_martians
sleep 2
echo "Configuration corrigée"
sleep 2
echo "Vous pouvez relancer ce script (sh alcasar.sh -install)."
exit 0
fi
# On teste la connectivité Internet
rm -rf /tmp/con_ok.html
/usr/bin/curl www.google.fr -# -o /tmp/con_ok.html
if [ ! -e /tmp/con_ok.html ]
then
echo "La tentative de connexion vers Internet a échoué (google.fr)."
echo "Vérifiez que la carte $EXTIF est bien connectée au routeur du FAI."
echo "Vérifiez la validité des adresses DNS."
exit 0
fi
echo "Tests de connectivité Internet corrects"
rm -rf /tmp/con_ok.html
# On configure les dépots et on les teste
echo "Configuration des dépots de paquetages Internet (repository)"
chmod u+x $DIR_SCRIPTS/alcasar-urpmi.sh
$DIR_SCRIPTS/alcasar-urpmi.sh >/dev/null
if [ "$?" != "0" ]
then
echo
echo "Une erreur s'est produite lors de la synchronisation avec les dépots Internet"
echo "Relancez l'installationi ultérieurement."
echo "Si vous rencontrez de nouveau ce problème, changez de dépot en modifiant le fichier 'scripts/alcasar-urpmi.sh'"
exit 0
fi
# On test la mise à jour du système
echo "Récupération des paquetages de mise à jour. Veullez patienter ..."
urpmi --auto --auto-update --quiet --test
if [ "$?" != "0" ]
then
echo
echo "Une erreur a été détectée lors de la récupération des paquetages de mise à jour"
echo "Relancez l'installationi ultérieurement."
echo "Si vous rencontrez de nouveau ce problème, changez de dépot en modifiant le fichier 'scripts/alcasar-urpmi.sh'"
exit 0
fi
# On test l'installation des paquetages complémentaires
echo "Récupération des paquetages complémentaires. Veullez patienter ..."
urpmi --auto $PACKAGES --quiet --test
if [ "$?" != "0" ]
then
echo
echo "Une erreur a été détectée lors de la récupération des paquetages complémentaires"
echo "Relancez l'installationi ultérieurement."
echo "Si vous rencontrez de nouveau ce problème, changez de dépot en modifiant le fichier 'scripts/alcasar-urpmi.sh'"
exit 0
fi
} # end of testing
 
##################################################################
## Fonction INIT ##
## - Création du fichier "/root/ALCASAR_parametres.txt" ##
## - Installation et modification des scripts du portail ##
## - Mise à jour système ##
## - Installation des paquetages complémentaires ##
##################################################################
init ()
{
if [ ! "$mode" = "update" ]
then
header_install
# On affecte le nom d'organisme
header_install
ORGANISME=!
PTN='^[a-zA-Z1-9-]*$'
until [[ $(expr $ORGANISME : $PTN) -gt 0 ]]
do
echo -n "Entrez le nom de votre organisme : "
read ORGANISME
if [ "$ORGANISME" = "" ]
then
ORGANISME=!
fi
done
fi
# On mets à jour le système
urpmi --auto --auto-update
# On installe les paquetages complémentaires
urpmi --auto $PACKAGES
# On supprime les paquetages et les services inutiles
for rm_rpm in avahi mandi shorewall-common shorewall
do
/usr/sbin/urpme --auto $rm_rpm
done
for svc in alsa sound dm atd memcached dc_server
do
/sbin/chkconfig --del $svc
done
# On installe les mises à jour spécifiques
urpmi --no-verify --auto $DIR_CONF/rpms-update/*.rpm
# On supprime les paquetages orphelins
/usr/sbin/urpme --auto-orphans --auto
# On vide le répertoire temporaire
urpmi --clean
# On crée aléatoirement les mots de passe et les secrets partagés
rm -f $FIC_PASSWD
mysqlpwd=`cat /dev/urandom | tr -dc [:alnum:] | head -c8` # mot de passe de l'administrateur Mysqld
echo -n "compte et mot de passe de l'administrateur Mysqld : " > $FIC_PASSWD
echo "root / $mysqlpwd" >> $FIC_PASSWD
radiuspwd=`cat /dev/urandom | tr -dc [:alnum:] | head -c8` # mot de passe de l'utilisateur Mysqld (utilisé par freeradius)
echo -n "compte et mot de passe de l'utilisateur Mysqld : " >> $FIC_PASSWD
echo "$DB_USER / $radiuspwd" >> $FIC_PASSWD
secretuam=`cat /dev/urandom | tr -dc [:alnum:] | head -c8` # secret partagé entre intercept.php et coova-chilli
echo -n "secret partagé entre le script 'intercept.php' et coova-chilli : " >> $FIC_PASSWD
echo "$secretuam" >> $FIC_PASSWD
secretradius=`cat /dev/urandom | tr -dc [:alnum:] | head -c8` # secret partagé entre coova-chilli et FreeRadius
echo -n "secret partagé entre coova-chilli et FreeRadius : " >> $FIC_PASSWD
echo "$secretradius" >> $FIC_PASSWD
chmod 640 $FIC_PASSWD
# On installe et on modifie les scripts d'Alcasar
cp -f $DIR_SCRIPTS/alcasar* $DIR_DEST_BIN/. ; chown root:root $DIR_DEST_BIN/alcasar* ; chmod 740 $DIR_DEST_BIN/alcasar*
cp -f $DIR_SCRIPTS/sbin/alcasar* $DIR_DEST_SBIN/. ; chown root:root $DIR_DEST_SBIN/alcasar* ; chmod 740 $DIR_DEST_SBIN/alcasar*
cp -f $DIR_SCRIPTS/etc/alcasar* $DIR_DEST_ETC/. ; chown root:apache $DIR_DEST_ETC/alcasar* ; chmod 660 $DIR_DEST_ETC/alcasar*
$SED "s?^radiussecret.*?radiussecret=\"$secretradius\"?g" $DIR_DEST_SBIN/alcasar-logout.sh
$SED "s?^DB_RADIUS=.*?DB_RADIUS=\"$DB_RADIUS\"?g" $DIR_DEST_SBIN/alcasar-mysql.sh
$SED "s?^DB_USER=.*?DB_USER=\"$DB_USER\"?g" $DIR_DEST_SBIN/alcasar-mysql.sh $DIR_DEST_BIN/alcasar-conf.sh
$SED "s?^radiuspwd=.*?radiuspwd=\"$radiuspwd\"?g" $DIR_DEST_SBIN/alcasar-mysql.sh $DIR_DEST_BIN/alcasar-conf.sh
# On génère le début du fichier récapitulatif
cat <<EOF > $FIC_PARAM
########################################################
## ##
## Fichier récapitulatif des paramètres d'ALCASAR ##
## ##
########################################################
 
- Date d'installation : $DATE
- Version istallée : $VERSION
- Organisme : $ORGANISME
EOF
chmod o-rwx $FIC_PARAM
} # End of init ()
 
##################################################################
## Fonction network ##
## - Définition du plan d'adressage du réseau de consultation ##
## (merci à Alexandre Trias pour le calcul de masque et RegEx) ##
## - Nommage DNS du système (portail + nom d'organisme) ##
## - Configuration de l'interface eth1 (réseau de consultation) ##
## - Modification du fichier /etc/hosts ##
## - Configuration du serveur de temps (NTP) ##
## - Renseignement des fichiers hosts.allow et hosts.deny ##
##################################################################
network ()
{
header_install
echo "Par défaut, le plan d'adressage du réseau de consultation est : $CUSTOM_PRIVATE_NETWORK_MASK"
response=0
PTN='^[oOnN]$'
until [[ $(expr $response : $PTN) -gt 0 ]]
do
echo -n "Voulez-vous utiliser ce plan d'adressage (recommandé) (O/n)? : "
read response
done
if [ "$response" = "n" ] || [ "$response" = "N" ]
then
CUSTOM_PRIVATE_NETWORK_MASK="0"
PTN='^\([01]\?[[:digit:]][[:digit:]]\?\|2[0-4][[:digit:]]\|25[0-5]\).\([01]\?[[:digit:]][[:digit:]]\?\|2[0-4][[:digit:]]\|25[0-5]\).\([01]\?[[:digit:]][[:digit:]]\?\|2[0-4][[:digit:]]\|25[0-5]\).\([01]\?[[:digit:]][[:digit:]]\?\|2[0-4][[:digit:]]\|25[0-5]\)/[012]\?[[:digit:]]$'
until [[ $(expr $CUSTOM_PRIVATE_NETWORK_MASK : $PTN) -gt 0 ]]
do
echo -n "Entrez un plan d'adressage au format CIDR (a.b.c.d/xx) : "
read CUSTOM_PRIVATE_NETWORK_MASK
 
done
fi
# Récupération de la config réseau côté "LAN de consultation"
HOSTNAME=alcasar-$ORGANISME
hostname $HOSTNAME
echo "- Nom du système : $HOSTNAME" >> $FIC_PARAM
PRIVATE_NETWORK=`/bin/ipcalc -n $CUSTOM_PRIVATE_NETWORK_MASK | cut -d"=" -f2` # @ réseau de consultation (ex.: 192.168.182.0)
private_prefix=`/bin/ipcalc -p $CUSTOM_PRIVATE_NETWORK_MASK |cut -d"=" -f2` # prefixe du réseau (ex. 24)
PRIVATE_NETWORK_MASK=$PRIVATE_NETWORK/$private_prefix # @ réseau + masque (x.0.0.0/8 ou x.y.0.0/16 ou x.y.z.0/24)
classe=$((private_prefix/8)); # classe de réseau (ex.: 2=classe B, 3=classe C)
PRIVATE_NETWORK_SHORT=`echo $PRIVATE_NETWORK | cut -d"." -f1-$classe`. # @ compatible hosts.allow et hosts.deny (ex.: 192.168.182.)
PRIVATE_MASK=`/bin/ipcalc -m $PRIVATE_NETWORK_MASK | cut -d"=" -f2` # masque réseau de consultation (ex.: 255.255.255.0)
PRIVATE_BROADCAST=`/bin/ipcalc -b $PRIVATE_NETWORK_MASK | cut -d"=" -f2` # @ broadcast réseau de consultation (ex.: 192.168.182.255)
TMP_MASK=`echo $PRIVATE_NETWORK_MASK|cut -d"/" -f2`; HALF_MASK=`expr $TMP_MASK + 1` # masque du 1/2 réseau de consultation (ex.: 25)
PRIVATE_STAT_IP=$PRIVATE_NETWORK/$HALF_MASK # plage des adresses statiques (ex.: 192.168.182.0/25)
PRIVATE_STAT_MASK=`/bin/ipcalc -m $PRIVATE_STAT_IP/$HALF_MASK | cut -d"=" -f2` # masque des adresses statiques (ex.: 255.255.255.128)
classe_sup=`expr $classe + 1`
classe_sup_sup=`expr $classe + 2`
private_network_ending=`echo $PRIVATE_NETWORK | cut -d"." -f$classe_sup`
private_broadcast_ending=`echo $PRIVATE_BROADCAST | cut -d"." -f$classe_sup`
private_plage=`expr $private_broadcast_ending - $private_network_ending + 1`
private_half_plage=`expr $private_plage / 2`
private_dyn=`expr $private_half_plage + $private_network_ending`
private_dyn_ip_network=`echo $PRIVATE_NETWORK | cut -d"." -f1-$classe`"."$private_dyn"."`echo $PRIVATE_NETWORK | cut -d"." -f$classe_sup_sup-5`
PRIVATE_DYN_IP=`echo $private_dyn_ip_network | cut -d"." -f1-4`/$HALF_MASK # plage des adresses dynamiques (ex.: 192.168.182.128/25)
PRIVATE_DYN_MASK=`/bin/ipcalc -m $PRIVATE_DYN_IP/$HALF_MASK | cut -d"=" -f2` # masque des adresses dynamiques (ex.: 255.255.255.128)
private_dyn_ip_network=`echo $PRIVATE_DYN_IP | cut -d"/" -f1` # plage des adresses dynamiques sans le masque (ex.: 192.168.182.0)
private_dyn_ip_end=`echo $private_dyn_ip_network | cut -d"." -f4` # dernier octet de la plage des adresses dynamiques (ex.: 128)
PRIVATE_DYN_FIRST_IP=`echo $private_dyn_ip_network | cut -d"." -f1-3`"."`expr $private_dyn_ip_end + 1` # 1ère adresse de la plage dynamique (ex.: 192.168.182.129)
private_broadcast_end=`echo $PRIVATE_BROADCAST | cut -d"." -f4`
PRIVATE_DYN_LAST_IP=`echo $PRIVATE_BROADCAST | cut -d"." -f1-3`"."`expr $private_broadcast_end - 1` # dernière adresse de la plage dynamique (ex.: 192.168.182.254)
PRIVATE_IP=`echo $PRIVATE_NETWORK | cut -d"." -f1-3`"."`expr $private_network_end + 1` # @ip du portail (côté réseau de consultation)
# Récupération de la config réseau côté "Internet"
[ -e /etc/sysconfig/network-scripts/default-ifcfg-$EXTIF ] || cp /etc/sysconfig/network-scripts/ifcfg-$EXTIF /etc/sysconfig/network-scripts/default-ifcfg-$EXTIF
EXT_IP=`grep IPADDR /etc/sysconfig/network-scripts/default-ifcfg-$EXTIF|cut -d"=" -f2` # @ip du portail (côté Internet)
[ -e /etc/sysconfig/network.default ] || cp /etc/sysconfig/network /etc/sysconfig/network.default
DNS1=`grep DNS1 /etc/sysconfig/network-scripts/default-ifcfg-$EXTIF|cut -d"=" -f2` # @ip 1er DNS
DNS2=`grep DNS2 /etc/sysconfig/network-scripts/default-ifcfg-$EXTIF|cut -d"=" -f2` # @ip 2ème DNS
EXT_NETMASK=`grep NETMASK /etc/sysconfig/network-scripts/default-ifcfg-$EXTIF|cut -d"=" -f2`
EXT_GATEWAY=`grep GATEWAY /etc/sysconfig/network-scripts/default-ifcfg-$EXTIF|cut -d"=" -f2`
echo "- Adresse IP 'côté Internet' ($EXTIF) : $EXT_IP / $EXT_NETMASK" >> $FIC_PARAM
echo "- Serveurs DNS renseignés : $DNS1 et $DNS2" >> $FIC_PARAM
echo "- Routeur de sortie : $EXT_GATEWAY" >> $FIC_PARAM
# Configuration réseau
cat <<EOF > /etc/sysconfig/network
NETWORKING=yes
HOSTNAME="$HOSTNAME"
FORWARD_IPV4=true
EOF
# On supprime les log_martians
$SED "s?^ENABLE_LOG_STRANGE_PACKETS=.*?ENABLE_LOG_STRANGE_PACKETS=no?g" /etc/security/msec/security.conf
# Modif /etc/hosts
[ -e /etc/hosts.default ] || cp /etc/hosts /etc/hosts.default
cat <<EOF > /etc/hosts
127.0.0.1 $HOSTNAME localhost.localdomain localhost
$PRIVATE_IP $HOSTNAME alcasar portail
EOF
echo "- Adresse IP 'côté réseau de consultation' ($INTIF) : $PRIVATE_IP / $PRIVATE_NETWORK_MASK" >> $FIC_PARAM
echo " - plage d'adresses statiques : $PRIVATE_STAT_IP" >> $FIC_PARAM
echo " - plage d'adresses dynamiques (via DHCP) : $PRIVATE_DYN_IP" >> $FIC_PARAM
# Configuration de l'interface eth0 (Internet)
cat <<EOF > /etc/sysconfig/network-scripts/ifcfg-$EXTIF
DEVICE=$EXTIF
BOOTPROTO=static
IPADDR=$EXT_IP
NETMASK=$EXT_NETMASK
GATEWAY=$EXT_GATEWAY
DNS1=127.0.0.1
ONBOOT=yes
METRIC=10
NOZEROCONF=yes
MII_NOT_SUPPORTED=yes
IPV6INIT=no
IPV6TO4INIT=no
ACCOUNTING=no
USERCTL=no
EOF
# Configuration de l'interface eth1 (réseau de consultation)
cat <<EOF > /etc/sysconfig/network-scripts/ifcfg-$INTIF
DEVICE=$INTIF
BOOTPROTO=static
IPADDR=$PRIVATE_IP
NETMASK=$PRIVATE_MASK
ONBOOT=yes
METRIC=10
NOZEROCONF=yes
MII_NOT_SUPPORTED=yes
IPV6INIT=no
IPV6TO4INIT=no
ACCOUNTING=no
USERCTL=no
EOF
# Configuration du serveur de temps
echo "synchronisation horaire ..."
[ -e /etc/ntp.conf.default ] || cp /etc/ntp.conf /etc/ntp.conf.default
cat <<EOF > /etc/ntp.conf
server 0.fr.pool.ntp.org
server 1.fr.pool.ntp.org
server 2.fr.pool.ntp.org
restrict default nomodify notrap noquery
restrict $PRIVATE_NETWORK mask $PRIVATE_MASK
restrict 127.0.0.1
driftfile /etc/ntp/drift
logfile /var/log/ntp.log
EOF
chown -R ntp:ntp /etc/ntp
ntpd -q -g &
# Configuration du serveur dhcpd de secours (mode bypass)
[ -e /etc/dhcpd.conf.default ] || cp /etc/dhcpd.conf /etc/dhcpd.conf.default 2> /dev/null
cat <<EOF > /etc/dhcpd.conf
ddns-update-style interim;
subnet $PRIVATE_NETWORK netmask $PRIVATE_MASK {
option routers $PRIVATE_IP;
option subnet-mask $PRIVATE_MASK;
option domain-name-servers $DNS1;
range dynamic-bootp $PRIVATE_DYN_LAST_IP $PRIVATE_DYN_FIRST_IP;
default-lease-time 21600;
max-lease-time 43200;
}
EOF
# écoute côté LAN seulement
[ -e /etc/sysconfig/dhcpd.default ] || cp /etc/sysconfig/dhcpd /etc/sysconfig/dhcpd.default 2> /dev/null
$SED "s?^#INTERFACES=.*?INTERFACES=\"$INTIF\"?g" /etc/sysconfig/dhcpd
/sbin/chkconfig --level 345 dhcpd off
# Renseignement des fichiers hosts.allow et hosts.deny
[ -e /etc/hosts.allow.default ] || cp /etc/hosts.allow /etc/hosts.allow.default
cat <<EOF > /etc/hosts.allow
ALL: LOCAL, 127.0.0.1, localhost, $PRIVATE_IP
sshd: $PRIVATE_NETWORK_SHORT
ntpd: $PRIVATE_NETWORK_SHORT
EOF
[ -e /etc/host.deny.default ] || cp /etc/hosts.deny /etc/hosts.deny.default
cat <<EOF > /etc/hosts.deny
ALL: ALL: spawn ( /bin/echo "service %d demandé par %c" | /bin/mail -s "Tentative d'accès au service %d par %c REFUSE !!!" security ) &
EOF
} # End of network ()
 
##################################################################
## Fonction gestion ##
## - installation du centre de gestion ##
## - configuration du serveur web (Apache) ##
## - définition du 1er comptes de gestion ##
## - sécurisation des accès ##
##################################################################
gestion()
{
# Suppression des CGI et des pages WEB installés par défaut
rm -rf /var/www/cgi-bin/*
[ -d $DIR_WEB ] && rm -rf $DIR_WEB
mkdir $DIR_WEB
# Copie et configuration des fichiers du centre de gestion
cp -rf $DIR_GESTION/* $DIR_WEB/
echo "$VERSION du $DATE" > $DIR_WEB/VERSION
$SED "s?99/99/9999?$DATE_SHORT?g" $DIR_WEB/menu.php
$SED "s?\$DB_RADIUS = .*?\$DB_RADIUS = \"$DB_RADIUS\"\;?g" $DIR_WEB/phpsysinfo/includes/xml/portail.php
$SED "s?\$DB_USER = .*?\$DB_USER = \"$DB_USER\"\;?g" $DIR_WEB/phpsysinfo/includes/xml/portail.php
$SED "s?\$radiuspwd = .*?\$radiuspwd = \"$radiuspwd\"\;?g" $DIR_WEB/phpsysinfo/includes/xml/portail.php
chmod 640 $DIR_WEB/phpsysinfo/includes/xml/portail.php
chown -R apache:apache $DIR_WEB/*
for i in ISO base logs/firewall logs/httpd logs/squid ;
do
[ -d $DIR_SAVE/$i ] || mkdir -p $DIR_SAVE/$i
done
chown -R root:apache $DIR_SAVE
# Configuration php
$SED "s?^upload_max_filesize.*?upload_max_filesize = 20M?g" /etc/php.ini
$SED "s?^post_max_size.*?post_max_size = 20M?g" /etc/php.ini
# Configuration Apache
[ -e /etc/httpd/conf/httpd.conf.default ] || cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.default
$SED "s?^#ServerName.*?ServerName $PRIVATE_IP?g" /etc/httpd/conf/httpd.conf
$SED "s?^Listen.*?#Listen 127.0.0.1:80?g" /etc/httpd/conf/httpd.conf
$SED "s?^ServerTokens.*?ServerTokens Prod?g" /etc/httpd/conf/httpd.conf
$SED "s?^ServerSignature.*?ServerSignature Off?g" /etc/httpd/conf/httpd.conf
$SED "s?^#ErrorDocument 404 /missing.html.*?ErrorDocument 404 /index.html?g" /etc/httpd/conf/httpd.conf
FIC_MOD_SSL=`find /etc/httpd/modules.d/ -type f -name *mod_ssl.conf`
$SED "s?^Listen.*?Listen $PRIVATE_IP:443?g" $FIC_MOD_SSL # On écoute en SSL que sur INTIF
$SED "s?background-color.*?background-color: #EFEFEF; }?g" /var/www/error/include/top.html
[ -e /var/www/error/include/bottom.html.default ] || mv /var/www/error/include/bottom.html /var/www/error/include/bottom.html.default
cat <<EOF > /var/www/error/include/bottom.html
</body>
</html>
EOF
echo "- URL d'accès au centre de gestion : https://$PRIVATE_IP" >> $FIC_PARAM
# Définition du premier compte lié au profil 'admin'
if [ "$mode" = "install" ]
then
header_install
echo "Pour administrer Alcasar via le centre de gestion WEB, trois profils de comptes ont été définis :"
echo " - le profil 'admin' capable de réaliser toutes les opérations"
echo " - le profil 'backup' lié uniquement aux fonctions d'archivage"
echo " - le profil 'manager' lié uniquement aux fonctions de gestion des usagers"
echo ""
echo "Définissez le premier compte du profil 'admin' :"
echo
echo -n "Nom : "
read admin_portail
echo "- Nom du premier compte lié au profil 'admin' : $admin_portail" >> $FIC_PARAM
# Création du fichier de clés de ce compte dans le profil "admin"
[ -d $DIR_WEB/digest ] && rm -rf $DIR_WEB/digest
mkdir -p $DIR_WEB/digest
chmod 755 $DIR_WEB/digest
until [ -s $DIR_WEB/digest/key_admin ]
do
/usr/sbin/htdigest -c $DIR_WEB/digest/key_admin $HOSTNAME $admin_portail
done
# Création des fichiers de clés des deux autres profils (backup + manager) contenant ce compte
$DIR_DEST_SBIN/alcasar-profil.sh -list
fi
# Sécurisation du centre
rm -f /etc/httpd/conf/webapps.d/*
cat <<EOF > /etc/httpd/conf/webapps.d/alcasar.conf
<Directory $DIR_WEB/digest>
AllowOverride none
Order deny,allow
Deny from all
</Directory>
<Directory $DIR_WEB/admin>
SSLRequireSSL
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.1
Allow from $PRIVATE_NETWORK_MASK
require valid-user
AuthType digest
AuthName $HOSTNAME
BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On
AuthUserFile $DIR_WEB/digest/key_admin
ErrorDocument 404 https://$PRIVATE_IP/
</Directory>
<Directory $DIR_WEB/manager/htdocs>
SSLRequireSSL
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.1
Allow from $PRIVATE_NETWORK_MASK
require valid-user
AuthType digest
AuthName $HOSTNAME
BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On
AuthUserFile $DIR_WEB/digest/key_manager
ErrorDocument 404 https://$PRIVATE_IP/
</Directory>
<Directory $DIR_WEB/manager/html>
SSLRequireSSL
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.1
Allow from $PRIVATE_NETWORK_MASK
require valid-user
AuthType digest
AuthName $HOSTNAME
BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On
AuthUserFile $DIR_WEB/digest/key_manager
ErrorDocument 404 https://$PRIVATE_IP/
</Directory>
<Directory $DIR_WEB/backup>
SSLRequireSSL
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.1
Allow from $PRIVATE_NETWORK_MASK
require valid-user
AuthType digest
AuthName $HOSTNAME
BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On
AuthUserFile $DIR_WEB/digest/key_backup
ErrorDocument 404 https://$PRIVATE_IP/
</Directory>
Alias /save/ "$DIR_SAVE/"
<Directory $DIR_SAVE>
SSLRequireSSL
Options Indexes
Order deny,allow
Deny from all
Allow from 127.0.0.1
Allow from $PRIVATE_NETWORK_MASK
require valid-user
AuthType digest
AuthName $HOSTNAME
AuthUserFile $DIR_WEB/digest/key_backup
ErrorDocument 404 https://$PRIVATE_IP/
ReadmeName /readmeSave.html
</Directory>
EOF
} # End of gestion ()
 
##########################################################################################
## Fonction AC() ##
## - Création d'une Autorité de Certification et du certificat serveur pour apache ##
##########################################################################################
AC ()
{
$SED "s?ifcfg-eth.?ifcfg-$INTIF?g" $DIR_DEST_BIN/alcasar-CA.sh
$DIR_DEST_BIN/alcasar-CA.sh $mode
MOD_SSL=`find /etc/httpd/conf -type f -name *default_ssl*`
$SED "s?localhost.crt?alcasar.crt?g" $MOD_SSL
$SED "s?localhost.key?alcasar.key?g" $MOD_SSL
chown -R root:apache /etc/pki
chmod -R 750 /etc/pki
} # End AC ()
 
##########################################################################################
## Fonction init_db() ##
## - Initialisation de la base Mysql ##
## - Affectation du mot de passe de l'administrateur (root) ##
## - Suppression des bases et des utilisateurs superflus ##
## - Création de la base 'radius' ##
## - Installation du schéma de cette base ##
## - Import des tables de comptabilité (mtotacct, totacct) et info_usagers (userinfo) ##
## ces table proviennent de 'dialupadmin' (paquetage freeradius-web) ##
##########################################################################################
init_db ()
{
mkdir -p /var/lib/mysql/.tmp
chown mysql:mysql /var/lib/mysql/.tmp
[ -e /etc/my.cnf.default ] || cp /etc/my.cnf /etc/my.cnf.default
$SED "s?^#bind-address.*?bind-address=127.0.0.1?g" /etc/my.cnf
/etc/init.d/mysqld start
sleep 4
mysqladmin -u root password $mysqlpwd
MYSQL="/usr/bin/mysql -uroot -p$mysqlpwd --exec"
# On supprime les tables d'exemple
$MYSQL="DROP DATABASE IF EXISTS test;DROP DATABASE IF EXISTS tmp;CONNECT mysql;DELETE from user where user='';FLUSH PRIVILEGES;"
# On crée la base 'radius'
$MYSQL="CREATE DATABASE IF NOT EXISTS $DB_RADIUS;GRANT ALL ON $DB_RADIUS.* TO $DB_USER@localhost IDENTIFIED BY '$radiuspwd';FLUSH PRIVILEGES"
FICSQL_LIBFREERADIUS=`find /etc/raddb/sql/mysql -type f -name schema.sql`
mysql -u$DB_USER -p$radiuspwd $DB_RADIUS < $FICSQL_LIBFREERADIUS
$MYSQL="connect $DB_RADIUS;ALTER table radpostauth DROP column pass;"
# Ajout des tables de comptabilité journalière et mensuelle (accounting)
DIRSQL_FREERADIUS=`find /usr/share/doc/freeradius-web* -type d -name mysql`
mysql -u$DB_USER -p$radiuspwd $DB_RADIUS < $DIRSQL_FREERADIUS/mtotacct.sql
mysql -u$DB_USER -p$radiuspwd $DB_RADIUS < $DIRSQL_FREERADIUS/totacct.sql
# correction d'un bug sur la table 'userinfo' avant import
$SED "s?^ id int(10).*? id int(10) NOT NULL auto_increment,?g" $DIRSQL_FREERADIUS/userinfo.sql
mysql -u$DB_USER -p$radiuspwd $DB_RADIUS < $DIRSQL_FREERADIUS/userinfo.sql
# correction d'un bug sur la table 'badusers' avant import (elle reste inutilisée par Alcasar pour l'instant)
#$SED "s?^ id int(10).*? id int(10) NOT NULL auto_increment,?g" $DIRSQL_FREERADIUS/badusers.sql
#mysql -u$DB_USER -p$radiuspwd $DB_RADIUS < $DIRSQL_FREERADIUS/badusers.sql
} # End init_db ()
 
##########################################################################
## Fonction param_radius ##
## - Paramètrage des fichiers de configuration FreeRadius ##
## - Affectation du secret partagé entre coova-chilli et freeradius ##
## - Modification de fichier de conf pour l'accès à Mysql ##
##########################################################################
param_radius ()
{
cp -f $DIR_CONF/radiusd-db-vierge.sql /etc/raddb/
chown -R radius:radius /etc/raddb
[ -e /etc/raddb/radiusd.conf.default ] || cp /etc/raddb/radiusd.conf /etc/raddb/radiusd.conf.default
# paramètrage radius.conf
$SED "s?^[\t ]*#[\t ]*user =.*?user = radius?g" /etc/raddb/radiusd.conf
$SED "s?^[\t ]*#[\t ]*group =.*?group = radius?g" /etc/raddb/radiusd.conf
$SED "s?^[\t ]*status_server =.*?status_server = no?g" /etc/raddb/radiusd.conf
# suppression de la fonction proxy
$SED "s?^[\t ]*proxy_requests.*?proxy_requests = no?g" /etc/raddb/radiusd.conf
$SED "s?^[\t ]*\$INCLUDE proxy.conf.*?#\$INCLUDE proxy.conf?g" /etc/raddb/radiusd.conf
# écoute sur loopback uniquement (à modifier plus tard pour l'EAP)
$SED "s?^[\t ]*ipaddr =.*?ipaddr = 127.0.0.1?g" /etc/raddb/radiusd.conf
# prise en compte du module SQL et des compteurs SQL
$SED "s?^[\t ]*#[\t ]*\$INCLUDE sql.conf.*?\$INCLUDE sql.conf?g" /etc/raddb/radiusd.conf
$SED "s?^[\t ]*#[\t ]*\$INCLUDE sql/mysql/counter.conf?\$INCLUDE sql/mysql/counter.conf?g" /etc/raddb/radiusd.conf
$SED "s?^[\t ]*\$INCLUDE policy.conf?#\$INCLUDE policy.conf?g" /etc/raddb/radiusd.conf
# purge du répertoire des serveurs virtuels et copie du fichier de configuration d'Alcasar
rm -f /etc/raddb/sites-enabled/*
cp $DIR_CONF/alcasar-radius /etc/raddb/sites-available/alcasar
chown radius:apache /etc/raddb/sites-available/alcasar /etc/raddb/modules/ldap # droits rw pour apache (module ldap)
chmod 660 /etc/raddb/sites-available/alcasar /etc/raddb/modules/ldap
chgrp apache /etc/raddb /etc/raddb/sites-available /etc/raddb/modules
ln -s /etc/raddb/sites-available/alcasar /etc/raddb/sites-enabled/alcasar
# Inutile dans notre fonctionnement mais les liens sont recrés par un update de radius ... donc là forcé en tant que fichier
touch /etc/raddb/sites-enabled/{inner-tunnel,control-socket,default}
# configuration du fichier client.conf (127.0.0.1 suffit mais on laisse le deuxième client pour la future gestion de l'EAP)
[ -e /etc/raddb/clients.conf.default ] || cp -f /etc/raddb/clients.conf /etc/raddb/clients.conf.default
cat << EOF > /etc/raddb/clients.conf
client 127.0.0.1 {
secret = $secretradius
shortname = localhost
}
client $PRIVATE_NETWORK_MASK {
secret = $secretradius
shortname = localhost
}
EOF
# modif sql.conf
[ -e /etc/raddb/sql.conf.default ] || cp /etc/raddb/sql.conf /etc/raddb/sql.conf.default
$SED "s?^[\t ]*login =.*?login = \"$DB_USER\"?g" /etc/raddb/sql.conf
$SED "s?^[\t ]*password =.*?password = \"$radiuspwd\"?g" /etc/raddb/sql.conf
$SED "s?^[\t ]*radius_db =.*?radius_db = \"$DB_RADIUS\"?g" /etc/raddb/sql.conf
$SED "s?^[\t ]*sqltrace =.*?sqltrace = no?g" /etc/raddb/sql.conf
# modif dialup.conf
[ -e /etc/raddb/sql/mysql/dialup.conf.default ] || cp /etc/raddb/sql/mysql/dialup.conf /etc/raddb/sql/mysql/dialup.conf.default
cp -f $DIR_CONF/dialup.conf /etc/raddb/sql/mysql/dialup.conf
} # End param_radius ()
 
##########################################################################
## Fonction param_web_radius ##
## - Import, modification et paramètrage de l'interface "dialupadmin" ##
## - Création du lien vers la page de changement de mot de passe ##
##########################################################################
param_web_radius ()
{
# copie de l'interface d'origine dans la structure Alcasar
# mdv 2009.0 et 2009.1
if [ -d /var/www/freeradius-web ]
then
cp -rf /var/www/freeradius-web/* $DIR_WEB/manager/
chmod a-x /var/www/freeradius-web
else # mdv 2010.0
[ -d /usr/share/freeradius-web ] && cp -rf /usr/share/freeradius-web/* $DIR_WEB/manager/
fi
# copie des fichiers modifiés et suppression des fichiers inutiles
cp -rf $DIR_GESTION/manager/* $DIR_WEB/manager/
rm -f $DIR_WEB/manager/index.html $DIR_WEB/manager/readme
rm -f $DIR_WEB/manager/htdocs/about.html $DIR_WEB/manager/htdocs/index.html $DIR_WEB/manager/htdocs/content.html
chown -R apache:apache $DIR_WEB/manager/
# Modification du fichier de configuration
[ -e /etc/freeradius-web/admin.conf.default ] || cp /etc/freeradius-web/admin.conf /etc/freeradius-web/admin.conf.default
$SED "s?^general_domain:.*?general_domain: $ORGANISME.$DOMAIN?g" /etc/freeradius-web/admin.conf
$SED "s?^sql_username:.*?sql_username: $DB_USER?g" /etc/freeradius-web/admin.conf
$SED "s?^sql_password:.*?sql_password: $radiuspwd?g" /etc/freeradius-web/admin.conf
$SED "s?^sql_debug:.*?sql_debug: false?g" /etc/freeradius-web/admin.conf
$SED "s?^sql_usergroup_table: .*?sql_usergroup_table: radusergroup?g" /etc/freeradius-web/admin.conf
$SED "s?^sql_password_attribute:.*?sql_password_attribute: Crypt-Password?g" /etc/freeradius-web/admin.conf
$SED "s?^general_finger_type.*?# general_finger_type: snmp?g" /etc/freeradius-web/admin.conf
$SED "s?^general_stats_use_totacct.*?general_stats_use_totacct: yes?g" /etc/freeradius-web/admin.conf
cat <<EOF > /etc/freeradius-web/naslist.conf
nas1_name: alcasar.%{general_domain}
nas1_model: Portail captif
nas1_ip: $PRIVATE_IP
nas1_port_num: 0
nas1_community: public
EOF
# Modification des attributs visibles lors de la création d'un usager ou d'un groupe
[ -e /etc/freeradius-web/user_edit.attrs.default ] || mv /etc/freeradius-web/user_edit.attrs /etc/freeradius-web/user_edit.attrs.default
cp -f $DIR_CONF/user_edit.attrs /etc/freeradius-web/user_edit.attrs
# Modification des attributs visibles sur les pages des statistiques (suppression NAS_IP et NAS_port)
[ -e /etc/freeradius-web/sql.attrs.default ] || cp /etc/freeradius-web/sql.attrs /etc/freeradius-web/user_edit.attrs.default
$SED "s?^NASIPAddress.*?NASIPAddress\tNas IP Address\tno?g" /etc/freeradius-web/sql.attrs
$SED "s?^NASPortId.*?NASPortId\tNas Port\tno?g" /etc/freeradius-web/sql.attrs
chown -R apache:apache /etc/freeradius-web
# Ajout de l'alias vers la page de "changement de mot de passe usager"
cat <<EOF >> /etc/httpd/conf/webapps.d/alcasar.conf
Alias /pass/ "$DIR_WEB/manager/pass/"
<Directory $DIR_WEB/manager/pass>
SSLRequireSSL
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.1
Allow from $PRIVATE_NETWORK_MASK
ErrorDocument 404 https://$PRIVATE_IP
</Directory>
EOF
echo "- URL pour le changement du mot de passe usager : https://$PRIVATE_IP/pass/" >> $FIC_PARAM
} # End of param_web_radius ()
 
##########################################################################
## Fonction param_chilli ##
## - Paramètrage du fichier de configuration de coova-chilli ##
## - Paramètrage de la page d'authentification (intercept.php) ##
##########################################################################
param_chilli ()
{
# modification du générateur du fichier de conf
[ -e /etc/chilli/functions.default ] || cp /etc/chilli/functions /etc/chilli/functions.default
# suppression du domaine "coova.org" dans la primitive uamallowed
$SED "s?www.coova.org,??g" /etc/chilli/functions
# suppression de la primitive "WISPR" (inutilisée par Alcasar)
$SED "s?^HS_WISPRLOGIN=.*??g" /etc/chilli/functions
# suppression de la primitive "uamanydns" (les clients ne peuvent utiliser que les serveurs DNS d'Alcasar)
$SED "s?uamanydns??g" /etc/chilli/functions
# modification du fichier d'initialisation (suppression du cron et correction de la procédure d'arret)
[ -e /etc/init.d/chilli.default ] || cp /etc/init.d/chilli /etc/init.d/chilli.default
cp -f $DIR_CONF/chilli-init /etc/init.d/chilli
# création du fichier de conf
cp /etc/chilli/defaults /etc/chilli/config
$SED "s?^# HS_WANIF=.*?HF_WANIF=$EXTIF?g" /etc/chilli/config
$SED "s?^HS_LANIF=.*?HS_LANIF=$INTIF?g" /etc/chilli/config
$SED "s?^HS_NETWORK=.*?HS_NETWORK=$PRIVATE_NETWORK?g" /etc/chilli/config
$SED "s?^HS_NETMASK=.*?HS_NETMASK=$PRIVATE_MASK?g" /etc/chilli/config
$SED "s?^HS_UAMLISTEN=.*?HS_UAMLISTEN=$PRIVATE_IP?g" /etc/chilli/config
$SED "s?^HS_UAMPORT=.*?HS_UAMPORT=$UAMPORT?g" /etc/chilli/config
$SED "s?^# HS_DYNIP=.*?HS_DYNIP=$PRIVATE_DYN_IP?g" /etc/chilli/config
$SED "s?^# HS_DYNIP_MASK=.*?HS_DYNIP_MASK=$PRIVATE_DYN_MASK?g" /etc/chilli/config
$SED "s?^# HS_STATIP=.*?HS_STATIP=$PRIVATE_STAT_IP?g" /etc/chilli/config
$SED "s?^# HS_STATIP_MASK.*?HS_STATIP_MASK=$PRIVATE_STAT_MASK?g" /etc/chilli/config
$SED "s?^# HS_DNS_DOMAIN=.*?HS_DNS_DOMAIN=$DOMAIN?g" /etc/chilli/config
$SED "s?^HS_DNS1=.*?HS_DNS1=$PRIVATE_IP?g" /etc/chilli/config
$SED "s?^HS_DNS2=.*?HS_DNS2=$PRIVATE_IP?g" /etc/chilli/config
$SED "s?^HS_UAMSECRET=.*?HS_UAMSECRET=$secretuam?g" /etc/chilli/config
$SED "s?^HS_RADIUS=.*?HS_RADIUS=127.0.0.1?g" /etc/chilli/config
$SED "s?^HS_RADIUS2=.*?HS_RADIUS2=127.0.0.1?g" /etc/chilli/config
$SED "s?^HS_RADSECRET=.*?HS_RADSECRET=$secretradius?g" /etc/chilli/config
$SED "s?^HS_UAMALLOW=.*?# HS_UAMALLOW?g" /etc/chilli/config
$SED "s?^HS_UAMSERVER=.*?HS_UAMSERVER=$PRIVATE_IP?g" /etc/chilli/config
$SED "s?^HS_UAMFORMAT=.*?HS_UAMFORMAT=https://\$HS_UAMSERVER/intercept.php?g" /etc/chilli/config
$SED "s?^HS_UAMHOMEPAGE=.*?HS_UAMHOMEPAGE=?g" /etc/chilli/config
$SED "s?^HS_UAMSERVICE=.*?# HS_UAMSERVICE?g" /etc/chilli/config
$SED "s?^# HS_ANYIP=.*?HS_ANYIP=on?g" /etc/chilli/config
$SED "s?^# HS_DNSPARANOIA=.*?HS_DNSPARANOIA=on?g" /etc/chilli/config
$SED "s?^HS_LOC_NAME=.*?HS_LOC_NAME=\"$HOSTNAME\"?g" /etc/chilli/config
$SED "s?^HS_WWWDIR.*?# HS_WWWDIR?g" /etc/chilli/config
$SED "s?^HS_WWWBIN.*?# HS_WWWBIN?g" /etc/chilli/config
$SED "s?^HS_PROVIDER_LINK.*?HS_PROVIDER_LINK=https://\$HS_UAMSERVER/?g" /etc/chilli/config
echo "HS_COAPORT=3799" >> /etc/chilli/config
# création des fichiers de sites, d'urls et d'adresses MAC de confiance
echo -e "HS_UAMALLOW=\"\"" > /etc/chilli/alcasar-uamallowed
echo -e "HS_UAMDOMAINS=\"\"" > /etc/chilli/alcasar-uamdomain
$SED "s?^# HS_MACAUTHMODE=.*?HS_MACAUTHMODE=local?g" /etc/chilli/config
echo -e "HS_MACALLOW=\"\"" >> /etc/chilli/alcasar-macallowed
chown root:apache /etc/chilli/alcasar-*
chmod 660 /etc/chilli/alcasar-*
echo ". /etc/chilli/alcasar-uamallowed" >> /etc/chilli/config
echo ". /etc/chilli/alcasar-uamdomain" >> /etc/chilli/config
echo ". /etc/chilli/alcasar-macallowed" >> /etc/chilli/config
echo "- URL de deconnexion du portail : http://$PRIVATE_IP:$UAMPORT/logoff" >> $FIC_PARAM
# Définition du secret partagé entre coova-chilli et la page d'authentification (intercept.php)
$SED "s?^\$uamsecret =.*?\$uamsecret = \"$secretuam\";?g" $DIR_WEB/intercept.php
$SED "s?^\$userpassword=1.*?\$userpassword=1;?g" $DIR_WEB/intercept.php
$SED "s?^\$organisme = .*?\$organisme = \"$ORGANISME\";?g" $DIR_WEB/intercept.php
# Suppression des modifications "iptables" effectuées lors du lancement du daemon coova
$SED "s?^ iptables \$opt \$\*?# iptables \$opt \$\*?g" /etc/chilli/up.sh
} # End of param_chilli ()
 
##########################################################
## Fonction param_squid ##
## - Paramètrage du proxy 'squid' en mode 'cache' ##
## - Initialisation de la base de données ##
##########################################################
param_squid ()
{
# paramètrage de Squid (connecté en série derrière Dansguardian)
[ -e /etc/squid/squid.conf.default ] || cp /etc/squid/squid.conf /etc/squid/squid.conf.default
# suppression des références 'localnet', 'icp', 'htcp' et 'always_direct'
$SED "/^acl localnet/d" /etc/squid/squid.conf
$SED "/^icp_access allow localnet/d" /etc/squid/squid.conf
$SED "/^icp_port 3130/d" /etc/squid/squid.conf
$SED "/^http_access allow localnet/d" /etc/squid/squid.conf
$SED "/^htcp_access allow localnet/d" /etc/squid/squid.conf
$SED "/^always_direct allow localnet/d" /etc/squid/squid.conf
# mode 'proxy transparent local'
$SED "s?^http_port.*?http_port 127.0.0.1:$SQUID_PORT transparent?g" /etc/squid/squid.conf
# compatibilité des logs avec awstats
$SED "s?^# emulate_httpd_log.*?emulate_httpd_log on?g" /etc/squid/squid.conf
$SED "s?^access_log.*?access_log /var/log/squid/access.log?g" /etc/squid/squid.conf
# Initialisation du cache de Squid
/usr/sbin/squid -z
} # End of param_squid ()
##################################################################
## Fonction param_dansguardian ##
## - Paramètrage du gestionnaire de contenu Dansguardian ##
## - Copie de la blacklist de toulouse ##
##################################################################
param_dansguardian ()
{
# modification du fichier d'initialisation (correction de la procédure d'arret)
[ -e /etc/init.d/dansguardian.default ] || cp /etc/init.d/dansguardian /etc/init.d/dansguardian.default
cp -f $DIR_CONF/dansguardian-init /etc/init.d/dansguardian
mkdir /var/dansguardian
chown dansguardian /var/dansguardian
[ -e /etc/dansguardian/dansguardian.conf.default ] || cp /etc/dansguardian/dansguardian.conf /etc/dansguardian/dansguardian.conf.default
# par défaut, le filtrage WEB est désactivé
$SED "s/^reportinglevel =.*/reportinglevel = -1/g" /etc/dansguardian/dansguardian.conf
# la page d'interception est en français
$SED "s?^language =.*?language = french?g" /etc/dansguardian/dansguardian.conf
# on limite l'écoute de Dansguardian côté LAN
$SED "s?^filterip =.*?filterip = $PRIVATE_IP?g" /etc/dansguardian/dansguardian.conf
# on remplace la page d'interception (template)
cp -f $DIR_CONF/template.html /usr/share/dansguardian/languages/ukenglish/
cp -f $DIR_CONF/template-fr.html /usr/share/dansguardian/languages/french/template.html
# on ne loggue que les deny (pour le reste, on a squid)
$SED "s?^loglevel =.*?loglevel = 1?g" /etc/dansguardian/dansguardian.conf
# on désactive par défaut le controle de contenu des pages html
$SED "s?^weightedphrasemode =.*?weightedphrasemode = 0?g" /etc/dansguardian/dansguardian.conf
cp /etc/dansguardian/lists/bannedphraselist /etc/dansguardian/lists/bannedphraselist.default
$SED "s?^[^#]?#&?g" /etc/dansguardian/lists/bannedphraselist # (on commente ce qui ne l'est pas)
# on désactive par défaut le contrôle d'URL par expressions régulières
cp /etc/dansguardian/lists/bannedregexpurllist /etc/dansguardian/lists/bannedregexpurllist.default
$SED "s?^[^#]?#&?g" /etc/dansguardian/lists/bannedregexpurllist # (on commente ce qui ne l'est pas)
# on désactive par défaut le contrôle de téléchargement de fichiers
[ -e /etc/dansguardian/dansguardianf1.conf.default ] || cp /etc/dansguardian/dansguardianf1.conf /etc/dansguardian/dansguardianf1.conf.default
$SED "s?^blockdownloads =.*?blockdownloads = off?g" /etc/dansguardian/dansguardianf1.conf
[ -e /etc/dansguardian/lists/bannedextensionlist.default ] || mv /etc/dansguardian/lists/bannedextensionlist /etc/dansguardian/lists/bannedextensionlist.default
[ -e /etc/dansguardian/lists/bannedmimetypelist.default ] || mv /etc/dansguardian/lists/bannedmimetypelist /etc/dansguardian/lists/bannedmimetypelist.default
touch /etc/dansguardian/lists/bannedextensionlist
touch /etc/dansguardian/lists/bannedmimetypelist
# on vide la liste des @IP du Lan ne subissant pas le filtrage WEB
[ -e /etc/dansguardian/lists/exceptioniplist.default ] || mv /etc/dansguardian/lists/exceptioniplist /etc/dansguardian/lists/exceptioniplist.default
touch /etc/dansguardian/lists/exceptioniplist
# on copie les fichiers de la BL de toulouse
[ -d /etc/dansguardian/lists/blacklists ] && mv /etc/dansguardian/lists/blacklists /etc/dansguardian/lists/blacklists.default
tar zxvf $DIR_CONF/blacklists.tar.gz --directory=/etc/dansguardian/lists/ 2>&1 >/dev/null
cp -f $DIR_CONF/VERSION-BL $DIR_WEB/
chown apache:apache $DIR_WEB/VERSION-BL
# on crée la BL secondaire
mkdir /etc/dansguardian/lists/blacklists/ossi
touch /etc/dansguardian/lists/blacklists/ossi/domains
touch /etc/dansguardian/lists/blacklists/ossi/urls
# On crée une WhiteList vide
[ -e /etc/dansguardian/lists/exceptionsitelist.default ] || mv /etc/dansguardian/lists/exceptionsitelist /etc/dansguardian/lists/exceptionsitelist.default
[ -e /etc/dansguardian/lists/exceptionurllist.default ] || mv /etc/dansguardian/lists/exceptionurllist /etc/dansguardian/lists/exceptionurllist.default
touch /etc/dansguardian/lists/exceptionsitelist
touch /etc/dansguardian/lists/exceptionurllist
# on configure le filtrage de site
[ -e /etc/dansguardian/lists/bannedsitelist.default ] || cp /etc/dansguardian/lists/bannedsitelist /etc/dansguardian/lists/bannedsitelist.default
$SED "s?^[^#]?#&?g" /etc/dansguardian/lists/bannedsitelist # (on commente ce qui ne l'est pas)
# on bloque les sites ne possédant pas de nom de domaine (ex: http://12.13.14.15)
$SED "s?^#\*ip?\*ip?g" /etc/dansguardian/lists/bannedsitelist
# on bloque le ssl sur port 80
$SED "s?^#\*\*s?\*\*s?g" /etc/dansguardian/lists/bannedsitelist
# on configure la BL de toulouse
cat $DIR_CONF/bannedsitelist >> /etc/dansguardian/lists/bannedsitelist
[ -e /etc/dansguardian/lists/bannedurllist.default ] || cp /etc/dansguardian/lists/bannedurllist /etc/dansguardian/lists/bannedurllist.default
$SED "s?^[^#]?#&?g" /etc/dansguardian/lists/bannedurllist # (on commente ce qui ne l'est pas)
cat $DIR_CONF/bannedurllist >> /etc/dansguardian/lists/bannedurllist
chown -R dansguardian:apache /etc/dansguardian/
chmod -R g+rw /etc/dansguardian
} # End of param_dansguardian ()
 
##################################################################################
## Fonction firewall ##
## - adaptation des scripts du parefeu ##
## - mise en place des règles et sauvegarde pour un lancement automatique ##
## - configuration Ulogd ##
##################################################################################
firewall ()
{
$SED "s?^EXTIF=.*?EXTIF=\"$EXTIF\"?g" $DIR_DEST_BIN/alcasar-iptables.sh $DIR_DEST_BIN/alcasar-iptables-bypass.sh
$SED "s?^INTIF=.*?INTIF=\"$INTIF\"?g" $DIR_DEST_BIN/alcasar-iptables.sh $DIR_DEST_BIN/alcasar-iptables-bypass.sh
$SED "s?^PRIVATE_NETWORK_MASK=.*?PRIVATE_NETWORK_MASK=\"$PRIVATE_NETWORK_MASK\"?g" $DIR_DEST_BIN/alcasar-iptables.sh $DIR_DEST_BIN/alcasar-iptables-bypass.sh
$SED "s?^PRIVATE_IP=.*?PRIVATE_IP=\"$PRIVATE_IP\"?g" $DIR_DEST_BIN/alcasar-iptables.sh $DIR_DEST_BIN/alcasar-iptables-bypass.sh
chmod o+r $DIR_DEST_BIN/alcasar-iptables.sh #lecture possible pour apache (interface php du filtrage réseau)
[ -d /var/log/firewall ] || mkdir -p /var/log/firewall
[ -e /var/log/firewall/firewall.log ] || touch /var/log/firewall/firewall.log
chown -R root:apache /var/log/firewall
chmod 750 /var/log/firewall
chmod 640 /var/log/firewall/firewall.log
$SED "s?^file=\"/var/log/ulogd.syslogemu\"?file=\"/var/log/firewall/firewall.log\"?g" /etc/ulogd.conf
sh $DIR_DEST_BIN/alcasar-iptables.sh
} # End of firewall ()
 
##################################################################################
## Fonction param_awstats ##
## - configuration de l'interface des logs de consultation WEB (AWSTAT) ##
##################################################################################
param_awstats()
{
ln -s /var/www/awstats $DIR_WEB/awstats
cp /etc/awstats/awstats.conf /etc/awstats/awstats.conf.default
$SED "s?^LogFile=.*?LogFile=\"/var/log/squid/access.log\"?g" /etc/awstats/awstats.conf
$SED "s?^LogFormat=.*?LogFormat=4?g" /etc/awstats/awstats.conf
$SED "s?^SiteDomain=.*?SiteDomain=\"$HOSTNAME\"?g" /etc/awstats/awstats.conf
$SED "s?^HostAliases=.*?HostAliases=\"$PRIVATE_IP\"?g" /etc/awstats/awstats.conf
$SED "s?^DNSLookup=.*?DNSLookup=0?g" /etc/awstats/awstats.conf
$SED "s?^DirData=.*?DirData=\"/var/lib/awstats\"?g" /etc/awstats/awstats.conf # corrige le fichier de config awstats natif ...
$SED "s?^StyleSheet=.*?StyleSheet=\"/css/style.css\"?g" /etc/awstats/awstats.conf
$SED "s?^BuildReportFormat=.*?BuildReportFormat=xhtml?g" /etc/awstats/awstats.conf
cat <<EOF >> /etc/httpd/conf/webapps.d/alcasar.conf
<Directory $DIR_WEB/awstats>
SSLRequireSSL
Options ExecCGI
AddHandler cgi-script .pl
DirectoryIndex awstats.pl
Order deny,allow
Deny from all
Allow from 127.0.0.1
Allow from $PRIVATE_NETWORK_MASK
require valid-user
AuthType digest
AuthName $HOSTNAME
BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On
AuthUserFile $DIR_WEB/digest/key_admin
ErrorDocument 404 https://$PRIVATE_IP/
</Directory>
SetEnv PERL5LIB /usr/share/awstats/lib:/usr/share/awstats/plugins
EOF
} # End of param_awstats ()
 
##########################################################
## Fonction bind ##
## - Mise en place des différents fichiers de bind ##
##########################################################
param_bind ()
{
ln -sf /var/lib/named/etc/trusted_networks_acl.conf /etc/
ln -sf /var/lib/named/etc/named.conf /etc/
ln -sf /var/lib/named/var/named /var/
ln -sf /var/lib/named/var/log/ /var/log/named
[ -e /var/lib/named/etc/trusted_networks_acl.conf.default ] || cp /var/lib/named/etc/trusted_networks_acl.conf /var/lib/named/etc/trusted_networks_acl.conf.default
[ -e /var/lib/named/etc/named.conf.default ] || cp /var/lib/named/etc/named.conf /var/lib/named/etc/named.conf.default
[ -e /var/lib/named/var/named/master/localdomain.zone.default ] || cp /var/lib/named/var/named/master/localdomain.zone /var/lib/named/var/named/master/localdomain.zone.default
$SED "s?127.0.0.1;.*?127.0.0.1; $CUSTOM_PRIVATE_NETWORK_MASK;?g" /var/lib/named/etc/trusted_networks_acl.conf
$SED "s?listen-on.*?listen-on port 53 \{ 127.0.0.1; $PRIVATE_IP; \};?g" /var/lib/named/etc/named.conf
$SED "s?^\/\/[ ]*forwarders.*? forward only; forwarders { $DNS1; $DNS2; };?g" /var/lib/named/etc/named.conf
# $SED "s?^\/\/ include \"\/etc\/bogon_acl.conf\";.*?include \"\/etc\/bogon_acl.conf\";?g" /var/lib/named/etc/named.conf
# On crée l'entrée pour le reverse
for i in $(seq $classe -1 1)
do
echo -n `echo $PRIVATE_NETWORK|cut -d"." -f$i`. >> /tmp/rev.txt
done
echo "in-addr.arpa" >> /tmp/rev.txt
reverse_addr=`cat /tmp/rev.txt`
rm -f /tmp/rev.txt
cat << EOF >> /var/lib/named/etc/named.conf
zone "$reverse_addr" IN {
type master;
file "reverse/localdomain.rev";
allow-update { none; };
};
EOF
cp -f $DIR_CONF/localdomain.zone /var/lib/named/var/named/master/localdomain.zone
echo "$HOSTNAME IN A $PRIVATE_IP" >> /var/lib/named/var/named/master/localdomain.zone
echo "alcasar IN CNAME $HOSTNAME" >> /var/lib/named/var/named/master/localdomain.zone
cp -f $DIR_CONF/localdomain.rev /var/lib/named/var/named/reverse/localdomain.rev
echo "1 IN PTR alcasar." >> /var/lib/named/var/named/reverse/localdomain.rev
# fichier de blacklistage de named dans ... a venir
}
 
##########################################################
## Fonction cron ##
## - Mise en place des différents fichiers de cron ##
##########################################################
cron ()
{
# Modif du fichier 'crontab' pour passer les cron à minuit au lieu de 04h00
[ -e /etc/crontab.default ] || cp /etc/crontab /etc/crontab.default
cat <<EOF > /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
 
# run-parts
01 * * * * root nice -n 19 run-parts --report /etc/cron.hourly
02 0 * * * root nice -n 19 run-parts --report /etc/cron.daily
22 0 * * 0 root nice -n 19 run-parts --report /etc/cron.weekly
42 0 1 * * root nice -n 19 run-parts --report /etc/cron.monthly
EOF
[ -e /etc/anacrontab.default ] || cp /etc/anacrontab /etc/anacrontab.default
cat <<EOF >> /etc/anacrontab
7 10 cron.logExport nice /etc/cron.d/export_log
7 15 cron.logClean nice /etc/cron.d/clean_log
EOF
# suppression des fichiers de logs de plus d'un an (tous les lundi à 4h30)
cat <<EOF > /etc/cron.d/clean_log
30 4 * * 1 root $DIR_DEST_BIN/alcasar-log-clean.sh
EOF
# export de la base des usagers (tous les lundi à 4h45)
cat <<EOF > /etc/cron.d/mysql
45 4 * * 1 root $DIR_DEST_SBIN/alcasar-mysql.sh -dump
EOF
# export des log squid, firewall et apache (tous les lundi à 5h00)
cat <<EOF > /etc/cron.d/export_log
#!/bin/sh
00 5 * * 1 root $DIR_DEST_BIN/alcasar-log-export.sh
EOF
# mise à jour des stats de consultation WEB toutes les 30' ## existe en double pour le daily sans l'@IP
# sans mèl ( > /dev/null 2>&1)
cat << EOF > /etc/cron.d/awstats
*/30 * * * * root /var/www/awstats/awstats.pl -config=localhost -update >/dev/null 2>&1
EOF
# mise à jour des stats de connexion (accounting). Scripts provenant de "dialupadmin" (rpm freeradius-web) (cf. wiki.freeradius.org/Dialup_admin).
# on écrase le crontab d'origine installé par le RPM "freeradius-web" (bug remonté à qa.mandriva.com : 46739).
# 'tot_stats' (tout les jours à 01h01) : aggrégat des connexions journalières par usager (renseigne la table 'totacct')
# 'monthly_tot_stat' (tous les jours à 01h05) : aggrégat des connexions mensuelles par usager (renseigne la table 'mtotacct')
# 'truncate_raddact' (tous les 1er du mois à 01h10) : supprime les entrées journalisées plus vieilles que '$back_days' jours (défini ci-après)
# 'clean_radacct' (tous les 1er du mois à 01h15) : ferme les session ouvertes de plus de '$back_days' jours (défini ci-après)
$SED "s?^\$back_days.*?\$back_days = 365;?g" /usr/bin/truncate_radacct
$SED "s?^\$back_days.*?\$back_days = 30;?g" /usr/bin/clean_radacct
rm -f /etc/cron.daily/freeradius-web
rm -f /etc/cron.monthly/freeradius-web
cat << EOF > /etc/cron.d/freeradius-web
1 1 * * * root /usr/bin/tot_stats > /dev/null 2>&1
5 1 * * * root /usr/bin/monthly_tot_stats > /dev/null 2>&1
10 1 1 * * root /usr/bin/truncate_radacct > /dev/null 2>&1
15 1 1 * * root /usr/bin/clean_radacct > /dev/null 2>&1
EOF
# réécriture du fichier cron de coova-chilli pour être cohérent avec l'architecture Alcasar (/etc/crond au lieu de /var/spool/cron/root).
# sans mèl ( > /dev/null 2>&1)
rm -f /var/spool/cron/root
cat << EOF > /etc/cron.d/coova
*/60 * * * * root /etc/init.d/chilli radconfig > /dev/null 2>&1
*/10 * * * * root /etc/init.d/chilli checkrunning > /dev/null 2>&1
EOF
# activation du "chien de garde" (watchdog) toutes les 3' afin de déconnecter les usagers authentifiés dont la station est usurpée ou ne répond plus
cat << EOF > /etc/cron.d/watchdog
*/3 * * * * root $DIR_DEST_BIN/alcasar-watchdog.sh > /dev/null 2>&1
EOF
} # End cron
 
##################################################################
## Fonction post_install ##
## - Modification des bannières (locales et ssh) et des prompts ##
## - Installation de la structure de chiffrement pour root ##
## - Mise en place du sudoers et de la sécurité sur les fichiers##
## - Mise en place du la rotation des logs ##
## - Configuration dans le cas d'une mise à jour ##
##################################################################
post_install()
{
# adaptation du script "chien de garde" (watchdog)
$SED "s?^PRIVATE_IP=.*?PRIVATE_IP=\"$PRIVATE_IP\"?g" $DIR_DEST_BIN/alcasar-watchdog.sh
# création de la bannière locale
[ -e /etc/mandriva-release.default ] || cp /etc/mandriva-release /etc/mandriva-release.default
cat <<EOF > /etc/mandriva-release
Bienvenue sur $HOSTNAME
 
EOF
# création de la bannière SSH
cp /etc/mandriva-release /etc/ssh/alcasar-banner-ssh
chmod 644 /etc/ssh/alcasar-banner-ssh ; chown root:root /etc/ssh/alcasar-banner-ssh
[ -e /etc/ssh/sshd_config.default ] || cp /etc/ssh/sshd_config /etc/ssh/sshd_config.default
$SED "s?^Banner.*?Banner /etc/ssh/alcasar-banner-ssh?g" /etc/ssh/sshd_config
$SED "s?^#Banner.*?Banner /etc/ssh/alcasar-banner-ssh?g" /etc/ssh/sshd_config
# sshd écoute côté LAN
$SED "s?^#ListenAddress 0\.0\.0\.0?ListenAddress $PRIVATE_IP?g" /etc/ssh/sshd_config
# sshd n'est pas lancé automatiquement au démarrage
/sbin/chkconfig --del sshd
# Coloration des prompts
[ -e /etc/bashrc.default ] || cp /etc/bashrc /etc/bashrc.default
cp -f $DIR_CONF/bashrc /etc/. ; chmod 644 /etc/bashrc ; chown root:root /etc/bashrc
# Droits d'exécution pour utilisateur apache et sysadmin
[ -e /etc/sudoers.default ] || cp /etc/sudoers /etc/sudoers.default
cp -f $DIR_CONF/sudoers /etc/. ; chmod 440 /etc/sudoers ; chown root:root /etc/sudoers
$SED "s?^Host_Alias.*?Host_Alias LAN_ORG=$PRIVATE_NETWORK_MASK,localhost #réseau de l'organisme?g" /etc/sudoers
# prise en compte de la rotation des logs sur 1 an (concerne mysql, htttpd, dansguardian, squid, radiusd, ulogd)
cp -f $DIR_CONF/logrotate.d/* /etc/logrotate.d/
chmod 644 /etc/logrotate.d/*
# processus lancés par défaut au démarrage
for i in netfs ntpd iptables ulogd squid chilli httpd radiusd mysqld dansguardian named
do
/sbin/chkconfig --add $i
done
# On mets en place la sécurité sur les fichiers
# des modif par rapport à radius update
cat <<EOF > /etc/security/msec/perm.local
/var/log/firewall/ root.apache 750
/var/log/firewall/* root.apache 640
/etc/security/msec/perm.local root.root 640
/etc/security/msec/level.local root.root 640
/etc/freeradius-web root.apache 750
/etc/freeradius-web/admin.conf root.apache 640
/etc/freeradius-web/config.php root.apache 640
/etc/raddb/dictionnary root.radius 640
/etc/raddb/ldap.attrmap root.radius 640
/etc/raddb/hints root.radius 640
/etc/raddb/huntgroups root.radius 640
/etc/raddb/attrs.access_reject root.radius 640
/etc/raddb/attrs.accounting_response root.radius 640
/etc/raddb/acct_users root.radius 640
/etc/raddb/preproxy_users root.radius 640
/etc/raddb/modules/ldap radius.apache 660
/etc/raddb/sites-available/alcasar radius.apache 660
/etc/pki/* root.apache 750
EOF
/usr/sbin/msec
if [ "$mode" = "update" ]
# on charge la conf d'un version précédente
then
$DIR_DEST_BIN/alcasar-conf.sh -load
fi
cd $DIR_INSTALL
echo ""
echo "#############################################################################"
echo "# Fin d'installation d'ALCASAR #"
echo "# #"
echo "# Application Libre pour le Contrôle Authentifié et Sécurisé #"
echo "# des Accès au Réseau ( ALCASAR ) #"
echo "# #"
echo "#############################################################################"
echo
echo "- ALCASAR sera fonctionnel après redémarrage du système"
echo
echo "- Lisez attentivement la documentation d'exploitation"
echo
echo "- L'interface de gestion est consultable à partir de n'importe quel poste"
echo " situé sur le réseau de consultation à l'URL https://$PRIVATE_IP "
echo
echo " Appuyez sur 'Entrée' pour continuer"
read a
clear
reboot
} # End post_install ()
 
#################################
# Boucle principale du script #
#################################
usage="Usage: alcasar.sh -install | -uninstall"
nb_args=$#
args=$1
if [ $nb_args -eq 0 ]
then
nb_args=1
args="-h"
fi
case $args in
-\? | -h* | --h*)
echo "$usage"
exit 0
;;
-install)
header_install
testing
# On teste la présence d'une version déjà installée
header_install
if [ -e $DIR_WEB/VERSION ]
then
echo -n "La version "; echo -n `cat $DIR_WEB/VERSION`; echo " d'ALCASAR est déjà installée";
response=0
PTN='^[oOnN]$'
until [[ $(expr $response : $PTN) -gt 0 ]]
do
echo -n "Voulez-vous effectuer une mise à jour (O/n)? ";
read response
done
if [ "$response" = "o" ] || [ "$response" = "O" ]
then
# On crée le fichier de conf de la version actuelle
chmod u+x $DIR_SCRIPTS/alcasar-conf.sh
$DIR_SCRIPTS/alcasar-conf.sh -create
fi
# On désinstalle la version actuelle
$DIR_DEST_SBIN/alcasar-uninstall.sh
fi
# On teste la version du système
fic=`cat /etc/product.id`
old="$IFS"
IFS=","
set $fic
for i in $*
do
if [ "`echo $i|grep version|cut -d'=' -f1`" == "version" ]
then
version=`echo $i|cut -d"=" -f2`
fi
done
IFS="$old"
if [ ! "$version" = "$MDV_NEEDED" ]
then
echo "Vous devez installer une des versions suivantes de Linux Mandriva ($MDV_NEEDED)"
echo "'/tmp'alcasar-conf.tar.gz' est le fichier de configuration de la version actuelle d'ALCASAR. Récupérez ce fichier et recopiez-le dans le répertoire '/tmp' après installation du nouveau système"
exit 0
fi
if [ -e /tmp/alcasar-conf.tar.gz ]
then
echo "#### Installation avec mise à jour ####"
# On récupère le nom d'organisme à partir de fichier de conf
tar -xvf /tmp/alcasar-conf.tar.gz conf/hostname
ORGANISME=`cat $DIR_CONF/hostname|cut -b 9-`
hostname `cat $DIR_CONF/hostname`
mode="update"
else
mode="install"
fi
for func in init network gestion AC init_db param_radius param_web_radius param_chilli param_squid param_dansguardian firewall param_awstats param_bind cron post_install
do
$func
# echo "*** 'debug' : end of function $func ***"; read a
done
;;
-uninstall)
if [ ! -e $DIR_DEST_SBIN/alcasar-uninstall.sh ]
then
echo "Aucune version d'ALCASAR n'a été trouvée.";
exit 0
fi
response=0
PTN='^[oOnN]$'
until [[ $(expr $response : $PTN) -gt 0 ]]
do
echo -n "Voulez-vous créer le fichier de conf de la version actuelle (0/n)? "
read response
done
if [ "$reponse" = "o" ] || [ "$reponse" = "O" ]
then
$DIR_SCRIPT/alcasar-conf.sh -create
fi
# On désinstalle la version actuelle
$DIR_DEST_SBIN/alcasar-uninstall.sh
;;
*)
echo "Argument inconnu :$1";
echo "$usage"
exit 1
;;
esac
# end of script
Property changes:
Added: svn:eol-style
+LF
\ No newline at end of property
Added: svn:executable
+*
\ No newline at end of property
Added: svn:keywords
+Revision Date
\ No newline at end of property
/readme-1.9.txt
0,0 → 1,19
Alcasar-1.8
 
- Nouvelle Installation : elle s'effectue sur la base du CD double architecture (32b et 64b) de la distribution Linux-mandriva 2010.0 (mandriva-linux-free-dual-2010.iso).
- Mise à jour d'Alcasar V1.7 :
- 1ère méthode (recommandée) : en effectuant un nouvelle installation et en injectant la base d'usagers issue d'une v1.7 (recommandé). Dans ce cas, vous profitez des évolutions liées à la dernière version du système "Linux mandriva 2010". Archivez préalablement tous les fichiers de traces.
- 2ème méthode : directement à partir d'une V1.7 fonctionnelle. Lancez la commande "sh alcasar.sh -update" à partir du répertoire de la nouvelle archive (V1.8). Dans ce cas le système reste une Mandriva 2009.0 (architecture 32b)
 
Par rapport à la V1.7, les évolutions majeures sont les suivantes :
- menu "système" intégrant l'activité réseau, l'inventaire des processus et l'interfaçage LDAP ;
- compatibilité avec les architectures 32b et 64b (détection automatique lors de l'installation de Linux Mandriva 2010) ;
- amélioration de la fonction de mise à jour (possibilité de garder l'ancien certificat serveur, automatisation, etc.) ;
- amélioration de la sécurité (définition aléatoire des mots de passe inter-processus, limitation du champ d'écoute réseau, dispositif anti-usurpation MAC/IP, etc.) ;
- module de filtrage réseau ;
- correction et amélioration de la page d'interception (réactivité) ;
- possibilité de supprimer les usagers à la suppression de leur groupe ;
- gestion des profils d'administration en 3 groupes (admin, manager, backup) ;
- remplacement "hotspotlogin.cgi" par "intercept.php". Traduction en 5 langues. Prise en compte des réponses Radius ;
- simplification des scripts de modification du mot de passe usager (+ traduction 5 langues) ;
- multiples corrections et améliorations des scripts de l'interface de gestion.
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/gpl-3.0.fr.txt
0,0 → 1,879
 
LICENCE PUBLIQUE GÉNÉRALE GNU
Version 3, du 29 juin 2007.
 
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
 
Chacun est autorisé à copier et distribuer des copies conformes de ce
document de licence, mais toute modification en est proscrite.
 
Traduction française par Philippe Verdy
<verdy_p (à) wanadoo (point) fr>, le 30 juin 2007.
 
_______________________________________________________________________
 
Avertissement important au sujet de cette traduction française.
_______________________________________________________________________
 
Ceci est une traduction en français de la licence “GNU General Public
License” (GPL). Cette traduction est fournie ici dans l’espoir qu’elle
facilitera sa compréhension, mais elle ne constitue pas une traduction
officielle ou approuvée d’un point de vue juridique.
 
La Free Software Foundation (FSF) ne publie pas cette traduction et ne
l’a pas approuvée en tant que substitut valide au plan légal pour la
licence authentique “GNU General Public Licence”. Cette traduction n’a
pas encore été passée en revue attentivement par un juriste et donc le
traducteur ne peut garantir avec certitude qu’elle représente avec
exactitude la signification légale des termes de la licence authentique
“GNU General Public License” publiée en anglais. Cette traduction
n’établit donc légalement aucun des termes et conditions d’utilisation
d’un logiciel sous licence GNU GPL — seul le texte original en anglais
le fait. Si vous souhaitez être sûr que les activités que vous projetez
seront autorisées par la GNU General Public License, veuillez vous
référer à sa seule version anglaise authentique.
 
La FSF vous recommande fermement de ne pas utiliser cette traduction en
tant que termes officiels pour vos propres programmes ; veuillez plutôt
utiliser la version anglaise authentique telle que publiée par la FSF.
Si vous choisissez d’acheminer cette traduction en même temps qu’un
Programme sous licence GNU GPL, cela ne vous dispense pas de l’obligation
d’acheminer en même temps une copie de la licence authentique en anglais,
et de conserver dans la traduction cet avertissement important en
français et son équivalent en anglais ci-dessous.
 
_______________________________________________________________________
 
Important Warning About This French Translation.
_______________________________________________________________________
 
This is a translation of the GNU General Public License (GPL) into
French. This translation is distributed in the hope that it will
facilitate understanding, but it is not an official or legally approved
translation.
 
The Free Software Foundation (FSF) is not the publisher of this
translation and has not approved it as a legal substitute for the
authentic GNU General Public License. The translation has not been
reviewed carefully by lawyers, and therefore the translator cannot be
sure that it exactly represents the legal meaning of the authentic GNU
General Public License published in English. This translation does not
legally state the terms and conditions of use of any Program licenced
under GNU GPL — only the original English text of the GNU LGPL does
that. If you wish to be sure whether your planned activities are
permitted by the GNU General Public License, please refer to its sole
authentic English version.
 
The FSF strongly urges you not to use this translation as the official
distribution terms for your programs; instead, please use the authentic
English version published by the FSF. If you choose to convey this
translation along with a Program covered by the GPL Licence, this does
not remove your obligation to convey at the same time a copy of the
authentic GNU GPL License in English, and you must keep in this
translation this important warning in English and its equivalent in
French above.
 
_______________________________________________________________________
 
 
Préambule
 
La Licence Publique Générale GNU (“GNU General Public License”) est une
licence libre, en “copyleft”, destinée aux œuvres logicielles et
d’autres types de travaux.
 
Les licences de la plupart des œuvres logicielles et autres travaux de
pratique sont conçues pour ôter votre liberté de partager et modifier
ces travaux. En contraste, la Licence Publique Générale GNU a pour but
de garantir votre liberté de partager et changer toutes les versions
d’un programme — afin d’assurer qu’il restera libre pour tous les
utilisateurs. Nous, la Free Software Foundation, utilisons la Licence
Publique Générale GNU pour la plupart de nos logiciels ; cela
s’applique aussi à tout autre travail édité de cette façon par ses
auteurs. Vous pouvez, vous aussi, l’appliquer à vos propres programmes.
 
Quand nous parlons de logiciel libre (“free”), nous nous référons à la
liberté (“freedom”), pas au prix. Nos Licences Publiques Générales sont
conçues pour assurer que vous ayez la liberté de distribuer des copies
de logiciel libre (et le facturer si vous le souhaitez), que vous
receviez le code source ou pouviez l’obtenir si vous le voulez, que
vous pouviez modifier le logiciel ou en utiliser toute partie dans de
nouveaux logiciels libres, et que vous sachiez que vous avez le droit
de faire tout ceci.
 
Pour protéger vos droits, nous avons besoin d’empêcher que d’autres
vous restreignent ces droits ou vous demande de leur abandonner ces
droits. En conséquence, vous avez certaines responsabilités si vous
distribuez des copies d’un tel programme ou si vous le modifiez :
les responsabilités de respecter la liberté des autres.
 
Par exemple, si vous distribuez des copies d’un tel programme, que ce
soit gratuit ou contre un paiement, vous devez accorder aux
Destinataires les mêmes libertés que vous avez reçues. Vous devez aussi
vous assurer qu’eux aussi reçoivent ou peuvent recevoir son code
source. Et vous devez leur montrer les termes de cette licence afin
qu’ils connaissent leurs droits.
 
Les développeurs qui utilisent la GPL GNU protègent vos droits en deux
étapes : (1) ils affirment leur droits d’auteur (“copyright”) sur le
logiciel, et (2) vous accordent cette Licence qui vous donne la
permission légale de le copier, le distribuer et/ou le modifier.
 
Pour la protection des développeurs et auteurs, la GPL stipule
clairement qu’il n’y a pas de garantie pour ce logiciel libre. Aux fins
à la fois des utilisateurs et auteurs, la GPL requière que les versions
modifiées soient marquées comme changées, afin que leurs problèmes ne
soient pas attribués de façon erronée aux auteurs des versions
précédentes.
 
Certains dispositifs sont conçus pour empêcher l’accès des utilisateurs
à l’installation ou l’exécution de versions modifiées du logiciel à
l’intérieur de ces dispositifs, alors que les fabricants le peuvent.
Ceci est fondamentalement incompatible avec le but de protéger la
liberté des utilisateurs de modifier le logiciel. L’aspect systématique
de tels abus se produit dans le secteur des produits destinés aux
utilisateurs individuels, ce qui est précidément ce qui est le plus
inacceptable. Aussi, nous avons conçu cette version de la GPL pour
prohiber cette pratique pour ces produits. Si de tels problèmes
surviennent dans d’autres domaines, nous nous tenons prêt à étendre
cette restriction à ces domaines dans de futures versions de la GPL,
autant qu’il sera nécessaire pour protéger la liberté des utilisateurs.
 
Finalement, chaque programme est constamment menacé par les brevets
logiciels. Les États ne devraient pas autoriser de tels brevets à
restreindre le développement et l’utilisation de logiciels libres sur
des ordinateurs d’usage général ; mais dans ceux qui le font, nous
voulons spécialement éviter le danger que les brevets appliqués à un
programme libre puisse le rendre effectivement propriétaire. Pour
empêcher ceci, la GPL assure que les brevets ne peuvent être utilisés
pour rendre le programme non-libre.
 
Les termes précis et conditions concernant la copie, la distribution
et la modification suivent.
 
 
TERMES ET CONDITIONS
 
 
Article 0. Définitions.
 
« Cette Licence » se réfère à la version 3 de la “GNU General Public
License” (le texte original en anglais).
 
« Droit d’Auteur » signifie aussi les droits du “copyright” ou voisins
qui s’appliquent à d’autres types de travaux, tels que ceux sur les
masques de semi-conducteurs.
 
« Le Programme » se réfère à tout travail qui peut être sujet au Droit
d’Auteur (“copyright”) et dont les droits d’utilisation sont concédés
en vertu de cette Licence. Chacun des Licenciés, à qui cette Licence
est concédée, est désigné par « vous. » Les « Licenciés » et les
« Destinataires » peuvent être des personnes physiques ou morales
(individus ou organisations).
 
« Modifier » un travail signifie en obtenir une copie et adapter tout
ou partie du travail d’une façon nécessitant une autorisation d’un
titulaire de Droit d’Auteur, autre que celle permettant d’en produire
une copie conforme. Le travail résultant est appelé une « version
modifiée » du précédent travail, ou un travail « basé sur » le
précédent travail.
 
Un « Travail Couvert » signifie soit le Programme non modifié soit un
travail basé sur le Programme.
 
« Propager » un travail signifie faire quoi que ce soit avec lui qui,
sans permission, vous rendrait directement ou indirectement responsable
d’un délit de contrefaçon suivant les lois relatives au Droit d’Auteur,
à l’exception de son exécution sur un ordinateur ou de la modification
d’une copie privée. La propagation inclue la copie, la distribution
(avec ou sans modification), la mise à disposition envers le public, et
aussi d'autres activités dans certains pays.
 
« Acheminer » un travail signifie tout moyen de propagation de celui-ci
qui permet à d’autres parties de réaliser ou recevoir des copies. La
simple interaction d’un utilisateur à travers un réseau informatique,
sans transfert effectif d’une copie, ne constitue pas un acheminement.
 
Une interface utilisateur interactive affiche des « Notices Légales
Appropriées » quand elle comprend un dispositif convenable, bien
visible et évident qui (1) affiche une notice appropriée sur les droits
d’auteur et (2) informe l’utilisateur qu’il n’y a pas de garantie pour
le travail (sauf si des garanties ont été fournies hors du cadre de
cette Licence), que les licenciés peuvent acheminer le travail sous
cette Licence, et comment voir une copie de cette Licence. Si
l’interface présente une liste de commandes utilisateur ou d’options,
tel qu’un menu, un élément évident dans la liste présentée remplit ce
critère.
 
 
Article 1. Code source.
 
Le « code source » d’un travail signifie la forme préférée du travail
permettant ou facilitant les modifications de celui-ci. Le « code
objet » d’un travail signifie toute forme du travail qui n’en est pas
le code source.
 
Une « Interface Standard » signifie une interface qui est soit celle
d’une norme officielle définie par un organisme de normalisation
reconnu ou, dans le cas des interfaces spécifiées pour un langage de
programmation particulier, une interface largement utilisée parmi les
développeurs travaillant dans ce langage.
 
Les « Bibliothèques Système » d’un travail exécutable incluent tout ce
qui, en dehors du travail dans son ensemble, (a) est inclus dans la
forme usuelle de paquetage d’un Composant Majeur mais ne fait pas
partie de ce Composant Majeur et (b) sert seulement à permettre
l’utilisation du travail avec ce Composant Majeur ou à implémenter une
Interface Standard pour laquelle une implémentation est disponible au
public sous forme de code source ; un « Composant Majeur » signifie,
dans ce contexte, un composant majeur essentiel (noyau, système de
fenêtrage, etc.) du système d’exploitation (le cas échéant) d’un
système sur lequel le travail exécutable fonctionne, ou bien un
compilateur utilisé pour produire le code objet du travail, ou un
interprète de code objet utilisé pour exécuter celui-ci.
 
Le « Source Correspondant » d’un travail sous forme de code objet
signifie l’ensemble des codes sources nécessaires pour générer,
installer et (dans le cas d’un travail exécutable) exécuter le code
objet et modifier le travail, y compris les scripts pour contrôler ces
activités. Cependant, cela n’inclue pas les Bibliothèques Système du
travail, ni les outils d’usage général ou les programmes libres
généralement disponibles qui peuvent être utilisés sans modification
pour achever ces activités mais ne sont pas partie de ce travail. Par
exemple le Source Correspondant inclut les fichiers de définition
d’interfaces associés aux fichiers sources du travail, et le code
source des bibliothèques partagées et des sous-routines liées
dynamiquement, pour lesquelles le travail est spécifiquement conçu pour
les requérir via, par exemple, des communications de données ou
contrôles de flux internes entre ces sous-programmes et d’autres
parties du travail.
 
Le Source Correspondant n’a pas besoin d’inclure tout ce que les
utilisateurs peuvent regénérer automatiquement à partir d’autres
parties du Source Correspondant.
 
Le Source Correspondant pour un travail sous forme de code source est
ce même travail.
 
 
Article 2. Permissions de base.
 
Tous les droits accordés suivant cette Licence le sont jusqu’au terme
des Droits d’Auteur (“copyright”) sur le Programme, et sont
irrévocables pourvu que les conditions établies soient remplies. Cette
Licence affirme explicitement votre permission illimitée d’exécuter le
Programme non modifié. La sortie produite par l’exécution d’un Travail
Couvert n’est couverte par cette Licence que si cette sortie, étant
donné leur contenu, constitue un Travail Couvert. Cette Licence
reconnait vos propres droits d’usage raisonnable (“fair use” en
législation des États-Unis d’Amérique) ou autres équivalents, tels
qu’ils sont pourvus par la loi applicable sur le Droit d’Auteur
(“copyright”).
 
Vous pouvez créer, exécuter et propager sans condition des Travaux
Couverts que vous n’acheminez pas, aussi longtemps que votre licence
demeure en vigueur. Vous pouvez acheminer des Travaux Couverts à
d’autres personnes dans le seul but de leur faire réaliser des
modifications à votre usage exclusif, ou pour qu’ils vous fournissent
des facilités vous permettant d’exécuter ces travaux, pourvu que vous
vous conformiez aux termes de cette Licence lors de l’acheminement de
tout matériel dont vous ne contrôlez pas le Droit d’Auteur
(“copyright”). Ceux qui, dès lors, réalisent ou exécutent pour vous les
Travaux Couverts ne doivent alors le faire qu’exclusivement pour votre
propre compte, sous votre direction et votre contrôle, suivant des
termes qui leur interdisent de réaliser, en dehors de leurs relations
avec vous, toute copie de votre matériel soumis au Droit d’Auteur.
 
L’acheminement dans toutes les autres circonstances n’est permis que
selon les conditions établies ci-dessous. La concession de
sous-licences n’est pas autorisé ; l’article 10 rend cet usage non
nécessaire.
 
 
Article 3. Protection des droits légaux des utilisateurs envers les
lois anti-contournement.
 
Aucun Travail Couvert ne doit être vu comme faisant partie d’une mesure
technologique effective selon toute loi applicable remplissant les
obligations prévues à l’article 11 du traité international sur le droit
d’auteur adopté à l’OMPI le 20 décembre 1996, ou toutes lois similaires
qui prohibent ou restreignent le contournement de telles mesures.
 
Si vous acheminez un Travail Couvert, vous renoncez à tout pouvoir légal
d’interdire le contournement des mesures technologiques dans tous les
cas où un tel contournement serait effectué en exerçant les droits
prévus dans cette Licence pour ce Travail Couvert, et vous déclarez
rejeter toute intention de limiter l’opération ou la modification du
Travail, en tant que moyens de renforcer, à l’encontre des utilisateurs
de ce Travail, vos droits légaux ou ceux de tierces parties d’interdire
le contournement des mesures technologiques.
 
 
Article 4. Acheminement des copies conformes.
 
Vous pouvez acheminer des copies conformes du code source du Programme
tel que vous l’avez reçu, sur n’importe quel support, pourvu que vous
publiiez scrupuleusement et de façon appropriée sur chaque copie une
notice de Droit d’Auteur appropriée ; gardez intactes toutes les
notices établissant que cette Licence et tous les termes additionnels non
permissifs ajoutés en accord avec l’article 7 s’appliquent à ce code ;
et donnez à chacun des Destinataires une copie de cette Licence en même
temps que le Programme.
 
Vous pouvez facturer à un prix quelconque, y compris gratuit, chacune
des copies que vous acheminez, et vous pouvez offrir une protection
additionnelle de support ou de garantie en échange d’un paiement.
 
 
Article 5. Acheminement des versions sources modifiées.
 
Vous pouvez acheminer un travail basé sur le Programme, ou bien les
modifications pour le produire à partir du Programme, sous la forme de
code source suivant les termes de l’article 4, pourvu que vous
satisfassiez aussi à chacune des conditions requises suivantes :
 
a) Le travail doit comporter des notices évidentes établissant que
vous l’avez modifié et donnant la date correspondante.
 
b) Le travail doit comporter des notices évidentes établissant qu’il
est édité selon cette Licence et les conditions ajoutées d’après
l’article 7. Cette obligation vient modifier l’obligation de
l’article 4 de « garder intactes toutes les notices. »
 
c) Vous devez licencier le travail entier, comme un tout, suivant
cette Licence à quiconque entre en possession d’une copie. Cette
Licence s’appliquera en conséquence, avec les termes additionnels
applicables prévus par l’article 7, à la totalité du travail et
chacune de ses parties, indépendamment de la façon dont ils sont
empaquetés. Cette licence ne donne aucune permission de licencier
le travail d’une autre façon, mais elle n’invalide pas une telle
permission si vous l’avez reçue séparément.
 
d) Si le travail a des interfaces utilisateurs interactives, chacune
doit afficher les Notices Légales Appropriées ; cependant si le
Programme a des interfaces qui n’affichent pas les Notices Légales
Appropriées, votre travail n’a pas à les modifier pour qu’elles
les affichent.
 
Une compilation d’un Travail Couvert avec d’autres travaux séparés et
indépendants, qui ne sont pas par leur nature des extensions du Travail
Couvert, et qui ne sont pas combinés avec lui de façon à former un
programme plus large, dans ou sur un volume de stockage ou un support
de distribution, est appelé un « aggrégat » si la compilation et son
Droit d’Auteur résultant ne sont pas utilisés pour limiter l’accès ou
les droits légaux des utilisateurs de la compilation en deça de ce que
permettent les travaux individuels. L’inclusion d’un Travail Couvert
dans un aggrégat ne cause pas l’application de cette Licence aux
autres parties de l’aggrégat.
 
 
Article 6. Acheminement des formes non sources.
 
Vous pouvez acheminer sous forme de code objet un Travail Couvert
suivant les termes des articles 4 et 5, pourvu que vous acheminiez
également suivant les termes de cette Licence le Source Correspondant
lisible par une machine, d’une des façons suivantes :
 
a) Acheminer le code objet sur, ou inclus dans, un produit physique
(y compris un support de distribution physique), accompagné par le
Source Correspondant fixé sur un support physique durable
habituellement utilisé pour les échanges de logiciels.
 
b) Acheminer le code objet sur, ou inclus dans, un produit physique
(y compris un support de distribution physique), accompagné d’une
offre écrite, valide pour au moins trois années et valide pour
aussi longtemps que vous fournissez des pièces de rechange ou un
support client pour ce modèle de produit, afin de donner à
quiconque possède le code objet soit (1) une copie du Source
Correspondant à tout logiciel dans ce produit qui est couvert par
cette Licence, sur un support physique durable habituellement
utilisé pour les échanges de logiciels, pour un prix non supérieur
au coût raisonnable de la réalisation physique de l’acheminement
de la source, ou soit (2) un accès permettant de copier le Source
Correspondant depuis un serveur réseau sans frais.
 
c) Acheminer des copies individuelles du code objet avec une copie de
l’offre écrite de fournir le Source Correspondant. Cette
alternative est permise seulement occasionellement et non
commercialement, et seulement si vous avez reçu le code objet avec
une telle offre, en accord avec l’article 6 alinéa b.
 
d) Acheminer le code objet en offrant un accès depuis un emplacement
désigné (gratuit ou contre facturation) et offrir un accès
équivalent au Source Correspondant de la même façon via le même
emplacement et sans facturation supplémentaire. Vous n’avez pas
besoin d’obliger les Destinataires à copier le Source
Correspondant en même temps que le code objet. Si l’emplacement
pour copier le code objet est un serveur réseau, le Source
Correspondant peut être sur un serveur différent (opéré par vous
ou par un tiers) qui supporte des facilités équivalentes de
copie, pourvu que vous mainteniez des directions claires à
proximité du code objet indiquant où trouver le Source
Correspondant. Indépendamment de quel serveur héberge le Source
Correspondant, vous restez obligé de vous assurer qu’il reste
disponible aussi longtemps que nécessaire pour satisfaire à ces
obligations.
 
e) Acheminer le code objet en utilisant une transmission
d’égal-à-égal, pourvu que vous informiez les autres participants
sur où le code objet et le Source Correspondant du travail sont
offerts sans frais au public général suivant l’article 6 alinéa d.
Une portion séparable du code objet, dont le code source est exclu
du Source Correspondant en tant que Bibliothèque Système, n’a pas
besoin d’être inclu dans l’acheminement du travail sous forme de
code objet.
 
Un « Produit Utilisateur » est soit (1) un « Produit de Consommation, »
ce qui signifie toute propriété personnelle tangible normalement
utilisée à des fins personnelles, familiales ou relatives au foyer,
soit (2) toute chose conçue ou vendue pour l’incorporation dans un lieu
d’habitation. Pour déterminer si un produit constitue un Produit de
Consommation, les cas ambigus sont résolus en fonction de la
couverture. Pour un produit particulier reçu par un utilisateur
particulier, l’expression « normalement utilisée » ci-avant se réfère
à une utilisation typique ou l’usage commun de produits de même
catégorie, indépendamment du statut de cet utilisateur particulier ou
de la façon spécifique dont cet utilisateur particulier utilise
effectivement ou s’attend lui-même ou est attendu à utiliser ce
produit. Un produit est un Produit de Consommation indépendamment du
fait que ce produit a ou n’a pas d’utilisations substantielles
commerciales, industrielles ou hors Consommation, à moins que de telles
utilisations représentent le seul mode significatif d’utilisation du
produit.
 
Les « Informations d’Installation » d’un Produit Utilisateur signifient
toutes les méthodes, procédures, clés d’autorisation ou autres
informations requises pour installer et exécuter des versions modifiées
d’un Travail Couvert dans ce Produit Utilisateur à partir d’une version
modifiée de son Source Correspondant. Les informations qui suffisent à
assurer la continuité de fonctionnement du code objet modifié ne
doivent en aucun cas être empêchées ou interférées du seul fait qu’une
modification a été effectuée.
 
Si vous acheminez le code objet d’un Travail Couvert dans, ou avec, ou
spécifiquement pour l’utilisation dans, un Produit Utilisateur et
l’acheminement se produit en tant qu’élément d’une transaction dans
laquelle le droit de possession et d’utilisation du Produit
Utilisateur est transféré au Destinataire définitivement ou pour un
terme fixé (indépendamment de la façon dont la transaction est
caractérisée), le Source Correspondant acheminé selon cet article-ci
doit être accompagné des Informations d’Installation. Mais cette
obligation ne s’applique pas si ni vous ni aucune tierce partie ne
détient la possibilité d’intaller un code objet modifié sur le Produit
Utilisateur (par exemple, le travail a été installé en mémoire morte).
 
L’obligation de fournir les Informations d’Installation n’inclue pas
celle de continuer à fournir un service de support, une garantie ou des
mises à jour pour un travail qui a été modifié ou installé par le
Destinataire, ou pour le Produit Utilisateur dans lequel il a été
modifié ou installé. L’accès à un réseau peut être rejeté quand la
modification elle-même affecte matériellement et défavorablement les
opérations du réseau ou viole les règles et protocoles de communication
au travers du réseau.
 
Le Source Correspondant acheminé et les Informations d’Installation
fournies, en accord avec cet article, doivent être dans un format
publiquement documenté (et dont une implémentation est disponible
auprès du public sous forme de code source) et ne doit nécessiter
aucune clé ou mot de passe spécial pour le dépaquetage, la lecture ou
la copie.
 
 
Article 7. Termes additionnels.
 
Les « permissions additionelles » désignent les termes qui
supplémentent ceux de cette Licence en émettant des exceptions à l’une
ou plusieurs de ses conditions. Les permissions additionnelles qui
sont applicables au Programme entier doivent être traitées comme si
elles étaient incluent dans cette Licence, dans les limites de leur
validité suivant la loi applicable. Si des permissions additionnelles
s’appliquent seulement à une partie du Programme, cette partie peut
être utilisée séparément suivant ces permissions, mais le Programme
tout entier reste gouverné par cette Licence sans regard aux
permissions additionelles.
 
Quand vous acheminez une copie d’un Travail Couvert, vous pouvez à
votre convenance ôter toute permission additionelle de cette copie, ou
de n’importe quelle partie de celui-ci. (Des permissions
additionnelles peuvent être rédigées de façon à requérir leur propre
suppression dans certains cas où vous modifiez le travail.) Vous
pouvez placer les permissions additionnelles sur le matériel acheminé,
ajoutées par vous à un Travail Couvert pour lequel vous avez ou pouvez
donner les permissions de Droit d’Auteur (“copyright”) appropriées.
 
Nonobstant toute autre clause de cette Licence, pour tout constituant
que vous ajoutez à un Travail Couvert, vous pouvez (si autorisé par les
titulaires de Droit d’Auteur pour ce constituant) supplémenter les
termes de cette Licence avec des termes :
 
a) qui rejettent la garantie ou limitent la responsabilité de façon
différente des termes des articles 15 et 16 de cette Licence ; ou
 
b) qui requièrent la préservation de notices légales raisonnables
spécifiées ou les attributions d’auteur dans ce constituant ou
dans les Notices Légales Appropriées affichées par les travaux qui
le contiennent ; ou
 
c) qui prohibent la représentation incorrecte de l’origine de ce
constituant, ou qui requièrent que les versions modifiées d’un tel
constituant soit marquées par des moyens raisonnables comme
différentes de la version originale ; ou
 
d) qui limitent l’usage à but publicitaire des noms des concédants de
licence et des auteurs du constituant ; ou
 
e) qui refusent à accorder des droits selon la législation relative
aux marques commerciales, pour l’utilisation dans des noms
commerciaux, marques commerciales ou marques de services ; ou
 
f) qui requièrent l’indemnisation des concédants de licences et
auteurs du constituant par quiconque achemine ce constituant (ou
des versions modifiées de celui-ci) en assumant contractuellement
la responsabilité envers le Destinataire, pour toute
responsabilité que ces engagements contractuels imposent
directement à ces octroyants de licences et auteurs.
 
Tous les autres termes additionnels non permissifs sont considérés
comme des « restrictions avancées » dans le sens de l’article 10. Si le
Programme tel que vous l’avez reçu, ou toute partie de celui-ci,
contient une notice établissant qu’il est gouverné par cette Licence en
même temps qu’un terme qui est une restriction avancée, vous pouvez
ôter ce terme. Si un document de licence contient une restriction
avancée mais permet la reconcession de licence ou l’acheminement
suivant cette Licence, vous pouvez ajouter un Travail Couvert
constituant gouverné par les termes de ce document de licence, pourvu
que la restriction avancée ne survit pas à un telle cession de licence
ou acheminement.
 
Si vous ajoutez des termes à un Travail Couvert en accord avec cet
article, vous devez placer, dans les fichiers sources appropriés, une
déclaration des termes additionnels qui s’appliquent à ces fichiers, ou
une notice indiquant où trouver les termes applicables.
 
Les termes additionnels, qu’ils soient permissifs ou non permissifs,
peuvent être établis sous la forme d’une licence écrite séparément, ou
établis comme des exceptions ; les obligations ci-dessus s’appliquent
dans chacun de ces cas.
 
 
Article 8. Terminaison.
 
Vous ne pouvez ni propager ni modifier un Travail Couvert autrement que
suivant les termes de cette Licence. Toute autre tentative de le
propager ou le modifier est nulle et terminera automatiquement vos
droits selon cette Licence (y compris toute licence de brevet accordée
selon le troisième paragraphe de l’article 11).
 
Cependant, si vous cessez toute violation de cette Licence, alors votre
licence depuis un titulaire de Droit d’Auteur (“copyright”) est
réinstaurée (a) à titre provisoire à moins que et jusqu’à ce que le
titulaire de Droit d’Auteur termine finalement et explicitement votre
licence, et (b) de façon permanente si le titulaire de Droit d’Auteur
ne parvient pas à vous notifier de la violation par quelque moyen
raisonnable dans les soixante (60) jours après la cessation.
 
De plus, votre licence depuis un titulaire particulier de Droit
d’Auteur est réinstaurée de façon permanente si ce titulaire vous
notifie de la violation par quelque moyen raisonnable, c’est la
première fois que vous avez reçu une notification deviolation de cette
Licence (pour un travail quelconque) depuis ce titulaire de Droit
d’Auteur, et vous résolvez la violation dans les trente (30) jours qui
suivent votre réception de la notification.
 
La terminaison de vos droits suivant cette section ne terminera pas les
licences des parties qui ont reçu des copies ou droits de votre part
suivant cette Licence. Si vos droits ont été terminés et non
réinstaurés de façon permanente, vous n’êtes plus qualifié à recevoir
de nouvelles licences pour les mêmes constituants selon l’article 10.
 
 
Article 9. Acceptation non requise pour obtenir des copies.
 
Vous n’êtes pas obligé d’accepter cette licence afin de recevoir ou
exécuter une copie du Programme. La propagation asservie d’un Travail
Couvert qui se produit simplement en conséquence d’une transmission
d’égal-à-égal pour recevoir une copie ne nécessite pas l’acceptation.
Cependant, rien d’autre que cette Licence ne vous accorde la
permission de propager ou modifier un quelconque Travail Couvert. Ces
actions enfreignent le Droit d’Auteur si vous n’acceptez pas cette
Licence. Par conséquent, en modifiant ou propageant un Travail Couvert,
vous indiquez votre acceptation de cette Licence pour agir ainsi.
 
 
Article 10. Cession automatique de Licence aux Destinataires et
intermédiaires.
 
Chaque fois que vous acheminez un Travail Couvert, le Destinataire
reçoit automatiquement une licence depuis les concédants originaux,
pour exécuter, modifier et propager ce travail, suivant les termes de
cette Licence. Vous n’êtes pas responsable du renforcement de la
conformation des tierces parties avec cette Licence.
 
Une « transaction d’entité » désigne une transaction qui transfère le
contrôle d’une organisation, ou de substantiellement tous ses actifs,
ou la subdivision d’une organisation, ou la fusion de plusieurs
organisations. Si la propagation d’un Travail Couvert résulte d’une
transaction d’entité, chaque partie à cette transaction qui reçoit une
copie du travail reçoit aussi les licences pour le travail que le
prédécesseur intéressé à cette partie avait ou pourrait donner selon le
paragraphe précédent, plus un droit de possession du Source
Correspondant de ce travail depuis le prédécesseur intéressé si ce
prédécesseur en dispose ou peut l’obtenir par des efforts raisonnables.
 
Vous ne pouvez imposer aucune restriction avancée dans l’exercice des
droits accordés ou affirmés selon cette Licence. Par exemple, vous ne
pouvez imposer aucun paiement pour la licence, aucune royaltie, ni
aucune autre charge pour l’exercice des droits accordés selon cette
Licence ; et vous ne pouvez amorcer aucun litige judiciaire (y compris
une réclamation croisée ou contre-réclamation dans un procès) sur
l’allégation qu’une revendication de brevet est enfreinte par la
réalisation, l’utilisation, la vente, l’offre de vente, ou
l’importation du Programme ou d’une quelconque portion de celui-ci.
 
 
Article 11. Brevets.
 
Un « contributeur » est un titulaire de Droit d’Auteur (“copyright”)
qui autorise l’utilisation selon cette Licence du Programme ou du
travail sur lequel le Programme est basé. Le travail ainsi soumis à
licence est appelé la « version contributive » de ce contributeur.
 
Les « revendications de brevet essentielles » sont toutes les
revendications de brevets détenues ou contrôlées par le contributeur,
qu’elles soient déjà acquises par lui ou acquises subséquemment, qui
pourraient être enfreintes de quelque manière, permises par cette
Licence, sur la réalisation, l’utilisation ou la vente de la version
contributive de celui-ci. Aux fins de cette définition, le « contrôle »
inclue le droit de concéder des sous-licences de brevets d’une manière
consistante, nécessaire et suffisante, avec les obligations de cette
Licence.
 
Chaque contributeur vous accorde une licence de brevet non exclusive,
mondiale et libre de toute royaltie, selon les revendications de brevet
essentielles, pour réaliser, utiliser, vendre, offrir à la vente,
importer et autrement exécuter, modifier et propager les contenus de sa
version contributive.
 
Dans les trois paragraphes suivants, une « licence de brevet » désigne
tous les accords ou engagements exprimés, quel que soit le nom que vous
lui donnez, de ne pas mettre en vigueur un brevet (telle qu’une
permission explicite pour mettre en pratique un brevet, ou un accord
pour ne pas poursuivre un Destinataire pour cause de violation de
brevet). « Accorder » une telle licence de brevet à une partie signifie
conclure un tel accord ou engagement à ne pas faire appliquer le brevet
à cette partie.
 
Si vous acheminez un Travail Couvert, dépendant en connaissance d’une
licence de brevet, et si le Source Correspondant du travail n’est pas
disponible à quiconque copie, sans frais et suivant les termes de cette
Licence, à travers un serveur réseau publiquement acessible ou tout
autre moyen immédiatement accessible, alors vous devez soit (1) rendre
la Source Correspondante ainsi disponible, soit (2) vous engager à vous
priver pour vous-même du bénéfice de la licence de brevet pour ce
travail particulier, soit (3) vous engager, d’une façon consistante
avec les obligations de cette Licence, à étendre la licence de brevet
aux Destinataires de ce travail. « Dépendant en connaissance » signifie
que vous avez effectivement connaissance que, selon la licence de
brevet, votre acheminement du Travail Couvert dans un pays, ou
l’utilisation du Travail Couvert par votre Destinataire dans un pays,
infreindrait un ou plusieurs brevets identifiables dans ce pays où vous
avez des raisons de penser qu’ils sont valides.
 
Si, conformément à ou en liaison avec une même transaction ou un même
arrangement, vous acheminez, ou propagez en procurant un acheminement
de, un Travail Couvert et accordez une licence de brevet à l’une des
parties recevant le Travail Couvert pour lui permettre d’utiliser,
propager, modifier ou acheminer une copie spécifique du Travail
Couvert, alors votre accord est automatiquement étendu à tous les
Destinataires du Travail Couvert et des travaux basés sur celui-ci.
 
Une licence de brevet est « discriminatoire » si, dans le champ de sa
couverture, elle n’inclut pas un ou plusieurs des droits qui sont
spécifiquement accordés selon cette Licence, ou en prohibe l’exercice,
ou est conditionnée par le non-exercice d’un ou plusieurs de ces
droits. Vous ne pouvez pas acheminer un Travail Couvert si vous êtes
partie à un arrangement selon lequel une partie tierce exerçant son
activité dans la distribution de logiciels et à laquelle vous effectuez
un paiement fondé sur l’étendue de votre activité d’acheminement du
travail, et selon lequel la partie tierce accorde, à une quelconque
partie qui recevrait depuis vous le Travail Couvert, une licence de
brevet discriminatoire (a) en relation avec les copies du Travail
Couvert acheminées par vous (ou les copies réalisées à partir de ces
copies), ou (b) avant tout destinée et en relation avec des produits
spécifiques ou compilations contenant le Travail Couvert, à moins que
vous ayez conclu cet arrangement ou que la licence de brevet ait été
accordée avant le 28 mars 2007.
 
Rien dans cette Licence ne devrait être interprété comme devant exclure
ou limiter toute licence implicite ou d’autres moyens de défense à une
infraction qui vous seraient autrement disponible selon la loi
applicable relative aux brevets.
 
 
Article 12. Non abandon de la liberté des autres.
 
Si des conditions vous sont imposées (que ce soit par décision
judiciaire, par un accord ou autrement) qui contredisent les conditions
de cette Licence, elles ne vous excusent pas des conditions de cette
Licence. Si vous ne pouvez pas acheminer un Travail Couvert de façon à
satisfaire simulténément vos obligations suivant cette Licence et
toutes autres obligations pertinentes, alors en conséquence vous ne
pouvez pas du tout l’acheminer. Par exemple, si vous avez un accord sur
des termes qui vous obligent à collecter pour le réacheminement des
royalties depuis ceux à qui vous acheminez le Programme, la seule façon
qui puisse vous permettre de satisfaire à la fois à ces termes et ceux
de cette Licence sera de vous abstenir entièrement d’acheminer le
Programme.
 
 
Article 13. Utilisation avec la Licence Générale Publique Affero GNU.
 
Nonobstant toute autre clause de cette Licence, vous avez la permission
de lier ou combiner tout Travail Couvert avec un travail placé sous la
version 3 de la Licence Générale Publique GNU Affero (“GNU Affero
General Public License”) en un seul travail combiné, et d’acheminer le
travail résultant. Les termes de cette Licence continueront à
s’appliquer à la partie formant un Travail Couvert, mais les
obligations spéciales de la Licence Générale Publique GNU Affero,
article 13, concernant l’interaction à travers un réseau s’appliqueront
à la combinaison en tant que telle.
 
 
Article 14. Versions révisées de cette License.
 
La Free Software Foundation peut publier des versions révisées et/ou
nouvelles de la Licence Publique Générale GNU (“GNU General Public
License”) de temps en temps. De telles version nouvelles resteront
similaires dans l’esprit avec la présente version, mais peuvent
différer dans le détail afin de traiter de nouveaux problèmes ou
préoccupations.
 
Chaque version reçoit un numéro de version distinctif. Si le Programme
indique qu’une version spécifique de la Licence Publique Générale GNU
« ou toute version ultérieure » (“or any later version”) s’applique à
celui-ci, vous avez le choix de suivre soit les termes et conditions de
cette version numérotée, soit ceux de n’importe quelle version publiée
ultérieurement par la Free Software Foundation. Si le Programme
n’indique pas une version spécifique de la Licence Publique Générale
GNU, vous pouvez choisir l’une quelconque des versions qui ont été
publiées par la Free Software Foundation.
 
Si le Programme spécifie qu’un intermédiaire peut décider quelles
versions futures de la Licence Générale Publique GNU peut être
utilisée, la déclaration publique d’acceptation d’une version par cet
intermédiaire vous autorise à choisir cette version pour le Programme.
 
Des versions ultérieures de la licence peuvent vous donner des
permissions additionelles ou différentes. Cependant aucune obligation
additionelle n’est imposée à l’un des auteurs ou titulaires de Droit
d’Auteur du fait de votre choix de suivre une version ultérieure.
 
 
Article 15. Déclaration d’absence de garantie.
 
IL N’Y A AUCUNE GARANTIE POUR LE PROGRAMME, DANS LES LIMITES PERMISES
PAR LA LOI APPLICABLE. À MOINS QUE CELA NE SOIT ÉTABLI DIFFÉREMMENT PAR
ÉCRIT, LES PROPRIÉTAIRES DE DROITS ET/OU LES AUTRES PARTIES FOURNISSENT
LE PROGRAMME « EN L’ÉTAT » SANS GARANTIE D’AUCUNE SORTE, QU’ELLE SOIT
EXPRIMÉE OU IMPLICITE, CECI COMPRENANT, SANS SE LIMITER À CELLES-CI,
LES GARANTIES IMPLICITES DE COMMERCIALISABILITÉ ET D’ADÉQUATION À UN
OBJECTIF PARTICULIER. VOUS ASSUMEZ LE RISQUE ENTIER CONCERNANT LA
QUALITÉ ET LES PERFORMANCES DU PROGRAMME. DANS L’ÉVENTUALITÉ OÙ LE
PROGRAMME S’AVÉRERAIT DÉFECTUEUX, VOUS ASSUMEZ LES COÛTS DE TOUS LES
SERVICES, RÉPARATIONS OU CORRECTIONS NÉCESSAIRES.
 
 
Article 16. Limitation de responsabilité.
 
EN AUCUNE AUTRE CIRCONSTANCE QUE CELLES REQUISES PAR LA LOI APPLICABLE
OU ACCORDÉES PAR ÉCRIT, UN TITULAIRE DE DROITS SUR LE PROGRAMME, OU
TOUT AUTRE PARTIE QUI MODIFIE OU ACHEMINE LE PROGRAMME COMME PERMIS
CI-DESSUS, NE PEUT ÊTRE TENU POUR RESPONSABLE ENVERS VOUS POUR LES
DOMMAGES, INCLUANT TOUT DOMMAGE GÉNÉRAL, SPÉCIAL, ACCIDENTEL OU INDUIT
SURVENANT PAR SUITE DE L’UTILISATION OU DE L’INCAPACITÉ D’UTILISER LE
PROGRAMME (Y COMPRIS, SANS SE LIMITER À CELLES-CI, LA PERTE DE DONNÉES
OU L’INEXACTITUDE DES DONNÉES RETOURNÉES OU LES PERTES SUBIES PAR VOUS
OU DES PARTIES TIERCES OU L’INCAPACITÉ DU PROGRAMME À FONCTIONNER AVEC
TOUT AUTRE PROGRAMME), MÊME SI UN TEL TITULAIRE OU TOUTE AUTRE PARTIE
A ÉTÉ AVISÉ DE LA POSSIBILITÉ DE TELS DOMMAGES.
 
 
Article 17. Interprétation des sections 15 et 16.
 
Si la déclaration d’absence de garantie et la limitation de
responsabilité fournies ci-dessus ne peuvent prendre effet localement
selon leurs termes, les cours de justice qui les examinent doivent
appliquer la législation locale qui approche au plus près possible une
levée absolue de toute responsabilité civile liée au Programme, à moins
qu’une garantie ou assumation de responsabilité accompagne une copie du
Programme en échange d’un paiement.
 
 
FIN DES TERMES ET CONDITIONS.
 
_______________________________________________________________________
 
 
Comment appliquer ces termes à vos nouveaux programmes
 
Si vous développez un nouveau programme et voulez qu’il soit le plus
possible utilisable par le public, la meilleure façon d’y parvenir et
d’en faire un logiciel libre que chacun peut redistribuer et changer
suivant ces termes-ci.
 
Pour appliquer ces termes, attachez les notices suivantes au programme.
Il est plus sûr de les attacher au début de chacun des fichiers sources
afin de transporter de façon la plus effective possible l’exclusion de
garantie ; et chaque fichier devrait comporter au moins la ligne de
réservation de droit (“copyright”) et une indication permettant de savoir
où la notice complète peut être trouvée :
 
<une ligne donnant le nom du programme et une brève idée de ce qu’il fait.>
Copyright (C) <année> <nom de l’auteur> — Tous droits réservés.
Ce programme est un logiciel libre ; vous pouvez le redistribuer ou le
modifier suivant les termes de la “GNU General Public License” telle que
publiée par la Free Software Foundation : soit la version 3 de cette
licence, soit (à votre gré) toute version ultérieure.
Ce programme est distribué dans l’espoir qu’il vous sera utile, mais SANS
AUCUNE GARANTIE : sans même la garantie implicite de COMMERCIALISABILITÉ
ni d’ADÉQUATION À UN OBJECTIF PARTICULIER. Consultez la Licence Générale
Publique GNU pour plus de détails.
Vous devriez avoir reçu une copie de la Licence Générale Publique GNU avec
ce programme ; si ce n’est pas le cas, consultez :
<http://www.gnu.org/licenses/>.
 
Ajoutez également les informations permettant de vous contacter par
courrier électronique ou postal.
 
Si le programme produit une interaction sur un terminal, faites lui
afficher une courte notice comme celle-ci lors de son démarrage en mode
interactif :
 
<programme> Copyright (C) <année> <nom de l’auteur>
Ce programme vient SANS ABSOLUMENT AUCUNE GARANTIE ; taper “affiche g” pour
les détails. Ceci est un logiciel libre et vous êtes invité à le redistribuer
suivant certaines conditions ; taper “affiche c” pour les détails.
 
Les commandes hypothétiques “affiche g” and “affiche c” devrait
afficher les parties appropriées de la Licence Générale Publique. Bien
sûr, les commandes de votre programme peuvent être différentes ; pour
une interface graphique, vous pourriez utiliser une « boîte À propos. »
 
Vous devriez également obtenir de votre employeur (si vous travaillez
en tant que programmeur) ou de votre école un « renoncement aux droits
de propriété » pour ce programme, si nécessaire. Pour plus
d’informations à ce sujet, et comment appliquer la GPL GNU, consultez
<http://www.gnu.org/licenses/>.
 
La Licence Générale Publique GNU ne permet pas d’incorporer votre
programme dans des programmes propriétaires. Si votre programme est une
bibliothèque de sous-routines, vous pourriez considérer qu’il serait
plus utile de permettre de lier des applications propriétaires avec la
bibliothèque. Si c’est ce que vous voulez faire, utilisez la Licence
Générale Publique Limitée GNU au lieu de cette Licence ; mais d’abord,
veuillez lire <http://www.gnu.org/philosophy/why-not-lgpl.html>.
 
_______________________________________________________________________
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/TODO
0,0 → 1,25
# TODO :
#
# * Coeur :
# o prise en compte du mode multi-sites. Ce mode permettra de n'installer qu'un seul portail Alcasar sur une emprise géographique possédant plusieurs organismes (et donc plusieurs responsables RSSI/OSSI) ;
# o associer l'authentification des usagers avec le contrôle d'accès au média (WIFI et filaire) -> 802.1x ;
# o installation d'Alcasar et du système hôte (Linux Mandriva) à partir d'un seul CD bootable ;
# o sécuriser GRUB à la fin de l'installation (mdp du 1er compte d'administration par exemple) ;
# o Implémenter AJAX (exploitant JSON "JavaScript Object Notation") dans l'interface usager (fenêtre d'authentif et/ou de status)
# o version anglaise et pseudo-graphique (C-DIALOG) du script d'installation ;
# o Coupler le proxy à un contrôle antiviral (HAVP par exemple) ;
# o intégrer un serveur de noms de domaine (DNS) local.
#
# * Centre de gestion WEB :
# o créer un module dynamique de gestion des domaines filtrés par la BlackList ;
# o activer le contrôle de contenu des pages WEB ;
# o activer la gestion des Whitelists par protocole (couplé au serveur DNS local);
# o affichage de la "famille" blacklisté dans la page d'interception DansGuardian ;
# o Finaliser l'internationnaliser le centre (version anglaise uniquement) ;
# o produire un fichier "OpenDocument" pour chaque usager ou groupe d'usagers ;
# o prise en compte des limites de téléchargement par usager (ChilliSpot-Max-Input-Octets", "ChilliSpot-Max-Output-Octets" et "ChilliSpot-Max-Total-Octets" (cf. http://coova.org/wiki/index.php/CoovaChilli/RADIUS) ;
# o permettre la suppression des fichiers journaux.
# o affichage des dix dernieres connexions enregistrées (permet de tester l'activité d'accounting)
# o Indicateur de disponibilité d'une nouvelle version d'ALCASAR
# o Gérer l'interdiction réseaux (parefeu) d'@IP-FQDN blacklistés
 
/VERSION
0,0 → 1,0
1.9a
/conf/VERSION-BL
0,0 → 1,0
Univ-tlse du 17 décembre 2009 - 23h00
/conf/chilli-init
0,0 → 1,97
#!/bin/sh
#
# chilli CoovaChilli init
#
# chkconfig: 2345 65 35
# description: CoovaChilli
 
# Source function library.
. /etc/rc.d/init.d/functions
 
. /etc/sysconfig/network
 
[ ${NETWORKING} = "no" ] && exit 0
 
[ -f /usr/sbin/chilli ] || exit 0
[ -f /etc/chilli.conf ] || exit 0
 
. /etc/chilli/functions
 
check_required
 
RETVAL=0
prog="chilli"
 
case $1 in
start)
echo -n $"Starting $prog: "
/sbin/modprobe tun >/dev/null 2>&1
echo 1 > /proc/sys/net/ipv4/ip_forward
 
writeconfig
radiusconfig
 
# (crontab -l 2>&- | grep -v $0
# test ${HS_ADMINTERVAL:-0} -gt 0 && echo "*/$HS_ADMINTERVAL * * * * $0 radconfig"
# echo "*/10 * * * * $0 checkrunning"
# echo "*/2 * * * * $0 arping"
# ) | crontab - 2>&-
 
# ifconfig $HS_LANIF 0.0.0.0
daemon /usr/sbin/chilli
RETVAL=$?
 
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/chilli
echo
;;
 
checkrunning)
[ -e $LKFILE -a ! -e $PIDFILE ] && $0 start
;;
 
radconfig)
[ -e $MAIN_CONF ] || writeconfig
radiusconfig
;;
 
reload)
killall -HUP chilli
;;
 
restart)
$0 stop
$0 start
RETVAL=$?
;;
 
stop)
echo -n $"Shutting down $prog: "
 
crontab -l 2>&- | grep -v $0 | crontab -
killproc chilli
[ -f /var/run/chilli.pid ] && {
kill $(cat /var/run/chilli.pid)
RETVAL=$
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/chilli /var/run/chilli.pid
}
echo
;;
 
condrestart)
if [ -f /var/lock/subsys/chilli ] ; then
$0 restart
RETVAL=$?
fi
;;
 
status)
status chilli
RETVAL=$?
;;
 
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status|reload|radconfig}"
exit 1
esac
 
exit $?
/conf/template-fr.html
0,0 → 1,324
<html>
 
<head>
<title>DansGuardian - Access Denied</title>
</head>
 
<body bgcolor=#FFFFFF>
 
<center>
<table border=0 cellspacing=0 cellpadding=2 height=540 width=700>
<tr>
<td colspan=2 bgcolor=#FEA700 height=100 align=center>
<font face=arial,helvetica size=6>
<b>Acc&egrave;s refus&eacute;</b>
</td>
</tr>
<tr>
<td colspan=2 bgcolor=#FFFACD height=30 align=right>
<font face=arial,helvetica size=3 color=black>
<b>-USER-&nbsp;</b>
</td>
</tr>
<tr>
<td align=center valign=bottom width=150 bgcolor=#B0C4DE>
<font face=arial,helvetica size=1 color=black>
<img src="data:image/gif;base64,
R0lGODlheQCVAOf/ABIaCxEbGxAbJBkaIRgiIxsiKCArKyMqMCIyIigyMzk6KDk6QjFCJ0JC
KzhDRDtCSD1BWTxKJEhKJ01Bej9KSz5OLUtKM0tChjtSMD5LbUdSU1FTL1JSOlVJlVtSMURa
N1lKnllJsVFSfVlaMVRSlkJiMmBaMlBbW1tSpVdSsWdQtF9TyFdiY2piLmljOmFbp2NarVFr
O1tpU2ZayWha0XFqO1lyQmtxaHpyQ3FrpWB6SWZr13BrxXRydnJqzHV5R1yGP4V6P297e2OF
QHxxx4h6TJZ5Q3CGSWCPQGKOTHh61YaGQWuOR42GQ3qGhpWHP3CPaGeWRoWHhGyWTmiWWo6O
SZWOS42OZ4OPkIeF6HuWY5GGym+eToWWX4eWbHydT5eWUJeVY56WS56XUqaWR4uXmJSWk26n
W5SfULeVUnqmYpKeepKX2JSejYenbJGmYZ2fnJ6lY4iuWIauXqWnUpinfK2mZ5iuYp6uVqOn
l4i1Xb+mUb6mWIa2ZKWnpM6mT6ml0Jym7rOvW6Kn6Y+7XKK1aIu+XqOvsMCueK62X6C2iY+/
bJi+Z9auVry2XLKuzInGaqu2pZTGXpXIZ7W3tLC9i7O3xre+eq+25aTHYp3Jaa22/8W/ZKPH
fOa2YZTPbL2+qNS/Yby+u8++jdW/fLXHjcfGYqq//6vOacG+z92/d77GnL++777Gr53XbJvX
c6DWer7OesfGvcnOaMvPYsXHxMrHuK3XcNbHm6bZd8XOj+3HX6nXkNfObKrcc6Xec6PeesXW
ZtXOjcDVjcTPva7ebsPP0M/VdtPWaebOhPbOX/XOZujNl/DOeeHVZcnWo8vO+d3WebHketnV
s7bmddbeacrX2PbWa7/mcOnXi9TW09fehb7neLrnhNLW5vXXetjdrM7mc87exL/udv/da9fe
9P7fetDueefmh/Xnb9/lx/blhOTnr+Xn5N3vx+7vlv7vb/3vduXu9/j1j/72e/D2w/72s//9
efv/cvD2+P/+gvP+1/r+7Pj+//z/+////yH+EUNyZWF0ZWQgd2l0aCBHSU1QACH5BAEKAP8A
LAAAAAB5AJUAAAj+AP8JHEiwoMGDCBMqVFhLlKVHgwINAvQIkCVRCzNq3Mixo8eDolI9ArRF
icksbJRkUZJlx5ZHtT7KnEmzpihAW4jQ2LEji89AmwJtGropUJYdgGoqXcp0oChAgHzQWDFj
hg8aPngqycKqHLRy8qBtysKmqdmzGkU92sJjxoqqVWlUpbFihxJo/aAB4sFGXrlAWWqhHUz4
n6hHRFSsWDFjBVwaVVfQmBxIXr5++TCx4SEP045UhUMvrfWIyIoZNKrSWDxjBY0VVSevYIVJ
Xj9v0KCxwQRtxZZaooN/FLVlsYoVM1bQWAx3xgoaM2jMoBFICaZB+fJB2wTN2woaloT+i9do
yceK5ipmqKCxeIYKGnBX0FiBaQuNQaz6yQvEqtwOGo+MJyBCluSgggowwHDgCirQMIMKMyy2
wmQz0DDDCoMAEsIMWbAiT27QBKIEGwOWOJAoW6iQAgoohJDCgQdKWNUKMyxGwwwr+FDOFiuo
QAQrgbASyCZZbFGLiQOKskUIKIAAAgpOOqlCCDBWqYKEK6hARDnQsMJKboFscgobO4iC5Hii
bIECCB2A0MGbHYDwZpQoqBCCCivQgOViPGwxyCCYBBLIUIEokcqZwtVCBAhwNtpolCjAOEMI
B6agQoIppBDCCjQoEcgmgWyihCWIBvdICh1M0OgEjaIAggr+L7xAwgQZNJCAAw4wkEACC/T6
gAgowLCDoIFk8UipoYlCRAcTdDBBBxNMAGesIEyQwQMKJFAAAQccQEABBhxgwAABFFBAtwtA
0MEKgezwCLKFAdLBBReIMMEFHUwAwgsidJBBAgYUQEABBBhgQAIGdFvAAQ9o8EABBAhQgAAF
HPBAB0TUAu9gorxA7wT0TgACChNAsIDB5h5grgEDmGvAAAYcIIQfcDihQQIGC1CAAAIcAMjG
gwHSQbT0OjkBBAkYQIABBCBgQAEHGCz1AQYn4IQZWPSgwQIHGGzuAQRIAfRZsuRArwgXdEBC
BgkYfEABBhAgtcEHzG3wARpo4MD+AQIUYPABBiBwAAEniDJ2U7KQEO0FHWSQAAF2F3BAAQZ3
a0C3BRxgQLfmCmDwAQYcYO4BBRiQACWHM0XJBRN0gAIEBBBgQAEEGHAAAQYcYIC5BRxQgAEF
JGDAAQYcYMABBnR7gAEHSH2AAQX0UEvqSgFyQQcqiGAAAQYQYPAABhRgNwEF2N2tAQcY0C0C
BxRgAAIFGHCAwQtQQj1NorwwQQciHEDAAQYogAESYLACGKAABLCb1ApggAIkwAAHMNgBDHYA
gxXAYAcwABzuNxNRvGACIkhAARJggAIcQGrKK4DUCKDAbhksAQcw2AEMcACDHcAABTAAAYRQ
Cw5+RBT+L0CBCAygvAMYgAAHyJvBDmCAAnQrAXNLgAEKQIADJKAHTliAAAxwgF0ZoFsGY4Eo
fOgRWWxhCz0wQAIKYIADGKwAD+gBCxJgsG4hwAC7OoABBLAADZyAAgZIgBPKkAADKK8A3UpA
AU4gCjJ6RBS1MAMBDiC1BZxAAwkgQA96YLBuGewABiiAA4RACWu0wxplcAABbtCDAxjgAAYo
wAEKYLAH1MKRH+lBtwzWA2v0Qx61oIABNLAAqe3qAAZgQS3kkY9+9MMf/mgHBQxAgW4ZrAAH
MEACDuAAUeDSIz0wQAEMwAJv9AOa/bDGCQJAgLkdoAAssIY88uFMaEKzFg7+EIABulWAAhig
AAY4QAJE8c2OCMEAu6KEPPoBTWdaIgGxM0ABDJYAUeSjH/bMqDzKQAADHEBqBzDAAQpggEMU
lCNCSMABTlCOfmQUmlgQgAEKYAACFEAI/XjpS63xAAIY4AAGSIABCtAtAhzipBvpQQIMIARo
9iMSosgHNLWRALsdIqPG6IEQDiEPe2JBAFIrQAKkJgAzIFUjQjhAAg7hj3yw4AFSgAM0+XEC
AgiAAAJIQCrsaQwDEMAPosBCPqBpjAMUwAAFOIDBDmAwIdTirAsRwgESIAp/HCIAJ7AGHCgB
TRYQYAEneEACrAHNfpyAAAU4gTf8gAVotsMBBTD+wAH6OTcWiAKyCnGCARZgDH8IgQAGKIMo
egDNGxDAAU6QwgmMAc1aFIAACSiAEODAAntqIAAGSIABDnAAAxygAD2oBW4TIgUDLKAW/uhB
AApAATiwQB7+0EAABFAAAxxACP3wBxwCMDcGsCAf0DwBAQzA3QIY4AAGIAAWxpsQOBggAZbw
hxQIYIAEUOAE/RDHB35QhB/8gAMUsIY/4BAAqR0gACew5wkIYLACHKAABiMAFhiMEDgYoABw
8AclCGAwAVCgHtFIhz7uQeR7OGMU/LBGAgRgAAEYQAA9gGY+NEAAgx2gAAY4QAEGgAUaHwQO
CSiAEKB5gwEYQAJ82AX+PO6hjzbfwxnXwIc+7KGF2BVAAA6QBzStkYACzC0BBiMAFrxsEDgk
4AAnyIc/2nECHHiCHOnQR5HvoY94pEMfRJ4HJ4rQACF4w55YCIDB+mmAAnDXACeoBWFWrREz
JOAAC7AENNmxC3LEQx/30Mc99EHkNvva1+iwBz+gaY0EFMBgCDBAAQ5QAIM5oBYLiba0p03t
hfjBAAcwwAnkYY9lLIMekyZymyfd5nvo4x5tnsc8wjC3AiSAuwY4QAEWIIpq2/ve+DYIHBLA
3QaQYhfLIEc8wt3me+jjHm2+h6/v0eZ70AMeYDCAAOaGgAIYbAG1yLfGNy5tOCTAAArgg7f+
yREPeuijyPogsj7u0eZ7tPkebb7Hr9PBgQJIrQBzW4AoOM7znhNEFBogAA7I4W1zwIPI+iiy
Pu7R5nu0GR9tvgc+2nyNeOgjHRwQgMEOUADucpcAh/C52DleixMkgA/kWAY54kGPSeujyPrA
hz7u0eZ7+Joe13AGOe6xiwYY4AAFMAB3C2CAfkph7IjHtyhOkIBQkGMZ8IAHPYrcZiL/+tf3
mEc6rgEPesSDHs5QwAASYIACHGBuCXCAKBLPemr3AAFFCEU66AGPcN9DH/fQxz3afI823yMd
17iGOeJhDnPAgxMJkFoCDFYAgx3AAH5ovfQXIoUCGCAIobhGuPX+QWR93EMf+NAHkdPhjGuk
I/KRJ8cyaiAAA3A3AQUw2AEMcAACOGH6+D8IFgpgAA7sYQ/OcA++dg/6QGRtdg/pkA6hEArX
QA7oBw/k8A3MoAEEYAD9ZDcGUAAGkACikH8eKBCHYDAJ8Azo8AeO4Az0gA9FRg/p4Ay74AzO
cA3kAA/0YA7kQA7zsA/84A/GkAAEYAAEYDACgIFl8IEeeAgGowH5wA/O0AihsAvOkA7OcA3O
sAu7cIPLQA7mcIPksA72kFH+cAIEYAD9ZDAFIABSQwALIApGiH+HQAAG0APQtA+h4AmhkA5E
Rg/0QA7mQA7eVnzLoAzswA/9kFH94AT+AmAwBWA3B2AwBCAFtdCGrScLQkAABuAE/ABN9RAK
jeAJ5GAOXOhtorgM5lAPzgSG/mAMcyMABWAABWA3BVAGksh6h2AwCSAE/eAP/eAP9cAJf+AJ
yjCKy+AJxJgM+4CK9tQPQiAABtBPc9NPBkMACyAKszh2sqABBGAwLJAP/uBM/cAPzMAHf9AI
5NgIf9AIqlAPyAiG1mAAAVAAAiA1AkAABWAwOqAFxFCNHCcKtUAJrVAJHGAwCOAEYNgP/rAP
04ALpEAKwjAN9cAP0NQP6whN/XADAmAwBTAABFAADBADXzAHkkAIa3AIlFALolAL+ihtoiAK
h4AFJ3ACa6D+A3LQCR9AABrQDqjYDxnFDxnlTBNpT9awAARgAAZQAARgAVPgBotACIsgAw5w
Ca3AAiwgBHBACSuZkgUhC8TADlKgAQtAAAMgA7qgAX1gCItwAIeQUd7oD97Ylv3ADz8Jhk4Q
AAawKzZwBn2Ql4vwCjKwADIgAxQQmBRwA5dwCatADLKQkqLgB6WwDbGADhJQAERpAA1wBKjg
Bn2gCPkAhm7ZmXFpT/ywD88ABFqgBouQl5CQmp+wCF1gAQmwAA4QmA4QB+hwCcewDatgC7Kw
ELzZmwZRCzdgAHYwD+gQCwsgALuyAYmADsFgCHPgCvWAiv3gD/3gD87kD870k/z+oA7P0A3d
AAywAAufAAuvkJepCQmf8AmvEAc1IAEKkAAL4AAPEAe6cAnRcAmxEAu6kAdwUAu++Z8KYQYO
EAbhkA3HoAG7wgE/IAjIUA3OYApyYAiw8Az88JnrWA/P0AmLIAd9AAmv8KGwwAiLYAiQ8KGf
EJ6wAAyQUAMcwAEuIAEMcABVcAzHkAgJ0CsJsABwIAr/0KM++qNAGqRCOqQ9KgoOkAjzsA2X
oAELwAE4YAVkwAnVAIOoQAh9AAmfAAzTIA5cyqXEIA7P4A6oqA7PwAiMIAdnIAeLAAmvAAup
CQt9sARVIAe/UKew8Amv8AvFYAguIAES4AJF8AMNAAb+unAMcUCUDuAElECkjNqoRCoKJ3AJ
6FAKwvADDTACLlADRWAFqFANzlANyDALhCAHhuAKhCAHXyAHX/AFXMAFcrAP/sAPw9AJjLCq
XHAGbrAIi/AJi/AKi2AIcoAHVfAEVtAEVjALsxAMvwAMwPALxZAINSABDbABOLAERVAFRXAM
YeAAZSAKjPqt4Dqkh1AF00AJtSAKaOACHLABLrAEYyAIyOAMyIAMzlANePAFeSkHfWAIfSAH
Z8AFZ+AO/rAPSDAEScAFatAH5wkLkKAGZxAFS7AEVlAESxAERRAHs9ALs/ALwPALxYANeNAC
EtAAFuABLlAERVAFVaADYCD+CuH6sjDrB6Lwo6AwAn5qAkEgBnRAC85AC7QAg9VgCF/ABVHQ
qnn5BUDABNPgD/wwBTZABX1wnpDwCosQBUmAslgbBDhQBDggCLMQCrMQDMVQDL/ADXFQAxxg
ARawARxgAjiAtV/QCjA7t3S7ChtgARtgAk1gBXRAC8hAC6Ewr8hQDYlACG7ABTpgA2fABDGQ
BLzgD/xACDFgA2fQBygKCTagA1WwBEZgBDhQAziwBEVQBY7QC7TQC7NQDMyKDcFQBThQAyag
ti3qAktgBV0gCnSbu+DaCjjgAS3qAjhQBVYwC71AC5zACbTQC8gQDKgACYZwBjZgAzFgA1zA
CND+dAlAkATaewafAAlAoANXUAVYWwM1gLJgkAi0MAu0MAu9AAy/wKzcUAymgAqJcAQcsAEV
wAE4UAR2IAq6+79DqghNUAMtQL440AR0MAu9wAmOIAicEArIEAy/8AmpGQXRCwRUsAj9wA9u
QAVu4AVAYANAAAQ6AAZVAAZFgAM/UANFAAZxkAizcLy00Au9MAu/AAvFgA3ncAzIEA6zUAQe
sAEcYAI4sAayAMBI/KOKUAV4gAeJQAeJgAqoEA7V0AvIEAq9MK/YUAzM+gtyAAQ6kARTQAj+
wA9c0Ad4YAUqywVHUAVLgLI6UAM4UAWJwAmzcLzHOws0zA3AAAvUMA7+vcAJsxAMs1AFOMAB
I+ACOFAEtZDESUwMbiAHhIAN53AO2DAO1AAM3IAN4cANwXAM2FAMv0ANdeoKU8AEXPAFvOAP
7vAFkEAIS1AEOIADKosDLjACswwGv0ANwYDHnEDDvTAL1AALr0AN1UALsxAKzhAMiVAFRbAE
P4ADNRAJjgzAtWAIZ2AIroAK43AO4zAO3IANdSrFrgAJr1CnxYAN3IAKchAFZ/AF0+APnSAH
HwoGTVADs2wCHLABHNACVfAK4YkKyDoLNIwMyAoM4UkN4XC8s9ALyBAOs5AIiQAGRYADRSAL
SIzEovAFcqCrv9AN43AO48ANv5AIcVAFaCD+B1zQB4QADNzw0tRACF/QB4TgDs8ACR/aCVaA
Ay7gAiPAARYgARuAA4TwobDwCa+ACp2ACp0wC4mAB68AC6/QDcgQCrTQC4LrDOGADZdgBUFg
BbYgpGI91mRN1q3ABGdwBlzwC+NwDuPADeNgB1WAA0YABj8QBVywCJDgCqgwtsWwCHIACd0g
CZAADL9ACHEQB3jwAy4wAhwwAjWAA2iwCK7woZbtCoxACFPABYsAC78QDtUguDBYDdWADKjQ
xK7wC89Q1qzd2mKtCFwgB2dACONQ25XMDWjQ0z8ABj+QBHIACa/wC8UADMVADZDwBXIgB30Q
noRgCNTQDdhQBbP+/ANFUAWJAAvM+gmLAAmMsAiGsAhnkARc0AeLAAzhgAy9EAwDPQvBIMWv
AAudAAu8UAuuXd+tLQtfMAVnMAfAQA3dEA61nQg4MAIjgANVcARqAAmwAAzUQA1jCwufIAdR
cAaL8AmwMAdcIAeS8AtxYAVLAAZ4wAjAAAufsAipmZ6Q0AdqEAU6cAaM8ArUUA3IcAzBMAvB
wA3YwA2/gKKwAAywQAz2HeRj3QpI4AZqcAa/QA21PQt4UAUuQOBFwAVVQAjp+QqQgArAQA3A
AAlqwAVysAiw8AmQwAiE4ApSnAhoYAio0AmEAAmL8AqwsAiwAAmLIAdfEAVJ4AawwKz+4VAN
4RAOUnwO40ANwPALsMCswPAKnVALQt7oP6oIagAJcvAFwPAL44AKYFAENdACI+ACVXAEWsAI
i2AIhoAHkjAO1PALjCAHTOAGjPAKiwALDd4N49ANmpALwPAK0pALwEAN3ZALn7AIfZDWXMAE
UdAHi/AKsEANLz0OwCDF48ANiA4Mv/AKn7AIreDojl4LX5CafUAItc0NYBAEMTACHKADRfAF
VQAGhEAIr/ALrlAM3PALr0AIXMAEfeAKi0AIvwAMDT4OmgAJwJALkAAMv9Dg3EANjLAIZzAF
SWADOsAFc2AIceAKiYAHqIAN4wAMUtzgv6CrkLAIr2AIraD+7Y3eCmcACbDQB8BwDn8OBjjg
AR7gAkVgBUFQBWCABozwCr+ACr8wDr9ACG7QqnKACosACYg+Dt0QB58ADIXwCcDwC9Tw0uPg
C3LABTpgAzFgA0NQBWCgsktgBXSAB6gwDr/ACHKQBGegBoawCLDwCobgBqJg8vZdC4rQB58A
C5/QDdWADNUwC2hQAyPgAjhgBUdQBWgwB4TACLCACsVADcCwCHIQsXhQB3MACcDwCw3ODZDw
CsAACa/ArA0+DtwgDXLABVEwBDbwATFQAzjQ0+RbBGCAB8BQDISQ1q7wCygKCX2ABJFQ38Av
pMQwBX0QnovADYJbDbMABj3tAkX+UAVHwAVyQAiQQAivUKe/AAlfgANFYAV0EAefAAy/QA0v
LQef8At68Am/AAwN/tK+sAh9cAZMYAMfEAMxIPMbMAIm4AJFQAfFQA0AAQzVL2C/fgGD9alP
FC6i/j2EGFHiRIoV/4Hq8wkSJEOxkH2cdSzRDxcuflT5wUWNIUiGXBUDBowQmBo1lsSB9Com
NWrj7ugB9kYOrFfAfvH0BWkRIS42StjAwcGCBQ4jRuCwkggVKjpg8GwF9utTny9DIlFEm1bt
w1avIH2C9WkRKmTOes0KhqpKERw4jkSJoqbPIkiMgP36hOeHiRY/rMj59AsYT263JgGDNOnV
q188uVH++wRpERcbH2zE2NDAggerNXCAAWOlSZUqXejgefWpz5kjdWqtBa5W1rNXsGC9crXI
DaFZzpCFMpVIDZoqOL4cmdJH+ydCrl4xqtJiQ80qR+TAegXsF7VCn4Dp+fQLGE9u3HzBgtQn
io0PMUZYaKCBETgoqQYcliiiiCWKCKKKLl6BZJEzqLAhj1qCw1CiVvqABZXNPpEDCS5M4YQW
UxxJRI4oqsBBByaYkGMjWBZhBJUqXIjBgxaCSJCLzX6h5hdIXgFGEzlgeQWYX6iR5hdYIFFj
ihhi0MEFDjgYoYUa+qrBBRyCSDDBIMBgBJY+1KACCC1EybDNf56hog9IYPn+BBIdmCDEFEH2
pIMOLaI4wgYgmNCCi0Vc+cUVPMCoYYMRTMBhiSrAqMKQV4D5pRhCPvkFGF98ceUXaQxx5RVI
3PiiLxuYKKKGFmqo4osjfnDBhRqWWKKIIJYwAg/jIDmDCSC0kMXNDFvhoo9XIDmjWUlm4YST
RAQBA40okNAhhiGiOOMLOWAxiA4XONjABBdweMIKMOL4xBVUiuEGFTlgeQWYX6iRJhdgXoHF
EDCWCAIHJLiQA40iqpBDjiNwqCkIK5aowggr8EAFmFdgIWSKI7SQxVgMWwGi2Wb7WCSRPQXp
Ew0tvhgiBhu40EKOL+QwRJJi8Kh1AxNiCMIIK9D+MMSQmLAp5pdMJnnlF2lQmQQVYF55BY0q
cKjBhiO4kMMNOdCYAokjcKihBRyKeAI2LggJGmpDvtBBh1Y8Bq4WNZLQAYgz1DiDCzrioAOM
Kr44YggdpgRCDkJc+aQYxX/BY4macKhhCSvowIMJG74oBptwzhlnHGywoaMJMMSQgxBCqsCh
hRpsAIKJI6ZgQgcmdFjiBxNGqMEKKwz5JY455DBEDTmaRQKISuBeq5UkkmDiDC6GgP6IL9A4
gom2j0Biyhi4MMQVxbv5PBEwcGgBhyCWSAQVQ3QowQZDxgkn/nPOSSQIHIKwogkrqsChhQ1G
wMEQdDAEJtjABkf4wRL+asCBEQTBCmhQnEF+UQxXSMIQc5hCErxQC+ShpRYi0wITdGDAI0Rh
ClzgwhSi0IQlBGFKNuCCIVzxi2J8Lhh0aEILXICDJVQhDqjAQxQ+MAVUBCMYvTjGObABBheY
wAVLKAIOXOABC2zABEEowhGYYIMYAIEJRcBBDTxQgwThARjUwMY4uEENbAQDG6joAxe0UIsO
UgQUSWjWFJbHBC6cwQ1y6AMXvvCFGpjABC2wwRG40AdDuOIX2BjHLJ6whBa0AAe4SgQtgpEI
OSQiHM7oBS1mUY1ZFGEEHjCBC0wwAkNuwAMtaMISqqADA3JhkEWoSRCMgAZUcGMc8QtHL5D+
MQtiXkIOXJBFWpSZFlm44QtyOIMavlCFJsjhDH1QQ8LUUIUWbEACG6hBEaJwBjlIwhXA+JwY
gtCCGizBCkvAAy2QQQtTBAMZznAGLZyBDEG4wAMbGMEGGrABE7TABC6oQRBwNQQgMOEMX5AD
GpYQBDCg4RWfC4cziEkLjoYCGbMgBBdAsUySSmQVR0ADGNTghiokqApo0M5GIEGIJbSAAyNw
QRCqcAQ0ECIRkggGNkwhBhzUYAlWWEIUZkGLWdBiFhzlqDNmYQUPbGADHGiAAiRggprUqgZB
wIENdBAFLXAhYXLAAyFc8YtxYCMYtAhFtHrRC2TQwhRx6IIoSrr+V2KAoS9LQMMScFADHBRB
DZ8wyCsg4QYuROEHHvBADZpAmydYAQx0CEc1aJEIXIkBDUioQjCg2gt8OqMXgqjBBiQwgg1I
QAIeqAkOatACF9SgBTZAQhSmwIU+qEEOkPgELAyCjWpAtRccdQQewGAFK8hiryStRSVqYIIR
1AAHNXDBCGqwhET8AhvhmAUqDCEHQqDBBCOowRKM0IQnPKEJVqAFMqpRjUTQRg5cGAIaUBEt
WswiFLSYhRVcsAEPGNIDI+hLDXDwg5rYIAY2QMIUotCsL8xhEZDQjiRggQpTdHgWnKADDmpS
hCrU4rnLFMUXWsABCVigBS7wAAdaYAX+OgjCFNXAZzAkoYUv2KAmVcBVEJqwBDEEYxa0mEUw
TAEJQnAhBjqQgyk4IYhezIIWwUhEDUxQyZoEAQ2JoEMQgtCXEpQgBkkYAhO+AJhmUSEKy2OC
HOJgiDgkAgwjkMAGTOCCKtTixMpsRRU40ICpjMADHBgBDqwgBjAkAhlQNQUh5LAEMS/BCk14
QhOWIIhg9IKjHZ5FIvCABBvMgRCcICYtZkELU8SBNlUAgxzwgIpZmEIQVfiBDTCAARtMoW1A
sMEUziAHNfTBdJBAhStQgQccuEACFtgAB1xwhVr8OS22OMIGJNAAD7igBSZwQRDaawVOIMMZ
tOiFKVCBByv+LOEJR/jBFPCAhiXQwRQc5USHTSGIRKDBBlMAAx0SQUxiBqMYr/gELCDxCVTM
ghamSIQchoCBBCCgBDoAQgxswATtbOQTwCgGNniChxaMYAMWkMAGTFCDONTC2mipRRhMIAGr
tqAGLcDBE6zwBDrQAhm0CAVHTREHIxjhC0NAQhSY8AU0xMEUnBCEIwTBiVlwwgpoaNsSaoAD
K+ABFcGgxi9eAQtIwOIXs+DELExBCC6UgAEIQAAGgGADIJxBO33YyCteYRBsoAIHI+DAVDjg
AhwEwQ6ieDlaItGCDZjABTXoSxCsYAQ60MIZvQgFVGfhCjQswQZ1UAcuSiEHG3z+IRGccAQn
BJEIU6ACD18AAhJc4AEJeKAFQUCD3j8Bi1d8AhWoSAQauGABDDAAAQEgAANiAAQkyEE7kDiD
DqCggw98wAZH+MEPXGACCZigBn0pQitqkfiJrKImSxgDGciwhCAs4QmCQEYoOMHRUNACFYbg
QgzWII483KAHa9ABCxgCNJADPHCDQUICA/oAG3AB19qAEaiBH0CDPmgWKuACLjgCGyiBXUOA
ACAAAggABMAAIAACLugDSKACDXiABCAAASiAAjgACqCAG/gBHKgBHCiCHyiCKqgF8pMIYhgC
OrgGesCHe3AGMMAVOpgFWjAFWggFWviFT9ABBLiBNqD+gAAAgAAQAAf4AAMogS+IgkHSgiGw
gTKzgBHYAAmwAAywgBKIgQ+IgRKoAAxQgBiwAQT4AB34wA+EOwzQgSSggjNgggQoAAH4QAMo
AAIQgA9MABaIhDXAgSAogiCwBVHwwYiohVG4Bni4B3y4B3pIhzEoAiuIFk6ghWAoBkkAAgRw
ACgggAB4wQDYQwJggCEYpETAgy+IgkFCgheRgyMAAhv4AiAoAQzYAC6oAAb4giEgALgLgA9E
AAZQgBjQgQs8Aw0QAAIwAAIQAAEgAAHYwwAwACk4BBaoASMIAlG4xIgQhW+IB3y4h3jEh3tI
BzIoAkegBVOYBWD4hChAAAP+UAADCAAEIIACMAAB+EABCAAEgB4miAEGQIAGOIIYYAALcIMh
2LUjYIJdi4EjwAAEYIAPHAC4+0AGiAE8QAVTCAZBwAMF2EMDmEUBKAADIAAEYIEeoIAKqIJK
kIV1hAhcIAd4uAd8IMp70Ad8SAcriANU+IVXYAQuSIABMIACGIA9FIAPDIAPDAACQIAYYIAB
CIABIAAEIIAACAAESAC4Y4C1xIC1ZAAEIAABQIAAaBsEKAEgCIZ4vAd9uId0WIBu/EABmEUC
EIAAWIAbcIABwAFb8EmIIIZlIAd90Et9wId7wAd9SAc5IARUgAQ5UAACQIA9DIA9NEsCCAAC
EID+D2QABUCAPRwAAhCAPRQAuFtLDGAABGAABCgBLVAABMCAEogBLkgEetDLe8AHZDCAPQyA
ASAABPhAAwgAA3CABCAADNgFdpAFa0OLWmCGZYAHeMCH4rwHorwHZ5gDQyCEGNjDARCAPTTL
WQwAAkCAAQgABqgABjDLANjDAPhAuDMABsCAD7ABDGCAD7CBCCiBGBikM0gEeKCHe8CHeOSE
wRQAAhAAAiiADxQABCCAAjACfcCHd6gF7ZQIWWAGZfhOfLgHfIhHotQHosQHU5CDKEAAAgiA
DwwAAhCAWTRLAhCAAJhFDLCBtdQBBAgABLCBBoA7DECCGGCAD9CBEvj+gBKwgSMIgiJYgi9I
AkEgB3y4B33Ah3vYgz00AAMQgFk0gD0UAA5IB72chhOTBVvABVvABVuwBVxIBmUgB3qAh3vA
B73EB/GEBzoogQCYRQEYzA8UgD0MgD1EgCEAAibgAgyogA/4AiAoAQyIASaIgRL4AO2xARzA
lSpAAy6wAUGAB3rQS3jggwAggDIVgA8UgA8UAAIQgAEwAEe4B3y4B314h72SBVxYBnIg1mUg
B2UgVnL4znsgynuA0XsgynsgynRogAD4wAAYzPwMAAEggAAQAAJAgAD4QAvgAh1AgihgAh2A
HiYAgiGwAR04ghqoJBOgVxfAgSpwAySwgUT+IAd8iEd6IIdGUIAPDAACMIA9DAAEIIBuJAN4
iEd8uId3qAWSqoVkUAZi/c5kJYfvhAd80Et8iEd80Id7gFGipAMBMEsCCIA9DAACCAABIACz
FIBERYASMKAhYIIomAIumIIzmAM3sAIcqAEP2AAJsKoWCAI36IMkiAFOIAd6wIfvJIddwIEA
+MACCAACEAACKAABKAADaAJloId7wAd4uAd6kAWSwgVlIAd4oAeOhVuijEd9iEd8iEd8iEei
1AeibIEA+MAA+EABCAABKIDBDIAPNMsPlIApkIO764NFIARI0Ds0qIIfqAEPwNyaQANIOAMd
GAJO4Fh6IIdrWAb+T8ABAhiAARAAAigAsyyADeCDZSAHeqCHeyBKeqiFZaqFbCAHeChZorwH
otSHeMSH4rwHfLgHfbgHotRLWkCAABjMAPhABBCAD0QAAggAAhCAAPjAEpgCQngFV5iCGGCC
PoCERYAEQ2AERrCCIKiBILACNDAEQviCJDiCUCAHeMAHeIiHZViGXfCENMAB12IACagBI+AD
T1AGciAHeCDKeNQHWYiICX4IUUgGcqAHotRLfNBLfLgHfLgHfDBefLgHfNBLoryHJYA7AkAA
BoA7bQ0AAggAAZjFACCAD4iCPviET4iBDxiCJJCDu9sIV8CDIiYEVzAEOWACG4gCZCD+B3rg
WHLw311Yhl3whEZoBE/wBP9dBgaGB6K8B3yIR2Kg4AmWhWQgB3i4B6LUh3jEB+PFB73UB3yI
R3zQB3zQS6JMhxFggBhoASSoASCwgRgogbVEAAZAAAb4wAAgAAQoAR04g41IghI4g40whD44
AznoA0jY4VcghD6ggiSYEiSgBXLg2HhgYC72311Yhl3gYnIwh3jUB73UB3xgB1koY4gQhWQg
B3igB3yIR3y4B3y4B3zQB3yIR3y4B3ww3njEB33Ah3sgSkcoARxYAhyoCRxYAjnoAzmIggtM
AhsoAQxggDKzgSlYhE/ogzMwBFeAhD5oFjk4gz5YhD6YgzP+mAIgsIEYKIEh6AVlgAd8+M54
YGByWAZlUAYuvgYGjgd6uAd8iEd8uAeihAd2yGWIEAYGJsp7wId4xId4xAd9uAd8aGZ8uAd8
iEd8uAcYRYcqiIEaaAGrqAEc6AI5gIRX+AQ5mIIkAAIbKLMPiIEkUAPtMIQ+gIRFUAMq4IIp
iAIuOIMpSAImSAIgmJISGIJeYGB4oId7gId4KOiv/mp4aGa9xAd4mIaL/gdmUAZ4oAd8uAd8
MF58uAd80Eui1AfjxQfjxYdqiAEJ8AB6bYEaWAI0wANI+IQ+4IIhsAEkiIES+IANsAEukIMp
OAM56AM54IIogB4bAIIhsIEkgB7+ILCBKZkCWlgGcvhOovzOePjqeCCHePhOfLgHfChOfLgH
oryHdACHi54GZSAHorwHfLgHohzrkr0HfcCHeNQHfIjHkhWEEXAtDzCBGgiCJ+gCSOgDOYiC
IYgBIJiSErABE3ABwIgCLpgCLkiCITCg9QaCJGCCIbABIIgBG4iCXlgGcoAHeiBKjo2HePhO
cqCH76QHfLgHfcCH4sQHvcQHeGAHUSjjaVAGcqAHGNWHeCRKfYhHfDBefNBLfChOfIhHfEiH
KtgA19oAE6gBXDmrKGAC7SmzGKgVHFgCHXgRHbCBISBBJACMI5gCLmCCKEgCEmSCUFgGcuDY
eyBKeoD+W44lynvAB+PVh+LEB3jAh2koY1lYBnKAB6LUS6LUS3y4B33QS3wYa3yIR6K8B3wI
hhbwANfagBaogSWIgh84AhuIgQ/QnvXegFqxgR8YgiNgAh3ggkGKAznAg0SIA0KQAy3gAib4
AkfwX3Kgh3ugh+LEh++8B3xoZn0Ya73EB3oAB1mY4FpYBnKgB3ggynvAB33Ah07Xh3jEB324
B3yIR3yIR6KMR3jAAxvwgA2QgErCgWDHgRawgRgAAibggi/AARPYABNwgSJYgiKoAi7QgkRI
BH2bBVMIhkQQgyCogiHQAk9QBnKAB3ogSr3Eh3vQh3vAh3jEB33Ah3vAh2b+1odmxod5AIda
gAhiWAZy+E6ijEeivAd9wId7wAe9xAe9xAd9iEeijMeSvYdqGIIRMIERqBUcWIIgWIIamBIg
OANDkIMWkAAP2AATqIEmqIIlqAI8MAVamIW5cgZkoAVTWAIcWIIpQINQWAZy+M57IMp4xId7
wId70IdOj0d8MPp4xId5kIWHkIVlIAd6IMp7wId4JMri1Ad8iEd8uAd80Et8iEd8MF6iTAQJ
iIEWMIEaCAJcwZUYsAEm+AJCAAMTcC2rMoElsIInsAJTgKqP8PtEqKQgqAI0CIVlIAd6gId7
wIek73R9KE59KE58iEd8YIeHmAZlIAd4gNF4hNH+eMSHe8CHscaH4sQHfSDKeyDKe0iHJcCA
GKgVHAiCJgiCIbABIIiChFmCFqDXDZAAD6iBIFgCPEAFU6CFXggGZAiGWUiEJRiBFlgCI6iC
RrgGcvhOvdQHo9cHxu90eACHh2AGZSAHeoAHfLgHotSHTscHfcCHe8CHpCfKeMQHZ7CBEtgA
E3ABHBCzQbrARSCEIsCBJQCIIy02eKixBMynRKYWzkqUiE4RFyNMLFlS5c8yePDw3evo8aO+
jyJH3tMnEt60f/+yLSMHryO+e/jw3cPnER9JfffwicTXEZ9HeKZKfGjRokYQNKZQmXrlCpUk
VK7w1NgwAkcVQ5BQmZr+lYgOmio1WrhoUaNKEzSNlpGLJ1LfPX0i9XXU51GfR30j8dEjl03W
v1q7lpGj11HfR3338N3Th+8evnv47uETia+jPnwi8ZEDE6OFixpBCHGiNQsbsF/AXhmqYmLD
CBxWCPUhBMxUnCA1WmzwMKIFjipGwIRaBo8eyXv67um7p++5vuQj9cEjl02WSlvKyMH7iE96
R30i8YmceU/fTHz0rnlaUgMHDjqcaM2aRQtbsV+uCAXZsGFEEVbM0ccixeBRxAYSNCCBBCO4
EEQVTZDRyDXmwAOePvdAd48+4OFzDz0aMSOLSrIss4w58NyDzz0z3TOTSPjcg889+NyDjz7+
HeFzDz734HMPPh2lp9EudNiwhBWCmMIJLbT0Egw2qLiCRwv+1VBFFFx8wcUiaLiwQQNhbuCB
CzgsgYMYoSwDDz0jPfeRPvjo45E+HunjkT70wEPON9OopJIsy5ADTzz34HMPPh3hI5I+JOHT
kT74dKQPPvfgc89M9MBDzjKNHFHCF44I4ggnTZqCzS9o1CDBBiYU8cMXXGhxxhlf4LCBBRZ4
sIEJLgSxhAtGeLILORrdow940uHTUTzwkHMNLrL8qRIzyiwDDz334HNPeiLdg889+HiEj0f4
eISPR/jcMxM85JCzSyNklGBDInzw4QgtswRTDCo4tODBCDUUwQX+wQWf8YULJpgwggceuIBD
ES6I0cgy5NBDDz7eeqvPRzN1RI+71+BCzLR/7qLMMuTAgw896c3k0Uz36HMPPvfgcw8+9+Bz
Dz734HMPPvfgo89M99ADDzm7NEJGDCUMgYYggnBiCiquGFKDUThU8UUUUxDMBK1fwIeDCy14
sIEJQVSRhifLkKORxnHjcw8++twDDz3kNINLLSVPm4wyJ5KjETz0aDTTPTPd4zI+9+jT0Uz3
6CMSPh1p5O4ujZBhAwYlDEGHIKaggsorjIABXxVHcDEEE0wkwcQUVBxxRBNL4BCDCSO0EIQV
e3iyDDnm0OORPh7p45E+H12sETnXMCP+i98lT+OJMie66y485NCjET3w0INPR4zrcw/jIs3k
7jKeNJIGDiVgEEMUeOCxCCSQfGIIHnJMMYQN/dugAwCBEAMb4MAGMYiBC1qAgyBUYQ+eWAY5
NHIPfNwDHyLBh0fwQY94xIMc9CBHMmwRvejZQhXKUMaJlHGiZVyvhfCgBzzoAY/0eAQfHsHH
PfChD3xoZBm78MQf0mCFDZRgCFEgmBzkYAhCEKIPZ2DCEGJggw/EwH82OGAMPhCDD5TgCE9Y
QhD20IhdLIMc9IBH3DqCj4vBwxzuWgYuZDHCEdaiFbYYhSo84YkTLkMZJyLHMlpIDnjQAx70
uMdMRIKPe+D+gx7kOJEn/sAHMizBBiWwQRK4oIWCceEMXJiCDg74ARtQQAc2iIENDliCA36g
BCNYQhVwkIZGeGIZ7oLHTPSBj3vgQx/pgQc9rrcMXMhijsb8Uy1kgQtSNKIRntjFLpaxi2Xs
QhknOiHh6AEPejAOHxohxzL0+Ac+kCEINihBDGwwBCQMIQlDAIIO/PeBD8QgBjbQgQ1KQAEb
fKB/MfhACT5ggyG4gAx/UMUulkEOepADHvi4Bz46Qg+NXM8cnhhFLY6p0T/Jwha4GAUimvmH
RujRE7tQxgqX4S6N0AMe9IAHPdx1Ik80gg97EAMHNlCCDdQzBjYowQdiMM+h9lT+B1b8gA2A
gAQbzLMEFbCBC57wh0Z4YhfLIAc8yEEPeNCDcO66xon+MApZGLOsZZVFK3DxBz7soZnN9ERK
TyTIZUDTE43gQxqsUIQPxKAEJdABFKAwhTV4wQZeqAQoiFGJGwCBCl5QRCvW8IEY6MANq7DF
M1oBiitE4QhN2MMf9LjC68HjeivcRSNwIYuysra1qZAFKOxgLz78oREl3YUn4roLPf6BD3ug
gxVcwAUm2IAKopBFLUTxD1Ewd1qiaAUlavGnVkRCFLXwGzHqUIM0/OEPJY1rSvWYBlC0trzl
lYUsKLEKRKRhD24taUkb0V0+pIEMRrgCHFpRiUiIwm/M/v0vgEWxASPsobvw9cQuPLGLkjYi
DauoBYAjLOEJ/6kWrViFHfbQXT50t7t8+EMa0vCEIgiBEhQ+8X9lAYcajIEP3W1EKA7ciD/w
IQ15QDGOc6wSWazCDmQgQ4jTwIcQW6EJOLiBLHSs5H+YoQZFSEMo3BqKZqqCD2mwgyWWrOUJ
y6IVfnjCE3DQhCAUAQd18AMxtqxjUcBBCkUggxWCTIYx1KEVolAzniMsCkscIg9XEEIrHpFn
JYuCEm2QwhikAAY4yKIWEn70tAICADs="/><BR><CENTER>ALCASAR</CENTER>
</td>
<td width=550 bgcolor=#FFFFFF align=center valign=center>
<font face=arial,helvetica color=black>
<font size=4>
L'acc&egrave;s &agrave; la page :
<br><br>
-URL-
<br><br>
<font size=3>
... a &eacute;t&eacute; refus&eacute; pour la raison suivante :
<br><br>
<font color=red>
<b>-REASONGIVEN-</b>
<font color=black>
<br><br><br><br>
Vous tentez d'acc&eacute;der &agrave; une ressource dont le contenu est r&eacute;put&eacute;
contenir des informations inappropri&eacute;es.
<br><br>
Contactez votre responsable informatique (RSSI/OSSI), si vous pensez que ce filtrage est abusif.
<br><br><br><br>
<font size=1>
Filtr&eacute; par <B>DansGuardian</B></a>
</td>
</tr>
</table>
 
</body>
 
</html>
 
<!--
The available variables are as follows:
- URL- gives the URL the user was trying to get to.
- REASONGIVEN- gives the nice reason (i.e. not quoting the banned phrase).
- REASONLOGGED- gives the reason that gets logged including full details.
- USER- gives the username if known.
- IP- gives the originating IP.
 
You need to remove the space between the - and the variable to use them
in your HTML. They are there above so extra processing is not required.
 
More example templates are likely to be found on the DansGuardian web site
on the Extras page.
 
Daniel Barron 2002-03-27
--!>
 
/conf/template.html
0,0 → 1,324
<html>
 
<head>
<title>DansGuardian - Access Denied</title>
</head>
 
<body bgcolor=#FFFFFF>
 
<center>
<table border=0 cellspacing=0 cellpadding=2 height=540 width=700>
<tr>
<td colspan=2 bgcolor=#FEA700 height=100 align=center>
<font face=arial,helvetica size=6>
<b>Access has been Denied!</b>
</td>
</tr>
<tr>
<td colspan=2 bgcolor=#FFFACD height=30 align=right>
<font face=arial,helvetica size=3 color=black>
<b>-USER-&nbsp;</b>
</td>
</tr>
<tr>
<td align=center valign=bottom width=150 bgcolor=#B0C4DE>
<font face=arial,helvetica size=1 color=black>
<img src="data:image/gif;base64,
R0lGODlheQCVAOf/ABIaCxEbGxAbJBkaIRgiIxsiKCArKyMqMCIyIigyMzk6KDk6QjFCJ0JC
KzhDRDtCSD1BWTxKJEhKJ01Bej9KSz5OLUtKM0tChjtSMD5LbUdSU1FTL1JSOlVJlVtSMURa
N1lKnllJsVFSfVlaMVRSlkJiMmBaMlBbW1tSpVdSsWdQtF9TyFdiY2piLmljOmFbp2NarVFr
O1tpU2ZayWha0XFqO1lyQmtxaHpyQ3FrpWB6SWZr13BrxXRydnJqzHV5R1yGP4V6P297e2OF
QHxxx4h6TJZ5Q3CGSWCPQGKOTHh61YaGQWuOR42GQ3qGhpWHP3CPaGeWRoWHhGyWTmiWWo6O
SZWOS42OZ4OPkIeF6HuWY5GGym+eToWWX4eWbHydT5eWUJeVY56WS56XUqaWR4uXmJSWk26n
W5SfULeVUnqmYpKeepKX2JSejYenbJGmYZ2fnJ6lY4iuWIauXqWnUpinfK2mZ5iuYp6uVqOn
l4i1Xb+mUb6mWIa2ZKWnpM6mT6ml0Jym7rOvW6Kn6Y+7XKK1aIu+XqOvsMCueK62X6C2iY+/
bJi+Z9auVry2XLKuzInGaqu2pZTGXpXIZ7W3tLC9i7O3xre+eq+25aTHYp3Jaa22/8W/ZKPH
fOa2YZTPbL2+qNS/Yby+u8++jdW/fLXHjcfGYqq//6vOacG+z92/d77GnL++777Gr53XbJvX
c6DWer7OesfGvcnOaMvPYsXHxMrHuK3XcNbHm6bZd8XOj+3HX6nXkNfObKrcc6Xec6PeesXW
ZtXOjcDVjcTPva7ebsPP0M/VdtPWaebOhPbOX/XOZujNl/DOeeHVZcnWo8vO+d3WebHketnV
s7bmddbeacrX2PbWa7/mcOnXi9TW09fehb7neLrnhNLW5vXXetjdrM7mc87exL/udv/da9fe
9P7fetDueefmh/Xnb9/lx/blhOTnr+Xn5N3vx+7vlv7vb/3vduXu9/j1j/72e/D2w/72s//9
efv/cvD2+P/+gvP+1/r+7Pj+//z/+////yH+EUNyZWF0ZWQgd2l0aCBHSU1QACH5BAEKAP8A
LAAAAAB5AJUAAAj+AP8JHEiwoMGDCBMqVFhLlKVHgwINAvQIkCVRCzNq3Mixo8eDolI9ArRF
icksbJRkUZJlx5ZHtT7KnEmzpihAW4jQ2LEji89AmwJtGropUJYdgGoqXcp0oChAgHzQWDFj
hg8aPngqycKqHLRy8qBtysKmqdmzGkU92sJjxoqqVWlUpbFihxJo/aAB4sFGXrlAWWqhHUz4
n6hHRFSsWDFjBVwaVVfQmBxIXr5++TCx4SEP045UhUMvrfWIyIoZNKrSWDxjBY0VVSevYIVJ
Xj9v0KCxwQRtxZZaooN/FLVlsYoVM1bQWAx3xgoaM2jMoBFICaZB+fJB2wTN2woaloT+i9do
yceK5ipmqKCxeIYKGnBX0FiBaQuNQaz6yQvEqtwOGo+MJyBCluSgggowwHDgCirQMIMKMyy2
wmQz0DDDCoMAEsIMWbAiT27QBKIEGwOWOJAoW6iQAgoohJDCgQdKWNUKMyxGwwwr+FDOFiuo
QAQrgbASyCZZbFGLiQOKskUIKIAAAgpOOqlCCDBWqYKEK6hARDnQsMJKboFscgobO4iC5Hii
bIECCB2A0MGbHYDwZpQoqBCCCivQgOViPGwxyCCYBBLIUIEokcqZwtVCBAhwNtpolCjAOEMI
B6agQoIppBDCCjQoEcgmgWyihCWIBvdICh1M0OgEjaIAggr+L7xAwgQZNJCAAw4wkEACC/T6
gAgowLCDoIFk8UipoYlCRAcTdDBBBxNMAGesIEyQwQMKJFAAAQccQEABBhxgwAABFFBAtwtA
0MEKgezwCLKFAdLBBReIMMEFHUwAwgsidJBBAgYUQEABBBhgQAIGdFvAAQ9o8EABBAhQgAAF
HPBAB0TUAu9gorxA7wT0TgACChNAsIDB5h5grgEDmGvAAAYcIIQfcDihQQIGC1CAAAIcAMjG
gwHSQbT0OjkBBAkYQIABBCBgQAEHGCz1AQYn4IQZWPSgwQIHGGzuAQRIAfRZsuRArwgXdEBC
BgkYfEABBhAgtcEHzG3wARpo4MD+AQIUYPABBiBwAAEniDJ2U7KQEO0FHWSQAAF2F3BAAQZ3
a0C3BRxgQLfmCmDwAQYcYO4BBRiQACWHM0XJBRN0gAIEBBBgQAEEGHAAAQYcYIC5BRxQgAEF
JGDAAQYcYMABBnR7gAEHSH2AAQX0UEvqSgFyQQcqiGAAAQYQYPAABhRgNwEF2N2tAQcY0C0C
BxRgAAIFGHCAwQtQQj1NorwwQQciHEDAAQYogAESYLACGKAABLCb1ApggAIkwAAHMNgBDHYA
gxXAYAcwABzuNxNRvGACIkhAARJggAIcQGrKK4DUCKDAbhksAQcw2AEMcACDHcAABTAAAYRQ
Cw5+RBT+L0CBCAygvAMYgAAHyJvBDmCAAnQrAXNLgAEKQIADJKAHTliAAAxwgF0ZoFsGY4Eo
fOgRWWxhCz0wQAIKYIADGKwAD+gBCxJgsG4hwAC7OoABBLAADZyAAgZIgBPKkAADKK8A3UpA
AU4gCjJ6RBS1MAMBDiC1BZxAAwkgQA96YLBuGewABiiAA4RACWu0wxplcAABbtCDAxjgAAYo
wAEKYLAH1MKRH+lBtwzWA2v0Qx61oIABNLAAqe3qAAZgQS3kkY9+9MMf/mgHBQxAgW4ZrAAH
MEACDuAAUeDSIz0wQAEMwAJv9AOa/bDGCQJAgLkdoAAssIY88uFMaEKzFg7+EIABulWAAhig
AAY4QAJE8c2OCMEAu6KEPPoBTWdaIgGxM0ABDJYAUeSjH/bMqDzKQAADHEBqBzDAAQpggEMU
lCNCSMABTlCOfmQUmlgQgAEKYAACFEAI/XjpS63xAAIY4AAGSIABCtAtAhzipBvpQQIMIARo
9iMSosgHNLWRALsdIqPG6IEQDiEPe2JBAFIrQAKkJgAzIFUjQjhAAg7hj3yw4AFSgAM0+XEC
AgiAAAJIQCrsaQwDEMAPosBCPqBpjAMUwAAFOIDBDmAwIdTirAsRwgESIAp/HCIAJ7AGHCgB
TRYQYAEneEACrAHNfpyAAAU4gTf8gAVotsMBBTD+wAH6OTcWiAKyCnGCARZgDH8IgQAGKIMo
egDNGxDAAU6QwgmMAc1aFIAACSiAEODAAntqIAAGSIABDnAAAxygAD2oBW4TIgUDLKAW/uhB
AApAATiwQB7+0EAABFAAAxxACP3wBxwCMDcGsCAf0DwBAQzA3QIY4AAGIAAWxpsQOBggAZbw
hxQIYIAEUOAE/RDHB35QhB/8gAMUsIY/4BAAqR0gACew5wkIYLACHKAABiMAFhiMEDgYoABw
8AclCGAwAVCgHtFIhz7uQeR7OGMU/LBGAgRgAAEYQAA9gGY+NEAAgx2gAAY4QAEGgAUaHwQO
CSiAEKB5gwEYQAJ82AX+PO6hjzbfwxnXwIc+7KGF2BVAAA6QBzStkYACzC0BBiMAFrxsEDgk
4AAnyIc/2nECHHiCHOnQR5HvoY94pEMfRJ4HJ4rQACF4w55YCIDB+mmAAnDXACeoBWFWrREz
JOAAC7AENNmxC3LEQx/30Mc99EHkNvva1+iwBz+gaY0EFMBgCDBAAQ5QAIM5oBYLiba0p03t
hfjBAAcwwAnkYY9lLIMekyZymyfd5nvo4x5tnsc8wjC3AiSAuwY4QAEWIIpq2/ve+DYIHBLA
3QaQYhfLIEc8wt3me+jjHm2+h6/v0eZ70AMeYDCAAOaGgAIYbAG1yLfGNy5tOCTAAArgg7f+
yREPeuijyPogsj7u0eZ7tPkebb7Hr9PBgQJIrQBzW4AoOM7znhNEFBogAA7I4W1zwIPI+iiy
Pu7R5nu0GR9tvgc+2nyNeOgjHRwQgMEOUADucpcAh/C52DleixMkgA/kWAY54kGPSeujyPrA
hz7u0eZ7+Joe13AGOe6xiwYY4AAFMAB3C2CAfkph7IjHtyhOkIBQkGMZ8IAHPYrcZiL/+tf3
mEc6rgEPesSDHs5QwAASYIACHGBuCXCAKBLPemr3AAFFCEU66AGPcN9DH/fQxz3afI823yMd
17iGOeJhDnPAgxMJkFoCDFYAgx3AAH5ovfQXIoUCGCAIobhGuPX+QWR93EMf+NAHkdPhjGuk
I/KRJ8cyaiAAA3A3AQUw2AEMcAACOGH6+D8IFgpgAA7sYQ/OcA++dg/6QGRtdg/pkA6hEArX
QA7oBw/k8A3MoAEEYAD9ZDcGUAAGkACikH8eKBCHYDAJ8Azo8AeO4Az0gA9FRg/p4Ay74AzO
cA3kAA/0YA7kQA7zsA/84A/GkAAEYAAEYDACgIFl8IEeeAgGowH5wA/O0AihsAvOkA7OcA3O
sAu7cIPLQA7mcIPksA72kFH+cAIEYAD9ZDAFIABSQwALIApGiH+HQAAG0APQtA+h4AmhkA5E
Rg/0QA7mQA7eVnzLoAzswA/9kFH94AT+AmAwBWA3B2AwBCAFtdCGrScLQkAABuAE/ABN9RAK
jeAJ5GAOXOhtorgM5lAPzgSG/mAMcyMABWAABWA3BVAGksh6h2AwCSAE/eAP/eAP9cAJf+AJ
yjCKy+AJxJgM+4CK9tQPQiAABtBPc9NPBkMACyAKszh2sqABBGAwLJAP/uBM/cAPzMAHf9AI
5NgIf9AIqlAPyAiG1mAAAVAAAiA1AkAABWAwOqAFxFCNHCcKtUAJrVAJHGAwCOAEYNgP/rAP
04ALpEAKwjAN9cAP0NQP6whN/XADAmAwBTAABFAADBADXzAHkkAIa3AIlFALolAL+ihtoiAK
h4AFJ3ACa6D+A3LQCR9AABrQDqjYDxnFDxnlTBNpT9awAARgAAZQAARgAVPgBotACIsgAw5w
Ca3AAiwgBHBACSuZkgUhC8TADlKgAQtAAAMgA7qgAX1gCItwAIeQUd7oD97Ylv3ADz8Jhk4Q
AAawKzZwBn2Ql4vwCjKwADIgAxQQmBRwA5dwCatADLKQkqLgB6WwDbGADhJQAERpAA1wBKjg
Bn2gCPkAhm7ZmXFpT/ywD88ABFqgBouQl5CQmp+wCF1gAQmwAA4QmA4QB+hwCcewDatgC7Kw
ELzZmwZRCzdgAHYwD+gQCwsgALuyAYmADsFgCHPgCvWAiv3gD/3gD87kD870k/z+oA7P0A3d
AAywAAufAAuvkJepCQmf8AmvEAc1IAEKkAAL4AAPEAe6cAnRcAmxEAu6kAdwUAu++Z8KYQYO
EAbhkA3HoAG7wgE/IAjIUA3OYApyYAiw8Az88JnrWA/P0AmLIAd9AAmv8KGwwAiLYAiQ8KGf
EJ6wAAyQUAMcwAEuIAEMcABVcAzHkAgJ0CsJsABwIAr/0KM++qNAGqRCOqQ9KgoOkAjzsA2X
oAELwAE4YAVkwAnVAIOoQAh9AAmfAAzTIA5cyqXEIA7P4A6oqA7PwAiMIAdnIAeLAAmvAAup
CQt9sARVIAe/UKew8Amv8AvFYAguIAES4AJF8AMNAAb+unAMcUCUDuAElECkjNqoRCoKJ3AJ
6FAKwvADDTACLlADRWAFqFANzlANyDALhCAHhuAKhCAHXyAHX/AFXMAFcrAP/sAPw9AJjLCq
XHAGbrAIi/AJi/AKi2AIcoAHVfAEVtAEVjALsxAMvwAMwPALxZAINSABDbABOLAERVAFRXAM
YeAAZSAKjPqt4Dqkh1AF00AJtSAKaOACHLABLrAEYyAIyOAMyIAMzlANePAFeSkHfWAIfSAH
Z8AFZ+AO/rAPSDAEScAFatAH5wkLkKAGZxAFS7AEVlAESxAERRAHs9ALs/ALwPALxYANeNAC
EtAAFuABLlAERVAFVaADYCD+CuH6sjDrB6Lwo6AwAn5qAkEgBnRAC85AC7QAg9VgCF/ABVHQ
qnn5BUDABNPgD/wwBTZABX1wnpDwCosQBUmAslgbBDhQBDggCLMQCrMQDMVQDL/ADXFQAxxg
ARawARxgAjiAtV/QCjA7t3S7ChtgARtgAk1gBXRAC8hAC6Ewr8hQDYlACG7ABTpgA2fABDGQ
BLzgD/xACDFgA2fQBygKCTagA1WwBEZgBDhQAziwBEVQBY7QC7TQC7NQDMyKDcFQBThQAyag
ti3qAktgBV0gCnSbu+DaCjjgAS3qAjhQBVYwC71AC5zACbTQC8gQDKgACYZwBjZgAzFgA1zA
CND+dAlAkATaewafAAlAoANXUAVYWwM1gLJgkAi0MAu0MAu9AAy/wKzcUAymgAqJcAQcsAEV
wAE4UAR2IAq6+79DqghNUAMtQL440AR0MAu9wAmOIAicEArIEAy/8AmpGQXRCwRUsAj9wA9u
QAVu4AVAYANAAAQ6AAZVAAZFgAM/UANFAAZxkAizcLy00Au9MAu/AAvFgA3ncAzIEA6zUAQe
sAEcYAI4sAayAMBI/KOKUAV4gAeJQAeJgAqoEA7V0AvIEAq9MK/YUAzM+gtyAAQ6kARTQAj+
wA9c0Ad4YAUqywVHUAVLgLI6UAM4UAWJwAmzcLzHOws0zA3AAAvUMA7+vcAJsxAMs1AFOMAB
I+ACOFAEtZDESUwMbiAHhIAN53AO2DAO1AAM3IAN4cANwXAM2FAMv0ANdeoKU8AEXPAFvOAP
7vAFkEAIS1AEOIADKosDLjACswwGv0ANwYDHnEDDvTAL1AALr0AN1UALsxAKzhAMiVAFRbAE
P4ADNRAJjgzAtWAIZ2AIroAK43AO4zAO3IANdSrFrgAJr1CnxYAN3IAKchAFZ/AF0+APnSAH
HwoGTVADs2wCHLABHNACVfAK4YkKyDoLNIwMyAoM4UkN4XC8s9ALyBAOs5AIiQAGRYADRSAL
SIzEovAFcqCrv9AN43AO48ANv5AIcVAFaCD+B1zQB4QADNzw0tRACF/QB4TgDs8ACR/aCVaA
Ay7gAiPAARYgARuAA4TwobDwCa+ACp2ACp0wC4mAB68AC6/QDcgQCrTQC4LrDOGADZdgBUFg
BbYgpGI91mRN1q3ABGdwBlzwC+NwDuPADeNgB1WAA0YABj8QBVywCJDgCqgwtsWwCHIACd0g
CZAADL9ACHEQB3jwAy4wAhwwAjWAA2iwCK7woZbtCoxACFPABYsAC78QDtUguDBYDdWADKjQ
xK7wC89Q1qzd2mKtCFwgB2dACONQ25XMDWjQ0z8ABj+QBHIACa/wC8UADMVADZDwBXIgB30Q
noRgCNTQDdhQBbP+/ANFUAWJAAvM+gmLAAmMsAiGsAhnkARc0AeLAAzhgAy9EAwDPQvBIMWv
AAudAAu8UAuuXd+tLQtfMAVnMAfAQA3dEA61nQg4MAIjgANVcARqAAmwAAzUQA1jCwufIAdR
cAaL8AmwMAdcIAeS8AtxYAVLAAZ4wAjAAAufsAipmZ6Q0AdqEAU6cAaM8ArUUA3IcAzBMAvB
wA3YwA2/gKKwAAywQAz2HeRj3QpI4AZqcAa/QA21PQt4UAUuQOBFwAVVQAjp+QqQgArAQA3A
AAlqwAVysAiw8AmQwAiE4ApSnAhoYAio0AmEAAmL8AqwsAiwAAmLIAdfEAVJ4AawwKz+4VAN
4RAOUnwO40ANwPALsMCswPAKnVALQt7oP6oIagAJcvAFwPAL44AKYFAENdACI+ACVXAEWsAI
i2AIhoAHkjAO1PALjCAHTOAGjPAKiwALDd4N49ANmpALwPAK0pALwEAN3ZALn7AIfZDWXMAE
UdAHi/AKsEANLz0OwCDF48ANiA4Mv/AKn7AIreDojl4LX5CafUAItc0NYBAEMTACHKADRfAF
VQAGhEAIr/ALrlAM3PALr0AIXMAEfeAKi0AIvwAMDT4OmgAJwJALkAAMv9Dg3EANjLAIZzAF
SWADOsAFc2AIceAKiYAHqIAN4wAMUtzgv6CrkLAIr2AIraD+7Y3eCmcACbDQB8BwDn8OBjjg
AR7gAkVgBUFQBWCABozwCr+ACr8wDr9ACG7QqnKACosACYg+Dt0QB58ADIXwCcDwC9Tw0uPg
C3LABTpgAzFgA0NQBWCgsktgBXSAB6gwDr/ACHKQBGegBoawCLDwCobgBqJg8vZdC4rQB58A
C5/QDdWADNUwC2hQAyPgAjhgBUdQBWgwB4TACLCACsVADcCwCHIQsXhQB3MACcDwCw3ODZDw
CsAACa/ArA0+DtwgDXLABVEwBDbwATFQAzjQ0+RbBGCAB8BQDISQ1q7wCygKCX2ABJFQ38Av
pMQwBX0QnovADYJbDbMABj3tAkX+UAVHwAVyQAiQQAivUKe/AAlfgANFYAV0EAefAAy/QA0v
LQef8At68Am/AAwN/tK+sAh9cAZMYAMfEAMxIPMbMAIm4AJFQAfFQA0AAQzVL2C/fgGD9alP
FC6i/j2EGFHiRIoV/4Hq8wkSJEOxkH2cdSzRDxcuflT5wUWNIUiGXBUDBowQmBo1lsSB9Com
NWrj7ugB9kYOrFfAfvH0BWkRIS42StjAwcGCBQ4jRuCwkggVKjpg8GwF9utTny9DIlFEm1bt
w1avIH2C9WkRKmTOes0KhqpKERw4jkSJoqbPIkiMgP36hOeHiRY/rMj59AsYT263JgGDNOnV
q188uVH++wRpERcbH2zE2NDAggerNXCAAWOlSZUqXejgefWpz5kjdWqtBa5W1rNXsGC9crXI
DaFZzpCFMpVIDZoqOL4cmdJH+ydCrl4xqtJiQ80qR+TAegXsF7VCn4Dp+fQLGE9u3HzBgtQn
io0PMUZYaKCBETgoqQYcliiiiCWKCKKKLl6BZJEzqLAhj1qCw1CiVvqABZXNPpEDCS5M4YQW
UxxJRI4oqsBBByaYkGMjWBZhBJUqXIjBgxaCSJCLzX6h5hdIXgFGEzlgeQWYX6iR5hdYIFFj
ihhi0MEFDjgYoYUa+qrBBRyCSDDBIMBgBJY+1KACCC1EybDNf56hog9IYPn+BBIdmCDEFEH2
pIMOLaI4wgYgmNCCi0Vc+cUVPMCoYYMRTMBhiSrAqMKQV4D5pRhCPvkFGF98ceUXaQxx5RVI
3PiiLxuYKKKGFmqo4osjfnDBhRqWWKKIIJYwAg/jIDmDCSC0kMXNDFvhoo9XIDmjWUlm4YST
RAQBA40okNAhhiGiOOMLOWAxiA4XONjABBdweMIKMOL4xBVUiuEGFTlgeQWYX6iRJhdgXoHF
EDCWCAIHJLiQA40iqpBDjiNwqCkIK5aowggr8EAFmFdgIWSKI7SQxVgMWwGi2Wb7WCSRPQXp
Ew0tvhgiBhu40EKOL+QwRJJi8Kh1AxNiCMIIK9D+MMSQmLAp5pdMJnnlF2lQmQQVYF55BY0q
cKjBhiO4kMMNOdCYAokjcKihBRyKeAI2LggJGmpDvtBBh1Y8Bq4WNZLQAYgz1DiDCzrioAOM
Kr44YggdpgRCDkJc+aQYxX/BY4macKhhCSvowIMJG74oBptwzhlnHGywoaMJMMSQgxBCqsCh
hRpsAIKJI6ZgQgcmdFjiBxNGqMEKKwz5JY455DBEDTmaRQKISuBeq5UkkmDiDC6GgP6IL9A4
gom2j0Biyhi4MMQVxbv5PBEwcGgBhyCWSAQVQ3QowQZDxgkn/nPOSSQIHIKwogkrqsChhQ1G
wMEQdDAEJtjABkf4wRL+asCBEQTBCmhQnEF+UQxXSMIQc5hCErxQC+ShpRYi0wITdGDAI0Rh
ClzgwhSi0IQlBGFKNuCCIVzxi2J8Lhh0aEILXICDJVQhDqjAQxQ+MAVUBCMYvTjGObABBheY
wAVLKAIOXOABC2zABEEowhGYYIMYAIEJRcBBDTxQgwThARjUwMY4uEENbAQDG6joAxe0UIsO
UgQUSWjWFJbHBC6cwQ1y6AMXvvCFGpjABC2wwRG40AdDuOIX2BjHLJ6whBa0AAe4SgQtgpEI
OSQiHM7oBS1mUY1ZFGEEHjCBC0wwAkNuwAMtaMISqqADA3JhkEWoSRCMgAZUcGMc8QtHL5D+
MQtiXkIOXJBFWpSZFlm44QtyOIMavlCFJsjhDH1QQ8LUUIUWbEACG6hBEaJwBjlIwhXA+JwY
gtCCGizBCkvAAy2QQQtTBAMZznAGLZyBDEG4wAMbGMEGGrABE7TABC6oQRBwNQQgMOEMX5AD
GpYQBDCg4RWfC4cziEkLjoYCGbMgBBdAsUySSmQVR0ADGNTghiokqApo0M5GIEGIJbSAAyNw
QRCqcAQ0ECIRkggGNkwhBhzUYAlWWEIUZkGLWdBiFhzlqDNmYQUPbGADHGiAAiRggprUqgZB
wIENdBAFLXAhYXLAAyFc8YtxYCMYtAhFtHrRC2TQwhRx6IIoSrr+V2KAoS9LQMMScFADHBRB
DZ8wyCsg4QYuROEHHvBADZpAmydYAQx0CEc1aJEIXIkBDUioQjCg2gt8OqMXgqjBBiQwgg1I
QAIeqAkOatACF9SgBTZAQhSmwIU+qEEOkPgELAyCjWpAtRccdQQewGAFK8hiryStRSVqYIIR
1AAHNXDBCGqwhET8AhvhmAUqDCEHQqDBBCOowRKM0IQnPKEJVqAFMqpRjUTQRg5cGAIaUBEt
WswiFLSYhRVcsAEPGNIDI+hLDXDwg5rYIAY2QMIUotCsL8xhEZDQjiRggQpTdHgWnKADDmpS
hCrU4rnLFMUXWsABCVigBS7wAAdaYAX+OgjCFNXAZzAkoYUv2KAmVcBVEJqwBDEEYxa0mEUw
TAEJQnAhBjqQgyk4IYhezIIWwUhEDUxQyZoEAQ2JoEMQgtCXEpQgBkkYAhO+AJhmUSEKy2OC
HOJgiDgkAgwjkMAGTOCCKtTixMpsRRU40ICpjMADHBgBDqwgBjAkAhlQNQUh5LAEMS/BCk14
QhOWIIhg9IKjHZ5FIvCABBvMgRCcICYtZkELU8SBNlUAgxzwgIpZmEIQVfiBDTCAARtMoW1A
sMEUziAHNfTBdJBAhStQgQccuEACFtgAB1xwhVr8OS22OMIGJNAAD7igBSZwQRDaawVOIMMZ
tOiFKVCBByv+LOEJR/jBFPCAhiXQwRQc5USHTSGIRKDBBlMAAx0SQUxiBqMYr/gELCDxCVTM
ghamSIQchoCBBCCgBDoAQgxswATtbOQTwCgGNniChxaMYAMWkMAGTFCDONTC2mipRRhMIAGr
tqAGLcDBE6zwBDrQAhm0CAVHTREHIxjhC0NAQhSY8AU0xMEUnBCEIwTBiVlwwgpoaNsSaoAD
K+ABFcGgxi9eAQtIwOIXs+DELExBCC6UgAEIQAAGgGADIJxBO33YyCteYRBsoAIHI+DAVDjg
AhwEwQ6ieDlaItGCDZjABTXoSxCsYAQ60MIZvQgFVGfhCjQswQZ1UAcuSiEHG3z+IRGccAQn
BJEIU6ACD18AAhJc4AEJeKAFQUCD3j8Bi1d8AhWoSAQauGABDDAAAQEgAANiAAQkyEE7kDiD
DqCggw98wAZH+MEPXGACCZigBn0pQitqkfiJrKImSxgDGciwhCAs4QmCQEYoOMHRUNACFYbg
QgzWII483KAHa9ABCxgCNJADPHCDQUICA/oAG3AB19qAEaiBH0CDPmgWKuACLjgCGyiBXUOA
ACAAAggABMAAIAACLugDSKACDXiABCAAASiAAjgACqCAG/gBHKgBHCiCHyiCKqgF8pMIYhgC
OrgGesCHe3AGMMAVOpgFWjAFWggFWviFT9ABBLiBNqD+gAAAgAAQAAf4AAMogS+IgkHSgiGw
gTKzgBHYAAmwAAywgBKIgQ+IgRKoAAxQgBiwAQT4AB34wA+EOwzQgSSggjNgggQoAAH4QAMo
AAIQgA9MABaIhDXAgSAogiCwBVHwwYiohVG4Bni4B3y4B3pIhzEoAiuIFk6ghWAoBkkAAgRw
ACgggAB4wQDYQwJggCEYpETAgy+IgkFCgheRgyMAAhv4AiAoAQzYAC6oAAb4giEgALgLgA9E
AAZQgBjQgQs8Aw0QAAIwAAIQAAEgAAHYwwAwACk4BBaoASMIAlG4xIgQhW+IB3y4h3jEh3tI
BzIoAkegBVOYBWD4hChAAAP+UAADCAAEIIACMAAB+EABCAAEgB4miAEGQIAGOIIYYAALcIMh
2LUjYIJdi4EjwAAEYIAPHAC4+0AGiAE8QAVTCAZBwAMF2EMDmEUBKAADIAAEYIEeoIAKqIJK
kIV1hAhcIAd4uAd8IMp70Ad8SAcriANU+IVXYAQuSIABMIACGIA9FIAPDIAPDAACQIAYYIAB
CIABIAAEIIAACAAESAC4Y4C1xIC1ZAAEIAABQIAAaBsEKAEgCIZ4vAd9uId0WIBu/EABmEUC
EIAAWIAbcIABwAFb8EmIIIZlIAd90Et9wId7wAd9SAc5IARUgAQ5UAACQIA9DIA9NEsCCAAC
EID+D2QABUCAPRwAAhCAPRQAuFtLDGAABGAABCgBLVAABMCAEogBLkgEetDLe8AHZDCAPQyA
ASAABPhAAwgAA3CABCAADNgFdpAFa0OLWmCGZYAHeMCH4rwHorwHZ5gDQyCEGNjDARCAPTTL
WQwAAkCAAQgABqgABjDLANjDAPhAuDMABsCAD7ABDGCAD7CBCCiBGBikM0gEeKCHe8CHeOSE
wRQAAhAAAiiADxQABCCAAjACfcCHd6gF7ZQIWWAGZfhOfLgHfIhHotQHosQHU5CDKEAAAgiA
DwwAAhCAWTRLAhCAAJhFDLCBtdQBBAgABLCBBoA7DECCGGCAD9CBEvj+gBKwgSMIgiJYgi9I
AkEgB3y4B33Ah3vYgz00AAMQgFk0gD0UAA5IB72chhOTBVvABVvABVuwBVxIBmUgB3qAh3vA
B73EB/GEBzoogQCYRQEYzA8UgD0MgD1EgCEAAibgAgyogA/4AiAoAQyIASaIgRL4AO2xARzA
lSpAAy6wAUGAB3rQS3jggwAggDIVgA8UgA8UAAIQgAEwAEe4B3y4B314h72SBVxYBnIg1mUg
B2UgVnL4znsgynuA0XsgynsgynRogAD4wAAYzPwMAAEggAAQAAJAgAD4QAvgAh1AgihgAh2A
HiYAgiGwAR04ghqoJBOgVxfAgSpwAySwgUT+IAd8iEd6IIdGUIAPDAACMIA9DAAEIIBuJAN4
iEd8uId3qAWSqoVkUAZi/c5kJYfvhAd80Et8iEd80Id7gFGipAMBMEsCCIA9DAACCAABIACz
FIBERYASMKAhYIIomAIumIIzmAM3sAIcqAEP2AAJsKoWCAI36IMkiAFOIAd6wIfvJIddwIEA
+MACCAACEAACKAABKAADaAJloId7wAd4uAd6kAWSwgVlIAd4oAeOhVuijEd9iEd8iEd8iEei
1AeibIEA+MAA+EABCAABKIDBDIAPNMsPlIApkIO764NFIARI0Ds0qIIfqAEPwNyaQANIOAMd
GAJO4Fh6IIdrWAb+T8ABAhiAARAAAigAsyyADeCDZSAHeqCHeyBKeqiFZaqFbCAHeChZorwH
otSHeMSH4rwHfLgHfbgHotRLWkCAABjMAPhABBCAD0QAAggAAhCAAPjAEpgCQngFV5iCGGCC
PoCERYAEQ2AERrCCIKiBILACNDAEQviCJDiCUCAHeMAHeIiHZViGXfCENMAB12IACagBI+AD
T1AGciAHeCDKeNQHWYiICX4IUUgGcqAHotRLfNBLfLgHfLgHfDBefLgHfNBLoryHJYA7AkAA
BoA7bQ0AAggAAZjFACCAD4iCPviET4iBDxiCJJCDu9sIV8CDIiYEVzAEOWACG4gCZCD+B3rg
WHLw311Yhl3whEZoBE/wBP9dBgaGB6K8B3yIR2Kg4AmWhWQgB3i4B6LUh3jEB+PFB73UB3yI
R3zQB3zQS6JMhxFggBhoASSoASCwgRgogbVEAAZAAAb4wAAgAAQoAR04g41IghI4g40whD44
AznoA0jY4VcghD6ggiSYEiSgBXLg2HhgYC72311Yhl3gYnIwh3jUB73UB3xgB1koY4gQhWQg
B3igB3yIR3y4B3y4B3zQB3yIR3y4B3ww3njEB33Ah3sgSkcoARxYAhyoCRxYAjnoAzmIggtM
AhsoAQxggDKzgSlYhE/ogzMwBFeAhD5oFjk4gz5YhD6YgzP+mAIgsIEYKIEh6AVlgAd8+M54
YGByWAZlUAYuvgYGjgd6uAd8iEd8uAeihAd2yGWIEAYGJsp7wId4xId4xAd9uAd8aGZ8uAd8
iEd8uAcYRYcqiIEaaAGrqAEc6AI5gIRX+AQ5mIIkAAIbKLMPiIEkUAPtMIQ+gIRFUAMq4IIp
iAIuOIMpSAImSAIgmJISGIJeYGB4oId7gId4KOiv/mp4aGa9xAd4mIaL/gdmUAZ4oAd8uAd8
MF58uAd80Eui1AfjxQfjxYdqiAEJ8AB6bYEaWAI0wANI+IQ+4IIhsAEkiIES+IANsAEukIMp
OAM56AM54IIogB4bAIIhsIEkgB7+ILCBKZkCWlgGcvhOovzOePjqeCCHePhOfLgHfChOfLgH
oryHdACHi54GZSAHorwHfLgHohzrkr0HfcCHeNQHfIjHkhWEEXAtDzCBGgiCJ+gCSOgDOYiC
IYgBIJiSErABE3ABwIgCLpgCLkiCITCg9QaCJGCCIbABIIgBG4iCXlgGcoAHeiBKjo2HePhO
cqCH76QHfLgHfcCH4sQHvcQHeGAHUSjjaVAGcqAHGNWHeCRKfYhHfDBefNBLfChOfIhHfEiH
KtgA19oAE6gBXDmrKGAC7SmzGKgVHFgCHXgRHbCBISBBJACMI5gCLmCCKEgCEmSCUFgGcuDY
eyBKeoD+W44lynvAB+PVh+LEB3jAh2koY1lYBnKAB6LUS6LUS3y4B33QS3wYa3yIR6K8B3wI
hhbwANfagBaogSWIgh84AhuIgQ/QnvXegFqxgR8YgiNgAh3ggkGKAznAg0SIA0KQAy3gAib4
AkfwX3Kgh3ugh+LEh++8B3xoZn0Ya73EB3oAB1mY4FpYBnKgB3ggynvAB33Ah07Xh3jEB324
B3yIR3yIR6KMR3jAAxvwgA2QgErCgWDHgRawgRgAAibggi/AARPYABNwgSJYgiKoAi7QgkRI
BH2bBVMIhkQQgyCogiHQAk9QBnKAB3ogSr3Eh3vQh3vAh3jEB33Ah3vAh2b+1odmxod5AIda
gAhiWAZy+E6ijEeivAd9wId7wAe9xAe9xAd9iEeijMeSvYdqGIIRMIERqBUcWIIgWIIamBIg
OANDkIMWkAAP2AATqIEmqIIlqAI8MAVamIW5cgZkoAVTWAIcWIIpQINQWAZy+M57IMp4xId7
wId70IdOj0d8MPp4xId5kIWHkIVlIAd6IMp7wId4JMri1Ad8iEd8uAd80Et8iEd8MF6iTAQJ
iIEWMIEaCAJcwZUYsAEm+AJCAAMTcC2rMoElsIInsAJTgKqP8PtEqKQgqAI0CIVlIAd6gId7
wIek73R9KE59KE58iEd8YIeHmAZlIAd4gNF4hNH+eMSHe8CHscaH4sQHfSDKeyDKe0iHJcCA
GKgVHAiCJgiCIbABIIiChFmCFqDXDZAAD6iBIFgCPEAFU6CFXggGZAiGWUiEJRiBFlgCI6iC
RrgGcvhOvdQHo9cHxu90eACHh2AGZSAHeoAHfLgHotSHTscHfcCHe8CHpCfKeMQHZ7CBEtgA
E3ABHBCzQbrARSCEIsCBJQCIIy02eKixBMynRKYWzkqUiE4RFyNMLFlS5c8yePDw3evo8aO+
jyJH3tMnEt60f/+yLSMHryO+e/jw3cPnER9JfffwicTXEZ9HeKZKfGjRokYQNKZQmXrlCpUk
VK7w1NgwAkcVQ5BQmZr+lYgOmio1WrhoUaNKEzSNlpGLJ1LfPX0i9XXU51GfR30j8dEjl03W
v1q7lpGj11HfR3338N3Th+8evnv47uETia+jPnwi8ZEDE6OFixpBCHGiNQsbsF/AXhmqYmLD
CBxWCPUhBMxUnCA1WmzwMKIFjipGwIRaBo8eyXv67um7p++5vuQj9cEjl02WSlvKyMH7iE96
R30i8YmceU/fTHz0rnlaUgMHDjqcaM2aRQtbsV+uCAXZsGFEEVbM0ccixeBRxAYSNCCBBCO4
EEQVTZDRyDXmwAOePvdAd48+4OFzDz0aMSOLSrIss4w58NyDzz0z3TOTSPjcg889+NyDjz7+
HeFzDz734HMPPh2lp9EudNiwhBWCmMIJLbT0Egw2qLiCRwv+1VBFFFx8wcUiaLiwQQNhbuCB
CzgsgYMYoSwDDz0jPfeRPvjo45E+HunjkT70wEPON9OopJIsy5ADTzz34HMPPh3hI5I+JOHT
kT74dKQPPvfgc89M9MBDzjKNHFHCF44I4ggnTZqCzS9o1CDBBiYU8cMXXGhxxhlf4LCBBRZ4
sIEJLgSxhAtGeLILORrdow940uHTUTzwkHMNLrL8qRIzyiwDDz334HNPeiLdg889+HiEj0f4
eISPR/jcMxM85JCzSyNklGBDInzw4QgtswRTDCo4tODBCDUUwQX+wQWf8YULJpgwggceuIBD
ES6I0cgy5NBDDz7eeqvPRzN1RI+71+BCzLR/7qLMMuTAgw896c3k0Uz36HMPPvfgcw8+9+Bz
Dz734HMPPvfgo89M99ADDzm7NEJGDCUMgYYggnBiCiquGFKDUThU8UUUUxDMBK1fwIeDCy14
sIEJQVSRhifLkKORxnHjcw8++twDDz3kNINLLSVPm4wyJ5KjETz0aDTTPTPd4zI+9+jT0Uz3
6CMSPh1p5O4ujZBhAwYlDEGHIKaggsorjIABXxVHcDEEE0wkwcQUVBxxRBNL4BCDCSO0EIQV
e3iyDDnm0OORPh7p45E+H12sETnXMCP+i98lT+OJMie66y485NCjET3w0INPR4zrcw/jIs3k
7jKeNJIGDiVgEEMUeOCxCCSQfGIIHnJMMYQN/dugAwCBEAMb4MAGMYiBC1qAgyBUYQ+eWAY5
NHIPfNwDHyLBh0fwQY94xIMc9CBHMmwRvejZQhXKUMaJlHGiZVyvhfCgBzzoAY/0eAQfHsHH
PfChD3xoZBm78MQf0mCFDZRgCFEgmBzkYAhCEKIPZ2DCEGJggw/EwH82OGAMPhCDD5TgCE9Y
QhD20IhdLIMc9IBH3DqCj4vBwxzuWgYuZDHCEdaiFbYYhSo84YkTLkMZJyLHMlpIDnjQAx70
uMdMRIKPe+D+gx7kOJEn/sAHMizBBiWwQRK4oIWCceEMXJiCDg74ARtQQAc2iIENDliCA36g
BCNYQhVwkIZGeGIZ7oLHTPSBj3vgQx/pgQc9rrcMXMhijsb8Uy1kgQtSNKIRntjFLpaxi2Xs
QhknOiHh6AEPejAOHxohxzL0+Ac+kCEINihBDGwwBCQMIQlDAIIO/PeBD8QgBjbQgQ1KQAEb
fKB/MfhACT5ggyG4gAx/UMUulkEOepADHvi4Bz46Qg+NXM8cnhhFLY6p0T/Jwha4GAUimvmH
RujRE7tQxgqX4S6N0AMe9IAHPdx1Ik80gg97EAMHNlCCDdQzBjYowQdiMM+h9lT+B1b8gA2A
gAQbzLMEFbCBC57wh0Z4YhfLIAc8yEEPeNCDcO66xon+MApZGLOsZZVFK3DxBz7soZnN9ERK
TyTIZUDTE43gQxqsUIQPxKAEJdABFKAwhTV4wQZeqAQoiFGJGwCBCl5QRCvW8IEY6MANq7DF
M1oBiitE4QhN2MMf9LjC68HjeivcRSNwIYuysra1qZAFKOxgLz78oREl3YUn4roLPf6BD3ug
gxVcwAUm2IAKopBFLUTxD1Ewd1qiaAUlavGnVkRCFLXwGzHqUIM0/OEPJY1rSvWYBlC0trzl
lYUsKLEKRKRhD24taUkb0V0+pIEMRrgCHFpRiUiIwm/M/v0vgEWxASPsobvw9cQuPLGLkjYi
DauoBYAjLOEJ/6kWrViFHfbQXT50t7t8+EMa0vCEIgiBEhQ+8X9lAYcajIEP3W1EKA7ciD/w
IQ15QDGOc6wSWazCDmQgQ4jTwIcQW6EJOLiBLHSs5H+YoQZFSEMo3BqKZqqCD2mwgyWWrOUJ
y6IVfnjCE3DQhCAUAQd18AMxtqxjUcBBCkUggxWCTIYx1KEVolAzniMsCkscIg9XEEIrHpFn
JYuCEm2QwhikAAY4yKIWEn70tAICADs="/><BR><CENTER>ALCASAR</CENTER>
</td>
<td width=550 bgcolor=#FFFFFF align=center valign=center>
<font face=arial,helvetica color=black>
<font size=4>
Access to the page:
<br><br>
-URL-
<br><br>
<font size=3>
... has been denied for the following reason:
<br><br>
<font color=red>
<b>-REASONGIVEN-</b>
<font color=black>
<br><br><br><br>
You are seeing this error because what you attempted to access appears to contain,
or is labeled as containing, material that has been deemed inapproriate.
<br><br>
If you have any queries contact your ICT Co-ordinator or Network Manager.
<br><br><br><br>
<font size=1>
Filtered by <B>DansGuardian</B></a>
</td>
</tr>
</table>
 
</body>
 
</html>
 
<!--
The available variables are as follows:
- URL- gives the URL the user was trying to get to.
- REASONGIVEN- gives the nice reason (i.e. not quoting the banned phrase).
- REASONLOGGED- gives the reason that gets logged including full details.
- USER- gives the username if known.
- IP- gives the originating IP.
 
You need to remove the space between the - and the variable to use them
in your HTML. They are there above so extra processing is not required.
 
More example templates are likely to be found on the DansGuardian web site
on the Extras page.
 
Daniel Barron 2002-03-27
--!>
 
/conf/localdomain.rev
0,0 → 1,8
$TTL 86400
@ IN SOA localhost. root.localhost. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS localhost.
/conf/localdomain.zone
0,0 → 1,9
$TTL 86400
@ IN SOA localhost root (
2010020401 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS localhost
localhost IN A 127.0.0.1
/conf/user_edit.attrs
0,0 → 1,50
#
# Attributes which will be visible in the user/group edit pages
#
# Format: Attribute Comment
#
#
#Auth-Type <a href="help/auth_type_help.html" target=su_help onclick=window.open("help/auth_type_help.html","su_help","width=560,height=230,toolbar=no,scrollbars=no,resizable=yes") title="Auth-Type Help Page"><font color="blue">Auth-Type</font></a>
Simultaneous-Use <a href="help/simultaneous_use_help.html" target=su_help onclick=window.open("help/simultaneous_use_help.html","su_help","width=560,height=170,toolbar=no,scrollbars=no,resizable=yes") title="Simultaneous Use Help Page"><font color="blue">Nombre de session simultan&eacute;e</font></a>
#Framed-Protocol <a href="help/framed_protocol_help.html" target=fpr_help onclick=window.open("help/framed_protocol_help.htlml","fpr_help","width=560,height=230,toolbar=no,scrollbars=no,resizable=yes") title="Framed-Protocol Help PPage"><font color="blue">Protocol</font></a>
#Framed-IP-Address <a href="help/framed_ip_address_help.html" target=fia_help onclick=window.open("help/framed_ip_address_help.html","fia_help","width=560,height=230,toolbar=no,scrollbars=no,resizable=yes") title="Framed-IP-Address Help Page"><font color="blue">IP Address</font></a>
#Framed-IP-Netmask IP Netmask
#Framed-Route Route
#Framed-Routing
#Filter-Id <a href="help/filter_id_help.html" target=fid_help onclick=window.open("help/filter_id_help.html","fid_help","width=560,height=230,toolbar=no,scrollbars=no,resizable=yes") title="Filter-ID Help Page"><font color="blue">Filter ID</font></a>
#Framed-MTU <a href="help/framed_mtu_help.html" target=fid_help onclick=window.open("help/framed_mtu_help.html","fid_help","width=560,height=230,toolbar=no,scrollbars=no,resizable=yes") title="Framed-MTU Help Page"><font color="blue">Framed-MTU</font></a>
#Framed-Compression <a href="help/framed_compression_help.html" target=fc_help onclick=window.open("help/framed_compression_help.html","fc_help","width=600,height=210,toolbar=no,scrollbars=no,resizable=yes") title="Framed Compression Help Page"><font color="blue">Compression Used</font></a>
#Service-Type <a href="help/service_type_help.html" target=st_help onclick=window.open("help/service_type_help.html","st_help","width=560,height=230,toolbar=no,scrollbars=no,resizable=yes") title="Service-Type Help Page"><font color="blue">Service Type</font></a>
#Login-IP-Host
#Login-Service
#Login-TCP-Port
#Callback-Number <a href="help/callback_number_help.html" target=fid_help onclick=window.open("help/callback_number_help.html","fid_help","width=560,height=230,toolbar=no,scrollbars=no,resizable=yes") title="Callback-Number Help Page"><font color="blue">Callback-Number</font></a>
#Callback-Id <a href="help/callback_id_help.html" target=fid_help onclick=window.open("help/callback_id_help.html","fid_help","width=560,height=230,toolbar=no,scrollbars=no,resizable=yes") title="Callback-ID Help Page"><font color="blue">Callback-ID</font></a>
#Framed-IPX-Network
#Class <a href="help/class_help.html" target=fid_help onclick=window.open("help/class_help.html","fid_help","width=560,height=230,toolbar=no,scrollbars=no,resizable=yes") title="Class Help Page"><font color="blue">Class</font></a>
Session-Timeout <a href="help/session_timeout_help.html" target=st_help onclick=window.open("help/session_timeout_help.html","st_help","width=600,height=250,toolbar=no,scrollbars=no,resizable=yes") title="Session Timeout Help Page"><font color="blue">Dur&eacute;e limite d'une session</font></a><BR>(en secondes)
#Idle-Timeout <a href="help/idle_timeout_help.html" target=it_help onclick=window.open("help/idle_timeout_help.html","it_help","width=600,height=170,toolbar=no,scrollbars=no,resizable=yes") title="Idle Timeout Help Page"><font color="blue">Idle Timeout</font></a>
#Termination-Action
#Login-LAT-Service
#Login-LAT-Node
#Login-LAT-Group
#Framed-AppleTalk-Link
#Framed-AppleTalk-Network
#Framed-AppleTalk-Zone
#Port-Limit <a href="help/port_limit_help.html" target=pl_help onclick=window.open("help/port_limit_help.html","pl_help","width=600,height=170,toolbar=no,scrollbars=no,resizable=yes") title="Port Limit Help Page"><font color="blue">Port Limit</font></a>
#Login-LAT-Port
#Dialup-Access <a href="help/dialup_access_help.html" target=da_help onclick=window.open("help/dialup_access_help.html","da_help","width=560,height=200,toolbar=no,scrollbars=no,resizable=yes") title="Dialup Access Help Page"><font color="blue">Dialup Access (use FALSE to lock)</font></a>
#Dialup-Lock-Msg <a href="help/lock_message_help.html" target=lm_help onclick=window.open("help/lock_message_help.html","lm_help","width=600,height=210,toolbar=no,scrollbars=no,resizable=yes") title="Lock Message Help Page"><font color="blue">Lock Message</font></a>
#Reply-Message <a href="help/reply_message_help.html" target=lm_help onclick=window.open("help/reply_message_help.html","lm_help","width=600,height=210,toolbar=no,scrollbars=no,resizable=yes") title="Reply-Message Help Page"><font color="blue">Reply-Message</font></a>
Max-Daily-Session <a href="help/session_timeout_help.html" target=st_help onclick=window.open("help/session_timeout_help.html","st_help","width=600,height=250,toolbar=no,scrollbars=no,resizable=yes") title="Session Timeout Help Page"><font color="blue">Dur&eacute;e limite journali&egrave;re</font></a><BR>(en secondes)
#Max-Weekly-Session Weekly Limit (secs)
Max-Monthly-Session <a href="help/session_timeout_help.html" target=st_help onclick=window.open("help/session_timeout_help.html","st_help","width=600,height=250,toolbar=no,scrollbars=no,resizable=yes") title="Session Timeout Help Page"><font color="blue">Dur&eacute;e limite mensuelle</font></a><BR>(en secondes)
#Login-Time <a href="login_time_create.php?val=$name1&first=yes" target=lt_create onclick=window.open("login_time_create.php?val=$name1&first=yes","lt_create","width=600,height=490,toolbar=no,scrollbars=yes,resizable=yes") title="Login-Time Creation Page"><font color="blue">P&eacute;riode hebdomadaire</font></a><a href="help/login_time_help.html" target=lt_help onclick=window.open("help/login_time_help.html","lt_help","width=600,height=370,toolbar=no,scrollbars=no,resizable=yes") title="Login-Time Help Page"><font color="blue"><BR>(Format UUCP)</font></a>
Login-Time <a href="help/login_time_help.html" target=lt_help onclick=window.open("help/login_time_help.html","lt_help","width=600,height=370,toolbar=no,scrollbars=no,resizable=yes") title="Login-Time Help Page"><font color="blue">P&eacute;riode hebdomadaire</font></a>
Expiration <a href="help/expiration_help.html" target=lt_help onclick=window.open("help/expiration_help.html","lt_help","width=600,height=250,toolbar=no,scrollbars=no,resizable=yes") title="Expiration Help Page"><font color="blue">Date d'expiration</font></a>
#
# Uncomment this if you are using ldap and you are using user regular profiles.
# Also make sure that Regular-Profile maps to the correct ldap attribute in
# extra.ldap-attrmap
#
#Regular-Profile User Regular Profile DN
/conf/ldap
0,0 → 1,161
# -*- text -*-
#
# $Id$
 
# Lightweight Directory Access Protocol (LDAP)
#
# This module definition allows you to use LDAP for
# authorization and authentication.
#
# See raddb/sites-available/default for reference to the
# ldap module in the authorize and authenticate sections.
#
# However, LDAP can be used for authentication ONLY when the
# Access-Request packet contains a clear-text User-Password
# attribute. LDAP authentication will NOT work for any other
# authentication method.
#
# This means that LDAP servers don't understand EAP. If you
# force "Auth-Type = LDAP", and then send the server a
# request containing EAP authentication, then authentication
# WILL NOT WORK.
#
# The solution is to use the default configuration, which does
# work.
#
# Setting "Auth-Type = LDAP" is ALMOST ALWAYS WRONG. We
# really can't emphasize this enough.
#
ldap {
#
# Note that this needs to match the name in the LDAP
# server certificate, if you're using ldaps.
server = ""
identity = ""
password =
basedn = "dc=example,dc=com"
filter = "(uid=%{Stripped-User-Name:-%{User-Name}})"
base_filter = ""
 
# How many connections to keep open to the LDAP server.
# This saves time over opening a new LDAP socket for
# every authentication request.
ldap_connections_number = 5
 
# seconds to wait for LDAP query to finish. default: 20
timeout = 4
 
# seconds LDAP server has to process the query (server-side
# time limit). default: 20
#
# LDAP_OPT_TIMELIMIT is set to this value.
timelimit = 3
 
#
# seconds to wait for response of the server. (network
# failures) default: 10
#
# LDAP_OPT_NETWORK_TIMEOUT is set to this value.
net_timeout = 1
 
#
# This subsection configures the tls related items
# that control how FreeRADIUS connects to an LDAP
# server. It contains all of the "tls_*" configuration
# entries used in older versions of FreeRADIUS. Those
# configuration entries can still be used, but we recommend
# using these.
#
tls {
# Set this to 'yes' to use TLS encrypted connections
# to the LDAP database by using the StartTLS extended
# operation.
#
# The StartTLS operation is supposed to be
# used with normal ldap connections instead of
# using ldaps (port 689) connections
start_tls = no
 
# cacertfile = /path/to/cacert.pem
# cacertdir = /path/to/ca/dir/
# certfile = /path/to/radius.crt
# keyfile = /path/to/radius.key
# randfile = /path/to/rnd
 
# Certificate Verification requirements. Can be:
# "never" (don't even bother trying)
# "allow" (try, but don't fail if the cerificate
# can't be verified)
# "demand" (fail if the certificate doesn't verify.)
#
# The default is "allow"
# require_cert = "demand"
}
 
# default_profile = "cn=radprofile,ou=dialup,o=My Org,c=UA"
# profile_attribute = "radiusProfileDn"
# access_attr = "dialupAccess"
 
# Mapping of RADIUS dictionary attributes to LDAP
# directory attributes.
dictionary_mapping = ${confdir}/ldap.attrmap
 
# Set password_attribute = nspmPassword to get the
# user's password from a Novell eDirectory
# backend. This will work ONLY IF FreeRADIUS has been
# built with the --with-edir configure option.
#
# See also the following links:
#
# http://www.novell.com/coolsolutions/appnote/16745.html
# https://secure-support.novell.com/KanisaPlatform/Publishing/558/3009668_f.SAL_Public.html
#
# Novell may require TLS encrypted sessions before returning
# the user's password.
#
# password_attribute = userPassword
 
# Un-comment the following to disable Novell
# eDirectory account policy check and intruder
# detection. This will work *only if* FreeRADIUS is
# configured to build with --with-edir option.
#
edir_account_policy_check = no
 
#
# Group membership checking. Disabled by default.
#
# groupname_attribute = cn
# groupmembership_filter = "(|(&(objectClass=GroupOfNames)(member=%{Ldap-UserDn}))(&(objectClass=GroupOfUniqueNames)(uniquemember=%{Ldap-UserDn})))"
# groupmembership_attribute = radiusGroupName
 
# compare_check_items = yes
# do_xlat = yes
# access_attr_used_for_allow = yes
 
#
# By default, if the packet contains a User-Password,
# and no other module is configured to handle the
# authentication, the LDAP module sets itself to do
# LDAP bind for authentication.
#
# THIS WILL ONLY WORK FOR PAP AUTHENTICATION.
#
# THIS WILL NOT WORK FOR CHAP, MS-CHAP, or 802.1x (EAP).
#
# You can disable this behavior by setting the following
# configuration entry to "no".
#
# allowed values: {no, yes}
# set_auth_type = yes
# set_auth_type = no
 
# ldap_debug: debug flag for LDAP SDK
# (see OpenLDAP documentation). Set this to enable
# huge amounts of LDAP debugging on the screen.
# You should only use this if you are an LDAP expert.
#
# default: 0x0000 (no debugging messages)
# Example:(LDAP_DEBUG_FILTER+LDAP_DEBUG_CONNS)
#ldap_debug = 0x0028
}
/conf/logrotate.d/dansguardian
0,0 → 1,13
/var/log/dansguardian/access.log {
create 644 dansguardian dansguardian
rotate 5
dateext
weekly
sharedscripts
prerotate
service dansguardian stop
endscript
postrotate
service dansguardian start
endscript
}
/conf/logrotate.d/syslog
0,0 → 1,15
# WARNING : don't use * wildcard as extension
# (glob in logrotate will try to rotate all files instead of
# only the basenames of the logs, i.e. it will rotate
# already rotated files and recompress them, taking
# exponential time...)
 
/var/log/auth.log /var/log/syslog /var/log/user.log /var/log/secure /var/log/messages /var/log/boot.log /var/log/mail/errors /var/log/mail/info /var/log/mail/warnings /var/log/cron/errors /var/log/cron/info /var/log/cron/warnings /var/log/kernel/errors /var/log/kernel/info /var/log/kernel/warnings /var/log/lpr/errors /var/log/lpr/info /var/log/lpr/warnings /var/log/news/news.err /var/log/news/news.notice /var/log/news/news.crit /var/log/daemons/errors /var/log/daemons/info /var/log/daemons/warnings /var/log/explanations {
sharedscripts
rotate 5
weekly
postrotate
[ -f /var/run/syslog-ng.pid ] && kill -HUP `cat /var/run/syslog-ng.pid` || true
[ -f /var/run/syslogd.pid ] && kill -HUP `cat /var/run/syslogd.pid` || true
endscript
}
/conf/logrotate.d/httpd
0,0 → 1,27
/var/log/httpd/access_log /var/log/httpd/ssl_access_log{
rotate 12
monthly
dateext
missingok
notifempty
compress
prerotate
/etc/rc.d/init.d/httpd closelogs > /dev/null 2>&1
endscript
postrotate
/etc/rc.d/init.d/httpd closelogs > /dev/null 2>&1
endscript
}
/var/log/httpd/apache_runtime_status /var/log/httpd/ssl_mutex /var/log/httpd/error_ /var/log/httpd/ssl_request_log {
rotate 4
monthly
missingok
notifempty
compress
prerotate
/etc/rc.d/init.d/httpd closelogs > /dev/null 2>&1
endscript
postrotate
/etc/rc.d/init.d/httpd closelogs > /dev/null 2>&1
endscript
}
/conf/logrotate.d/squid
0,0 → 1,32
/var/log/squid/access.log {
weekly
rotate 52
dateext
copytruncate
compress
notifempty
missingok
}
/var/log/squid/cache.log {
weekly
rotate 5
copytruncate
compress
notifempty
missingok
}
 
/var/log/squid/store.log {
weekly
rotate 5
copytruncate
compress
notifempty
missingok
# This script asks squid to rotate its logs on its own.
# Restarting squid is a long process and it is not worth
# doing it just to rotate logs
postrotate
/usr/sbin/squid -k rotate
endscript
}
/conf/logrotate.d/mysqld
0,0 → 1,37
# This logname can be set in /etc/my.cnf
# by setting the variable "err-log"
# in the [safe_mysqld] section as follows:
#
# [safe_mysqld]
# err-log=/var/lib/mysql/mysqld.log
#
# If the root user has a password you have to create a
# /root/.my.cnf configuration file with the following
# content:
#
# [mysqladmin]
# password = <secret>
# user= root
#
# where "<secret>" is the password.
#
# ATTENTION: This /root/.my.cnf should be readable ONLY
# for root !
 
/var/log/mysqld/mysqld.log {
# create 600 mysql mysql
notifempty
daily
rotate 31
dateext
missingok
compress
postrotate
# just if mysqld is really running
if test -x /usr/bin/mysqladmin && \
/usr/bin/mysqladmin ping &>/dev/null
then
/usr/bin/mysqladmin flush-logs
fi
endscript
}
/conf/logrotate.d/ulogd
0,0 → 1,10
/var/log/firewall/firewall.log {
missingok
rotate 52
weekly
dateext
sharedscripts
postrotate
/etc/init.d/ulogd restart
endscript
}
/conf/logrotate.d/radiusd
0,0 → 1,7
/var/log/radius/radacct/*/detail /var/log/radius/*.log /var/log/radius/radutmp /var/log/radius/radwtmp {
monthly
rotate 4
nocreate
missingok
compress
}
/conf/sudoers
0,0 → 1,48
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
 
# Host alias specification
Host_Alias LAN_ORG=192.168.182.0/24,localhost #réseau de l'organisme
# User alias specification
User_Alias ADMIN=sysadmin # compte d'admin local de l'organisme
User_Alias ADMOSSI=apache # compte d'admin OSSI (web)
 
# Cmnd alias specification
Cmnd_Alias NET=/sbin/arping,/sbin/arp,/usr/sbin/arpscan,/usr/sbin/tcpdump # commandes réseau
Cmnd_Alias URPMI=/usr/sbin/urpmi,/usr/sbin/urpmi.update # gestion des paquetages
Cmnd_Alias BYPASS=/usr/local/sbin/alcasar-bypass-on.sh,/usr/local/sbin/alcasar-bypass-off.sh # contournement du système d'authentification
Cmnd_Alias RADDB=/usr/bin/radwho,/usr/sbin/chilli_query # pour la gestion des usagers en ligne
Cmnd_Alias SQL=/usr/local/sbin/alcasar-mysql.sh # pour exporter la base mysql
Cmnd_Alias GHOST=/usr/local/bin/alcasar-mondo.sh # pour générer une image iso du serveur
Cmnd_Alias EXPORT=/usr/local/bin/alcasar-log-export.sh # pour exporter/sauvegarder les fichiers journaux
Cmnd_Alias BL=/usr/local/sbin/alcasar-bl.sh # pour gérer les blacklists et whitelist
Cmnd_Alias NF=/usr/local/sbin/alcasar-nf.sh # pour gérer le filtrage réseau
Cmnd_Alias LOGOUT=/usr/local/sbin/alcasar-logout.sh # pour déconnecter les usagers
Cmnd_Alias UAM=/usr/local/sbin/alcasar-uamallowed.sh # pour gérer les site de confiance (uamallowed)
Cmnd_Alias SERVICE=/sbin/service,/usr/bin/killall # pour gérer les site de confiance (uamallowed)
 
# Defaults specification
# Defaults syslog=auth
 
# Runas alias specification
 
# User privilege specification
root ALL=(ALL) ALL
 
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
 
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
 
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
 
ADMOSSI LAN_ORG=(root) NOPASSWD: NET,BYPASS,GHOST,SQL,BL,NF,EXPORT,RADDB,LOGOUT,UAM,SERVICE
ADMIN LAN_ORG=(root) NOPASSWD: NET,/sbin/poweroff,/sbin/shutdown -h now,/sbin/reboot,URPMI,BYPASS,GHOST,SQL,EXPORT
 
/conf/ldap.attrmap
0,0 → 1,77
#
# Mapping of RADIUS dictionary attributes to LDAP directory attributes
# to be used by LDAP authentication and authorization module (rlm_ldap)
#
# Format:
# ItemType RADIUS-Attribute-Name ldapAttributeName [operator]
#
# Where:
# ItemType = checkItem or replyItem
# RADIUS-Attribute-Name = attribute name in RADIUS dictionary
# ldapAttributeName = attribute name in LDAP schema
# operator = optional, and may not be present.
# If not present, defaults to "==" for checkItems,
# and "=" for replyItems.
# If present, the operator here should be one
# of the same operators as defined in the "users"3
# file ("man users", or "man 5 users").
# If an operator is present in the value of the
# LDAP entry (i.e. ":=foo"), then it over-rides
# both the default, and any operator given here.
#
# If $GENERIC$ is specified as RADIUS-Attribute-Name, the line specifies
# a LDAP attribute which can be used to store any RADIUS
# attribute/value-pair in LDAP directory.
#
# You should edit this file to suit it to your needs.
#
 
# Au moins une définition doit être présente pour l'authentification LDAP seule
# ==--> (rajout de uid et commentaire de tout le reste pour laisser le soin à sql radius
# de gérer les personnalisations de comportement du portail
checkItem $GENERIC$ uid
#checkItem $GENERIC$ radiusCheckItem
#replyItem $GENERIC$ radiusReplyItem
 
#checkItem Auth-Type radiusAuthType
#checkItem Simultaneous-Use radiusSimultaneousUse
#checkItem Called-Station-Id radiusCalledStationId
#checkItem Calling-Station-Id radiusCallingStationId
#checkItem LM-Password lmPassword
#checkItem NT-Password ntPassword
#checkItem LM-Password sambaLmPassword
#checkItem NT-Password sambaNtPassword
#checkItem LM-Password dBCSPwd
#checkItem SMB-Account-CTRL-TEXT acctFlags
#checkItem SMB-Account-CTRL-TEXT sambaAcctFlags
#checkItem Expiration radiusExpiration
#checkItem NAS-IP-Address radiusNASIpAddress
#
#replyItem Service-Type radiusServiceType
#replyItem Framed-Protocol radiusFramedProtocol
#replyItem Framed-IP-Address radiusFramedIPAddress
#replyItem Framed-IP-Netmask radiusFramedIPNetmask
#replyItem Framed-Route radiusFramedRoute
#replyItem Framed-Routing radiusFramedRouting
#replyItem Filter-Id radiusFilterId
#replyItem Framed-MTU radiusFramedMTU
#replyItem Framed-Compression radiusFramedCompression
#replyItem Login-IP-Host radiusLoginIPHost
#replyItem Login-Service radiusLoginService
#replyItem Login-TCP-Port radiusLoginTCPPort
#replyItem Callback-Number radiusCallbackNumber
#replyItem Callback-Id radiusCallbackId
#replyItem Framed-IPX-Network radiusFramedIPXNetwork
#replyItem Class radiusClass
#replyItem Session-Timeout radiusSessionTimeout
#replyItem Idle-Timeout radiusIdleTimeout
#replyItem Termination-Action radiusTerminationAction
#replyItem Login-LAT-Service radiusLoginLATService
#replyItem Login-LAT-Node radiusLoginLATNode
#replyItem Login-LAT-Group radiusLoginLATGroup
#replyItem Framed-AppleTalk-Link radiusFramedAppleTalkLink
#replyItem Framed-AppleTalk-Network radiusFramedAppleTalkNetwork
#replyItem Framed-AppleTalk-Zone radiusFramedAppleTalkZone
#replyItem Port-Limit radiusPortLimit
#replyItem Login-LAT-Port radiusLoginLATPort
#replyItem Reply-Message radiusReplyMessage
/conf/alcasar-radius
0,0 → 1,503
######################################################################
#
# As of 2.0.0, FreeRADIUS supports virtual hosts using the
# "server" section, and configuration directives.
#
# Virtual hosts should be put into the "sites-available"
# directory. Soft links should be created in the "sites-enabled"
# directory to these files. This is done in a normal installation.
#
# $Id$
#
######################################################################
#
# Read "man radiusd" before editing this file. See the section
# titled DEBUGGING. It outlines a method where you can quickly
# obtain the configuration you want, without running into
# trouble. See also "man unlang", which documents the format
# of this file.
#
# This configuration is designed to work in the widest possible
# set of circumstances, with the widest possible number of
# authentication methods. This means that in general, you should
# need to make very few changes to this file.
#
# The best way to configure the server for your local system
# is to CAREFULLY edit this file. Most attempts to make large
# edits to this file will BREAK THE SERVER. Any edits should
# be small, and tested by running the server with "radiusd -X".
# Once the edits have been verified to work, save a copy of these
# configuration files somewhere. (e.g. as a "tar" file). Then,
# make more edits, and test, as above.
#
# There are many "commented out" references to modules such
# as ldap, sql, etc. These references serve as place-holders.
# If you need the functionality of that module, then configure
# it in radiusd.conf, and un-comment the references to it in
# this file. In most cases, those small changes will result
# in the server being able to connect to the DB, and to
# authenticate users.
#
######################################################################
 
#
# In 1.x, the "authorize", etc. sections were global in
# radiusd.conf. As of 2.0, they SHOULD be in a server section.
#
# The server section with no virtual server name is the "default"
# section. It is used when no server name is specified.
#
# We don't indent the rest of this file, because doing so
# would make it harder to read.
#
 
# Authorization. First preprocess (hints and huntgroups files),
# then realms, and finally look in the "users" file.
#
# The order of the realm modules will determine the order that
# we try to find a matching realm.
#
# Make *sure* that 'preprocess' comes before any realm if you
# need to setup hints for the remote radius server
authorize {
#
# The preprocess module takes care of sanitizing some bizarre
# attributes in the request, and turning them into attributes
# which are more standard.
#
# It takes care of processing the 'raddb/hints' and the
# 'raddb/huntgroups' files.
#
# It also adds the %{Client-IP-Address} attribute to the request.
preprocess
 
#
# If you want to have a log of authentication requests,
# un-comment the following line, and the 'detail auth_log'
# section, above.
# auth_log
 
#
# The chap module will set 'Auth-Type := CHAP' if we are
# handling a CHAP request and Auth-Type has not already been set
# chap
 
#
# If the users are logging in with an MS-CHAP-Challenge
# attribute for authentication, the mschap module will find
# the MS-CHAP-Challenge attribute, and add 'Auth-Type := MS-CHAP'
# to the request, which will cause the server to then use
# the mschap module for authentication.
# mschap
#
# If you have a Cisco SIP server authenticating against
# FreeRADIUS, uncomment the following line, and the 'digest'
# line in the 'authenticate' section.
# digest
 
#
# Look for IPASS style 'realm/', and if not found, look for
# '@realm', and decide whether or not to proxy, based on
# that.
# IPASS
 
#
# If you are using multiple kinds of realms, you probably
# want to set "ignore_null = yes" for all of them.
# Otherwise, when the first style of realm doesn't match,
# the other styles won't be checked.
#
# suffix
# ntdomain
 
#
# This module takes care of EAP-MD5, EAP-TLS, and EAP-LEAP
# authentication.
#
# It also sets the EAP-Type attribute in the request
# attribute list to the EAP type from the packet.
#
# As of 2.0, the EAP module returns "ok" in the authorize stage
# for TTLS and PEAP. In 1.x, it never returned "ok" here, so
# this change is compatible with older configurations.
#
# The example below uses module failover to avoid querying all
# of the following modules if the EAP module returns "ok".
# Therefore, your LDAP and/or SQL servers will not be queried
# for the many packets that go back and forth to set up TTLS
# or PEAP. The load on those servers will therefore be reduced.
#
# eap {
# ok = return
# }
 
#
# Pull crypt'd passwords from /etc/passwd or /etc/shadow,
# using the system API's to get the password. If you want
# to read /etc/passwd or /etc/shadow directly, see the
# passwd module in radiusd.conf.
#
# unix
 
#
# Read the 'users' file
# files
 
#
# Look in an SQL database. The schema of the database
# is meant to mirror the "users" file.
#
# See "Authorization Queries" in sql.conf
sql
noresetcounter
dailycounter
monthlycounter
#
# If you are using /etc/smbpasswd, and are also doing
# mschap authentication, the un-comment this line, and
# configure the 'etc_smbpasswd' module, above.
# etc_smbpasswd
 
#
# The ldap module will set Auth-Type to LDAP if it has not
# already been set
# ldap
 
#
# Enforce daily limits on time spent logged in.
# daily
 
#
# Use the checkval module
# checkval
 
expiration
logintime
 
#
# If no other module has claimed responsibility for
# authentication, then try to use PAP. This allows the
# other modules listed above to add a "known good" password
# to the request, and to do nothing else. The PAP module
# will then see that password, and use it to do PAP
# authentication.
#
# This module should be listed last, so that the other modules
# get a chance to set Auth-Type for themselves.
#
# pap
 
#
# If "status_server = yes", then Status-Server messages are passed
# through the following section, and ONLY the following section.
# This permits you to do DB queries, for example. If the modules
# listed here return "fail", then NO response is sent.
#
# Autz-Type Status-Server {
#
# }
}
 
 
# Authentication.
#
#
# This section lists which modules are available for authentication.
# Note that it does NOT mean 'try each module in order'. It means
# that a module from the 'authorize' section adds a configuration
# attribute 'Auth-Type := FOO'. That authentication type is then
# used to pick the apropriate module from the list below.
#
 
# In general, you SHOULD NOT set the Auth-Type attribute. The server
# will figure it out on its own, and will do the right thing. The
# most common side effect of erroneously setting the Auth-Type
# attribute is that one authentication method will work, but the
# others will not.
#
# The common reasons to set the Auth-Type attribute by hand
# is to either forcibly reject the user (Auth-Type := Reject),
# or to or forcibly accept the user (Auth-Type := Accept).
#
# Note that Auth-Type := Accept will NOT work with EAP.
#
# Please do not put "unlang" configurations into the "authenticate"
# section. Put them in the "post-auth" section instead. That's what
# the post-auth section is for.
#
authenticate {
# #
# # PAP authentication, when a back-end database listed
# # in the 'authorize' section supplies a password. The
# # password can be clear-text, or encrypted.
# Auth-Type PAP {
# pap
# }
#
# #
# # Most people want CHAP authentication
# # A back-end database listed in the 'authorize' section
# # MUST supply a CLEAR TEXT password. Encrypted passwords
# # won't work.
# Auth-Type CHAP {
# chap
# }
#
# #
# # MSCHAP authentication.
# Auth-Type MS-CHAP {
# mschap
# }
#
# #
# # If you have a Cisco SIP server authenticating against
# # FreeRADIUS, uncomment the following line, and the 'digest'
# # line in the 'authorize' section.
# digest
#
# #
# # Pluggable Authentication Modules.
# pam
#
# #
# # See 'man getpwent' for information on how the 'unix'
# # module checks the users password. Note that packets
# # containing CHAP-Password attributes CANNOT be authenticated
# # against /etc/passwd! See the FAQ for details.
# #
# unix
#
# # Uncomment it if you want to use ldap for authentication
# #
# # Note that this means "check plain-text password against
# # the ldap database", which means that EAP won't work,
# # as it does not supply a plain-text password.
# Auth-Type LDAP {
# ldap
# }
#
# #
# # Allow EAP authentication.
# eap
}
 
 
#
# Pre-accounting. Decide which accounting type to use.
#
preacct {
preprocess
 
#
# Ensure that we have a semi-unique identifier for every
# request, and many NAS boxes are broken.
# acct_unique
 
#
# Look for IPASS-style 'realm/', and if not found, look for
# '@realm', and decide whether or not to proxy, based on
# that.
#
# Accounting requests are generally proxied to the same
# home server as authentication requests.
# IPASS
# suffix
# ntdomain
 
#
# Read the 'acct_users' file
# files
}
 
#
# Accounting. Log the accounting data.
#
accounting {
#
# Create a 'detail'ed log of the packets.
# Note that accounting requests which are proxied
# are also logged in the detail file.
# detail
# daily
 
# Update the wtmp file
#
# If you don't use "radlast", you can delete this line.
# unix
 
#
# For Simultaneous-Use tracking.
#
# Due to packet losses in the network, the data here
# may be incorrect. There is little we can do about it.
# radutmp
sradutmp
 
# Return an address to the IP Pool when we see a stop record.
# main_pool
 
#
# Log traffic to an SQL database.
#
# See "Accounting queries" in sql.conf
sql
 
#
# Instead of sending the query to the SQL server,
# write it into a log file.
#
# sql_log
 
# Cisco VoIP specific bulk accounting
# pgsql-voip
 
# Filter attributes from the accounting response.
attr_filter.accounting_response
 
#
# See "Autz-Type Status-Server" for how this works.
#
# Acct-Type Status-Server {
#
# }
}
 
 
# Session database, used for checking Simultaneous-Use. Either the radutmp
# or rlm_sql module can handle this.
# The rlm_sql module is *much* faster
session {
# radutmp
 
#
# See "Simultaneous Use Checking Queries" in sql.conf
sql
}
 
 
# Post-Authentication
# Once we KNOW that the user has been authenticated, there are
# additional steps we can take.
post-auth {
# Get an address from the IP Pool.
# main_pool
 
#
# If you want to have a log of authentication replies,
# un-comment the following line, and the 'detail reply_log'
# section, above.
# reply_log
 
#
# After authenticating the user, do another SQL query.
#
# See "Authentication Logging Queries" in sql.conf
# sql
 
#
# Instead of sending the query to the SQL server,
# write it into a log file.
#
# sql_log
 
#
# Un-comment the following if you have set
# 'edir_account_policy_check = yes' in the ldap module sub-section of
# the 'modules' section.
#
# ldap
 
# exec
 
#
# Access-Reject packets are sent through the REJECT sub-section of the
# post-auth section.
#
# Add the ldap module name (or instance) if you have set
# 'edir_account_policy_check = yes' in the ldap module configuration
#
Post-Auth-Type REJECT {
attr_filter.access_reject
}
}
 
#
# When the server decides to proxy a request to a home server,
# the proxied request is first passed through the pre-proxy
# stage. This stage can re-write the request, or decide to
# cancel the proxy.
#
# Only a few modules currently have this method.
#
pre-proxy {
# attr_rewrite
 
# Uncomment the following line if you want to change attributes
# as defined in the preproxy_users file.
# files
 
# Uncomment the following line if you want to filter requests
# sent to remote servers based on the rules defined in the
# 'attrs.pre-proxy' file.
# attr_filter.pre-proxy
 
# If you want to have a log of packets proxied to a home
# server, un-comment the following line, and the
# 'detail pre_proxy_log' section, above.
# pre_proxy_log
}
 
#
# When the server receives a reply to a request it proxied
# to a home server, the request may be massaged here, in the
# post-proxy stage.
#
post-proxy {
 
# If you want to have a log of replies from a home server,
# un-comment the following line, and the 'detail post_proxy_log'
# section, above.
# post_proxy_log
 
# attr_rewrite
 
# Uncomment the following line if you want to filter replies from
# remote proxies based on the rules defined in the 'attrs' file.
# attr_filter.post-proxy
 
#
# If you are proxying LEAP, you MUST configure the EAP
# module, and you MUST list it here, in the post-proxy
# stage.
#
# You MUST also use the 'nostrip' option in the 'realm'
# configuration. Otherwise, the User-Name attribute
# in the proxied request will not match the user name
# hidden inside of the EAP packet, and the end server will
# reject the EAP request.
#
# eap
 
#
# If the server tries to proxy a request and fails, then the
# request is processed through the modules in this section.
#
# The main use of this section is to permit robust proxying
# of accounting packets. The server can be configured to
# proxy accounting packets as part of normal processing.
# Then, if the home server goes down, accounting packets can
# be logged to a local "detail" file, for processing with
# radrelay. When the home server comes back up, radrelay
# will read the detail file, and send the packets to the
# home server.
#
# With this configuration, the server always responds to
# Accounting-Requests from the NAS, but only writes
# accounting packets to disk if the home server is down.
#
# Post-Proxy-Type Fail {
# detail
# }
 
}
 
/conf/radiusd-db-vierge.sql
0,0 → 1,349
-- MySQL dump 10.11
--
-- Host: localhost Database: radius
-- ------------------------------------------------------
-- Server version 5.0.67
 
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
 
--
-- Current Database: `radius`
--
 
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `radius` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */;
 
USE `radius`;
 
--
-- Table structure for table `mtotacct`
--
 
DROP TABLE IF EXISTS `mtotacct`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `mtotacct` (
`MTotAcctId` bigint(21) NOT NULL auto_increment,
`UserName` varchar(64) collate utf8_unicode_ci NOT NULL default '',
`AcctDate` date NOT NULL default '0000-00-00',
`ConnNum` bigint(12) default NULL,
`ConnTotDuration` bigint(12) default NULL,
`ConnMaxDuration` bigint(12) default NULL,
`ConnMinDuration` bigint(12) default NULL,
`InputOctets` bigint(12) default NULL,
`OutputOctets` bigint(12) default NULL,
`NASIPAddress` varchar(15) collate utf8_unicode_ci default NULL,
PRIMARY KEY (`MTotAcctId`),
KEY `UserName` (`UserName`),
KEY `AcctDate` (`AcctDate`),
KEY `UserOnDate` (`UserName`,`AcctDate`),
KEY `NASIPAddress` (`NASIPAddress`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SET character_set_client = @saved_cs_client;
 
--
-- Dumping data for table `mtotacct`
--
 
LOCK TABLES `mtotacct` WRITE;
/*!40000 ALTER TABLE `mtotacct` DISABLE KEYS */;
/*!40000 ALTER TABLE `mtotacct` ENABLE KEYS */;
UNLOCK TABLES;
 
--
-- Table structure for table `radacct`
--
 
DROP TABLE IF EXISTS `radacct`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `radacct` (
`radacctid` bigint(21) NOT NULL auto_increment,
`acctsessionid` varchar(32) collate utf8_unicode_ci NOT NULL default '',
`acctuniqueid` varchar(32) collate utf8_unicode_ci NOT NULL default '',
`username` varchar(64) collate utf8_unicode_ci NOT NULL default '',
`groupname` varchar(64) collate utf8_unicode_ci NOT NULL default '',
`realm` varchar(64) collate utf8_unicode_ci default '',
`nasipaddress` varchar(15) collate utf8_unicode_ci NOT NULL default '',
`nasportid` varchar(15) collate utf8_unicode_ci default NULL,
`nasporttype` varchar(32) collate utf8_unicode_ci default NULL,
`acctstarttime` datetime default NULL,
`acctstoptime` datetime default NULL,
`acctsessiontime` int(12) default NULL,
`acctauthentic` varchar(32) collate utf8_unicode_ci default NULL,
`connectinfo_start` varchar(50) collate utf8_unicode_ci default NULL,
`connectinfo_stop` varchar(50) collate utf8_unicode_ci default NULL,
`acctinputoctets` bigint(20) default NULL,
`acctoutputoctets` bigint(20) default NULL,
`calledstationid` varchar(50) collate utf8_unicode_ci NOT NULL default '',
`callingstationid` varchar(50) collate utf8_unicode_ci NOT NULL default '',
`acctterminatecause` varchar(32) collate utf8_unicode_ci NOT NULL default '',
`servicetype` varchar(32) collate utf8_unicode_ci default NULL,
`framedprotocol` varchar(32) collate utf8_unicode_ci default NULL,
`framedipaddress` varchar(15) collate utf8_unicode_ci NOT NULL default '',
`acctstartdelay` int(12) default NULL,
`acctstopdelay` int(12) default NULL,
`xascendsessionsvrkey` varchar(10) collate utf8_unicode_ci default NULL,
PRIMARY KEY (`radacctid`),
KEY `username` (`username`),
KEY `framedipaddress` (`framedipaddress`),
KEY `acctsessionid` (`acctsessionid`),
KEY `acctsessiontime` (`acctsessiontime`),
KEY `acctuniqueid` (`acctuniqueid`),
KEY `acctstarttime` (`acctstarttime`),
KEY `acctstoptime` (`acctstoptime`),
KEY `nasipaddress` (`nasipaddress`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SET character_set_client = @saved_cs_client;
 
--
-- Dumping data for table `radacct`
--
 
LOCK TABLES `radacct` WRITE;
/*!40000 ALTER TABLE `radacct` DISABLE KEYS */;
/*!40000 ALTER TABLE `radacct` ENABLE KEYS */;
UNLOCK TABLES;
 
--
-- Table structure for table `radcheck`
--
 
DROP TABLE IF EXISTS `radcheck`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `radcheck` (
`id` int(11) unsigned NOT NULL auto_increment,
`username` varchar(64) collate utf8_unicode_ci NOT NULL default '',
`attribute` varchar(32) collate utf8_unicode_ci NOT NULL default '',
`op` char(2) collate utf8_unicode_ci NOT NULL default '==',
`value` varchar(253) collate utf8_unicode_ci NOT NULL default '',
PRIMARY KEY (`id`),
KEY `username` (`username`(32))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SET character_set_client = @saved_cs_client;
 
--
-- Dumping data for table `radcheck`
--
 
LOCK TABLES `radcheck` WRITE;
/*!40000 ALTER TABLE `radcheck` DISABLE KEYS */;
/*!40000 ALTER TABLE `radcheck` ENABLE KEYS */;
UNLOCK TABLES;
 
--
-- Table structure for table `radgroupcheck`
--
 
DROP TABLE IF EXISTS `radgroupcheck`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `radgroupcheck` (
`id` int(11) unsigned NOT NULL auto_increment,
`groupname` varchar(64) collate utf8_unicode_ci NOT NULL default '',
`attribute` varchar(32) collate utf8_unicode_ci NOT NULL default '',
`op` char(2) collate utf8_unicode_ci NOT NULL default '==',
`value` varchar(253) collate utf8_unicode_ci NOT NULL default '',
PRIMARY KEY (`id`),
KEY `groupname` (`groupname`(32))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SET character_set_client = @saved_cs_client;
 
--
-- Dumping data for table `radgroupcheck`
--
 
LOCK TABLES `radgroupcheck` WRITE;
/*!40000 ALTER TABLE `radgroupcheck` DISABLE KEYS */;
/*!40000 ALTER TABLE `radgroupcheck` ENABLE KEYS */;
UNLOCK TABLES;
 
--
-- Table structure for table `radgroupreply`
--
 
DROP TABLE IF EXISTS `radgroupreply`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `radgroupreply` (
`id` int(11) unsigned NOT NULL auto_increment,
`groupname` varchar(64) collate utf8_unicode_ci NOT NULL default '',
`attribute` varchar(32) collate utf8_unicode_ci NOT NULL default '',
`op` char(2) collate utf8_unicode_ci NOT NULL default '=',
`value` varchar(253) collate utf8_unicode_ci NOT NULL default '',
PRIMARY KEY (`id`),
KEY `groupname` (`groupname`(32))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SET character_set_client = @saved_cs_client;
 
--
-- Dumping data for table `radgroupreply`
--
 
LOCK TABLES `radgroupreply` WRITE;
/*!40000 ALTER TABLE `radgroupreply` DISABLE KEYS */;
/*!40000 ALTER TABLE `radgroupreply` ENABLE KEYS */;
UNLOCK TABLES;
 
--
-- Table structure for table `radpostauth`
--
 
DROP TABLE IF EXISTS `radpostauth`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `radpostauth` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(64) collate utf8_unicode_ci NOT NULL default '',
`reply` varchar(32) collate utf8_unicode_ci NOT NULL default '',
`authdate` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SET character_set_client = @saved_cs_client;
 
--
-- Dumping data for table `radpostauth`
--
 
LOCK TABLES `radpostauth` WRITE;
/*!40000 ALTER TABLE `radpostauth` DISABLE KEYS */;
/*!40000 ALTER TABLE `radpostauth` ENABLE KEYS */;
UNLOCK TABLES;
 
--
-- Table structure for table `radreply`
--
 
DROP TABLE IF EXISTS `radreply`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `radreply` (
`id` int(11) unsigned NOT NULL auto_increment,
`username` varchar(64) collate utf8_unicode_ci NOT NULL default '',
`attribute` varchar(32) collate utf8_unicode_ci NOT NULL default '',
`op` char(2) collate utf8_unicode_ci NOT NULL default '=',
`value` varchar(253) collate utf8_unicode_ci NOT NULL default '',
PRIMARY KEY (`id`),
KEY `username` (`username`(32))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SET character_set_client = @saved_cs_client;
 
--
-- Dumping data for table `radreply`
--
 
LOCK TABLES `radreply` WRITE;
/*!40000 ALTER TABLE `radreply` DISABLE KEYS */;
/*!40000 ALTER TABLE `radreply` ENABLE KEYS */;
UNLOCK TABLES;
 
--
-- Table structure for table `radusergroup`
--
 
DROP TABLE IF EXISTS `radusergroup`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `radusergroup` (
`username` varchar(64) collate utf8_unicode_ci NOT NULL default '',
`groupname` varchar(64) collate utf8_unicode_ci NOT NULL default '',
`priority` int(11) NOT NULL default '1',
KEY `username` (`username`(32))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SET character_set_client = @saved_cs_client;
 
--
-- Dumping data for table `radusergroup`
--
 
LOCK TABLES `radusergroup` WRITE;
/*!40000 ALTER TABLE `radusergroup` DISABLE KEYS */;
/*!40000 ALTER TABLE `radusergroup` ENABLE KEYS */;
UNLOCK TABLES;
 
--
-- Table structure for table `totacct`
--
 
DROP TABLE IF EXISTS `totacct`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `totacct` (
`TotAcctId` bigint(21) NOT NULL auto_increment,
`UserName` varchar(64) collate utf8_unicode_ci NOT NULL default '',
`AcctDate` date NOT NULL default '0000-00-00',
`ConnNum` bigint(12) default NULL,
`ConnTotDuration` bigint(12) default NULL,
`ConnMaxDuration` bigint(12) default NULL,
`ConnMinDuration` bigint(12) default NULL,
`InputOctets` bigint(12) default NULL,
`OutputOctets` bigint(12) default NULL,
`NASIPAddress` varchar(15) collate utf8_unicode_ci default NULL,
PRIMARY KEY (`TotAcctId`),
KEY `UserName` (`UserName`),
KEY `AcctDate` (`AcctDate`),
KEY `UserOnDate` (`UserName`,`AcctDate`),
KEY `NASIPAddress` (`NASIPAddress`),
KEY `NASIPAddressOnDate` (`AcctDate`,`NASIPAddress`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SET character_set_client = @saved_cs_client;
 
--
-- Dumping data for table `totacct`
--
 
LOCK TABLES `totacct` WRITE;
/*!40000 ALTER TABLE `totacct` DISABLE KEYS */;
/*!40000 ALTER TABLE `totacct` ENABLE KEYS */;
UNLOCK TABLES;
 
--
-- Table structure for table `userinfo`
--
 
DROP TABLE IF EXISTS `userinfo`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `userinfo` (
`id` int(10) NOT NULL auto_increment,
`UserName` varchar(30) collate utf8_unicode_ci default NULL,
`Name` varchar(200) collate utf8_unicode_ci default NULL,
`Mail` varchar(200) collate utf8_unicode_ci default NULL,
`Department` varchar(200) collate utf8_unicode_ci default NULL,
`WorkPhone` varchar(200) collate utf8_unicode_ci default NULL,
`HomePhone` varchar(200) collate utf8_unicode_ci default NULL,
`Mobile` varchar(200) collate utf8_unicode_ci default NULL,
PRIMARY KEY (`id`),
KEY `UserName` (`UserName`),
KEY `Department` (`Department`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SET character_set_client = @saved_cs_client;
 
--
-- Dumping data for table `userinfo`
--
 
LOCK TABLES `userinfo` WRITE;
/*!40000 ALTER TABLE `userinfo` DISABLE KEYS */;
/*!40000 ALTER TABLE `userinfo` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
 
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
 
-- Dump completed on 2009-01-01 21:20:42
/conf/blacklists.tar.gz
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/conf/dansguardian-init
0,0 → 1,103
#!/bin/sh
#
# Startup script for dansguardian
#
# chkconfig: 345 92 8
# description: A web content filtering plugin for web \
# proxies, developed to filter using lists of \
# banned phrases, MIME types, filename \
# extensions and PICS labelling.
# processname: dansguardian
# pidfile: /var/run/dansguardian.pid
# config: /etc/dansguardian/dansguardian.conf
 
### BEGIN INIT INFO
# Provides: dansguardian
# Required-Start: $network
# Required-Stop: $network
# Should-Start: $named
# Should-Stop: $named
# Default-Start: 3 4 5
# Short-Description: Starts the dansguardian daemon
# Description: A web content filtering plugin for web \
# proxies, developed to filter using lists of \
# banned phrases, MIME types, filename \
# extensions and PICS labelling.
### END INIT INFO
 
# Source function library.
. /etc/rc.d/init.d/functions
 
# Source networking configuration.
. /etc/sysconfig/network
 
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
 
RETVAL=0
 
start() {
gprintf "Starting dansguardian: "
daemon dansguardian
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/dansguardian
return $RETVAL
}
 
stop() {
gprintf "Shutting down dansguardian: "
killproc dansguardian
if [ ! -z "`pidof dansguardian`" ]; then
echo
gprintf "Giving dansguardian more time to exit: "
while [ ! -z "`pidof dansguardian`" ]; do echo -n "."; sleep 1; done && success || failure
fi
echo
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dansguardian /var/run/dansguardian/dansguardian.pid \
/var/lib/dansguardian/.dguardianipc /var/lib/dansguardian/.dguardianurlipc \
/var/lib/dansguardian/.dguardianipipc
return $RETVAL
}
 
restart() {
stop
start
}
 
reload() {
gprintf "Reloading dansguardian: "
killproc dansguardian -HUP
RETVAL=$?
echo
return $RETVAL
}
 
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
condrestart)
[ -e /var/lock/subsys/dansguardian ] && restart
RETVAL=$?
;;
status)
status dansguardian
RETVAL=$?
;;
*)
gprintf "Usage: %s {start|stop|restart|reload|condrestart|status}\n" "$0"
RETVAL=1
esac
 
exit $RETVAL
/conf/rpms-update/python-coova-chilli-1.2.1-1mdv2010.0.noarch.rpm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/conf/rpms-update/coova-chilli-1.2.1-1mdv2010.0.i586.rpm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/conf/rpms-update/libchilli0-1.2.1-1mdv2010.0.i586.rpm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/conf/rpms-update/mindi-2.0.7.1-1.mdv2010.0.i586.rpm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/conf/bashrc
0,0 → 1,46
# /etc/bashrc
 
# System wide functions and aliases
# Environment stuff goes in /etc/profile
 
# by default, we want this to get set.
# Even for non-interactive, non-login shells.
if [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]; then
umask 002
else
umask 022
fi
 
# are we an interactive shell?
if [ "$PS1" ]; then
case $TERM in
xterm*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
;;
*)
;;
esac
# [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
if [ `id -un` = root ]; then
PS1='\[\033[1;31m\]\h:\w\$\[\033[0m\] '
else
PS1='\[\033[1;30m\]\h:\w\$\[\033[0m\] '
fi
if [ -z "$loginsh" ]; then # We're not a login shell
# Not all scripts in profile.d are compatible with other shells
# TODO: make the scripts compatible or check the running shell by
# themselves.
if [ -n "${BASH_VERSION}${KSH_VERSION}${ZSH_VERSION}" ]; then
for i in /etc/profile.d/*.sh; do
if [ -x $i ]; then
. $i
fi
done
unset i
fi
fi
fi
 
unset loginsh
/conf/dialup.conf
0,0 → 1,303
# -*- text -*-
##
## dialup.conf -- MySQL configuration for default schema (schema.sql)
##
## $Id$
 
# Safe characters list for sql queries. Everything else is replaced
# with their mime-encoded equivalents.
# The default list should be ok
#safe-characters = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /"
 
#######################################################################
# Query config: Username
#######################################################################
# This is the username that will get substituted, escaped, and added
# as attribute 'SQL-User-Name'. '%{SQL-User-Name}' should be used below
# everywhere a username substitution is needed so you you can be sure
# the username passed from the client is escaped properly.
#
# Uncomment the next line, if you want the sql_user_name to mean:
#
# Use Stripped-User-Name, if it's there.
# Else use User-Name, if it's there,
# Else use hard-coded string "DEFAULT" as the user name.
#sql_user_name = "%{%{Stripped-User-Name}:-%{%{User-Name}:-DEFAULT}}"
#
sql_user_name = "%{User-Name}"
 
#######################################################################
# Default profile
#######################################################################
# This is the default profile. It is found in SQL by group membership.
# That means that this profile must be a member of at least one group
# which will contain the corresponding check and reply items.
# This profile will be queried in the authorize section for every user.
# The point is to assign all users a default profile without having to
# manually add each one to a group that will contain the profile.
# The SQL module will also honor the User-Profile attribute. This
# attribute can be set anywhere in the authorize section (ie the users
# file). It is found exactly as the default profile is found.
# If it is set then it will *overwrite* the default profile setting.
# The idea is to select profiles based on checks on the incoming packets,
# not on user group membership. For example:
# -- users file --
# DEFAULT Service-Type == Outbound-User, User-Profile := "outbound"
# DEFAULT Service-Type == Framed-User, User-Profile := "framed"
#
# By default the default_user_profile is not set
#
#default_user_profile = "DEFAULT"
 
#######################################################################
# NAS Query
#######################################################################
# This query retrieves the radius clients
#
# 0. Row ID (currently unused)
# 1. Name (or IP address)
# 2. Shortname
# 3. Type
# 4. Secret
#######################################################################
 
nas_query = "SELECT id, nasname, shortname, type, secret FROM ${nas_table}"
 
#######################################################################
# Authorization Queries
#######################################################################
# These queries compare the check items for the user
# in ${authcheck_table} and setup the reply items in
# ${authreply_table}. You can use any query/tables
# you want, but the return data for each row MUST
# be in the following order:
#
# 0. Row ID (currently unused)
# 1. UserName/GroupName
# 2. Item Attr Name
# 3. Item Attr Value
# 4. Item Attr Operation
#######################################################################
# Use these for case sensitive usernames.
authorize_check_query = "SELECT id, username, attribute, value, op \
FROM ${authcheck_table} \
WHERE username = BINARY '%{SQL-User-Name}' \
ORDER BY id"
authorize_reply_query = "SELECT id, username, attribute, value, op \
FROM ${authreply_table} \
WHERE username = BINARY '%{SQL-User-Name}' \
ORDER BY id"
 
# The default queries are case insensitive. (for compatibility with
# older versions of FreeRADIUS)
# authorize_check_query = "SELECT id, username, attribute, value, op \
# FROM ${authcheck_table} \
# WHERE username = '%{SQL-User-Name}' \
# ORDER BY id"
# authorize_reply_query = "SELECT id, username, attribute, value, op \
# FROM ${authreply_table} \
# WHERE username = '%{SQL-User-Name}' \
# ORDER BY id"
 
# Use these for case sensitive usernames.
group_membership_query = "SELECT groupname \
FROM ${usergroup_table} \
WHERE username = BINARY '%{SQL-User-Name}' \
ORDER BY priority"
 
# group_membership_query = "SELECT groupname \
# FROM ${usergroup_table} \
# WHERE username = '%{SQL-User-Name}' \
# ORDER BY priority"
 
authorize_group_check_query = "SELECT id, groupname, attribute, \
Value, op \
FROM ${groupcheck_table} \
WHERE groupname = '%{Sql-Group}' \
ORDER BY id"
authorize_group_reply_query = "SELECT id, groupname, attribute, \
value, op \
FROM ${groupreply_table} \
WHERE groupname = '%{Sql-Group}' \
ORDER BY id"
 
#######################################################################
# Accounting Queries
#######################################################################
# accounting_onoff_query - query for Accounting On/Off packets
# accounting_update_query - query for Accounting update packets
# accounting_update_query_alt - query for Accounting update packets
# (alternate in case first query fails)
# accounting_start_query - query for Accounting start packets
# accounting_start_query_alt - query for Accounting start packets
# (alternate in case first query fails)
# accounting_stop_query - query for Accounting stop packets
# accounting_stop_query_alt - query for Accounting start packets
# (alternate in case first query doesn't
# affect any existing rows in the table)
#######################################################################
accounting_onoff_query = "\
UPDATE ${acct_table1} \
SET \
acctstoptime = '%S', \
acctsessiontime = unix_timestamp('%S') - \
unix_timestamp(acctstarttime), \
acctterminatecause = '%{Acct-Terminate-Cause}', \
acctstopdelay = %{%{Acct-Delay-Time}:-0} \
WHERE acctstoptime IS NULL \
AND nasipaddress = '%{NAS-IP-Address}' \
AND acctstarttime <= '%S'"
 
accounting_update_query = " \
UPDATE ${acct_table1} \
SET \
framedipaddress = '%{Framed-IP-Address}', \
acctsessiontime = '%{Acct-Session-Time}', \
acctinputoctets = '%{%{Acct-Input-Gigawords}:-0}' << 32 | \
'%{%{Acct-Input-Octets}:-0}', \
acctoutputoctets = '%{%{Acct-Output-Gigawords}:-0}' << 32 | \
'%{%{Acct-Output-Octets}:-0}' \
WHERE acctsessionid = '%{Acct-Session-Id}' \
AND username = '%{SQL-User-Name}' \
AND nasipaddress = '%{NAS-IP-Address}'"
 
accounting_update_query_alt = " \
INSERT INTO ${acct_table1} \
(acctsessionid, acctuniqueid, username, \
realm, nasipaddress, nasportid, \
nasporttype, acctstarttime, acctsessiontime, \
acctauthentic, connectinfo_start, acctinputoctets, \
acctoutputoctets, calledstationid, callingstationid, \
servicetype, framedprotocol, framedipaddress, \
acctstartdelay, xascendsessionsvrkey) \
VALUES \
('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', \
'%{SQL-User-Name}', \
'%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', \
'%{NAS-Port-Type}', \
DATE_SUB('%S', \
INTERVAL (%{%{Acct-Session-Time}:-0} + \
%{%{Acct-Delay-Time}:-0}) SECOND), \
'%{Acct-Session-Time}', \
'%{Acct-Authentic}', '', \
'%{%{Acct-Input-Gigawords}:-0}' << 32 | \
'%{%{Acct-Input-Octets}:-0}', \
'%{%{Acct-Output-Gigawords}:-0}' << 32 | \
'%{%{Acct-Output-Octets}:-0}', \
'%{Called-Station-Id}', '%{Calling-Station-Id}', \
'%{Service-Type}', '%{Framed-Protocol}', \
'%{Framed-IP-Address}', \
'0', '%{X-Ascend-Session-Svr-Key}')"
 
accounting_start_query = " \
INSERT INTO ${acct_table1} \
(acctsessionid, acctuniqueid, username, \
realm, nasipaddress, nasportid, \
nasporttype, acctstarttime, acctstoptime, \
acctsessiontime, acctauthentic, connectinfo_start, \
connectinfo_stop, acctinputoctets, acctoutputoctets, \
calledstationid, callingstationid, acctterminatecause, \
servicetype, framedprotocol, framedipaddress, \
acctstartdelay, acctstopdelay, xascendsessionsvrkey) \
VALUES \
('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', \
'%{SQL-User-Name}', \
'%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', \
'%{NAS-Port-Type}', '%S', NULL, \
'0', '%{Acct-Authentic}', '%{Connect-Info}', \
'', '0', '0', \
'%{Called-Station-Id}', '%{Calling-Station-Id}', '', \
'%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', \
'%{%{Acct-Delay-Time}:-0}', '0', '%{X-Ascend-Session-Svr-Key}')"
 
accounting_start_query_alt = " \
UPDATE ${acct_table1} SET \
acctstarttime = '%S', \
acctstartdelay = '%{%{Acct-Delay-Time}:-0}', \
connectinfo_start = '%{Connect-Info}' \
WHERE acctsessionid = '%{Acct-Session-Id}' \
AND username = '%{SQL-User-Name}' \
AND nasipaddress = '%{NAS-IP-Address}'"
 
accounting_stop_query = " \
UPDATE ${acct_table2} SET \
acctstoptime = '%S', \
acctsessiontime = '%{Acct-Session-Time}', \
acctinputoctets = '%{%{Acct-Input-Gigawords}:-0}' << 32 | \
'%{%{Acct-Input-Octets}:-0}', \
acctoutputoctets = '%{%{Acct-Output-Gigawords}:-0}' << 32 | \
'%{%{Acct-Output-Octets}:-0}', \
acctterminatecause = '%{Acct-Terminate-Cause}', \
acctstopdelay = '%{%{Acct-Delay-Time}:-0}', \
connectinfo_stop = '%{Connect-Info}' \
WHERE acctsessionid = '%{Acct-Session-Id}' \
AND username = '%{SQL-User-Name}' \
AND nasipaddress = '%{NAS-IP-Address}'"
 
accounting_stop_query_alt = " \
INSERT INTO ${acct_table2} \
(acctsessionid, acctuniqueid, username, \
realm, nasipaddress, nasportid, \
nasporttype, acctstarttime, acctstoptime, \
acctsessiontime, acctauthentic, connectinfo_start, \
connectinfo_stop, acctinputoctets, acctoutputoctets, \
calledstationid, callingstationid, acctterminatecause, \
servicetype, framedprotocol, framedipaddress, \
acctstartdelay, acctstopdelay) \
VALUES \
('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', \
'%{SQL-User-Name}', \
'%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', \
'%{NAS-Port-Type}', \
DATE_SUB('%S', \
INTERVAL (%{%{Acct-Session-Time}:-0} + \
%{%{Acct-Delay-Time}:-0}) SECOND), \
'%S', '%{Acct-Session-Time}', '%{Acct-Authentic}', '', \
'%{Connect-Info}', \
'%{%{Acct-Input-Gigawords}:-0}' << 32 | \
'%{%{Acct-Input-Octets}:-0}', \
'%{%{Acct-Output-Gigawords}:-0}' << 32 | \
'%{%{Acct-Output-Octets}:-0}', \
'%{Called-Station-Id}', '%{Calling-Station-Id}', \
'%{Acct-Terminate-Cause}', \
'%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', \
'0', '%{%{Acct-Delay-Time}:-0}')"
 
#######################################################################
# Simultaneous Use Checking Queries
#######################################################################
# simul_count_query - query for the number of current connections
# - If this is not defined, no simultaneouls use checking
# - will be performed by this module instance
# simul_verify_query - query to return details of current connections for verification
# - Leave blank or commented out to disable verification step
# - Note that the returned field order should not be changed.
#######################################################################
 
# Uncomment simul_count_query to enable simultaneous use checking
simul_count_query = "SELECT COUNT(*) \
FROM ${acct_table1} \
WHERE username = '%{SQL-User-Name}' \
AND acctstoptime IS NULL"
 
#simul_verify_query = "SELECT radacctid, acctsessionid, username, \
#nasipaddress, nasportid, framedipaddress, \
#callingstationid, framedprotocol \
#FROM ${acct_table1} \
#WHERE username = '%{SQL-User-Name}' \
#AND acctstoptime IS NULL"
 
#######################################################################
# Authentication Logging Queries
#######################################################################
# postauth_query - Insert some info after authentication
#######################################################################
# (username, pass, reply, authdate) \
# '%{%{User-Password}:-%{Chap-Password}}', \
 
postauth_query = "INSERT INTO ${postauth_table} \
(username, reply, authdate) \
VALUES ( \
'%{User-Name}', \
'%{reply:Packet-Type}', '%S')"
 
/conf/bannedurllist
0,0 → 1,41
# site de test :
badboys.com
 
#univ-toulouse url/blacklists collection.
.Include</etc/dansguardian/lists/blacklists/adult/urls>
.Include</etc/dansguardian/lists/blacklists/agressif/urls>
#.Include</etc/dansguardian/lists/blacklists/astrology/urls>
#.Include</etc/dansguardian/lists/blacklists/audio-video/urls>
#.Include</etc/dansguardian/lists/blacklists/blog/urls>
#.Include</etc/dansguardian/lists/blacklists/celebrity/urls>
#.Include</etc/dansguardian/lists/blacklists/child/urls>
#.Include</etc/dansguardian/lists/blacklists/cleaning/urls>
.Include</etc/dansguardian/lists/blacklists/dangerous_material/urls>
.Include</etc/dansguardian/lists/blacklists/dating/urls>
.Include</etc/dansguardian/lists/blacklists/drogue/urls>
#.Include</etc/dansguardian/lists/blacklists/filehosting/urls>
#.Include</etc/dansguardian/lists/blacklists/financial/urls>
#.Include</etc/dansguardian/lists/blacklists/forums/urls>
.Include</etc/dansguardian/lists/blacklists/gambling/urls>
#.Include</etc/dansguardian/lists/blacklists/games/urls>
.Include</etc/dansguardian/lists/blacklists/hacking/urls>
.Include</etc/dansguardian/lists/blacklists/malware/urls>
#.Include</etc/dansguardian/lists/blacklists/manga/urls>
.Include</etc/dansguardian/lists/blacklists/marketingware/urls>
.Include</etc/dansguardian/lists/blacklists/mixed_adult/urls>
#.Include</etc/dansguardian/lists/blacklists/mobile-phone/urls>
.Include</etc/dansguardian/lists/blacklists/phishing/urls>
#.Include</etc/dansguardian/lists/blacklists/publicite/urls>
#.Include</etc/dansguardian/lists/blacklists/radio/urls>
#.Include</etc/dansguardian/lists/blacklists/reaffected/urls>
.Include</etc/dansguardian/lists/blacklists/redirector/urls>
.Include</etc/dansguardian/lists/blacklists/sect/urls>
#.Include</etc/dansguardian/lists/blacklists/sexual_education/urls>
#.Include</etc/dansguardian/lists/blacklists/shopping/urls>
.Include</etc/dansguardian/lists/blacklists/strict_redirector/urls>
.Include</etc/dansguardian/lists/blacklists/strong_redirector/urls>
.Include</etc/dansguardian/lists/blacklists/tricheur/urls>
.Include</etc/dansguardian/lists/blacklists/warez/urls>
#.Include</etc/dansguardian/lists/blacklists/webmail/urls>
 
.Include</etc/dansguardian/lists/blacklists/ossi/urls>
/conf/bannedsitelist
0,0 → 1,41
# site de test :
badboys.com
 
#univ-toulouse url/blacklists collection.
.Include</etc/dansguardian/lists/blacklists/adult/domains>
.Include</etc/dansguardian/lists/blacklists/agressif/domains>
#.Include</etc/dansguardian/lists/blacklists/astrology/domains>
#.Include</etc/dansguardian/lists/blacklists/audio-video/domains>
#.Include</etc/dansguardian/lists/blacklists/blog/domains>
#.Include</etc/dansguardian/lists/blacklists/celebrity/domains>
#.Include</etc/dansguardian/lists/blacklists/child/domains>
#.Include</etc/dansguardian/lists/blacklists/cleaning/domains>
.Include</etc/dansguardian/lists/blacklists/dangerous_material/domains>
.Include</etc/dansguardian/lists/blacklists/dating/domains>
.Include</etc/dansguardian/lists/blacklists/drogue/domains>
#.Include</etc/dansguardian/lists/blacklists/filehosting/domains>
#.Include</etc/dansguardian/lists/blacklists/financial/domains>
#.Include</etc/dansguardian/lists/blacklists/forums/domains>
.Include</etc/dansguardian/lists/blacklists/gambling/domains>
#.Include</etc/dansguardian/lists/blacklists/games/domains>
.Include</etc/dansguardian/lists/blacklists/hacking/domains>
.Include</etc/dansguardian/lists/blacklists/malware/domains>
#.Include</etc/dansguardian/lists/blacklists/manga/domains>
.Include</etc/dansguardian/lists/blacklists/marketingware/domains>
.Include</etc/dansguardian/lists/blacklists/mixed_adult/domains>
#.Include</etc/dansguardian/lists/blacklists/mobile-phone/domains>
.Include</etc/dansguardian/lists/blacklists/phishing/domains>
#.Include</etc/dansguardian/lists/blacklists/publicite/domains>
#.Include</etc/dansguardian/lists/blacklists/radio/domains>
#.Include</etc/dansguardian/lists/blacklists/reaffected/domains>
.Include</etc/dansguardian/lists/blacklists/redirector/domains>
.Include</etc/dansguardian/lists/blacklists/sect/domains>
#.Include</etc/dansguardian/lists/blacklists/sexual_education/domains>
#.Include</etc/dansguardian/lists/blacklists/shopping/domains>
.Include</etc/dansguardian/lists/blacklists/strict_redirector/domains>
.Include</etc/dansguardian/lists/blacklists/strong_redirector/domains>
.Include</etc/dansguardian/lists/blacklists/tricheur/domains>
.Include</etc/dansguardian/lists/blacklists/warez/domains>
#.Include</etc/dansguardian/lists/blacklists/webmail/domains>
 
.Include</etc/dansguardian/lists/blacklists/ossi/domains>
/CHANGELOG
0,0 → 1,304
************ CHANGELOG ***********
31/03/10 - prise en compte version 'stable' et 'devel" dans la page de garde
- correction bug (adresse en 0.0.0.0 du menu activité)
29/03/10 - mise en place des properties svn avec $Revision $Date
27/03/10 - mise en place des exceptions au filtrage (web + réseau). Correction bug utf8.
14/03/10 - "alcasar.sh" : modif config carte eth0 (dns local et ifcfg-eth0.default)
13/03/10 - bascule du développement sur subversion
11/02/10 - "alcasar.sh" : debug de la partie "mise à jour" + ajout de la zone reverse (localdomain.rev)
09/02/10 - "alcasar.sh" : correction config coova (les DNS sont pré-renseignés dans la conf par défaut). Ajout de l'entrée "alcasar" dans la zone DNS "localdomain"
- "alcasar.CA" : renommage des "OU" et préparation d'un deuxième certificat serveur pour le CN "alcasar"
08/02/10 - "alcasar.sh", "alcasar-conf.sh" : procedure externe pour créer l'archive des fichiers de conf
07/02/10 - "alcasar.sh", "alcasar-uninstall.sh", "alcasar-CA.sh", "alcasar-conf.sh" : réécriture de la procédure de mise à jour
- "alcasar-iptables.sh" : suppression DNS sur TCP (uniquement UDP)
- "alcasar-urpmi.sh" : prise en compte de la "mirrorlist" centralisée chez Mandriva
03/02/10 - "alcasar.sh" : suppression des daemons ifplugd associés à chaque carte réseau (mii_not_suported=yes)
- : durcissement de l'entrée du nom d'organisme (pour les 2 mains gauches ;-) )
- "service.php" : ajout du service "named"
29/01/10 - "alcasar-iptables.sh" : rajout des redirections et autorisations tcp domain dans parefeu
- "alcasar.sh" : activation du DNS bind [install uninstall(alcasar-uninstall.sh) et update]
27/01/10 - "intercept.php" : intégration de la variable "userurl" dans les arguments de la demande d'authentification afin que la page demandée par l'usager soit prise en compte par le cache ARP de chilli (et donc affichée après l'authentification) ouf... ;-)
24/01/10 - "intercept.php" : suppression caractères superflus ("\"). Ajout variable "urladmin" : permet de choisir la page chargée après authentification
- "alcasar.sh" : fonction 'chilli' -> creation du fichier d'exception par @mac (alcasar-macallowed)
- "menu.php", "auth.php", "filtering.php" : modification du menu
- "exception.php" : intégration php de la gestion des exceptions par @MAC + traduction
20/01/10 - "alcasar-iptables-filter.sh" : correction bug sur le nom du chemin du fichier ligne 30
- "alcasar-iptables.sh" : intégration Bind ( mais non activé )
- "alcasar.sh" : + intégration de Bind ( mais non actif pour le moment )
+- Intégration de param_bind dans menu -install et -update
+- ln et modification de /etc/trusted_network_acl.conf ( LAN autorisé à query )
+ radius et update RPM : --> suite aux problèmes d'update RPM ( à affiner si suppression de certains modules radius ( rlm_, etc...)
+- rajout/modification de droits msec sur /etc/raddb
+- touch sur control-socket, default et inner-tunnel sous /etc/raddb/site-enabled (ln rajoutés par un update RPM de freeradius systématiquement ... et qui empêche le démarrage de radius)
19/01/10 - "alcasar.sh" : mise à jour de l'install ntpd ("ntpdate" étant devenu obsolète)
- "alcasar-uninstall.sh" : suppression des spécificités de la V1.7
17/01/10 - intercept.php : correction bug (compatibilité ie8).
- mise à jour du répertoire "conf/rpms-update" (rpm de "mindi" compatible ext4)
- "alcasar-mondo.sh" : correction proposée par Michel GAUDET
15/01/10 - ajout du processus "sshd" dans la page "système/services".
14/01/10 - "alcasar-radius" : suppression des tags config- de l'ancien plugin ldap.
- "alcasar.sh" : augmentation de la taille des fichiers en "upload" par php (pour l'import de la base usager)
: suppression des particularités issue d'une mise à jour 1.7 vers 1.8
: le service sshd n'est plus lancé automatiquement au démarrage (activable via l'interface de gestion)
12/01/09 - "menu.php, filtering.php, activity.php" : prise en compte des @mac autorisée dans la fenêtre "activité" (+ corrections)
06/01/10 - "alcasar-iptables-filter.sh : a voir avec richard pour les conntrack modules pour ftp ...
---- 1.8 ----
21/12/09 - "alcasar-bypass.sh" : amélioration du script
- création des 2 scripts d'initialisation des daemons "chilli" et "dansguardian"
- "alcasar.sh" et "alcasar-uninstall.sh" : création de la fonction "dansguardian"
20/12/09 - "alcasar.sh" : intégration du RPM "coova-chilli" réalisé par Mandriva.
- mise à jour des docs
- "alcasar-iptable-bypass.sh" : adaptation à la dernière version de netfilter.
15/12/09 - "alcasar-iptable-filter.sh" : traitement du filtrage ICMP
14/12/08 - "alcasar.sh" : désactivation par défaut du filtrage WEB et du filtrage réseau
- "alcasar-iptables.sh" + "alcasar-iptables-filter.sh" : optimisation des règles de filtrage.
09/12/09 - ajout du charset (utf-8) dans intercept.php
08/12/09 - adaptation de phpsysinfo : (portail.php, index.php, fr.php et en.php)
- test internet sur page accueil,
- modif fichier de langue et limitation à 'en' et 'fr' pour éviter les variables non définies sur les langues connues par phpsysinfo mais non traduites pour alcasar
- "alcasar-CA.sh" : suppression des caractères superflus lors de la génération du certificat de l'A.C.
- "service.php" : mise en conformité graphique
07/12/09 - mises à jour network.php (internationnalisation et suppression des erreurs php)
02/12/09 - alcasar-urpmi.sh et alcasar.sh : adaptation de la procédure de mises à jour pour les architectures 64b
19/11/09 - mises à jour des fichiers de la partie "système" du centre de gestion (internationalisation, utf8... partie à finaliser...)
15/11/09 - intégration de la page activité dans "système/réseau" et adaptation du menu
- ajout du fichier ldap.css pour un meilleur affichage de la gestion LDAP
14/11/09 - adaptation du code aux évolutions php5 (fonction "split" dépréciée, fonction "new" retourne directement une valeur, variables _get et _post interdites de visibilité globale)
- fichiers modifiés : intercept.php, uam.php, net-filter.php, bl.php, bl2.php, sauvegarde.php, 15 fichiers de phpsysinfo, to be continued ...
12/11/09 - "alcasar.sh" : adaptation pour le module 'ldap') :
09/11/09 - "alcasar.sh" : adaptation à MdV-2010, corrections : log_martians, lancement des fonctions, rpm orphelins
03/11/09 - tri des services, amélioration des fonctions php d'ouverture de fichiers (bl + wl)
01/11/09 - prise en compte d'une whitelist par protocole autorisé (création du fichier /usr/local/etc/alcasar-services)
25/10/09 - "alcasar.sh" : suppression de l'écoute sur le port 80. Suppression du filtrage ultrasurf. Evolution de la gestion du filtrage (alcasar-nf.sh + modules php)
22/10/09 - "alcasar.sh conf/logrotate.d/dansguardian" - adaptation de dansguardian dans la rotation des logs et modif du script alcasar.sh
21/10/09 - "alcasar.sh" : suppression du filtrage des fichiers téléchargés, mise à jour système automatique, modif page d'erreur apache "401", limitation de l'écoute d'apache sur le port 443 (eth1)
- "alcasar-unistall.sh : mise à jour
20/10/09 - Modification du menu de centre de gestion : ajout menu systeme(services/réseau/ldap)
- Ajout des pages de configuration des Services, Réseau et LDAP.
19/10/09 - "alcasar.sh" : modification des msec local (perm.local) --> prise en compte de l'interface ldap --> a confirmer
19/10/09 - "alcasar.sh" : adaptation des délais pour anacron
16/10/09 - "alcasar-iptables-filter.sh" : debug de la ligne de récupération des @IP ultrasurf
15/10/09 - "alcasar-iptables.sh" : adaptation des règles à la nouvelle norme d'écriture (le "!" placé avant)
- "alcasar.sh" : adaptation du module "radius" pour mandriva 2009.0 & 2009.1
14/10/09 - "alcasar.sh" : suppression du filtrage d'URL via les expressions régulières (REGEX) pour dansguardian
- prémices de l'interface de filtrage réseau (alcasar-nf.sh + modules php)
10/10/09 - "alcasar.sh" : génération de mot de passe aléatoire au sein des briques Alcasar même après une mise à jour.
07/10/09 - mise à jour de "mondoarchive" et "mindi" dans l'archive des RPM (alcasar-1.8-rpms.tar.gz)
06/10/09 - "alcasar.sh" : modif de la conf dansguardian (afin de préparer l'interfaçage graphique)
- 'alcasar-uninstall.sh" : mise à jour et désinstallation complète de mysql
05/10/09 - "alcasar.sh" : pour Dansguardian, on désactive le contrôle dans l'URL, on bloque les URL avec @IP, on bloque le https par le port 80
- "sauvegarde.php" : suppression de l'affichage des journaux du proxy
- ajout de 3 RPMs liés au "backportage" de "mondo-mindi"
02/10/09 - "alcasar.sh" : ajout des cron.d/export et clean pour une prise en compte en cas d'arrêt du serveur pendant l'exécution
30/09/09 - "alcasar.sh" : suppression des # dans le plugin_ldap ( ne prend pas en compte le lancement multiple ...
29/09/09 - "alcasar-log-export.sh, alcasar-log-clean.sh, conf/logrotate.d/dansguardian" : prise en compte des logs de dansGuardian ... dans les exports de logs et le nettoyage # a voir si on garde ?
- "alcasar.sh" : prise en compte de la tabulation avant et derrière le # dans radiusd.conf
- "alcasar-mondo.sh" : suppression du paramètre -F qui crash sur la Mandriva 2009.1
21/09/09 - "alcasar-bl.sh" : mise à jour des liens internes liés au téléchargement de la BL Toulouse
20/09/09 - "phpsysinfo" : activation de la barre de charge (load-bar) dans la page d'accueil
- correction bug : affichage des exceptions (bl.php) et sauvegarde du fichier "/etc/dansguardian/exceptioniplist" en cas de mise à jour
--- 1.8a ---
09/09/09 - modif du système de comptage des usagers en ligne de la page d'accueil (chilli_query au lieu de radwho)
- amélioration de la fonction de mise à jour
07/09/09 - définition aléatoire des mots de passe inter-processus (alcasar.sh)
- réécriture des règles iptables pour prévenir l'impossibilité future de filtrer sur la table NAT (alcasat-iptables.sh)
08/09 - possibilité de garder l'ancien certificat serveur lors de la mise à jour
- installation de dialupadmin + conforme (uniquement les fichiers modifiés)
- réarchitecture des pages du centre et homogénéisation graphique.
- correction javascript dans la page d'interception
- possibilité de supprimer les usagers à la suppression de leur groupe
- correction faille de conf apache (suppression de la directive "method")
- gestion des profils d'administration en 3 groupes (admin, manager, backup)
- correction de la "double redirection" lors de l'interception par coova
21/06/09 - suppression de la fonction "OnBlur" de intercept.php
- amélioration de la conf de squid (suite au remplacement de squidGurad par Dansguardian)
- amélioration de la rubrique "activité réseau" (affichage trié et déconnexion d'un usager (même si plusieurs sessions simultanées)
16/06/09 - modification des menus de l'interface
- correction d'un bug et "durcissement" de la conf de coova-chilli à l'install (alcasar.sh)
14/06/09 - remplacement "hotspotlogin.cgi" par "intercept.php". Traduction en 5 langues. Prise en compte des réponses Radius.
- simplification des scripts de modification du mot de passe usager (+ traduction 5 langues)
- affichage du nom d'organisme sur la page d'interception
11/06/09 - correction de bug dans "alcasar.sh" : appel de 'htdigest' par son chemin complet, amélioration des calculs pour les réseaux de classe A et B, procédure de mise à jour (option -update)
01/06/09 - correction du fichier "dhcpd.conf" (ajout de l'entrée "ddns-update-style interim")
- correction et agrégation des 2 scripts "alcasar-bypass-on / off"
--- 1.7 ---
09/05/09 - intégration du module de filtrage applicatif
- traitement des vpn https "ultrasurf" (contournement du filtrage d'URL)
- mise en conformité de l'interface des sites de confiances ("uamallow" et "uamdomain")
- mise à jour de la doc
30/04/09 - module graphique de visualisation de l'activité du réseau de consultation (équipements et usagers)
26/04/09 - correction bug "sauvegarde.php"
- correction bug freeradius-web/lib/sql/drivers/mysql/functions.php (merci M.G.)
- adaptation cron de chilli à notre logique (/etc.cron.d au lieu de /var/spool/cron/root)
- suppression des mails pour les cron journaliers (awstat, chilli, etc.)
- modification radius (écriture dans sradutmp et radutmp) --> récupération de la fonction "radwho"
- relooking type Alcasar de "accounting.php" et suppression d'affichage des champs "NAS*"
--- 1.7-rc4 ---
19/04/09 - recodage UTF8 alcasar.sh, alcasar-iptables, etc.
- modif alcasar-iptables (le "/etc/init.d/iptable save" est réalisé ici) et alcasar-iptables-filter (ancien alcasar-iptables-local) en vue d'intégrer le filtrage applicatif.
- agrégat uam.php + uam2.php (suppression uamallow.php et alcasar-uamallow.sh)
- sécurisation /etc/pki
17/04/09 - modification et intégration du fichier de conf "radiusd.conf" + conforme
--> gestion de la casse pour les noms d'usager
--> suppression des méthodes d'authentif inusitées
--> activation des compteurs SQL (module rlm_sqlcounter.so)
- remplacement "ssmtp" par "postfix" afin de préparer l'avenir ;-) et d'éviter les erreurs de "crond"
- création et mise en ligne de l'archive des RPMs additionnels pour les installation "faible débit"
14/04/09 - phpsysinfo : nom de la distribution de nouveau disponible (phpsysinfo/distro.ini <-- Mandrivalinux au lieu de Mandriva)
12/04/09 - adaptation de admin/uam.php ( et uam2.php) pour génération web des urls et domaines de confiance
10/04/09 - suppression de shorewall-common et pas uniquement shorewall
- intégration dans /etc/chilli/config de alcasar-uamallowed et alcasar-uamdomain (fichiers de sites et de domaines de confiance)
27/03/09 - modif de alcasar-iptables.sh pour permettre l'icmp sur INTIF et pas seulement sur TUNIF
- modif alcasar-uamallowed.sh pour intégrer un fichier alcasar-uamdomain ( domaines sans restriction)
--> adaptation de alcasar.sh pour adapter les droits du fichier créé (par défaut vide) avec les bons droits
23/03/09 - modif "sauvegarde.php" pour ordonner la liste des sauvegardes (base, firewall, système)
- modif "hotspotlogin" pour intégrer un traitement à la fermeture du popup de déconnexion
20/03/09 - modif /etc/alcasar-bypass.sh en /usr/local/bin/alcasar-iptables.bypass.sh
- modif alcasar-bypass-local.sh pour intégrer des filtres applicatifs + déplacement dans alcasar-iptables.sh
13/03/09 - intégration coova "+ conforme" (modif du fichier de conf par défaut)
- suppression des modifs iptables effectuées par coova (/etc/chilli/up.sh)
- ajout du contrôle des flux DNS (pour éviter les tunnels DNS)
- remplacement de la page d'interception de dansguardian
10/03/09 - intégration du module LDAP dans /etc/raddb et alcasar.sh
--- 1.7-rc3 ---
02/03/09 - Correction bugs dans "alcasar-log-export"
- Suppression des broadcast sur EXTIF
- Suppressions des envois de mail pour cron (générait une erreur en absence de MTA)
01/03/09 - correction config awstat et intégration graphique
- intégration Squid "+ conforme" (modif du fichier de conf par défaut)
24/02/09 - suppression du snmp_finger inutile dans "/etc/freeradius-web/admin.conf"
- correction du bug mktime() de la page "stat journalière"
- modif menu pour les pages "stats journalières" et "stat usagers"
22/02/09 - correction bug de la page des connexions actives ("sradutmp" dans "/etc/raddb/site-available/alcasar" et @IP réelle du NAS (et non loopback))
07/02/09 - intégration du plugin ldap : les scripts php ne sont pas retenus (mais conservés).
- implémentation et adaptation pour authentification seule (pas de récupération des attributs Radius dans ldap )
- ajout de la commande service dans sudoers ; pourra ètre utile pour insérer l'état des services utiles (status et restart) dans phpsysinfo
- ajout des fichiers modifiés ldap.attrmap et ldap (sera modifié par le script plus tard :-) issus de freeradius-ldap
- modification du fichier d'installation alcasar.sh pour rajouter une option -ldap indépendante de l'install/update et uninstall
--- 1.7-rc2 ---
06/02/09 - correction de code php afin de supprimer les warnings dans /var/log/http/ssl_error
05/02/09 - correction de quelques coquilles ( logo
02/02/09 - intégration de la gestion des sessions simultanées
27/01/09 - correction bug dans la page d'info usager - rubrique "password-check" (freeradius-web/lib/sql/password_check.php)
- intégration du travail de P.Romero (générateur de mots de passe aléatoires dans htdocs/user_new.php et htdocs/user_edit.php)
26/01/09 - suppression des log_martian via msec -> fichier /etc/security/msec/level.local (alcasar.sh)
21/01/09 - ajout des RegEx de saisie d'adresse IP (alcasar.sh)
18/01/09 - création du script de gestion des profils "alcasar-profil.sh", adaptation d'alcasar.sh
17/01/09 - correction bug sauvegarde.php : répertoire "/var/Save/log/proxy" au lieu de "/var/Save/log/squid",
14/01/09 - correction d'un bug dans le fichier de conf d'awstat
10/01/09 - ajout de la possibilité de changer le plan d'addressage à l'install, correction bugs date d'installation + install via archive RPM
--- 1.7-rc1 ---
31/12/08 - intégration page uamallowed, modification du menu, lien symbolique /etc/radius/radutmp sur /etc/radius/sradutmp (pour radwho --> à revoir), vérif mdp chiffré dans mysql --> ok.
30/12/08 - correction bug dhcp.conf. Mise à jour alcasar-bypass-on, alcasar-bypass-off alcasar-uninstall, /etc/sudoers.
20/12/08 - Intégration dansguardian (reste la page de choix des domaines)
07/12/08 - modif archive RPMS, iptables, squid.conf (pour ce dernier, on devrait pouvoir partir du fichier de conf de base)
03/12/08 - suppression des paquetage avahi, mandi, shorewall, drakxtool-curses et les orphelins créés (à la fin de l'install)
- création de l'archive rpm optionnel "alcasar-rpms.tar.gz" (nécessaire quand on a pas Internet (dans le train par exemple ;-) ))
01/12/08 - déplacement de /etc/chilli/defaults en /etc/chilli/defaults.old pour éviter les uamallowed insérés automatiquement par coova
- modif import-user.php, déplacement dans freeradius-web/htdocs (en import_user.php) et modif page d'appel (usager.php)
- correction des requetes SQL sur la table "usergroup" au lieu de "radusergroup" (import_user.php et portail.php). Correction du MCD.
22/11/08 - suppression de l'affichage du logo "coova" (/etc/chilli/config)
- suppression des log parefeu https, ssh et dhcp (les logs des daemon httpd, sshd et coova suffisent)
- suppression de la modif du fichier syslog.conf à l'install
- mise à jour de la page d'interception (hotspotlogin)
15/11/08 - mise à jour alcasar-uninstall, config ssh, alcasar-bypass-iptables
11/11/08 - affectation dynamique du role des cartes RSO (alcasar.sh)
- correction de bugs (alcasar-iptables.sh + alcasar.sh)
- généralisation de l'utilisation des variables "intif" et "extif" dans le script d'install
7/11/08 - prise en compte des nouvelles structure des RPM repository (alcasar-urpmi.sh)
21/10/08 - adaptation du script d'install en mandriva 2009
- intégration native de coova-chilli
 
--- 1.7 ---
27/06/08 - Suppression de l'enregistrement du mot de passe dans la table "radpostauth"
15/06/08 - intégration dans alcasar.sh à l'installation-update
- intégration structure ossi-bl et ossi-wl dans squidGard.conf et alcasar.sh --> reste dans script web
14/06/08 - intégration de coova-chilli en substitution à chillispot ; reste à intégrer dans alcasar.sh à l'installation-update
10/06/08 - modif import_user.php :
- remontée de import_user.php à la racine du centre de gestion ; modification dans les différentes interfaces dont les menus
- sortie sur un fichier unique ; reste à récupérer par le biais de l'interface
01/05/08 - modif chilli.conf : interval=0 (évite le relancement de chilli toute les heures)
 
--- 1.6 ---
- Durcissement du parefeu (fermeture de ports) et adaptation des règles à l'interface "firewalleyes"
- Simplification de la structure des fichiers de sauvegardes (/var/Save)
- Mise à jour du fichier de configuration squidGuard (intégration de tous les domaines de la BL de Toulouse)
- Séparation des RPM additionnels de l'archive du portail
- Réécriture du script de génération des certificats de l'A.C et du serveur WEB
- Automatisation de la procédure de mise à jour
- Amélioration de l'interface de gestion :
- Meilleure intégration graphique et francisation
- Prise en compte des créneaux horaires, de la durée des sessions et de la date d'expiration du mot de passe
- Suppression du menu certificat (intégration dans la page d'accueil)
- Refonte de la page de gestion des blacklists et rationalisation des scripts php associés
- Import d'usagers (à partir d'un fichier texte ou d'une base complète) et RAZ de la base
- Déconnexion des usagers par ALCASAR (radiusd + chilli) et non plus seulement par le navigateur WEB (paramètre 'coaport')
- Modification squid.conf (compatibilité toute distrib MDV).
- Simplification du module de création de l'image système (alcasar-mondo.sh).
- Correction des bugs suivants :
- Disparition des statistiques de consultation web après une mise à jour
- Deconnexion d'un usager à partir de l'interface de gestion
- possibilité de créer des groupes vides (en fait avec un usager virtuel portant le même nom que le groupe).
- Création des scripts alcasar-bl.sh (activation/désactivation/mise à jour du filtrage), alcasar-logout.sh (déconnexion des usagers) et alcasar-mysql (import usagers via txt et sql + raz de la base).
 
--- 1.5 ---
- prise en compte du nom de baptême du portail : ALCASAR
- intégration d'un script PHP permettant de personnaliser le logo
- intégration du contournement du bug 'MSIE' pour les pages gestion.
- Intégration de l'interface PHP d'informations système ( phpsysinfo) et ajout d'un module Alcasar (nbr.usagers, version d'installation, version de la blacklist, @IP publique).
- Réécriture des scripts d'install et de désinstall (alcasar-uninstall.sh)
- intégration d'un test de connectivité à Internet
- réorganisation des fonctions
- création de l'option 'uninstall' permettant de désinstaller complétement le portail (afin de pouvoir lancer des séquences d'install/désinstall pour les tests)
- permettre le choix du nom pour les comptes autorisés à administrer le portail
- Réécriture de la page de gestion et intégration des fonctionnalités nouvelles suivantes :
- mise à jour de la blacklist squidGuard (globale + OSSI)
- sauvegarde à chaud du système, sauvegarde des logs et de la base usagers
- visu des logs du parefeu
- Modification du fichier sudoers permettant le lancement des commandes via la page de gestion
- Ajout de l'option -update pour mettre à jour le portail déjà installé (option compatible avec versions >= 1.5)
- Amélioration des règles du pare-feu (moins de Logs mais plus pertinents)
- Gestion des erreurs 404 d'apache par une redirection sur la page d'accueil
- Possibilité de changer son mot de passe via la page de connexion et la page de gestion
- Correction des bugs suivants :
- la comptabilité utilisateur dans dialupadmin est de nouveau fonctionnelle
- l'export chaque semaine de la base des utilisateurs est de nouveau fonctionnel
- homogénéisation de la gestion des cron ==> tout dans /etc/cron.d/
- déplacement de la structure d'awstat pour permettre la visu complète des pages (var/www/awstats -> /var/www/html/awstats)
- Intégration d'une interface PHP de lecture des log du parefeu ( firewallEyes )
- Implémentation du certificat gnupg pour le chiffrement éventuel des logs
- Modification mineure du script de génération à chaud d'image système (alcasar-mondo.sh)
- Modification des pages de dialupadmin ( francisation, simplification, etc.)
- Intégration dans le fichier archive des rpms supplémentaires et de la blacklist (évite leur téléchargement par internet)
--- 1.4 ---
- Réécriture du script de mise à jour de la blacklist squidGuard
- Uniformisation du script d'install
- Correction du script de désinstallation (alcasar-uninstall.sh) et de sauvegarde de la base radius (alcasar-mysql.sh)
- Mise en place d'une page WEB d'accueil pour la gestion du portail
- Suppression des cgi-bin installés par défaut
--- V1.3 ---
- Création d'une structure 'OSSI' dans la blacklist SquidGuard
- Modification de la page d'interception SquidGuard.
- Anonymisation de la structure LAN dans les trames traitées par Squid (forward_for off dans squid.conf).
- Correction de la fonction 'bypass'.
- Mise en place de la possibilité de chiffrer les logs (par gnupg).
- Correction du mot de passe dans le script d'export lorsqu'il est changé à l'install.
- Correction de la structure d'archivage et prise en compte du contenu des fichiers à sauvegarder.
- Mise en place du cron de sauvegarde des configurations.
 
--- V1.2 ---
- Consolidation de la fonction de désinstallation (création systématique de fichiers '.default' lors de modification)
- Configuration des services lancés au démarrage (chkconfig).
- Françisation du CGI "hotspotlogin" (codage des accents).
- Possibilité de lancer le script sans argument (-all par défaut).
- Suppression des "Logs Martians".
 
--- V1.1 ---
- Consolidation de la variable FIC_PARAM.
- Suppression de la déclaration des DNS dans le fichier de conf de chilli (on s'appuie sur les DNS locaux définis dans "/etc/resolv.conf").
- Modification de la page d'authentification (plus générique).
- Réorganisation de la structure de l'archive d'install.
- Modification des directives de chiffrement d'apache (SSLRequireSSL).
 
--- V1.0 ---
- Version initiale que l'on trouve déjà excellente ;-)
Property changes:
Added: svn:keywords
+Revision Date
\ No newline at end of property
/scripts/etc/alcasar-filter-exceptions
0,0 → 1,0
/scripts/etc/alcasar-services
0,0 → 1,5
#icmp -
#ssh 22
#smtp 25
#pop 110
#https 443
/scripts/sbin/alcasar-bl.sh
0,0 → 1,77
#/bin/sh
# Gestion des Blacklists/Whitelists
 
DIR_tmp="/root/blacklists"
DIR_DANSGUARDIAN="/etc/dansguardian/lists/"
BL_SERVER="cri.univ-tlse1.fr"
SED="/bin/sed -i"
 
function transfert () {
mkdir -p $DIR_tmp
cd $DIR_tmp
wget http://$BL_SERVER/blacklists/download/blacklists.tar.gz
}
 
function install () {
[ -d $DIR_DANSGUARDIAN ] || mkdir -p $DIR_DANSGUARDIAN
[ -d $DIR_DANSGUARDIAN/blacklists/ossi ] && mv -f $DIR_DANSGUARDIAN/blacklists/ossi $DIR_tmp
tar zxvf $DIR_tmp/blacklists.tar.gz --directory=$DIR_DANSGUARDIAN
[ -d $DIR_tmp/ossi ] && mv -f $DIR_tmp/ossi $DIR_DANSGUARDIAN/blacklists/
cd /root
rm -rf $DIR_tmp
}
 
usage="Usage: alcasar-bl.sh -on | -off | -download| -reload"
nb_args=$#
args=$1
if [ $nb_args -eq 0 ]
then
nb_args=1
args="-h"
fi
case $args in
-\? | -h* | --h*)
echo "$usage"
exit 0
;;
-on)
# activation du filtrage
$SED "s/^reportinglevel =.*/reportinglevel = 3/g" /etc/dansguardian/dansguardian.conf
service dansguardian reload
;;
-off)
# désactivation du filtrage
$SED "s/^reportinglevel =.*/reportinglevel = -1/g" /etc/dansguardian/dansguardian.conf
service dansguardian reload
;;
-download)
# Mise a jour de la blacklist 'Toulouse' et compilation de la base
rm -rf /tmp/con_ok.html
`/usr/bin/curl $BL_SERVER -# -o /tmp/con_ok.html`
if [ ! -e /tmp/con_ok.html ]
then
echo "Erreur : le serveur de blacklist ($BL_SERVER) n'est pas joignable"
else
transfert
install
chown -R dansguardian:apache $DIR_DANSGUARDIAN
chmod -R g+w $DIR_DANSGUARDIAN
service dansguardian reload
DATE=`date '+%d %B %Y - %Hh%M'`
echo "Univ-tlse du $DATE " > /var/www/html/VERSION-BL
rm -rf /tmp/con_ok.html
fi
;;
-reload)
# regénération de la base OSSI/RSSI
chown -R dansguardian:apache $DIR_DANSGUARDIAN/blacklists/ossi
chmod -R g+w $DIR_DANSGUARDIAN/blacklists/ossi
service dansguardian reload
;;
*)
echo "Argument inconnu :$1";
echo "$usage"
exit 1
;;
esac
 
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:executable
/scripts/sbin/alcasar-nf.sh
0,0 → 1,47
#/bin/sh
# active ou desactive le filtrage réseau
# by rexy
 
SED="/bin/sed -i"
FIC_SERVICES="/usr/local/etc/alcasar-services"
FIC_EXCEPTIONS="/usr/local/etc/alcasar-filter-exceptions"
 
usage="Usage: alcasar-nf.sh -on | -off "
nb_args=$#
args=$1
if [ $nb_args -eq 0 ]
then
nb_args=1
args="-h"
fi
case $args in
-\? | -h* | --h*)
echo "$usage"
exit 0
;;
-on)
# activation du filtrage réseau
$SED "s?^FILTERING.*?FILTERING=\"yes\"?g" /usr/local/bin/alcasar-iptables.sh
# tri du fichier de services
sort -k2n $FIC_SERVICES > /tmp/alcasar-services-sort
mv -f /tmp/alcasar-services-sort $FIC_SERVICES
chown root:apache $FIC_SERVICES
chmod 660 $FIC_SERVICES
# vérification de présence du fichier d'exception
[ -e $FIC_EXCEPTIONS ] || touch $FIC_EXCEPTIONS
chown root:apache $FIC_EXCEPTIONS
chmod 664 $FIC_EXCEPTIONS
/usr/local/bin/alcasar-iptables.sh
;;
-off)
# désactivation du filtrage réseau
$SED "s?^FILTERING.*?FILTERING=\"no\"?g" /usr/local/bin/alcasar-iptables.sh
/usr/local/bin/alcasar-iptables.sh
;;
*)
echo "Argument inconnu :$1";
echo "$usage"
exit 1
;;
esac
 
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:executable
/scripts/sbin/alcasar-profil.sh
0,0 → 1,120
#/bin/sh
# Gestion des comptes liés aux profils
ADM_PROFIL="admin"
PROFILS="backup manager"
ALL_PROFILS=`echo $ADM_PROFIL $PROFILS`
DIR_KEY="/var/www/html/digest"
SED="/bin/sed -i"
HOSTNAME=`uname -n`
# liste les comptes de chaque profile
function list () {
for i in $ALL_PROFILS
do
echo "Comptes liés au profil '$i' :"
cat $DIR_KEY/key_only_$i | cut -d':' -f1|sort
done
}
# ajoute les comptes du profil "admin" aux autres profils
function concat () {
for i in $PROFILS
do
cp -f $DIR_KEY/key_only_$ADM_PROFIL $DIR_KEY/key_$i
cat $DIR_KEY/key_only_$i >> $DIR_KEY/key_$i
done
cp -f $DIR_KEY/key_only_$ADM_PROFIL $DIR_KEY/key_$ADM_PROFIL
chown -R root:apache $DIR_KEY
chmod 640 $DIR_KEY/key_*
}
 
usage="Usage: alcasar-profil.sh -list -add | -del | -pass"
nb_args=$#
args=$1
 
# on met en place la structure minimale
if [ ! -e $DIR_KEY/key_$ADM_PROFIL ]
then
touch $DIR_KEY/key_$ADM_PROFIL
fi
cp -f $DIR_KEY/key_$ADM_PROFIL $DIR_KEY/key_only_$ADM_PROFIL
for i in $PROFILS
do
if [ ! -e $DIR_KEY/key_only_$i ]
then
touch $DIR_KEY/key_only_$i
fi
done
concat
if [ $nb_args -eq 0 ]
then
echo $usage
exit 0
fi
case $args in
-\? | -h* | --h*)
echo "$usage"
exit 0
;;
-add)
# ajout d'un compte
list
echo -n "Choisissez un profil ($ALL_PROFILS) : "
read profil
echo -n "Entrez le nom du compte à créer (profil '$profil') : "
read account
# on teste s'il n'existe pas déjà
for i in $ALL_PROFILS
do
tmp_account=`cat $DIR_KEY/key_only_$i | cut -d':' -f1`
for j in $tmp_account
do
if [ "$j" = "$account" ]
then echo "Ce compte existe déjà"
exit 0
fi
done
done
/usr/sbin/htdigest $DIR_KEY/key_only_$profil $HOSTNAME $account
concat
list
;;
-del)
# suppression d'un compte
list
echo -n "entrez le nom du compte à supprimer : "
read account
for i in $ALL_PROFILS
do
$SED "/^$account:/d" $DIR_KEY/key_only_$i
done
concat
list
;;
-pass)
# changement du mot de passe d'un compte
list
echo "Changement de mot de passe"
echo -n "Entrez le nom du compte : "
read account
for i in $ALL_PROFILS
do
tmp_account=`cat $DIR_KEY/key_only_$i | cut -d':' -f1`
for j in $tmp_account
do
if [ "$j" = "$account" ]
then
/usr/sbin/htdigest $DIR_KEY/key_only_$i $HOSTNAME $account
fi
done
done
concat
;;
-list)
# liste des comptes par profile
list
;;
*)
echo "Argument inconnu :$1";
echo "$usage"
exit 1
;;
esac
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:executable
/scripts/sbin/alcasar-uninstall.sh
0,0 → 1,143
#!/bin/sh
# alcasar-uninstall.sh
# by 3abtux, angel95 and rexy
# This script is distributed under the Gnu General Public License (GPL)
clear
echo "-----------------------------------------------------------------------------"
echo "** Désinstallation d'ALCASAR **"
echo "-----------------------------------------------------------------------------"
echo
#services_stop
for i in ntpd iptables ulogd dansguardian squid chilli httpd radiusd named
do
/sbin/chkconfig --del $i
/etc/init.d/$i stop
done
echo "Réinitialisation des fonctions : "
#init
echo -en "\n-1 init(1) : "
#les script /usr/local/bin alcasar* sont supprimés à la fin car encore utiles ici
rm -f /root/ALCASAR* && echo -n "1,"
sleep 1
# network
echo -en "\n-2 network(9) : "
hostname localhost
[ -e /etc/sysconfig/network-scripts/default-ifcfg-eth1 ] && mv /etc/sysconfig/network-scripts/default-ifcfg-eth1 /etc/sysconfig/network-scripts/ifcfg-eth1 && echo -n "1, "
[ -e /etc/sysconfig/network.default ] && mv /etc/sysconfig/network.default /etc/sysconfig/network && echo -n "2, "
[ -e /etc/hosts.default ] && mv /etc/hosts.default /etc/hosts && echo -n "3, "
[ -e /etc/sysconfig/network-scripts/ifcfg-eth1 ] && rm -f /etc/sysconfig/network-scripts/ifcfg-eth1 && echo -n "4, "
[ -e /etc/ntp.conf.default ] && mv /etc/ntp.conf.default /etc/ntp.conf && echo -n "5, "
[ -e /etc/dhcpd.conf.default ] && mv /etc/dhcpd.conf.default /etc/dhcpd.conf && echo -n "6, "
[ -e /etc/sysconfig/dhcpd.default ] && mv /etc/sysconfig/dhcpd.default /etc/sysconfig/dhcpd && echo -n "7, "
[ -e /etc/hosts.allow.default ] && mv /etc/hosts.allow.default /etc/hosts.allow && echo -n "8, "
[ -e /etc/hosts.deny.default ] && mv /etc/hosts.deny.default /etc/hosts.deny && echo -n "9"
sleep 1
# gestion
echo -en "\n-3 gestion(4) : "
[ -d /var/www/html ] && rm -rf /var/www/html && echo -n "1, "
[ -e /etc/httpd/conf/httpd.conf.default ] && mv /etc/httpd/conf/httpd.conf.default /etc/httpd/conf/httpd.conf && echo -n "2, "
[ -e /etc/httpd/conf/webapps.d/alcasar.conf ] && rm -f /etc/httpd/conf/webapps.d/alcasar.conf && echo -n "3, "
[ -e /var/www/error/include/bottom.html.default ] && mv /var/www/error/include/bottom.html.default /var/www/error/include/bottom.html && echo -n "4 "
sleep 1
# CA
echo -en "\n-4 AC(4) : "
[ -e /etc/pki/CA/alcasar-ca.crt ] && rm -f /etc/pki/CA/alcasar-ca.crt && echo -n "1, "
[ -e /etc/pki/CA/private/alcasar-ca.key ] && rm -f /etc/pki/CA/private/alcasar-ca.key && echo -n "2, "
[ -e /etc/pki/tls/certs/alcasar.crt ] && rm -f /etc/pki/tls/certs/alcasar.crt && echo -n "3, "
[ -e /etc/pki/tls/private/alcasar.key ] && rm -f /etc/pki/tls/private/alcasar.key && echo -n "4"
sleep 1
#init_db
echo -en "\n-5 init_db(2) : 1, "
[ -e /etc/my.cnf.default ] && mv -f /etc/my.cnf.default /etc/my.cnf && echo -n "2 "
/sbin/chkconfig --del mysqld
/etc/init.d/mysqld stop
/usr/bin/killall mysqld 2>/dev/null
rm -rf /var/lib/mysql*
sleep 1
#param_radius
echo -en "\n-6 param_radius(7) : "
[ -e /etc/raddb/radiusd-db-vierge.sql ] && rm -f /etc/raddb/radiusd-db-vierge.sql && echo -n "1, "
[ -e /etc/raddb/radiusd.conf.default ] && mv /etc/raddb/radiusd.conf.default /etc/raddb/radiusd.conf && echo -n "2, "
[ -e /etc/raddb/sites-enabled/alcasar ] && rm /etc/raddb/sites-enabled/alcasar && echo -n "3, "
[ -e /etc/raddb/sites-available/alcasar ] && rm /etc/raddb/sites-available/alcasar && echo -n "4, "
[ -e /etc/raddb/clients.conf.default ] && mv /etc/raddb/clients.conf.default /etc/raddb/clients.conf && echo -n "5, "
[ -e /etc/raddb/sql.conf.default ] && mv /etc/raddb/sql.conf.default /etc/raddb/sql.conf && echo -n "6, "
[ -e /etc/raddb/sql/mysql/dialup.conf.default ] && mv /etc/raddb/sql/mysql/dialup.conf.default /etc/raddb/sql/mysql/dialup.conf && echo -n "7"
sleep 1
#param_web_radius
echo -en "\n-7 param_web_radius(3) : "
[ -e /etc/freeradius-web/admin.conf.default ] && mv /etc/freeradius-web/admin.conf.default /etc/freeradius-web/admin.conf && echo -n "1, "
[ -e /etc/freeradius-web/naslist.conf ] && rm /etc/freeradius-web/naslist.conf && echo -n "2, "
[ -e /etc/freeradius-web/user_edit.attrs.default ] && mv /etc/freeradius-web/user_edit.attrs.default /etc/freeradius-web/user_edit.attrs && echo -n "3"
sleep 1
#param_chilli
echo -en "\n-8 param_chilli(5) : "
[ -e /etc/chilli/functions.default ] && mv /etc/chilli/functions.default /etc/chilli/functions && echo -n "1, "
[ -e /etc/init.d/chilli.default ] && mv /etc/init.d/chilli.default /etc/init.d/chilli && echo -n "2, "
[ -e /etc/chilli/config ] && rm /etc/chilli/config && echo -n "3, "
[ -e /etc/chilli/alcasar-uamallowed ] && rm /etc/chilli/alcasar-uamallowed && echo -n "4, "
[ -e /etc/chilli/alcasar-uamdomain ] && rm /etc/chilli/alcasar-uamdomain && echo -n "5"
sleep 1
#param_squid
echo -en "\n-9 param_squid(2) : "
[ -e /etc/squid/squid.conf.default ] && mv /etc/squid/squid.conf.default /etc/squid/squid.conf && echo -n "1, "
[ -d /var/spool/squid ] && rm -rf /var/spool/squid/* && echo -n "2"
#param_dansguardian
echo -en "\n-10 param_dansguardian(10) : "
[ -e /etc/init.d/dansguardian.default ] && mv /etc/init.d/dansguardian.default /etc/init.d/dansguardian && echo -n "1, "
[ -d /var/dansguardian ] && rm -rf /var/dansguardian && echo -n "2, "
[ -e /etc/dansguardian/dansguardian.conf.default ] && mv /etc/dansguardian/dansguardian.conf.default /etc/dansguardian/dansguardian.conf && echo -n "3, "
[ -e /etc/dansguardian/lists/bannedphraselist.default ] && mv /etc/dansguardian/lists/bannedphraselist.default /etc/dansguardian/lists/bannedphraselist && echo -n "4, "
[ -e /etc/dansguardian/dansguardianf1.conf.default ] && mv /etc/dansguardian/dansguardianf1.conf.default /etc/dansguardian/dansguardianf1.conf && echo -n "5, "
[ -e /etc/dansguardian/lists/bannedextensionlist.default ] && mv /etc/dansguardian/lists/bannedextensionlist.default /etc/dansguardian/lists/bannedextensionlist && echo -n "6, "
[ -e /etc/dansguardian/lists/bannedmimetypelist.default ] && mv /etc/dansguardian/lists/bannedmimetypelist.default /etc/dansguardian/lists/bannedmimetypelist && echo -n "7, "
[ -e /etc/dansguardian/lists/exceptioniplist.default ] && mv /etc/dansguardian/lists/exceptioniplist.default /etc/dansguardian/lists/exceptioniplist && echo -n "8, "
[ -e /etc/dansguardian/lists/bannedsitelist.default ] && mv /etc/dansguardian/lists/bannedsitelist.default /etc/dansguardian/lists/bannedsitelist && echo -n "9, "
[ -d /etc/dansguardian/lists/blacklists.default ] && mv -f /etc/dansguardian/lists/blacklists.default /etc/dansguardian/lists/blacklists && echo -n "10"
sleep 1
#firewall
echo -en "\n-11 firewall(1) : "
[ -e /etc/sysconfig/iptables ] && rm -f /etc/sysconfig/iptables && echo -n "1"
sleep 1
#awstats
echo -en "\n-12 awstats(1) : "
[ -e /etc/awstats/awstats.conf.default ] && mv /etc/awstats/awstats.conf.default /etc/awstats/awstats.conf && echo -n "1"
sleep 1
#Bind
echo -en "\n-13 bind(4) : "
[ -e /var/lib/named/etc/named.conf.default ] && mv /var/lib/named/etc/named.conf.default /var/lib/named/etc/named.conf && echo -n "1, "
[ -e /var/lib/named/etc/trusted_networks_acl.conf.default ] && mv /var/lib/named/etc/trusted_networks_acl.conf.default /var/lib/named/etc/trusted_networks_acl.conf && echo -n "2, "
[ -e /var/lib/named/var/named/master/localdomain.zone.default ] && mv /var/lib/named/var/named/master/localdomain.zone.default /var/lib/named/var/named/master/localdomain.zone && echo -n "3, "
[ -e /var/lib/named/var/named/reverse/localdomain.rev ] && rm /var/lib/named/var/named/reverse/localdomain.rev && echo -n "4"
sleep 1
#cron
echo -en "\n-13 cron(9) : "
[ -e /etc/crontab.default ] && mv /etc/crontab.default /etc/crontab && echo -n "1, "
[ -e /etc/anacrontab.default ] && mv /etc/anacrontab.default /etc/anacrontab && echo -n "2, "
[ -e /etc/cron.d/mysql ] && rm -f /etc/cron.d/mysql && echo -n "3, "
[ -e /etc/cron.d/export_log ] && rm -f /etc/cron.d/export_log && echo -n "4, "
[ -e /etc/cron.d/clean_log ] && rm -f /etc/cron.d/clean_log && echo -n "5, "
[ -e /etc/cron.d/awstats ] && rm -f /etc/cron.d/awstats && echo -n "6, "
[ -e /etc/cron.d/freeradius-web ] && rm -f /etc/cron.d/freeradius-web && echo -n "7, "
[ -e /etc/cron.d/coova ] && rm -f /etc/cron.d/coova && echo -n "8, "
[ -e /etc/cron.d/watchdog ] && rm -f /etc/cron.d/watchdog && echo -n "9"
sleep 1
#plugin_ldap
[ -e /etc/raddb/ldap.attrmap.default ] && mv /etc/raddb/ldap.attrmap.default /etc/raddb/ldap.attrmap
[ -e /etc/raddb/ldap.default ] && mv /etc/raddb/ldap.default /etc/raddb/modules/ldap
sleep 1
#post_install
echo -en "\n-14 post_install(11) : "
[ -e /etc/mandriva-release.default ] && mv /etc/mandriva-release.default /etc/mandriva-release && echo -n "1, "
[ -e /etc/ssh/alcasar-banner-ssh ] && rm -f /etc/ssh/alcasar-banner-ssh && echo -n "2, "
[ -e /etc/ssh/sshd_config.default ] && mv /etc/ssh/sshd_config.default /etc/ssh/sshd_config && echo -n "3, "
[ -e /etc/bashrc.default ] && mv /etc/bashrc.default /etc/bashrc && echo -n "4, "
[ -e /etc/sudoers.default ] && mv /etc/sudoers.default /etc/sudoers && echo -n "5, "
[ -e /etc/logrotate.d/mysqld ] && rm -f /etc/logrotate.d/mysqld && echo -n "6, "
[ -e /etc/logrotate.d/httpd ] && rm -f /etc/logrotate.d/httpd && echo -n "7, "
[ -e /etc/logrotate.d/squid ] && rm -f /etc/logrotate.d/squid && echo -n "8, "
[ -e /etc/logrotate.d/radiusd ] && rm -f /etc/logrotate.d/radiusd && echo -n "9, "
[ -e /etc/logrotate.d/ulogd ] && rm -f /etc/logrotate.d/ulogd && echo -n "10, "
[ -e /usr/local/sbin/alcasar-uninstall.sh ] && rm -f /usr/local/sbin/alcasar* && rm -f /usr/local/bin/alcasar* && echo -n "11"
sleep 1
echo
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:executable
/scripts/sbin/alcasar-mysql.sh
0,0 → 1,53
#! /bin/bash
## Script de sauvegarde de la base MySQL 'radius' (by rexy)
 
LANG="fr_FR@euro" # choix de la langue
rep_tr="/var/Save/base" # répertoire d'accueil des sauvegardes
ext="sql" # extention des fichiers de sauvegarde
DB_RADIUS="db_radius" # nom de la base
DB_USER="db_user" # nom d'utilisateur mysql (base des usagers)
radiuspwd="radius_pwd" # mot de passe d'accès
new="$(date +%F-%Hh%M)" # date et heure des fichiers
fichier="$DB_RADIUS-$new.$ext" # nom du fichier de sauvegarde
 
usage="Usage: alcasar-mysql.sh -dump | -import | -raz"
nb_args=$#
args=$1
if [ $nb_args -eq 0 ]
then
nb_args=1
args="-h"
fi
case $args in
-\? | -h* | --h*)
echo "$usage"
exit 0
;;
-dump)
[ -d $rep_tr ] || mkdir -p $rep_tr
if [ -e $fichier ];
then rm -f $fichier
fi
echo "Export de la base 'db_radius' dans le fichier : $fichier"
mysqldump -u $DB_USER -p$radiuspwd --opt -BcQC $DB_RADIUS > $rep_tr/$fichier
echo "Fin de Sauvegarde mysql $( date "+%Hh %Mmn" )"
;;
-import)
if [ $nb_args -ne 2 ]
then
echo "Entrez le nom d'un fichier SQL (.sql)"
exit 0
else
mysql -u $DB_USER -p$radiuspwd < $2
fi
;;
-raz)
mysql -u$DB_USER -p$radiuspwd $DB_RADIUS < /etc/raddb/radiusd-db-vierge.sql
;;
*)
echo "Argument inconnu :$1";
echo "$usage"
exit 1
;;
esac
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:executable
/scripts/sbin/alcasar-logout.sh
0,0 → 1,23
#/bin/sh
# deconnexion d'un usager
 
radiussecret=""
 
usage="Usage: alcasar-logout.sh nom_d'usager"
nb_args=$#
args=$1
if [ $nb_args -eq 0 ]
then
nb_args=1
args="-h"
fi
case $args in
-\? | -h* | --h*)
echo "$usage"
exit 0
;;
*)
echo "User-Name = $args" | /usr/bin/radclient 127.0.0.1:3799 40 $radiussecret
;;
esac
 
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:executable
/scripts/sbin/alcasar-bypass.sh
0,0 → 1,45
#!/bin/sh
# Script portail-bypass
# Permet d'activer ou de désactiver le contournement de l'authentification et du filtrage WEB
usage="Usage: alcasar-bypass.sh -on | -off"
nb_args=$#
args=$1
if [ $nb_args -eq 0 ]
then
nb_args=1
args="-h"
fi
case $args in
-\? | -h* | --h*)
echo "$usage"
exit 0
;;
-on)
# activation du contournement
for i in chilli squid dansguardian httpd mysqld radiusd
do
if (pgrep $i) > /dev/null ; then /etc/init.d/$i stop ; fi
done
echo "Configure eth1 ..."
ifup eth1
sh /usr/local/bin/alcasar-iptables-bypass.sh
if ! (pgrep dhcpd) > /dev/null ; then /etc/init.d/dhcpd start ; fi
echo "Le contournement du module d'authentification et de filtrage WEB est activé"
echo "les journaux du parefeu continuent néanmoins d'être enregistrés"
;;
-off)
# désactivation du contournement
if (pgrep dhcpd) > /dev/null ; then /etc/init.d/dhcpd stop ; fi
for i in chilli squid dansguardian httpd mysqld radiusd
do
if ! (pgrep $i) > /dev/null ; then /etc/init.d/$i start ; fi
done
sh /usr/local/bin/alcasar-iptables.sh
echo "L'authentification et le filtrage WEB sont de nouveau activés"
;;
*)
echo "Argument inconnu :$1";
echo "$usage"
exit 1
;;
esac
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:executable
/scripts/alcasar-conf.sh
0,0 → 1,99
#/bin/sh
# by rexy
# Ce script permet de créer ou de charger l'archive des fichiers de configuration (/tmp/alcasar-conf.tar.gz)
DIR_UPDATE="/tmp/conf" # répertoire de stockage des fichier de conf pour une mise à jour
DIR_WEB="/var/www/html" # répertoire du centre de gestion
DIR_DEST_SBIN="/usr/local/sbin" # répertoire des scripts d'admin
DIR_DEST_ETC="/usr/local/etc" # répertoire des fichiers de conf
DB_USER="db_user" # nom d'utilisateur mysql (base usagers)
radiuspwd="radius_pwd" # mot de passe d'accès
 
usage="Usage: alcasar-conf.sh -create | -load"
nb_args=$#
args=$1
if [ $nb_args -eq 0 ]
then
nb_args=1
args="-h"
fi
case $args in
-\? | -h* | --h*)
echo "$usage"
exit 0
;;
-create)
DIR_UPDATE="/tmp/conf" # répertoire de stockage des fichier de conf pour une mise à jour
[ -d $DIR_UPDATE ] && rm -rf $DIR_UPDATE
mkdir $DIR_UPDATE
# Sauvegarde des certificats (serveur et CA)
cert_date=`/usr/bin/openssl x509 -noout -in /etc/pki/tls/certs/alcasar.crt -dates|grep After|cut -d"=" -f2`
cp -f /etc/pki/tls/certs/alcasar.crt $DIR_UPDATE
cp -f /etc/pki/tls/private/alcasar.key $DIR_UPDATE
cp -f /etc/pki/CA/alcasar-ca.crt $DIR_UPDATE
cp -f /etc/pki/CA/private/alcasar-ca.key $DIR_UPDATE
# Sauvegarde de la base des usagers
/usr/local/sbin/alcasar-mysql.sh -dump
cp /var/Save/base/`ls /var/Save/base|tail -1` $DIR_UPDATE
# Sauvegarde des comptes de gestion
cp -rf $DIR_WEB/digest $DIR_UPDATE
# Sauvegarde du nom d'organisme
echo `hostname` > $DIR_UPDATE/hostname
# Sauvegarde du logo
cp -f $DIR_WEB/images/organisme.png $DIR_UPDATE
# Sauvegarde des fichiers d'exceptions (urls, domains et mac)
cp -f /etc/chilli/alcasar-* $DIR_UPDATE
# Sauvegarde des listes de filtrage
echo "sauvegarde de l'ancienne blacklist ..."
cp -rf /etc/dansguardian/lists/ $DIR_UPDATE
# sauvegarde des fichiers de filtrage réseau
mkdir $DIR_UPDATE/etc/
cp -rf $DIR_DEST_ETC/* $DIR_UPDATE/etc/
# création de l'archive
cd /tmp
tar -cf alcasar-conf.tar conf/
gzip -f alcasar-conf.tar
rm -rf $DIR_UPDATE
;;
-load)
cd /tmp
tar -xf /tmp/alcasar-conf.tar.gz
# Récupération du nom d'organisme
ORGANISME=`cat $DIR_UPDATE/hostname|cut -b 9-`
hostname `cat $DIR_UPDATE/hostname`
# Récupération du logo
cp -f $DIR_UPDATE/organisme.png $DIR_WEB/images/
chown apache:apache $DIR_WEB/images/organisme.png $DIR_WEB/intercept.php
# Récupération des certificats (CA et serveur)
cp -f $DIR_UPDATE/alcasar-ca.crt /etc/pki/CA/
cp -f $DIR_UPDATE/alcasar-ca.key /etc/pki/CA/private/
cp -f $DIR_UPDATE/alcasar.crt /etc/pki/tls/certs/
cp -f $DIR_UPDATE/alcasar.key /etc/pki/tls/private/
chown -R root:apache /etc/pki
chmod -R 750 /etc/pki
# Import de la dernière base usagers
mysql -u$DB_USER -p$radiuspwd < `ls $DIR_UPDATE/radius*`
# Récupération des uamallowed
cp -f $DIR_UPDATE/alcasar-uam* /etc/chilli/.
chown root:apache /etc/chilli/alcasar-uam*
chmod 660 /etc/chilli/alcasar-uam*
# Récupération des listes de filtrage (BL principale et secondaire, @IP non filtrés, etc.)
rm -rf /etc/dansguardian/lists
cp -rf $DIR_UPDATE/lists /etc/dansguardian/
chown -R dansguardian:apache /etc/dansguardian/lists
chmod -R g+rw /etc/dansguardian/lists
# Récupération des comptes de gestion (admin + manager + backup)
cp -rf $DIR_UPDATE/digest $DIR_WEB/
$DIR_DEST_SBIN/alcasar-profil.sh -list
# Récupération des règles de filtrage réseau
cp -f $DIR_UPDATE/etc/* $DIR_DEST_ETC/
chown root:apache $DIR_DEST_ETC/*
chmod 660 $DIR_DEST_ETC/*
rm -rf $DIR_UPDATE
;;
*)
echo "Argument inconnu :$1";
echo "$usage"
exit 1
;;
esac
 
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:executable
+*
\ No newline at end of property
/scripts/alcasar-iptables-filter.sh
0,0 → 1,62
#!/bin/sh
# by rexy (version 1.9 du 12/2009)
 
# a voir la relation avec nf_nat_ftp
# modprobe ip_conntrack_irc
# modprobe ip_conntrack_ftp
 
################## FILTRAGE PARTICULIER ##################
# Administration à distance par exemple :
## Autoriser SSH depuis l'extérieur sur le port 12222 ####
## Ne pas oublier la règle de PAT sur le modem/routeur (box ADSL) ! ainsi que l'adresse IP de votre machine distante dans /etc/hosts.allow
# $IPTABLES -A PREROUTING -t nat -i $EXTIF -p tcp --dport 12222 -m state --state NEW -j ULOG --ulog-prefix "RULE Admin2 -- ACCEPT
# $IPTABLES -A PREROUTING -t nat -i $EXTIF -p tcp --dport 12222 -j REDIRECT --to-port 22
# $IPTABLES -A INPUT -i $EXTIF -p tcp --dport ssh -j ACCEPT
##########################################################
 
################# FILTRAGE APPLICATIF ####################
## Positionnez la variable "FILTERING" du fichier "alcasar-iptables.sh" à "yes" pour activer le filtrage
## Modifiez le fichier /usr/local/etc/alcasar-services pour l'adapter à vos besoins
if [ $FILTERING = "yes" ]
then
# si le fichier d'exception est renseigné on le traite
nb_exceptions=`wc -w /usr/local/etc/alcasar-filter-exceptions | cut -d" " -f1`
if [ $nb_exceptions != "0" ]
then
while read ip_exception
do
echo $ip_exception
$IPTABLES -A FORWARD -i $TUNIF -s $ip_exception -m state --state NEW -j ULOG --ulog-prefix "RULE IP-exception -- ACCEPT "
$IPTABLES -A FORWARD -i $TUNIF -s $ip_exception -m state --state NEW,ESTABLISHED -j ACCEPT
done < /usr/local/etc/alcasar-filter-exceptions
fi
# On autorise les protoles non commentés
while read svc_line
do
svc_on=`echo $svc_line|cut -b1`
if [ $svc_on != "#" ]
then
svc_name=`echo $svc_line|cut -d" " -f1`
svc_port=`echo $svc_line|cut -d" " -f2`
if [ $svc_name = "icmp" ]
then
$IPTABLES -A FORWARD -i $TUNIF -p icmp -j ACCEPT
# else if [ $svc_name = "ftp-passif" ]
# then
# /sbin/modprobe nf_nat_ftp
# $IPTABLES -A FORWARD -i $TUNIF -p tcp --sport 1024: --dport 1024: -m state --state ESTABLISHED -j ULOG --ulog-prefix "RULE F_ftp-passifE -- ACCEPT "
# $IPTABLES -A FORWARD -i $TUNIF -p tcp --sport 1024: --dport 1024: -m state --state RELATED -j ULOG --ulog-prefix "RULE F_ftp-passifR -- ACCEPT "
# $IPTABLES -A FORWARD -i $TUNIF -p tcp --sport 1024: --dport 1024: -m state --state ESTABLISHED,RELATED -j ACCEPT
# fi
else
$IPTABLES -A FORWARD -i $TUNIF -p tcp --dport $svc_port -m state --state NEW -j ULOG --ulog-prefix "RULE F_$svc_name -- ACCEPT "
$IPTABLES -A FORWARD -i $TUNIF -p tcp --dport $svc_port -m state --state NEW,ESTABLISHED -j ACCEPT
fi
fi
done < /usr/local/etc/alcasar-services
#tout le reste est bloqué
$IPTABLES -A FORWARD -i $TUNIF -p tcp -j REJECT --reject-with tcp-reset
$IPTABLES -A FORWARD -i $TUNIF -p udp -j REJECT --reject-with icmp-port-unreachable
$IPTABLES -A FORWARD -i $TUNIF -p icmp -j REJECT
fi
 
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:executable
/scripts/alcasar-urpmi.sh
0,0 → 1,43
#!/bin/sh
# script d'ajout des medias logiciels
# 3abtux & rexy
# changelog :
# + prise en compte dynamique de la version de la distribution
# + prise en compte de la nouvelle struture RPM
# + test avant sortie
 
fic=`cat /etc/product.id`
old="$IFS"
IFS=","
set $fic
for i in $*
do
if [ "`echo $i|grep arch|cut -d'=' -f1`" == "arch" ]
then
ARCH=`echo $i|cut -d"=" -f2`
fi
if [ "`echo $i|grep version|cut -d'=' -f1`" == "version" ]
then
VERSION=`echo $i|cut -d"=" -f2`
fi
done
IFS="$old"
 
# For International install
# MIRRORLIST="http://api.mandriva.com/mirrors/basic.$VERSION.$ARCH.list"
 
# For french ALCASARistes
MIRRORLIST="http://ftp.free.fr/pub/Distributions_Linux/MandrivaLinux/official/$VERSION/$ARCH"
 
urpmi.removemedia -a
urpmi.addmedia --probe-synthesis --mirrorlist $MIRRORLIST main /media/main/release
urpmi.addmedia --probe-synthesis --mirrorlist $MIRRORLIST main_updates /media/main/updates
urpmi.addmedia --probe-synthesis --mirrorlist $MIRRORLIST contrib /media/contrib/release
urpmi.addmedia --probe-synthesis --mirrorlist $MIRRORLIST contrib_updates /media/contrib/updates
nb_repository=`cat /etc/urpmi/urpmi.cfg|grep mirrorlist|wc -l`
if [ "$nb_repository" != "4" ]
then
exit 1
else exit 0
fi
 
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:executable
/scripts/alcasar-watchdog.sh
0,0 → 1,51
#/bin/sh
# by rexy
# Ce script permet de déconnecter les usagers dont
# - les équipementis réseau ne répondent plus
# - les adresses MAC sont usurpées
# The aim of this script is to disconnect users whose
# - PCs are quiet
# - MAC address are in used by other systems (usurped)
 
INTIF="eth1"
PRIVATE_IP="192.168.182.1"
tmp_file="/tmp/watchdog.txt"
IFS=$'\n'
# lecture du fichier contenant les adresses IP des stations muettes
if [ -e $tmp_file ]; then
cat $tmp_file | while read noresponse
do
noresponse_ip=`echo $noresponse | cut -d" " -f1`
noresponse_mac=`echo $noresponse | cut -d" " -f2`
arp_reply=`/usr/sbin/arping -b -I$INTIF -s$PRIVATE_IP -c1 $noresponse_ip|grep response|cut -d" " -f2`
if [[ $(expr $arp_reply) -eq 0 ]]
then
logger "alcasar-watchdog $noresponse_ip ($noresponse_mac) reste muette. On déconnecte."
/usr/sbin/chilli_query logout $noresponse_mac
fi
done
rm $tmp_file
fi
# on traite chaque équipements connus de chilli
for system in `/usr/sbin/chilli_query list`
do
active_ip=`echo $system |cut -d" " -f2`
active_session=`echo $system |cut -d" " -f5`
active_mac=`echo $system | cut -d" " -f1`
# on ne traite que les équipements exploitées par un usager authentifié
if [[ $(expr $active_session) -eq 1 ]]
then
arp_reply=`/usr/sbin/arping -b -I$INTIF -s$PRIVATE_IP -c2 $active_ip|grep response|cut -d" " -f2`
# on stocke les adresses IP des stations muettes
if [[ $(expr $arp_reply) -eq 0 ]]
then
echo "$active_ip $active_mac" >> $tmp_file
fi
# on deconnecte l'usager d'une stations usurpée (@MAC)
if [[ $(expr $arp_reply) -gt 2 ]]
then
logger "alcasar-watchdog : $active_ip est usurpée ($active_mac). On déconnecte."
/usr/sbin/chilli_query logout $active_mac
fi
fi
done
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:executable
/scripts/alcasar-iptables.sh
0,0 → 1,118
#!/bin/sh
# script de mise en place des regles du parefeu d'Alcasar (mode normal)
# Rexy - 3abtux - CPN
# version 1.8 (12/2009)
# changelog :
# + prise en compte des règles de "filtrage réseau" (alcasar-iptables-filter.sh)
# + suppression log vers syslog
# + suppression des broadcast sur EXTIF et INTIF
# + suppression du filtrage par la table "NAT" -> utilisation de la table "MANGLE"
 
IPTABLES="/sbin/iptables"
FILTERING="no"
EXTIF="eth0"
INTIF="eth1"
TUNIF="tun0"
PRIVATE_NETWORK_MASK="192.168.182.0/24"
PRIVATE_IP="192.168.182.1"
 
# On vide (flush) toutes les règles existantes
$IPTABLES -F
$IPTABLES -t nat -F
$IPTABLES -t mangle -F
$IPTABLES -F INPUT
$IPTABLES -F FORWARD
$IPTABLES -F OUTPUT
 
# On indique les politiques par défaut
$IPTABLES -P INPUT DROP
$IPTABLES -P FORWARD DROP
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -t nat -P PREROUTING ACCEPT
$IPTABLES -t nat -P POSTROUTING ACCEPT
$IPTABLES -t nat -P OUTPUT ACCEPT
 
# On efface toutes les chaines qui ne sont pas par défaut dans les tables filter et nat
$IPTABLES -X
$IPTABLES -t nat -X
 
# On autorise tout sur loopback
$IPTABLES -A INPUT -i lo -j ACCEPT
 
# on autorise les requêtes dhcp
$IPTABLES -A INPUT -i $INTIF -p udp -m udp --sport bootpc --dport bootps -j ACCEPT
 
# On ferme INTIF (tout passe par TUNIF)
$IPTABLES -A INPUT -i $INTIF -j ULOG --ulog-prefix "RULE Protect1 -- REJECT "
$IPTABLES -A INPUT -i $INTIF -j REJECT
 
# Règles d'antispoofing
$IPTABLES -A INPUT -i $TUNIF ! -s $PRIVATE_NETWORK_MASK -j ULOG --ulog-prefix "RULE Antispoof1 -- DENY "
$IPTABLES -A INPUT -i $TUNIF ! -s $PRIVATE_NETWORK_MASK -j DROP
$IPTABLES -A INPUT -i $EXTIF -s $PRIVATE_NETWORK_MASK -j ULOG --ulog-prefix "RULE Antispoof2 -- DENY "
$IPTABLES -A INPUT -i $EXTIF -s $PRIVATE_NETWORK_MASK -j DROP
 
# On drop le broadcast et le multicast sur les interfaces (sans Log)
$IPTABLES -A INPUT -m addrtype --dst-type BROADCAST,MULTICAST -j DROP
 
# On autorise le ping dans les deux sens (icmp N°0 & 8) en provenance du LAN
$IPTABLES -A INPUT -i $TUNIF -s $PRIVATE_NETWORK_MASK -p icmp --icmp-type 0 -j ACCEPT
$IPTABLES -A INPUT -i $TUNIF -s $PRIVATE_NETWORK_MASK -p icmp --icmp-type 8 -j ACCEPT
 
# On ajoute ici les règles de filtrage réseau
if [ -f /usr/local/bin/alcasar-iptables-filter.sh ]; then
. /usr/local/bin/alcasar-iptables-filter.sh
fi
# On autorise le transfert de flux dans les deux sens (avec log sur les demandes de connexion sortantes)
$IPTABLES -A FORWARD -i $TUNIF -m state --state NEW -j ULOG --ulog-prefix "RULE Transfert1 -- ACCEPT "
$IPTABLES -A FORWARD -i $TUNIF -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A FORWARD -o $TUNIF -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
 
# On autorise les flux entrant dns, ntp, https, ssh et le port 3990 (connexion/deconnexion des usagers). Retour autorisé par politique accept en OUTPUT
$IPTABLES -A INPUT -i $TUNIF -p udp --dport domain -j ACCEPT
$IPTABLES -A INPUT -i $TUNIF -p udp --dport ntp -j ACCEPT
$IPTABLES -A INPUT -i $TUNIF -p tcp --dport https -j ACCEPT
$IPTABLES -A INPUT -i $TUNIF -p tcp --dport ssh -j ACCEPT
$IPTABLES -A INPUT -i $TUNIF -p tcp --dport 3990 -j ACCEPT
 
# On autorise le retour des connexions sortantes (politique ouput accept)
$IPTABLES -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
 
# On redirige les requêtes DNS sortantes sur BIND local
# log DNS query present dans log du service BIND query.log --> pas de log dans firewall.log
#$IPTABLES -A PREROUTING -t nat -i $TUNIF -p udp ! -d $PRIVATE_IP -m udp --dport domain -j ULOG --ulog-prefix "RULE direct-DNS -- REDIRECT "
$IPTABLES -A PREROUTING -t nat -i $TUNIF -p udp ! -d $PRIVATE_IP --dport domain -j REDIRECT --to-port domain
#$IPTABLES -A PREROUTING -t nat -i $TUNIF -p tcp ! -d $PRIVATE_IP -m tcp --dport domain -j ULOG --ulog-prefix "RULE direct-DNS -- REDIRECT "
$IPTABLES -A PREROUTING -t nat -i $TUNIF -p tcp ! -d $PRIVATE_IP --dport domain -j REDIRECT --to-port domain
 
# On interdit les connexions directes sur le port de DansGuardian (8080)
# les paquets concernés sont marqués par une règle de PREROUTING (cf. ci-après)
$IPTABLES -A INPUT -i $TUNIF -p tcp --dport 8080 -m mark --mark 1 -j DROP
# On autorise les connexions sur DansGuardian
$IPTABLES -A INPUT -i $TUNIF -p tcp --dport 8080 -m state --state NEW --syn -j ACCEPT
 
# On log les requêtes HTTP sortantes (demande de connexion seulement)
$IPTABLES -A PREROUTING -t nat -i $TUNIF -p tcp ! -d $PRIVATE_IP --dport http -m state --state NEW -j ULOG --ulog-prefix "RULE Transfert2 -- ACCEPT "
# On redirige les requête http sortantes vers DansGuardian (mode "proxy transparent")
$IPTABLES -A PREROUTING -t nat -i $TUNIF -p tcp ! -d $PRIVATE_IP --dport http -j REDIRECT --to-port 8080
# On traite les tentatives de contournement par accès direct à DansGuardian (marquage des paquets)
$IPTABLES -A PREROUTING -t nat -i $TUNIF -p tcp -d $PRIVATE_IP -m tcp --dport 8080 -j ULOG --ulog-prefix "RULE direct-proxy -- DENY "
$IPTABLES -A PREROUTING -t mangle -i $TUNIF -p tcp -d $PRIVATE_IP -m tcp --dport 8080 -j MARK --set-mark 1
 
# On interdit et on log le reste sur les 2 interfaces d'accès
$IPTABLES -A INPUT -i $TUNIF -j ULOG --ulog-prefix "RULE rej-int -- REJECT "
$IPTABLES -A INPUT -i $EXTIF -j ULOG --ulog-prefix "RULE rej-ext -- REJECT "
$IPTABLES -A INPUT -p tcp -j REJECT --reject-with tcp-reset
$IPTABLES -A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable
 
# On active le masquage d'adresse par translation (NAT)
$IPTABLES -A POSTROUTING -t nat -o $EXTIF -j MASQUERADE
 
# On sauvegarde les règles
/etc/init.d/iptables save
 
# On ne log pas les Log_martians (pour la mdv 2009 seulement)
echo 0 > /proc/sys/net/ipv4/conf/all/log_martians
 
# Fin du script des règles du parefeu
 
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:executable
/scripts/alcasar-CA.sh
0,0 → 1,246
#!/bin/sh
#
# alcasar-CA.sh
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
# This script is distributed under the Gnu General Public License (GPL)
#
# Some ideas from "nessus-mkcert" script written by Renaud Deraison <deraison@cvs.nessus.org>
# and Michel Arboi <arboi@alussinan.org>
#
 
DIR_TMP=${TMPDIR-/tmp}/alcasar-mkcert.$$
DIR_PKI=/etc/pki
DIR_CERT=$DIR_PKI/tls
DIR_WEB=/var/www/html
CACERT=$DIR_PKI/CA/alcasar-ca.crt
CAKEY=$DIR_PKI/CA/private/alcasar-ca.key
SRVCERT=$DIR_CERT/certs/alcasar.crt
SRVKEY=$DIR_CERT/private/alcasar.key
SRVREQ=$DIR_CERT/alcasar.req
FIC_PARAM="/root/ALCASAR-parameters.txt"
 
CACERT_LIFETIME="1460"
SRVCERT_LIFETIME="1460"
COUNTRY="FR"
PROVINCE="none"
LOCATION="Paris"
ORGANIZATION="ALCASAR-Team"
 
mkdir $DIR_TMP || exit 1
# dynamic conf file for openssl
cat <<EOF >$DIR_TMP/ssl.conf
RANDFILE = $HOME/.rnd
#
[ ca ]
default_ca = AlcasarCA
 
[ AlcasarCA ]
dir = $DIR_TMP # Where everything is kept
certs = \$dir # Where the issued certs are kept
crl_dir = \$dir # Where the issued crl are kept
database = \$dir/index.txt # database index file.
new_certs_dir = \$dir # default place for new certs.
 
certificate = $CACERT # The CA certificate
serial = \$dir/serial # The current serial number
crl = \$dir/crl.pem # The current CRL
private_key = $CAKEY # The private key
 
x509_extensions = usr_cert # The extentions to add to the cert
crl_extensions = crl_ext
 
default_days = 365 # how long to certify for
default_crl_days= 30 # how long before next CRL
default_md = md5 # which md to use.
preserve = no # keep passed DN ordering
 
policy = policy_anything
 
[ policy_anything ]
countryName = optional
stateOrProvinceName = optional
localityName = optional
organizationName = optional
organizationalUnitName = optional
commonName = supplied
emailAddress = optional
 
[ req ]
default_bits = 1024
distinguished_name = req_distinguished_name
# attributes = req_attributes
x509_extensions = v3_ca # The extentions to add to the self signed cert
 
[ req_distinguished_name ]
countryName = Country Name (2 letter code)
countryName_default = FR
countryName_min = 2
countryName_max = 2
 
stateOrProvinceName = State or Province Name (full name)
stateOrProvinceName_default = Some-State
 
localityName = Locality Name (eg, city)
localityName_default = Lyon
 
0.organizationName = Organization Name (eg, company)
0.organizationName_default = your organization name
 
# we can do this but it is not needed normally :-)
#1.organizationName = Second Organization Name (eg, company)
#1.organizationName_default = World Wide Web Pty Ltd
 
organizationalUnitName = Organizational Unit Name (eg, section)
#organizationalUnitName_default =
 
commonName = Common Name (eg, your name or your server\'s hostname)
commonName_max = 255
 
emailAddress = Email Address
emailAddress_max = 255
 
# SET-ex3 = SET extension number 3
 
[ usr_cert ]
# These extensions are added when 'ca' signs a request.
# This goes against PKIX guidelines but some CAs do it and some software
# requires this to avoid interpreting an end user certificate as a CA.
#basicConstraints=CA:FALSE
 
# Here are some examples of the usage of nsCertType. If it is omitted
# the certificate can be used for anything *except* object signing.
 
# This is OK for an SSL server.
# nsCertType = nsCertType
# For normal client use this is typical
# nsCertType = client, email
nsCertType = server
 
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
 
# This will be displayed in Netscape's comment listbox.
nsComment = "OpenSSL Generated Certificate"
 
# PKIX recommendations harmless if included in all certificates.
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid,issuer:always
 
# This stuff is for subjectAltName and issuerAltname.
# Import the email address.
subjectAltName=email:copy
 
# Copy subject details
issuerAltName=issuer:copy
 
#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
#nsBaseUrl
#nsRevocationUrl
#nsRenewalUrl
#nsCaPolicyUrl
#nsSslServerName
 
[ v3_ca ]
# PKIX recommendation.
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid:always,issuer:always
 
# This is what PKIX recommends but some broken software chokes on critical
# extensions.
basicConstraints = critical,CA:true
# So we do this instead.
#basicConstraints = CA:true
 
# Key usage: this is typical for a CA certificate. However since it will
# prevent it being used as an test self-signed certificate it is best
# left out by default.
keyUsage = cRLSign, keyCertSign
nsCertType = sslCA
EOF
 
hostname=`hostname`
if [ -z "$hostname" ];
then
echo "Impossible de déterminer le nom d'hôte !!!"
exit 1
fi
 
# The value for organizationalUnitName must be 64 chars or less;
# thus, hostname must be 36 chars or less. If it's too big,
# try removing domain (merci REXY ;-) ).
hostname_len=`echo $hostname| wc -c`
 
if [ $hostname_len -gt 36 ];
then
hostname=`echo $hostname | cut -d '.' -f 1`
fi
 
if [ ! -f /etc/sysconfig/network-scripts/ifcfg-eth1 ]
then
echo "Impossible de déterminer l'@-IP"
exit 1
fi
IPADDR=`cat /etc/sysconfig/network-scripts/ifcfg-eth1 |grep IPADDR|cut -d"=" -f2`
CAMAIL=ca@$hostname
SRVMAIL=apache@$hostname
 
echo 01 > $DIR_TMP/serial
touch $DIR_TMP/index.txt
 
# CA key
rm -f $CAKEY
echo "*********CAKEY*********" > $DIR_TMP/openssl-log
openssl genrsa -out $CAKEY 1024 2>> $DIR_TMP/openssl-log
 
# CA certificate
rm -f $CACERT
echo "*********CACERT*********" >> $DIR_TMP/openssl-log
echo "$COUNTRY
$PROVINCE
$LOCATION
$ORGANIZATION
Certification Authority for $hostname
ALCASAR-local-CA
$CAMAIL" |
openssl req -config $DIR_TMP/ssl.conf -new -x509 -days $CACERT_LIFETIME -key $CAKEY -out $CACERT 2>> $DIR_TMP/openssl-log
 
# Server key
rm -f $SRVKEY
echo "*********SRVKEY*********" >> $DIR_TMP/openssl-log
openssl genrsa -out $SRVKEY 1024 2>> $DIR_TMP/openssl-log
 
# Server certificate "request"
echo "*********SRVRQST*********" >> $DIR_TMP/openssl-log
echo "$COUNTRY
$PROVINCE
$LOCATION
$ORGANIZATION
Server certificate for $hostname
$IPADDR
$SRVMAIL" |
openssl req -config $DIR_TMP/ssl.conf -new -key $SRVKEY -out $SRVREQ 2>> $DIR_TMP/openssl-log
 
# Sign the server certificate "request" to create server certificate
rm -f $SRVCERT
echo "*********SRVCERT*********" >> $DIR_TMP/openssl-log
openssl ca -config $DIR_TMP/ssl.conf -name AlcasarCA -batch -days $SRVCERT_LIFETIME -in $SRVREQ -out $SRVCERT 2>> $DIR_TMP/openssl-log
rm -f $SRVREQ
chmod a+r $CACERT $SRVCERT
 
if [ -s "$CACERT" -a -s "$CAKEY" -a -s "$SRVCERT" -a -s "$SRVKEY" ];
then
echo "- Certificat de l'Authorité de Certification : " >> $FIC_PARAM
echo " Certificat = $CACERT" >> $FIC_PARAM
echo " Clée privée = $CAKEY" >> $FIC_PARAM
echo "- Certificat du serveur : " >> $FIC_PARAM
echo " Certificat = $SRVCERT" >> $FIC_PARAM
echo " Clée privée = $SRVKEY" >> $FIC_PARAM
[ -d $DIR_WEB/certs ] || mkdir -p $DIR_WEB/certs
rm -f $DIR_WEB/certs/*
ln -s $CACERT $DIR_WEB/certs/certificat_alcasar_ca.pem
ln -s $SRVCERT $DIR_WEB/certs/certificat_alcasar.pem
rm -rf $DIR_TMP
exit 0
else
echo "Problème lors de la création des certificats (cf. $DIR_TMP/openssl-log)" >> $FIC_PARAM
exit 1
fi
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:executable
/scripts/alcasar-iptables-bypass.sh
0,0 → 1,80
#!/bin/sh
# script d'initialisation des regles du parefeu en mode ByPass
# Rexy - 3abtux
# version 1.8 - 12/2009
# changelog :
# + prise en compte optionnelle d'un fichier iptables 'personnel' permettant de bloquer certains flux/services
# + suppression log vers syslog
# + suppression du broadcast et du multicast sur les interfaces
 
IPTABLES="/sbin/iptables"
 
EXTIF="eth0"
INTIF="eth1"
PRIVATE_NETWORK_MASK="192.168.182.0/24"
 
# On vide (flush) toutes les règles existantes
$IPTABLES -F
$IPTABLES -t nat -F
$IPTABLES -F INPUT
$IPTABLES -F FORWARD
$IPTABLES -F OUTPUT
 
# On indique les politiques par défaut
$IPTABLES -P INPUT DROP
$IPTABLES -P FORWARD DROP
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -t nat -P PREROUTING ACCEPT
$IPTABLES -t nat -P POSTROUTING ACCEPT
$IPTABLES -t nat -P OUTPUT ACCEPT
 
# On efface toutes les chaînes qui ne sont pas par défaut dans les tables filter et nat
$IPTABLES -X
$IPTABLES -t nat -X
 
# On autorise tout sur loopback
$IPTABLES -A INPUT -i lo -j ACCEPT
 
# on autorise les requêtes dhcp
$IPTABLES -A INPUT -i $INTIF -p udp -m udp --sport bootpc --dport bootps -j ACCEPT
 
# Règles d'antispoofing
$IPTABLES -A INPUT -i $INTIF ! -s $PRIVATE_NETWORK_MASK -j ULOG --ulog-prefix "RULE Antispoof1 -- DENY "
$IPTABLES -A INPUT -i $INTIF ! -s $PRIVATE_NETWORK_MASK -j DROP
$IPTABLES -A INPUT -i $EXTIF -s $PRIVATE_NETWORK_MASK -j ULOG --ulog-prefix "RULE Antispoof2 -- DENY "
$IPTABLES -A INPUT -i $EXTIF -s $PRIVATE_NETWORK_MASK -j DROP
 
# On drop le broadcast et le multicasat sur les interfaces (sans Log)
$IPTABLES -A INPUT -m addrtype --dst-type BROADCAST,MULTICAST -j DROP
 
# On autorise le ping dans les deux sens (icmp N°0 & 8) en provenance du LAN
$IPTABLES -A INPUT -i $INTIF -s $PRIVATE_NETWORK_MASK -p icmp --icmp-type 0 -j ACCEPT
$IPTABLES -A INPUT -i $INTIF -s $PRIVATE_NETWORK_MASK -p icmp --icmp-type 8 -j ACCEPT
 
# On autorise le tranfert des requête DNS (sans LOG)
$IPTABLES -A FORWARD -i $INTIF -p udp --dport domain -j ACCEPT
 
# On autorise le flux dans les deux sens (avec Log sur les demandes de connexion).
$IPTABLES -A FORWARD -i $INTIF -m state --state NEW -j ULOG --ulog-prefix "RULE Transfert -- ACCEPT "
$IPTABLES -A FORWARD -i $INTIF -m state --state NEW -j ACCEPT
$IPTABLES -A FORWARD -i $INTIF -m state --state RELATED,ESTABLISHED -j ACCEPT
$IPTABLES -A FORWARD -o $INTIF -m state --state RELATED,ESTABLISHED -j ACCEPT
 
# On autorise les flux entrant ntp et ssh via INTIF
$IPTABLES -A INPUT -i $INTIF -p udp --dport ntp -j ACCEPT
$IPTABLES -A INPUT -i $INTIF -p tcp --dport ssh -j ACCEPT
 
# On autorise les flux entrant des connexions déjà établies (ping à partir du portail par exemple)
$IPTABLES -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
 
# On interdit et on log le reste sur les 2 interfaces d'accès
$IPTABLES -A INPUT -i $INTIF -j ULOG --ulog-prefix "RULE rej-int -- REJECT "
$IPTABLES -A INPUT -i $EXTIF -j ULOG --ulog-prefix "RULE rej-ext -- REJECT "
$IPTABLES -A INPUT -p tcp -j REJECT --reject-with tcp-reset
$IPTABLES -A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable
 
# On active le masquage d'adresse par translation (NAT)
$IPTABLES -A POSTROUTING -t nat -o $EXTIF -j MASQUERADE
 
/etc/init.d/iptables save
# Fin du script des regles du parefeu
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:executable
/scripts/alcasar-mondo.sh
0,0 → 1,28
#!/bin/sh
# by 3abtux (with debug helps by Michel GAUDET)
DIR_TMP="/var/log/mondo"
DIR_ISO="/var/Save/ISO"
date=`date +%F-%Hh%M`
HOSTNAME=`hostname -s`
ROOT="root"
ISOFile=$HOSTNAME-$date
EXCLUDE="$DIR_ISO $DIR_TMP /tmp /mnt /media"
 
echo "Les répertoires exclus de l'image ISO sont : $EXCLUDE "
echo "##################################################"
echo "# Création de l'archive ISO système d'Alcasar ! #"
echo "##################################################"
echo ""
echo "--------------------------------------------------------"
echo "Les ISOs seront disponibles dans le répertoire suivant :"
echo "==--> $DIR_ISO"
/bin/touch $DIR_ISO/creation-of-the-current-archive
mkdir $DIR_TMP
/bin/nice -n 19 /usr/sbin/mondoarchive -p $ISOFile -Oi -s 4300m -d $DIR_ISO -T $DIR_TMP -S $DIR_TMP -E "$EXCLUDE"
cd $DIR_ISO
for i in `ls *.iso` ;do
/usr/bin/md5sum $i > $i.md5
done
rm -rf $DIR_TMP/mondo.scratch.* $DIR_TMP/tmp.mondo.* $DIR_TMP/.*.dat
rm -f $DIR_ISO/creation-of-the-current-archive
exit 0
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:executable
/scripts/alcasar-log-export.sh
0,0 → 1,36
#!/bin/sh
#
# alcasar-log-export.sh
# by Franck BOUIJOUX
# This script is distributed under the Gnu General Public License (GPL)
 
# Script permettant d'exporter des logs des répertoires /var/log/(squid-firewall-httpd ) à des fins d'archivages.
# Une fonction EXPERIMENTALE de chiffrement et de signature des logs a été implémentée dans ce script. Son activation par la mise à '1' de la variable 'CHIFFREMENT' et/ou 'SIGNATURE' permet de chiffrer-signer ou signer les logs contenus dans /var/Save/logs/.
# Il est nécessaire de détenir la passphrase de la clé privée de l'utilisateur 'admin-chillispot' pour rendre ces logs lisibles (la passphrase est actuellement détenue par l'équipe projet.
 
# changelog :
# - 20080114 - implémentation de la signature des archives logs
 
date=`date +%F`
TO_SAVE="/var/Save/logs" # répertoire accessible par webs
REP_SAVE="/var/log" # répertoire local des logs
REP_SERVICE="squid httpd firewall" # liste des répertoires contenant des logs à exporter
CHIFFREMENT="0" # chiffrement des logs ( 0=non / 1=oui )
GPG_USER="" # utilisateur autorisé à déchiffrer les logs. Son biclé est inclus dans le portefeuille gnupg de root (/root/.gnupg)
 
for i in $REP_SERVICE ; do
[ -d $TO_SAVE/$i ] || mkdir -p $TO_SAVE/$i # utile une seule fois mais crée le répertoire si nécessaire
cd $REP_SAVE/$i
if [ $CHIFFREMENT -eq "1" ]
then
# chiffrement des logs dans /var/Save/logs/(squid|firewall|httpd)
find . \( -mtime -7 -o -ctime 0 \) -a \( -name '*access*log*.gz' -o -name 'firewall*.gz' -o -name 'admin*.gz' \) -exec gpg --output $TO_SAVE/$i/{}.gpg --encrypt --recipient $GPG_USER {} \;
else
# copie simple des logs dans /var/Save/logs/(squid|firewall|httpd)
 
find . \( -mtime -7 -o -ctime 0 \) -a \( -name '*access*log*.gz' -o -name 'firewall*.gz' -o -name 'admin*.gz' \) -exec cp {} $TO_SAVE/$i/. \;
fi
done
chown -R apache.apache $TO_SAVE
exit 0
 
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:executable
/scripts/alcasar-log-clean.sh
0,0 → 1,14
#!/bin/sh
# script de nettoyage des archives supérieures à 1 an ( 365 jours)
 
DATE=`date +%F`
REP="/var/log/squid/ /var/log/httpd/ /var/log/firewall/ /var/Save/base/ /var/Save/logs/firewall/ /var/Save/logs/squid/ /var/Save/logs/httpd/"
delay=365
 
for i in $REP
do
find $i -mtime +$delay -name '*.gz' -exec rm -f {} \;
find $i -mtime +$delay -name '*.sql' -exec rm -f {} \;
done
 
exit 0
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:executable
/gestion/admin/network.php
0,0 → 1,181
<?php
/* written by steweb57 */
 
# Choice of language
$Language = 'en';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'fr'){
$l_network_title = "Configuration réseau";
$l_network_title1 = "Gestion de la configuration réseau";
$l_eth0_legend = "Eth0 (Interface connectée à Internet)";
$l_eth1_legend = "Eth1 (Réseau de consultation)";
$l_internet_legend = "INTERNET";
$l_ip_adr = "Adresse IP";
$l_ip_mask = "Masque";
$l_ip_router = "Passerelle";
$l_ip_public = "Adresse IP public";
$l_ip_dns1 = "DNS1";
$l_ip_dns2 = "DNS2";
} else {
$l_network_title = "Network configuration";
$l_network_title1 = "Network configuration managment";
$l_eth0_legend = "Eth0 (Internet connected interface)";
$l_eth1_legend = "Eth1 (Private network)";
$l_internet_legend = "INTERNET";
$l_ip_adr = "IP Address";
$l_ip_mask = "Mask";
$l_ip_router = "Router";
$l_ip_public = "Public IP address";
$l_ip_dns1 = "DNS1 :";
$l_ip_dns2 = "DNS2";
}
 
/********************************************************************
* CONSTANTES AVEC CHEMINS DES FICHIERS DE CONFIGURATION *
*********************************************************************/
 
define ("ALCASAR_CHILLI", "/etc/chilli/config");
define ("ALCASAR_ETH0", "/etc/sysconfig/network-scripts/default-ifcfg-eth0");
define ("ALCASAR_ETH1", "/etc/sysconfig/network-scripts/ifcfg-eth1");
 
/********************************************************************
* TEST DES FICHIERS DE CONFIGURATION *
*********************************************************************/
 
//Test de présence et des droits en lecture des fichiers de configuration.
if (!file_exists(ALCASAR_CHILLI)){
exit("Fichier de configuration ".ALCASAR_CHILLI." non présent");
}
if (!file_exists(ALCASAR_ETH0)){
exit("Fichier de configuration ".ALCASAR_ETH0." non présent");
}
if (!file_exists(ALCASAR_ETH0)){
exit("Fichier de configuration ".ALCASAR_ETH1." non présent");
}
if (!is_readable(ALCASAR_ETH0)){
exit("Vous n'avez pas les droits de lecture sur le fichier ".ALCASAR_ETH0);
}
if (!is_readable(ALCASAR_ETH0)){
exit("Vous n'avez pas les droits de lecture sur le fichier ".ALCASAR_ETH1);
}
 
/********************************************************************
* Lecture du fichier ALCASAR_CHILLI *
*********************************************************************/
//Lecture du fichier ALCASAR_ETH0
$ouvre=fopen(ALCASAR_CHILLI,"r");
if ($ouvre){
while (!feof ($ouvre))
{
$tampon = fgets($ouvre, 4096);
if (strpos($tampon,"=")!==false){
$tmp = explode("=",$tampon);
$chilli[$tmp[0]] = $tmp[1];
}
}
}else{
exit("Erreur d'ouverture du fichier ".ALCASAR_CHILLI);
}
fclose($ouvre);
 
/********************************************************************
* Lecture du fichier ALCASAR_ETH0 *
*********************************************************************/
 
//Lecture du fichier ALCASAR_ETH0
$ouvre=fopen(ALCASAR_ETH0,"r");
if ($ouvre){
while (!feof ($ouvre))
{
$tampon = fgets($ouvre, 4096);
if (strpos($tampon,"=")!==false){
$tmp = explode("=",$tampon);
$eth0[$tmp[0]] = $tmp[1];
}
}
}else{
exit("Erreur d'ouverture du fichier ".ALCASAR_ETH0);
}
fclose($ouvre);
 
/********************************************************************
* Lecture du fichier ALCASAR_ETH1 *
*********************************************************************/
 
//Lecture du fichier ALCASAR_ETH1
$ouvre=fopen(ALCASAR_ETH1,"r");
if ($ouvre){
while (!feof ($ouvre))
{
$tampon = fgets($ouvre, 4096);
if (strpos($tampon,"=")!==false){
$tmp = explode("=",$tampon);
$eth1[$tmp[0]] = $tmp[1];
}
}
}else{
exit("Erreur d'ouverture du fichier ".ALCASAR_ETH1);
}
fclose($ouvre);
 
 
/********************************************************************
* Recherche IP public *
*********************************************************************/
$IP_PUB = exec ("wget http://checkip.dyndns.org/ -O - -o /dev/null | cut -d: -f 2 | cut -d\< -f 1");
 
 
 
/************************
* TO DO *
*************************/
//modification de la conf réseau, cmd : ifconfig eth0 .....
//synchro de la modification réseau dans les différentes couches d'alcasar
//gestion du dhcp (affichage,modification, ajout @static)
 
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><!-- written by steweb57 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $l_network_title; ?></title>
<link rel="stylesheet" href="../css/style.css" type="text/css">
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th><?php echo $l_network_title1; ?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</table>
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
<tr><td valign="middle" align="left">
<fieldset>
<legend><?php echo $l_eth0_legend; ?></legend>
<table>
<tr><td><?php echo $l_ip_adr." : </td><td>".$eth0["IPADDR"];?></td></tr>
<tr><td><?php echo $l_ip_mask." : </td><td>".$eth0["NETMASK"];?></td></tr>
<tr><td><?php echo $l_ip_router." : </td><td>".$eth0["GATEWAY"];?></td></tr>
</table>
</fieldset>
<br />
<fieldset>
<legend><?php echo $l_eth1_legend; ?></legend>
<table>
<tr><td><?php echo $l_ip_adr." : </td><td>".$eth1["IPADDR"];?></td></tr>
<tr><td><?php echo $l_ip_mask." : </td><td>".$eth1["NETMASK"];?></td></tr>
</table>
</fieldset>
<br />
<fieldset>
<legend><?php echo $l_internet_legend; ?></legend>
<table>
<tr><td><?php echo $l_ip_public." : </td><td>".$IP_PUB;?></td></tr>
<tr><td><?php echo $l_ip_dns1." : </td><td>".$eth0["DNS1"];?></td></tr>
<tr><td><?php echo $l_ip_dns2." : </td><td>".$eth0["DNS2"];?></td></tr>
</table>
</fieldset>
<br />
</td></tr>
</table>
</body>
</html>
/gestion/admin/ldap.php
0,0 → 1,334
<?php
/* written by steweb57 */
/****************************************************************
* CONSTANTES AVEC CHEMINS DES FICHIERS DE CONFIGURATION *
*****************************************************************/
 
define ("ALCASAR_RADIUS_SITE", "/etc/raddb/sites-available/alcasar");
define ("ALCASAR_RADIUS_MODULE_LDAP", "/etc/raddb/modules/ldap");
 
/********************************************************
* TEST DES FICHIERS DE CONFIGURATION *
*********************************************************/
 
//Test de présence et des droits en lecture des fichiers de configuration.
if (!file_exists(ALCASAR_RADIUS_SITE)){
exit("Fichier ".ALCASAR_RADIUS_SITE." non présent");
}
if (!file_exists(ALCASAR_RADIUS_MODULE_LDAP)){
exit("Fichier ".ALCASAR_RADIUS_MODULE_LDAP." non présent");
}
if (!is_readable(ALCASAR_RADIUS_SITE)){
exit("Vous n'avez pas les droits d'écriture sur le fichier ".ALCASAR_RADIUS_SITE);
}
if (!is_readable(ALCASAR_RADIUS_MODULE_LDAP)){
exit("Vous n'avez pas les droits d'écriture sur le fichier ".ALCASAR_RADIUS_MODULE_LDAP);
}
 
/********************************************************
* VARIABLES DE FORMULAIRE *
*********************************************************/
 
if (isset($_GET['erreur'])&&(!($_GET['erreur']==""))) $erreur = $_GET['erreur']; else $erreur = false;//valeur de $erreur non controlée car ne sert qu'un afficher un msg.
if (isset($_GET['update'])&&($_GET['update']=="ok")) $update = true; else $update = false;
 
$message = "";
if ((bool)$erreur){
$message = "<div align=\"center\"><br />";
$message.="<strong><font color=\"red\">".$erreur."</font></strong><br />";
$message.="<br /></div>";
}else{
if ($update){
$message = "<div align=\"center\"><br />";
$message.="<strong><font color=\"red\">Mise à jour des paramètres ldap réalisé avec succès</font><br /></strong>";
$message.="<br /></div>";
}
}
 
/****************************************************************
* VARIABLES RESULTATS *
*****************************************************************/
//Création des variables nécessaires
//variables ldap
$ldap = "";
$ldap_server = ""; //IP ou nom DNS du seveur LDAP (ou AD)
//par défaut : server = "ldap.your.domain"
$ldap_identity = ""; //nom d'utilisateur qui intérroge le ldap (vide = anonyme)
//par défaut : # identity = "cn=admin,o=My Org,c=UA"
$ldap_password = ""; //mot de passe de l'utilisateur intérrogeant le ldap
//par défaut : # password = mypass
$ldap_basedn = ""; //DN de base ou l'on recherchera les utilisateurs
//par défaut : basedn = "o=My Org,c=UA"
$ldap_filter = ""; //permet entre autre de déterminer l'attribut utilisé pour la recherche d'un utilisateur dans LDAP
//attribut uid pour un ldap standard, samaccountname pour AD
//par défaut : filter = "(uid=%{Stripped-User-Name:-%{User-Name}})"
$ldap_base_filter = ""; //
//par défaut : # base_filter = "(objectclass=radiusprofile)"
 
 
/********************************************************
* Fichier ALCASAR_RADIUS_SITE *
*********************************************************/
//variables pour le parcourt des fichiers
//$ouvre : fichier ouvert
//$tampon : ligne en cours
//
//Lecture du fichier /etc/raddb/sites-available/alcasar
$continue = true;
$ouvre=fopen(ALCASAR_RADIUS_SITE,"r");
if ($ouvre){
while (!feof ($ouvre))
{
$tampon = fgets($ouvre, 4096);
if ((preg_match('`^([\s#]*ldap[\s]*)$`',$tampon))&&$continue){
//Récupération dans la section authorise de la ligne ldap
//valeur : ldap = authentification ldap authorisée
//valeur : #ldap = authentification ldap non authorisée
//section authenticat utile ?
//section post-auth non utilisée
$ldap = trim($tampon);
$continue = false;//arret de la boucle lorsque l'on trouve le premier élément "ldap" dans le fichier
}
}
}else{
exit("Erreur d'ouverture du fichier /etc/raddb/sites-available/alcasar");
}
fclose($ouvre);
 
/****************************************************************
* Fichier ALCASAR_RADIUS_MODULE_LDAP *
*****************************************************************/
//Lecture du fichier /etc/raddb/modules/ldap
$ouvre=fopen(ALCASAR_RADIUS_MODULE_LDAP,"r");
if ($ouvre){
while (!feof ($ouvre))
{
$tampon = fgets($ouvre, 4096);
if (preg_match('`^([\s#]*server(\s*)=)`',$tampon)){
//if (preg_match('`^((\s*)(#*)(\s*)server\b(\s*)=)`i',$tampon)){
//Récupération de la ligne contenant le paramettre ldap server
$ldap_server = ltrim($tampon);
} elseif (preg_match('`^([\s#]*identity(\s*)=)`',$tampon)){
//Récupération de la ligne contenant le paramettre ldap identity
$ldap_identity = ltrim($tampon);
} elseif (preg_match('`^([\s#]*password(\s*)=)`',$tampon)){
//Récupération de la ligne contenant le paramettre ldap password
$ldap_password = ltrim($tampon);
} elseif (preg_match('`^([\s#]*basedn(\s*)=)`',$tampon)){
//Récupération de la ligne contenant le paramettre ldap basedn
$ldap_basedn = ltrim($tampon);
} elseif (preg_match('`^([\s#]*filter(\s*)=)`',$tampon)){
//Récupération de la ligne contenant le paramettre ldap filter
$ldap_filter = ltrim($tampon);
} elseif (preg_match('`^([\s#]*base_filter(\s*)=)`',$tampon)){
//Récupération de la ligne contenant le paramettre ldap base_filter
$ldap_base_filter = ltrim($tampon);
}
}
}else{
exit("Erreur d'ouverture du fichier /etc/raddb/modules/ldap");
}
fclose($ouvre);
 
//mise en forme des parametres ldap récupérés
//A FAIRE : test de contrôle des valeurs $tmp[O] pour être sur d'avoir les bonnes lignes du fichier de conf !!!
 
//pas de test de la variable ldap car tester dans la comparaison du formulaire ci-dessous (si $ldap = "ldap" authentification LDAP activée, elle est désactivé).
$tmp = explode("=",$ldap_server,2);
$ldap_server = str_replace("\"","",$tmp[1]); //suppression des " dans la chaine
$ldap_server = trim($ldap_server); //suppression des espaces avant et après la chaine
 
$tmp = explode("=",$ldap_identity,2);
$ldap_identity = str_replace("\"","",$tmp[1]); //suppression des " dans la chaine
$ldap_identity = trim($ldap_identity); //suppression des espaces avant et après la chaine
 
$tmp = explode("=",$ldap_password,2);
$ldap_password = str_replace("\"","",$tmp[1]); //suppression des " dans la chaine
$ldap_password = trim($ldap_password); //suppression des espaces avant et après la chaine
 
$tmp = explode("=",$ldap_basedn,2);
$ldap_basedn = str_replace("\"","",$tmp[1]); //suppression des " dans la chaine
$ldap_basedn = trim($ldap_basedn); //suppression des espaces avant et après la chaine
 
$tmp = explode("=",$ldap_filter,3);
$ldap_filter = str_replace("\"","",$tmp[1]); //suppression des " dans la chaine
$ldap_filter = trim($ldap_filter); //suppression des espaces avant et après la chaine
$ldap_filter = str_replace("(","",$ldap_filter);//suppression du ( dans la chaine
 
$tmp = explode("=",$ldap_base_filter,2);
$ldap_base_filter = str_replace("\"","",$tmp[1]); //suppression des " dans la chaine
$ldap_base_filter = trim($ldap_base_filter); //suppression des espaces avant et après la chaine
 
# Choice of language
$Language = 'en';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'fr'){
$l_ldap_title = "Authentification externe : LDAP";
$l_ldap_legend = "Authentification LDAP";
$l_ldap_auth_enable_label = "Activer l'authentification LDAP:";
$l_ldap_YES = "OUI";
$l_ldap_NO = "NON";
$l_ldap_server_label = "Nom du serveur LDAP:";
$l_ldap_server_text = "Nom ou IP du serveur LDAP éventuel.";
$l_ldap_base_dn_label = "DN de la base LDAP:";
$l_ldap_base_dn_text = "DN est le 'Distinguished Name', il situe les informations utilisateurs, exemple: 'o=Mon entreprise, c=FR'.";
$l_ldap_filter_label = "Identifiant LDAP:";
$l_ldap_filter_text = "Clé utilisée pour la recherche d'un identifiant de connexion, exemple: 'uid', 'sn', etc. Pour un AD mettre 'sAMAccountName'.";
$l_ldap_base_filter_label = "Filtre de l'utilisateur LDAP:";
$l_ldap_base_filter_text = "Sur option, vous pouvez en plus limiter les objets recherchés avec des filtres additionnels. Par exemple 'objectClass=posixGroup' aurait comme conséquence l'utilisation de '(&amp;(uid=username)(objectClass=posixGroup))'";
$l_ldap_user_label = "Utilisateur LDAP dn:";
$l_ldap_user_text = "Laissez vide pour utiliser un accès invité. Si renseigné, il se connectera au serveur LDAP en tant qu'un utilisateur spécifié, exemple: 'uid=Utilisateur,ou=MonUnité,o=MaCompagnie,c=FR'. Requis pour les serveurs possédant un Active Directory.";
$l_ldap_password_label = "Mot de passe LDAP:";
$l_ldap_password_text = "Laissez vide pour un accès invité. Sinon, indiquez le mot de passe de connexion. Requis pour les serveurs possédant un Active Directory.";
$l_ldap_submit = "Enregistrer";
$l_ldap_reset = "Annuler";
} else {
$l_ldap_title = "External authentication : LDAP";
$l_ldap_legend = "LDAP authentication";
$l_ldap_auth_enable_label = "Use LDAP authentication :";
$l_ldap_YES = "YES";
$l_ldap_NO = "NO";
$l_ldap_server_label = "LDAP server name:";
$l_ldap_server_text = "This is the hostname or IP address of the LDAP server.";
$l_ldap_base_dn_label = "LDAP base dn:";
$l_ldap_base_dn_text = "This is the 'Distinguished Name', locating the user information, e.g. 'o=My Company,c=US'.";
$l_ldap_filter_label = "LDAP uid:";
$l_ldap_filter_text = "This is the key under which to search for a given login identity, e.g. 'uid', 'sn', etc.. For AD use 'sAMAccountName'.";
$l_ldap_base_filter_label = "LDAP user filter:";
$l_ldap_base_filter_text = "Optionally you can further limit the searched objects with additional filters. For example 'objectClass=posixGroup' would result in the use of '(&amp;(uid=username)(objectClass=posixGroup))'";
$l_ldap_user_label = "LDAP user dn:";
$l_ldap_user_text = "Leave blank to use anonymous binding. If filled uses the specified distinguished name on login attempts to find the correct user, e.g. 'uid=Username,ou=MyUnit,o=MyCompany,c=US'. Required for Active Directory Servers.";
$l_ldap_password_label = "LDAP password:";
$l_ldap_password_text = "Leave blank to use anonymous binding. Else fill in the password for the above user. Required for Active Directory Servers.";
$l_ldap_submit = "Save";
$l_ldap_reset = "Reset";
}
/********************************
* TO DO *
*********************************/
//internationnalisation à mettre en haut du fichier pour internationnaliser les erreurs de script!
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><!-- written by steweb57 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $l_ldap_title; ?></title>
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="../css/ldap.css" type="text/css">
<script language="javascript">
function testLdapActif(){
//List des ID des éléments à désactiver
var listToDisables = new Array("ldap_server","ldap_dn","ldap_filter","ldap_base_filter","ldap_user","ldap_password");
 
if (document.getElementById("auth_enable").value == "1"){
for (var i=0;i<listToDisables.length;i++){
document.getElementById(listToDisables[i]).style.backgroundColor ="#ffffff";
document.getElementById(listToDisables[i]).disabled = false;
}
} else {
for (var i=0;i<listToDisables.length;i++){
document.getElementById(listToDisables[i]).style.backgroundColor ="#c0c0c0";
document.getElementById(listToDisables[i]).disabled = true;
}
}
}
</script>
</head>
<body onLoad="testLdapActif();">
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><th><?php echo $l_ldap_legend; ?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width=1 height=2></td></tr>
</table>
<table width="100%" border=1 cellspacing=0 cellpadding=1>
<tr><td valign="middle" align="left">
<form name="config_ldap" method="post" action="update_ldap.php">
<fieldset>
<legend><?php echo $message; ?></legend>
<dl>
<dt>
<label for="auth_enable"><?php echo $l_ldap_auth_enable_label; ?></label>
</dt>
<dd>
<select id="auth_enable" name="auth_enable" onchange="testLdapActif();">
<?php if ($ldap == "ldap") {
echo "<option value=\"1\" selected=\"selected\">$l_ldap_YES</option>";
echo "<option value=\"0\">$l_ldap_NO</option>";
}else{
echo "<option value=\"1\">$l_ldap_YES</option>";
echo "<option value=\"0\" selected=\"selected\">$l_ldap_NO</option>";
}?>
</select>
</dd>
</dl>
<dl>
<dt>
<label for="ldap_server"><?php echo $l_ldap_server_label; ?></label>
<br />
<?php echo $l_ldap_server_text; ?></dt>
<dd>
<input id="ldap_server" size="40" name="ldap_server" value="<?php echo htmlspecialchars($ldap_server); ?>"/>
</dd>
</dl>
<dl>
<dt>
<label for="ldap_dn"><?php echo $l_ldap_base_dn_label; ?></label>
<br />
<?php echo $l_ldap_base_dn_text; ?></dt>
<dd>
<input id="ldap_dn" size="40" name="ldap_base_dn" value="<?php echo htmlspecialchars($ldap_basedn); ?>" />
</dd>
</dl>
<dl>
<dt>
<label for="ldap_filter"><?php echo $l_ldap_filter_label; ?></label>
<br />
<?php echo $l_ldap_filter_text; ?></dt>
<dd>
<input id="ldap_filter" size="40" name="ldap_filter" value="<?php echo htmlspecialchars($ldap_filter); ?>" />
</dd>
</dl>
<dl>
<dt>
<label for="ldap_base_filter"><?php echo $l_ldap_base_filter_label; ?></label>
<br />
<?php echo $l_ldap_base_filter_text; ?></dt>
<dd>
<input id="ldap_base_filter" size="40" name="ldap_base_filter" value="<?php echo htmlspecialchars($ldap_base_filter); ?>" />
</dd>
</dl>
<dl>
<dt>
<label for="ldap_user"><?php echo $l_ldap_user_label; ?></label>
<br />
<?php echo $l_ldap_user_text; ?></dt>
<dd>
<input id="ldap_user" size="40" name="ldap_user" value="<?php echo htmlspecialchars($ldap_identity); ?>" />
</dd>
</dl>
<dl>
<dt>
<label for="ldap_password"><?php echo $l_ldap_password_label; ?></label>
<br />
<?php echo $l_ldap_password_text; ?></dt>
<dd>
<input id="ldap_password" type="password" size="40" name="ldap_password" value="<?php echo htmlspecialchars($ldap_password);?>" />
</dd>
</dl>
<p>
<input id="submit" type="submit" value="<?php echo $l_ldap_submit; ?>" name="submit" />
 
<input id="reset" type="reset" value="<?php echo $l_ldap_reset; ?>" name="reset" />
</p>
 
</fieldset>
</form>
<br />
</td></tr>
</table>
</body>
</html>
/gestion/admin/auth_exceptions.php
0,0 → 1,221
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><!-- written by Rexy - 3abtux -->
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<TITLE>Exceptions</TITLE>
<link rel="stylesheet" href="/css/style.css" type="text/css">
</HEAD>
<body>
<?
# Choice of language
$Language = 'en';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'fr'){
$l_trusted_sites = "Sites Internet de confiance";
$l_trusted_sites_explain1 = "Entrez ici les noms de site ou d'URLs Internet pouvant &ecirc;tre joints sans authentification";
$l_trusted_sites_explain2 = "Entrez un noms par ligne";
$l_trusted_sites_list = "Liste de sites Internet de confiance";
$l_trusted_urls_list = "Liste d'URLs Internet de confiance";
$l_trusted_mac = "&Eacute;quipements de confiance";
$l_trusted_mac_explain1 = "Entrez ici les adresses MAC des &eacute;quipements autorisés à joindre Internet sans authentification";
$l_trusted_mac_explain2 = "Entrez une adresse MAC par ligne";
$l_trusted_mac_list = "Liste des adresses MAC de confiance";
$l_submit = "Enregistrer";
}
else {
$l_trusted_sites = "Trusted Internet sites";
$l_trusted_sites_explain1 = "Enter name of Internet sites or URLS that could be joined without authentication";
$l_trusted_sites_explain2 = "Enter one name per line";
$l_trusted_sites_list = "Trusted Internet sites list";
$l_trusted_urls_list = "Trusted Internet URLs list";
$l_trusted_mac = "Trusted Equipments";
$l_trusted_mac_explain1 = "Enter MAC address of equipments that could contact Internet without authentification";
$l_trusted_mac_explain2 = "Enter one Mac address per line";
$l_trusted_mac_list = "Trusted MAC addresses list";
$l_submit = "Submit";
}
if (isset($_POST['choix'])){
switch ($_POST['choix'])
{
case 'MAJ_UAMALLOWED' :
$nb_domain=0;
$tab_domains = explode ("\n", $_POST['trusted_domains']);
$fichier=fopen("/etc/chilli/alcasar-uamdomain","w+");
fputs ($fichier, "HS_UAMDOMAINS=\"");
foreach ($tab_domains as $domain ){
$tr_domain=trim($domain);
$nb_domain++;
if ($tr_domain != ""){
if ($nb_domain>1) fputs ($fichier, ",".$tr_domain);
else fputs ($fichier, $tr_domain);
}
}
fputs ($fichier, "\"");
fclose($fichier);
unset($_POST['trusted_domains']);
unset($nb_domain);
$nb_url=0;
$tab_urls = explode ("\n", $_POST['trusted_urls']);
$fichier=fopen("/etc/chilli/alcasar-uamallowed","w+");
fputs ($fichier, "HS_UAMALLOW=\"");
foreach ($tab_urls as $url ){
$tr_url=trim($url);
$nb_url++;
if ($tr_url != ""){
if ($nb_url>1) fputs ($fichier, ",".$tr_url);
else fputs ($fichier, $tr_url);
}
}
fputs ($fichier, "\"");
fclose($fichier);
unset($_POST['trusted_urls']);
unset($nb_url);
exec ("sudo service chilli restart");
unset ($_POST['choix']);
break;
case 'MAJ_MACALLOWED' :
$nb_mac=0;
$tab_macs = explode ("\n", $_POST['trusted_macs']);
$fichier=fopen("/etc/chilli/alcasar-macallowed","w+");
fputs ($fichier, "HS_MACALLOW=\"");
foreach ($tab_macs as $macs ){
$tr_macs=trim($macs);
$nb_mac++;
if ($tr_macs != ""){
if ($nb_mac>1) fputs ($fichier, ",".$tr_macs);
else fputs ($fichier, $tr_macs);
}
}
fputs ($fichier, "\"");
fclose($fichier);
unset($_POST['trusted_macs']);
unset($nb_mac);
exec ("sudo service chilli restart");
unset ($_POST['choix']);
break;
}
}
?>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th><?php echo $l_trusted_sites ;?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">
<center><?php
echo "$l_trusted_sites_explain1 <BR>";
echo "$l_trusted_sites_explain2" ;
echo "<FORM action='$_SERVER[PHP_SELF]' method='POST'>";?>
<TABLE cellspacing=2 cellpadding=3 border=1>
<tr><td width=50% height=100% align=center>
<H3><?php echo $l_trusted_sites_list ;?></H3>
exemple1 : www.domain1.org<BR>
exemple2 : domain2.net<BR>
<?php
echo "<textarea name='trusted_domains' rows=5 cols=40>";
$trusted_domains_file="/etc/chilli/alcasar-uamdomain";
$ouvre=fopen($trusted_domains_file,"r");
if ($ouvre)
{
while (!feof ($ouvre))
{
$tampon = fgets($ouvre, 4096);
$domains = substr($tampon,15,-1);
$tab_domains = explode (",", $domains);
foreach ($tab_domains as $domain ){
if ($domain != "\"") echo $domain."\n";
}
}
}
else {
echo "failed to open $trusted_domains_file";
}
fclose($ouvre);
echo "</textarea>";
?>
</td>
<td width=50% height=100% align=center>
<H3><?php echo $l_trusted_urls_list ;?></H3>
exemple1 : www.domain3.net/admin/index.htm<BR>
exemple2 : domain4.org/~polux/index.html<BR>
<?php
echo "<textarea name='trusted_urls' rows=5 cols=40>";
$trusted_urls_file="/etc/chilli/alcasar-uamallowed";
$ouvre=fopen($trusted_urls_file,"r");
if ($ouvre)
{
while (!feof ($ouvre))
{
$tampon = fgets($ouvre, 4096);
$urls = substr($tampon,13,-1);
$tab_urls = explode (",", $urls);
foreach ($tab_urls as $url ){
if ($url != "\"") echo $url."\n";
}
}
}
else {
echo "failed to open $trusted_urls_file";
}
fclose($ouvre);
echo "</textarea>";
?>
</td></tr>
</TABLE>
<input type='hidden' name='choix' value='MAJ_UAMALLOWED'>
<input type='submit' value='<?php echo $l_submit ;?>'>
</FORM>
</td></tr>
</TABLE>
</TABLE>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th><?php echo $l_trusted_mac ;?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">
<center><?php
echo "$l_trusted_mac_explain1 <BR>";
echo "$l_trusted_mac_explain2";
echo "<FORM action='$_SERVER[PHP_SELF]' method='POST'>";?>
<TABLE cellspacing=2 cellpadding=3 border=1>
<tr><td width=60% height=100% align=center>
<H3><?php echo $l_trusted_mac_list ;?></H3>
exemple : 12-2f-36-a4-df-43<BR>
<?php
echo "<textarea name='trusted_macs' rows=5 cols=40>";
$trusted_macs_file="/etc/chilli/alcasar-macallowed";
$ouvre=fopen($trusted_macs_file,"r");
if ($ouvre)
{
while (!feof ($ouvre))
{
$tampon = fgets($ouvre, 4096);
$macs = substr($tampon,13,-1);
$tab_macs = explode (",", $macs);
foreach ($tab_macs as $macs ){
if ($macs != "\"") echo $macs."\n";
}
}
}
else {
echo "failed to open $trusted_macs_file";
}
fclose($ouvre);
echo "</textarea>";
?>
</td></tr>
</TABLE>
<input type='hidden' name='choix' value='MAJ_MACALLOWED'>
<input type='submit' value='<?php echo $l_submit ;?>'>
</FORM>
</td></tr>
</TABLE>
</BODY>
</HTML>
/gestion/admin/web_filter2.php
0,0 → 1,96
<?php
function echo_file ($filename)
{
if (file_exists($filename))
{
if (filesize($filename) != 0)
{
$pointeur=fopen($filename,"r");
$tampon = fread($pointeur, filesize($filename));
fclose($pointeur);
echo $tampon;
}
}
else
{
echo "erreur d'ouverture du fichier $filename";
}
}
?>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><th>
<?
echo "$l_main_bl";
echo_file ("/var/www/html/VERSION-BL");
echo ")";
?>
</th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</table>
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
<tr><td valign="middle" align="left">
<BR><FORM action='/admin/web_filter.php' method=POST>
<input type='hidden' name='choix' value='MAJ_bl'>
<?php
echo "<input type='submit' value='$l_download'>";
echo " ($l_warning)";
?>
</FORM>
</td></tr>
</TABLE>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><th><?echo "$l_secondary_bl";?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</table>
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
<tr><td valign="middle" align="left">
<FORM action='/admin/web_filter.php' method='POST'>
<TABLE cellspacing=2 cellpadding=3 border=1>
<tr><td width=50% height=100% align=center>
<H3>Liste des noms de domaine interdits</H3>
Entrez ici des noms de domaine inconnus de la liste noire principale<BR>
et que vous d&eacute;sirez bloquer<BR>
Entrez un nom de domaine par ligne (exemple : domaine.org)
<textarea name='OSSI_bl_domains' rows=5 cols=40>
<?php
echo_file ("/etc/dansguardian/lists/blacklists/ossi/domains");
?>
</textarea>
</td><td width=50% height=100% align=center>
<H3>Liste des noms de domaine r&eacute;abilit&eacute;s</H3>
Entrez ici des noms de domaine bloqu&eacute;s par la liste noire principale<BR>
que vous d&eacute;sirez r&eacute;habiliter<BR>
Entrez un nom de domaine par ligne (exemple : domaine2.org)
<textarea name='OSSI_wl_domains' rows=5 cols=40>
<?php
echo_file ("/etc/dansguardian/lists/exceptionsitelist");
?>
</textarea>
</td></tr>
<tr><td width=50% height=100% align=center>
<H3>Liste des URLs interdites</H3>
Entrez ici des URLs inconnues de la liste noire principale<BR>
que vous d&eacute;sirez bloquer<BR>
Entrez une URL par ligne (exemple : www.domaine.org/perso/index.htm)
<textarea name='OSSI_bl_urls' rows=5 cols=40>
<?php
echo_file ("/etc/dansguardian/lists/blacklists/ossi/urls");
?>
</textarea>
</td><td width=50% height=100% align=center>
<H3>Liste des URLs r&eacute;abilit&eacute;s</H3>
Entrez ici des URLs bloqu&eacute;es par la liste noire principale<BR>
que vous d&eacute;sirez r&eacute;habiliter<BR>
Entrez une URL par ligne (exemple : www.domaine2.org/perso/index.htm)
<textarea name='OSSI_wl_urls' rows=5 cols=40>
<?php
echo_file ("/etc/dansguardian/lists/exceptionurllist");
?>
</textarea>
</td></tr>
</TABLE>
<input type='hidden' name='choix' value='MAJ_OSSI'>
<input type='submit' value='Enregistrer les modifications'>
</FORM>
</td></tr>
</TABLE>
/gestion/admin/filter_exceptions.php
0,0 → 1,115
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><!-- written by Rexy -->
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<TITLE>ALCASAR Filter Exceptions</TITLE>
<link rel="stylesheet" href="/css/style.css" type="text/css">
</HEAD>
<body>
<?
# Choice of language
$Language = 'en';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'fr'){
$l_exception_IP = "Exception au filtrage";
$l_exception_txt="Entrez ici les adresses IP des stations du réseau de consultation ne subissant pas de filtrage<BR>Entrez une adresse IP par ligne";
$l_submit = "Enregistrer";
}
else {
$l_exception_IP = "Network filtering exceptions";
$l_exception_txt="Put here the stations IP address that won't be filtered<BR>Put one IP per row";
$l_submit = "Submit";
}
if (isset($_POST['choix'])){
switch ($_POST['choix'])
{
case 'IP_exceptions' :
// réencodage iso + format unix + rc fin de ligne (ouf...)
$ip_list = str_replace("\r\n", "\n", utf8_decode($_POST['exception_list']));
if ($ip_list[strlen($ip_list)-1] != "\n") { $ip_list[strlen($ip_list)]="\n";} ;
unset($_POST['exception_list']);
$pointeur = fopen("/etc/dansguardian/dansguardian.conf", "r");
$result = false;
if ($pointeur)
{
while (!feof($pointeur))
{
$ligne = fgets($pointeur);
if (preg_match("/^reportinglevel = 3/", $ligne, $r))
{
$result = true;
break;
}
}
}
fclose($pointeur);
if ($result)
{
$fichier=fopen("/etc/dansguardian/lists/exceptioniplist", "w+");
fputs($fichier,$ip_list);
fclose($fichier);
exec ("sudo /usr/local/sbin/alcasar-bl.sh -reload");
}
$pointeur = fopen("/usr/local/bin/alcasar-iptables.sh", "r");
$result = False ;
if ($pointeur)
{
while (!feof($pointeur))
{
$ligne = fgets($pointeur);
if (preg_match('/^FILTERING="yes"/', $ligne, $r))
{
$result = True ;
break;
}
}
}
fclose($pointeur);
if ($result)
{
$fichier=fopen("/usr/local/etc/alcasar-filter-exceptions", "w+");
fputs($fichier, $ip_list);
fclose($fichier);
exec ("sudo /usr/local/sbin/alcasar-nf.sh -on");
}
break;
}
}
?>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th><?php echo $l_exception_IP ;?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
<tr><td valign="middle" align="left">
<TABLE width=70% border=0>
<?php
echo "<form action='$_SERVER[PHP_SELF]' method='POST'>";
echo " $l_exception_txt";
echo "<BR><textarea name='exception_list' rows=5 cols=40>";
$filename="/usr/local/etc/alcasar-filter-exceptions";
if (file_exists($filename))
{
if (filesize($filename) != 0)
{
$pointeur=fopen($filename,"r");
$tampon = fread($pointeur, filesize($filename));
fclose($pointeur);
echo $tampon;
}
}
else
{
echo "erreur d'ouverture du fichier $filename";
}
echo "</textarea><BR>";
?>
<input type='hidden' name='choix' value='IP_exceptions'>
<input type='submit' value='Enregistrer les modifications'></CENTER>
</FORM>
</td></tr>
</TABLE>
</BODY>
</HTML>
/gestion/admin/net_filter.php
0,0 → 1,131
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><!-- written by Rexy -->
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<TITLE>Network Filter</TITLE>
<link rel="stylesheet" href="/css/style.css" type="text/css">
</HEAD>
<body>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
<?
$services_list="/usr/local/etc/alcasar-services";
# Choice of language
$Language = 'en';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'fr'){
$l_title = "Filtrage réseau";
$l_netfilter_on="Le filtrage réseau est actuellement activé";
$l_netfilter_off="Le filtrage réseau est actuellement désactivé";
$l_switch_on="Activer le filtrage r&eacute;seau";
$l_switch_off="Désactiver le filtrage réseau";
$l_comment_on="(choisissez les protocoles que vous voulez autoriser)";
$l_comment_off="(les usagers authentifiés peuvent exploiter tous les protocoles réseau)";
$l_protocols="Protocoles autorisés";
$l_error_open_file="Erreur d'ouverture du fichier";
$l_proto_port="Protocole / port";
$l_enabled="Autorisé";
$l_save_modif="Enregistrer les modifications";
}
else {
$l_title = "Network Filter";
$l_netfilter_on="Actually, the network filter is enable";
$l_netfilter_off="Actually, the network filter is disable";
$l_switch_on="Switch the Network Filter on";
$l_switch_off="Switch the Network Filter off";
$l_comment_on="(choose the authorized network protocols)";
$l_comment_off="(all the network protocols are allowed for authenticated users)";
$l_protocols="Authorize protocols";
$l_error_open_file="Error opening the file";
$l_proto_port="Protocol / port";
$l_enabled="Enable";
$l_save_modif="Save modifications";
}
echo "
<tr><th>$l_title</th></tr>
<tr bgcolor=\"#FFCC66\"><td><img src=\"/images/pix.gif\" width=1 height=2></td></tr>
</TABLE>";
if (isset($_POST['choix'])){$choix=$_POST['choix'];} else {$choix="";}
switch ($choix)
{
case 'NF_On' :
exec ("sudo /usr/local/sbin/alcasar-nf.sh -on");
break;
case 'NF_Off' :
exec ("sudo /usr/local/sbin/alcasar-nf.sh -off");
break;
case 'change' :
$tab=file($services_list);
if ($tab)
{
//on active|désactive les protocoles
$pointeur=fopen($services_list,"w+");
foreach ($tab as $ligne)
{
$proto_f=explode(" ", $ligne);
$name_svc1=trim($proto_f[0],"#");
$actif = False;
foreach ($_POST as $key => $value)
{
if (strstr($key,'chk-'))
{
$name_svc2 = str_replace('chk-','',$key);
if ($name_svc1 == $name_svc2)
{
$actif = True;
break;
}
}
}
if (! $actif)
{
$line="#$name_svc1 $proto_f[1]";
}
else { $line="$name_svc1 $proto_f[1]";}
fputs($pointeur,$line);
}
fclose($pointeur);
}
else {echo "$l_error_open_file $services_list";}
exec ("sudo /usr/local/sbin/alcasar-nf.sh -on");
break;
}
echo "<TABLE width=\"100%\" border=1 cellspacing=0 cellpadding=1>";
echo "<tr><td valign=\"middle\" align=\"left\">";
$pointeur = fopen("/usr/local/bin/alcasar-iptables.sh", "r");
$result = False ;
if ($pointeur)
{
while (!feof($pointeur))
{
$ligne = fgets($pointeur);
if (preg_match('/^FILTERING="yes"/', $ligne, $r))
{
$result = True ;
break;
}
}
}
fclose($pointeur);
if ($result)
{
echo "<CENTER><H3>$l_netfilter_on</H3>$l_comment_on</CENTER>";
echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>";
echo "<input type=hidden name='choix' value=\"NF_Off\">";
echo "<input type=submit value=\"$l_switch_off\">";
}
else
{
echo "<CENTER><H3>$l_netfilter_off</H3>$l_comment_off</CENTER>";
echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>";
echo "<input type=hidden name='choix' value=\"NF_On\">";
echo "<input type=submit value=\"$l_switch_on\">";
}
echo "</FORM>";
echo "</td></tr>";
echo "</TABLE>";
if ($result) require ('net_filter2.php');
?>
</BODY>
</HTML>
/gestion/admin/net_filter2.php
0,0 → 1,42
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><th><?echo "$l_protocols";?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</table>
<table width="100%" border=1 cellspacing=0 cellpadding=1>
<tr><td valign="middle" align="left">
<form action='net_filter.php' method='POST'>
<table cellspacing=2 cellpadding=3 border=1>
<?
echo "<tr><th>$l_proto_port<th>$l_enabled</tr>";
// On ouvre le fichier de filtrage de protocoles
$pointeur=fopen($services_list,"r");
if ($pointeur)
{
while (!feof ($pointeur))
{
$ligne=fgets($pointeur, 4096);
if ($ligne)
{
$proto=explode(" ", $ligne);
$name_svc=trim($proto[0],"#");
echo "<tr><td>$name_svc / $proto[1]";
echo "<td><input type='checkbox' name='chk-$name_svc'";
// si la ligne est commentée -> protocole non autorisé
if (preg_match('/^#/',$ligne, $r)) {
echo ">";}
else {
echo "checked>";}
}
}
}
else {
echo "$l_error_open_file $services_list";
}
fclose($pointeur);
?>
</td></tr></table>
<input type='hidden' name='choix' value='change'>
<input type='submit' value='<?echo"$l_save_modif";?>'>
</form>
</td></tr>
</table>
/gestion/admin/web_filter.php
0,0 → 1,117
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><!-- written by Rexy -->
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<TITLE>ALCASAR WEB filtering</TITLE>
<link rel="stylesheet" href="/css/style.css" type="text/css">
</HEAD>
<body>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
<?
# Choice of language
$Language = 'en';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'fr'){
$l_title = "Filtrage WEB";
$l_webfilter_on="Le filtrage WEB est actuellement activé";
$l_webfilter_off="Le filtrage WEB est actuellement désactivé";
$l_switch_on="Activer le filtrage WEB";
$l_switch_off="Désactiver le filtrage WEB";
$l_comment_on="(la consultation WEB est filtrée selon les critères définis ci-dessous)";
$l_comment_off="(la consultation WEB est autorisée sans restriction)";
$l_main_bl="Liste noire principale (version actuelle : ";
$l_download="Télécharger la dernière version";
$l_warning="<B>Attention</B> : ce téléchargement dure plusieurs minutes.";
$l_secondary_bl="Liste noire et liste blanche secondaires";
}
else {
$l_title = "WEB Filter";
$l_webfilter_on="Actually, the WEB filter is on";
$l_webfilter_off="Actually, the WEB filter is off";
$l_switch_on="Switch the WebFilter on";
$l_switch_off="Switch the WebFilter off";
$l_comment_on="(The WEB consultation is filtered as defined below)";
$l_comment_off="(The WEB consultation is allowed without any restriction)";
$l_main_bl="Main blacklist (current version : ";
$l_download="Download the last version";
$l_warning="<B>Be carefull</B> : this download is estimate to fiew minutes.";
$l_secondary_bl="Secondary blacklist and whitelist";
}
echo "
<tr><th>$l_title</th></tr>
<tr bgcolor=\"#FFCC66\"><td><img src=\"/images/pix.gif\" width=1 height=2></td></tr>
</TABLE>";
if (isset($_POST['choix'])){ $choix=$_POST['choix']; } else { $choix=""; }
switch ($choix)
{
case 'BL_On' :
exec ("sudo /usr/local/sbin/alcasar-bl.sh -on");
break;
case 'BL_Off' :
exec ("sudo /usr/local/sbin/alcasar-bl.sh -off");
break;
case 'MAJ_bl' :
exec ("sudo /usr/local/sbin/alcasar-bl.sh -download");
break;
case 'MAJ_OSSI' :
$fichier=fopen("/etc/dansguardian/lists/blacklists/ossi/domains","w+");
fputs($fichier, $_POST['OSSI_bl_domains']);
fclose($fichier);
unset($_POST['OSSI_bl_domains']);
$fichier=fopen("/etc/dansguardian/lists/exceptionsitelist","w+");
fputs($fichier, $_POST['OSSI_wl_domains']);
fclose($fichier);
unset($_POST['OSSI_wl_domains']);
$fichier=fopen("/etc/dansguardian/lists/blacklists/ossi/urls","w+");
fputs($fichier, $_POST['OSSI_bl_urls']);
fclose($fichier);
unset($_POST['OSSI_bl_urls']);
$fichier=fopen("/etc/dansguardian/lists/exceptionurllist","w+");
fputs($fichier, $_POST['OSSI_wl_urls']);
fclose($fichier);
unset($_POST['OSSI_wl_urls']);
exec ("sudo /usr/local/sbin/alcasar-bl.sh -reload");
break;
}
?>
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
<tr><td valign="middle" align="left">
<?php
$pointeur = fopen("/etc/dansguardian/dansguardian.conf", "r");
$result = false;
if ($pointeur)
{
while (!feof($pointeur))
{
$ligne = fgets($pointeur);
if (preg_match("/^reportinglevel = 3/", $ligne, $r))
{
$result = true;
break;
}
}
}
fclose($pointeur);
if ($result)
{
echo "<CENTER><H3>$l_webfilter_on</H3>$l_comment_on</CENTER>";
echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>";
echo "<input type=hidden name='choix' value=\"BL_Off\">";
echo "<input type=submit value=\"$l_switch_off\">";
}
else
{
echo "<CENTER><H3>$l_webfilter_off</H3>$l_comment_off</CENTER>";
echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>";
echo "<input type=hidden name='choix' value=\"BL_On\">";
echo "<input type=submit value=\"$l_switch_on\">";
}
echo "</FORM>";
echo "</td></tr>";
echo "</TABLE>";
if ($result) require ('web_filter2.php');
?>
</BODY>
</HTML>
/gestion/admin/services.php
0,0 → 1,190
<?php
//-------------------------------
// Fonctions
//-------------------------------
 
// Fonction de test de connectivité internet
function internetTest(){
$host = "www.google.fr";
$port = "80";
//var $num; //non utilisé
//var $error; //non utilisé
if (! $sock = @fsockopen($host, $port, $num, $error, 5)) {
return false;
} else {
fclose($sock);
return true;
}
}
 
// Fonction de test du filtrage
function filtrageTest($file, $search_regex){
$pointeur = fopen($file,"r");
$result = false;
if ($pointeur)
{
while (!feof($pointeur))
{
$ligne = fgets($pointeur);
if (preg_match($search_regex, $ligne, $r))
{
$result = true;
break;
}
}
}
fclose($pointeur);
return $result;
}
 
//fonction pour faire une action (start,stop,restart) sur un service
function serviceExec($service, $action){
if (($action == "start")||($action == "stop")||($action == "restart")){
exec("sudo /sbin/service $service $action",$retval, $retstatus);
return $retstatus;
} else {
return false;
}
}
//fonction définissant le status d'un service
//(en fonction de la présence d'un mot clé dans la valeur de status)
function checkServiceStatus($service, $strMatch){
$response = false;
exec("sudo /sbin/service $service status",$retval);
foreach( $retval as $val ) {
if (strpos($val,$strMatch)){
$response = true;
break;
}
}
return $response;
}
 
//-------------------------------
// Les actions sur un service
//-------------------------------
//sécurité sur les actions à réaliser
$autorizeService = array("radiusd","chilli","dansguardian","mysqld","squid","named","sshd");
$autorizeAction = array("start","stop","restart");
 
if (isset($_GET['service'])&&(in_array($_GET['service'], $autorizeService))) {
if (isset($_GET['action'])&&(in_array($_GET['action'], $autorizeAction))) {
$execStatus = serviceExec($_GET['service'], $_GET['action']);
// execStatus non exploité
}
}
//-------------------------------
//recherche du status des services
//-------------------------------
$serviceStatus = array();
 
$serviceStatus['radiusd'] = checkServiceStatus("radiusd","pid");
$serviceStatus['chilli'] = checkServiceStatus("chilli","pid");
$serviceStatus['dansguardian'] = checkServiceStatus("dansguardian","pid");
$serviceStatus['mysqld'] = checkServiceStatus("mysqld","OK");
$serviceStatus['squid'] = checkServiceStatus("squid","pid");
$serviceStatus['named'] = checkServiceStatus("named","up");
$serviceStatus['sshd'] = checkServiceStatus("sshd","pid");
 
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<!-- written by steweb57 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Services</title>
<link rel="stylesheet" href="/css/style.css" type="text/css">
</head>
<body>
<?php
# choice of language
$Language = "en";
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2));}
if ($Language == 'fr'){
$l_service = "Services";
$l_service_internet = "Lien Internet";
$l_netfilter="Filtrage r&eacute;seau";
$l_webfilter="Filtrage WEB";
$l_enable = "actif";
$l_disable = "inactif";
$l_service_title = "Nom du services";
$l_service_start = "D&eacute;marrer";
$l_service_stop = "Arr&ecirc;ter";
$l_service_restart = "Red&eacute;marrer";
$l_service_status = "Status";
$l_service_action = "Actions";
$l_service_status_img_ok = "D&eacute;marr&eacute;";
$l_service_status_img_ko = "Arr&ecirc;t&eacute;";
}
else {
$l_service = "Services";
$l_service_internet = "Internet connexion";
$l_netfilter = "Network filter";
$l_webfilter="WEB filter";
$l_enable = "enable";
$l_disable = "disable";
$l_service_title = "Name of service";
$l_service_start = "Start";
$l_service_stop = "Stop";
$l_service_restart = "Restart";
$l_service_status = "Status";
$l_service_action = "Actions";
$l_service_status_img_ok = "Started";
$l_service_status_img_ko = "Stopped";
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th><?php echo $l_service;?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td> </tr>
</table>
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
<tr><td valign="middle" align="left">
<?php
if (InternetTest()){
echo "<h1><img src='/images/state_ok.gif'> $l_service_internet : <font color='green'>$l_enable</font></h1>";
} else {
echo "<h1><img src='/images/state_error.gif'> $l_service_internet : <font color='red'>$l_disable</font></h1>";
}
if (filtrageTest("/usr/local/bin/alcasar-iptables.sh", "/^FILTERING=\"yes\"/")){
echo "<h1><img src='/images/state_ok.gif'> $l_netfilter : <font color='green'>$l_enable</font></h1>";
} else {
echo "<h1><img src='/images/state_error.gif'> $l_netfilter : <font color='red'>$l_disable</font></h1>";
}
if (filtrageTest("/etc/dansguardian/dansguardian.conf","/^reportinglevel = 3/")){
echo "<h1><img src='/images/state_ok.gif'> $l_webfilter : <font color='green'>$l_enable</font></h1>";
} else {
echo "<h1><img src='/images/state_error.gif'> $l_webfilter : <font color='red'>$l_disable</font></h1>";
}
?>
</td></tr>
</table>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><th><?php echo $l_service_status;?></th><th><?php echo $l_service_title;?></th><th colspan="3"><?php echo $l_service_action;?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td><td><img src="/images/pix.gif" width="1" height="2"></td><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</table>
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
<TR align="center">
<?php foreach( $serviceStatus as $serviceName => $statusOK ) { ?>
<tr>
<?php if ($statusOK) { ?>
<td><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
<td><?php echo $serviceName ;?></td>
<td width="30" align="center">---</td>
<td width="30" align="center"><a href="services.php?action=stop&service=<?php echo $serviceName;?>"><?php echo $l_service_stop;?></a></td>
<td width="30" align="center"><a href="services.php?action=restart&service=<?php echo $serviceName;?>"><?php echo $l_service_restart;?></a></td>
<?php } else { ?>
<td><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
<td><?php echo $serviceName ;?></td>
<td width="30" align="center"><a href="services.php?action=start&service=<?php echo $serviceName;?>"><?php echo $l_service_start;?></a></td>
<td width="30" align="center">---</td>
<td width="30" align="center">---</td>
<?php } ?>
</tr>
<?php } ?>
</td></tr></table>
</table>
</body>
</html>
/gestion/admin/activity.php
0,0 → 1,115
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><!-- written by Rexy -->
<head>
<META HTTP-EQUIV="Refresh" CONTENT="30">
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<title>&Eacute;tat du r&eacute;seau</title>
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<?
# Choice of language
$Language = 'en';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'fr'){
$l_activity = "Activit&eacute; sur le r&eacute;seau de consultation";
$l_ip_adr = "Adresse IP";
$l_mac_adr = "Adresse MAC";
$l_user = "Usager";
$l_mac_allowed = "@MAC autoris&eacute;e";
$l_action = "Action";
$l_dissociate = "Dissocier";
$l_disconnect = "D&eacute;connecter";
$l_refresh = "Cette page est rafraichie toutes les 30 secondes";
}
else {
$l_activity = "Activity on the consultation LAN";
$l_ip_adr = "IP Adress";
$l_mac_adr = "MAC Adress";
$l_user = "User";
$l_mac_allowed = "@MAC allowed";
$l_action = "Action";
$l_dissociate = "Dissociate";
$l_disconnect = "Disconnect";
$l_refresh = "This frame is refreshed every 30'";
}
echo "
<tr><th>$l_activity</th></tr>
<tr bgcolor=\"#FFCC66\"><td><img src=\"/images/pix.gif\" width=\"1\"
height=\"2\"></td></tr>
</TABLE>";
if (isset($_POST['action'])){
switch ($_POST['action']){
case 'user_unconnect' :
exec ("sudo /usr/local/sbin/alcasar-logout.sh $_POST[user]");
unset ($_POST['user']);
unset ($_POST['choix']);
break;
case 'mac_unconnect' :
exec ("sudo /usr/sbin/chilli_query logout $_POST[mac_addr]");
unset ($_POST['mac_addr']);
unset ($_POST['choix']);
break;
}
}
?>
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
<tr><td valign="middle" align="left">
<center>
<? echo "$l_refresh";?>
<table border=1 width="80%" bordercolordark="#ffffe0" bordercolorlight="#000000" width="100%" cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr bgcolor="#d0ddb0">
<? echo "
<th>#</th>
<th>$l_ip_adr</th>
<th>$l_mac_adr</th>
<th>$l_user</th>
<th>$l_action</th>
</tr>";
$output = array(); $nb_ligne = 0;
exec ('sudo /usr/sbin/chilli_query list|sort -k5 -r', $output);
while (list(,$ligne) = each($output)){
$detail = explode (" ", $ligne);
$nb_ligne ++;
echo "<FORM action='activity.php' method=POST>";
echo "<TR>";
echo "<TD>"; echo $nb_ligne; echo "</TD>";
echo "<TD>"; echo $detail[1]; echo "</TD>";
echo "<TD>"; echo $detail[0]; echo "</TD>";
echo "<TD>";
# station authorisée
if ($detail[4] == "1"){
# par @MAC
if ($detail[5] == "-"){
echo "$l_mac_allowed</TD><TD>&nbsp;";}
# par usager authentifié
else {
echo "<a href=\"/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"Editer l'utilisateur $detail[5]\">$detail[5]</a>";
echo "</TD>";
echo "<TD>";
echo "<INPUT type='hidden' name='action' value='mac_unconnect'>";
echo "<INPUT type='hidden' name='user' value='$detail[5]'>";
echo "<INPUT type='hidden' name='mac_addr' value='$detail[0]'>";
echo "<INPUT type=submit value='$l_disconnect'>";
}
}
# station sans usager connecté
else {
echo "&nbsp;";
echo "</TD>";
echo "<TD>";
echo "<INPUT type='hidden' name='action' value='mac_unconnect'>";
echo "<INPUT type='hidden' name='mac_addr' value='$detail[0]'>";
echo "<INPUT type='submit' value='$l_dissociate'>";
}
echo "</TD></TR></FORM>";
}
?>
</td></tr>
</table>
</td></tr>
</table>
</html>
/gestion/admin/logo.php
0,0 → 1,66
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><!-- Written by Rexy -->
<HEAD>
<TITLE>Modif logo organisme</TITLE>
<link rel="stylesheet" href="/css/style.css" type="text/css">
<SCRIPT language="javascript" type="text/javascript">
function rafraichissement(cadre1, val1)
{
eval(cadre1+".location='"+val1+"'");
}
</SCRIPT>
</HEAD>
<body>
<?php
if(isset($_FILES['logo']))
{
unset($result);
$taille_max = 100000;
$destination = '/var/www/html/images/organisme.png';
$extension = strstr($_FILES['logo']['name'], '.');
if ($extension != '.png')
{
$result = 'Veuillez s&eacute;lectionner un fichier de type png !';
}
elseif (file_exists($_FILES['logo']['tmp_name']) and filesize($_FILES['logo']['tmp_name']) > $taille_max)
{
$result = 'La taille du fichier doit &ecirc;tre inf&eacute;rieur &agrave; 100Ko !';
}
if (!isset($result))
{
move_uploaded_file($_FILES['logo']['tmp_name'], $destination);
}
}
?>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th>Personnalisation du logo d'organisme</th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">
<CENTER><H3>Logo actuel : <img src="/images/organisme.png" width="90"><BR>
Vous pouvez s&eacute;lectionnez un nouveau logo :</H3></CENTER>
<FORM action="logo.php" method=POST ENCTYPE="multipart/form-data">
<input type="file" name="logo">
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
<input type="submit" value="Envoyer">
</FORM>
<?php
if (isset($result))
{
echo '<H3>'; echo $result; echo '</H3><BR>';
}
?>
<CENTER>Attention</CENTER>
- le logo que vous choisissez doit &ecirc;tre un fichier au format libre 'PNG'.<BR>
- la taille de ce fichier doit &ecirc;tre inf&eacute;rieure &agrave; 100Ko<BR>
- rafra&icirc;chissez les pages du navigateur pour voir le r&eacute;sultat<BR>
</TD></TR>
</TABLE>
</td></tr>
</TABLE>
</BODY>
</HTML>
/gestion/admin/update_ldap.php
0,0 → 1,240
<?php
/* written by steweb57 */
/********************************************************************
* CONSTANTES AVEC CHEMINS DES FICHIERS DE CONFIGURATION *
*********************************************************************/
 
define ("ALCASAR_RADIUS_SITE", "/etc/raddb/sites-available/alcasar");
define ("ALCASAR_RADIUS_MODULE_LDAP", "/etc/raddb/modules/ldap");
 
/********************************************************************
* FONCTION ERREUR *
*********************************************************************/
 
function erreur($er){
header('Location:ldap.php?erreur=$er');
exit();
}
 
/********************************************************************
* VARIABLES DE FORMULAIRE *
*********************************************************************/
 
//variables pour le parcourt des fichiers
// - $ouvre : fichier ouvert
// - $tampon : ligne en cours
//autres variables utilisées
// - $fichier : fichier temporaire utilisé pour la mise à jours des fichiers de configuration
// - les variables contennant les données de formulaire
 
//Récupération des variables de formulaire
if (isset($_POST['auth_enable'])) $auth_enable = $_POST['auth_enable']; else erreur('Erreur de variable auth_enable');
if ($auth_enable == "1"){ //test $auth_enable
if (isset($_POST['ldap_server'])) $ldap_server = $_POST['ldap_server']; else erreur('Erreur de variable ldap_server');
if (isset($_POST['ldap_base_dn'])) $ldap_base_dn = $_POST['ldap_base_dn']; else erreur('Erreur de variable ldap_base_dn');
if (isset($_POST['ldap_filter'])) $ldap_filter = $_POST['ldap_filter']; else erreur('Erreur de variable ldap_filter');
if (isset($_POST['ldap_base_filter'])) $ldap_base_filter = $_POST['ldap_base_filter']; else erreur('Erreur de variable ldap_base_filter');
if (isset($_POST['ldap_user'])) $ldap_user = $_POST['ldap_user']; else erreur('Erreur de variable ldap_user');
if (isset($_POST['ldap_password'])) $ldap_password = $_POST['ldap_password']; else erreur('Erreur de variable ldap_password');
} //test $auth_enable
 
/********************************************************************
* TEST DES FICHIERS DE CONFIGURATION *
*********************************************************************/
 
//Test de présence et des droits en modification des fichiers de configuration.
if (!file_exists(ALCASAR_RADIUS_SITE)){
exit("Fichier de configuration du virtual-host 'alcasar' de freeradius non présent");
}
if (!file_exists(ALCASAR_RADIUS_MODULE_LDAP)){
exit("Fichier de configuration du module ldap pour freeradius non présent");
}
if (!is_writable(ALCASAR_RADIUS_SITE)){
exit("Vous n'avez pas les droits d'écriture sur le fichier /etc/raddb/sites-available/alcasar");
}
if (!is_writable(ALCASAR_RADIUS_MODULE_LDAP)){
exit("Vous n'avez pas les droits d'écriture sur le fichier /etc/raddb/modules/ldap");
}
 
/********************************************************************
* VARIABLES TEMPORAIRES *
*********************************************************************/
//création des nouveaux fichiers de configuration
//Initialisation de $fichier
$fichier = "";
 
//variables de test pour la section autorize
$section_autorize = false; // indique si on est dans la section autorize
$num_section_autorize = 0; // indique si on se situe dans une sous section (pouvant avoir un parametre ldap ???)
$nb_ldap = 0; // indique si le paramtre ldap n'est pas saisie deux fois (y compris les commentaires)
//variables de test pour la section authenticate
$section_authenticate = false; // indique si on est dans la section authenticate
$section_authenticate_section_ldap = false; // indique si on se situe dans la sous section Auth-Type LDAP
$section_authenticate_section_ldap_1 = false; // indique si Auth-Type LDAP déjà configuré
$section_authenticate_section_ldap_2 = false; // indique si parametre ldap de Auth-Type LDAP déjà configuré
$section_authenticate_section_ldap_3 = false; // indique si la fin de Auth-Type LDAP déjà configuré
$num_section_authenticate = 0;
 
/********************************************************************
* Fichier ALCASAR_RADIUS_SITE *
*********************************************************************/
 
//Lecture du fichier /etc/raddb/sites-available/alcasar et création d'une nouvelle version du fichier.
$continue = true;
$ouvre=fopen(ALCASAR_RADIUS_SITE,"r");
while (!feof ($ouvre))
{
$tampon = fgets($ouvre, 4096);
if ((!$section_autorize) && (preg_match('`^([\s]*authorize[\s]*{[\s]*)$`',$tampon))){ //test si on est dans la section authorize
$section_autorize = true;
}
if ((!$section_authenticate) && (preg_match('`^([\s]*authenticate[\s]*{[\s]*)$`',$tampon))){ //on est dans la section authenticate
$section_authenticate = true;
}
/********************************************************************
* SECTION AUTHORIZE *
*********************************************************************/
if ($section_autorize){ //on est dans la section authorize
if ((preg_match('`^([\s[:alnum:]-_]*{[\s]*)$`',$tampon)) && (!preg_match('`^([\s]*authorize[\s]*{[\s]*)$`',$tampon))){ //on trouve des sous sections non commentées
$num_section_autorize = $num_section_autorize + 1;
$fichier = $fichier.$tampon;
} elseif ((preg_match('`^([\s#]*ldap[\s]*)$`',$tampon))&&($num_section_autorize == 0)){ // conf du parametre ldap uniquement si l'on n'est pas dans une sous section!
//Récupération dans la section authorise de la ligne ldap
//valeur : ldap = authentification ldap authorisée
//valeur : #ldap = authentification ldap non authorisée
if (($auth_enable == "1") && ($nb_ldap ==0)){
$fichier = $fichier."ldap\n";
}else{
$fichier = $fichier."# ldap\n";
}
$nb_ldap = $nb_ldap + 1;//calcule si le parametre ldap n'est pas présent plusieurs fois.
} elseif (preg_match('`^([\s]*}[\s]*)$`',$tampon)){ //une section se termine
if ($num_section_autorize == 0){ // fin de la section authorize
$section_autorize = false;
} else { // on referme une sous section
$num_section_autorize = $num_section_autorize - 1;
}
$fichier = $fichier.$tampon;
} else {
$fichier = $fichier.$tampon;
}
//fin de section authorize
} elseif (($section_authenticate)){ //on est dans la section authenticate
/********************************************************************
* SECTION AUTHENTICATE *
*********************************************************************/
// pas de test de sous-section!
//on recherhe la section ldap
## Auth-Type LDAP {
# ldap
## }
if (preg_match('`^([\s#]*Auth-Type[\s]*LDAP[\s]{[\s]*)$`',$tampon)) { // test si on est dans la sous section Auth-Type LDAP (commentée ou non !)
$section_authenticate_section_ldap = true;
if (($auth_enable == "1") && (!$section_authenticate_section_ldap_1)){
$fichier = $fichier."Auth-Type LDAP { \n";
} else {
$fichier = $fichier."# Auth-Type LDAP { \n";
}
$section_authenticate_section_ldap_1 = true; // Auth-Type LDAP { est traité, les prochaines occurences trouvées seront tous mis en commentaire
} else {
if ($section_authenticate_section_ldap){ // on est dans la section Auth-Type LDAP
if (preg_match('`^([\s#]*ldap[\s]*)$`',$tampon)){ //parametre ldap
if (($auth_enable == "1") && (!$section_authenticate_section_ldap_2)){
$fichier = $fichier."ldap\n";
} else {
$fichier = $fichier."# ldap\n";
}
$section_authenticate_section_ldap_2 = true; // le parametre ldap est traité, les prochaines occurences trouvées seront tous mis en commentaire
} elseif (preg_match('`^([\s#]*}[\s]*)$`',$tampon)){ //fin de section Auth-Type LDAP (le premier #} ou } trouvé dans la section Auth-Type LDAP indique la fin de la section)
if (($auth_enable == "1") && (!$section_authenticate_section_ldap_3)){
$fichier = $fichier."}\n";
} else {
$fichier = $fichier."# }\n";
}
$section_authenticate_section_ldap_3 = true; // } de fin de section Auth-Type LDAP est traité, les prochaines occurences trouvées seront tous mis en commentaire //!inutile
$section_authenticate_section_ldap = false; //inutile de continuer de parcourir la section Auth-Type LDAP
$section_authenticate = false; //inutile de continuer de parcourir la section authenticate
} else {
$fichier = $fichier.$tampon; // on écrit tous les autres valeurs ou commentaires présents dans la section Auth-Type LDAP du fichier
}
} else {
$fichier = $fichier.$tampon; // on écrit tous les autres valeurs ou commentaires présents dans la section authenticate du fichier
}
}
//fin de section authenticate
} else { //on est ni dans la section authorize ni dans la section authenticate
$fichier = $fichier.$tampon;
}
}
fclose($ouvre);
 
 
//Sauvegarde du /etc/raddb/sites-available/alcasar
$ouvre=fopen(ALCASAR_RADIUS_SITE,"w+");
fwrite($ouvre, $fichier);
fclose($ouvre);
 
/********************************************************************
* Fichier ALCASAR_RADIUS_MODULE_LDAP *
*********************************************************************/
 
// TO DO : faire le controle des doublons comme sur le fichiers précédent !
 
 
//on ne modifie ALCASAR_RADIUS_MODULE_LDAP uniquement si l'authentification ldap est active
if ($auth_enable == "1"){ //test $auth_enable
 
//Ré-Initialisation de $fichier
$fichier = "";
 
//Lecture du fichier /etc/raddb/modules/ldap et création d'une nouvelle version du fichier.
$ouvre=fopen(ALCASAR_RADIUS_MODULE_LDAP,"r");
while (!feof ($ouvre))
{
$tampon = fgets($ouvre, 4096);
if (preg_match('`^([\s#]*server(\s*)=)`',$tampon)){
//Mise a jour du paramettre ldap server
$fichier = $fichier."server = \"".$ldap_server."\"\n";
} elseif (preg_match('`^([\s#]*identity(\s*)=)`',$tampon)){
//Mise a jour du paramettre ldap identity
$fichier = $fichier."identity = \"".$ldap_user."\"\n";
} elseif (preg_match('`^([\s#]*password(\s*)=)`',$tampon)){
//Mise a jour du paramettre ldap password
$fichier = $fichier."password = ".$ldap_password."\n";
} elseif (preg_match('`^([\s#]*basedn(\s*)=)`',$tampon)){
//Mise a jour du paramettre ldap basedn
$fichier = $fichier."basedn = \"".$ldap_base_dn."\"\n";
} elseif (preg_match('`^([\s#]*filter(\s*)=)`',$tampon)){
//Mise a jour du paramettre ldap filter
$fichier = $fichier."filter = \"(".$ldap_filter."=%{Stripped-User-Name:-%{User-Name}})\"\n";
} elseif (preg_match('`^([\s#]*base_filter(\s*)=)`',$tampon)){
//Mise a jour du paramettre ldap base_filter
$fichier = $fichier."base_filter = \"".$ldap_base_filter."\"\n";
} else {
//On ne fait rien
$fichier = $fichier.$tampon;
}
}
fclose($ouvre);
 
//sauvegarde du fichier /etc/raddb/modules/ldap
$ouvre=fopen(ALCASAR_RADIUS_MODULE_LDAP,"w+");
fwrite($ouvre, $fichier);
fclose($ouvre);
 
} //test $auth_enable
 
/********************************************************************
* Redémarage du service radius *
*********************************************************************/
 
exec ("sudo service radiusd restart");
 
/********************************************************************
* Redirection vers la page de configuration LDAP *
*********************************************************************/
 
header('Location:ldap.php?update=ok');
exit();
?>
/gestion/admin/firewallEyes/gpl.txt
0,0 → 1,342
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
 
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
 
Preamble
 
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
 
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
 
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
 
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
 
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
 
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
 
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
 
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
 
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
 
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
 
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
 
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
 
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
 
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
 
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
 
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
 
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
 
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
 
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
 
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
 
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
 
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
 
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
 
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
 
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
 
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
 
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
 
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
 
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
 
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
 
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
 
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
 
NO WARRANTY
 
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
 
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
 
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
 
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
 
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
 
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
 
Also add information on how to contact you by electronic and paper mail.
 
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
 
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
 
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
 
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
 
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
 
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
 
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
 
 
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/gestion/admin/firewallEyes/info.php
0,0 → 1,161
<?php
/*
* firewall Eyes
* Copyright (C) 2004 Creabilis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
include("configuration.php");
include("include.php");
 
// authentification check
authenticationCheck();
 
// Date in the past
header("Expires: Mon, 26 Jul 2009 00:00:00 GMT");
 
// always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
 
// HTTP/1.0
header("Pragma: no-cache");
 
set_time_limit (120);
 
// GET INPUT
$type=stripslashes($_GET["type"]);
$p1=stripslashes($_GET["p1"]);
 
$tool=stripslashes($_GET["tool"]);
 
$toolsArray=$tools[$type];
 
 
$maxWidth=0;
for($i=0; $i<count($logFields); $i++) {
$maxWidth+=$logFields[$i][2];
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>informations</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<link href="log.css" rel="stylesheet" type="text/css"/>
</head>
 
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#FFFFFF">
<div align="left" style="padding-left:18px">
<table border="0" cellpadding="0" cellspacing="0" width="<?=$maxWidth?>">
<tr>
<td class="toolBox">
<form method="GET" action="info.php">
<br/>
<b>Informations on </b>
<input type="text" name="p1" class="inputText" maxlength="100" value="<?=htmlentities(stripslashes($p1))?>">
<input type="hidden" name="type" value="<?=htmlentities(stripslashes($type))?>">
<br/><br/>&nbsp;
<?php
foreach($toolsArray as $toolName=>$toolInfos) {
?>
<input class="toolbutton" type="submit" name="tool" value="<?=htmlentities($toolName)?>">&nbsp;&nbsp;
<?php
}
?>
</form>
</td>
</tr>
</table>
<?php
flush();
if($tool) {
if($toolsArray[$tool]["type"]=="command") {
$myCommand=$toolsArray[$tool]["value"];
$myparam=$p1;
if($toolsArray[$tool]["precompute"]=="extractdomain") {
if (preg_match("/\d+\.\d+\.\d+\.\d+/", $p1)) { // it's an ip address
$myparam=$p1;
} else {
$myparam=substr(strstr($p1,"."),1); // remove first part of canonical name
}
}
$myCommand=str_replace("%p1%",$myparam,$myCommand);
}
if($toolsArray[$tool]["type"]=="url") {
$myCommand=$toolsArray[$tool]["value"];
$myCommand=str_replace("%p1%",urlencode($p1),$myCommand);
 
}
?>
<br/>
<table border="0" cellpadding="0" cellspacing="0" width="<?=$maxWidth?>">
<tr>
<td class="toolCommandBoxHeader">
<?php
if($toolsArray[$tool]["type"]=="url") {
?>
<a style="color: #FFFFFF" href="<?=$myCommand?>" target="q"><?=$myCommand?></a>
<?php
} else {
echo($myCommand);
}
?>
</td>
</tr>
</table>
<?php
flush();
?>
<table border="0" cellpadding="0" cellspacing="0" width="<?=$maxWidth?>">
<tr>
<td class="toolCommandBox">
<?php
if($toolsArray[$tool]["type"]=="command") {
echo("<pre>");
passthru(escapeshellcmd($myCommand));
echo("</pre>");
}
if($toolsArray[$tool]["type"]=="url") {
?>
<iframe name="window_recherche_affaire_resultat" src="<?=$myCommand?>" width="<?=$maxWidth+5?>" height="750" FRAMEBORDER=0>
Your browser doesn't support iframe, unable to get url.
</iframe>
<?php
}
?>
</td>
</tr>
</table>
<?php
}
?>
<br>
<table border="0" cellpadding="0" cellspacing="0" width="<?=$maxWidth?>" class="footer">
<tr>
<td align="center">
<A HREF="http://www.creabilis.com" target="creabilis">Firewall Eyes</A> - <A HREF="http://www.gnu.org/licenses/gpl.html">GPL</A> - Creabilis © 2004 - Web site : <A HREF="http://firewalleyes.creabilis.com">http://firewalleyes.creabilis.com</A>
</td>
</tr>
</table>
</div>
</body>
</html>
/gestion/admin/firewallEyes/images/info.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/admin/firewallEyes/images/dst-port.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/admin/firewallEyes/images/port-dst.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/admin/firewallEyes/images/header-background.jpg
Cannot display: file marked as a binary type.
svn:mime-type = image/jpeg
Property changes:
Added: svn:mime-type
+image/jpeg
\ No newline at end of property
/gestion/admin/firewallEyes/images/source.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/admin/firewallEyes/images/destination.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/admin/firewallEyes/images/commandHeaderBkg.jpg
Cannot display: file marked as a binary type.
svn:mime-type = image/jpeg
Property changes:
Added: svn:mime-type
+image/jpeg
\ No newline at end of property
/gestion/admin/firewallEyes/images/firewallEyes.jpg
Cannot display: file marked as a binary type.
svn:mime-type = image/jpeg
Property changes:
Added: svn:mime-type
+image/jpeg
\ No newline at end of property
/gestion/admin/firewallEyes/images/logo-firewallEyes.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/admin/firewallEyes/images/src-port.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/admin/firewallEyes/images/port-src.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/admin/firewallEyes/images/buttonBkg.jpg
Cannot display: file marked as a binary type.
svn:mime-type = image/jpeg
Property changes:
Added: svn:mime-type
+image/jpeg
\ No newline at end of property
/gestion/admin/firewallEyes/messages
0,0 → 1,21
Sep 24 04:03:01 firewall kernel: RULE 5 -- ACCEPT IN=eth1 OUT=eth2 SRC=192.168.0.5 DST=64.246.30.37 LEN=48 TOS=0x00 PREC=0x00 TTL=124 ID=33597 DF PROTO=TCP SPT=3247 DPT=80 WINDOW=64240 RES=0x00 SYN URGP=0
Sep 24 04:03:02 firewall kernel: RULE 6 -- DENY IN=eth1 OUT=eth1 SRC=172.50.230.95 DST=192.168.14.5 LEN=48 TOS=0x00 PREC=0x00 TTL=126 ID=18765 PROTO=TCP SPT=2277 DPT=25 LEN=28
Sep 24 04:03:02 firewall kernel: RULE 7 -- DENY IN=eth1 OUT=eth1 SRC=172.79.3.1 DST=192.168.0.12 LEN=48 TOS=0x00 PREC=0x00 TTL=126 ID=18764 PROTO=TCP SPT=3767 DPT=443 LEN=28
Sep 24 04:03:05 firewall kernel: RULE 2 -- ACCEPT IN=eth1 OUT=eth2 SRC=192.168.0.55 DST=10.10.5.4 LEN=48 TOS=0x00 PREC=0x00 TTL=122 ID=45067 DF PROTO=TCP SPT=1549 DPT=8080 WINDOW=8192 RES=0x00 SYN URGP=0
Sep 24 04:03:05 firewall kernel: RULE 8 -- ACCEPT IN=eth1 OUT=eth1 SRC=192.79.1.1 DST=172.48.3.1 LEN=48 TOS=0x00 PREC=0x00 TTL=126 ID=18775 PROTO=TCP SPT=1793 DPT=80 LEN=28
Sep 24 04:03:05 firewall kernel: RULE 2 -- REJECT IN=eth1 OUT=eth1 SRC=192.169.230.95 DST=192.168.31.51 LEN=48 TOS=0x00 PREC=0x00 TTL=126 ID=18774 PROTO=UDP SPT=1179 DPT=137 LEN=28
Sep 24 04:03:07 firewall kernel: RULE 9 -- ACCEPT IN=eth1 OUT=eth1 SRC=172.79.1.78 DST=10.10.6.4 LEN=48 TOS=0x00 PREC=0x00 TTL=126 ID=18775 PROTO=TCP SPT=9957 DPT=80 LEN=28
Sep 24 04:03:08 firewall kernel: RULE 16 -- DENY IN=eth1 OUT=eth2 SRC=192.168.6.162 DST=64.4.23.188 LEN=48 TOS=0x00 PREC=0x00 TTL=124 ID=33598 DF PROTO=TCP SPT=3247 DPT=443 WINDOW=64240 RES=0x00 SYN URGP=0
Sep 24 04:03:08 firewall kernel: RULE 16 -- ACCEPT IN=eth1 OUT=eth1 SRC=192.169.230.95 DST=192.168.31.51 LEN=48 TOS=0x00 PREC=0x00 TTL=126 ID=18780 PROTO=UDP SPT=7453 DPT=137 LEN=28
Sep 24 04:03:08 firewall kernel: RULE 11 -- REJECT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:00:10:b5:4f:4b:60:08:00 SRC=172.38.45.78 DST=10.10.5.7 LEN=48 TOS=0x00 PREC=0x00 TTL=128 ID=18808 PROTO=TCP SPT=2487 DPT=21 LEN=28
Sep 24 04:03:11 firewall kernel: RULE 13 -- DENY IN=eth1 OUT=eth1 SRC=192.169.0.5 DST=192.168.0.50 LEN=48 TOS=0x00 PREC=0x00 TTL=126 ID=18791 PROTO=UDP SPT=2813 DPT=137 LEN=28
Sep 24 04:03:11 firewall kernel: RULE 17 -- DENY IN=eth1 OUT=eth1 SRC=192.169.230.95 DST=192.168.1.51 LEN=48 TOS=0x00 PREC=0x00 TTL=126 ID=18790 PROTO=UDP SPT=2779 DPT=137 LEN=28
Sep 24 04:03:14 firewall kernel: RULE 16 -- ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:00:10:b5:4f:4b:60:08:00 SRC=192.169.230.95 DST=10.0.12.5 LEN=48 TOS=0x00 PREC=0x00 TTL=128 ID=18796 PROTO=UDP SPT=4476 DPT=137 LEN=28
Sep 24 04:03:14 firewall kernel: RULE 11 -- REJECT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:00:10:b5:4f:4b:60:08:00 SRC=172.38.45.78 DST=10.10.5.7 LEN=48 TOS=0x00 PREC=0x00 TTL=128 ID=18808 PROTO=TCP SPT=2487 DPT=21 LEN=28
Sep 24 04:03:14 firewall kernel: RULE 16 -- DENY IN=eth1 OUT=eth1 SRC=10.10.45.7 DST=192.168.1.51 LEN=48 TOS=0x00 PREC=0x00 TTL=126 ID=18795 PROTO=UDP SPT=2781 DPT=123 LEN=28
Sep 24 04:03:14 firewall kernel: RULE 14 -- ACCEPT IN=eth1 OUT=eth1 SRC=192.168.1.5 DST=192.168.0.51 LEN=48 TOS=0x00 PREC=0x00 TTL=126 ID=18794 PROTO=UDP SPT=33660 DPT=53 LEN=28
Sep 24 04:03:17 firewall kernel: RULE 5 -- ACCEPT IN=eth1 OUT=eth2 SRC=192.168.1.5 DST=64.246.30.37 LEN=48 TOS=0x00 PREC=0x00 TTL=124 ID=33597 DF PROTO=TCP SPT=3247 DPT=80 WINDOW=64242 RES=0x00 SYN URGP=0
Sep 24 04:03:17 firewall kernel: RULE 5 -- ACCEPT IN=eth1 OUT=eth2 SRC=192.168.2.5 DST=192.168.1.78 LEN=48 TOS=0x00 PREC=0x00 TTL=124 ID=33597 DF PROTO=TCP SPT=3657 DPT=80 WINDOW=64242 RES=0x00 SYN URGP=0
Sep 24 04:03:17 firewall kernel: RULE 11 -- REJECT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:00:10:b5:4f:4b:60:08:00 SRC=172.38.45.78 DST=10.10.5.7 LEN=48 TOS=0x00 PREC=0x00 TTL=128 ID=18808 PROTO=TCP SPT=2487 DPT=21 LEN=28
Sep 24 04:03:17 firewall kernel: RULE 3 -- ACCEPT IN=eth1 OUT=eth1 SRC=10.10.45.7 DST=192.168.0.8 LEN=48 TOS=0x00 PREC=0x00 TTL=126 ID=18806 PROTO=TCP SPT=2267 DPT=110 LEN=28
Sep 24 04:03:20 firewall kernel: RULE 5 -- ACCEPT IN=eth1 OUT=eth2 SRC=192.168.0.5 DST=64.246.30.37 LEN=48 TOS=0x00 PREC=0x00 TTL=124 ID=33597 DF PROTO=TCP SPT=1842 DPT=80 WINDOW=64248 RES=0x00 SYN URGP=0
/gestion/admin/firewallEyes/log.css
0,0 → 1,147
.tabCell {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
white-space: nowrap;
float: left;
overflow: hidden;
border-left: 0px solid #9EB2E2;
padding-top: 3px;
padding-bottom: 3px;
margin: 0px;
text-align: left;
}
.header {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
background-color: #EEF1F9;
border-top: 1px solid #9EB2E2;
border-bottom: 1px solid #9EB2E2;
color: #0C1E6C;
font-weight: bold;
text-align: center;
}
.footer {
font-family: Arial, Helvetica, sans-serif;
font-size: 9px;
background-color: #F4F8FB;
border: 1px solid #9EB2E2;
color: #0C1E6C;
padding: 2px;
}
a {
color: #0C1E6C;
text-decoration:none;
}
a:hover {
color: #800000;
text-decoration:underline;
}
 
.ACCEPT {
color: #006633;
border-right: 1px solid #9EB2E2;
border-left: 1px solid #9EB2E2;
}
.DROP {
color: #800000;
border-right: 1px solid #9EB2E2;
border-left: 1px solid #9EB2E2;
}
.REJECT {
color: #804040;
border-right: 1px solid #9EB2E2;
border-left: 1px solid #9EB2E2;
}
.ACCOUNTING {
color: #000000;
border-right: 1px solid #9EB2E2;
border-left: 1px solid #9EB2E2;
}
.line1 {
background-color: #FFFFFF;
}
.line2 {
background-color: #F4F8FB;
}
.inputBlock {
padding: 0px;
margin: 0px;
border: none;
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
white-space: nowrap;
float: left;
overflow: hidden;
border-left: 1px solid #9EB2E2;
padding: 2px;
}
.inputText {
font-family: Arial, Helvetica, sans-serif;
font-size: 9px;
color: #0C1E6C;
border:1px solid #9EB2E2;
padding: 2px;
}
.button {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: bold;
color: #0C1E6C;
background-color: #FFFFFF;
width: 80px;
height: 25px;
background-image: url(images/buttonBkg.jpg);
background-repeat: no-repeat;
text-align: left;
padding-left: 18pt;
}
.toolbutton {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: bold;
color: #0C1E6C;
background-color: #FFFFFF;
width: 100px;
height: 25px;
background-image: url(images/buttonBkg.jpg);
background-repeat: no-repeat;
text-align: left;
padding-left: 18pt;
}
.toolBox {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: bold;
background-color: #EEF1F9;
border: 1px solid #9EB2E2;
color: #0C1E6C;
text-align: left;
padding-left: 2pt;
}
.toolCommandBoxHeader {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: bold;
background-image: url(images/commandHeaderBkg.jpg);
border: 1px solid #9EB2E2;
color: #FFFFFF;
text-align: center;
}
.toolCommandBox {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
background-color: #F4F7FF;
border: 1px solid #9EB2E2;
color: #0C1E6C;
text-align: left;
padding-left: 2pt;
}
 
.topbox {
color: #FFFFFF;
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
border: none;
padding: 2px;
margin: 0px;
}
/gestion/admin/firewallEyes/include.php
0,0 → 1,139
<?php
/*
* firewall Eyes
* Copyright (C) 2004 Creabilis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
// ****************************************************************************
// return the regexp index for $columnName
// ****************************************************************************
function authenticationCheck() {
global $IPAuthentication,$allowedClientIP;
if ($IPAuthentication) {
if(!in_array($_SERVER["REMOTE_ADDR"],$allowedClientIP)) {
exit();
}
}
}
// ****************************************************************************
// return the regexp index for $columnName
// ****************************************************************************
function getIndexForColumn($columnName,$logFields) {
for($i=0; $i<count($logFields); $i++) {
if($logFields[$i][0]==$columnName) {
Return $logFields[$i][1];
}
}
}
// ****************************************************************************
// return true if all criteria matches
// ****************************************************************************
function criteriaMatches($criteria,$logFields,$infoTab,$exactSearch) {
$returnValue=true;
for($i=0; $i<count($logFields); $i++) {
$currentColumn=$logFields[$i][0];
$currentData=$infoTab[$logFields[$i][1]];
if($currentCriteria=$criteria[$currentColumn]) { // if criteria exists
// test
if(!searchString ($currentData,$currentCriteria,$exactSearch)) {
Return false;
}
}
}
Return $returnValue;
}
// ****************************************************************************
// return true strings founded
// ****************************************************************************
function searchString($haystack, $searchedWords,$exactSearch) {
if($searchedWords[0]=="!") {
$negate=true;
$searchedWords=substr($searchedWords,1);
}
$returnValue=false;
$wordTab=preg_split ("/[\s,]+/", $searchedWords);
if($wordTab) {
for($i=0; $i<count($wordTab); $i++) {
if($currentWord=$wordTab[$i]) {
// test
if(($exactSearch ? $haystack==$currentWord : stristr ($haystack,$currentWord))) {
$returnValue=true;
break;
}
}
}
}
if($negate) {
Return (!$returnValue);
} else {
Return $returnValue;
}
}
 
// ****************************************************************************
// change lines to resolved items
// ****************************************************************************
function resolvAll() {
global $logFields,$infoTab,$resolvIp,$resolvService,$indexForProtocol,$infoTabOriginal;
for($i=0; $i<count($logFields); $i++)
{
if($resolvIp) {
if($logFields[$i][3]=="ip" && !strstr($infoTab[$logFields[$i][1]],"255")) {
$infoTab[$logFields[$i][1]]=gethostbyaddr($infoTab[$logFields[$i][1]]);
}
}
if($resolvService) {
if($logFields[$i][3]=="service") {
$currentProtocolIndex=$indexForProtocol;
$service=getservbyport($infoTab[$logFields[$i][1]],strtolower($infoTab[$currentProtocolIndex]));
if($service) {
$infoTabOriginal[$logFields[$i][1]]=$infoTab[$logFields[$i][1]];
$infoTab[$logFields[$i][1]]=$service;
}
}
}
}
}
 
 
// ****************************************************************************
// fgetrs : read line and put pointer at the begining
// ****************************************************************************
function fgetrs($fileHandle) {
while (ftell($fileHandle)>=0) {
$char = fgetc($fileHandle);
if (ftell($fileHandle)==1) {
fseek ($fileHandle,-1,SEEK_CUR);
return $char.$line;
}
if ($char == "\n" || ftell($fileHandle)==1) {
fseek ($fileHandle,-2,SEEK_CUR);
return $line;
}
else {
fseek ($fileHandle,-2,SEEK_CUR);
$line = $char . $line;
}
}
return $line;
}
 
?>
/gestion/admin/firewallEyes/index.html
0,0 → 1,17
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>firewall Eyes - Creabilis</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
 
<frameset rows="115,*" frameborder="NO" border="0" framespacing="0">
<frame src="header.php" name="topFrame" scrolling="yes">
<frame src="logs.php" name="mainFrame">
</frameset>
<noframes>
<body>
Your browser doesn't support frames. Unable to get it working.
</body>
</noframes>
</html>
/gestion/admin/firewallEyes/logs.php
0,0 → 1,148
<?php
/*
* firewall Eyes
* Copyright (C) 2004 Creabilis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
include("configuration.php");
include("include.php");
 
// authentification check
authenticationCheck();
 
// Date in the past
header("Expires: Mon, 26 Jul 2004 00:00:00 GMT");
 
// always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
 
// HTTP/1.0
header("Pragma: no-cache");
 
set_time_limit (300);
 
// GET INPUT
// log file, get input or first logfile
$logfile=($_GET["logfile2display"] ? $logfiles[$_GET["logfile2display"]] : $logfiles[0]);
 
$displayedLines=($_GET["displayedLines"] ? $_GET["displayedLines"] : $configuration["displayedLines"]);
 
$configurationVars=Array("resolvIp","resolvService","readFromTheEnd","exactSearch","automaticRefresh");
foreach($configurationVars as $confVarName) {
${$confVarName}=($_GET["searchAction"] ? $_GET[$confVarName] : $configuration[$confVarName]);
 
}
 
// init
$lineCount=0;
$indexForAction=getIndexForColumn("action",$logFields);
$indexForProtocol=getIndexForColumn("protocol",$logFields);
// get inputs
$criteria=$_GET["criteria"];
 
$maxWidth=0;
for($i=0; $i<count($logFields); $i++) {
$maxWidth+=$logFields[$i][2];
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Creabilis fw-Eyes</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<link href="log.css" rel="stylesheet" type="text/css"/>
<?php if ($automaticRefresh) {?>
<meta http-equiv="refresh" content="<?=$automaticRefreshInterval?>">
<?php } ?>
</head>
 
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#FFFFFF">
<div align="left" style="padding-left:18px">
<?php
if(!file_exists ($logfile)) {
die("Le fichier n'existe pas : $logfile");
}
if(!is_readable ($logfile)) {
die("Ne peut pas lire le fichier : $logfile");
}
 
$fd = fopen ($logfile, "r");
 
if ($readFromTheEnd){
// to the end
fseek($fd,0,SEEK_END);
}
while (($readFromTheEnd ? ftell($fd)>0 : !feof ($fd))) {
$line = ($readFromTheEnd ? fgetrs($fd) : fgets($fd, 1024));
if(preg_match($detectLine, $line)) { // it's a firewall line
if(preg_match($LineRegExp, $line, $infoTab)) {
// resolv dns/services
$infoTabOriginal=null;
resolvAll();
// Apply search array
if(criteriaMatches($criteria,$logFields,$infoTab,$exactSearch)) {
$lineCount++;
$nb=($nb==1 ? 2 : 1); // for alternate display
// line display
?>
<table class="<?=$infoTab[$indexForAction]?>" border="0" cellpadding="0" cellspacing="0" width="<?=$maxWidth?>">
<tr class="line<?=$nb?>">
<?php
for($i=0; $i<count($logFields); $i++)
{
?>
<td title="<?=($infoTabOriginal[$logFields[$i][1]] ? $infoTabOriginal[$logFields[$i][1]]." - " : "")?><?=$infoTab[$logFields[$i][1]]?>">
<span class="tabCell" style="width: <?=$logFields[$i][2]?>px" >
<?php
if($logFields[$i][4]) {
?>
<a href="info.php?type=<?=urlencode($logFields[$i][4])?>&p1=<?=urlencode($infoTab[$logFields[$i][1]])?>" title="informations"><img src="images/<?=str_replace(" ","-",($logFields[$i][0]))?>.gif" width="15" height="15" border="0" align="absmiddle"></a>
<?php
}
?>
&nbsp;<?=$infoTab[$logFields[$i][1]]?>
</span>
</td>
<?php
}?></tr>
</table>
<?php
flush();
}
 
}
}
if($lineCount>=$displayedLines) break;
}
// close file
fclose ($fd);
?>
<table border="0" cellpadding="0" cellspacing="0" width="<?=$maxWidth+2?>" class="footer">
<tr>
<td align="center">
<A HREF="http://www.creabilis.com" target="creabilis">Firewall Eyes</A> - <A HREF="http://www.gnu.org/licenses/gpl.html">GPL</A> - Creabilis © 2004 - Web site : <A HREF="http://firewalleyes.creabilis.com">http://firewalleyes.creabilis.com</A>
</td>
</tr>
</table>
</div>
</body>
</html>
/gestion/admin/firewallEyes/readme.txt
0,0 → 1,2
Latest documentation and installation instructions on :
http://firewalleyes.creabilis.com
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/gestion/admin/firewallEyes/configuration.php
0,0 → 1,121
<?php
/*
* firewall Eyes
* Copyright (C) 2004 Creabilis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
 
// ***************** CONFIGURATION *********************
// activate authentication by IP
// $IPAuthentication=true|false;
$IPAuthentication=false;
// alowed clientIP
// one line by IP
// $allowedClientIP[]="127.0.0.1";
$allowedClientIP[]="127.0.0.1";
 
// logfiles to parse, default is first
// you can use file path like /etc/log/messages or nfs
// or http like http://www.host.com/messages
// or ftp like ftp://user:password@ftp.host.com/messages
// $logfiles[]="/var/log/messages";
//$logfiles[]="/var/log/messages";
//$logfiles[]="/var/log/messages.1";
//$logfiles[]="/var/log/messages.2";
//$logfiles[]="/var/log/messages.3";
//$logfiles[]="/var/log/messages.4";
$folder = "/var/log/firewall";
$dossier = opendir($folder);
$index=0;
while ($Fichier = readdir($dossier)) {
$exclusion = stripos ($Fichier, '.gz');
if ($Fichier != "." && $Fichier != ".." && $exclusion == 0) {
$index ++;
$logfiles[]=$folder . "/" . $Fichier;
} # end if
} # end while
closedir($dossier);
 
// automatic submit
// automatic reload log display just after changing a display option (search strings, resolving, ...)
// $automaticSubmit=true|false;
$automaticSubmit=true;
 
 
// default number of lines to display
$configuration["displayedLines"]=50;
 
// resolv ip
$configuration["resolvIp"]=false;
 
// resolv service
$configuration["resolvService"]=true;
 
// read log file from the end
$configuration["readFromTheEnd"]=true;
 
// exact search
$configuration["exactSearch"]=false;
 
// automatic refresh page every x secondes
//$configuration["automaticRefresh"]=false|true;
$configuration["automaticRefresh"]=false;
 
// refresh interval in seconds
$automaticRefreshInterval=10;
 
// column array
// syntax : name, index in regexp, width in pixels, type, toolname
// type can be ip or service or protocol, used for resolution
// to hide a column, just comment it with //
$logFields[]=Array("date","1","60",null,null);
$logFields[]=Array("heure","2","60",null,null);
$logFields[]=Array("intf","5","50",null,null);
$logFields[]=Array("source","6","150","ip","iptools");
$logFields[]=Array("destination","7","150","ip","iptools");
$logFields[]=Array("protocol","8","60","protocol",null);
$logFields[]=Array("src port","9","60",null,null);
$logFields[]=Array("dst port","10","80","service","srvtools");
$logFields[]=Array("r&egrave;gle","3","80",null,null);
$logFields[]=Array("action","4","80",null,null);
 
// ip tools
// types are command or url
// use %originalParameter% for values like ip address
// use %transformedParameter% for values like dns address
$tools["iptools"]["ping"]= array("type"=>"command", "value"=>"ping -c 5 %p1%");
$tools["iptools"]["traceroute"]=array("type"=>"command", "value"=>"traceroute %p1%");
$tools["iptools"]["DNS lookup"]= array("type"=>"command", "value"=>"host %p1%");
$tools["iptools"]["whois"]= array("type"=>"command", "value"=>"whois %p1%","precompute"=>"extractdomain");
$tools["iptools"]["nmap"]= array("type"=>"command", "value"=>"nmap %p1%");
$tools["iptools"]["HTTP Test"]= array("type"=>"url", "value"=>"http://%p1%");
 
// service tool
$tools["srvtools"]["ISS Port db"]= array("type"=>"url", "value"=>"http://www.iss.net/security_center/advice/Exploits/Ports/%p1%/default.htm");
$tools["srvtools"]["IANA ports"]= array("type"=>"url", "value"=>"http://www.iana.org/assignments/port-numbers");
$tools["srvtools"]["Google"]= array("type"=>"url", "value"=>"http://www.google.com/search?hl=en&q=port+%p1%");
 
// regExp for detecting a firewall line
$detectLine="/RULE/S";
 
// regExp for line parsing
$LineRegExp="/(\w+\s+\d+)\s+(\S+)\s+\S+.*RULE (\S+).+-\s+(\S+).*IN=(\S+).*SRC=(\S+)\s+DST=(\S+).*PROTO=(\S+).*SPT=(\S+).*DPT=(\S+)/S";
 
//line sample :
//Sep 24 18:07:35 passerelle kernel: RULE 14 -- ACCEPT IN=eth1 OUT= MAC=00:04:e2:43:1c:c4:00:0b:cd:f9:f4:42:08:00 SRC=192.168.0.1 DST=172.31.0.253 LEN=48 TOS=0x00 PREC=0x00 TTL=128 ID=11059 DF PROTO=TCP SPT=1537 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
 
?>
/gestion/admin/firewallEyes/header.php
0,0 → 1,154
<?php
/*
* firewall Eyes
* Copyright (C) 2004 Creabilis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
include("configuration.php");
include("include.php");
 
// authentification check
authenticationCheck();
 
// Date in the past
header("Expires: Mon, 26 Jul 2004 00:00:00 GMT");
 
// always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
 
// HTTP/1.0
header("Pragma: no-cache");
 
set_time_limit (300);
 
 
// TODO:
// predifined filters : all accept, all dropped/rejected
 
//line example :
//Sep 24 18:07:35 passerelle kernel: RULE 14 -- ACCEPT IN=eth1 OUT= MAC=00:04:e2:43:1c:c4:00:0b:cd:f9:f4:42:08:00 SRC=172.31.200.189 DST=172.31.1.253 LEN=48 TOS=0x00 PREC=0x00 TTL=128 ID=11059 DF PROTO=TCP SPT=1537 DPT=8080 WINDOW=65535 RES=0x00 SYN URGP=0
 
$logfile=$configuration["logfile"];
$displayedLines=($_GET["displayedLines"] ? $_GET["displayedLines"] : $configuration["displayedLines"]);
 
$configurationVars=Array("resolvIp","resolvService","readFromTheEnd","exactSearch","automaticRefresh");
foreach($configurationVars as $confVarName) {
${$confVarName}=($_GET["searchAction"] ? $_GET[$confVarName] : $configuration[$confVarName]);
 
}
 
// init
$lineCount=0;
$indexForAction=getIndexForColumn("action",$logFields);
$indexForProtocol=getIndexForColumn("protocol",$logFields);
// get inputs
$criteria=$_GET["criteria"];
 
$maxWidth=0;
for($i=0; $i<count($logFields); $i++) {
$maxWidth+=$logFields[$i][2];
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Creabilis fw-Eyes</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<link href="log.css" rel="stylesheet" type="text/css"/>
<script>
function myrefresh() {
<?php if ($automaticSubmit) {?>
document.forms["search"].submit()
<?php } ?>
}
</script>
</head>
 
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#FFFFFF">
<table width="100%" height="100" border="0" cellpadding="0" cellspacing="0" background="images/header-background.jpg">
<tr>
<td valign="bottom" align="left" style="padding-left:19px">
<form method="GET" action="logs.php" style="margin: 0px;padding: 0px;" name="search" target="mainFrame">
<INPUT type="hidden" name="searchAction" value="1">
<div class="topbox" >
</div>
<table border="0" cellpadding="0" cellspacing="0" width="<?=$maxWidth?>">
<tr>
<td rowspan="2" valign="top"><img src="images/logo-firewallEyes.gif" width="58" height="38" align="top"><img src="images/firewallEyes.jpg" width="199" height="48" align="top"></td>
<td align="right" class="topbox"> lignes&nbsp;affich&eacute;es&nbsp;
<input name="displayedLines" type="text" class="inputText" style="width:30 px;" size="3" maxlength="6" value="<?=htmlentities(stripslashes($displayedLines))?>" onChange="myrefresh()">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fichier&nbsp;log&nbsp; <select name="logfile2display" class="inputText" onChange="myrefresh()">
<?php
foreach($logfiles as $currentIndex=>$currentLogfile) {
?>
<option value="<?=htmlspecialchars($currentIndex)?>">
<?=htmlspecialchars($currentLogfile)?>
</option>
<?php
}
?>
</select> &nbsp;&nbsp; <input type="checkbox" name="readFromTheEnd" id="readFromTheEnd" value="1" <?= ($readFromTheEnd ? "checked" : "")?> onClick="myrefresh()">
<label for="readFromTheEnd">&nbsp;lecture&nbsp;depuis&nbsp;la&nbsp;fin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label></td>
</tr>
<tr>
<td colspan="<?=count($logFields)?>" align="left" class="topbox">
<input type="checkbox" name="automaticRefresh" id="automaticRefresh" value="1" <?= ($automaticRefresh ? "checked" : "")?> onClick="myrefresh()">
<label for="automaticRefresh">raffraichissement auto&nbsp;&nbsp;</label>
<input type="checkbox" name="resolvIp" id="resolvIp" value="1" <?= ($resolvIp ? "checked" : "")?> onClick="myrefresh()">
<label for="resolvIp">resolv&nbsp;IP&nbsp;&nbsp;</label>
<input type="checkbox" name="resolvService" id="resolvService" value="1" <?= ($resolvService ? "checked" : "")?> onClick="myrefresh()">
<label for="resolvService">resolv&nbsp;services&nbsp;&nbsp;</label>
<input type="checkbox" name="exactSearch" id="exactSearch" value="1" <?= ($exactSearch ? "checked" : "")?> onClick="myrefresh()">
<label for="exactSearch">recherche&nbsp;exacte&nbsp;&nbsp;</label>
<input class="button" type="submit" value="Afficher">
<!--&nbsp;&nbsp;<input class="button" type="button" value="reset" onClick="top.window.location='index.html'">-->
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="<?=$maxWidth?>">
<tr>
<?php
// tab header
for($i=0; $i<count($logFields); $i++) {
?><td class="header"><span style="width: <?=$logFields[$i][2]?>px" class="header">&nbsp;<?=$logFields[$i][0]?></span>
</td><?php
}?>
</tr>
<tr>
<?php
// search form
for($i=0; $i<count($logFields); $i++) {
?><td><span style="width: <?=$logFields[$i][2]?>px"><input type="text" name="criteria[<?=htmlentities($logFields[$i][0])?>]" value="<?=htmlentities(stripslashes($criteria[$logFields[$i][0]]))?>" style="width: <?=$logFields[$i][2]?>px" class="inputText" onChange="myrefresh()"></span>
</td>
<?php
}?>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>
/gestion/menu.php
0,0 → 1,154
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN//2.0">
<HTML>
<!-- written by Rexy ! -->
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<TITLE>menu</TITLE>
<link rel="stylesheet" href="css/style.css" type="text/css">
</HEAD>
<?
# Choice of language
$Language = 'en';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'fr'){
$l_home = "ACCUEIL";
$l_system = "SYSTÈME";
$l_auth = "AUTHENTIFICATION";
$l_filter = "FILTRAGE";
$l_statistics = "STATISTIQUES";
$l_backup = "SAUVEGARDES";
$l_activity = "Activité";
$l_services = "Services";
$l_network = "Réseau";
$l_ldap = "Ldap";
$l_access_nb = "Accès au centre";
$l_create_user = "Créer usager";
$l_edit_user = "Éditer usager";
$l_create_group = "Créer groupe";
$l_edit_group = "Éditer groupe";
$l_import_empty = "Importer / Vider";
$l_network = "Réseau";
$l_stat_user_day = "usager/jour";
$l_stat_con = "connexions";
$l_stat_daily ="usage journalier";
$l_stat_web ="traffic WEB";
$l_firewall ="parefeu";
}
else {
$l_home = "HOME";
$l_system = "SYSTEM";
$l_auth = "AUTHENTICATION";
$l_filter = "FILTERING";
$l_statistics = "STATISTICS";
$l_backup = "BACKUPS";
$l_activity = "Activity";
$l_services = "Services";
$l_network = "Network";
$l_ldap = "Ldap";
$l_access_nb = "Access to center";
$l_create_user = "Create user";
$l_edit_user = "Edit user";
$l_create_group = "Create group";
$l_edit_group = "Edit group";
$l_import_empty = "Import / Empty";
$l_network = "Network";
$l_stat_user_day = "user/day";
$l_stat_con = "connections";
$l_stat_daily ="daily use";
$l_stat_web ="WEB traffic";
$l_firewall ="firewall";
}
echo "
<TABLE width=150 border=0 cellspacing=0 cellpadding=0>
<tr><th>Menu</th></tr>
<tr bgcolor=\"#FFCC66\"><td><img src=\"/images/pix.gif\" width=1
height=2></td></tr>
</TABLE>
<TABLE width=150 border=1 cellspacing=0 cellpadding=0>
<tr bgcolor=\"#666666\"><td>
<TABLE width=\"100%\" border=0 cellspacing=0 cellpadding=2>
<TR><TD valign=\"middle\" align=\"left\">
<img src=\"images/right.gif\" height=10 width=10 border=no nosave><A HREF=\"phpsysinfo/\" TARGET=\"REXY2\">$l_home</A></TD></TR>";
if (isset($_GET['a'])) { $a=$_GET['a']; }
else $a=0;
if (isset($_GET['b'])) { $b=$_GET['b']; }
else $b=0;
$selection[0]=$l_system;
$selection[1]=$l_auth;
$selection[2]=$l_filter;
$selection[3]=$l_statistics;
$fichier[0]="system.php";
$fichier[1]="auth.php";
$fichier[2]="filtering.php";
$fichier[3]="stat.php";
$i=0;
$nb1=count($selection);
while ($i != $nb1)
{
if ($a==1 AND $i==$b)
{
echo "<TR><TD valign=\"middle\" align=\"left\"><img src=\"images/down2.gif\" height=10 width=10 border=no nosave><a href=\"menu.php?a=0&b=0\"><font color=\"black\"><b>$selection[$i]</b></font></a></TD></TR>";
include($fichier[$i]);
}
else
{
echo "<TR><TD valign=\"middle\" align=\"left\"><img src=\"images/right.gif\" height=10 width=10 border=no nosave><a href=\"menu.php?a=1&b=$i\">$selection[$i]</a></TD></TR>";
}
$i++;
}
echo "
<TR><TD valign=\"middle\" align=\"left\">
<img src=\"images/right.gif\" height=10 width=10 border=no nosave><A HREF=\"backup/sauvegarde.php\" TARGET=\"REXY2\">$l_backup</A></TD></TR>";
?>
</TABLE>
</td></tr>
</TABLE>
<br>
<TABLE width="150" border="0" cellspacing="0" cellpadding="0">
<tr><th>Doc</th></tr>
<tr bgcolor="#FFCC66"><td><img src="images/pix.gif" width="1"
height="2"></td></tr>
</TABLE>
<TABLE width="150" border=1 cellspacing=0 cellpadding=0>
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left"><img src="images/right.gif" height=10
width=10 border=no nosave><a href="alcasar-1.8-presentation.pdf" target="_blank">Présentation</a></td></tr>
<tr><td valign="middle" align="left"><img src="images/right.gif" height=10
width=10 border=no nosave><a href="alcasar-1.8-installation.pdf" target="_blank">Installation</a></td></tr>
<tr><td valign="middle" align="left"><img src="images/right.gif" height=10
width=10 border=no nosave><a href="alcasar-1.8-exploitation.pdf" target="_blank">Exploitation</a></td></tr>
</TABLE>
</td></tr>
</TABLE>
<BR>
<TABLE width="150" border="0" cellspacing="0" cellpadding="0">
<tr><th><? echo "$l_access_nb"; ?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="images/pix.gif" width="1" height="2"></td></tr>
</TABLE>
<TABLE width="150" border=1 cellspacing=0 cellpadding=0>
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td valign="middle" align="center">
<? // Compteur d'accès
$name_fic="compteur.txt";
// Recuperation du nombre de visite
if (($fp=fopen($name_fic,"r")) == false) exit;
$nb=fgets($fp,10);
fclose($fp);
$nb+=1;
printf("%d", $nb);
// Ecriture du nombre de visite
if (($fp=fopen($name_fic,"w")) == false) exit;
fputs($fp, "$nb\n");
fclose($fp);
?>
<br>depuis le 23/12/2009<br></center></td></tr>
</TABLE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
/gestion/phpsysinfo/includes/xml/portail.php
0,0 → 1,179
<?php
/***************************************************************************
* Copyright (C) 2006 by phpSysInfo - A PHP System Information Script *
* http://phpsysinfo.sourceforge.net/ *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
// $Id: vitals.php,v 1.32 2007/02/18 18:59:54 bigmichi1 Exp $
 
// xml_utilisateur()
 
function utilisateur () {
$strResult = 0;
// Déclaration des paramètres de connexion
$host = "localhost";
$DB_USER = "radius";
$DB_RADIUS = "radius";
$radiuspwd = "gLMmnOpk";
// Connexion au serveur
mysql_connect($host, $DB_USER,$radiuspwd) or die("erreur de connexion au serveur");
mysql_select_db($DB_RADIUS) or die("erreur de connexion a la base de donnees");
// Creation et envoi de la requete
$query = "SELECT UserName FROM userinfo";
$result = mysql_query($query);
// Recuperation des resultats
$strResult = mysql_num_rows($result);
// Deconnexion de la base de donnees
mysql_close();
return $strResult;
}
 
function groupe () {
$strResult = 0;
// Déclaration des paramètres de connexion
$host = "localhost";
$DB_USER = "radius";
$DB_RADIUS = "radius";
$radiuspwd = "gLMmnOpk";
// Connexion au serveur
mysql_connect($host, $DB_USER,$radiuspwd) or die("erreur de connexion au serveur");
mysql_select_db($DB_RADIUS) or die("erreur de connexion a la base de donnees");
// Creation et envoi de la requete
$query = "SELECT GroupName FROM radusergroup GROUP BY GroupName";
$result = mysql_query($query);
// Recuperation des resultats
$strResult = mysql_num_rows($result);
// Deconnexion de la base de donnees
mysql_close();
return $strResult;
}
 
function xml_portail () {
global $sysinfo;
$_text = " <Portail>\n"
// . " <Utilisateur>" . htmlspecialchars( $sysinfo->utilisateur(), ENT_QUOTES ) . "</Utilisateur>\n"
. " <Utilisateur>" . htmlspecialchars( utilisateur(), ENT_QUOTES ) . "</Utilisateur>\n"
. " <Groupe>" . htmlspecialchars( trim( groupe() ), ENT_QUOTES ) . "</Groupe>\n";
$_text .= " </Portail>\n";
return $_text;
}
 
// Fonction de test de connectivité internet
function internetTest(){
$host = "www.google.fr";
$port = "80";
//var $num; //non utilisé
//var $error; //non utilisé
if (! $sock = @fsockopen($host, $port, $num, $error, 5)) {
return false;
} else {
fclose($sock);
return true;
}
}
 
// html_portail()
function html_portail () {
global $webpath;
global $XPath;
global $text;
 
$file_version = "/var/www/html/VERSION";
$handle = fopen ($file_version, "r");
$INSTALLEDVERSION = fread ($handle, filesize ($file_version));
fclose ($handle);
$version_stable = dns_get_record("version.alcasar.info",DNS_TXT);
$AVAILABLEDVERSION = $version_stable[0]['txt'];
$version_devel = dns_get_record("devel.alcasar.info",DNS_TXT);
$DEVELVERSION = $version_devel[0]['txt'];
$file_bl = "/var/www/html/VERSION-BL";
$handle = fopen ($file_bl, "r");
$VERSIONBL = fread ($handle, filesize ($file_bl));
fclose ($handle);
$nbr_user = utilisateur ();
$nbr_grp = groupe ();
$nbr_user_online = exec ("sudo /usr/sbin/chilli_query list | cut -d\" \" -f5 | grep \"1\" | wc -l");
 
if (InternetTest()){
$internet_status = "<img src='/images/state_ok.gif'>".$text['internet_enable'];
} else {
$internet_status = "<img src='/images/state_error.gif'>".$text['internet_disable'];
}
$_text = "<table border=\"0\" width=\"100%\" align=\"center\">\n"
. " <tr>\n"
. " <td valign=\"top\"><font size=\"-1\">" . $text['portail-version'] . "</font></td>\n"
. " <td><font size=\"-1\">" . $INSTALLEDVERSION . "</font></td>\n"
. " </tr>\n"
. " <tr>\n"
. " <td valign=\"top\"><font size=\"-1\">" . $text['portail-stable'] . "</font></td>\n"
. " <td><font size=\"-1\">" . $AVAILABLEDVERSION . "</font></td>\n"
. " </tr>\n"
. " <tr>\n"
. " <td valign=\"top\"><font size=\"-1\">" . $text['portail-devel'] . "</font></td>\n"
. " <td><font size=\"-1\">" . $DEVELVERSION . "</font></td>\n"
. " </tr>\n"
. " <tr>\n"
. " <td valign=\"top\"><font size=\"-1\">" . $text['utilisateur'] . "</font></td>\n"
. " <td><font size=\"-1\">" . $nbr_user_online . " / " . $nbr_user . "</font></td>\n"
. " </tr>\n"
. " <tr>\n"
. " <td valign=\"top\"><font size=\"-1\">" . $text['groupe'] . "</font></td>\n"
. " <td><font size=\"-1\">" . $nbr_grp . "</font></td>\n"
. " </tr>\n"
. " <tr>\n"
. " <td valign=\"top\"><font size=\"-1\">" . $text['bl-version'] . "</font></td>\n"
. " <td><font size=\"-1\">" . $VERSIONBL . "</font></td>\n"
. " </tr>\n"
. " <tr>\n"
. " <td valign=\"top\"><font size=\"-1\">" . $text['internet_link'] . "</font></td>\n"
. " <td><font size=\"-1\">" . $internet_status . "</font></td>\n"
. " </tr>\n"
. " <tr>\n"
. " <td valign=\"top\" colspan=\"2\"><font size=\"-1\"><a href=\"/certs/certificat_alcasar_ca.pem\">" . $text['ca'] . "</a></font></td>\n"
. " </tr>\n"
. "</table>\n";
return $_text;
}
 
function wml_portail () {
global $XPath;
global $text;
$_text = "<card id=\"vitals\" title=\"" . $text['vitals'] . "\">\n"
. "<p>" . $text['hostname'] . ":<br/>\n"
. "-&nbsp;" . $XPath->getData( "/phpsysinfo/Vitals/Hostname" ) . "</p>\n"
. "<p>" . $text['ip'] . ":<br/>\n"
. "-&nbsp;" . $XPath->getData( "/phpsysinfo/Vitals/IPAddr" ) . "</p>\n"
. "<p>" . $text['kversion'] . ":<br/>\n"
. "-&nbsp;" . $XPath->getData( "/phpsysinfo/Vitals/Kernel" ) . "</p>\n"
. "<p>" . $text['uptime'] . ":<br/>\n"
. "-&nbsp;" . uptime( $XPath->getData( "/phpsysinfo/Vitals/Uptime" ) ) . "</p>\n"
. "<p>" . $text['users'] . ":<br/>"
. "-&nbsp;" . $XPath->getData( "/phpsysinfo/Vitals/Users" ) . "</p>\n"
. "<p>" . $text['loadavg'] . ":<br/>"
. "-&nbsp;" . $XPath->getData( "/phpsysinfo/Vitals/LoadAvg" ) . "</p>\n"
. "</card>\n";
return $_text;
}
?>
/gestion/phpsysinfo/includes/xml/network.php
0,0 → 1,95
<?php
/***************************************************************************
* Copyright (C) 2006 by phpSysInfo - A PHP System Information Script *
* http://phpsysinfo.sourceforge.net/ *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
// $Id: network.php,v 1.15 2007/02/08 20:16:25 bigmichi1 Exp $
 
//
// xml_network()
//
function xml_network () {
global $sysinfo;
$arrNet = $sysinfo->network();
$_text = " <Network>\n";
foreach( $arrNet as $strDev => $arrStats ) {
$_text .= " <NetDevice>\n"
. " <Name>" . htmlspecialchars( trim( $strDev ), ENT_QUOTES ) . "</Name>\n"
. " <RxBytes>" . htmlspecialchars( $arrStats['rx_bytes'], ENT_QUOTES ) . "</RxBytes>\n"
. " <TxBytes>" . htmlspecialchars( $arrStats['tx_bytes'], ENT_QUOTES ) . "</TxBytes>\n"
. " <Errors>" . htmlspecialchars( $arrStats['errs'], ENT_QUOTES ) . "</Errors>\n"
. " <Drops>" . htmlspecialchars( $arrStats['drop'], ENT_QUOTES ) . "</Drops>\n"
. " </NetDevice>\n";
}
$_text .= " </Network>\n";
return $_text;
}
 
//
// html_network()
//
function html_network () {
global $XPath;
global $text;
$textdir = direction();
$_text = "<table border=\"0\" width=\"100%\" align=\"center\">\n"
. " <tr>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['device'] . "</b></font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['received'] . "</b></font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['sent'] . "</b></font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['errors'] . "</b></font></td>\n"
. " </tr>\n";
for( $i = 1, $max = sizeof( $XPath->getDataParts( "/phpsysinfo/Network" ) ); $i < $max; $i++ ) {
if( $XPath->match( "/phpsysinfo/Network/NetDevice[" . $i . "]/Name" ) ) {
$_text .= " <tr>\n";
$_text .= " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/Network/NetDevice[" . $i . "]/Name" ) . "</font></td>\n";
$_text .= " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . format_bytesize( $XPath->getData( "/phpsysinfo/Network/NetDevice[" . $i . "]/RxBytes" ) / 1024 ) . "</font></td>\n";
$_text .= " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . format_bytesize( $XPath->getData( "/phpsysinfo/Network/NetDevice[" . $i . "]/TxBytes" ) / 1024 ) . "</font></td>\n";
$_text .= " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/Network/NetDevice[" . $i . "]/Errors" ) . '/' . $XPath->getData( "/phpsysinfo/Network/NetDevice[" . $i . "]/Drops" ) . "</font></td>\n";
$_text .= " </tr>\n";
}
}
$_text .= "</table>";
return $_text;
}
 
function wml_network() {
global $XPath;
global $text;
$_text = "<card id=\"network\" title=\"" . $text['netusage'] . "\">\n";
for( $i = 1, $max = sizeof( $XPath->getDataParts( "/phpsysinfo/Network" ) ); $i < $max; $i++ ) {
if( $XPath->match( "/phpsysinfo/Network/NetDevice[" . $i . "]/Name" ) ) {
$_text .= "<p>" . $text['device'] . ": " . $XPath->getData( "/phpsysinfo/Network/NetDevice[" . $i . "]/Name" ) . "<br/>\n"
. "- U: " . format_bytesize( $XPath->getData("/phpsysinfo/Network/NetDevice[" . $i . "]/TxBytes" ) / 1024 ) . "<br/>\n"
. "- D: " . format_bytesize( $XPath->getData("/phpsysinfo/Network/NetDevice[" . $i . "]/RxBytes" ) / 1024 ) . "<br/>\n"
. "- E: " . $XPath->getData( "/phpsysinfo/Network/NetDevice[" . $i . "]/Errors" ) . '/' . $XPath->getData( "/phpsysinfo/Network/NetDevice[" . $i . "]/Drops" ) . "</p>\n";
}
}
$_text .= "</card>\n";
return $_text;
}
?>
/gestion/phpsysinfo/includes/xml/utilisateur.php.2
0,0 → 1,87
<?php
/***************************************************************************
* Copyright (C) 2006 by phpSysInfo - A PHP System Information Script *
* http://phpsysinfo.sourceforge.net/ *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
// $Id: vitals.php,v 1.32 2007/02/18 18:59:54 bigmichi1 Exp $
 
// xml_vitals()
 
function xml_utilisateur () {
global $sysinfo;
global $loadbar;
global $show_vhostname;
$strLoadavg = "";
$arrBuf = ( $loadbar ? $sysinfo->loadavg( $loadbar ) : $sysinfo->loadavg() );
foreach( $arrBuf['avg'] as $strValue) {
$strLoadavg .= $strValue . ' ';
}
$_text = " <Portail>\n"
. " <Utilisateur>" . htmlspecialchars( $show_vhostname ? $sysinfo->vhostname() : $sysinfo->chostname(), ENT_QUOTES ) . "</Utilisateur>\n"
. " <Groupe>" . htmlspecialchars( $show_vhostname ? $sysinfo->vip_addr() : $sysinfo->ip_addr(), ENT_QUOTES ) . "</Groupe>\n";
$_text .= " </Portail>\n";
return $_text;
}
 
// html_vitals()
function html_utilisateur () {
global $webpath;
global $XPath;
global $text;
$textdir = direction();
$scale_factor = 2;
$strLoadbar = "";
$uptime = "";
if( $XPath->match( "/phpsysinfo/Portail/User" ) )
$strLoadbar = "<br>" . create_bargraph( $XPath->getData( "/phpsysinfo/Vitals/CPULoad" ), 100, $scale_factor ) . "&nbsp;" . $XPath->getData( "/phpsysinfo/Portail/User" ) . "%";
$_text = "<table border=\"0\" width=\"100%\" align=\"center\">\n"
. " <tr>\n"
. " <td valign=\"top\"><font size=\"-1\">" . $text['utilisateur'] . "</font></td>\n"
. " <td><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/Portail/Utilisateur" ) . "</font></td>\n"
. " </tr>\n"
. " <tr>\n"
. " <td valign=\"top\"><font size=\"-1\">" . $text['groupe'] . "</font></td>\n"
. " <td><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/Portail/Groupe" ) . "</font></td>\n"
. " </tr>\n"
. "</table>\n";
return $_text;
}
 
function wml_utilisateur () {
global $XPath;
global $text;
$_text = "<card id=\"vitals\" title=\"" . $text['vitals'] . "\">\n"
. "<p>" . $text['hostname'] . ":<br/>\n"
. "-&nbsp;" . $XPath->getData( "/phpsysinfo/Vitals/Hostname" ) . "</p>\n"
. "<p>" . $text['ip'] . ":<br/>\n"
. "-&nbsp;" . $XPath->getData( "/phpsysinfo/Vitals/IPAddr" ) . "</p>\n"
. "</card>\n";
return $_text;
}
?>
/gestion/phpsysinfo/includes/xml/mbinfo.php
0,0 → 1,208
<?php
/***************************************************************************
* Copyright (C) 2006 by phpSysInfo - A PHP System Information Script *
* http://phpsysinfo.sourceforge.net/ *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
// $Id: mbinfo.php,v 1.20 2007/02/18 19:11:31 bigmichi1 Exp $
 
function xml_mbinfo() {
global $text;
global $mbinfo;
$_text = "";
$arrBuff = $mbinfo->temperature();
$_text = " <MBinfo>\n";
if( sizeof($arrBuff ) > 0 ) {
$_text .= " <Temperature>\n";
foreach( $arrBuff as $arrValue ) {
$_text .= " <Item>\n";
$_text .= " <Label>" . htmlspecialchars( $arrValue['label'], ENT_QUOTES ) . "</Label>\n";
$_text .= " <Value>" . htmlspecialchars( $arrValue['value'], ENT_QUOTES ) . "</Value>\n";
$_text .= " <Limit>" . htmlspecialchars( $arrValue['limit'], ENT_QUOTES ) . "</Limit>\n";
$_text .= " </Item>\n";
}
$_text .= " </Temperature>\n";
}
$arrBuff = $mbinfo->fans();
if( sizeof( $arrBuff ) > 0 ) {
$_text .= " <Fans>\n";
foreach( $arrBuff as $arrValue ) {
$_text .= " <Item>\n";
$_text .= " <Label>" . htmlspecialchars( $arrValue['label'], ENT_QUOTES ) . "</Label>\n";
$_text .= " <Value>" . htmlspecialchars( $arrValue['value'], ENT_QUOTES ) . "</Value>\n";
$_text .= " <Min>" . htmlspecialchars( $arrValue['min'], ENT_QUOTES ) . "</Min>\n";
$_text .= " </Item>\n";
}
$_text .= " </Fans>\n";
}
$arrBuff = $mbinfo->voltage();
if( sizeof( $arrBuff ) > 0 ) {
$_text .= " <Voltage>\n";
foreach( $arrBuff as $arrValue ) {
$_text .= " <Item>\n";
$_text .= " <Label>" . htmlspecialchars( $arrValue['label'], ENT_QUOTES ) . "</Label>\n";
$_text .= " <Value>" . htmlspecialchars( $arrValue['value'], ENT_QUOTES ) . "</Value>\n";
$_text .= " <Min>" . htmlspecialchars( $arrValue['min'], ENT_QUOTES ) . "</Min>\n";
$_text .= " <Max>" . htmlspecialchars( $arrValue['max'], ENT_QUOTES ) . "</Max>\n";
$_text .= " </Item>\n";
}
$_text .= " </Voltage>\n";
}
$_text .= " </MBinfo>\n";
return $_text;
}
 
function html_mbtemp() {
global $text;
global $XPath;
$textdir = direction();
$scale_factor = 2;
$_text = " <tr>\n"
. " <td><font size=\"-1\"><b>" . $text['s_label'] . "</b></font></td>\n"
. " <td><font size=\"-1\"><b>" . $text['s_value'] . "</b></font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['s_limit'] . "</b></font></td>\n"
. " </tr>\n";
for( $i = 1, $max = sizeof( $XPath->getDataParts( "/phpsysinfo/MBinfo/Temperature" ) ); $i < $max; $i++ ) {
$_text .= " <tr>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/MBinfo/Temperature/Item[" . $i . "]/Label" ) . "</font></td>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">";
if( $XPath->getData( "/phpsysinfo/MBinfo/Temperature/Item[" . $i . "]/Value" ) == 0) {
$_text .= "Unknown - Not connected?";
} else {
$_text .= create_bargraph( $XPath->getData( "/phpsysinfo/MBinfo/Temperature/Item[" . $i . "]/Value" ), $XPath->getData( "/phpsysinfo/MBinfo/Temperature/Item[" . $i . "]/Limit" ), $scale_factor );
}
$_text .= temperature( $XPath->getData( "/phpsysinfo/MBinfo/Temperature/Item[" . $i . "]/Value" ) ) . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . temperature( $XPath->getData( "/phpsysinfo/MBinfo/Temperature/Item[" . $i . "]/Limit" ) ) . "</font></td>\n"
. " </tr>\n";
}
return $_text;
}
 
function html_mbfans() {
global $text;
global $XPath;
$textdir = direction();
$booShowfans = false;
$_text ="<table width=\"100%\">\n";
$_text .= " <tr>\n"
. " <td><font size=\"-1\"><b>" . $text['s_label'] . "</b></font></td>\n"
. " <td align=\"" . $textdir['right'] . "\"><font size=\"-1\"><b>" . $text['s_value'] . "</b></font></td>\n"
. " <td align=\"" . $textdir['right'] . "\"><font size=\"-1\"><b>" . $text['s_min'] . "</b></font></td>\n"
. " </tr>\n";
for( $i = 1, $max = sizeof( $XPath->getDataParts( "/phpsysinfo/MBinfo/Fans" ) ); $i < $max; $i++ ) {
$_text .= " <tr>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/MBinfo/Fans/Item[" . $i . "]/Label" ) . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . round( $XPath->getData( "/phpsysinfo/MBinfo/Fans/Item[" . $i . "]/Value" ) ) . " " . $text['rpm_mark'] . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/MBinfo/Fans/Item[" . $i . "]/Min" ) . " " . $text['rpm_mark'] . "</font></td>\n"
. " </tr>\n";
if( round( $XPath->getData( "/phpsysinfo/MBinfo/Fans/Item[" . $i . "]/Value" ) ) > 0 ) {
$booShowfans = true;
}
}
$_text .= "</table>\n";
if( ! $booShowfans ) {
$_text = "";
}
return $_text;
}
 
function html_mbvoltage() {
global $text;
global $XPath;
$textdir = direction();
$_text = "<table width=\"100%\">\n";
$_text .= " <tr>\n"
. " <td><font size=\"-1\"><b>" . $text['s_label'] . "</b></font></td>\n"
. " <td align=\"" . $textdir['right'] . "\"><font size=\"-1\"><b>" . $text['s_value'] . "</b></font></td>\n"
. " <td align=\"" . $textdir['right'] . "\"><font size=\"-1\"><b>" . $text['s_min'] . "</b></font></td>\n"
. " <td align=\"" . $textdir['right'] . "\"><font size=\"-1\"><b>" . $text['s_max'] . "</b></font></td>\n"
. " </tr>\n";
for( $i = 1, $max = sizeof( $XPath->getDataParts( "/phpsysinfo/MBinfo/Voltage" ) ); $i < $max; $i++ ) {
$_text .= " <tr>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/MBinfo/Voltage/Item[" . $i . "]/Label" ) . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/MBinfo/Voltage/Item[" . $i . "]/Value" ) . " " . $text['voltage_mark'] . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/MBinfo/Voltage/Item[" . $i . "]/Min" ) . " " . $text['voltage_mark'] . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/MBinfo/Voltage/Item[" . $i . "]/Max" ) . " " . $text['voltage_mark'] . "</font></td>\n"
. " </tr>\n";
}
$_text .= "</table>\n";
return $_text;
}
 
function wml_mbtemp() {
global $XPath;
$_text = "";
for( $i = 1, $max = sizeof( $XPath->getDataParts( "/phpsysinfo/MBinfo/Temperature" ) ); $i < $max; $i++ ) {
$_text .= "<p>" . $XPath->getData( "/phpsysinfo/MBinfo/Temperature/Item[" . $i . "]/Label" ) . ": ";
if( $XPath->getData( "/phpsysinfo/MBinfo/Temperature/Item[" . $i . "]/Value" ) == 0 ) {
$_text .= "Unknown - Not connected?</p>";
} else {
$_text .= "&nbsp;" . str_replace( "&deg;", "", temperature( $XPath->getData( "/phpsysinfo/MBinfo/Temperature/Item[" . $i . "]/Value" ) ) ) . "</p>\n";
}
}
return $_text;
}
 
function wml_mbfans() {
global $text;
global $XPath;
$_text = "<card id=\"fans\" title=\"" . $text['fans'] . "\">\n";
for( $i = 1, $max = sizeof( $XPath->getDataParts( "/phpsysinfo/MBinfo/Fans" ) ); $i < $max; $i++ ) {
$_text .= "<p>" . $XPath->getData( "/phpsysinfo/MBinfo/Fans/Item[" . $i . "]/Label" ) . ": " . round( $XPath->getData( "/phpsysinfo/MBinfo/Temperature/Item[" . $i . "]/Value" ) ) . "&nbsp;" . $text['rpm_mark'] . "</p>\n";
}
$_text .= "</card>\n";
return $_text;
}
 
function wml_mbvoltage() {
global $text;
global $XPath;
$_text = "<card id=\"volt\" title=\"" . $text['voltage'] . "\">\n";
for( $i = 1, $max = sizeof( $XPath->getDataParts( "/phpsysinfo/MBinfo/Voltage" ) ); $i < $max; $i++ ) {
$_text .= "<p>" . $XPath->getData( "/phpsysinfo/MBinfo/Voltage/Item[" . $i . "]/Label" ) . ": " . $XPath->getData( "/phpsysinfo/MBinfo/Voltage/Item[" . $i . "]/Value" ) . "&nbsp;" . $text['voltage_mark'] . "</p>\n";
}
$_text .= "</card>\n";
return $_text;
}
?>
/gestion/phpsysinfo/includes/xml/hardware.php
0,0 → 1,224
<?php
/***************************************************************************
* Copyright (C) 2006 by phpSysInfo - A PHP System Information Script *
* http://phpsysinfo.sourceforge.net/ *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
// $Id: hardware.php,v 1.36 2007/01/21 11:13:51 bigmichi1 Exp $
 
function xml_hardware() {
global $sysinfo;
global $text;
$strPcidevices = ""; $strIdedevices = ""; $strUsbdevices = ""; $strScsidevices = "";
$arrSys = $sysinfo->cpu_info();
$arrBuf = finddups( $sysinfo->pci() );
if( count( $arrBuf ) ) {
for( $i = 0, $max = sizeof($arrBuf); $i < $max; $i++ ) {
if( $arrBuf[$i] ) {
$strPcidevices .= " <Device><Name>" . htmlspecialchars( chop( $arrBuf[$i] ), ENT_QUOTES ) . "</Name></Device>\n";
}
}
}
$arrBuf = $sysinfo->ide();
if( count( $arrBuf ) ) {
foreach( $arrBuf as $strKey => $arrValue ) {
$strIdedevices .= " <Device>\n<Name>" . htmlspecialchars( $strKey . ': ' . $arrValue['model'], ENT_QUOTES ) . "</Name>\n";
if( isset( $arrValue['capacity'] ) ) {
$strIdedevices .= '<Capacity>' . htmlspecialchars( $arrValue['capacity'], ENT_QUOTES ) . '</Capacity>';
}
$strIdedevices .= "</Device>\n";
}
}
$arrBuf = $sysinfo->scsi();
if( count( $arrBuf ) ) {
foreach( $arrBuf as $strKey => $arrValue ) {
$strScsidevices .= "<Device>\n";
if( $strKey >= '0' && $strKey <= '9' ) {
$strScsidevices .= " <Name>" . htmlspecialchars( $arrValue['model'], ENT_QUOTES ) . "</Name>\n";
} else {
$strScsidevices .= " <Name>" . htmlspecialchars( $strKey . ': ' . $arrValue['model'], ENT_QUOTES ) . "</Name>\n";
}
if( isset( $arrrValue['capacity'])) {
$strScsidevices .= '<Capacity>' . htmlspecialchars( $arrValue['capacity'], ENT_QUOTES ) . '</Capacity>';
}
$strScsidevices .= "</Device>\n";
}
}
$arrBuf = finddups( $sysinfo->usb() );
if( count( $arrBuf ) ) {
for( $i = 0, $max = sizeof( $arrBuf ); $i < $max; $i++ ) {
if( $arrBuf[$i] ) {
$strUsbdevices .= " <Device><Name>" . htmlspecialchars( chop( $arrBuf[$i] ), ENT_QUOTES ) . "</Name></Device>\n";
}
}
}
$_text = " <Hardware>\n";
$_text .= " <CPU>\n";
if( isset( $arrSys['cpus'] ) ) {
$_text .= " <Number>" . htmlspecialchars( $arrSys['cpus'], ENT_QUOTES ) . "</Number>\n";
}
if( isset( $arrSys['model'] ) ) {
$_text .= " <Model>" . htmlspecialchars( $arrSys['model'], ENT_QUOTES ) . "</Model>\n";
}
if( isset( $arrSys['temp'] ) ) {
$_text .= " <Cputemp>" . htmlspecialchars( $arrSys['temp'], ENT_QUOTES ) . "</Cputemp>\n";
}
if( isset( $arrSys['cpuspeed'] ) ) {
$_text .= " <Cpuspeed>" . htmlspecialchars( $arrSys['cpuspeed'], ENT_QUOTES ) . "</Cpuspeed>\n";
}
if( isset( $arrSys['busspeed'] ) ) {
$_text .= " <Busspeed>" . htmlspecialchars( $arrSys['busspeed'], ENT_QUOTES ) . "</Busspeed>\n";
}
if( isset( $arrSys['cache'] ) ) {
$_text .= " <Cache>" . htmlspecialchars( $arrSys['cache'], ENT_QUOTES ) . "</Cache>\n";
}
if( isset( $arrSys['bogomips'] ) ) {
$_text .= " <Bogomips>" . htmlspecialchars( $arrSys['bogomips'], ENT_QUOTES ) . "</Bogomips>\n";
}
$_text .= " </CPU>\n";
$_text .= " <PCI>\n";
if( $strPcidevices) {
$_text .= $strPcidevices;
}
$_text .= " </PCI>\n";
$_text .= " <IDE>\n";
if( $strIdedevices) {
$_text .= $strIdedevices;
}
$_text .= " </IDE>\n";
$_text .= " <SCSI>\n";
if( $strScsidevices) {
$_text .= $strScsidevices;
}
$_text .= " </SCSI>\n";
$_text .= " <USB>\n";
if($strUsbdevices) {
$_text .= $strUsbdevices;
}
$_text .= " </USB>\n";
$_text .= " </Hardware>\n";
 
return $_text;
}
 
function html_hardware () {
global $XPath;
global $text;
$strPcidevices = ""; $strIdedevices = ""; $strUsbdevices = ""; $strScsidevices = "";
$textdir = direction();
for( $i = 1, $max = sizeof( $XPath->getDataParts( "/phpsysinfo/Hardware/PCI" ) ); $i < $max; $i++ ) {
if( $XPath->match( "/phpsysinfo/Hardware/PCI/Device[" . $i . "]/Name" ) ) {
$strPcidevices .= "<tr><td valign=\"top\"><font size=\"-1\">-</font></td><td><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/Hardware/PCI/Device[" . $i . "]/Name" ) . "</font></td></tr>";
}
}
for( $i = 1, $max = sizeof( $XPath->getDataParts( "/phpsysinfo/Hardware/IDE" ) ); $i < $max; $i++ ) {
if( $XPath->match( "/phpsysinfo/Hardware/IDE/Device[" . $i . "]" ) ) {
$strIdedevices .= "<tr><td valign=\"top\"><font size=\"-1\">-</font></td><td><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/Hardware/IDE/Device[" . $i . "]/Name" );
if( $XPath->match( "/phpsysinfo/Hardware/IDE/Device[" . $i . "]/Capacity" ) ) {
$strIdedevices .= " (" . $text['capacity'] . ": " . format_bytesize( $XPath->getData( "/phpsysinfo/Hardware/IDE/Device[" . $i . "]/Capacity" ) / 2 ) . ")";
}
$strIdedevices .= "</font></td></tr>";
}
}
for( $i = 1, $max = sizeof( $XPath->getDataParts( "/phpsysinfo/Hardware/SCSI" ) ); $i < $max; $i++ ) {
if( $XPath->match( "/phpsysinfo/Hardware/SCSI/Device[" . $i . "]" ) ) {
$strScsidevices .= "<tr><td valign=\"top\"><font size=\"-1\">-</font></td><td><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/Hardware/SCSI/Device[" . $i . "]/Name" );
if( $XPath->match( "/phpsysinfo/Hardware/SCSI/Device[" . $i . "]/Capacity" ) ) {
$strScsidevices .= " (" . $text['capacity'] . ": " . format_bytesize( $XPath->getData( "/phpsysinfo/Hardware/SCSI/Device[" . $i . "]/Capacity" ) / 2 ) . ")";
}
$strScsidevices .= "</font></td></tr>";
}
}
for( $i = 1, $max = sizeof( $XPath->getDataParts( "/phpsysinfo/Hardware/USB" ) ); $i < $max; $i++ ) {
if( $XPath->match( "/phpsysinfo/Hardware/USB/Device[" . $i . "]/Name" )) {
$strUsbdevices .= "<tr><td valign=\"top\"><font size=\"-1\">-</font></td><td><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/Hardware/USB/Device[" . $i . "]/Name" ) . "</font></td></tr>";
}
}
$_text = "<table border=\"0\" width=\"100%\" align=\"center\">\n";
if( $XPath->match( "/phpsysinfo/Hardware/CPU/Number" ) ) {
$_text .= " <tr>\n <td valign=\"top\"><font size=\"-1\">" . $text['numcpu'] . "</font></td>\n <td><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/Hardware/CPU/Number" ) . "</font></td>\n </tr>\n";
}
if( $XPath->match( "/phpsysinfo/Hardware/CPU/Model" ) ) {
$_text .= " <tr>\n <td valign=\"top\"><font size=\"-1\">" . $text['cpumodel'] . "</font></td>\n <td><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/Hardware/CPU/Model" );
if( $XPath->match( "/phpsysinfo/Hardware/CPU/Cputemp" ) ) {
$_text .= "&nbsp;@&nbsp;" . temperature( $XPath->getData( "/phpsysinfo/Hardware/CPU/Cputemp" ) );
}
$_text .= "</font></td>\n </tr>\n";
}
if( $XPath->match( "/phpsysinfo/Hardware/CPU/Cpuspeed" ) ) {
$_text .= " <tr>\n <td valign=\"top\"><font size=\"-1\">" . $text['cpuspeed'] . "</font></td>\n <td><font size=\"-1\">" . format_speed( $XPath->getData( "/phpsysinfo/Hardware/CPU/Cpuspeed" ) ) . "</font></td>\n </tr>\n";
}
if( $XPath->match( "/phpsysinfo/Hardware/CPU/Busspeed" ) ) {
$_text .= " <tr>\n <td valign=\"top\"><font size=\"-1\">" . $text['busspeed'] . "</font></td>\n <td><font size=\"-1\">" . format_speed( $XPath->getData( "/phpsysinfo/Hardware/CPU/Busspeed" ) ) . "</font></td>\n </tr>\n";
}
if( $XPath->match("/phpsysinfo/Hardware/CPU/Cache" ) ) {
$_text .= " <tr>\n <td valign=\"top\"><font size=\"-1\">" . $text['cache'] . "</font></td>\n <td><font size=\"-1\">" . format_bytesize( $XPath->getData( "/phpsysinfo/Hardware/CPU/Cache" ) ) . "</font></td>\n </tr>\n";
}
if( $XPath->match( "/phpsysinfo/Hardware/CPU/Bogomips" ) ) {
$_text .= " <tr>\n <td valign=\"top\"><font size=\"-1\">" . $text['bogomips'] . "</font></td>\n <td><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/Hardware/CPU/Bogomips" ) . "</font></td>\n </tr>\n";
}
$_text .= " <tr>\n <td valign=\"top\"><font size=\"-1\">" . $text['pci'] . "</font></td>\n <td>";
if( $strPcidevices) {
$_text .= "<table>" . $strPcidevices . "</table>";
} else {
$_text .= "<font size=\"-1\"><i>" . $text['none'] . "</i></font>";
}
$_text .= "</td>\n </tr>\n";
$_text .= " <tr>\n <td valign=\"top\"><font size=\"-1\">" . $text['ide'] . "</font></td>\n <td>";
if( $strIdedevices ) {
$_text .= "<table>" . $strIdedevices . "</table>";
} else {
$_text .= "<font size=\"-1\"><i>" . $text['none'] . "</i></font>";
}
$_text .= "</td>\n </tr>\n";
$_text .= " <tr>\n <td valign=\"top\"><font size=\"-1\">" . $text['scsi'] . "</font></td>\n <td>";
if( $strScsidevices ) {
$_text .= "<table>" . $strScsidevices . "</table></td>\n </tr>";
} else {
$_text .= "<font size=\"-1\"><i>" . $text['none'] . "</i></font>";
}
$_text .= " <tr>\n <td valign=\"top\"><font size=\"-1\">" . $text['usb'] . "</font></td>\n <td>";
if( $strUsbdevices) {
$_text .= "<table>" . $strUsbdevices . "</table></td>\n </tr>";
} else {
$_text .= "<font size=\"-1\"><i>" . $text['none'] . "</i></font>";
}
$_text .= "</table>";
return $_text;
}
?>
/gestion/phpsysinfo/includes/xml/vitals.php
0,0 → 1,124
<?php
/***************************************************************************
* Copyright (C) 2006 by phpSysInfo - A PHP System Information Script *
* http://phpsysinfo.sourceforge.net/ *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
// $Id: vitals.php,v 1.32 2007/02/18 18:59:54 bigmichi1 Exp $
 
// xml_vitals()
 
function xml_vitals () {
global $sysinfo;
global $loadbar;
global $show_vhostname;
$strLoadavg = "";
$arrBuf = ( $loadbar ? $sysinfo->loadavg( $loadbar ) : $sysinfo->loadavg() );
foreach( $arrBuf['avg'] as $strValue) {
$strLoadavg .= $strValue . ' ';
}
$_text = " <Vitals>\n"
. " <Hostname>" . htmlspecialchars( $show_vhostname ? $sysinfo->vhostname() : $sysinfo->chostname(), ENT_QUOTES ) . "</Hostname>\n"
. " <IPAddr>" . htmlspecialchars( $show_vhostname ? $sysinfo->vip_addr() : $sysinfo->ip_addr(), ENT_QUOTES ) . "</IPAddr>\n"
. " <Kernel>" . htmlspecialchars( $sysinfo->kernel(), ENT_QUOTES ) . "</Kernel>\n"
. " <Distro>" . htmlspecialchars( $sysinfo->distro(), ENT_QUOTES ) . "</Distro>\n"
. " <Distroicon>" . htmlspecialchars( $sysinfo->distroicon(), ENT_QUOTES ) . "</Distroicon>\n"
. " <Uptime>" . htmlspecialchars( $sysinfo->uptime(), ENT_QUOTES ) . "</Uptime>\n"
. " <Users>" . htmlspecialchars( $sysinfo->users(), ENT_QUOTES ) . "</Users>\n"
. " <LoadAvg>" . htmlspecialchars( trim( $strLoadavg ), ENT_QUOTES ) . "</LoadAvg>\n";
if( isset( $arrBuf['cpupercent'] ) ) {
$_text .= " <CPULoad>" . htmlspecialchars( round( $arrBuf['cpupercent'], 2 ), ENT_QUOTES ) . "</CPULoad>";
}
$_text .= " </Vitals>\n";
return $_text;
}
 
// html_vitals()
function html_vitals () {
global $webpath;
global $XPath;
global $text;
$textdir = direction();
$scale_factor = 2;
$strLoadbar = "";
$uptime = "";
if( $XPath->match( "/phpsysinfo/Vitals/CPULoad" ) )
$strLoadbar = "<br>" . create_bargraph( $XPath->getData( "/phpsysinfo/Vitals/CPULoad" ), 100, $scale_factor ) . "&nbsp;" . $XPath->getData( "/phpsysinfo/Vitals/CPULoad" ) . "%";
$_text = "<table border=\"0\" width=\"100%\" align=\"center\">\n"
. " <tr>\n"
. " <td valign=\"top\"><font size=\"-1\">" . $text['hostname'] . "</font></td>\n"
. " <td><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/Vitals/Hostname" ) . "</font></td>\n"
. " </tr>\n"
. " <tr>\n"
. " <td valign=\"top\"><font size=\"-1\">" . $text['ip'] . "</font></td>\n"
. " <td><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/Vitals/IPAddr" ) . "</font></td>\n"
. " </tr>\n"
. " <tr>\n"
. " <td valign=\"top\"><font size=\"-1\">" . $text['kversion'] . "</font></td>\n"
. " <td><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/Vitals/Kernel" ) . "</font></td>\n"
. " </tr>\n"
. " <tr>\n"
. " <td valign=\"top\"><font size=\"-1\">" . $text['dversion'] . "</font></td>\n"
. " <td><img width=\"16\" height=\"16\" alt=\"\" src=\"" . $webpath . "images/" . $XPath->getData( "/phpsysinfo/Vitals/Distroicon" ) . "\">&nbsp;<font size=\"-1\">" . $XPath->getData("/phpsysinfo/Vitals/Distro") . "</font></td>\n"
. " </tr>\n"
. " <tr>\n"
. " <td valign=\"top\"><font size=\"-1\">" . $text['uptime'] . "</font></td>\n"
. " <td><font size=\"-1\">" . uptime( $XPath->getData( "/phpsysinfo/Vitals/Uptime" ) ) . "</font></td>\n"
. " </tr>\n"
. " <tr>\n"
. " <td valign=\"top\"><font size=\"-1\">" . $text['users'] . "</font></td>\n"
. " <td><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/Vitals/Users" ) . "</font></td>\n"
. " </tr>\n"
. " <tr>\n"
. " <td valign=\"top\"><font size=\"-1\">" . $text['loadavg'] . "</font></td>\n"
. " <td><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/Vitals/LoadAvg" ) . $strLoadbar . "</font></td>\n"
. " </tr>\n"
. "</table>\n";
return $_text;
}
 
function wml_vitals () {
global $XPath;
global $text;
$_text = "<card id=\"vitals\" title=\"" . $text['vitals'] . "\">\n"
. "<p>" . $text['hostname'] . ":<br/>\n"
. "-&nbsp;" . $XPath->getData( "/phpsysinfo/Vitals/Hostname" ) . "</p>\n"
. "<p>" . $text['ip'] . ":<br/>\n"
. "-&nbsp;" . $XPath->getData( "/phpsysinfo/Vitals/IPAddr" ) . "</p>\n"
. "<p>" . $text['kversion'] . ":<br/>\n"
. "-&nbsp;" . $XPath->getData( "/phpsysinfo/Vitals/Kernel" ) . "</p>\n"
. "<p>" . $text['uptime'] . ":<br/>\n"
. "-&nbsp;" . uptime( $XPath->getData( "/phpsysinfo/Vitals/Uptime" ) ) . "</p>\n"
. "<p>" . $text['users'] . ":<br/>"
. "-&nbsp;" . $XPath->getData( "/phpsysinfo/Vitals/Users" ) . "</p>\n"
. "<p>" . $text['loadavg'] . ":<br/>"
. "-&nbsp;" . $XPath->getData( "/phpsysinfo/Vitals/LoadAvg" ) . "</p>\n"
. "</card>\n";
return $_text;
}
?>
/gestion/phpsysinfo/includes/xml/index.html
--- gestion/phpsysinfo/includes/xml/hddtemp.php (nonexistent)
+++ gestion/phpsysinfo/includes/xml/hddtemp.php (revision 40)
@@ -0,0 +1,90 @@
+<?php
+/***************************************************************************
+ * Copyright (C) 2006 by phpSysInfo - A PHP System Information Script *
+ * http://phpsysinfo.sourceforge.net/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
+// $Id: hddtemp.php,v 1.13 2007/02/08 20:16:25 bigmichi1 Exp $
+
+function xml_hddtemp() {
+ global $hddtemp_avail, $hddtemp;
+ $arrBuf = $hddtemp->temperature( $hddtemp_avail );
+
+ $_text = " <HDDTemp>\n";
+ for( $i = 0, $max = sizeof( $arrBuf ); $i < $max; $i++ ) {
+ $_text .= " <Item>\n";
+ $_text .= " <Label>" . htmlspecialchars( $arrBuf[$i]['label'], ENT_QUOTES ) . "</Label>\n";
+ $_text .= " <Value>" . htmlspecialchars( $arrBuf[$i]['value'], ENT_QUOTES ) . "</Value>\n";
+ $_text .= " <Model>" . htmlspecialchars( $arrBuf[$i]['model'], ENT_QUOTES ) . "</Model>\n";
+ $_text .= " </Item>\n";
+ }
+ $_text .= " </HDDTemp>\n";
+
+ return $_text;
+}
+
+function html_hddtemp() {
+ global $XPath;
+ global $text;
+ global $sensor_program;
+
+ $textdir = direction();
+ $scale_factor = 2;
+ $_text = "";
+ $maxvalue = "+60";
+
+ if( $XPath->match( "/phpsysinfo/HDDTemp" ) ) {
+ for( $i = 1, $max = sizeof( $XPath->getDataParts( "/phpsysinfo/HDDTemp" ) ); $i < $max; $i++ ) {
+ if( $XPath->getData( "/phpsysinfo/HDDTemp/Item[" . $i . "]/Value" ) != 0 ) {
+ $_text .= " <tr>\n";
+ $_text .= " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">". $XPath->getData( "/phpsysinfo/HDDTemp/Item[" . $i . "]/Model" ) . "</font></td>\n";
+ $_text .= " <td align=\"" . $textdir['left'] . "\" valign=\"top\" nowrap><font size=\"-1\">";
+ $_text .= create_bargraph( $XPath->getData( "/phpsysinfo/HDDTemp/Item[" . $i . "]/Value" ), $maxvalue, $scale_factor );
+ $_text .= temperature( $XPath->getData( "/phpsysinfo/HDDTemp/Item[" . $i . "]/Value" ) ) . "</font></td>\n";
+ $_text .= " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . temperature( $maxvalue ) . "</font></td></tr>\n";
+ }
+ }
+ }
+ if( strlen( $_text ) > 0 && empty( $sensor_program ) ) {
+ $_text = " <tr>\n"
+ . " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['s_label'] . "</b></font></td>\n"
+ . " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['s_value'] . "</b></font></td>\n"
+ . " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['s_limit'] . "</b></font></td>\n"
+ . " </tr>" . $_text;
+ }
+
+ return $_text;
+}
+
+function wml_hddtemp() {
+ global $XPath;
+ global $text;
+
+ $_text = "";
+
+ if( $XPath->match( "/phpsysinfo/HDDTemp" ) ) {
+ for( $i = 1; $i < sizeof( $XPath->getDataParts( "/phpsysinfo/HDDTemp" ) ); $i++ ) {
+ if( $XPath->getData( "/phpsysinfo/HDDTemp/Item[" . $i . "]/Value") != 0 ) {
+ $_text .= "<p>" . $XPath->getData( "/phpsysinfo/HDDTemp/Item[" . $i . "]/Model" ) . ": " . str_replace( "&deg;", "", temperature( $XPath->getData( "/phpsysinfo/HDDTemp/Item[" . $i . "]/Value" ) ) ) . "</p>\n";
+ }
+ }
+ }
+
+ return $_text;
+}
+?>
/gestion/phpsysinfo/includes/xml/filesystems.php
0,0 → 1,164
<?php
/***************************************************************************
* Copyright (C) 2006 by phpSysInfo - A PHP System Information Script *
* http://phpsysinfo.sourceforge.net/ *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
// $Id: filesystems.php,v 1.31 2007/02/08 20:16:25 bigmichi1 Exp $
 
//
// xml_filesystems()
//
function xml_filesystems () {
global $sysinfo;
global $show_mount_point;
$arrFs = $sysinfo->filesystems();
$_text = " <FileSystem>\n";
for ( $i = 0, $max = sizeof( $arrFs ); $i < $max; $i++ ) {
$_text .= " <Mount>\n";
$_text .= " <MountPointID>" . htmlspecialchars( $i, ENT_QUOTES ) . "</MountPointID>\n";
if( $show_mount_point ) {
$_text .= " <MountPoint>" . htmlspecialchars( $arrFs[$i]['mount'], ENT_QUOTES ) . "</MountPoint>\n";
}
$_text .= " <Type>" . htmlspecialchars( $arrFs[$i]['fstype'], ENT_QUOTES ) . "</Type>\n"
. " <Device><Name>" . htmlspecialchars( $arrFs[$i]['disk'], ENT_QUOTES ) . "</Name></Device>\n"
. " <Percent>" . htmlspecialchars( $arrFs[$i]['percent'], ENT_QUOTES ) . "</Percent>\n"
. " <Free>" . htmlspecialchars( $arrFs[$i]['free'], ENT_QUOTES ) . "</Free>\n"
. " <Used>" . htmlspecialchars( $arrFs[$i]['used'], ENT_QUOTES ) . "</Used>\n"
. " <Size>" . htmlspecialchars( $arrFs[$i]['size'], ENT_QUOTES ) . "</Size>\n";
if( isset( $arrFs[$i]['options'] ) ) {
$_text .= " <Options>" . htmlspecialchars( $arrFs[$i]['options'], ENT_QUOTES ) . "</Options>\n";
}
if( isset( $arrFs[$i]['inodes'] ) ) {
$_text .= " <Inodes>" . htmlspecialchars( $arrFs[$i]['inodes'], ENT_QUOTES ) . "</Inodes>\n";
}
$_text .= " </Mount>\n";
}
$_text .= " </FileSystem>\n";
return $_text;
}
 
//
// html_filesystems()
//
function html_filesystems () {
global $XPath;
global $text;
global $show_mount_point;
$textdir = direction();
$arrSum = array("size" => 0, "used" => 0, "free" => 0);
$arrCounteddevlist = array();
$intScalefactor = 2;
$_text = "<table border=\"0\" width=\"100%\" align=\"center\">\n";
$_text .= " <tr>\n";
if ($show_mount_point) {
$_text .= " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['mount'] . "</b></font></td>\n";
}
$_text .= " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['type'] . "</b></font></td>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['partition'] . "</b></font></td>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['percent'] . "</b></font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['free'] . "</b></font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['used'] . "</b></font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['size'] . "</b></font></td>\n </tr>\n";
for( $i = 1, $max = sizeof( $XPath->getDataParts( "/phpsysinfo/FileSystem" ) ); $i < $max; $i++ ) {
if( $XPath->match( "/phpsysinfo/FileSystem/Mount[" . $i . "]/MountPointID" ) ) {
if( ! $XPath->match( "/phpsysinfo/FileSystem/Mount[" . $i . "]/Options" ) || ! stristr( $XPath->getData( "/phpsysinfo/FileSystem/Mount[" . $i . "]/Options" ), "bind" ) ) {
if( ! in_array( $XPath->getData( "/phpsysinfo/FileSystem/Mount[" . $i . "]/Device/Name" ), $arrCounteddevlist ) ) {
$arrSum['size'] += $XPath->getData( "/phpsysinfo/FileSystem/Mount[" . $i . "]/Size" );
$arrSum['used'] += $XPath->getData( "/phpsysinfo/FileSystem/Mount[" . $i . "]/Used" );
$arrSum['free'] += $XPath->getData( "/phpsysinfo/FileSystem/Mount[" . $i . "]/Free" );
if( PHP_OS != "WINNT" ) {
$arrCounteddevlist[] = $XPath->getData( "/phpsysinfo/FileSystem/Mount[" . $i . "]/Device/Name" );
}
}
}
$_text .= " <tr>\n";
if( $show_mount_point ) {
$_text .= " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/FileSystem/Mount[" . $i . "]/MountPoint" ) . "</font></td>\n";
}
$_text .= " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/FileSystem/Mount[" . $i . "]/Type" ) . "</font></td>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/FileSystem/Mount[" . $i . "]/Device/Name" ) . "</font></td>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">"
. create_bargraph( $XPath->getData( "/phpsysinfo/FileSystem/Mount[" . $i . "]/Used" ), $XPath->getData( "/phpsysinfo/FileSystem/Mount[" . $i . "]/Size" ), $intScalefactor, $XPath->getData( "/phpsysinfo/FileSystem/Mount[" . $i . "]/Type" ) )
. "&nbsp;" . $XPath->getData( "/phpsysinfo/FileSystem/Mount[" . $i . "]/Percent" ) . "%";
if( $XPath->match( "/phpsysinfo/FileSystem/Mount[" . $i . "]/Inodes" ) ) {
$_text .= " (" . $XPath->getData( "/phpsysinfo/FileSystem/Mount[" . $i . "]/Inodes" ) . "%)";
}
$_text .= "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . format_bytesize( $XPath->getData( "/phpsysinfo/FileSystem/Mount[" . $i . "]/Free" ) ) . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . format_bytesize( $XPath->getData( "/phpsysinfo/FileSystem/Mount[" . $i . "]/Used" ) ) . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . format_bytesize( $XPath->getData( "/phpsysinfo/FileSystem/Mount[" . $i . "]/Size" ) ) . "</font></td>\n"
. " </tr>\n";
}
}
$_text .= " <tr>\n";
if( $show_mount_point ) {
$_text .= " <td colspan=\"3\" align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\"><i>" . $text['totals'] . " :&nbsp;&nbsp;</i></font></td>\n";
} else {
$_text .= " <td colspan=\"2\" align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\"><i>" . $text['totals'] . " :&nbsp;&nbsp;</i></font></td>\n";
}
$_text .= " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">"
. create_bargraph( $arrSum['used'], $arrSum['size'], $intScalefactor )
. "&nbsp;";
if( $arrSum['size'] == 0 ) {
$_text .= "0";
} else {
$_text .= round( 100 / $arrSum['size'] * $arrSum['used'] );
}
$_text .= "%" . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . format_bytesize( $arrSum['free'] ) . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . format_bytesize( $arrSum['used'] ) . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . format_bytesize( $arrSum['size'] ) . "</font></td>\n </tr>\n"
. "</table>\n";
return $_text;
}
 
function wml_filesystem() {
global $XPath;
global $text;
global $show_mount_point;
$_text = "<card id=\"filesystem\" title=\"" . $text['fs'] . "\">\n";
for( $i = 1; $i < sizeof( $XPath->getDataParts( "/phpsysinfo/FileSystem" ) ); $i++ ) {
if( $XPath->match( "/phpsysinfo/FileSystem/Mount[" . $i . "]/MountPointID" ) ) {
$_text .= "<p>";
if( $show_mount_point ) {
$_text .= $XPath->getData( "/phpsysinfo/FileSystem/Mount[" . $i . "]/MountPoint" ) . "<br/>\n";
} else {
$_text .= $XPath->getData( "/phpsysinfo/FileSystem/Mount[" . $i . "]/Device/Name" ) . "<br/>\n";
}
$_text .= "- " . $text['free'] . ": " . format_bytesize( $XPath->getData("/phpsysinfo/FileSystem/Mount[" . $i . "]/Free" ) ) . "<br/>\n"
. "- " . $text['used'] . ": " . format_bytesize( $XPath->getData("/phpsysinfo/FileSystem/Mount[" . $i . "]/Used" ) ) . "<br/>\n"
. "- " . $text['size'] . ": " . format_bytesize( $XPath->getData("/phpsysinfo/FileSystem/Mount[" . $i . "]/Size" ) ) . "<br/>\n"
. "</p>\n";
}
}
$_text .= "</card>\n";
 
return $_text;
}
?>
/gestion/phpsysinfo/includes/xml/memory.php
0,0 → 1,211
<?php
/***************************************************************************
* Copyright (C) 2006 by phpSysInfo - A PHP System Information Script *
* http://phpsysinfo.sourceforge.net/ *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
// $Id: memory.php,v 1.18 2007/02/08 20:16:25 bigmichi1 Exp $
 
//
// xml_memory()
//
function xml_memory () {
global $sysinfo;
$arrMem = $sysinfo->memory();
$i = 0;
$_text = " <Memory>\n"
. " <Free>" . htmlspecialchars( $arrMem['ram']['free'], ENT_QUOTES ) . "</Free>\n"
. " <Used>" . htmlspecialchars( $arrMem['ram']['used'], ENT_QUOTES ) . "</Used>\n"
. " <Total>" . htmlspecialchars( $arrMem['ram']['total'], ENT_QUOTES ) . "</Total>\n"
. " <Percent>" . htmlspecialchars( $arrMem['ram']['percent'], ENT_QUOTES ) . "</Percent>\n";
if( isset( $arrMem['ram']['app_percent'] ) ) {
$_text .= " <App>" . htmlspecialchars( $arrMem['ram']['app'], ENT_QUOTES ) . "</App>\n <AppPercent>" . htmlspecialchars( $arrMem['ram']['app_percent'], ENT_QUOTES ) . "</AppPercent>\n";
}
if( isset( $arrMem['ram']['buffers_percent'] ) ) {
$_text .= " <Buffers>" . htmlspecialchars( $arrMem['ram']['buffers'], ENT_QUOTES ) . "</Buffers>\n <BuffersPercent>" . htmlspecialchars( $arrMem['ram']['buffers_percent'], ENT_QUOTES ) . "</BuffersPercent>\n";
}
if( isset( $arrMem['ram']['cached_percent'] ) ) {
$_text .= " <Cached>" . htmlspecialchars( $arrMem['ram']['cached'], ENT_QUOTES ) . "</Cached>\n <CachedPercent>" . htmlspecialchars( $arrMem['ram']['cached_percent'], ENT_QUOTES ) . "</CachedPercent>\n";
}
$_text .= " </Memory>\n";
$_text .= " <Swap>\n";
if( isset( $arrMem['swap']['total'] ) && $arrMem['swap']['total'] > 0 ) {
$_text .= " <Free>" . htmlspecialchars( $arrMem['swap']['free'], ENT_QUOTES ) . "</Free>\n"
. " <Used>" . htmlspecialchars( $arrMem['swap']['used'], ENT_QUOTES ) . "</Used>\n"
. " <Total>" . htmlspecialchars( $arrMem['swap']['total'], ENT_QUOTES ) . "</Total>\n"
. " <Percent>" . htmlspecialchars( $arrMem['swap']['percent'], ENT_QUOTES ) . "</Percent>\n";
}
$_text .= " </Swap>\n";
$_text .= " <Swapdevices>\n";
foreach( $arrMem['devswap'] as $arrDevice) {
$_text .=" <Mount>\n"
. " <MountPointID>" . htmlspecialchars( $i++, ENT_QUOTES ) . "</MountPointID>\n"
. " <Type>Swap</Type>"
. " <Device><Name>" . htmlspecialchars( $arrDevice['dev'], ENT_QUOTES ) . "</Name></Device>\n"
. " <Percent>" . htmlspecialchars( $arrDevice['percent'], ENT_QUOTES ) . "</Percent>\n"
. " <Free>" . htmlspecialchars( $arrDevice['free'], ENT_QUOTES ) . "</Free>\n"
. " <Used>" . htmlspecialchars( $arrDevice['used'], ENT_QUOTES ) . "</Used>\n"
. " <Size>" . htmlspecialchars( $arrDevice['total'], ENT_QUOTES ) . "</Size>\n"
. " </Mount>\n";
}
$_text .= " </Swapdevices>\n";
return $_text;
}
 
//
// html_memory()
//
function html_memory () {
global $XPath;
global $text;
$textdir = direction();
$scale_factor = 2;
$strRam = create_bargraph( $XPath->getData( "/phpsysinfo/Memory/Used" ), $XPath->getData( "/phpsysinfo/Memory/Total" ), $scale_factor );
$strRam .= "&nbsp;&nbsp;" . $XPath->getData( "/phpsysinfo/Memory/Percent" ) . "% ";
if( $XPath->match( "/phpsysinfo/Swap/Total" ) ) {
$strSwap = create_bargraph( $XPath->getData( "/phpsysinfo/Swap/Used" ), $XPath->getData( "/phpsysinfo/Swap/Total" ), $scale_factor );
$strSwap .= "&nbsp;&nbsp;" . $XPath->getData( "/phpsysinfo/Swap/Percent" ) . "% ";
}
if( $XPath->match( "/phpsysinfo/Memory/AppPercent" ) ) {
$strApp = create_bargraph( $XPath->getData( "/phpsysinfo/Memory/App" ), $XPath->getData( "/phpsysinfo/Memory/Total" ), $scale_factor );
$strApp .= "&nbsp;&nbsp;" . $XPath->getData( "/phpsysinfo/Memory/AppPercent" ) . "% ";
}
if( $XPath->match( "/phpsysinfo/Memory/BuffersPercent" ) ) {
$strBuffers = create_bargraph( $XPath->getData( "/phpsysinfo/Memory/Buffers" ), $XPath->getData( "/phpsysinfo/Memory/Total" ), $scale_factor);
$strBuffers .= "&nbsp;&nbsp;" . $XPath->getData( "/phpsysinfo/Memory/BuffersPercent" ) . "% ";
}
if( $XPath->match( "/phpsysinfo/Memory/CachedPercent" ) ) {
$strCached = create_bargraph( $XPath->getData( "/phpsysinfo/Memory/Cached" ), $XPath->getData( "/phpsysinfo/Memory/Total" ), $scale_factor);
$strCached .= "&nbsp;&nbsp;" . $XPath->getData( "/phpsysinfo/Memory/CachedPercent" ) . "% ";
}
$_text = "<table border=\"0\" width=\"100%\" align=\"center\">\n"
. " <tr>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['type'] . "</b></font></td>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['percent'] . "</b></font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['free'] . "</b></font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['used'] . "</b></font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['size'] . "</b></font></td>\n"
. " </tr>\n"
. " <tr>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">" . $text['phymem'] . "</font></td>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">" . $strRam . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . format_bytesize( $XPath->getData( "/phpsysinfo/Memory/Free" ) ) . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . format_bytesize( $XPath->getData( "/phpsysinfo/Memory/Used" ) ) . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . format_bytesize( $XPath->getData( "/phpsysinfo/Memory/Total" ) ) . "</font></td>\n"
. " </tr>\n";
if( isset( $strApp ) ) {
$_text .= " <tr>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">- " . $text['app'] . "</font></td>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">" . $strApp . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">&nbsp;</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . format_bytesize( $XPath->getData( "/phpsysinfo/Memory/App" ) ) . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">&nbsp;</font></td>\n"
. " </tr>\n";
}
if( isset( $strBuffers ) ) {
$_text .= " <tr>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">- " . $text['buffers'] . "</font></td>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">" . $strBuffers . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">&nbsp;</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . format_bytesize( $XPath->getData( "/phpsysinfo/Memory/Buffers" ) ) . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">&nbsp;</font></td>\n"
. " </tr>\n";
}
if( isset( $strCached ) ) {
$_text .= " <tr>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">- " . $text['cached'] . "</font></td>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">" . $strCached . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">&nbsp;</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . format_bytesize( $XPath->getData( "/phpsysinfo/Memory/Cached" ) ) . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">&nbsp;</font></td>\n"
. " </tr>\n";
}
if( isset( $strSwap ) ) {
$_text .= " <tr>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">" . $text['swap'] . "</font></td>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">" . $strSwap . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . format_bytesize( $XPath->getData( "/phpsysinfo/Swap/Free" ) ) . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . format_bytesize( $XPath->getData( "/phpsysinfo/Swap/Used" ) ) . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . format_bytesize( $XPath->getData( "/phpsysinfo/Swap/Total" ) ) . "</font></td>\n"
. " </tr>\n";
}
if( ($max = sizeof( $XPath->getDataParts( "/phpsysinfo/Swapdevices" ) ) ) > 2 ) {
for( $i = 1; $i < $max; $i++ ) {
$strSwapdev = create_bargraph( $XPath->getData( "/phpsysinfo/Swapdevices/Mount[" . $i . "]/Used" ), $XPath->getData( "/phpsysinfo/Swapdevices/Mount[" . $i . "]/Size" ), $scale_factor );
$strSwapdev .= "&nbsp;&nbsp;" . $XPath->getData( "/phpsysinfo/Swapdevices/Mount[" . $i . "]/Percent" ) . "% ";
$_text .= " <tr>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\"> - " . $XPath->getData( "/phpsysinfo/Swapdevices/Mount[" . $i . "]/Device/Name" ) . "</font></td>\n"
. " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">" . $strSwapdev . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . format_bytesize( $XPath->getData("/phpsysinfo/Swapdevices/Mount[" . $i . "]/Free" ) ) . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . format_bytesize( $XPath->getData("/phpsysinfo/Swapdevices/Mount[" . $i . "]/Used" ) ) . "</font></td>\n"
. " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . format_bytesize( $XPath->getData("/phpsysinfo/Swapdevices/Mount[" . $i . "]/Size" ) ) . "</font></td>\n"
. " </tr>\n";
}
}
$_text .= "</table>";
return $_text;
}
 
function wml_memory() {
global $XPath;
global $text;
$_text = "<card id=\"memory\" title=\"" . $text['memusage'] . "\">\n"
. "<p>" . $text['phymem'] . ":<br/>\n"
. "- " . $text['free'] . ": " . format_bytesize( $XPath->getData( "/phpsysinfo/Memory/Free" ) ) . "<br/>\n"
. "- " . $text['used'] . ": " . format_bytesize( $XPath->getData( "/phpsysinfo/Memory/Used" ) ) . "<br/>\n"
. "- " . $text['size'] . ": " . format_bytesize( $XPath->getData( "/phpsysinfo/Memory/Total" ) ) . "</p>\n";
if( $XPath->match( "/phpsysinfo/Memory/App" ) ) {
$_text .= "<p>" . $text['app'] . ":<br/>\n"
. "- " . $text['used'] . ": " . format_bytesize( $XPath->getData( "/phpsysinfo/Memory/App" ) ) . "</p>\n";
}
if( $XPath->match( "/phpsysinfo/Memory/Cached" ) ) {
$_text .= "<p>" . $text['cached'] . ":<br/>\n"
. "- " . $text['used'] . ": " . format_bytesize( $XPath->getData( "/phpsysinfo/Memory/Cached" ) ) . "</p>\n";
}
if( $XPath->match( "/phpsysinfo/Memory/Buffers" ) ) {
$_text .= "<p>" . $text['buffers'] . ":<br/>\n"
. "- " . $text['used'] . ": " . format_bytesize( $XPath->getData( "/phpsysinfo/Memory/Buffers" ) ) . "</p>\n";
}
if( $XPath->match( "/phpsysinfo/Swap/Total" ) ) {
$_text .= "<p>" . $text['swap'] . ":<br/>\n"
. "- " . $text['free'] . ": " . format_bytesize( $XPath->getData( "/phpsysinfo/Swap/Free" ) ) . "<br/>\n"
. "- " . $text['used'] . ": " . format_bytesize( $XPath->getData( "/phpsysinfo/Swap/Used" ) ) . "<br/>\n"
. "- " . $text['size'] . ": " . format_bytesize( $XPath->getData( "/phpsysinfo/Swap/Total" ) ) . "</p>\n";
}
$_text .= "</card>\n";
return $_text;
}
?>
/gestion/phpsysinfo/includes/lang/fr.php
0,0 → 1,118
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: fr.php,v 1.27 2007/03/15 08:22:31 bigmichi1 Exp $
 
$text['title'] = 'Informations Syst&egrave;me ';
 
$text['vitals'] = 'Syst&egrave;me';
$text['hostname'] = 'Nom d\'h&ocirc;te cannonique';
$text['ip'] = 'IP';
$text['kversion'] = 'Version du noyau';
$text['dversion'] = 'Distribution';
$text['uptime'] = 'Uptime';
$text['users'] = 'Utilisateurs';
$text['loadavg'] = 'Charge syst&egrave;me';
 
$text['hardware'] = 'Informations Mat&eacute;riel';
$text['numcpu'] = 'Processeurs';
$text['cpumodel'] = 'Mod&egrave;le';
$text['cpuspeed'] = 'Vitesse CPU';
$text['busspeed'] = 'Vitesse BUS';
$text['cache'] = 'Taille Cache';
$text['bogomips'] = 'Bogomips';
$text['usb'] = 'P&eacute;riph. USB';
$text['pci'] = 'P&eacute;riph. PCI';
$text['ide'] = 'P&eacute;riph. IDE';
$text['scsi'] = 'P&eacute;riph. SCSI';
 
//
$text['portail'] = 'Informations g&eacute;n&eacute;rales du portail ALCASAR';
$text['portail-version']= 'Version install&eacute;e';
$text['portail-stable'] = 'Version stable disponible';
$text['portail-devel'] = 'Version devel disponible';
$text['utilisateur'] = 'Usager(s) en ligne';
$text['groupe'] = 'Nombre de groupe(s)';
$text['bl-version'] = 'Liste noire';
$text['ca'] = 'Certificat de l\'Autorit&eacute; de Certification (A.C.)';
$text['internet_link'] = "Lien Internet";
$text['internet_enable'] = "actif";
$text['internet_disable'] = "inactif";
//
 
$text['netusage'] = 'R&eacute;seau';
$text['device'] = 'P&eacute;riph&eacute;rique';
$text['received'] = 'R&eacute;ception';
$text['sent'] = 'Envoi';
$text['errors'] = 'Err/Drop';
 
$text['memusage'] = 'Utilisation m&eacute;moire';
$text['phymem'] = 'M&eacute;moire Physique';
$text['swap'] = 'Swap disque';
 
$text['fs'] = 'Syst&egrave;mes de fichiers mont&eacute;s';
$text['mount'] = 'Point';
$text['partition'] = 'Partition';
 
$text['percent'] = 'Utilisation';
$text['type'] = 'Type';
$text['free'] = 'Libre';
$text['used'] = 'Occup&eacute;';
$text['size'] = 'Taille';
$text['totals'] = 'Totaux';
 
$text['kb'] = 'Ko';
$text['mb'] = 'Mo';
$text['gb'] = 'Go';
 
$text['none'] = 'aucun';
 
$text['capacity'] = 'Capacit&eacute;';
$text['template'] = 'Mod&egrave;le ';
$text['language'] = 'Langue ';
$text['submit'] = 'Valider';
$text['created'] = 'Cr&eacute;&eacute; par';
$text['locale'] = 'fr_FR';
$text['gen_time'] = 'le %d %B %Y &agrave; %I:%M %p';
 
$text['days'] = 'jours';
$text['hours'] = 'heures';
$text['minutes'] = 'minutes';
 
$text['temperature'] = 'Temp&eacute;rature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Ventilateurs';
$text['s_value'] = 'valeur';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hyst&eacute;r&eacute;sis';
$text['s_limit'] = 'Limite';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
$text['connections'] = 'Established Network Connections';
?>
/gestion/phpsysinfo/includes/lang/en.php
0,0 → 1,119
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: en.php,v 1.21 2007/02/18 19:11:31 bigmichi1 Exp $
 
$text['title'] = 'System Information';
 
$text['vitals'] = 'System Vital';
$text['hostname'] = 'Canonical Hostname';
$text['ip'] = 'Listening IP';
$text['kversion'] = 'Kernel Version';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Uptime';
$text['users'] = 'Current Users';
$text['loadavg'] = 'Load Averages';
 
$text['hardware'] = 'Hardware Information';
$text['numcpu'] = 'Processors';
$text['cpumodel'] = 'Model';
$text['cpuspeed'] = 'CPU Speed';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Cache Size';
$text['bogomips'] = 'System Bogomips';
$text['usb'] = 'USB Devices';
$text['pci'] = 'PCI Devices';
$text['ide'] = 'IDE Devices';
$text['scsi'] = 'SCSI Devices';
 
//
$text['portail'] = 'General Informations about ALCASAR portal';
$text['portail-version']= 'Installed version';
$text['portail-stable'] = 'Stable version available';
$text['portail-devel'] = 'Devel version available';
$text['utilisateur'] = 'logged user(s)';
$text['groupe'] = 'Number of group(s)';
$text['bl-version'] = 'Updated \'Blacklist\'';
$text['ca'] = 'Authenticated Authority certificate (A.C.)';
$text['internet_link'] = "Internet connexion";
$text['internet_enable'] = "enable";
$text['internet_disable'] = "disable";
//
 
$text['netusage'] = 'Network Usage';
$text['device'] = 'Device';
$text['received'] = 'Received';
$text['sent'] = 'Sent';
$text['errors'] = 'Err/Drop';
 
$text['connections'] = 'Established Network Connections';
 
$text['memusage'] = 'Memory Usage';
$text['phymem'] = 'Physical Memory';
$text['swap'] = 'Disk Swap';
 
$text['fs'] = 'Mounted Filesystems';
$text['mount'] = 'Mount';
$text['partition'] = 'Partition';
 
$text['percent'] = 'Percent Capacity';
$text['type'] = 'Type';
$text['free'] = 'Free';
$text['used'] = 'Used';
$text['size'] = 'Size';
$text['totals'] = 'Totals';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'none';
 
$text['capacity'] = 'Capacity';
 
$text['template'] = 'Template';
$text['language'] = 'Language';
$text['submit'] = 'Submit';
$text['created'] = 'Created by';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'days';
$text['hours'] = 'hours';
$text['minutes'] = 'minutes';
 
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
?>
/gestion/phpsysinfo/includes/lang/ja.php
0,0 → 1,3
<?php
require 'jp.php';
?>
/gestion/phpsysinfo/includes/lang/he.php
0,0 → 1,107
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: he.php,v 1.16 2007/02/18 19:11:31 bigmichi1 Exp $
$charset = 'windows-1255';
$text_dir = 'rtl';
$text['title'] = 'îéãò òì äîòøëú';
 
$text['vitals'] = 'çéåðéåú îòøëú';
$text['hostname'] = 'ùí úçðä';
$text['ip'] = 'ëúåáú IP';
$text['kversion'] = 'âøñú ÷øðì';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'æîï ùäîòøëú ìîòìä';
$text['users'] = 'îùúùéí ðåëçééí';
$text['loadavg'] = 'îîåöò òåîñéí';
 
$text['hardware'] = 'îéãò çåîøä';
$text['numcpu'] = 'îòáãéí';
$text['cpumodel'] = 'ñåâ';
$text['cpuspeed'] = 'îäéøåú áMHz';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'âåãì æëøåï îèîåï';
$text['bogomips'] = 'îäéøåú ábogomips';
 
$text['pci'] = 'äú÷ðé PCI';
$text['ide'] = 'äú÷ðé IDE';
$text['scsi'] = 'äú÷ðé SCSI';
$text['usb'] = 'äú÷ðé USB';
 
$text['netusage'] = 'øùú';
$text['device'] = 'äú÷ï';
$text['received'] = '÷éáì';
$text['sent'] = 'ùìç';
$text['errors'] = 'ú÷ìåú/æøé÷åú';
 
$text['connections'] = 'òøåöé ú÷ùåøú ôúåçéí';
 
$text['memusage'] = 'ðéöåìú æëøåï';
$text['phymem'] = 'æëøåï ôéæé';
$text['swap'] = 'æëøåï swap';
 
$text['fs'] = 'îòøëåú ÷áöéí îçåáøåú';
$text['mount'] = 'îçåáø';
$text['partition'] = 'îçéöä';
 
$text['percent'] = 'úëåìä áàçæåéí';
$text['type'] = 'ñåâ';
$text['free'] = 'çåôùé';
$text['used'] = 'áùéîåù';
$text['size'] = 'âåãì';
$text['totals'] = 'ñä"ë';
 
$text['kb'] = '÷éìå áúéí';
$text['mb'] = 'îâä';
$text['gb'] = 'âéâä';
 
$text['none'] = 'ììà';
 
$text['capacity'] = 'úëåìä';
 
$text['template'] = 'úáðéú';
$text['language'] = 'ùôä';
$text['submit'] = 'äâù';
$text['created'] = 'ðåöø ò"é';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'éîéí';
$text['hours'] = 'ùòåú';
$text['minutes'] = 'ã÷åú';
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
?>
/gestion/phpsysinfo/includes/lang/fi.php
0,0 → 1,107
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: fi.php,v 1.17 2007/02/18 19:11:31 bigmichi1 Exp $
 
// Finnish language file by Jani 'Japala' Ponkko
 
$text['title'] = 'Tietoa j&auml;rjestelm&auml;st&auml;';
 
$text['vitals'] = 'Perustiedot';
$text['hostname'] = 'Kanoninen nimi';
$text['ip'] = 'K&auml;ytett&auml;v&auml; IP';
$text['kversion'] = 'Kernelin versio';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Toiminta-aika';
$text['users'] = 'K&auml;ytt&auml;ji&auml;';
$text['loadavg'] = 'Keskikuormat';
 
$text['hardware'] = 'Laitteisto';
$text['numcpu'] = 'Prosessoreita';
$text['cpumodel'] = 'Malli';
$text['cpuspeed'] = 'Piirin MHz';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'V&auml;limuistin koko';
$text['bogomips'] = 'J&auml;rjestelm&auml;n Bogomipsit';
 
$text['pci'] = 'PCI Laitteet';
$text['ide'] = 'IDE Laitteet';
$text['scsi'] = 'SCSI Laitteet';
$text['usb'] = 'USB Laitteet';
 
$text['netusage'] = 'Verkon k&auml;ytt&ouml;';
$text['device'] = 'Laite';
$text['received'] = 'Vastaanotettu';
$text['sent'] = 'L&auml;hetetty';
$text['errors'] = 'Virheet/Pudotetut';
 
$text['memusage'] = 'Muistin kuormitus';
$text['phymem'] = 'Fyysinen muisti';
$text['swap'] = 'Virtuaalimuisti';
 
$text['fs'] = 'Liitetyt tiedostoj&auml;rjestelm&auml;t';
$text['mount'] = 'Liitoskohta';
$text['partition'] = 'Osio';
 
$text['percent'] = 'Prosenttia kapasiteetista';
$text['type'] = 'Tyyppi';
$text['free'] = 'Vapaana';
$text['used'] = 'K&auml;yt&ouml;ss&auml;';
$text['size'] = 'Koko';
$text['totals'] = 'Yhteens&auml;';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'Ei yht&auml;&auml;n';
 
$text['capacity'] = 'Kapasiteetti';
 
$text['template'] = 'Malli';
$text['language'] = 'Kieli';
$text['submit'] = 'Valitse';
$text['created'] = 'Luonut';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'p&auml;iv&auml;&auml;';
$text['hours'] = 'tuntia';
$text['minutes'] = 'minuuttia';
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
$text['connections'] = 'Established Network Connections';
?>
/gestion/phpsysinfo/includes/lang/br.php
0,0 → 1,106
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: br.php,v 1.19 2007/02/18 19:11:31 bigmichi1 Exp $
// Translated by Álvaro Reguly - alvaro at reguly dot net
//
$text['title'] = 'Informações do Sistema';
 
$text['vitals'] = 'Sistema';
$text['hostname'] = 'Nome Canônico';
$text['ip'] = 'Números IP';
$text['kversion'] = 'Versão do Kernel';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Uptime';
$text['users'] = 'Usuários Conectados';
$text['loadavg'] = 'Carga do Sistema';
 
$text['hardware'] = 'Informações do Hardware';
$text['numcpu'] = 'Processadores';
$text['cpumodel'] = 'Modelo';
$text['cpuspeed'] = 'CPU Speed';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Tamanho Cache';
$text['bogomips'] = 'Bogomips';
 
$text['pci'] = 'Dispositivos PCI';
$text['ide'] = 'Dispositivos IDE';
$text['scsi'] = 'Dispositivos SCSI';
$text['usb'] = 'Dispositivos USB';
 
$text['netusage'] = 'Utilização da Rede';
$text['device'] = 'Dispositivo';
$text['received'] = 'Recebidos';
$text['sent'] = 'Enviados';
$text['errors'] = 'Erros/Drop';
 
$text['memusage'] = 'Utilização da Memória';
$text['phymem'] = 'Memória Física';
$text['swap'] = 'Swap';
 
$text['fs'] = 'Sistemas de Arquivo Montados';
$text['mount'] = 'Mount';
$text['partition'] = 'Partição';
 
$text['percent'] = 'Porcentual da Capacidade';
$text['type'] = 'Tipo';
$text['free'] = 'Livres';
$text['used'] = 'Utilizados';
$text['size'] = 'Tamanho';
$text['totals'] = 'Totais';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'nenhum';
 
$text['capacity'] = 'Capacidade';
 
$text['template'] = 'Molde';
$text['language'] = 'Língua';
$text['submit'] = 'Enviar';
$text['created'] = 'Criado por';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'dias';
$text['hours'] = 'horas';
$text['minutes'] = 'minutos';
 
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
$text['connections'] = 'Established Network Connections';
?>
/gestion/phpsysinfo/includes/lang/ar_utf8.php
0,0 → 1,110
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: ar_utf8.php,v 1.15 2007/02/18 19:11:30 bigmichi1 Exp $
//
//Translated to arabic by: Nizar Abed - nizar@srcget.com - Adios
 
$charset = 'utf-8';
 
$text['title'] = 'معلومات عن ألنظام';
 
$text['vitals'] = 'حيويه';
$text['hostname'] = ' ألمحطه';
$text['ip'] = 'IP عنوان أل';
$text['kversion'] = 'إصدار رقم';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'مدة ألتشغيل';
$text['users'] = 'مستخدمون';
$text['loadavg'] = 'معدل ألتشغيل';
 
$text['hardware'] = 'معلومات ألمعدات';
$text['numcpu'] = 'وحدات ألمعالجه';
$text['cpumodel'] = 'نوع';
$text['cpuspeed'] = 'سرعه في';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = ' cache سعة ذاكرة';
$text['bogomips'] = 'Bogomips سرعه في';
 
$text['pci'] = 'PCI معدات ';
$text['ide'] = 'IDE معدات';
$text['scsi'] = 'SCSI معدات';
$text['usb'] = 'USB معدات';
 
$text['netusage'] = 'إستعمال ألشبكه';
$text['device'] = 'معدات';
$text['received'] = 'إستقبل حتى ألآن';
$text['sent'] = 'أرسل';
$text['errors'] = 'أخطاء';
 
$text['connections'] = 'إتصالات شبكه منفذه';
 
$text['memusage'] = 'ذاكره مستعمله';
$text['phymem'] = 'ذاكره جسديه';
$text['swap'] = 'Swap ذاكرة';
 
$text['fs'] = 'أنظمة ملفات مخططه';
$text['mount'] = 'مخطط';
$text['partition'] = 'تقطيع';
 
$text['percent'] = 'سعه بألنسبه ألمؤيه';
$text['type'] = 'نوع';
$text['free'] = 'حر';
$text['used'] = 'مستعمل';
$text['size'] = 'حجم';
$text['totals'] = 'مجموع';
 
$text['kb'] = ' كيلو بايت KB';
$text['mb'] = 'ميغا بايت MB';
$text['gb'] = 'جيغا بايت GB';
 
$text['none'] = 'بدون';
 
$text['capacity'] = 'سعه';
 
$text['template'] = 'بنيه';
$text['language'] = 'لغه';
$text['submit'] = 'أدخل';
$text['created'] = 'إصدر بواسطة';
 
$text['days'] = 'أيام';
$text['hours'] = 'ساعات';
$text['minutes'] = 'دفائق';
 
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
?>
/gestion/phpsysinfo/includes/lang/nl.php
0,0 → 1,111
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: nl.php,v 1.23 2007/02/18 19:11:31 bigmichi1 Exp $
 
if (PHP_OS == 'WINNT') {
$text['locale'] = 'dutch'; // (windows)
}
else {
$text['locale'] = 'nl-NL'; // (Linux and friends(?))
}
 
$text['title'] = 'Systeem Informatie';
 
$text['vitals'] = 'Systeem overzicht';
$text['hostname'] = 'Toegewezen naam';
$text['ip'] = 'IP-adres';
$text['kversion'] = 'Kernelversie';
$text['dversion'] = 'Distributie';
$text['uptime'] = 'Uptime';
$text['users'] = 'Huidige gebruikers';
$text['loadavg'] = 'Gemiddelde belasting';
 
$text['hardware'] = 'Hardware overzicht';
$text['numcpu'] = 'Processors';
$text['cpumodel'] = 'Model';
$text['cpuspeed'] = 'CPU snelheid';
$text['busspeed'] = 'BUS snelheid';
$text['cache'] = 'Cache grootte';
$text['bogomips'] = 'Systeem Bogomips';
 
$text['pci'] = 'PCI Apparaten';
$text['ide'] = 'IDE Apparaten';
$text['scsi'] = 'SCSI Apparaten';
$text['usb'] = 'USB Apparaten';
 
$text['netusage'] = 'Netwerkgebruik';
$text['device'] = 'Apparaat';
$text['received'] = 'Ontvangen';
$text['sent'] = 'Verzonden';
$text['errors'] = 'Err/Drop';
 
$text['memusage'] = 'Geheugengebruik';
$text['phymem'] = 'Fysiek geheugen';
$text['swap'] = 'Swap geheugen';
 
$text['fs'] = 'Aangesloten bestandssystemen';
$text['mount'] = 'Mount';
$text['partition'] = 'Partitie';
 
$text['percent'] = 'Percentage gebruikt';
$text['type'] = 'Type';
$text['free'] = 'Vrij';
$text['used'] = 'Gebruikt';
$text['size'] = 'Grootte';
$text['totals'] = 'Totaal';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'geen';
 
$text['capacity'] = 'Capaciteit';
$text['template'] = 'Opmaak-model';
$text['language'] = 'Taal';
$text['submit'] = 'Toepassen';
$text['created'] = 'Gegenereerd door';
$text['gen_time'] = 'op %d %B %Y, om %H:%M';
 
$text['days'] = 'dagen';
$text['hours'] = 'uren';
$text['minutes'] = 'minuten';
$text['temperature'] = 'Temperatuur';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Waarde';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysterie';
$text['s_limit'] = 'Limiet';
$text['s_label'] = 'Omschrijving';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
$text['connections'] = 'Established Network Connections';
?>
/gestion/phpsysinfo/includes/lang/jp.php
0,0 → 1,108
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: jp.php,v 1.13 2007/02/18 19:11:31 bigmichi1 Exp $
 
$charset = 'euc-jp';
$text['title'] = '¥·¥¹¥Æ¥à¾ðÊó';
 
$text['vitals'] = '¥·¥¹¥Æ¥àÆ°ºî¾õ¶·';
$text['hostname'] = '¥Û¥¹¥È̾';
$text['ip'] = 'IP¥¢¥É¥ì¥¹';
$text['kversion'] = '¥«¡¼¥Í¥ë¥Ð¡¼¥¸¥ç¥ó(uname)';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Ϣ³²ÔƯ»þ´Ö(uptime)';
$text['users'] = '¥í¥°¥¤¥ó¥æ¡¼¥¶¿ô';
$text['loadavg'] = '¥í¡¼¥É¥¢¥Ù¥ì¡¼¥¸';
 
$text['hardware'] = '¥Ï¡¼¥É¥¦¥§¥¢¾ðÊó';
$text['numcpu'] = 'CPU¿ô';
$text['cpumodel'] = 'CPU¥â¥Ç¥ë';
$text['cpuspeed'] = '¥¯¥í¥Ã¥¯Â®ÅÙ(MHz)';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = '¥­¥ã¥Ã¥·¥å¥µ¥¤¥º';
$text['bogomips'] = 'System Bogomips';
 
$text['pci'] = 'PCI¥Ç¥Ð¥¤¥¹°ìÍ÷';
$text['ide'] = 'IDE¥Ç¥Ð¥¤¥¹°ìÍ÷';
$text['scsi'] = 'SCSI¥Ç¥Ð¥¤¥¹°ìÍ÷';
$text['usb'] = 'USB¥Ç¥Ð¥¤¥¹°ìÍ÷';
 
$text['netusage'] = '¥Í¥Ã¥È¥ï¡¼¥¯ÍøÍѾõ¶·';
$text['device'] = '¥¤¥ó¥¿¥Õ¥§¥¤¥¹Ì¾';
$text['received'] = '¼õ¿®¥µ¥¤¥º';
$text['sent'] = 'Á÷¿®¥µ¥¤¥º';
$text['errors'] = '¥¨¥é¡¼/¼õ¿®ÉÔǽ';
 
$text['connections'] = '¸½ºßÀܳ¤·¤Æ¤¤¤ë¥Í¥Ã¥È¥ï¡¼¥¯Àܳ°ìÍ÷';
 
$text['memusage'] = '¥á¥â¥ê»ÈÍѾõ¶·';
$text['phymem'] = 'ʪÍý¥á¥â¥êÎÌ';
$text['swap'] = '¥Ç¥£¥¹¥¯¥¹¥ï¥Ã¥×';
 
$text['fs'] = '¥Þ¥¦¥ó¥ÈºÑ¤ß¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à°ìÍ÷';
$text['mount'] = '¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È';
$text['partition'] = '¥Ç¥£¥¹¥¯¥Ñ¡¼¥Æ¥£¥·¥ç¥ó';
 
$text['percent'] = 'ÍøÍѳä¹ç';
$text['type'] = '¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¼ïÊÌ';
$text['free'] = '¶õ¤­';
$text['used'] = 'ÍøÍÑ';
$text['size'] = 'Á´ÂÎ';
$text['totals'] = '¹ç·×';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = '¤¢¤ê¤Þ¤»¤ó';
 
$text['capacity'] = 'ÍÆÎÌ';
 
$text['template'] = '¥Ç¥¶¥¤¥óÁªÂò';
$text['language'] = '¸À¸ì';
$text['submit'] = 'Á÷¿®';
$text['created'] = 'Created by';
 
$text['days'] = 'Æü';
$text['hours'] = '»þ´Ö';
$text['minutes'] = 'ʬ';
 
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
?>
/gestion/phpsysinfo/includes/lang/pl.php
0,0 → 1,107
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: pl.php,v 1.16 2007/02/18 19:11:31 bigmichi1 Exp $
 
$charset = 'iso-8859-2';
 
$text['title'] = 'Informacja o systemie';
 
$text['vitals'] = 'Stan systemu';
$text['hostname'] = 'Nazwa kanoniczna hosta';
$text['ip'] = 'IP nas³uchuj±cy';
$text['kversion'] = 'Wersja j±dra';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Uptime';
$text['users'] = 'Obecnych u¿ytkownków';
$text['loadavg'] = 'Obci±¿enia ¶rednie';
 
$text['hardware'] = 'Informacja o sprzêcie';
$text['numcpu'] = 'Procesory';
$text['cpumodel'] = 'Model';
$text['cpuspeed'] = 'Cz&#281;stotliwo&#347;&#263;';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Cache Size';
$text['bogomips'] = 'System Bogomips';
 
$text['pci'] = 'Urz±dzenia PCI';
$text['ide'] = 'Urz±dzenia IDE';
$text['scsi'] = 'Urz±dzenia SCSI';
$text['usb'] = 'Urz±dzenia USB';
 
$text['netusage'] = 'Sieæ';
$text['device'] = 'Urz±dzenie';
$text['received'] = 'Odebrano';
$text['sent'] = 'Wys³ano';
$text['errors'] = 'B³êdow/Porzuconych';
 
$text['memusage'] = 'Obci±¿enie pamiêci';
$text['phymem'] = 'Pamiêæ fizyczna';
$text['swap'] = 'Pamiêæ Swap';
 
$text['fs'] = 'Zamontowane systemy plików';
$text['mount'] = 'Punkt montowania';
$text['partition'] = 'Partycja';
 
$text['percent'] = 'Procentowo zajête';
$text['type'] = 'Typ';
$text['free'] = 'Wolne';
$text['used'] = 'Zajête';
$text['size'] = 'Rozmiar';
$text['totals'] = 'Ca³kowite';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'brak';
 
$text['capacity'] = 'Rozmiar';
 
$text['template'] = 'Szablon';
$text['language'] = 'Jêzyk';
$text['submit'] = 'Wy¶lij';
$text['created'] = 'Utworzone przez';
$text['locale'] = 'pl_PL';
$text['gen_time'] = " %e %b %Y o godzinie %T";
 
$text['days'] = 'dni';
$text['hours'] = 'godzin';
$text['minutes'] = 'minut';
 
$text['temperature'] = 'Temperatura';
$text['voltage'] = 'Napiêcia';
$text['fans'] = 'Wiatraczki';
$text['s_value'] = 'Warto¶æ';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hystereza';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Nazwa';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
$text['connections'] = 'Established Network Connections';
?>
/gestion/phpsysinfo/includes/lang/no.php
0,0 → 1,105
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: no.php,v 1.19 2007/02/18 19:11:31 bigmichi1 Exp $
 
$text['title'] = 'Systeminformasjon';
 
$text['vitals'] = 'Vital Informasjon';
$text['hostname'] = 'Egentlige Tjenernavn';
$text['ip'] = 'IP-Adresse';
$text['kversion'] = 'Kernel Versjon';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Oppetid';
$text['users'] = 'Antall Brukere';
$text['loadavg'] = 'Gj.Snitt Belastning';
 
$text['hardware'] = 'Maskinvareinformasjon';
$text['numcpu'] = 'Prosessorer';
$text['cpumodel'] = 'Modell';
$text['cpuspeed'] = 'Brikke MHz';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Cache St&oslash;rrelse';
$text['bogomips'] = 'System Bogomips';
 
$text['pci'] = 'PCI Enheter';
$text['ide'] = 'IDE Enheter';
$text['scsi'] = 'SCSI Enheter';
$text['usb'] = 'USB Enheter';
 
$text['netusage'] = 'Nettverksbruk';
$text['device'] = 'Enhet';
$text['received'] = 'Mottatt';
$text['sent'] = 'Sendt';
$text['errors'] = 'Feil/Dropp';
 
$text['memusage'] = 'Minnebruk';
$text['phymem'] = 'Fysisk Minne';
$text['swap'] = 'Disk Swap';
 
$text['fs'] = 'Monterte Filsystemer';
$text['mount'] = 'Punkt';
$text['partition'] = 'Partisjon';
 
$text['percent'] = 'Brukt Kapasitet i Prosent';
$text['type'] = 'Type';
$text['free'] = 'Ledig';
$text['used'] = 'Brukt';
$text['size'] = 'St&oslash;rrelse';
$text['totals'] = 'Totalt';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'Ingen';
 
$text['capacity'] = 'Kapasitet';
$text['template'] = 'Mal';
$text['language'] = 'Spr&aring;k';
$text['submit'] = 'Endre';
$text['created'] = 'Generert av';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'dager';
$text['hours'] = 'timer';
$text['minutes'] = 'minutter';
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
$text['connections'] = 'Established Network Connections';
?>
/gestion/phpsysinfo/includes/lang/hu.php
0,0 → 1,108
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// Translated by Zsozso - zsozso@internews.hu
// $Id: hu.php,v 1.19 2007/02/18 19:11:31 bigmichi1 Exp $
 
$charset = 'iso-8859-2';
 
$text['title'] = 'Rendszer Információ';
 
$text['vitals'] = 'A Rendszer Alapvetõ Információi';
$text['hostname'] = 'Hostnév';
$text['ip'] = 'Figyelt IP';
$text['kversion'] = 'Kernel Verzió';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Uptime';
$text['users'] = 'Pillanatnyi felhasználók';
$text['loadavg'] = 'Terhelési Átlag';
 
$text['hardware'] = 'Hardware Információ';
$text['numcpu'] = 'Processzor';
$text['cpumodel'] = 'Modell';
$text['cpuspeed'] = 'Chip MHz';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Cache Méret';
$text['bogomips'] = 'Rendszer Bogomips';
 
$text['pci'] = 'PCI Eszközök';
$text['ide'] = 'IDE Eszközök';
$text['scsi'] = 'SCSI Eszközök';
$text['usb'] = 'USB Eszközök';
 
$text['netusage'] = 'Háló Használat';
$text['device'] = 'Eszköz';
$text['received'] = 'Fogadott';
$text['sent'] = 'Küldött';
$text['errors'] = 'Err/Drop';
 
$text['connections'] = 'Létesített Hálózati Kapcsolatok';
 
$text['memusage'] = 'Memória Használat';
$text['phymem'] = 'Fizikai Memória';
$text['swap'] = 'Lemez Swap';
 
$text['fs'] = 'Csatlakoztatott File Rendszerek';
$text['mount'] = 'Mount';
$text['partition'] = 'Partíciók';
 
$text['percent'] = 'Százalékos Használat';
$text['type'] = 'Típus';
$text['free'] = 'Szabad';
$text['used'] = 'Használt';
$text['size'] = 'Méret';
$text['totals'] = 'Összesen';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'nincs';
 
$text['capacity'] = 'Kapacítás';
 
$text['template'] = 'Sablon';
$text['language'] = 'Nyelv';
$text['submit'] = 'Mehet';
$text['created'] = 'Készült:';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'nap';
$text['hours'] = 'óra';
$text['minutes'] = 'perc';
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
?>
/gestion/phpsysinfo/includes/lang/lt.php
0,0 → 1,110
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: lt.php,v 1.20 2007/02/18 19:11:31 bigmichi1 Exp $
 
$charset = 'utf-8';
 
$text['title'] = 'Informacija apie sistemą';
 
$text['vitals'] = 'Sistema';
$text['hostname'] = 'Kompiuterio vardas';
$text['ip'] = 'IP adresas';
$text['kversion'] = 'Branduolio versija';
$text['dversion'] = 'Distribucija';
$text['uptime'] = 'Veikimo laikas';
$text['users'] = 'Vartotojai';
$text['loadavg'] = 'Apkrovos vidurkiai';
 
$text['hardware'] = 'Aparatūra';
$text['numcpu'] = 'Procesorių kiekis';
$text['cpumodel'] = 'Modelis';
$text['cpuspeed'] = 'Procesoriaus dažnis';
$text['busspeed'] = 'Magistralės dažnis';
$text['cache'] = 'Spartinančioji atmintinė';
$text['bogomips'] = 'Sistemos „bogomips“';
 
$text['pci'] = 'PCI įrenginiai';
$text['ide'] = 'IDE įrenginiai';
$text['scsi'] = 'SCSI įrenginiai';
$text['usb'] = 'USB įrenginiai';
 
$text['netusage'] = 'Tinklas';
$text['device'] = 'Įrenginys';
$text['received'] = 'Gauta';
$text['sent'] = 'Išsiųsta';
$text['errors'] = 'Klaidos/pamesti paketai';
 
$text['memusage'] = 'Atmintis';
$text['phymem'] = 'Operatyvioji atmintis';
$text['swap'] = 'Disko swap skirsnis';
 
$text['fs'] = 'Bylų sistema';
$text['mount'] = 'Prijungimo vieta';
$text['partition'] = 'Skirsnis';
 
$text['percent'] = 'Apkrova procentais';
$text['type'] = 'Tipas';
$text['free'] = 'Laisva';
$text['used'] = 'Apkrauta';
$text['size'] = 'Dydis';
$text['totals'] = 'Iš viso';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'nėra';
 
$text['capacity'] = 'Talpa';
$text['template'] = 'Šablonas';
$text['language'] = 'Kalba';
$text['submit'] = 'Atnaujinti';
$text['created'] = 'Naudojamas';
 
$text['days'] = 'd.';
$text['hours'] = 'val.';
$text['minutes'] = 'min.';
 
$text['temperature'] = 'Temperatūra';
$text['voltage'] = 'Įtampa';
$text['fans'] = 'Aušintuvai';
$text['s_value'] = 'Reikšmė';
$text['s_min'] = 'Min';
$text['s_max'] = 'Maks';
 
$text['hysteresis'] = 'Signalizuojama ties';
$text['s_limit'] = 'Riba';
$text['s_label'] = 'Pavadinimas';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'aps./min';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
$text['connections'] = 'Established Network Connections';
 
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
?>
/gestion/phpsysinfo/includes/lang/ro.php
0,0 → 1,106
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: ro.php,v 1.0 6/9/01 12:41PM
// Translated by Silviu Simen - ssimen@sympatico.ca
 
$text['title'] = 'Informatii despre sistem';
 
$text['vitals'] = 'Informatii vitale';
$text['hostname'] = 'Numele canonic';
$text['ip'] = 'Adresa IP';
$text['kversion'] = 'Versiune nucleu';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Timp de viata';
$text['users'] = 'Utilizatori curenti';
$text['loadavg'] = 'Incarcarea sistemului';
 
$text['hardware'] = 'Informatii hardware';
$text['numcpu'] = 'Procesoare';
$text['cpumodel'] = 'Model';
$text['cpuspeed'] = 'CPU Speed';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Marime Cache';
$text['bogomips'] = 'Bogomips';
 
$text['pci'] = 'Dispozitive PCI';
$text['ide'] = 'Dispozitive IDE';
$text['scsi'] = 'Dispozitive SCSI';
$text['usb'] = 'Dispozitive USB';
 
$text['netusage'] = 'Utilizarea retelei';
$text['device'] = 'Dispozitiv';
$text['received'] = 'Primit';
$text['sent'] = 'Trimis';
$text['errors'] = 'Erori';
 
$text['memusage'] = 'Utilizarea memoriei';
$text['phymem'] = 'Memorie fizica';
$text['swap'] = 'Disk Swap';
 
$text['fs'] = 'Sisteme de fisiere montate';
$text['mount'] = 'Punct montare';
$text['partition'] = 'Partitie';
 
$text['percent'] = 'Procent capacitate';
$text['type'] = 'Tip';
$text['free'] = 'Liber';
$text['used'] = 'Utilizat';
$text['size'] = 'Marime';
$text['totals'] = 'Total';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'nici unul';
 
$text['capacity'] = 'Capacitate';
 
$text['template'] = 'Model';
$text['language'] = 'Limba';
$text['submit'] = 'Actualizeaza';
$text['created'] = 'Creat de';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'zile';
$text['hours'] = 'ore';
$text['minutes'] = 'minute';
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
$text['connections'] = 'Established Network Connections';
?>
/gestion/phpsysinfo/includes/lang/lv.php
0,0 → 1,106
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: lv.php,v 1.12 2007/02/18 19:11:31 bigmichi1 Exp $
 
$text['title'] = 'Sistçmas informâcija';
 
$text['vitals'] = 'Galvenie râdîtâji';
$text['hostname'] = 'Hosta vârds';
$text['ip'] = 'IP Adrese';
$text['kversion'] = 'Kerneïa versija';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Nepârtrauktais darba laiks';
$text['users'] = 'Lietotâji';
$text['loadavg'] = 'Vidçjie ielâdes râdîtâji';
 
$text['hardware'] = 'Aparatûra';
$text['numcpu'] = 'Procesors';
$text['cpumodel'] = 'Modelis';
$text['cpuspeed'] = 'Èipa MHz';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Keð atmiòa';
$text['bogomips'] = 'Sistçmas "Bogomips"';
 
$text['pci'] = 'PCI ierîces';
$text['ide'] = 'IDE ierîces';
$text['scsi'] = 'SCSI ierîces';
$text['usb'] = 'USB ierîces';
 
$text['netusage'] = 'Tîkla informâcija';
$text['device'] = 'Ierîce';
$text['received'] = 'Saòemts';
$text['sent'] = 'Aizsûtîts';
$text['errors'] = 'Kïûdas/Zaudçtâs paketes';
 
$text['connections'] = 'Established Network Connections';
 
$text['memusage'] = 'Atmiòas lietojums';
$text['phymem'] = 'Operatîvâ atmiòa';
$text['swap'] = 'Swap atmiòa';
 
$text['fs'] = 'Cietie diski';
$text['mount'] = 'Mounta vieta';
$text['partition'] = 'Partîcija';
 
$text['percent'] = 'Aizòemts procentos';
$text['type'] = 'Tips';
$text['free'] = 'Brîvs';
$text['used'] = 'Aizòemts';
$text['size'] = 'Ietilpîba';
$text['totals'] = 'Kopâ';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'nav';
 
$text['capacity'] = 'Ietilpîba';
 
$text['template'] = 'Sagatave';
$text['language'] = 'Valoda';
$text['submit'] = 'Apstiprinât';
$text['created'] = 'Autors';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'dienas';
$text['hours'] = 'stundas';
$text['minutes'] = 'minûtes';
 
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
?>
/gestion/phpsysinfo/includes/lang/ca.php
0,0 → 1,108
<?php
//
// phpSysInfo -A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: ca.php,v 1.17 2007/02/18 19:11:31 bigmichi1 Exp $
//
// Traductor: Miquel Guillamet Montalat
// E-mail: mikelet15@netscape.com Web: http://gitx.dhs.org
//
$text['title'] = 'Informació del Sistema';
 
$text['vitals'] = 'Vital';
$text['hostname'] = 'Nom del Sistema';
$text['ip'] = 'Direcció IP';
$text['kversion'] = 'Versió del Kernel';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Uptime';
$text['users'] = 'Usuaris actuals';
$text['loadavg'] = 'Carrega del Servidor';
 
$text['hardware'] = 'Informació del Hardware';
$text['numcpu'] = 'Processadors';
$text['cpumodel'] = 'Model';
$text['cpuspeed'] = 'Frequència en MHz';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'RAM';
$text['bogomips'] = 'Bogomips';
 
$text['pci'] = 'Dispositius PCI';
$text['ide'] = 'Dispositius IDE';
$text['scsi'] = 'Dispositius SCSI';
$text['usb'] = 'Dispisitius USB';
 
$text['netusage'] = 'Utilització de la XARXA';
$text['device'] = 'Dispositiu';
$text['received'] = 'Rebut';
$text['sent'] = 'Enviat';
$text['errors'] = 'Errors/Perduts';
 
$text['memusage'] = 'Utilització de la RAM';
$text['phymem'] = 'Memoria Fisica';
$text['swap'] = 'Swap';
 
$text['fs'] = 'Particions Montades';
$text['mount'] = 'Montat a';
$text['partition'] = 'Partició';
 
$text['percent'] = 'Capacitat';
$text['type'] = 'Tipus';
$text['free'] = 'Lliure';
$text['used'] = 'Usat';
$text['size'] = 'Tamany';
$text['totals'] = 'Totals';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'ningun';
 
$text['capacity'] = 'Capacitat';
 
$text['template'] = 'Themes';
$text['language'] = 'Llenguatge';
$text['submit'] = 'Enviar';
$text['created'] = 'Creat per';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'dies';
$text['hours'] = 'hores';
$text['minutes'] = 'minuts';
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
$text['connections'] = 'Established Network Connections';
?>
/gestion/phpsysinfo/includes/lang/pt.php
0,0 → 1,106
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: pt.php,v 1.15 2007/02/18 19:11:31 bigmichi1 Exp $
 
$text['title'] = 'Informações do Sistema';
 
$text['vitals'] = 'Informações Vitais';
$text['hostname'] = 'Hostname Canónico';
$text['ip'] = 'IP';
$text['kversion'] = 'Versão do Kernel';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Uptime';
$text['users'] = 'Utilizadores Ligados';
$text['loadavg'] = 'Carga Média';
 
$text['hardware'] = 'Informações do Hardware';
$text['numcpu'] = 'Processadores';
$text['cpumodel'] = 'Modelo';
$text['cpuspeed'] = 'CPU Speed';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Tamanho da Cache';
$text['bogomips'] = 'Bogomips do Sistema';
 
$text['pci'] = 'Hardware PCI';
$text['ide'] = 'Hardware IDE';
$text['scsi'] = 'Hardware SCSI';
$text['usb'] = 'Hardware USB';
 
$text['netusage'] = 'Utilização da Rede';
$text['device'] = 'Dispositivo';
$text['received'] = 'Recebidos';
$text['sent'] = 'Enviados';
$text['errors'] = 'Erro/Rejeitados';
 
$text['connections'] = 'Ligações Estabelecidas';
 
$text['memusage'] = 'Utilização da Memória';
$text['phymem'] = 'Memória Física';
$text['swap'] = 'Swap';
 
$text['fs'] = 'Sistema de Ficheiros (Mounted)';
$text['mount'] = 'Mount';
$text['partition'] = 'Partições';
 
$text['percent'] = 'Capacidade em Percentagem';
$text['type'] = 'Tipo';
$text['free'] = 'Livre';
$text['used'] = 'Utilizada';
$text['size'] = 'Tamanho';
$text['totals'] = 'Totais';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'indisponível';
 
$text['capacity'] = 'Capacidade';
 
$text['template'] = 'Template';
$text['language'] = 'Idioma';
$text['submit'] = 'Enviar';
$text['created'] = 'Produzido por';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'dias';
$text['hours'] = 'horas';
$text['minutes'] = 'minutos';
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
?>
/gestion/phpsysinfo/includes/lang/pt-br.php
0,0 → 1,110
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: pt-br.php,v 1.12 2007/02/18 19:11:31 bigmichi1 Exp $
//
// Tradutor: Marcílio Cunha Marinho Maia, 29/03/2003 às 04:34 (Goiânia-GO,Brasil)
// E-mail: marcilio@nextsolution.com.br Web: http://www.nextsolution.com.br
// Icq: 22493131
 
$text['title'] = 'Informação Sobre o Sistema';
 
$text['vitals'] = 'Informações Vitais do Sistema';
$text['hostname'] = 'Nome do Servidor';
$text['ip'] = 'Número IP';
$text['kversion'] = 'Versão do Kernel';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Tempo Ativo do Sistema';
$text['users'] = 'Usuarios Ativos';
$text['loadavg'] = 'Carga do Sistema';
 
$text['hardware'] = 'Informações sobre o Hardware';
$text['numcpu'] = 'Processadores';
$text['cpumodel'] = 'Modelo';
$text['cpuspeed'] = 'Velocidade em MHz';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Tamanho do Cache';
$text['bogomips'] = 'Velocidade em Bogomips';
 
$text['pci'] = 'Dispositivos PCI';
$text['ide'] = 'Dispositivos IDE';
$text['scsi'] = 'Dispositivos SCSI';
$text['usb'] = 'Dispositivos USB';
 
$text['netusage'] = 'Uso da Rede';
$text['device'] = 'Dispositivo';
$text['received'] = 'Recebido';
$text['sent'] = 'Enviado';
$text['errors'] = 'Perdido';
 
$text['connections'] = 'Conexões Estabelecidas';
 
$text['memusage'] = 'Utilização Memória';
$text['phymem'] = 'Memória Física';
$text['swap'] = 'Memória Virtual (SWAP)';
 
$text['fs'] = 'Sistemas de Arquivos';
$text['mount'] = 'Ponto de montagem';
$text['partition'] = 'Partição';
 
$text['percent'] = 'Capacidade Utilizada';
$text['type'] = 'Tipo';
$text['free'] = 'Livre';
$text['used'] = 'Utilizado';
$text['size'] = 'Tamanho';
$text['totals'] = 'Totais';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'N/A';
 
$text['capacity'] = 'Capacidade';
 
$text['template'] = 'Exemplos';
$text['language'] = 'Língua';
$text['submit'] = 'Entrar';
$text['created'] = 'Criado por';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'Dias';
$text['hours'] = 'Horas';
$text['minutes'] = 'Minutos';
 
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
?>
/gestion/phpsysinfo/includes/lang/tr.php
0,0 → 1,106
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: tr.php,v 1.16 2007/02/18 19:11:31 bigmichi1 Exp $
 
$text['title'] = 'Sistem Bilgisi';
 
$text['vitals'] = 'Sistem Temel';
$text['hostname'] = 'Cannonical Host Adresi';
$text['ip'] = 'IP Adresi';
$text['kversion'] = 'Kernel Versiyonu';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Açýk Kaldýðý Süre';
$text['users'] = 'Þu Andaki Kullanýcýlar';
$text['loadavg'] = 'Yükleme Ortalamasý';
 
$text['hardware'] = 'Hardware Bilgisi';
$text['numcpu'] = 'CPU Sayýsý';
$text['cpumodel'] = 'Model';
$text['cpuspeed'] = 'CPU Hýzý( Mhz)';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Cache Büyüklüðü';
$text['bogomips'] = 'Sistem Bogomips';
 
$text['pci'] = 'PCI Araçlar';
$text['ide'] = 'IDE Araçlar';
$text['scsi'] = 'SCSI Araçlar';
$text['usb'] = 'USB Araçlar';
 
$text['netusage'] = 'Network Kullanýmý';
$text['device'] = 'Arayüz';
$text['received'] = 'Alýnan';
$text['sent'] = 'Gönderilen';
$text['errors'] = 'Hata/Düþürülen';
 
$text['connections'] = 'Kurulmuþ Network Baðlantýlarý';
 
$text['memusage'] = 'Hafýza Kullanýmý';
$text['phymem'] = 'Fiziksel Hafýza';
$text['swap'] = 'Disk Swap';
 
$text['fs'] = 'Mount Edilmiþ Sistemler';
$text['mount'] = 'Mount';
$text['partition'] = 'Kýsým';
 
$text['percent'] = 'Yüzde Kapasite';
$text['type'] = 'Tür';
$text['free'] = 'Boþ Alan';
$text['used'] = 'Kullanýlan';
$text['size'] = 'Büyüklük';
$text['totals'] = 'Toplam';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'Hiçbiri';
 
$text['capacity'] = 'Kapasite';
 
$text['template'] = 'Arayüz';
$text['language'] = 'Dil';
$text['submit'] = 'Gönder';
$text['created'] = 'Yaratan';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'gün';
$text['hours'] = 'saat';
$text['minutes'] = 'dakika';
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
?>
/gestion/phpsysinfo/includes/lang/ru.php
0,0 → 1,108
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: ru.php,v 1.0 2002/06/26 11:05:32
// Translated by Voldar (voldar@quality.s2.ru)
 
$charset = 'cp1251';
$text['title'] = 'Ñèñòåìíàÿ èíôîðìàöèÿ';
 
$text['vitals'] = 'Îñíîâíûå äàííûå';
$text['hostname'] = 'Èìÿ õîñòà';
$text['ip'] = 'Ïðîñëóøèâàåìûé IP';
$text['kversion'] = 'Âåðñèÿ ÿäðà';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Âðåìÿ ðàáîòû';
$text['users'] = 'Ïîëüçîâàòåëåé â ñèñòåìå';
$text['loadavg'] = 'Ñðåäíÿÿ çàãðóçêà';
 
$text['hardware'] = 'Àïïàðàòíîå îáåñïå÷åíèå';
$text['numcpu'] = 'Ïðîöåññîðû';
$text['cpumodel'] = 'Ìîäåëü';
$text['cpuspeed'] = 'Ñêîðîñòü ïðîöåññîðà MHz';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Ðàçìåð êåøà';
$text['bogomips'] = 'System Bogomips';
 
$text['pci'] = 'Óñòðîéñòâà PCI';
$text['ide'] = 'Óñòðîéñòâà IDE';
$text['scsi'] = 'Óñòðîéñòâà SCSI';
$text['usb'] = 'Óñòðîéñòâà USB';
 
$text['netusage'] = 'Èñïîëüçîâàíèå ñåòè';
$text['device'] = 'Óñòðîéñòâî';
$text['received'] = 'Ïîëó÷åíî';
$text['sent'] = 'Îòïðàâëåíî';
$text['errors'] = 'Îøèáîê';
 
$text['connections'] = 'Óñòàíîâëåííûå ñåòåâûå ñîåäèíåíèÿ';
 
$text['memusage'] = 'Èñïîëüçîâàíèå ïàìÿòè';
$text['phymem'] = 'Ôèçè÷åñêàÿ ïàìÿòü';
$text['swap'] = 'Ôàéë ïîäêà÷êè';
 
$text['fs'] = 'Ñìîíòèðîâàííûå ôàéëîâûå ñèñòåìû';
$text['mount'] = 'Òî÷êà ìîíòèðîâàíèÿ';
$text['partition'] = 'Ðàçäåë';
 
$text['percent'] = 'Ïðîöåíò èñïîëüçîâàíèÿ';
$text['type'] = 'Òèï';
$text['free'] = 'Ñâîáîäíî';
$text['used'] = 'Çàíÿòî';
$text['size'] = 'Ðàçìåð';
$text['totals'] = 'Âñåãî';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'îòñóòñòâóåò';
 
$text['capacity'] = 'Ðàçìåð';
 
$text['template'] = 'Øàáëîí';
$text['language'] = 'ßçûê';
$text['submit'] = 'Ïðèìåíèòü';
$text['created'] = 'Ñîçäàíî';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'äíåé';
$text['hours'] = 'hours';
$text['minutes'] = 'minutes';
 
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
?>
/gestion/phpsysinfo/includes/lang/tw.php
0,0 → 1,107
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: tw.php,v 1.18 2007/02/18 19:11:31 bigmichi1 Exp $
 
$charset = 'big5';
 
$text['title'] = '¨t²Î¸ê°T';
 
$text['vitals'] = '¨t²Î¥D­n°T®§';
$text['hostname'] = '¥D¾÷¦WºÙ';
$text['ip'] = '¥D¾÷¹ï¥~ IP';
$text['kversion'] = '®Ö¤ßª©¥»';
$text['dversion'] = 'Distro Name';
$text['uptime'] = '¶}¾÷®É¶¡';
$text['users'] = '½u¤W¨Ï¥ÎªÌ';
$text['loadavg'] = '¥­§¡­t¸ü';
 
$text['hardware'] = 'µwÅé¸ê°T';
$text['numcpu'] = '³B²z¾¹¼Æ¶q';
$text['cpumodel'] = 'CPU«¬¸¹';
$text['cpuspeed'] = '´¹¤ù³t«×';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = '§Ö¨ú¤j¤p';
$text['bogomips'] = '¨t²Î Bogomips';
 
$text['pci'] = 'PCI ³]³Æ';
$text['ide'] = 'IDE ³]³Æ';
$text['scsi'] = 'SCSI ³]³Æ';
$text['usb'] = 'USB ³]³Æ';
 
$text['netusage'] = 'ºô¸ô¨Ï¥Î¶q';
$text['device'] = 'ºô¸ô³]³Æ';
$text['received'] = '±µ¦¬';
$text['sent'] = '°e¥X';
$text['errors'] = '¿ù»~/¤¤Â_';
 
$text['memusage'] = '°O¾ÐÅé¨Ï¥Î¶q';
$text['phymem'] = '¹êÅé°O¾ÐÅé';
$text['swap'] = 'µêÀÀ°O¾ÐÅé(ºÏºÐ¸m´«)';
 
$text['fs'] = '¤w±¾¸üÀɮרt²Î';
$text['mount'] = '±¾¸ü¸ô®|';
$text['partition'] = '¤À³ÎºÏ°Ï';
 
$text['percent'] = '¨Ï¥Î¶q¦Ê¤À¤ñ';
$text['type'] = '«¬ºA';
$text['free'] = '³Ñ¾lªÅ¶¡';
$text['used'] = '¤w¨Ï¥Î';
$text['size'] = 'Á`®e¶q';
$text['totals'] = 'Á`¨Ï¥Î¶q';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'µL';
 
$text['capacity'] = '®e¶q';
 
$text['template'] = '½d¥»';
$text['language'] = '»y¨¥';
$text['submit'] = '°e¥X';
$text['created'] = '²£¥Í¥Ñ';
$text['locale'] = 'zh_TW.Big5';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = '¤Ñ';
$text['hours'] = '¤p®É';
$text['minutes'] = '¤ÀÄÁ';
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
$text['connections'] = 'Established Network Connections';
?>
/gestion/phpsysinfo/includes/lang/id.php
0,0 → 1,107
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: id.php,v 1.18 2007/02/18 19:11:31 bigmichi1 Exp $
// Translated by: Firman Pribadi <http://ragiel.dhs.org>
 
$text['title'] = 'Informasi Sistem';
 
$text['vitals'] = 'Informasi Utama';
$text['hostname'] = 'Hostname Resmi';
$text['ip'] = 'IP Penerima';
$text['kversion'] = 'Versi Kernel';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Aktif Selama';
$text['users'] = 'Pengguna Saat Ini';
$text['loadavg'] = 'Beban Rata-rata';
 
$text['hardware'] = 'Informasi Perangkat Keras';
$text['numcpu'] = 'Prosesor';
$text['cpumodel'] = 'Model';
$text['cpuspeed'] = 'CPU Speed';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Ukuran Cache';
$text['bogomips'] = 'Sistem Bogomips';
 
$text['pci'] = 'Perangkat PCI';
$text['ide'] = 'Perangkat IDE';
$text['scsi'] = 'Perangkat SCSI';
$text['usb'] = 'Perangkat USB';
 
$text['netusage'] = 'Status Penggunaan Jaringan';
$text['device'] = 'Perangkat';
$text['received'] = 'Diterima';
$text['sent'] = 'Dikirim';
$text['errors'] = 'Rusak/Drop';
 
$text['connections'] = 'Koneksi Jaringan Aktif';
 
$text['memusage'] = 'Status Penggunaan Memori';
$text['phymem'] = 'Memori Fisik';
$text['swap'] = 'Swap HardDisk';
 
$text['fs'] = 'Status Penggunaan Media Penyimpanan dan Filesystem';
$text['mount'] = 'Titik Mount';
$text['partition'] = 'Partisi';
 
$text['percent'] = 'Digunakan (Persen)';
$text['type'] = 'Tipe';
$text['free'] = 'Bebas';
$text['used'] = 'Digunakan';
$text['size'] = 'Ukuran';
$text['totals'] = 'Total';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'tidak ditemukan';
 
$text['capacity'] = 'Kapasitas';
 
$text['template'] = 'Template';
$text['language'] = 'Bahasa';
$text['submit'] = 'Gunakan';
$text['created'] = 'Dibangun menggunakan';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'hari';
$text['hours'] = 'jam';
$text['minutes'] = 'menit';
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
?>
/gestion/phpsysinfo/includes/lang/cn.php
0,0 → 1,106
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: cn.php,v 1.17 2007/02/18 19:11:31 bigmichi1 Exp $
 
$charset = 'gb2312';
 
$text['title'] = 'ϵͳÐÅÏ¢';
$text['vitals'] = 'ϵͳÖ÷ÒªÐÅÏ¢';
$text['hostname'] = 'Ö÷»úÃû³Æ';
$text['ip'] = 'Ö÷»ú¶ÔÍâIP';
$text['kversion'] = 'Äں˰汾';
$text['dversion'] = 'Distro Name';
$text['uptime'] = '¿ª»úʱ¼ä';
$text['users'] = 'ÔÚÏßʹÓÃÕß';
$text['loadavg'] = 'ƽ¾ù¸ºÔØ';
 
$text['hardware'] = 'Ó²¼þÐÅÏ¢';
$text['numcpu'] = '´¦ÀíÆ÷ÊýÁ¿';
$text['cpumodel'] = 'CPUÐͺÅ';
$text['cpuspeed'] = 'оƬËÙ¶È';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Cache´óС';
$text['bogomips'] = 'ϵͳBogomips';
 
$text['pci'] = 'PCIÉ豸';
$text['ide'] = 'IDEÉ豸';
$text['scsi'] = 'SCSIÉ豸';
$text['usb'] = 'USBÉ豸';
 
$text['netusage'] = 'ÍøÂ縺ÔØ';
$text['device'] = 'ÍøÂçÉ豸';
$text['received'] = '½ÓÊÕ';
$text['sent'] = 'Ëͳö';
$text['errors'] = '´íÎó/ÖжÏ';
 
$text['memusage'] = 'ÄÚ´æʹÓÃÁ¿';
$text['phymem'] = 'ÎïÀíÄÚ´æ';
$text['swap'] = 'ÐéÄâÄÚ´æ(½»»»·ÖÇø)';
 
$text['fs'] = 'ÒѹÒÔØ·ÖÇø';
$text['mount'] = '¹ÒÔØ·¾¶';
$text['partition'] = 'ÎïÀí´ÅÅÌ';
 
$text['percent'] = 'ʹÓÃÁ¿°Ù·Ö±È';
$text['type'] = 'ÎļþϵͳÀàÐÍ';
$text['free'] = 'Ê£Óà¿Õ¼ä';
$text['used'] = 'ÒÑÓÿռä';
$text['size'] = '×ÜÈÝÁ¿';
$text['totals'] = '×ÜʹÓÃÁ¿';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'ÎÞ';
 
$text['capacity'] = 'ÈÝÁ¿';
 
$text['template'] = 'Ö÷Ìâ';
$text['language'] = 'ÓïÑÔ';
$text['submit'] = 'È·¶¨';
$text['created'] = 'Éú³É By';
$text['locale'] = 'zh_CN.eucCN';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'Ìì';
$text['hours'] = 'Сʱ';
$text['minutes'] = '·ÖÖÓ';
 
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
$text['connections'] = 'Established Network Connections';
?>
/gestion/phpsysinfo/includes/lang/cs.php
0,0 → 1,107
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: cs.php,v 1.18 2007/02/18 19:11:31 bigmichi1 Exp $
 
$charset = 'iso-8859-2';
 
$text['title'] = 'Informace o systému';
 
$text['vitals'] = 'Základní informace';
$text['hostname'] = 'Jméno poèítaèe';
$text['ip'] = 'IP adresa';
$text['kversion'] = 'Verze jádra';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Uptime';
$text['users'] = 'Pøihlá¹ených u¾ivatelù';
$text['loadavg'] = 'Prùmìrná zátì¾';
 
$text['hardware'] = 'Hardwarové informace';
$text['numcpu'] = 'Procesory';
$text['cpumodel'] = 'Model';
$text['cpuspeed'] = 'Frekvence';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Velikost cache';
$text['bogomips'] = 'Bogomipsy';
 
$text['pci'] = 'PCI zaøízení';
$text['ide'] = 'IDE zaøízení';
$text['scsi'] = 'SCSI zaøízení';
$text['usb'] = 'USB zaøízení';
 
$text['netusage'] = 'Pou¾ívání sítì';
$text['device'] = 'Zaøízení';
$text['received'] = 'Pøijato';
$text['sent'] = 'Odesláno';
$text['errors'] = 'Chyby/Vypu¹tìno';
 
$text['memusage'] = 'Obsazení pamìti';
$text['phymem'] = 'Fyzická pamì»';
$text['swap'] = 'Swap';
 
$text['fs'] = 'Pøipojené souborové systémy';
$text['mount'] = 'Adresáø';
$text['partition'] = 'Oddíl';
 
$text['percent'] = 'Obsazeno';
$text['type'] = 'Typ';
$text['free'] = 'Volno';
$text['used'] = 'Pou¾ito';
$text['size'] = 'Velikost';
$text['totals'] = 'Celkem';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = '¾ádná';
 
$text['capacity'] = 'Kapacita';
 
$text['template'] = '©ablona';
$text['language'] = 'Jazyk';
$text['submit'] = 'Odeslat';
$text['created'] = 'Vytvoøeno pomocí';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'dnù';
$text['hours'] = 'hodin';
$text['minutes'] = 'minut';
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
$text['connections'] = 'Established Network Connections';
?>
/gestion/phpsysinfo/includes/lang/ct.php
0,0 → 1,104
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: ct.php,v 1.17 2007/02/18 19:11:31 bigmichi1 Exp $
 
$text['title'] = 'Informaci&oacute; del Sistema';
 
$text['vitals'] = 'Vitals del Sistema';
$text['hostname'] = 'Nom Canònic';
$text['ip'] = 'Adreça IP';
$text['kversion'] = 'Versi&oacute; del Kernel';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Temps Aixecat';
$text['users'] = 'Usuaris Actuals';
$text['loadavg'] = 'Càrrega Promitg';
 
$text['hardware'] = 'Informaci&oacute; del Maquinari';
$text['numcpu'] = 'Processadors';
$text['cpumodel'] = 'Model';
$text['cpuspeed'] = 'Xip MHz';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Tamany Memòria Cau';
$text['bogomips'] = 'Bogomips';
 
$text['pci'] = 'Dispositius PCI';
$text['ide'] = 'Dispositius IDE';
$text['scsi'] = 'Dispositius SCSI';
$text['usb'] = 'Dispositius USB';
 
$text['netusage'] = 'Ús de la Xarxa';
$text['device'] = 'Dispositiu';
$text['received'] = 'Rebuts';
$text['sent'] = 'Enviats';
$text['errors'] = 'Errors/Perduts';
 
$text['memusage'] = 'Ús de la Memòria';
$text['phymem'] = 'Memòria F&iacute;sica';
$text['swap'] = 'Disc d\'Swap';
 
$text['fs'] = 'Sistemes d\'Arxius Muntats';
$text['mount'] = 'Muntat';
$text['partition'] = 'Partició';
$text['percent'] = 'Percentatge de Capacitat';
$text['type'] = 'Tipus';
$text['free'] = 'Lliure';
$text['used'] = 'Emprat';
$text['size'] = 'Tamany';
$text['totals'] = 'Totals';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'cap';
 
$text['capacity'] = 'Capacitat';
$text['template'] = 'Plantilla';
$text['language'] = 'Llengüa';
$text['submit'] = 'Enviar';
$text['created'] = 'Creat per';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'dies';
$text['hours'] = 'hores';
$text['minutes'] = 'minuts';
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
$text['connections'] = 'Established Network Connections';
?>
/gestion/phpsysinfo/includes/lang/pa_utf8.php
0,0 → 1,108
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: pa_utf8.php,v 1.6 2007/02/18 19:11:31 bigmichi1 Exp $
 
$charset = 'utf-8';
 
$text['title'] = 'ਸਿਸਟਮ ਜਾਣਕਾਰੀ';
 
$text['vitals'] = 'ਸਿਸਟਮ ਮਾਰਕਮ';
$text['hostname'] = 'ਮੇਜ਼ਬਾਨ ਨਾਂ';
$text['ip'] = 'ਸੁਣਨ IP';
$text['kversion'] = 'ਕਰਨਲ ਵਰਜਨ';
$text['dversion'] = 'ਵੰਡ ਨਾਂ';
$text['uptime'] = 'ਚੱਲਣ ਸਮਾਂ';
$text['users'] = 'ਕੁੱਲ ਉਪਭੋਗੀ';
$text['loadavg'] = 'ਔਸਤ ਲੋਡ';
 
$text['hardware'] = 'ਜੰਤਰ ਜਾਣਕਾਰੀ';
$text['numcpu'] = 'ਪਰੋਸੈਸਰ';
$text['cpumodel'] = 'ਮਾਡਲ';
$text['cpuspeed'] = 'CPU ਗਤੀ';
$text['busspeed'] = 'ਬਸ ਗਤੀ';
$text['cache'] = 'ਕੈਂਚੇ ਅਕਾਰ';
$text['bogomips'] = 'ਸਿਸਟਮ Bogomips';
 
$text['pci'] = 'PCI ਜੰਤਰ';
$text['ide'] = 'IDE ਜੰਤਰ';
$text['scsi'] = 'SCSI ਜੰਤਰ';
$text['usb'] = 'USB ਜੰਤਰ';
 
$text['netusage'] = 'ਨੈੱਟਵਰਕ ਵਰਤੋਂ';
$text['device'] = 'ਜੰਤਰ';
$text['received'] = 'ਪਰਾਪਤ ਹੋਇਆ';
$text['sent'] = 'ਭੇਜਿਆ';
$text['errors'] = 'ਗਲਤੀ/ਸੁੱਟੇ';
 
$text['connections'] = 'ਸਥਾਪਤ ਨੈੱਟਵਰਕ ਕੁਨੈਕਸ਼ਨ';
 
$text['memusage'] = 'ਮੈਮੋਰੀ ਵਰਤੋਂ';
$text['phymem'] = 'ਭੌਤਿਕ ਮੈਮੋਰੀ';
$text['swap'] = 'ਡਿਸਕ ਸਵੈਪ';
 
$text['fs'] = 'ਮਾਊਂਟ ਕੀਤੇ ਫਾਇਲ ਸਿਸਟਮ';
$text['mount'] = 'ਮਾਊਂਟ';
$text['partition'] = 'ਭਾਗ';
 
$text['percent'] = 'ਫ਼ੀ-ਸਦੀ ਸਮੱਰਥਾ';
$text['type'] = 'ਕਿਸਮ';
$text['free'] = 'ਮੁਕਤ (ਖਾਲੀ)';
$text['used'] = 'ਵਰਤੀ';
$text['size'] = 'ਅਕਾਰ';
$text['totals'] = 'ਕੁੱਲ';
 
$text['kb'] = 'ਕਿਬਾ';
$text['mb'] = 'ਮੈਬਾ';
$text['gb'] = 'ਗੈਬਾ';
 
$text['none'] = 'ਕੋਈ ਨਹੀਂ';
 
$text['capacity'] = 'ਸਮੱਰਥਾ';
 
$text['template'] = 'ਨਮੂਨਾ';
$text['language'] = 'ਭਾਸ਼ਾ';
$text['submit'] = 'ਪੇਸ਼ ਕਰੋੇ';
$text['created'] = 'ਬਣਾਇਆ';
$text['locale'] = 'pa';
$text['gen_time'] = '%b %d, %Y ਨੂੰ %I:%M %p ਵਜੇ';
 
$text['days'] = 'ਦਿਨ';
$text['hours'] = 'ਘੰਟੇ';
$text['minutes'] = 'ਮਿੰਟ';
 
$text['temperature'] = 'ਤਾਪਮਾਨ';
$text['voltage'] = 'ਵੋਲਟੇਜ਼';
$text['fans'] = 'ਪੱਖੇ';
$text['s_value'] = 'ਮੁੱਲ';
$text['s_min'] = 'ਘੱਟੋ-ਘੱਟ';
$text['s_max'] = 'ਵੱਧੋ-ਵੱਧ';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'ਸੀਮਾ';
$text['s_label'] = 'ਲੇਬਲ';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
?>
/gestion/phpsysinfo/includes/lang/es.php
0,0 → 1,105
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: es.php,v 1.20 2007/02/18 19:11:31 bigmichi1 Exp $
 
$text['title'] = 'Informaci&oacute;n Del Sistema';
 
$text['vitals'] = 'Vitales';
$text['hostname'] = 'Nombre Del Sistema';
$text['ip'] = 'Direcci&oacute;n IP';
$text['kversion'] = 'Versi&oacute;n Del N&uacute;cleo';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Uptime';
$text['users'] = 'Usuarios Actuales';
$text['loadavg'] = 'Promedio De Uso';
 
$text['hardware'] = 'Informaci&oacute;n Del Hardware';
$text['numcpu'] = 'Procesadores';
$text['cpumodel'] = 'Modelo';
$text['cpuspeed'] = 'Frecuencia';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Tama&ntilde;o Del Cach&eacute;';
$text['bogomips'] = 'Bogomips';
 
$text['pci'] = 'Dispositivos PCI';
$text['ide'] = 'Dispositivos IDE';
$text['scsi'] = 'Dispositivos SCSI';
$text['usb'] = 'Dispositivos USB';
 
$text['netusage'] = 'Utilizaci&oacute;n De La Red';
$text['device'] = 'Dispositivo';
$text['received'] = 'Recibidos';
$text['sent'] = 'Enviados';
$text['errors'] = 'Errores/Perdidos';
 
$text['memusage'] = 'Utilizaci&oacute;n De La Memoria';
$text['phymem'] = 'Memoria F&iacute;sica';
$text['swap'] = 'Memoria De Intercambio';
 
$text['fs'] = 'Sistemas De Archivos';
$text['mount'] = 'Punto De Montaje';
$text['partition'] = 'Partici&oacute;n';
 
$text['percent'] = 'Porcentaje De Uso';
$text['type'] = 'Tipo';
$text['free'] = 'Libre';
$text['used'] = 'Usado';
$text['size'] = 'Tama&ntilde;o';
$text['totals'] = 'Totales';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'Ninguno';
 
$text['capacity'] = 'Capacidad';
 
$text['template'] = 'Plantilla';
$text['language'] = 'Idioma';
$text['submit'] = 'Enviar';
$text['created'] = 'Creado por';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'd&iacute;as';
$text['hours'] = 'horas';
$text['minutes'] = 'minutos';
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
$text['connections'] = 'Established Network Connections';
?>
/gestion/phpsysinfo/includes/lang/et.php
0,0 → 1,105
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: et.php,v 1.21 2007/02/18 19:11:31 bigmichi1 Exp $
 
$text['title'] = 'S&uuml;steemi informatsioon';
 
$text['vitals'] = 'System Vital';
$text['hostname'] = 'Kanooniline masinanimi';
$text['ip'] = 'Vastav IP';
$text['kversion'] = 'Kerneli versioon';
$text['dversion'] = 'Distro nimi';
$text['uptime'] = 'Masin elus juba';
$text['users'] = 'Hetkel kasutajaid';
$text['loadavg'] = 'Koormuse keskmised';
 
$text['hardware'] = 'Riistvara informatsioon';
$text['numcpu'] = 'Protsessoreid';
$text['cpumodel'] = 'Mudel';
$text['cpuspeed'] = 'Taktsagedus MHz';
$text['busspeed'] = 'Siinikiirus';
$text['cache'] = 'Vahem&auml;lu suurus';
$text['bogomips'] = 'S&uuml;steemi BogoMIPS';
 
$text['pci'] = 'PCI-seadmed';
$text['ide'] = 'IDE-seadmed';
$text['scsi'] = 'SCSI-seadmed';
$text['usb'] = 'USB-seadmed';
 
$text['netusage'] = 'V&otilde;rguteenuse kasutamine';
$text['device'] = 'Seade';
$text['received'] = 'Saadud';
$text['sent'] = 'Saadetud';
$text['errors'] = 'Vigu/H&uuml;ljatud';
 
$text['memusage'] = 'M&auml;lu kasutamine';
$text['phymem'] = 'F&uuml;&uuml;siline m&auml;lu';
$text['swap'] = 'Saalem&auml;lu kettal';
 
$text['fs'] = '&Uuml;hendatud failis&uuml;steemid';
$text['mount'] = '&Uuml;hendus';
$text['partition'] = 'Partitsioon';
 
$text['percent'] = 'Protsendiline h&otilde;ivatus';
$text['type'] = 'T&uuml;&uuml;p';
$text['free'] = 'Vaba';
$text['used'] = 'Kasutusel';
$text['size'] = 'Suurus';
$text['totals'] = 'Kokku';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'puudub';
 
$text['capacity'] = 'H&otilde;ivatus';
$text['template'] = 'Mall';
$text['language'] = 'Keel';
$text['submit'] = 'Kehtesta';
$text['created'] = 'Looja:';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'p&auml;eva';
$text['hours'] = 'tundi';
$text['minutes'] = 'minutit';
$text['temperature'] = 'Temperatuur';
$text['voltage'] = 'Pinge';
$text['fans'] = 'Ventilaatorid';
$text['s_value'] = 'V&auml;&auml;rtus';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'H&uuml;sterees';
$text['s_limit'] = 'Limiit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + rakendused';
$text['buffers'] = 'Puhvrid';
$text['cached'] = 'Vahem&auml;lus';
 
$text['connections'] = 'Established Network Connections';
?>
/gestion/phpsysinfo/includes/lang/gr.php
0,0 → 1,108
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: gr.php,v 1.15 2007/02/18 19:11:31 bigmichi1 Exp $
 
$charset = "iso-8895-7";
 
$text['title'] = 'Ðëçñïöïñßåò ÓõóôÞìáôïò';
 
$text['vitals'] = '×áñáêôçñéóôéêÜ ÓõóôÞìáôïò';
$text['hostname'] = '¼íïìá ÕðïëïãéóôÞ';
$text['ip'] = 'Äéåõèõíóç ÉÑ';
$text['kversion'] = 'Åêäïóç ÐõñÞíá';
$text['dversion'] = 'Distro Name';
$text['uptime'] = '×ñüíïò Ëåéôïõñãßáò ÓõóôÞìáôïò';
$text['users'] = 'ÓõíäåìÝíïé ×ñÞóôåò';
$text['loadavg'] = 'Load Average';
 
$text['hardware'] = 'Ðëçñïöïñßåò Õëéêïý';
$text['numcpu'] = 'ÅðåîåñãáóôÝò';
$text['cpumodel'] = 'ÌïíôÝëï';
$text['cpuspeed'] = 'Ôá÷ýôçôá MHz';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'ÌÝãåèïò ÌíÞìçò Cache';
$text['bogomips'] = 'ÅðåîåñãáóôéêÞ Éó÷ýò óå Bogomips';
 
$text['pci'] = 'ÓõóêåõÝò PCI';
$text['ide'] = 'ÓõóêåõÝò IDE';
$text['scsi'] = 'ÓõóêåõÝò SCSI';
$text['usb'] = 'ÓõóêåõÝò USB';
 
$text['netusage'] = '×ñÞóç Äéêôýïõ';
$text['device'] = 'ÓõóêåõÞ';
$text['received'] = 'Ëáìâáíüìåíá';
$text['sent'] = 'ÁðïóôáëìÝíá';
$text['errors'] = 'ÓöÜëìáôá';
 
$text['connections'] = 'ÅíåñãÝò ÓõíäÝóçò Äéêôýïõ';
 
$text['memusage'] = '×ñÞóç ÌíÞìçò';
$text['phymem'] = 'ÌíÞìç Physical';
$text['swap'] = 'Äßóêïò Swap';
 
$text['fs'] = 'ÐñïóáñôçìÝíá ÓõóôÞìáôá Áñ÷åßùí';
$text['mount'] = 'ÐñïóÜñôçóç';
$text['partition'] = 'ÊáôÜôìçóç';
 
$text['percent'] = '×ùñçôéêüôçôá %';
$text['type'] = 'Ôýðïò';
$text['free'] = 'Åëåýèåñá';
$text['used'] = 'Óå ÷ñÞóç';
$text['size'] = 'ÌÝãåèïò';
$text['totals'] = 'ÓõíïëéêÜ';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = '-';
 
$text['capacity'] = '×ùñçôéêüôçôá';
 
$text['template'] = 'ÈÝìá';
$text['language'] = 'Ãëþóóá';
$text['submit'] = 'ÕðïâïëÞ';
$text['created'] = 'ÄçìéïõñãÞèçêå áðü ôï';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'ìÝñåò';
$text['hours'] = 'þñåò';
$text['minutes'] = 'ëåðôÜ';
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
?>
/gestion/phpsysinfo/includes/lang/ko.php
0,0 → 1,108
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: ko.php,v 1.17 2007/02/18 19:11:31 bigmichi1 Exp $
// Translated by Sungkook KIM - ace@aceteam.org
 
$charset = 'euc-kr';
 
$text['title'] = '½Ã½ºÅÛ Á¤º¸';
 
$text['vitals'] = 'ÇöÀç ½Ã½ºÅÛ »óȲ';
$text['hostname'] = '½Ã½ºÅÛÀÇ È£½ºÆ®³×ÀÓ';
$text['ip'] = '½Ã½ºÅÛÀÇ IP ÁÖ¼Ò';
$text['kversion'] = 'Ä¿³Î ¹öÁ¯';
$text['dversion'] = 'Distro Name';
$text['uptime'] = '½ÇÇà ½Ã°£';
$text['users'] = 'ÇöÀç Á¢¼ÓÀÚ ¼ö';
$text['loadavg'] = 'Æò±Õ ·Îµå';
 
$text['hardware'] = 'Çϵå¿þ¾î Á¤º¸';
$text['numcpu'] = 'ÇÁ·Î¼¼¼­ °¹¼ö';
$text['cpumodel'] = 'ÇÁ·Î¼¼¼­ ¸ðµ¨';
$text['cpuspeed'] = 'Ĩ¼Â Ŭ·°';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Äɽ¬ »çÀÌÁî';
$text['bogomips'] = 'ÀÚüÅ×½ºÆ® Ŭ·°';
 
$text['pci'] = 'PCI ÀåÄ¡';
$text['ide'] = 'IDE ÀåÄ¡';
$text['scsi'] = 'SCSI ÀåÄ¡';
$text['usb'] = 'USB ÀåÄ¡';
 
$text['netusage'] = ' ³×Æ®¿öÅ© »ç¿ëÁ¤º¸';
$text['device'] = 'ÀåÄ¡';
$text['received'] = '¹ÞÀº ·®';
$text['sent'] = 'º¸³½ ·®';
$text['errors'] = '¿¡·¯ / ½ÇÆÐ';
 
$text['memusage'] = '¸Þ¸ð¸® »ç¿ë·®';
$text['phymem'] = '¹°¸®Àû ¸Þ¸ð¸®';
$text['swap'] = '½º¿Ò µð½ºÅ©';
 
$text['fs'] = '¸¶¿îÆ® ÇöȲ';
$text['mount'] = '¸¶¿îÆ®';
$text['partition'] = 'ÆÄƼ¼Ç';
 
$text['percent'] = ' ÆÛ¼¾Æ®';
$text['type'] = 'ŸÀÔ';
$text['free'] = '³²Àº·®';
$text['used'] = '»ç¿ë·®';
$text['size'] = 'ÃÑ ¿ë·®';
$text['totals'] = 'ÇÕ°è';
 
$text['kb'] = 'ų·Î¹ÙÀÌÆ®(KB)';
$text['mb'] = '¸Þ°¡¹ÙÀÌÆ®(MB)';
$text['gb'] = '±â°¡¹ÙÀÌÆ®(GB)';
 
$text['none'] = '¾øÀ½';
 
$text['capacity'] = '¿ë·®';
 
$text['template'] = 'ÅÛÇø´';
$text['language'] = '¾ð¾î';
$text['submit'] = 'Àû¿ë';
$text['created'] = '¸¸µçÀÌ';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'ÀÏ';
$text['hours'] = '½Ã';
$text['minutes'] = 'ºÐ';
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
$text['connections'] = 'Established Network Connections';
?>
/gestion/phpsysinfo/includes/lang/eu.php
0,0 → 1,106
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: eu.php,v 1.16 2007/02/18 19:11:31 bigmichi1 Exp $
 
$text['title'] = 'Sistemaren Informazioa';
 
$text['vitals'] = 'Sistema';
$text['hostname'] = 'Zerbitzariaren izen Kanonikoa';
$text['ip'] = 'Entzuten duen IP-a';
$text['kversion'] = 'Kernel Bertsioa';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Piztutako denbora';
$text['users'] = 'Uneko Erabiltzaileak';
$text['loadavg'] = 'Karga ertainak';
 
$text['hardware'] = 'Hardwarezko Informazioa';
$text['numcpu'] = 'Prozasatzailea';
$text['cpumodel'] = 'Modeloa';
$text['cpuspeed'] = 'Txip MHz';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Cache tamaina';
$text['bogomips'] = 'Sistemare Bogomips-ak';
 
$text['pci'] = 'PCI Dispositiboak';
$text['ide'] = 'IDE Dispositiboak';
$text['scsi'] = 'SCSI Dispositiboak';
$text['usb'] = 'USB Dispositiboak';
 
$text['netusage'] = 'Sarearen Erabilera';
$text['device'] = 'Dispositiboa';
$text['received'] = 'Jasotakoa';
$text['sent'] = 'Bidalitakoa';
$text['errors'] = 'Err/Huts';
 
$text['connections'] = 'Established Network Connections';
 
$text['memusage'] = 'Memoriaren Erabilpena';
$text['phymem'] = 'Memoria Fisikoa';
$text['swap'] = 'Disko Memoria';
 
$text['fs'] = 'Montatutako Fitxategi-sistemak';
$text['mount'] = 'Non montatuta';
$text['partition'] = 'Partizioa';
 
$text['percent'] = 'Ehunekoa';
$text['type'] = 'Mota';
$text['free'] = 'Aske';
$text['used'] = 'Erabilita';
$text['size'] = 'Tamaina';
$text['totals'] = 'Guztira';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'ezer ez';
 
$text['capacity'] = 'Kapazitatea';
 
$text['template'] = 'Txantiloia';
$text['language'] = 'Langoaia';
$text['submit'] = 'Bidali';
$text['created'] = 'Sortzailea: ';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'egun';
$text['hours'] = 'ordu';
$text['minutes'] = 'minutu';
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
?>
/gestion/phpsysinfo/includes/lang/is.php
0,0 → 1,105
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: is.php,v 1.18 2007/02/18 19:11:31 bigmichi1 Exp $
 
$text['title'] = 'Kerfisupplýsingar';
 
$text['vitals'] = 'Helstu upplýsingar';
$text['hostname'] = 'Vélarnafn';
$text['ip'] = 'IP-tala';
$text['kversion'] = 'Útgáfa kjarna';
$text['dversion'] = 'Nafn dreifingar';
$text['uptime'] = 'Uppitími';
$text['users'] = 'Notendur';
$text['loadavg'] = 'Meðalálag';
 
$text['hardware'] = 'Upplýsingar um vélbúnað';
$text['numcpu'] = 'Fjöldi örgjörva';
$text['cpumodel'] = 'Tegund';
$text['cpuspeed'] = 'Hraði';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Stærð flýtiminnis';
$text['bogomips'] = 'Bogomips';
 
$text['pci'] = 'PCI jaðartæki';
$text['ide'] = 'IDE jaðartæki';
$text['scsi'] = 'SCSI jaðartæki';
$text['usb'] = 'USB jaðartæki';
 
$text['netusage'] = 'Netnotkun';
$text['device'] = 'Jaðartæki';
$text['received'] = 'Móttekið';
$text['sent'] = 'Sent';
$text['errors'] = 'Villur/Hent';
 
$text['memusage'] = 'Minnisnotkun';
$text['phymem'] = 'Vinnsluminni';
$text['swap'] = 'Sýndarminni';
 
$text['fs'] = 'Tengd skráarkerfi';
$text['mount'] = 'Tengipunktur';
$text['partition'] = 'Disksneið';
 
$text['percent'] = 'Hlutfall af heildarstærð';
$text['type'] = 'Tegund';
$text['free'] = 'Laust';
$text['used'] = 'Notað';
$text['size'] = 'Stærð';
$text['totals'] = 'Samtals';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'ekkert';
 
$text['capacity'] = 'Heildarstærð';
 
$text['template'] = 'Sniðmát';
$text['language'] = 'Tungumál';
$text['submit'] = 'Senda';
$text['created'] = 'Búið til af';
$text['locale'] = 'is_IS';
$text['gen_time'] = 'þann %d.%m.%Y kl. %H:%M';
 
$text['days'] = 'dagar';
$text['hours'] = 'klukkustundir';
$text['minutes'] = 'mínútur';
$text['temperature'] = 'Hitastig';
$text['voltage'] = 'Volt';
$text['fans'] = 'Viftur';
$text['s_value'] = 'Gildi';
$text['s_min'] = 'Lægst';
$text['s_max'] = 'Hæst';
$text['hysteresis'] = 'Aðvörun lýkur';
$text['s_limit'] = 'Aðvörun byrjar';
$text['s_label'] = 'Nafn mælis';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
$text['connections'] = 'Established Network Connections';
?>
/gestion/phpsysinfo/includes/lang/it.php
0,0 → 1,105
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: it.php,v 1.19 2007/02/18 19:11:31 bigmichi1 Exp $
 
$text['title'] = 'Informazioni sul Sistema';
 
$text['vitals'] = 'Informazioni Vitali';
$text['hostname'] = 'Nome Canonico';
$text['ip'] = 'Indirizzo IP';
$text['kversion'] = 'Versione del Kernel';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Tempo di Esercizio';
$text['users'] = 'Utenti Collegati';
$text['loadavg'] = 'Carico Medio';
 
$text['hardware'] = 'Informazioni Hardware';
$text['numcpu'] = 'Processori';
$text['cpumodel'] = 'Modello';
$text['cpuspeed'] = 'MHz del Chip';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Dimensione Cache';
$text['bogomips'] = 'Bogomips del Sistema';
 
$text['pci'] = 'Unità PCI';
$text['ide'] = 'Unità IDE';
$text['scsi'] = 'Unità SCSI';
$text['usb'] = 'Unità USB';
 
$text['netusage'] = 'Utilizzo della Rete';
$text['device'] = 'Device';
$text['received'] = 'Ricevuti';
$text['sent'] = 'Inviati';
$text['errors'] = 'Err/Drop';
 
$text['memusage'] = 'Utilizzo della Memoria';
$text['phymem'] = 'Memoria Fisica';
$text['swap'] = 'Disco di Swap';
 
$text['fs'] = 'Filesystem Montati';
$text['mount'] = 'Punto di Mount';
$text['partition'] = 'Partizione';
 
$text['percent'] = 'Uso Percentuale';
$text['type'] = 'Tipo';
$text['free'] = 'Libero';
$text['used'] = 'Usato';
$text['size'] = 'Dimensione';
$text['totals'] = 'Totali';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'none';
 
$text['capacity'] = 'Capacità';
$text['template'] = 'Template';
$text['language'] = 'Lingua';
$text['submit'] = 'Invia';
$text['created'] = 'Creato da';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'giorni';
$text['hours'] = 'ore';
$text['minutes'] = 'minuti';
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
$text['connections'] = 'Established Network Connections';
?>
/gestion/phpsysinfo/includes/lang/sk.php
0,0 → 1,107
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: sk.php,v 1.17 2007/02/18 19:11:31 bigmichi1 Exp $
 
$charset = 'iso-8859-2';
 
$text['title'] = 'Informácie o systéme';
 
$text['vitals'] = 'Základné informácie';
$text['hostname'] = 'Meno poèítaèa';
$text['ip'] = 'IP adresa';
$text['kversion'] = 'Verzia jadra';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Uptime';
$text['users'] = 'Prihlásených u¾ívateåov';
$text['loadavg'] = 'Priemer loadu';
 
$text['hardware'] = 'Hardwarové informácie';
$text['numcpu'] = 'Procesory';
$text['cpumodel'] = 'Model';
$text['cpuspeed'] = 'Frekvencia';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Veåkos» cache';
$text['bogomips'] = 'Bogomipsov';
 
$text['pci'] = 'PCI zariadenia';
$text['ide'] = 'IDE zariadenia';
$text['scsi'] = 'SCSI zariadenia';
$text['usb'] = 'USB zariadenia';
 
$text['netusage'] = 'Pou¾ívanie siete';
$text['device'] = 'Zariadenia';
$text['received'] = 'Prijatých';
$text['sent'] = 'Odoslaných';
$text['errors'] = 'Chyby/Vypustených';
 
$text['memusage'] = 'Obsadenie pamäti';
$text['phymem'] = 'Fyzická pamä»';
$text['swap'] = 'Swap';
 
$text['fs'] = 'Namountované súborové systémy';
$text['mount'] = 'Adresár';
$text['partition'] = 'Partícia';
 
$text['percent'] = 'Obsadených';
$text['type'] = 'Typ';
$text['free'] = 'Voåných';
$text['used'] = 'Pou¾itých';
$text['size'] = 'Veåkos»';
$text['totals'] = 'Celkom';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = '¾iadne';
 
$text['capacity'] = 'Kapacita';
 
$text['template'] = '©ablóna';
$text['language'] = 'Jazyk';
$text['submit'] = 'Odosla»';
$text['created'] = 'Vytvorené pomocou';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'dní';
$text['hours'] = 'hodín';
$text['minutes'] = 'minút';
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
$text['connections'] = 'Established Network Connections';
?>
/gestion/phpsysinfo/includes/lang/da.php
0,0 → 1,107
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: da.php,v 1.21 2007/02/18 19:11:31 bigmichi1 Exp $
 
# Translated by Jonas Koch Bentzen (understroem.dk).
 
$text['title'] = 'Systeminformation';
 
$text['vitals'] = 'Systemenheder';
$text['hostname'] = 'Konisk værtsnavn';
$text['ip'] = 'IP-adresse, der lyttes på';
$text['kversion'] = 'Kerne-version';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Oppetid';
$text['users'] = 'Antal brugere logget ind lige nu';
$text['loadavg'] = 'Ressourceforbrug - gennemsnit';
 
$text['hardware'] = 'Hardwareinformation';
$text['numcpu'] = 'Processorer';
$text['cpumodel'] = 'Model';
$text['cpuspeed'] = 'CPU Speed';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Cachestørrelse';
$text['bogomips'] = 'Bogomips';
 
$text['pci'] = 'PCI-enheder';
$text['ide'] = 'IDE-enheder';
$text['scsi'] = 'SCSI-enheder';
$text['usb'] = 'USB-enheder';
 
$text['netusage'] = 'Netværkstrafik';
$text['device'] = 'Enhed';
$text['received'] = 'Modtaget';
$text['sent'] = 'Afsendt';
$text['errors'] = 'Mislykket/tabt';
 
$text['memusage'] = 'Hukommelsesforbrug';
$text['phymem'] = 'Fysisk hukommelse';
$text['swap'] = 'Swap';
 
$text['fs'] = 'Monterede filsystemer';
$text['mount'] = 'Monteret på';
$text['partition'] = 'Partition';
 
$text['percent'] = 'Procent af kapaciteten';
$text['type'] = 'Type';
$text['free'] = 'Ledig';
$text['used'] = 'Brugt';
$text['size'] = 'Størrelse';
$text['totals'] = 'I alt';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'ingen';
 
$text['capacity'] = 'Kapacitet';
$text['template'] = 'Skabelon';
$text['language'] = 'Sprog';
$text['submit'] = 'Okay';
$text['created'] = 'Lavet af';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'dage';
$text['hours'] = 'timer';
$text['minutes'] = 'minutter';
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
$text['connections'] = 'Established Network Connections';
?>
/gestion/phpsysinfo/includes/lang/index.html
--- gestion/phpsysinfo/includes/lang/sr.php (nonexistent)
+++ gestion/phpsysinfo/includes/lang/sr.php (revision 40)
@@ -0,0 +1,107 @@
+<?php
+//
+// phpSysInfo - A PHP System Information Script
+// http://phpsysinfo.sourceforge.net/
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// $Id: sr.php,v 1.8 2007/02/18 19:11:31 bigmichi1 Exp $
+
+$charset = 'utf-8';
+
+$text['title'] = 'Спецификација Система ';
+
+$text['vitals'] = 'Систем';
+$text['hostname'] = 'Име домаћина';
+$text['ip'] = 'ИП адреса';
+$text['kversion'] = 'Верзија кернела';
+$text['dversion'] = 'Дицтрибуција';
+$text['uptime'] = 'Радно време';
+$text['users'] = 'Број корисника';
+$text['loadavg'] = 'Просечно оптерећење';
+
+$text['hardware'] = 'Хардверске компоненте';
+$text['numcpu'] = 'Процесор';
+$text['cpumodel'] = 'Moдел';
+$text['cpuspeed'] = 'CPU Speed';
+$text['busspeed'] = 'BUS Speed';
+$text['cache'] = 'Величина предмеморије';
+$text['bogomips'] = 'Богомипс';
+$text['usb'] = 'УСБ уређаји';
+$text['pci'] = 'ПЦИ уређаји';
+$text['ide'] = 'ИДЕ уређаји';
+$text['scsi'] = 'СЦСИ уређаји';
+
+$text['netusage'] = 'Мрежна Употреба';
+$text['device'] = 'Уређај';
+$text['received'] = 'Примљено';
+$text['sent'] = 'Послато';
+$text['errors'] = 'Грешке';
+
+$text['connections'] = 'Успостављене конекције';
+
+$text['memusage'] = 'Употреба меморије';
+$text['phymem'] = 'Тврда memorija';
+$text['swap'] = 'СВАП меморија';
+
+$text['fs'] = 'Монтирани фајл системи';
+$text['mount'] = 'Монтирани';
+$text['partition'] = 'Партиција';
+
+$text['percent'] = 'Проценти';
+$text['type'] = 'Врста';
+$text['free'] = 'Слободно';
+$text['used'] = 'Искоришћено';
+$text['size'] = 'Величина';
+$text['totals'] = 'Укупно';
+
+$text['kb'] = 'KB';
+$text['mb'] = 'MB';
+$text['gb'] = 'GB';
+
+$text['none'] = 'ezer ez';
+
+$text['capacity'] = 'Капацитет';
+
+$text['template'] = 'Tемплат';
+$text['language'] = 'Језик';
+$text['submit'] = 'Пошаљи';
+$text['created'] = 'Креирано: ';
+$text['locale'] = 'ср';
+$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
+
+$text['days'] = 'Дани';
+$text['hours'] = 'Сати';
+$text['minutes'] = 'Минути';
+
+$text['temperature'] = 'Температура';
+$text['voltage'] = 'Напајање';
+$text['fans'] = 'Вентилатори';
+$text['s_value'] = 'Снага';
+$text['s_min'] = 'Мин';
+$text['s_max'] = 'Mах';
+$text['hysteresis'] = 'Аларм';
+$text['s_limit'] = 'Лимит';
+$text['s_label'] = 'Име';
+$text['degreeC'] = '&deg;C';
+$text['degreeF'] = '&deg;F';
+$text['voltage_mark'] = 'V';
+$text['rpm_mark'] = 'RPM';
+
+$text['app'] = 'Kernel + applications';
+$text['buffers'] = 'Buffers';
+$text['cached'] = 'Cached';
+
+?>
/gestion/phpsysinfo/includes/lang/big5.php
0,0 → 1,107
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: big5.php,v 1.19 2007/02/18 19:11:31 bigmichi1 Exp $
//
$charset = 'big5';
$text['title'] = '¨t²Î¸ê°T';
 
$text['vitals'] = '¨t²Î¸ê·½';
$text['hostname'] = '¥D¾÷¦WºÙ';
$text['ip'] = '¥D¾÷¹ï¥~ IP';
$text['kversion'] = '®Ö¤ßª©¥»';
$text['dversion'] = 'Distro Name';
$text['uptime'] = '¤w¶}¾÷®É¶¡';
$text['users'] = 'µn¤J¤H¼Æ';
$text['loadavg'] = '¨t²Î­t¸ü';
 
$text['hardware'] = 'µwÅé¸ê·½';
$text['numcpu'] = '¹Bºâ¤¸';
$text['cpumodel'] = 'CPU«¬¸¹';
$text['cpuspeed'] = '¤u§@ÀW²v';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = '§Ö¨ú¤j¤p';
$text['bogomips'] = 'ÅÞ¿è¹Bºâ¤¸';
 
$text['pci'] = 'PCI ¤¶­±';
$text['ide'] = 'IDE ¤¶­±';
$text['scsi'] = 'SCSI ¤¶­±';
$text['usb'] = 'USB ¤¶­±';
 
$text['netusage'] = 'ºô¸ô«Ê¥]';
$text['device'] = '¤¶­±';
$text['received'] = '±µ¦¬';
$text['sent'] = '¶Ç°e';
$text['errors'] = '¿ù»~/¿ò¥¢';
 
$text['connections'] = 'Established Network Connections';
 
$text['memusage'] = '°O¾ÐÅé¸ê·½';
$text['phymem'] = '¹êÅé°O¾ÐÅé';
$text['swap'] = 'µêÀÀ°O¾ÐÅé(ºÏºÐ¸m´«)';
 
$text['fs'] = '¤w±¾¤JªºÀɮרt²Î';
$text['mount'] = '±¾¤J';
$text['partition'] = 'ºÏ°Ï';
 
$text['percent'] = '¨Ï¥Î¦Ê¤À¤ñ';
$text['type'] = '®æ¦¡';
$text['free'] = 'ªÅ¾l';
$text['used'] = '¤w¥Î';
$text['size'] = '¤j¤p';
$text['totals'] = '¦X­p';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'µL';
 
$text['capacity'] = '®e¶q';
 
$text['template'] = '¼Ë¦¡';
$text['language'] = '»y¨¥';
$text['submit'] = '½T©w';
$text['created'] = '²£¥Í¥Ñ';
$text['locale'] = 'zh_TW.Big5';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = '¤Ñ';
$text['hours'] = '¤p®É';
$text['minutes'] = '¤ÀÄÁ';
 
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
?>
/gestion/phpsysinfo/includes/lang/sv.php
0,0 → 1,108
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: sv.php,v 1.17 2007/02/18 19:11:31 bigmichi1 Exp $
//
// translation by shockzor
// updated/edited by jetthe
 
$text['title'] = 'Systeminformation';
 
$text['vitals'] = 'Allmän information';
$text['hostname'] = 'Värdnamn';
$text['ip'] = 'IP-adress';
$text['kversion'] = 'Kernel-version';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Drifttid';
$text['users'] = 'Aktuella användare';
$text['loadavg'] = 'Medelbelastning';
 
$text['hardware'] = 'Hårdvaruinformation';
$text['numcpu'] = 'Processorer';
$text['cpumodel'] = 'Modell';
$text['cpuspeed'] = 'Klockfrekvens';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Cachestorlek';
$text['bogomips'] = 'Bogomips';
 
$text['pci'] = 'PCI-enheter';
$text['ide'] = 'IDE-enheter';
$text['scsi'] = 'SCSI-enheter';
$text['usb'] = 'USB-enheter';
 
$text['netusage'] = 'Nätverksanvändning';
$text['device'] = 'Enheter';
$text['received'] = 'Mottaget';
$text['sent'] = 'Skickat';
$text['errors'] = 'Fel/Förlorat';
 
$text['memusage'] = 'Minnesanvändning';
$text['phymem'] = 'Fysiskt minne';
$text['swap'] = 'Växlingsminne';
 
$text['fs'] = 'Monterade filsystem';
$text['mount'] = 'Monteringspunkt';
$text['partition'] = 'Partition';
 
$text['percent'] = 'Kapacitetsutnyttjande';
$text['type'] = 'Typ';
$text['free'] = 'Ledigt';
$text['used'] = 'Använt';
$text['size'] = 'Storlek';
$text['totals'] = 'Totalt';
 
$text['kb'] = 'kB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'inga';
 
$text['capacity'] = 'Kapacitet';
$text['template'] = 'Mall';
$text['language'] = 'Språk';
$text['submit'] = 'Skicka';
 
$text['days'] = 'dagar';
$text['hours'] = 'timmar';
$text['minutes'] = 'minuter';
$text['created'] = 'Skapat av';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
$text['connections'] = 'Established Network Connections';
?>
/gestion/phpsysinfo/includes/lang/bg.php
0,0 → 1,108
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: bg.php,v 1.16 2007/02/18 19:11:31 bigmichi1 Exp $
 
$charset = 'cp-1251';
 
$text['title'] = 'Ñèñòåìíà Èíôîðìàöèÿ';
 
$text['vitals'] = 'Æèçíåíà Èíôîðàìöèÿ';
$text['hostname'] = 'Èìå íà õîñòà';
$text['ip'] = 'IP Àäðåñ';
$text['kversion'] = 'Âåðñèÿ íà ÿäðîòî';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Ðàáîòè îò';
$text['users'] = 'Âêëþ÷åíè ïîòðåáèòåëè';
$text['loadavg'] = 'Ñðåäíî íàòîâàðâàíå';
 
$text['hardware'] = 'Èíôîðìàöèÿ çà õàðäóåðà';
$text['numcpu'] = 'Áðîé ïðîöåñîðè';
$text['cpumodel'] = 'Ìîäåë íà ïðîöåñîð';
$text['cpuspeed'] = '×åñòîòà';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Ðàçìåð íà êåøa ';
$text['bogomips'] = 'Bogomips èíäåêñ';
 
$text['pci'] = 'PCI óñòðîéñòâà';
$text['ide'] = 'IDE óñòðîéñòâà';
$text['scsi'] = 'SCSI óñòðîéñòâà';
$text['usb'] = 'USB óñòðîéñòâà';
 
$text['netusage'] = 'Ìðåæîâà èíôîðìàöèÿ';
$text['device'] = 'Èíòåðôåéñè';
$text['received'] = 'Ïîëó÷åíè';
$text['sent'] = 'Èçïðàòåíè';
$text['errors'] = 'Ãðåøêè/Èçïóñíàòè';
 
$text['connections'] = 'Óñúùåñòâåíè ìðåæîâè âðúçêè';
 
$text['memusage'] = 'Îïåðàòèâíà ïàìåò';
$text['phymem'] = 'Ôèçè÷åñêà ïàìåò';
$text['swap'] = 'Swap ïàìåò';
 
$text['fs'] = 'Ôàéëîâè ñèñòåìè';
$text['mount'] = 'Ìÿñòî';
$text['partition'] = 'Äÿë';
 
$text['percent'] = 'Ïðîöåíòíî èçïîëçâàíå';
$text['type'] = 'Òèï';
$text['free'] = 'Ñâîáîäíè';
$text['used'] = 'Èçïîëçâàíè';
$text['size'] = 'Îáù îáåì';
$text['totals'] = 'Âñè÷êî';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'íÿìà';
 
$text['capacity'] = 'Êàïàöèòåò';
 
$text['template'] = 'Òåìà';
$text['language'] = 'Åçèê';
$text['submit'] = 'Îïðåñíè';
$text['created'] = 'Ñúçäàäåíî ñ';
$text['locale'] = 'en_US';
$text['gen_time'] = 'on %b %d, %Y at %I:%M %p';
 
$text['days'] = 'äíè';
$text['hours'] = '÷àñà';
$text['minutes'] = 'ìèíóòè';
 
$text['temperature'] = 'Temperature';
$text['voltage'] = 'Voltage';
$text['fans'] = 'Fans';
$text['s_value'] = 'Value';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Limit';
$text['s_label'] = 'Label';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'RPM';
 
$text['app'] = 'Kernel + applications';
$text['buffers'] = 'Buffers';
$text['cached'] = 'Cached';
 
?>
/gestion/phpsysinfo/includes/lang/de.php
0,0 → 1,105
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: de.php,v 1.22 2007/02/18 19:11:31 bigmichi1 Exp $
 
$text['title'] = 'System Information';
 
$text['vitals'] = 'System &Uuml;bersicht';
$text['hostname'] = 'Zugewiesener Hostname';
$text['ip'] = '&Uuml;berwachte IP';
$text['kversion'] = 'Kernel Version';
$text['dversion'] = 'Distro Name';
$text['uptime'] = 'Betriebszeit';
$text['users'] = 'Eingeloggte Benutzer';
$text['loadavg'] = 'Auslastung';
 
$text['hardware'] = 'Hardware &Uuml;bersicht';
$text['numcpu'] = 'Prozessoren';
$text['cpumodel'] = 'Modell';
$text['cpuspeed'] = 'Taktfrequenz';
$text['busspeed'] = 'BUS Speed';
$text['cache'] = 'Cachegr&ouml;&szlig;e';
$text['bogomips'] = 'System Bogomips';
 
$text['pci'] = 'PCI Ger&auml;te';
$text['ide'] = 'IDE Ger&auml;te';
$text['scsi'] = 'SCSI Ger&auml;te';
$text['usb'] = 'USB Ger&auml;te';
 
$text['netusage'] = 'Netzwerk-Auslastung';
$text['device'] = 'Schnittstelle';
$text['received'] = 'Empfangen';
$text['sent'] = 'Gesendet';
$text['errors'] = 'Fehler/Verworfen';
 
$text['memusage'] = 'Speicher-Auslastung';
$text['phymem'] = 'Physikalischer Speicher';
$text['swap'] = 'Auslagerungsdatei';
 
$text['fs'] = 'Angemeldete Dateisysteme';
$text['mount'] = 'Mount';
$text['partition'] = 'Partition';
 
$text['percent'] = 'Prozentuale Auslastung';
$text['type'] = 'Typ';
$text['free'] = 'Frei';
$text['used'] = 'Benutzt';
$text['size'] = 'Gr&ouml;&szlig;e';
$text['totals'] = 'Insgesamt';
 
$text['kb'] = 'KB';
$text['mb'] = 'MB';
$text['gb'] = 'GB';
 
$text['none'] = 'keine';
 
$text['capacity'] = 'Kapazit&auml;t';
$text['template'] = 'Vorlage';
$text['language'] = 'Sprache';
$text['submit'] = '&Auml;ndern';
$text['created'] = 'Erstellt von';
$text['locale'] = 'de_DE';
$text['gen_time'] = 'am %d.%b %Y um %H:%M';
 
$text['days'] = 'Tage';
$text['hours'] = 'Stunden';
$text['minutes'] = 'Minuten';
$text['temperature'] = 'Temperatur';
$text['voltage'] = 'Spannungen';
$text['fans'] = 'L&uuml;fter';
$text['s_value'] = 'Wert';
$text['s_min'] = 'Min';
$text['s_max'] = 'Max';
$text['hysteresis'] = 'Hysteresis';
$text['s_limit'] = 'Grenzwert';
$text['s_label'] = 'Bezeichnung';
$text['degreeC'] = '&deg;C';
$text['degreeF'] = '&deg;F';
$text['voltage_mark'] = 'V';
$text['rpm_mark'] = 'Umin';
 
$text['app'] = 'Kernel + Anwendungen';
$text['buffers'] = 'Puffer';
$text['cached'] = 'Cache';
 
$text['connections'] = 'Aktive Netzwerkverbindungen';
?>
/gestion/phpsysinfo/includes/os/class.Linux.inc.php
0,0 → 1,552
<?php
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// $Id: class.Linux.inc.php,v 1.88 2007/02/25 20:50:52 bigmichi1 Exp $
 
if (!defined('IN_PHPSYSINFO')) {
die("No Hacking");
}
 
require_once(APP_ROOT . '/includes/os/class.BSD.common.inc.php');
 
class sysinfo {
var $inifile = "distros.ini";
var $icon = "unknown.png";
var $distro = "unknown";
var $parser;
// get the distro name and icon when create the sysinfo object
function sysinfo() {
$this->parser = new Parser();
$this->parser->df_param = 'P';
$list = @parse_ini_file(APP_ROOT . "/" . $this->inifile, true);
if (!$list) {
return;
}
$distro_info = execute_program('lsb_release','-a 2> /dev/null', false); // We have the '2> /dev/null' because Ubuntu gives an error on this command which causes the distro to be unknown
if ( $distro_info != 'ERROR') {
$distro_tmp = explode("\n",$distro_info);
foreach( $distro_tmp as $info ) {
$info_tmp = explode(':', $info, 2);
$distro[ $info_tmp[0] ] = trim($info_tmp[1]);
}
if( !isset( $list[$distro['Distributor ID']] ) ){
return;
}
$this->icon = isset($list[$distro['Distributor ID']]["Image"]) ? $list[$distro['Distributor ID']]["Image"] : $this->icon;
$this->distro = $distro['Description'];
} else { // Fall back in case 'lsb_release' does not exist ;)
foreach ($list as $section => $distribution) {
if (!isset($distribution["Files"])) {
continue;
} else {
foreach (explode(";", $distribution["Files"]) as $filename) {
if (file_exists($filename)) {
$buf = rfts( $filename );
$this->icon = isset($distribution["Image"]) ? $distribution["Image"] : $this->icon;
$this->distro = isset($distribution["Name"]) ? $distribution["Name"] . " " . trim($buf) : trim($buf);
break 2;
}
}
}
}
}
}
// get our apache SERVER_NAME or vhost
function vhostname () {
if (! ($result = getenv('SERVER_NAME'))) {
$result = 'N.A.';
}
return $result;
}
// get the IP address of our vhost name
function vip_addr () {
return gethostbyname($this->vhostname());
}
// get our canonical hostname
function chostname () {
$result = rfts( '/proc/sys/kernel/hostname', 1 );
if ( $result == "ERROR" ) {
$result = "N.A.";
} else {
$result = gethostbyaddr( gethostbyname( trim( $result ) ) );
}
return $result;
}
// get the IP address of our canonical hostname
function ip_addr () {
if (!($result = getenv('SERVER_ADDR'))) {
$result = gethostbyname($this->chostname());
}
return $result;
}
 
function kernel () {
$buf = rfts( '/proc/version', 1 );
if ( $buf == "ERROR" ) {
$result = "N.A.";
} else {
if (preg_match('/version (.*?) /', $buf, $ar_buf)) {
$result = $ar_buf[1];
 
if (preg_match('/SMP/', $buf)) {
$result .= ' (SMP)';
}
}
}
return $result;
}
function uptime () {
$buf = rfts( '/proc/uptime', 1 );
$ar_buf = explode( ' ', $buf );
$result = trim( $ar_buf[0] );
 
return $result;
}
 
function users () {
$strResult = 0;
$strBuf = execute_program('who', '-q');
if( $strBuf != "ERROR" ) {
$arrWho = explode( '=', $strBuf );
$strResult = $arrWho[1];
}
return $strResult;
}
function loadavg ($bar = false) {
$buf = rfts( '/proc/loadavg' );
if( $buf == "ERROR" ) {
$results['avg'] = array('N.A.', 'N.A.', 'N.A.');
} else {
$results['avg'] = preg_split("/\s/", $buf, 4);
unset($results['avg'][3]); // don't need the extra values, only first three
}
if ($bar) {
$buf = rfts( '/proc/stat', 1 );
if( $buf != "ERROR" ) {
sscanf($buf, "%*s %Ld %Ld %Ld %Ld", $ab, $ac, $ad, $ae);
// Find out the CPU load
// user + sys = load
// total = total
$load = $ab + $ac + $ad; // cpu.user + cpu.sys
$total = $ab + $ac + $ad + $ae; // cpu.total
 
// we need a second value, wait 1 second befor getting (< 1 second no good value will occour)
sleep(1);
$buf = rfts( '/proc/stat', 1 );
sscanf($buf, "%*s %Ld %Ld %Ld %Ld", $ab, $ac, $ad, $ae);
$load2 = $ab + $ac + $ad;
$total2 = $ab + $ac + $ad + $ae;
$results['cpupercent'] = (100*($load2 - $load)) / ($total2 - $total);
}
}
return $results;
}
 
function cpu_info () {
$bufr = rfts( '/proc/cpuinfo' );
$results = array("cpus" => 0);
if ( $bufr != "ERROR" ) {
$bufe = explode("\n", $bufr);
$results = array('cpus' => 0, 'bogomips' => 0);
$ar_buf = array();
foreach( $bufe as $buf ) {
$arrBuff = preg_split('/\s+:\s+/', trim($buf));
if( count( $arrBuff ) == 2 ) {
$key = $arrBuff[0];
$value = $arrBuff[1];
// All of the tags here are highly architecture dependant.
// the only way I could reconstruct them for machines I don't
// have is to browse the kernel source. So if your arch isn't
// supported, tell me you want it written in.
switch ($key) {
case 'model name':
$results['model'] = $value;
break;
case 'cpu MHz':
$results['cpuspeed'] = sprintf('%.2f', $value);
break;
case 'cycle frequency [Hz]': // For Alpha arch - 2.2.x
$results['cpuspeed'] = sprintf('%.2f', $value / 1000000);
break;
case 'clock': // For PPC arch (damn borked POS)
$results['cpuspeed'] = sprintf('%.2f', $value);
break;
case 'cpu': // For PPC arch (damn borked POS)
$results['model'] = $value;
break;
case 'L2 cache': // More for PPC
$results['cache'] = $value;
break;
case 'revision': // For PPC arch (damn borked POS)
$results['model'] .= ' ( rev: ' . $value . ')';
break;
case 'cpu model': // For Alpha arch - 2.2.x
$results['model'] .= ' (' . $value . ')';
break;
case 'cache size':
$results['cache'] = $value;
break;
case 'bogomips':
$results['bogomips'] += $value;
break;
case 'BogoMIPS': // For alpha arch - 2.2.x
$results['bogomips'] += $value;
break;
case 'BogoMips': // For sparc arch
$results['bogomips'] += $value;
break;
case 'cpus detected': // For Alpha arch - 2.2.x
$results['cpus'] += $value;
break;
case 'system type': // Alpha arch - 2.2.x
$results['model'] .= ', ' . $value . ' ';
break;
case 'platform string': // Alpha arch - 2.2.x
$results['model'] .= ' (' . $value . ')';
break;
case 'processor':
$results['cpus'] += 1;
break;
case 'Cpu0ClkTck': // Linux sparc64
$results['cpuspeed'] = sprintf('%.2f', hexdec($value) / 1000000);
break;
case 'Cpu0Bogo': // Linux sparc64 & sparc32
$results['bogomips'] = $value;
break;
case 'ncpus probed': // Linux sparc64 & sparc32
$results['cpus'] = $value;
break;
}
}
}
// sparc64 specific code follows
// This adds the ability to display the cache that a CPU has
// Originally made by Sven Blumenstein <bazik@gentoo.org> in 2004
// Modified by Tom Weustink <freshy98@gmx.net> in 2004
$sparclist = array('SUNW,UltraSPARC@0,0', 'SUNW,UltraSPARC-II@0,0', 'SUNW,UltraSPARC@1c,0', 'SUNW,UltraSPARC-IIi@1c,0', 'SUNW,UltraSPARC-II@1c,0', 'SUNW,UltraSPARC-IIe@0,0');
foreach ($sparclist as $name) {
$buf = rfts( '/proc/openprom/' . $name . '/ecache-size',1 , 32, false );
if( $buf != "ERROR" ) {
$results['cache'] = base_convert($buf, 16, 10)/1024 . ' KB';
}
}
// sparc64 specific code ends
// XScale detection code
if ( $results['cpus'] == 0 ) {
foreach( $bufe as $buf ) {
$fields = preg_split('/\s*:\s*/', trim($buf), 2);
if (sizeof($fields) == 2) {
list($key, $value) = $fields;
switch($key) {
case 'Processor':
$results['cpus'] += 1;
$results['model'] = $value;
break;
case 'BogoMIPS': //BogoMIPS are not BogoMIPS on this CPU, it's the speed, no BogoMIPS available
$results['cpuspeed'] = $value;
break;
case 'I size':
$results['cache'] = $value;
break;
case 'D size':
$results['cache'] += $value;
break;
}
}
}
$results['cache'] = $results['cache'] / 1024 . " KB";
}
}
$keys = array_keys($results);
$keys2be = array('model', 'cpuspeed', 'cache', 'bogomips', 'cpus');
while ($ar_buf = each($keys2be)) {
if (! in_array($ar_buf[1], $keys)) {
$results[$ar_buf[1]] = 'N.A.';
}
}
$buf = rfts( '/proc/acpi/thermal_zone/THRM/temperature', 1, 4096, false );
if ( $buf != "ERROR" ) {
$results['temp'] = substr( $buf, 25, 2 );
}
return $results;
}
 
function pci () {
$arrResults = array();
$booDevice = false;
if( ! $arrResults = $this->parser->parse_lspci() ) {
$strBuf = rfts( '/proc/pci', 0, 4096, false );
if( $strBuf != "ERROR" ) {
$arrBuf = explode( "\n", $strBuf );
foreach( $arrBuf as $strLine ) {
if( preg_match( '/Bus/', $strLine ) ) {
$booDevice = true;
continue;
}
if( $booDevice ) {
list( $strKey, $strValue ) = explode( ': ', $strLine, 2 );
if( ! preg_match( '/bridge/i', $strKey ) && ! preg_match( '/USB/i ', $strKey ) ) {
$arrResults[] = preg_replace( '/\([^\)]+\)\.$/', '', trim( $strValue ) );
}
$booDevice = false;
}
}
asort( $arrResults );
}
}
return $arrResults;
}
 
function ide () {
$results = array();
$bufd = gdc( '/proc/ide', false );
 
foreach( $bufd as $file ) {
if (preg_match('/^hd/', $file)) {
$results[$file] = array();
$buf = rfts("/proc/ide/" . $file . "/media", 1 );
if ( $buf != "ERROR" ) {
$results[$file]['media'] = trim($buf);
if ($results[$file]['media'] == 'disk') {
$results[$file]['media'] = 'Hard Disk';
$buf = rfts( "/proc/ide/" . $file . "/capacity", 1, 4096, false);
if( $buf == "ERROR" ) {
$buf = rfts( "/sys/block/" . $file . "/size", 1, 4096, false);
}
if ( $buf != "ERROR" ) {
$results[$file]['capacity'] = trim( $buf );
}
} elseif ($results[$file]['media'] == 'cdrom') {
$results[$file]['media'] = 'CD-ROM';
unset($results[$file]['capacity']);
}
} else {
unset($results[$file]);
}
 
$buf = rfts( "/proc/ide/" . $file . "/model", 1 );
if ( $buf != "ERROR" ) {
$results[$file]['model'] = trim( $buf );
if (preg_match('/WDC/', $results[$file]['model'])) {
$results[$file]['manufacture'] = 'Western Digital';
} elseif (preg_match('/IBM/', $results[$file]['model'])) {
$results[$file]['manufacture'] = 'IBM';
} elseif (preg_match('/FUJITSU/', $results[$file]['model'])) {
$results[$file]['manufacture'] = 'Fujitsu';
} else {
$results[$file]['manufacture'] = 'Unknown';
}
}
}
}
 
asort($results);
return $results;
}
 
function scsi () {
$results = array();
$dev_vendor = '';
$dev_model = '';
$dev_rev = '';
$dev_type = '';
$s = 1;
$get_type = 0;
 
$bufr = execute_program('lsscsi', '-c', false);
if( $bufr == "ERROR" ) {
$bufr = rfts( '/proc/scsi/scsi', 0, 4096, false);
}
if ( $bufr != "ERROR" ) {
$bufe = explode("\n", $bufr);
foreach( $bufe as $buf ) {
if (preg_match('/Vendor/', $buf)) {
preg_match('/Vendor: (.*) Model: (.*) Rev: (.*)/i', $buf, $dev);
list($key, $value) = explode(': ', $buf, 2);
$dev_str = $value;
$get_type = true;
continue;
}
 
if ($get_type) {
preg_match('/Type:\s+(\S+)/i', $buf, $dev_type);
$results[$s]['model'] = "$dev[1] $dev[2] ($dev_type[1])";
$results[$s]['media'] = "Hard Disk";
$s++;
$get_type = false;
}
}
}
asort($results);
return $results;
}
 
function usb () {
$results = array();
$devnum = -1;
 
$bufr = execute_program('lsusb', '', false);
if( $bufr == "ERROR" ) {
$bufr = rfts( '/proc/bus/usb/devices', 0, 4096, false );
if ( $bufr != "ERROR" ) {
$bufe = explode("\n", $bufr);
foreach( $bufe as $buf ) {
if (preg_match('/^T/', $buf)) {
$devnum += 1;
$results[$devnum] = "";
} elseif (preg_match('/^S:/', $buf)) {
list($key, $value) = explode(': ', $buf, 2);
list($key, $value2) = explode('=', $value, 2);
if (trim($key) != "SerialNumber") {
$results[$devnum] .= " " . trim($value2);
$devstring = 0;
}
}
}
}
} else {
$bufe = explode( "\n", $bufr );
foreach( $bufe as $buf ) {
$device = preg_split("/ /", $buf, 7);
if( isset( $device[6] ) && trim( $device[6] ) != "" ) {
$results[$devnum++] = trim( $device[6] );
}
}
}
return $results;
}
 
function sbus () {
$results = array();
$_results[0] = "";
// TODO. Nothing here yet. Move along.
$results = $_results;
return $results;
}
 
function network () {
$results = array();
 
$bufr = rfts( '/proc/net/dev' );
if ( $bufr != "ERROR" ) {
$bufe = explode("\n", $bufr);
foreach( $bufe as $buf ) {
if (preg_match('/:/', $buf)) {
list($dev_name, $stats_list) = preg_split('/:/', $buf, 2);
$stats = preg_split('/\s+/', trim($stats_list));
$results[$dev_name] = array();
 
$results[$dev_name]['rx_bytes'] = $stats[0];
$results[$dev_name]['rx_packets'] = $stats[1];
$results[$dev_name]['rx_errs'] = $stats[2];
$results[$dev_name]['rx_drop'] = $stats[3];
 
$results[$dev_name]['tx_bytes'] = $stats[8];
$results[$dev_name]['tx_packets'] = $stats[9];
$results[$dev_name]['tx_errs'] = $stats[10];
$results[$dev_name]['tx_drop'] = $stats[11];
 
$results[$dev_name]['errs'] = $stats[2] + $stats[10];
$results[$dev_name]['drop'] = $stats[3] + $stats[11];
}
}
}
return $results;
}
 
function memory () {
$results['ram'] = array('total' => 0, 'free' => 0, 'used' => 0, 'percent' => 0);
$results['swap'] = array('total' => 0, 'free' => 0, 'used' => 0, 'percent' => 0);
$results['devswap'] = array();
 
$bufr = rfts( '/proc/meminfo' );
if ( $bufr != "ERROR" ) {
$bufe = explode("\n", $bufr);
foreach( $bufe as $buf ) {
if (preg_match('/^MemTotal:\s+(.*)\s*kB/i', $buf, $ar_buf)) {
$results['ram']['total'] = $ar_buf[1];
} else if (preg_match('/^MemFree:\s+(.*)\s*kB/i', $buf, $ar_buf)) {
$results['ram']['free'] = $ar_buf[1];
} else if (preg_match('/^Cached:\s+(.*)\s*kB/i', $buf, $ar_buf)) {
$results['ram']['cached'] = $ar_buf[1];
} else if (preg_match('/^Buffers:\s+(.*)\s*kB/i', $buf, $ar_buf)) {
$results['ram']['buffers'] = $ar_buf[1];
}
}
 
$results['ram']['used'] = $results['ram']['total'] - $results['ram']['free'];
$results['ram']['percent'] = round(($results['ram']['used'] * 100) / $results['ram']['total']);
// values for splitting memory usage
if (isset($results['ram']['cached']) && isset($results['ram']['buffers'])) {
$results['ram']['app'] = $results['ram']['used'] - $results['ram']['cached'] - $results['ram']['buffers'];
$results['ram']['app_percent'] = round(($results['ram']['app'] * 100) / $results['ram']['total']);
$results['ram']['buffers_percent'] = round(($results['ram']['buffers'] * 100) / $results['ram']['total']);
$results['ram']['cached_percent'] = round(($results['ram']['cached'] * 100) / $results['ram']['total']);
}
 
$bufr = rfts( '/proc/swaps' );
if ( $bufr != "ERROR" ) {
$swaps = explode("\n", $bufr);
for ($i = 1; $i < (sizeof($swaps)); $i++) {
if( trim( $swaps[$i] ) != "" ) {
$ar_buf = preg_split('/\s+/', $swaps[$i], 6);
$results['devswap'][$i - 1] = array();
$results['devswap'][$i - 1]['dev'] = $ar_buf[0];
$results['devswap'][$i - 1]['total'] = $ar_buf[2];
$results['devswap'][$i - 1]['used'] = $ar_buf[3];
$results['devswap'][$i - 1]['free'] = ($results['devswap'][$i - 1]['total'] - $results['devswap'][$i - 1]['used']);
$results['devswap'][$i - 1]['percent'] = round(($ar_buf[3] * 100) / $ar_buf[2]);
$results['swap']['total'] += $ar_buf[2];
$results['swap']['used'] += $ar_buf[3];
$results['swap']['free'] = $results['swap']['total'] - $results['swap']['used'];
$results['swap']['percent'] = round(($results['swap']['used'] * 100) / $results['swap']['total']);
}
}
}
}
return $results;
}
function filesystems () {
return $this->parser->parse_filesystems();
}
 
function distro () {
return $this->distro;
}
 
function distroicon () {
return $this->icon;
}
 
}
 
?>
/gestion/phpsysinfo/includes/os/class.WINNT.inc.php
0,0 → 1,344
<?php
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// WINNT implementation written by Carl C. Longnecker, longneck@iname.com
// $Id: class.WINNT.inc.php,v 1.25 2007/03/07 20:21:27 bigmichi1 Exp $
 
class sysinfo {
// $wmi holds the COM object that we pull all the WMI data from
var $wmi;
 
// $wmidevices holds all devices, which are in the system
var $wmidevices;
 
// this constructor initialis the $wmi object
function sysinfo ()
{
// don't set this params for local connection, it will not work
$strHostname = '';
$strUser = '';
$strPassword = '';
 
// initialize the wmi object
$objLocator = new COM("WbemScripting.SWbemLocator");
if($strHostname == "") {
$this->wmi = $objLocator->ConnectServer();
} else{
$this->wmi = $objLocator->ConnectServer($strHostname, "rootcimv2", "$strHostname\$strUser", $strPassword);
}
}
 
// private function for getting a list of values in the specified context, optionally filter this list, based on the list from second parameter
function _GetWMI($strClass, $strValue = array() ) {
$objWEBM = $this->wmi->Get($strClass);
 
if( PHP_VERSION < 5 ) {
$objProp = $objWEBM->Properties_;
$arrProp = $objProp->Next($objProp->Count);
$objWEBMCol = $objWEBM->Instances_();
$arrWEBMCol = $objWEBMCol->Next($objWEBMCol->Count);
} else {
$arrProp = $objWEBM->Properties_;
$arrWEBMCol = $objWEBM->Instances_();
}
 
foreach($arrWEBMCol as $objItem)
{
@reset($arrProp);
$arrInstance = array();
foreach($arrProp as $propItem)
{
eval("\$value = \$objItem->" .$propItem->Name .";");
if( empty( $strValue ) ) {
$arrInstance[$propItem->Name] = trim($value);
} else {
if( in_array( $propItem->Name, $strValue ) ) {
$arrInstance[$propItem->Name] = trim($value);
}
}
}
$arrData[] = $arrInstance;
}
return $arrData;
}
 
// private function for getting different device types from the system
function _devicelist ( $strType ) {
if( empty( $this->wmidevices ) ) {
$this->wmidevices = $this->_GetWMI( "Win32_PnPEntity", array( "Name", "PNPDeviceID" ) );
}
 
$list = array();
foreach ( $this->wmidevices as $device ) {
if ( substr( $device["PNPDeviceID"], 0, strpos( $device["PNPDeviceID"], "\\" ) + 1 ) == ( $strType . "\\" ) ) {
$list[] = $device["Name"];
}
}
 
return $list;
}
// get our apache SERVER_NAME or vhost
function vhostname () {
if (! ($result = getenv('SERVER_NAME'))) {
$result = 'N.A.';
}
return $result;
}
 
// get the IP address of our vhost name
function vip_addr () {
return gethostbyname($this->vhostname());
}
 
// get our canonical hostname
function chostname ()
{
$buffer = $this->_GetWMI( "Win32_ComputerSystem", array( "Name" ) );
$result = $buffer[0]["Name"];
return gethostbyaddr(gethostbyname($result));
}
 
// get the IP address of our canonical hostname
function ip_addr ()
{
$buffer = $this->_GetWMI( "Win32_ComputerSystem", array( "Name" ) );
$result = $buffer[0]["Name"];
return gethostbyname($result);
}
 
function kernel ()
{
$buffer = $this->_GetWMI( "Win32_OperatingSystem", array( "Version", "ServicePackMajorVersion" ) );
$result = $buffer[0]["Version"];
if( $buffer[0]["ServicePackMajorVersion"] > 0 ) {
$result .= " SP" . $buffer[0]["ServicePackMajorVersion"];
}
return $result;
}
 
// get the time the system is running
function uptime ()
{
$result = 0;
$buffer = $this->_GetWMI( "Win32_OperatingSystem", array( "LastBootUpTime", "LocalDateTime" ) );
 
$byear = intval(substr($buffer[0]["LastBootUpTime"], 0, 4));
$bmonth = intval(substr($buffer[0]["LastBootUpTime"], 4, 2));
$bday = intval(substr($buffer[0]["LastBootUpTime"], 6, 2));
$bhour = intval(substr($buffer[0]["LastBootUpTime"], 8, 2));
$bminute = intval(substr($buffer[0]["LastBootUpTime"], 10, 2));
$bseconds = intval(substr($buffer[0]["LastBootUpTime"], 12, 2));
 
$lyear = intval(substr($buffer[0]["LocalDateTime"], 0, 4));
$lmonth = intval(substr($buffer[0]["LocalDateTime"], 4, 2));
$lday = intval(substr($buffer[0]["LocalDateTime"], 6, 2));
$lhour = intval(substr($buffer[0]["LocalDateTime"], 8, 2));
$lminute = intval(substr($buffer[0]["LocalDateTime"], 10, 2));
$lseconds = intval(substr($buffer[0]["LocalDateTime"], 12, 2));
 
$boottime = mktime($bhour, $bminute, $bseconds, $bmonth, $bday, $byear);
$localtime = mktime($lhour, $lminute, $lseconds, $lmonth, $lday, $lyear);
 
$result = $localtime - $boottime;
 
return $result;
}
 
// count the users, which are logged in
function users ()
{
if( stristr( $this->kernel(), "2000 P" ) ) return "N.A.";
$buffer = $this->_GetWMI( "Win32_PerfRawData_TermService_TerminalServices", array( "TotalSessions" ) );
return $buffer[0]["TotalSessions"];
}
 
// get the load of the processors
function loadavg ($bar = false)
{
$buffer = $this->_GetWMI( "Win32_Processor", array( "LoadPercentage" ) );
$cpuload = array();
for( $i = 0; $i < count( $buffer ); $i++ ) {
$cpuload['avg'][] = $buffer[$i]["LoadPercentage"];
}
if ($bar) {
$cpuload['cpupercent'] = array_sum( $cpuload['avg'] ) / count( $buffer );
}
return $cpuload;
}
 
// get some informations about the cpu's
function cpu_info ()
{
$buffer = $this->_GetWMI( "Win32_Processor", array( "Name", "L2CacheSize", "CurrentClockSpeed", "ExtClock" ) );
$results["cpus"] = 0;
foreach ($buffer as $cpu) {
$results["cpus"]++;
$results["model"] = $cpu["Name"];
$results["cache"] = $cpu["L2CacheSize"];
$results["cpuspeed"] = $cpu["CurrentClockSpeed"];
$results["busspeed"] = $cpu["ExtClock"];
}
return $results;
}
 
// get the pci devices from the system
function pci ()
{
$pci = $this->_devicelist( "PCI" );
return $pci;
}
 
// get the ide devices from the system
function ide ()
{
$buffer = $this->_devicelist( "IDE" );
$ide = array();
foreach ( $buffer as $device ) {
$ide[]['model'] = $device;
}
return $ide;
}
 
// get the scsi devices from the system
function scsi ()
{
$scsi = $this->_devicelist( "SCSI" );
return $scsi;
}
 
// get the usb devices from the system
function usb ()
{
$usb = $this->_devicelist( "USB" );
return $usb;
}
 
// get the sbus devices from the system - currently not called
function sbus ()
{
$sbus = $this->_devicelist( "SBUS" );
return $sbus;
}
 
// get the netowrk devices and rx/tx bytes
function network () {
$results = array();
$buffer = $this->_GetWMI( "Win32_PerfRawData_Tcpip_NetworkInterface" );
foreach( $buffer as $device ) {
$dev_name = $device["Name"];
// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_perfrawdata_tcpip_networkinterface.asp
// there is a possible bug in the wmi interfaceabout uint32 and uint64: http://www.ureader.com/message/1244948.aspx, so that
// magative numbers would occour, try to calculate the nagative value from total - positive number
if( $device["BytesSentPersec"] < 0) {
$results[$dev_name]['tx_bytes'] = $device["BytesTotalPersec"] - $device["BytesReceivedPersec"];
} else {
$results[$dev_name]['tx_bytes'] = $device["BytesSentPersec"];
}
if( $device["BytesReceivedPersec"] < 0 ) {
$results[$dev_name]['rx_bytes'] = $device["BytesTotalPersec"] - $device["BytesSentPersec"];
} else {
$results[$dev_name]['rx_bytes'] = $device["BytesReceivedPersec"];
}
$results[$dev_name]['rx_packets'] = $device["PacketsReceivedPersec"];
$results[$dev_name]['tx_packets'] = $device["PacketsSentPersec"];
$results[$dev_name]['rx_errs'] = $device["PacketsReceivedErrors"];
$results[$dev_name]['rx_drop'] = $device["PacketsReceivedDiscarded"];
$results[$dev_name]['errs'] = $device["PacketsReceivedErrors"];
$results[$dev_name]['drop'] = $device["PacketsReceivedDiscarded"];
}
return $results;
}
 
function memory ()
{
$buffer = $this->_GetWMI( "Win32_LogicalMemoryConfiguration", array( "TotalPhysicalMemory" ) );
$results['ram']['total'] = $buffer[0]["TotalPhysicalMemory"];
 
$buffer = $this->_GetWMI( "Win32_PerfRawData_PerfOS_Memory", array( "AvailableKBytes" ) );
$results['ram']['free'] = $buffer[0]["AvailableKBytes"];
 
$results['ram']['used'] = $results['ram']['total'] - $results['ram']['free'];
$results['ram']['percent'] = ceil( ( $results['ram']['used'] * 100 ) / $results['ram']['total'] );
$results['swap']['total'] = 0;
$results['swap']['used'] = 0;
$results['swap']['free'] = 0;
 
$buffer = $this->_GetWMI( "Win32_PageFileUsage" ); // no need to filter, using nearly everything from output
$k = 0;
foreach ($buffer as $swapdevice) {
$results['devswap'][$k]['dev'] = $swapdevice["Name"];
$results['devswap'][$k]['total'] = $swapdevice["AllocatedBaseSize"] * 1024;
$results['devswap'][$k]['used'] = $swapdevice["CurrentUsage"] * 1024;
$results['devswap'][$k]['free'] = ( $swapdevice["AllocatedBaseSize"] - $swapdevice["CurrentUsage"] ) * 1024;
$results['devswap'][$k]['percent'] = ceil( $swapdevice["CurrentUsage"] / $swapdevice["AllocatedBaseSize"] );
 
$results['swap']['total'] += $results['devswap'][$k]['total'];
$results['swap']['used'] += $results['devswap'][$k]['used'];
$results['swap']['free'] += $results['devswap'][$k]['free'];
$k += 1;
}
$results['swap']['percent'] = ceil( $results['swap']['used'] / $results['swap']['total'] * 100 );
return $results;
}
 
// get the filesystem informations
function filesystems ()
{
$typearray = array("Unknown", "No Root Directory", "Removeable Disk",
"Local Disk", "Network Drive", "Compact Disc", "RAM Disk");
$floppyarray = array("Unknown", "5 1/4 in.", "3 1/2 in.", "3 1/2 in.",
"3 1/2 in.", "3 1/2 in.", "5 1/4 in.", "5 1/4 in.", "5 1/4 in.",
"5 1/4 in.", "5 1/4 in.", "Other", "HD", "3 1/2 in.", "3 1/2 in.",
"5 1/4 in.", "5 1/4 in.", "3 1/2 in.", "3 1/2 in.", "5 1/4 in.",
"3 1/2 in.", "3 1/2 in.", "8 in.");
 
$buffer = $this->_GetWMI( "Win32_LogicalDisk" , array( "Name", "Size", "FreeSpace", "FileSystem", "DriveType", "MediaType" ) );
 
$k = 0;
foreach ( $buffer as $filesystem ) {
if ( hide_mount( $filesystem["Name"] ) ) {
continue;
}
$results[$k]['mount'] = $filesystem["Name"];
$results[$k]['size'] = $filesystem["Size"] / 1024;
$results[$k]['used'] = ( $filesystem["Size"] - $filesystem["FreeSpace"] ) / 1024;
$results[$k]['free'] = $filesystem["FreeSpace"] / 1024;
@$results[$k]['percent'] = ceil( $results[$k]['used'] / $results[$k]['size'] * 100 ); // silence this line, nobody is having a floppy in the drive everytime
$results[$k]['fstype'] = $filesystem["FileSystem"];
$results[$k]['disk'] = $typearray[$filesystem["DriveType"]];
if ( $filesystem["MediaType"] != "" && $filesystem["DriveType"] == 2 ) $results[$k]['disk'] .= " (" . $floppyarray[$filesystem["MediaType"]] . ")";
$k += 1;
}
return $results;
}
 
function distro ()
{
$buffer = $this->_GetWMI( "Win32_OperatingSystem", array( "Caption" ) );
return $buffer[0]["Caption"];
}
 
function distroicon ()
{
return 'xp.gif';
}
}
 
?>
/gestion/phpsysinfo/includes/os/class.NetBSD.inc.php
0,0 → 1,111
<?php
 
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
 
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
// $Id: class.NetBSD.inc.php,v 1.18 2006/04/18 16:57:32 bigmichi1 Exp $
if (!defined('IN_PHPSYSINFO')) {
die("No Hacking");
}
 
require_once(APP_ROOT . '/includes/os/class.BSD.common.inc.php');
 
class sysinfo extends bsd_common {
var $cpu_regexp;
var $scsi_regexp;
// Our contstructor
// this function is run on the initialization of this class
function sysinfo () {
$this->bsd_common();
$this->cpu_regexp = "^cpu(.*)\, (.*) MHz";
$this->scsi_regexp1 = "^(.*) at scsibus.*: <(.*)> .*";
$this->scsi_regexp2 = "^(da[0-9]): (.*)MB ";
$this->cpu_regexp2 = "/user = (.*), nice = (.*), sys = (.*), intr = (.*), idle = (.*)/";
$this->pci_regexp1 = '/(.*) at pci[0-9] dev [0-9]* function [0-9]*: (.*)$/';
$this->pci_regexp2 = '/"(.*)" (.*).* at [.0-9]+ irq/';
}
 
function get_sys_ticks () {
$a = $this->grab_key('kern.boottime');
$sys_ticks = time() - $a;
return $sys_ticks;
}
 
function network () {
$netstat_b = execute_program('netstat', '-nbdi | cut -c1-25,44- | grep "^[a-z]*[0-9][ \t].*Link"');
$netstat_n = execute_program('netstat', '-ndi | cut -c1-25,44- | grep "^[a-z]*[0-9][ \t].*Link"');
$lines_b = explode("\n", $netstat_b);
$lines_n = explode("\n", $netstat_n);
$results = array();
for ($i = 0, $max = sizeof($lines_b); $i < $max; $i++) {
$ar_buf_b = preg_split("/\s+/", $lines_b[$i]);
$ar_buf_n = preg_split("/\s+/", $lines_n[$i]);
if (!empty($ar_buf_b[0]) && !empty($ar_buf_n[3])) {
$results[$ar_buf_b[0]] = array();
 
$results[$ar_buf_b[0]]['rx_bytes'] = $ar_buf_b[3];
$results[$ar_buf_b[0]]['rx_packets'] = $ar_buf_n[3];
$results[$ar_buf_b[0]]['rx_errs'] = $ar_buf_n[4];
$results[$ar_buf_b[0]]['rx_drop'] = $ar_buf_n[8];
 
$results[$ar_buf_b[0]]['tx_bytes'] = $ar_buf_b[4];
$results[$ar_buf_b[0]]['tx_packets'] = $ar_buf_n[5];
$results[$ar_buf_b[0]]['tx_errs'] = $ar_buf_n[6];
$results[$ar_buf_b[0]]['tx_drop'] = $ar_buf_n[8];
 
$results[$ar_buf_b[0]]['errs'] = $ar_buf_n[4] + $ar_buf_n[6];
$results[$ar_buf_b[0]]['drop'] = $ar_buf_n[8];
}
}
return $results;
}
 
// get the ide device information out of dmesg
function ide () {
$results = array();
 
$s = 0;
for ($i = 0, $max = count($this->read_dmesg()); $i < $max; $i++) {
$buf = $this->dmesg[$i];
if (preg_match('/^(.*) at (pciide|wdc|atabus|atapibus)[0-9] (.*): <(.*)>/', $buf, $ar_buf)) {
$s = $ar_buf[1];
$results[$s]['model'] = $ar_buf[4];
$results[$s]['media'] = 'Hard Disk';
// now loop again and find the capacity
for ($j = 0, $max1 = count($this->read_dmesg()); $j < $max1; $j++) {
$buf_n = $this->dmesg[$j];
if (preg_match("/^($s): (.*), (.*), (.*)MB, .*$/", $buf_n, $ar_buf_n)) {
$results[$s]['capacity'] = $ar_buf_n[4] * 2048 * 1.049;
} elseif (preg_match("/^($s): (.*) MB, (.*), (.*), .*$/", $buf_n, $ar_buf_n)) {
$results[$s]['capacity'] = $ar_buf_n[2] * 2048;
}
}
}
}
asort($results);
return $results;
}
 
function distroicon () {
$result = 'NetBSD.png';
return($result);
}
}
 
?>
/gestion/phpsysinfo/includes/os/class.BSD.common.inc.php
0,0 → 1,300
<?php
 
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
 
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
// $Id: class.BSD.common.inc.php,v 1.52 2006/06/13 18:31:52 bigmichi1 Exp $
 
if (!defined('IN_PHPSYSINFO')) {
die("No Hacking");
}
 
require_once(APP_ROOT . '/includes/os/class.parseProgs.inc.php');
 
class bsd_common {
var $dmesg;
var $parser;
// Our constructor
// this function is run on the initialization of this class
function bsd_common () {
$this->parser = new Parser();
$this->parser->df_param = "";
}
// read /var/run/dmesg.boot, but only if we haven't already.
function read_dmesg () {
if (! $this->dmesg) {
if( PHP_OS == "Darwin" ) {
$this->dmesg = array();
} else {
$parts = explode("rebooting", rfts( '/var/run/dmesg.boot' ) );
$this->dmesg = explode("\n", $parts[count($parts) - 1]);
}
}
return $this->dmesg;
}
// grabs a key from sysctl(8)
function grab_key ($key) {
return execute_program('sysctl', "-n $key");
}
// get our apache SERVER_NAME or vhost
function hostname () {
if (!($result = getenv('SERVER_NAME'))) {
$result = "N.A.";
}
return $result;
}
// get our canonical hostname
function chostname () {
return execute_program('hostname');
}
// get the IP address of our canonical hostname
function ip_addr () {
if (!($result = getenv('SERVER_ADDR'))) {
$result = gethostbyname($this->chostname());
}
return $result;
}
 
function kernel () {
$s = $this->grab_key('kern.version');
$a = explode(':', $s);
return $a[0] . $a[1] . ':' . $a[2];
}
 
function uptime () {
$result = $this->get_sys_ticks();
 
return $result;
}
 
function users () {
return execute_program('who', '| wc -l');
}
 
function loadavg ($bar = false) {
$s = $this->grab_key('vm.loadavg');
$s = ereg_replace('{ ', '', $s);
$s = ereg_replace(' }', '', $s);
$results['avg'] = explode(' ', $s);
 
if ($bar) {
if ($fd = $this->grab_key('kern.cp_time')) {
// Find out the CPU load
// user + sys = load
// total = total
preg_match($this->cpu_regexp2, $fd, $res );
$load = $res[2] + $res[3] + $res[4]; // cpu.user + cpu.sys
$total = $res[2] + $res[3] + $res[4] + $res[5]; // cpu.total
 
// we need a second value, wait 1 second befor getting (< 1 second no good value will occour)
sleep(1);
$fd = $this->grab_key('kern.cp_time');
preg_match($this->cpu_regexp2, $fd, $res );
$load2 = $res[2] + $res[3] + $res[4];
$total2 = $res[2] + $res[3] + $res[4] + $res[5];
$results['cpupercent'] = (100*($load2 - $load)) / ($total2 - $total);
}
}
return $results;
}
 
function cpu_info () {
$results = array();
$ar_buf = array();
 
$results['model'] = $this->grab_key('hw.model');
$results['cpus'] = $this->grab_key('hw.ncpu');
 
for ($i = 0, $max = count($this->read_dmesg()); $i < $max; $i++) {
$buf = $this->dmesg[$i];
if (preg_match("/$this->cpu_regexp/", $buf, $ar_buf)) {
$results['cpuspeed'] = round($ar_buf[2]);
break;
}
}
return $results;
}
// get the scsi device information out of dmesg
function scsi () {
$results = array();
$ar_buf = array();
 
for ($i = 0, $max = count($this->read_dmesg()); $i < $max; $i++) {
$buf = $this->dmesg[$i];
 
if (preg_match("/$this->scsi_regexp1/", $buf, $ar_buf)) {
$s = $ar_buf[1];
$results[$s]['model'] = $ar_buf[2];
$results[$s]['media'] = 'Hard Disk';
} elseif (preg_match("/$this->scsi_regexp2/", $buf, $ar_buf)) {
$s = $ar_buf[1];
$results[$s]['capacity'] = $ar_buf[2] * 2048 * 1.049;
}
}
// return array_values(array_unique($results));
// 1. more useful to have device names
// 2. php 4.1.1 array_unique() deletes non-unique values.
asort($results);
return $results;
}
 
// get the pci device information out of dmesg
function pci () {
$results = array();
 
if( !( is_array($results = $this->parser->parse_lspci()) || is_array($results = $this->parser->parse_pciconf() ))) {
for ($i = 0, $s = 0; $i < count($this->read_dmesg()); $i++) {
$buf = $this->dmesg[$i];
if(!isset($this->pci_regexp1) && !isset($this->pci_regexp2)) {
$this->pci_regexp1 = '/(.*): <(.*)>(.*) pci[0-9]$/';
$this->pci_regexp2 = '/(.*): <(.*)>.* at [.0-9]+ irq/';
}
if (preg_match($this->pci_regexp1, $buf, $ar_buf)) {
$results[$s++] = $ar_buf[1] . ": " . $ar_buf[2];
} elseif (preg_match($this->pci_regexp2, $buf, $ar_buf)) {
$results[$s++] = $ar_buf[1] . ": " . $ar_buf[2];
}
}
asort($results);
}
return $results;
}
 
// get the ide device information out of dmesg
function ide () {
$results = array();
 
$s = 0;
for ($i = 0, $max = count($this->read_dmesg()); $i < $max; $i++) {
$buf = $this->dmesg[$i];
 
if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $buf, $ar_buf)) {
$s = $ar_buf[1];
$results[$s]['model'] = $ar_buf[3];
$results[$s]['media'] = 'Hard Disk';
$results[$s]['capacity'] = $ar_buf[2] * 2048 * 1.049;
} elseif (preg_match('/^(acd[0-9]+): (.*) <(.*)> (.*)/', $buf, $ar_buf)) {
$s = $ar_buf[1];
$results[$s]['model'] = $ar_buf[3];
$results[$s]['media'] = 'CD-ROM';
}
}
// return array_values(array_unique($results));
// 1. more useful to have device names
// 2. php 4.1.1 array_unique() deletes non-unique values.
asort($results);
return $results;
}
 
// place holder function until we add acual usb detection
function usb () {
return array();
}
 
function sbus () {
$results = array();
$_results[0] = "";
// TODO. Nothing here yet. Move along.
$results = $_results;
return $results;
}
 
function memory () {
$s = $this->grab_key('hw.physmem');
 
if (PHP_OS == 'FreeBSD' || PHP_OS == 'OpenBSD') {
// vmstat on fbsd 4.4 or greater outputs kbytes not hw.pagesize
// I should probably add some version checking here, but for now
// we only support fbsd 4.4
$pagesize = 1024;
} else {
$pagesize = $this->grab_key('hw.pagesize');
}
 
$results['ram'] = array();
 
$pstat = execute_program('vmstat');
$lines = explode("\n", $pstat);
for ($i = 0, $max = sizeof($lines); $i < $max; $i++) {
$ar_buf = preg_split("/\s+/", $lines[$i], 19);
if ($i == 2) {
if(PHP_OS == 'NetBSD') {
$results['ram']['free'] = $ar_buf[5];
} else {
$results['ram']['free'] = $ar_buf[5] * $pagesize / 1024;
}
}
}
 
$results['ram']['total'] = $s / 1024;
$results['ram']['shared'] = 0;
$results['ram']['buffers'] = 0;
$results['ram']['used'] = $results['ram']['total'] - $results['ram']['free'];
$results['ram']['cached'] = 0;
 
$results['ram']['percent'] = round(($results['ram']['used'] * 100) / $results['ram']['total']);
 
if (PHP_OS == 'OpenBSD' || PHP_OS == 'NetBSD') {
$pstat = execute_program('swapctl', '-l -k');
} else {
$pstat = execute_program('swapinfo', '-k');
}
 
$lines = explode("\n", $pstat);
 
$results['swap']['total'] = 0;
$results['swap']['used'] = 0;
$results['swap']['free'] = 0;
 
for ($i = 1, $max = sizeof($lines); $i < $max; $i++) {
$ar_buf = preg_split("/\s+/", $lines[$i], 6);
 
if ($ar_buf[0] != 'Total') {
$results['swap']['total'] = $results['swap']['total'] + $ar_buf[1];
$results['swap']['used'] = $results['swap']['used'] + $ar_buf[2];
$results['swap']['free'] = $results['swap']['free'] + $ar_buf[3];
 
$results['devswap'][$i - 1] = array();
$results['devswap'][$i - 1]['dev'] = $ar_buf[0];
$results['devswap'][$i - 1]['total'] = $ar_buf[1];
$results['devswap'][$i - 1]['used'] = $ar_buf[2];
$results['devswap'][$i - 1]['free'] = ($results['devswap'][$i - 1]['total'] - $results['devswap'][$i - 1]['used']);
$results['devswap'][$i - 1]['percent'] = $ar_buf[2] > 0 ? round(($ar_buf[2] * 100) / $ar_buf[1]) : 0;
}
}
$results['swap']['percent'] = round(($results['swap']['used'] * 100) / $results['swap']['total']);
 
if( is_callable( array( 'sysinfo', 'memory_additional' ) ) ) {
$results = $this->memory_additional( $results );
}
return $results;
}
 
function filesystems () {
return $this->parser->parse_filesystems();
}
 
function distro () {
$distro = execute_program('uname', '-s');
$result = $distro;
return($result);
}
}
 
?>
/gestion/phpsysinfo/includes/os/class.HP-UX.inc.php
0,0 → 1,423
<?php
 
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
 
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
// $Id: class.HP-UX.inc.php,v 1.20 2007/02/18 18:59:54 bigmichi1 Exp $
 
class sysinfo {
// get our apache SERVER_NAME or vhost
function vhostname () {
if (! ($result = getenv('SERVER_NAME'))) {
$result = 'N.A.';
}
return $result;
}
// get the IP address of our vhost name
function vip_addr () {
return gethostbyname($this->vhostname());
}
// get our canonical hostname
function chostname () {
return execute_program('hostname');
}
// get the IP address of our canonical hostname
function ip_addr () {
if (!($result = getenv('SERVER_ADDR'))) {
$result = gethostbyname($this->chostname());
}
return $result;
}
 
function kernel () {
return execute_program('uname', '-srvm');
}
 
function uptime () {
$result = 0;
$ar_buf = array();
 
$buf = execute_program('uptime');
if (preg_match("/up (\d+) days,\s*(\d+):(\d+),/", $buf, $ar_buf)) {
$min = $ar_buf[3];
$hours = $ar_buf[2];
$days = $ar_buf[1];
$result = $days * 86400 + $hours * 3600 + $min * 60;
}
 
return $result;
}
 
function users () {
$who = explode('=', execute_program('who', '-q'));
$result = $who[1];
return $result;
}
 
function loadavg ($bar = false) {
$ar_buf = array();
 
$buf = execute_program('uptime');
 
if (preg_match("/average: (.*), (.*), (.*)$/", $buf, $ar_buf)) {
$results['avg'] = array($ar_buf[1], $ar_buf[2], $ar_buf[3]);
} else {
$results['avg'] = array('N.A.', 'N.A.', 'N.A.');
}
return $results;
}
 
function cpu_info () {
$results = array();
$ar_buf = array();
 
$bufr = rfts( '/proc/cpuinfo' );
if( $bufr != "ERROR" ) {
$bufe = explode( "\n", $bufr );
foreach( $bufe as $buf ) {
list($key, $value) = preg_split('/\s+:\s+/', trim($buf), 2);
// All of the tags here are highly architecture dependant.
// the only way I could reconstruct them for machines I don't
// have is to browse the kernel source. So if your arch isn't
// supported, tell me you want it written in.
switch ($key) {
case 'model name':
$results['model'] = $value;
break;
case 'cpu MHz':
$results['cpuspeed'] = sprintf('%.2f', $value);
break;
case 'cycle frequency [Hz]': // For Alpha arch - 2.2.x
$results['cpuspeed'] = sprintf('%.2f', $value / 1000000);
break;
case 'clock': // For PPC arch (damn borked POS)
$results['cpuspeed'] = sprintf('%.2f', $value);
break;
case 'cpu': // For PPC arch (damn borked POS)
$results['model'] = $value;
break;
case 'revision': // For PPC arch (damn borked POS)
$results['model'] .= ' ( rev: ' . $value . ')';
break;
case 'cpu model': // For Alpha arch - 2.2.x
$results['model'] .= ' (' . $value . ')';
break;
case 'cache size':
$results['cache'] = $value;
break;
case 'bogomips':
$results['bogomips'] += $value;
break;
case 'BogoMIPS': // For alpha arch - 2.2.x
$results['bogomips'] += $value;
break;
case 'BogoMips': // For sparc arch
$results['bogomips'] += $value;
break;
case 'cpus detected': // For Alpha arch - 2.2.x
$results['cpus'] += $value;
break;
case 'system type': // Alpha arch - 2.2.x
$results['model'] .= ', ' . $value . ' ';
break;
case 'platform string': // Alpha arch - 2.2.x
$results['model'] .= ' (' . $value . ')';
break;
case 'processor':
$results['cpus'] += 1;
break;
}
}
fclose($fd);
}
 
$keys = array_keys($results);
$keys2be = array('model', 'cpuspeed', 'cache', 'bogomips', 'cpus');
 
while ($ar_buf = each($keys2be)) {
if (! in_array($ar_buf[1], $keys)) {
$results[$ar_buf[1]] = 'N.A.';
}
}
return $results;
}
 
function pci () {
$results = array();
 
$bufr = rfts( '/proc/pci' );
if( $bufr != "ERROR" ) {
$bufe = explode( "\n", $bufr );
foreach( $bufe as $buf ) {
if (preg_match('/Bus/', $buf)) {
$device = true;
continue;
}
 
if ($device) {
list($key, $value) = explode(': ', $buf, 2);
 
if (!preg_match('/bridge/i', $key) && !preg_match('/USB/i', $key)) {
$results[] = preg_replace('/\([^\)]+\)\.$/', '', trim($value));
}
$device = false;
}
}
}
asort($results);
return $results;
}
 
function ide () {
$results = array();
 
$bufd = gdc( '/proc/ide' );
 
foreach( $bufd as $file ) {
if (preg_match('/^hd/', $file)) {
$results[$file] = array();
// Check if device is CD-ROM (CD-ROM capacity shows as 1024 GB)
$buf = rfts( "/proc/ide/" . $file . "/media", 1 );
if( $buf != "ERROR" ) {
$results[$file]['media'] = trim( $buf );
if ($results[$file]['media'] == 'disk') {
$results[$file]['media'] = 'Hard Disk';
}
if ($results[$file]['media'] == 'cdrom') {
$results[$file]['media'] = 'CD-ROM';
}
}
 
$buf = rfts( "/proc/ide/" . $file . "/model", 1 );
if( $buf != "ERROR" ) {
$results[$file]['model'] = trim( $buf );
if (preg_match('/WDC/', $results[$file]['model'])) {
$results[$file]['manufacture'] = 'Western Digital';
} elseif (preg_match('/IBM/', $results[$file]['model'])) {
$results[$file]['manufacture'] = 'IBM';
} elseif (preg_match('/FUJITSU/', $results[$file]['model'])) {
$results[$file]['manufacture'] = 'Fujitsu';
} else {
$results[$file]['manufacture'] = 'Unknown';
}
}
 
$buf = rfts( "/proc/ide/" . $file . "/capacity", 1 );
if( $buf != "ERROR" ) {
$results[$file]['capacity'] = trim( $buf );
if ($results[$file]['media'] == 'CD-ROM') {
unset($results[$file]['capacity']);
}
}
}
}
asort($results);
return $results;
}
 
function scsi () {
$results = array();
$dev_vendor = '';
$dev_model = '';
$dev_rev = '';
$dev_type = '';
$s = 1;
 
$bufr = rfts( '/proc/scsi/scsi' );
if( $bufr != "ERROR" ) {
$bufe = explode( "\n", $bufr );
foreach( $bufe as $buf ) {
if (preg_match('/Vendor/', $buf)) {
preg_match('/Vendor: (.*) Model: (.*) Rev: (.*)/i', $buf, $dev);
list($key, $value) = explode(': ', $buf, 2);
$dev_str = $value;
$get_type = 1;
continue;
}
 
if ($get_type) {
preg_match('/Type:\s+(\S+)/i', $buf, $dev_type);
$results[$s]['model'] = "$dev[1] $dev[2] ($dev_type[1])";
$results[$s]['media'] = "Hard Disk";
$s++;
$get_type = 0;
}
}
}
asort($results);
return $results;
}
 
function usb () {
$results = array();
$devstring = 0;
$devnum = -1;
 
$bufr = rfts( '/proc/bus/usb/devices' );
if( $bufr != "ERROR" ) {
$bufe = explode( "\n", $bufr );
foreach( $bufe as $buf ) {
if (preg_match('/^T/', $buf)) {
$devnum += 1;
}
if (preg_match('/^S/', $buf)) {
$devstring = 1;
}
 
if ($devstring) {
list($key, $value) = explode(': ', $buf, 2);
list($key, $value2) = explode('=', $value, 2);
$results[$devnum] .= " " . trim($value2);
$devstring = 0;
}
}
}
return $results;
}
 
function sbus () {
$results = array();
$_results[0] = "";
// TODO. Nothing here yet. Move along.
$results = $_results;
return $results;
}
 
function network () {
$netstat = execute_program('netstat', '-ni | tail -n +2');
$lines = explode("\n", $netstat);
$results = array();
for ($i = 0, $max = sizeof($lines); $i < $max; $i++) {
$ar_buf = preg_split("/\s+/", $lines[$i]);
if (!empty($ar_buf[0]) && !empty($ar_buf[3])) {
$results[$ar_buf[0]] = array();
 
$results[$ar_buf[0]]['rx_bytes'] = $ar_buf[4];
$results[$ar_buf[0]]['rx_packets'] = $ar_buf[4];
$results[$ar_buf[0]]['rx_errs'] = $ar_buf[5];
$results[$ar_buf[0]]['rx_drop'] = $ar_buf[8];
 
$results[$ar_buf[0]]['tx_bytes'] = $ar_buf[6];
$results[$ar_buf[0]]['tx_packets'] = $ar_buf[6];
$results[$ar_buf[0]]['tx_errs'] = $ar_buf[7];
$results[$ar_buf[0]]['tx_drop'] = $ar_buf[8];
 
$results[$ar_buf[0]]['errs'] = $ar_buf[5] + $ar_buf[7];
$results[$ar_buf[0]]['drop'] = $ar_buf[8];
}
}
return $results;
}
function memory () {
$results['ram'] = array();
$results['swap'] = array();
$results['devswap'] = array();
 
$bufr = rfts( '/proc/meminfo' );
if( $bufr != "ERROR" ) {
$bufe = explode( "\n", $bufr );
foreach( $bufe as $buf ) {
if (preg_match('/Mem:\s+(.*)$/', $buf, $ar_buf)) {
$ar_buf = preg_split('/\s+/', $ar_buf[1], 6);
 
$results['ram']['total'] = $ar_buf[0] / 1024;
$results['ram']['used'] = $ar_buf[1] / 1024;
$results['ram']['free'] = $ar_buf[2] / 1024;
$results['ram']['shared'] = $ar_buf[3] / 1024;
$results['ram']['buffers'] = $ar_buf[4] / 1024;
$results['ram']['cached'] = $ar_buf[5] / 1024;
// I don't like this since buffers and cache really aren't
// 'used' per say, but I get too many emails about it.
$results['ram']['percent'] = round(($results['ram']['used'] * 100) / $results['ram']['total']);
}
 
if (preg_match('/Swap:\s+(.*)$/', $buf, $ar_buf)) {
$ar_buf = preg_split('/\s+/', $ar_buf[1], 3);
 
$results['swap']['total'] = $ar_buf[0] / 1024;
$results['swap']['used'] = $ar_buf[1] / 1024;
$results['swap']['free'] = $ar_buf[2] / 1024;
$results['swap']['percent'] = round(($ar_buf[1] * 100) / $ar_buf[0]);
// Get info on individual swap files
$swaps = rfts( '/proc/swaps' );
if( $swaps != "ERROR" ) {
$swapdevs = explode("\n", $swaps);
 
for ($i = 1, $max = (sizeof($swapdevs) - 1); $i < $max; $i++) {
$ar_buf = preg_split('/\s+/', $swapdevs[$i], 6);
$results['devswap'][$i - 1] = array();
$results['devswap'][$i - 1]['dev'] = $ar_buf[0];
$results['devswap'][$i - 1]['total'] = $ar_buf[2];
$results['devswap'][$i - 1]['used'] = $ar_buf[3];
$results['devswap'][$i - 1]['free'] = ($results['devswap'][$i - 1]['total'] - $results['devswap'][$i - 1]['used']);
$results['devswap'][$i - 1]['percent'] = round(($ar_buf[3] * 100) / $ar_buf[2]);
}
break;
}
}
}
}
return $results;
}
 
function filesystems () {
$df = execute_program('df', '-kP');
$mounts = explode("\n", $df);
$fstype = array();
 
$s = execute_program('mount', '-v');
$lines = explode("\n", $s);
 
$i = 0;
while (list(, $line) = each($lines)) {
$a = explode(' ', $line);
$fsdev[$a[0]] = $a[4];
}
 
for ($i = 1, $j = 0, $max = sizeof($mounts); $i < $max; $i++) {
$ar_buf = preg_split("/\s+/", $mounts[$i], 6);
 
if (hide_mount($ar_buf[5])) {
continue;
}
 
$results[$j] = array();
 
$results[$j]['disk'] = $ar_buf[0];
$results[$j]['size'] = $ar_buf[1];
$results[$j]['used'] = $ar_buf[2];
$results[$j]['free'] = $ar_buf[3];
$results[$j]['percent'] = $ar_buf[4];
$results[$j]['mount'] = $ar_buf[5];
($fstype[$ar_buf[5]]) ? $results[$j]['fstype'] = $fstype[$ar_buf[5]] : $results[$j]['fstype'] = $fsdev[$ar_buf[0]];
$j++;
}
return $results;
}
function distro () {
$result = 'HP-UX';
return($result);
}
 
function distroicon () {
$result = 'unknown.png';
return($result);
}
}
 
?>
/gestion/phpsysinfo/includes/os/class.Linux.inc.php.default
0,0 → 1,552
<?php
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// $Id: class.Linux.inc.php,v 1.88 2007/02/25 20:50:52 bigmichi1 Exp $
 
if (!defined('IN_PHPSYSINFO')) {
die("No Hacking");
}
 
require_once(APP_ROOT . '/includes/os/class.BSD.common.inc.php');
 
class sysinfo {
var $inifile = "distros.ini";
var $icon = "unknown.png";
var $distro = "unknown";
var $parser;
// get the distro name and icon when create the sysinfo object
function sysinfo() {
$this->parser = new Parser();
$this->parser->df_param = 'P';
$list = @parse_ini_file(APP_ROOT . "/" . $this->inifile, true);
if (!$list) {
return;
}
$distro_info = execute_program('lsb_release','-a 2> /dev/null', false); // We have the '2> /dev/null' because Ubuntu gives an error on this command which causes the distro to be unknown
if ( $distro_info != 'ERROR') {
$distro_tmp = explode("\n",$distro_info);
foreach( $distro_tmp as $info ) {
$info_tmp = explode(':', $info, 2);
$distro[ $info_tmp[0] ] = trim($info_tmp[1]);
}
if( !isset( $list[$distro['Distributor ID']] ) ){
return;
}
$this->icon = isset($list[$distro['Distributor ID']]["Image"]) ? $list[$distro['Distributor ID']]["Image"] : $this->icon;
$this->distro = $distro['Description'];
} else { // Fall back in case 'lsb_release' does not exist ;)
foreach ($list as $section => $distribution) {
if (!isset($distribution["Files"])) {
continue;
} else {
foreach (explode(";", $distribution["Files"]) as $filename) {
if (file_exists($filename)) {
$buf = rfts( $filename );
$this->icon = isset($distribution["Image"]) ? $distribution["Image"] : $this->icon;
$this->distro = isset($distribution["Name"]) ? $distribution["Name"] . " " . trim($buf) : trim($buf);
break 2;
}
}
}
}
}
}
// get our apache SERVER_NAME or vhost
function vhostname () {
if (! ($result = getenv('SERVER_NAME'))) {
$result = 'N.A.';
}
return $result;
}
// get the IP address of our vhost name
function vip_addr () {
return gethostbyname($this->vhostname());
}
// get our canonical hostname
function chostname () {
$result = rfts( '/proc/sys/kernel/hostname', 1 );
if ( $result == "ERROR" ) {
$result = "N.A.";
} else {
$result = gethostbyaddr( gethostbyname( trim( $result ) ) );
}
return $result;
}
// get the IP address of our canonical hostname
function ip_addr () {
if (!($result = getenv('SERVER_ADDR'))) {
$result = gethostbyname($this->chostname());
}
return $result;
}
 
function kernel () {
$buf = rfts( '/proc/version', 1 );
if ( $buf == "ERROR" ) {
$result = "N.A.";
} else {
if (preg_match('/version (.*?) /', $buf, $ar_buf)) {
$result = $ar_buf[1];
 
if (preg_match('/SMP/', $buf)) {
$result .= ' (SMP)';
}
}
}
return $result;
}
function uptime () {
$buf = rfts( '/proc/uptime', 1 );
$ar_buf = explode( ' ', $buf );
$result = trim( $ar_buf[0] );
 
return $result;
}
 
function users () {
$strResult = 0;
$strBuf = execute_program('who', '-q');
if( $strBuf != "ERROR" ) {
$arrWho = explode( '=', $strBuf );
$strResult = $arrWho[1];
}
return $strResult;
}
 
function loadavg ($bar = false) {
$buf = rfts( '/proc/loadavg' );
if( $buf == "ERROR" ) {
$results['avg'] = array('N.A.', 'N.A.', 'N.A.');
} else {
$results['avg'] = preg_split("/\s/", $buf, 4);
unset($results['avg'][3]); // don't need the extra values, only first three
}
if ($bar) {
$buf = rfts( '/proc/stat', 1 );
if( $buf != "ERROR" ) {
sscanf($buf, "%*s %Ld %Ld %Ld %Ld", $ab, $ac, $ad, $ae);
// Find out the CPU load
// user + sys = load
// total = total
$load = $ab + $ac + $ad; // cpu.user + cpu.sys
$total = $ab + $ac + $ad + $ae; // cpu.total
 
// we need a second value, wait 1 second befor getting (< 1 second no good value will occour)
sleep(1);
$buf = rfts( '/proc/stat', 1 );
sscanf($buf, "%*s %Ld %Ld %Ld %Ld", $ab, $ac, $ad, $ae);
$load2 = $ab + $ac + $ad;
$total2 = $ab + $ac + $ad + $ae;
$results['cpupercent'] = (100*($load2 - $load)) / ($total2 - $total);
}
}
return $results;
}
 
function cpu_info () {
$bufr = rfts( '/proc/cpuinfo' );
$results = array("cpus" => 0);
if ( $bufr != "ERROR" ) {
$bufe = explode("\n", $bufr);
$results = array('cpus' => 0, 'bogomips' => 0);
$ar_buf = array();
foreach( $bufe as $buf ) {
$arrBuff = preg_split('/\s+:\s+/', trim($buf));
if( count( $arrBuff ) == 2 ) {
$key = $arrBuff[0];
$value = $arrBuff[1];
// All of the tags here are highly architecture dependant.
// the only way I could reconstruct them for machines I don't
// have is to browse the kernel source. So if your arch isn't
// supported, tell me you want it written in.
switch ($key) {
case 'model name':
$results['model'] = $value;
break;
case 'cpu MHz':
$results['cpuspeed'] = sprintf('%.2f', $value);
break;
case 'cycle frequency [Hz]': // For Alpha arch - 2.2.x
$results['cpuspeed'] = sprintf('%.2f', $value / 1000000);
break;
case 'clock': // For PPC arch (damn borked POS)
$results['cpuspeed'] = sprintf('%.2f', $value);
break;
case 'cpu': // For PPC arch (damn borked POS)
$results['model'] = $value;
break;
case 'L2 cache': // More for PPC
$results['cache'] = $value;
break;
case 'revision': // For PPC arch (damn borked POS)
$results['model'] .= ' ( rev: ' . $value . ')';
break;
case 'cpu model': // For Alpha arch - 2.2.x
$results['model'] .= ' (' . $value . ')';
break;
case 'cache size':
$results['cache'] = $value;
break;
case 'bogomips':
$results['bogomips'] += $value;
break;
case 'BogoMIPS': // For alpha arch - 2.2.x
$results['bogomips'] += $value;
break;
case 'BogoMips': // For sparc arch
$results['bogomips'] += $value;
break;
case 'cpus detected': // For Alpha arch - 2.2.x
$results['cpus'] += $value;
break;
case 'system type': // Alpha arch - 2.2.x
$results['model'] .= ', ' . $value . ' ';
break;
case 'platform string': // Alpha arch - 2.2.x
$results['model'] .= ' (' . $value . ')';
break;
case 'processor':
$results['cpus'] += 1;
break;
case 'Cpu0ClkTck': // Linux sparc64
$results['cpuspeed'] = sprintf('%.2f', hexdec($value) / 1000000);
break;
case 'Cpu0Bogo': // Linux sparc64 & sparc32
$results['bogomips'] = $value;
break;
case 'ncpus probed': // Linux sparc64 & sparc32
$results['cpus'] = $value;
break;
}
}
}
// sparc64 specific code follows
// This adds the ability to display the cache that a CPU has
// Originally made by Sven Blumenstein <bazik@gentoo.org> in 2004
// Modified by Tom Weustink <freshy98@gmx.net> in 2004
$sparclist = array('SUNW,UltraSPARC@0,0', 'SUNW,UltraSPARC-II@0,0', 'SUNW,UltraSPARC@1c,0', 'SUNW,UltraSPARC-IIi@1c,0', 'SUNW,UltraSPARC-II@1c,0', 'SUNW,UltraSPARC-IIe@0,0');
foreach ($sparclist as $name) {
$buf = rfts( '/proc/openprom/' . $name . '/ecache-size',1 , 32, false );
if( $buf != "ERROR" ) {
$results['cache'] = base_convert($buf, 16, 10)/1024 . ' KB';
}
}
// sparc64 specific code ends
// XScale detection code
if ( $results['cpus'] == 0 ) {
foreach( $bufe as $buf ) {
$fields = preg_split('/\s*:\s*/', trim($buf), 2);
if (sizeof($fields) == 2) {
list($key, $value) = $fields;
switch($key) {
case 'Processor':
$results['cpus'] += 1;
$results['model'] = $value;
break;
case 'BogoMIPS': //BogoMIPS are not BogoMIPS on this CPU, it's the speed, no BogoMIPS available
$results['cpuspeed'] = $value;
break;
case 'I size':
$results['cache'] = $value;
break;
case 'D size':
$results['cache'] += $value;
break;
}
}
}
$results['cache'] = $results['cache'] / 1024 . " KB";
}
}
$keys = array_keys($results);
$keys2be = array('model', 'cpuspeed', 'cache', 'bogomips', 'cpus');
while ($ar_buf = each($keys2be)) {
if (! in_array($ar_buf[1], $keys)) {
$results[$ar_buf[1]] = 'N.A.';
}
}
$buf = rfts( '/proc/acpi/thermal_zone/THRM/temperature', 1, 4096, false );
if ( $buf != "ERROR" ) {
$results['temp'] = substr( $buf, 25, 2 );
}
return $results;
}
 
function pci () {
$arrResults = array();
$booDevice = false;
if( ! $arrResults = $this->parser->parse_lspci() ) {
$strBuf = rfts( '/proc/pci', 0, 4096, false );
if( $strBuf != "ERROR" ) {
$arrBuf = explode( "\n", $strBuf );
foreach( $arrBuf as $strLine ) {
if( preg_match( '/Bus/', $strLine ) ) {
$booDevice = true;
continue;
}
if( $booDevice ) {
list( $strKey, $strValue ) = explode( ': ', $strLine, 2 );
if( ! preg_match( '/bridge/i', $strKey ) && ! preg_match( '/USB/i ', $strKey ) ) {
$arrResults[] = preg_replace( '/\([^\)]+\)\.$/', '', trim( $strValue ) );
}
$booDevice = false;
}
}
asort( $arrResults );
}
}
return $arrResults;
}
 
function ide () {
$results = array();
$bufd = gdc( '/proc/ide', false );
 
foreach( $bufd as $file ) {
if (preg_match('/^hd/', $file)) {
$results[$file] = array();
$buf = rfts("/proc/ide/" . $file . "/media", 1 );
if ( $buf != "ERROR" ) {
$results[$file]['media'] = trim($buf);
if ($results[$file]['media'] == 'disk') {
$results[$file]['media'] = 'Hard Disk';
$buf = rfts( "/proc/ide/" . $file . "/capacity", 1, 4096, false);
if( $buf == "ERROR" ) {
$buf = rfts( "/sys/block/" . $file . "/size", 1, 4096, false);
}
if ( $buf != "ERROR" ) {
$results[$file]['capacity'] = trim( $buf );
}
} elseif ($results[$file]['media'] == 'cdrom') {
$results[$file]['media'] = 'CD-ROM';
unset($results[$file]['capacity']);
}
} else {
unset($results[$file]);
}
 
$buf = rfts( "/proc/ide/" . $file . "/model", 1 );
if ( $buf != "ERROR" ) {
$results[$file]['model'] = trim( $buf );
if (preg_match('/WDC/', $results[$file]['model'])) {
$results[$file]['manufacture'] = 'Western Digital';
} elseif (preg_match('/IBM/', $results[$file]['model'])) {
$results[$file]['manufacture'] = 'IBM';
} elseif (preg_match('/FUJITSU/', $results[$file]['model'])) {
$results[$file]['manufacture'] = 'Fujitsu';
} else {
$results[$file]['manufacture'] = 'Unknown';
}
}
}
}
 
asort($results);
return $results;
}
 
function scsi () {
$results = array();
$dev_vendor = '';
$dev_model = '';
$dev_rev = '';
$dev_type = '';
$s = 1;
$get_type = 0;
 
$bufr = execute_program('lsscsi', '-c', false);
if( $bufr == "ERROR" ) {
$bufr = rfts( '/proc/scsi/scsi', 0, 4096, false);
}
if ( $bufr != "ERROR" ) {
$bufe = explode("\n", $bufr);
foreach( $bufe as $buf ) {
if (preg_match('/Vendor/', $buf)) {
preg_match('/Vendor: (.*) Model: (.*) Rev: (.*)/i', $buf, $dev);
list($key, $value) = explode(': ', $buf, 2);
$dev_str = $value;
$get_type = true;
continue;
}
 
if ($get_type) {
preg_match('/Type:\s+(\S+)/i', $buf, $dev_type);
$results[$s]['model'] = "$dev[1] $dev[2] ($dev_type[1])";
$results[$s]['media'] = "Hard Disk";
$s++;
$get_type = false;
}
}
}
asort($results);
return $results;
}
 
function usb () {
$results = array();
$devnum = -1;
 
$bufr = execute_program('lsusb', '', false);
if( $bufr == "ERROR" ) {
$bufr = rfts( '/proc/bus/usb/devices', 0, 4096, false );
if ( $bufr != "ERROR" ) {
$bufe = explode("\n", $bufr);
foreach( $bufe as $buf ) {
if (preg_match('/^T/', $buf)) {
$devnum += 1;
$results[$devnum] = "";
} elseif (preg_match('/^S:/', $buf)) {
list($key, $value) = explode(': ', $buf, 2);
list($key, $value2) = explode('=', $value, 2);
if (trim($key) != "SerialNumber") {
$results[$devnum] .= " " . trim($value2);
$devstring = 0;
}
}
}
}
} else {
$bufe = explode( "\n", $bufr );
foreach( $bufe as $buf ) {
$device = preg_split("/ /", $buf, 7);
if( isset( $device[6] ) && trim( $device[6] ) != "" ) {
$results[$devnum++] = trim( $device[6] );
}
}
}
return $results;
}
 
function sbus () {
$results = array();
$_results[0] = "";
// TODO. Nothing here yet. Move along.
$results = $_results;
return $results;
}
 
function network () {
$results = array();
 
$bufr = rfts( '/proc/net/dev' );
if ( $bufr != "ERROR" ) {
$bufe = explode("\n", $bufr);
foreach( $bufe as $buf ) {
if (preg_match('/:/', $buf)) {
list($dev_name, $stats_list) = preg_split('/:/', $buf, 2);
$stats = preg_split('/\s+/', trim($stats_list));
$results[$dev_name] = array();
 
$results[$dev_name]['rx_bytes'] = $stats[0];
$results[$dev_name]['rx_packets'] = $stats[1];
$results[$dev_name]['rx_errs'] = $stats[2];
$results[$dev_name]['rx_drop'] = $stats[3];
 
$results[$dev_name]['tx_bytes'] = $stats[8];
$results[$dev_name]['tx_packets'] = $stats[9];
$results[$dev_name]['tx_errs'] = $stats[10];
$results[$dev_name]['tx_drop'] = $stats[11];
 
$results[$dev_name]['errs'] = $stats[2] + $stats[10];
$results[$dev_name]['drop'] = $stats[3] + $stats[11];
}
}
}
return $results;
}
 
function memory () {
$results['ram'] = array('total' => 0, 'free' => 0, 'used' => 0, 'percent' => 0);
$results['swap'] = array('total' => 0, 'free' => 0, 'used' => 0, 'percent' => 0);
$results['devswap'] = array();
 
$bufr = rfts( '/proc/meminfo' );
if ( $bufr != "ERROR" ) {
$bufe = explode("\n", $bufr);
foreach( $bufe as $buf ) {
if (preg_match('/^MemTotal:\s+(.*)\s*kB/i', $buf, $ar_buf)) {
$results['ram']['total'] = $ar_buf[1];
} else if (preg_match('/^MemFree:\s+(.*)\s*kB/i', $buf, $ar_buf)) {
$results['ram']['free'] = $ar_buf[1];
} else if (preg_match('/^Cached:\s+(.*)\s*kB/i', $buf, $ar_buf)) {
$results['ram']['cached'] = $ar_buf[1];
} else if (preg_match('/^Buffers:\s+(.*)\s*kB/i', $buf, $ar_buf)) {
$results['ram']['buffers'] = $ar_buf[1];
}
}
 
$results['ram']['used'] = $results['ram']['total'] - $results['ram']['free'];
$results['ram']['percent'] = round(($results['ram']['used'] * 100) / $results['ram']['total']);
// values for splitting memory usage
if (isset($results['ram']['cached']) && isset($results['ram']['buffers'])) {
$results['ram']['app'] = $results['ram']['used'] - $results['ram']['cached'] - $results['ram']['buffers'];
$results['ram']['app_percent'] = round(($results['ram']['app'] * 100) / $results['ram']['total']);
$results['ram']['buffers_percent'] = round(($results['ram']['buffers'] * 100) / $results['ram']['total']);
$results['ram']['cached_percent'] = round(($results['ram']['cached'] * 100) / $results['ram']['total']);
}
 
$bufr = rfts( '/proc/swaps' );
if ( $bufr != "ERROR" ) {
$swaps = explode("\n", $bufr);
for ($i = 1; $i < (sizeof($swaps)); $i++) {
if( trim( $swaps[$i] ) != "" ) {
$ar_buf = preg_split('/\s+/', $swaps[$i], 6);
$results['devswap'][$i - 1] = array();
$results['devswap'][$i - 1]['dev'] = $ar_buf[0];
$results['devswap'][$i - 1]['total'] = $ar_buf[2];
$results['devswap'][$i - 1]['used'] = $ar_buf[3];
$results['devswap'][$i - 1]['free'] = ($results['devswap'][$i - 1]['total'] - $results['devswap'][$i - 1]['used']);
$results['devswap'][$i - 1]['percent'] = round(($ar_buf[3] * 100) / $ar_buf[2]);
$results['swap']['total'] += $ar_buf[2];
$results['swap']['used'] += $ar_buf[3];
$results['swap']['free'] = $results['swap']['total'] - $results['swap']['used'];
$results['swap']['percent'] = round(($results['swap']['used'] * 100) / $results['swap']['total']);
}
}
}
}
return $results;
}
function filesystems () {
return $this->parser->parse_filesystems();
}
 
function distro () {
return $this->distro;
}
 
function distroicon () {
return $this->icon;
}
 
}
 
?>
/gestion/phpsysinfo/includes/os/class.Darwin.inc.php
0,0 → 1,198
<?php
 
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
 
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
// $Id: class.Darwin.inc.php,v 1.33 2006/06/14 16:36:34 bigmichi1 Exp $
if (!defined('IN_PHPSYSINFO')) {
die("No Hacking");
}
 
require_once(APP_ROOT . '/includes/os/class.BSD.common.inc.php');
 
$error->addWarning("The Darwin version of phpSysInfo is work in progress, some things currently don't work");
 
class sysinfo extends bsd_common {
var $cpu_regexp;
var $scsi_regexp;
var $parser;
// Our contstructor
// this function is run on the initialization of this class
function sysinfo () {
// $this->cpu_regexp = "CPU: (.*) \((.*)-MHz (.*)\)";
// $this->scsi_regexp1 = "^(.*): <(.*)> .*SCSI.*device";
$this->cpu_regexp2 = "/(.*) ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)/";
$this->parser = new Parser();
}
 
function grab_key ($key) {
$s = execute_program('sysctl', $key);
$s = ereg_replace($key . ': ', '', $s);
$s = ereg_replace($key . ' = ', '', $s); // fix Apple set keys
return $s;
}
 
function grab_ioreg ($key) {
$s = execute_program('ioreg', '-cls "' . $key . '" | grep "' . $key . '"'); //ioreg -cls "$key" | grep "$key"
$s = ereg_replace('\|', '', $s);
$s = ereg_replace('\+\-\o', '', $s);
$s = ereg_replace('[ ]+', '', $s);
$s = ereg_replace('<[^>]+>', '', $s); // remove possible XML conflicts
 
return $s;
}
 
function get_sys_ticks () {
$a = execute_program('sysctl', '-n kern.boottime'); // get boottime (value in seconds)
$sys_ticks = time() - $a;
 
return $sys_ticks;
}
 
function cpu_info () {
$results = array();
// $results['model'] = $this->grab_key('hw.model'); // need to expand this somehow...
// $results['model'] = $this->grab_key('hw.machine');
$results['model'] = ereg_replace('Processor type: ', '', execute_program('hostinfo', '| grep "Processor type"')); // get processor type
$results['cpus'] = $this->grab_key('hw.ncpu');
$results['cpuspeed'] = round($this->grab_key('hw.cpufrequency') / 1000000); // return cpu speed - Mhz
$results['busspeed'] = round($this->grab_key('hw.busfrequency') / 1000000); // return bus speed - Mhz
$results['cache'] = round($this->grab_key('hw.l2cachesize') / 1024); // return l2 cache
 
if (($this->grab_key('hw.model') == "PowerMac3,6") && ($results['cpus'] == "2")) { $results['model'] = 'Dual G4 - (PowerPC 7450)';} // is Dual G4
if (($this->grab_key('hw.model') == "PowerMac7,2") && ($results['cpus'] == "2")) { $results['model'] = 'Dual G5 - (PowerPC 970)';} // is Dual G5
if (($this->grab_key('hw.model') == "PowerMac1,1") && ($results['cpus'] == "1")) { $results['model'] = 'B&W G3 - (PowerPC 750)';} // is B&W G3
 
return $results;
}
// get the pci device information out of ioreg
function pci () {
$results = array();
$s = $this->grab_ioreg('IOPCIDevice');
 
$lines = explode("\n", $s);
for ($i = 0, $max = sizeof($lines); $i < $max; $i++) {
$ar_buf = preg_split("/\s+/", $lines[$i], 19);
$results[$i] = $ar_buf[0];
}
asort($results);
return array_values(array_unique($results));
}
// get the ide device information out of ioreg
function ide () {
$results = array();
// ioreg | grep "Media <class IOMedia>"
$s = $this->grab_ioreg('IOATABlockStorageDevice');
 
$lines = explode("\n", $s);
$j = 0;
for ($i = 0, $max = sizeof($lines); $i < $max; $i++) {
$ar_buf = preg_split("/\/\//", $lines[$i], 19);
 
if ( isset( $ar_buf[1] ) && $ar_buf[1] == 'class IOMedia' && preg_match('/Media/', $ar_buf[0])) {
$results[$j++]['model'] = $ar_buf[0];
}
}
asort($results);
return array_values(array_unique($results));
}
 
function memory () {
$s = $this->grab_key('hw.memsize');
 
$results['ram'] = array();
$results['swap'] = array();
$results['devswap'] = array();
$pstat = execute_program('vm_stat'); // use darwin's vm_stat
$lines = explode("\n", $pstat);
for ($i = 0, $max = sizeof($lines); $i < $max; $i++) {
$ar_buf = preg_split("/\s+/", $lines[$i], 19);
 
if ($i == 1) {
$results['ram']['free'] = $ar_buf[2] * 4; // calculate free memory from page sizes (each page = 4MB)
}
}
 
$results['ram']['total'] = $s / 1024;
$results['ram']['shared'] = 0;
$results['ram']['buffers'] = 0;
$results['ram']['used'] = $results['ram']['total'] - $results['ram']['free'];
$results['ram']['cached'] = 0;
 
$results['ram']['percent'] = round(($results['ram']['used'] * 100) / $results['ram']['total']);
// need to fix the swap info...
// meanwhile silence and / or disable the swap information
$pstat = execute_program('swapinfo', '-k', false);
if( $pstat != "ERROR" ) {
$lines = explode("\n", $pstat);
 
for ($i = 0, $max = sizeof($lines); $i < $max; $i++) {
$ar_buf = preg_split("/\s+/", $lines[$i], 6);
if ($i == 0) {
$results['swap']['total'] = 0;
$results['swap']['used'] = 0;
$results['swap']['free'] = 0;
} else {
$results['swap']['total'] = $results['swap']['total'] + $ar_buf[1];
$results['swap']['used'] = $results['swap']['used'] + $ar_buf[2];
$results['swap']['free'] = $results['swap']['free'] + $ar_buf[3];
}
}
$results['swap']['percent'] = round(($results['swap']['used'] * 100) / $results['swap']['total']);
}
return $results;
}
 
function network () {
$netstat = execute_program('netstat', '-nbdi | cut -c1-24,42- | grep Link');
$lines = explode("\n", $netstat);
$results = array();
for ($i = 0, $max = sizeof($lines); $i < $max; $i++) {
$ar_buf = preg_split("/\s+/", $lines[$i], 10);
if (!empty($ar_buf[0])) {
$results[$ar_buf[0]] = array();
 
$results[$ar_buf[0]]['rx_bytes'] = $ar_buf[5];
$results[$ar_buf[0]]['rx_packets'] = $ar_buf[3];
$results[$ar_buf[0]]['rx_errs'] = $ar_buf[4];
$results[$ar_buf[0]]['rx_drop'] = isset( $ar_buf[10] ) ? $ar_buf[10] : 0;
 
$results[$ar_buf[0]]['tx_bytes'] = $ar_buf[8];
$results[$ar_buf[0]]['tx_packets'] = $ar_buf[6];
$results[$ar_buf[0]]['tx_errs'] = $ar_buf[7];
$results[$ar_buf[0]]['tx_drop'] = isset( $ar_buf[10] ) ? $ar_buf[10] : 0;
 
$results[$ar_buf[0]]['errs'] = $ar_buf[4] + $ar_buf[7];
$results[$ar_buf[0]]['drop'] = isset( $ar_buf[10] ) ? $ar_buf[10] : 0;
}
}
return $results;
}
 
function distroicon () {
$result = 'Darwin.png';
return($result);
}
 
}
 
?>
/gestion/phpsysinfo/includes/os/class.parseProgs.inc.php
0,0 → 1,159
<?php
/***************************************************************************
* Copyright (C) 2006 by phpSysInfo - A PHP System Information Script *
* http://phpsysinfo.sourceforge.net/ *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
// $Id: class.parseProgs.inc.php,v 1.12 2007/02/01 17:37:06 bigmichi1 Exp $
 
class Parser {
var $debug = false;
var $df_param = "";
function parse_lspci() {
$arrResults = array();
if ( ( $strBuff = execute_program( "lspci", "", $this->debug ) ) != "ERROR" ) {
$arrLines = explode( "\n", $strBuff );
foreach( $arrLines as $strLine ) {
list( $strAddr, $strName) = explode( ' ', trim( $strLine ), 2 );
$strName = preg_replace( '/\(.*\)/', '', $strName);
$arrResults[] = $strName;
}
}
if( empty( $arrResults ) ) {
return false;
} else {
asort( $arrResults );
return $arrResults;
}
}
function parse_pciconf() {
$arrResults = array();
$intS = 0;
if( ( $strBuff = execute_program( "pciconf", "-lv", $this->debug ) ) != "ERROR" ) {
$arrLines = explode( "\n", $strBuff );
foreach( $arrLines as $strLine ) {
if( preg_match( "/(.*) = '(.*)'/", $strLine, $arrParts ) ) {
if( trim( $arrParts[1] ) == "vendor" ) {
$arrResults[$intS] = trim( $arrParts[2] );
} elseif( trim( $arrParts[1]) == "device" ) {
$arrResults[$intS] .= " - " . trim( $arrParts[2] );
$intS++;
}
}
}
}
if( empty( $arrResults ) ) {
return false;
} else {
asort( $arrResults );
return $arrResults;
}
}
function parse_filesystems() {
global $show_bind, $show_inodes;
$results = array();
$j = 0;
$df = execute_program('df', '-k' . $this->df_param );
$df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);
sort($df);
if( $show_inodes ) {
$df2 = execute_program('df', '-i' . $this->df_param );
$df2 = preg_split("/\n/", $df2, -1, PREG_SPLIT_NO_EMPTY);
sort( $df2 );
}
$mount = execute_program('mount');
$mount = preg_split("/\n/", $mount, -1, PREG_SPLIT_NO_EMPTY);
sort($mount);
foreach( $df as $df_line) {
$df_buf1 = preg_split("/(\%\s)/", $df_line, 2);
if( count($df_buf1) != 2) {
continue;
}
preg_match("/(.*)(\s+)(([0-9]+)(\s+)([0-9]+)(\s+)([0-9]+)(\s+)([0-9]+)$)/", $df_buf1[0], $df_buf2);
$df_buf = array($df_buf2[1], $df_buf2[4], $df_buf2[6], $df_buf2[8], $df_buf2[10], $df_buf1[1]);
if( $show_inodes ) {
preg_match_all("/([0-9]+)%/", $df2[$j + 1], $inode_buf, PREG_SET_ORDER);
}
if( count($df_buf) == 6 ) {
$df_buf[5] = trim( $df_buf[5] );
if( hide_mount( $df_buf[5] ) ) {
continue;
}
$df_buf[0] = trim( str_replace("\$", "\\$", $df_buf[0] ) );
$current = 0;
foreach( $mount as $mount_line ) {
if ( preg_match("#" . $df_buf[0] . " on " . $df_buf[5] . " type (.*) \((.*)\)#", $mount_line, $mount_buf) ) {
$mount_buf[1] .= "," . $mount_buf[2];
} elseif ( !preg_match("#" . $df_buf[0] . "(.*) on " . $df_buf[5] . " \((.*)\)#", $mount_line, $mount_buf) ) {
continue;
}
$strFstype = substr( $mount_buf[1], 0, strpos( $mount_buf[1], "," ) );
if( hide_fstype( $strFstype ) ) {
continue;
}
$current++;
if( $show_bind || !stristr($mount_buf[2], "bind")) {
$results[$j] = array();
$results[$j]['disk'] = str_replace( "\\$", "\$", $df_buf[0] );
$results[$j]['size'] = $df_buf[1];
$results[$j]['used'] = $df_buf[2];
$results[$j]['free'] = $df_buf[3];
// --> Bug 1527673
if( $results[$j]['used'] < 0 ) {
$results[$j]['size'] = $results[$j]['free'];
$results[$j]['free'] = 0;
$results[$j]['used'] = $results[$j]['size'];
}
// <-- Bug 1527673
// --> Bug 1649430
if( $results[$j]['size'] == 0 ) {
break;
} else {
$results[$j]['percent'] = round(($results[$j]['used'] * 100) / $results[$j]['size']);
}
// <-- Bug 1649430
$results[$j]['mount'] = $df_buf[5];
$results[$j]['fstype'] = $strFstype;
$results[$j]['options'] = substr( $mount_buf[1], strpos( $mount_buf[1], "," ) + 1, strlen( $mount_buf[1] ) );
if( $show_inodes && isset($inode_buf[ count( $inode_buf ) - 1][1]) ) {
$results[$j]['inodes'] = $inode_buf[ count( $inode_buf ) - 1][1];
}
$j++;
unset( $mount[$current - 1] );
sort( $mount );
break;
}
}
}
}
return $results;
}
}
?>
/gestion/phpsysinfo/includes/os/class.SunOS.inc.php
0,0 → 1,240
<?php
 
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
 
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
// $Id: class.SunOS.inc.php,v 1.24 2007/02/18 18:59:54 bigmichi1 Exp $
 
$error->addError("WARN", "The SunOS version of phpSysInfo is work in progress, some things currently don't work");
 
class sysinfo {
// Extract kernel values via kstat() interface
function kstat ($key) {
$m = execute_program('kstat', "-p d $key");
list($key, $value) = explode("\t", trim($m), 2);
return $value;
}
 
function vhostname () {
if (! ($result = getenv('SERVER_NAME'))) {
$result = 'N.A.';
}
return $result;
}
// get the IP address of our vhost name
function vip_addr () {
return gethostbyname($this->vhostname());
}
// get our canonical hostname
function chostname () {
if ($result = execute_program('uname', '-n')) {
$result = gethostbyaddr(gethostbyname($result));
} else {
$result = 'N.A.';
}
return $result;
}
// get the IP address of our canonical hostname
function ip_addr () {
if (!($result = getenv('SERVER_ADDR'))) {
$result = gethostbyname($this->chostname());
}
return $result;
}
 
function kernel () {
$os = execute_program('uname', '-s');
$version = execute_program('uname', '-r');
return $os . ' ' . $version;
}
 
function uptime () {
$result = time() - $this->kstat('unix:0:system_misc:boot_time');
 
return $result;
}
 
function users () {
$who = explode('=', execute_program('who', '-q'));
$result = $who[1];
return $result;
}
 
function loadavg ($bar = false) {
$load1 = $this->kstat('unix:0:system_misc:avenrun_1min');
$load5 = $this->kstat('unix:0:system_misc:avenrun_5min');
$load15 = $this->kstat('unix:0:system_misc:avenrun_15min');
$results['avg'] = array( round($load1/256, 2), round($load5/256, 2), round($load15/256, 2) );
return $results;
}
 
function cpu_info () {
$results = array();
$ar_buf = array();
 
$results['model'] = execute_program('uname', '-i');
$results['cpuspeed'] = $this->kstat('cpu_info:0:cpu_info0:clock_MHz');
$results['cache'] = $this->kstat('cpu_info:0:cpu_info0:cpu_type');
$results['cpus'] = $this->kstat('unix:0:system_misc:ncpus');
 
return $results;
}
 
function pci () {
// FIXME
$results = array();
return $results;
}
 
function ide () {
// FIXME
$results = array();
return $results;
}
 
function scsi () {
// FIXME
$results = array();
return $results;
}
 
function usb () {
// FIXME
$results = array();
return $results;
}
 
function sbus () {
$results = array();
$_results[0] = "";
// TODO. Nothing here yet. Move along.
$results = $_results;
return $results;
}
 
function network () {
$results = array();
 
$netstat = execute_program('netstat', '-ni | awk \'(NF ==10){print;}\'');
$lines = explode("\n", $netstat);
$results = array();
for ($i = 0, $max = sizeof($lines); $i < $max; $i++) {
$ar_buf = preg_split("/\s+/", $lines[$i]);
if ((!empty($ar_buf[0])) && ($ar_buf[0] != 'Name')) {
$results[$ar_buf[0]] = array();
 
$results[$ar_buf[0]]['rx_bytes'] = 0;
$results[$ar_buf[0]]['rx_packets'] = $ar_buf[4];
$results[$ar_buf[0]]['rx_errs'] = $ar_buf[5];
$results[$ar_buf[0]]['rx_drop'] = 0;
 
$results[$ar_buf[0]]['tx_bytes'] = 0;
$results[$ar_buf[0]]['tx_packets'] = $ar_buf[6];
$results[$ar_buf[0]]['tx_errs'] = $ar_buf[7];
$results[$ar_buf[0]]['tx_drop'] = 0;
 
$results[$ar_buf[0]]['errs'] = $ar_buf[5] + $ar_buf[
7];
$results[$ar_buf[0]]['drop'] = 0;
 
preg_match('/^(\D+)(\d+)$/', $ar_buf[0], $intf);
$prefix = $intf[1] . ':' . $intf[2] . ':' . $intf[1] . $intf[2] . ':';
$cnt = $this->kstat($prefix . 'drop');
 
if ($cnt > 0) {
$results[$ar_buf[0]]['rx_drop'] = $cnt;
}
$cnt = $this->kstat($prefix . 'obytes64');
 
if ($cnt > 0) {
$results[$ar_buf[0]]['tx_bytes'] = $cnt;
}
$cnt = $this->kstat($prefix . 'rbytes64');
 
if ($cnt > 0) {
$results[$ar_buf[0]]['rx_bytes'] = $cnt;
}
}
}
return $results;
}
 
function memory () {
$results['devswap'] = array();
 
$results['ram'] = array();
 
$pagesize = $this->kstat('unix:0:seg_cache:slab_size');
$results['ram']['total'] = $this->kstat('unix:0:system_pages:pagestotal') * $pagesize / 1024;
$results['ram']['used'] = $this->kstat('unix:0:system_pages:pageslocked') * $pagesize / 1024;
$results['ram']['free'] = $this->kstat('unix:0:system_pages:pagesfree') * $pagesize / 1024;
$results['ram']['shared'] = 0;
$results['ram']['buffers'] = 0;
$results['ram']['cached'] = 0;
 
$results['ram']['percent'] = round(($results['ram']['used'] * 100) / $results['ram']['total']);
 
$results['swap'] = array();
$results['swap']['total'] = $this->kstat('unix:0:vminfo:swap_avail') / 1024 / 1024;
$results['swap']['used'] = $this->kstat('unix:0:vminfo:swap_alloc') / 1024 / 1024;
$results['swap']['free'] = $this->kstat('unix:0:vminfo:swap_free') / 1024 / 1024;
$results['swap']['percent'] = round(($ar_buf[1] * 100) / $ar_buf[0]);
$results['swap']['percent'] = round(($results['swap']['used'] * 100) / $results['swap']['total']);
return $results;
}
 
function filesystems () {
$df = execute_program('df', '-k');
$mounts = explode("\n", $df);
 
$dftypes = execute_program('df', '-n');
$mounttypes = explode("\n", $dftypes);
 
for ($i = 1, $j = 0, $max = sizeof($mounts); $i < $max; $i++) {
$ar_buf = preg_split('/\s+/', $mounts[$i], 6);
$ty_buf = explode(':', $mounttypes[$i-1], 2);
 
if (hide_mount($ar_buf[5])) {
continue;
}
 
$results[$j] = array();
 
$results[$j]['disk'] = $ar_buf[0];
$results[$j]['size'] = $ar_buf[1];
$results[$j]['used'] = $ar_buf[2];
$results[$j]['free'] = $ar_buf[3];
$results[$j]['percent'] = round(($results[$j]['used'] * 100) / $results[$j]['size']);
$results[$j]['mount'] = $ar_buf[5];
$results[$j]['fstype'] = $ty_buf[1];
$j++;
}
return $results;
}
function distro () {
$result = 'SunOS';
return($result);
}
 
function distroicon () {
$result = 'SunOS.png';
return($result);
}
}
 
?>
/gestion/phpsysinfo/includes/os/index.html
--- gestion/phpsysinfo/includes/os/class.OpenBSD.inc.php (nonexistent)
+++ gestion/phpsysinfo/includes/os/class.OpenBSD.inc.php (revision 40)
@@ -0,0 +1,110 @@
+<?php
+
+// phpSysInfo - A PHP System Information Script
+// http://phpsysinfo.sourceforge.net/
+
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+// $Id: class.OpenBSD.inc.php,v 1.21 2006/04/18 17:46:15 bigmichi1 Exp $
+if (!defined('IN_PHPSYSINFO')) {
+ die("No Hacking");
+}
+
+require_once(APP_ROOT . '/includes/os/class.BSD.common.inc.php');
+
+class sysinfo extends bsd_common {
+ var $cpu_regexp = "";
+ var $scsi_regexp1 = "";
+ var $scsi_regexp2 = "";
+ var $cpu_regexp2 = "";
+
+ // Our contstructor
+ // this function is run on the initialization of this class
+ function sysinfo () {
+ $this->bsd_common();
+ $this->cpu_regexp = "^cpu(.*) (.*) MHz";
+ $this->scsi_regexp1 = "^(.*) at scsibus.*: <(.*)> .*";
+ $this->scsi_regexp2 = "^(da[0-9]): (.*)MB ";
+ $this->cpu_regexp2 = "/(.*),(.*),(.*),(.*),(.*)/";
+ $this->pci_regexp1 = '/(.*) at pci[0-9] .* "(.*)"/';
+ $this->pci_regexp2 = '/"(.*)" (.*).* at [.0-9]+ irq/';
+ }
+
+ function get_sys_ticks () {
+ $a = $this->grab_key('kern.boottime');
+ $sys_ticks = time() - $a;
+ return $sys_ticks;
+ }
+
+ function network () {
+ $netstat_b = execute_program('netstat', '-nbdi | cut -c1-25,44- | grep Link | grep -v \'* \'');
+ $netstat_n = execute_program('netstat', '-ndi | cut -c1-25,44- | grep Link | grep -v \'* \'');
+ $lines_b = explode("\n", $netstat_b);
+ $lines_n = explode("\n", $netstat_n);
+ $results = array();
+ for ($i = 0, $max = sizeof($lines_b); $i < $max; $i++) {
+ $ar_buf_b = preg_split("/\s+/", $lines_b[$i]);
+ $ar_buf_n = preg_split("/\s+/", $lines_n[$i]);
+ if (!empty($ar_buf_b[0]) && !empty($ar_buf_n[3])) {
+ $results[$ar_buf_b[0]] = array();
+
+ $results[$ar_buf_b[0]]['rx_bytes'] = $ar_buf_b[3];
+ $results[$ar_buf_b[0]]['rx_packets'] = $ar_buf_n[3];
+ $results[$ar_buf_b[0]]['rx_errs'] = $ar_buf_n[4];
+ $results[$ar_buf_b[0]]['rx_drop'] = $ar_buf_n[8];
+
+ $results[$ar_buf_b[0]]['tx_bytes'] = $ar_buf_b[4];
+ $results[$ar_buf_b[0]]['tx_packets'] = $ar_buf_n[5];
+ $results[$ar_buf_b[0]]['tx_errs'] = $ar_buf_n[6];
+ $results[$ar_buf_b[0]]['tx_drop'] = $ar_buf_n[8];
+
+ $results[$ar_buf_b[0]]['errs'] = $ar_buf_n[4] + $ar_buf_n[6];
+ $results[$ar_buf_b[0]]['drop'] = $ar_buf_n[8];
+ }
+ }
+ return $results;
+ }
+ // get the ide device information out of dmesg
+ function ide () {
+ $results = array();
+
+ $s = 0;
+ for ($i = 0, $max = count($this->read_dmesg()); $i < $max; $i++) {
+ $buf = $this->dmesg[$i];
+ if (preg_match('/^(.*) at pciide[0-9] (.*): <(.*)>/', $buf, $ar_buf)) {
+ $s = $ar_buf[1];
+ $results[$s]['model'] = $ar_buf[3];
+ $results[$s]['media'] = 'Hard Disk';
+ // now loop again and find the capacity
+ for ($j = 0, $max1 = count($this->read_dmesg()); $j < $max1; $j++) {
+ $buf_n = $this->dmesg[$j];
+ if (preg_match("/^($s): (.*), (.*), (.*)MB, .*$/", $buf_n, $ar_buf_n)) {
+ $results[$s]['capacity'] = $ar_buf_n[4] * 2048 * 1.049;;
+ }
+ }
+ }
+ }
+ asort($results);
+ return $results;
+ }
+
+ function distroicon () {
+ $result = 'OpenBSD.png';
+ return($result);
+ }
+
+}
+
+?>
/gestion/phpsysinfo/includes/os/class.FreeBSD.inc.php
0,0 → 1,108
<?php
 
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
 
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
// $Id: class.FreeBSD.inc.php,v 1.17 2006/04/18 16:22:26 bigmichi1 Exp $
if (!defined('IN_PHPSYSINFO')) {
die("No Hacking");
}
 
require_once(APP_ROOT . '/includes/os/class.BSD.common.inc.php');
 
class sysinfo extends bsd_common {
var $cpu_regexp = "";
var $scsi_regexp1 = "";
var $scsi_regexp2 = "";
var $cpu_regexp2 = "";
// Our contstructor
// this function is run on the initialization of this class
function sysinfo () {
$this->bsd_common();
$this->cpu_regexp = "CPU: (.*) \((.*)-MHz (.*)\)";
$this->scsi_regexp1 = "^(.*): <(.*)> .*SCSI.*device";
$this->scsi_regexp2 = "^(da[0-9]): (.*)MB ";
$this->cpu_regexp2 = "/(.*) ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)/";
}
 
function get_sys_ticks () {
$s = explode(' ', $this->grab_key('kern.boottime'));
$a = ereg_replace('{ ', '', $s[3]);
$sys_ticks = time() - $a;
return $sys_ticks;
}
 
function network () {
$netstat = execute_program('netstat', '-nibd | grep Link');
$lines = explode("\n", $netstat);
$results = array();
for ($i = 0, $max = sizeof($lines); $i < $max; $i++) {
$ar_buf = preg_split("/\s+/", $lines[$i]);
if (!empty($ar_buf[0])) {
$results[$ar_buf[0]] = array();
 
if (strlen($ar_buf[3]) < 15) {
$results[$ar_buf[0]]['rx_bytes'] = $ar_buf[5];
$results[$ar_buf[0]]['rx_packets'] = $ar_buf[3];
$results[$ar_buf[0]]['rx_errs'] = $ar_buf[4];
$results[$ar_buf[0]]['rx_drop'] = $ar_buf[10];
 
$results[$ar_buf[0]]['tx_bytes'] = $ar_buf[8];
$results[$ar_buf[0]]['tx_packets'] = $ar_buf[6];
$results[$ar_buf[0]]['tx_errs'] = $ar_buf[7];
$results[$ar_buf[0]]['tx_drop'] = $ar_buf[10];
 
$results[$ar_buf[0]]['errs'] = $ar_buf[4] + $ar_buf[7];
$results[$ar_buf[0]]['drop'] = $ar_buf[10];
} else {
$results[$ar_buf[0]]['rx_bytes'] = $ar_buf[6];
$results[$ar_buf[0]]['rx_packets'] = $ar_buf[4];
$results[$ar_buf[0]]['rx_errs'] = $ar_buf[5];
$results[$ar_buf[0]]['rx_drop'] = $ar_buf[11];
 
$results[$ar_buf[0]]['tx_bytes'] = $ar_buf[9];
$results[$ar_buf[0]]['tx_packets'] = $ar_buf[7];
$results[$ar_buf[0]]['tx_errs'] = $ar_buf[8];
$results[$ar_buf[0]]['tx_drop'] = $ar_buf[11];
 
$results[$ar_buf[0]]['errs'] = $ar_buf[5] + $ar_buf[8];
$results[$ar_buf[0]]['drop'] = $ar_buf[11];
}
}
}
return $results;
}
 
function distroicon () {
$result = 'FreeBSD.png';
return($result);
}
function memory_additional($results) {
$pagesize = $this->grab_key("hw.pagesize");
$results['ram']['cached'] = $this->grab_key("vm.stats.vm.v_cache_count") * $pagesize / 1024;
$results['ram']['cached_percent'] = round( $results['ram']['cached'] * 100 / $results['ram']['total']);
$results['ram']['app'] = $this->grab_key("vm.stats.vm.v_active_count") * $pagesize / 1024;
$results['ram']['app_percent'] = round( $results['ram']['app'] * 100 / $results['ram']['total']);
$results['ram']['buffers'] = $results['ram']['used'] - $results['ram']['app'] - $results['ram']['cached'];
$results['ram']['buffers_percent'] = round( $results['ram']['buffers'] * 100 / $results['ram']['total']);
return $results;
}
}
 
?>
/gestion/phpsysinfo/includes/indicator.php
0,0 → 1,62
<?php
/***************************************************************************
* Copyright (C) 2006 by phpSysInfo - A PHP System Information Script *
* http://phpsysinfo.sourceforge.net/ *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
// $Id: indicator.php,v 1.4 2006/06/15 18:42:30 bigmichi1 Exp $
 
if ( ! defined( 'IN_PHPSYSINFO' ) ) {
die( "No Hacking" );
}
 
$start = $_GET['color1'];
$end = $_GET['color2'];
$percent = $_GET['percent'];
$height = $_GET['height'];
$width = 300;
 
sscanf( $start, "%2x%2x%2x", $rbase, $gbase, $bbase );
sscanf( $end, "%2x%2x%2x", $rend, $gend, $bend );
 
if( $rbase == $rend ) $rend = $rend - 1;
if( $gbase == $gend ) $gend = $gend - 1;
if( $bbase == $bend ) $bend = $bend - 1;
 
$rmod = ( $rend - $rbase ) / $width;
$gmod = ( $gend - $gbase ) / $width;
$bmod = ( $bend - $bbase ) / $width;
 
$image = imagecreatetruecolor( $width, $height );
imagefilledrectangle( $image, 0, 0, $width, $height, imagecolorallocate( $image, 255,255,255 ) );
$step = $width / 100;
 
for( $i = 0; $i < $percent * $step; $i = $i + $step + 1 ) {
$r = ( $rmod * $i ) + $rbase;
$g = ( $gmod * $i ) + $gbase;
$b = ( $bmod * $i ) + $bbase;
$color = imagecolorallocate( $image, $r, $g, $b );
imagefilledrectangle( $image, $i, 0, $i + $step, $height, $color );
}
 
imagerectangle( $image, 0, 0, $width - 1, $height - 1, imagecolorallocate( $image, 0, 0, 0 ) );
imagepng( $image );
imagedestroy( $image );
?>
/gestion/phpsysinfo/includes/system_header.php
0,0 → 1,55
<?php
/***************************************************************************
* Copyright (C) 2006 by phpSysInfo - A PHP System Information Script *
* http://phpsysinfo.sourceforge.net/ *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
// $Id: system_header.php,v 1.30 2007/02/11 15:57:17 bigmichi1 Exp $
 
if( ! defined( 'IN_PHPSYSINFO' ) ) {
die( "No Hacking" );
}
 
setlocale( LC_ALL, $text['locale'] );
global $XPath;
 
header( "Cache-Control: no-cache, must-revalidate" );
if( ! isset( $charset ) ) {
$charset = "iso-8859-1";
}
header( "Content-Type: text/html; charset=" . $charset );
 
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n";
echo "<html>\n";
echo created_by();
 
echo "<head>\n";
echo "\t<title>" . $text['title'], " -- ", $XPath->getData('/phpsysinfo/Vitals/Hostname'), " --</title>\n";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=" . $charset . "\">";
if( file_exists( APP_ROOT . "/templates/" . $template . "/" . $template . ".css" ) ) {
echo "\t<link rel=\"stylesheet\" type=\"text/css\" href=\"" . $webpath . "templates/" . $template . "/" . $template . ".css\">\n";
}
echo "</head>\n";
 
if( file_exists( APP_ROOT . "/templates/" . $template . "/images/" . $template . "_background.gif" ) ) {
echo "<body background=\"" . $webpath . "templates/" . $template . "/images/" . $template . "_background.gif\">";
} else {
echo "<body>\n";
}
 
?>
/gestion/phpsysinfo/includes/common_functions.php
0,0 → 1,439
<?php
/***************************************************************************
* Copyright (C) 2006 by phpSysInfo - A PHP System Information Script *
* http://phpsysinfo.sourceforge.net/ *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
// $Id: common_functions.php,v 1.55 2007/02/20 19:20:20 bigmichi1 Exp $
 
// usefull during development
if( isset($showerrors) && $showerrors ) {
error_reporting( E_ALL | E_NOTICE );
} else {
error_reporting( E_ERROR | E_WARNING | E_PARSE );
}
 
// HTML/XML Comment
function created_by () {
global $VERSION;
return "<!--\n\tCreated By: phpSysInfo - " . $VERSION . "\n\thttp://phpsysinfo.sourceforge.net/\n-->\n";
}
 
// print out the bar graph
// $value as full percentages
// $maximim as current maximum
// $b as scale factor
// $type as filesystem type
function create_bargraph ($value, $maximum, $b, $type = "") {
global $webpath;
$textdir = direction();
$imgpath = $webpath . 'templates/' . TEMPLATE_SET . '/images/';
$maximum == 0 ? $barwidth = 0 : $barwidth = round((100 / $maximum) * $value) * $b;
$red = 90 * $b;
$yellow = 75 * $b;
if (!file_exists(APP_ROOT . "/templates/" . TEMPLATE_SET . "/images/nobar_left.gif")) {
if ($barwidth == 0) {
return '<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'bar_' . $textdir['left'] . '.gif">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'bar_middle.gif" width="1">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'bar_' . $textdir['right'] . '.gif">';
} elseif ( file_exists( APP_ROOT . "/templates/" . TEMPLATE_SET . "/images/yellowbar_left.gif") && ( $barwidth > $yellow ) && ( $barwidth < $red ) ) {
return '<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'yellowbar_' . $textdir['left'] . '.gif">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'yellowbar_middle.gif" width="' . $barwidth . '">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'yellowbar_' . $textdir['right'] . '.gif">';
} elseif ( ( $barwidth < $red ) || ( $type == "iso9660" ) || ( $type == "CDFS" ) ) {
return '<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'bar_' . $textdir['left'] . '.gif">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'bar_middle.gif" width="' . $barwidth . '">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'bar_' . $textdir['right'] . '.gif">';
} else {
return '<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'redbar_' . $textdir['left'] . '.gif">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'redbar_middle.gif" width="' . $barwidth . '">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'redbar_' . $textdir['right'] . '.gif">';
}
} else {
if ($barwidth == 0) {
return '<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'nobar_' . $textdir['left'] . '.gif">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'nobar_middle.gif" width="' . ( 100 * $b ) . '">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'nobar_' . $textdir['right'] . '.gif">';
} elseif ( file_exists( APP_ROOT . "/templates/" . TEMPLATE_SET . "/images/yellowbar_left.gif" ) && ( $barwidth > $yellow ) && ( $barwidth < $red ) ) {
return '<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'yellowbar_' . $textdir['left'] . '.gif">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'yellowbar_middle.gif" width="' . $barwidth . '">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'nobar_middle.gif" width="' . ( ( 100 * $b ) - $barwidth ) . '">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'nobar_' . $textdir['right'] . '.gif">';
} elseif ( ( $barwidth < $red ) || ( $type == "iso9660" ) || ( $type == "CDFS" ) ) {
return '<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'bar_' . $textdir['left'] . '.gif">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'bar_middle.gif" width="' . $barwidth . '">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'nobar_middle.gif" width="' . ( ( 100 * $b ) - $barwidth ) . '">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'nobar_' . $textdir['right'] . '.gif">';
} elseif ( $barwidth == ( 100 * $b ) ) {
return '<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'redbar_' . $textdir['left'] . '.gif">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'redbar_middle.gif" width="' . ( 100 * $b ) . '">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'redbar_' . $textdir['right'] . '.gif">';
} else {
return '<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'redbar_' . $textdir['left'] . '.gif">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'redbar_middle.gif" width="' . $barwidth . '">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'nobar_middle.gif" width="' . ( ( 100 * $b ) - $barwidth ) . '">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'nobar_' . $textdir['right'] . '.gif">';
}
}
}
 
function create_bargraph_grad( $value, $maximum, $b, $type = "" ) {
global $webpath;
$maximum == 0 ? $barwidth = 0 : $barwidth = round( ( 100 / $maximum ) * $value );
$startColor = '0ef424'; // green
$endColor = 'ee200a'; // red
if ( $barwidth > 100 ) {
$barwidth = 0;
}
return '<img height="' . BAR_HEIGHT . '" width="300" src="' . $webpath . 'includes/indicator.php?height=' . BAR_HEIGHT . '&amp;percent=' . $barwidth . '&amp;color1=' . $startColor . '&amp;color2=' . $endColor . '" alt="">';
}
 
function direction() {
global $text_dir;
if( ! isset( $text_dir ) || ( $text_dir == "ltr" ) ) {
$arrResult['direction'] = "ltr";
$arrResult['left'] = "left";
$arrResult['right'] = "right";
} else {
$arrResult['direction'] = "rtl";
$arrResult['left'] = "right";
$arrResult['right'] = "left";
}
return $arrResult;
}
 
// Find a system program. Do path checking
function find_program ($strProgram) {
global $addpaths;
$arrPath = array( '/bin', '/sbin', '/usr/bin', '/usr/sbin', '/usr/local/bin', '/usr/local/sbin' );
if( isset( $addpaths ) && is_array( $addpaths ) ) {
$arrPath = array_merge( $arrPath, $addpaths );
}
if ( function_exists( "is_executable" ) ) {
foreach ( $arrPath as $strPath ) {
$strProgrammpath = $strPath . "/" . $strProgram;
if( is_executable( $strProgrammpath ) ) {
return $strProgrammpath;
}
}
} else {
return strpos( $strProgram, '.exe' );
}
}
 
// Execute a system program. return a trim()'d result.
// does very crude pipe checking. you need ' | ' for it to work
// ie $program = execute_program('netstat', '-anp | grep LIST');
// NOT $program = execute_program('netstat', '-anp|grep LIST');
function execute_program ($strProgramname, $strArgs = '', $booErrorRep = true ) {
global $error;
$strBuffer = '';
$strError = '';
$strProgram = find_program($strProgramname);
if ( ! $strProgram ) {
if( $booErrorRep ) {
$error->addError( 'find_program(' . $strProgramname . ')', 'program not found on the machine', __LINE__, __FILE__);
}
return "ERROR";
}
// see if we've gotten a |, if we have we need to do patch checking on the cmd
if( $strArgs ) {
$arrArgs = explode( ' ', $strArgs );
for( $i = 0; $i < count( $arrArgs ); $i++ ) {
if ( $arrArgs[$i] == '|' ) {
$strCmd = $arrArgs[$i + 1];
$strNewcmd = find_program( $strCmd );
$strArgs = ereg_replace( "\| " . $strCmd, "| " . $strNewcmd, $strArgs );
}
}
}
// no proc_open() below php 4.3
if( function_exists( 'proc_open' ) ) {
$descriptorspec = array(
0 => array("pipe", "r"), // stdin is a pipe that the child will read from
1 => array("pipe", "w"), // stdout is a pipe that the child will write to
2 => array("pipe", "w") // stderr is a pipe that the child will write to
);
$process = proc_open( $strProgram . " " . $strArgs, $descriptorspec, $pipes );
if( is_resource( $process ) ) {
while( !feof( $pipes[1] ) ) {
$strBuffer .= fgets( $pipes[1], 1024 );
}
fclose( $pipes[1] );
while( !feof( $pipes[2] ) ) {
$strError .= fgets( $pipes[2], 1024 );
}
fclose( $pipes[2] );
}
$return_value = proc_close( $process );
} else {
if( $fp = popen( "(" . $strProgram . " " . $strArgs . " > /dev/null) 3>&1 1>&2 2>&3", 'r' ) ) {
while( ! feof( $fp ) ) {
$strError .= fgets( $fp, 4096 );
}
pclose( $fp );
}
$strError = trim( $strError );
if( $fp = popen( $strProgram . " " . $strArgs, 'r' ) ) {
while( ! feof( $fp ) ) {
$strBuffer .= fgets( $fp, 4096 );
}
$return_value = pclose( $fp );
}
}
 
$strError = trim( $strError );
$strBuffer = trim( $strBuffer );
if( ! empty( $strError ) || $return_value <> 0 ) {
if( $booErrorRep ) {
$error->addError( $strProgram, $strError . "\nReturn value: " . $return_value, __LINE__, __FILE__);
}
}
return $strBuffer;
}
 
// A helper function, when passed a number representing KB,
// and optionally the number of decimal places required,
// it returns a formated number string, with unit identifier.
function format_bytesize ($intKbytes, $intDecplaces = 2) {
global $text;
$strSpacer = '&nbsp;';
if( $intKbytes > 1048576 ) {
$strResult = sprintf( '%.' . $intDecplaces . 'f', $intKbytes / 1048576 );
$strResult .= $strSpacer . $text['gb'];
} elseif( $intKbytes > 1024 ) {
$strResult = sprintf( '%.' . $intDecplaces . 'f', $intKbytes / 1024);
$strResult .= $strSpacer . $text['mb'];
} else {
$strResult = sprintf( '%.' . $intDecplaces . 'f', $intKbytes );
$strResult .= $strSpacer . $text['kb'];
}
return $strResult;
}
 
function format_speed( $intHz ) {
$strResult = "";
if( $intHz < 1000 ) {
$strResult = $intHz . " Mhz";
} else {
$strResult = round( $intHz / 1000, 2 ) . " GHz";
}
return $strResult;
}
 
function get_gif_image_height( $image ) {
// gives the height of the given GIF image, by reading it's LSD (Logical Screen Discriptor)
// by Edwin Meester aka MillenniumV3
// Header:
//3bytes Discription
// 3bytes Version
// LSD:
//2bytes Logical Screen Width
// 2bytes Logical Screen Height
// 1bit Global Color Table Flag
// 3bits Color Resolution
// 1bit Sort Flag
// 3bits Size of Global Color Table
// 1byte Background Color Index
// 1byte Pixel Aspect Ratio
// Open Image
$fp = fopen( $image, 'rb' );
// read Header + LSD
$strHeaderandlsd = fread( $fp, 13 );
fclose( $fp );
// calc Height from Logical Screen Height bytes
$intResult = ord( $strHeaderandlsd{8} ) + ord( $strHeaderandlsd{9} ) * 255;
return $intResult;
}
 
// Check if a string exist in the global $hide_mounts.
// Return true if this is the case.
function hide_mount( $strMount ) {
global $hide_mounts;
if( isset( $hide_mounts ) && is_array( $hide_mounts ) && in_array( $strMount, $hide_mounts ) ) {
return true;
} else {
return false;
}
}
 
// Check if a string exist in the global $hide_fstypes.
// Return true if this is the case.
function hide_fstype( $strFSType ) {
global $hide_fstypes;
if( isset( $hide_fstypes ) && is_array( $hide_fstypes ) && in_array( $strFSType, $hide_fstypes ) ) {
return true;
} else {
return false;
}
}
 
function uptime( $intTimestamp ) {
global $text;
$strUptime = '';
$intMin = $intTimestamp / 60;
$intHours = $intMin / 60;
$intDays = floor( $intHours / 24 );
$intHours = floor( $intHours - ( $intDays * 24 ) );
$intMin = floor( $intMin - ( $intDays * 60 * 24 ) - ( $intHours * 60 ) );
if( $intDays != 0 ) {
$strUptime .= $intDays. "&nbsp;" . $text['days'] . "&nbsp;";
}
if( $intHours != 0 ) {
$strUptime .= $intHours . "&nbsp;" . $text['hours'] . "&nbsp;";
}
$strUptime .= $intMin . "&nbsp;" . $text['minutes'];
return $strUptime;
}
 
//Replace some chars which are not valid in xml with iso-8859-1 encoding
function replace_specialchars( &$strXml ) {
$arrSearch = array( chr(174), chr(169), chr(228), chr(246), chr(252), chr(214), chr(220), chr(196) );
$arrReplace = array( "(R)", "(C)", "ae", "oe", "ue", "Oe", "Ue", "Ae" );
$strXml = str_replace( $arrSearch, $arrReplace, $strXml );
}
 
// find duplicate entrys and count them, show this value befor the duplicated name
function finddups( $arrInput ) {
$arrResult = array();
if( is_array( $arrInput ) ) {
$arrBuffer = array_count_values( $arrInput );
foreach( $arrBuffer as $strKey => $intValue) {
if( $intValue > 1 ) {
$arrResult[] = "(" . $intValue . "x) " . $strKey;
} else {
$arrResult[] = $strKey;
}
}
}
return $arrResult;
}
 
function rfts( $strFileName, $intLines = 0, $intBytes = 4096, $booErrorRep = true ) {
global $error;
$strFile = "";
$intCurLine = 1;
if( file_exists( $strFileName ) ) {
if( $fd = fopen( $strFileName, 'r' ) ) {
while( !feof( $fd ) ) {
$strFile .= fgets( $fd, $intBytes );
if( $intLines <= $intCurLine && $intLines != 0 ) {
break;
} else {
$intCurLine++;
}
}
fclose( $fd );
} else {
if( $booErrorRep ) {
$error->addError( 'fopen(' . $strFileName . ')', 'file can not read by phpsysinfo', __LINE__, __FILE__ );
}
return "ERROR";
}
} else {
if( $booErrorRep ) {
$error->addError( 'file_exists(' . $strFileName . ')', 'the file does not exist on your machine', __LINE__, __FILE__ );
}
return "ERROR";
}
return $strFile;
}
 
function gdc( $strPath, $booErrorRep = true ) {
global $error;
$arrDirectoryContent = array();
if( is_dir( $strPath ) ) {
if( $handle = opendir( $strPath ) ) {
while( ( $strFile = readdir( $handle ) ) !== false ) {
if( $strFile != "." && $strFile != ".." && $strFile != "CVS" ) {
$arrDirectoryContent[] = $strFile;
}
}
closedir( $handle );
} else {
if( $booErrorRep ) {
$error->addError( 'opendir(' . $strPath . ')', 'directory can not be read by phpsysinfo', __LINE__, __FILE__ );
}
}
} else {
if( $booErrorRep ) {
$error->addError( 'is_dir(' . $strPath . ')', 'directory does not exist on your machine', __LINE__, __FILE__ );
}
}
return $arrDirectoryContent;
}
 
function temperature( $floatTempC ) {
global $temperatureformat, $text, $error;
$strResult = "&nbsp;";
switch( strtoupper( $temperatureformat ) ) {
case "F":
$floatFahrenheit = $floatTempC * 1.8 + 32;
$strResult .= round( $floatFahrenheit ) . $text['degreeF'];
break;
case "C":
$strResult .= round( $floatTempC ) . $text['degreeC'];
break;
case "F-C":
$floatFahrenheit = $floatTempC * 1.8 + 32;
$strResult .= round( $floatFahrenheit ) . $text['degreeF'];
$strResult .= "&nbsp;(";
$strResult .= round( $floatTempC ) . $text['degreeC'];
$strResult .= ")";
break;
case "C-F":
$floatFahrenheit = $floatTempC * 1.8 + 32;
$strResult .= round( $floatTempC ) . $text['degreeC'];
$strResult .= "&nbsp;(";
$strResult .= round( $floatFahrenheit ) . $text['degreeF'];
$strResult .= ")";
break;
default:
$error->addError( 'temperature(' . $floatTempC . ')', 'wrong or unspecified temperature format', __LINE__, __FILE__ );
break;
}
return $strResult;
}
?>
/gestion/phpsysinfo/includes/system_footer.php
0,0 → 1,95
<?php
/***************************************************************************
* Copyright (C) 2006 by phpSysInfo - A PHP System Information Script *
* http://phpsysinfo.sourceforge.net/ *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
// $Id: system_footer.php,v 1.51.4.1 2007/08/19 09:22:21 xqus Exp $
 
if( ! defined( 'IN_PHPSYSINFO' ) ) {
die( "No Hacking" );
}
 
$arrDirection = direction();
 
if( ! $hide_picklist ) {
echo "<center>\n";
$update_form = "<form method=\"POST\" action=\"" . htmlentities($_SERVER['PHP_SELF']) . "\">\n" . "\t" . $text['template'] . ":&nbsp;\n" . "\t<select name=\"template\">\n";
$resDir = opendir( APP_ROOT . '/templates/' );
while( false !== ( $strFile = readdir( $resDir ) ) ) {
if( $strFile != 'CVS' && $strFile[0] != '.' && is_dir( APP_ROOT . '/templates/' . $strFile ) ) {
$arrFilelist[] = $strFile;
}
}
closedir( $resDir );
asort( $arrFilelist );
foreach( $arrFilelist as $strVal ) {
if( $_COOKIE['template'] == $strVal ) {
$update_form .= "\t\t<option value=\"" . $strVal . "\" SELECTED>" . $strVal . "</option>\n";
} else {
$update_form .= "\t\t<option value=\"" . $strVal . "\">" . $strVal . "</option>\n";
}
}
$update_form .= "\t\t<option value=\"xml\">XML</option>\n";
$update_form .= "\t\t<option value=\"wml\">WML</option>\n";
$update_form .= "\t\t<option value=\"random\"";
if( $_COOKIE['template'] == 'random' ) {
$update_form .= " SELECTED";
}
$update_form .= ">random</option>\n";
$update_form .= "\t</select>\n";
$update_form .= "\t&nbsp;&nbsp;" . $text['language'] . ":&nbsp;\n" . "\t<select name=\"lng\">\n";
unset( $arrFilelist );
$resDir = opendir( APP_ROOT . "/includes/lang/" );
while( false !== ( $strFile = readdir( $resDir ) ) ) {
if ( $strFile[0] != '.' && is_file( APP_ROOT . "/includes/lang/" . $strFile ) && preg_match( "/\.php$/", $strFile ) ) {
$arrFilelist[] = preg_replace("/\.php$/", "", $strFile );
}
}
closedir($resDir);
asort( $arrFilelist );
foreach( $arrFilelist as $strVal ) {
if( $_COOKIE['lng'] == $strVal ) {
$update_form .= "\t\t<option value=\"" . $strVal . "\" SELECTED>" . $strVal . "</option>\n";
} else {
$update_form .= "\t\t<option value=\"" . $strVal . "\">" . $strVal . "</option>\n";
}
}
$update_form .= "\t\t<option value=\"browser\"";
if( $_COOKIE['lng'] == "browser" ) {
$update_form .= " SELECTED";
}
$update_form .= ">browser default</option>\n\t</select>\n";
 
$update_form .= "\t<input type=\"submit\" value=\"" . $text['submit'] . "\">\n" . "</form>\n";
echo $update_form;
echo "</center>\n";
} else {
echo "<br>\n";
}
 
echo "<hr>\n";
echo "<table width=\"100%\">\n\t<tr>\n";
echo "\t\t<td align=\"" . $arrDirection['left'] . "\"><font size=\"-1\">" . $text['created'] . "&nbsp;<a href=\"http://phpsysinfo.sourceforge.net\" target=\"_blank\">phpSysInfo-" . $VERSION . "</a>&nbsp;" . strftime( $text['gen_time'], time() ) . "</font></td>\n";
echo "\t\t<td align=\"" . $arrDirection['right'] . "\"><font size=\"-1\">" . round( ( array_sum( explode( " ", microtime() ) ) - $startTime ), 4 ). " sec</font></td>\n";
echo "\t</tr>\n</table>\n";
echo "<br>\n</body>\n</html>\n";
 
?>
/gestion/phpsysinfo/includes/index.html
--- gestion/phpsysinfo/includes/class.error.inc.php (nonexistent)
+++ gestion/phpsysinfo/includes/class.error.inc.php (revision 40)
@@ -0,0 +1,129 @@
+<?php
+/***************************************************************************
+ * Copyright (C) 2006 by phpSysInfo - A PHP System Information Script *
+ * http://phpsysinfo.sourceforge.net/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
+// $Id: class.error.inc.php,v 1.9 2007/02/11 15:57:17 bigmichi1 Exp $
+
+class Error {
+
+ // Array which holds the error messages
+ var $arrErrorList = array();
+ // current number of errors encountered
+ var $errors = 0;
+
+ /**
+ *
+ * addError()
+ *
+ * @param strCommand string Command, which cause the Error
+ * @param strMessage string additional Message, to describe the Error
+ * @param intLine integer on which line the Error occours
+ * @param strFile string in which File the Error occours
+ *
+ * @return -
+ *
+ **/
+ function addError( $strCommand, $strMessage, $intLine, $strFile ) {
+ $this->arrErrorList[$this->errors]['command'] = $strCommand;
+ $this->arrErrorList[$this->errors]['message'] = $strMessage;
+ $this->arrErrorList[$this->errors]['line'] = $intLine;
+ $this->arrErrorList[$this->errors]['file'] = basename( $strFile );
+ $this->errors++;
+ }
+
+ /**
+ *
+ * addWarning()
+ *
+ * @param strMessage string Warning message to display
+ *
+ * @return -
+ *
+ **/
+ function addWarning( $strMessage ) {
+ $this->arrErrorList[$this->errors]['command'] = "WARN";
+ $this->arrErrorList[$this->errors]['message'] = $strMessage;
+ $this->errors++;
+ }
+
+ /**
+ *
+ * ErrorsAsHTML()
+ *
+ * @param -
+ *
+ * @return string string which contains a HTML table which can be used to echo out the errors
+ *
+ **/
+ function ErrorsAsHTML() {
+ $strHTMLString = "";
+ $strWARNString = "";
+ $strHTMLhead = "<table width=\"100%\" border=\"0\">\n"
+ . "\t<tr>\n"
+ . "\t\t<td><font size=\"-1\"><b>File</b></font></td>\n"
+ . "\t\t<td><font size=\"-1\"><b>Line</b></font></td>\n"
+ . "\t\t<td><font size=\"-1\"><b>Command</b></font></td>\n"
+ . "\t\t<td><font size=\"-1\"><b>Message</b></font></td>\n"
+ . "\t</tr>\n";
+ $strHTMLfoot = "</table>\n";
+
+ if( $this->errors > 0 ) {
+ foreach( $this->arrErrorList as $arrLine ) {
+ if( $arrLine['command'] == "WARN" ) {
+ $strWARNString .= "<font size=\"-1\"><b>WARNING: " . str_replace( "\n", "<br>", htmlspecialchars( $arrLine['message'] ) ) . "</b></font><br>\n";
+ } else {
+ $strHTMLString .= "\t<tr>\n"
+ . "\t\t<td><font size=\"-1\">" . htmlspecialchars( $arrLine['file'] ) . "</font></td>\n"
+ . "\t\t<td><font size=\"-1\">" . $arrLine['line'] . "</font></td>\n"
+ . "\t\t<td><font size=\"-1\">" . htmlspecialchars( $arrLine['command'] ) . "</font></td>\n"
+ . "\t\t<td><font size=\"-1\">" . str_replace( "\n", "<br>", htmlspecialchars( $arrLine['message'] ) ) . "</font></td>\n"
+ . "\t</tr>\n";
+ }
+ }
+ }
+
+ if( !empty( $strHTMLString ) ) {
+ $strHTMLString = $strWARNString . $strHTMLhead . $strHTMLString . $strHTMLfoot;
+ } else {
+ $strHTMLString = $strWARNString;
+ }
+
+ return $strHTMLString;
+ }
+
+ /**
+ *
+ * ErrorsExist()
+ *
+ * @param -
+ *
+ * @return true there are errors logged
+ * false no errors logged
+ *
+ **/
+ function ErrorsExist() {
+ if( $this->errors > 0 ) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+}
+?>
/gestion/phpsysinfo/includes/class.Template.inc.php
0,0 → 1,449
<?php
/**************************************************************************\
* eGroupWare API - Template class *
* (C) Copyright 1999-2000 NetUSE GmbH Kristian Koehntopp *
* ------------------------------------------------------------------------ *
* http://www.egroupware.org/ *
* ------------------------------------------------------------------------ *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation; either version 2.1 of the License, or *
* any later version. *
\**************************************************************************/
 
/* $Id: class.Template.inc.php,v 1.5 2005/11/26 13:01:24 bigmichi1 Exp $ */
 
class Template
{
var $classname = 'Template';
 
/* if set, echo assignments */
var $debug = False;
 
/* $file[handle] = 'filename'; */
var $file = array();
 
/* relative filenames are relative to this pathname */
var $root = '';
 
/* $varkeys[key] = 'key'; $varvals[key] = 'value'; */
var $varkeys = array();
var $varvals = array();
 
/* 'remove' => remove undefined variables
* 'comment' => replace undefined variables with comments
* 'keep' => keep undefined variables
*/
var $unknowns = 'remove';
 
/* 'yes' => halt, 'report' => report error, continue, 'no' => ignore error quietly */
var $halt_on_error = 'yes';
 
/* last error message is retained here */
var $last_error = '';
 
/***************************************************************************/
/* public: Constructor.
* root: template directory.
* unknowns: how to handle unknown variables.
*/
function Template($root = '.', $unknowns = 'remove')
{
$this->set_root($root);
$this->set_unknowns($unknowns);
}
 
/* public: setroot(pathname $root)
* root: new template directory.
*/
function set_root($root)
{
if (!is_dir($root))
{
$this->halt("set_root: $root is not a directory.");
return false;
}
$this->root = $root;
return true;
}
 
/* public: set_unknowns(enum $unknowns)
* unknowns: 'remove', 'comment', 'keep'
*
*/
function set_unknowns($unknowns = 'keep')
{
$this->unknowns = $unknowns;
}
 
/* public: set_file(array $filelist)
* filelist: array of handle, filename pairs.
*
* public: set_file(string $handle, string $filename)
* handle: handle for a filename,
* filename: name of template file
*/
function set_file($handle, $filename = '')
{
if (!is_array($handle))
{
if ($filename == '')
{
$this->halt("set_file: For handle $handle filename is empty.");
return false;
}
$this->file[$handle] = $this->filename($filename);
}
else
{
reset($handle);
while(list($h, $f) = each($handle))
{
$this->file[$h] = $this->filename($f);
}
}
}
 
/* public: set_block(string $parent, string $handle, string $name = '')
* extract the template $handle from $parent,
* place variable {$name} instead.
*/
function set_block($parent, $handle, $name = '')
{
if (!$this->loadfile($parent))
{
$this->halt("subst: unable to load $parent.");
return false;
}
if ($name == '')
{
$name = $handle;
}
$str = $this->get_var($parent);
$reg = "/<!--\s+BEGIN $handle\s+-->(.*)\n\s*<!--\s+END $handle\s+-->/sm";
preg_match_all($reg, $str, $m);
$str = preg_replace($reg, '{' . "$name}", $str);
$this->set_var($handle, $m[1][0]);
$this->set_var($parent, $str);
}
 
/* public: set_var(array $values)
* values: array of variable name, value pairs.
*
* public: set_var(string $varname, string $value)
* varname: name of a variable that is to be defined
* value: value of that variable
*/
function set_var($varname, $value = '')
{
if (!is_array($varname))
{
if (!empty($varname))
{
if ($this->debug)
{
print "scalar: set *$varname* to *$value*<br>\n";
}
$this->varkeys[$varname] = $this->varname($varname);
$this->varvals[$varname] = str_replace('phpGroupWare','eGroupWare',$value);
}
}
else
{
reset($varname);
while(list($k, $v) = each($varname))
{
if (!empty($k))
{
if ($this->debug)
{
print "array: set *$k* to *$v*<br>\n";
}
$this->varkeys[$k] = $this->varname($k);
$this->varvals[$k] = str_replace('phpGroupWare','eGroupWare',$v);
}
}
}
}
 
/* public: subst(string $handle)
* handle: handle of template where variables are to be substituted.
*/
function subst($handle)
{
if (!$this->loadfile($handle))
{
$this->halt("subst: unable to load $handle.");
return false;
}
 
$str = $this->get_var($handle);
reset($this->varkeys);
while (list($k, $v) = each($this->varkeys))
{
$str = str_replace($v, $this->varvals[$k], $str);
}
return $str;
}
 
/* public: psubst(string $handle)
* handle: handle of template where variables are to be substituted.
*/
function psubst($handle)
{
print $this->subst($handle);
return false;
}
 
/* public: parse(string $target, string $handle, boolean append)
* public: parse(string $target, array $handle, boolean append)
* target: handle of variable to generate
* handle: handle of template to substitute
* append: append to target handle
*/
function parse($target, $handle, $append = false)
{
if (!is_array($handle))
{
$str = $this->subst($handle);
if ($append)
{
$this->set_var($target, $this->get_var($target) . $str);
}
else
{
$this->set_var($target, $str);
}
}
else
{
reset($handle);
while(list($i, $h) = each($handle))
{
$str = $this->subst($h);
$this->set_var($target, $str);
}
}
return $str;
}
 
function pparse($target, $handle, $append = false)
{
print $this->parse($target, $handle, $append);
return false;
}
 
/* This is short for finish parse */
function fp($target, $handle, $append = False)
{
return $this->finish($this->parse($target, $handle, $append));
}
 
/* This is a short cut for print finish parse */
function pfp($target, $handle, $append = False)
{
echo $this->finish($this->parse($target, $handle, $append));
}
 
/* public: get_vars()
*/
function get_vars()
{
reset($this->varkeys);
while(list($k, $v) = each($this->varkeys))
{
$result[$k] = $this->varvals[$k];
}
return $result;
}
 
/* public: get_var(string varname)
* varname: name of variable.
*
* public: get_var(array varname)
* varname: array of variable names
*/
function get_var($varname)
{
if (!is_array($varname))
{
return $this->varvals[$varname];
}
else
{
reset($varname);
while(list($k, $v) = each($varname))
{
$result[$k] = $this->varvals[$k];
}
return $result;
}
}
 
/* public: get_undefined($handle)
* handle: handle of a template.
*/
function get_undefined($handle)
{
if (!$this->loadfile($handle))
{
$this->halt("get_undefined: unable to load $handle.");
return false;
}
 
preg_match_all("/\{([^}]+)\}/", $this->get_var($handle), $m);
$m = $m[1];
if (!is_array($m))
{
return false;
}
reset($m);
while(list($k, $v) = each($m))
{
if (!isset($this->varkeys[$v]))
{
$result[$v] = $v;
}
}
 
if (count($result))
{
return $result;
}
else
{
return false;
}
}
 
/* public: finish(string $str)
* str: string to finish.
*/
function finish($str)
{
switch ($this->unknowns)
{
case 'keep':
break;
case 'remove':
$str = preg_replace('/{[^ \t\r\n}]+}/', '', $str);
break;
case 'comment':
$str = preg_replace('/{([^ \t\r\n}]+)}/', "<!-- Template $handle: Variable \\1 undefined -->", $str);
break;
}
 
return $str;
}
 
/* public: p(string $varname)
* varname: name of variable to print.
*/
function p($varname)
{
print $this->finish($this->get_var($varname));
}
 
function get($varname)
{
return $this->finish($this->get_var($varname));
}
 
/***************************************************************************/
/* private: filename($filename)
* filename: name to be completed.
*/
function filename($filename,$root='',$time=1)
{
if($root=='')
{
$root=$this->root;
}
if (substr($filename, 0, 1) != '/')
{
$new_filename = $root.'/'.$filename;
}
else
{
$new_filename = $filename;
}
 
if (!file_exists($new_filename))
{
if($time==2)
{
$this->halt("filename: file $new_filename does not exist.");
}
else
{
$new_root = str_replace($GLOBALS['egw_info']['server']['template_set'],'default',$root);
$new_filename = $this->filename(str_replace($root.'/','',$new_filename),$new_root,2);
}
}
return $new_filename;
}
 
/* private: varname($varname)
* varname: name of a replacement variable to be protected.
*/
function varname($varname)
{
return '{'.$varname.'}';
}
 
/* private: loadfile(string $handle)
* handle: load file defined by handle, if it is not loaded yet.
*/
function loadfile($handle)
{
if (isset($this->varkeys[$handle]) and !empty($this->varvals[$handle]))
{
return true;
}
if (!isset($this->file[$handle]))
{
$this->halt("loadfile: $handle is not a valid handle.");
return false;
}
$filename = $this->file[$handle];
 
$str = implode('', @file($filename));
if (empty($str))
{
$this->halt("loadfile: While loading $handle, $filename does not exist or is empty.");
return false;
}
 
$this->set_var($handle, $str);
return true;
}
 
/***************************************************************************/
/* public: halt(string $msg)
* msg: error message to show.
*/
function halt($msg)
{
$this->last_error = $msg;
 
if ($this->halt_on_error != 'no')
{
$this->haltmsg($msg);
}
 
if ($this->halt_on_error == 'yes')
{
echo('<b>Halted.</b>');
}
 
exit;
}
 
/* public, override: haltmsg($msg)
* msg: error message to show.
*/
function haltmsg($msg)
{
printf("<b>Template Error:</b> %s<br>\n", $msg);
}
}
/gestion/phpsysinfo/includes/mb/class.mbm5.inc.php
0,0 → 1,79
<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: class.mbm5.inc.php,v 1.7 2007/02/18 19:11:31 bigmichi1 Exp $
 
class mbinfo {
var $buf_label;
var $buf_value;
 
function mbinfo() {
$buffer = rfts( APP_ROOT . "/data/MBM5.csv" );
if( strpos( $buffer, ";") === false ) {
$delim = ",";
} else {
$delim = ";";
}
$buffer = explode( "\n", $buffer );
$this->buf_label = explode( $delim, $buffer[0] );
$this->buf_value = explode( $delim, $buffer[1] );
}
function temperature() {
$results = array();
$intCount = 0;
for( $intPosi = 3; $intPosi < 6; $intPosi++ ) {
$results[$intCount]['label'] = $this->buf_label[$intPosi];
$results[$intCount]['value'] = $this->buf_value[$intPosi];
$results[$intCount]['limit'] = '70.0';
$intCount++;
}
return $results;
}
function fans() {
$results = array();
$intCount = 0;
for( $intPosi = 13; $intPosi < 16; $intPosi++ ) {
$results[$intCount]['label'] = $this->buf_label[$intPosi];
$results[$intCount]['value'] = $this->buf_value[$intPosi];
$results[$intCount]['min'] = '3000';
$intCount++;
}
return $results;
}
function voltage() {
$results = array();
$intCount = 0;
for( $intPosi = 6; $intPosi < 13; $intPosi++ ) {
$results[$intCount]['label'] = $this->buf_label[$intPosi];
$results[$intCount]['value'] = $this->buf_value[$intPosi];
$results[$intCount]['min'] = '0.00';
$results[$intCount]['max'] = '0.00';
$intCount++;
}
return $results;
}
}
 
?>
/gestion/phpsysinfo/includes/mb/class.hddtemp.inc.php
0,0 → 1,114
<?php
 
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
 
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
// $Id: class.hddtemp.inc.php,v 1.7 2007/01/21 13:17:20 bigmichi1 Exp $
 
class hddtemp {
function temperature($hddtemp_avail) {
$ar_buf = array();
$results = array();
switch ($hddtemp_avail) {
case "tcp":
// Timo van Roermund: connect to the hddtemp daemon, use a 5 second timeout.
$fp = fsockopen('localhost', 7634, $errno, $errstr, 5);
// if connected, read the output of the hddtemp daemon
if ($fp) {
// read output of the daemon
$lines = '';
while (!feof($fp)) {
$lines .= fread($fp, 1024);
}
// close the connection
fclose($fp);
} else {
die("HDDTemp error: " . $errno . ", " . $errstr);
}
$lines = str_replace("||", "|\n|", $lines);
$ar_buf = explode("\n", $lines);
break;
case "suid":
$strDrives = "";
$strContent = rfts( "/proc/diskstats", 0, 4096, false );
if( $strContent != "ERROR" ) {
$arrContent = explode( "\n", $strContent );
foreach( $arrContent as $strLine ) {
preg_match( "/^\s(.*)\s([a-z]*)\s(.*)/", $strLine, $arrSplit );
if( !empty( $arrSplit[2] ) ) {
$strDrive = '/dev/' . $arrSplit[2];
if( file_exists( $strDrive ) ) {
$strDrives = $strDrives . $strDrive . ' ';
}
}
}
} else {
$strContent = rfts( "/proc/partitions", 0, 4096, false );
if( $strContent != "ERROR" ) {
$arrContent = explode( "\n", $strContent );
foreach( $arrContent as $strLine ) {
if( !preg_match( "/^\s(.*)\s([\/a-z0-9]*(\/disc))\s(.*)/", $strLine, $arrSplit ) ) {
preg_match( "/^\s(.*)\s([a-z]*)\s(.*)/", $strLine, $arrSplit );
}
if( !empty( $arrSplit[2] ) ) {
$strDrive = '/dev/' . $arrSplit[2];
if( file_exists( $strDrive ) ) {
$strDrives = $strDrives . $strDrive . ' ';
}
}
}
}
}
if( trim( $strDrives ) == "" ) {
return array();
}
 
$hddtemp_value = execute_program("hddtemp", $strDrives);
$hddtemp_value = explode("\n", $hddtemp_value);
foreach($hddtemp_value as $line) {
$temp = preg_split("/:\s/", $line, 3);
if(count($temp) == 3 && preg_match("/^[0-9]/", $temp[2])) {
list($temp[2], $temp[3]) = (preg_split("/\s/", $temp[2]));
array_push( $ar_buf, "|" . implode("|", $temp) . "|");
}
}
break;
default:
die("Bad hddtemp configuration in config.php");
}
// Timo van Roermund: parse the info from the hddtemp daemon.
$i = 0;
foreach($ar_buf as $line) {
$data = array();
if (ereg("\|(.*)\|(.*)\|(.*)\|(.*)\|", $line, $data)) {
if( trim($data[3]) != "ERR" ) {
// get the info we need
$results[$i]['label'] = $data[1];
$results[$i]['value'] = $data[3];
$results[$i]['model'] = $data[2];
$i++;
}
}
}
return $results;
}
}
?>
/gestion/phpsysinfo/includes/mb/class.lmsensors.inc.php
0,0 → 1,175
<?php
 
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
 
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
// $Id: class.lmsensors.inc.php,v 1.19 2007/02/18 19:11:31 bigmichi1 Exp $
if (!defined('IN_PHPSYSINFO')) {
die("No Hacking");
}
 
require_once(APP_ROOT . "/includes/common_functions.php");
 
class mbinfo {
var $lines;
 
function mbinfo() {
$lines = execute_program("sensors", "");
// Martijn Stolk: Dirty fix for misinterpreted output of sensors,
// where info could come on next line when the label is too long.
$lines = str_replace(":\n", ":", $lines);
$lines = str_replace("\n\n", "\n", $lines);
$this->lines = explode("\n", $lines);
}
function temperature() {
$ar_buf = array();
$results = array();
 
$sensors_value = $this->lines;
 
foreach($sensors_value as $line) {
$data = array();
if (ereg("(.*):(.*)\((.*)=(.*),(.*)=(.*)\)(.*)", $line, $data)) ;
elseif (ereg("(.*):(.*)\((.*)=(.*)\)(.*)", $line, $data)) ;
else (ereg("(.*):(.*)", $line, $data));
if (count($data) > 1) {
$temp = substr(trim($data[2]), -1);
switch ($temp) {
case "C";
case "F":
array_push($ar_buf, $line);
break;
}
}
}
 
$i = 0;
foreach($ar_buf as $line) {
unset($data);
if (ereg("(.*):(.*).C[ ]*\((.*)=(.*).C,(.*)=(.*).C\)(.*)\)", $line, $data)) ;
elseif (ereg("(.*):(.*).C[ ]*\((.*)=(.*).C,(.*)=(.*).C\)(.*)", $line, $data)) ;
elseif (ereg("(.*):(.*).C[ ]*\((.*)=(.*).C\)(.*)", $line, $data)) ;
else (ereg("(.*):(.*).C", $line, $data));
 
$results[$i]['label'] = $data[1];
$results[$i]['value'] = trim($data[2]);
if ( isset( $data[6] ) && trim( $data[2] ) > trim( $data[6] ) ) {
$results[$i]['limit'] = "+75";
$results[$i]['perce'] = "+75";
} else {
$results[$i]['limit'] = isset($data[4]) ? trim($data[4]) : "+75";
$results[$i]['perce'] = isset($data[6]) ? trim($data[6]) : "+75";
}
if ($results[$i]['limit'] < $results[$i]['perce']) {
$results[$i]['limit'] = $results[$i]['perce'];
}
$i++;
}
 
asort($results);
return array_values($results);
}
 
function fans() {
$ar_buf = array();
$results = array();
 
$sensors_value = $this->lines;
 
foreach($sensors_value as $line) {
$data = array();
if (ereg("(.*):(.*)\((.*)=(.*),(.*)=(.*)\)(.*)", $line, $data));
elseif (ereg("(.*):(.*)\((.*)=(.*)\)(.*)", $line, $data));
else ereg("(.*):(.*)", $line, $data);
 
if (count($data) > 1) {
$temp = explode(" ", trim($data[2]));
if (count($temp) == 1)
$temp = explode("\xb0", trim($data[2]));
if(isset($temp[1])) {
switch ($temp[1]) {
case "RPM":
array_push($ar_buf, $line);
break;
}
}
}
}
 
$i = 0;
foreach($ar_buf as $line) {
unset($data);
if (ereg("(.*):(.*) RPM \((.*)=(.*) RPM,(.*)=(.*)\)(.*)\)", $line, $data));
elseif (ereg("(.*):(.*) RPM \((.*)=(.*) RPM,(.*)=(.*)\)(.*)", $line, $data));
elseif (ereg("(.*):(.*) RPM \((.*)=(.*) RPM\)(.*)", $line, $data));
else ereg("(.*):(.*) RPM", $line, $data);
 
$results[$i]['label'] = trim($data[1]);
$results[$i]['value'] = trim($data[2]);
$results[$i]['min'] = isset($data[4]) ? trim($data[4]) : 0;
$i++;
}
 
asort($results);
return array_values($results);
}
 
function voltage() {
$ar_buf = array();
$results = array();
 
$sensors_value = $this->lines;
 
foreach($sensors_value as $line) {
$data = array();
if (ereg("(.*):(.*)\((.*)=(.*),(.*)=(.*)\)(.*)", $line, $data));
else ereg("(.*):(.*)", $line, $data);
if (count($data) > 1) {
$temp = explode(" ", trim($data[2]));
if (count($temp) == 1)
$temp = explode("\xb0", trim($data[2]));
if (isset($temp[1])) {
switch ($temp[1]) {
case "V":
array_push($ar_buf, $line);
break;
}
}
}
}
 
$i = 0;
foreach($ar_buf as $line) {
unset($data);
if (ereg("(.*):(.*) V \((.*)=(.*) V,(.*)=(.*) V\)(.*)\)", $line, $data));
elseif (ereg("(.*):(.*) V \((.*)=(.*) V,(.*)=(.*) V\)(.*)", $line, $data));
else ereg("(.*):(.*) V$", $line, $data);
if(isset($data[1])) {
$results[$i]['label'] = trim($data[1]);
$results[$i]['value'] = trim($data[2]);
$results[$i]['min'] = isset($data[4]) ? trim($data[4]) : 0;
$results[$i]['max'] = isset($data[6]) ? trim($data[6]) : 0;
$i++;
}
}
return $results;
}
}
 
?>
/gestion/phpsysinfo/includes/mb/index.html
--- gestion/phpsysinfo/includes/mb/class.mbmon.inc.php (nonexistent)
+++ gestion/phpsysinfo/includes/mb/class.mbmon.inc.php (revision 40)
@@ -0,0 +1,99 @@
+<?php
+
+// phpSysInfo - A PHP System Information Script
+// http://phpsysinfo.sourceforge.net/
+
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+// This class was created by Z. Frombach ( zoltan at frombach dot com )
+
+// $Id: class.mbmon.inc.php,v 1.5 2007/02/18 19:11:31 bigmichi1 Exp $
+
+class mbinfo {
+ var $lines;
+
+ function temperature() {
+ $results = array();
+
+ if (!isset($this->lines) ) {
+ $this->lines = explode("\n", execute_program('mbmon', '-c 1 -r'));
+ }
+
+ $i = 0;
+ foreach($this->lines as $line) {
+ if (preg_match('/^(TEMP\d*)\s*:\s*(.*)$/D', $line, $data)) {
+ if ($data[2]<>'0') {
+ $results[$i]['label'] = $data[1];
+ $results[$i]['limit'] = '70.0';
+ if($data[2] > 250) {
+ $results[$i]['value'] = 0;
+ $results[$i]['percent'] = 0;
+ } else {
+ $results[$i]['value'] = $data[2];
+ $results[$i]['percent'] = $results[$i]['value'] * 100 / $results[$i]['limit'];
+ }
+ $i++;
+ }
+ }
+ }
+ return $results;
+ }
+
+ function fans() {
+ $results = array();
+
+ if (!isset($this->lines) ) {
+ $this->lines = explode("\n", execute_program('mbmon', '-c 1 -r'));
+ }
+
+ $i = 0;
+ foreach($this->lines as $line) {
+ if (preg_match('/^(FAN\d*)\s*:\s*(.*)$/D', $line, $data)) {
+ if ($data[2]<>'0') {
+ $results[$i]['label'] = $data[1];
+ $results[$i]['value'] = $data[2];
+ $results[$i]['min'] = '3000';
+ $i++;
+ }
+ }
+ }
+ return $results;
+ }
+
+ function voltage() {
+ $results = array();
+
+ if (!isset($this->lines) ) {
+ $this->lines = explode("\n", execute_program('mbmon', '-c 1 -r'));
+ }
+
+ $i = 0;
+ foreach($this->lines as $line) {
+ if (preg_match('/^(V.*)\s*:\s*(.*)$/D', $line, $data)) {
+ if ($data[2]<>'+0.00') {
+ $results[$i]['label'] = $data[1];
+ $results[$i]['value'] = $data[2];
+ $results[$i]['min'] = '0.00';
+ $results[$i]['max'] = '0.00';
+ $i++;
+ }
+ }
+ }
+
+ return $results;
+ }
+}
+
+?>
/gestion/phpsysinfo/includes/mb/class.healthd.inc.php
0,0 → 1,116
<?php
 
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
 
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
// $Id: class.healthd.inc.php,v 1.6 2007/02/18 19:11:31 bigmichi1 Exp $
 
class mbinfo {
var $lines;
 
function temperature() {
$ar_buf = array();
$results = array();
 
if (!isset($this->lines)) {
$this->lines = execute_program('healthdc', '-t');
}
 
$ar_buf = preg_split("/\t+/", $this->lines);
 
$results[0]['label'] = 'temp1';
$results[0]['value'] = $ar_buf[1];
$results[0]['limit'] = '70.0';
$results[0]['percent'] = $results[0]['value'] * 100 / $results[0]['limit'];
$results[1]['label'] = 'temp2';
$results[1]['value'] = $ar_buf[2];
$results[1]['limit'] = '70.0';
$results[1]['percent'] = $results[1]['value'] * 100 / $results[1]['limit'];
$results[2]['label'] = 'temp3';
$results[2]['value'] = $ar_buf[3];
$results[2]['limit'] = '70.0';
$results[2]['percent'] = $results[2]['value'] * 100 / $results[2]['limit'];
return $results;
}
 
function fans() {
$ar_buf = array();
$results = array();
 
if (!isset($this->lines)) {
$this->lines = execute_program('healthdc', '-t');
}
 
$ar_buf = preg_split("/\t+/", $this->lines);
 
$results[0]['label'] = 'fan1';
$results[0]['value'] = $ar_buf[4];
$results[0]['min'] = '3000';
$results[1]['label'] = 'fan2';
$results[1]['value'] = $ar_buf[5];
$results[1]['min'] = '3000';
$results[2]['label'] = 'fan3';
$results[2]['value'] = $ar_buf[6];
$results[2]['min'] = '3000';
 
return $results;
}
 
function voltage() {
$ar_buf = array();
$results = array();
 
if (!isset($this->lines)) {
$this->lines = execute_program('healthdc', '-t');
}
 
$ar_buf = preg_split("/\t+/", $this->lines);
 
$results[0]['label'] = 'Vcore1';
$results[0]['value'] = $ar_buf[7];
$results[0]['min'] = '0.00';
$results[0]['max'] = '0.00';
$results[1]['label'] = 'Vcore2';
$results[1]['value'] = $ar_buf[8];
$results[1]['min'] = '0.00';
$results[1]['max'] = '0.00';
$results[2]['label'] = '3volt';
$results[2]['value'] = $ar_buf[9];
$results[2]['min'] = '0.00';
$results[2]['max'] = '0.00';
$results[3]['label'] = '+5Volt';
$results[3]['value'] = $ar_buf[10];
$results[3]['min'] = '0.00';
$results[3]['max'] = '0.00';
$results[4]['label'] = '+12Volt';
$results[4]['value'] = $ar_buf[11];
$results[4]['min'] = '0.00';
$results[4]['max'] = '0.00';
$results[5]['label'] = '-12Volt';
$results[5]['value'] = $ar_buf[12];
$results[5]['min'] = '0.00';
$results[5]['max'] = '0.00';
$results[6]['label'] = '-5Volt';
$results[6]['value'] = $ar_buf[13];
$results[6]['min'] = '0.00';
$results[6]['max'] = '0.00';
 
return $results;
}
}
 
?>
/gestion/phpsysinfo/includes/mb/class.hwsensors.inc.php
0,0 → 1,80
<?php
 
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
 
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
// $Id: class.hwsensors.inc.php,v 1.4 2006/05/20 17:01:07 bigmichi1 Exp $
 
class mbinfo {
var $lines;
 
function mbinfo() {
$this->lines = execute_program('sysctl', '-w hw.sensors');
$this->lines = explode("\n", $this->lines);
}
 
function temperature() {
$ar_buf = array();
$results = array();
 
foreach( $this->lines as $line ) {
$ar_buf = preg_split("/[\s,]+/", $line);
if( isset( $ar_buf[3] ) && $ar_buf[2] == 'temp') {
$results[$j]['label'] = $ar_buf[1];
$results[$j]['value'] = $ar_buf[3];
$results[$j]['limit'] = '70.0';
$results[$j]['percent'] = $results[$j]['value'] * 100 / $results[$j]['limit'];
$j++;
}
}
return $results;
}
 
function fans() {
$ar_buf = array();
$results = array();
 
foreach( $this->lines as $line ) {
$ar_buf = preg_split("/[\s,]+/", $line );
if( isset( $ar_buf[3] ) && $ar_buf[2] == 'fanrpm') {
$results[$j]['label'] = $ar_buf[1];
$results[$j]['value'] = $ar_buf[3];
$j++;
}
}
return $results;
}
 
function voltage() {
$ar_buf = array();
$results = array();
 
foreach( $this->lines as $line ) {
$ar_buf = preg_split("/[\s,]+/", $line );
if ( isset( $ar_buf[3] ) && $ar_buf[2] == 'volts_dc') {
$results[$j]['label'] = $ar_buf[1];
$results[$j]['value'] = $ar_buf[3];
$results[$j]['min'] = '0.00';
$results[$j]['max'] = '0.00';
$j++;
}
}
return $results;
}
}
 
?>
/gestion/phpsysinfo/includes/XPath.class.php
0,0 → 1,6355
<?php
/**
* Php.XPath
*
* +======================================================================================================+
* | A php class for searching an XML document using XPath, and making modifications using a DOM
* | style API. Does not require the DOM XML PHP library.
* |
* +======================================================================================================+
* | What Is XPath:
* | --------------
* | - "What SQL is for a relational database, XPath is for an XML document." -- Sam Blum
* | - "The primary purpose of XPath is to address parts of an XML document. In support of this
* | primary purpose, it also provides basic facilities for manipulting it." -- W3C
* |
* | XPath in action and a very nice intro is under:
* | http://www.zvon.org/xxl/XPathTutorial/General/examples.html
* | Specs Can be found under:
* | http://www.w3.org/TR/xpath W3C XPath Recommendation
* | http://www.w3.org/TR/xpath20 W3C XPath Recommendation
* |
* | NOTE: Most of the XPath-spec has been realized, but not all. Usually this should not be
* | problem as the missing part is either rarely used or it's simpler to do with PHP itself.
* +------------------------------------------------------------------------------------------------------+
* | Requires PHP version 4.0.5 and up
* +------------------------------------------------------------------------------------------------------+
* | Main Active Authors:
* | --------------------
* | Nigel Swinson <nigelswinson@users.sourceforge.net>
* | Started around 2001-07, saved phpxml from near death and renamed to Php.XPath
* | Restructured XPath code to stay in line with XPath spec.
* | Sam Blum <bs_php@infeer.com>
* | Started around 2001-09 1st major restruct (V2.0) and testbench initiator.
* | 2nd (V3.0) major rewrite in 2002-02
* | Daniel Allen <bigredlinux@yahoo.com>
* | Started around 2001-10 working to make Php.XPath adhere to specs
* | Main Former Author: Michael P. Mehl <mpm@phpxml.org>
* | Inital creator of V 1.0. Stoped activities around 2001-03
* +------------------------------------------------------------------------------------------------------+
* | Code Structure:
* | --------------_
* | The class is split into 3 main objects. To keep usability easy all 3
* | objects are in this file (but may be split in 3 file in future).
* | +-------------+
* | | XPathBase | XPathBase holds general and debugging functions.
* | +------+------+
* | v
* | +-------------+ XPathEngine is the implementation of the W3C XPath spec. It contains the
* | | XPathEngine | XML-import (parser), -export and can handle xPathQueries. It's a fully
* | +------+------+ functional class but has no functions to modify the XML-document (see following).
* | v
* | +-------------+
* | | XPath | XPath extends the functionality with actions to modify the XML-document.
* | +-------------+ We tryed to implement a DOM - like interface.
* +------------------------------------------------------------------------------------------------------+
* | Usage:
* | ------
* | Scroll to the end of this php file and you will find a short sample code to get you started
* +------------------------------------------------------------------------------------------------------+
* | Glossary:
* | ---------
* | To understand how to use the functions and to pass the right parameters, read following:
* |
* | Document: (full node tree, XML-tree)
* | After a XML-source has been imported and parsed, it's stored as a tree of nodes sometimes
* | refered to as 'document'.
* |
* | AbsoluteXPath: (xPath, xPathSet)
* | A absolute XPath is a string. It 'points' to *one* node in the XML-document. We use the
* | term 'absolute' to emphasise that it is not an xPath-query (see xPathQuery). A valid xPath
* | has the form like '/AAA[1]/BBB[2]/CCC[1]'. Usually functions that require a node (see Node)
* | will also accept an abs. XPath.
* |
* | Node: (node, nodeSet, node-tree)
* | Some funtions require or return a node (or a whole node-tree). Nodes are only used with the
* | XPath-interface and have an internal structure. Every node in a XML document has a unique
* | corresponding abs. xPath. That's why public functions that accept a node, will usually also
* | accept a abs. xPath (a string) 'pointing' to an existing node (see absolutXPath).
* |
* | XPathQuery: (xquery, query)
* | A xPath-query is a string that is matched against the XML-document. The result of the match
* | is a xPathSet (vector of xPath's). It's always possible to pass a single absoluteXPath
* | instead of a xPath-query. A valid xPathQuery could look like this:
* | '//XXX/*[contains(., "foo")]/..' (See the link in 'What Is XPath' to learn more).
* |
* |
* +------------------------------------------------------------------------------------------------------+
* | Internals:
* | ----------
* | - The Node Tree
* | -------------
* | A central role of the package is how the XML-data is stored. The whole data is in a node-tree.
* | A node can be seen as the equvalent to a tag in the XML soure with some extra info.
* | For instance the following XML
* | <AAA foo="x">***<BBB/><CCC/>**<BBB/>*</AAA>
* | Would produce folowing node-tree:
* | 'super-root' <-- $nodeRoot (Very handy)
* | |
* | 'depth' 0 AAA[1] <-- top node. The 'textParts' of this node would be
* | / | \ 'textParts' => array('***','','**','*')
* | 'depth' 1 BBB[1] CCC[1] BBB[2] (NOTE: Is always size of child nodes+1)
* | - The Node
* | --------
* | The node itself is an structure desiged mainly to be used in connection with the interface of PHP.XPath.
* | That means it's possible for functions to return a sub-node-tree that can be used as input of an other
* | PHP.XPath function.
* |
* | The main structure of a node is:
* | $node = array(
* | 'name' => '', # The tag name. E.g. In <FOO bar="aaa"/> it would be 'FOO'
* | 'attributes' => array(), # The attributes of the tag E.g. In <FOO bar="aaa"/> it would be array('bar'=>'aaa')
* | 'textParts' => array(), # Array of text parts surrounding the children E.g. <FOO>aa<A>bb<B/>cc</A>dd</FOO> -> array('aa','bb','cc','dd')
* | 'childNodes' => array(), # Array of refences (pointers) to child nodes.
* |
* | For optimisation reasions some additional data is stored in the node too:
* | 'parentNode' => NULL # Reference (pointer) to the parent node (or NULL if it's 'super root')
* | 'depth' => 0, # The tag depth (or tree level) starting with the root tag at 0.
* | 'pos' => 0, # Is the zero-based position this node has in the parent's 'childNodes'-list.
* | 'contextPos' => 1, # Is the one-based position this node has by counting the siblings tags (tags with same name)
* | 'xpath' => '' # Is the abs. XPath to this node.
* | 'generated_id'=> '' # The id returned for this node by generate-id() (attribute and text nodes not supported)
* |
* | - The NodeIndex
* | -------------
* | Every node in the tree has an absolute XPath. E.g '/AAA[1]/BBB[2]' the $nodeIndex is a hash array
* | to all the nodes in the node-tree. The key used is the absolute XPath (a string).
* |
* +------------------------------------------------------------------------------------------------------+
* | License:
* | --------
* | The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License");
* | you may not use this file except in compliance with the License. You may obtain a copy of the
* | License at http://www.mozilla.org/MPL/
* |
* | Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY
* | OF ANY KIND, either express or implied. See the License for the specific language governing
* | rights and limitations under the License.
* |
* | The Original Code is <phpXML/>.
* |
* | The Initial Developer of the Original Code is Michael P. Mehl. Portions created by Michael
* | P. Mehl are Copyright (C) 2001 Michael P. Mehl. All Rights Reserved.
* |
* | Contributor(s): N.Swinson / S.Blum / D.Allen
* |
* | Alternatively, the contents of this file may be used under the terms of either of the GNU
* | General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* | License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* | LGPL License are applicable instead of those above. If you wish to allow use of your version
* | of this file only under the terms of the GPL or the LGPL License and not to allow others to
* | use your version of this file under the MPL, indicate your decision by deleting the
* | provisions above and replace them with the notice and other provisions required by the
* | GPL or the LGPL License. If you do not delete the provisions above, a recipient may use
* | your version of this file under either the MPL, the GPL or the LGPL License.
* |
* +======================================================================================================+
*
* @author S.Blum / N.Swinson / D.Allen / (P.Mehl)
* @link http://sourceforge.net/projects/phpxpath/
* @version 3.5
* @CVS $Id: XPath.class.php,v 1.9 2005/11/16 17:26:05 bigmichi1 Exp $
*/
 
// Include guard, protects file being included twice
$ConstantName = 'INCLUDED_'.strtoupper(__FILE__);
if (defined($ConstantName)) return;
define($ConstantName,1, TRUE);
 
/************************************************************************************************
* ===============================================================================================
* X P a t h B a s e - Class
* ===============================================================================================
************************************************************************************************/
class XPathBase {
var $_lastError;
// As debugging of the xml parse is spread across several functions, we need to make this a member.
var $bDebugXmlParse = FALSE;
 
// do we want to do profiling?
var $bClassProfiling = FALSE;
 
// Used to help navigate through the begin/end debug calls
var $iDebugNextLinkNumber = 1;
var $aDebugOpenLinks = array();
var $aDebugFunctions = array(
//'_evaluatePrimaryExpr',
//'_evaluateExpr',
//'_evaluateStep',
//'_checkPredicates',
//'_evaluateFunction',
//'_evaluateOperator',
//'_evaluatePathExpr',
);
 
/**
* Constructor
*/
function XPathBase() {
# $this->bDebugXmlParse = TRUE;
$this->properties['verboseLevel'] = 1; // 0=silent, 1 and above produce verbose output (an echo to screen).
if (!isSet($_ENV)) { // Note: $_ENV introduced in 4.1.0. In earlier versions, use $HTTP_ENV_VARS.
$_ENV = $GLOBALS['HTTP_ENV_VARS'];
}
// Windows 95/98 do not support file locking. Detecting OS (Operation System) and setting the
// properties['OS_supports_flock'] to FALSE if win 95/98 is detected.
// This will surpress the file locking error reported from win 98 users when exportToFile() is called.
// May have to add more OS's to the list in future (Macs?).
// ### Note that it's only the FAT and NFS file systems that are really a problem. NTFS and
// the latest php libs do support flock()
$_ENV['OS'] = isSet($_ENV['OS']) ? $_ENV['OS'] : 'Unknown OS';
switch ($_ENV['OS']) {
case 'Windows_95':
case 'Windows_98':
case 'Unknown OS':
// should catch Mac OS X compatible environment
if (!empty($_SERVER['SERVER_SOFTWARE'])
&& preg_match('/Darwin/',$_SERVER['SERVER_SOFTWARE'])) {
// fall-through
} else {
$this->properties['OS_supports_flock'] = FALSE;
break;
}
default:
$this->properties['OS_supports_flock'] = TRUE;
}
}
/**
* Resets the object so it's able to take a new xml sting/file
*
* Constructing objects is slow. If you can, reuse ones that you have used already
* by using this reset() function.
*/
function reset() {
$this->_lastError = '';
}
//-----------------------------------------------------------------------------------------
// XPathBase ------ Helpers ------
//-----------------------------------------------------------------------------------------
/**
* This method checks the right amount and match of brackets
*
* @param $term (string) String in which is checked.
* @return (bool) TRUE: OK / FALSE: KO
*/
function _bracketsCheck($term) {
$leng = strlen($term);
$brackets = 0;
$bracketMisscount = $bracketMissmatsh = FALSE;
$stack = array();
for ($i=0; $i<$leng; $i++) {
switch ($term[$i]) {
case '(' :
case '[' :
$stack[$brackets] = $term[$i];
$brackets++;
break;
case ')':
$brackets--;
if ($brackets<0) {
$bracketMisscount = TRUE;
break 2;
}
if ($stack[$brackets] != '(') {
$bracketMissmatsh = TRUE;
break 2;
}
break;
case ']' :
$brackets--;
if ($brackets<0) {
$bracketMisscount = TRUE;
break 2;
}
if ($stack[$brackets] != '[') {
$bracketMissmatsh = TRUE;
break 2;
}
break;
}
}
// Check whether we had a valid number of brackets.
if ($brackets != 0) $bracketMisscount = TRUE;
if ($bracketMisscount || $bracketMissmatsh) {
return FALSE;
}
return TRUE;
}
/**
* Looks for a string within another string -- BUT the search-string must be located *outside* of any brackets.
*
* This method looks for a string within another string. Brackets in the
* string the method is looking through will be respected, which means that
* only if the string the method is looking for is located outside of
* brackets, the search will be successful.
*
* @param $term (string) String in which the search shall take place.
* @param $expression (string) String that should be searched.
* @return (int) This method returns -1 if no string was found,
* otherwise the offset at which the string was found.
*/
function _searchString($term, $expression) {
$bracketCounter = 0; // Record where we are in the brackets.
$leng = strlen($term);
$exprLeng = strlen($expression);
for ($i=0; $i<$leng; $i++) {
$char = $term[$i];
if ($char=='(' || $char=='[') {
$bracketCounter++;
continue;
}
elseif ($char==')' || $char==']') {
$bracketCounter--;
}
if ($bracketCounter == 0) {
// Check whether we can find the expression at this index.
if (substr($term, $i, $exprLeng) == $expression) return $i;
}
}
// Nothing was found.
return (-1);
}
/**
* Split a string by a searator-string -- BUT the separator-string must be located *outside* of any brackets.
*
* Returns an array of strings, each of which is a substring of string formed
* by splitting it on boundaries formed by the string separator.
*
* @param $separator (string) String that should be searched.
* @param $term (string) String in which the search shall take place.
* @return (array) see above
*/
function _bracketExplode($separator, $term) {
// Note that it doesn't make sense for $separator to itself contain (,),[ or ],
// but as this is a private function we should be ok.
$resultArr = array();
$bracketCounter = 0; // Record where we are in the brackets.
do { // BEGIN try block
// Check if any separator is in the term
$sepLeng = strlen($separator);
if (strpos($term, $separator)===FALSE) { // no separator found so end now
$resultArr[] = $term;
break; // try-block
}
// Make a substitute separator out of 'unused chars'.
$substituteSep = str_repeat(chr(2), $sepLeng);
// Now determine the first bracket '(' or '['.
$tmp1 = strpos($term, '(');
$tmp2 = strpos($term, '[');
if ($tmp1===FALSE) {
$startAt = (int)$tmp2;
} elseif ($tmp2===FALSE) {
$startAt = (int)$tmp1;
} else {
$startAt = min($tmp1, $tmp2);
}
// Get prefix string part before the first bracket.
$preStr = substr($term, 0, $startAt);
// Substitute separator in prefix string.
$preStr = str_replace($separator, $substituteSep, $preStr);
// Now get the rest-string (postfix string)
$postStr = substr($term, $startAt);
// Go all the way through the rest-string.
$strLeng = strlen($postStr);
for ($i=0; $i < $strLeng; $i++) {
$char = $postStr[$i];
// Spot (,),[,] and modify our bracket counter. Note there is an
// assumption here that you don't have a string(with[mis)matched]brackets.
// This should be ok as the dodgy string will be detected elsewhere.
if ($char=='(' || $char=='[') {
$bracketCounter++;
continue;
}
elseif ($char==')' || $char==']') {
$bracketCounter--;
}
// If no brackets surround us check for separator
if ($bracketCounter == 0) {
// Check whether we can find the expression starting at this index.
if ((substr($postStr, $i, $sepLeng) == $separator)) {
// Substitute the found separator
for ($j=0; $j<$sepLeng; $j++) {
$postStr[$i+$j] = $substituteSep[$j];
}
}
}
}
// Now explod using the substitute separator as key.
$resultArr = explode($substituteSep, $preStr . $postStr);
} while (FALSE); // End try block
// Return the results that we found. May be a array with 1 entry.
return $resultArr;
}
 
/**
* Split a string at it's groups, ie bracketed expressions
*
* Returns an array of strings, when concatenated together would produce the original
* string. ie a(b)cde(f)(g) would map to:
* array ('a', '(b)', cde', '(f)', '(g)')
*
* @param $string (string) The string to process
* @param $open (string) The substring for the open of a group
* @param $close (string) The substring for the close of a group
* @return (array) The parsed string, see above
*/
function _getEndGroups($string, $open='[', $close=']') {
// Note that it doesn't make sense for $separator to itself contain (,),[ or ],
// but as this is a private function we should be ok.
$resultArr = array();
do { // BEGIN try block
// Check if we have both an open and a close tag
if (empty($open) and empty($close)) { // no separator found so end now
$resultArr[] = $string;
break; // try-block
}
 
if (empty($string)) {
$resultArr[] = $string;
break; // try-block
}
 
while (!empty($string)) {
// Now determine the first bracket '(' or '['.
$openPos = strpos($string, $open);
$closePos = strpos($string, $close);
if ($openPos===FALSE || $closePos===FALSE) {
// Oh, no more groups to be found then. Quit
$resultArr[] = $string;
break;
}
 
// Sanity check
if ($openPos > $closePos) {
// Malformed string, dump the rest and quit.
$resultArr[] = $string;
break;
}
 
// Get prefix string part before the first bracket.
$preStr = substr($string, 0, $openPos);
// This is the first string that will go in our output
if (!empty($preStr))
$resultArr[] = $preStr;
 
// Skip over what we've proceed, including the open char
$string = substr($string, $openPos + 1 - strlen($string));
 
// Find the next open char and adjust our close char
//echo "close: $closePos\nopen: $openPos\n\n";
$closePos -= $openPos + 1;
$openPos = strpos($string, $open);
//echo "close: $closePos\nopen: $openPos\n\n";
 
// While we have found nesting...
while ($openPos && $closePos && ($closePos > $openPos)) {
// Find another close pos after the one we are looking at
$closePos = strpos($string, $close, $closePos + 1);
// And skip our open
$openPos = strpos($string, $open, $openPos + 1);
}
//echo "close: $closePos\nopen: $openPos\n\n";
 
// If we now have a close pos, then it's the end of the group.
if ($closePos === FALSE) {
// We didn't... so bail dumping what was left
$resultArr[] = $open.$string;
break;
}
 
// We did, so we can extract the group
$resultArr[] = $open.substr($string, 0, $closePos + 1);
// Skip what we have processed
$string = substr($string, $closePos + 1);
}
} while (FALSE); // End try block
// Return the results that we found. May be a array with 1 entry.
return $resultArr;
}
/**
* Retrieves a substring before a delimiter.
*
* This method retrieves everything from a string before a given delimiter,
* not including the delimiter.
*
* @param $string (string) String, from which the substring should be extracted.
* @param $delimiter (string) String containing the delimiter to use.
* @return (string) Substring from the original string before the delimiter.
* @see _afterstr()
*/
function _prestr(&$string, $delimiter, $offset=0) {
// Return the substring.
$offset = ($offset<0) ? 0 : $offset;
$pos = strpos($string, $delimiter, $offset);
if ($pos===FALSE) return $string; else return substr($string, 0, $pos);
}
/**
* Retrieves a substring after a delimiter.
*
* This method retrieves everything from a string after a given delimiter,
* not including the delimiter.
*
* @param $string (string) String, from which the substring should be extracted.
* @param $delimiter (string) String containing the delimiter to use.
* @return (string) Substring from the original string after the delimiter.
* @see _prestr()
*/
function _afterstr($string, $delimiter, $offset=0) {
$offset = ($offset<0) ? 0 : $offset;
// Return the substring.
return substr($string, strpos($string, $delimiter, $offset) + strlen($delimiter));
}
//-----------------------------------------------------------------------------------------
// XPathBase ------ Debug Stuff ------
//-----------------------------------------------------------------------------------------
/**
* Alter the verbose (error) level reporting.
*
* Pass an int. >0 to turn on, 0 to turn off. The higher the number, the
* higher the level of verbosity. By default, the class has a verbose level
* of 1.
*
* @param $levelOfVerbosity (int) default is 1 = on
*/
function setVerbose($levelOfVerbosity = 1) {
$level = -1;
if ($levelOfVerbosity === TRUE) {
$level = 1;
} elseif ($levelOfVerbosity === FALSE) {
$level = 0;
} elseif (is_numeric($levelOfVerbosity)) {
$level = $levelOfVerbosity;
}
if ($level >= 0) $this->properties['verboseLevel'] = $levelOfVerbosity;
}
/**
* Returns the last occured error message.
*
* @access public
* @return string (may be empty if there was no error at all)
* @see _setLastError(), _lastError
*/
function getLastError() {
return $this->_lastError;
}
/**
* Creates a textual error message and sets it.
*
* example: 'XPath error in THIS_FILE_NAME:LINE. Message: YOUR_MESSAGE';
*
* I don't think the message should include any markup because not everyone wants to debug
* into the browser window.
*
* You should call _displayError() rather than _setLastError() if you would like the message,
* dependant on their verbose settings, echoed to the screen.
*
* @param $message (string) a textual error message default is ''
* @param $line (int) the line number where the error occured, use __LINE__
* @see getLastError()
*/
function _setLastError($message='', $line='-', $file='-') {
$this->_lastError = 'XPath error in ' . basename($file) . ':' . $line . '. Message: ' . $message;
}
/**
* Displays an error message.
*
* This method displays an error messages depending on the users verbose settings
* and sets the last error message.
*
* If also possibly stops the execution of the script.
* ### Terminate should not be allowed --fab. Should it?? N.S.
*
* @param $message (string) Error message to be displayed.
* @param $lineNumber (int) line number given by __LINE__
* @param $terminate (bool) (default TURE) End the execution of this script.
*/
function _displayError($message, $lineNumber='-', $file='-', $terminate=TRUE) {
// Display the error message.
$err = '<b>XPath error in '.basename($file).':'.$lineNumber.'</b> '.$message."<br \>\n";
$this->_setLastError($message, $lineNumber, $file);
if (($this->properties['verboseLevel'] > 0) OR ($terminate)) echo $err;
// End the execution of this script.
if ($terminate) exit;
}
 
/**
* Displays a diagnostic message
*
* This method displays an error messages
*
* @param $message (string) Error message to be displayed.
* @param $lineNumber (int) line number given by __LINE__
*/
function _displayMessage($message, $lineNumber='-', $file='-') {
// Display the error message.
$err = '<b>XPath message from '.basename($file).':'.$lineNumber.'</b> '.$message."<br \>\n";
if ($this->properties['verboseLevel'] > 0) echo $err;
}
/**
* Called to begin the debug run of a function.
*
* This method starts a <DIV><PRE> tag so that the entry to this function
* is clear to the debugging user. Call _closeDebugFunction() at the
* end of the function to create a clean box round the function call.
*
* @author Nigel Swinson <nigelswinson@users.sourceforge.net>
* @author Sam Blum <bs_php@infeer.com>
* @param $functionName (string) the name of the function we are beginning to debug
* @param $bDebugFlag (bool) TRUE if we are to draw a call stack, FALSE otherwise
* @return (array) the output from the microtime() function.
* @see _closeDebugFunction()
*/
function _beginDebugFunction($functionName, $bDebugFlag) {
if ($bDebugFlag) {
$fileName = basename(__FILE__);
static $color = array('green','blue','red','lime','fuchsia', 'aqua');
static $colIndex = -1;
$colIndex++;
echo '<div style="clear:both" align="left"> ';
echo '<pre STYLE="border:solid thin '. $color[$colIndex % 6] . '; padding:5">';
echo '<a style="float:right;margin:5px" name="'.$this->iDebugNextLinkNumber.'Open" href="#'.$this->iDebugNextLinkNumber.'Close">Function Close '.$this->iDebugNextLinkNumber.'</a>';
echo "<STRONG>{$fileName} : {$functionName}</STRONG>";
echo '<hr style="clear:both">';
array_push($this->aDebugOpenLinks, $this->iDebugNextLinkNumber);
$this->iDebugNextLinkNumber++;
}
 
if ($this->bClassProfiling)
$this->_ProfBegin($FunctionName);
 
return TRUE;
}
/**
* Called to end the debug run of a function.
*
* This method ends a <DIV><PRE> block and reports the time since $aStartTime
* is clear to the debugging user.
*
* @author Nigel Swinson <nigelswinson@users.sourceforge.net>
* @param $functionName (string) the name of the function we are beginning to debug
* @param $return_value (mixed) the return value from the function call that
* we are debugging
* @param $bDebugFlag (bool) TRUE if we are to draw a call stack, FALSE otherwise
*/
function _closeDebugFunction($functionName, $returnValue = "", $bDebugFlag) {
if ($bDebugFlag) {
echo "<hr>";
$iOpenLinkNumber = array_pop($this->aDebugOpenLinks);
echo '<a style="float:right" name="'.$iOpenLinkNumber.'Close" href="#'.$iOpenLinkNumber.'Open">Function Open '.$iOpenLinkNumber.'</a>';
if (isSet($returnValue)) {
if (is_array($returnValue))
echo "Return Value: ".print_r($returnValue)."\n";
else if (is_numeric($returnValue))
echo "Return Value: ".(string)$returnValue."\n";
else if (is_bool($returnValue))
echo "Return Value: ".($returnValue ? "TRUE" : "FALSE")."\n";
else
echo "Return Value: \"".htmlspecialchars($returnValue)."\"\n";
}
echo '<br style="clear:both">';
echo " \n</pre></div>";
}
if ($this->bClassProfiling)
$this->_ProfEnd($FunctionName);
 
return TRUE;
}
/**
* Profile begin call
*/
function _ProfBegin($sonFuncName) {
static $entryTmpl = array ( 'start' => array(),
'recursiveCount' => 0,
'totTime' => 0,
'callCount' => 0 );
$now = explode(' ', microtime());
 
if (empty($this->callStack)) {
$fatherFuncName = '';
}
else {
$fatherFuncName = $this->callStack[sizeOf($this->callStack)-1];
$fatherEntry = &$this->profile[$fatherFuncName];
}
$this->callStack[] = $sonFuncName;
 
if (!isSet($this->profile[$sonFuncName])) {
$this->profile[$sonFuncName] = $entryTmpl;
}
 
$sonEntry = &$this->profile[$sonFuncName];
$sonEntry['callCount']++;
// if we call the t's the same function let the time run, otherwise sum up
if ($fatherFuncName == $sonFuncName) {
$sonEntry['recursiveCount']++;
}
if (!empty($fatherFuncName)) {
$last = $fatherEntry['start'];
$fatherEntry['totTime'] += round( (($now[1] - $last[1]) + ($now[0] - $last[0]))*10000 );
$fatherEntry['start'] = 0;
}
$sonEntry['start'] = explode(' ', microtime());
}
 
/**
* Profile end call
*/
function _ProfEnd($sonFuncName) {
$now = explode(' ', microtime());
 
array_pop($this->callStack);
if (empty($this->callStack)) {
$fatherFuncName = '';
}
else {
$fatherFuncName = $this->callStack[sizeOf($this->callStack)-1];
$fatherEntry = &$this->profile[$fatherFuncName];
}
$sonEntry = &$this->profile[$sonFuncName];
if (empty($sonEntry)) {
echo "ERROR in profEnd(): '$funcNam' not in list. Seams it was never started ;o)";
}
 
$last = $sonEntry['start'];
$sonEntry['totTime'] += round( (($now[1] - $last[1]) + ($now[0] - $last[0]))*10000 );
$sonEntry['start'] = 0;
if (!empty($fatherEntry)) $fatherEntry['start'] = explode(' ', microtime());
}
 
/**
* Show profile gathered so far as HTML table
*/
function _ProfileToHtml() {
$sortArr = array();
if (empty($this->profile)) return '';
reset($this->profile);
while (list($funcName) = each($this->profile)) {
$sortArrKey[] = $this->profile[$funcName]['totTime'];
$sortArrVal[] = $funcName;
}
//echo '<pre>';var_dump($sortArrVal);echo '</pre>';
array_multisort ($sortArrKey, SORT_DESC, $sortArrVal );
//echo '<pre>';var_dump($sortArrVal);echo '</pre>';
 
$totTime = 0;
$size = sizeOf($sortArrVal);
for ($i=0; $i<$size; $i++) {
$funcName = &$sortArrVal[$i];
$totTime += $this->profile[$funcName]['totTime'];
}
$out = '<table border="1">';
$out .='<tr align="center" bgcolor="#bcd6f1"><th>Function</th><th> % </th><th>Total [ms]</th><th># Call</th><th>[ms] per Call</th><th># Recursive</th></tr>';
for ($i=0; $i<$size; $i++) {
$funcName = &$sortArrVal[$i];
$row = &$this->profile[$funcName];
$procent = round($row['totTime']*100/$totTime);
if ($procent>20) $bgc = '#ff8080';
elseif ($procent>15) $bgc = '#ff9999';
elseif ($procent>10) $bgc = '#ffcccc';
elseif ($procent>5) $bgc = '#ffffcc';
else $bgc = '#66ff99';
 
$out .="<tr align='center' bgcolor='{$bgc}'>";
$out .='<td>'. $funcName .'</td><td>'. $procent .'% '.'</td><td>'. $row['totTime']/10 .'</td><td>'. $row['callCount'] .'</td><td>'. round($row['totTime']/10/$row['callCount'],2) .'</td><td>'. $row['recursiveCount'].'</td>';
$out .='</tr>';
}
$out .= '</table> Total Time [' . $totTime/10 .'ms]' ;
 
echo $out;
return TRUE;
}
 
/**
* Echo an XPath context for diagnostic purposes
*
* @param $context (array) An XPath context
*/
function _printContext($context) {
echo "{$context['nodePath']}({$context['pos']}/{$context['size']})";
}
/**
* This is a debug helper function. It dumps the node-tree as HTML
*
* *QUICK AND DIRTY*. Needs some polishing.
*
* @param $node (array) A node
* @param $indent (string) (optional, default=''). For internal recursive calls.
*/
function _treeDump($node, $indent = '') {
$out = '';
// Get rid of recursion
$parentName = empty($node['parentNode']) ? "SUPER ROOT" : $node['parentNode']['name'];
unset($node['parentNode']);
$node['parentNode'] = $parentName ;
$out .= "NODE[{$node['name']}]\n";
foreach($node as $key => $val) {
if ($key === 'childNodes') continue;
if (is_Array($val)) {
$out .= $indent . " [{$key}]\n" . arrayToStr($val, $indent . ' ');
} else {
$out .= $indent . " [{$key}] => '{$val}' \n";
}
}
if (!empty($node['childNodes'])) {
$out .= $indent . " ['childNodes'] (Size = ".sizeOf($node['childNodes']).")\n";
foreach($node['childNodes'] as $key => $childNode) {
$out .= $indent . " [$key] => " . $this->_treeDump($childNode, $indent . ' ') . "\n";
}
}
if (empty($indent)) {
return "<pre>" . htmlspecialchars($out) . "</pre>";
}
return $out;
}
} // END OF CLASS XPathBase
 
 
/************************************************************************************************
* ===============================================================================================
* X P a t h E n g i n e - Class
* ===============================================================================================
************************************************************************************************/
 
class XPathEngine extends XPathBase {
// List of supported XPath axes.
// What a stupid idea from W3C to take axes name containing a '-' (dash)
// NOTE: We replace the '-' with '_' to avoid the conflict with the minus operator.
// We will then do the same on the users Xpath querys
// -sibling => _sibling
// -or- => _or_
//
// This array contains a list of all valid axes that can be evaluated in an
// XPath query.
var $axes = array ( 'ancestor', 'ancestor_or_self', 'attribute', 'child', 'descendant',
'descendant_or_self', 'following', 'following_sibling',
'namespace', 'parent', 'preceding', 'preceding_sibling', 'self'
);
// List of supported XPath functions.
// What a stupid idea from W3C to take function name containing a '-' (dash)
// NOTE: We replace the '-' with '_' to avoid the conflict with the minus operator.
// We will then do the same on the users Xpath querys
// starts-with => starts_with
// substring-before => substring_before
// substring-after => substring_after
// string-length => string_length
//
// This array contains a list of all valid functions that can be evaluated
// in an XPath query.
var $functions = array ( 'last', 'position', 'count', 'id', 'name',
'string', 'concat', 'starts_with', 'contains', 'substring_before',
'substring_after', 'substring', 'string_length', 'normalize_space', 'translate',
'boolean', 'not', 'true', 'false', 'lang', 'number', 'sum', 'floor',
'ceiling', 'round', 'x_lower', 'x_upper', 'generate_id' );
// List of supported XPath operators.
//
// This array contains a list of all valid operators that can be evaluated
// in a predicate of an XPath query. The list is ordered by the
// precedence of the operators (lowest precedence first).
var $operators = array( ' or ', ' and ', '=', '!=', '<=', '<', '>=', '>',
'+', '-', '*', ' div ', ' mod ', ' | ');
 
// List of literals from the xPath string.
var $axPathLiterals = array();
// The index and tree that is created during the analysis of an XML source.
var $nodeIndex = array();
var $nodeRoot = array();
var $emptyNode = array(
'name' => '', // The tag name. E.g. In <FOO bar="aaa"/> it would be 'FOO'
'attributes' => array(), // The attributes of the tag E.g. In <FOO bar="aaa"/> it would be array('bar'=>'aaa')
'childNodes' => array(), // Array of pointers to child nodes.
'textParts' => array(), // Array of text parts between the cilderen E.g. <FOO>aa<A>bb<B/>cc</A>dd</FOO> -> array('aa','bb','cc','dd')
'parentNode' => NULL, // Pointer to parent node or NULL if this node is the 'super root'
//-- *!* Following vars are set by the indexer and is for optimisation only *!*
'depth' => 0, // The tag depth (or tree level) starting with the root tag at 0.
'pos' => 0, // Is the zero-based position this node has in the parents 'childNodes'-list.
'contextPos' => 1, // Is the one-based position this node has by counting the siblings tags (tags with same name)
'xpath' => '' // Is the abs. XPath to this node.
);
var $_indexIsDirty = FALSE;
 
// These variable used during the parse XML source
var $nodeStack = array(); // The elements that we have still to close.
var $parseStackIndex = 0; // The current element of the nodeStack[] that we are adding to while
// parsing an XML source. Corresponds to the depth of the xml node.
// in our input data.
var $parseOptions = array(); // Used to set the PHP's XML parser options (see xml_parser_set_option)
var $parsedTextLocation = ''; // A reference to where we have to put char data collected during XML parsing
var $parsInCData = 0 ; // Is >0 when we are inside a CDATA section.
var $parseSkipWhiteCache = 0; // A cache of the skip whitespace parse option to speed up the parse.
 
// This is the array of error strings, to keep consistency.
var $errorStrings = array(
'AbsoluteXPathRequired' => "The supplied xPath '%s' does not *uniquely* describe a node in the xml document.",
'NoNodeMatch' => "The supplied xPath-query '%s' does not match *any* node in the xml document.",
'RootNodeAlreadyExists' => "An xml document may have only one root node."
);
/**
* Constructor
*
* Optionally you may call this constructor with the XML-filename to parse and the
* XML option vector. Each of the entries in the option vector will be passed to
* xml_parser_set_option().
*
* A option vector sample:
* $xmlOpt = array(XML_OPTION_CASE_FOLDING => FALSE,
* XML_OPTION_SKIP_WHITE => TRUE);
*
* @param $userXmlOptions (array) (optional) Vector of (<optionID>=><value>,
* <optionID>=><value>, ...). See PHP's
* xml_parser_set_option() docu for a list of possible
* options.
* @see importFromFile(), importFromString(), setXmlOptions()
*/
function XPathEngine($userXmlOptions=array()) {
parent::XPathBase();
// Default to not folding case
$this->parseOptions[XML_OPTION_CASE_FOLDING] = FALSE;
// And not skipping whitespace
$this->parseOptions[XML_OPTION_SKIP_WHITE] = FALSE;
// Now merge in the overrides.
// Don't use PHP's array_merge!
if (is_array($userXmlOptions)) {
foreach($userXmlOptions as $key => $val) $this->parseOptions[$key] = $val;
}
}
/**
* Resets the object so it's able to take a new xml sting/file
*
* Constructing objects is slow. If you can, reuse ones that you have used already
* by using this reset() function.
*/
function reset() {
parent::reset();
$this->properties['xmlFile'] = '';
$this->parseStackIndex = 0;
$this->parsedTextLocation = '';
$this->parsInCData = 0;
$this->nodeIndex = array();
$this->nodeRoot = array();
$this->nodeStack = array();
$this->aLiterals = array();
$this->_indexIsDirty = FALSE;
}
//-----------------------------------------------------------------------------------------
// XPathEngine ------ Get / Set Stuff ------
//-----------------------------------------------------------------------------------------
/**
* Returns the property/ies you want.
*
* if $param is not given, all properties will be returned in a hash.
*
* @param $param (string) the property you want the value of, or NULL for all the properties
* @return (mixed) string OR hash of all params, or NULL on an unknown parameter.
*/
function getProperties($param=NULL) {
$this->properties['hasContent'] = !empty($this->nodeRoot);
$this->properties['caseFolding'] = $this->parseOptions[XML_OPTION_CASE_FOLDING];
$this->properties['skipWhiteSpaces'] = $this->parseOptions[XML_OPTION_SKIP_WHITE];
if (empty($param)) return $this->properties;
if (isSet($this->properties[$param])) {
return $this->properties[$param];
} else {
return NULL;
}
}
/**
* Set an xml_parser_set_option()
*
* @param $optionID (int) The option ID (e.g. XML_OPTION_SKIP_WHITE)
* @param $value (int) The option value.
* @see XML parser functions in PHP doc
*/
function setXmlOption($optionID, $value) {
if (!is_numeric($optionID)) return;
$this->parseOptions[$optionID] = $value;
}
 
/**
* Sets a number of xml_parser_set_option()s
*
* @param $userXmlOptions (array) An array of parser options.
* @see setXmlOption
*/
function setXmlOptions($userXmlOptions=array()) {
if (!is_array($userXmlOptions)) return;
foreach($userXmlOptions as $key => $val) {
$this->setXmlOption($key, $val);
}
}
/**
* Alternative way to control whether case-folding is enabled for this XML parser.
*
* Short cut to setXmlOptions(XML_OPTION_CASE_FOLDING, TRUE/FALSE)
*
* When it comes to XML, case-folding simply means uppercasing all tag-
* and attribute-names (NOT the content) if set to TRUE. Note if you
* have this option set, then your XPath queries will also be case folded
* for you.
*
* @param $onOff (bool) (default TRUE)
* @see XML parser functions in PHP doc
*/
function setCaseFolding($onOff=TRUE) {
$this->parseOptions[XML_OPTION_CASE_FOLDING] = $onOff;
}
/**
* Alternative way to control whether skip-white-spaces is enabled for this XML parser.
*
* Short cut to setXmlOptions(XML_OPTION_SKIP_WHITE, TRUE/FALSE)
*
* When it comes to XML, skip-white-spaces will trim the tag content.
* An XML file with no whitespace will be faster to process, but will make
* your data less human readable when you come to write it out.
*
* Running with this option on will slow the class down, so if you want to
* speed up your XML, then run it through once skipping white-spaces, then
* write out the new version of your XML without whitespace, then use the
* new XML file with skip whitespaces turned off.
*
* @param $onOff (bool) (default TRUE)
* @see XML parser functions in PHP doc
*/
function setSkipWhiteSpaces($onOff=TRUE) {
$this->parseOptions[XML_OPTION_SKIP_WHITE] = $onOff;
}
/**
* Get the node defined by the $absoluteXPath.
*
* @param $absoluteXPath (string) (optional, default is 'super-root') xpath to the node.
* @return (array) The node, or FALSE if the node wasn't found.
*/
function &getNode($absoluteXPath='') {
if ($absoluteXPath==='/') $absoluteXPath = '';
if (!isSet($this->nodeIndex[$absoluteXPath])) return FALSE;
if ($this->_indexIsDirty) $this->reindexNodeTree();
return $this->nodeIndex[$absoluteXPath];
}
 
/**
* Get a the content of a node text part or node attribute.
*
* If the absolute Xpath references an attribute (Xpath ends with @ or attribute::),
* then the text value of that node-attribute is returned.
* Otherwise the Xpath is referencing a text part of the node. This can be either a
* direct reference to a text part (Xpath ends with text()[<nr>]) or indirect reference
* (a simple abs. Xpath to a node).
* 1) Direct Reference (xpath ends with text()[<part-number>]):
* If the 'part-number' is omitted, the first text-part is assumed; starting by 1.
* Negative numbers are allowed, where -1 is the last text-part a.s.o.
* 2) Indirect Reference (a simple abs. Xpath to a node):
* Default is to return the *whole text*; that is the concated text-parts of the matching
* node. (NOTE that only in this case you'll only get a copy and changes to the returned
* value wounld have no effect). Optionally you may pass a parameter
* $textPartNr to define the text-part you want; starting by 1.
* Negative numbers are allowed, where -1 is the last text-part a.s.o.
*
* NOTE I : The returned value can be fetched by reference
* E.g. $text =& wholeText(). If you wish to modify the text.
* NOTE II: text-part numbers out of range will return FALSE
* SIDENOTE:The function name is a suggestion from W3C in the XPath specification level 3.
*
* @param $absoluteXPath (string) xpath to the node (See above).
* @param $textPartNr (int) If referring to a node, specifies which text part
* to query.
* @return (&string) A *reference* to the text if the node that the other
* parameters describe or FALSE if the node is not found.
*/
function &wholeText($absoluteXPath, $textPartNr=NULL) {
$status = FALSE;
$text = NULL;
if ($this->_indexIsDirty) $this->reindexNodeTree();
do { // try-block
if (preg_match(";(.*)/(attribute::|@)([^/]*)$;U", $absoluteXPath, $matches)) {
$absoluteXPath = $matches[1];
$attribute = $matches[3];
if (!isSet($this->nodeIndex[$absoluteXPath]['attributes'][$attribute])) {
$this->_displayError("The $absoluteXPath/attribute::$attribute value isn't a node in this document.", __LINE__, __FILE__, FALSE);
break; // try-block
}
$text =& $this->nodeIndex[$absoluteXPath]['attributes'][$attribute];
$status = TRUE;
break; // try-block
}
// Xpath contains a 'text()'-function, thus goes right to a text node. If so interpret the Xpath.
if (preg_match(":(.*)/text\(\)(\[(.*)\])?$:U", $absoluteXPath, $matches)) {
$absoluteXPath = $matches[1];
if (!isSet($this->nodeIndex[$absoluteXPath])) {
$this->_displayError("The $absoluteXPath value isn't a node in this document.", __LINE__, __FILE__, FALSE);
break; // try-block
}
 
// Get the amount of the text parts in the node.
$textPartSize = sizeOf($this->nodeIndex[$absoluteXPath]['textParts']);
 
// default to the first text node if a text node was not specified
$textPartNr = isSet($matches[2]) ? substr($matches[2],1,-1) : 1;
 
// Support negative indexes like -1 === last a.s.o.
if ($textPartNr < 0) $textPartNr = $textPartSize + $textPartNr +1;
if (($textPartNr <= 0) OR ($textPartNr > $textPartSize)) {
$this->_displayError("The $absoluteXPath/text()[$textPartNr] value isn't a NODE in this document.", __LINE__, __FILE__, FALSE);
break; // try-block
}
$text =& $this->nodeIndex[$absoluteXPath]['textParts'][$textPartNr - 1];
$status = TRUE;
break; // try-block
}
// At this point we have been given an xpath with neither a 'text()' nor 'attribute::' axis at the end
// So we assume a get to text is wanted and use the optioanl fallback parameters $textPartNr
if (!isSet($this->nodeIndex[$absoluteXPath])) {
$this->_displayError("The $absoluteXPath value isn't a node in this document.", __LINE__, __FILE__, FALSE);
break; // try-block
}
 
// Get the amount of the text parts in the node.
$textPartSize = sizeOf($this->nodeIndex[$absoluteXPath]['textParts']);
 
// If $textPartNr == NULL we return a *copy* of the whole concated text-parts
if (is_null($textPartNr)) {
unset($text);
$text = implode('', $this->nodeIndex[$absoluteXPath]['textParts']);
$status = TRUE;
break; // try-block
}
// Support negative indexes like -1 === last a.s.o.
if ($textPartNr < 0) $textPartNr = $textPartSize + $textPartNr +1;
if (($textPartNr <= 0) OR ($textPartNr > $textPartSize)) {
$this->_displayError("The $absoluteXPath has no text part at pos [$textPartNr] (Note: text parts start with 1).", __LINE__, __FILE__, FALSE);
break; // try-block
}
$text =& $this->nodeIndex[$absoluteXPath]['textParts'][$textPartNr -1];
$status = TRUE;
} while (FALSE); // END try-block
if (!$status) return FALSE;
return $text;
}
 
/**
* Obtain the string value of an object
*
* http://www.w3.org/TR/xpath#dt-string-value
*
* "For every type of node, there is a way of determining a string-value for a node of that type.
* For some types of node, the string-value is part of the node; for other types of node, the
* string-value is computed from the string-value of descendant nodes."
*
* @param $node (node) The node we have to convert
* @return (string) The string value of the node. "" if the object has no evaluatable
* string value
*/
function _stringValue($node) {
// Decode the entitites and then add the resulting literal string into our array.
return $this->_addLiteral($this->decodeEntities($this->wholeText($node)));
}
//-----------------------------------------------------------------------------------------
// XPathEngine ------ Export the XML Document ------
//-----------------------------------------------------------------------------------------
/**
* Returns the containing XML as marked up HTML with specified nodes hi-lighted
*
* @param $absoluteXPath (string) The address of the node you would like to export.
* If empty the whole document will be exported.
* @param $hilighXpathList (array) A list of nodes that you would like to highlight
* @return (mixed) The Xml document marked up as HTML so that it can
* be viewed in a browser, including any XML headers.
* FALSE on error.
* @see _export()
*/
function exportAsHtml($absoluteXPath='', $hilightXpathList=array()) {
$htmlString = $this->_export($absoluteXPath, $xmlHeader=NULL, $hilightXpathList);
if (!$htmlString) return FALSE;
return "<pre>\n" . $htmlString . "\n</pre>";
}
/**
* Given a context this function returns the containing XML
*
* @param $absoluteXPath (string) The address of the node you would like to export.
* If empty the whole document will be exported.
* @param $xmlHeader (array) The string that you would like to appear before
* the XML content. ie before the <root></root>. If you
* do not specify this argument, the xmlHeader that was
* found in the parsed xml file will be used instead.
* @return (mixed) The Xml fragment/document, suitable for writing
* out to an .xml file or as part of a larger xml file, or
* FALSE on error.
* @see _export()
*/
function exportAsXml($absoluteXPath='', $xmlHeader=NULL) {
$this->hilightXpathList = NULL;
return $this->_export($absoluteXPath, $xmlHeader);
}
/**
* Generates a XML string with the content of the current document and writes it to a file.
*
* Per default includes a <?xml ...> tag at the start of the data too.
*
* @param $fileName (string)
* @param $absoluteXPath (string) The path to the parent node you want(see text above)
* @param $xmlHeader (array) The string that you would like to appear before
* the XML content. ie before the <root></root>. If you
* do not specify this argument, the xmlHeader that was
* found in the parsed xml file will be used instead.
* @return (string) The returned string contains well-formed XML data
* or FALSE on error.
* @see exportAsXml(), exportAsHtml()
*/
function exportToFile($fileName, $absoluteXPath='', $xmlHeader=NULL) {
$status = FALSE;
do { // try-block
if (!($hFile = fopen($fileName, "wb"))) { // Did we open the file ok?
$errStr = "Failed to open the $fileName xml file.";
break; // try-block
}
if ($this->properties['OS_supports_flock']) {
if (!flock($hFile, LOCK_EX + LOCK_NB)) { // Lock the file
$errStr = "Couldn't get an exclusive lock on the $fileName file.";
break; // try-block
}
}
if (!($xmlOut = $this->_export($absoluteXPath, $xmlHeader))) {
$errStr = "Export failed";
break; // try-block
}
$iBytesWritten = fwrite($hFile, $xmlOut);
if ($iBytesWritten != strlen($xmlOut)) {
$errStr = "Write error when writing back the $fileName file.";
break; // try-block
}
// Flush and unlock the file
@fflush($hFile);
$status = TRUE;
} while(FALSE);
@flock($hFile, LOCK_UN);
@fclose($hFile);
// Sanity check the produced file.
clearstatcache();
if (filesize($fileName) < strlen($xmlOut)) {
$errStr = "Write error when writing back the $fileName file.";
$status = FALSE;
}
if (!$status) $this->_displayError($errStr, __LINE__, __FILE__, FALSE);
return $status;
}
 
/**
* Generates a XML string with the content of the current document.
*
* This is the start for extracting the XML-data from the node-tree. We do some preperations
* and then call _InternalExport() to fetch the main XML-data. You optionally may pass
* xpath to any node that will then be used as top node, to extract XML-parts of the
* document. Default is '', meaning to extract the whole document.
*
* You also may pass a 'xmlHeader' (usually something like <?xml version="1.0"? > that will
* overwrite any other 'xmlHeader', if there was one in the original source. If there
* wasn't one in the original source, and you still don't specify one, then it will
* use a default of <?xml version="1.0"? >
* Finaly, when exporting to HTML, you may pass a vector xPaths you want to hi-light.
* The hi-lighted tags and attributes will receive a nice color.
*
* NOTE I : The output can have 2 formats:
* a) If "skip white spaces" is/was set. (Not Recommended - slower)
* The output is formatted by adding indenting and carriage returns.
* b) If "skip white spaces" is/was *NOT* set.
* 'as is'. No formatting is done. The output should the same as the
* the original parsed XML source.
*
* @param $absoluteXPath (string) (optional, default is root) The node we choose as top-node
* @param $xmlHeader (string) (optional) content before <root/> (see text above)
* @param $hilightXpath (array) (optional) a vector of xPaths to nodes we wat to
* hi-light (see text above)
* @return (mixed) The xml string, or FALSE on error.
*/
function _export($absoluteXPath='', $xmlHeader=NULL, $hilightXpathList='') {
// Check whether a root node is given.
if (empty($absoluteXpath)) $absoluteXpath = '';
if ($absoluteXpath == '/') $absoluteXpath = '';
if ($this->_indexIsDirty) $this->reindexNodeTree();
if (!isSet($this->nodeIndex[$absoluteXpath])) {
// If the $absoluteXpath was '' and it didn't exist, then the document is empty
// and we can safely return ''.
if ($absoluteXpath == '') return '';
$this->_displayError("The given xpath '{$absoluteXpath}' isn't a node in this document.", __LINE__, __FILE__, FALSE);
return FALSE;
}
$this->hilightXpathList = $hilightXpathList;
$this->indentStep = ' ';
$hilightIsActive = is_array($hilightXpathList);
if ($hilightIsActive) {
$this->indentStep = '&nbsp;&nbsp;&nbsp;&nbsp;';
}
// Cache this now
$this->parseSkipWhiteCache = isSet($this->parseOptions[XML_OPTION_SKIP_WHITE]) ? $this->parseOptions[XML_OPTION_SKIP_WHITE] : FALSE;
 
///////////////////////////////////////
// Get the starting node and begin with the header
 
// Get the start node. The super root is a special case.
$startNode = NULL;
if (empty($absoluteXPath)) {
$superRoot = $this->nodeIndex[''];
// If they didn't specify an xml header, use the one in the object
if (is_null($xmlHeader)) {
$xmlHeader = $this->parseSkipWhiteCache ? trim($superRoot['textParts'][0]) : $superRoot['textParts'][0];
// If we still don't have an XML header, then use a suitable default
if (empty($xmlHeader)) {
$xmlHeader = '<?xml version="1.0"?>';
}
}
 
if (isSet($superRoot['childNodes'][0])) $startNode = $superRoot['childNodes'][0];
} else {
$startNode = $this->nodeIndex[$absoluteXPath];
}
 
if (!empty($xmlHeader)) {
$xmlOut = $this->parseSkipWhiteCache ? $xmlHeader."\n" : $xmlHeader;
} else {
$xmlOut = '';
}
 
///////////////////////////////////////
// Output the document.
 
if (($xmlOut .= $this->_InternalExport($startNode)) === FALSE) {
return FALSE;
}
///////////////////////////////////////
 
// Convert our markers to hi-lights.
if ($hilightIsActive) {
$from = array('<', '>', chr(2), chr(3));
$to = array('&lt;', '&gt;', '<font color="#FF0000"><b>', '</b></font>');
$xmlOut = str_replace($from, $to, $xmlOut);
}
return $xmlOut;
}
 
/**
* Export the xml document starting at the named node.
*
* @param $node (node) The node we have to start exporting from
* @return (string) The string representation of the node.
*/
function _InternalExport($node) {
$ThisFunctionName = '_InternalExport';
$bDebugThisFunction = in_array($ThisFunctionName, $this->aDebugFunctions);
$this->_beginDebugFunction($ThisFunctionName, $bDebugThisFunction);
if ($bDebugThisFunction) {
echo "Exporting node: ".$node['xpath']."<br>\n";
}
 
////////////////////////////////
 
// Quick out.
if (empty($node)) return '';
 
// The output starts as empty.
$xmlOut = '';
// This loop will output the text before the current child of a parent then the
// current child. Where the child is a short tag we output the child, then move
// onto the next child. Where the child is not a short tag, we output the open tag,
// then queue up on currentParentStack[] the child.
//
// When we run out of children, we then output the last text part, and close the
// 'parent' tag before popping the stack and carrying on.
//
// To illustrate, the numbers in this xml file indicate what is output on each
// pass of the while loop:
//
// 1
// <1>2
// <2>3
// <3/>4
// </4>5
// <5/>6
// </6>
 
// Although this is neater done using recursion, there's a 33% performance saving
// to be gained by using this stack mechanism.
 
// Only add CR's if "skip white spaces" was set. Otherwise leave as is.
$CR = ($this->parseSkipWhiteCache) ? "\n" : '';
$currentIndent = '';
$hilightIsActive = is_array($this->hilightXpathList);
 
// To keep track of where we are in the document we use a node stack. The node
// stack has the following parallel entries:
// 'Parent' => (array) A copy of the parent node that who's children we are
// exporting
// 'ChildIndex' => (array) The child index of the corresponding parent that we
// are currently exporting.
// 'Highlighted'=> (bool) If we are highlighting this node. Only relevant if
// the hilight is active.
 
// Setup our node stack. The loop is designed to output children of a parent,
// not the parent itself, so we must put the parent on as the starting point.
$nodeStack['Parent'] = array($node['parentNode']);
// And add the childpos of our node in it's parent to our "child index stack".
$nodeStack['ChildIndex'] = array($node['pos']);
// We start at 0.
$nodeStackIndex = 0;
 
// We have not to output text before/after our node, so blank it. We will recover it
// later
$OldPreceedingStringValue = $nodeStack['Parent'][0]['textParts'][$node['pos']];
$OldPreceedingStringRef =& $nodeStack['Parent'][0]['textParts'][$node['pos']];
$OldPreceedingStringRef = "";
$currentXpath = "";
 
// While we still have data on our stack
while ($nodeStackIndex >= 0) {
// Count the children and get a copy of the current child.
$iChildCount = count($nodeStack['Parent'][$nodeStackIndex]['childNodes']);
$currentChild = $nodeStack['ChildIndex'][$nodeStackIndex];
// Only do the auto indenting if the $parseSkipWhiteCache flag was set.
if ($this->parseSkipWhiteCache)
$currentIndent = str_repeat($this->indentStep, $nodeStackIndex);
 
if ($bDebugThisFunction)
echo "Exporting child ".($currentChild+1)." of node {$nodeStack['Parent'][$nodeStackIndex]['xpath']}\n";
 
///////////////////////////////////////////
// Add the text before our child.
 
// Add the text part before the current child
$tmpTxt =& $nodeStack['Parent'][$nodeStackIndex]['textParts'][$currentChild];
if (isSet($tmpTxt) AND ($tmpTxt!="")) {
// Only add CR indent if there were children
if ($iChildCount)
$xmlOut .= $CR.$currentIndent;
// Hilight if necessary.
$highlightStart = $highlightEnd = '';
if ($hilightIsActive) {
$currentXpath = $nodeStack['Parent'][$nodeStackIndex]['xpath'].'/text()['.($currentChild+1).']';
if (in_array($currentXpath, $this->hilightXpathList)) {
// Yes we hilight
$highlightStart = chr(2);
$highlightEnd = chr(3);
}
}
$xmlOut .= $highlightStart.$nodeStack['Parent'][$nodeStackIndex]['textParts'][$currentChild].$highlightEnd;
}
if ($iChildCount && $nodeStackIndex) $xmlOut .= $CR;
 
///////////////////////////////////////////
 
// Are there any more children?
if ($iChildCount <= $currentChild) {
// Nope, so output the last text before the closing tag
$tmpTxt =& $nodeStack['Parent'][$nodeStackIndex]['textParts'][$currentChild+1];
if (isSet($tmpTxt) AND ($tmpTxt!="")) {
// Hilight if necessary.
$highlightStart = $highlightEnd = '';
if ($hilightIsActive) {
$currentXpath = $nodeStack['Parent'][$nodeStackIndex]['xpath'].'/text()['.($currentChild+2).']';
if (in_array($currentXpath, $this->hilightXpathList)) {
// Yes we hilight
$highlightStart = chr(2);
$highlightEnd = chr(3);
}
}
$xmlOut .= $highlightStart
.$currentIndent.$nodeStack['Parent'][$nodeStackIndex]['textParts'][$currentChild+1].$CR
.$highlightEnd;
}
 
// Now close this tag, as we are finished with this child.
 
// Potentially output an (slightly smaller indent).
if ($this->parseSkipWhiteCache
&& count($nodeStack['Parent'][$nodeStackIndex]['childNodes'])) {
$xmlOut .= str_repeat($this->indentStep, $nodeStackIndex - 1);
}
 
// Check whether the xml-tag is to be hilighted.
$highlightStart = $highlightEnd = '';
if ($hilightIsActive) {
$currentXpath = $nodeStack['Parent'][$nodeStackIndex]['xpath'];
if (in_array($currentXpath, $this->hilightXpathList)) {
// Yes we hilight
$highlightStart = chr(2);
$highlightEnd = chr(3);
}
}
$xmlOut .= $highlightStart
.'</'.$nodeStack['Parent'][$nodeStackIndex]['name'].'>'
.$highlightEnd;
// Decrement the $nodeStackIndex to go back to the next unfinished parent.
$nodeStackIndex--;
 
// If the index is 0 we are finished exporting the last node, as we may have been
// exporting an internal node.
if ($nodeStackIndex == 0) break;
 
// Indicate to the parent that we are finished with this child.
$nodeStack['ChildIndex'][$nodeStackIndex]++;
 
continue;
}
 
///////////////////////////////////////////
// Ok, there are children still to process.
 
// Queue up the next child (I can copy because I won't modify and copying is faster.)
$nodeStack['Parent'][$nodeStackIndex + 1] = $nodeStack['Parent'][$nodeStackIndex]['childNodes'][$currentChild];
 
// Work out if it is a short child tag.
$iGrandChildCount = count($nodeStack['Parent'][$nodeStackIndex + 1]['childNodes']);
$shortGrandChild = (($iGrandChildCount == 0) AND (implode('',$nodeStack['Parent'][$nodeStackIndex + 1]['textParts'])==''));
 
///////////////////////////////////////////
// Assemble the attribute string first.
$attrStr = '';
foreach($nodeStack['Parent'][$nodeStackIndex + 1]['attributes'] as $key=>$val) {
// Should we hilight the attribute?
if ($hilightIsActive AND in_array($currentXpath.'/attribute::'.$key, $this->hilightXpathList)) {
$hiAttrStart = chr(2);
$hiAttrEnd = chr(3);
} else {
$hiAttrStart = $hiAttrEnd = '';
}
$attrStr .= ' '.$hiAttrStart.$key.'="'.$val.'"'.$hiAttrEnd;
}
 
///////////////////////////////////////////
// Work out what goes before and after the tag content
 
$beforeTagContent = $currentIndent;
if ($shortGrandChild) $afterTagContent = '/>';
else $afterTagContent = '>';
 
// Check whether the xml-tag is to be hilighted.
if ($hilightIsActive) {
$currentXpath = $nodeStack['Parent'][$nodeStackIndex + 1]['xpath'];
if (in_array($currentXpath, $this->hilightXpathList)) {
// Yes we hilight
$beforeTagContent .= chr(2);
$afterTagContent .= chr(3);
}
}
$beforeTagContent .= '<';
// if ($shortGrandChild) $afterTagContent .= $CR;
///////////////////////////////////////////
// Output the tag
 
$xmlOut .= $beforeTagContent
.$nodeStack['Parent'][$nodeStackIndex + 1]['name'].$attrStr
.$afterTagContent;
 
///////////////////////////////////////////
// Carry on.
 
// If it is a short tag, then we've already done this child, we just move to the next
if ($shortGrandChild) {
// Move to the next child, we need not go deeper in the tree.
$nodeStack['ChildIndex'][$nodeStackIndex]++;
// But if we are just exporting the one node we'd go no further.
if ($nodeStackIndex == 0) break;
} else {
// Else queue up the child going one deeper in the stack
$nodeStackIndex++;
// Start with it's first child
$nodeStack['ChildIndex'][$nodeStackIndex] = 0;
}
}
 
$result = $xmlOut;
 
// Repair what we "undid"
$OldPreceedingStringRef = $OldPreceedingStringValue;
 
////////////////////////////////////////////
 
$this->_closeDebugFunction($ThisFunctionName, $result, $bDebugThisFunction);
 
return $result;
}
//-----------------------------------------------------------------------------------------
// XPathEngine ------ Import the XML Source ------
//-----------------------------------------------------------------------------------------
/**
* Reads a file or URL and parses the XML data.
*
* Parse the XML source and (upon success) store the information into an internal structure.
*
* @param $fileName (string) Path and name (or URL) of the file to be read and parsed.
* @return (bool) TRUE on success, FALSE on failure (check getLastError())
* @see importFromString(), getLastError(),
*/
function importFromFile($fileName) {
$status = FALSE;
$errStr = '';
do { // try-block
// Remember file name. Used in error output to know in which file it happend
$this->properties['xmlFile'] = $fileName;
// If we already have content, then complain.
if (!empty($this->nodeRoot)) {
$errStr = 'Called when this object already contains xml data. Use reset().';
break; // try-block
}
// The the source is an url try to fetch it.
if (preg_match(';^http(s)?://;', $fileName)) {
// Read the content of the url...this is really prone to errors, and we don't really
// check for too many here...for now, suppressing both possible warnings...we need
// to check if we get a none xml page or something of that nature in the future
$xmlString = @implode('', @file($fileName));
if (!empty($xmlString)) {
$status = TRUE;
} else {
$errStr = "The url '{$fileName}' could not be found or read.";
}
break; // try-block
}
// Reaching this point we're dealing with a real file (not an url). Check if the file exists and is readable.
if (!is_readable($fileName)) { // Read the content from the file
$errStr = "File '{$fileName}' could not be found or read.";
break; // try-block
}
if (is_dir($fileName)) {
$errStr = "'{$fileName}' is a directory.";
break; // try-block
}
// Read the file
if (!($fp = @fopen($fileName, 'rb'))) {
$errStr = "Failed to open '{$fileName}' for read.";
break; // try-block
}
$xmlString = fread($fp, filesize($fileName));
@fclose($fp);
$status = TRUE;
} while (FALSE);
if (!$status) {
$this->_displayError('In importFromFile(): '. $errStr, __LINE__, __FILE__, FALSE);
return FALSE;
}
return $this->importFromString($xmlString);
}
/**
* Reads a string and parses the XML data.
*
* Parse the XML source and (upon success) store the information into an internal structure.
* If a parent xpath is given this means that XML data is to be *appended* to that parent.
*
* ### If a function uses setLastError(), then say in the function header that getLastError() is useful.
*
* @param $xmlString (string) Name of the string to be read and parsed.
* @param $absoluteParentPath (string) Node to append data too (see above)
* @return (bool) TRUE on success, FALSE on failure
* (check getLastError())
*/
function importFromString($xmlString, $absoluteParentPath = '') {
$ThisFunctionName = 'importFromString';
$bDebugThisFunction = in_array($ThisFunctionName, $this->aDebugFunctions);
$this->_beginDebugFunction($ThisFunctionName, $bDebugThisFunction);
if ($bDebugThisFunction) {
echo "Importing from string of length ".strlen($xmlString)." to node '$absoluteParentPath'\n<br>";
echo "Parser options:\n<br>";
print_r($this->parseOptions);
}
 
$status = FALSE;
$errStr = '';
do { // try-block
// If we already have content, then complain.
if (!empty($this->nodeRoot) AND empty($absoluteParentPath)) {
$errStr = 'Called when this object already contains xml data. Use reset() or pass the parent Xpath as 2ed param to where tie data will append.';
break; // try-block
}
// Check whether content has been read.
if (empty($xmlString)) {
// Nothing to do!!
$status = TRUE;
// If we were importing to root, build a blank root.
if (empty($absoluteParentPath)) {
$this->_createSuperRoot();
}
$this->reindexNodeTree();
// $errStr = 'This xml document (string) was empty';
break; // try-block
} else {
$xmlString = $this->_translateAmpersand($xmlString);
}
// Restart our node index with a root entry.
$nodeStack = array();
$this->parseStackIndex = 0;
 
// If a parent xpath is given this means that XML data is to be *appended* to that parent.
if (!empty($absoluteParentPath)) {
// Check if parent exists
if (!isSet($this->nodeIndex[$absoluteParentPath])) {
$errStr = "You tried to append XML data to a parent '$absoluteParentPath' that does not exist.";
break; // try-block
}
// Add it as the starting point in our array.
$this->nodeStack[0] =& $this->nodeIndex[$absoluteParentPath];
} else {
// Build a 'super-root'
$this->_createSuperRoot();
// Put it in as the start of our node stack.
$this->nodeStack[0] =& $this->nodeRoot;
}
 
// Point our text buffer reference at the next text part of the root
$this->parsedTextLocation =& $this->nodeStack[0]['textParts'][];
$this->parsInCData = 0;
// We cache this now.
$this->parseSkipWhiteCache = isSet($this->parseOptions[XML_OPTION_SKIP_WHITE]) ? $this->parseOptions[XML_OPTION_SKIP_WHITE] : FALSE;
// Create an XML parser.
$parser = xml_parser_create();
// Set default XML parser options.
if (is_array($this->parseOptions)) {
foreach($this->parseOptions as $key => $val) {
xml_parser_set_option($parser, $key, $val);
}
}
// Set the object and the element handlers for the XML parser.
xml_set_object($parser, $this);
xml_set_element_handler($parser, '_handleStartElement', '_handleEndElement');
xml_set_character_data_handler($parser, '_handleCharacterData');
xml_set_default_handler($parser, '_handleDefaultData');
xml_set_processing_instruction_handler($parser, '_handlePI');
// Parse the XML source and on error generate an error message.
if (!xml_parse($parser, $xmlString, TRUE)) {
$source = empty($this->properties['xmlFile']) ? 'string' : 'file ' . basename($this->properties['xmlFile']) . "'";
$errStr = "XML error in given {$source} on line ".
xml_get_current_line_number($parser). ' column '. xml_get_current_column_number($parser) .
'. Reason:'. xml_error_string(xml_get_error_code($parser));
break; // try-block
}
// Free the parser.
@xml_parser_free($parser);
// And we don't need this any more.
$this->nodeStack = array();
 
$this->reindexNodeTree();
 
if ($bDebugThisFunction) {
print_r(array_keys($this->nodeIndex));
}
 
$status = TRUE;
} while (FALSE);
if (!$status) {
$this->_displayError('In importFromString(): '. $errStr, __LINE__, __FILE__, FALSE);
$bResult = FALSE;
} else {
$bResult = TRUE;
}
 
////////////////////////////////////////////
 
$this->_closeDebugFunction($ThisFunctionName, $bResult, $bDebugThisFunction);
 
return $bResult;
}
//-----------------------------------------------------------------------------------------
// XPathEngine ------ XML Handlers ------
//-----------------------------------------------------------------------------------------
/**
* Handles opening XML tags while parsing.
*
* While parsing a XML document for each opening tag this method is
* called. It'll add the tag found to the tree of document nodes.
*
* @param $parser (int) Handler for accessing the current XML parser.
* @param $name (string) Name of the opening tag found in the document.
* @param $attributes (array) Associative array containing a list of
* all attributes of the tag found in the document.
* @see _handleEndElement(), _handleCharacterData()
*/
function _handleStartElement($parser, $nodeName, $attributes) {
if (empty($nodeName)) {
$this->_displayError('XML error in file at line'. xml_get_current_line_number($parser) .'. Empty name.', __LINE__, __FILE__);
return;
}
 
// Trim accumulated text if necessary.
if ($this->parseSkipWhiteCache) {
$iCount = count($this->nodeStack[$this->parseStackIndex]['textParts']);
$this->nodeStack[$this->parseStackIndex]['textParts'][$iCount-1] = rtrim($this->parsedTextLocation);
}
 
if ($this->bDebugXmlParse) {
echo "<blockquote>" . htmlspecialchars("Start node: <".$nodeName . ">")."<br>";
echo "Appended to stack entry: $this->parseStackIndex<br>\n";
echo "Text part before element is: ".htmlspecialchars($this->parsedTextLocation);
/*
echo "<pre>";
$dataPartsCount = count($this->nodeStack[$this->parseStackIndex]['textParts']);
for ($i = 0; $i < $dataPartsCount; $i++) {
echo "$i:". htmlspecialchars($this->nodeStack[$this->parseStackIndex]['textParts'][$i])."\n";
}
echo "</pre>";
*/
}
 
// Add a node and set path to current.
if (!$this->_internalAppendChild($this->parseStackIndex, $nodeName)) {
$this->_displayError('Internal error during parse of XML file at line'. xml_get_current_line_number($parser) .'. Empty name.', __LINE__, __FILE__);
return;
}
 
// We will have gone one deeper then in the stack.
$this->parseStackIndex++;
 
// Point our parseTxtBuffer reference at the new node.
$this->parsedTextLocation =& $this->nodeStack[$this->parseStackIndex]['textParts'][0];
// Set the attributes.
if (!empty($attributes)) {
if ($this->bDebugXmlParse) {
echo 'Attributes: <br>';
print_r($attributes);
echo '<br>';
}
$this->nodeStack[$this->parseStackIndex]['attributes'] = $attributes;
}
}
/**
* Handles closing XML tags while parsing.
*
* While parsing a XML document for each closing tag this method is called.
*
* @param $parser (int) Handler for accessing the current XML parser.
* @param $name (string) Name of the closing tag found in the document.
* @see _handleStartElement(), _handleCharacterData()
*/
function _handleEndElement($parser, $name) {
if (($this->parsedTextLocation=='')
&& empty($this->nodeStack[$this->parseStackIndex]['textParts'])) {
// We reach this point when parsing a tag of format <foo/>. The 'textParts'-array
// should stay empty and not have an empty string in it.
} else {
// Trim accumulated text if necessary.
if ($this->parseSkipWhiteCache) {
$iCount = count($this->nodeStack[$this->parseStackIndex]['textParts']);
$this->nodeStack[$this->parseStackIndex]['textParts'][$iCount-1] = rtrim($this->parsedTextLocation);
}
}
 
if ($this->bDebugXmlParse) {
echo "Text part after element is: ".htmlspecialchars($this->parsedTextLocation)."<br>\n";
echo htmlspecialchars("Parent:<{$this->parseStackIndex}>, End-node:</$name> '".$this->parsedTextLocation) . "'<br>Text nodes:<pre>\n";
$dataPartsCount = count($this->nodeStack[$this->parseStackIndex]['textParts']);
for ($i = 0; $i < $dataPartsCount; $i++) {
echo "$i:". htmlspecialchars($this->nodeStack[$this->parseStackIndex]['textParts'][$i])."\n";
}
var_dump($this->nodeStack[$this->parseStackIndex]['textParts']);
echo "</pre></blockquote>\n";
}
 
// Jump back to the parent element.
$this->parseStackIndex--;
 
// Set our reference for where we put any more whitespace
$this->parsedTextLocation =& $this->nodeStack[$this->parseStackIndex]['textParts'][];
 
// Note we leave the entry in the stack, as it will get blanked over by the next element
// at this level. The safe thing to do would be to remove it too, but in the interests
// of performance, we will not bother, as were it to be a problem, then it would be an
// internal bug anyway.
if ($this->parseStackIndex < 0) {
$this->_displayError('Internal error during parse of XML file at line'. xml_get_current_line_number($parser) .'. Empty name.', __LINE__, __FILE__);
return;
}
}
/**
* Handles character data while parsing.
*
* While parsing a XML document for each character data this method
* is called. It'll add the character data to the document tree.
*
* @param $parser (int) Handler for accessing the current XML parser.
* @param $text (string) Character data found in the document.
* @see _handleStartElement(), _handleEndElement()
*/
function _handleCharacterData($parser, $text) {
if ($this->parsInCData >0) $text = $this->_translateAmpersand($text, $reverse=TRUE);
if ($this->bDebugXmlParse) echo "Handling character data: '".htmlspecialchars($text)."'<br>";
if ($this->parseSkipWhiteCache AND !empty($text) AND !$this->parsInCData) {
// Special case CR. CR always comes in a separate data. Trans. it to '' or ' '.
// If txtBuffer is already ending with a space use '' otherwise ' '.
$bufferHasEndingSpace = (empty($this->parsedTextLocation) OR substr($this->parsedTextLocation, -1) === ' ') ? TRUE : FALSE;
if ($text=="\n") {
$text = $bufferHasEndingSpace ? '' : ' ';
} else {
if ($bufferHasEndingSpace) {
$text = ltrim(preg_replace('/\s+/', ' ', $text));
} else {
$text = preg_replace('/\s+/', ' ', $text);
}
}
if ($this->bDebugXmlParse) echo "'Skip white space' is ON. reduced to : '" .htmlspecialchars($text) . "'<br>";
}
$this->parsedTextLocation .= $text;
}
/**
* Default handler for the XML parser.
*
* While parsing a XML document for string not caught by one of the other
* handler functions, we end up here.
*
* @param $parser (int) Handler for accessing the current XML parser.
* @param $text (string) Character data found in the document.
* @see _handleStartElement(), _handleEndElement()
*/
function _handleDefaultData($parser, $text) {
do { // try-block
if (!strcmp($text, '<![CDATA[')) {
$this->parsInCData++;
} elseif (!strcmp($text, ']]>')) {
$this->parsInCData--;
if ($this->parsInCData < 0) $this->parsInCData = 0;
}
$this->parsedTextLocation .= $this->_translateAmpersand($text, $reverse=TRUE);
if ($this->bDebugXmlParse) echo "Default handler data: ".htmlspecialchars($text)."<br>";
break; // try-block
} while (FALSE); // END try-block
}
/**
* Handles processing instruction (PI)
*
* A processing instruction has the following format:
* <? target data ? > e.g. <? dtd version="1.0" ? >
*
* Currently I have no bether idea as to left it 'as is' and treat the PI data as normal
* text (and adding the surrounding PI-tags <? ? >).
*
* @param $parser (int) Handler for accessing the current XML parser.
* @param $target (string) Name of the PI target. E.g. XML, PHP, DTD, ...
* @param $data (string) Associative array containing a list of
* @see PHP's manual "xml_set_processing_instruction_handler"
*/
function _handlePI($parser, $target, $data) {
//echo("pi data=".$data."end"); exit;
$data = $this->_translateAmpersand($data, $reverse=TRUE);
$this->parsedTextLocation .= "<?{$target} {$data}?>";
return TRUE;
}
//-----------------------------------------------------------------------------------------
// XPathEngine ------ Node Tree Stuff ------
//-----------------------------------------------------------------------------------------
 
/**
* Creates a super root node.
*/
function _createSuperRoot() {
// Build a 'super-root'
$this->nodeRoot = $this->emptyNode;
$this->nodeRoot['name'] = '';
$this->nodeRoot['parentNode'] = NULL;
$this->nodeIndex[''] =& $this->nodeRoot;
}
 
/**
* Adds a new node to the XML document tree during xml parsing.
*
* This method adds a new node to the tree of nodes of the XML document
* being handled by this class. The new node is created according to the
* parameters passed to this method. This method is a much watered down
* version of appendChild(), used in parsing an xml file only.
*
* It is assumed that adding starts with root and progresses through the
* document in parse order. New nodes must have a corresponding parent. And
* once we have read the </> tag for the element we will never need to add
* any more data to that node. Otherwise the add will be ignored or fail.
*
* The function is faciliated by a nodeStack, which is an array of nodes that
* we have yet to close.
*
* @param $stackParentIndex (int) The index into the nodeStack[] of the parent
* node to which the new node should be added as
* a child. *READONLY*
* @param $nodeName (string) Name of the new node. *READONLY*
* @return (bool) TRUE if we successfully added a new child to
* the node stack at index $stackParentIndex + 1,
* FALSE on error.
*/
function _internalAppendChild($stackParentIndex, $nodeName) {
// This call is likely to be executed thousands of times, so every 0.01ms counts.
// If you want to debug this function, you'll have to comment the stuff back in
//$bDebugThisFunction = FALSE;
/*
$ThisFunctionName = '_internalAppendChild';
$bDebugThisFunction = in_array($ThisFunctionName, $this->aDebugFunctions);
$this->_beginDebugFunction($ThisFunctionName, $bDebugThisFunction);
if ($bDebugThisFunction) {
echo "Current Node (parent-index) and the child to append : '{$stackParentIndex}' + '{$nodeName}' \n<br>";
}
*/
//////////////////////////////////////
 
if (!isSet($this->nodeStack[$stackParentIndex])) {
$errStr = "Invalid parent. You tried to append the tag '{$nodeName}' to an non-existing parent in our node stack '{$stackParentIndex}'.";
$this->_displayError('In _internalAppendChild(): '. $errStr, __LINE__, __FILE__, FALSE);
 
/*
$this->_closeDebugFunction($ThisFunctionName, FALSE, $bDebugThisFunction);
*/
 
return FALSE;
}
 
// Retrieve the parent node from the node stack. This is the last node at that
// depth that we have yet to close. This is where we should add the text/node.
$parentNode =& $this->nodeStack[$stackParentIndex];
// Brand new node please
$newChildNode = $this->emptyNode;
// Save the vital information about the node.
$newChildNode['name'] = $nodeName;
$parentNode['childNodes'][] =& $newChildNode;
// Add to our node stack
$this->nodeStack[$stackParentIndex + 1] =& $newChildNode;
 
/*
if ($bDebugThisFunction) {
echo "The new node received index: '".($stackParentIndex + 1)."'\n";
foreach($this->nodeStack as $key => $val) echo "$key => ".$val['name']."\n";
}
$this->_closeDebugFunction($ThisFunctionName, TRUE, $bDebugThisFunction);
*/
 
return TRUE;
}
/**
* Update nodeIndex and every node of the node-tree.
*
* Call after you have finished any tree modifications other wise a match with
* an xPathQuery will produce wrong results. The $this->nodeIndex[] is recreated
* and every nodes optimization data is updated. The optimization data is all the
* data that is duplicate information, would just take longer to find. Child nodes
* with value NULL are removed from the tree.
*
* By default the modification functions in this component will automatically re-index
* the nodes in the tree. Sometimes this is not the behaver you want. To surpress the
* reindex, set the functions $autoReindex to FALSE and call reindexNodeTree() at the
* end of your changes. This sometimes leads to better code (and less CPU overhead).
*
* Sample:
* =======
* Given the xml is <AAA><B/>.<B/>.<B/></AAA> | Goal is <AAA>.<B/>.</AAA> (Delete B[1] and B[3])
* $xPathSet = $xPath->match('//B'); # Will result in array('/AAA[1]/B[1]', '/AAA[1]/B[2]', '/AAA[1]/B[3]');
* Three ways to do it.
* 1) Top-Down (with auto reindexing) - Safe, Slow and you get easily mix up with the the changing node index
* removeChild('/AAA[1]/B[1]'); // B[1] removed, thus all B[n] become B[n-1] !!
* removeChild('/AAA[1]/B[2]'); // Now remove B[2] (That originaly was B[3])
* 2) Bottom-Up (with auto reindexing) - Safe, Slow and the changing node index (caused by auto-reindex) can be ignored.
* for ($i=sizeOf($xPathSet)-1; $i>=0; $i--) {
* if ($i==1) continue;
* removeChild($xPathSet[$i]);
* }
* 3) // Top-down (with *NO* auto reindexing) - Fast, Safe as long as you call reindexNodeTree()
* foreach($xPathSet as $xPath) {
* // Specify no reindexing
* if ($xPath == $xPathSet[1]) continue;
* removeChild($xPath, $autoReindex=FALSE);
* // The object is now in a slightly inconsistent state.
* }
* // Finally do the reindex and the object is consistent again
* reindexNodeTree();
*
* @return (bool) TRUE on success, FALSE otherwise.
* @see _recursiveReindexNodeTree()
*/
function reindexNodeTree() {
//return;
$this->_indexIsDirty = FALSE;
$this->nodeIndex = array();
$this->nodeIndex[''] =& $this->nodeRoot;
// Quick out for when the tree has no data.
if (empty($this->nodeRoot)) return TRUE;
return $this->_recursiveReindexNodeTree('');
}
 
/**
* Create the ids that are accessable through the generate-id() function
*/
function _generate_ids() {
// If we have generated them already, then bail.
if (isset($this->nodeIndex['']['generate_id'])) return;
 
// keys generated are the string 'id0' . hexatridecimal-based (0..9,a-z) index
$aNodeIndexes = array_keys($this->nodeIndex);
$idNumber = 0;
foreach($aNodeIndexes as $index => $key) {
// $this->nodeIndex[$key]['generated_id'] = 'id' . base_convert($index,10,36);
// Skip attribute and text nodes.
// ### Currently don't support attribute and text nodes.
if (strstr($key, 'text()') !== FALSE) continue;
if (strstr($key, 'attribute::') !== FALSE) continue;
$this->nodeIndex[$key]['generated_id'] = 'idPhpXPath' . $idNumber;
 
// Make the id's sequential so that we can test predictively.
$idNumber++;
}
}
 
/**
* Here's where the work is done for reindexing (see reindexNodeTree)
*
* @param $absoluteParentPath (string) the xPath to the parent node
* @return (bool) TRUE on success, FALSE otherwise.
* @see reindexNodeTree()
*/
function _recursiveReindexNodeTree($absoluteParentPath) {
$parentNode =& $this->nodeIndex[$absoluteParentPath];
// Check for any 'dead' child nodes first and concate the text parts if found.
for ($iChildIndex=sizeOf($parentNode['childNodes'])-1; $iChildIndex>=0; $iChildIndex--) {
// Check if the child node still exits (it may have been removed).
if (!empty($parentNode['childNodes'][$iChildIndex])) continue;
// Child node was removed. We got to merge the text parts then.
$parentNode['textParts'][$iChildIndex] .= $parentNode['textParts'][$iChildIndex+1];
array_splice($parentNode['textParts'], $iChildIndex+1, 1);
array_splice($parentNode['childNodes'], $iChildIndex, 1);
}
 
// Now start a reindex.
$contextHash = array();
$childSize = sizeOf($parentNode['childNodes']);
 
// If there are no children, we have to treat this specially:
if ($childSize == 0) {
// Add a dummy text node.
$this->nodeIndex[$absoluteParentPath.'/text()[1]'] =& $parentNode;
} else {
for ($iChildIndex=0; $iChildIndex<$childSize; $iChildIndex++) {
$childNode =& $parentNode['childNodes'][$iChildIndex];
// Make sure that there is a text-part in front of every node. (May be empty)
if (!isSet($parentNode['textParts'][$iChildIndex])) $parentNode['textParts'][$iChildIndex] = '';
// Count the nodes with same name (to determine their context position)
$childName = $childNode['name'];
if (empty($contextHash[$childName])) {
$contextPos = $contextHash[$childName] = 1;
} else {
$contextPos = ++$contextHash[$childName];
}
// Make the node-index hash
$newPath = $absoluteParentPath . '/' . $childName . '['.$contextPos.']';
 
// ### Note ultimately we will end up supporting text nodes as actual nodes.
 
// Preceed with a dummy entry for the text node.
$this->nodeIndex[$absoluteParentPath.'/text()['.($childNode['pos']+1).']'] =& $childNode;
// Then the node itself
$this->nodeIndex[$newPath] =& $childNode;
 
// Now some dummy nodes for each of the attribute nodes.
$iAttributeCount = sizeOf($childNode['attributes']);
if ($iAttributeCount > 0) {
$aAttributesNames = array_keys($childNode['attributes']);
for ($iAttributeIndex = 0; $iAttributeIndex < $iAttributeCount; $iAttributeIndex++) {
$attribute = $aAttributesNames[$iAttributeIndex];
$newAttributeNode = $this->emptyNode;
$newAttributeNode['name'] = $attribute;
$newAttributeNode['textParts'] = array($childNode['attributes'][$attribute]);
$newAttributeNode['contextPos'] = $iAttributeIndex;
$newAttributeNode['xpath'] = "$newPath/attribute::$attribute";
$newAttributeNode['parentNode'] =& $childNode;
$newAttributeNode['depth'] =& $parentNode['depth'] + 2;
// Insert the node as a master node, not a reference, otherwise there will be
// variable "bleeding".
$this->nodeIndex["$newPath/attribute::$attribute"] = $newAttributeNode;
}
}
 
// Update the node info (optimisation)
$childNode['parentNode'] =& $parentNode;
$childNode['depth'] = $parentNode['depth'] + 1;
$childNode['pos'] = $iChildIndex;
$childNode['contextPos'] = $contextHash[$childName];
$childNode['xpath'] = $newPath;
$this->_recursiveReindexNodeTree($newPath);
 
// Follow with a dummy entry for the text node.
$this->nodeIndex[$absoluteParentPath.'/text()['.($childNode['pos']+2).']'] =& $childNode;
}
 
// Make sure that their is a text-part after the last node.
if (!isSet($parentNode['textParts'][$iChildIndex])) $parentNode['textParts'][$iChildIndex] = '';
}
 
return TRUE;
}
/**
* Clone a node and it's child nodes.
*
* NOTE: If the node has children you *MUST* use the reference operator!
* E.g. $clonedNode =& cloneNode($node);
* Otherwise the children will not point back to the parent, they will point
* back to your temporary variable instead.
*
* @param $node (mixed) Either a node (hash array) or an abs. Xpath to a node in
* the current doc
* @return (&array) A node and it's child nodes.
*/
function &cloneNode($node, $recursive=FALSE) {
if (is_string($node) AND isSet($this->nodeIndex[$node])) {
$node = $this->nodeIndex[$node];
}
// Copy the text-parts ()
$textParts = $node['textParts'];
$node['textParts'] = array();
foreach ($textParts as $key => $val) {
$node['textParts'][] = $val;
}
$childSize = sizeOf($node['childNodes']);
for ($i=0; $i<$childSize; $i++) {
$childNode =& $this->cloneNode($node['childNodes'][$i], TRUE); // copy child
$node['childNodes'][$i] =& $childNode; // reference the copy
$childNode['parentNode'] =& $node; // child references the parent.
}
if (!$recursive) {
//$node['childNodes'][0]['parentNode'] = null;
//print "<pre>";
//var_dump($node);
}
return $node;
}
/** Nice to have but __sleep() has a bug.
(2002-2 PHP V4.1. See bug #15350)
/**
* PHP cals this function when you call PHP's serialize.
*
* It prevents cyclic referencing, which is why print_r() of an XPath object doesn't work.
*
function __sleep() {
// Destroy recursive pointers
$keys = array_keys($this->nodeIndex);
$size = sizeOf($keys);
for ($i=0; $i<$size; $i++) {
unset($this->nodeIndex[$keys[$i]]['parentNode']);
}
unset($this->nodeIndex);
}
/**
* PHP cals this function when you call PHP's unserialize.
*
* It reindexes the node-tree
*
function __wakeup() {
$this->reindexNodeTree();
}
*/
//-----------------------------------------------------------------------------------------
// XPath ------ XPath Query / Evaluation Handlers ------
//-----------------------------------------------------------------------------------------
/**
* Matches (evaluates) an XPath query
*
* This method tries to evaluate an XPath query by parsing it. A XML source must
* have been imported before this method is able to work.
*
* @param $xPathQuery (string) XPath query to be evaluated.
* @param $baseXPath (string) (default is super-root) XPath query to a single document node,
* from which the XPath query should start evaluating.
* @return (mixed) The result of the XPath expression. Either:
* node-set (an ordered collection of absolute references to nodes without duplicates)
* boolean (true or false)
* number (a floating-point number)
* string (a sequence of UCS characters)
*/
function match($xPathQuery, $baseXPath='') {
if ($this->_indexIsDirty) $this->reindexNodeTree();
// Replace a double slashes, because they'll cause problems otherwise.
static $slashes2descendant = array(
'//@' => '/descendant_or_self::*/attribute::',
'//' => '/descendant_or_self::node()/',
'/@' => '/attribute::');
// Stupid idea from W3C to take axes name containing a '-' (dash) !!!
// We replace the '-' with '_' to avoid the conflict with the minus operator.
static $dash2underscoreHash = array(
'-sibling' => '_sibling',
'-or-' => '_or_',
'starts-with' => 'starts_with',
'substring-before' => 'substring_before',
'substring-after' => 'substring_after',
'string-length' => 'string_length',
'normalize-space' => 'normalize_space',
'x-lower' => 'x_lower',
'x-upper' => 'x_upper',
'generate-id' => 'generate_id');
if (empty($xPathQuery)) return array();
 
// Special case for when document is empty.
if (empty($this->nodeRoot)) return array();
 
if (!isSet($this->nodeIndex[$baseXPath])) {
$xPathSet = $this->_resolveXPathQuery($baseXPath,'match');
if (sizeOf($xPathSet) !== 1) {
$this->_displayError(sprintf($this->errorStrings['NoNodeMatch'], $xPathQuery), __LINE__, __FILE__, FALSE);
return FALSE;
}
$baseXPath = $xPathSet[0];
}
 
// We should possibly do a proper syntactical parse, but instead we will cheat and just
// remove any literals that could make things very difficult for us, and replace them with
// special tags. Then we can treat the xPathQuery much more easily as JUST "syntax". Provided
// there are no literals in the string, then we can guarentee that most of the operators and
// syntactical elements are indeed elements and not just part of a literal string.
$processedxPathQuery = $this->_removeLiterals($xPathQuery);
// Replace a double slashes, and '-' (dash) in axes names.
$processedxPathQuery = strtr($processedxPathQuery, $slashes2descendant);
$processedxPathQuery = strtr($processedxPathQuery, $dash2underscoreHash);
 
// Build the context
$context = array('nodePath' => $baseXPath, 'pos' => 1, 'size' => 1);
 
// The primary syntactic construct in XPath is the expression.
$result = $this->_evaluateExpr($processedxPathQuery, $context);
 
// We might have been returned a string.. If so convert back to a literal
$literalString = $this->_asLiteral($result);
if ($literalString != FALSE) return $literalString;
else return $result;
}
 
/**
* Alias for the match function
*
* @see match()
*/
function evaluate($xPathQuery, $baseXPath='') {
return $this->match($xPathQuery, $baseXPath);
}
 
/**
* Parse out the literals of an XPath expression.
*
* Instead of doing a full lexical parse, we parse out the literal strings, and then
* Treat the sections of the string either as parts of XPath or literal strings. So
* this function replaces each literal it finds with a literal reference, and then inserts
* the reference into an array of strings that we can access. The literals can be accessed
* later from the literals associative array.
*
* Example:
* XPathExpr = /AAA[@CCC = "hello"]/BBB[DDD = 'world']
* => literals: array("hello", "world")
* return value: /AAA[@CCC = $1]/BBB[DDD = $2]
*
* Note: This does not interfere with the VariableReference syntactical element, as these
* elements must not start with a number.
*
* @param $xPathQuery (string) XPath expression to be processed
* @return (string) The XPath expression without the literals.
*
*/
function _removeLiterals($xPathQuery) {
// What comes first? A " or a '?
if (!preg_match(":^([^\"']*)([\"'].*)$:", $xPathQuery, $aMatches)) {
// No " or ' means no more literals.
return $xPathQuery;
}
$result = $aMatches[1];
$remainder = $aMatches[2];
// What kind of literal?
if (preg_match(':^"([^"]*)"(.*)$:', $remainder, $aMatches)) {
// A "" literal.
$literal = $aMatches[1];
$remainder = $aMatches[2];
} else if (preg_match(":^'([^']*)'(.*)$:", $remainder, $aMatches)) {
// A '' literal.
$literal = $aMatches[1];
$remainder = $aMatches[2];
} else {
$this->_displayError("The '$xPathQuery' argument began a literal, but did not close it.", __LINE__, __FILE__);
}
 
// Store the literal
$literalNumber = count($this->axPathLiterals);
$this->axPathLiterals[$literalNumber] = $literal;
$result .= '$'.$literalNumber;
return $result.$this->_removeLiterals($remainder);
}
 
/**
* Returns the given string as a literal reference.
*
* @param $string (string) The string that we are processing
* @return (mixed) The literal string. FALSE if the string isn't a literal reference.
*/
function _asLiteral($string) {
if (empty($string)) return FALSE;
if (empty($string[0])) return FALSE;
if ($string[0] == '$') {
$remainder = substr($string, 1);
if (is_numeric($remainder)) {
// We have a string reference then.
$stringNumber = (int)$remainder;
if ($stringNumber >= count($this->axPathLiterals)) {
$this->_displayError("Internal error. Found a string reference that we didn't set in xPathQuery: '$xPathQuery'.", __LINE__, __FILE__);
return FALSE;
}
return $this->axPathLiterals[$stringNumber];
}
}
 
// It's not a reference then.
return FALSE;
}
/**
* Adds a literal to our array of literals
*
* In order to make sure we don't interpret literal strings as XPath expressions, we have to
* encode literal strings so that we know that they are not XPaths.
*
* @param $string (string) The literal string that we need to store for future access
* @return (mixed) A reference string to this literal.
*/
function _addLiteral($string) {
// Store the literal
$literalNumber = count($this->axPathLiterals);
$this->axPathLiterals[$literalNumber] = $string;
$result = '$'.$literalNumber;
return $result;
}
 
/**
* Look for operators in the expression
*
* Parses through the given expression looking for operators. If found returns
* the operands and the operator in the resulting array.
*
* @param $xPathQuery (string) XPath query to be evaluated.
* @return (array) If an operator is found, it returns an array containing
* information about the operator. If no operator is found
* then it returns an empty array. If an operator is found,
* but has invalid operands, it returns FALSE.
* The resulting array has the following entries:
* 'operator' => The string version of operator that was found,
* trimmed for whitespace
* 'left operand' => The left operand, or empty if there was no
* left operand for this operator.
* 'right operand' => The right operand, or empty if there was no
* right operand for this operator.
*/
function _GetOperator($xPathQuery) {
$position = 0;
$operator = '';
 
// The results of this function can easily be cached.
static $aResultsCache = array();
if (isset($aResultsCache[$xPathQuery])) {
return $aResultsCache[$xPathQuery];
}
 
// Run through all operators and try to find one.
$opSize = sizeOf($this->operators);
for ($i=0; $i<$opSize; $i++) {
// Pick an operator to try.
$operator = $this->operators[$i];
// Quickcheck. If not present don't wast time searching 'the hard way'
if (strpos($xPathQuery, $operator)===FALSE) continue;
// Special check
$position = $this->_searchString($xPathQuery, $operator);
// Check whether a operator was found.
if ($position <= 0 ) continue;
 
// Check whether it's the equal operator.
if ($operator == '=') {
// Also look for other operators containing the equal sign.
switch ($xPathQuery[$position-1]) {
case '<' :
$position--;
$operator = '<=';
break;
case '>' :
$position--;
$operator = '>=';
break;
case '!' :
$position--;
$operator = '!=';
break;
default:
// It's a pure = operator then.
}
break;
}
 
if ($operator == '*') {
// http://www.w3.org/TR/xpath#exprlex:
// "If there is a preceding token and the preceding token is not one of @, ::, (, [,
// or an Operator, then a * must be recognized as a MultiplyOperator and an NCName must
// be recognized as an OperatorName."
 
// Get some substrings.
$character = substr($xPathQuery, $position - 1, 1);
// Check whether it's a multiply operator or a name test.
if (strchr('/@:([', $character) != FALSE) {
// Don't use the operator.
$position = -1;
continue;
} else {
// The operator is good. Lets use it.
break;
}
}
 
// Extremely annoyingly, we could have a node name like "for-each" and we should not
// parse this as a "-" operator. So if the first char of the right operator is alphabetic,
// then this is NOT an interger operator.
if (strchr('-+*', $operator) != FALSE) {
$rightOperand = trim(substr($xPathQuery, $position + strlen($operator)));
if (strlen($rightOperand) > 1) {
if (preg_match(':^\D$:', $rightOperand[0])) {
// Don't use the operator.
$position = -1;
continue;
} else {
// The operator is good. Lets use it.
break;
}
}
}
 
// The operator must be good then :o)
break;
 
} // end while each($this->operators)
 
// Did we find an operator?
if ($position == -1) {
$aResultsCache[$xPathQuery] = array();
return array();
}
 
/////////////////////////////////////////////
// Get the operands
 
// Get the left and the right part of the expression.
$leftOperand = trim(substr($xPathQuery, 0, $position));
$rightOperand = trim(substr($xPathQuery, $position + strlen($operator)));
// Remove whitespaces.
$leftOperand = trim($leftOperand);
$rightOperand = trim($rightOperand);
 
/////////////////////////////////////////////
// Check the operands.
 
if ($leftOperand == '') {
$aResultsCache[$xPathQuery] = FALSE;
return FALSE;
}
 
if ($rightOperand == '') {
$aResultsCache[$xPathQuery] = FALSE;
return FALSE;
}
 
// Package up and return what we found.
$aResult = array('operator' => $operator,
'left operand' => $leftOperand,
'right operand' => $rightOperand);
 
$aResultsCache[$xPathQuery] = $aResult;
 
return $aResult;
}
 
/**
* Evaluates an XPath PrimaryExpr
*
* http://www.w3.org/TR/xpath#section-Basics
*
* [15] PrimaryExpr ::= VariableReference
* | '(' Expr ')'
* | Literal
* | Number
* | FunctionCall
*
* @param $xPathQuery (string) XPath query to be evaluated.
* @param $context (array) The context from which to evaluate
* @param $results (mixed) If the expression could be parsed and evaluated as one of these
* syntactical elements, then this will be either:
* - node-set (an ordered collection of nodes without duplicates)
* - boolean (true or false)
* - number (a floating-point number)
* - string (a sequence of UCS characters)
* @return (string) An empty string if the query was successfully parsed and
* evaluated, else a string containing the reason for failing.
* @see evaluate()
*/
function _evaluatePrimaryExpr($xPathQuery, $context, &$result) {
$ThisFunctionName = '_evaluatePrimaryExpr';
$bDebugThisFunction = in_array($ThisFunctionName, $this->aDebugFunctions);
$this->_beginDebugFunction($ThisFunctionName, $bDebugThisFunction);
if ($bDebugThisFunction) {
echo "Path: $xPathQuery\n";
echo "Context:";
$this->_printContext($context);
echo "\n";
}
 
// Certain expressions will never be PrimaryExpr, so to speed up processing, cache the
// results we do find from this function.
static $aResultsCache = array();
// Do while false loop
$error = "";
// If the result is independant of context, then we can cache the result and speed this function
// up on future calls.
$bCacheableResult = FALSE;
do {
if (isset($aResultsCache[$xPathQuery])) {
$error = $aResultsCache[$xPathQuery]['Error'];
$result = $aResultsCache[$xPathQuery]['Result'];
break;
}
 
// VariableReference
// ### Not supported.
 
// Is it a number?
// | Number
if (is_numeric($xPathQuery)) {
$result = doubleval($xPathQuery);
$bCacheableResult = TRUE;
break;
}
 
// If it starts with $, and the remainder is a number, then it's a string.
// | Literal
$literal = $this->_asLiteral($xPathQuery);
if ($literal !== FALSE) {
$result = $xPathQuery;
$bCacheableResult = TRUE;
break;
}
 
// Is it a function?
// | FunctionCall
{
// Check whether it's all wrapped in a function. will be like count(.*) where .* is anything
// text() will try to be matched here, so just explicitly ignore it
$regex = ":^([^\(\)\[\]/]*)\s*\((.*)\)$:U";
if (preg_match($regex, $xPathQuery, $aMatch) && $xPathQuery != "text()") {
$function = $aMatch[1];
$data = $aMatch[2];
// It is possible that we will get "a() or b()" which will match as function "a" with
// arguments ") or b(" which is clearly wrong... _bracketsCheck() should catch this.
if ($this->_bracketsCheck($data)) {
if (in_array($function, $this->functions)) {
if ($bDebugThisFunction) echo "XPathExpr: $xPathQuery is a $function() function call:\n";
$result = $this->_evaluateFunction($function, $data, $context);
break;
}
}
}
}
 
// Is it a bracketed expression?
// | '(' Expr ')'
// If it is surrounded by () then trim the brackets
$bBrackets = FALSE;
if (preg_match(":^\((.*)\):", $xPathQuery, $aMatches)) {
// Do not keep trimming off the () as we could have "(() and ())"
$bBrackets = TRUE;
$xPathQuery = $aMatches[1];
}
 
if ($bBrackets) {
// Must be a Expr then.
$result = $this->_evaluateExpr($xPathQuery, $context);
break;
}
 
// Can't be a PrimaryExpr then.
$error = "Expression is not a PrimaryExpr";
$bCacheableResult = TRUE;
} while (FALSE);
//////////////////////////////////////////////
 
// If possible, cache the result.
if ($bCacheableResult) {
$aResultsCache[$xPathQuery]['Error'] = $error;
$aResultsCache[$xPathQuery]['Result'] = $result;
}
 
$this->_closeDebugFunction($ThisFunctionName, array('result' => $result, 'error' => $error), $bDebugThisFunction);
 
// Return the result.
return $error;
}
 
/**
* Evaluates an XPath Expr
*
* $this->evaluate() is the entry point and does some inits, while this
* function is called recursive internaly for every sub-xPath expresion we find.
* It handles the following syntax, and calls evaluatePathExpr if it finds that none
* of this grammer applies.
*
* http://www.w3.org/TR/xpath#section-Basics
*
* [14] Expr ::= OrExpr
* [21] OrExpr ::= AndExpr
* | OrExpr 'or' AndExpr
* [22] AndExpr ::= EqualityExpr
* | AndExpr 'and' EqualityExpr
* [23] EqualityExpr ::= RelationalExpr
* | EqualityExpr '=' RelationalExpr
* | EqualityExpr '!=' RelationalExpr
* [24] RelationalExpr ::= AdditiveExpr
* | RelationalExpr '<' AdditiveExpr
* | RelationalExpr '>' AdditiveExpr
* | RelationalExpr '<=' AdditiveExpr
* | RelationalExpr '>=' AdditiveExpr
* [25] AdditiveExpr ::= MultiplicativeExpr
* | AdditiveExpr '+' MultiplicativeExpr
* | AdditiveExpr '-' MultiplicativeExpr
* [26] MultiplicativeExpr ::= UnaryExpr
* | MultiplicativeExpr MultiplyOperator UnaryExpr
* | MultiplicativeExpr 'div' UnaryExpr
* | MultiplicativeExpr 'mod' UnaryExpr
* [27] UnaryExpr ::= UnionExpr
* | '-' UnaryExpr
* [18] UnionExpr ::= PathExpr
* | UnionExpr '|' PathExpr
*
* NOTE: The effect of the above grammar is that the order of precedence is
* (lowest precedence first):
* 1) or
* 2) and
* 3) =, !=
* 4) <=, <, >=, >
* 5) +, -
* 6) *, div, mod
* 7) - (negate)
* 8) |
*
* @param $xPathQuery (string) XPath query to be evaluated.
* @param $context (array) An associative array the describes the context from which
* to evaluate the XPath Expr. Contains three members:
* 'nodePath' => The absolute XPath expression to the context node
* 'size' => The context size
* 'pos' => The context position
* @return (mixed) The result of the XPath expression. Either:
* node-set (an ordered collection of nodes without duplicates)
* boolean (true or false)
* number (a floating-point number)
* string (a sequence of UCS characters)
* @see evaluate()
*/
function _evaluateExpr($xPathQuery, $context) {
$ThisFunctionName = '_evaluateExpr';
$bDebugThisFunction = in_array($ThisFunctionName, $this->aDebugFunctions);
$this->_beginDebugFunction($ThisFunctionName, $bDebugThisFunction);
if ($bDebugThisFunction) {
echo "Path: $xPathQuery\n";
echo "Context:";
$this->_printContext($context);
echo "\n";
}
 
// Numpty check
if (!isset($xPathQuery) || ($xPathQuery == '')) {
$this->_displayError("The \$xPathQuery argument must have a value.", __LINE__, __FILE__);
return FALSE;
}
 
// At the top level we deal with booleans. Only if the Expr is just an AdditiveExpr will
// the result not be a boolean.
//
//
// Between these syntactical elements we get PathExprs.
 
// Do while false loop
do {
static $aKnownPathExprCache = array();
 
if (isset($aKnownPathExprCache[$xPathQuery])) {
if ($bDebugThisFunction) echo "XPathExpr is a PathExpr\n";
$result = $this->_evaluatePathExpr($xPathQuery, $context);
break;
}
 
// Check for operators first, as we could have "() op ()" and the PrimaryExpr will try to
// say that that is an Expr called ") op ("
// Set the default position and the type of the operator.
$aOperatorInfo = $this->_GetOperator($xPathQuery);
 
// An expression can be one of these, and we should catch these "first" as they are most common
if (empty($aOperatorInfo)) {
$error = $this->_evaluatePrimaryExpr($xPathQuery, $context, $result);
if (empty($error)) {
// It could be parsed as a PrimaryExpr, so look no further :o)
break;
}
}
 
// Check whether an operator was found.
if (empty($aOperatorInfo)) {
if ($bDebugThisFunction) echo "XPathExpr is a PathExpr\n";
$aKnownPathExprCache[$xPathQuery] = TRUE;
// No operator. Means we have a PathExpr then. Go to the next level.
$result = $this->_evaluatePathExpr($xPathQuery, $context);
break;
}
 
if ($bDebugThisFunction) { echo "\nFound and operator:"; print_r($aOperatorInfo); }//LEFT:[$leftOperand] oper:[$operator] RIGHT:[$rightOperand]";
 
$operator = $aOperatorInfo['operator'];
 
/////////////////////////////////////////////
// Recursively process the operator
 
// Check the kind of operator.
switch ($operator) {
case ' or ':
case ' and ':
$operatorType = 'Boolean';
break;
case '+':
case '-':
case '*':
case ' div ':
case ' mod ':
$operatorType = 'Integer';
break;
case ' | ':
$operatorType = 'NodeSet';
break;
case '<=':
case '<':
case '>=':
case '>':
case '=':
case '!=':
$operatorType = 'Multi';
break;
default:
$this->_displayError("Internal error. Default case of switch statement reached.", __LINE__, __FILE__);
}
 
if ($bDebugThisFunction) echo "\nOperator is a [$operator]($operatorType operator)";
 
/////////////////////////////////////////////
// Evaluate the operands
 
// Evaluate the left part.
if ($bDebugThisFunction) echo "\nEvaluating LEFT:[{$aOperatorInfo['left operand']}]\n";
$left = $this->_evaluateExpr($aOperatorInfo['left operand'], $context);
if ($bDebugThisFunction) {echo "{$aOperatorInfo['left operand']} evals as:\n"; print_r($left); }
// If it is a boolean operator, it's possible we don't need to evaluate the right part.
 
// Only evaluate the right part if we need to.
$right = '';
if ($operatorType == 'Boolean') {
// Is the left part false?
$left = $this->_handleFunction_boolean($left, $context);
if (!$left and ($operator == ' and ')) {
$result = FALSE;
break;
} else if ($left and ($operator == ' or ')) {
$result = TRUE;
break;
}
}
 
// Evaluate the right part
if ($bDebugThisFunction) echo "\nEvaluating RIGHT:[{$aOperatorInfo['right operand']}]\n";
$right = $this->_evaluateExpr($aOperatorInfo['right operand'], $context);
if ($bDebugThisFunction) {echo "{$aOperatorInfo['right operand']} evals as:\n"; print_r($right); echo "\n";}
 
/////////////////////////////////////////////
// Combine the operands
 
// If necessary, work out how to treat the multi operators
if ($operatorType != 'Multi') {
$result = $this->_evaluateOperator($left, $operator, $right, $operatorType, $context);
} else {
// http://www.w3.org/TR/xpath#booleans
// If both objects to be compared are node-sets, then the comparison will be true if and
// only if there is a node in the first node-set and a node in the second node-set such
// that the result of performing the comparison on the string-values of the two nodes is
// true.
//
// If one object to be compared is a node-set and the other is a number, then the
// comparison will be true if and only if there is a node in the node-set such that the
// result of performing the comparison on the number to be compared and on the result of
// converting the string-value of that node to a number using the number function is true.
//
// If one object to be compared is a node-set and the other is a string, then the comparison
// will be true if and only if there is a node in the node-set such that the result of performing
// the comparison on the string-value of the node and the other string is true.
//
// If one object to be compared is a node-set and the other is a boolean, then the comparison
// will be true if and only if the result of performing the comparison on the boolean and on
// the result of converting the node-set to a boolean using the boolean function is true.
if (is_array($left) || is_array($right)) {
if ($bDebugThisFunction) echo "As one of the operands is an array, we will need to loop\n";
if (is_array($left) && is_array($right)) {
$operatorType = 'String';
} elseif (is_numeric($left) || is_numeric($right)) {
$operatorType = 'Integer';
} elseif (is_bool($left)) {
$operatorType = 'Boolean';
$right = $this->_handleFunction_boolean($right, $context);
} elseif (is_bool($right)) {
$operatorType = 'Boolean';
$left = $this->_handleFunction_boolean($left, $context);
} else {
$operatorType = 'String';
}
if ($bDebugThisFunction) echo "Equals operator is a $operatorType operator\n";
// Turn both operands into arrays to simplify logic
$aLeft = $left;
$aRight = $right;
if (!is_array($aLeft)) $aLeft = array($aLeft);
if (!is_array($aRight)) $aRight = array($aRight);
$result = FALSE;
if (!empty($aLeft)) {
foreach ($aLeft as $leftItem) {
if (empty($aRight)) break;
// If the item is from a node set, we should evaluate it's string-value
if (is_array($left)) {
if ($bDebugThisFunction) echo "\tObtaining string-value of LHS:$leftItem as it's from a nodeset\n";
$leftItem = $this->_stringValue($leftItem);
}
foreach ($aRight as $rightItem) {
// If the item is from a node set, we should evaluate it's string-value
if (is_array($right)) {
if ($bDebugThisFunction) echo "\tObtaining string-value of RHS:$rightItem as it's from a nodeset\n";
$rightItem = $this->_stringValue($rightItem);
}
 
if ($bDebugThisFunction) echo "\tEvaluating $leftItem $operator $rightItem\n";
$result = $this->_evaluateOperator($leftItem, $operator, $rightItem, $operatorType, $context);
if ($result === TRUE) break;
}
if ($result === TRUE) break;
}
}
}
// When neither object to be compared is a node-set and the operator is = or !=, then the
// objects are compared by converting them to a common type as follows and then comparing
// them.
//
// If at least one object to be compared is a boolean, then each object to be compared
// is converted to a boolean as if by applying the boolean function.
//
// Otherwise, if at least one object to be compared is a number, then each object to be
// compared is converted to a number as if by applying the number function.
//
// Otherwise, both objects to be compared are converted to strings as if by applying
// the string function.
//
// The = comparison will be true if and only if the objects are equal; the != comparison
// will be true if and only if the objects are not equal. Numbers are compared for equality
// according to IEEE 754 [IEEE 754]. Two booleans are equal if either both are true or
// both are false. Two strings are equal if and only if they consist of the same sequence
// of UCS characters.
else {
if (is_bool($left) || is_bool($right)) {
$operatorType = 'Boolean';
} elseif (is_numeric($left) || is_numeric($right)) {
$operatorType = 'Integer';
} else {
$operatorType = 'String';
}
if ($bDebugThisFunction) echo "Equals operator is a $operatorType operator\n";
$result = $this->_evaluateOperator($left, $operator, $right, $operatorType, $context);
}
}
 
} while (FALSE);
//////////////////////////////////////////////
 
$this->_closeDebugFunction($ThisFunctionName, $result, $bDebugThisFunction);
 
// Return the result.
return $result;
}
 
/**
* Evaluate the result of an operator whose operands have been evaluated
*
* If the operator type is not "NodeSet", then neither the left or right operators
* will be node sets, as the processing when one or other is an array is complex,
* and should be handled by the caller.
*
* @param $left (mixed) The left operand
* @param $right (mixed) The right operand
* @param $operator (string) The operator to use to combine the operands
* @param $operatorType (string) The type of the operator. Either 'Boolean',
* 'Integer', 'String', or 'NodeSet'
* @param $context (array) The context from which to evaluate
* @return (mixed) The result of the XPath expression. Either:
* node-set (an ordered collection of nodes without duplicates)
* boolean (true or false)
* number (a floating-point number)
* string (a sequence of UCS characters)
*/
function _evaluateOperator($left, $operator, $right, $operatorType, $context) {
$ThisFunctionName = '_evaluateOperator';
$bDebugThisFunction = in_array($ThisFunctionName, $this->aDebugFunctions);
$this->_beginDebugFunction($ThisFunctionName, $bDebugThisFunction);
if ($bDebugThisFunction) {
echo "left: $left\n";
echo "right: $right\n";
echo "operator: $operator\n";
echo "operator type: $operatorType\n";
}
 
// Do while false loop
do {
// Handle the operator depending on the operator type.
switch ($operatorType) {
case 'Boolean':
{
// Boolify the arguments. (The left arg is already a bool)
$right = $this->_handleFunction_boolean($right, $context);
switch ($operator) {
case '=': // Compare the two results.
$result = (bool)($left == $right);
break;
case ' or ': // Return the two results connected by an 'or'.
$result = (bool)( $left or $right );
break;
case ' and ': // Return the two results connected by an 'and'.
$result = (bool)( $left and $right );
break;
case '!=': // Check whether the two results are not equal.
$result = (bool)( $left != $right );
break;
default:
$this->_displayError("Internal error. Default case of switch statement reached.", __LINE__, __FILE__);
}
}
break;
case 'Integer':
{
// Convert both left and right operands into numbers.
if (empty($left) && ($operator == '-')) {
// There may be no left operator if the op is '-'
$left = 0;
} else {
$left = $this->_handleFunction_number($left, $context);
}
$right = $this->_handleFunction_number($right, $context);
if ($bDebugThisFunction) echo "\nLeft is $left, Right is $right\n";
switch ($operator) {
case '=': // Compare the two results.
$result = (bool)($left == $right);
break;
case '!=': // Compare the two results.
$result = (bool)($left != $right);
break;
case '+': // Return the result by adding one result to the other.
$result = $left + $right;
break;
case '-': // Return the result by decrease one result by the other.
$result = $left - $right;
break;
case '*': // Return a multiplication of the two results.
$result = $left * $right;
break;
case ' div ': // Return a division of the two results.
$result = $left / $right;
break;
case ' mod ': // Return a modulo division of the two results.
$result = $left % $right;
break;
case '<=': // Compare the two results.
$result = (bool)( $left <= $right );
break;
case '<': // Compare the two results.
$result = (bool)( $left < $right );
break;
case '>=': // Compare the two results.
$result = (bool)( $left >= $right );
break;
case '>': // Compare the two results.
$result = (bool)( $left > $right );
break;
default:
$this->_displayError("Internal error. Default case of switch statement reached.", __LINE__, __FILE__);
}
}
break;
case 'NodeSet':
// Add the nodes to the result set
$result = array_merge($left, $right);
// Remove duplicated nodes.
$result = array_unique($result);
 
// Preserve doc order if there was more than one query.
if (count($result) > 1) {
$result = $this->_sortByDocOrder($result);
}
break;
case 'String':
$left = $this->_handleFunction_string($left, $context);
$right = $this->_handleFunction_string($right, $context);
if ($bDebugThisFunction) echo "\nLeft is $left, Right is $right\n";
switch ($operator) {
case '=': // Compare the two results.
$result = (bool)($left == $right);
break;
case '!=': // Compare the two results.
$result = (bool)($left != $right);
break;
default:
$this->_displayError("Internal error. Default case of switch statement reached.", __LINE__, __FILE__);
}
break;
default:
$this->_displayError("Internal error. Default case of switch statement reached.", __LINE__, __FILE__);
}
} while (FALSE);
 
//////////////////////////////////////////////
 
$this->_closeDebugFunction($ThisFunctionName, $result, $bDebugThisFunction);
 
// Return the result.
return $result;
}
/**
* Evaluates an XPath PathExpr
*
* It handles the following syntax:
*
* http://www.w3.org/TR/xpath#node-sets
* http://www.w3.org/TR/xpath#NT-LocationPath
* http://www.w3.org/TR/xpath#path-abbrev
* http://www.w3.org/TR/xpath#NT-Step
*
* [19] PathExpr ::= LocationPath
* | FilterExpr
* | FilterExpr '/' RelativeLocationPath
* | FilterExpr '//' RelativeLocationPath
* [20] FilterExpr ::= PrimaryExpr
* | FilterExpr Predicate
* [1] LocationPath ::= RelativeLocationPath
* | AbsoluteLocationPath
* [2] AbsoluteLocationPath ::= '/' RelativeLocationPath?
* | AbbreviatedAbsoluteLocationPath
* [3] RelativeLocationPath ::= Step
* | RelativeLocationPath '/' Step
* | AbbreviatedRelativeLocationPath
* [4] Step ::= AxisSpecifier NodeTest Predicate*
* | AbbreviatedStep
* [5] AxisSpecifier ::= AxisName '::'
* | AbbreviatedAxisSpecifier
* [10] AbbreviatedAbsoluteLocationPath
* ::= '//' RelativeLocationPath
* [11] AbbreviatedRelativeLocationPath
* ::= RelativeLocationPath '//' Step
* [12] AbbreviatedStep ::= '.'
* | '..'
* [13] AbbreviatedAxisSpecifier
* ::= '@'?
*
* If you expand all the abbreviated versions, then the grammer simplifies to:
*
* [19] PathExpr ::= RelativeLocationPath
* | '/' RelativeLocationPath?
* | FilterExpr
* | FilterExpr '/' RelativeLocationPath
* [20] FilterExpr ::= PrimaryExpr
* | FilterExpr Predicate
* [3] RelativeLocationPath ::= Step
* | RelativeLocationPath '/' Step
* [4] Step ::= AxisName '::' NodeTest Predicate*
*
* Conceptually you can say that we should split by '/' and try to treat the parts
* as steps, and if that fails then try to treat it as a PrimaryExpr.
*
* @param $PathExpr (string) PathExpr syntactical element
* @param $context (array) The context from which to evaluate
* @return (mixed) The result of the XPath expression. Either:
* node-set (an ordered collection of nodes without duplicates)
* boolean (true or false)
* number (a floating-point number)
* string (a sequence of UCS characters)
* @see evaluate()
*/
function _evaluatePathExpr($PathExpr, $context) {
$ThisFunctionName = '_evaluatePathExpr';
$bDebugThisFunction = in_array($ThisFunctionName, $this->aDebugFunctions);
$this->_beginDebugFunction($ThisFunctionName, $bDebugThisFunction);
if ($bDebugThisFunction) {
echo "PathExpr: $PathExpr\n";
echo "Context:";
$this->_printContext($context);
echo "\n";
}
// Numpty check
if (empty($PathExpr)) {
$this->_displayError("The \$PathExpr argument must have a value.", __LINE__, __FILE__);
return FALSE;
}
//////////////////////////////////////////////
 
// Parsing the expression into steps is a cachable operation as it doesn't depend on the context
static $aResultsCache = array();
 
if (isset($aResultsCache[$PathExpr])) {
$steps = $aResultsCache[$PathExpr];
} else {
// Note that we have used $this->slashes2descendant to simplify this logic, so the
// "Abbreviated" paths basically never exist as '//' never exists.
 
// mini syntax check
if (!$this->_bracketsCheck($PathExpr)) {
$this->_displayError('While parsing an XPath query, in the PathExpr "' .
$PathExpr.
'", there was an invalid number of brackets or a bracket mismatch.', __LINE__, __FILE__);
}
// Save the current path.
$this->currentXpathQuery = $PathExpr;
// Split the path at every slash *outside* a bracket.
$steps = $this->_bracketExplode('/', $PathExpr);
if ($bDebugThisFunction) { echo "<hr>Split the path '$PathExpr' at every slash *outside* a bracket.\n "; print_r($steps); }
// Check whether the first element is empty.
if (empty($steps[0])) {
// Remove the first and empty element. It's a starting '//'.
array_shift($steps);
}
$aResultsCache[$PathExpr] = $steps;
}
 
// Start to evaluate the steps.
// ### Consider implementing an evaluateSteps() function that removes recursion from
// evaluateStep()
$result = $this->_evaluateStep($steps, $context);
 
// Preserve doc order if there was more than one result
if (count($result) > 1) {
$result = $this->_sortByDocOrder($result);
}
//////////////////////////////////////////////
 
$this->_closeDebugFunction($ThisFunctionName, $result, $bDebugThisFunction);
 
// Return the result.
return $result;
}
 
/**
* Sort an xPathSet by doc order.
*
* @param $xPathSet (array) Array of full paths to nodes that need to be sorted
* @return (array) Array containing the same contents as $xPathSet, but
* with the contents in doc order
*/
function _sortByDocOrder($xPathSet) {
$ThisFunctionName = '_sortByDocOrder';
$bDebugThisFunction = in_array($ThisFunctionName, $this->aDebugFunctions);
$this->_beginDebugFunction($ThisFunctionName, $bDebugThisFunction);
if ($bDebugThisFunction) {
echo "_sortByDocOrder(xPathSet:[".count($xPathSet)."])";
echo "xPathSet:\n";
print_r($xPathSet);
echo "<hr>\n";
}
//////////////////////////////////////////////
 
$aResult = array();
 
// Spot some common shortcuts.
if (count($xPathSet) < 1) {
$aResult = $xPathSet;
} else {
// Build an array of doc-pos indexes.
$aDocPos = array();
$nodeCount = count($this->nodeIndex);
$aPaths = array_keys($this->nodeIndex);
if ($bDebugThisFunction) {
echo "searching for path indices in array_keys(this->nodeIndex)...\n";
//print_r($aPaths);
}
 
// The last index we found. In general the elements will be in groups
// that are themselves in order.
$iLastIndex = 0;
foreach ($xPathSet as $path) {
// Cycle round the nodes, starting at the last index, looking for the path.
$foundNode = FALSE;
for ($iIndex = $iLastIndex; $iIndex < $nodeCount + $iLastIndex; $iIndex++) {
$iThisIndex = $iIndex % $nodeCount;
if (!strcmp($aPaths[$iThisIndex],$path)) {
// we have found the doc-position index of the path
$aDocPos[] = $iThisIndex;
$iLastIndex = $iThisIndex;
$foundNode = TRUE;
break;
}
}
if ($bDebugThisFunction) {
if (!$foundNode)
echo "Error: $path not found in \$this->nodeIndex\n";
else
echo "Found node after ".($iIndex - $iLastIndex)." iterations\n";
}
}
// Now count the number of doc pos we have and the number of results and
// confirm that we have the same number of each.
$iDocPosCount = count($aDocPos);
$iResultCount = count($xPathSet);
if ($iDocPosCount != $iResultCount) {
if ($bDebugThisFunction) {
echo "count(\$aDocPos)=$iDocPosCount; count(\$result)=$iResultCount\n";
print_r(array_keys($this->nodeIndex));
}
$this->_displayError('Results from _InternalEvaluate() are corrupt. '.
'Do you need to call reindexNodeTree()?', __LINE__, __FILE__);
}
 
// Now sort the indexes.
sort($aDocPos);
 
// And now convert back to paths.
$iPathCount = count($aDocPos);
for ($iIndex = 0; $iIndex < $iPathCount; $iIndex++) {
$aResult[] = $aPaths[$aDocPos[$iIndex]];
}
}
 
// Our result from the function is this array.
$result = $aResult;
 
//////////////////////////////////////////////
 
$this->_closeDebugFunction($ThisFunctionName, $result, $bDebugThisFunction);
 
// Return the result.
return $result;
}
 
/**
* Evaluate a step from a XPathQuery expression at a specific contextPath.
*
* Steps are the arguments of a XPathQuery when divided by a '/'. A contextPath is a
* absolute XPath (or vector of XPaths) to a starting node(s) from which the step should
* be evaluated.
*
* @param $steps (array) Vector containing the remaining steps of the current
* XPathQuery expression.
* @param $context (array) The context from which to evaluate
* @return (array) Vector of absolute XPath's as a result of the step
* evaluation. The results will not necessarily be in doc order
* @see _evaluatePathExpr()
*/
function _evaluateStep($steps, $context) {
$ThisFunctionName = '_evaluateStep';
$bDebugThisFunction = in_array($ThisFunctionName, $this->aDebugFunctions);
$this->_beginDebugFunction($ThisFunctionName, $bDebugThisFunction);
if ($bDebugThisFunction) {
echo "Context:";
$this->_printContext($context);
echo "\n";
echo "Steps: ";
print_r($steps);
echo "<hr>\n";
}
//////////////////////////////////////////////
 
$result = array(); // Create an empty array for saving the abs. XPath's found.
 
$contextPaths = array(); // Create an array to save the new contexts.
$step = trim(array_shift($steps)); // Get this step.
if ($bDebugThisFunction) echo __LINE__.":Evaluating step $step\n";
$axis = $this->_getAxis($step); // Get the axis of the current step.
 
// If there was no axis, then it must be a PrimaryExpr
if ($axis == FALSE) {
if ($bDebugThisFunction) echo __LINE__.":Step is not an axis but a PrimaryExpr\n";
// ### This isn't correct, as the result of this function might not be a node set.
$error = $this->_evaluatePrimaryExpr($step, $context, $contextPaths);
if (!empty($error)) {
$this->_displayError("Expression failed to parse as PrimaryExpr because: $error"
, __LINE__, __FILE__, FALSE);
}
} else {
if ($bDebugThisFunction) { echo __LINE__.":Axis of step is:\n"; print_r($axis); echo "\n";}
$method = '_handleAxis_' . $axis['axis']; // Create the name of the method.
// Check whether the axis handler is defined. If not display an error message.
if (!method_exists($this, $method)) {
$this->_displayError('While parsing an XPath query, the axis ' .
$axis['axis'] . ' could not be handled, because this version does not support this axis.', __LINE__, __FILE__);
}
if ($bDebugThisFunction) echo __LINE__.":Calling user method $method\n";
// Perform an axis action.
$contextPaths = $this->$method($axis, $context['nodePath']);
if ($bDebugThisFunction) { echo __LINE__.":We found these contexts from this step:\n"; print_r( $contextPaths ); echo "\n";}
}
 
// Check whether there are predicates.
if (count($contextPaths) > 0 && count($axis['predicate']) > 0) {
if ($bDebugThisFunction) echo __LINE__.":Filtering contexts by predicate...\n";
// Check whether each node fits the predicates.
$contextPaths = $this->_checkPredicates($contextPaths, $axis['predicate']);
}
 
// Check whether there are more steps left.
if (count($steps) > 0) {
if ($bDebugThisFunction) echo __LINE__.":Evaluating next step given the context of the first step...\n";
// Continue the evaluation of the next steps.
 
// Run through the array.
$size = sizeOf($contextPaths);
for ($pos=0; $pos<$size; $pos++) {
// Build new context
$newContext = array('nodePath' => $contextPaths[$pos], 'size' => $size, 'pos' => $pos + 1);
if ($bDebugThisFunction) echo __LINE__.":Evaluating step for the {$contextPaths[$pos]} context...\n";
// Call this method for this single path.
$xPathSetNew = $this->_evaluateStep($steps, $newContext);
if ($bDebugThisFunction) {echo "New results for this context:\n"; print_r($xPathSetNew);}
$result = array_merge($result, $xPathSetNew);
}
 
// Remove duplicated nodes.
$result = array_unique($result);
} else {
$result = $contextPaths; // Save the found contexts.
}
//////////////////////////////////////////////
 
$this->_closeDebugFunction($ThisFunctionName, $result, $bDebugThisFunction);
 
// Return the result.
return $result;
}
/**
* Checks whether a node matches predicates.
*
* This method checks whether a list of nodes passed to this method match
* a given list of predicates.
*
* @param $xPathSet (array) Array of full paths of all nodes to be tested.
* @param $predicates (array) Array of predicates to use.
* @return (array) Vector of absolute XPath's that match the given predicates.
* @see _evaluateStep()
*/
function _checkPredicates($xPathSet, $predicates) {
$ThisFunctionName = '_checkPredicates';
$bDebugThisFunction = in_array($ThisFunctionName, $this->aDebugFunctions);
$this->_beginDebugFunction($ThisFunctionName, $bDebugThisFunction);
if ($bDebugThisFunction) {
echo "XPathSet:";
print_r($xPathSet);
echo "Predicates:";
print_r($predicates);
echo "<hr>";
}
//////////////////////////////////////////////
// Create an empty set of nodes.
$result = array();
 
// Run through all predicates.
$pSize = sizeOf($predicates);
for ($j=0; $j<$pSize; $j++) {
$predicate = $predicates[$j];
if ($bDebugThisFunction) echo "Evaluating predicate \"$predicate\"\n";
 
// This will contain all the nodes that match this predicate
$aNewSet = array();
// Run through all nodes.
$contextSize = count($xPathSet);
for ($contextPos=0; $contextPos<$contextSize; $contextPos++) {
$xPath = $xPathSet[$contextPos];
 
// Build the context for this predicate
$context = array('nodePath' => $xPath, 'size' => $contextSize, 'pos' => $contextPos + 1);
// Check whether the predicate is just an number.
if (preg_match('/^\d+$/', $predicate)) {
if ($bDebugThisFunction) echo "Taking short cut and calling _handleFunction_position() directly.\n";
// Take a short cut. If it is just a position, then call
// _handleFunction_position() directly. 70% of the
// time this will be the case. ## N.S
// $check = (bool) ($predicate == $context['pos']);
$check = (bool) ($predicate == $this->_handleFunction_position('', $context));
} else {
// Else do the predicate check the long and through way.
$check = $this->_evaluateExpr($predicate, $context);
}
if ($bDebugThisFunction) {
echo "Evaluating the predicate returned ";
var_dump($check);
echo "\n";
}
 
if (is_int($check)) { // Check whether it's an integer.
// Check whether it's the current position.
$check = (bool) ($check == $this->_handleFunction_position('', $context));
} else {
$check = (bool) ($this->_handleFunction_boolean($check, $context));
// if ($bDebugThisFunction) {echo $this->_handleFunction_string($check, $context);}
}
 
if ($bDebugThisFunction) echo "Node $xPath matches predicate $predicate: " . (($check) ? "TRUE" : "FALSE") ."\n";
 
// Do we add it?
if ($check) $aNewSet[] = $xPath;
}
// Use the newly filtered list.
$xPathSet = $aNewSet;
 
if ($bDebugThisFunction) {echo "Node set now contains : "; print_r($xPathSet); }
}
 
$result = $xPathSet;
 
//////////////////////////////////////////////
 
$this->_closeDebugFunction($ThisFunctionName, $result, $bDebugThisFunction);
 
// Return the array of nodes.
return $result;
}
/**
* Evaluates an XPath function
*
* This method evaluates a given XPath function with its arguments on a
* specific node of the document.
*
* @param $function (string) Name of the function to be evaluated.
* @param $arguments (string) String containing the arguments being
* passed to the function.
* @param $context (array) The context from which to evaluate
* @return (mixed) This method returns the result of the evaluation of
* the function. Depending on the function the type of the
* return value can be different.
* @see evaluate()
*/
function _evaluateFunction($function, $arguments, $context) {
$ThisFunctionName = '_evaluateFunction';
$bDebugThisFunction = in_array($ThisFunctionName, $this->aDebugFunctions);
$this->_beginDebugFunction($ThisFunctionName, $bDebugThisFunction);
if ($bDebugThisFunction) {
if (is_array($arguments)) {
echo "Arguments:\n";
print_r($arguments);
} else {
echo "Arguments: $arguments\n";
}
echo "Context:";
$this->_printContext($context);
echo "\n";
echo "<hr>\n";
}
/////////////////////////////////////
// Remove whitespaces.
$function = trim($function);
$arguments = trim($arguments);
// Create the name of the function handling function.
$method = '_handleFunction_'. $function;
// Check whether the function handling function is available.
if (!method_exists($this, $method)) {
// Display an error message.
$this->_displayError("While parsing an XPath query, ".
"the function \"$function\" could not be handled, because this ".
"version does not support this function.", __LINE__, __FILE__);
}
if ($bDebugThisFunction) echo "Calling function $method($arguments)\n";
// Return the result of the function.
$result = $this->$method($arguments, $context);
//////////////////////////////////////////////
// Return the nodes found.
 
$this->_closeDebugFunction($ThisFunctionName, $result, $bDebugThisFunction);
 
// Return the result.
return $result;
}
/**
* Checks whether a node matches a node-test.
*
* This method checks whether a node in the document matches a given node-test.
* A node test is something like text(), node(), or an element name.
*
* @param $contextPath (string) Full xpath of the node, which should be tested for
* matching the node-test.
* @param $nodeTest (string) String containing the node-test for the node.
* @return (boolean) This method returns TRUE if the node matches the
* node-test, otherwise FALSE.
* @see evaluate()
*/
function _checkNodeTest($contextPath, $nodeTest) {
// Empty node test means that it must match
if (empty($nodeTest)) return TRUE;
 
if ($nodeTest == '*') {
// * matches all element nodes.
return (!preg_match(':/[^/]+\(\)\[\d+\]$:U', $contextPath));
}
elseif (preg_match('/^[\w-:\.]+$/', $nodeTest)) {
// http://www.w3.org/TR/2000/REC-xml-20001006#NT-Name
// The real spec for what constitutes whitespace is quite elaborate, and
// we currently just hope that "\w" catches them all. In reality it should
// start with a letter too, not a number, but we've just left it simple.
// It's just a node name test. It should end with "/$nodeTest[x]"
return (preg_match('"/'.$nodeTest.'\[\d+\]$"', $contextPath));
}
elseif (preg_match('/\(/U', $nodeTest)) { // Check whether it's a function.
// Get the type of function to use.
$function = $this->_prestr($nodeTest, '(');
// Check whether the node fits the method.
switch ($function) {
case 'node': // Add this node to the list of nodes.
return TRUE;
case 'text': // Check whether the node has some text.
$tmp = implode('', $this->nodeIndex[$contextPath]['textParts']);
if (!empty($tmp)) {
return TRUE; // Add this node to the list of nodes.
}
break;
/******** NOT supported (yet?)
case 'comment': // Check whether the node has some comment.
if (!empty($this->nodeIndex[$contextPath]['comment'])) {
return TRUE; // Add this node to the list of nodes.
}
break;
case 'processing-instruction':
$literal = $this->_afterstr($axis['node-test'], '('); // Get the literal argument.
$literal = substr($literal, 0, strlen($literal) - 1); // Cut the literal.
// Check whether a literal was given.
if (!empty($literal)) {
// Check whether the node's processing instructions are matching the literals given.
if ($this->nodeIndex[$context]['processing-instructions'] == $literal) {
return TRUE; // Add this node to the node-set.
}
} else {
// Check whether the node has processing instructions.
if (!empty($this->nodeIndex[$contextPath]['processing-instructions'])) {
return TRUE; // Add this node to the node-set.
}
}
break;
***********/
default: // Display an error message.
$this->_displayError('While parsing an XPath query there was an undefined function called "' .
str_replace($function, '<b>'.$function.'</b>', $this->currentXpathQuery) .'"', __LINE__, __FILE__);
}
}
else { // Display an error message.
$this->_displayError("While parsing the XPath query \"{$this->currentXpathQuery}\" ".
"an empty and therefore invalid node-test has been found.", __LINE__, __FILE__, FALSE);
}
return FALSE; // Don't add this context.
}
//-----------------------------------------------------------------------------------------
// XPath ------ XPath AXIS Handlers ------
//-----------------------------------------------------------------------------------------
/**
* Retrieves axis information from an XPath query step.
*
* This method tries to extract the name of the axis and its node-test
* from a given step of an XPath query at a given node. If it can't parse
* the step, then we treat it as a PrimaryExpr.
*
* [4] Step ::= AxisSpecifier NodeTest Predicate*
* | AbbreviatedStep
* [5] AxisSpecifier ::= AxisName '::'
* | AbbreviatedAxisSpecifier
* [12] AbbreviatedStep ::= '.'
* | '..'
* [13] AbbreviatedAxisSpecifier
* ::= '@'?
*
* [7] NodeTest ::= NameTest
* | NodeType '(' ')'
* | 'processing-instruction' '(' Literal ')'
* [37] NameTest ::= '*'
* | NCName ':' '*'
* | QName
* [38] NodeType ::= 'comment'
* | 'text'
* | 'processing-instruction'
* | 'node'
*
* @param $step (string) String containing a step of an XPath query.
* @return (array) Contains information about the axis found in the step, or FALSE
* if the string isn't a valid step.
* @see _evaluateStep()
*/
function _getAxis($step) {
// The results of this function are very cachable, as it is completely independant of context.
static $aResultsCache = array();
 
// Create an array to save the axis information.
$axis = array(
'axis' => '',
'node-test' => '',
'predicate' => array()
);
 
$cacheKey = $step;
do { // parse block
$parseBlock = 1;
 
if (isset($aResultsCache[$cacheKey])) {
return $aResultsCache[$cacheKey];
} else {
// We have some danger of causing recursion here if we refuse to parse a step as having an
// axis, and demand it be treated as a PrimaryExpr. So if we are going to fail, make sure
// we record what we tried, so that we can catch to see if it comes straight back.
$guess = array(
'axis' => 'child',
'node-test' => $step,
'predicate' => array());
$aResultsCache[$cacheKey] = $guess;
}
 
///////////////////////////////////////////////////
// Spot the steps that won't come with an axis
 
// Check whether the step is empty or only self.
if (empty($step) OR ($step == '.') OR ($step == 'current()')) {
// Set it to the default value.
$step = '.';
$axis['axis'] = 'self';
$axis['node-test'] = '*';
break $parseBlock;
}
 
if ($step == '..') {
// Select the parent axis.
$axis['axis'] = 'parent';
$axis['node-test'] = '*';
break $parseBlock;
}
 
///////////////////////////////////////////////////
// Pull off the predicates
 
// Check whether there are predicates and add the predicate to the list
// of predicates without []. Get contents of every [] found.
$groups = $this->_getEndGroups($step);
//print_r($groups);
$groupCount = count($groups);
while (($groupCount > 0) && ($groups[$groupCount - 1][0] == '[')) {
// Remove the [] and add the predicate to the top of the list
$predicate = substr($groups[$groupCount - 1], 1, -1);
array_unshift($axis['predicate'], $predicate);
// Pop a group off the end of the list
array_pop($groups);
$groupCount--;
}
 
// Finally stick the rest back together and this is the rest of our step
if ($groupCount > 0) {
$step = implode('', $groups);
}
 
///////////////////////////////////////////////////
// Pull off the axis
 
// Check for abbreviated syntax
if ($step[0] == '@') {
// Use the attribute axis and select the attribute.
$axis['axis'] = 'attribute';
$step = substr($step, 1);
} else {
// Check whether the axis is given in plain text.
if (preg_match("/^([^:]*)::(.*)$/", $step, $match)) {
// Split the step to extract axis and node-test.
$axis['axis'] = $match[1];
$step = $match[2];
} else {
// The default axis is child
$axis['axis'] = 'child';
}
}
 
///////////////////////////////////////////////////
// Process the rest which will either a node test, or else this isn't a step.
 
// Check whether is an abbreviated syntax.
if ($step == '*') {
// Use the child axis and select all children.
$axis['node-test'] = '*';
break $parseBlock;
}
 
// ### I'm pretty sure our current handling of cdata is a fudge, and we should
// really do this better, but leave this as is for now.
if ($step == "text()") {
// Handle the text node
$axis["node-test"] = "cdata";
break $parseBlock;
}
 
// There are a few node tests that we match verbatim.
if ($step == "node()"
|| $step == "comment()"
|| $step == "text()"
|| $step == "processing-instruction") {
$axis["node-test"] = $step;
break $parseBlock;
}
 
// processing-instruction() is allowed to take an argument, but if it does, the argument
// is a literal, which we will have parsed out to $[number].
if (preg_match(":processing-instruction\(\$\d*\):", $step)) {
$axis["node-test"] = $step;
break $parseBlock;
}
 
// The only remaining way this can be a step, is if the remaining string is a simple name
// or else a :* name.
// http://www.w3.org/TR/xpath#NT-NameTest
// NameTest ::= '*'
// | NCName ':' '*'
// | QName
// QName ::= (Prefix ':')? LocalPart
// Prefix ::= NCName
// LocalPart ::= NCName
//
// ie
// NameTest ::= '*'
// | NCName ':' '*'
// | (NCName ':')? NCName
// NCName ::= (Letter | '_') (NCNameChar)*
$NCName = "[a-zA-Z_][\w\.\-_]*";
if (preg_match("/^$NCName:$NCName$/", $step)
|| preg_match("/^$NCName:*$/", $step)) {
$axis['node-test'] = $step;
if (!empty($this->parseOptions[XML_OPTION_CASE_FOLDING])) {
// Case in-sensitive
$axis['node-test'] = strtoupper($axis['node-test']);
}
// Not currently recursing
$LastFailedStep = '';
$LastFailedContext = '';
break $parseBlock;
}
 
// It's not a node then, we must treat it as a PrimaryExpr
// Check for recursion
if ($LastFailedStep == $step) {
$this->_displayError('Recursion detected while parsing an XPath query, in the step ' .
str_replace($step, '<b>'.$step.'</b>', $this->currentXpathQuery)
, __LINE__, __FILE__, FALSE);
$axis['node-test'] = $step;
} else {
$LastFailedStep = $step;
$axis = FALSE;
}
} while(FALSE); // end parse block
// Check whether it's a valid axis.
if ($axis !== FALSE) {
if (!in_array($axis['axis'], array_merge($this->axes, array('function')))) {
// Display an error message.
$this->_displayError('While parsing an XPath query, in the step ' .
str_replace($step, '<b>'.$step.'</b>', $this->currentXpathQuery) .
' the invalid axis ' . $axis['axis'] . ' was found.', __LINE__, __FILE__, FALSE);
}
}
 
// Cache the real axis information
$aResultsCache[$cacheKey] = $axis;
 
// Return the axis information.
return $axis;
}
 
/**
* Handles the XPath child axis.
*
* This method handles the XPath child axis. It essentially filters out the
* children to match the name specified after the '/'.
*
* @param $axis (array) Array containing information about the axis.
* @param $contextPath (string) xpath to starting node from which the axis should
* be processed.
* @return (array) A vector containing all nodes that were found, during
* the evaluation of the axis.
* @see evaluate()
*/
function _handleAxis_child($axis, $contextPath) {
$xPathSet = array(); // Create an empty node-set to hold the results of the child matches
if ($axis["node-test"] == "cdata") {
if (!isSet($this->nodeIndex[$contextPath]['textParts']) ) return '';
$tSize = sizeOf($this->nodeIndex[$contextPath]['textParts']);
for ($i=1; $i<=$tSize; $i++) {
$xPathSet[] = $contextPath . '/text()['.$i.']';
}
}
else {
// Get a list of all children.
$allChildren = $this->nodeIndex[$contextPath]['childNodes'];
// Run through all children in the order they where set.
$cSize = sizeOf($allChildren);
for ($i=0; $i<$cSize; $i++) {
$childPath = $contextPath .'/'. $allChildren[$i]['name'] .'['. $allChildren[$i]['contextPos'] .']';
$textChildPath = $contextPath.'/text()['.($i + 1).']';
// Check the text node
if ($this->_checkNodeTest($textChildPath, $axis['node-test'])) { // node test check
$xPathSet[] = $textChildPath; // Add the child to the node-set.
}
// Check the actual node
if ($this->_checkNodeTest($childPath, $axis['node-test'])) { // node test check
$xPathSet[] = $childPath; // Add the child to the node-set.
}
}
 
// Finally there will be one more text node to try
$textChildPath = $contextPath.'/text()['.($cSize + 1).']';
// Check the text node
if ($this->_checkNodeTest($textChildPath, $axis['node-test'])) { // node test check
$xPathSet[] = $textChildPath; // Add the child to the node-set.
}
}
return $xPathSet; // Return the nodeset.
}
/**
* Handles the XPath parent axis.
*
* @param $axis (array) Array containing information about the axis.
* @param $contextPath (string) xpath to starting node from which the axis should be processed.
* @return (array) A vector containing all nodes that were found, during the
* evaluation of the axis.
* @see evaluate()
*/
function _handleAxis_parent($axis, $contextPath) {
$xPathSet = array(); // Create an empty node-set.
// Check whether the parent matches the node-test.
$parentPath = $this->getParentXPath($contextPath);
if ($this->_checkNodeTest($parentPath, $axis['node-test'])) {
$xPathSet[] = $parentPath; // Add this node to the list of nodes.
}
return $xPathSet; // Return the nodeset.
}
/**
* Handles the XPath attribute axis.
*
* @param $axis (array) Array containing information about the axis.
* @param $contextPath (string) xpath to starting node from which the axis should be processed.
* @return (array) A vector containing all nodes that were found, during the evaluation of the axis.
* @see evaluate()
*/
function _handleAxis_attribute($axis, $contextPath) {
$xPathSet = array(); // Create an empty node-set.
// Check whether all nodes should be selected.
$nodeAttr = $this->nodeIndex[$contextPath]['attributes'];
if ($axis['node-test'] == '*'
|| $axis['node-test'] == 'node()') {
foreach($nodeAttr as $key=>$dummy) { // Run through the attributes.
$xPathSet[] = $contextPath.'/attribute::'.$key; // Add this node to the node-set.
}
}
elseif (isset($nodeAttr[$axis['node-test']])) {
$xPathSet[] = $contextPath . '/attribute::'. $axis['node-test']; // Add this node to the node-set.
}
return $xPathSet; // Return the nodeset.
}
/**
* Handles the XPath self axis.
*
* @param $axis (array) Array containing information about the axis.
* @param $contextPath (string) xpath to starting node from which the axis should be processed.
* @return (array) A vector containing all nodes that were found, during the evaluation of the axis.
* @see evaluate()
*/
function _handleAxis_self($axis, $contextPath) {
$xPathSet = array(); // Create an empty node-set.
// Check whether the context match the node-test.
if ($this->_checkNodeTest($contextPath, $axis['node-test'])) {
$xPathSet[] = $contextPath; // Add this node to the node-set.
}
return $xPathSet; // Return the nodeset.
}
/**
* Handles the XPath descendant axis.
*
* @param $axis (array) Array containing information about the axis.
* @param $contextPath (string) xpath to starting node from which the axis should be processed.
* @return (array) A vector containing all nodes that were found, during the evaluation of the axis.
* @see evaluate()
*/
function _handleAxis_descendant($axis, $contextPath) {
$xPathSet = array(); // Create an empty node-set.
// Get a list of all children.
$allChildren = $this->nodeIndex[$contextPath]['childNodes'];
// Run through all children in the order they where set.
$cSize = sizeOf($allChildren);
for ($i=0; $i<$cSize; $i++) {
$childPath = $allChildren[$i]['xpath'];
// Check whether the child matches the node-test.
if ($this->_checkNodeTest($childPath, $axis['node-test'])) {
$xPathSet[] = $childPath; // Add the child to the list of nodes.
}
// Recurse to the next level.
$xPathSet = array_merge($xPathSet, $this->_handleAxis_descendant($axis, $childPath));
}
return $xPathSet; // Return the nodeset.
}
/**
* Handles the XPath ancestor axis.
*
* @param $axis (array) Array containing information about the axis.
* @param $contextPath (string) xpath to starting node from which the axis should be processed.
* @return (array) A vector containing all nodes that were found, during the evaluation of the axis.
* @see evaluate()
*/
function _handleAxis_ancestor($axis, $contextPath) {
$xPathSet = array(); // Create an empty node-set.
$parentPath = $this->getParentXPath($contextPath); // Get the parent of the current node.
// Check whether the parent isn't super-root.
if (!empty($parentPath)) {
// Check whether the parent matches the node-test.
if ($this->_checkNodeTest($parentPath, $axis['node-test'])) {
$xPathSet[] = $parentPath; // Add the parent to the list of nodes.
}
// Handle all other ancestors.
$xPathSet = array_merge($this->_handleAxis_ancestor($axis, $parentPath), $xPathSet);
}
return $xPathSet; // Return the nodeset.
}
/**
* Handles the XPath namespace axis.
*
* @param $axis (array) Array containing information about the axis.
* @param $contextPath (string) xpath to starting node from which the axis should be processed.
* @return (array) A vector containing all nodes that were found, during the evaluation of the axis.
* @see evaluate()
*/
function _handleAxis_namespace($axis, $contextPath) {
$this->_displayError("The axis 'namespace is not suported'", __LINE__, __FILE__, FALSE);
}
/**
* Handles the XPath following axis.
*
* @param $axis (array) Array containing information about the axis.
* @param $contextPath (string) xpath to starting node from which the axis should be processed.
* @return (array) A vector containing all nodes that were found, during the evaluation of the axis.
* @see evaluate()
*/
function _handleAxis_following($axis, $contextPath) {
$xPathSet = array(); // Create an empty node-set.
do { // try-block
$node = $this->nodeIndex[$contextPath]; // Get the current node
$position = $node['pos']; // Get the current tree position.
$parent = $node['parentNode'];
// Check if there is a following sibling at all; if not end.
if ($position >= sizeOf($parent['childNodes'])) break; // try-block
// Build the starting abs. XPath
$startXPath = $parent['childNodes'][$position+1]['xpath'];
// Run through all nodes of the document.
$nodeKeys = array_keys($this->nodeIndex);
$nodeSize = sizeOf($nodeKeys);
for ($k=0; $k<$nodeSize; $k++) {
if ($nodeKeys[$k] == $startXPath) break; // Check whether this is the starting abs. XPath
}
for (; $k<$nodeSize; $k++) {
// Check whether the node fits the node-test.
if ($this->_checkNodeTest($nodeKeys[$k], $axis['node-test'])) {
$xPathSet[] = $nodeKeys[$k]; // Add the node to the list of nodes.
}
}
} while(FALSE);
return $xPathSet; // Return the nodeset.
}
/**
* Handles the XPath preceding axis.
*
* @param $axis (array) Array containing information about the axis.
* @param $contextPath (string) xpath to starting node from which the axis should be processed.
* @return (array) A vector containing all nodes that were found, during the evaluation of the axis.
* @see evaluate()
*/
function _handleAxis_preceding($axis, $contextPath) {
$xPathSet = array(); // Create an empty node-set.
// Run through all nodes of the document.
foreach ($this->nodeIndex as $xPath=>$dummy) {
if (empty($xPath)) continue; // skip super-Root
// Check whether this is the context node.
if ($xPath == $contextPath) {
break; // After this we won't look for more nodes.
}
if (!strncmp($xPath, $contextPath, strLen($xPath))) {
continue;
}
// Check whether the node fits the node-test.
if ($this->_checkNodeTest($xPath, $axis['node-test'])) {
$xPathSet[] = $xPath; // Add the node to the list of nodes.
}
}
return $xPathSet; // Return the nodeset.
}
/**
* Handles the XPath following-sibling axis.
*
* @param $axis (array) Array containing information about the axis.
* @param $contextPath (string) xpath to starting node from which the axis should be processed.
* @return (array) A vector containing all nodes that were found, during the evaluation of the axis.
* @see evaluate()
*/
function _handleAxis_following_sibling($axis, $contextPath) {
$xPathSet = array(); // Create an empty node-set.
// Get all children from the parent.
$siblings = $this->_handleAxis_child($axis, $this->getParentXPath($contextPath));
// Create a flag whether the context node was already found.
$found = FALSE;
// Run through all siblings.
$size = sizeOf($siblings);
for ($i=0; $i<$size; $i++) {
$sibling = $siblings[$i];
// Check whether the context node was already found.
if ($found) {
// Check whether the sibling matches the node-test.
if ($this->_checkNodeTest($sibling, $axis['node-test'])) {
$xPathSet[] = $sibling; // Add the sibling to the list of nodes.
}
}
// Check if we reached *this* context node.
if ($sibling == $contextPath) {
$found = TRUE; // Continue looking for other siblings.
}
}
return $xPathSet; // Return the nodeset.
}
/**
* Handles the XPath preceding-sibling axis.
*
* @param $axis (array) Array containing information about the axis.
* @param $contextPath (string) xpath to starting node from which the axis should be processed.
* @return (array) A vector containing all nodes that were found, during the evaluation of the axis.
* @see evaluate()
*/
function _handleAxis_preceding_sibling($axis, $contextPath) {
$xPathSet = array(); // Create an empty node-set.
// Get all children from the parent.
$siblings = $this->_handleAxis_child($axis, $this->getParentXPath($contextPath));
// Run through all siblings.
$size = sizeOf($siblings);
for ($i=0; $i<$size; $i++) {
$sibling = $siblings[$i];
// Check whether this is the context node.
if ($sibling == $contextPath) {
break; // Don't continue looking for other siblings.
}
// Check whether the sibling matches the node-test.
if ($this->_checkNodeTest($sibling, $axis['node-test'])) {
$xPathSet[] = $sibling; // Add the sibling to the list of nodes.
}
}
return $xPathSet; // Return the nodeset.
}
/**
* Handles the XPath descendant-or-self axis.
*
* @param $axis (array) Array containing information about the axis.
* @param $contextPath (string) xpath to starting node from which the axis should be processed.
* @return (array) A vector containing all nodes that were found, during the evaluation of the axis.
* @see evaluate()
*/
function _handleAxis_descendant_or_self($axis, $contextPath) {
$xPathSet = array(); // Create an empty node-set.
// Read the nodes.
$xPathSet = array_merge(
$this->_handleAxis_self($axis, $contextPath),
$this->_handleAxis_descendant($axis, $contextPath)
);
return $xPathSet; // Return the nodeset.
}
/**
* Handles the XPath ancestor-or-self axis.
*
* This method handles the XPath ancestor-or-self axis.
*
* @param $axis (array) Array containing information about the axis.
* @param $contextPath (string) xpath to starting node from which the axis should be processed.
* @return (array) A vector containing all nodes that were found, during the evaluation of the axis.
* @see evaluate()
*/
function _handleAxis_ancestor_or_self ( $axis, $contextPath) {
$xPathSet = array(); // Create an empty node-set.
// Read the nodes.
$xPathSet = array_merge(
$this->_handleAxis_ancestor($axis, $contextPath),
$this->_handleAxis_self($axis, $contextPath)
);
return $xPathSet; // Return the nodeset.
}
//-----------------------------------------------------------------------------------------
// XPath ------ XPath FUNCTION Handlers ------
//-----------------------------------------------------------------------------------------
/**
* Handles the XPath function last.
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_last($arguments, $context) {
return $context['size'];
}
/**
* Handles the XPath function position.
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_position($arguments, $context) {
return $context['pos'];
}
/**
* Handles the XPath function count.
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_count($arguments, $context) {
// Evaluate the argument of the method as an XPath and return the number of results.
return count($this->_evaluateExpr($arguments, $context));
}
/**
* Handles the XPath function id.
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_id($arguments, $context) {
$arguments = trim($arguments); // Trim the arguments.
$arguments = explode(' ', $arguments); // Now split the arguments into an array.
// Create a list of nodes.
$resultXPaths = array();
// Run through all nodes of the document.
$keys = array_keys($this->nodeIndex);
$kSize = $sizeOf($keys);
for ($i=0; $i<$kSize; $i++) {
if (empty($keys[$i])) continue; // skip super-Root
if (in_array($this->nodeIndex[$keys[$i]]['attributes']['id'], $arguments)) {
$resultXPaths[] = $context['nodePath']; // Add this node to the list of nodes.
}
}
return $resultXPaths; // Return the list of nodes.
}
/**
* Handles the XPath function name.
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_name($arguments, $context) {
// If the argument it omitted, it defaults to a node-set with the context node as its only member.
if (empty($arguments)) {
return $this->_addLiteral($this->nodeIndex[$context['nodePath']]['name']);
}
 
// Evaluate the argument to get a node set.
$nodeSet = $this->_evaluateExpr($arguments, $context);
if (!is_array($nodeSet)) return '';
if (count($nodeSet) < 1) return '';
if (!isset($this->nodeIndex[$nodeSet[0]])) return '';
// Return a reference to the name of the node.
return $this->_addLiteral($this->nodeIndex[$nodeSet[0]]['name']);
}
/**
* Handles the XPath function string.
*
* http://www.w3.org/TR/xpath#section-String-Functions
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_string($arguments, $context) {
// Check what type of parameter is given
if (is_array($arguments)) {
// Get the value of the first result (which means we want to concat all the text...unless
// a specific text() node has been given, and it will switch off to substringData
if (!count($arguments)) $result = '';
else {
$result = $this->_stringValue($arguments[0]);
if (($literal = $this->_asLiteral($result)) !== FALSE) {
$result = $literal;
}
}
}
// Is it a number string?
elseif (preg_match('/^[0-9]+(\.[0-9]+)?$/', $arguments) OR preg_match('/^\.[0-9]+$/', $arguments)) {
// ### Note no support for NaN and Infinity.
$number = doubleval($arguments); // Convert the digits to a number.
$result = strval($number); // Return the number.
}
elseif (is_bool($arguments)) { // Check whether it's TRUE or FALSE and return as string.
// ### Note that we used to return TRUE and FALSE which was incorrect according to the standard.
if ($arguments === TRUE) {
$result = 'true';
} else {
$result = 'false';
}
}
elseif (($literal = $this->_asLiteral($arguments)) !== FALSE) {
return $literal;
}
elseif (!empty($arguments)) {
// Spec says:
// "An object of a type other than the four basic types is converted to a string in a way that
// is dependent on that type."
// Use the argument as an XPath.
$result = $this->_evaluateExpr($arguments, $context);
if (is_string($result) && is_string($arguments) && (!strcmp($result, $arguments))) {
$this->_displayError("Loop detected in XPath expression. Probably an internal error :o/. _handleFunction_string($result)", __LINE__, __FILE__, FALSE);
return '';
} else {
$result = $this->_handleFunction_string($result, $context);
}
}
else {
$result = ''; // Return an empty string.
}
return $result;
}
/**
* Handles the XPath function concat.
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_concat($arguments, $context) {
// Split the arguments.
$arguments = explode(',', $arguments);
// Run through each argument and evaluate it.
$size = sizeof($arguments);
for ($i=0; $i<$size; $i++) {
$arguments[$i] = trim($arguments[$i]); // Trim each argument.
// Evaluate it.
$arguments[$i] = $this->_handleFunction_string($arguments[$i], $context);
}
$arguments = implode('', $arguments); // Put the string together and return it.
return $this->_addLiteral($arguments);
}
/**
* Handles the XPath function starts-with.
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_starts_with($arguments, $context) {
// Get the arguments.
$first = trim($this->_prestr($arguments, ','));
$second = trim($this->_afterstr($arguments, ','));
// Evaluate each argument.
$first = $this->_handleFunction_string($first, $context);
$second = $this->_handleFunction_string($second, $context);
// Check whether the first string starts with the second one.
return (bool) ereg('^'.$second, $first);
}
/**
* Handles the XPath function contains.
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_contains($arguments, $context) {
// Get the arguments.
$first = trim($this->_prestr($arguments, ','));
$second = trim($this->_afterstr($arguments, ','));
//echo "Predicate: $arguments First: ".$first." Second: ".$second."\n";
// Evaluate each argument.
$first = $this->_handleFunction_string($first, $context);
$second = $this->_handleFunction_string($second, $context);
//echo $second.": ".$first."\n";
// If the search string is null, then the provided there is a value it will contain it as
// it is considered that all strings contain the empty string. ## N.S.
if ($second==='') return TRUE;
// Check whether the first string starts with the second one.
if (strpos($first, $second) === FALSE) {
return FALSE;
} else {
return TRUE;
}
}
/**
* Handles the XPath function substring-before.
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_substring_before($arguments, $context) {
// Get the arguments.
$first = trim($this->_prestr($arguments, ','));
$second = trim($this->_afterstr($arguments, ','));
// Evaluate each argument.
$first = $this->_handleFunction_string($first, $context);
$second = $this->_handleFunction_string($second, $context);
// Return the substring.
return $this->_addLiteral($this->_prestr(strval($first), strval($second)));
}
/**
* Handles the XPath function substring-after.
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_substring_after($arguments, $context) {
// Get the arguments.
$first = trim($this->_prestr($arguments, ','));
$second = trim($this->_afterstr($arguments, ','));
// Evaluate each argument.
$first = $this->_handleFunction_string($first, $context);
$second = $this->_handleFunction_string($second, $context);
// Return the substring.
return $this->_addLiteral($this->_afterstr(strval($first), strval($second)));
}
/**
* Handles the XPath function substring.
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_substring($arguments, $context) {
// Split the arguments.
$arguments = explode(",", $arguments);
$size = sizeOf($arguments);
for ($i=0; $i<$size; $i++) { // Run through all arguments.
$arguments[$i] = trim($arguments[$i]); // Trim the string.
// Evaluate each argument.
$arguments[$i] = $this->_handleFunction_string($arguments[$i], $context);
}
// Check whether a third argument was given and return the substring..
if (!empty($arguments[2])) {
return $this->_addLiteral(substr(strval($arguments[0]), $arguments[1] - 1, $arguments[2]));
} else {
return $this->_addLiteral(substr(strval($arguments[0]), $arguments[1] - 1));
}
}
/**
* Handles the XPath function string-length.
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_string_length($arguments, $context) {
$arguments = trim($arguments); // Trim the argument.
// Evaluate the argument.
$arguments = $this->_handleFunction_string($arguments, $context);
return strlen(strval($arguments)); // Return the length of the string.
}
 
/**
* Handles the XPath function normalize-space.
*
* The normalize-space function returns the argument string with whitespace
* normalized by stripping leading and trailing whitespace and replacing sequences
* of whitespace characters by a single space.
* If the argument is omitted, it defaults to the context node converted to a string,
* in other words the string-value of the context node
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (stri)g trimed string
* @see evaluate()
*/
function _handleFunction_normalize_space($arguments, $context) {
if (empty($arguments)) {
$arguments = $this->getParentXPath($context['nodePath']).'/'.$this->nodeIndex[$context['nodePath']]['name'].'['.$this->nodeIndex[$context['nodePath']]['contextPos'].']';
} else {
$arguments = $this->_handleFunction_string($arguments, $context);
}
$arguments = trim(preg_replace (";[[:space:]]+;s",' ',$arguments));
return $this->_addLiteral($arguments);
}
 
/**
* Handles the XPath function translate.
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_translate($arguments, $context) {
$arguments = explode(',', $arguments); // Split the arguments.
$size = sizeOf($arguments);
for ($i=0; $i<$size; $i++) { // Run through all arguments.
$arguments[$i] = trim($arguments[$i]); // Trim the argument.
// Evaluate the argument.
$arguments[$i] = $this->_handleFunction_string($arguments[$i], $context);
}
// Return the translated string.
return $this->_addLiteral(strtr($arguments[0], $arguments[1], $arguments[2]));
}
 
/**
* Handles the XPath function boolean.
*
* http://www.w3.org/TR/xpath#section-Boolean-Functions
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_boolean($arguments, $context) {
if (empty($arguments)) {
return FALSE; // Sorry, there were no arguments.
}
// a bool is dead obvious
elseif (is_bool($arguments)) {
return $arguments;
}
// a node-set is true if and only if it is non-empty
elseif (is_array($arguments)) {
return (count($arguments) > 0);
}
// a number is true if and only if it is neither positive or negative zero nor NaN
// (Straight out of the XPath spec.. makes no sense?????)
elseif (preg_match('/^[0-9]+(\.[0-9]+)?$/', $arguments) || preg_match('/^\.[0-9]+$/', $arguments)) {
$number = doubleval($arguments); // Convert the digits to a number.
// If number zero return FALSE else TRUE.
if ($number == 0) return FALSE; else return TRUE;
}
// a string is true if and only if its length is non-zero
elseif (($literal = $this->_asLiteral($arguments)) !== FALSE) {
return (strlen($literal) != 0);
}
// an object of a type other than the four basic types is converted to a boolean in a
// way that is dependent on that type
else {
// Spec says:
// "An object of a type other than the four basic types is converted to a number in a way
// that is dependent on that type"
// Try to evaluate the argument as an XPath.
$result = $this->_evaluateExpr($arguments, $context);
if (is_string($result) && is_string($arguments) && (!strcmp($result, $arguments))) {
$this->_displayError("Loop detected in XPath expression. Probably an internal error :o/. _handleFunction_boolean($result)", __LINE__, __FILE__, FALSE);
return FALSE;
} else {
return $this->_handleFunction_boolean($result, $context);
}
}
}
/**
* Handles the XPath function not.
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_not($arguments, $context) {
// Return the negative value of the content of the brackets.
$bArgResult = $this->_handleFunction_boolean($arguments, $context);
//echo "Before inversion: ".($bArgResult?"TRUE":"FALSE")."\n";
return !$bArgResult;
}
/**
* Handles the XPath function TRUE.
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_true($arguments, $context) {
return TRUE; // Return TRUE.
}
/**
* Handles the XPath function FALSE.
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_false($arguments, $context) {
return FALSE; // Return FALSE.
}
/**
* Handles the XPath function lang.
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_lang($arguments, $context) {
$arguments = trim($arguments); // Trim the arguments.
$currentNode = $this->nodeIndex[$context['nodePath']];
while (!empty($currentNode['name'])) { // Run through the ancestors.
// Check whether the node has an language attribute.
if (isSet($currentNode['attributes']['xml:lang'])) {
// Check whether it's the language, the user asks for; if so return TRUE else FALSE
return eregi('^'.$arguments, $currentNode['attributes']['xml:lang']);
}
$currentNode = $currentNode['parentNode']; // Move up to parent
} // End while
return FALSE;
}
/**
* Handles the XPath function number.
*
* http://www.w3.org/TR/xpath#section-Number-Functions
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_number($arguments, $context) {
// Check the type of argument.
 
// A string that is a number
if (is_numeric($arguments)) {
return doubleval($arguments); // Return the argument as a number.
}
// A bool
elseif (is_bool($arguments)) { // Return TRUE/FALSE as a number.
if ($arguments === TRUE) return 1; else return 0;
}
// A node set
elseif (is_array($arguments)) {
// Is converted to a string then handled like a string
$string = $this->_handleFunction_string($arguments, $context);
if (is_numeric($string))
return doubleval($string);
}
elseif (($literal = $this->_asLiteral($arguments)) !== FALSE) {
if (is_numeric($literal)) {
return doubleval($literal);
} else {
// If we are to stick strictly to the spec, we should return NaN, but lets just
// leave PHP to see if can do some dynamic conversion.
return $literal;
}
}
else {
// Spec says:
// "An object of a type other than the four basic types is converted to a number in a way
// that is dependent on that type"
// Try to evaluate the argument as an XPath.
$result = $this->_evaluateExpr($arguments, $context);
if (is_string($result) && is_string($arguments) && (!strcmp($result, $arguments))) {
$this->_displayError("Loop detected in XPath expression. Probably an internal error :o/. _handleFunction_number($result)", __LINE__, __FILE__, FALSE);
return FALSE;
} else {
return $this->_handleFunction_number($result, $context);
}
}
}
 
/**
* Handles the XPath function sum.
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_sum($arguments, $context) {
$arguments = trim($arguments); // Trim the arguments.
// Evaluate the arguments as an XPath query.
$result = $this->_evaluateExpr($arguments, $context);
$sum = 0; // Create a variable to save the sum.
// The sum function expects a node set as an argument.
if (is_array($result)) {
// Run through all results.
$size = sizeOf($result);
for ($i=0; $i<$size; $i++) {
$value = $this->_stringValue($result[$i], $context);
if (($literal = $this->_asLiteral($value)) !== FALSE) {
$value = $literal;
}
$sum += doubleval($value); // Add it to the sum.
}
}
return $sum; // Return the sum.
}
 
/**
* Handles the XPath function floor.
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_floor($arguments, $context) {
if (!is_numeric($arguments)) {
$arguments = $this->_handleFunction_number($arguments, $context);
}
$arguments = doubleval($arguments); // Convert the arguments to a number.
return floor($arguments); // Return the result
}
/**
* Handles the XPath function ceiling.
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_ceiling($arguments, $context) {
if (!is_numeric($arguments)) {
$arguments = $this->_handleFunction_number($arguments, $context);
}
$arguments = doubleval($arguments); // Convert the arguments to a number.
return ceil($arguments); // Return the result
}
/**
* Handles the XPath function round.
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_round($arguments, $context) {
if (!is_numeric($arguments)) {
$arguments = $this->_handleFunction_number($arguments, $context);
}
$arguments = doubleval($arguments); // Convert the arguments to a number.
return round($arguments); // Return the result
}
 
//-----------------------------------------------------------------------------------------
// XPath ------ XPath Extension FUNCTION Handlers ------
//-----------------------------------------------------------------------------------------
 
/**
* Handles the XPath function x-lower.
*
* lower case a string.
* string x-lower(string)
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_x_lower($arguments, $context) {
// Evaluate the argument.
$string = $this->_handleFunction_string($arguments, $context);
// Return a reference to the lowercased string
return $this->_addLiteral(strtolower(strval($string)));
}
 
/**
* Handles the XPath function x-upper.
*
* upper case a string.
* string x-upper(string)
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @see evaluate()
*/
function _handleFunction_x_upper($arguments, $context) {
// Evaluate the argument.
$string = $this->_handleFunction_string($arguments, $context);
// Return a reference to the lowercased string
return $this->_addLiteral(strtoupper(strval($string)));
}
 
/**
* Handles the XPath function generate-id.
*
* Produce a unique id for the first node of the node set.
*
* Example usage, produces an index of all the nodes in an .xml document, where the content of each
* "section" is the exported node as XML.
*
* $aFunctions = $xPath->match('//');
*
* foreach ($aFunctions as $Function) {
* $id = $xPath->match("generate-id($Function)");
* echo "<a href='#$id'>$Function</a><br>";
* }
*
* foreach ($aFunctions as $Function) {
* $id = $xPath->match("generate-id($Function)");
* echo "<h2 id='$id'>$Function</h2>";
* echo htmlspecialchars($xPath->exportAsXml($Function));
* }
*
* @param $arguments (string) String containing the arguments that were passed to the function.
* @param $context (array) The context from which to evaluate the function
* @return (mixed) Depending on the type of function being processed
* @author Ricardo Garcia
* @see evaluate()
*/
function _handleFunction_generate_id($arguments, $context) {
// If the argument is omitted, it defaults to a node-set with the context node as its only member.
if (is_string($arguments) && empty($arguments)) {
// We need ids then
$this->_generate_ids();
return $this->_addLiteral($this->nodeIndex[$context['nodePath']]['generated_id']);
}
 
// Evaluate the argument to get a node set.
$nodeSet = $this->_evaluateExpr($arguments, $context);
 
if (!is_array($nodeSet)) return '';
if (count($nodeSet) < 1) return '';
if (!isset($this->nodeIndex[$nodeSet[0]])) return '';
// Return a reference to the name of the node.
// We need ids then
$this->_generate_ids();
return $this->_addLiteral($this->nodeIndex[$nodeSet[0]]['generated_id']);
}
 
//-----------------------------------------------------------------------------------------
// XPathEngine ------ Help Stuff ------
//-----------------------------------------------------------------------------------------
 
/**
* Decodes the character set entities in the given string.
*
* This function is given for convenience, as all text strings or attributes
* are going to come back to you with their entities still encoded. You can
* use this function to remove these entites.
*
* It makes use of the get_html_translation_table(HTML_ENTITIES) php library
* call, so is limited in the same ways. At the time of writing this seemed
* be restricted to iso-8859-1
*
* ### Provide an option that will do this by default.
*
* @param $encodedData (mixed) The string or array that has entities you would like to remove
* @param $reverse (bool) If TRUE entities will be encoded rather than decoded, ie
* < to &lt; rather than &lt; to <.
* @return (mixed) The string or array returned with entities decoded.
*/
function decodeEntities($encodedData, $reverse=FALSE) {
static $aEncodeTbl;
static $aDecodeTbl;
// Get the translation entities, but we'll cache the result to enhance performance.
if (empty($aDecodeTbl)) {
// Get the translation entities.
$aEncodeTbl = get_html_translation_table(HTML_ENTITIES);
$aDecodeTbl = array_flip($aEncodeTbl);
}
 
// If it's just a single string.
if (!is_array($encodedData)) {
if ($reverse) {
return strtr($encodedData, $aEncodeTbl);
} else {
return strtr($encodedData, $aDecodeTbl);
}
}
 
$result = array();
foreach($encodedData as $string) {
if ($reverse) {
$result[] = strtr($string, $aEncodeTbl);
} else {
$result[] = strtr($string, $aDecodeTbl);
}
}
 
return $result;
}
/**
* Compare two nodes to see if they are equal (point to the same node in the doc)
*
* 2 nodes are considered equal if the absolute XPath is equal.
*
* @param $node1 (mixed) Either an absolute XPath to an node OR a real tree-node (hash-array)
* @param $node2 (mixed) Either an absolute XPath to an node OR a real tree-node (hash-array)
* @return (bool) TRUE if equal (see text above), FALSE if not (and on error).
*/
function equalNodes($node1, $node2) {
$xPath_1 = is_string($node1) ? $node1 : $this->getNodePath($node1);
$xPath_2 = is_string($node2) ? $node2 : $this->getNodePath($node2);
return (strncasecmp ($xPath_1, $xPath_2, strLen($xPath_1)) == 0);
}
/**
* Get the absolute XPath of a node that is in a document tree.
*
* @param $node (array) A real tree-node (hash-array)
* @return (string) The string path to the node or FALSE on error.
*/
function getNodePath($node) {
if (!empty($node['xpath'])) return $node['xpath'];
$pathInfo = array();
do {
if (empty($node['name']) OR empty($node['parentNode'])) break; // End criteria
$pathInfo[] = array('name' => $node['name'], 'contextPos' => $node['contextPos']);
$node = $node['parentNode'];
} while (TRUE);
$xPath = '';
for ($i=sizeOf($pathInfo)-1; $i>=0; $i--) {
$xPath .= '/' . $pathInfo[$i]['name'] . '[' . $pathInfo[$i]['contextPos'] . ']';
}
if (empty($xPath)) return FALSE;
return $xPath;
}
/**
* Retrieves the absolute parent XPath query.
*
* The parents stored in the tree are only relative parents...but all the parent
* information is stored in the XPath query itself...so instead we use a function
* to extract the parent from the absolute Xpath query
*
* @param $childPath (string) String containing an absolute XPath query
* @return (string) returns the absolute XPath of the parent
*/
function getParentXPath($absoluteXPath) {
$lastSlashPos = strrpos($absoluteXPath, '/');
if ($lastSlashPos == 0) { // it's already the root path
return ''; // 'super-root'
} else {
return (substr($absoluteXPath, 0, $lastSlashPos));
}
}
/**
* Returns TRUE if the given node has child nodes below it
*
* @param $absoluteXPath (string) full path of the potential parent node
* @return (bool) TRUE if this node exists and has a child, FALSE otherwise
*/
function hasChildNodes($absoluteXPath) {
if ($this->_indexIsDirty) $this->reindexNodeTree();
return (bool) (isSet($this->nodeIndex[$absoluteXPath])
AND sizeOf($this->nodeIndex[$absoluteXPath]['childNodes']));
}
/**
* Translate all ampersands to it's literal entities '&amp;' and back.
*
* I wasn't aware of this problem at first but it's important to understand why we do this.
* At first you must know:
* a) PHP's XML parser *translates* all entities to the equivalent char E.g. &lt; is returned as '<'
* b) PHP's XML parser (in V 4.1.0) has problems with most *literal* entities! The only one's that are
* recognized are &amp;, &lt; &gt; and &quot;. *ALL* others (like &nbsp; &copy; a.s.o.) cause an
* XML_ERROR_UNDEFINED_ENTITY error. I reported this as bug at http://bugs.php.net/bug.php?id=15092
* (It turned out not to be a 'real' bug, but one of those nice W3C-spec things).
*
* Forget position b) now. It's just for info. Because the way we will solve a) will also solve b) too.
*
* THE PROBLEM
* To understand the problem, here a sample:
* Given is the following XML: "<AAA> &lt; &nbsp; &gt; </AAA>"
* Try to parse it and PHP's XML parser will fail with a XML_ERROR_UNDEFINED_ENTITY becaus of
* the unknown litteral-entity '&nbsp;'. (The numeric equivalent '&#160;' would work though).
* Next try is to use the numeric equivalent 160 for '&nbsp;', thus "<AAA> &lt; &#160; &gt; </AAA>"
* The data we receive in the tag <AAA> is " < > ". So we get the *translated entities* and
* NOT the 3 entities &lt; &#160; &gt. Thus, we will not even notice that there were entities at all!
* In *most* cases we're not able to tell if the data was given as entity or as 'normal' char.
* E.g. When receiving a quote or a single space were not able to tell if it was given as 'normal' char
* or as &nbsp; or &quot;. Thus we loose the entity-information of the XML-data!
*
* THE SOLUTION
* The better solution is to keep the data 'as is' by replacing the '&' before parsing begins.
* E.g. Taking the original input from above, this would result in "<AAA> &amp;lt; &amp;nbsp; &amp;gt; </AAA>"
* The data we receive now for the tag <AAA> is " &lt; &nbsp; &gt; ". and that's what we want.
*
* The bad thing is, that a global replace will also replace data in section that are NOT translated by the
* PHP XML-parser. That is comments (<!-- -->), IP-sections (stuff between <? ? >) and CDATA-block too.
* So all data comming from those sections must be reversed. This is done during the XML parse phase.
* So:
* a) Replacement of all '&' in the XML-source.
* b) All data that is not char-data or in CDATA-block have to be reversed during the XML-parse phase.
*
* @param $xmlSource (string) The XML string
* @return (string) The XML string with translated ampersands.
*/
function _translateAmpersand($xmlSource, $reverse=FALSE) {
$PHP5 = (substr(phpversion(), 0, 1) == '5');
if ($PHP5) {
//otherwise we receive &amp;nbsp; instead of &nbsp;
return $xmlSource;
} else {
return ($reverse ? str_replace('&amp;', '&', $xmlSource) : str_replace('&', '&amp;', $xmlSource));
}
}
 
} // END OF CLASS XPathEngine
 
 
/************************************************************************************************
* ===============================================================================================
* X P a t h - Class
* ===============================================================================================
************************************************************************************************/
 
define('XPATH_QUERYHIT_ALL' , 1);
define('XPATH_QUERYHIT_FIRST' , 2);
define('XPATH_QUERYHIT_UNIQUE', 3);
 
class XPath extends XPathEngine {
/**
* Constructor of the class
*
* Optionally you may call this constructor with the XML-filename to parse and the
* XML option vector. A option vector sample:
* $xmlOpt = array(XML_OPTION_CASE_FOLDING => FALSE, XML_OPTION_SKIP_WHITE => TRUE);
*
* @param $userXmlOptions (array) (optional) Vector of (<optionID>=><value>, <optionID>=><value>, ...)
* @param $fileName (string) (optional) Filename of XML file to load from.
* It is recommended that you call importFromFile()
* instead as you will get an error code. If the
* import fails, the object will be set to FALSE.
* @see parent::XPathEngine()
*/
function XPath($fileName='', $userXmlOptions=array()) {
parent::XPathEngine($userXmlOptions);
$this->properties['modMatch'] = XPATH_QUERYHIT_ALL;
if ($fileName) {
if (!$this->importFromFile($fileName)) {
// Re-run the base constructor to "reset" the object. If the user has any sense, then
// they will have created the object, and then explicitly called importFromFile(), giving
// them the chance to catch and handle the error properly.
parent::XPathEngine($userXmlOptions);
}
}
}
/**
* Resets the object so it's able to take a new xml sting/file
*
* Constructing objects is slow. If you can, reuse ones that you have used already
* by using this reset() function.
*/
function reset() {
parent::reset();
$this->properties['modMatch'] = XPATH_QUERYHIT_ALL;
}
//-----------------------------------------------------------------------------------------
// XPath ------ Get / Set Stuff ------
//-----------------------------------------------------------------------------------------
/**
* Resolves and xPathQuery array depending on the property['modMatch']
*
* Most of the modification functions of XPath will also accept a xPathQuery (instead
* of an absolute Xpath). The only problem is that the query could match more the one
* node. The question is, if the none, the fist or all nodes are to be modified.
* The behaver can be set with setModMatch()
*
* @param $modMatch (int) One of the following:
* - XPATH_QUERYHIT_ALL (default)
* - XPATH_QUERYHIT_FIRST
* - XPATH_QUERYHIT_UNIQUE // If the query matches more then one node.
* @see _resolveXPathQuery()
*/
function setModMatch($modMatch = XPATH_QUERYHIT_ALL) {
switch($modMatch) {
case XPATH_QUERYHIT_UNIQUE : $this->properties['modMatch'] = XPATH_QUERYHIT_UNIQUE; break;
case XPATH_QUERYHIT_FIRST: $this->properties['modMatch'] = XPATH_QUERYHIT_FIRST; break;
default: $this->properties['modMatch'] = XPATH_QUERYHIT_ALL;
}
}
//-----------------------------------------------------------------------------------------
// XPath ------ DOM Like Modification ------
//-----------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------
// XPath ------ Child (Node) Set/Get ------
//-----------------------------------------------------------------------------------------
/**
* Retrieves the name(s) of a node or a group of document nodes.
*
* This method retrieves the names of a group of document nodes
* specified in the argument. So if the argument was '/A[1]/B[2]' then it
* would return 'B' if the node did exist in the tree.
*
* @param $xPathQuery (mixed) Array or single full document path(s) of the node(s),
* from which the names should be retrieved.
* @return (mixed) Array or single string of the names of the specified
* nodes, or just the individual name. If the node did
* not exist, then returns FALSE.
*/
function nodeName($xPathQuery) {
if (is_array($xPathQuery)) {
$xPathSet = $xPathQuery;
} else {
// Check for a valid xPathQuery
$xPathSet = $this->_resolveXPathQuery($xPathQuery,'nodeName');
}
if (count($xPathSet) == 0) return FALSE;
// For each node, get it's name
$result = array();
foreach($xPathSet as $xPath) {
$node = &$this->getNode($xPath);
if (!$node) {
// ### Fatal internal error??
continue;
}
$result[] = $node['name'];
}
// If just a single string, return string
if (count($xPathSet) == 1) $result = $result[0];
// Return result.
return $result;
}
/**
* Removes a node from the XML document.
*
* This method removes a node from the tree of nodes of the XML document. If the node
* is a document node, all children of the node and its character data will be removed.
* If the node is an attribute node, only this attribute will be removed, the node to which
* the attribute belongs as well as its children will remain unmodified.
*
* NOTE: When passing a xpath-query instead of an abs. Xpath.
* Depending on setModMatch() one, none or multiple nodes are affected.
*
* @param $xPathQuery (string) xpath to the node (See note above).
* @param $autoReindex (bool) (optional, default=TRUE) Reindex the document to reflect
* the changes. A performance helper. See reindexNodeTree()
* @return (bool) TRUE on success, FALSE on error;
* @see setModMatch(), reindexNodeTree()
*/
function removeChild($xPathQuery, $autoReindex=TRUE) {
$ThisFunctionName = 'removeChild';
$bDebugThisFunction = in_array($ThisFunctionName, $this->aDebugFunctions);
$this->_beginDebugFunction($ThisFunctionName, $bDebugThisFunction);
if ($bDebugThisFunction) {
echo "Node: $xPathQuery\n";
echo '<hr>';
}
 
$NULL = NULL;
$status = FALSE;
do { // try-block
// Check for a valid xPathQuery
$xPathSet = $this->_resolveXPathQuery($xPathQuery,'removeChild');
if (sizeOf($xPathSet) === 0) {
$this->_displayError(sprintf($this->errorStrings['NoNodeMatch'], $xPathQuery), __LINE__, __FILE__, FALSE);
break; // try-block
}
$mustReindex = FALSE;
// Make chages from 'bottom-up'. In this manner the modifications will not affect itself.
for ($i=sizeOf($xPathSet)-1; $i>=0; $i--) {
$absoluteXPath = $xPathSet[$i];
if (preg_match(';/attribute::;', $absoluteXPath)) { // Handle the case of an attribute node
$xPath = $this->_prestr($absoluteXPath, '/attribute::'); // Get the path to the attribute node's parent.
$attribute = $this->_afterstr($absoluteXPath, '/attribute::'); // Get the name of the attribute.
unSet($this->nodeIndex[$xPath]['attributes'][$attribute]); // Unset the attribute
if ($bDebugThisFunction) echo "We removed the attribute '$attribute' of node '$xPath'.\n";
continue;
}
// Otherwise remove the node by setting it to NULL. It will be removed on the next reindexNodeTree() call.
$mustReindex = $autoReindex;
// Flag the index as dirty; it's not uptodate. A reindex will be forced (if dirty) when exporting the XML doc
$this->_indexIsDirty = TRUE;
$theNode = $this->nodeIndex[$absoluteXPath];
$theNode['parentNode']['childNodes'][$theNode['pos']] =& $NULL;
if ($bDebugThisFunction) echo "We removed the node '$absoluteXPath'.\n";
}
// Reindex the node tree again
if ($mustReindex) $this->reindexNodeTree();
$status = TRUE;
} while(FALSE);
$this->_closeDebugFunction($ThisFunctionName, $status, $bDebugThisFunction);
 
return $status;
}
/**
* Replace a node with any data string. The $data is taken 1:1.
*
* This function will delete the node you define by $absoluteXPath (plus it's sub-nodes) and
* substitute it by the string $text. Often used to push in not well formed HTML.
* WARNING:
* The $data is taken 1:1.
* You are in charge that the data you enter is valid XML if you intend
* to export and import the content again.
*
* NOTE: When passing a xpath-query instead of an abs. Xpath.
* Depending on setModMatch() one, none or multiple nodes are affected.
*
* @param $xPathQuery (string) xpath to the node (See note above).
* @param $data (string) String containing the content to be set. *READONLY*
* @param $autoReindex (bool) (optional, default=TRUE) Reindex the document to reflect
* the changes. A performance helper. See reindexNodeTree()
* @return (bool) TRUE on success, FALSE on error;
* @see setModMatch(), replaceChild(), reindexNodeTree()
*/
function replaceChildByData($xPathQuery, $data, $autoReindex=TRUE) {
$ThisFunctionName = 'replaceChildByData';
$bDebugThisFunction = in_array($ThisFunctionName, $this->aDebugFunctions);
$this->_beginDebugFunction($ThisFunctionName, $bDebugThisFunction);
if ($bDebugThisFunction) {
echo "Node: $xPathQuery\n";
}
 
$NULL = NULL;
$status = FALSE;
do { // try-block
// Check for a valid xPathQuery
$xPathSet = $this->_resolveXPathQuery($xPathQuery,'replaceChildByData');
if (sizeOf($xPathSet) === 0) {
$this->_displayError(sprintf($this->errorStrings['NoNodeMatch'], $xPathQuery), __LINE__, __FILE__, FALSE);
break; // try-block
}
$mustReindex = FALSE;
// Make chages from 'bottom-up'. In this manner the modifications will not affect itself.
for ($i=sizeOf($xPathSet)-1; $i>=0; $i--) {
$mustReindex = $autoReindex;
// Flag the index as dirty; it's not uptodate. A reindex will be forced (if dirty) when exporting the XML doc
$this->_indexIsDirty = TRUE;
$absoluteXPath = $xPathSet[$i];
$theNode = $this->nodeIndex[$absoluteXPath];
$pos = $theNode['pos'];
$theNode['parentNode']['textParts'][$pos] .= $data;
$theNode['parentNode']['childNodes'][$pos] =& $NULL;
if ($bDebugThisFunction) echo "We replaced the node '$absoluteXPath' with data.\n";
}
// Reindex the node tree again
if ($mustReindex) $this->reindexNodeTree();
$status = TRUE;
} while(FALSE);
$this->_closeDebugFunction($ThisFunctionName, ($status) ? 'Success' : '!!! FAILD !!!', $bDebugThisFunction);
 
return $status;
}
/**
* Replace the node(s) that matches the xQuery with the passed node (or passed node-tree)
*
* If the passed node is a string it's assumed to be XML and replaceChildByXml()
* will be called.
* NOTE: When passing a xpath-query instead of an abs. Xpath.
* Depending on setModMatch() one, none or multiple nodes are affected.
*
* @param $xPathQuery (string) Xpath to the node being replaced.
* @param $node (mixed) String or Array (Usually a String)
* If string: Vaild XML. E.g. "<A/>" or "<A> foo <B/> bar <A/>"
* If array: A Node (can be a whole sub-tree) (See comment in header)
* @param $autoReindex (bool) (optional, default=TRUE) Reindex the document to reflect
* the changes. A performance helper. See reindexNodeTree()
* @return (array) The last replaced $node (can be a whole sub-tree)
* @see reindexNodeTree()
*/
function &replaceChild($xPathQuery, $node, $autoReindex=TRUE) {
$NULL = NULL;
if (is_string($node)) {
if (empty($node)) { //--sam. Not sure how to react on an empty string - think it's an error.
return array();
} else {
if (!($node = $this->_xml2Document($node))) return FALSE;
}
}
// Special case if it's 'super root'. We then have to take the child node == top node
if (empty($node['parentNode'])) $node = $node['childNodes'][0];
$status = FALSE;
do { // try-block
// Check for a valid xPathQuery
$xPathSet = $this->_resolveXPathQuery($xPathQuery,'replaceChild');
if (sizeOf($xPathSet) === 0) {
$this->_displayError(sprintf($this->errorStrings['NoNodeMatch'], $xPathQuery), __LINE__, __FILE__, FALSE);
break; // try-block
}
$mustReindex = FALSE;
// Make chages from 'bottom-up'. In this manner the modifications will not affect itself.
for ($i=sizeOf($xPathSet)-1; $i>=0; $i--) {
$mustReindex = $autoReindex;
// Flag the index as dirty; it's not uptodate. A reindex will be forced (if dirty) when exporting the XML doc
$this->_indexIsDirty = TRUE;
$absoluteXPath = $xPathSet[$i];
$childNode =& $this->nodeIndex[$absoluteXPath];
$parentNode =& $childNode['parentNode'];
$childNode['parentNode'] =& $NULL;
$childPos = $childNode['pos'];
$parentNode['childNodes'][$childPos] =& $this->cloneNode($node);
}
if ($mustReindex) $this->reindexNodeTree();
$status = TRUE;
} while(FALSE);
if (!$status) return FALSE;
return $childNode;
}
/**
* Insert passed node (or passed node-tree) at the node(s) that matches the xQuery.
*
* With parameters you can define if the 'hit'-node is shifted to the right or left
* and if it's placed before of after the text-part.
* Per derfault the 'hit'-node is shifted to the right and the node takes the place
* the of the 'hit'-node.
* NOTE: When passing a xpath-query instead of an abs. Xpath.
* Depending on setModMatch() one, none or multiple nodes are affected.
*
* E.g. Following is given: AAA[1]
* / \
* ..BBB[1]..BBB[2] ..
*
* a) insertChild('/AAA[1]/BBB[2]', <node CCC>)
* b) insertChild('/AAA[1]/BBB[2]', <node CCC>, $shiftRight=FALSE)
* c) insertChild('/AAA[1]/BBB[2]', <node CCC>, $shiftRight=FALSE, $afterText=FALSE)
*
* a) b) c)
* AAA[1] AAA[1] AAA[1]
* / | \ / | \ / | \
* ..BBB[1]..CCC[1]BBB[2].. ..BBB[1]..BBB[2]..CCC[1] ..BBB[1]..BBB[2]CCC[1]..
*
* #### Do a complete review of the "(optional)" tag after several arguments.
*
* @param $xPathQuery (string) Xpath to the node to append.
* @param $node (mixed) String or Array (Usually a String)
* If string: Vaild XML. E.g. "<A/>" or "<A> foo <B/> bar <A/>"
* If array: A Node (can be a whole sub-tree) (See comment in header)
* @param $shiftRight (bool) (optional, default=TRUE) Shift the target node to the right.
* @param $afterText (bool) (optional, default=TRUE) Insert after the text.
* @param $autoReindex (bool) (optional, default=TRUE) Reindex the document to reflect
* the changes. A performance helper. See reindexNodeTree()
* @return (mixed) FALSE on error (or no match). On success we return the path(s) to the newly
* appended nodes. That is: Array of paths if more then 1 node was added or
* a single path string if only one node was added.
* NOTE: If autoReindex is FALSE, then we can't return the *complete* path
* as the exact doc-pos isn't available without reindexing. In that case we leave
* out the last [docpos] in the path(s). ie we'd return /A[3]/B instead of /A[3]/B[2]
* @see appendChildByXml(), reindexNodeTree()
*/
function insertChild($xPathQuery, $node, $shiftRight=TRUE, $afterText=TRUE, $autoReindex=TRUE) {
if (is_string($node)) {
if (empty($node)) { //--sam. Not sure how to react on an empty string - think it's an error.
return FALSE;
} else {
if (!($node = $this->_xml2Document($node))) return FALSE;
}
}
 
// Special case if it's 'super root'. We then have to take the child node == top node
if (empty($node['parentNode'])) $node = $node['childNodes'][0];
// Check for a valid xPathQuery
$xPathSet = $this->_resolveXPathQuery($xPathQuery,'insertChild');
if (sizeOf($xPathSet) === 0) {
$this->_displayError(sprintf($this->errorStrings['NoNodeMatch'], $xPathQuery), __LINE__, __FILE__, FALSE);
return FALSE;
}
$mustReindex = FALSE;
$newNodes = array();
$result = array();
// Make chages from 'bottom-up'. In this manner the modifications will not affect itself.
for ($i=sizeOf($xPathSet)-1; $i>=0; $i--) {
$absoluteXPath = $xPathSet[$i];
$childNode =& $this->nodeIndex[$absoluteXPath];
$parentNode =& $childNode['parentNode'];
 
// We can't insert at the super root or at the root.
if (empty($absoluteXPath) || (!$parentNode['parentNode'])) {
$this->_displayError(sprintf($this->errorStrings['RootNodeAlreadyExists']), __LINE__, __FILE__, FALSE);
return FALSE;
}
 
$mustReindex = $autoReindex;
// Flag the index as dirty; it's not uptodate. A reindex will be forced (if dirty) when exporting the XML doc
$this->_indexIsDirty = TRUE;
//Special case: It not possible to add siblings to the top node.
if (empty($parentNode['name'])) continue;
$newNode =& $this->cloneNode($node);
$pos = $shiftRight ? $childNode['pos'] : $childNode['pos']+1;
$parentNode['childNodes'] = array_merge(
array_slice($parentNode['childNodes'], 0, $pos),
array(&$newNode),
array_slice($parentNode['childNodes'], $pos)
);
$pos += $afterText ? 1 : 0;
$parentNode['textParts'] = array_merge(
array_slice($parentNode['textParts'], 0, $pos),
array(''),
array_slice($parentNode['textParts'], $pos)
);
// We are going from bottom to top, but the user will want results from top to bottom.
if ($mustReindex) {
// We'll have to wait till after the reindex to get the full path to this new node.
$newNodes[] = &$newNode;
} else {
// If we are reindexing the tree later, then we can't return the user any
// useful results, so we just return them the count.
$newNodePath = $parentNode['xpath'].'/'.$newNode['name'];
array_unshift($result, $newNodePath);
}
}
if ($mustReindex) {
$this->reindexNodeTree();
// Now we must fill in the result array. Because until now we did not
// know what contextpos our newly added entries had, just their pos within
// the siblings.
foreach ($newNodes as $newNode) {
array_unshift($result, $newNode['xpath']);
}
}
if (count($result) == 1) $result = $result[0];
return $result;
}
/**
* Appends a child to anothers children.
*
* If you intend to do a lot of appending, you should leave autoIndex as FALSE
* and then call reindexNodeTree() when you are finished all the appending.
*
* @param $xPathQuery (string) Xpath to the node to append to.
* @param $node (mixed) String or Array (Usually a String)
* If string: Vaild XML. E.g. "<A/>" or "<A> foo <B/> bar <A/>"
* If array: A Node (can be a whole sub-tree) (See comment in header)
* @param $afterText (bool) (optional, default=FALSE) Insert after the text.
* @param $autoReindex (bool) (optional, default=TRUE) Reindex the document to reflect
* the changes. A performance helper. See reindexNodeTree()
* @return (mixed) FALSE on error (or no match). On success we return the path(s) to the newly
* appended nodes. That is: Array of paths if more then 1 node was added or
* a single path string if only one node was added.
* NOTE: If autoReindex is FALSE, then we can't return the *complete* path
* as the exact doc-pos isn't available without reindexing. In that case we leave
* out the last [docpos] in the path(s). ie we'd return /A[3]/B instead of /A[3]/B[2]
* @see insertChild(), reindexNodeTree()
*/
function appendChild($xPathQuery, $node, $afterText=FALSE, $autoReindex=TRUE) {
if (is_string($node)) {
if (empty($node)) { //--sam. Not sure how to react on an empty string - think it's an error.
return FALSE;
} else {
if (!($node = $this->_xml2Document($node))) return FALSE;
}
}
// Special case if it's 'super root'. We then have to take the child node == top node
if (empty($node['parentNode'])) $node = $node['childNodes'][0];
 
// Check for a valid xPathQuery
$xPathSet = $this->_resolveXPathQueryForNodeMod($xPathQuery, 'appendChild');
if (sizeOf($xPathSet) === 0) return FALSE;
 
$mustReindex = FALSE;
$newNodes = array();
$result = array();
// Make chages from 'bottom-up'. In this manner the modifications will not affect itself.
for ($i=sizeOf($xPathSet)-1; $i>=0; $i--) {
$mustReindex = $autoReindex;
// Flag the index as dirty; it's not uptodate. A reindex will be forced (if dirty) when exporting the XML doc
$this->_indexIsDirty = TRUE;
$absoluteXPath = $xPathSet[$i];
$parentNode =& $this->nodeIndex[$absoluteXPath];
$newNode =& $this->cloneNode($node);
$parentNode['childNodes'][] =& $newNode;
$pos = count($parentNode['textParts']);
$pos -= $afterText ? 0 : 1;
$parentNode['textParts'] = array_merge(
array_slice($parentNode['textParts'], 0, $pos),
array(''),
array_slice($parentNode['textParts'], $pos)
);
// We are going from bottom to top, but the user will want results from top to bottom.
if ($mustReindex) {
// We'll have to wait till after the reindex to get the full path to this new node.
$newNodes[] = &$newNode;
} else {
// If we are reindexing the tree later, then we can't return the user any
// useful results, so we just return them the count.
array_unshift($result, "$absoluteXPath/{$newNode['name']}");
}
}
if ($mustReindex) {
$this->reindexNodeTree();
// Now we must fill in the result array. Because until now we did not
// know what contextpos our newly added entries had, just their pos within
// the siblings.
foreach ($newNodes as $newNode) {
array_unshift($result, $newNode['xpath']);
}
}
if (count($result) == 1) $result = $result[0];
return $result;
}
/**
* Inserts a node before the reference node with the same parent.
*
* If you intend to do a lot of appending, you should leave autoIndex as FALSE
* and then call reindexNodeTree() when you are finished all the appending.
*
* @param $xPathQuery (string) Xpath to the node to insert new node before
* @param $node (mixed) String or Array (Usually a String)
* If string: Vaild XML. E.g. "<A/>" or "<A> foo <B/> bar <A/>"
* If array: A Node (can be a whole sub-tree) (See comment in header)
* @param $afterText (bool) (optional, default=FLASE) Insert after the text.
* @param $autoReindex (bool) (optional, default=TRUE) Reindex the document to reflect
* the changes. A performance helper. See reindexNodeTree()
* @return (mixed) FALSE on error (or no match). On success we return the path(s) to the newly
* appended nodes. That is: Array of paths if more then 1 node was added or
* a single path string if only one node was added.
* NOTE: If autoReindex is FALSE, then we can't return the *complete* path
* as the exact doc-pos isn't available without reindexing. In that case we leave
* out the last [docpos] in the path(s). ie we'd return /A[3]/B instead of /A[3]/B[2]
* @see reindexNodeTree()
*/
function insertBefore($xPathQuery, $node, $afterText=TRUE, $autoReindex=TRUE) {
return $this->insertChild($xPathQuery, $node, $shiftRight=TRUE, $afterText, $autoReindex);
}
 
//-----------------------------------------------------------------------------------------
// XPath ------ Attribute Set/Get ------
//-----------------------------------------------------------------------------------------
/**
* Retrieves a dedecated attribute value or a hash-array of all attributes of a node.
*
* The first param $absoluteXPath must be a valid xpath OR a xpath-query that results
* to *one* xpath. If the second param $attrName is not set, a hash-array of all attributes
* of that node is returned.
*
* Optionally you may pass an attrubute name in $attrName and the function will return the
* string value of that attribute.
*
* @param $absoluteXPath (string) Full xpath OR a xpath-query that results to *one* xpath.
* @param $attrName (string) (Optional) The name of the attribute. See above.
* @return (mixed) hash-array or a string of attributes depending if the
* parameter $attrName was set (see above). FALSE if the
* node or attribute couldn't be found.
* @see setAttribute(), removeAttribute()
*/
function getAttributes($absoluteXPath, $attrName=NULL) {
// Numpty check
if (!isSet($this->nodeIndex[$absoluteXPath])) {
$xPathSet = $this->_resolveXPathQuery($absoluteXPath,'getAttributes');
if (empty($xPathSet)) return FALSE;
// only use the first entry
$absoluteXPath = $xPathSet[0];
}
if (!empty($this->parseOptions[XML_OPTION_CASE_FOLDING])) {
// Case in-sensitive
$attrName = strtoupper($attrName);
}
// Return the complete list or just the desired element
if (is_null($attrName)) {
return $this->nodeIndex[$absoluteXPath]['attributes'];
} elseif (isSet($this->nodeIndex[$absoluteXPath]['attributes'][$attrName])) {
return $this->nodeIndex[$absoluteXPath]['attributes'][$attrName];
}
return FALSE;
}
/**
* Set attributes of a node(s).
*
* This method sets a number single attributes. An existing attribute is overwritten (default)
* with the new value, but setting the last param to FALSE will prevent overwritten.
* NOTE: When passing a xpath-query instead of an abs. Xpath.
* Depending on setModMatch() one, none or multiple nodes are affected.
*
* @param $xPathQuery (string) xpath to the node (See note above).
* @param $name (string) Attribute name.
* @param $value (string) Attribute value.
* @param $overwrite (bool) If the attribute is already set we overwrite it (see text above)
* @return (bool) TRUE on success, FALSE on failure.
* @see getAttributes(), removeAttribute()
*/
function setAttribute($xPathQuery, $name, $value, $overwrite=TRUE) {
return $this->setAttributes($xPathQuery, array($name => $value), $overwrite);
}
/**
* Version of setAttribute() that sets multiple attributes to node(s).
*
* This method sets a number of attributes. Existing attributes are overwritten (default)
* with the new values, but setting the last param to FALSE will prevent overwritten.
* NOTE: When passing a xpath-query instead of an abs. Xpath.
* Depending on setModMatch() one, none or multiple nodes are affected.
*
* @param $xPathQuery (string) xpath to the node (See note above).
* @param $attributes (array) associative array of attributes to set.
* @param $overwrite (bool) If the attributes are already set we overwrite them (see text above)
* @return (bool) TRUE on success, FALSE otherwise
* @see setAttribute(), getAttributes(), removeAttribute()
*/
function setAttributes($xPathQuery, $attributes, $overwrite=TRUE) {
$status = FALSE;
do { // try-block
// The attributes parameter should be an associative array.
if (!is_array($attributes)) break; // try-block
// Check for a valid xPathQuery
$xPathSet = $this->_resolveXPathQuery($xPathQuery,'setAttributes');
foreach($xPathSet as $absoluteXPath) {
// Add the attributes to the node.
$theNode =& $this->nodeIndex[$absoluteXPath];
if (empty($theNode['attributes'])) {
$this->nodeIndex[$absoluteXPath]['attributes'] = $attributes;
} else {
$theNode['attributes'] = $overwrite ? array_merge($theNode['attributes'],$attributes) : array_merge($attributes, $theNode['attributes']);
}
}
$status = TRUE;
} while(FALSE); // END try-block
return $status;
}
/**
* Removes an attribute of a node(s).
*
* This method removes *ALL* attributres per default unless the second parameter $attrList is set.
* $attrList can be either a single attr-name as string OR a vector of attr-names as array.
* E.g.
* removeAttribute(<xPath>); # will remove *ALL* attributes.
* removeAttribute(<xPath>, 'A'); # will only remove attributes called 'A'.
* removeAttribute(<xPath>, array('A_1','A_2')); # will remove attribute 'A_1' and 'A_2'.
* NOTE: When passing a xpath-query instead of an abs. Xpath.
* Depending on setModMatch() one, none or multiple nodes are affected.
*
* @param $xPathQuery (string) xpath to the node (See note above).
* @param $attrList (mixed) (optional) if not set will delete *all* (see text above)
* @return (bool) TRUE on success, FALSE if the node couldn't be found
* @see getAttributes(), setAttribute()
*/
function removeAttribute($xPathQuery, $attrList=NULL) {
// Check for a valid xPathQuery
$xPathSet = $this->_resolveXPathQuery($xPathQuery, 'removeAttribute');
if (!empty($attrList) AND is_string($attrList)) $attrList = array($attrList);
if (!is_array($attrList)) return FALSE;
foreach($xPathSet as $absoluteXPath) {
// If the attribute parameter wasn't set then remove all the attributes
if ($attrList[0] === NULL) {
$this->nodeIndex[$absoluteXPath]['attributes'] = array();
continue;
}
// Remove all the elements in the array then.
foreach($attrList as $name) {
unset($this->nodeIndex[$absoluteXPath]['attributes'][$name]);
}
}
return TRUE;
}
//-----------------------------------------------------------------------------------------
// XPath ------ Text Set/Get ------
//-----------------------------------------------------------------------------------------
/**
* Retrieve all the text from a node as a single string.
*
* Sample
* Given is: <AA> This <BB\>is <BB\> some<BB\>text </AA>
* Return of getData('/AA[1]') would be: " This is sometext "
* The first param $xPathQuery must be a valid xpath OR a xpath-query that
* results to *one* xpath.
*
* @param $xPathQuery (string) xpath to the node - resolves to *one* xpath.
* @return (mixed) The returned string (see above), FALSE if the node
* couldn't be found or is not unique.
* @see getDataParts()
*/
function getData($xPathQuery) {
$aDataParts = $this->getDataParts($xPathQuery);
if ($aDataParts === FALSE) return FALSE;
return implode('', $aDataParts);
}
/**
* Retrieve all the text from a node as a vector of strings
*
* Where each element of the array was interrupted by a non-text child element.
*
* Sample
* Given is: <AA> This <BB\>is <BB\> some<BB\>text </AA>
* Return of getDataParts('/AA[1]') would be: array([0]=>' This ', [1]=>'is ', [2]=>' some', [3]=>'text ');
* The first param $absoluteXPath must be a valid xpath OR a xpath-query that results
* to *one* xpath.
*
* @param $xPathQuery (string) xpath to the node - resolves to *one* xpath.
* @return (mixed) The returned array (see above), or FALSE if node is not
* found or is not unique.
* @see getData()
*/
function getDataParts($xPathQuery) {
// Resolve xPath argument
$xPathSet = $this->_resolveXPathQuery($xPathQuery, 'getDataParts');
if (1 !== ($setSize=count($xPathSet))) {
$this->_displayError(sprintf($this->errorStrings['AbsoluteXPathRequired'], $xPathQuery) . "Not unique xpath-query, matched {$setSize}-times.", __LINE__, __FILE__, FALSE);
return FALSE;
}
$absoluteXPath = $xPathSet[0];
// Is it an attribute node?
if (preg_match(";(.*)/attribute::([^/]*)$;U", $xPathSet[0], $matches)) {
$absoluteXPath = $matches[1];
$attribute = $matches[2];
if (!isSet($this->nodeIndex[$absoluteXPath]['attributes'][$attribute])) {
$this->_displayError("The $absoluteXPath/attribute::$attribute value isn't a node in this document.", __LINE__, __FILE__, FALSE);
continue;
}
return array($this->nodeIndex[$absoluteXPath]['attributes'][$attribute]);
} else if (preg_match(":(.*)/text\(\)(\[(.*)\])?$:U", $xPathQuery, $matches)) {
$absoluteXPath = $matches[1];
$textPartNr = $matches[2];
return array($this->nodeIndex[$absoluteXPath]['textParts'][$textPartNr]);
} else {
return $this->nodeIndex[$absoluteXPath]['textParts'];
}
}
/**
* Retrieves a sub string of a text-part OR attribute-value.
*
* This method retrieves the sub string of a specific text-part OR (if the
* $absoluteXPath references an attribute) the the sub string of the attribute value.
* If no 'direct referencing' is used (Xpath ends with text()[<part-number>]), then
* the first text-part of the node ist returned (if exsiting).
*
* @param $absoluteXPath (string) Xpath to the node (See note above).
* @param $offset (int) (optional, default is 0) Starting offset. (Just like PHP's substr())
* @param $count (number) (optional, default is ALL) Character count (Just like PHP's substr())
* @return (mixed) The sub string, FALSE if not found or on error
* @see XPathEngine::wholeText(), PHP's substr()
*/
function substringData($absoluteXPath, $offset = 0, $count = NULL) {
if (!($text = $this->wholeText($absoluteXPath))) return FALSE;
if (is_null($count)) {
return substr($text, $offset);
} else {
return substr($text, $offset, $count);
}
}
/**
* Replace a sub string of a text-part OR attribute-value.
*
* NOTE: When passing a xpath-query instead of an abs. Xpath.
* Depending on setModMatch() one, none or multiple nodes are affected.
*
* @param $xPathQuery (string) xpath to the node (See note above).
* @param $replacement (string) The string to replace with.
* @param $offset (int) (optional, default is 0) Starting offset. (Just like PHP's substr_replace ())
* @param $count (number) (optional, default is 0=ALL) Character count (Just like PHP's substr_replace())
* @param $textPartNr (int) (optional) (see _getTextSet() )
* @return (bool) The new string value on success, FALSE if not found or on error
* @see substringData()
*/
function replaceData($xPathQuery, $replacement, $offset = 0, $count = 0, $textPartNr=1) {
if (!($textSet = $this->_getTextSet($xPathQuery, $textPartNr))) return FALSE;
$tSize=sizeOf($textSet);
for ($i=0; $i<$tSize; $i++) {
if ($count) {
$textSet[$i] = substr_replace($textSet[$i], $replacement, $offset, $count);
} else {
$textSet[$i] = substr_replace($textSet[$i], $replacement, $offset);
}
}
return TRUE;
}
/**
* Insert a sub string in a text-part OR attribute-value.
*
* NOTE: When passing a xpath-query instead of an abs. Xpath.
* Depending on setModMatch() one, none or multiple nodes are affected.
*
* @param $xPathQuery (string) xpath to the node (See note above).
* @param $data (string) The string to replace with.
* @param $offset (int) (optional, default is 0) Offset at which to insert the data.
* @return (bool) The new string on success, FALSE if not found or on error
* @see replaceData()
*/
function insertData($xPathQuery, $data, $offset=0) {
return $this->replaceData($xPathQuery, $data, $offset, 0);
}
/**
* Append text data to the end of the text for an attribute OR node text-part.
*
* This method adds content to a node. If it's an attribute node, then
* the value of the attribute will be set, otherwise the passed data will append to
* character data of the node text-part. Per default the first text-part is taken.
*
* NOTE: When passing a xpath-query instead of an abs. Xpath.
* Depending on setModMatch() one, none or multiple nodes are affected.
*
* @param $xPathQuery (string) to the node(s) (See note above).
* @param $data (string) String containing the content to be added.
* @param $textPartNr (int) (optional, default is 1) (see _getTextSet())
* @return (bool) TRUE on success, otherwise FALSE
* @see _getTextSet()
*/
function appendData($xPathQuery, $data, $textPartNr=1) {
if (!($textSet = $this->_getTextSet($xPathQuery, $textPartNr))) return FALSE;
$tSize=sizeOf($textSet);
for ($i=0; $i<$tSize; $i++) {
$textSet[$i] .= $data;
}
return TRUE;
}
/**
* Delete the data of a node.
*
* This method deletes content of a node. If it's an attribute node, then
* the value of the attribute will be removed, otherwise the node text-part.
* will be deleted. Per default the first text-part is deleted.
*
* NOTE: When passing a xpath-query instead of an abs. Xpath.
* Depending on setModMatch() one, none or multiple nodes are affected.
*
* @param $xPathQuery (string) to the node(s) (See note above).
* @param $offset (int) (optional, default is 0) Starting offset. (Just like PHP's substr_replace())
* @param $count (number) (optional, default is 0=ALL) Character count. (Just like PHP's substr_replace())
* @param $textPartNr (int) (optional, default is 0) the text part to delete (see _getTextSet())
* @return (bool) TRUE on success, otherwise FALSE
* @see _getTextSet()
*/
function deleteData($xPathQuery, $offset=0, $count=0, $textPartNr=1) {
if (!($textSet = $this->_getTextSet($xPathQuery, $textPartNr))) return FALSE;
$tSize=sizeOf($textSet);
for ($i=0; $i<$tSize; $i++) {
if (!$count)
$textSet[$i] = "";
else
$textSet[$i] = substr_replace($textSet[$i],'', $offset, $count);
}
return TRUE;
}
//-----------------------------------------------------------------------------------------
// XPath ------ Help Stuff ------
//-----------------------------------------------------------------------------------------
/**
* Parse the XML to a node-tree. A so called 'document'
*
* @param $xmlString (string) The string to turn into a document node.
* @return (&array) a node-tree
*/
function &_xml2Document($xmlString) {
$xmlOptions = array(
XML_OPTION_CASE_FOLDING => $this->getProperties('caseFolding'),
XML_OPTION_SKIP_WHITE => $this->getProperties('skipWhiteSpaces')
);
$xmlParser = new XPathEngine($xmlOptions);
$xmlParser->setVerbose($this->properties['verboseLevel']);
// Parse the XML string
if (!$xmlParser->importFromString($xmlString)) {
$this->_displayError($xmlParser->getLastError(), __LINE__, __FILE__, FALSE);
return FALSE;
}
return $xmlParser->getNode('/');
}
/**
* Get a reference-list to node text part(s) or node attribute(s).
*
* If the Xquery references an attribute(s) (Xquery ends with attribute::),
* then the text value of the node-attribute(s) is/are returned.
* Otherwise the Xquery is referencing to text part(s) of node(s). This can be either a
* direct reference to text part(s) (Xquery ends with text()[<nr>]) or indirect reference
* (a simple Xquery to node(s)).
* 1) Direct Reference (Xquery ends with text()[<part-number>]):
* If the 'part-number' is omitted, the first text-part is assumed; starting by 1.
* Negative numbers are allowed, where -1 is the last text-part a.s.o.
* 2) Indirect Reference (a simple Xquery to node(s)):
* Default is to return the first text part(s). Optionally you may pass a parameter
* $textPartNr to define the text-part you want; starting by 1.
* Negative numbers are allowed, where -1 is the last text-part a.s.o.
*
* NOTE I : The returned vector is a set of references to the text parts / attributes.
* This is handy, if you wish to modify the contents.
* NOTE II: text-part numbers out of range will not be in the list
* NOTE III:Instead of an absolute xpath you may also pass a xpath-query.
* Depending on setModMatch() one, none or multiple nodes are affected.
*
* @param $xPathQuery (string) xpath to the node (See note above).
* @param $textPartNr (int) String containing the content to be set.
* @return (mixed) A vector of *references* to the text that match, or
* FALSE on error
* @see XPathEngine::wholeText()
*/
function _getTextSet($xPathQuery, $textPartNr=1) {
$ThisFunctionName = '_getTextSet';
$bDebugThisFunction = in_array($ThisFunctionName, $this->aDebugFunctions);
$this->_beginDebugFunction($ThisFunctionName, $bDebugThisFunction);
if ($bDebugThisFunction) {
echo "Node: $xPathQuery\n";
echo "Text Part Number: $textPartNr\n";
echo "<hr>";
}
$status = FALSE;
$funcName = '_getTextSet';
$textSet = array();
do { // try-block
// Check if it's a Xpath reference to an attribut(s). Xpath ends with attribute::)
if (preg_match(";(.*)/(attribute::|@)([^/]*)$;U", $xPathQuery, $matches)) {
$xPathQuery = $matches[1];
$attribute = $matches[3];
// Quick out
if (isSet($this->nodeIndex[$xPathQuery])) {
$xPathSet[] = $xPathQuery;
} else {
// Try to evaluate the absoluteXPath (since it seems to be an Xquery and not an abs. Xpath)
$xPathSet = $this->_resolveXPathQuery("$xPathQuery/attribute::$attribute", $funcName);
}
foreach($xPathSet as $absoluteXPath) {
preg_match(";(.*)/attribute::([^/]*)$;U", $xPathSet[0], $matches);
$absoluteXPath = $matches[1];
$attribute = $matches[2];
if (!isSet($this->nodeIndex[$absoluteXPath]['attributes'][$attribute])) {
$this->_displayError("The $absoluteXPath/attribute::$attribute value isn't a node in this document.", __LINE__, __FILE__, FALSE);
continue;
}
$textSet[] =& $this->nodes[$absoluteXPath]['attributes'][$attribute];
}
$status = TRUE;
break; // try-block
}
// Check if it's a Xpath reference direct to a text-part(s). (xpath ends with text()[<part-number>])
if (preg_match(":(.*)/text\(\)(\[(.*)\])?$:U", $xPathQuery, $matches)) {
$xPathQuery = $matches[1];
// default to the first text node if a text node was not specified
$textPartNr = isSet($matches[2]) ? substr($matches[2],1,-1) : 1;
// Quick check
if (isSet($this->nodeIndex[$xPathQuery])) {
$xPathSet[] = $xPathQuery;
} else {
// Try to evaluate the absoluteXPath (since it seams to be an Xquery and not an abs. Xpath)
$xPathSet = $this->_resolveXPathQuery("$xPathQuery/text()[$textPartNr]", $funcName);
}
}
else {
// At this point we have been given an xpath with neither a 'text()' or 'attribute::' axis at the end
// So this means to get the text-part of the node. If parameter $textPartNr was not set, use the last
// text-part.
if (isSet($this->nodeIndex[$xPathQuery])) {
$xPathSet[] = $xPathQuery;
} else {
// Try to evaluate the absoluteXPath (since it seams to be an Xquery and not an abs. Xpath)
$xPathSet = $this->_resolveXPathQuery($xPathQuery, $funcName);
}
}
 
if ($bDebugThisFunction) {
echo "Looking up paths for:\n";
print_r($xPathSet);
}
 
// Now fetch all text-parts that match. (May be 0,1 or many)
foreach($xPathSet as $absoluteXPath) {
unset($text);
if ($text =& $this->wholeText($absoluteXPath, $textPartNr)) {
$textSet[] =& $text;
} else {
// The node does not yet have any text, so we have to add a '' string so that
// if we insert or replace to it, then we'll actually have something to op on.
$this->nodeIndex[$absoluteXPath]['textParts'][$textPartNr-1] = '';
$textSet[] =& $this->nodeIndex[$absoluteXPath]['textParts'][$textPartNr-1];
}
}
 
$status = TRUE;
} while (FALSE); // END try-block
if (!$status) $result = FALSE;
else $result = $textSet;
 
$this->_closeDebugFunction($ThisFunctionName, $result, $bDebugThisFunction);
 
return $result;
}
 
/**
* Resolves an xPathQuery vector for a node op for modification
*
* It is possible to create a brand new object, and try to append and insert nodes
* into it, so this is a version of _resolveXPathQuery() that will autocreate the
* super root if it detects that it is not present and the $xPathQuery is empty.
*
* Also it demands that there be at least one node returned, and displays a suitable
* error message if the returned xPathSet does not contain any nodes.
*
* @param $xPathQuery (string) An xpath query targeting a single node. If empty()
* returns the root node and auto creates the root node
* if it doesn't exist.
* @param $function (string) The function in which this check was called
* @return (array) Vector of $absoluteXPath's (May be empty)
* @see _resolveXPathQuery()
*/
function _resolveXPathQueryForNodeMod($xPathQuery, $functionName) {
$xPathSet = array();
if (empty($xPathQuery)) {
// You can append even if the root node doesn't exist.
if (!isset($this->nodeIndex[$xPathQuery])) $this->_createSuperRoot();
$xPathSet[] = '';
// However, you can only append to the super root, if there isn't already a root entry.
$rootNodes = $this->_resolveXPathQuery('/*','appendChild');
if (count($rootNodes) !== 0) {
$this->_displayError(sprintf($this->errorStrings['RootNodeAlreadyExists']), __LINE__, __FILE__, FALSE);
return array();
}
} else {
$xPathSet = $this->_resolveXPathQuery($xPathQuery,'appendChild');
if (sizeOf($xPathSet) === 0) {
$this->_displayError(sprintf($this->errorStrings['NoNodeMatch'], $xPathQuery), __LINE__, __FILE__, FALSE);
return array();
}
}
return $xPathSet;
}
 
/**
* Resolves an xPathQuery vector depending on the property['modMatch']
*
* To:
* - all matches,
* - the first
* - none (If the query matches more then one node.)
* see setModMatch() for details
*
* @param $xPathQuery (string) An xpath query targeting a single node. If empty()
* returns the root node (if it exists).
* @param $function (string) The function in which this check was called
* @return (array) Vector of $absoluteXPath's (May be empty)
* @see setModMatch()
*/
function _resolveXPathQuery($xPathQuery, $function) {
$xPathSet = array();
do { // try-block
if (isSet($this->nodeIndex[$xPathQuery])) {
$xPathSet[] = $xPathQuery;
break; // try-block
}
if (empty($xPathQuery)) break; // try-block
if (substr($xPathQuery, -1) === '/') break; // If the xPathQuery ends with '/' then it cannot be a good query.
// If this xPathQuery is not absolute then attempt to evaluate it
$xPathSet = $this->match($xPathQuery);
$resultSize = sizeOf($xPathSet);
switch($this->properties['modMatch']) {
case XPATH_QUERYHIT_UNIQUE :
if ($resultSize >1) {
$xPathSet = array();
if ($this->properties['verboseLevel']) $this->_displayError("Canceled function '{$function}'. The query '{$xPathQuery}' mached {$resultSize} nodes and 'modMatch' is set to XPATH_QUERYHIT_UNIQUE.", __LINE__, __FILE__, FALSE);
}
break;
case XPATH_QUERYHIT_FIRST :
if ($resultSize >1) {
$xPathSet = array($xPathSet[0]);
if ($this->properties['verboseLevel']) $this->_displayError("Only modified first node in function '{$function}' because the query '{$xPathQuery}' mached {$resultSize} nodes and 'modMatch' is set to XPATH_QUERYHIT_FIRST.", __LINE__, __FILE__, FALSE);
}
break;
default: ; // DO NOTHING
}
} while (FALSE);
if ($this->properties['verboseLevel'] >= 2) $this->_displayMessage("'{$xPathQuery}' parameter from '{$function}' returned the following nodes: ".(count($xPathSet)?implode('<br>', $xPathSet):'[none]'), __LINE__, __FILE__);
return $xPathSet;
}
} // END OF CLASS XPath
 
// -----------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------
 
/**************************************************************************************************
// Usage Sample:
// -------------
// Following code will give you an idea how to work with PHP.XPath. It's a working sample
// to help you get started. :o)
// Take the comment tags away and run this file.
**************************************************************************************************/
 
/**
* Produces a short title line.
*/
function _title($title) {
echo "<br><hr><b>" . htmlspecialchars($title) . "</b><hr>\n";
}
 
$self = isSet($_SERVER) ? $_SERVER['PHP_SELF'] : $PHP_SELF;
if (basename($self) == 'XPath.class.php') {
// The sampe source:
$q = '?';
$xmlSource = <<< EOD
<{$q}Process_Instruction test="&copy;&nbsp;All right reserved" {$q}>
<AAA foo="bar"> ,,1,,
..1.. <![CDATA[ bla bla
newLine blo blo ]]>
<BBB foo="bar">
..2..
</BBB>..3..<CC/> ..4..</AAA>
EOD;
// The sample code:
$xmlOptions = array(XML_OPTION_CASE_FOLDING => TRUE, XML_OPTION_SKIP_WHITE => TRUE);
$xPath = new XPath(FALSE, $xmlOptions);
//$xPath->bDebugXmlParse = TRUE;
if (!$xPath->importFromString($xmlSource)) { echo $xPath->getLastError(); exit; }
_title("Following was imported:");
echo $xPath->exportAsHtml();
_title("Get some content");
echo "Last text part in &lt;AAA&gt;: '" . $xPath->wholeText('/AAA[1]', -1) ."'<br>\n";
echo "All the text in &lt;AAA&gt;: '" . $xPath->wholeText('/AAA[1]') ."'<br>\n";
echo "The attibute value in &lt;BBB&gt; using getAttributes('/AAA[1]/BBB[1]', 'FOO'): '" . $xPath->getAttributes('/AAA[1]', 'FOO') ."'<br>\n";
echo "The attibute value in &lt;BBB&gt; using getData('/AAA[1]/@FOO'): '" . $xPath->getData('/AAA[1]/@FOO') ."'<br>\n";
_title("Append some additional XML below /AAA/BBB:");
$xPath->appendChild('/AAA[1]/BBB[1]', '<CCC> Step 1. Append new node </CCC>', $afterText=FALSE);
$xPath->appendChild('/AAA[1]/BBB[1]', '<CCC> Step 2. Append new node </CCC>', $afterText=TRUE);
$xPath->appendChild('/AAA[1]/BBB[1]', '<CCC> Step 3. Append new node </CCC>', $afterText=TRUE);
echo $xPath->exportAsHtml();
_title("Insert some additional XML below <AAA>:");
$xPath->reindexNodeTree();
$xPath->insertChild('/AAA[1]/BBB[1]', '<BB> Step 1. Insert new node </BB>', $shiftRight=TRUE, $afterText=TRUE);
$xPath->insertChild('/AAA[1]/BBB[1]', '<BB> Step 2. Insert new node </BB>', $shiftRight=FALSE, $afterText=TRUE);
$xPath->insertChild('/AAA[1]/BBB[1]', '<BB> Step 3. Insert new node </BB>', $shiftRight=FALSE, $afterText=FALSE);
echo $xPath->exportAsHtml();
 
_title("Replace the last <BB> node with new XML data '&lt;DDD&gt; Replaced last BB &lt;/DDD&gt;':");
$xPath->reindexNodeTree();
$xPath->replaceChild('/AAA[1]/BB[last()]', '<DDD> Replaced last BB </DDD>', $afterText=FALSE);
echo $xPath->exportAsHtml();
_title("Replace second <BB> node with normal text");
$xPath->reindexNodeTree();
$xPath->replaceChildByData('/AAA[1]/BB[2]', '"Some new text"');
echo $xPath->exportAsHtml();
}
 
?>
/gestion/phpsysinfo/distros.ini
0,0 → 1,77
; linux-distros.ini - Defines known linux distros for phpSysInfo.
; http://phpsysinfo.sourceforge.net/
; $Id: distros.ini,v 1.8 2007/03/16 17:06:00 precision Exp $
;
 
[Debian]
Name = "Debian"
Image = "Debian.png"
Files = "/etc/debian_release;/etc/debian_version"
 
[SUSE LINUX]
Image = "Suse.png"
Files = "/etc/SuSE-release;/etc/UnitedLinux-release"
 
[MandrivaLinux]
Image = "Mandrake.png"
Files = "/etc/mandriva-release"
 
[Mandrake]
Image = "Mandrake.png"
Files = "/etc/mandrake-release"
 
[Gentoo]
Image = "Gentoo.png"
Files = "/etc/gentoo-release"
 
[RedHat]
Image = "Redhat.png"
Files = "/etc/redhat-release;/etc/redhat_version"
 
[Fedora]
Image = "Fedora.png"
Files = "/etc/fedora-release"
 
[FedoraCore]
Image = "Fedora.png"
Files = "/etc/fedora-release"
 
[Slackware]
Image = "Slackware.png"
Files = "/etc/slackware-release;/etc/slackware-version"
 
[Trustix]
Image = "Trustix.gif"
Files = "/etc/trustix-release;/etc/trustix-version"
 
[FreeEOS]
Image = "free-eos.png"
Files = "/etc/eos-version"
 
[Arch]
Image = "Arch.gif"
Files = "/etc/arch-release"
 
[Cobalt]
Image = "Cobalt.png"
Files = "/etc/cobalt-release"
 
[LinuxFromScratch]
Image = "lfs.png"
Files = "/etc/lfs-release"
 
[Rubix]
Image = "Rubix.png"
Files = "/etc/rubix-version"
 
[Ubuntu]
Image = "Ubuntu.gif"
Files = "/etc/lsb-release"
 
[PLD]
Image = "PLD.gif"
Files = "/etc/pld-release"
 
[CentOS]
Image = "CentOS.png"
Files = "/etc/redhat-release;/etc/redhat_version"
/gestion/phpsysinfo/images/Arch.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/phpsysinfo/images/unknown.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/phpsysinfo/images/PLD.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/phpsysinfo/images/Fedora.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/phpsysinfo/images/Ubuntu.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/phpsysinfo/images/Trustix.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/phpsysinfo/images/Cobalt.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/phpsysinfo/images/free-eos.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/phpsysinfo/images/Redhat.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/phpsysinfo/images/SunOS.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/phpsysinfo/images/xp.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/phpsysinfo/images/FreeBSD.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/phpsysinfo/images/Slackware.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/phpsysinfo/images/NetBSD.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/phpsysinfo/images/Suse.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/phpsysinfo/images/Mandrake.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/phpsysinfo/images/Debian.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/phpsysinfo/images/Darwin.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/phpsysinfo/images/lfs.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/phpsysinfo/images/index.html
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/gestion/phpsysinfo/images/Rubix.png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/phpsysinfo/images/OpenBSD.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/phpsysinfo/images/Gentoo.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/phpsysinfo/images/CentOS.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/phpsysinfo/ChangeLog
0,0 → 1,4401
2007-03-16 17:07 precision Uriah Welcome (precision at users.sf.net)
 
* README: (c) update
 
2007-03-16 17:06 precision Uriah Welcome (precision at users.sf.net)
 
* distros.ini, images/CentOS.png: adding centos as a distro
 
2007-03-15 08:22 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/lang/fr.php: Bug - [ 1680505 ] FR locale wrong time
display code
 
2007-03-07 20:21 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.WINNT.inc.php: Bug - [ 1674741 ] show_vhostname
not working on Windows
 
2007-03-02 14:05 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* distros.ini: Bug - [ 1671915 ] Distro name on Fedora 6 does not
get recognized
 
2007-02-25 20:50 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: Sparc64 cache for UltraSPARC IIe
CPU's
 
2007-02-25 20:28 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* ChangeLog: release 2.5.3-rc2
 
2007-02-20 19:27 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* README: specify minimum required php version
 
2007-02-20 19:20 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/common_functions.php: Bug - [ 1661960 ] 2.5.3-rc1
 
2007-02-19 19:21 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* tools/: version.tar.gz, versions.sh: script to determine the
minimum required php version, uses the PEAR CompatInfo package
 
2007-02-18 19:11 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* phpsysinfo.dtd, includes/lang/ar_utf8.php, includes/lang/bg.php,
includes/lang/big5.php, includes/lang/br.php,
includes/lang/ca.php, includes/lang/cn.php, includes/lang/cs.php,
includes/lang/ct.php, includes/lang/da.php, includes/lang/de.php,
includes/lang/en.php, includes/lang/es.php, includes/lang/et.php,
includes/lang/eu.php, includes/lang/fi.php, includes/lang/fr.php,
includes/lang/gr.php, includes/lang/he.php, includes/lang/hu.php,
includes/lang/id.php, includes/lang/is.php, includes/lang/it.php,
includes/lang/jp.php, includes/lang/ko.php, includes/lang/lt.php,
includes/lang/lv.php, includes/lang/nl.php, includes/lang/no.php,
includes/lang/pa_utf8.php, includes/lang/pl.php,
includes/lang/pt-br.php, includes/lang/pt.php,
includes/lang/ro.php, includes/lang/ru.php, includes/lang/sk.php,
includes/lang/sr.php, includes/lang/sv.php, includes/lang/tr.php,
includes/lang/tw.php, includes/mb/class.healthd.inc.php,
includes/mb/class.lmsensors.inc.php,
includes/mb/class.mbm5.inc.php, includes/mb/class.mbmon.inc.php,
includes/xml/mbinfo.php: Patch by khali - [ 1662373 ] Do not
display fan div values
 
2007-02-18 19:06 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* images/Slackware.png: Patch by khali - [ 1662374 ] Nicer
slackware icon
 
2007-02-18 19:02 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* config.php.new: Patch by khali - [ 1662367 ] Update the
lm-sensors URL
 
2007-02-18 18:59 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* config.php.new, includes/os/class.HP-UX.inc.php,
includes/os/class.Linux.inc.php, includes/os/class.SunOS.inc.php,
includes/xml/vitals.php: Patch by khali - [ 1662364 ] Display the
virtual host name and address
 
2007-02-16 21:34 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* ChangeLog (tags: REL-2-5-3-RC2): ChangeLog update
 
2007-02-16 21:32 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* README, index.php (utags: REL-2-5-3-RC2): release 2.5.3-rc2
 
2007-02-14 18:00 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* phpsysinfo.dtd (tags: REL-2-5-3-RC2): be valid
 
2007-02-11 15:57 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/class.error.inc.php, includes/system_header.php,
includes/xml/vitals.php, templates/aq/box.tpl,
templates/black/box.tpl, templates/metal/box.tpl (utags:
REL-2-5-3-RC2): html fixes
 
2007-02-08 20:16 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php, includes/system_footer.php (tags: REL-2-5-3-RC2),
includes/xml/filesystems.php (tags: REL-2-5-3-RC2),
includes/xml/hddtemp.php (tags: REL-2-5-3-RC2),
includes/xml/mbinfo.php (tags: REL-2-5-3-RC2),
includes/xml/memory.php (tags: REL-2-5-3-RC2),
includes/xml/network.php (tags: REL-2-5-3-RC2),
includes/xml/vitals.php: wml fixes to be valid
 
2007-02-04 10:55 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* ChangeLog (tags: REL-2-5-3-RC1): ChangeLog update
 
2007-02-04 10:53 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* README, index.php (utags: REL-2-5-3-RC1): release 2.5.3-rc1
 
2007-02-01 17:37 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.parseProgs.inc.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1): [ 1649430 ] Divide by zero error on automount
mount points
 
2007-01-28 09:25 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/mb/class.mbm5.inc.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1): recognize also "," as seperator
 
2007-01-25 20:21 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1): no error if file not exist
 
2007-01-21 13:17 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/mb/class.hddtemp.inc.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1): no error if devicefiles can't be determined
 
2007-01-21 13:03 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/mb/class.hddtemp.inc.php: kernel 2.4 support
 
2007-01-21 12:39 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/common_functions.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1): no stream_get_contents in php4
 
2007-01-21 11:13 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php, includes/mb/class.hddtemp.inc.php,
includes/xml/hardware.php (tags: REL-2-5-3-RC2, REL-2-5-3-RC1),
includes/xml/hddtemp.php (tags: REL-2-5-3-RC1): new way to get
the devices for hddtemp, only 2.6 kernels at the moment, 2.4
follow [ 1464604 ] SCSI hard drives
 
2007-01-21 08:54 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: only split into two fields
 
2007-01-21 08:52 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* distros.ini (tags: REL-2-5-3-RC2, REL-2-5-3-RC1): newer SuSE
Linux detection
 
2007-01-17 22:25 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/common_functions.php: [ 1565936 ] Output from new 'df'
binary not parsed correctly.
 
2007-01-17 21:30 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/mb/class.lmsensors.inc.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1): [ 1551667 ] Multiple header include error when
using lmsensors
 
2006-12-31 10:01 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/: lang/ar_utf8.php (tags: REL-2-5-3-RC2, REL-2-5-3-RC1),
lang/bg.php (tags: REL-2-5-3-RC2, REL-2-5-3-RC1), lang/big5.php
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1), lang/br.php (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1), lang/ca.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1), lang/cn.php (tags: REL-2-5-3-RC2, REL-2-5-3-RC1),
lang/cs.php (tags: REL-2-5-3-RC2, REL-2-5-3-RC1), lang/ct.php
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1), lang/da.php (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1), lang/de.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1), lang/en.php (tags: REL-2-5-3-RC2, REL-2-5-3-RC1),
lang/es.php (tags: REL-2-5-3-RC2, REL-2-5-3-RC1), lang/et.php
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1), lang/eu.php (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1), lang/fi.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1), lang/fr.php (tags: REL-2-5-3-RC2, REL-2-5-3-RC1),
lang/gr.php (tags: REL-2-5-3-RC2, REL-2-5-3-RC1), lang/he.php
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1), lang/hu.php (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1), lang/id.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1), lang/is.php (tags: REL-2-5-3-RC2, REL-2-5-3-RC1),
lang/it.php (tags: REL-2-5-3-RC2, REL-2-5-3-RC1), lang/jp.php
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1), lang/ko.php (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1), lang/lt.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1), lang/lv.php (tags: REL-2-5-3-RC2, REL-2-5-3-RC1),
lang/nl.php (tags: REL-2-5-3-RC2, REL-2-5-3-RC1), lang/no.php
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1), lang/pa_utf8.php (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1), lang/pl.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1), lang/pt-br.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1), lang/pt.php (tags: REL-2-5-3-RC2, REL-2-5-3-RC1),
lang/ro.php (tags: REL-2-5-3-RC2, REL-2-5-3-RC1), lang/ru.php
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1), lang/sk.php (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1), lang/sr.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1), lang/sv.php (tags: REL-2-5-3-RC2, REL-2-5-3-RC1),
lang/tr.php (tags: REL-2-5-3-RC2, REL-2-5-3-RC1), lang/tw.php
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1), xml/hddtemp.php,
xml/mbinfo.php (tags: REL-2-5-3-RC1): [ 1624147 ] wrong degree
sign in temperatures
 
2006-12-31 09:57 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: [ 1623408 ] error if
/proc/scsi/scsi does not exist for Linux
 
2006-12-31 09:45 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: missing var declaration
 
2006-12-18 15:08 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* distros.ini, images/Ubuntu.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1), includes/os/class.Linux.inc.php: "[ 1605229 ]
*FIX* Ubuntu does not get identified properly"
 
2006-12-18 14:54 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: "[ 1598986 ] NSLU2 fixes (Xscale
cpuinfo parser and ide/pci unneeded)"
 
2006-12-13 19:16 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* ChangeLog, README, index.php: release 2.5.2
 
2006-11-26 11:05 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* config.php.new (tags: REL-2-5-3-RC2, REL-2-5-3-RC1),
includes/common_functions.php,
includes/os/class.parseProgs.inc.php: feature request "[ 1588557
] Hiding of certain file system types"
 
2006-11-26 10:15 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/system_footer.php (tags: REL-2-5-3-RC1): var fixed
closes bug "[ 1557229 ] Fix: language selection includes template
names"
 
2006-08-26 11:27 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/: common_functions.php, mb/class.hddtemp.inc.php,
os/class.Linux.inc.php, os/class.parseProgs.inc.php,
xml/filesystems.php (tags: REL-2-5-3-RC1): some fixes if no file
can be read or no program can be executed
 
2006-08-26 10:19 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/mbinfo.php: missing temperature call for temperature
limit
 
2006-08-26 10:15 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.parseProgs.inc.php: fix for '[ 1527673 ] fix:
avoid negative value when space used up.'
 
2006-07-23 07:37 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: missing error check in pci
function
 
2006-07-09 18:55 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* README: hint for submitting bugs
 
2006-07-09 18:50 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* config.php.new, includes/os/class.parseProgs.inc.php: fixes "[
1519472 ] hide mounts not working on freebsd 6.0 and possible
others"
 
2006-07-04 08:24 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.parseProgs.inc.php: code style and fix for "[
1516160 ] Problems between version 2.5.1 and 2.5.2_rc3 on free
bsd"
 
2006-07-03 08:18 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/class.error.inc.php (tags: REL-2-5-3-RC1):
multiline errors are now correctly displayed
 
2006-06-25 11:59 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/system_footer.php: missing space
 
2006-06-25 11:58 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/vitals.php (tags: REL-2-5-3-RC1): missing var
changes
 
2006-06-24 16:00 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/hardware.php: typo
 
2006-06-21 15:27 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* ChangeLog (tags: REL-2-5-2-RC3): Changlog update
 
2006-06-21 15:26 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* tools/GenerateCL.sh (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3): tools update
 
2006-06-21 15:14 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* tools/: GenerateCL.sh, README (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3), debug.php: tools update
 
2006-06-21 15:10 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* tools/MakeCVS.sh: [no log message]
 
2006-06-16 10:30 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php (tags: REL-2-5-2-RC3): return
value is "ERROR" no longer null
 
2006-06-16 10:27 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/hardware.php (tags: REL-2-5-2-RC3): missing var
change
 
2006-06-16 09:02 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/: filesystems.php (tags: REL-2-5-2-RC3),
hardware.php, hddtemp.php (tags: REL-2-5-2-RC3), mbinfo.php
(tags: REL-2-5-2-RC3), memory.php (tags: REL-2-5-3-RC1,
REL-2-5-2-RC3), network.php (tags: REL-2-5-3-RC1, REL-2-5-2-RC3),
vitals.php (tags: REL-2-5-2-RC3): codestyle: header and tabs
 
2006-06-16 09:00 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php (tags: REL-2-5-2-RC3): shorten mbinfo xml function
 
2006-06-16 08:59 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* phpsysinfo.dtd (tags: REL-2-5-3-RC1, REL-2-5-2-RC3): update for
no swap
 
2006-06-16 08:58 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/common_functions.php (tags: REL-2-5-2-RC3): format
function for MHz
 
2006-06-16 07:02 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: return value is "ERROR" no
longer null
 
2006-06-15 22:24 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.WINNT.inc.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3): ok today the bug "[ 1448895 ]
Wrong network tx/rx format" appeared on my machine so that i can
see what it caused, i think it's now fixed in a dirty way, for
detail look in the comment in the network function
 
2006-06-15 18:42 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/class.error.inc.php (tags: REL-2-5-2-RC3),
includes/common_functions.php, includes/indicator.php (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3),
includes/system_footer.php (tags: REL-2-5-2-RC3),
includes/system_header.php (tags: REL-2-5-3-RC1, REL-2-5-2-RC3),
tools/header (tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3):
missing $
 
2006-06-15 18:35 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* tools/header: sample header
 
2006-06-15 18:34 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/: class.error.inc.php, common_functions.php,
indicator.php, system_footer.php, system_header.php: codestyle:
header and tabs
 
2006-06-14 16:36 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Darwin.inc.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3): another cpu entry
 
2006-06-14 08:37 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/common_functions.php: wrong place for return
 
2006-06-14 08:32 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/common_functions.php: return ERROR at the right places
this finally closes "[ 1448129 ] Mac OS X Jaguar regressions with
2.5" hopefully
 
2006-06-13 18:31 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.BSD.common.inc.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3): quick hack for not reading
boot.msg on Darwin systems
 
2006-06-13 18:22 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Darwin.inc.php: 10 values are needed
 
2006-06-13 18:16 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Darwin.inc.php: init devswap in array
 
2006-06-13 18:09 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/common_functions.php: return error if programm failes to
execute
 
2006-06-13 18:04 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Darwin.inc.php: fix some udef offsets
 
2006-06-13 17:02 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: undef var fix
 
2006-06-13 16:58 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Darwin.inc.php: use standard filesystem
function fixes "[ 1448431 ] Double % on disk space"
 
2006-06-11 19:37 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* README (tags: REL-2-5-2-RC3): 80 chars width add some notes for
mbm5 remove security notice, fixed long time ago
 
2006-06-11 19:34 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/common_functions.php: tabs for better reading show php
notices only if showerrors is true replace some more chars in xml
(german umlauts)
 
2006-06-11 17:58 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/mb/class.mbm5.inc.php (tags: REL-2-5-2-RC3): shorten the
code and read the values only onse, still need to add logic if
there are more values stored in the log-file, now all has fixed
values
 
2006-06-11 11:09 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.WINNT.inc.php: avoid message if no drivetype is
set
 
2006-06-11 10:09 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php: we need another rc befor release
 
2006-06-11 09:57 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/: class.HP-UX.inc.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3), class.WINNT.inc.php: forgot to
change vars
 
2006-06-09 17:17 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/: class.error.inc.php, os/class.Darwin.inc.php: add
warnings in an extra function
 
2006-06-05 20:18 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* distros.ini (tags: REL-2-5-2-RC3): add PLD distro
 
2006-06-05 20:16 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* images/PLD.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3): add PLD image
 
2006-06-05 13:14 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/: os/class.BSD.common.inc.php, os/class.Darwin.inc.php,
os/class.HP-UX.inc.php, os/class.Linux.inc.php,
os/class.SunOS.inc.php (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3), os/class.WINNT.inc.php, xml/memory.php: support
for having no swap devices fixes hopefully "[ 1500265 ] Errors
(div by 0 & hdr modify)"
 
2006-06-05 12:24 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* phpsysinfo.dtd, includes/os/class.Linux.inc.php,
includes/xml/hardware.php: included FR "[ 1472013 ] Extended
Sensors"
 
2006-06-05 11:48 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* config.php.new (tags: REL-2-5-2-RC3), index.php,
includes/common_functions.php, includes/lang/ar_utf8.php (tags:
REL-2-5-2-RC3), includes/lang/bg.php (tags: REL-2-5-2-RC3),
includes/lang/big5.php (tags: REL-2-5-2-RC3),
includes/lang/br.php (tags: REL-2-5-2-RC3), includes/lang/ca.php
(tags: REL-2-5-2-RC3), includes/lang/cn.php (tags:
REL-2-5-2-RC3), includes/lang/cs.php (tags: REL-2-5-2-RC3),
includes/lang/ct.php (tags: REL-2-5-2-RC3), includes/lang/da.php
(tags: REL-2-5-2-RC3), includes/lang/de.php (tags:
REL-2-5-2-RC3), includes/lang/en.php (tags: REL-2-5-2-RC3),
includes/lang/es.php (tags: REL-2-5-2-RC3), includes/lang/et.php
(tags: REL-2-5-2-RC3), includes/lang/eu.php (tags:
REL-2-5-2-RC3), includes/lang/fi.php (tags: REL-2-5-2-RC3),
includes/lang/fr.php (tags: REL-2-5-2-RC3), includes/lang/gr.php
(tags: REL-2-5-2-RC3), includes/lang/he.php (tags:
REL-2-5-2-RC3), includes/lang/hu.php (tags: REL-2-5-2-RC3),
includes/lang/id.php (tags: REL-2-5-2-RC3), includes/lang/is.php
(tags: REL-2-5-2-RC3), includes/lang/it.php (tags:
REL-2-5-2-RC3), includes/lang/jp.php (tags: REL-2-5-2-RC3),
includes/lang/ko.php (tags: REL-2-5-2-RC3), includes/lang/lt.php
(tags: REL-2-5-2-RC3), includes/lang/lv.php (tags:
REL-2-5-2-RC3), includes/lang/nl.php (tags: REL-2-5-2-RC3),
includes/lang/no.php (tags: REL-2-5-2-RC3),
includes/lang/pa_utf8.php (tags: REL-2-5-2-RC3),
includes/lang/pl.php (tags: REL-2-5-2-RC3),
includes/lang/pt-br.php (tags: REL-2-5-2-RC3),
includes/lang/pt.php (tags: REL-2-5-2-RC3), includes/lang/ro.php
(tags: REL-2-5-2-RC3), includes/lang/ru.php (tags:
REL-2-5-2-RC3), includes/lang/sk.php (tags: REL-2-5-2-RC3),
includes/lang/sr.php (tags: REL-2-5-2-RC3), includes/lang/sv.php
(tags: REL-2-5-2-RC3), includes/lang/tr.php (tags:
REL-2-5-2-RC3), includes/lang/tw.php (tags: REL-2-5-2-RC3),
includes/xml/hddtemp.php, includes/xml/mbinfo.php: fixes "[
1500615 ] Temperature display in Fahrenheit (vs. Celcius)"
configurable through an option in config.php
 
2006-06-04 16:55 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.WINNT.inc.php: fixes "[ 1497748 ] uptime
displays wrong in windows environments"
 
2006-06-04 16:38 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/filesystems.php: fixes "[ 1494030 ] Show Mount Point
Error"
 
2006-05-20 17:01 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/mb/class.hwsensors.inc.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3): fixed "[ 1491291 ] Undefined
offset errors with class.hwsensors.inc.php"
 
2006-05-20 16:45 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* tools/langs.php (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3): simple script for showing missing language
variables in language files
 
2006-05-20 16:41 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/lang/: br.php, ca.php, cn.php, cs.php, ct.php, da.php,
de.php, es.php, et.php, fi.php, fr.php, hu.php, is.php, it.php,
jp.php, ko.php, lt.php, nl.php, no.php, pa_utf8.php, pl.php,
ro.php, sk.php, sr.php, sv.php, tw.php: added missing
translation-variables
 
2006-05-03 16:53 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/lang/fr.php: fixes "[ 1481143 ] Undefined index:
cpuspeed in fr language"
 
2006-04-23 15:10 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* ChangeLog: update ChangeLog
 
2006-04-23 15:09 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* README: phpSysInfo 2.5.2-rc2
 
2006-04-23 15:08 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* tools/: GenerateCL.sh, GenerateChangeLog.sh, MakeRelease.sh
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3): update some
tools
 
2006-04-22 18:01 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* phpsysinfo.dtd: Mhz -> Busspeed
 
2006-04-22 16:47 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.WINNT.inc.php: wrong usage of an array as
string
 
2006-04-22 16:11 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.parseProgs.inc.php (tags: REL-2-5-2-RC3): use
last percent in a row for inodes
 
2006-04-22 15:55 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.parseProgs.inc.php: if there was only one space
between the numbers everything fail
 
2006-04-22 14:35 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* config.php.new, phpsysinfo.dtd,
includes/os/class.BSD.common.inc.php,
includes/os/class.Linux.inc.php,
includes/os/class.parseProgs.inc.php,
includes/xml/filesystems.php: rewritten the filesystem parser
includes now also feature request "[ 672548 ] Add a check for
inodes"
 
2006-04-18 17:46 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.OpenBSD.inc.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3): call constructor
 
2006-04-18 16:57 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/: class.BSD.common.inc.php, class.NetBSD.inc.php
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3): use
parse_filesystem function
 
2006-04-18 16:22 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/: class.BSD.common.inc.php, class.FreeBSD.inc.php
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3): use
filesystem parser and removed duplicated code
 
2006-04-18 16:03 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/: class.BSD.common.inc.php, class.Linux.inc.php,
class.parseProgs.inc.php: include filesystem parser in parser
class and rename this class
 
2006-04-17 15:44 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: remove lspci code, include
parser class
 
2006-04-17 15:24 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php, includes/os/class.BSD.common.inc.php: i hate logic,
update version
 
2006-04-17 14:55 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/: class.BSD.common.inc.php, class.parseProgs.inc.php:
add pciconf to parser class
 
2006-04-17 14:09 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.OpenBSD.inc.php: no need for extra pci function
 
2006-04-17 13:33 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.NetBSD.inc.php: show ide devices and capacity
 
2006-04-17 13:12 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/: class.BSD.common.inc.php, class.FreeBSD.inc.php:
pass by reference fix
 
2006-04-17 13:10 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/: class.BSD.common.inc.php, class.NetBSD.inc.php,
class.parseProgs.inc.php: corrected cpu regexp, try lspci for pci
devices, extra class for parsing command output, because should
be nearly the same across the machines
 
2006-04-17 13:03 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/common_functions.php: i should read function definition
better
 
2006-04-17 11:40 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* images/NetBSD.png (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3): updated logo
 
2006-04-15 22:05 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.BSD.common.inc.php: respect different outputs
from mount
 
2006-04-15 21:42 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/: class.BSD.common.inc.php, class.Darwin.inc.php,
class.FreeBSD.inc.php, class.NetBSD.inc.php,
class.OpenBSD.inc.php: use dynamic regexp for cpu percent
 
2006-04-14 18:12 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/: class.BSD.common.inc.php, class.FreeBSD.inc.php:
extend the memory informaion like on linux based systems, i hope
these values are the correct one
 
2006-04-14 16:53 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.BSD.common.inc.php: swap devices now available
for BSD
 
2006-04-14 16:35 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.BSD.common.inc.php: fixes bug "[ 1444332 ]
probs with php4 / Freebsd 6"
 
2006-04-14 16:29 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/common_functions.php:
undef var fix
 
2006-04-14 13:57 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: change order in ide detection
code
 
2006-04-14 13:11 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/: common_functions.php, os/class.Linux.inc.php: fixes
bug "[ 1455963 ] use lsscsi first, then parse /proc/scsi/scsi on
Linux" also lsusb is now tried first to get usb devices and one
small fix for undefined var in cpu detection code
 
2006-03-21 17:14 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.WINNT.inc.php: missing ""
 
2006-03-19 08:53 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* config.php.new, index.php: add option for disable error output if
errors are exist
 
2006-03-19 08:38 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: readd -P for df
 
2006-03-18 19:53 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/indicator.php: [no log message]
 
2006-03-18 09:42 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/: common_functions.php, indicator.php: fixes "[ 1049828
] create_bargraph() with gradient" to enable the gradient
bargraph you need to change the function names in
common_functions.php (create_bargraph => create_bargraph_old AND
create_bargraph_grad => create_bargraph), also you need gd
support for php
 
2006-03-12 13:11 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* sample/: df1.txt, mount1.txt (utags: REL-2-5-2-RC3,
REL-2-5-3-RC1, REL-2-5-3-RC2): [no log message]
 
2006-03-12 13:09 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: devices not correctly shown,
fixes "[ 1441204 ] more then 10 Filesystems"
 
2006-03-10 21:57 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/lang/de.php: better translation
 
2006-03-10 21:53 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* templates/bulix/form.tpl (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3): make bulix theme look like others
 
2006-03-08 17:54 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* config.php.new, includes/common_functions.php: fixes "[ 1444899 ]
cannot call external program in unusual path" new variable in
config.php to include additional paths where to search for
programs
 
2006-03-08 17:16 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/lang/de.php: update language file
 
2006-03-04 10:17 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* README: plattform specific issue for windows systems with iis
added
 
2006-03-04 10:03 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: silence error for capacity
reporting
 
2006-02-27 21:01 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/class.error.inc.php: [no log message]
 
2006-02-27 17:33 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* ChangeLog, README: 2.5.2-rc1 release
 
2006-02-27 17:15 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/class.error.inc.php: table head and foot got lost
 
2006-02-27 17:14 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php: avoid abort when config.php doesn't exist
 
2006-02-13 21:00 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* distros.ini: typo "[ 1430463 ] distro LFS wrong icon filename"
 
2006-02-11 17:55 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/: class.Darwin.inc.php, class.SunOS.inc.php: instead
of using echo to print the message of incompletness use the WARN
error message, doesn't break xml output
 
2006-02-11 17:53 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/class.error.inc.php: print special error message if
command is "WARN"
 
2006-02-11 17:52 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* templates/: aq/box.tpl, black/box.tpl, metal/box.tpl (utags:
REL-2-5-2-RC3, REL-2-5-3-RC1): title and content shouldn't be on
the same line
 
2006-02-11 17:31 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php, includes/common_functions.php,
includes/os/class.BSD.common.inc.php,
includes/os/class.HP-UX.inc.php, includes/os/class.Linux.inc.php:
remove fileoperation from class files, now we have two functions
which do that, they also now support the new error reporting
style reorder commands in index.php, e.g. we check first if we
support os and than for needed modules and so on comment out
phpgroupware code
 
2006-02-11 14:15 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php, includes/class.error.inc.php,
includes/common_functions.php: first step in simplier error
detection and output
 
2006-02-11 12:53 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Darwin.inc.php: change physmem to memsize like
mentioned at bug "[ 1068499 ] amount of memory is wrong value."
 
2006-02-11 12:48 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Darwin.inc.php: proper detection for dual g4
and g5
 
2006-02-11 12:39 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: add detction code for IXP42x
Processor - "[ 1414266 ] CPU Info for NSLU2 (Intel IXP420)
266/133MHz"
 
2006-02-11 11:20 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/lang/fr.php: updated translation "[ 1428270 ] french
translation"
 
2006-02-07 17:08 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/: class.HP-UX.inc.php, class.Linux.inc.php: add
missing fclose()
 
2006-02-07 16:55 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/lang/et.php: Updated Estonian language file with patch
from [ 1425887 ]
 
2006-01-30 19:38 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.WINNT.inc.php: Uptime fix (has ignored gmt
offset) win 2000 pro can't show logged in users, perhaps
everytime returning 1 instead of N.A. SCSI devices weren't
displayed, wrong comparison
 
2006-01-30 18:01 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.WINNT.inc.php: show users for Win2000 other way
will not work on a Pro machine
 
2006-01-25 19:26 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/mb/class.lmsensors.inc.php (tags: REL-2-5-2-RC3): fixes
bug "[ 1413788 ] too big graphs", maximum value for temps we
can't figure out set to 75
 
2006-01-21 09:30 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php, includes/system_footer.php: show time page takes to
generate
 
2006-01-20 21:18 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/mb/class.hddtemp.inc.php (tags: REL-2-5-2-RC3): don't
put devices with ERR in xml, happens when disconnect a device
 
2006-01-20 19:12 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/: os/class.BSD.common.inc.php, os/class.Linux.inc.php,
os/class.SunOS.inc.php, xml/filesystems.php: don't put % in the
xml
 
2006-01-15 19:03 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.WINNT.inc.php: php 5 fix, and ip_addr fix
 
2006-01-15 17:17 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/hardware.php: remove duplicated lines
 
2006-01-14 22:41 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/: common_functions.php, xml/hardware.php: don't show
duplicated lines in pci device listing
 
2006-01-14 18:49 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/common_functions.php: undefined variable fix
 
2006-01-14 18:40 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.WINNT.inc.php: we now use another way for
getting the required informations with wmi
 
2006-01-08 12:25 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: remove addr from pci info, when
running lspci
 
2006-01-08 12:16 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/hardware.php: nicer output
 
2006-01-08 12:02 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* images/Solaris.png, includes/os/class.SunOS.inc.php: fixes bug "[
1396143 ] (CVS) Incorrect distroicon function in solaris", for
details look at the description in bug report
 
2006-01-08 11:57 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/common_functions.php: fixes bug "[ 1396121 ] (CVS)
untrimmed output of execute program" and also the empty line in
the pci device section
 
2006-01-02 18:48 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/common_functions.php: this works
 
2006-01-01 15:38 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php, includes/common_functions.php: replace some special
chars like (R) and (C) in xml to be valid, fixes "[ 1385450 ]
XPath error on USB device"
 
2005-12-31 17:25 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php, includes/common_functions.php,
includes/system_footer.php, includes/lang/ar_utf8.php,
includes/lang/bg.php, includes/lang/big5.php,
includes/lang/br.php, includes/lang/ca.php, includes/lang/cn.php,
includes/lang/cs.php, includes/lang/ct.php, includes/lang/da.php,
includes/lang/de.php, includes/lang/en.php, includes/lang/es.php,
includes/lang/et.php, includes/lang/eu.php, includes/lang/fi.php,
includes/lang/fr.php, includes/lang/gr.php, includes/lang/he.php,
includes/lang/hu.php, includes/lang/id.php, includes/lang/is.php,
includes/lang/it.php, includes/lang/jp.php, includes/lang/ko.php,
includes/lang/lt.php, includes/lang/lv.php, includes/lang/nl.php,
includes/lang/no.php, includes/lang/pl.php,
includes/lang/pt-br.php, includes/lang/pt.php,
includes/lang/ro.php, includes/lang/ru.php, includes/lang/sk.php,
includes/lang/sr.php, includes/lang/sv.php, includes/lang/tr.php,
includes/lang/tw.php, includes/xml/filesystems.php,
includes/xml/hddtemp.php, includes/xml/mbinfo.php,
includes/xml/memory.php, includes/xml/network.php,
includes/xml/vitals.php: include support for wml - may be not
complete, but it's working here closes feature request "[ 678924
] WAP info"
 
2005-12-31 11:23 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php, includes/common_functions.php, templates/aq/form.tpl
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3),
templates/black/form.tpl (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3), templates/blue/form.tpl (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3), templates/bulix/form.tpl,
templates/classic/form.tpl (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3), templates/kde/form.tpl (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3), templates/metal/form.tpl (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3),
templates/orange/form.tpl (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3), templates/typo3/form.tpl (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3), templates/windows_classic/form.tpl
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3),
templates/wintendoxp/form.tpl (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3): show an error box if a program can
be executed, but only prints an error, e.g. permissionn denied or
something like this
 
2005-12-31 09:59 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* distros.ini: arch must be arch and not gentoo, how did this
happen
 
2005-12-22 16:54 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.SunOS.inc.php: remove bogomips
 
2005-12-22 16:46 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* images/Solaris.png, includes/os/class.SunOS.inc.php: another
image for Solaris memory fix both from bug report "[ 1387529 ]
Memory info wrong for Solaris"
 
2005-12-21 08:01 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* images/SunOS.png (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3), includes/os/class.SunOS.inc.php: Icon for SunOS
from "robshep"
 
2005-12-21 07:58 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.SunOS.inc.php: patch for load on Solaris from
"robshep"
 
2005-12-16 05:12 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: remove debugging code
 
2005-12-16 05:11 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/: class.BSD.common.inc.php, class.Linux.inc.php: mask
$ sign in mounts
 
2005-12-15 08:35 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* ChangeLog, README, index.php: 2.5.1 release
 
2005-12-10 15:58 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php: little spped up the creation
 
2005-12-10 15:54 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php, includes/common_functions.php,
includes/system_header.php, includes/xml/filesystems.php,
includes/xml/hardware.php, includes/xml/hddtemp.php,
includes/xml/mbinfo.php, includes/xml/memory.php,
includes/xml/network.php, includes/xml/vitals.php,
templates/aq/box.tpl, templates/black/box.tpl,
templates/blue/box.tpl (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3), templates/bulix/box.tpl (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3), templates/classic/box.tpl (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3),
templates/kde/box.tpl (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3), templates/metal/box.tpl, templates/orange/box.tpl
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3),
templates/typo3/box.tpl (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3), templates/windows_classic/box.tpl (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3),
templates/wintendoxp/box.tpl (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3): huge update for supporting rtl-languages should
close: "[ 1364219 ] Fix for bug 1039460 ?" "[ 1039460 ]
chareset=utf-8 dir=rtl breaks templates"
 
2005-12-10 13:09 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* templates/: aq/box.tpl, black/box.tpl, kde/box.tpl,
metal/box.tpl, windows_classic/box.tpl, wintendoxp/box.tpl: html
code fixes to be HTML 4.01 Transitional compatible, verified at
validator.w3.org
 
2005-12-10 12:30 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/system_footer.php: fixes bug "[ 1377012 ] Correcting a
html "error"."
 
2005-12-10 09:08 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/mb/class.mbm5.inc.php: fixes "[ 1377470 ] error in file
"\includes\mb\class.mbm5.inc.php on line 27""
 
2005-12-09 19:30 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.BSD.common.inc.php:
add ability to read pci devices from "pciconf -lv", if this
doesn't work we fall back to old way
 
2005-12-08 20:18 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.BSD.common.inc.php:
loadbar now works also with BSD systems fixes bug "[ 1376395 ]
$loadbar not working"
 
2005-12-08 19:59 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.BSD.common.inc.php:
command must be df -k and not df -kP for BSD systems
 
2005-12-08 19:54 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php:
we need the pcre extension
 
2005-12-07 16:04 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/filesystems.php: overall size was wrong calculated
for WINNT systems, here we must use the MountPoint for allready
counted Partitions
 
2005-12-07 15:47 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.WINNT.inc.php: mhz must be cpuspeed in array
and busspeed has it's own position in the array
 
2005-12-07 15:36 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.WINNT.inc.php: read hostname from wmi
 
2005-12-07 15:07 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/common_functions.php: fixes bug "[ 1375301 ] fstype is
CDFS under Windows not iso9660"
 
2005-12-07 15:02 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/lang/: ar_utf8.php, bg.php, big5.php, br.php, ca.php,
cn.php, cs.php, ct.php, da.php, de.php, en.php, es.php, et.php,
eu.php, fi.php, fr.php, gr.php, he.php, hu.php, id.php, is.php,
it.php, ko.php, lv.php, nl.php, no.php, pa_utf8.php, pt-br.php,
pt.php, ro.php, ru.php, sk.php, sr.php, sv.php, tr.php, tw.php:
fix bug "[ 1375274 ] strftime under windows has no %r %R"
 
2005-12-07 05:09 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.SunOS.inc.php: fixed bug "[ 1374759 ] Netword
info wrong for Solaris" with patch included in bug report
 
2005-12-06 16:04 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* ChangeLog, README, index.php: 2.5 release
 
2005-12-06 15:58 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: fixed bug "[ 1082407 ] IDE HDDs
Capacity reports "0" on FC3", but i can not believe that sys has
the ide and proc not
 
2005-12-06 15:49 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php: check if file exist before include
 
2005-12-06 05:00 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php: security fix
 
2005-12-03 11:12 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.BSD.common.inc.php: wrong regex
 
2005-12-02 22:19 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.BSD.common.inc.php: fixes bug "[ 1369246 ]
Extra slash on "Mount"" it's now the same filesystem() code linke
on Linux class
 
2005-12-02 14:14 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.WINNT.inc.php: fix not showing cpu usage (wrong
position in array) add value for cpu bargraph
 
2005-12-02 14:03 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/: os/class.Linux.inc.php, xml/vitals.php: load averages
change
 
2005-12-02 13:57 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php: undefined variable
 
2005-11-30 05:14 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* config.php.new: fix for bug "[ 1369688 ] little issue in the
configuration file for hddtemp" changed style of comments
 
2005-11-28 19:04 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* ChangeLog: Changelog update for 2.5-RC2
 
2005-11-28 15:52 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.OpenBSD.inc.php: missing dot causes error,
fixes bug "[ 1368270 ] Error in OpenBSD 3.7"
 
2005-11-27 20:39 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* sample/lmsensors5.txt (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3): another "nice" output
 
2005-11-27 20:38 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/mb/class.lmsensors.inc.php: corrected regex
 
2005-11-27 20:19 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/vitals.php: set maximum value for cpu bargraph
 
2005-11-27 20:17 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: rewrite, because of bug "[
1367290 ] mount point show 11515% usage."
 
2005-11-27 17:30 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php, includes/xml/filesystems.php,
includes/xml/hardware.php, includes/xml/hddtemp.php,
includes/xml/mbinfo.php, includes/xml/memory.php,
includes/xml/network.php, includes/xml/vitals.php: htmlentities
causes some strange xml-errors, htmlentities are good enough for
our xml
 
2005-11-27 17:17 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* sample/lmsensors4.txt (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3): another test output
 
2005-11-27 13:18 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/mb/class.lmsensors.inc.php: we need these lines, the got
lost at last commit
 
2005-11-26 21:44 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/: common_functions.php, xml/filesystems.php,
xml/hddtemp.php, xml/mbinfo.php, xml/memory.php: restructure the
bargraph output
 
2005-11-26 21:41 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/mb/class.lmsensors.inc.php: remove ununsed var $alarm
fix for chipsets that have not the full vars we need, e.g.
"fscpos-i2c-0-73"
 
2005-11-26 15:35 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php: reflect version change, and we need a second rc, too
many changes since last rc
 
2005-11-26 15:19 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/hddtemp.php: write headline if no sensor_program is
available
 
2005-11-26 13:20 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/: filesystems.php, hardware.php, memory.php,
network.php, vitals.php: tables should be 100% to get a nice
output
 
2005-11-26 13:20 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/common_functions.php: a no breaking space is required,
else sometimes byte sizewraps to a new line and this looks bad
 
2005-11-26 13:01 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/class.Template.inc.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3): Template class update version 1.6
from egroupware from folder ./setup/inc/class.Template.inc.php
 
2005-11-26 11:39 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php: changed output for temperatures with help from Timo
van Roermund
 
2005-11-26 10:45 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php: unused value $percent
 
2005-11-25 21:55 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/mbinfo.php: missing <tr>
 
2005-11-25 21:27 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/common_functions.php: yellow only for above 75% and not
20
 
2005-11-24 18:51 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/hardware.php: no extra encoding needed
 
2005-11-24 17:10 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/: filesystems.php, hardware.php, memory.php,
vitals.php: missing changes for last commit at XPath
 
2005-11-24 17:05 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* phpsysinfo.dtd, includes/system_header.php,
includes/xml/filesystems.php, includes/xml/hardware.php,
includes/xml/memory.php: DTD update to reflect the latest changes
and privious missing declarations, need some more tweeking
 
2005-11-23 17:09 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/lang/ar_utf8.php: missing $text['gen_time']
 
2005-11-23 17:08 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/lang/ar_utf8.php: missing $text['locale']
 
2005-11-23 17:03 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: undefined variable
 
2005-11-23 16:58 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/system_header.php: undefined variable
 
2005-11-23 16:54 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/: hardware.php, vitals.php: undefined variable
 
2005-11-23 05:05 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php: wrong varname
 
2005-11-22 16:15 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/vitals.php: typo
 
2005-11-22 16:14 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* config.php.new: missing entry and description in config.php.new
for last commit
 
2005-11-22 16:08 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php, includes/common_functions.php,
includes/system_footer.php, includes/system_header.php,
includes/os/class.Linux.inc.php, includes/xml/vitals.php,
templates/aq/box.tpl, templates/black/box.tpl,
templates/kde/box.tpl, templates/metal/box.tpl,
templates/windows_classic/box.tpl: fix for including page in
other scripts and nothing will work any longer (extra config
value $webpath)
 
2005-11-22 15:08 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/: mb/class.mbmon.inc.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3), xml/mbinfo.php: fix for "[ 1195024
] Ignore not connected temperature sensors"
 
2005-11-22 14:59 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: error message for all FC
systems, where we can't read /proc/net/dev, because of SELinux
 
2005-11-22 14:30 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* distros.ini, images/Cobalt.gif, images/Cobalt.png (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3), images/Darwin.gif,
images/Darwin.png (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3), images/Debian.gif, images/Debian.png (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3), images/Fedora.gif,
images/Fedora.png (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3), images/FreeBSD.gif, images/FreeBSD.png (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3), images/Gentoo.gif,
images/Gentoo.png (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3), images/Mandrake.gif, images/Mandrake.png (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3), images/NetBSD.gif,
images/NetBSD.png, images/OpenBSD.gif, images/OpenBSD.png (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3), images/Redhat.gif,
images/Redhat.png (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3), images/Rubix.png (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3), images/Slackware.gif,
images/Slackware.png (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3), images/Suse.gif, images/Suse.png (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3),
images/free-eos.gif, images/free-eos.png (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3), images/lfs.gif, images/lfs.png
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3),
images/unknown.png (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3), includes/os/class.Darwin.inc.php,
includes/os/class.FreeBSD.inc.php,
includes/os/class.HP-UX.inc.php, includes/os/class.Linux.inc.php,
includes/os/class.NetBSD.inc.php,
includes/os/class.OpenBSD.inc.php,
includes/os/class.SunOS.inc.php: included patch "[ 1363677 ]
Linux Distro INI Definitions file" for simpler distro-icon
management, also convert some icons to png format
 
2005-11-21 15:39 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php: set the default template, if the one which is stored
in the cookie no longer exists
 
2005-11-20 13:49 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* ChangeLog, tools/GenerateCL.sh, tools/cvs2cl.pl (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3): big changelog
update
 
2005-11-20 13:21 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/vitals.php: round cpuload
 
2005-11-20 12:54 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* config.php.new, includes/os/class.BSD.common.inc.php,
includes/os/class.HP-UX.inc.php, includes/os/class.Linux.inc.php,
includes/os/class.SunOS.inc.php, includes/os/class.WINNT.inc.php,
includes/xml/vitals.php: included feature request "[ 1252617 ]
CPU Time/usage"
 
2005-11-20 11:29 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/lang/pa_utf8.php: new translation from feature request
"[ 1214326 ] New Translation adding"
 
2005-11-20 11:27 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/hardware.php: another xml-destroyer bug, if GB or kb
is translated
 
2005-11-20 11:14 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/common_functions.php,
templates/windows_classic/images/yellowbar_left.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3),
templates/windows_classic/images/yellowbar_middle.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3),
templates/windows_classic/images/yellowbar_right.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3): feature request "[
620192 ] Color indicators in graph"
 
bars will show in a third color if there are images present like
"yellowbar_*.gif" values can be changed in common_functions.php
at which these colors should appear default: red > 90%, yellow >
75%, else green
 
2005-11-20 10:43 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* images/lfs.gif, includes/os/class.Linux.inc.php: add detection
for Linux-from-Scratch
 
2005-11-20 10:13 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.WINNT.inc.php: more network informations,
included patch "[ 1234690 ] More network information on
WindowsXP"
 
2005-11-20 09:56 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* config.php.new, index.php, includes/mb/class.hddtemp.inc.php,
includes/xml/hddtemp.php: read hddtemp values from deamon or
execute hddtemp (fixed with help of Timo van Roermund)
 
2005-11-19 23:41 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: simplify sparc cache detection
code, also check before open a file exists
 
2005-11-19 23:33 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: simplify usb detection
 
2005-11-19 23:23 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/hardware.php: undefined var fix exclude SBUS
information, we have no output for this
 
2005-11-19 23:21 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/filesystems.php: unneeded calculation of hdd sums in
xml function undefined var fix
 
2005-11-19 23:09 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: there was a serious error in the
detection code, if sizes are seperated by one only space, hope
this fixes it
 
2005-11-19 21:59 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: extra distribution information
added (specially for Debian, which got lost)
 
2005-11-19 21:43 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/: hddtemp.php, mbinfo.php: made bars smaller (same
factor like memory bars), perhaps set in config file
 
2005-11-19 21:39 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/hardware.php: remove space after capacity text
 
2005-11-19 18:36 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* config.php.new, index.php, includes/mb/class.hddtemp.inc.php,
includes/xml/hardware.php, includes/xml/hddtemp.php,
includes/xml/mbinfo.php: added support for hddtemp this closes "[
1035068 ] hddtemp support"
 
2005-11-19 17:11 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php: security fixes from debian
 
2005-11-19 16:00 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.BSD.common.inc.php: included patch from "[
1334110 ] Support for harddisks above 'ad9' on (Free)BSD"
 
2005-11-19 15:56 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* config.php.new, includes/common_functions.php,
includes/os/class.BSD.common.inc.php,
includes/os/class.Darwin.inc.php,
includes/os/class.HP-UX.inc.php, includes/os/class.Linux.inc.php,
includes/os/class.SunOS.inc.php, includes/os/class.WINNT.inc.php:
support for hiding specific mounts patch from here "[ 1214480 ]
Support for hiding specific mounts" and closes also "[ 979229 ]
Support for hiding specific mounts"
 
2005-11-19 15:11 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/filesystems.php: don't count mountpoints twice or
more fixes "[ 1123357 ] the totals size for hd"
 
2005-11-19 14:42 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/: os/class.Linux.inc.php, xml/memory.php: if more than 1
swapdevice, show the divices in output with the stats of each own
fixes "[ 964630 ] 2 swap partition problem"
 
2005-11-19 14:08 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/: system_header.php, lang/ar_utf8.php, lang/bg.php,
lang/big5.php, lang/br.php, lang/ca.php, lang/cn.php,
lang/cs.php, lang/ct.php, lang/da.php, lang/de.php, lang/en.php,
lang/es.php, lang/et.php, lang/eu.php, lang/fi.php, lang/fr.php,
lang/gr.php, lang/he.php, lang/hu.php, lang/id.php, lang/is.php,
lang/it.php, lang/jp.php, lang/ko.php, lang/lt.php, lang/lv.php,
lang/nl.php, lang/no.php, lang/pl.php, lang/pt-br.php,
lang/pt.php, lang/ro.php, lang/ru.php, lang/sk.php, lang/sr.php,
lang/sv.php, lang/tr.php, lang/tw.php, os/class.Linux.inc.php,
xml/memory.php: split memory information (this time only for
linux) this closes: "[ 1297967 ] memory usage includes cache...
bad idea?" "[ 1065909 ] split memory usage information" "[
1220004 ] Ignore cached memory" "[ 616434 ] More Memory Values"
and now $text['locale'] is used for setting LC_ALL instead of
LC_TIME (numbers have now correct dots and commas)
 
2005-11-19 12:32 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/common_functions.php,
templates/kde/images/nobar_left.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3),
templates/windows_classic/images/nobar_left.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3),
templates/windows_classic/images/nobar_middle.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3),
templates/windows_classic/images/nobar_right.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3),
templates/wintendoxp/images/nobar_left.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3),
templates/wintendoxp/images/nobar_middle.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3),
templates/wintendoxp/images/nobar_right.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3): included patch from "[ 1017212 ]
create bar" if there are files called "nobar_*.gif" in the
templates dir, a full bar is shown
 
2005-11-18 18:05 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: don't show the devices
serialnumber
 
2005-11-18 17:52 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* config.php.new, includes/os/class.Linux.inc.php,
includes/xml/filesystems.php: included feature suggested here "[
1070565 ] Bind mount management; some cosmetics" and also by
gentoo if showing bind-mounts they dont't increase the overall
size, if disable these mounts not shown controlled by an option
in config.php
 
2005-11-18 17:16 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/: filesystems.php, hardware.php, mbinfo.php,
memory.php, network.php, vitals.php: now all strings are encoded
in the xml ("[ 1075222 ] XML "&" problems"), not everywhere
necassary, but now it should be safe
 
2005-11-18 16:59 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: include the patch from gentoo
for sparc
 
2005-11-18 16:55 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/hardware.php: fixes bug "[ 1072981 ] XML Parsing
error", if there are some characters in the device name which
breaks xml
 
2005-11-18 16:50 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/: os/class.BSD.common.inc.php, os/class.Linux.inc.php,
xml/filesystems.php: this fixes bugs: "[ 619173 ] broken
filesystem() code" "[ 1001681 ] can't handle whitespaces" also
convert specialchars in devicename and mountpoint to be html
conform
 
2005-11-18 15:46 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/xml/hardware.php: never, really never store language
specific words in an xml document (if there is no CDATA section)
 
2005-11-18 15:11 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php: security fix for phpgroupware
 
2005-11-17 19:55 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php, includes/os/class.Darwin.inc.php,
includes/os/class.FreeBSD.inc.php,
includes/os/class.NetBSD.inc.php,
includes/os/class.OpenBSD.inc.php: all require() changed to
require_once() and they include now the APP_ROOT, for using
phpsysinfo in other web-apps
 
2005-11-17 16:56 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/mb/class.lmsensors.inc.php: following bugs should be
fixed now: "[ 1357257 ] lmsensors & phpsysinfo bugs" "[ 1241520 ]
Temperature, Voltage Empty" "[ 1109524 ] lmsensores Bug" included
fix for "[ 1277145 ] Fan Speed w/out divisor does not show" and
finally fix for some E_NOTICE massages
 
2005-11-16 21:47 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/lang/nl.php: updated translation from patch "[ 1104472 ]
Dutch language patch"
 
2005-11-16 21:42 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/lang/fr.php: updated translation from "[ 1220000 ]
French language patch", hope this is all correct translated
 
2005-11-16 21:28 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/os/class.Linux.inc.php: included patch "[ 1198070 ] SuSE
Enterprise Server not detected" also change distribution
detection (first check if a file exist before read it, one icon
can also have more than one associated file)
 
2005-11-16 17:39 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* index.php, includes/system_footer.php,
includes/system_header.php, includes/os/class.Darwin.inc.php,
includes/os/class.FreeBSD.inc.php,
includes/os/class.NetBSD.inc.php,
includes/os/class.OpenBSD.inc.php: security fixes, mentioned in
bug "[ 1168383 ] phpSysInfo 2.3 Multiple vulnerabilities"
 
2005-11-16 17:26 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/XPath.class.php (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3): update to latest version, which fixes
array_merge() warnings
 
2005-11-16 16:32 bigmichi1 Michael Cramer (bigmichi1 at users.sf.net)
 
* includes/lang/ru.php: applied patch "[ 1234692 ] Russian lang
typo/mistake fix"
 
2005-11-11 21:13 precision Uriah Welcome (precision at users.sf.net)
 
* index.php: This is a quick fix for the $lng issue reintroduced in
Version 2.4. The bugfix for CVE-2005-3347 has reopened
CVE-2003-0536, but since we expect a very short string (directory
name), we can actually do basename and strip off any non-filename
characters. Also, CVE-2005-3348 was not fixed with
register_globals On, since $charset could be overwritten. Fix by
christopher.kunz@hardened-php.net */
 
2005-11-10 17:47 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: 2.4 changelog update
 
2005-11-10 17:39 precision Uriah Welcome (precision at users.sf.net)
 
* README, index.php: misc updates, releasing 2.4
 
2005-11-10 17:31 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/sr.php: adding serbian translation
 
2005-08-19 19:02 precision Uriah Welcome (precision at users.sf.net)
 
* includes/XPath.class.php: updating to the latest version of
XPath.class.php
 
2004-10-30 08:09 webbie (webbie at ipfw dot org)
 
* includes/mb/: class.healthd.inc.php (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3), class.hwsensors.inc.php,
class.lmsensors.inc.php, class.mbm5.inc.php, class.mbmon.inc.php:
Saving the results of the output to a class level variable, we
only need to run the mbmon binary once.
 
2004-10-30 07:14 webbie (webbie at ipfw dot org)
 
* includes/mb/class.mbmon.inc.php: Saving the results of the output
to a class level variable, we only need to run the mbmon binary
once. ( Gorilla <gorilla_ at users.sf.net> )
 
2004-10-29 06:49 webbie (webbie at ipfw dot org)
 
* ChangeLog, includes/xml/filesystems.php: hide mount point in XML
when $show_mount_point is false
 
2004-10-13 08:13 webbie (webbie at ipfw dot org)
 
* ChangeLog, includes/os/class.BSD.common.inc.php,
includes/os/class.HP-UX.inc.php, includes/os/class.Linux.inc.php,
includes/os/class.SunOS.inc.php, includes/os/class.WINNT.inc.php,
includes/xml/vitals.php: sysinfo classes return the Uptime in
seconds. ( Edwin Meester <millenniumv3 at users.sf.net> )
 
2004-10-06 05:51 webbie (webbie at ipfw dot org)
 
* includes/lang/lt.php: proper Lithuanian translation update
 
2004-10-06 05:45 webbie (webbie at ipfw dot org)
 
* index.php, includes/common_functions.php: Removed GD dependency
( Edwin Meester <millenniumv3 at users.sf.net> )
 
2004-10-05 00:39 webbie (webbie at ipfw dot org)
 
* index.php: remove debug statement
 
2004-10-04 03:16 webbie (webbie at ipfw dot org)
 
* index.php: comestic fix again
 
2004-10-04 03:15 webbie (webbie at ipfw dot org)
 
* index.php: comestic fix
 
2004-10-04 03:13 webbie (webbie at ipfw dot org)
 
* index.php: bug fix, wrong _GET language variable
 
2004-10-03 07:13 webbie (webbie at ipfw dot org)
 
* includes/: mb/class.mbm5.inc.php, system_footer.php: comestic fix
 
2004-10-03 07:12 webbie (webbie at ipfw dot org)
 
* includes/mb/class.mbm5.inc.php: A class for MBM5 wich parses the
csv logs for Fan Speed, Voltages and Temperatures. see the Note
for making things work. ( Edwin Meester <millenniumv3 at
users.sf.net> )
 
2004-10-03 05:05 webbie (webbie at ipfw dot org)
 
* includes/lang/lt.php: comestic update ( Rimas Kudelis <er-ku
at users.sf.net> )
 
2004-10-03 04:25 webbie (webbie at ipfw dot org)
 
* index.php, includes/system_footer.php: do not use
register_long_arrays ( Edwin Meester <millenniumv3 at
sf.users.net> )
 
2004-10-03 04:14 webbie (webbie at ipfw dot org)
 
* includes/mb/class.lmsensors.inc.php: Dirty fix for misinterpreted
output of sensors, where info could come on next line when the
label is too long. ( Martijn Stolk <netrippert at users.sf.net>
)
 
2004-10-03 04:07 webbie (webbie at ipfw dot org)
 
* ChangeLog, config.php.new: A class for MBM5 wich parses the csv
logs for Fan Speed, Voltages and Temperatures. see the Note for
making things work. ( Edwin Meester <millenniumv3 at
users.sf.net> )
 
2004-09-01 18:00 webbie (webbie at ipfw dot org)
 
* includes/lang/fr.php: cosmectic fix
 
2004-08-31 17:50 webbie (webbie at ipfw dot org)
 
* templates/: aq/index.html, aq/images/index.html,
black/index.html, black/images/index.html, blue/index.html,
blue/images/index.html, bulix/index.html,
bulix/images/index.html, classic/index.html,
classic/images/index.html, kde/index.html, kde/images/index.html,
metal/index.html, metal/images/index.html, orange/index.html,
orange/images/index.html, typo3/index.html,
typo3/images/index.html, windows_classic/index.html,
windows_classic/images/index.html, wintendoxp/index.html,
wintendoxp/images/index.html (utags: REL-2-5-2-RC3,
REL-2-5-3-RC1, REL-2-5-3-RC2): prevent index listing
 
2004-08-30 16:05 webbie (webbie at ipfw dot org)
 
* templates/windows_classic/images/: bottom.gif,
bottom_left_corner.gif, bottom_right_corner.gif, left.gif,
middle.gif, min_max.gif, right.gif, top.gif,
upper_left_corner.gif, upper_right_corner.gif (utags:
REL-2-5-2-RC3, REL-2-5-3-RC1, REL-2-5-3-RC2): Changed the colors
and Icon. ( Edwin Meester <millenniumv3 at users.sf.net> )
 
2004-08-30 15:51 webbie (webbie at ipfw dot org)
 
* includes/lang/: ar_utf8.php, bg.php, big5.php, br.php, ca.php,
cn.php, cs.php, ct.php, da.php, de.php, en.php, es.php, et.php,
eu.php, fi.php, fr.php, gr.php, he.php, hu.php, id.php, is.php,
it.php, jp.php, ko.php, lt.php, lv.php, nl.php, no.php, pl.php,
pt-br.php, pt.php, ro.php, ru.php, sk.php, sv.php, tr.php,
tw.php: missing USB tag ( Edwin Meester <millenniumv3 at
users.sf.net> )
 
2004-08-30 15:28 webbie (webbie at ipfw dot org)
 
* includes/os/class.WINNT.inc.php: Fatal error: Call to undefined
method variant::Next() in
F:\Http\localhost\test\phpsysinfo\includes\os\class.WINNT.inc
.php on line 104 ( Edwin Meester <millenniumv3 at users.sf.net> )
 
2004-08-25 19:37 webbie (webbie at ipfw dot org)
 
* ChangeLog: update Changelog
 
2004-08-25 19:33 webbie (webbie at ipfw dot org)
 
* includes/lang/nl.php: - Updated CPUSpeed en BUSSpeed Labels -
changed "Buffergrootte" to "Cache grootte" cause Cache is used by
most of Dutch PC Shops... ( Edwin Meester <millenniumv3 at
users.sf.net> )
 
2004-08-25 03:04 webbie (webbie at ipfw dot org)
 
* includes/: system_footer.php, lang/ar_utf8.php, lang/bg.php,
lang/big5.php, lang/br.php, lang/ca.php, lang/cn.php,
lang/cs.php, lang/ct.php, lang/da.php, lang/de.php, lang/en.php,
lang/es.php, lang/et.php, lang/eu.php, lang/fi.php, lang/fr.php,
lang/gr.php, lang/he.php, lang/hu.php, lang/id.php, lang/is.php,
lang/it.php, lang/jp.php, lang/ko.php, lang/lt.php, lang/lv.php,
lang/nl.php, lang/no.php, lang/pl.php, lang/pt-br.php,
lang/pt.php, lang/ro.php, lang/ru.php, lang/sk.php, lang/sv.php,
lang/tr.php, lang/tw.php, os/class.Darwin.inc.php,
xml/hardware.php: add BUS Speed to the hardware section (
macftphttp.serverbox.org <macftphttp at users.sf.net> ) ( Edwin
Meester <millenniumv3 at users.sf.net> )
 
2004-08-25 02:34 webbie (webbie at ipfw dot org)
 
* includes/: lang/ar_utf8.php, lang/bg.php, lang/big5.php,
lang/br.php, lang/ca.php, lang/cn.php, lang/cs.php, lang/ct.php,
lang/da.php, lang/de.php, lang/en.php, lang/es.php, lang/et.php,
lang/eu.php, lang/fi.php, lang/fr.php, lang/gr.php, lang/he.php,
lang/hu.php, lang/id.php, lang/is.php, lang/it.php, lang/jp.php,
lang/ko.php, lang/lt.php, lang/lv.php, lang/nl.php, lang/no.php,
lang/pl.php, lang/pt-br.php, lang/pt.php, lang/ro.php,
lang/ru.php, lang/sk.php, lang/sv.php, lang/tr.php, lang/tw.php,
os/class.BSD.common.inc.php, os/class.Darwin.inc.php,
os/class.HP-UX.inc.php, os/class.Linux.inc.php,
os/class.SunOS.inc.php, os/class.WINNT.inc.php, xml/hardware.php:
show CPU speed as X.XX Ghz or XXX Mhz if less than 1 Ghz. (
macftphttp.serverbox.org <macftphttp at users.sf.net> ) ( Edwin
Meester <millenniumv3 at users.sf.net> )
 
2004-08-24 23:57 webbie (webbie at ipfw dot org)
 
* templates/windows_classic/: box.tpl, form.tpl,
windows_classic.css (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3), images/bar_left.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3), images/bar_middle.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3),
images/bar_right.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3), images/bottom.gif, images/bottom_left_corner.gif,
images/bottom_right_corner.gif, images/left.gif,
images/middle.gif, images/min_max.gif, images/redbar_left.gif
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3),
images/redbar_middle.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3), images/redbar_right.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3), images/right.gif,
images/spacer.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3), images/top.gif, images/upper_left_corner.gif,
images/upper_right_corner.gif: new windows_classic template (
Edwin Meester <millenniumv3 at users.sf.net> )
 
2004-08-24 23:18 webbie (webbie at ipfw dot org)
 
* includes/lang/fr.php: update french localization ( Xavier
Spirlet <exess at skynet.be> )
 
2004-08-24 23:06 webbie (webbie at ipfw dot org)
 
* templates/: aq/form.tpl, black/form.tpl, blue/form.tpl,
bulix/form.tpl, kde/form.tpl, metal/form.tpl, orange/form.tpl,
typo3/form.tpl, wintendoxp/form.tpl: remove hysteresis from
temperature section
 
2004-08-24 22:58 webbie (webbie at ipfw dot org)
 
* includes/xml/mbinfo.php, templates/classic/form.tpl: [no log
message]
 
2004-08-23 23:02 webbie (webbie at ipfw dot org)
 
* includes/lang/nl.php: - Fixed the Dutch Local windows and Linux.
(Guess al other files have to be patched also (for windows
support)
 
- translated labels from version 2.2 and 2.3
 
( Edwin Meester <millenniumv3 at users.sf.net> )
 
2004-08-23 22:56 webbie (webbie at ipfw dot org)
 
* includes/os/class.Linux.inc.php, images/Cobalt.gif: add sun
cobalt detection ( Jerry Bauer <kb at diskfailure.nl> )
 
2004-08-19 14:48 webbie (webbie at ipfw dot org)
 
* config.php.new: update comments
 
2004-08-19 14:32 webbie (webbie at ipfw dot org)
 
* includes/lang/is.php: update Icelandic translation (Throstur
Svanbergsson <throstur at users.sf.net> )
 
2004-08-19 14:26 webbie (webbie at ipfw dot org)
 
* index.php: disable notice if cookie is not set
 
2004-08-14 22:18 webbie (webbie at ipfw dot org)
 
* index.php: bump version to 2.4-cvs
 
2004-08-14 11:22 webbie (webbie at ipfw dot org)
 
* ChangeLog, index.php (utags: REL-2-3): phpsysinfo version 2.3
release!
 
2004-08-13 23:02 webbie (webbie at ipfw dot org)
 
* includes/system_footer.php (tags: REL-2-3): template picklist
should only pickup directory name and language picklist should
only pickup language file with .php extension
 
2004-08-13 16:17 webbie (webbie at ipfw dot org)
 
* tools/MakeCVS.sh (tags: REL-2-3): exclude sample directory
 
2004-08-12 00:07 webbie (webbie at ipfw dot org)
 
* includes/system_footer.php: comestic bug fix
 
2004-08-11 11:55 webbie (webbie at ipfw dot org)
 
* includes/system_footer.php: format code using phpCodeBeautifier
 
2004-08-11 07:34 webbie (webbie at ipfw dot org)
 
* config.php.new (tags: REL-2-3), includes/system_footer.php: add
option to hide/display langauge and template picklist
 
2004-08-11 07:23 webbie (webbie at ipfw dot org)
 
* config.php.new, index.php: default template and language config
option (requested by many peoples)
 
2004-08-11 06:57 webbie (webbie at ipfw dot org)
 
* tools/MakeCVS.sh: exclude tools directory
 
2004-08-11 06:55 webbie (webbie at ipfw dot org)
 
* images/Arch.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3), includes/os/class.Linux.inc.php (utags: REL-2-3):
Add Arch Linux detection ( Simo L <neotuli at users.sf.net> )
 
2004-07-18 03:27 webbie (webbie at ipfw dot org)
 
* images/index.html (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3), includes/index.html (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3), includes/lang/index.html (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3),
includes/mb/index.html (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3), includes/os/index.html (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3), includes/xml/index.html (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3), sample/index.html
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3),
templates/index.html (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3), templates/kde/form.tpl,
templates/wintendoxp/form.tpl, tools/index.html (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3) (utags: REL-2-3):
prevent index listing
 
2004-07-18 00:34 webbie (webbie at ipfw dot org)
 
* tools/debug.php (tags: REL-2-3): for debugging
 
2004-07-16 22:06 webbie (webbie at ipfw dot org)
 
* templates/classic/form.tpl (tags: REL-2-3): remove hysteresis
from temperature section
 
2004-07-16 22:06 webbie (webbie at ipfw dot org)
 
* templates/: aq/form.tpl (tags: REL-2-3), black/form.tpl (tags:
REL-2-3), blue/form.tpl (tags: REL-2-3), bulix/form.tpl (tags:
REL-2-3), kde/form.tpl, metal/form.tpl (tags: REL-2-3),
orange/form.tpl (tags: REL-2-3), typo3/form.tpl (tags: REL-2-3),
wintendoxp/form.tpl: add temperature section to bulix and fixing
table tag problem in form.tpl ( Frederik Schueler <fschueler
at users.sf.net> )
 
2004-07-14 06:34 webbie (webbie at ipfw dot org)
 
* README (tags: REL-2-3): phpsysinfo does work on PHP5.x
 
2004-07-12 01:39 webbie (webbie at ipfw dot org)
 
* includes/lang/: ar_utf8.php, jp.php (utags: REL-2-3): fixing
language template for ar_utf8 and jp ( Frederik Schueler
<fschueler at users.sf.net> )
 
2004-07-05 17:55 webbie (webbie at ipfw dot org)
 
* README, config.php.new: better hardware sensor installation
instructions
 
2004-07-03 01:28 webbie (webbie at ipfw dot org)
 
* includes/xml/mbinfo.php (tags: REL-2-3): remove hysteresis from
temperature section
 
2004-07-02 02:33 webbie (webbie at ipfw dot org)
 
* includes/os/class.OpenBSD.inc.php (tags: REL-2-3): remove WIP
message
 
2004-07-02 02:32 webbie (webbie at ipfw dot org)
 
* includes/os/: class.BSD.common.inc.php (tags: REL-2-3),
class.OpenBSD.inc.php, class.WINNT.inc.php (tags: REL-2-3):
Proper fix OpenBSD pci logic
 
2004-06-29 01:29 webbie (webbie at ipfw dot org)
 
* includes/os/class.WINNT.inc.php: add ending ?>
 
2004-06-29 01:26 webbie (webbie at ipfw dot org)
 
* includes/os/class.WINNT.inc.php: Now supports v2.2 of phpSysInfo.
( Carl C. Longnecker <longneck at users.sf.net> )
 
2004-06-28 20:51 webbie (webbie at ipfw dot org)
 
* includes/: common_functions.php (tags: REL-2-3),
os/class.WINNT.inc.php: add WinNT support ( Carl C. Longnecker
<longneck at users.sf.net> )
 
2004-06-27 00:31 webbie (webbie at ipfw dot org)
 
* ChangeLog, tools/GenerateCL.sh (tags: REL-2-3): regenerate
ChangeLog
 
2004-06-27 00:24 webbie (webbie at ipfw dot org)
 
* index.php: template and lng cookies now work with register global
on and off
 
2004-06-26 23:46 webbie (webbie at ipfw dot org)
 
* includes/: os/class.BSD.common.inc.php, os/class.Darwin.inc.php
(tags: REL-2-3), os/class.FreeBSD.inc.php (tags: REL-2-3),
os/class.HP-UX.inc.php (tags: REL-2-3), os/class.Linux.inc.php,
os/class.NetBSD.inc.php (tags: REL-2-3),
os/class.OpenBSD.inc.php, xml/hardware.php (tags: REL-2-3): Add
scsi hdd capacity information
 
2004-06-26 01:50 webbie (webbie at ipfw dot org)
 
* includes/os/class.SunOS.inc.php (tags: REL-2-3): remove
compat_array_keys and add usb function boby
 
2004-06-26 01:27 webbie (webbie at ipfw dot org)
 
* includes/mb/class.hwsensors.inc.php (tags: REL-2-3): compatible
with OpenBSD 3.5 ( psyc <scotchme@users.sf.net> )
 
2004-06-26 01:18 webbie (webbie at ipfw dot org)
 
* includes/os/class.BSD.common.inc.php: make it compatible with
OpenBSD 3.4
 
2004-06-26 00:24 webbie (webbie at ipfw dot org)
 
* includes/XPath.class.php (tags: REL-2-3): make phpsysinfo works
with php5 see http://bugs.php.net/bug.php?id=27815
 
2004-06-21 19:14 precision Uriah Welcome (precision at users.sf.net)
 
* images/Trustix.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3): Adding trustix detection
 
2004-06-21 19:14 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.Linux.inc.php: adding trustix detection from
Gervasio Varela <gervarela at teleline.es>
 
2004-06-21 19:09 precision Uriah Welcome (precision at users.sf.net)
 
* templates/typo3/: box.tpl (tags: REL-2-3), form.tpl, typo3.css
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3),
images/bar_left.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3), images/bar_middle.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3),
images/bar_right.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3), images/redbar_left.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3),
images/redbar_middle.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3), images/redbar_right.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3),
images/trans.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3): adding typo3 template from Mauric Rene
Oberlaender <admin at mronet.at>
 
2004-06-12 23:02 webbie (webbie at ipfw dot org)
 
* includes/mb/class.lmsensors.inc.php (tags: REL-2-3): This
validates that the limit is actually greater than the hysteresis
value (which is should be).
 
2004-06-09 16:22 webbie (webbie at ipfw dot org)
 
* ChangeLog, index.php, phpsysinfo.dtd (tags: REL-2-3): diable
magic quotes during runtime
 
2004-05-27 06:06 webbie (webbie at ipfw dot org)
 
* tools/GenerateCL.sh: simplify sed command a little bit
 
2004-05-25 18:11 webbie (webbie at ipfw dot org)
 
* tools/README (tags: REL-2-3): Add GenerateCL.sh description
 
2004-05-25 16:42 webbie (webbie at ipfw dot org)
 
* ChangeLog: Haven't generate this for a long time
 
2004-05-25 16:29 webbie (webbie at ipfw dot org)
 
* tools/GenerateCL.sh: Script to generate ChangeLog from CVS
 
2004-05-23 02:35 webbie (webbie at ipfw dot org)
 
* includes/system_footer.php: doesn't need to check for 'xml'
 
2004-05-23 01:47 webbie (webbie at ipfw dot org)
 
* sample/mount1.txt (tags: REL-2-3): add sample mount output
 
2004-05-22 22:13 webbie (webbie at ipfw dot org)
 
* config.php.new, includes/system_footer.php,
includes/mb/class.mbmon.inc.php (tags: REL-2-3): Add mbmon
support ( Zoltan Frombach <zoltan at frombach.com> )
 
2004-05-15 21:24 webbie (webbie at ipfw dot org)
 
* index.php: bump version to 2.3-cvs
 
2004-05-15 07:27 webbie (webbie at ipfw dot org)
 
* index.php (tags: REL-2-2): bump version to 2.2
 
2004-05-07 01:05 webbie (webbie at ipfw dot org)
 
* images/free-eos.gif (tags: REL-2-3),
includes/os/class.Linux.inc.php, tools/MakeCVS.sh (utags:
REL-2-2): Add Free EOS distro detection
 
2004-05-07 00:51 webbie (webbie at ipfw dot org)
 
* includes/os/class.Darwin.inc.php (tags: REL-2-2): use Darwin icon
instead of xp icon, peoples are very upset =)
 
2004-05-07 00:49 webbie (webbie at ipfw dot org)
 
* images/Darwin.gif (tags: REL-2-3, REL-2-2): Darwin icon (
Stefan Olofssone < stefan at swab.se> )
 
2004-05-05 22:09 webbie (webbie at ipfw dot org)
 
* includes/mb/class.lmsensors.inc.php (tags: REL-2-2): redo some
regex, hopefully it fixes some weird temperature parsing problem
 
2004-05-05 21:50 webbie (webbie at ipfw dot org)
 
* sample/: lmsensors1.txt, lmsensors2.txt, lmsensors3.txt (utags:
REL-2-2, REL-2-3, REL-2-5-2-RC3, REL-2-5-3-RC1, REL-2-5-3-RC2):
add sample lmsensors output
 
2004-05-02 18:45 webbie (webbie at ipfw dot org)
 
* images/Suse.gif (tags: REL-2-3, REL-2-2),
includes/os/class.Linux.inc.php: add SuSE distro detection (
Ben van Essen <flark at users.sf.net> )
 
2004-05-02 01:44 webbie (webbie at ipfw dot org)
 
* tools/MakeCVS.sh: ignore sample directory
 
2004-05-02 01:41 webbie (webbie at ipfw dot org)
 
* index.php: remove magic quote statement, it is unnecessary
 
2004-05-01 08:48 webbie (webbie at ipfw dot org)
 
* index.php, includes/system_footer.php (tags: REL-2-2): coding
style fixup
 
2004-05-01 08:31 webbie (webbie at ipfw dot org)
 
* includes/system_footer.php: fix minor glitches in the
system_footer.php <macftphttp at users.sourceforge.net>
 
2004-04-30 08:29 webbie (webbie at ipfw dot org)
 
* index.php (tags: REL-2-2-RC1): bump version to 2.2-rc1, getting
ready for the final release
 
2004-04-30 06:04 webbie (webbie at ipfw dot org)
 
* includes/os/class.Darwin.inc.php (tags: REL-2-2-RC1): Fix Xpath
error in XPath.class.php (David Schlosnagle <schlosna at
users.sourceforge.net>)
 
2004-04-30 05:42 webbie (webbie at ipfw dot org)
 
* index.php: 1. add xml module check 2. turn of magic quote
 
2004-04-28 07:14 webbie (webbie at ipfw dot org)
 
* phpsysinfo.dtd (tags: REL-2-2, REL-2-2-RC1): Add Distroicon
element
 
2004-04-28 07:12 webbie (webbie at ipfw dot org)
 
* includes/lang/: ar_utf8.php, bg.php (tags: REL-2-3), big5.php
(tags: REL-2-3), br.php (tags: REL-2-3), ca.php (tags: REL-2-3),
cn.php (tags: REL-2-3), cs.php (tags: REL-2-3), ct.php (tags:
REL-2-3), da.php (tags: REL-2-3), de.php (tags: REL-2-3), en.php
(tags: REL-2-3), es.php (tags: REL-2-3), et.php (tags: REL-2-3),
eu.php (tags: REL-2-3), fi.php (tags: REL-2-3), fr.php (tags:
REL-2-3), gr.php (tags: REL-2-3), he.php (tags: REL-2-3), hu.php
(tags: REL-2-3), id.php (tags: REL-2-3), is.php (tags: REL-2-3),
it.php (tags: REL-2-3), jp.php, ko.php (tags: REL-2-3), lt.php
(tags: REL-2-3), lv.php (tags: REL-2-3), nl.php (tags: REL-2-3),
no.php (tags: REL-2-3), pl.php (tags: REL-2-3), pt-br.php (tags:
REL-2-3), pt.php (tags: REL-2-3), ro.php (tags: REL-2-3), ru.php
(tags: REL-2-3), sk.php (tags: REL-2-3), sv.php (tags: REL-2-3),
tr.php (tags: REL-2-3), tw.php (tags: REL-2-3) (utags: REL-2-2,
REL-2-2-RC1): fix label case
 
2004-04-28 06:46 webbie (webbie at ipfw dot org)
 
* includes/mb/class.lmsensors.inc.php (tags: REL-2-2-RC1): minor
regex string fix
 
2004-04-25 05:46 webbie (webbie at ipfw dot org)
 
* config.php.new, includes/mb/class.hwsensors.inc.php (utags:
REL-2-2, REL-2-2-RC1): add OpenBSD hw.sensors support
 
2004-04-25 01:05 webbie (webbie at ipfw dot org)
 
* ChangeLog (tags: REL-2-2, REL-2-2-RC1): Screwed up Changelog by
accident
 
2004-04-25 00:39 webbie (webbie at ipfw dot org)
 
* includes/XPath.class.php (tags: REL-2-2, REL-2-2-RC1): update
XPath.class.php to v3.4
 
2004-04-24 22:52 webbie (webbie at ipfw dot org)
 
* includes/os/class.Linux.inc.php (tags: REL-2-2-RC1): Bug fix in
distroicon function
 
2004-04-24 22:36 webbie (webbie at ipfw dot org)
 
* includes/: os/class.Darwin.inc.php, os/class.FreeBSD.inc.php
(tags: REL-2-2, REL-2-2-RC1), os/class.HP-UX.inc.php (tags:
REL-2-2, REL-2-2-RC1), os/class.Linux.inc.php,
os/class.NetBSD.inc.php (tags: REL-2-2, REL-2-2-RC1),
os/class.OpenBSD.inc.php (tags: REL-2-2, REL-2-2-RC1),
os/class.SunOS.inc.php (tags: REL-2-2, REL-2-2-RC1),
xml/vitals.php (tags: REL-2-3, REL-2-2, REL-2-2-RC1): Redo the
distro icon logic, the old way is ugly
 
2004-04-24 05:53 webbie (webbie at ipfw dot org)
 
* images/Slackware.gif (tags: REL-2-3, REL-2-2, REL-2-2-RC1),
includes/os/class.Linux.inc.php, includes/xml/vitals.php: Add
Slackware detection ( Paul Cairney <pcairney at
users.sourceforge.net> )
 
2004-04-06 00:46 webbie (webbie at ipfw dot org)
 
* images/: Debian.gif, Fedora.gif (utags: REL-2-2, REL-2-2-RC1,
REL-2-3): Beretta thinks these icons are better
 
2004-04-06 00:26 webbie (webbie at ipfw dot org)
 
* images/Fedora.gif, images/RedHat.gif, images/Redhat.gif (tags:
REL-2-3, REL-2-2, REL-2-2-RC1), includes/os/class.Linux.inc.php,
includes/xml/vitals.php: add Fedora distro and thank you Beretta
for all the distro icons
 
2004-03-31 21:20 webbie (webbie at ipfw dot org)
 
* templates/aq/images/: bar_left.gif, bar_middle.gif,
bar_right.gif, coininfd.gif, coininfg.gif, coinsupd.gif,
coinsupg.gif, d.gif, fond.gif, g.gif, inf.gif, redbar_left.gif,
redbar_middle.gif, redbar_right.gif, sup.gif (utags: REL-2-2,
REL-2-2-RC1, REL-2-3, REL-2-5-2-RC3, REL-2-5-3-RC1,
REL-2-5-3-RC2): overwrote aq theme by mistake
 
2004-03-31 21:08 webbie (webbie at ipfw dot org)
 
* templates/bulix/bulix.css (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1): cosmetic fix
 
2004-03-31 21:03 webbie (webbie at ipfw dot org)
 
* templates/aq/images/: background.gif, icons.gif: overworte aq
theme by mistake
 
2004-03-31 10:25 webbie (webbie at ipfw dot org)
 
* includes/xml/vitals.php: missing closing bracket
 
2004-03-31 10:21 webbie (webbie at ipfw dot org)
 
* ChangeLog, images/Debian.gif, images/FreeBSD.gif (tags: REL-2-3,
REL-2-2, REL-2-2-RC1), images/Gentoo.gif (tags: REL-2-3, REL-2-2,
REL-2-2-RC1), images/Mandrake.gif (tags: REL-2-3, REL-2-2,
REL-2-2-RC1), images/NetBSD.gif (tags: REL-2-3, REL-2-2,
REL-2-2-RC1), images/OpenBSD.gif (tags: REL-2-3, REL-2-2,
REL-2-2-RC1), images/RedHat.gif, images/xp.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2,
REL-2-2-RC1), includes/xml/vitals.php: Add distro icon logic
 
2004-03-14 05:59 webbie (webbie at ipfw dot org)
 
* includes/os/class.Linux.inc.php: doesn't need 4k buffer to read
distro string
 
2004-03-14 05:56 webbie (webbie at ipfw dot org)
 
* includes/os/class.Linux.inc.php: Add Gentoo Distro detection (
Mark Gillespie <mgillespie @ users.sf.net> )
 
2004-03-14 05:21 webbie (webbie at ipfw dot org)
 
* includes/mb/: class.healthd.inc.php (tags: REL-2-3, REL-2-2,
REL-2-2-RC1), class.lmsensors.inc.php: fix missing ?> tag
 
2004-03-14 05:16 webbie (webbie at ipfw dot org)
 
* includes/: XPath.class.php, class.Template.inc.php (tags:
REL-2-3, REL-2-2, REL-2-2-RC1), os/class.BSD.common.inc.php
(tags: REL-2-2, REL-2-2-RC1), os/class.Darwin.inc.php,
os/class.FreeBSD.inc.php, os/class.HP-UX.inc.php,
os/class.Linux.inc.php, os/class.NetBSD.inc.php,
os/class.OpenBSD.inc.php, os/class.SunOS.inc.php: fix missing
ending ?> tag
 
2004-03-14 05:05 webbie (webbie at ipfw dot org)
 
* index.php: better error message if config.php is missing
 
2004-03-13 04:52 webbie (webbie at ipfw dot org)
 
* templates/wintendoxp/images/: aq_background.gif, background.gif,
bar_left.gif, bar_middle.gif, bar_right.gif, coininfd.gif,
coininfg.gif, coinsupd.gif, coinsupg.gif, d.gif, fond.gif, g.gif,
icons.gif, inf.gif, redbar_left.gif, redbar_middle.gif,
redbar_right.gif, space15_15.gif, sup.gif (utags: REL-2-2,
REL-2-2-RC1, REL-2-3, REL-2-5-2-RC3, REL-2-5-3-RC1,
REL-2-5-3-RC2): Rip wintendoxp theme from aspSysInfo
 
2004-03-13 00:27 webbie (webbie at ipfw dot org)
 
* templates/: aq/images/background.gif, aq/images/icons.gif,
wintendoxp/box.tpl (tags: REL-2-3, REL-2-2, REL-2-2-RC1),
wintendoxp/form.tpl (tags: REL-2-2, REL-2-2-RC1),
wintendoxp/wintendoxp.css (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1): Rip wintendoxp
theme from aspSysInfo
 
2004-03-13 00:04 webbie (webbie at ipfw dot org)
 
* phpsysinfo.dtd, includes/lang/ar_utf8.php, includes/lang/bg.php,
includes/lang/big5.php, includes/lang/br.php,
includes/lang/ca.php, includes/lang/cn.php, includes/lang/cs.php,
includes/lang/ct.php, includes/lang/da.php, includes/lang/de.php,
includes/lang/en.php, includes/lang/es.php, includes/lang/et.php,
includes/lang/eu.php, includes/lang/fi.php, includes/lang/fr.php,
includes/lang/gr.php, includes/lang/he.php, includes/lang/hu.php,
includes/lang/id.php, includes/lang/is.php, includes/lang/it.php,
includes/lang/jp.php, includes/lang/ko.php, includes/lang/lt.php,
includes/lang/lv.php, includes/lang/nl.php, includes/lang/no.php,
includes/lang/pl.php, includes/lang/pt-br.php,
includes/lang/pt.php, includes/lang/ro.php, includes/lang/ru.php,
includes/lang/sk.php, includes/lang/sv.php, includes/lang/tr.php,
includes/lang/tw.php, includes/os/class.Darwin.inc.php,
includes/os/class.FreeBSD.inc.php,
includes/os/class.HP-UX.inc.php, includes/os/class.Linux.inc.php,
includes/os/class.NetBSD.inc.php,
includes/os/class.OpenBSD.inc.php,
includes/os/class.SunOS.inc.php, includes/xml/vitals.php: Add
distro name as per Beretta's request
 
2004-03-12 22:55 webbie (webbie at ipfw dot org)
 
* templates/kde/: box.tpl (tags: REL-2-3), form.tpl, kde.css (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3),
images/background.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3), images/bar_left.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3),
images/bar_middle.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3), images/bar_right.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3),
images/coininfd.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3), images/coininfg.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3),
images/coinsupd.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3), images/coinsupg.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3),
images/d.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3,
REL-2-3), images/fond.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3), images/g.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3), images/icons.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3),
images/inf.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3), images/nobar_middle.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3),
images/nobar_right.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3), images/redbar_left.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3),
images/redbar_middle.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3), images/redbar_right.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3),
images/space15_15.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3), images/sup.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3), images/title_left.gif
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3),
images/title_mid.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3), images/title_right.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3) (utags:
REL-2-2, REL-2-2-RC1): Rip kde theme from aspSysInfo
 
2004-03-12 22:51 webbie (webbie at ipfw dot org)
 
* templates/aq/images/: bar_left.gif, bar_middle.gif,
bar_right.gif, coininfd.gif, coininfg.gif, coinsupd.gif,
coinsupg.gif, d.gif, fond.gif, g.gif, inf.gif, redbar_left.gif,
redbar_middle.gif, redbar_right.gif, sup.gif: Rip wintendoxp and
kde theme from aspSysInfo
 
2004-03-12 09:24 webbie (webbie at ipfw dot org)
 
* templates/: aq/box.tpl, black/box.tpl, metal/box.tpl (utags:
REL-2-2, REL-2-2-RC1, REL-2-3): remove image alt="none" tag
 
2004-03-12 07:01 webbie (webbie at ipfw dot org)
 
* includes/lang/lt.php: Add sensors section
 
2004-03-12 07:00 webbie (webbie at ipfw dot org)
 
* includes/lang/lt.php: New lithuanian (lt) translation ( Rimas
Kudelis )
 
2003-12-14 01:27 webbie (webbie at ipfw dot org)
 
* tools/README (tags: REL-2-2, REL-2-2-RC1): add MakeCVS.sh
description
 
2003-12-13 06:51 webbie (webbie at ipfw dot org)
 
* tools/MakeCVS.sh (tags: REL-2-2-RC1): script to make tarball
based on the local cvs image
 
2003-11-27 06:19 webbie (webbie at ipfw dot org)
 
* includes/xml/filesystems.php (tags: REL-2-3, REL-2-2,
REL-2-2-RC1): show mount point option fix
 
2003-11-26 20:10 webbie (webbie at ipfw dot org)
 
* config.php, config.php.new: rename config.php to config.php.new
to avoid cvs overwrite user config file
 
2003-11-26 20:07 webbie (webbie at ipfw dot org)
 
* includes/xml/filesystems.php: proper fix for show_mount_point
feature
 
2003-11-26 19:57 webbie (webbie at ipfw dot org)
 
* config.php, includes/xml/filesystems.php: new option
show_mount_point, set it to false to hide mount point
 
2003-11-26 19:41 webbie (webbie at ipfw dot org)
 
* includes/xml/: filesystems.php, memory.php (tags: REL-2-3,
REL-2-2, REL-2-2-RC1), network.php (tags: REL-2-3, REL-2-2,
REL-2-2-RC1): comestic fix to the bulix template
 
2003-11-26 19:19 webbie (webbie at ipfw dot org)
 
* includes/system_footer.php (tags: REL-2-2-RC1): for some reasons,
xml folder shows up under template and lang directory. We need to
hide it
 
2003-11-26 02:20 webbie (webbie at ipfw dot org)
 
* includes/: system_footer.php, os/class.BSD.common.inc.php,
os/class.Darwin.inc.php, os/class.HP-UX.inc.php,
os/class.Linux.inc.php, os/class.NetBSD.inc.php,
os/class.OpenBSD.inc.php: sort PCI, IDE and SCSI output by
alphabetical order
 
2003-11-25 19:57 webbie (webbie at ipfw dot org)
 
* includes/system_footer.php: sort template and language dropdown
list in alphabetical order
 
2003-11-08 23:56 precision Uriah Welcome (precision at users.sf.net)
 
* index.php: minor formatting cleanups
 
2003-11-08 23:56 precision Uriah Welcome (precision at users.sf.net)
 
* includes/system_footer.php: adding XML option to the templates
menu
 
2003-11-08 23:49 precision Uriah Welcome (precision at users.sf.net)
 
* includes/: system_header.php (tags: REL-2-3, REL-2-2,
REL-2-2-RC1), lang/ja.php (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1), lang/jp.php:
adding Japanese language translations from Yuuki 'SOI' Umeno
<soip at users.sf.net>
 
2003-11-08 23:43 precision Uriah Welcome (precision at users.sf.net)
 
* templates/bulix/: box.tpl (tags: REL-2-3, REL-2-2, REL-2-2-RC1),
bulix.css, form.tpl (tags: REL-2-2, REL-2-2-RC1),
images/bar_left.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1),
images/bar_middle.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1),
images/bar_right.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1),
images/left_bar.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1),
images/middle_bar.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1),
images/redbar_left.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1),
images/redbar_middle.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1),
images/redbar_right.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1),
images/right_bar.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1), images/trans.gif
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3,
REL-2-2, REL-2-2-RC1): Adding new theme bulix from Maxime
Petazzoni <maxime.petazzoni at nova-mag.org>
 
2003-11-08 23:38 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/ar_utf8.php: Adding Arabic translation <nizar at
srcget.com>
 
2003-11-03 03:07 webbie (webbie at ipfw dot org)
 
* includes/os/class.Linux.inc.php: new memory function which works
with all kernel versions (Frederik Schueler <fschueler at
gmx.net>)
 
2003-10-15 03:24 webbie (webbie at ipfw dot org)
 
* includes/os/: class.BSD.common.inc.php, class.HP-UX.inc.php,
class.SunOS.inc.php: Add groundwork for SBUS device list (
David Johnson <dj1471 at users.sf.net> )
 
2003-10-15 03:17 webbie (webbie at ipfw dot org)
 
* phpsysinfo.dtd, includes/os/class.Linux.inc.php,
includes/xml/hardware.php (tags: REL-2-2, REL-2-2-RC1): Add
groundwork for SBUS device list ( David Johnson <dj1471 at
users.sf.net> )
 
2003-10-15 03:02 webbie (webbie at ipfw dot org)
 
* index.php: outputs the "text/xml" content type when using the xml
template. ( Tim Carey-Smith <timcs at users.sf.net> )
 
2003-10-15 02:52 webbie (webbie at ipfw dot org)
 
* includes/os/class.Linux.inc.php: SPARC CPU info fix ( David
Johnson <dj1471 at users.sf.net> )
 
2003-10-15 02:47 webbie (webbie at ipfw dot org)
 
* includes/os/class.Linux.inc.php: linux 2.5 or above memory
display bug fix ( Marcelo de Paula Bezerra <mosca at
users.sf.net> ) and ( Frederik Schüler <fschueler at gmx.net> )
 
2003-10-14 18:28 webbie (webbie at ipfw dot org)
 
* includes/lang/hu.php: missing a <
 
2003-09-04 03:51 webbie (webbie at ipfw dot org)
 
* includes/lang/de.php: German locale update contributed by
Alexander Wild <alexwild at gmx.de>
 
2003-08-04 21:31 precision Uriah Welcome (precision at users.sf.net)
 
* includes/system_header.php: editor cleanups
 
2003-08-04 21:28 precision Uriah Welcome (precision at users.sf.net)
 
* includes/mb/class.lmsensors.inc.php: trim() the results to the
XML output is clean Some minor editor cleanups
 
2003-08-04 21:28 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/en.php: Uppercasing Div and Histeresis to match
everything else
 
2003-07-22 00:38 webbie (webbie at ipfw dot org)
 
* includes/: mb/class.healthd.inc.php, mb/class.lmsensors.inc.php,
os/class.BSD.common.inc.php, os/class.Darwin.inc.php,
os/class.FreeBSD.inc.php, os/class.HP-UX.inc.php,
os/class.Linux.inc.php, os/class.NetBSD.inc.php,
os/class.OpenBSD.inc.php, os/class.SunOS.inc.php: code format
cleanup using phpCodeBeautifier
 
2003-07-22 00:31 webbie (webbie at ipfw dot org)
 
* config.php, index.php, includes/class.Template.inc.php,
includes/common_functions.php (tags: REL-2-2, REL-2-2-RC1),
includes/system_footer.php, includes/system_header.php: code
format cleanup using phpCodeBeautifier
 
2003-06-17 03:04 webbie (webbie at ipfw dot org)
 
* includes/system_header.php: Add hostname to the title for easy
bookmarking ( Maxim Solomatin <makc666 at newmail.ru> )
 
2003-06-09 16:26 webbie (webbie at ipfw dot org)
 
* includes/mb/class.lmsensors.inc.php: lmsensor regex fix ( SOD
<sod at gmx.at> )
 
2003-05-11 23:23 webbie (webbie at ipfw dot org)
 
* includes/lang/cn.php: cosmetic langauge fix
 
2003-04-26 21:13 webbie (webbie at ipfw dot org)
 
* README (tags: REL-2-2, REL-2-2-RC1): wrong again, I am on drug
today
 
2003-04-26 21:11 webbie (webbie at ipfw dot org)
 
* README: oops.. wrong link
 
2003-04-26 20:59 webbie (webbie at ipfw dot org)
 
* README: Make a note that this
http://www.securityfocus.com/archive/1/319713/2003-04-23/2003-04-29/2
problem is fixed
 
2003-04-20 07:23 webbie (webbie at ipfw dot org)
 
* config.php: missing closing ?>
 
2003-04-03 23:30 precision Uriah Welcome (precision at users.sf.net)
 
* tools/README: just a quick note about these tools
 
2003-04-03 23:29 precision Uriah Welcome (precision at users.sf.net)
 
* README: mee too
 
2003-03-31 21:26 precision Uriah Welcome (precision at users.sf.net)
 
* index.php, includes/mb/class.healthd.inc.php,
includes/mb/class.lmsensors.inc.php, tools/GenerateChangeLog.sh
(tags: REL-2-3, REL-2-2, REL-2-2-RC1): minor formatting
cleanups.. removing some whitespace Fix the ChangeLog generator
to fill in Webbie's email properly
 
2003-03-31 21:22 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/pt-br.php: Adding Portuguese-Brazil translation
(Marcílio Maia <marcilio at edn.org.br>)
 
2003-02-23 09:04 webbie (webbie at ipfw dot org)
 
* includes/os/class.BSD.common.inc.php: fix swap space double count
problem
 
2003-02-16 04:04 webbie (webbie at ipfw dot org)
 
* includes/: lang/big5.php, lang/pl.php, lang/tw.php,
xml/hardware.php: various language files update
 
2003-02-16 03:34 webbie (webbie at ipfw dot org)
 
* includes/xml/hardware.php: Hide SCSI, USB section if it doesn't
exist instead of showing as 'none' ( Cichy <cichy @
users.sf.net> )
 
2003-02-10 00:20 webbie (webbie at ipfw dot org)
 
* includes/system_footer.php: use the method from php.net in the
opendir loop
 
2003-02-09 23:50 webbie (webbie at ipfw dot org)
 
* includes/os/class.FreeBSD.inc.php: Fix network section. It should
works for both FreeBSD 4.x and 5.x now
 
2003-02-06 04:39 precision Uriah Welcome (precision at users.sf.net)
 
* templates/classic/classic.css (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1):
small CSS fix for Opera 7 (Michael Herger <mherger at jo-sac.ch>)
 
2003-02-06 04:36 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/lv.php: adding Latvian translation (Elvis Kvalbergs
<elvis at burti.lv>)
 
2003-01-25 08:04 webbie (webbie at ipfw dot org)
 
* config.php, index.php, includes/system_footer.php,
includes/lang/bg.php, includes/lang/big5.php,
includes/lang/br.php, includes/lang/ca.php, includes/lang/cn.php,
includes/lang/cs.php, includes/lang/ct.php, includes/lang/da.php,
includes/lang/de.php, includes/lang/en.php, includes/lang/es.php,
includes/lang/et.php, includes/lang/eu.php, includes/lang/fi.php,
includes/lang/fr.php, includes/lang/gr.php, includes/lang/he.php,
includes/lang/hu.php, includes/lang/id.php, includes/lang/is.php,
includes/lang/it.php, includes/lang/ko.php, includes/lang/lt.php,
includes/lang/nl.php, includes/lang/no.php, includes/lang/pt.php,
includes/lang/ro.php, includes/lang/ru.php, includes/lang/sk.php,
includes/lang/sv.php, includes/lang/tr.php, includes/lang/tw.php,
includes/os/class.BSD.common.inc.php: cosmetic change to the
footer
 
2003-01-21 01:06 webbie (webbie at ipfw dot org)
 
* includes/: system_footer.php, system_header.php, lang/bg.php,
lang/big5.php, lang/br.php, lang/ca.php, lang/cn.php,
lang/cs.php, lang/ct.php, lang/da.php, lang/de.php, lang/en.php,
lang/es.php, lang/et.php, lang/eu.php, lang/fi.php, lang/fr.php,
lang/gr.php, lang/he.php, lang/hu.php, lang/id.php, lang/is.php,
lang/it.php, lang/ko.php, lang/lt.php, lang/nl.php, lang/no.php,
lang/pl.php, lang/pt.php, lang/ro.php, lang/ru.php, lang/sk.php,
lang/sv.php, lang/tr.php, lang/tw.php: display footer in locale
<Cichy>
 
2003-01-19 02:18 webbie (webbie at ipfw dot org)
 
* index.php: Bug #670222: DoS fix ( Wolter Kamphuis <wkamphuis at
users.sf.net> )
 
2003-01-10 16:50 webbie (webbie at ipfw dot org)
 
* includes/os/class.Linux.inc.php: Minor patch for detecting CPU
info under Linux/sparc64. This patch enables phpSysInfo to
retrieve number of CPU's, CPU MHz, and CPU bogomips on sparc64
platforms running Linux. (Jason Mann <jemann at sf.net>)
 
2003-01-05 05:16 webbie (webbie at ipfw dot org)
 
* index.php, includes/xml/mbinfo.php (tags: REL-2-2, REL-2-2-RC1):
make the temperature bar wider by using scale_factor = 4 and hide
the fan section if all fans RPM are zero. Suggestions made by
cichy ( Artur Cichocki )
 
2003-01-05 04:38 webbie (webbie at ipfw dot org)
 
* includes/mb/class.lmsensors.inc.php: ereg pattern fix: lm_sensors
sometimes return temperature without histeresis
 
2003-01-04 14:15 webbie (webbie at ipfw dot org)
 
* includes/xml/mbinfo.php: comestic change: round histeresis to one
decimal place
 
2003-01-04 14:08 webbie (webbie at ipfw dot org)
 
* index.php, includes/lang/bg.php, includes/lang/big5.php,
includes/lang/br.php, includes/lang/ca.php, includes/lang/cn.php,
includes/lang/cs.php, includes/lang/ct.php, includes/lang/da.php,
includes/lang/de.php, includes/lang/en.php, includes/lang/es.php,
includes/lang/et.php, includes/lang/eu.php, includes/lang/fi.php,
includes/lang/fr.php, includes/lang/gr.php, includes/lang/he.php,
includes/lang/hu.php, includes/lang/id.php, includes/lang/is.php,
includes/lang/it.php, includes/lang/ko.php, includes/lang/lt.php,
includes/lang/nl.php, includes/lang/no.php, includes/lang/pl.php,
includes/lang/pt.php, includes/lang/ro.php, includes/lang/ru.php,
includes/lang/sk.php, includes/lang/sv.php, includes/lang/tr.php,
includes/lang/tw.php, includes/mb/class.healthd.inc.php,
includes/mb/class.lmsensors.inc.php, includes/xml/mbinfo.php,
templates/aq/form.tpl (tags: REL-2-2, REL-2-2-RC1),
templates/black/form.tpl (tags: REL-2-2, REL-2-2-RC1),
templates/blue/form.tpl (tags: REL-2-2, REL-2-2-RC1),
templates/classic/form.tpl (tags: REL-2-2, REL-2-2-RC1),
templates/metal/form.tpl (tags: REL-2-2, REL-2-2-RC1),
templates/orange/form.tpl (tags: REL-2-2, REL-2-2-RC1): Initial
import of the motherboard monitor program module. It supports
healthd and lm_sensors now.
 
Credits go to NSPIRIT for his lm_sensors module and Cichy
[cichyart@wp.pl] for his enhancements on lm_sensors module.
 
2003-01-02 06:18 webbie (webbie at ipfw dot org)
 
* includes/os/class.BSD.common.inc.php: cosmetic change, remove
comma in the uptime output
 
2003-01-02 06:12 webbie (webbie at ipfw dot org)
 
* includes/os/class.HP-UX.inc.php: uptime and load average stat now
working
 
2002-12-31 01:51 webbie (webbie at ipfw dot org)
 
* includes/: os/class.BSD.common.inc.php, os/class.Darwin.inc.php,
os/class.FreeBSD.inc.php, os/class.HP-UX.inc.php,
os/class.Linux.inc.php, os/class.NetBSD.inc.php,
os/class.OpenBSD.inc.php, os/class.SunOS.inc.php,
xml/filesystems.php, xml/hardware.php, xml/network.php:
Performance tuning, optimized the FOR loop (webbie <webbie at
ipfw.org>)
 
2002-12-31 00:20 webbie (webbie at ipfw dot org)
 
* includes/system_footer.php: Added space after "Created by"
(webbie <webbie at ipfw.org>)
 
2002-12-19 22:53 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/fr.php: small translation fix
 
2002-12-17 19:23 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.Linux.inc.php: get cache size on PPC (Derrik
Pates <dpates at dsdk12.net>)
 
2002-12-14 00:03 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.SunOS.inc.php: kstat() conversions to
$this->kstat() removed kstatclass() seems to be unused
 
2002-12-14 00:01 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.SunOS.inc.php: adding alpha SunOS support
(Gunther Schreiner <schreiner at users.sf.net>)
 
2002-12-13 23:47 precision Uriah Welcome (precision at users.sf.net)
 
* index.php: fix for translation autodetection and php $_SERVER
stuff (Andreas Heil <aheil at users.sf.net>)
 
2002-12-13 23:44 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.OpenBSD.inc.php: trying array_unique() again,
maybe this time it'll be consistant
 
2002-12-13 23:36 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.Darwin.inc.php: get proper uptime information
from Jaguar (Mike <lashampoo at users.sf.net>)
 
2002-12-13 23:34 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.BSD.common.inc.php: properly stringify uptime
information on BSD from Mike <lashampoo at users.sf.net>
 
2002-12-13 23:28 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/gr.php: Adding Greek translation from Maria Kaitsa
<idefix at ee.teiath.gr>
 
2002-11-01 21:53 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/pt.php: added Portugese translation (Bernardo de
Seabra <zznet at wake-on-lan.cjb.net>)
 
2002-10-25 18:58 precision Uriah Welcome (precision at users.sf.net)
 
* index.php, includes/os/class.Darwin.inc.php,
includes/os/class.Linux.inc.php, includes/xml/filesystems.php,
includes/xml/hardware.php, includes/xml/vitals.php: small
formatting cleanups
 
2002-10-25 18:54 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/: bg.php, big5.php, en.php, et.php, fr.php, hu.php,
id.php, ko.php, pl.php, ro.php, ru.php, tr.php, tw.php: small
formatting cleanups
 
2002-10-25 18:45 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: haven't regenerated this in a while
 
2002-10-25 18:40 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.Darwin.inc.php: 1 liner for uptime fix (Matthew
Boehm <dr_mac at mail.utexas.edu>)
 
2002-10-25 18:39 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/cn.php: Adding Simplified Chinese translation
(<dantifer at tsinghua.org.cn>)
 
2002-10-17 00:38 precision Uriah Welcome (precision at users.sf.net)
 
* includes/: system_footer.php, system_header.php: Move the
timestamp outta the <title> and onto the main page (Jeff Prom
<Jeff.Prom at us.ing.com>)
 
2002-10-17 00:37 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.NetBSD.inc.php: NetBSD swap information Fix for
>=1.6 (Cliff Albert <cliff at oisec.net>)
 
2002-10-17 00:34 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/da.php: misspelling (Esben Skov Pedersen <phreak at
geek.linux.dk>)
 
2002-10-17 00:32 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.Linux.inc.php: Use lspci on linux if it exists
idea by (Mike Beck <mikebeck @ users.sf.net>), reimplementation
by me
 
2002-10-10 00:12 precision Uriah Welcome (precision at users.sf.net)
 
* includes/XPath.class.php: updated XPath to latest stable version
 
2002-09-28 07:53 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.HP-UX.inc.php: initial (alpha quality) HP-UX
support (Webbie <webbie at ipfw.org>)
 
2002-09-10 05:41 precision Uriah Welcome (precision at users.sf.net)
 
* index.php, includes/system_header.php: Fix for new PHP (4.2.3)
(Webbie <webbie at ipfw.org>)
 
2002-09-01 17:54 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/no.php: updates from Stig-?rjan Smelror <kekepower
at susperianews.cjb.net>
 
2002-08-21 00:30 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: [no log message]
 
2002-08-20 23:55 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, phpsysinfo.dtd, includes/lang/big5.php,
includes/lang/br.php, includes/lang/ca.php, includes/lang/cs.php,
includes/lang/ct.php, includes/lang/da.php, includes/lang/de.php,
includes/lang/en.php, includes/lang/es.php, includes/lang/et.php,
includes/lang/eu.php, includes/lang/fi.php, includes/lang/fr.php,
includes/lang/he.php, includes/lang/hu.php, includes/lang/id.php,
includes/lang/is.php, includes/lang/it.php,
includes/os/class.BSD.common.inc.php,
includes/os/class.Linux.inc.php, includes/xml/hardware.php: USB
detection (Max J. Werner <max at home-werner.de>) Add dummy usb()
method to BSD common class as a place holder (me) Update the DTD
to reflect the new USB section (me)
 
2002-08-20 23:35 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.BSD.common.inc.php: don't display kernfs on
bsd, since it's always 100% (Jarkko Santala <jake at iki.fi))
 
2002-08-20 23:33 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.BSD.common.inc.php: More Verbose BSD kernel
information (Alan E <alane at geeksrus.net>)
 
2002-08-05 02:48 precision Uriah Welcome (precision at users.sf.net)
 
* includes/xml/vitals.php: fix the bug where it wouldn't display
the load average > 2
 
2002-07-02 00:03 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/ru.php: Adding Russian translation from Voldar
<voldar at stability.ru>
 
2002-06-28 17:01 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.Linux.inc.php: small alpha update
 
2002-06-28 15:27 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/big5.php: added 2 new entires to the big5
translation Webbie <webbie at ipfw.org>
 
2002-06-24 17:20 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/sv.php: Updated Swedish translation from Jonas Tull
<jetthe at home.se>
 
2002-06-18 01:41 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/: ko.php, kr.php: moving kr.php -> ko.php and
updating the charset. It appears that ko is the proper
abreviation and there is a 'new' charset.
 
2002-06-17 19:03 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/bg.php: Added Bulgarian translation from Kaloyan
Naumov <loop at nme.com>
 
2002-06-05 22:15 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, tools/GenerateChangeLog.sh, tools/MakeRelease.sh
(tags: REL-2-3, REL-2-2, REL-2-2-RC1): added tools/ added simple
shell script to create the ChangeLog added simple shell script to
clean the CVS tree for a release
 
2002-06-05 21:50 precision Uriah Welcome (precision at users.sf.net)
 
* README, index.php: bumped version number to 2.2-cvs
 
2002-06-05 21:36 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog (tags: REL-2-1): updated
 
2002-06-05 21:16 precision Uriah Welcome (precision at users.sf.net)
 
* README (tags: REL-2-1): small formatting changes. Added a known
problems section.
 
2002-06-05 21:12 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.Linux.inc.php (tags: REL-2-1): Changed memory
reporting to include buffers and disk cache in 'used' memory. I
get too many emails from people who don't understand this concept
and wonder why it's different from 'top' or 'free'.
 
2002-06-01 06:48 precision Uriah Welcome (precision at users.sf.net)
 
* index.php (tags: REL-2-1): small cleanups..
 
2002-06-01 06:34 precision Uriah Welcome (precision at users.sf.net)
 
* index.php, includes/common_functions.php (tags: REL-2-1),
includes/os/class.Linux.inc.php: removed php3 compat functions,
since XPath requires php4 so do we now, no use having the compat
functions.
 
2002-06-01 06:24 precision Uriah Welcome (precision at users.sf.net)
 
* index.php: Had to move language outside the conditional, the os
classes use them some places..
 
2002-05-31 22:40 precision Uriah Welcome (precision at users.sf.net)
 
* index.php: moved more stuff inside the XML conditional, we don't
need templates or languages for XML
 
2002-05-31 21:45 precision Uriah Welcome (precision at users.sf.net)
 
* README, index.php, phpsysinfo.dtd (tags: REL-2-1),
includes/common_functions.php, includes/system_footer.php (tags:
REL-2-1), includes/system_header.php (tags: REL-2-1): Added some
generation information that might be useful to the XML template
Added a global $VERSION Added a small HTML/XML comment showing
our URL
 
2002-05-31 20:09 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, index.php, includes/system_footer.php: added 'random'
template support. closes feature request #562164
 
2002-05-31 19:40 precision Uriah Welcome (precision at users.sf.net)
 
* index.php, includes/common_functions.php,
includes/system_footer.php, includes/system_header.php,
includes/os/class.BSD.common.inc.php (tags: REL-2-1),
includes/os/class.Darwin.inc.php (tags: REL-2-1),
includes/os/class.FreeBSD.inc.php (tags: REL-2-1),
includes/os/class.Linux.inc.php, includes/os/class.NetBSD.inc.php
(tags: REL-2-1), includes/os/class.OpenBSD.inc.php (tags:
REL-2-1): Code Cleanups Remove network_connections() from
class.Linux since we never used it
 
2002-05-31 19:00 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: [no log message]
 
2002-05-31 18:59 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/eu.php (tags: REL-2-1): adding the Basque Language
(eu.php). Andoni <andonisz at ibercom.com>
 
2002-05-30 05:21 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: Changed format to what rcs2log generates..
 
2002-05-30 05:11 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: tabs to spaces
 
2002-05-30 05:09 precision Uriah Welcome (precision at users.sf.net)
 
* index.php, phpsysinfo.dtd: don't need the URL in the dtd link all
the CPU information should be optional
 
2002-05-30 05:03 precision Uriah Welcome (precision at users.sf.net)
 
* README: email address updates
 
2002-05-30 05:02 precision Uriah Welcome (precision at users.sf.net)
 
* README: formatting cleanups
 
2002-05-30 05:00 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, INSTALL, README: Removed INSTALL, merged any useful
information into README
 
2002-05-30 00:13 precision Uriah Welcome (precision at users.sf.net)
 
* phpsysinfo.dtd: forgot we need mulitples for <device>
 
2002-05-30 00:12 precision Uriah Welcome (precision at users.sf.net)
 
* includes/xml/network.php (tags: REL-2-1): <device> -> <NetDevice>
 
2002-05-30 00:08 precision Uriah Welcome (precision at users.sf.net)
 
* index.php: small cleanups
 
2002-05-29 23:52 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, index.php: added DTD support, we can validate now..
 
2002-05-29 23:45 precision Uriah Welcome (precision at users.sf.net)
 
* phpsysinfo.dtd: adding XML DTD (We can Validate now!)
 
2002-05-29 22:04 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.Linux.inc.php: [no log message]
 
2002-05-29 22:01 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.Linux.inc.php: small fix for bogomips on sparc
linux
 
2002-05-28 18:49 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/XPath.class.php (tags: REL-2-1): updated
xpath class
 
2002-05-20 18:09 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/cs.php (tags: REL-2-1): updated
translation
 
2002-05-08 20:17 precision Uriah Welcome (precision at users.sf.net)
 
* index.php: don't set a cookie if we're using the xml template..
 
2002-05-03 18:58 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, index.php: store the template as a cookie
 
2002-05-03 18:56 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: orange template
 
2002-05-03 18:55 precision Uriah Welcome (precision at users.sf.net)
 
* templates/orange/: box.tpl (tags: REL-2-3, REL-2-2, REL-2-2-RC1),
form.tpl, orange.css (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1),
images/bar_left.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1),
images/bar_middle.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1),
images/bar_right.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1),
images/redbar_left.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1),
images/redbar_middle.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1),
images/redbar_right.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1), images/trans.gif
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3,
REL-2-2, REL-2-2-RC1) (utags: REL-2-1): added the orange template
 
2002-04-16 17:36 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/os/class.BSD.common.inc.php: obsd memory
updates
 
2002-04-16 17:31 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/tr.php (tags: REL-2-1),
includes/os/class.Linux.inc.php: alpha cpu updates added turkish
translation
 
2002-04-12 17:19 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/os/class.Linux.inc.php: better 2.2 alpha
support
 
2002-04-12 16:35 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/es.php (tags: REL-2-1): updated spanish translation
 
2002-04-09 17:14 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/es.php: updates spanish translation
 
2002-04-08 19:12 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: hewbrew
 
2002-04-08 19:12 precision Uriah Welcome (precision at users.sf.net)
 
* includes/: system_header.php, lang/he.php (tags: REL-2-1): Hebrew
language & text alignment
 
2002-04-04 19:10 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.Darwin.inc.php: small regex to remove
<classIOPCIDevice> since XPath doens't like it.
 
2002-04-04 18:54 precision Uriah Welcome (precision at users.sf.net)
 
* includes/xml/filesystems.php (tags: REL-2-1): small fix for
filesystem percentage..
 
2002-04-04 17:56 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/hu.php (tags: REL-2-1): added .hu
translation
 
2002-04-02 19:22 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.BSD.common.inc.php: don't display linux /procfs
compat..
 
2002-04-02 19:21 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: don't display linux compatibility procfs
 
2002-04-02 19:17 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/: class.Darwin.inc.php, class.NetBSD.inc.php: updated
class files!
 
2002-04-02 19:16 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: added new os class files
 
2002-03-21 19:59 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/en.php (tags: REL-2-1): typo
 
2002-03-05 22:55 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/os/class.BSD.common.inc.php: patch for bsd
ide
 
2002-03-04 19:55 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.OpenBSD.inc.php: small cpu regexp fix
 
2002-02-25 21:53 precision Uriah Welcome (precision at users.sf.net)
 
* index.php: added xml encoding type and moved a if clause so not
to produce a php error.
 
2002-02-25 21:15 precision Uriah Welcome (precision at users.sf.net)
 
* includes/common_functions.php: added fix in format_bytesize() we
shouldn't put &nbsp's into XML
 
2002-02-25 19:59 precision Uriah Welcome (precision at users.sf.net)
 
* includes/: common_functions.php, xml/filesystems.php,
xml/hardware.php (tags: REL-2-1), xml/memory.php (tags: REL-2-1),
xml/network.php, xml/vitals.php (tags: REL-2-1): minor cleanups
 
2002-02-25 19:47 precision Uriah Welcome (precision at users.sf.net)
 
* includes/XPath.class.php: removed the deprecated stuff since we
don't use it
 
2002-02-22 21:15 precision Uriah Welcome (precision at users.sf.net)
 
* includes/xml/hardware.php: oops forgot ide() needs $text;
 
2002-02-22 21:12 precision Uriah Welcome (precision at users.sf.net)
 
* index.php: [no log message]
 
2002-02-22 21:05 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, index.php: type fix, fix ?template=xml
 
2002-02-22 21:03 precision Uriah Welcome (precision at users.sf.net)
 
* templates/xml/: box.tpl, form.tpl: unneeded
 
2002-02-22 20:10 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, index.php, includes/XPath.class.php,
includes/xml/filesystems.php, includes/xml/hardware.php,
includes/xml/memory.php, includes/xml/network.php,
includes/xml/vitals.php: removed all the include/tables/*, added
functionality into xml classes.
 
2002-02-19 04:44 precision Uriah Welcome (precision at users.sf.net)
 
* index.php, includes/xml/filesystems.php,
includes/xml/hardware.php, includes/xml/memory.php,
includes/xml/network.php, includes/xml/vitals.php: changed the
xml funtions to retunr the data instead of directly doing the
template work. I hope to remove the stuff in include/tables/*
and just have the xml stuff w/ some small xml->html wrappers.
 
2002-02-18 20:10 precision Uriah Welcome (precision at users.sf.net)
 
* includes/: common_functions.php, xml/network.php, xml/vitals.php:
removed &nbsp's for xml and added a trim()
 
2002-02-18 19:55 precision Uriah Welcome (precision at users.sf.net)
 
* index.php: oops.. no images for XML
 
2002-02-18 19:53 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, index.php, includes/xml/filesystems.php,
includes/xml/hardware.php, includes/xml/memory.php,
includes/xml/network.php, includes/xml/vitals.php,
templates/xml/box.tpl, templates/xml/form.tpl: Added initial XML
implementation
 
2002-02-18 05:50 precision Uriah Welcome (precision at users.sf.net)
 
* includes/system_footer.php: changed version to 2.1-cvs
 
2002-02-18 05:39 precision Uriah Welcome (precision at users.sf.net)
 
* INSTALL: added a note about safe_mode
 
2002-02-07 06:32 precision Uriah Welcome (precision at users.sf.net)
 
* README (tags: REL-2-0): foo
 
2002-02-04 01:27 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/os/class.BSD.common.inc.php (utags: REL-2-0):
uniq the pci, ide, and scsi arrays
 
2002-01-17 00:55 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, templates/metal/images/redbar_left.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2,
REL-2-2-RC1, REL-2-1, REL-2-0),
templates/metal/images/redbar_middle.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1,
REL-2-1, REL-2-0), templates/metal/images/redbar_right.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2,
REL-2-2-RC1, REL-2-1, REL-2-0): cosmetic cleanups from webbie (webbie at ipfw dot org)
 
2002-01-15 09:00 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/os/class.BSD.common.inc.php: more fbsd memory
fixes
 
2002-01-15 08:54 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.BSD.common.inc.php: [no log message]
 
2002-01-14 03:55 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.OpenBSD.inc.php (tags: REL-2-0): only show
network interfaces that have recieved packets
 
2002-01-14 03:51 precision Uriah Welcome (precision at users.sf.net)
 
* includes/os/class.FreeBSD.inc.php (tags: REL-2-0): quick hack to
only show interfaces that have sent packets
 
2002-01-11 01:25 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/it.php (tags: REL-2-1, REL-2-0): updated
it.php
 
2002-01-09 21:44 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/common_functions.php (tags: REL-2-0): added
iso9660 patch
 
2002-01-09 21:37 precision Uriah Welcome (precision at users.sf.net)
 
* includes/: class.Template.inc.php (tags: REL-2-1),
system_header.php (utags: REL-2-0): HTML cleanups forgot a couple
$f_body_close's which was causing invalid HTML
 
2002-01-04 17:42 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, templates/aq/aq.css (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1,
REL-2-1, REL-2-0), templates/blue/blue.css (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1,
REL-2-1, REL-2-0), templates/classic/classic.css (tags: REL-2-1,
REL-2-0), templates/metal/metal.css (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1,
REL-2-1, REL-2-0): more CSS fixes from Webbie
 
2002-01-01 00:36 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, INSTALL (tags: REL-2-0): misc little updates..
 
2002-01-01 00:24 precision Uriah Welcome (precision at users.sf.net)
 
* index.php (tags: REL-2-0), includes/table_filesystems.php,
includes/table_hardware.php, includes/table_memory.php,
includes/table_network.php, includes/table_vitals.php: moved
table includes into their own directory
 
2002-01-01 00:12 precision Uriah Welcome (precision at users.sf.net)
 
* index.php, includes/table_filesystems.php,
includes/table_network.php: added the font tags properly.. since
I removed color_scheme
 
2001-12-31 23:59 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, index.php, includes/color_scheme.php: removed
color_scheme.php
 
2001-12-31 23:54 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, index.php, includes/class.BSD.common.inc.php,
includes/class.Darwin.inc.php, includes/class.FreeBSD.inc.php,
includes/class.Linux.inc.php, includes/class.NetBSD.inc.php,
includes/class.OpenBSD.inc.php,
includes/os/class.BSD.common.inc.php,
includes/os/class.Darwin.inc.php (tags: REL-2-0),
includes/os/class.FreeBSD.inc.php,
includes/os/class.Linux.inc.php (tags: REL-2-0),
includes/os/class.NetBSD.inc.php (tags: REL-2-0),
includes/os/class.OpenBSD.inc.php: moved all the os based
includes into include/os/
 
2001-12-31 23:47 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, index.php, includes/system_header.php,
templates/aq/aq.css, templates/aq/form.tpl (tags: REL-2-1,
REL-2-0), templates/black/black.css (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1,
REL-2-1, REL-2-0), templates/black/form.tpl (tags: REL-2-1,
REL-2-0), templates/blue/blue.css, templates/blue/box.tpl (tags:
REL-2-3, REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0),
templates/classic/box.tpl (tags: REL-2-3, REL-2-2, REL-2-2-RC1,
REL-2-1, REL-2-0), templates/classic/classic.css,
templates/classic/form.tpl (tags: REL-2-1, REL-2-0),
templates/metal/form.tpl (tags: REL-2-1, REL-2-0),
templates/metal/metal.css: Added CSS patch from Webbie
 
2001-12-29 09:03 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: [no log message]
 
2001-12-29 08:55 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/id.php (tags: REL-2-1, REL-2-0): updated
id.php
 
2001-12-17 18:22 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, index.php: added small patch from webbie (webbie at ipfw dot org)
 
2001-12-14 04:34 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/system_header.php, templates/black/black.css:
default css stuff
 
2001-12-13 21:16 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/ca.php (tags: REL-2-1, REL-2-0): added
ca language
 
2001-12-09 09:18 precision Uriah Welcome (precision at users.sf.net)
 
* README: added note about freebsd removing /var/run/dmesg.boot.
Clean'd up a little
 
2001-12-09 09:12 precision Uriah Welcome (precision at users.sf.net)
 
* includes/class.BSD.common.inc.php: added bsd pci() patch from
Alan Eldridge
 
2001-12-04 00:37 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/class.Darwin.inc.php: added initial Darwin
support
 
2001-12-04 00:00 precision Uriah Welcome (precision at users.sf.net)
 
* includes/class.BSD.common.inc.php: fixed for patch :)
 
2001-12-03 23:55 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/class.BSD.common.inc.php: fixed bsd memory
size reporting..
 
2001-11-23 06:26 precision Uriah Welcome (precision at users.sf.net)
 
* index.php, includes/class.BSD.common.inc.php,
includes/class.FreeBSD.inc.php, includes/class.Linux.inc.php,
includes/class.OpenBSD.inc.php, includes/common_functions.php,
includes/system_header.php, includes/table_network.php,
includes/table_vitals.php: white space removal, cleanups
 
2001-11-17 20:13 precision Uriah Welcome (precision at users.sf.net)
 
* includes/class.BSD.common.inc.php: mhz bug on freebsd
 
2001-11-15 17:35 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/kr.php (tags: REL-2-1, REL-2-0): updated
korean translation
 
2001-11-15 05:11 precision Uriah Welcome (precision at users.sf.net)
 
* includes/: class.BSD.common.inc.php, class.FreeBSD.inc.php,
class.OpenBSD.inc.php: coverting tabs..
 
2001-11-13 23:03 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/class.OpenBSD.inc.php: fixed pci/ide
reporting
 
2001-11-13 21:27 precision Uriah Welcome (precision at users.sf.net)
 
* includes/: class.NetBSD.inc.php, class.OpenBSD.inc.php: bsd
fixes.
 
2001-11-13 20:29 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/class.NetBSD.inc.php: Added NetBSD support
 
2001-11-13 20:26 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/class.BSD.common.inc.php,
includes/class.FreeBSD.inc.php, includes/class.OpenBSD.inc.php:
removed $this->sysctl_sep, made $this->grab_key() handle it
nicely
 
2001-11-13 17:48 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/sk.php (tags: REL-2-1, REL-2-0): updated
slovak translation (stenzel <stenzel at inmail.sk>)
 
2001-11-13 01:16 precision Uriah Welcome (precision at users.sf.net)
 
* INSTALL, README: notes updates about bsd.
 
2001-11-13 00:56 precision Uriah Welcome (precision at users.sf.net)
 
* includes/: class.BSD.common.inc.php, class.Linux.inc.php: adding
comments
 
2001-11-13 00:45 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/class.BSD.common.inc.php,
includes/class.FreeBSD.inc.php, includes/class.OpenBSD.inc.php:
BSD Updates
 
2001-11-13 00:41 precision Uriah Welcome (precision at users.sf.net)
 
* includes/class.FreeBSD.inc.php: moving cpu_info() and scsi_info()
back into BSD.common
 
2001-11-13 00:39 precision Uriah Welcome (precision at users.sf.net)
 
* includes/: class.BSD.common.inc.php, class.OpenBSD.inc.php:
genericizing the regexps
 
2001-11-12 22:41 precision Uriah Welcome (precision at users.sf.net)
 
* includes/class.BSD.common.inc.php: stupid vi.. ignoring my
options.. tab to space..
 
2001-11-12 22:39 precision Uriah Welcome (precision at users.sf.net)
 
* includes/: class.BSD.common.inc.php, class.FreeBSD.inc.php: very
minor cleanups
 
2001-11-12 22:36 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/class.BSD.common.inc.php,
includes/class.FreeBSD.inc.php, includes/class.OpenBSD.inc.php:
changed read_dmesg() to return $this->dmesg
 
2001-11-12 22:31 precision Uriah Welcome (precision at users.sf.net)
 
* index.php: tabs -> spaces cleansup
 
2001-11-12 22:31 precision Uriah Welcome (precision at users.sf.net)
 
* includes/: class.BSD.common.inc.php, class.OpenBSD.inc.php,
common_functions.php: tabs -> spaces cleanups
 
2001-11-12 22:28 precision Uriah Welcome (precision at users.sf.net)
 
* includes/class.FreeBSD.inc.php: remove grab_key() from freebsd
classfile
 
2001-11-12 22:23 precision Uriah Welcome (precision at users.sf.net)
 
* includes/: class.BSD.common.inc.php, class.OpenBSD.inc.php:
forgot to cvs add..
 
2001-11-12 21:54 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/class.FreeBSD.inc.php: added OpenBSD support
(Scott Lipcon <slipcon at mercea.net>) added
class.BSD.common.inc.php (me) genericized class.FreeBSD.inc.php
to use new common class (me) genericized class.OpenBSD.inc.php to
use new common class (me)
 
2001-11-12 20:32 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/sk.php: added slovak translation..
 
2001-11-11 08:55 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/class.FreeBSD.inc.php: fixed filesystem
output ti display even if proc isn't the last filesystem (Alan
Eldridge)
 
2001-11-11 06:58 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, README, includes/system_footer.php (tags: REL-2-0):
tag'd rel-1-9 updated for the 2.0 devel cycle
 
2001-11-11 06:21 precision Uriah Welcome (precision at users.sf.net)
 
* includes/class.FreeBSD.inc.php (tags: rel-1-9): small cleanups..
remove the note about FreeBSD support being unstable..
 
2001-11-07 19:15 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/: se.php, sv.php (tags: REL-2-1, REL-2-0, rel-1-9):
se.php -> sv.php
 
2001-11-07 17:56 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, index.php (utags: rel-1-9): fix bug w/ templates when
register_globals is off
 
2001-11-06 00:45 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: [no log message]
 
2001-11-05 22:44 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/id.php (tags: rel-1-9): added Indonesian
translation
 
2001-11-04 19:54 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/class.FreeBSD.inc.php: added 2 patches from
Alan E
 
2001-10-25 19:59 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/ct.php (tags: REL-2-1, REL-2-0,
rel-1-9), includes/lang/se.php: added catalan tranlstion updated
swedish translation
 
2001-10-15 14:14 jengo Joseph Engo (jengo at users.sf.net)
 
* includes/class.FreeBSD.inc.php: Fix for network information not
being displayed. Refear to
http://sourceforge.net/forum/message.php?msg_id=248743
 
2001-10-15 02:28 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/class.FreeBSD.inc.php: Updated Webbie's patch
so that we only read /var/run/dmesg.boot once
 
2001-10-15 01:32 precision Uriah Welcome (precision at users.sf.net)
 
* includes/class.FreeBSD.inc.php: skip the proc filesystem
 
2001-10-15 01:18 precision Uriah Welcome (precision at users.sf.net)
 
* includes/class.FreeBSD.inc.php: remove cruft from old linux class
 
2001-10-15 01:15 precision Uriah Welcome (precision at users.sf.net)
 
* includes/table_hardware.php (tags: rel-1-9): Only print hardware
we have..
 
2001-10-15 01:05 precision Uriah Welcome (precision at users.sf.net)
 
* includes/class.FreeBSD.inc.php: sort the pci array
 
2001-10-14 21:20 precision Uriah Welcome (precision at users.sf.net)
 
* includes/class.FreeBSD.inc.php: stupid
 
2001-10-14 21:18 precision Uriah Welcome (precision at users.sf.net)
 
* includes/class.FreeBSD.inc.php: changing $this->getkey() to use
execute_program()
 
2001-10-14 18:42 neostrider Joseph King (neostrider at users.sf.net)
 
* includes/class.FreeBSD.inc.php:
Correction to Memory Usage free reporting.
 
2001-10-14 18:39 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: patch from webbie (webbie at ipfw dot org)
 
2001-10-14 18:29 precision Uriah Welcome (precision at users.sf.net)
 
* includes/class.FreeBSD.inc.php: Added patch from Webbie
 
2001-10-10 23:46 precision Uriah Welcome (precision at users.sf.net)
 
* includes/class.FreeBSD.inc.php: memory detection
 
2001-10-07 19:05 precision Uriah Welcome (precision at users.sf.net)
 
* index.php: formatting
 
2001-10-07 08:35 precision Uriah Welcome (precision at users.sf.net)
 
* INSTALL (tags: rel-1-9): added not about freebsd support
 
2001-10-07 08:21 precision Uriah Welcome (precision at users.sf.net)
 
* includes/common_functions.php (tags: rel-1-9): comment about pipe
checking..
 
2001-10-07 08:18 precision Uriah Welcome (precision at users.sf.net)
 
* includes/class.Linux.inc.php (tags: rel-1-9): oops.. removed a
test case..
 
2001-10-07 08:18 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/class.FreeBSD.inc.php,
includes/class.Linux.inc.php, includes/common_functions.php: pipe
away execute_program()
 
2001-10-07 07:57 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/common_functions.php: seperated
execute_program() into 2 functions.. find_program() and
execute_program() now just to add pipe checking and path
checking..
 
2001-10-07 07:42 precision Uriah Welcome (precision at users.sf.net)
 
* includes/system_footer.php (tags: rel-1-9): oops
 
2001-10-07 07:42 precision Uriah Welcome (precision at users.sf.net)
 
* README (tags: rel-1-9), includes/system_footer.php: updating
version number to 1.9
 
2001-10-07 07:41 precision Uriah Welcome (precision at users.sf.net)
 
* index.php: very minor cleanup consistancy
 
2001-10-07 07:24 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/class.FreeBSD.inc.php,
includes/common_functions.php: adding freebsd patch from webbie (webbie at ipfw dot org)
code formats and cleanups changed from ``'s to execute_program()
 
2001-10-07 06:55 precision Uriah Welcome (precision at users.sf.net)
 
* templates/: aq/box.tpl, black/box.tpl, metal/box.tpl (utags:
REL-2-0, REL-2-1, rel-1-9): adding 'alt' tags
 
2001-10-07 06:47 precision Uriah Welcome (precision at users.sf.net)
 
* includes/common_functions.php: removed / nothing special..
 
2001-10-06 19:59 precision Uriah Welcome (precision at users.sf.net)
 
* includes/class.FreeBSD.inc.php: formatting.
 
2001-10-06 19:57 precision Uriah Welcome (precision at users.sf.net)
 
* includes/class.Linux.inc.php: formatting
 
2001-10-06 19:52 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: [no log message]
 
2001-10-06 19:50 precision Uriah Welcome (precision at users.sf.net)
 
* includes/class.Linux.inc.php: sys_chostname() -> chostname()
 
2001-10-04 21:20 precision Uriah Welcome (precision at users.sf.net)
 
* includes/table_hardware.php: formatting
 
2001-10-04 21:15 precision Uriah Welcome (precision at users.sf.net)
 
* includes/class.FreeBSD.inc.php: formatting update
 
2001-10-03 17:46 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: misspelt Weissmann
 
2001-09-21 21:24 precision Uriah Welcome (precision at users.sf.net)
 
* includes/color_scheme.php (tags: rel-1-9): $textcolor ->
$fontcolor.. oops
 
2001-09-19 18:01 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/big5.php (tags: REL-2-1, REL-2-0,
rel-1-9): adding big5 translation
 
2001-09-17 17:56 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, index.php: added browser language detection
 
2001-09-17 17:49 precision Uriah Welcome (precision at users.sf.net)
 
* templates/black/: box.tpl, form.tpl (tags: rel-1-9),
images/aq_background.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0,
rel-1-9), images/bar_left.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1,
REL-2-1, REL-2-0, rel-1-9), images/bar_middle.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2,
REL-2-2-RC1, REL-2-1, REL-2-0, rel-1-9), images/bar_right.gif
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3,
REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0, rel-1-9),
images/coininfd.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0,
rel-1-9), images/coininfg.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1,
REL-2-1, REL-2-0, rel-1-9), images/coinsupd.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2,
REL-2-2-RC1, REL-2-1, REL-2-0, rel-1-9), images/coinsupg.gif
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3,
REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0, rel-1-9), images/d.gif
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3,
REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0, rel-1-9), images/fond.gif
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3,
REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0, rel-1-9), images/g.gif
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3,
REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0, rel-1-9), images/inf.gif
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3,
REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0, rel-1-9),
images/redbar_left.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0,
rel-1-9), images/redbar_middle.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1,
REL-2-1, REL-2-0, rel-1-9), images/redbar_right.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2,
REL-2-2-RC1, REL-2-1, REL-2-0, rel-1-9), images/space15_15.gif
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3,
REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0, rel-1-9), images/sup.gif
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3,
REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0, rel-1-9): adding black
template
 
2001-09-13 00:24 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/br.php (tags: REL-2-1, REL-2-0,
rel-1-9): updaing br translation
 
2001-09-04 17:20 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/pl.php (tags: REL-2-1, REL-2-0,
rel-1-9): added polish translation
 
2001-08-20 17:26 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/tw.php (tags: REL-2-1, REL-2-0,
rel-1-9): added Traditional-Chinese translation..
 
2001-08-20 17:22 precision Uriah Welcome (precision at users.sf.net)
 
* templates/metal/: box.tpl, form.tpl (tags: rel-1-9),
images/bar_left.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0,
rel-1-9), images/bar_middle.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1,
REL-2-1, REL-2-0, rel-1-9), images/bar_right.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2,
REL-2-2-RC1, REL-2-1, REL-2-0, rel-1-9), images/coininfd.gif
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3,
REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0, rel-1-9),
images/coininfg.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0,
rel-1-9), images/coinsupd.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1,
REL-2-1, REL-2-0, rel-1-9), images/coinsupg.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2,
REL-2-2-RC1, REL-2-1, REL-2-0, rel-1-9), images/d.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2,
REL-2-2-RC1, REL-2-1, REL-2-0, rel-1-9), images/fond.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2,
REL-2-2-RC1, REL-2-1, REL-2-0, rel-1-9), images/g.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2,
REL-2-2-RC1, REL-2-1, REL-2-0, rel-1-9), images/inf.gif (tags:
REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2,
REL-2-2-RC1, REL-2-1, REL-2-0, rel-1-9),
images/metal_background.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0,
rel-1-9), images/redbar_left.gif (tags: rel-1-9),
images/redbar_middle.gif (tags: rel-1-9), images/redbar_right.gif
(tags: rel-1-9), images/space15_15.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1,
REL-2-1, REL-2-0, rel-1-9), images/sup.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1,
REL-2-1, REL-2-0, rel-1-9): adding metal theme..
 
2001-08-09 22:28 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/nl.php (tags: REL-2-1, REL-2-0,
rel-1-9): updated Dutch translation (Vincent van Adrighem
<vincent at dirck.mine.nu>)
 
2001-08-06 18:52 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: adding info about german update
 
2001-08-06 18:50 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/de.php (tags: REL-2-1, REL-2-0, rel-1-9): updated
de.php patch # 447446
 
2001-08-05 08:56 jengo Joseph Engo (jengo at users.sf.net)
 
* includes/class.FreeBSD.inc.php: Added the new FreeBSD class
 
2001-08-03 18:45 precision Uriah Welcome (precision at users.sf.net)
 
* includes/common_functions.php: more formatting..
 
2001-08-03 18:45 precision Uriah Welcome (precision at users.sf.net)
 
* includes/class.Linux.inc.php: fixing jengo's formatting
 
2001-08-03 18:41 precision Uriah Welcome (precision at users.sf.net)
 
* index.php: fixing jengo's formatting
 
2001-08-02 23:16 jengo Joseph Engo (jengo at users.sf.net)
 
* includes/common_functions.php: I forgot to add this file in
durring my initial commit
 
2001-08-02 23:15 jengo Joseph Engo (jengo at users.sf.net)
 
* index.php, includes/class.Linux.inc.php: Changed some code format
 
2001-08-02 22:41 jengo Joseph Engo (jengo at users.sf.net)
 
* index.php, includes/class.Linux.inc.php,
includes/system_functions.php, includes/table_filesystems.php
(tags: rel-1-9), includes/table_hardware.php,
includes/table_memory.php (tags: rel-1-9),
includes/table_network.php (tags: rel-1-9),
includes/table_vitals.php (tags: rel-1-9),
templates/classic/images/bar_left.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1,
REL-2-1, REL-2-0, rel-1-9),
templates/classic/images/bar_middle.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1,
REL-2-1, REL-2-0, rel-1-9),
templates/classic/images/bar_right.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1,
REL-2-1, REL-2-0, rel-1-9),
templates/classic/images/redbar_left.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1,
REL-2-1, REL-2-0, rel-1-9),
templates/classic/images/redbar_middle.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1,
REL-2-1, REL-2-0, rel-1-9),
templates/classic/images/redbar_right.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1,
REL-2-1, REL-2-0, rel-1-9): - Started working on abstracting the
system functions to support multiable OS's - Added code to detect
to size of the bar graph image so it looks nice - Started added
sections to allow easy installation under phpGroupWare
 
2001-07-05 23:09 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, index.php: added fix incase register_globals is off
 
2001-07-05 23:01 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, index.php, includes/system_header.php (tags: rel-1-9):
added timestamp to the <TITLE></TITLE>
 
2001-07-05 22:54 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/system_functions.php, includes/lang/nl.php,
includes/lang/ro.php (tags: REL-2-1, REL-2-0, rel-1-9): updated
ro and nl tranlations removed display of filesystems that are
mounted with '-o bind'
 
2001-06-29 21:03 precision Uriah Welcome (precision at users.sf.net)
 
* index.php: oops.. shouldn't have commited this quite yet
 
2001-06-29 20:57 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/fi.php (tags: REL-2-1, REL-2-0,
rel-1-9): added finnish language
 
2001-06-29 17:14 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/is.php (tags: REL-2-1, REL-2-0,
rel-1-9): added is.php
 
2001-06-25 12:35 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/kr.php (tags: rel-1-9),
includes/lang/ro.php: added 2 translations..
 
2001-06-02 03:35 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/et.php (tags: REL-2-1, REL-2-0,
rel-1-9): updated et translation
 
2001-06-02 03:33 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, index.php, includes/table_hardware.php: added
format_bytesize() call to capacity..
 
2001-05-31 17:23 precision Uriah Welcome (precision at users.sf.net)
 
* index.php, includes/system_footer.php: fixing sf bug # 428980
 
2001-05-31 17:15 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, index.php, includes/system_functions.php,
includes/lang/da.php (tags: REL-2-1, REL-2-0, rel-1-9),
includes/lang/en.php (tags: REL-2-0, rel-1-9),
includes/lang/fr.php (tags: REL-2-1, REL-2-0, rel-1-9),
includes/lang/nl.php: translation updates
 
2001-05-31 04:43 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, README, index.php, includes/system_footer.php: small
cleanup and imcremented the version to 1.8.
 
2001-05-31 04:13 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: unspamified the email addresses..
 
2001-05-30 18:29 precision Uriah Welcome (precision at users.sf.net)
 
* INSTALL, includes/system_footer.php: oops.. michael's patch
reverted the version
 
2001-05-30 18:27 precision Uriah Welcome (precision at users.sf.net)
 
* index.php: oops.. forgot a $lang->$lng conversion
 
2001-05-30 18:25 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: added extra notes about Michael's patches
 
2001-05-30 18:24 precision Uriah Welcome (precision at users.sf.net)
 
* includes/system_functions.php: tabs -> spaces
 
2001-05-30 18:22 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, index.php, includes/system_footer.php,
includes/system_functions.php, includes/system_header.php,
includes/lang/br.php, includes/lang/cs.php (tags: REL-2-0,
rel-1-9), includes/lang/da.php, includes/lang/de.php,
includes/lang/en.php, includes/lang/es.php (tags: REL-2-0,
rel-1-9), includes/lang/et.php, includes/lang/fr.php,
includes/lang/it.php (tags: rel-1-9), includes/lang/lt.php (tags:
REL-2-1, REL-2-0, rel-1-9), includes/lang/nl.php,
includes/lang/no.php (tags: REL-2-1, REL-2-0, rel-1-9),
includes/lang/se.php: added patches from Michal Cihar
 
2001-05-30 18:07 precision Uriah Welcome (precision at users.sf.net)
 
* templates/classic/form.tpl (tags: rel-1-9): added a <br>
 
2001-05-30 18:07 precision Uriah Welcome (precision at users.sf.net)
 
* templates/blue/: box.tpl, form.tpl (tags: REL-2-1, REL-2-0),
images/bar_left.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0),
images/bar_middle.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0),
images/bar_right.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0),
images/redbar_left.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0),
images/redbar_middle.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0),
images/redbar_right.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0),
images/trans.gif (tags: REL-2-5-3-RC2, REL-2-5-3-RC1,
REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0)
(utags: rel-1-9): adding the 'blue' template (Michal Cihar
<cihar@email.cz>)
 
2001-05-29 22:08 precision Uriah Welcome (precision at users.sf.net)
 
* README, includes/system_footer.php: incremented version to 1.7
 
2001-05-29 22:03 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/system_header.php: added css code
 
2001-05-29 21:55 precision Uriah Welcome (precision at users.sf.net)
 
* includes/lang/no.php: updated no.php
 
2001-05-29 21:52 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: note about the fs fix
 
2001-05-29 21:41 precision Uriah Welcome (precision at users.sf.net)
 
* includes/system_functions.php: oops.. someones patch had a bug
 
2001-05-29 03:07 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/system_functions.php: fixed percentage free
reports in sys_fsinfo()
 
2001-05-29 01:56 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: typo
 
2001-05-29 01:56 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: added note about HTML validator
 
2001-05-29 01:54 precision Uriah Welcome (precision at users.sf.net)
 
* includes/system_footer.php, includes/system_functions.php,
templates/classic/box.tpl (tags: rel-1-9),
templates/classic/form.tpl: HTML fixes. classic template is now
HTML 4.01 compliant and passes the validator
 
2001-05-29 01:31 precision Uriah Welcome (precision at users.sf.net)
 
* index.php, includes/system_footer.php,
includes/system_functions.php, includes/table_filesystems.php,
includes/table_hardware.php, includes/table_memory.php,
includes/table_network.php, includes/table_vitals.php: formatting
& cleanups
 
2001-05-29 01:08 precision Uriah Welcome (precision at users.sf.net)
 
* index.php, includes/system_functions.php: cleanups
 
2001-05-29 00:55 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, index.php, includes/table_filesystems.php,
includes/table_hardware.php, includes/table_memory.php,
includes/table_network.php, includes/table_vitals.php: more
cleanups, removed extra color_scheme includes..
 
2001-05-29 00:51 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, index.php, includes/color_scheme.php,
includes/system_footer.php, includes/system_functions.php,
includes/system_header.php, includes/table_filesystems.php,
includes/table_hardware.php, includes/table_memory.php,
includes/table_network.php, includes/table_vitals.php: code
formatting, changed tabs to spaces include()'s to
require_once()'s
 
2001-05-28 10:31 precision Uriah Welcome (precision at users.sf.net)
 
* README: added note about language selector
 
2001-05-28 10:21 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: added note about language selector
 
2001-05-28 10:20 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, INSTALL, index.php, includes/system_footer.php,
includes/system_functions.php, includes/system_header.php: added
language selector
 
2001-05-28 08:55 precision Uriah Welcome (precision at users.sf.net)
 
* includes/system_functions.php: removed old line.. I also cleans
up sys_users()
 
2001-05-28 08:54 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog: added execute_program() note..
 
2001-05-28 08:53 precision Uriah Welcome (precision at users.sf.net)
 
* includes/system_functions.php: added execute_program(). Pass it
a command and args it looks threw a internal path and executes
whichever binary is first..
 
2001-05-28 07:43 precision Uriah Welcome (precision at users.sf.net)
 
* includes/system_footer.php: formatting
 
2001-05-28 07:42 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, README, index.php, includes/system_footer.php,
includes/system_functions.php, includes/table_network.php:
incremented version to 1.6, added template changer form (me &
Jesse jesse@krylotek.com), misc code cleanups (me)
 
2001-05-27 23:28 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/br.php, templates/aq/images/bar_left.gif
(tags: REL-2-1, REL-2-0, rel-1-9),
templates/aq/images/bar_middle.gif (tags: REL-2-1, REL-2-0,
rel-1-9), templates/aq/images/bar_right.gif (tags: REL-2-1,
REL-2-0, rel-1-9): added blue bars for aq, added brazilian
translation
 
2001-05-24 21:21 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/system_functions.php,
includes/system_header.php, includes/table_filesystems.php,
includes/table_memory.php, includes/table_network.php: added HTML
core validation
 
2001-05-21 23:34 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/lang/da.php, includes/lang/nl.php: added new
translations
 
2001-05-18 21:03 precision Uriah Welcome (precision at users.sf.net)
 
* README: final notes before packaging..
 
2001-05-18 20:57 precision Uriah Welcome (precision at users.sf.net)
 
* ChangeLog, includes/system_footer.php: changed version to 1.5
 
2001-05-18 20:54 precision Uriah Welcome (precision at users.sf.net)
 
* README, includes/system_functions.php: fixed my email address and
changed the warning threshhold on the bar graphs to 90%
 
2001-05-18 20:46 precision Uriah Welcome (precision at users.sf.net)
 
* COPYING, ChangeLog, INSTALL, README, index.php,
includes/class.Template.inc.php, includes/color_scheme.php,
includes/system_footer.php, includes/system_functions.php,
includes/system_header.php, includes/table_filesystems.php,
includes/table_hardware.php, includes/table_memory.php,
includes/table_network.php, includes/table_vitals.php,
includes/lang/da.php, includes/lang/de.php, includes/lang/en.php,
includes/lang/es.php, includes/lang/et.php, includes/lang/fr.php,
includes/lang/it.php, includes/lang/lt.php, includes/lang/no.php,
includes/lang/se.php, templates/aq/box.tpl,
templates/aq/form.tpl, templates/aq/images/aq_background.gif,
templates/aq/images/bar_left.gif,
templates/aq/images/bar_middle.gif,
templates/aq/images/bar_right.gif,
templates/aq/images/coininfd.gif,
templates/aq/images/coininfg.gif,
templates/aq/images/coinsupd.gif,
templates/aq/images/coinsupg.gif, templates/aq/images/d.gif,
templates/aq/images/fond.gif, templates/aq/images/g.gif,
templates/aq/images/inf.gif, templates/aq/images/redbar_left.gif,
templates/aq/images/redbar_middle.gif,
templates/aq/images/redbar_right.gif,
templates/aq/images/space15_15.gif, templates/aq/images/sup.gif,
templates/classic/box.tpl, templates/classic/form.tpl,
templates/classic/images/bar_left.gif,
templates/classic/images/bar_middle.gif,
templates/classic/images/bar_right.gif,
templates/classic/images/redbar_left.gif,
templates/classic/images/redbar_middle.gif,
templates/classic/images/redbar_right.gif,
templates/classic/images/trans.gif: Initial revision
 
2001-05-18 20:46 precision Uriah Welcome (precision at users.sf.net)
 
* COPYING (tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3,
REL-2-3, REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0, rel-1-9),
ChangeLog, INSTALL, README, index.php,
includes/class.Template.inc.php (tags: rel-1-9),
includes/color_scheme.php, includes/system_footer.php,
includes/system_functions.php, includes/system_header.php,
includes/table_filesystems.php, includes/table_hardware.php,
includes/table_memory.php, includes/table_network.php,
includes/table_vitals.php, includes/lang/da.php,
includes/lang/de.php, includes/lang/en.php, includes/lang/es.php,
includes/lang/et.php, includes/lang/fr.php, includes/lang/it.php,
includes/lang/lt.php, includes/lang/no.php, includes/lang/se.php,
templates/aq/box.tpl, templates/aq/form.tpl (tags: rel-1-9),
templates/aq/images/aq_background.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1,
REL-2-1, REL-2-0, rel-1-9), templates/aq/images/bar_left.gif,
templates/aq/images/bar_middle.gif,
templates/aq/images/bar_right.gif,
templates/aq/images/coininfd.gif (tags: REL-2-1, REL-2-0,
rel-1-9), templates/aq/images/coininfg.gif (tags: REL-2-1,
REL-2-0, rel-1-9), templates/aq/images/coinsupd.gif (tags:
REL-2-1, REL-2-0, rel-1-9), templates/aq/images/coinsupg.gif
(tags: REL-2-1, REL-2-0, rel-1-9), templates/aq/images/d.gif
(tags: REL-2-1, REL-2-0, rel-1-9), templates/aq/images/fond.gif
(tags: REL-2-1, REL-2-0, rel-1-9), templates/aq/images/g.gif
(tags: REL-2-1, REL-2-0, rel-1-9), templates/aq/images/inf.gif
(tags: REL-2-1, REL-2-0, rel-1-9),
templates/aq/images/redbar_left.gif (tags: REL-2-1, REL-2-0,
rel-1-9), templates/aq/images/redbar_middle.gif (tags: REL-2-1,
REL-2-0, rel-1-9), templates/aq/images/redbar_right.gif (tags:
REL-2-1, REL-2-0, rel-1-9), templates/aq/images/space15_15.gif
(tags: REL-2-5-3-RC2, REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3,
REL-2-2, REL-2-2-RC1, REL-2-1, REL-2-0, rel-1-9),
templates/aq/images/sup.gif (tags: REL-2-1, REL-2-0, rel-1-9),
templates/classic/box.tpl, templates/classic/form.tpl,
templates/classic/images/bar_left.gif,
templates/classic/images/bar_middle.gif,
templates/classic/images/bar_right.gif,
templates/classic/images/redbar_left.gif,
templates/classic/images/redbar_middle.gif,
templates/classic/images/redbar_right.gif,
templates/classic/images/trans.gif (tags: REL-2-5-3-RC2,
REL-2-5-3-RC1, REL-2-5-2-RC3, REL-2-3, REL-2-2, REL-2-2-RC1,
REL-2-1, REL-2-0, rel-1-9) (utags: start): initial checkin of 1.3
code
 
/gestion/phpsysinfo/copying
0,0 → 1,339
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
 
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
 
Preamble
 
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
 
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
 
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
 
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
 
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
 
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
 
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
 
The precise terms and conditions for copying, distribution and
modification follow.
 
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
 
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
 
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
 
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
 
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
 
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
 
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
 
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
 
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
 
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
 
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
 
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
 
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
 
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
 
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
 
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
 
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
 
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
 
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
 
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
 
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
 
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
 
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
 
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
 
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
 
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
 
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
 
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
 
NO WARRANTY
 
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
 
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
 
END OF TERMS AND CONDITIONS
 
How to Apply These Terms to Your New Programs
 
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
 
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
 
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
Also add information on how to contact you by electronic and paper mail.
 
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
 
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
 
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
 
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
 
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
 
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
 
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
/gestion/phpsysinfo/config.php
0,0 → 1,112
<?php
 
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
 
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
// $Id: config.php.new,v 1.23 2007/02/18 19:02:59 bigmichi1 Exp $
 
// if $webpath set to an value it will be possible to include phpsysinfo with a simple include() statement in other scripts
// but the structure in the phpsysinfo directory can't be changed
// $webpath specifies the absolute path when you browse to the phpsysinfo page
// e.g.: your domain www.yourdomain.com
// you put the phpsysinfo directory at /phpsysinfo in the webroot
// then normally you browse there with www.yourdomain.com/phpsysinfo
// now you want to include the index.php from phpsysinfo in a script, locatet at /
// then you need to set $webpath to /phpsysinfo/
// if you put the phpsysinfo folder at /tools/phpsysinfo $webpath will be /tools/phpsysinfo/
// you don't need to change it, if you don't include it in other pages
// so default will be fine for everyone
$webpath = "";
 
// define the default lng and template here
$default_lng='browser';
$default_template='alcasar';
 
// hide language and template picklist
// false = display picklist
// true = do not display picklist
$hide_picklist = true;
 
// display the virtual host name and address
// default is canonical host name and address
$show_vhostname = false;
 
// define the motherboard monitoring program here
// we support four programs so far
// 1. lmsensors http://www.lm-sensors.org/
// 2. healthd http://healthd.thehousleys.net/
// 3. hwsensors http://www.openbsd.org/
// 4. mbmon http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/download.html
// 5. mbm5 http://mbm.livewiredev.com/
 
// $sensor_program = "lmsensors";
// $sensor_program = "healthd";
// $sensor_program = "hwsensors";
// $sensor_program = "mbmon";
// $sensor_program = "mbm5";
$sensor_program = "";
 
// show mount point
// true = show mount point
// false = do not show mount point
$show_mount_point = true;
 
// show bind
// true = display filesystems mounted with the bind options under Linux
// false = hide them
$show_bind = true;
 
// show inode usage
// true = display used inodes in percent
// false = hide them
$show_inodes = false;
 
// Hide mount(s). Example:
// $hide_mounts = array( '/home', '/dev' );
$hide_mounts = array();
 
// Hide filesystem typess. Example:
// $hide_fstypes = array( 'tmpfs', 'usbfs' );
$hide_fstypes = array();
 
// if the hddtemp program is available we can read the temperature, if hdd is smart capable
// !!ATTENTION!! hddtemp might be a security issue
// $hddtemp_avail = "tcp"; // read data from hddtemp deamon (localhost:7634)
// $hddtemp_avail = "suid"; // read data from hddtemp programm (must be set suid)
 
// show a graph for current cpuload
// true = displayed, but it's a performance hit (because we have to wait to get a value, 1 second)
// false = will not be displayed
$loadbar = true;
 
// additional paths where to look for installed programs
// e.g. $addpaths = array('/opt/bin', '/opt/sbin');
$addpaths = array();
 
// display error messages at the top of the page
// $showerrors = true; // show the errors
// $showerrors = false; // don't show the errors
$showerrors = true;
 
// format in which temperature is displayed
// $temperatureformat = "c"; // shown in celsius
// $temperatureformat = "f"; // shown in fahrenheit
// $temperatureformat = "c-f"; // both shown first celsius and fahrenheit in braces
// $temperatureformat = "f-c"; // both shown first fahrenheit and celsius in braces
$temperatureformat = "c-f";
 
?>
/gestion/phpsysinfo/phpsysinfo.dtd
0,0 → 1,91
<!--
 
phpSysInfo - A PHP System Information Script
http://phpsysinfo.sourceforge.net/
 
$Id: phpsysinfo.dtd,v 1.16 2007/02/18 19:11:30 bigmichi1 Exp $
 
-->
<!ELEMENT phpsysinfo (Generation, Vitals, Network, Portail, Hardware, Memory, Swap, Swapdevices, FileSystem, MBinfo*, HDDTemp*)>
<!ELEMENT Generation EMPTY>
<!ATTLIST Generation version CDATA "2.3">
<!ATTLIST Generation timestamp CDATA "000000000">
 
<!ELEMENT Vitals (Hostname, IPAddr, Kernel, Distro, Distroicon, Uptime, Users, LoadAvg, CPULoad*)>
<!ELEMENT Hostname (#PCDATA)>
<!ELEMENT IPAddr (#PCDATA)>
<!ELEMENT Kernel (#PCDATA)>
<!ELEMENT Distro (#PCDATA)>
<!ELEMENT Distroicon (#PCDATA)>
<!ELEMENT Uptime (#PCDATA)>
<!ELEMENT Users (#PCDATA)>
<!ELEMENT LoadAvg (#PCDATA)>
<!ELEMENT CPULoad (#PCDATA)>
 
<!ELEMENT Network (NetDevice*)>
<!ELEMENT NetDevice (Name, RxBytes, TxBytes, Errors, Drops)>
<!ELEMENT Name (#PCDATA)>
<!ELEMENT RxBytes (#PCDATA)>
<!ELEMENT TxBytes (#PCDATA)>
<!ELEMENT Errors (#PCDATA)>
<!ELEMENT Drops (#PCDATA)>
 
<!ELEMENT Portail (Utilisateur, Groupe*)>
<!ELEMENT Utilisateur (#PCDATA)>
<!ELEMENT Groupe (#PCDATA)>
 
<!ELEMENT Hardware (CPU*, PCI*, IDE*, SCSI*, USB*, SBUS*)>
<!ELEMENT CPU (Number*, Model*, Cputemp*, Cpuspeed*, Busspeed*, Cache*, Bogomips*)>
<!ELEMENT Number (#PCDATA)>
<!ELEMENT Model (#PCDATA)>
<!ELEMENT Cputemp (#PCDATA)>
<!ELEMENT Busspeed (#PCDATA)>
<!ELEMENT Cpuspeed (#PCDATA)>
<!ELEMENT Cache (#PCDATA)>
<!ELEMENT Bogomips (#PCDATA)>
<!ELEMENT PCI (Device*)>
<!ELEMENT Device (Name, Capacity*)>
<!ELEMENT Capacity (#PCDATA)>
<!ELEMENT IDE (Device*)>
<!ELEMENT SCSI (Device*)>
<!ELEMENT USB (Device*)>
<!ELEMENT SBUS (Device*)>
 
<!ELEMENT Memory (Free, Used, Total, Percent, App*, AppPercent*, Buffers*, BuffersPercent*, Cached*, CachedPercent*)>
<!ELEMENT Free (#PCDATA)>
<!ELEMENT Used (#PCDATA)>
<!ELEMENT Total (#PCDATA)>
<!ELEMENT Percent (#PCDATA)>
<!ELEMENT App (#PCDATA)>
<!ELEMENT AppPercent (#PCDATA)>
<!ELEMENT Buffers (#PCDATA)>
<!ELEMENT BuffersPercent (#PCDATA)>
<!ELEMENT Cached (#PCDATA)>
<!ELEMENT CachedPercent (#PCDATA)>
 
<!ELEMENT Swap (Free*, Used*, Total*, Percent*)>
 
<!ELEMENT Swapdevices (Mount*)>
 
<!ELEMENT FileSystem (Mount*)>
<!ELEMENT Mount (MountPointID, MountPoint*, Type, Device, Percent, Free, Used, Size, Options*, Inodes*)>
<!ELEMENT MountPointID (#PCDATA)>
<!ELEMENT MountPoint (#PCDATA)>
<!ELEMENT Type (#PCDATA)>
<!ELEMENT Size (#PCDATA)>
<!ELEMENT Options (#PCDATA)>
<!ELEMENT Inodes (#PCDATA)>
 
<!ELEMENT MBinfo (Temperature*, Fans*, Voltage*)>
<!ELEMENT Temperature (Item*)>
<!ELEMENT Item (Label, Value, Limit*, Min*, Max*, Model*)>
<!ELEMENT Label (#PCDATA)>
<!ELEMENT Value (#PCDATA)>
<!ELEMENT Limit (#PCDATA)>
<!ELEMENT Min (#PCDATA)>
<!ELEMENT Max (#PCDATA)>
<!ELEMENT Fans (Item*)>
<!ELEMENT Voltage (Item*)>
<!ELEMENT HDDTemp (Item*)>
/gestion/phpsysinfo/readme
0,0 → 1,102
phpSysInfo 2.5.3 - http://phpsysinfo.sourceforge.net/
 
Copyright (c), 1999-2007, Uriah Welcome (precision@users.sf.net)
Copyright (c), 1999-2007, Matthew Snelham (infinite@users.sf.net)
Copyright (c), 1999-2007, Michael Cramer (bigmichi1@users.sf.net)
 
CURRENT TESTED PLATFORMS
------------------------
- Linux 2.2+
- FreeBSD 4.x
- OpenBSD 2.8+
- NetBSD
- Darwin/OSX
- Win2000 / Win2003 /WinXP
- > PHP 4.0.6 and 5.x
 
If your platform is not here try checking out the mailing list archives or
the message boards on SourceForge.
PHP 5.2 is known to be broken with phpSysInfo. There is allready a bug report
on the php site. ( see http://bugs.php.net/bug.php?id=39737 )
 
INSTALLATION AND CONFIGURATION
------------------------------
Just decompress and untar the source (which you should have done by now,
if you're reading this...), into your webserver's document root.
 
There is a configuration file called config.php.new. If this a brand new
installation, you should copy this file to config.php and edit it.
 
- make sure your 'php.ini' file's include_path entry contains "."
- make sure your 'php.ini' has safe_mode set to 'off'.
Please keep in the mind that because phpSysInfo requires access to many
files in /proc and other system binary you **MUST DISABLE** php's
safe_mode. Please see the PHP documentation for information on how you
can do this.
If you use the apc pecl extension with apc.optimization="1" then
phpSysInfo will break in the XPath.class. Turn this option off, and it
will work with apc.
That's it. Restart your webserver (if you changed php.ini), and viola
KNOWN PROBLEMS
--------------
- phpSysInfo is not compatible with SELinux Systems
- small bug under FreeBSD with memory reporting
 
PLATFORM SPECIFIC ISSUES
------------------------
- FreeBSD
There is currently a bug in FreeBSD that if you boot your system up
and drop to single user mode and then again back to multiuser the
system removes /var/run/dmesg.boot. This will cause phpsysinfo to
fail. A bug has already been reported to the FreeBSD team. (PS, this
may exist in other *BSDs also)
!!! We need feedback if these issue is still alive !!!
- Windows with IIS
On Windows systems we get our informations through the WMI interface.
If you run phpsysinfo on the IIS webserver, phpsysinfo will not connect
to the WMI interface for security reasons. At this point you MUST set
an authentication mechanism for the directory in the IIS admin
interface for the directory where phpsysinfo is installed. Then you
will be asked for an user and a password when opening the page. At this
point it is necassary to log in with an user that will be able to
connect to the WMI interface. If you use the wrong user and/or password
you might get an "ACCESS DENIED ERROR".
 
SENSOR RELATET INFORMATIONS
---------------------------
- MBM5
Make sure you set MBM5 Interval Logging to csv and to the data
directory of PHPSysInfo. The file must be called MBM5. Also make sure
MBM5 doesn't add symbols to the values. Did is a Quick MBM5 log parser,
need more csv logs to make it better.
 
WHAT TO DO IF IT DOESN'T WORK
-----------------------------
First make sure you've read this file completely, especially the
"INSTALLATION AND CONFIGURATION" section. If it still doesn't work then
you can:
Submit a bug on SourceForge. (preferred)
(http://sourceforge.net/projects/phpsysinfo/)
Ask for help in the forum
(http://sourceforge.net/projects/phpsysinfo/)
!! If you submit a bug or request some help, if something doesn't work,
please check that you have set in config.php '$showerrors = true' !!!
 
OTHER NOTES
-----------
If you have an great ideas or wanna help out, just drop by the project
page at SourceForge (http://sourceforge.net/projects/phpsysinfo/)
 
LICENSING
---------
This program and all associated files are released under the GNU Public
License, see COPYING for details.
 
$Id: README,v 1.38 2007/03/18 11:08:32 bigmichi1 Exp $
/gestion/phpsysinfo/index.php
0,0 → 1,331
<?php
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// $Id: index.php,v 1.122.4.1 2007/08/19 09:21:57 xqus Exp $
// phpsysinfo release version number
$VERSION = "2.5.4";
$startTime = array_sum( explode( " ", microtime() ) );
 
define('APP_ROOT', dirname(__FILE__));
define('IN_PHPSYSINFO', true);
 
ini_set('magic_quotes_runtime', 'off');
ini_set('register_globals', 'off');
// ini_set('display_errors','on');
 
require_once(APP_ROOT . '/includes/class.error.inc.php');
$error = new Error;
 
// Figure out which OS where running on, and detect support
if ( file_exists( APP_ROOT . '/includes/os/class.' . PHP_OS . '.inc.php' ) ) {
} else {
$error->addError('include(class.' . PHP_OS . '.php.inc)' , PHP_OS . ' is not currently supported', __LINE__, __FILE__ );
}
 
if (!extension_loaded('xml')) {
$error->addError('extension_loaded(xml)', 'phpsysinfo requires the xml module for php to work', __LINE__, __FILE__);
}
if (!extension_loaded('pcre')) {
$error->addError('extension_loaded(pcre)', 'phpsysinfo requires the pcre module for php to work', __LINE__, __FILE__);
}
 
if (!file_exists(APP_ROOT . '/config.php')) {
$error->addError('file_exists(config.php)', 'config.php does not exist in the phpsysinfo directory.', __LINE__, __FILE__);
} else {
require_once(APP_ROOT . '/config.php'); // get the config file
}
 
if ( !empty( $sensor_program ) ) {
$sensor_program = basename( $sensor_program );
if( !file_exists( APP_ROOT . '/includes/mb/class.' . $sensor_program . '.inc.php' ) ) {
$error->addError('include(class.' . htmlspecialchars($sensor_program, ENT_QUOTES) . '.inc.php)', 'specified sensor programm is not supported', __LINE__, __FILE__ );
}
}
 
if ( !empty( $hddtemp_avail ) && $hddtemp_avail != "tcp" && $hddtemp_avail != "suid" ) {
$error->addError('include(class.hddtemp.inc.php)', 'bad configuration in config.php for $hddtemp_avail', __LINE__, __FILE__ );
}
 
if( $error->ErrorsExist() ) {
echo $error->ErrorsAsHTML();
exit;
}
 
require_once(APP_ROOT . '/includes/common_functions.php'); // Set of common functions used through out the app
 
// commented for security
// Check to see if where running inside of phpGroupWare
//if (file_exists("../header.inc.php") && isset($_REQUEST['sessionid']) && $_REQUEST['sessionid'] && $_REQUEST['kp3'] && $_REQUEST['domain']) {
// define('PHPGROUPWARE', 1);
// $phpgw_info['flags'] = array('currentapp' => 'phpsysinfo-dev');
// include('../header.inc.php');
//} else {
// define('PHPGROUPWARE', 0);
//}
 
// DEFINE TEMPLATE_SET
if (isset($_POST['template'])) {
$template = $_POST['template'];
} elseif (isset($_GET['template'])) {
$template = $_GET['template'];
} elseif (isset($_COOKIE['template'])) {
$template = $_COOKIE['template'];
} else {
$template = $default_template;
}
 
// check to see if we have a random
if ($template == 'random') {
$buf = gdc( APP_ROOT . "/templates/" );
$template = $buf[array_rand($buf, 1)];
}
 
if ($template != 'xml' && $template != 'wml') {
// figure out if the template exists
$template = basename($template);
if (!file_exists(APP_ROOT . "/templates/" . $template)) {
// use default if not exists.
$template = $default_template;
}
// Store the current template name in a cookie, set expire date to 30 days later
// if template is xml then skip
// setcookie("template", $template, (time() + 60 * 60 * 24 * 30));
// $_COOKIE['template'] = $template; //update COOKIE Var
}
 
// get our current language
// default to english, but this is negotiable.
if ($template == "wml") {
$lng = "en";
} elseif (isset($_POST['lng'])) {
$lng = $_POST['lng'];
} elseif (isset($_GET['lng'])) {
$lng = $_GET['lng'];
} elseif (isset($_COOKIE['lng'])) {
$lng = $_COOKIE['lng'];
} else {
$lng = $default_lng;
}
 
if ($lng == 'browser') {
// see if the browser knows the right languange.
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
$plng = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
if (count($plng) > 0) {
while (list($k, $v) = each($plng)) {
$k = explode(';', $v, 1);
$k = explode('-', $k[0]);
if (file_exists(APP_ROOT . '/includes/lang/' . $k[0] . '.php')) {
$lng = $k[0];
break;
}
}
}
}
}
 
//Add for Alcasar : 'fr' or 'en' only because some variables aren't defined in other languages
if($lng != 'fr') $lng = "en";
 
$lng = basename($lng);
if (file_exists(APP_ROOT . '/includes/lang/' . $lng . '.php')) {
//$charset = 'iso-8859-1';
$charset = 'utf-8'; //modif fait pour integration alcasar
require_once(APP_ROOT . '/includes/lang/' . $lng . '.php'); // get our language include
// Store the current language selection in a cookie, set expire date to 30 days later
// setcookie("lng", $lng, (time() + 60 * 60 * 24 * 30));
// $_COOKIE['lng'] = $lng; //update COOKIE Var
} else {
$error->addError('include(' . $lng . ')', 'we do not support this language', __LINE__, __FILE__ );
$lng = $default_lng;
}
 
// include the files and create the instances
define('TEMPLATE_SET', $template);
require_once( APP_ROOT . '/includes/os/class.' . PHP_OS . '.inc.php' );
$sysinfo = new sysinfo;
if( !empty( $sensor_program ) ) {
require_once(APP_ROOT . '/includes/mb/class.' . $sensor_program . '.inc.php');
$mbinfo = new mbinfo;
}
if ( !empty($hddtemp_avail ) ) {
require_once(APP_ROOT . '/includes/mb/class.hddtemp.inc.php');
}
 
require_once(APP_ROOT . '/includes/xml/vitals.php');
require_once(APP_ROOT . '/includes/xml/network.php');
require_once(APP_ROOT . '/includes/xml/hardware.php');
require_once(APP_ROOT . '/includes/xml/portail.php');
//require_once(APP_ROOT . '/includes/xml/utilisateur.php');
require_once(APP_ROOT . '/includes/xml/memory.php');
require_once(APP_ROOT . '/includes/xml/filesystems.php');
require_once(APP_ROOT . '/includes/xml/mbinfo.php');
require_once(APP_ROOT . '/includes/xml/hddtemp.php');
 
// build the xml
$xml = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
$xml .= "<!DOCTYPE phpsysinfo SYSTEM \"phpsysinfo.dtd\">\n\n";
$xml .= created_by();
$xml .= "<phpsysinfo>\n";
$xml .= " <Generation version=\"$VERSION\" timestamp=\"" . time() . "\"/>\n";
$xml .= xml_vitals();
$xml .= xml_network();
$xml .= xml_hardware();
$xml .= xml_portail();
$xml .= xml_memory();
$xml .= xml_filesystems();
if ( !empty( $sensor_program ) ) {
$xml .= xml_mbinfo();
}
if ( !empty($hddtemp_avail ) ) {
$hddtemp = new hddtemp;
$xml .= xml_hddtemp();
}
$xml .= "</phpsysinfo>";
replace_specialchars($xml);
 
// output
if (TEMPLATE_SET == 'xml') {
// just printout the XML and exit
header("Content-Type: text/xml\n\n");
print $xml;
} elseif (TEMPLATE_SET == 'wml') {
require_once(APP_ROOT . '/includes/XPath.class.php');
$XPath = new XPath();
$XPath->importFromString($xml);
 
header("Content-type: text/vnd.wap.wml; charset=iso-8859-1");
header("");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
 
echo "<?xml version='1.0' encoding='iso-8859-1'?>\n";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\" >\n";
echo "<wml>\n";
echo "<card id=\"start\" title=\"phpSysInfo - Menu\">\n";
echo "<p><a href=\"#vitals\">" . $text['vitals'] . "</a></p>\n";
echo "<p><a href=\"#network\">" . $text['netusage'] . "</a></p>\n";
echo "<p><a href=\"#memory\">" . $text['memusage'] . "</a></p>\n";
echo "<p><a href=\"#filesystem\">" . $text['fs'] . "</a></p>\n";
if (!empty($sensor_program) || (isset($hddtemp_avail) && $hddtemp_avail)) {
echo "<p><a href=\"#temp\">" . $text['temperature'] . "</a></p>\n";
}
if (!empty($sensor_program)) {
echo "<p><a href=\"#fans\">" . $text['fans'] . "</a></p>\n";
echo "<p><a href=\"#volt\">" . $text['voltage'] . "</a></p>\n";
}
echo "</card>\n";
echo wml_vitals();
echo wml_network();
echo wml_memory();
echo wml_filesystem();
$temp = "";
if (!empty($sensor_program)) {
echo wml_mbfans();
echo wml_mbvoltage();
$temp .= wml_mbtemp();
}
if (isset($hddtemp_avail) && $hddtemp_avail)
if ($XPath->match("/phpsysinfo/HDDTemp/Item"))
$temp .= wml_hddtemp();
if(strlen($temp) > 0)
echo "<card id=\"temp\" title=\"" . $text['temperature'] . "\">\n" . $temp . "</card>\n";
echo "</wml>\n";
 
} else {
$image_height = get_gif_image_height(APP_ROOT . '/templates/' . TEMPLATE_SET . '/images/bar_middle.gif');
define('BAR_HEIGHT', $image_height);
 
// if (PHPGROUPWARE != 1) {
require_once(APP_ROOT . '/includes/class.Template.inc.php'); // template library
// }
// fire up the template engine
$tpl = new Template(APP_ROOT . '/templates/' . TEMPLATE_SET);
$tpl->set_file(array('form' => 'form.tpl'));
// print out a box of information
function makebox ($title, $content)
{
if (empty($content)) {
return "";
} else {
global $webpath;
$textdir = direction();
$t = new Template(APP_ROOT . '/templates/' . TEMPLATE_SET);
$t->set_file(array('box' => 'box.tpl'));
$t->set_var('title', $title);
$t->set_var('content', $content);
$t->set_var('webpath', $webpath);
$t->set_var('text_dir', $textdir['direction']);
return $t->parse('out', 'box');
}
}
// Fire off the XPath class
require_once(APP_ROOT . '/includes/XPath.class.php');
$XPath = new XPath();
$XPath->importFromString($xml);
// let the page begin.
require_once(APP_ROOT . '/includes/system_header.php');
 
$tpl->set_var('title', $text['title'] . ': ' . $XPath->getData('/phpsysinfo/Vitals/Hostname') . ' (' . $XPath->getData('/phpsysinfo/Vitals/IPAddr') . ')');
$tpl->set_var('vitals', makebox($text['vitals'], html_vitals()));
// rajout pour integrer les utilisateurs du portail captif
$tpl->set_var('portail', makebox($text['portail'], html_portail()));
// $tpl->set_var('utilisateur', makebox($text['portail'], html_utilisateur()));
$tpl->set_var('memory', makebox($text['memusage'], html_memory()));
$tpl->set_var('filesystems', makebox($text['fs'], html_filesystems()));
$tpl->set_var('network', makebox($text['netusage'], html_network()));
$tpl->set_var('hardware', makebox($text['hardware'], html_hardware()));
// Timo van Roermund: change the condition for showing the temperature, voltage and fans section
$html_temp = "";
if (!empty($sensor_program)) {
if ($XPath->match("/phpsysinfo/MBinfo/Temperature/Item")) {
$html_temp = html_mbtemp();
}
if ($XPath->match("/phpsysinfo/MBinfo/Fans/Item")) {
$tpl->set_var('mbfans', makebox($text['fans'], html_mbfans()));
} else {
$tpl->set_var('mbfans', '');
};
if ($XPath->match("/phpsysinfo/MBinfo/Voltage/Item")) {
$tpl->set_var('mbvoltage', makebox($text['voltage'], html_mbvoltage()));
} else {
$tpl->set_var('mbvoltage', '');
};
}
if (isset($hddtemp_avail) && $hddtemp_avail) {
if ($XPath->match("/phpsysinfo/HDDTemp/Item")) {
$html_temp .= html_hddtemp();
};
}
if (strlen($html_temp) > 0) {
$tpl->set_var('mbtemp', makebox($text['temperature'], "\n<table width=\"100%\">\n" . $html_temp . "</table>\n"));
}
 
if ( $error->ErrorsExist() && isset($showerrors) && $showerrors ) {
$tpl->set_var('errors', makebox("ERRORS", $error->ErrorsAsHTML() ));
}
// parse our the template
$tpl->pfp('out', 'form');
// finally our print our footer
// if (PHPGROUPWARE == 1) {
// $phpgw->common->phpgw_footer();
// } else {
// require_once(APP_ROOT . '/includes/system_footer.php');
// }
}
 
?>
/gestion/phpsysinfo/templates/alcasar/form.tpl
0,0 → 1,56
{errors}
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#666666"><th height="20">{title}</th><tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</table>
<table width="100%" border="1" cellspacing="0" cellpadding="1">
<tr><td>
<table width="100%" align="center">
<tr>
<td width="50%" valign="top">
{portail}
</td>
<td width="50%" valign="top">
{vitals}
</td>
</tr>
 
<tr>
<td colspan="2">
{memory}
</td>
</tr>
 
<tr>
<td colspan="2">
{filesystems}
</td>
</tr>
 
<tr>
<td width="50%" valign="top">
{hardware}
</td>
<td width="50%" valign="top">
{network}
</td>
</tr>
</table>
 
<table width="100%">
<tr>
<td width="55%" valign="top">
{mbtemp}
<br>
{mbfans}
</td>
 
<td width="45%" valign="top">
{mbvoltage}
</td>
</tr>
</table>
</td>
</tr>
</table>
 
/gestion/phpsysinfo/templates/alcasar/images/redbar_right.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/phpsysinfo/templates/alcasar/images/redbar_middle.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/phpsysinfo/templates/alcasar/images/bar_left.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/phpsysinfo/templates/alcasar/images/bar_right.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/gestion/phpsysinfo/templates/alcasar/images/bar_middle.gif
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/phpsysinfo/templates/alcasar/images/index.html
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/gestion/phpsysinfo/templates/alcasar/images/trans.gif
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/phpsysinfo/templates/alcasar/images/redbar_left.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/phpsysinfo/templates/alcasar/box.tpl
0,0 → 1,19
<table width="100%">
<tr>
<td>
 
<table border="1" class="box">
 
<tr class="boxheader">
<td class="boxheader">{title}</td>
</tr>
 
<tr class="boxbody">
<td dir="{text_dir}">{content}</td>
</tr>
 
</table>
 
</td>
</tr>
</table>
/gestion/phpsysinfo/templates/alcasar/index.html
--- gestion/phpsysinfo/templates/alcasar/alcasar.css (nonexistent)
+++ gestion/phpsysinfo/templates/alcasar/alcasar.css (revision 40)
@@ -0,0 +1,77 @@
+A {
+ color: #000000;
+ text-decoration: none;
+}
+A:link {
+ color: #486591;
+ background-color: transparent;
+}
+A:visited {
+ color: #6f6c81;
+ background-color: transparent;
+}
+A:active {
+
+ background-color: transparent;
+}
+body {
+ color: #000000;
+ background-color: #F7F3EF;
+ background-color: #EFEFEF;
+ text-decoration: none;
+ font-family: Verdana,Helvetica,sans-serif;
+ font-size: 11px;
+ font-weight: normal;
+}
+font {
+ color: #000000;
+ text-decoration: none;
+ font-family: Verdana,Helvetica,sans-serif;
+ font-size: 11px;
+ font-weight: normal;
+}
+H1 {
+ color: #000000;
+ background-color: transparent;
+ text-decoration: none;
+ font-family: Verdana,Helvetica,sans-serif;
+ font-size: 20px;
+}
+select {
+ color: black;
+ text-decoration: none;
+ font-family: Verdana,Helvetica,sans-serif;
+ font-size: 10px;
+ font-weight: normal;
+}
+input {
+ color: black;
+ text-decoration: none;
+ font-family: Verdana,Helvetica,sans-serif;
+ font-size: 10px;
+ font-weight: bold;
+}
+table
+{
+ border: none;
+ margin: 0px;
+ padding: 0px;
+}
+table.box {
+ color: #fefefe;
+ background-color: transparent;
+ border: none;
+ padding: 1px;
+ width: 100%;
+}
+tr.boxheader {
+ background-color: #9BA1A8;
+}
+td.boxheader {
+ color: #000000;
+ text-align: center;
+}
+tr.boxbody {
+ color: #000000;
+ background-color: #F7F3EF;
+}
/gestion/auth.php
0,0 → 1,21
<?
$select[0]=$l_create_user;
$select[1]=$l_edit_user;
$select[2]=$l_create_group;
$select[3]=$l_edit_group;
$select[4]=$l_import_empty;
$select[5]="Exceptions";
$fich[0]="manager/htdocs/user_new.php";
$fich[1]="manager/htdocs/find.php";
$fich[2]="manager/htdocs/group_new.php";
$fich[3]="manager/htdocs/show_groups.php";
$fich[4]="manager/htdocs/import_user.php";
$fich[5]="admin/auth_exceptions.php";
$j=0;
$nb=count($select);
while ($j != $nb)
{
echo "<TR><TD valign=\"middle\" align=\"left\">&nbsp;&nbsp;<img src=\"/images/right2.gif\" height=10 width=10 border=no nosave><a href=\"$fich[$j]\" target=\"REXY2\"><font color=\"black\">$select[$j]</font></a></TD></TR>";
$j++;
}
?>
/gestion/filtering.php
0,0 → 1,15
<?
$select[0]="Web";
$select[1]=$l_network;
$select[2]="Exceptions";
$fich[0]="admin/web_filter.php";
$fich[1]="admin/net_filter.php";
$fich[2]="admin/filter_exceptions.php";
$j=0;
$nb=count($select);
while ($j != $nb)
{
echo "<TR><TD valign=\"middle\" align=\"left\">&nbsp;<img src=\"/images/right2.gif\" height=10 width=10 border=no nosave><a href=\"$fich[$j]\" target=\"REXY2\"><font color=\"black\">$select[$j]</font></a></TD></TR>";
$j++;
}
?>
/gestion/images/right.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/images/footer_php.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/images/alcasar.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/images/stop.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/images/att.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/images/mini-tux.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/images/tpf.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/images/footer_netfilter.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/images/down2.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/images/info.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/images/tux16.ico
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/images/footer_dansguardian.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/images/graph.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/images/organisme.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/images/pass.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/images/down.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/images/state_ok.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/images/footer_gnupg.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/images/footer_apache.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/images/footer_squid.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/images/footer_awstats.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/images/logo-alcasar.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/images/footer_freeradius.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/images/footer_firewalleyes.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/images/state_error.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/images/linux_ksc2_old.jpg
Cannot display: file marked as a binary type.
svn:mime-type = image/jpeg
Property changes:
Added: svn:mime-type
+image/jpeg
\ No newline at end of property
/gestion/images/linux_ksc2.jpg
Cannot display: file marked as a binary type.
svn:mime-type = image/jpeg
Property changes:
Added: svn:mime-type
+image/jpeg
\ No newline at end of property
/gestion/images/footer_linux.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/images/footer_mandriva.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/images/right2.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/images/pix.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/images/cron.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/images/footer_mysql.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/images/create.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/images/footer_coova.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/images/logo-alcasar.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/images/footer_mondo.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/gestion/alcasar-1.8-installation.pdf
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/intercept.php
0,0 → 1,561
<?php
#
# intercept.php for Alcasar captive portal
# Copyright (C) 2003, 2004 Mondru AB.
# Modify by REXY
# Help for language translation by B. AUBARD (thanks)
 
# The contents of this file may be used under the terms of the GNU
# General Public License Version 2, provided that the above copyright
# notice and this permission notice is included in all copies or
# substantial portions of the software.
 
$organisme = "";
# Redirects from CoovaChilli (chilli daemon) :
# Response to login:
# success : if login successful
# failed : if login failed
# logoff : if logout successful
# already : if tried to login while already logged in
# notyet : if not logged in yet
# smartclient :if login from smart client
# popup1 : if requested a logging in pop up window
# popup2 : if requested a success pop up window
# popup3 : if requested a logout pop up window
# Default : it was not a form request
 
# Shared secret used to encrypt challenge with radius.
$uamsecret = "";
 
# URL loaded after success authenticates (let blank for browser defaults)
$adminurl = "";
 
# # Uncomment the following line if you want to use ordinary user-password
# for radius authentication. Must be used together with $uamsecret.
$userpassword = 1;
 
# Our own path
$loginpath = $_SERVER['PHP_SELF'];
 
# Choice of language
$Language = 'fr';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'es'){
$R_ChilliError = "La autenticación debe ser un éxito a través del servicio de portal cautivo.";
$R_login = "El éxito de la autenticación. <BR> La conexión de red está funcionando. <br> Haga clic en Sí para cerrar la conexión a cerrar la sesión!";
$R_logout = "Conexión de cierre";
$R_loginfailed = "Error de autenticación";
$R_loggingin = "Identificación en el portal cautivo";
$R_loggedcont = "Red de Control de Acceso";
$R_loggedout = "Su sesión se cierra";
$R_user = "Usuario";
$R_password = "Contraseña";
$R_passwordchg = "Cambie su contraseña";
$R_wait = "Por favor, espere un momento ...";
$R_onlinetime = "Tiempo de conexión:";
$R_remainingtime = "Desconexión en:";
$R_encrypted = "La apertura debe usar conexión cifrada";
$R_boutonO = "Autenticación";
$R_boutonF = "Cerrar";
$R_loggedin_stringl0 = "Information System Security";
$R_loggedin_stringl1 = "Bienvenido portal ALCASAR";
$R_loggedin_stringl2 = "El portal fue creado reglamentos para garantizar la trazabilidad, la rendición de cuentas y el no repudio de las conexiones.";
$R_loggedin_stringl3 = "Su actividad en la red es registrada, de conformidad con la privacidad.";
$R_loggedin_stringl4 = "Los datos registrados pueden ser capaces de ser operado por una autoridad judicial en el curso de una investigación.";
$R_loggedin_stringl5 = "Estos datos se eliminan automáticamente después de un año.";
$R_loggedout_string = "Cerrar sesión hizo portal cautivo!";
$R_reply_1 = "Your daily connexion time has been reached";
$R_reply_2 = "Your monthly connexion time has been reached";
$R_reply_3 = "You try to connect outside of your allowed timespan";
$R_reply_4 = "your account expired";
$R_reply_5 = "You have reached the maximum number of simultaneous logins";
}
else if($Language == 'de'){
$R_ChilliError = "Die Authentifizierung ist erfolgreich durch die Nutzung des Portals erfolgt.";
$R_login = "Erfolgreiche Authentifizierung. <BR> Die Verbindung zum Netzwerk erfolgt. <br> Klicken Sie auf 'Beenden der Verbindung, um Ihre Tagung!";
$R_logout = "Beenden der Verbindung";
$R_loginfailed = "Authentifizierungsfehler Eigenverbrauch";
$R_loggingin = "Kennzeichnung auf dem Eigenverbrauch";
$R_loggedcont = "Network Access Control";
$R_loggedout = "Ihre Sitzung ist geschlossen";
$R_user = "Benutzer";
$R_password = "Passwort";
$R_passwordchg = "Passwort ändern";
$R_wait = "Bitte warten Sie einen Moment ...";
$R_onlinetime = "Online-Zeit:";
$R_remainingtime = "Abmelden:";
$R_encrypted = "Die Öffnung muß der Anschluß Zahlen";
$R_boutonO = "Authentifizierung";
$R_boutonF = "Schließen";
$R_loggedin_stringl0 = "Information System Security";
$R_loggedin_stringl1 = "Willkommen portal ALCASAR";
$R_loggedin_stringl2 = "Dieses Portal wurde eingerichtet, um ordnungsgemäß die Rückverfolgbarkeit, der Zurechenbarkeit und der Nicht-Anerkennung der Verbindungen.";
$R_loggedin_stringl3 = "Ihre Tätigkeit im Netzwerk registriert ist nach Schutz der Privatsphäre.";
$R_loggedin_stringl4 = "Die gespeicherten Daten nicht pouront genutzt werden, dass von einer Justizbehörde im Rahmen einer Untersuchung.";
$R_loggedin_stringl5 = "Diese Daten werden automatisch gelöscht nach einem Jahr.";
$R_loggedout_string = "Trennung des Portals erfolgt Gefangener!";
$R_reply_1 = "Your daily connexion time has been reached";
$R_reply_2 = "Your monthly connexion time has been reached";
$R_reply_3 = "You try to connect outside of your allowed timespan";
$R_reply_4 = "your account expired";
$R_reply_5 = "You have reached the maximum number of simultaneous logins";
}
else if($Language == 'nl'){
$R_ChilliError = "De authenticatie moet een succes worden via de captive portal dienst.";
$R_login = "Succesvolle authenticatie. <BR> De netwerkverbinding werkt. <br> Klikt u op de afsluiting van de verbinding af te sluiten uw sessie!";
$R_logout = "Slotkoers verbinding";
$R_loginfailed = "Authenticatie mislukt";
$R_loggingin = "Identificatie van de captive-portaal";
$R_loggedcont = "Network Access Control";
$R_loggedout = "Uw sessie is gesloten";
$R_user = "Gebruiker";
$R_password = "Wachtwoord";
$R_passwordchg = "Wijzig uw wachtwoord";
$R_wait = "Wacht een moment ...";
$R_onlinetime = "Sluit tijd:";
$R_remainingtime = "Verbreking in:";
$R_encrypted = "De opening moet gebruiken gecodeerde verbinding";
$R_boutonO = "Authenticatie";
$R_boutonF = "Sluiten";
$R_loggedin_stringl0 = "Information System Security";
$R_loggedin_stringl1 = "Welkom portaal ALCASAR";
$R_loggedin_stringl2 = "Het portaal werd opgericht verordeningen om de traceerbaarheid, verantwoordelijkheid en onloochenbaarheid van de verbindingen.";
$R_loggedin_stringl3 = "Uw activiteit op het netwerk is geregistreerd in overeenstemming met de persoonlijke levenssfeer.";
$R_loggedin_stringl4 = "De geregistreerde gegevens kunnen worden kunnen worden bediend door een rechterlijke instantie in de loop van een onderzoek.";
$R_loggedin_stringl5 = "Deze gegevens worden automatisch verwijderd na een jaar.";
$R_loggedout_string = "Logout gemaakt intern portaal!";
$R_reply_1 = "Your daily connexion time has been reached";
$R_reply_2 = "Your monthly connexion time has been reached";
$R_reply_3 = "You try to connect outside of your allowed timespan";
$R_reply_4 = "your account expired";
$R_reply_5 = "You have reached the maximum number of simultaneous logins";
}
else if($Language == 'en'){
$R_ChilliError = "The authentication must be successful through the captive portal service.";
$R_login = "Successful authentication. <BR> The network connection is working. <br> Remember to click Close the connection to close your session!";
$R_logout = "Closing connection";
$R_loginfailed = "Authentication Failed";
$R_loggingin = "Identification on the captive portal";
$R_loggedcont = "Network Access Control";
$R_loggedout = "Your session is closed";
$R_user = "User";
$R_password = "Password";
$R_passwordchg = "Change your password";
$R_wait = "Please wait a moment ...";
$R_onlinetime = "Connect time:";
$R_remainingtime = "Disconnection in:";
$R_encrypted = "The opening must use encrypted connection";
$R_boutonO = "Authentication";
$R_boutonF = "Close";
$R_loggedin_stringl0 = "Information System Security";
$R_loggedin_stringl1 = "Welcome on captive portal ALCASAR";
$R_loggedin_stringl2 = "The portal was set up regulations to ensure traceability, accountability and non-repudiation of connections.";
$R_loggedin_stringl3 = "Your activity on the network is registered in accordance with privacy.";
$R_loggedin_stringl4 = "The recorded data can be able to be operated by a judicial authority in the course of an investigation.";
$R_loggedin_stringl5 = "These data will be automatically deleted after one year.";
$R_loggedout_string = "Logout made captive portal!";
$R_reply_1 = "Your daily connexion time has been reached";
$R_reply_2 = "Your monthly connexion time has been reached";
$R_reply_3 = "You try to connect outside of your allowed timespan";
$R_reply_4 = "your account expired";
$R_reply_5 = "You have reached the maximum number of simultaneous logins";
}
else{
$R_ChilliError = "L'authentification doit &ecirc;tre r&eacute;ussie au travers du service du portail captif.";
$R_login = "Authentification r&eacute;ussie.<BR>La connexion au r&eacute;seau est effective.<br>N'oubliez pas de cliquer sur Fermeture de la connexion pour fermer votre session !";
$R_logout = "Fermeture de la connexion";
$R_loginfailed = "Echec d'authentification";
$R_loggingin = "Identification sur le portail captif";
$R_loggedcont = "Contr&ocirc;le d'acc&egrave;s au r&eacute;seau";
$R_loggedout = "Votre session est fermée";
$R_user = "Identifiant";
$R_password = "Mot de passe";
$R_passwordchg = "Modifier son mot de passe";
$R_wait = "Patientez un instant ...";
$R_onlinetime = "Temps de connexion:";
$R_remainingtime = "Deconnexion dans :";
$R_encrypted = "La connexion avec le portail doit &ecirc;tre chiffr&eacute;e";
$R_boutonO = "Authentification";
$R_boutonF = "Fermer";
$R_loggedin_stringl0 = "S&eacute;curit&eacute; des Syst&egrave;mes d'information";
$R_loggedin_stringl1 = "Bienvenue sur le portail captif ALCASAR";
$R_loggedin_stringl2 = "Ce portail a &eacute;t&eacute; mis en place pour assurer r&eacute;glementairement la tra&ccedil;abilit&eacute;, l'imputabilit&eacute; et la non-r&eacute;pudiation des connexions.";
$R_loggedin_stringl3 = "Votre activit&eacute; sur le r&eacute;seau est enregistr&eacute;e conform&eacute;ment au respect de la vie priv&eacute;e.";
$R_loggedin_stringl4 = "Les donn&eacute;es enregistr&eacute;es ne pourront &ecirc;tre exploit&eacute;es que par une autorit&eacute judiciaire dans le cadre d'une enqu&ecirc;te.";
$R_loggedin_stringl5 = "Ces donn&eacute;es seront automatiquement supprim&eacute;es au bout d'un an.";
$R_loggedout_string = "D&eacute;connexion du portail captif effectu&eacute;e !";
$R_reply_1 = "Votre dur&eacute;e de connexion journali&egrave;re a &eacute;t&eacute; atteinte";
$R_reply_2 = "Votre dur&eacute;e de connexion mensuelle a &eacute;t&eacute; atteinte";
$R_reply_3 = "Vous tentez de vous connecter en dehors de votre p&eacute;riode autoris&eacute;e";
$R_reply_4 = "Votre compte a expir&eacute";
$R_reply_5 = "Vous avez atteint le nombre maximum de connexions simultanées";
}
# Make sure that the form parameters are clean
#$OK_CHARS='-a-zA-Z0-9_.@&=%!';
#$_ = $input = <STDIN>;
#s/[^$OK_CHARS]/_/go;
#$input = $_;
 
# Make sure that the get query parameters are clean
#$OK_CHARS='-a-zA-Z0-9_.@&=%!';
#$_ = $query=$ENV{QUERY_STRING};
#s/[^$OK_CHARS]/_/go;
#$query = $_;
 
# If https not use, tell it's wrong
if (!($_SERVER['HTTPS'] == 'on')) {
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
<title>$R_loggedcont</title>
<meta http-equiv=\"Cache-control\" content=\"no-cache\">
<meta http-equiv=\"Pragma\" content=\"no-cache\">
</head>
<body bgColor = 'white'>
<h1 style=\"text-align: center;\">$R_loginfailed</h1>
<center>$R_encrypted</center>
</body>
</html>";
exit(0);
}
 
# Read form parameters which we care about
if (isset($_POST['UserName'])){ $username = $_POST['UserName'];} else {$username="";}
if (isset($_POST['Password'])){ $password = $_POST['Password'];} else {$password="";}
if (isset($_POST['challenge'])){$challenge = $_POST['challenge'];} else {$challenge="";}
if (isset($_POST['button'])){ $button = $_POST['button'];} else { $button="";}
if (isset($_POST['logout'])){ $logout = $_POST['logout'];} else {$logout="";}
if (isset($_POST['prelogin'])){ $prelogin = $_POST['prelogin'];} else {$prelogin="";}
if (isset($_POST['res'])){ $res = $_POST['res'];} else {$res="";}
if (isset($_POST['uamip'])){ $uamip = $_POST['uamip'];} else {$uamip="";}
if (isset($_POST['uamport'])){ $uamport = $_POST['uamport'];} else {$uamport="";}
if (isset($_POST['userurl'])){ $userurl = $_POST['userurl'];} else {$userurl="";}
if (isset($_POST['timeleft'])){ $timeleft = $_POST['timeleft'];} else {$timeleft="";}
if (isset($_POST['redirurl'])){ $redirurl = $_POST['redirurl'];} else {$redirurl="";}
 
# Read query parameters which we care about
if (isset($_GET['res'])) $res = $_GET['res'];
if (isset($_GET['challenge'])) $challenge = $_GET['challenge'];
if (isset($_GET['uamip'])) $uamip = $_GET['uamip'];
if (isset($_GET['uamport'])) $uamport = $_GET['uamport'];
if (isset($_GET['reply'])){ $reply = $_GET['reply'];} else {$reply="";}
if (isset($_GET['userurl'])) $userurl = $_GET['userurl'];
if (isset($_GET['timeleft'])) $timeleft = $_GET['timeleft'];
if (isset($_GET['redirurl'])) $redirurl = $_GET['redirurl'];
 
# translation of radius replies
if (isset($reply)){
switch(trim ($reply)) {
case 'Your maximum daily usage time has been reached' : $reply = $R_reply_1 ; break;
case 'Your maximum monthly usage time has been reached' : $reply = $R_reply_2 ; break;
case 'You are calling outside your allowed timespan' : $reply = $R_reply_3 ; break;
case 'Password Has Expired' : $reply = $R_reply_4 ; break;
case 'You are already logged in - access denied' : $reply = $R_reply_5 ; break;
}}
 
# If attempt to login
if ("$button" == "$R_boutonO") {
$hexchal = pack ("H32", $challenge);
if ($uamsecret) {
$newchal = pack ("H*", md5($hexchal . $uamsecret));
} else {
$newchal = $hexchal;
}
$response = md5("\0" . $password . $newchal);
$newpwd = pack("a32", $password);
$pappassword = implode ("", unpack("H32", ($newpwd ^ $newchal)));
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
<title>$R_loggingin</title>
<meta http-equiv=\"Cache-control\" content=\"no-cache\">
<meta http-equiv=\"Pragma\" content=\"no-cache\">";
if (isset($uamsecret) && isset($userpassword)) {
echo " <meta http-equiv=\"refresh\" content=\"0;url=http://$uamip:$uamport/logon?username=$username&password=$pappassword&userurl=$userurl\">";
} else {
echo " <meta http-equiv=\"refresh\" content=\"0;url=http://$uamip:$uamport/logon?username=$username&response=$response&userurl=$userurl\">";
}
echo "</head>
<body bgColor = 'white'>
<h1 style=\"text-align: center;\">$R_loggingin</h1>
<center>
$R_wait
</center>
</body>
</html>";
exit(0);
}
 
switch($res) {
case 'success': $result = 1; break; // If login successful
case 'failed': $result = 2; break; // If login failed
case 'logoff': $result = 3; break; // If logout successful
case 'already': $result = 4; break; // If tried to login while already logged in
case 'notyet': $result = 5; break; // If not logged in yet
case 'smartclient': $result = 6; break; // If login from smart client
case 'popup1': $result = 11; break; // If requested a logging in pop up window
case 'popup2': $result = 12; break; // If requested a success pop up window
case 'popup3': $result = 13; break; // If requested a logout pop up window
default: $result = 0; // Default: It was not a form request
}
 
# Otherwise it was not a form request
# Send out an error message
if ($result == 0) {
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
<title>$R_loginfailed</title>
<meta http-equiv=\"Cache-control\" content=\"no-cache\">
<meta http-equiv=\"Pragma\" content=\"no-cache\">
</head>
<body bgColor = 'white'>
<h1 style=\"text-align: center;\">$R_loginfailed</h1>
<center>
$R_ChilliError
</center>
</body>
</html>";
exit(0);
}
 
# Generate the output
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
<title>$R_loggingin</title>
<meta http-equiv=\"Cache-control\" content=\"no-cache\">
<meta http-equiv=\"Pragma\" content=\"no-cache\">
<SCRIPT LANGUAGE=\"JavaScript\">
var blur = 0;
var starttime = new Date();
var startclock = starttime.getTime();
var mytimeleft = 0;
 
function doTime() {
window.setTimeout( \"doTime()\", 1000 );
t = new Date();
time = Math.round((t.getTime() - starttime.getTime())/1000);
if (mytimeleft) {
time = mytimeleft - time;
if (time <= 0) {
window.location = \"$loginpath?res=popup3&uamip=$uamip&uamport=$uamport\";
}
}
if (time < 0) time = 0;
hours = (time - (time % 3600)) / 3600;
time = time - (hours * 3600);
mins = (time - (time % 60)) / 60;
secs = time - (mins * 60);
if (hours < 10) hours = \"0\" + hours;
if (mins < 10) mins = \"0\" + mins;
if (secs < 10) secs = \"0\" + secs;
title = \"Online time: \" + hours + \":\" + mins + \":\" + secs;
if (mytimeleft) {
title = \"Remaining time: \" + hours + \":\" + mins + \":\" + secs;
}
if(document.all || document.getElementById){
document.title = title;
}
else {
self.status = title;
}
}
 
function popUp(URL) {
if (self.name != \"chillispot_popup\") {
chillispot_popup = window.open(URL, 'chillispot_popup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=375');
}
}
 
function doOnLoad(result, URL, userurl, redirurl, timeleft) {
if (timeleft) {
mytimeleft = timeleft;
}
if ((result == 1) && (self.name == \"chillispot_popup\")) {
doTime();
}
if ((result == 1) && (self.name != \"chillispot_popup\")) {
chillispot_popup = window.open(URL, 'chillispot_popup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=375');
}
if ((result == 2) || result == 5) {
document.form1.UserName.focus()
}
if ((result == 2) && (self.name != \"chillispot_popup\")) {
chillispot_popup = window.open('', 'chillispot_popup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=200');
chillispot_popup.close();
}
if ((result == 12) && (self.name == \"chillispot_popup\")) {
doTime();
";
if ($adminurl) { echo "opener.location = \"$adminurl\";";}
else if ($redirurl) { echo "opener.location = \"$redirurl\";";}
else if ($userurl) { echo "opener.location = \"$userurl\";";}
else echo "opener.home();";
echo "
self.focus();
blur = 0;
}
if ((result == 13) && (self.name == \"chillispot_popup\")) {
self.focus();
blur = 1;
}
}
 
function DecO(result) {
if ((result == 12) && (self.name == \"chillispot_popup\")) {
window.location = \"http://$uamip:$uamport/logoff \";
self.focus();
blur = 1;
alert ('$R_loggedout');
}
}
</script>
<link rel=\"stylesheet\" href=\"/css/style.css\" type=\"text/css\">
</head>
<body onLoad=\"javascript:doOnLoad($result,'$loginpath?res=popup2&uamip=$uamip&uamport=$uamport&userurl=$userurl&redirurl=$redirurl&timeleft=$timeleft','$userurl','$redirurl','$timeleft')\" onBeforeUnLoad=\"javascript:DecO($result)\" bgColor='white'>";
 
# begin debugging
# print "<center>THE INPUT by GET method (for debugging):<br>";
# foreach ($_GET as $key => $value) {
# print $key . "=" . $value . "<br>";
# }
# print "<br>";
# print "<center>THE INPUT by POST method (for debugging):<br>";
# foreach ($_POST as $key => $value) {
# print $key . "=" . $value . "<br>";
# }
# print "<br></center>";
# end debugging
 
if ($result == 2) {
echo "
<h1 style=\"text-align: center;\">$R_loginfailed</h1>";
if ($reply) {
#traitement du reply ...
echo "<center> $reply </BR></BR></center>";
}
}
 
if ($result == 5) {
echo "
<h1 style=\"text-align: center;\">$organisme</h1>
<h1 style=\"text-align: center;\">$R_loggedcont</h1>";
}
 
if ($result == 2 || $result == 5) {
echo "
<form name=\"form1\" method=\"post\" action=\"$loginpath\">
<input type=\"hidden\" name=\"challenge\" value=\"$challenge\">
<input type=\"hidden\" name=\"uamip\" value=\"$uamip\">
<input type=\"hidden\" name=\"uamport\" value=\"$uamport\">
<input type=\"hidden\" name=\"userurl\" value=\"$userurl\">
<center>
<table border=\"0\" cellpadding=\"5\" cellspacing=\"0\" width=\"100%\">
<tr>
<td rowspan=\"2\" align=\"right\" width=\"25%\" ><img src=\"/images/organisme.png\" width=\"90\"></td>
<td width=\"50%\" align=\"center\"> &nbsp;&nbsp;&nbsp;&nbsp;$R_user&nbsp;<input STYLE=\"font-family: Arial\" type=\"text\" name=\"UserName\" size=\"20\" maxlength=\"32\"></td>
<td rowspan=\"2\" align=\"left\" width=\"25%\"><img src=\"/images/logo-alcasar.gif\" width=\"90\"></td>
</tr><tr>
<td width=\"50%\" align=\"center\">$R_password&nbsp;<input STYLE=\"font-family: Arial\" type=\"password\" name=\"Password\" size=\"20\" maxlength=\"32\"></td>
</tr><tr>
<td align=\"center\" colspan=\"4\" height=\"23\"><input type=\"submit\" name=\"button\" value=\"$R_boutonO\" onClick=\"javascript:popUp('$loginpath?res=popup1&uamip=$uamip&uamport=$uamport')\"></td>
</tr>
<tr>
<td align=\"center\" colspan=\"4\"><H6><a href=\"https://$uamip/pass/\">$R_passwordchg</H6></td>
</tr>
<tr>
<td align=\"center\" colspan=\"4\"><font color=\"red\"><b>$R_loggedin_stringl0</b></td>
</tr><tr>
<td align=\"left\" colspan=\"4\"><b></td>
</tr><tr>
<td align=\"center\" colspan=\"4\"><font color=\"black\"><b>$R_loggedin_stringl1</b></font></td>
</tr><tr>
<td align=\"left\" colspan=\"4\"><b>
<li>
$R_loggedin_stringl2</li>
<li>
$R_loggedin_stringl3</li>
<li>
$R_loggedin_stringl4</li>
<li>
$R_loggedin_stringl5</li>
</b></td>
</tr>
</table>
</center>
</form>
</body>
</html>";
}
 
if ($result == 1) {
echo "
<table>
<tr>
<td>
<img src=\"/images/logo-alcasar.gif\">
</td>
<td>
<h2 style=\"text-align: center;\">$R_login</h2>
</td>
</tr>";
if ($reply) {
## traitement reply
echo "<center> $reply </br></br></center>";
}
echo "
<center>
<a href=\"http://$uamip:$uamport/logoff\">$R_logout</a>
</center>
</body>
</html>";
}
 
if (($result == 4) || ($result == 12)) {
echo "
<table>
<tr>
<td>
<img src=\"/images/logo-alcasar.gif\">
</td>
<td>
<h2 style=\"text-align: center;\">$R_login</h2>
</td>
</tr>
<tr><td colspan=2><center>
<h2><a href=\"http://$uamip:$uamport/logoff\">$R_logout</a></h2>
</center></td></tr>
</table>
</body>
</html>";
}
 
if ($result == 11) {
echo "
<h1 style=\"text-align: center;\">$R_loggingin</h1>
<center>$R_wait</center>
</body>
</html>";
}
 
if (($result == 3) || ($result == 13)) {
echo "
<center>
<h1 style=\"text-align: center;\">$R_loggedout</h1>
<FORM>
<INPUT TYPE=\"button\" VALUE=\"$R_boutonF\" onClick=\"window.close()\">
</FORM></CENTER>
</body>
</html>";
}
 
exit(0);
?>
/gestion/robots.txt
0,0 → 1,19
# exclude help system from robots
User-agent: *
Disallow: /manual/
Disallow: /manual-1.3/
Disallow: /manual-2.0/
Disallow: /manual-2.2/
Disallow: /addon-modules/
Disallow: /doc/
Disallow: /images/
# the next line is a spam bot trap, for grepping the logs. you should _really_ change this to something else...
Disallow: /all_our_e-mail_addresses
# same idea here...
Disallow: /admin/
# but allow htdig to index our doc-tree
#User-agent: htdig
#Disallow:
# disallow stress test
user-agent: stress-agent
Disallow: /
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/gestion/haut.php
0,0 → 1,23
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN//2.0">
<!-- Writen by Rexy -->
<!-- fenetre "haut" -->
<HTML>
<HEAD>
<TITLE>Haut</TITLE>
<!-- Fonctions JavaScript -->
<SCRIPT LANGUAGE="JavaScript">
function ouvrir(page)
{
window.open(page, "portail", "alwaysRaised=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,hotkeys=no,width=640 ,height=480");
}
</script>
<!-- fin javascript -->
<link rel="stylesheet" href="css/style.css" type="text/css">
</HEAD>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<TD valign="top" align="left"><A HREF=javascript:ouvrir("about.htm")><IMG width="70" border="0" SRC="images/logo-alcasar.gif"></A></TD>
<TD valign="top" align="center"><A HREF="http://www.alcasar.info" TARGET="_new"><IMG height="70" border="0" SRC="images/alcasar.png"></A></TD>
<TD valign="top" align="right"><A HREF="admin/logo.php" TARGET="REXY2"><IMG height="80" border="0" SRC="images/organisme.png"></A></TD>
</TABLE>
</BODY>
</HTML>
/gestion/css/style.css
0,0 → 1,37
 
H1 {
font-size: 20pt;
text-align: left;
color: #666666;
}
 
H2 {
font-size: 15pt;
text-align: center;
color: #666666;
}
 
:link, :visited, :link:hover, :visited:hover {
font-size: small;
color: #666666;
}
 
body, p, ul, li {
font-size: small;
color: #666666;
background-color: #EFEFEF;
text-align: justify;
}
 
th {
font-size: small;
text-align: center;
color: #EFEFEF;
background-color: #666666;
}
 
table {
font-size: small;
color: #666666;
background-color: #EFEFEF;
}
/gestion/css/ldap.css
0,0 → 1,117
<!--
body {
font-size: small;
color: #536482; /* couleur général de texte*/
}
fieldset {
margin: 15px 0;
padding: 10px;
border-top: 1px solid #D7D7D7;
border-right: 1px solid #CCCCCC;
border-bottom: 1px solid #CCCCCC;
border-left: 1px solid #D7D7D7;
background-color: #EFEFEF;
position: relative;
}
legend {
padding: 1px 0;
font-family: Tahoma,arial,Verdana,Sans-serif;
font-size: .9em;
font-weight: bold;
color: #115098;
margin-top: -.4em;
position: relative;
text-transform: none;
line-height: 1.2em;
top: 0;
vertical-align: middle;
}
legend { top: -1.1em; }
fieldset dl {
font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 1.00em;
margin:0
}
fieldset dt {
float: left;
width: auto;
}
fieldset dd {
font-size: small;
}
fieldset dt label {
font-size: 1.00em;
text-align: left;
font-weight: bold;
color: #4A5A73;
}
fieldset dd input {
font-size: 1.00em;
max-width: 100%;
}
fieldset dd select {
font-size: 100%;
width: auto;
max-width: 100%;
}
fieldset dd textarea {
font-size: 0.90em;
width: 0%;
}
fieldset dd select {
width: auto;
font-size: 1.00em;
}
fieldset dl {
margin-bottom: 10px;
font-size: 0.85em;
}
fieldset dt {
width: 45%;
text-align: left;
border: none;
border-right: 1px solid #CCCCCC;
padding-top: 3px;
}
fieldset dd {
margin: 0 0 0 45%;
padding: 0 0 0 5px;
border: none;
border-left: 1px solid #CCCCCC;
vertical-align: top;
font-size: 1.00em;
}
input, textarea {
font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 0.90em;
font-weight: normal;
cursor: text;
vertical-align: middle;
padding: 2px;
color: #111111;
border-left: 1px solid #AFAEAA;
border-top: 1px solid #AFAEAA;
border-right: 1px solid #D5D5C8;
border-bottom: 1px solid #D5D5C8;
background-color: #FFFFFF;
}
input:hover, textarea:hover {
border-left: 1px solid #AFAEAA;
border-top: 1px solid #AFAEAA;
border-right: 1px solid #AFAEAA;
border-bottom: 1px solid #AFAEAA;
background-color: #E9E9E2;
}
fieldset dl:hover dt, fieldset dl:hover dd {
border-color: #666666;
}
fieldset dl{
height: 1%;
overflow: hidden;
}
label {
cursor: pointer;
font-size: 0.85em;
padding: 0 5px 0 0;
}
-->
/gestion/alcasar-1.8-presentation.pdf
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/bas.htm
0,0 → 1,11
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN//2.0">
<HTML><!-- frame BAS written by REXY -->
<HEAD>
<TITLE>bas</TITLE>
</HEAD>
<frameset COLS="15%,85%" border="no">
<frame frameborder="no" border="no" scrolling="no" nosave noresize src="menu.php" NAME="REXY1">
<frame frameborder="no" border="no" scrolling="yes" nosave noresize src="phpsysinfo/" NAME="REXY2">
<NOFRAMES> DESOLE!! Votre browser ne peut pas visualiser cette page car elle comporte des frames.</NOFRAMES>
</frameset>
</HTML>
/gestion/favicon.ico
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/alcasar-1.8-exploitation.pdf
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/gestion/about.htm
0,0 → 1,92
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><!-- by REXY -->
<HEAD>
<TITLE>bonus</TITLE>
</HEAD>
<BODY background="images/linux_ksc2.jpg" TEXT="#FFFFFF" BGCOLOR="#000000">
<!-- on crée 3 calques -->
<div ID="obj1" STYLE="position:absolute;TOP:0px;LEFT:0px;width:20px;height:18px;">
<dd><img src="images/mini-tux.png" alt="linux" WIDTH="65" HEIGHT="72"></dd>
</div>
<div ID="obj2" STYLE="position:absolute;TOP:0px;LEFT:0px;width:20px;height:18px;">
<dd><img src="images/mini-tux.png" alt="linux" WIDTH="65" HEIGHT="72"></dd>
</div>
<div ID="obj3" STYLE="position:absolute;TOP:0px;LEFT:0px;width:20px;height:18px;">
<dd><img src="images/mini-tux.png" alt="linux" WIDTH="65" HEIGHT="72"></dd>
</div>
<CENTER><H2>A.L.C.A.S.A.R</H2>
<H3>
Application Libre pour le Contr&ocirc;le Authentifi&eacute; et S&eacute;curis&eacute; des Acc&egrave;s au R&eacute;seau
</H3></CENTER>
<script LANGUAGE="javascript">
//Fonction pour ouvrir une nouvelle fenêtre
function ouvrir(page)
{
window.open(page, "From Rexy74", "alwaysRaised=yes,toolbar=yes,location=yes,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=no,copyhistory=no,hotkeys=no,width=640 ,height=480");
}
//Code d'animation
/* On récupère les 3 calques */
var div1 = document.all.obj1.style;
var div2 = document.all.obj2.style;
var div3 = document.all.obj3.style;
var objet;
objet = new Array(div1,div2,div3)
/* On placer l'objet (i) au coordonnees (px,py) */
function placeObj(i,px,py)
{
objet[i].left=px;
objet[i].top=py;
}
/* On se place au centre de la fenêtre */
var yBase = window.innerHeight/3;
var xBase = window.innerWidth/3;
var delay = 55;
var yAmpl = 10;
var yMax = 40;
var step = .1;
var ystep = .25;
var currStep = 0;
var tAmpl=1;
// définition du centre de gravité
var Xpos = 300;
var Ypos = 220;
var j = 0;
function animation()
{
var cx;var cy;
for ( j = 0 ; j < 3 ; j++ )
{
// merci à supelec pour la fonction
cx=Xpos + Math.sin((20*Math.sin(currStep/20))+j*70)*xBase*(Math.sin(10+currStep/(10+j))+0.2)*Math.cos((currStep + j*25)/10);
cy=Ypos + Math.cos((20*Math.sin(currStep/(20+j)))+j*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
placeObj(j,cx,cy);
}
currStep += step;
setTimeout("animation()", 10) ;
}
animation();
</script>
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<TABLE width="100%" border="1" cellspacing="0" cellpadding="0">
<TR>
<TD align="center"><A HREF=javascript:ouvrir("http://www.linux.org")><img border="0" src="images/footer_linux.png"></A></TD>
<TD align="center"><A HREF=javascript:ouvrir("http://www.mandriva.com")><img border="0" src="images/footer_mandriva.png"></A></TD>
<TD align="center"><A HREF=javascript:ouvrir("http://www.coova.org/CoovaChilli")><img border="0" src="images/footer_coova.png"></A></TD>
<TD align="center"><A HREF=javascript:ouvrir("http://www.freeradius.org")><img border="0" src="images/footer_freeradius.png"></A></TD>
<TD align="center"><A HREF=javascript:ouvrir("http://www.mysql.org")><img border="0" src="images/footer_mysql.png"></A></TD>
<TD align="center"><A HREF=javascript:ouvrir("http://www.apache.org")><img border="0" src="images/footer_apache.png"></A></TD>
<TD align="center"><A HREF=javascript:ouvrir("http://www.php.net")><img border="0" src="images/footer_php.png"></A></TD>
</TR>
<TR>
<TD align="center"><A HREF=javascript:ouvrir("http://www.gnupg.org")><img border="0" src="images/footer_gnupg.png"></A></TD>
<TD align="center"><A HREF=javascript:ouvrir("http://awstats.sourceforge.net")><img border="0" src="images/footer_awstats.png"></A></TD>
<TD align="center"><A HREF=javascript:ouvrir("http://firewalleyes.creabilis.com")><img border="0" src="images/footer_firewalleyes.png"></A></TD>
<TD align="center"><A HREF=javascript:ouvrir("http://www.mondorescue.org")><img border="0" src="images/footer_mondo.png"></A></TD>
<TD align="center"><A HREF=javascript:ouvrir("http://www.netfilter.org")><img border="0" src="images/footer_netfilter.png"></A></TD>
<TD align="center"><A HREF=javascript:ouvrir("http://www.squid-cache.org")><img border="0" src="images/footer_squid.png"></A></TD>
<TD align="center"><A HREF=javascript:ouvrir("http://dansguardian.org")><img border="0" src="images/footer_dansguardian.png"></A></TD>
<TD></TD>
</TR>
</TABLE>
</BODY>
</HTML>
/gestion/stat.php
0,0 → 1,18
<?
$select[0]="$l_stat_user_day";
$select[1]="$l_stat_con";
$select[2]="$l_stat_daily";
$select[3]="$l_stat_web";
$select[4]="$l_firewall";
$fich[0]="manager/htdocs/user_stats.php";
$fich[1]="manager/htdocs/accounting.php";
$fich[2]="manager/htdocs/stats.php";
$fich[3]="awstats/";
$fich[4]="admin/firewallEyes/index.html";
$j=0;
while ($j != count($select))
{
echo "<TR><TD valign=\"middle\" align=\"left\">&nbsp;<img src=\"/images/right2.gif\" height=10 width=10 border=no nosave><a href=\"$fich[$j]\" target=\"REXY2\"><font color=\"black\">$select[$j]</font></a></TD></TR>";
$j++;
}
?>
/gestion/backup/sauvegarde.php
0,0 → 1,128
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><!-- written by Rexy -->
<HEAD>
<TITLE>Sauvegarde</TITLE>
<link rel="stylesheet" href="/css/style.css" type="text/css">
</HEAD>
<body>
<?
# choice of language
$Language = "en";
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2));}
if ($Language == 'fr'){
$l_backups = "Sauvegarde";
$l_user_db_save = "Sauvegarder la base des usagers";
$l_system_iso = "Cr&eacute;er une image ISO &agrave; chaud du syst&egrave;me";
$l_execute = "Ex&eacute;cuter";
$l_warning = "(attention, la cr&eacute;ation de l'image ISO du syst&egrave;me dure plusieurs dizaines de minutes)";
$l_backup_files = "Fichiers disponibles pour archivage";
$l_firewall_log = "journaux du parefeu";
$l_users_db_files = "Base des usagers";
$l_iso_files = "images ISO du syst&egrave;me";
}
else {
$l_backups = "Backups";
$l_user_db_save = "Save the users database";
$l_system_iso = "Create a system iso image";
$l_execute = "Execute";
$l_warning = "(warning, the creation of the system iso image takes few minutes)";
$l_backup_files = "Archive backup files";
$l_firewall_log = "Firewall log files";
$l_users_db_files = "Users database";
$l_iso_files = "System ISO images";
}
function taille_fichier($fichier)
{
$taille_fichier = filesize($fichier);
if ($taille_fichier >= 1073741824){
$taille_fichier = round($taille_fichier / 1073741824 * 100) / 100 . " Go";}
elseif ($taille_fichier >= 1048576){
$taille_fichier = round($taille_fichier / 1048576 * 100) / 100 . " Mo";}
elseif ($taille_fichier >= 1024){
$taille_fichier = round($taille_fichier / 1024 * 100) / 100 . " Ko";}
else {$taille_fichier = $taille_fichier . " o";}
return $taille_fichier;
}
?>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th><? echo $l_backups;?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
<tr><td valign="middle" align="left">
<FORM action="sauvegarde.php" method=POST><b>
<select name='choix'></b>
<option value="sauvegarde_DB"><?echo "$l_user_db_save";?>
<option value="image_ISO"><?echo "$l_system_iso";?>
</select>
<input type=submit value="<?echo "$l_execute";?>">
</FORM>
<?echo "$l_warning";?>
</td></tr>
</TABLE>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th><?echo "$l_backup_files";?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
<TR align="center">
<TD><b><?echo "$l_firewall_log";?></b></TD>
<TD><b><?echo "$l_users_db_files";?></b></TD>
<TD><b><?echo "$l_iso_files";?></b></TD>
</TR><TR align="center">
<?
if (isset($_POST['choix'])){
switch ($_POST['choix']){
case 'sauvegarde_DB' :
exec ("sudo /usr/local/sbin/alcasar-mysql.sh -dump");
break;
case 'archivage_logs' :
exec ("sudo /usr/local/bin/alcasar-log-export.sh -30");
break;
case 'image_ISO' :
exec ("sudo /usr/local/bin/alcasar-mondo.sh");
break;
}
}
$dir[0]="logs/firewall";
$dir[1]="base";
$dir[2]="ISO";
$j=0;
$nb=count($dir);
while ($j != $nb)
{
echo "<TD>";
$rep = opendir("/var/Save/".$dir[$j]);
$i=0; unset ($liste_f);
while ( $file = readdir($rep) )
{
if ($file != '.' && $file != '..')
{
$liste_f[$i] = $file;
$i++;
}
}
closedir($rep);
if ($i == 0)
{
echo "vide";
}
else
{
sort($liste_f);
while ( $i > 0)
{
$i--;
echo "<a href=\"/save/$dir[$j]/$liste_f[$i]\">$liste_f[$i]</A> (";echo taille_fichier("/var/Save/".$dir[$j]."/".$liste_f[$i]);echo ")<BR>";
}
}
echo "</TD>";
$j++;
}
?>
</tr>
</TABLE>
</BODY>
</HTML>
/gestion/index.html
0,0 → 1,17
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN//2.0">
<HTML>
<!-- Written by Rexy -->
<head>
<TITLE>ALCASAR Control Center</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta NAME="description" CONTENT="page de gestion du portail captif">
<link rel="stylesheet" href="css/style.css" type="text/css">
<link rel="icon" href="images/tux16.ico" type="image/ico">
</head>
<FRAMESET ROWS="15%,85%" border="no">
<FRAME frameborder="no" border="no" scrolling="no" nosave noresize
SRC="haut.php" NAME="haut">
<FRAME frameborder="no" border="no" scrolling="no" nosave noresize
SRC="bas.htm" NAME="bas">
</FRAMESET>
</HTML>
/gestion/system.php
0,0 → 1,17
<?
$select[0]=$l_activity;
$select[1]=$l_services;
$select[2]=$l_network;
$select[3]=$l_ldap;
$fich[0]="admin/activity.php";
$fich[1]="admin/services.php";
$fich[2]="admin/network.php";
$fich[3]="admin/ldap.php";
$j=0;
$nb=count($select);
while ($j != $nb)
{
echo "<TR><TD valign=\"middle\" align=\"left\">&nbsp;&nbsp;<img src=\"/images/right2.gif\" height=10 width=10 border=no nosave><a href=\"$fich[$j]\" target=\"REXY2\"><font color=\"black\">$select[$j]</font></a></TD></TR>";
$j++;
}
?>
/gestion/manager/htdocs/user_info.php
0,0 → 1,124
<?php
require('/etc/freeradius-web/config.php');
?>
 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
<title>Page d'information personnelle</title>
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th>Gestion des usagers</th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">
<center>
<table border=0 width=550 cellpadding=0 cellspacing=0>
<tr valign=top>
<!--<td align=center><img src="images/title2.gif"></td>-->
</tr>
</table>
 
<table border=0 width=400 cellpadding=0 cellspacing=2>
<?php
include("../html/user_toolbar.html.php");
?>
</table>
 
<?php
if ($change == 1){
if (is_file("../lib/$config[general_lib_type]/user_info.php"))
include("../lib/$config[general_lib_type]/user_info.php");
if (is_file("../lib/$config[general_lib_type]/change_info.php"))
include("../lib/$config[general_lib_type]/change_info.php");
}
 
if (is_file("../lib/$config[general_lib_type]/user_info.php"))
include("../lib/$config[general_lib_type]/user_info.php");
?>
 
<br>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=200>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
<font color="white">Page d'information personnelle de <?php echo "$login ($cn)"?></font>&nbsp;
</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<form method=post>
<input type=hidden name=login value="<?php echo $login?>">
<input type=hidden name=change value="0">
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<?php
echo <<<EOM
<tr>
<td align=right bgcolor="#d0ddb0">
Nom complet (NOM Pr&eacute;nom)
</td><td>
<input type=text name="Fcn" value="$cn" size=35>
</td>
</tr>
<tr>
<td align=right bgcolor="#d0ddb0">
Mail
</td><td>
<input type=text name="Fmail" value="$mail" size=35>
</td>
</tr>
<tr>
<td align=right bgcolor="#d0ddb0">
Service
</td><td>
<input type=text name="Fou" value="$ou" size=35>
</td>
</tr>
<tr>
<td align=right bgcolor="#d0ddb0">
T&eacute;l&eacute;phone personnel
</td><td>
<input type=text name="Fhomephone" value="$homephone" size=35>
</td>
</tr>
<tr>
<td align=right bgcolor="#d0ddb0">
T&eacute;l&eacute;phone bureau
</td><td>
<input type=text name="Ftelephonenumber" value="$telephonenumber" size=35>
</td>
</tr>
<tr>
<td align=right bgcolor="#d0ddb0">
T&eacute;l&eacute;phone mobile
</td><td>
<input type=text name="Fmobile" value="$mobile" size=35>
</td>
</tr>
EOM;
?>
</table>
<br>
<input type=submit class=button value="Modifier" OnClick="this.form.change.value=1">
</form>
</td></tr>
</table>
</tr>
</table>
</TD></TR>
</TABLE>
</td></tr>
</TABLE>
</body>
</html>
/gestion/manager/htdocs/accounting.php
0,0 → 1,298
<?php
 
require('/etc/freeradius-web/config.php');
require('../lib/functions.php');
require('../lib/sql/functions.php');
require('../lib/acctshow.php');
 
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
else{
echo <<<EOM
<html>
<head>
<title>G&eacute;n&eacute;rateur de rapports de comptes</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<center>
<b>Could not include SQL library functions. Aborting</b>
</body>
</html>
EOM;
exit();
}
 
$operators=array( '=','<', '>', '<=', '>=', 'regexp', 'like' );
if ($config[sql_type] == 'pg'){
$operators=array( '=','<', '>', '<=', '>=', '~', 'like', '~*', '~~*', '<<=' );
}
 
$link = @da_sql_pconnect ($config) or die('cannot connect to sql databse');
$fields = @da_sql_list_fields($config[sql_accounting_table],$link,$config);
$no_fields = @da_sql_num_fields($fields,$config);
 
unset($items);
 
for($i=0;$i<$no_fields;$i++){
$key = strtolower(@da_sql_field_name($fields,$i,$config));
$val = $sql_attrs[$key][desc];
if ($val == '')
continue;
$show = $sql_attrs[$key][show];
$selected[$key] = ($show == 'yes') ? 'selected' : '';
$items[$key] = "$val";
}
asort($items);
 
class Qi {
var $name;
var $item;
var $_item;
var $operator;
var $type;
var $typestr;
var $value;
function Qi($name,$item,$operator) {
$this->name=$name;
$this->item=$item;
$this->operator=$operator;
}
 
function show() { global $operators;
global $items;
$nam = $this->item;
echo <<<EOM
<tr><td align=left>
<i>$items[$nam]</i>
<input type=hidden name="item_of_$this->name" value="$this->item">
</td><td align=left>
<select name=operator_of_$this->name>
EOM;
foreach($operators as $operator){
if($this->operator == $operator)
$selected=" selected ";
else
$selected='';
print("<option value=\"$operator\" $selected>$operator</option>\n");
}
echo <<<EOM
</select>
</td><td align=left>
<input name="value_of_$this->name" type=text value="$this->value">
</td><td align=left>
<input type=hidden name="delete_$this->name" value=0>
<input type=submit class=button size=5 value=del onclick="this.form.delete_$this->name.value=1">
</td></tr>
EOM;
}
 
function get($designator) { global ${"item_of_$designator"};
global ${"value_of_$designator"};
global ${"operator_of_$designator"};
if(${"item_of_$designator"}){
$this->value= ${"value_of_$designator"};
$this->operator=${"operator_of_$designator"};
$this->item=${"item_of_$designator"};
}
}
function query(){
global $operators;
global $items;
return $items[$this->item]." $this->operator '$this->value'";
}
}
 
?>
<html>
<head>
<title>Journal des connexions</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th>Journal des connexions</th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
</TABLE>
<?php
if(!$queryflag) {
echo <<<EOM
<form method=post>
<table border=0 width=740 cellpadding=1 cellspacing=1>
<tr>
<td>
<b>Afficher les attributs suivants :</b><br>
<select name="accounting_show_attrs[]" size=5 multiple>
EOM;
foreach($items as $key => $val)
echo <<<EOM
<option $selected[$key] value="$key">$val</option>
EOM;
 
echo <<<EOM
</select>
<br><br>
<b>Class&eacute; par :</b><br>
<select name="order_by">
EOM;
 
foreach($items as $key => $val)
if ($val == 'username')
echo <<<EOM
<option selected value="$key">$val</option>
EOM;
else
echo <<<EOM
<option value="$key">$val</option>
EOM;
 
echo <<<EOM
</select>
<br><br>
<b>Nbr. Max. de r&eacute;sultats retourn&eacute;s :</b><br>
<input name=maxresults value=$config[sql_row_limit] size=5>
</td>
<td valign=top>
<input type=hidden name=add value=0>
<table border=0 width=340 cellpadding=1 cellspacing=1>
<tr><td>
<b>Crit&egrave;re de s&eacute;lection :</b>
</td></tr>
<tr><td>
<select name=item_name onchange="this.form.add.value=1;this.form.submit()">
<option>--Attribute--</option>
EOM;
 
foreach($items as $key => $val)
print("<option value=\"$key\">$val</option>");
 
echo <<<EOM
</select>
</td></tr>
EOM;
 
$number=1;
$offset=0;
while (${"item_of_w$number"}) {
if(${"delete_w$number"}==1) {$offset=1;$number++;}
else {
$designator=$number-$offset;
${"w$designator"} = new Qi("w$designator","","");
${"w$designator"}->get("w$number");
${"w$designator"}->show();
$number++;
}
}
if($add==1) {
${"w$number"} = new Qi("w$number","$item_name","$operators[0]");
${"w$number"}->show();
}
echo <<<EOM
</table>
</td>
<tr>
<td>
<input type=hidden name=queryflag value=0>
<br><input type=submit class=button onclick="this.form.queryflag.value=1">
</td>
</tr>
</table>
</form>
</body>
</html>
EOM;
 
}
 
if ($queryflag == 1){
$i = 1;
while (${"item_of_w$i"}){
$op_found = 0;
foreach ($operators as $operator){
if (${"operator_of_w$i"} == $operator){
$op_found = 1;
break;
}
}
if (!$op_found)
die("L'op&eacute;ration demand&eacute; n'est pas valide. Sortie anormale.");
${"item_of_w$i"} = preg_replace('/\s/','',${"item_of_w$i"});
${"value_of_w$i"} = da_sql_escape_string(${"value_of_w$i"});
$where .= ($i == 1) ? ' WHERE ' . ${"item_of_w$i"} . ' ' . ${"operator_of_w$i"} . " '" . ${"value_of_w$i"} . "'" :
' AND ' . ${"item_of_w$i"} . ' ' . ${"operator_of_w$i"} . " '" . ${"value_of_w$i"} . "'" ;
$i++;
}
 
$order = ($order_by != '') ? "$order_by" : 'username';
 
if (preg_match("/[\s;]/",$order))
die("ORDER BY pattern is illegal. Exiting abnornally.");
 
if (!is_numeric($maxresults))
die("Max Results is not in numeric form. Exiting abnormally.");
 
unset($query_view);
foreach ($accounting_show_attrs as $val)
$query_view .= $val . ',';
$query_view = ereg_replace(',$','',$query_view);
unset($sql_extra_query);
if ($config[sql_accounting_extra_query] != '')
$sql_extra_query = xlat($config[sql_accounting_extra_query],$login,$config);
$sql_extra_query = da_sql_escape_string($sql_extra_query);
$query="SELECT " . da_sql_limit($maxresults,0,$config) . " $query_view FROM $config[sql_accounting_table]
$where $sql_extra_query " . da_sql_limit($maxresults,1,$config) .
" ORDER BY $order " . da_sql_limit($maxresults,2,$config) . ";";
 
echo <<<EOM
<table border="0" width="100%" cellpadding="1" cellspacing="1">
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<p>
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr bgcolor="#d0ddb0">
</tr>
EOM;
foreach($accounting_show_attrs as $val){
$desc = $sql_attrs[$val][desc];
echo "<th>$desc</th>\n";
}
echo "</tr>\n";
 
$search = @da_sql_query($link,$config,$query);
if ($search){
while( $row = @da_sql_fetch_array($search,$config) ){
$num++;
echo "<tr align=center>\n";
foreach($accounting_show_attrs as $val){
$info = $row[$val];
if ($info == '')
$info = '-';
$info = $sql_attrs[$val][func]($info);
if ($val == 'username'){
$Info = urlencode($info);
$info = "<a href=\"user_admin.php?login=$Info\" title=\"Edit user $info\">$info<a/>";
}
echo <<<EOM
<td>$info</td>
EOM;
}
echo "</tr>\n";
}
}
else
echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
echo <<<EOM
</table>
</td></tr>
</table>
</td></tr>
</table>
</body>
</html>
EOM;
}
?>
/gestion/manager/htdocs/user_stats.php
0,0 → 1,234
<?php
require('/etc/freeradius-web/config.php');
require('../lib/functions.php');
require('../lib/sql/nas_list.php');
require_once('../lib/xlat.php');
?>
<html>
<?php
 
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
else{
echo <<<EOM
<title>Statistiques utilisateurs</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="style.css">
</head>
<body>
<center>
<b>Could not include SQL library functions. Aborting</b>
</body>
</html>
EOM;
exit();
}
 
if ($start == '' && $stop == ''){
$now = time();
$stop = date($config[sql_date_format],$now);
$now -= 604800;
$start = date($config[sql_date_format],$now);
}
$start = da_sql_escape_string($start);
$stop = da_sql_escape_string($stop);
$pagesize = ($pagesize) ? $pagesize : 10;
if (!is_numeric($pagesize) && $pagesize != 'all')
$pagezise = 10;
if ($pagesize > 100)
$pagesize = 100;
$limit = ($pagesize == 'all') ? '100' : "$pagesize";
$selected[$pagesize] = 'selected';
$order = ($order) ? $order : $config[general_accounting_info_order];
if ($order != 'desc' && $order != 'asc')
$order = 'desc';
if ($sortby != '')
$order_attr = ($sortby == 'num') ? 'connnum' : 'conntotduration';
else
$order_attr = 'connnum';
if ($server != '' && $server != 'all'){
$server = da_sql_escape_string($server);
$server_str = "AND nasipaddress = '$server'";
}
$login_str = ($login) ? "AND username = '$login' " : '';
 
$selected[$order] = 'selected';
$selected[$sortby] = 'selected';
 
$sql_extra_query = '';
if ($config[sql_accounting_extra_query] != ''){
$sql_extra_query = xlat($config[sql_accounting_extra_query],$login,$config);
$sql_extra_query = da_sql_escape_string($sql_extra_query);
}
 
unset($da_name_cache);
if (isset($_SESSION['da_name_cache']))
$da_name_cache = $_SESSION['da_name_cache'];
 
?>
 
<head>
<title>Statistiques utilisateurs</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<center>
<table border=0 width=550 cellpadding=0 cellspacing=0>
<tr valign=top>
<!--<td align=center><img src="images/title2.gif"></td>-->
</tr>
</table>
<table border=0 width=400 cellpadding=0 cellspacing=2>
</table>
<br>
<table border=0 width=840 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=65%></td>
<td bgcolor="black" width=35%>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
<font color="white">Statistiques utilisateurs</font>&nbsp;
</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<?php
echo <<<EOM
De <b>$start</b> &agrave; <b>$stop</b>
EOM;
?>
 
<p>
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr bgcolor="#d0ddb0">
<th>#</th><th>Identifiant</th><th>Date</th><th>Serveur</th><th>Nombres de connections</th><th>Dur&eacute;e des connections</th><th>Upload</th><th>Download</th>
</tr>
 
<?php
$link = @da_sql_pconnect($config);
if ($link){
$search = @da_sql_query($link,$config,
"SELECT " . da_sql_limit($limit,0,$config) . " * FROM $config[sql_total_accounting_table]
WHERE acctdate >= '$start' AND acctdate <= '$stop' $server_str $login_str $sql_extra_query " . da_sql_limit($limit,1,$config)
. " ORDER BY $order_attr $order " . da_sql_limit($limit,2,$config) . " ;");
 
if ($search){
while( $row = @da_sql_fetch_array($search,$config) ){
$num++;
$acct_login = $row[username];
if ($acct_login == '')
$acct_login = '-';
else{
$Acct_login = urlencode($acct_login);
$acct_login = "<a href=\"user_admin.php?login=$Acct_login\" title=\"Editer l'utilisateur $acct_login\">$acct_login</a>";
}
$acct_time = $row[conntotduration];
$acct_time = time2str($acct_time);
$acct_conn_num = $row[connnum];
$acct_date = $row[acctdate];
$acct_upload = $row[inputoctets];
$acct_download = $row[outputoctets];
$acct_upload = bytes2str($acct_upload);
$acct_download = bytes2str($acct_download);
$acct_server = $da_name_cache[$row[nasipaddress]];
if (!isset($acct_server)){
$acct_server = @gethostbyaddr($row[nasipaddress]);
if (!isset($da_name_cache) && $config[general_use_session] == 'yes'){
$da_name_cache[$row[nasipaddress]] = $acct_server;
session_register('da_name_cache');
}
else
$da_name_cache[$row[nasipaddress]] = $acct_server;
}
if ($acct_server == '')
$acct_server = '-';
echo <<<EOM
<tr align=center bgcolor="white">
<td>$num</td>
<td>$acct_login</td>
<td>$acct_date</td>
<td>$acct_server</td>
<td>$acct_conn_num</td>
<td>$acct_time</td>
<td>$acct_upload</td>
<td>$acct_download</td>
</tr>
EOM;
}
}
}
echo <<<EOM
</table>
<tr><td>
<hr>
<tr><td align="left">
<form action="user_stats.php" method="post" name="master">
<table border=0>
<tr valign="bottom">
<td><small><b>date d&eacute;but</td><td><small><b>date fin</td><td><small><b>nbr./page</td><td><small><b>tri&eacute; par</td><td><small><b>class&eacute; par ordre </td>
<tr valign="middle"><td>
<input type="hidden" name="show" value="0">
<input type="text" name="start" size="11" value="$start"></td>
<td><input type="text" name="stop" size="11" value="$stop"></td>
<td><select name="pagesize">
<option $selected[5] value="5" >05
<option $selected[10] value="10">10
<option $selected[15] value="15">15
<option $selected[20] value="20">20
<option $selected[40] value="40">40
<option $selected[80] value="80">80
<option $selected[all] value="all">tous
</select>
</td>
<td>
<select name="sortby">
<option $selected[num] value="num">Nombre de connexions
<option $selected[time] value="time">Dur&eacute;e des connexions
</select>
</td>
<td><select name="order">
<option $selected[asc] value="asc">croissant
<option $selected[desc] value="desc">d&eacute;croissant
</select>
</td>
EOM;
?>
 
<td><input type="submit" class=button value="show"></td></tr>
<tr><td>
<b>Sur le serveur d'acc&egrave;s :</b>
</td>
<td><b>Utilisateur</b></td></tr>
<tr><td>
<select name="server">
<?php
foreach ($nas_list as $nas){
$name = $nas[name];
if ($nas[ip] == '')
continue;
$servers[$name] = $nas[ip];
}
ksort($servers);
foreach ($servers as $name => $ip){
if ($server == $ip)
echo "<option selected value=\"$ip\">$name\n";
else
echo "<option value=\"$ip\">$name\n";
}
if ($server == '' || $server == 'all')
echo "<option selected value=\"all\">tous\n";
else
echo "<option value=\"all\">tous\n";
?>
</select>
</td>
<td><input type="text" name="login" size="11" value="<?php echo $login ?>"></td>
</tr>
</table></td></tr></form>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/.directory
0,0 → 1,3
[Dolphin]
Timestamp=2009,8,23,23,33,47
ViewMode=1
/gestion/manager/htdocs/clear_opensessions.php
0,0 → 1,193
<?php
require('/etc/freeradius-web/config.php');
require_once('../lib/xlat.php');
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
else{
echo <<<EOM
<title>Fermeture des sessions ouvertes pour l'utilisateur $login</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="style.css">
</head>
<body>
<center>
<b>Could not include SQL library functions. Aborting</b>
</body>
</html>
EOM;
exit();
}
 
echo <<<EOM
<html>
<head>
<title>Fermeture des sessions ouvertes pour l'usager : $login</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th>Gestion des usagers</th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">
<center>
<table border=0 width=550 cellpadding=0 cellspacing=0>
<tr valign=top>
<!--<td align=center><img src="images/title2.gif"></td>-->
</tr>
</table>
 
<table border=0 width=400 cellpadding=0 cellspacing=2>
EOM;
 
include("../html/user_toolbar.html.php");
 
$open_sessions = 0;
 
$sql_extra_query = '';
if ($config[sql_accounting_extra_query] != ''){
$sql_extra_query = xlat($config[sql_accounting_extra_query],$login,$config);
$sql_extra_query = da_sql_escape_string($sql_extra_query);
}
 
print <<<EOM
</table>
 
<br>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=200>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
<font color="white">Fermeture des sessions ouvertes pour l'usager : $login</font>&nbsp;
</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
EOM;
if ($drop_conns == 1){
$method = 'snmp';
$nastype = 'cisco';
if ($config[general_sessionclear_method] != '')
$method = $config[general_sessionclear_method];
if ($config[general_nas_type] != '')
$nastype = $config[general_nas_type];
if ($config[general_ld_library_path] != '')
putenv("LD_LIBRARY_PATH=$config[general_ld_library_path]");
$nas_by_ip = array();
$meth_by_ip = array();
$nastype_by_ip = array();
foreach ($nas_list as $nas){
if ($nas[ip] != ''){
$ip = $nas[ip];
$nas_by_ip[$ip] = $nas[community];
$meth_by_ip[$ip] = $nas[sessionclear_method];
$nastype_by_ip[$ip] = $nas[nas_type];
}
}
 
$link = @da_sql_pconnect($config);
if ($link){
$search = @da_sql_query($link,$config,
"SELECT nasipaddress,acctsessionid FROM $config[sql_accounting_table]
WHERE username = '$login' AND acctstoptime IS NULL;");
if ($search){
while($row = @da_sql_fetch_array($search,$config)){
$sessionid = $row[acctsessionid];
$sessionid = hexdec($sessionid);
$nas = $row[nasipaddress];
$port = $row[nasportid];
$meth = $meth_by_ip[$nas];
$nastype = ($nastype_by_ip[$nas] != '') ? $nastype_by_ip[$nas] : $nastype;
$comm = $nas_by_ip[$nas];
if ($meth == '')
$meth = $method;
if ($meth == 'snmp' && $comm != '')
exec("$config[general_sessionclear_bin] $nas snmp $nastype $login $sessionid $comm");
if ($meth == 'telnet')
exec("$config[general_sessionclear_bin] $nas telnet $nastype $login $sessionid $port");
}
}
else
echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
}
else
echo "<b>Could not connect to SQL database</b><br>\n";
}
if ($clear_sessions == 1)
{
exec ("sudo /usr/local/sbin/alcasar-logout.sh $login");
$sql_servers = array();
if ($config[sql_extra_servers] != '')
$sql_servers = explode(' ',$config[sql_extra_servers]);
$quer = '= 0';
if ($config[sql_type] == 'pg')
$quer = 'IS NULL';
$sql_servers[] = $config[sql_server];
foreach ($sql_servers as $server)
{
$link = @da_sql_host_connect($server,$config);
if ($link)
{
$res = @da_sql_query($link,$config,
"DELETE FROM $config[sql_accounting_table]
WHERE username='$login' AND acctstoptime $quer $sql_extra_query;");
if ($res)
echo "<b>La comptabilit&eacute; des sessions pour cet usager a &eacute;t&eacute; arr&eacute;t&eacute;e</b><br>\n";
else
echo "<b>Error deleting open sessions for user" . da_sql_error($link,$config) . "</b><br>\n";
}
else
echo "<b>Could not connect to SQL database</b><br>\n";
}
}
$link = @da_sql_pconnect($config);
if ($link){
$search = @da_sql_query($link,$config,
"SELECT COUNT(*) AS counter FROM $config[sql_accounting_table]
WHERE username = '$login' AND acctstoptime IS NULL $sql_extra_query;");
if ($search){
if ($row = @da_sql_fetch_array($search,$config))
$open_sessions = $row[counter];
}
else
echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
}
else
echo "<b>Could not connect to SQL database</b><br>\n";
?>
<form method=post>
<input type=hidden name=login value=<?php print $login ?>>
<input type=hidden name=clear_sessions value="0">
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr>
<td align=center>
<?
if ($open_sessions == 0)
{
echo "L'usager $login n'a pas de session ouverte";
}
else {
echo "L'usager $login a <i>$open_sessions</i> session(s) ouverte(s)<br><br>";
echo "&Ecirc;tes-vous certain de vouloir ";
if ($open_sessions == 1) { echo "la"; } else {echo "les"; }
echo " fermer ? ";
echo "<input type=submit class=button value=\"Oui, Fermer\" OnClick=\"this.form.clear_sessions.value=1\">";
}
?>
</form>
</td></tr></table>
<!--<input type=submit class=button value="Oui, poubelliser les connexions" OnClick="this.form.drop_conns.value=1">-->
</td></tr></table>
</TD></TR></TABLE>
</body>
</html>
/gestion/manager/htdocs/stats.php
0,0 → 1,186
<?php
require('/etc/freeradius-web/config.php');
require('../lib/sql/nas_list.php');
require_once('../lib/xlat.php');
?>
<html>
<head>
<title>Analyse des comptes</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
<link rel="stylesheet" href="style.css">
</head>
<body>
<center>
 
<?php
require_once('../lib/functions.php');
 
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
else{
echo <<<EOM
<b>Could not include SQL library functions. Aborting</b>
</body>
</html>
EOM;
exit();
}
 
$stats_num = array();
 
$date = strftime('%A, %e %B %Y, %T %Z');
$now = time();
if ($before == '')
$before = date($config[sql_date_format], $now + 86400);
$after = ($after != '') ? "$after" : date($config[sql_date_format], $now - 604800 );
 
$after_time = date2time($after);
$before_time = date2time($before);
$days[0] = $after;
$counter = $after_time + 86400;
$i = 1;
while($counter < $before_time){
$days[$i++] = date($config[sql_date_format],$counter);
$counter += 86400;
}
$days[$i] = $before;
$num_days = $i;
 
$column1 = ($column1 != '') ? "$column1" : 'sessions';
$column2 = ($column2 != '') ? "$column2" : 'usage';
$column3 = ($column3 != '') ? "$column3" : 'download';
$column[1] = "$column1";
$column[2] = "$column2";
$column[3] = "$column3";
$selected1["$column1"] = 'selected';
$selected2["$column2"] = 'selected';
$selected3["$column3"] = 'selected';
 
$message['sessions'] = 'sessions';
$message['usage'] = 'total usage time';
$message['usage'] = 'temps d\'utilisation total ';
$message['upload'] = 'uploads';
$message['download'] = 'downloads';
if ($config[general_stats_use_totacct] == 'yes'){
$sql_val['sessions'] = 'connnum';
$sql_val['usage'] = 'conntotduration';
$sql_val['upload'] = 'inputoctets';
$sql_val['download'] = 'outputoctets';
}
else{
$sql_val['usage'] = 'acctsessiontime';
$sql_val['upload'] = 'acctinputoctets';
$sql_val['download'] = 'acctoutputoctets';
}
$fun['sessions'] = nothing;
$fun['usage'] = time2strclock;
$fun['upload'] = bytes2str;
$fun['download'] = bytes2str;
$sql_val['user'] = ($login == '') ? "WHERE username LIKE '%'" : "WHERE username = '$login'";
for ($j = 1; $j <= 3; $j++){
$tmp = "{$sql_val[$column[$j]]}";
$res[$j] = ($tmp == "") ? "COUNT(radacctid) AS res_$j" : "sum($tmp) AS res_$j";
}
$i = 1;
$servers[all] = 'all';
foreach ($nas_list as $nas){
$name = $nas[name];
if ($nas[ip] == '')
continue;
$servers[$name] = $nas[ip];
$i++;
}
ksort($servers);
if ($server != 'all' && $server != ''){
$server = da_sql_escape_string($server);
$s = "AND nasipaddress = '$server'";
}
$sql_extra_query = '';
if ($config[sql_accounting_extra_query] != '')
$sql_extra_query = xlat($config[sql_accounting_extra_query],$login,$config);
 
$link = @da_sql_pconnect($config);
if ($link){
for ($i = $num_days;$i > -1; $i--){
$day = "$days[$i]";
if ($config[general_stats_use_totacct] == 'yes')
$search = @da_sql_query($link,$config,
"SELECT $res[1],$res[2],$res[3] FROM $config[sql_total_accounting_table]
$sql_val[user] AND acctdate = '$day' $s $sql_extra_query;");
else
$search = @da_sql_query($link,$config,
"SELECT $res[1],$res[2],$res[3] FROM $config[sql_accounting_table]
$sql_val[user] AND acctstoptime >= '$day 00:00:00'
AND acctstoptime <= '$day 23:59:59' $s $sql_extra_query;");
if ($search){
$row = @da_sql_fetch_array($search,$config);
$data[$day][1] = $row[res_1];
$data[sum][1] += $row[res_1];
$stats_num[1] = ($data[$day][1]) ? $stats_num[1] + 1 : $stats_num[1];
$data[$day][2] = $row[res_2];
$data[sum][2] += $row[res_2];
$stats_num[2] = ($data[$day][2]) ? $stats_num[2] + 1 : $stats_num[2];
$data[$day][3] = $row[res_3];
$data[sum][3] += $row[res_3];
$stats_num[3] = ($data[$day][3]) ? $stats_num[3] + 1 : $stats_num[3];
}
else
echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
}
}
else
echo "<b>Could not connect to SQL database</b><br>\n";
 
$stats_num[1] = ($stats_num[1]) ? $stats_num[1] : 1;
$stats_num[2] = ($stats_num[2]) ? $stats_num[2] : 1;
$stats_num[3] = ($stats_num[3]) ? $stats_num[3] : 1;
 
$data['avg'][1] = ceil($data['sum'][1] / $stats_num[1]);
$data['avg'][2] = ceil($data['sum'][2] / $stats_num[2]);
$data['avg'][3] = ceil($data['sum'][3] / $stats_num[3]);
 
$data['avg'][1] = $fun[$column[1]]($data['avg'][1]);
$data['avg'][2] = $fun[$column[2]]($data['avg'][2]);
$data['avg'][3] = $fun[$column[3]]($data['avg'][3]);
 
$data['sum'][1] = $fun[$column[1]]($data['sum'][1]);
$data['sum'][2] = $fun[$column[2]]($data['sum'][2]);
$data['sum'][3] = $fun[$column[3]]($data['sum'][3]);
 
for ($i = 0; $i <= $num_days; $i++){
$day = "$days[$i]";
$max[1] = ($max[1] > $data[$day][1] ) ? $max[1] : $data[$day][1];
$max[2] = ($max[2] > $data[$day][2] ) ? $max[2] : $data[$day][2];
$max[3] = ($max[3] > $data[$day][3] ) ? $max[3] : $data[$day][3];
 
}
for ($i = 0; $i <= $num_days; $i++){
$day = "$days[$i]";
for ($j = 1; $j <= 3; $j++){
$tmp = $data[$day][$j];
if (!$max[$j])
$p = $w = $c = 0;
else{
$p = floor(100 * ($tmp / $max[$j]));
$w = floor(70 * ($tmp / $max[$j]));
$c = hexdec('f0e9e2') - (258 * $p);
$c = dechex($c);
}
if (!$w)
$w++;
$perc[$day][$j] = $p . "%";
$width[$day][$j] = $w;
$color[$day][$j] = $c;
}
 
$data[$day][1] = $fun[$column[1]]($data[$day][1]);
$data[$day][2] = $fun[$column[2]]($data[$day][2]);
$data[$day][3] = $fun[$column[3]]($data[$day][3]);
}
 
$data[max][1] = $fun[$column[1]]($max[1]);
$data[max][2] = $fun[$column[2]]($max[2]);
$data[max][3] = $fun[$column[3]]($max[3]);
 
require('../html/stats.html.php');
?>
/gestion/manager/htdocs/failed_logins.php
0,0 → 1,236
<?php
require('/etc/freeradius-web/config.php');
require('../lib/attrshow.php');
require('../lib/sql/nas_list.php');
require_once('../lib/xlat.php');
?>
<html>
<?php
 
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
else{
echo <<<EOM
<title>Failed logins</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="style.css">
</head>
<body>
<center>
<b>Could not include SQL library functions. Aborting</b>
</body>
</html>
EOM;
exit();
}
 
$now = time();
if (!isset($last))
$last = ($config[general_most_recent_fl]) ? $config[general_most_recent_fl] : 5;
if (!is_numeric($last))
$last = 5;
$start = $now - ($last*60);
$now_str = date($config[sql_full_date_format],$now);
$prev_str = date($config[sql_full_date_format],$start);
 
$now_str = da_sql_escape_string($now_str);
$prev_str = da_sql_escape_string($prev_str);
 
$pagesize = ($pagesize) ? $pagesize : 10;
if (!is_numeric($pagesize) && $pagesize != 'all')
$pagesize = 10;
$limit = ($pagesize == 'all') ? '' : "$pagesize";
$selected[$pagesize] = 'selected';
$order = ($order != '') ? $order : $config[general_accounting_info_order];
if ($order != 'desc' && $order != 'asc')
$order = 'desc';
$selected[$order] = 'selected';
if ($callerid != ''){
$callerid = da_sql_escape_string($callerid);
$callerid_str = "AND callingstationid = '$callerid'";
}
if ($server != '' && $server != 'all'){
$server = da_sql_escape_string($server);
$server_str = "AND nasipaddress = '$server'";
}
 
unset($da_name_cache);
if (isset($_SESSION['da_name_cache']))
$da_name_cache = $_SESSION['da_name_cache'];
 
?>
 
<head>
<title>Authentifications manqu&eacute;es</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
<link rel="stylesheet" href="style.css">
</head>
<body>
<center>
<table border=0 width=550 cellpadding=0 cellspacing=0>
<tr valign=top>
<!--<td align=center><img src="images/title2.gif"></td>-->
</tr>
</table>
<table border=0 width=400 cellpadding=0 cellspacing=2>
</table>
<br>
<table border=0 width=840 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=65%></td>
<td bgcolor="black" width=35%>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
<font color="white">Authentificatins manqu&eacute;es</font>&nbsp;
</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<?php
echo <<<EOM
<b>$prev_str</b> up to <b>$now_str</b>
EOM;
?>
 
<p>
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr bgcolor="#d0ddb0">
<th>#</th><th>login</th>
<?php
if ($acct_attrs['fl'][2] != '') echo "<th>" . $acct_attrs['fl'][2] . "</th>\n";
if ($acct_attrs['fl'][7] != '') echo "<th>" . $acct_attrs['fl'][7] . "</th>\n";
if ($acct_attrs['fl'][8] != '') echo "<th>" . $acct_attrs['fl'][8] . "</th>\n";
if ($acct_attrs['fl'][9] != '') echo "<th>" . $acct_attrs['fl'][9] . "</th>\n";
unset($sql_extra_query);
if ($config[sql_accounting_extra_query] != ''){
$sql_extra_query = xlat($config[sql_accounting_extra_query],$login,$config);
$sql_extra_query = da_sql_escape_string($sql_extra_query);
}
?>
</tr>
 
<?php
$link = @da_sql_pconnect($config);
if ($link){
$search = @da_sql_query($link,$config,
"SELECT " . da_sql_limit($limit,0,$config) . " acctstoptime,username,nasipaddress,nasportid,acctterminatecause,callingstationid
FROM $config[sql_accounting_table]
WHERE acctstoptime <= '$now_str' AND acctstoptime >= '$prev_str'
AND (acctterminatecause LIKE 'Login-Incorrect%' OR
acctterminatecause LIKE 'Invalid-User%' OR
acctterminatecause LIKE 'Multiple-Logins%') $callerid_str $server_str $sql_extra_query " . da_sql_limit($limit,1,$config) .
" ORDER BY acctstoptime $order " . da_sql_limit($limit,2,$config) . " ;");
if ($search){
while( $row = @da_sql_fetch_array($search,$config) ){
$num++;
$acct_login = $row[username];
if ($acct_login == '')
$acct_login = '-';
else
$acct_login = "<a href=\"user_admin.php?login=$acct_login\" title=\"Editer l'utilisateur $acct_login\">$acct_login</a>";
$acct_time = $row[acctstoptime];
$acct_server = $row[nasipaddress];
if ($acct_server != ''){
$acct_server = $da_name_cache[$acct_server];
if (!isset($acct_server)){
$acct_server = $row[nasipaddress];
$acct_server = @gethostbyaddr($acct_server);
if (!isset($da_name_cache) && $config[general_use_session] == 'yes'){
$da_name_cache[$row[nasipaddress]] = $acct_server;
session_register('da_name_cache');
}
else
$da_name_cache[$row[nasipaddress]] = $acct_server;
}
}
else
$acct_server = '-';
$acct_server = "$acct_server:$row[nasportid]";
$acct_terminate_cause = "$row[acctterminatecause]";
if ($acct_terminate_cause == '')
$acct_terminate_cause = '-';
$acct_callerid = "$row[callingstationid]";
if ($acct_callerid == '')
$acct_callerid = '-';
echo <<<EOM
<tr align=center bgcolor="white">
<td>$num</td>
<td>$acct_login</td>
EOM;
if ($acct_attrs['fl'][2] != '') echo "<td>$acct_time</td>\n";
if ($acct_attrs['fl'][2] != '') echo "<td>$acct_server</td>\n";
if ($acct_attrs['fl'][2] != '') echo "<td>$acct_terminate_cause</td>\n";
if ($acct_attrs['fl'][2] != '') echo "<td>$acct_callerid</td>\n";
echo "</tr>\n";
}
}
else
echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
}
else
echo "<b>Could not connect to SQL database</b><br>\n";
echo <<<EOM
</table>
<tr><td>
<hr>
<tr><td align="left">
<form action="failed_logins.php" method="get" name="master">
<table border=0>
<tr valign="bottom">
<td><small><b>time back (mins)</td><td><small><b>pagesize</td><td><small><b>caller id</td><td><b>order</td>
<tr valign="middle"><td>
<input type="text" name="last" size="11" value="$last"></td>
<td><select name="pagesize">
<option $selected[5] value="5" >05
<option $selected[10] value="10">10
<option $selected[15] value="15">15
<option $selected[20] value="20">20
<option $selected[40] value="40">40
<option $selected[80] value="80">80
<option $selected[all] value="all">all
</select>
</td>
<td>
<input type="text" name="callerid" size="11" value="$callerid"></td>
<td><select name="order">
<option $selected[asc] value="asc">older first
<option $selected[desc] value="desc">recent first
</select>
</td>
EOM;
?>
 
<td><input type="submit" class=button value="show"></td></tr>
<tr><td>
<b>Sur le serveur d'acc&eagrave; :</b>
</td></tr><tr><td>
<select name="server">
<?php
foreach ($nas_list as $nas){
$name = $nas[name];
if ($nas[ip] == '')
continue;
$servers[$name] = $nas[ip];
}
ksort($servers);
foreach ($servers as $name => $ip){
if ($server == $ip)
echo "<option selected value=\"$ip\">$name\n";
else
echo "<option value=\"$ip\">$name\n";
}
if ($server == '' || $server == 'all')
echo "<option selected value=\"all\">all\n";
else
echo "<option value=\"all\">all\n";
?>
</select>
</td></tr>
</table></td></tr></form>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/user_delete.php
0,0 → 1,131
<?php
require('/etc/freeradius-web/config.php');
if ($type != 'group')
if (is_file("../lib/$config[general_lib_type]/user_info.php"))
include("../lib/$config[general_lib_type]/user_info.php");
else
if (is_file("../lib/$config[general_lib_type]/group_info.php"))
include("../lib/$config[general_lib_type]/group_info.php");
 
$whatis = ($user_type == 'group') ? 'le groupe' : 'l\'usager';
$whatisL = ($user_type == 'group') ? 'de groupe' : 'd\'usager';
 
echo <<<EOM
<html>
<head>
EOM;
 
if ($user_type != 'group'){
echo "<title>delete user $login ($cn)</title>\n";
$util = "usagers";}
else{
echo "<title>delete group $login</title>\n";
$util = "groupes";}
 
echo <<<EOM
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th>Gestion des $util</th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">
<center>
<table border=0 width=550 cellpadding=0 cellspacing=0>
<tr valign=top>
<!--<td align=center><img src="images/title2.gif"></td>-->
</tr>
</table>
 
<table border=0 width=400 cellpadding=0 cellspacing=2>
EOM;
 
if ($user_type != 'group')
include("../html/user_toolbar.html.php");
else
include("../html/group_toolbar.html.php");
 
print <<<EOM
</table>
 
<br>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=200>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
<font color="white">Suppression $whatisL</font>&nbsp;
</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
EOM;
if ($delete_user == 1){
if ($user_type != 'group'){
if (is_file("../lib/$config[general_lib_type]/delete_user.php"))
include("../lib/$config[general_lib_type]/delete_user.php");
}
else{
if ($delete_users_of_group == 1){
unset($group_members);
$tmp_group_name=$login;
if (is_file("../lib/$config[general_lib_type]/group_info.php")){
include("../lib/$config[general_lib_type]/group_info.php");
}
foreach ($group_members as $member){
$login=$member;
if (is_file("../lib/$config[general_lib_type]/delete_user.php"))
include("../lib/$config[general_lib_type]/delete_user.php");
}
$login=$tmp_group_name;
}
if (is_file("../lib/$config[general_lib_type]/delete_group.php"))
include("../lib/$config[general_lib_type]/delete_group.php");
}
echo <<<EOM
</td></tr>
</table>
</tr>
</table>
</body>
</html>
EOM;
exit();
}
?>
<form method=post>
<input type=hidden name=login value=<?php print $login ?>>
<input type=hidden name=delete_user value="0">
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr>
<td align=center>
<?php
if ($user_type == 'group'){
echo "Suppression automatique des membres du groupe : ";
echo "<input type=checkbox name=delete_users_of_group value=\"1\">";
}
echo "<br>";
echo "Etes-vous certain de vouloir supprimer $whatis $login ? ";
?>
<input type=submit class=button value="Oui supprimer" OnClick="this.form.delete_user.value=1">
</form>
</td></tr></table></td></tr>
</table>
</tr>
</table>
</TD></TR>
</TABLE>
</td></tr>
</TABLE>
</body>
</html>
/gestion/manager/htdocs/style.css
0,0 → 1,38
td {font-family:verdana,sans-serif;text-decoration:none;font-size:11px}
th {font-family:verdana,sans-serif;text-decoration:none;font-size:11px}
A {FONT-FAMILY: verdana,sans-serif; FONT-SIZE: 11px; TEXT-DECORATION: none}
H1 {FONT-FAMILY: lucida,sans-serif; FONT-SIZE: 24px; TEXT-DECORATION: none}
INPUT{
BACKGROUND-COLOR: #EEEEEE;
BORDER-BOTTOM: #3333CC 1px solid;
BORDER-LEFT: #3333CC 1px solid;
BORDER-RIGHT: #3333CC 1px solid;
BORDER-TOP: #3333CC 1px solid;
COLOR: #000000;
FONT-FAMILY: Verdana
}
INPUT.button{
BACKGROUND-COLOR: #999999;
BORDER-BOTTOM: #3333CC 1px solid;
BORDER-LEFT: #3333CC 1px solid;
BORDER-RIGHT: #3333CC 1px solid;
BORDER-TOP: #3333CC 1px solid;
COLOR: #000000;
FONT-FAMILY: Verdana
}
body
{
BACKGROUND-COLOR: #EFEFEF;
}
a:link {
color: #000000;
}
a:visited {
color:#000000;
}
a:hover {
color:#000000;
}
a:active {
color:#000000;
}
/gestion/manager/htdocs/help/simultaneous_use_help.html
0,0 → 1,37
<html>
<head>
<title>Simultaneous Use Help Page</title>
<link rel="stylesheet" href="../style.css">
</head>
<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Page d'aide : session simultan&eacute;e</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
<center>
<pre>
Cet attribut d&eacute;finit le nombre maximum de sessions simultan&eacute;es
qu'un usager peut ouvrir (non renseign&eacute; = infini)
This attribute defines the maximum number of concurrent logins
for a user. It is independent from the number of ports the user
is allowed to open in a multilink session.
</pre>
</td></tr>
<tr><td align=center>
<a href="javascript:window.close();"><b>Close Window</b></a>
</td></tr>
</center>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/help/callback_number_help.html
0,0 → 1,47
<html>
<head>
<title>Callback-Number Help Page</title>
<link rel="stylesheet" href="../style.css">
</head>
<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Callback-Number Help Page</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
<center>
<pre>
Attribute Number: 19
Value: String
</pre>
<br>
<pre>
The value of this attribute is the number to which the RADIUS client
gear should return a call to the authenticating user. Depending on
what packet this attribute is found in, different actions may be
configured. For instance, if <i>Callback-Number</i> is found in an
<i>Access Request</i> packet, the implementation may assume that the
end user is requesting callback service. If the attribute is found
in the <i>Access Accept</i> packet, it can mean everything that the
administrator configuring the gear wants it to mean. In fact, in
some cases, <i>Callback-ID</i> and <i>Callback-Number</i> will <i>not</i> be found
together in one packet.
</pre>
</td></tr>
<tr><td align=center>
<a href="javascript:window.close();"><b>Close Window</b></a>
</td></tr>
</center>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/help/class_help.html
0,0 → 1,45
<html>
<head>
<title>Class Help Page</title>
<link rel="stylesheet" href="../style.css">
</head>
<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Class Help Page</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
<center>
<pre>
Attribute Number: 25
Value: String
</pre>
<br>
<pre>
The Class attribute mainly exists to funnel identification and
property information to the accounting systems of RADIUS
implementations.<br>
From RFC2865:<br>"This Attribute is available to be sent by the server to the client
in an Access-Accept and SHOULD be sent unmodified by the client to
the accounting server as part of the Accounting-Request packet if
accounting is supported. The client MUST NOT interpret the
attribute locally."
</pre>
</td></tr>
<tr><td align=center>
<a href="javascript:window.close();"><b>Close Window</b></a>
</td></tr>
</center>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/help/callback_id_help.html
0,0 → 1,46
<html>
<head>
<title>Callback-ID Help Page</title>
<link rel="stylesheet" href="../style.css">
</head>
<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Callback-ID Help Page</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
<center>
<pre>
Attribute Number: 20
Value: String
</pre>
<br>
<pre>
This attribute is used when a RADIUS implementation is set up to
return a user's call. This is commonly used in corporate situations
to avoid long-distance charges in hotel rooms and other remote
locations. This value, A STRING, is often the identifier for a
profile configured on the service equipment; there is no specific
standrad for a string name, a triggered action, or something else.
In other words, it is environment specific. RADIUS client gear is
allowed to reject a connection if this attribute is present but
not supported by the gear.
</pre>
</td></tr>
<tr><td align=center>
<a href="javascript:window.close();"><b>Close Window</b></a>
</td></tr>
</center>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/help/badusers_help.html
0,0 → 1,36
<html>
<head>
<title>BADUSERS Help Page</title>
<link rel="stylesheet" href="../style.css">
</head>
<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Expiration Help Page</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
<center>
<pre>
The badusers table can be used to keep a history of unauthorized actions by
certain users.
To add a user to the badusers table you first have to insert a descriptive text
in the 'Lock Message' attribute
</pre>
</td></tr>
<tr><td align=center>
<a href="javascript:window.close();"><b>Close Window</b></a>
</td></tr>
</center>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/help/login_time_help2.html
0,0 → 1,49
<html>
<head>
<title>Login-Time Help Page</title>
<link rel="stylesheet" href="../style.css">
</head>
<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Login-Time Help Page</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
<center>
<pre>
Login-Time defines the time span a user may login to the system. The
format of a so-called time string is like the format used by UUCP.
A time string may be a list of simple time strings separated by "|" or ",".
 
Each simple time string must begin with a day definition. That can be just
one day, multiple days, or a range of days separated by a hyphen. A
day is Mo, Tu, We, Th, Fr, Sa or Su, or Wk for Mo-Fr. "Any" or "Al"
means all days.
 
After that a range of hours follows in hhmm-hhmm format.
 
For example, "Wk2305-0855,Sa,Su2305-1655".
 
Radiusd calculates the number of seconds left in the time span, and
sets the Session-Timeout to that number of seconds. So if someones
Login-Time is "Al0800-1800" and he logs in at 17:30, Session-Timeout
is set to 1800 seconds so that he is kicked off at 18:00.
</pre>
</td></tr>
<tr><td align=center>
<a href="javascript:window.close();"><b>Close Window</b></a>
</td></tr>
</center>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/help/framed_ip_netmask_help.html
0,0 → 1,38
<html>
<head>
<title>Framed-IP-Netmask Help Page</title>
<link rel="stylesheet" href="../style.css">
</head>
<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Framed-IP-Netmask Help Page</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
<center>
<pre>
Attribute Number: 9
Value: IPADDR
</pre>
<pre>
This attribute can be used to assign a specific netmask to
a connection.
</pre>
</td></tr>
<tr><td align=center>
<a href="javascript:window.close();"><b>Close Window</b></a>
</td></tr>
</center>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/help/framed_compression_help.html
0,0 → 1,38
<html>
<head>
<title>Framed Compression Help Page</title>
<link rel="stylesheet" href="../style.css">
</head>
<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Framed Compression Help Page</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
<center>
<pre>
Framed-Compression indicates a compression protocol to be used for the link.
Possible values are:
</pre>
<i>None</i><br>
<i>Van-Jacobson-TCP-IP</i><br>
<i>IPX-Header-Compression</i><br>
<i>Stac-LZS</i><br>
</td></tr>
<tr><td align=center>
<a href="javascript:window.close();"><b>Close Window</b></a>
</td></tr>
</center>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/help/framed_protocol_help.html
0,0 → 1,42
<html>
<head>
<title>Framed Protocol Help Page</title>
<link rel="stylesheet" href="../style.css">
</head>
<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Framed Protocol Help Page</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
<center>
<pre>
This Attribute indicates the framing to be used for framed access.
It MAY be used in both Access-Request and Access-Accept packets.
 
Possible values are:
</pre>
<i>1 PPP</i><br>
<i>2 SLIP</i><br>
<i>3 AppleTalk Remote Access Protocol (ARAP)</i><br>
<i>4 Gandalf proprietary SingleLink/Multilink protocol</i><br>
<i>5 Xylogics proprietary IPX/SLIP</i><br>
<i>6 X.75 Synchronous</i><br>
</td></tr>
<tr><td align=center>
<a href="javascript:window.close();"><b>Close Window</b></a>
</td></tr>
</center>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/help/expiration_help.html
0,0 → 1,40
<html>
<head>
<title>Expiration Help Page</title>
<link rel="stylesheet" href="../style.css">
</head>
<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Page d'aide : date d'expiration</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
<center>
<pre>
Cet attribut d&eacute;finit la date d'expiration du compte.
Le format est "jour mois ann&eacute;e" (ex: 20 april 2002).
Les mois en anglais sont : january, february, march, april, may, june,
july, august, september, october, november, december
<HR>
This attribute can be used to set the user expiration date. It
should be in the format "$month_day $month_name $year" like:
"20 april 2002"
</pre>
</td></tr>
<tr><td align=center>
<a href="javascript:window.close();"><b>Fermer cette fen&ecirc;tre</b></a>
</td></tr>
</center>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/help/port_limit_help.html
0,0 → 1,35
<html>
<head>
<title>Port Limit Help Page</title>
<link rel="stylesheet" href="../style.css">
</head>
<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Port Limit Help Page</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
<center>
<pre>
Port-Limit is intended for use in conjuction with Multilink PPP or similar uses.
It defines the maximum number of channels the user is allowed to open during
a multilink dialup session.
</pre>
</td></tr>
<tr><td align=center>
<a href="javascript:window.close();"><b>Close Window</b></a>
</td></tr>
</center>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/help/framed_mtu_help.html
0,0 → 1,39
<html>
<head>
<title>Framed-MTU Help Page</title>
<link rel="stylesheet" href="../style.css">
</head>
<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Framed-MTU Help Page</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
<center>
<pre>
Attribute Numer: 12
Value: Integer
</pre>
<pre>
MTU, the Maximum Transfer Unit, is the largest
packet size that can be transmitted over a connection.<br>
The value can be between 64 and 65535.
</pre>
</td></tr>
<tr><td align=center>
<a href="javascript:window.close();"><b>Close Window</b></a>
</td></tr>
</center>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/help/idle_timeout_help.html
0,0 → 1,35
<html>
<head>
<title>Idle Timeout Help Page</title>
<link rel="stylesheet" href="../style.css">
</head>
<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Idle Timeout Help Page</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
<center>
<pre>
This Attribute sets the maximum number of consecutive seconds of
idle connection allowed to the user before termination of the
session or prompt.
</pre>
</td></tr>
<tr><td align=center>
<a href="javascript:window.close();"><b>Close Window</b></a>
</td></tr>
</center>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/help/login_time_help.html
0,0 → 1,47
<html>
<head>
<title>Login-Time Help Page</title>
<link rel="stylesheet" href="../style.css">
</head>
<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Login-Time Help Page</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
<center>
<pre>
Cet attribut d&eacute;finit les p&eacute;riodes pendant lesquelles un usager ou un groupe
peut se connecter. Le format de cet attribut est le suivant :
 
C'est une liste de cha&icirc;nes de caract&egrave;res s&eacute;par&eacute;es par une ",".
Chaque cha&icirc;ne d&eacute;finit une p&eacute;riode pour une journ&eacute;e.
Les journ&eacute;es sont ainsi d&eacute;finies : mo, tu, we, th, fr, sa ou su.
"wk" couvre du lundi au vendredi. "any" couvre tous les jours de
la semaine.
Le jour est suivi du cr&eacute;neau horaire au format hhmm-hhmm
 
Exemple : Wk0755-1700,Sa,Su1655-2030
 
ALCASAR calcule le temps restant dans le cr&eacute;neau imparti. Ainsi, si un usager
se connecte &agrave; 17h30 et que son cr&eacute;neau a &eacute;t&eacute; d&eacute;fini &agrave; "any0800-1700",
sa session ne durera qu'une demi-heure.
</pre>
</td></tr>
<tr><td align=center>
<a href="javascript:window.close();"><b>Close Window</b></a>
</td></tr>
</center>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/help/session_timeout_help.html
0,0 → 1,37
<html>
<head>
<title>Session Timeout Help Page</title>
<link rel="stylesheet" href="../style.css">
</head>
<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Page d'aide : dur&eacute;e de session</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
<center>
<pre>
Ces attibuts ('dur&eacute;e limite mensuelle, journali&egrave;re et d'une session')
d&eacute;finissent la dur&eacute;e de connexion des usagers ou des groupes (en secondes).
<HR>
These Attributes set the maximum number of seconds of service to be
provided to the user before termination of the session or prompt.
</pre>
</td></tr>
<tr><td align=center>
<a href="javascript:window.close();"><b>Fermer cette fen&ecirc;tre</b></a>
</td></tr>
</center>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/help/framed_ip_address_help.html
0,0 → 1,40
<html>
<head>
<title>Framed-IP-Address Help Page</title>
<link rel="stylesheet" href="../style.css">
</head>
<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Framed-IP-Address Help Page</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
<center>
<pre>
Framed-IP-Address can be used to specify the IP address that
a dialup user will use. There are two special values:
</pre>
<i>255.255.255.255: Assign the user requested IP</i><br>
<i>255.255.255.254: Assign an IP from the NAS IP pool</i><br>
<pre>
All other values will be assigned as they are to the user dialup
interface
</pre>
</td></tr>
<tr><td align=center>
<a href="javascript:window.close();"><b>Close Window</b></a>
</td></tr>
</center>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/help/lock_message_help.html
0,0 → 1,37
<html>
<head>
<title>Lock Message Help Page</title>
<link rel="stylesheet" href="../style.css">
</head>
<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Lock Message Help Page</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
<center>
<pre>
The Lock Message will be included as a Reply-Item in all radius server responses for
the user. It will also appear in the Usefull User Description in the user admin page.
It is intended to be used as a hint to the user and to the administrator for the reason
of the user lock out.
In case it is a multi word message it should be enclosed in double quotes
</pre>
</td></tr>
<tr><td align=center>
<a href="javascript:window.close();"><b>Close Window</b></a>
</td></tr>
</center>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/help/dialup_access_help.html
0,0 → 1,36
<html>
<head>
<title>Dialup Access Help Page</title>
<link rel="stylesheet" href="../style.css">
</head>
<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Dialup Access Help Page</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
<center>
<pre>
If the Dialup-Access attribute is specified, the ldap module
checks for its existance in user object. If it exists and is
set to FALSE, user is denied remote access. Otherwise, the user
is allowed remote access.
</pre>
</td></tr>
<tr><td align=center>
<a href="javascript:window.close();"><b>Close Window</b></a>
</td></tr>
</center>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/help/reply_message_help.html
0,0 → 1,50
<html>
<head>
<title>Reply-Message Help Page</title>
<link rel="stylesheet" href="../style.css">
</head>
<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Reply-Message Help Page</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
<center>
<pre>
Attribute Numer: 18
Value: String
</pre>
<pre>
The Reply-Message attribute is used to send a message back to the client
in response of another packet.
RFC2865 describes it as easy as:<br>
"This attribute indicates text which MAY be displayed to the user.
When used in an Access-Accept, it is the success message.
When used in an Access-Reject, it is the failure message. It MAY
indicate a dialog message to prompt the user before another
Access-Request attempt.
When used in an Access-Challenge, it MAY indicate a dialog message
to prompt the user for a response.
Multiple Reply-Message's MAY be included and if any are displayed,
they MUST be displayed in the same order as they appear in the packet.
A summary of the Reply-Message Attribute format is shown below. The
fields are transmitted from left to right."
</pre>
</td></tr>
<tr><td align=center>
<a href="javascript:window.close();"><b>Close Window</b></a>
</td></tr>
</center>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/help/service_type_help.html
0,0 → 1,81
<html>
<head>
<title>Service-Type Help Page</title>
<link rel="stylesheet" href="../style.css">
</head>
<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Service-Type Help Page</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
<center>
<pre>
This Attribute indicates the type of service the user has
requested, or the type of service to be provided. It MAY be used
in both Access-Request and Access-Accept packets. A NAS is not
required to implement all of these service types, and MUST treat
unknown or unsupported Service-Types as though an Access-Reject
had been received instead.
 
Possible values are.
</pre>
<i>1 Login</i><br>
<i>2 Framed</i><br>
<i>3 Callback Login</i><br>
<i>4 Callback Framed</i><br>
<i>5 Outbound</i><br>
<i>6 Administrative</i><br>
<i>7 NAS Prompt</i><br>
<i>8 Authenticate Only</i><br>
<i>9 Callback NAS Prompt</i><br>
<pre>
The service types are defined as follows when used in an Access-
Accept. When used in an Access-Request, they should be considered
to be a hint to the RADIUS server that the NAS has reason to
believe the user would prefer the kind of service indicated, but
the server is not required to honor the hint.
 
Login The user should be connected to a host.
Framed A Framed Protocol should be started for the
User, such as PPP or SLIP.
Callback Login The user should be disconnected and called
back, then connected to a host.
Callback Framed The user should be disconnected and called
back, then a Framed Protocol should be started
for the User, such as PPP or SLIP.
Outbound The user should be granted access to outgoing
devices.
Administrative The user should be granted access to the
administrative interface to the NAS from which
privileged commands can be executed.
NAS Prompt The user should be provided a command prompt
on the NAS from which non-privileged commands
can be executed.
Authenticate Only Only Authentication is requested, and no
authorization information needs to be returned
in the Access-Accept (typically used by proxy
servers rather than the NAS itself).
Callback NAS Prompt The user should be disconnected and called
back, then provided a command prompt on the
NAS from which non-privileged commands can be
executed.
</pre>
</td></tr>
<tr><td align=center>
<a href="javascript:window.close();"><b>Close Window</b></a>
</td></tr>
</center>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/help/filter_id_help.html
0,0 → 1,38
<html>
<head>
<title>Framed-Id Help Page</title>
<link rel="stylesheet" href="../style.css">
</head>
<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Filter-Id Help Page</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
<center>
<pre>
This Attribute indicates the name of the filter list for this
user. Zero or more Filter-Id attributes MAY be sent in an
Access-Accept packet.
 
Identifying a filter list by name allows the filter to be used on
different NASes without regard to filter-list implementation
details.
</td></tr>
<tr><td align=center>
<a href="javascript:window.close();"><b>Close Window</b></a>
</td></tr>
</center>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/help/auth_type_help.html
0,0 → 1,44
<html>
<head>
<title>Auth-Type Help Page</title>
<link rel="stylesheet" href="../style.css">
</head>
<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Auth-Type Help Page</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
<center>
<pre>
Value: String
</pre>
<pre>
The Auth-Type attribute describes which authentication module to call.
Standard values from a default FreeRADIUS setup my be:
</pre>
<i>PAP</i><br>
<i>CHAP</i><br>
<i>MSCHAP</i><br>
<i>PAM</i><br>
<i>UNIX</i><br>
<i>LADP</i><br>
<i>EAP</i><br>
</td></tr>
<tr><td align=center>
<a href="javascript:window.close();"><b>Close Window</b></a>
</td></tr>
</center>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/help/help.php
0,0 → 1,76
<html>
<head>
<title>Help page</title>
<link rel="stylesheet" href="../style.css">
<!-- Fonctions JavaScript -->
<SCRIPT LANGUAGE="JavaScript">
function ouvrir(page)
{
window.open(page, "portail", "alwaysRaised=yes,toolbar=no,location=yes,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=no,copyhistory=no,hotkeys=no,width=640 ,height=480");
}
</SCRIPT>
<!-- fin javascript -->
</head>
<body bgcolor="#EFEFEF">
<center>
<table border=0 width=550 cellpadding=0 cellspacing=0>
<tr valign=top>
<!--<td align=center><img src="../images/title2.gif"></td>-->
</tr>
</table>
 
<table border=0 width=400 cellpadding=0 cellspacing=2></table>
 
<br>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=540></td>
<td bgcolor="black" width=400>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th><font color="white">Page d'aide de Dialup Admin</font>&nbsp;</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<br>
 
<!--<b>Choisissez le fichier d'aide que vous voulez lire :</b><br><br>
<form name="readhelp" method=post>
<select name=help_file>
<?php
#$selected[$help_file] = 'selected';
#
#echo <<<EOM
#<option $selected[faq] value="faq">FAQ File
#<option $selected[readme] value="readme">README File
#<option $selected[howto] value="howto">HOWTO File
#EOM;
?>
</select>
<br><br>
<input type=submit class=button value="Read File">
</form>
-->
<td><a href=javascript:ouvrir("http://wiki.freeradius.org/index.php/FAQ")>http://wiki.freeradius.org/index.php/FAQ</a></td>
 
<pre>
<?php
#$in_file = '../../doc/FAQ_dialup.html';
#if ($help_file == 'readme')
# $in_file = '../../README';
#else if ($help_file == 'howto')
# $in_file = '../../doc/HOWTO';
#else if ($help_file == 'faq')
# $in_file = 'FAQ';
#if ($in_file != '')
# readfile("$in_file");
?>
</pre>
<br>
</td></tr>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/group_admin.php
0,0 → 1,141
<?php
require('/etc/freeradius-web/config.php');
if ($show == 1 && isset($del_members)){
header("Location: user_admin.php?login=$del_members[0]");
exit;
}
if ($config[general_lib_type] != 'sql'){
echo <<<EOM
<title>Page de gestion des groupes</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="style.css">
</head>
<body>
<center>
<b>This page is only available if you are using sql as general library type</b>
</body>
</html>
EOM;
exit();
}
 
unset($group_members);
if (is_file("../lib/$config[general_lib_type]/group_info.php")){
include("../lib/$config[general_lib_type]/group_info.php");
if ($group_exists == 'no'){
echo <<<EOM
<title>Page de gestion des groupes</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="style.css">
</head>
<body>
<center>
<form action="group_admin.php" method=get>
<b>Le groupe &nbsp;&nbsp;</b>
<input type="text" size=10 name="login" value="$login">
<b>&nbsp;&nbsp;n'existe pas</b><br>
<input type=submit class=button value="Show Group">
</body>
</html>
EOM;
exit();
}
}
?>
 
<html>
<head>
<title>Page de gestion des groupes</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th>Gestion des groupes</th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">
<center>
<table border=0 width=550 cellpadding=0 cellspacing=0>
<tr valign=top>
<!--<td align=center><img src="images/title2.gif"></td>-->
</tr>
</table>
<table border=0 width=400 cellpadding=0 cellspacing=2>
 
<?php
include("../html/group_toolbar.html.php");
?>
 
</table>
<br>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=200>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
<font color="white">Gestion du groupe <?php echo $login ?></font>&nbsp;
</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
 
<?php
if ($do_changes == 1){
if (is_file("../lib/$config[general_lib_type]/group_admin.php"))
include("../lib/$config[general_lib_type]/group_admin.php");
if (is_file("../lib/$config[general_lib_type]/group_info.php"))
include("../lib/$config[general_lib_type]/group_info.php");
}
?>
<form method=post>
<input type=hidden name=login value=<?php echo $login ?>>
<input type=hidden name=do_changes value=0>
<input type=hidden name=show value=0>
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr>
<td align=right bgcolor="#d0ddb0">
<b>Membre(s) &agrave; effacer</b><br> (les membres s&eacute;lectionn&eacute;s seront effac&eacute;s du groupe<br>utilisez 'shift' ou 'Ctrl' pour une s&eacute;lection multiple)
</td>
<td>
<select name=del_members[] multiple size=5>
<?php
foreach ($group_members as $member){
echo "<option value=\"$member\">$member\n";
}
?>
</select>
</td>
</tr>
<tr>
<td align=right bgcolor="#d0ddb0">
<b>Membre(s) &agrave; ajouter</b><br>(s&eacute;parez les membres par un espace ou un 'retour chariot')
</td>
<td>
<textarea name=new_members cols="15" wrap="PHYSICAL" rows=5></textarea>
</td>
</tr>
</table>
<br>
<input type=submit class=button value="Effectuer les changements" OnClick="this.form.do_changes.value=1">
<br><br>
<input type=submit class=button value="G&eacute;rer l'utilisateur s&eacute;lectionn&eacute;" OnClick="this.form.show.value=1">
</form>
</td></tr>
</table>
</tr>
</table>
</TD></TR>
</TABLE>
</td></tr>
</TABLE>
</body>
</html>
/gestion/manager/htdocs/group_new.php
0,0 → 1,222
<?php
# Choice of language
$Language = 'en';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'fr'){
$l_title = "Cr&eacute;ation d'un groupe";
$l_frame_top = "Gestion des groupes";
$l_frame = "Gestion des groupes";
$l_group_create = "Cr&eacute;er un groupe";
}
else {
$l_title = "Create a group";
$l_frame_top = "Groups admin";
$l_frame = "Groups admin";
$l_group_create = "Create a group";
}
require('/etc/freeradius-web/config.php');
if ($show == 1){
header("Location: group_admin.php?login=$login");
exit;
}
 
if ($config[general_lib_type] != 'sql'){
echo <<<EOM
<title>$l_title</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="style.css">
</head>
<body>
<center>
<b>This page is only available if you are using sql as general library type</b>
</body>
</html>
EOM;
exit();
}
 
require('../lib/attrshow.php');
require('../lib/defaults.php');
require("../lib/$config[general_lib_type]/group_info.php");
 
if ($config[general_lib_type] == 'sql' && $config[sql_use_operators] == 'true'){
$colspan=2;
$show_ops=1;
}else{
$show_ops = 0;
$colspan=1;
}
echo "<html><head><title>$l_title</title>";
 
?>
 
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th><? echo "$l_frame_top"; ?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">
<center>
<table border=0 width=550 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=200>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
<font color="white"><? echo "$l_group_create"; ?></font>
</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<?php
if (is_file("../lib/$config[general_lib_type]/group_info.php"))
include("../lib/$config[general_lib_type]/group_info.php");
if ($create == 1){
if ($group_exists != "no"){
echo <<<EOM
<b>Le groupe <i>$login</i> existe d&eacute;j&agrave;.</b>
EOM;
}
else{
if (is_file("../lib/$config[general_lib_type]/create_group.php"))
include("../lib/$config[general_lib_type]/create_group.php");
if (is_file("../lib/$config[general_lib_type]/group_info.php"))
include("../lib/$config[general_lib_type]/group_info.php");
}
}
?>
<form method=post>
<input type=hidden name=create value="0">
<input type=hidden name=show value="0">
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<?php
echo <<<EOM
<tr>
<td align=right colspan=$colspan bgcolor="#d0ddb0">
Groupe(s) d&eacute;j&agrave; cr&eacute;&eacute;(s)
</td><td>
EOM;
if (!isset($existing_groups))
echo "<b>Aucun groupe d&eacute;j&agrave; cr&eacute;&eacute;</b>\n";
else{
echo "<select name=\"existing_groups\">\n";
foreach ($existing_groups as $group => $count)
echo "<option value=\"$group\">$group\n";
echo "</select>\n";
}
echo <<<EOM
</td>
</tr>
<tr>
<td align=right colspan=$colspan bgcolor="#d0ddb0">
Nom du groupe
</td><td>
<input type=text name="login" value="$login" size=35>
</td>
</tr>
<tr>
<td align=right colspan=$colspan bgcolor="#d0ddb0">
Membres du groupe : s&eacute;par&eacute;s par un espace ou un 'retour chariot'.
</td><td>
<textarea name=members cols="15" wrap="PHYSICAL" rows=5></textarea>
</td>
</tr>
EOM;
foreach($show_attrs as $key => $desc){
$name = $attrmap["$key"];
if ($name == 'none')
continue;
$oper_name = $name . '_op';
$val = ($item_vals["$key"][0] != "") ? $item_vals["$key"][0] : $default_vals["$key"][0];
print <<<EOM
<tr>
<td align=right bgcolor="#d0ddb0">
$desc
</td>
EOM;
 
if ($show_ops){
switch ($key)
{
case 'Simultaneous-Use' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
case 'Login-Time' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
case 'Expiration' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
case 'Session-Timeout' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
break;
case 'Max-Daily-Session' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
case 'Max-Weekly-Session' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
case 'Max-Monthly-Session' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
default :
print <<<EOM
<td>
<select name=$oper_name>
<option $selected[$op_eq] value="=">=
<option $selected[$op_set] value=":=">:=
<option $selected[$op_add] value="+=">+=
<option $selected[$op_eq2] value="==">==
<option $selected[$op_ne] value="!=">!=
<option $selected[$op_gt] value=">">&gt;
<option $selected[$op_ge] value=">=">&gt;=
<option $selected[$op_lt] value="<">&lt;
<option $selected[$op_le] value="<=">&lt;=
<option $selected[$op_regeq] value="=~">=~
<option $selected[$op_regne] value="!~">!~
<option $selected[$op_exst] value="=*">=*
<option $selected[$op_nexst] value="!*">!*
</select>
</td>
EOM;
break;
}
}
print <<<EOM
<td>
<input type=text name="$name" value="$val" size=35>
</td>
</tr>
EOM;
}
echo "</table><BR>";
if ($create == 1)
echo "<input type=submit class=button value=\"Afficher le groupe\" OnClick=\"this.form.show.value=1\">";
else
echo "<input type=submit class=button value=\"Cr&eacute;er\" OnClick=\"this.form.create.value=1\">";
?>
<br><br>
</form>
</td></tr>
</table>
</tr>
</table>
</TD></TR>
</TABLE>
</td></tr>
</TABLE>
</body>
</html>
/gestion/manager/htdocs/import_user.php
0,0 → 1,236
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><!-- Written by Rexy, Romero P. & 3abTux -->
<HEAD>
<TITLE>Import d'usagers</TITLE>
<link rel="stylesheet" href="/css/style.css" type="text/css">
</HEAD>
<body>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th>Import d'usagers</th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">
<CENTER><H3>&Eacute;tat actuel de la base : nombre de groupe =
<?php
function creatlog ($login,$password,$service,$RS_out)
{
/* génère un fichier en sortie avec les info de connexion en clair */
fputs($RS_out," --- Accès à Internet via ALCASAR --- "."\r\n\r\n");
fputs($RS_out,"Service : $service"."\r\n\r\n");
fputs($RS_out,"Nom de connexion : $login | Mot de passe : $password\r\n\r\n");
fputs($RS_out,"Pensez à changer votre mot de passe (lien sur la page d'authentification)"."\r\n\r\n");
fputs($RS_out,"--------------------------------------------------------------------------------"."\r\n\r\n");
}
 
function GenPassword($nb_car="8")
{
/* generation aléatoire du mot de passe */
$password = "";
$chaine = "aAzZeErRtTyYuUIopP152346897mMLkK";
$chaine .= "jJhHgGfFdDsSqQwWxXcCvVbBnN152346897";
while($nb_car != 0)
{
$i = rand(0,71);
$password .= $chaine[$i];
$nb_car --;
}
return $password ;
}
 
$LIBpath = "../";
require('/etc/freeradius-web/config.php');
if (is_file($LIBpath."lib/sql/drivers/$config[sql_type]/functions.php"))
{
include_once($LIBpath."lib/sql/drivers/$config[sql_type]/functions.php");
}
else
{
echo "<b>Could not include SQL library</b><br>\n";
exit();
}
include_once($LIBpath.'lib/functions.php');
if ($config[sql_use_operators] == 'true')
{
include($LIBpath."lib/operators.php");
$text = ',op';
$passwd_op = ",':='";
}
$link = @da_sql_pconnect($config);
$choix = $_POST ['choix'];
if ($choix == "raz")
{
exec ("sudo /usr/local/sbin/alcasar-mysql.sh -raz");
}
# un fichier est importé
if(isset($_FILES['import-users']))
{
unset($result);
$service = $_POST['service'];
$group = $_POST ['groupe'];
$destination = '/tmp/import_file.txt';
list($name_file , $extension) = explode("." , $_FILES['import-users']['name']);
$extension = strstr($_FILES['import-users']['name'], '.');
$file_out = "/tmp/$name_file.pwd" ;
if ($choix == "csv")
//import d'un fichier txt
{
if (($extension != '.csv') && ($extension != '.txt')) $result = 'Veuillez s&eacute;lectionner un fichier de type csv ou txt !';
else
{
exec ("sudo /usr/local/sbin/alcasar-mysql.sh -dump");
move_uploaded_file($_FILES['import-users']['tmp_name'], $destination);
$RS_in = file ($destination);
$da_abort=0;
if ($link)
{
if (is_file($LIBpath."lib/crypt/$config[general_encryption_method].php"))
{
include($LIBpath."lib/crypt/$config[general_encryption_method].php");
$RS_out = fopen ("$file_out", "wb");
foreach ($RS_in as $no => $ligne)
{
$tligne = split(" ",$ligne);
$login = str_replace("%0D","",str_replace("%0A","",urlencode ($tligne[0])));
$password = GenPassword();
$passwd = da_encrypt($password);
$passwd = da_sql_escape_string($passwd);
/* insertion (login + password) dans la table "radcheck" (si l'usager existe --> changement de mot de passe) */
$res = @da_sql_query($link,$config,"INSERT INTO $config[sql_check_table] (attribute,value,username $text) VALUES ('$config[sql_password_attribute]','$passwd','$login' $passwd_op);");
if (!$res || !@da_sql_affected_rows($link,$res,$config))
{
echo "<b>Unable to add user $login: " . da_sql_error($link,$config) . "</b><br>\n";
$da_abort=1;
}
else
{
creatlog ($login,$password,$service,$RS_out);
/*echo $login." : ".$password." , ";*/
}
/* insertion de l'usager dans la table "userinfo" */
if ($config[sql_use_user_info_table] == 'true' && !$da_abort)
{
$res = @da_sql_query($link,$config, "SELECT username FROM $config[sql_user_info_table] WHERE username = '$login';");
if ($res)
{
if (!@da_sql_num_rows($res,$config))
{
$res = @da_sql_query($link,$config,"INSERT INTO $config[sql_user_info_table] (username,department) VALUES ('$login','$service');");
if (!$res || !@da_sql_affected_rows($link,$res,$config))
echo "<b>Could not add user information in user info table: " . da_sql_error($link,$config) . "</b><br>\n";
}
else
echo "<b>User already exists in user info table.</b><br>\n";
}
else
echo "<b>Could not add user information in user info table: " . da_sql_error($link,$config) . "</b><br>\n";
if ($group != '')
{
$group = da_sql_escape_string($group);
$res = @da_sql_query($link,$config,"SELECT username FROM $config[sql_usergroup_table] WHERE username = '$login' AND groupname = '$group';");
if ($res)
{
if (!@da_sql_num_rows($res,$config))
{
$res = @da_sql_query($link,$config,"INSERT INTO $config[sql_usergroup_table] (username,groupname) VALUES ('$login','$group');");
if (!$res || !@da_sql_affected_rows($link,$res,$config))
echo "<b>Could not add user to group $group. SQL Error</b><br>\n";
} # end if
else
echo "<b>User already is a member of group $group</b><br>\n";
} # end if
else
echo "<b>Could not add user to group $group: " . da_sql_error($link,$config) . "</b><br>\n";
} # end if ($group)
} # end if ($config)
} # end foreach
fclose($RS_out);
}
} # end if (is_file ...
}
}
else if ($choix == "bdd")
//import d'une Bdd
{
echo $extention;
if ($extension != '.sql') $result = 'Veuillez s&eacute;lectionner un fichier de type sql !';
else
{
exec ("sudo /usr/local/sbin/alcasar-mysql.sh -dump");
move_uploaded_file($_FILES['import-users']['tmp_name'], $destination);
exec ("sudo /usr/local/sbin/alcasar-mysql.sh -import $destination");
}
}
}
if ($link)
{
$res = @da_sql_query($link,$config,"SELECT GroupName FROM radusergroup GROUP BY GroupName");
if ($res)
{
$nb_group = @da_sql_num_rows($res,$config);
echo $nb_group;
}
}
echo ", nombre d'usagers = ";
if ($link)
{
$res = @da_sql_query($link,$config,"SELECT UserName FROM userinfo");
if ($res)
{
$nb_user = @da_sql_num_rows($res,$config);
echo "$nb_user";
}
}
echo "</TD></TR></TABLE>";
echo "</TD></TR></TABLE>";
echo "<TABLE width=\"100%\" border=0 cellspacing=0 cellpadding=1>";
echo "<tr bgcolor=\"#666666\"><td>";
echo "<TABLE width=\"100%\" border=0 cellspacing=0 cellpadding=2>";
echo "<tr><td valign=\"middle\" align=\"left\">";
echo "<CENTER><H3>Importer &agrave; partir d'un fichier texte (format TXT)</H3></CENTER>";
echo "Cette fonctionalit&eacute; ne supporte actuellement qu'une liste simple de noms d'usagers (les uns sous les autres).<br>";
echo "Pour chaque importation, un fichier contenant les identifiants et les mots de passe des usagers est g&eacute;n&eacute;r&eacute; sous : /tmp/nomdufichier.pwd";
echo "<FORM action='$_SERVER[PHP_SELF]' method=POST ENCTYPE=\"multipart/form-data\">";
echo "Fichier (.txt) : <input type=\"file\" name=\"import-users\"><br>";
echo "D&eacute;finissez leur service (facultatif) : <input type=\"input\" name=\"service\" value=\"\"><br>";
echo "D&eacute;finissez leur groupe (conseill&eacute;) : <input type=\"input\" name=\"groupe\" value=\"\"><br>";
echo "<input type='hidden' name='choix' value='csv'>";
if (($choix == "csv") && isset($result)) echo $result."<BR>";
echo "<input type=\"submit\" value=\"Envoyer\">";
echo "</FORM>";
echo "</TD></TR></TABLE>";
echo "</TD></TR></TABLE>";
echo "<TABLE width=\"100%\" border=0 cellspacing=0 cellpadding=1>";
echo "<tr bgcolor=\"#666666\"><td>";
echo "<TABLE width=\"100%\" border=0 cellspacing=0 cellpadding=2>";
echo "<tr><td valign=\"middle\" align=\"left\">";
echo "<H3><CENTER>Importer &agrave; partir de l'archive sauvegard&eacute;e d'une base d'usagers (format SQL)</CENTER></H3>";
echo "!!! ATTENTION !!! Cette action supprimera la base existante contenant les preuves d'imputabilit&eacute; des connexions.<BR>";
echo "Une sauvegarde de la base actuelle sera automatiquement r&eacute;alis&eacute;e.";
echo "<FORM action='$_SERVER[PHP_SELF]' method=POST ENCTYPE=\"multipart/form-data\">";
echo "Fichier (.sql) : <input type=\"file\" name=\"import-users\"><br>";
echo "<input type='hidden' name='choix' value='bdd'>";
if (($choix == "bdd") && isset($result)) echo $result."<BR>";
echo "<input type=\"submit\" value=\"Envoyer\">";
echo "</FORM>";
echo "</TD></TR></TABLE>";
echo "</TD></TR></TABLE>";
echo "<TABLE width=\"100%\" border=0 cellspacing=0 cellpadding=1>";
echo "<tr bgcolor=\"#666666\"><td>";
echo "<TABLE width=\"100%\" border=0 cellspacing=0 cellpadding=2>";
echo "<tr><td valign=\"middle\" align=\"left\">";
echo "<H3><CENTER>Remise &agrave; z&eacute;ro de la base usagers (RAZ)</CENTER></H3>";
echo "!!! ATTENTION !!! cette action supprimera les preuves d'imputabilit&eacute; des connexions.<br>";
echo "Une sauvegarde de la base actuelle sera automatiquement r&eacute;alis&eacute;e.";
echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>";
echo "<input type='hidden' name='choix' value='raz'>";
echo "<input type=\"submit\" value=\"Envoyer\">";
echo "</FORM>";
echo "</TD></TR></TABLE>";
echo "</TD></TR></TABLE>";
?>
</BODY>
</HTML>
<?php
/gestion/manager/htdocs/user_finger.php
0,0 → 1,236
<?php
require('/etc/freeradius-web/config.php');
require('../lib/attrshow.php');
require('../lib/sql/nas_list.php');
if (!isset($usage_summary)){
echo <<<EOM
<html>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="50">
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<title>Usagers connect&eacute;es</title>
<link rel="stylesheet" href="/css/style.css">
</head>
EOM;
}
 
if ($config[general_decode_normal_attributes] == 'yes'){
if (is_file("../lib/lang/$config[general_prefered_lang]/utf8.php"))
include_once("../lib/lang/$config[general_prefered_lang]/utf8.php");
else
include_once('../lib/lang/default/utf8.php');
$k = init_decoder();
$decode_normal = 1;
}
require_once('../lib/functions.php');
require("../lib/$config[general_lib_type]/functions.php");
 
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
else{
echo <<<EOM
<body>
<center>
<b>Could not include SQL library functions. Aborting</b>
</body>
</html>
EOM;
exit();
}
setlocale (LC_ALL, 'fr_FR');
$date = strftime('%A, %e %B %Y, %T %Z');
 
$sql_extra_query = '';
if ($config[sql_accounting_extra_query] != ''){
$sql_extra_query = xlat($config[sql_accounting_extra_query],$login,$config);
$sql_extra_query = da_sql_escape_string($sql_extra_query);
}
 
$link = @da_sql_pconnect($config);
$link2 = connect2db($config);
$tot_in = $tot_rem = 0;
if ($link){
$h = 21;
$servers_num = 0;
if ($config[general_ld_library_path] != '')
putenv("LD_LIBRARY_PATH=$config[general_ld_library_path]");
foreach($nas_list as $nas){
$j = 0;
$num = 0;
 
if ($server != ''){
if ($nas[name] == $server)
$servers_num++;
else
continue;
}
else
$servers_num++;
if ($nas[ip] == '')
continue;
$name_data = $nas[ip];
$community_data = $nas[community];
$server_name[$servers_num] = $nas[name];
$server_model[$servers_num] = $nas[model];
$extra = "";
$finger_type = $config[general_finger_type];
if ($nas[finger_type] != '')
$finger_type = $nas[finger_type];
if ($finger_type == 'snmp'){
$nas_type = ($nas[type] != '') ? $nas[type] : $config[general_nas_type];
if ($nas_type == '')
$nas_type = 'cisco';
 
$users=exec("$config[general_snmpfinger_bin] $name_data $community_data $nas_type");
if (strlen($users)){
$extra = "AND username IN ($users)";
if ($config[general_strip_realms] == 'yes'){
if ($config[general_realm_format] == 'prefix')
$match = "'[^']+" . $config[general_realm_delimiter];
else
$match = $config[general_realm_delimiter] . "[^']+'";
$extra = preg_replace("/$match/","'",$extra);
}
}
}
$search = @da_sql_query($link,$config,
"SELECT COUNT(*) AS onlineusers FROM $config[sql_accounting_table] WHERE
acctstoptime IS NULL AND nasipaddress = '$name_data' $extra $sql_extra_query;");
if ($search){
if (($row = @da_sql_fetch_array($search,$config)))
$num = $row[onlineusers];
}
$search = @da_sql_query($link,$config,
"SELECT DISTINCT username,acctstarttime,framedipaddress,callingstationid
FROM $config[sql_accounting_table] WHERE
acctstoptime IS NULL AND nasipaddress = '$name_data' $extra $sql_extra_query
GROUP BY username,acctstarttime,framedipaddress,callingstationid
ORDER BY acctstarttime;");
if ($search){
$now = time();
while($row = @da_sql_fetch_array($search,$config)){
$j++;
$h += 21;
$user = $row['username'];
$finger_info[$servers_num][$j]['ip'] = $row['framedipaddress'];
if ($finger_info[$servers_num][$j]['ip'] == '')
$finger_info[$servers_num][$j]['ip'] = '-';
$session_time = $row['acctstarttime'];
$session_time = date2timediv($session_time,$now);
$finger_info[$servers_num][$j]['session_time'] = time2strclock($session_time);
$finger_info[$servers_num][$j]['user'] = $user;
$finger_info[$servers_num][$j]['callerid'] = $row['callingstationid'];
if ($finger_info[$servers_num][$j]['callerid'] == '')
$finger_info[$servers_num][$j]['callerid'] = '-';
if ($user_info["$user"] == ''){
$user_info["$user"] = get_user_info($link2,$user,$config,$decode_normal,$k);
if ($user_info["$user"] == '' || $user_info["$user"] == ' ')
$user_info["$user"] = 'Unknown User';
}
}
$height[$servers_num] = $h;
}
$server_counting[$servers_num] = $j;
$server_loggedin[$servers_num] = $num;
$server_rem[$servers_num] = ($config[$portnum]) ? ($config[$portnum] - $num) : 'unknown';
$tot_in += $num;
if (is_numeric($server_rem[$servers_num]))
$tot_rem += $server_rem[$servers_num];
}
}
else
echo "<b>Could not connect to SQL database</b><br>\n";
if (isset($usage_summary)){
echo "Online: $tot_in Free: $tot_rem\n";
exit();
}
?>
 
<body>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th>Gestion des usagers</th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">
<center>
<table border=0 width=550 cellpadding=0 cellspacing=0>
<tr valign=top>
<!--<td align=center><img src="images/title2.gif"></td>-->
</tr>
</table>
<br>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=200>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
<font color="white">Usagers en ligne</font>&nbsp;
</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<?php
echo <<<EOM
<center><b>$date</b></center>
EOM;
for($j = 1; $j <= $servers_num; $j++){
echo <<<EOM
<p>
<table width=100% cellpadding=0 height=30><tr>
<th align=left>$server_name[$j]</th><th align=right><font color="red">$server_loggedin[$j] usager(s) connect&eacute;(s)</font></th><th>$server_model[$j]</th>
</tr>
</table>
<div height="$height[$j]" style="height:$height[$j]">
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr bgcolor="#d0ddb0">
<th>#</th><th>usager</th>
EOM;
if ($acct_attrs['uf'][4] != '') echo "<th>" . $acct_attrs[uf][4] . "</th>\n";
if ($acct_attrs['uf'][9] != '') echo "<th>" . $acct_attrs[uf][9] . "</th>\n";
echo <<<EOM
<th>nom</th><th>dur&eacute;e</th>
</tr>
EOM;
for( $k = 1; $k <= $server_counting[$j]; $k++){
$user = $finger_info[$j][$k][user];
if ($user == '')
$user = '&nbsp;';
$User = urlencode($user);
$time = $finger_info[$j][$k][session_time];
$ip = $finger_info[$j][$k][ip];
$cid = $finger_info[$j][$k][callerid];
$inf = $user_info[$user];
echo <<<EOM
<tr align=center>
<td>$k</td><td><a href="user_admin.php?login=$User" title="Editer l'utilisateur $user">$user</a></td>
EOM;
if ($acct_attrs['uf'][4] != '') echo "<td>$ip</td>\n";
if ($acct_attrs['uf'][9] != '') echo "<td>$cid</td>\n";
echo <<<EOM
<td>$inf</td><td>$time</td>
</tr>
EOM;
}
 
echo <<<EOM
</table>
</div>
EOM;
}
?>
</td></tr>
</table>
</td></tr>
</table>
</TD></TR>
</TABLE>
</td></tr>
</TABLE><p>
</html>
/gestion/manager/htdocs/user_test.php
0,0 → 1,208
<?php
require('/etc/freeradius-web/config.php');
 
if ($login == 'da_server_test'){
$login = $config[general_test_account_login];
$test_login=1;
}
 
echo <<<EOM
<html>
<head>
<title>Test de l'utilisateur $login</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="style.css">
</head>
<body>
<center>
<table border=0 width=550 cellpadding=0 cellspacing=0>
<tr valign=top>
<!--<td align=center><img src="images/title2.gif"></td>-->
</tr>
</table>
 
<table border=0 width=400 cellpadding=0 cellspacing=2>
EOM;
 
if (!$test_login)
include("../html/user_toolbar.html.php");
 
print <<<EOM
</table>
 
<br>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=200>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
EOM;
 
if ($test_login){
print <<<EOM
<font color="white">Page de Test du serveur Radius</font>&nbsp;
EOM;
}else{
print <<<EOM
<font color="white">Page de Test de l'utilisateur $login</font>&nbsp;
EOM;
}
?>
</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
 
<?php
if ($server == '' || !preg_match('/^[\w\.]+$/',$server))
$server = $config[general_radius_server];
if ($port == 0 || !is_numeric($port))
$port = $config[general_radius_server_port];
if ($auth_proto == '')
$auth_proto = $config[general_radius_server_auth_proto];
$selected[$auth_proto] = 'selected';
 
if ($test_user == 1){
$tmp_file = tempnam("$config[general_tmp_dir]",'DA');
$req=file($config[general_auth_request_file]);
if ($config[general_ld_library_path] != '')
putenv("LD_LIBRARY_PATH=$config[general_ld_library_path]");
$comm = $config[general_radclient_bin] . " $server:$port" . ' auth ' . $config[general_radius_server_secret]
. ' >' . $tmp_file;
$fp = popen("$comm","w");
if ($fp){
foreach ($req as $val){
// Ignore comments
if (ereg('^[[:space:]]*#',$val) || ereg('^[[:space:]]*$',$val))
continue;
fwrite($fp,$val);
}
if ($test_login){
$test=1;
fwrite($fp, "User-Name = \"$config[general_test_account_login]\"\n");
fwrite($fp, "User-Password = \"$config[general_test_account_password]\"\n");
pclose($fp);
}
else{
fwrite($fp, "User-Name = \"$login\"\n");
if ($auth_proto == 'chap')
fwrite($fp, "CHAP-Password = \"$passwd\"\n");
else
fwrite($fp, "User-Password = \"$passwd\"\n");
if (strlen($extra))
fwrite($fp,$extra);
pclose($fp);
}
$reply = file($tmp_file);
unlink($tmp_file);
$msg = "<b>" . strftime('%A, %e %B %Y, %T %Z') . "</b><br>\n";
$msg .= "<b>Server: </b><i>$server:$port</i><br><br>\n";
if (ereg('code 2', $reply[0]))
$msg .= "<b>L'authentification a <font color=green>r&eacute;ussie</font>";
else if (ereg('code 3',$reply[0]))
$msg .= "<b>L'authentification a <font color=red>&eacute;chou&eacute;e</font>";
else if (ereg('no response from server', $reply[0]))
$msg .= "<b><font color=red>Pas de r&eacute;ponse du serveur</font>";
else if (ereg('Connection refused',$reply[0]))
$msg .= "<b><font color=red>La connection a &eacute;t&eacute; refus&eacute;e</font>";
if ($test_login)
$msg .= "</b><i> (test de l'utilisateur $login)</i><br>\n";
else
$msg .= "</b><br>\n";
array_shift($reply);
if (count($reply)){
$msg .= "<br><b>R&eacute;ponse du serveur :</b><br>\n";
foreach ($reply as $val){
$msg .= "<i>$val</i><br>\n";
}
}
if ($test_login){
print <<<EOM
$msg
<br>
</td></tr>
</table>
</tr>
</table>
</body>
</html>
EOM;
exit();
}
 
}
}
?>
<form method=post>
<input type=hidden name=login value=<?php print $login ?>>
<input type=hidden name=test_user value="0">
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr>
<td align=right bgcolor="#d0ddb0">
Mot de passe utilisateur
</td>
<td>
<input type=password name=passwd value="<?php print $passwd ?>" size=25>
</td>
</tr>
<tr>
<td align=right bgcolor="#d0ddb0">
Serveur Radius
</td>
<td>
<input type=text name=server value="<?php print $server ?>" size=25>
</td>
</tr>
<tr>
<td align=right bgcolor="#d0ddb0">
Port du serveur Radius
</td>
<td>
<input type=text name=port value="<?php print $port ?>" size=25>
</td>
</tr>
<tr>
<td align=right bgcolor="#d0ddb0">
Attributs suppl&eacute;mentaires
</td>
<td>
<textarea name="extra" cols="35" wrap="PHYSICAL" rows="4"><?php print $extra ?></textarea>
</td>
</tr>
<tr>
<td align=right bgcolor="#d0ddb0">
Protocole d'authentification
</td>
<td>
<?php
echo <<<EOM
<select name="auth_proto" editable>
<option $selected[pap] value="pap">PAP
<option $selected[chap] value="chap">CHAP
EOM
?>
</select>
</td>
</tr>
 
</table>
<br>
<input type=submit class=button value="Lancement du Test" OnClick="this.form.test_user.value=1">
</form>
<?php
if ($test_user == 1){
echo <<<EOM
<br>
$msg
EOM;
}
?>
</td></tr>
</table>
</tr>
</table>
</body>
</html>
/gestion/manager/htdocs/show_groups.php
0,0 → 1,124
<?php
# Choice of language
$Language = 'en';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'fr'){
$l_title = "Liste des groupes d'usagers";
$l_frame_top = "Gestion des groupes";
$l_frame = "Liste des groupes";
$l_group = "groupe";
$l_nb_users = "Nombre d'usagers";
$l_empty_list = "La liste des groupes est vide";
}
else {
$l_title = "Create a group";
$l_frame_top = "Groups admin";
$l_frame = "Groups list";
$l_group = "group";
$l_nb_users = "Number of users";
$l_empty_list = "The groups list is empty";
}
require('/etc/freeradius-web/config.php');
?>
<html>
<?php
 
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
else{
echo <<<EOM
<title>$l_title</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<center>
<b>Could not include SQL library functions. Aborting</b>
</body>
</html>
EOM;
exit();
}
if ($config[general_lib_type] != 'sql'){
echo <<<EOM
<title>$l_title</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="style.css">
</head>
<body>
<center>
<b>This page is only available if you are using sql as general library type</b>
</body>
</html>
EOM;
exit();
}
?>
<head>
<title><?php echo "$l_title"; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th><?php echo "$l_frame_top"; ?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">
<center>
<table border=0 width=550 cellpadding=0 cellspacing=0>
<tr valign=top>
</tr>
</table>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=55%></td>
<td bgcolor="black" width=45%>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
<font color="white"><?php echo "$l_frame"; ?></font>
</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<?php
unset($login);
$num = 0;
include_once("../lib/$config[general_lib_type]/group_info.php");
if (isset($existing_groups)){
echo "<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor=\"#ffffe0\" valign=top>";
echo "<tr bgcolor=\"#d0ddb0\">";
echo "<th>#</th><th>$l_group </th><th>$l_nb_users</th></tr>";
foreach ($existing_groups as $group => $num_members){
$num++;
$Group = urlencode($group);
echo <<<EOM
<tr align=center>
<td>$num</td>
<td><a href="group_admin.php?login=$Group" title="Editer le groupe $group">$group</a></td>
<td>$num_members</td>
</tr>
EOM;
}
}
else
echo "<b>$l_empty_list</b>\n";
?>
</table>
</table>
</tr>
</table>
</TD></TR>
</TABLE>
</td></tr>
</TABLE>
</body>
</html>
/gestion/manager/htdocs/find.php
0,0 → 1,155
<?php
require('/etc/freeradius-web/config.php');
if (isset($search_IN)) $selected[$search_IN] = 'selected';
if (isset ($radius_attr)) $selected[$radius_attr] = 'selected';
if (isset ($max_results)){ $max = ($max_results) ? $max_results : 40;}
?>
<html>
<head>
<title>Gestion des usager</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config['general_charset']?>">
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th>Gestion des usagers</th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=200>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
<font color="white">Filtre de recherche</font>&nbsp;
</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
 
<?php
if (isset($find_user)){
if ($find_user == 1){
unset($found_users);
if (is_file("../lib/$config[general_lib_type]/find.php"))
include("../lib/$config[general_lib_type]/find.php");
if (isset($found_users)){
$num = 0;
$msg .= <<<EOM
 
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr bgcolor="#d0ddb0">
<th>#</th><th>Usager</th><th>Actions</th>
</tr>
EOM;
foreach ($found_users as $user){
if ($user == '')
$user = '-';
$User = urlencode($user);
$num++;
$msg .= <<<EOM
<tr align=center>
<td>$num</td>
<td>$user</td>
<td><a href="user_admin.php?login=$User" title="&Eacute;tat"><img src=/images/info.gif></a>
<a href="user_edit.php?login=$User" title="Attributs"><img src=/images/create.gif></a>
<a href="user_info.php?login=$User" title="Informations personnelles"><img src=/images/tpf.gif></a>
<a href="user_accounting.php?login=$User" title="Connexions effectu&eacute;es"><img src=/images/graph.gif></a>
<a href="clear_opensessions.php?login=$User" title="Sessions ouvertes"><img src=/images/state_ok.gif></a>
<a href="user_delete.php?login=$User" title="Supprimer"><img src=/images/state_error.gif></a></td>
</tr>
EOM;
}
$msg .= "</table>\n";
}
else
$msg = "<b>Pas d'usagers trouv&eacute;s</b><br>\n";
}
}
?>
<form method=post>
<input type=hidden name=find_user value="0">
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr>
<td align=right bgcolor="#d0ddb0">
Crit&egrave;re de recherche
</td>
<td>
<?php
echo <<<EOM
<select name="search_IN" editable onChange="this.form.submit();">
<option $selected[username] value="username">Identifiant (login)
<option $selected[name] value="name">Nom complet (NOM Prenom)
<option $selected[department] value="department">Service
<option $selected[radius] value="radius">Attribut particulier
EOM;
?>
 
</select>
</td>
</tr>
<?php
if (isset($search_IN)){
if ($search_IN == 'radius'){
require('../lib/attrshow.php');
echo <<<EOM
<tr>
<td align=right bgcolor="#d0ddb0">
Attributs RADIUS
</td>
<td>
<select name="radius_attr" editable>
EOM;
foreach($show_attrs as $key => $desc)
echo "<option $selected[$key] value=\"$key\">$desc\n";
echo <<<EOM
</select>
</td>
</tr>
EOM;
}
}
?>
<tr>
<td align=right bgcolor="#d0ddb0">
qui contient<BR>
(champ vide = tout)
</td>
<td>
<input type=text name="search" value="<?php if (isset($search)) echo $search ;?>" size=25>
</td>
</tr>
<!--<tr>
<td align=right bgcolor="#d0ddb0">
Nombre de r&eacute;sultats Max.
</td>
<td>
<input type=text name="max_results" value="<?php echo $max ?>" size=25>
</td>
</tr> -->
</table>
<br>
<input type=submit class=button value="Lancer la recherche" OnClick="this.form.find_user.value=1">
</form>
<?php
if (isset($find_user)){
if ($find_user == 1){ echo $msg ;}}
?>
</td></tr>
</table>
</td></tr>
</table>
</td></tr>
</TABLE>
</td></tr>
</TABLE>
</body>
</html>
/gestion/manager/htdocs/user_edit.php
0,0 → 1,342
<?php
require('/etc/freeradius-web/config.php');
require('../lib/attrshow.php');
require('../lib/defaults.php');
$extra_text = '';
if ($user_type != 'group'){
if (is_file("../lib/$config[general_lib_type]/user_info.php"))
include("../lib/$config[general_lib_type]/user_info.php");
if ($config[general_lib_type] == 'sql' && $config[sql_show_all_groups] == 'true'){
$extra_text = "<br><font size=-2><i>(le groupe auquel apartient l'usager est surlign&eacute;)</i></font>";
$saved_login = $login;
$login = '';
if (is_file("../lib/sql/group_info.php"))
include("../lib/sql/group_info.php");
$login = $saved_login;
}
}
else{
if (is_file("../lib/$config[general_lib_type]/group_info.php"))
include("../lib/$config[general_lib_type]/group_info.php");
}
if ($config[general_lib_type] == 'sql' && $config[sql_use_operators] == 'true'){
$colspan=2;
$show_ops = 1;
include("../lib/operators.php");
}
else{
$show_ops = 0;
$colspan=1;
}
 
 
echo <<<EOM
<html>
<head>
EOM;
 
if ($user_type != 'group'){
echo " <title>subscription configuration for $login ($cn)</title>\n";
$util = "usagers";}
else{
echo " <title>subscription configuration for $login</title>\n";
$util = "groupes";}
?>
 
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
<link rel="stylesheet" href="/css/style.css">
<script language="javascript" type="text/javascript">
var chars='0123456789abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ'
function password(size)
{
var pass=''
while(pass.length < size)
{
pass+=chars.charAt(Math.round(Math.random() * (chars.length)))
}
document.edituser.passwd.value=pass
document.edituser.pwdgene.value=pass
}
</script>
</head>
<body>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th>Gestion des <?php echo $util?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
<tr><td valign="middle" align="left">
<center>
<table border=0 width=550 cellpadding=0 cellspacing=0>
<tr valign=top>
<!--<td align=center><img src="images/title2.gif"></td>-->
</tr>
</table>
<table border=0 width=400 cellpadding=0 cellspacing=2>
<?php
if ($user_type != 'group')
{
include("../html/user_toolbar.html.php");
$titre="de l'usager";
}
else
{
include("../html/group_toolbar.html.php");
$titre="du groupe";
}
print <<<EOM
</table>
<br>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=75%>&nbsp;</td>
<td bgcolor="black" width=25% align=right>
<table border=0 width="200" cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=center valign=top><th>
<font color="white">Attributs $titre : $login</font>&nbsp;
</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
EOM;
if ($change == 1){
if (is_file("../lib/$config[general_lib_type]/change_attrs.php"))
include("../lib/$config[general_lib_type]/change_attrs.php");
if ($user_type != 'group'){
if ($config[general_show_user_password] != 'no' && $passwd != ''
&& is_file("../lib/$config[general_lib_type]/change_passwd.php"))
include("../lib/$config[general_lib_type]/change_passwd.php");
if (is_file("../lib/$config[general_lib_type]/user_info.php"))
include("../lib/$config[general_lib_type]/user_info.php");
if ($group_change && $config[general_lib_type] == 'sql' && $config[sql_show_all_groups] == 'true'){
include("../lib/sql/group_change.php");
include("../lib/defaults.php");
}
}
else{
if (is_file("../lib/$config[general_lib_type]/group_info.php"))
include("../lib/$config[general_lib_type]/group_info.php");
}
}
else if ($badusers == 1){
if (is_file("../lib/add_badusers.php"))
include("../lib/add_badusers.php");
}
?>
<form name="edituser" method=post>
<input type=hidden name=login value=<?php print $login ?>>
<input type=hidden name=user_type value=<?php print $user_type ?>>
<input type=hidden name=change value="0">
<input type=hidden name=add value="0">
<input type=hidden name=badusers value="0">
<input type=hidden name=group_change value="0">
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<?php
if ($user_type != 'group' && $config[general_show_user_password] != 'no'){
echo <<<EOM
<tr>
<td align=right colspan=$colspan bgcolor="#d0ddb0">
Nouveau mot de passe<br>
EOM;
if ($user_password_exists == 'yes')
echo "<font size=-2>Le mot de passe <font color=\"green\"><b>existe</b></font></font>\n";
else
echo "<font size=-2>Le mot de passe <font color=\"red\"><b> n'existe pas</b></font></font>\n";
echo <<<EOM
</td>
<td>
<input type=password name=passwd value="" size=40>
<br /><input type="button" value="g&eacute;n&eacute;rer" onclick="password(8)">
<input type="text" value="" name="pwdgene" size=20 readonly>
</td>
</tr>
EOM;
}
foreach($show_attrs as $key => $desc){
$name = $attrmap["$key"];
$generic = $attrmap[generic]["$key"];
if ($name == 'none')
continue;
unset($vals);
unset($selected);
unset($ops);
$def_added = 0;
if ($item_vals["$key"][count]){
for($i=0;$i<$item_vals["$key"][count];$i++){
$vals[] = $item_vals["$key"][$i];
$ops[] = $item_vals["$key"][operator][$i];
}
}
else{
if ($default_vals["$key"][count]){
for($i=0;$i<$default_vals["$key"][count];$i++){
$vals[] = $default_vals["$key"][$i];
$ops[] = $default_vals["$key"][operator][$i];
}
}
else{
$vals[] = '';
$ops[] = '=';
}
$def_added = 1;
}
if ($generic == 'generic' && $def_added == 0){
for($i=0;$i<$default_vals["$key"][count];$i++){
$vals[] = $default_vals["$key"][$i];
$ops[] = $default_vals["$key"][operator][$i];
}
}
if ($add && $name == $add_attr){
$vals[] = $default_vals["$key"][0];
$ops[] = ($default_vals["$key"][operator][0] != '') ? $default_vals["$key"][operator][0] : '=';
}
 
$i = 0;
foreach($vals as $val){
$name1 = $name . $i;
$val = ereg_replace('"','&quot;',$val);
$oper_name = $name1 . '_op';
$oper = $ops[$i];
$selected[$oper] = 'selected';
$i++;
print <<<EOM
<tr>
<td align=right bgcolor="#d0ddb0">
EOM;
$desc = addslashes($desc);
eval("\$desc = \"$desc\";");
$desc = stripslashes($desc);
if ($i == 1)
echo "$desc\n";
else
echo "$desc ($i)\n";
print <<<EOM
</td>
EOM;
if ($show_ops){
switch ($key)
{
case 'Simultaneous-Use' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
case 'Login-Time' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
case 'Expiration' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
case 'Session-Timeout' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
break;
case 'Max-Daily-Session' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
case 'Max-Weekly-Session' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
case 'Max-Monthly-Session' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
default :
print <<<EOM
<td>
<select name=$oper_name>
<option $selected[$op_eq] value="=">=
<option $selected[$op_set] value=":=">:=
<option $selected[$op_add] value="+=">+=
<option $selected[$op_eq2] value="==">==
<option $selected[$op_ne] value="!=">!=
<option $selected[$op_gt] value=">">&gt;
<option $selected[$op_ge] value=">=">&gt;=
<option $selected[$op_lt] value="<">&lt;
<option $selected[$op_le] value="<=">&lt;=
<option $selected[$op_regeq] value="=~">=~
<option $selected[$op_regne] value="!~">!~
<option $selected[$op_exst] value="=*">=*
<option $selected[$op_nexst] value="!*">!*
</select>
</td>
EOM;
break;
}
}
print <<<EOM
<td>
<input type=text name="$name1" value="$val" size=40>
</td>
</tr>
EOM;
}
}
?>
<!--
<tr>
<td align=right colspan=<?php print $colspan ?> bgcolor="#d0ddb0">
Ajouter un attribut
</td>
<td>
<select name="add_attr" OnChange="this.form.add.value=1;this.form.submit()">
<?php
foreach ($show_attrs as $key => $desc){
$name = $attrmap["$key"];
print <<<EOM
<option value="$name">$desc
EOM;
}
?>
</select>
</td>
</tr>
-->
<?php
if ($user_type != 'group'){
echo <<<EOM
<tr>
<td align=right colspan=$colspan bgcolor="#d0ddb0">
Membre de $extra_text
</td>
<td>
EOM;
if (isset($member_groups)){
echo "<select size=5 name=\"edited_groups[]\" multiple OnChange=\"this.form.group_change.value=1\">";
if ($config[sql_show_all_groups] == 'true'){
foreach ($existing_groups as $group => $count){
if ($member_groups[$group] == $group)
echo "<option selected value=\"$group\">$group\n";
else
echo "<option value=\"$group\">$group\n";
}
}else{
foreach ($member_groups as $group)
echo "<option value=\"$group\">$group\n";
}
echo "</select></td></tr>";
}
else{
echo "aucun group</td></tr>";
}
}
echo "</table><br>";
echo "<input type=submit class=button value=Change OnClick=\"this.form.change.value=1\">";
//if ($user_type != 'group'){
// echo <<<EOM
//<br><br>
//<input type=submit class=button value="Add to Badusers" OnClick="this.form.badusers.value=1">
//<a href="help/badusers_help.html" target=bu_help onclick=window.open("help/badusers_help.html","bu_help","width=600,height=210,toolbar=no,scrollbars=no,resizable=yes") title="BADUSERS Help Page"><font color="blue">&lt;--Help</font></a>
//EOM;
//}
?>
</form>
</td></tr>
</table>
</tr>
</table>
</td></tr>
</TABLE>
</body>
</html>
/gestion/manager/htdocs/user_admin.php
0,0 → 1,323
<?php
require('/etc/freeradius-web/config.php');
?>
<html>
<head>
<?php
require('../lib/functions.php');
require('../lib/defaults.php');
$date = strftime('%A, %e %B %Y, %T %Z');
 
if (is_file("../lib/$config[general_lib_type]/user_info.php")){
include("../lib/$config[general_lib_type]/user_info.php");
if ($user_exists == 'no'){
echo <<<EOM
<title>Page d'information d'utilisateur</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<center>
<form action="user_admin.php" method=get>
<b>User Name&nbsp;&nbsp;</b>
<input type="text" size=10 name="login" value="$login">
<b>&nbsp;&nbsp;does not exist</b><br>
<input type=submit class=button value="Show User">
</body>
</html>
EOM;
exit();
}
}
 
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
else{
echo <<<EOM
<title>Page d'information d'utilisateur</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="style.css">
</head>
<body>
<center>
<b>Could not include SQL library functions. Aborting</b>
</body>
</html>
EOM;
exit();
}
 
$monthly_limit = ($item_vals['Max-Monthly-Session'][0] != '') ? $item_vals['Max-Monthly-Session'][0] : $default_vals['Max-Monthly-Session'][0];
$monthly_limit = ($monthly_limit) ? $monthly_limit : $config[counter_default_monthly];
$weekly_limit = ($item_vals['Max-Weekly-Session'][0] != '') ? $item_vals['Max-Weekly-Session'][0] : $default_vals['Max-Weekly-Session'][0];
$weekly_limit = ($weekly_limit) ? $weekly_limit : $config[counter_default_weekly];
$daily_limit = ($item_vals['Max-Daily-Session'][0] != '') ? $item_vals['Max-Daily-Session'][0] : $default_vals['Max-Daily-Session'][0];
$daily_limit = ($daily_limit) ? $daily_limit : $config[counter_default_daily];
$session_limit = ($item_vals['Session-Timeout'][0] != '') ? $item_vals['Session-Timeout'][0] : $default_vals['Session-Timeout'][0];
$session_limit = ($session_limit) ? $session_limit : 'none';
$remaining = 'unlimited time';
$log_color = 'green';
 
$now = time();
$week = $now - 604800;
$now_str = date("$config[sql_date_format]",$now + 86400);
$week_str = date("$config[sql_date_format]",$week);
$day = date('w');
$week_start = date($config[sql_date_format],$now - ($day)*86400);
$month_start = date($config[sql_date_format],$now - date('j')*86400);
$today = $day;
$now_tmp = $now;
for ($i = $day; $i >-1; $i--){
$days[$i] = date($config[sql_date_format],$now_tmp);
$now_tmp -= 86400;
}
$day++;
//$now -= ($day * 86400);
$now -= 604800;
$now += 86400;
for ($i = $day; $i <= 6; $i++){
$days[$i] = date($config[sql_date_format],$now);
// $now -= 86400;
$now += 86400;
}
 
$daily_used = $weekly_used = $monthly_used = $lastlog_session_time = '-';
$extra_msg = '';
$used = array('-','-','-','-','-','-','-');
 
$link = @da_sql_pconnect($config);
if ($link){
$search = @da_sql_query($link,$config,
"SELECT sum(acctsessiontime) AS sum_sess_time,
sum(acctinputoctets) AS sum_in_octets,
sum(acctoutputoctets) AS sum_out_octets,
avg(acctsessiontime) AS avg_sess_time,
avg(acctinputoctets) AS avg_in_octets,
avg(acctoutputoctets) AS avg_out_octets,
COUNT(*) as counter FROM
$config[sql_accounting_table] WHERE username = '$login'
AND acctstarttime >= '$week_str' AND acctstarttime <= '$now_str';");
if ($search){
$row = @da_sql_fetch_array($search,$config);
$tot_time = time2str($row[sum_sess_time]);
$tot_input = bytes2str($row[sum_in_octets]);
$tot_output = bytes2str($row[sum_out_octets]);
$avg_time = time2str($row[avg_sess_time]);
$avg_input = bytes2str($row[avg_in_octets]);
$avg_output = bytes2str($row[avg_out_octets]);
$tot_conns = $row[counter];
}
else
echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
$search = @da_sql_query($link,$config,
"SELECT sum(acctsessiontime) AS sum_sess_time FROM $config[sql_accounting_table] WHERE username = '$login'
AND acctstarttime >= '$week_start' AND acctstarttime <= '$now_str';");
if ($search){
$row = @da_sql_fetch_array($search,$config);
$weekly_used = $row[sum_sess_time];
}
else
echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
if ($monthly_limit != 'none' || $config[counter_monthly_calculate_usage] == 'true'){
$search = @da_sql_query($link,$config,
"SELECT sum(acctsessiontime) AS sum_sess_time FROM $config[sql_accounting_table] WHERE username = '$login'
AND acctstarttime >= '$month_start' AND acctstarttime <= '$now_str';");
if ($search){
$row = @da_sql_fetch_array($search,$config);
$monthly_used = $row[sum_sess_time];
}
else
echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
}
$search = @da_sql_query($link,$config,
"SELECT COUNT(*) AS counter FROM $config[sql_accounting_table] WHERE username = '$login'
AND acctstoptime >= '$week_str' AND acctstoptime <= '$now_str'
AND (acctterminatecause LIKE 'Login-Incorrect%' OR
acctterminatecause LIKE 'Invalid-User%' OR
acctterminatecause LIKE 'Multiple-Logins%');");
if ($search){
$row = @da_sql_fetch_array($search,$config);
$tot_badlogins = $row[counter];
}
else
echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
for($i = 0; $i <=6; $i++){
if ($days[$i] == '')
continue;
$search = @da_sql_query($link,$config,
"SELECT sum(acctsessiontime) AS sum_sess_time FROM $config[sql_accounting_table] WHERE
username = '$login' AND acctstoptime >= '$days[$i] 00:00:00'
AND acctstoptime <= '$days[$i] 23:59:59';");
if ($search){
$row = @da_sql_fetch_array($search,$config);
$used[$i] = $row[sum_sess_time];
if ($daily_limit != 'none' && $used[$i] > $daily_limit)
$used[$i] = "<font color=red>" . time2str($used[$i]) . "</font>";
else
$used[$i] = time2str($used[$i]);
if ($today == $i){
$daily_used = $row[sum_sess_time];
if ($daily_limit != 'none'){
$remaining = $daily_limit - $daily_used;
if ($remaining <=0)
$remaining = 0;
$log_color = ($remaining) ? 'green' : 'red';
if (!$remaining)
$extra_msg = '(Out of daily quota)';
}
$daily_used = time2str($daily_used);
if ($daily_limit != 'none' && !$remaining)
$daily_used = "<font color=red>$daily_used</font>";
}
}
else
echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
}
if ($weekly_limit != 'none'){
$tmp = $weekly_limit - $weekly_used;
if ($tmp <=0){
$tmp = 0;
$extra_msg .= '(Out of weekly quota)';
}
if (!is_numeric($remaining))
$remaining = $tmp;
if ($remaining > $tmp)
$remaining = $tmp;
$log_color = ($remaining) ? 'green' : 'red';
}
$weekly_used = time2str($weekly_used);
if ($weekly_limit != 'none' && !$tmp)
$weekly_used = "<font color=red>$weekly_used</font>";
 
if ($monthly_limit != 'none'){
$tmp = $monthly_limit - $monthly_used;
if ($tmp <=0){
$tmp = 0;
$extra_msg .= '(Out of monthly quota)';
}
if (!is_numeric($remaining))
$remaining = $tmp;
if ($remaining > $tmp)
$remaining = $tmp;
$log_color = ($remaining) ? 'green' : 'red';
}
if ($monthly_limit != 'none' || $config[counter_monthly_calculate_usage] == 'true'){
$monthly_used = time2str($monthly_used);
if ($monthly_limit != 'none' && !$tmp)
$monthly_used = "<font color=red>$monthly_used</font>";
}
if ($session_limit != 'none'){
if (!is_numeric($remaining))
$remaining = $session_limit;
if ($remaining > $session_limit)
$remaining = $session_limit;
}
 
$search = @da_sql_query($link,$config,
"SELECT " . da_sql_limit(1,0,$config) . " * FROM $config[sql_accounting_table]
WHERE username = '$login' AND acctstoptime IS NULL " . da_sql_limit(1,1,$config) . "
ORDER BY acctstarttime DESC " . da_sql_limit(1,2,$config). " ;");
if ($search){
if (@da_sql_num_rows($search,$config)){
$logged_now = 1;
$row = @da_sql_fetch_array($search,$config);
$lastlog_time = $row['acctstarttime'];
$lastlog_server_ip = $row['nasipaddress'];
$lastlog_server_port = $row['nasportid'];
$lastlog_session_time = date2timediv($lastlog_time,0);
if ($daily_limit != 'none'){
$remaining = $remaining - $lastlog_session_time;
if ($remaining < 0)
$remaining = 0;
$log_color = ($remaining) ? 'green' : 'red';
}
$lastlog_session_time_jvs = 1000 * $lastlog_session_time;
$lastlog_session_time = time2strclock($lastlog_session_time);
$lastlog_client_ip = $row['framedipaddress'];
$lastlog_server_name = @gethostbyaddr($lastlog_server_ip);
$lastlog_client_name = @gethostbyaddr($lastlog_client_ip);
$lastlog_callerid = $row['callingstationid'];
if ($lastlog_callerid == '')
$lastlog_callerid = 'not available';
$lastlog_input = $row['acctinputoctets'];
if ($lastlog_input)
$lastlog_input = bytes2str($lastlog_input);
else
$lastlog_input = 'not available';
$lastlog_output = $row['acctoutputoctets'];
if ($lastlog_output)
$lastlog_output = bytes2str($lastlog_output);
else
$lastlog_output = 'not available';
}
}
else
echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
if (! $logged_now){
$search = @da_sql_query($link,$config,
"SELECT " . da_sql_limit(1,0,$config) . " * FROM $config[sql_accounting_table]
WHERE username = '$login' AND acctsessiontime != '0' " . da_sql_limit(1,1,$config) . "
ORDER BY acctstoptime DESC " . da_sql_limit(1,2,$config). " ;");
if ($search){
if (@da_sql_num_rows($search,$config)){
$row = @da_sql_fetch_array($search,$config);
$lastlog_time = $row['acctstarttime'];
$lastlog_server_ip = $row['nasipaddress'];
$lastlog_server_port = $row['nasportid'];
$lastlog_session_time = time2str($row['acctsessiontime']);
$lastlog_client_ip = $row['framedipaddress'];
$lastlog_server_name = ($lastlog_server_ip != '') ? @gethostbyaddr($lastlog_server_ip) : '-';
$lastlog_client_name = ($lastlog_client_ip != '') ? @gethostbyaddr($lastlog_client_ip) : '-';
$lastlog_callerid = $row['callingstationid'];
if ($lastlog_callerid == '')
$lastlog_callerid = 'not available';
$lastlog_input = $row['acctinputoctets'];
$lastlog_input = bytes2str($lastlog_input);
$lastlog_output = $row['acctoutputoctets'];
$lastlog_output = bytes2str($lastlog_output);
}
else
$not_known = 1;
}
else
echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
}
}
else
echo "<b>Could not connect to SQL database</b><br>\n";
 
$monthly_limit = (is_numeric($monthly_limit)) ? time2str($monthly_limit) : $monthly_limit;
$weekly_limit = (is_numeric($weekly_limit)) ? time2str($weekly_limit) : $weekly_limit;
$daily_limit = (is_numeric($daily_limit)) ? time2str($daily_limit) : $daily_limit;
$session_limit = (is_numeric($session_limit)) ? time2str($session_limit) : $session_limit;
$remaining = (is_numeric($remaining)) ? time2str($remaining) : $remaining;
 
if ($item_vals['Dialup-Access'][0] == 'FALSE' || (!isset($item_vals['Dialup-Access'][0]) && $attrmap['Dialup-Access'] != '' && $attrmap['Dialup-Access'] != 'none'))
$msg =<<<EON
<font color=red><b> Le compte de l'utilisateur est verrouill&eacute; </b></font>
EON;
else
$msg =<<<EON
L'utilisateur peut s'identifier pendant <font color="$log_color"> <b>$remaining $extra_msg</font>
EON;
$lock_msg = $item_vals['Dialup-Lock-Msg'][0];
if ($lock_msg != '')
$descr =<<<EON
<font color=red><b>$lock_msg </b</font>
EON;
else
$descr = '-';
 
$expiration = $default_vals['Expiration'][0];
if ($item_vals['Expiration'][0] != '')
$expiration = $item_vals['Expiration'][0];
if ($expiration != ''){
$expiration = strtotime($expiration);
if ($expiration != -1 && $expiration < time())
$descr = <<<EOM
<font color=red><b>Le compte de l'utilisateur a expir&eacute</b></font>
EOM;
}
 
require('../html/user_admin.html.php');
?>
/gestion/manager/htdocs/user_new.php
0,0 → 1,288
<?php
# Choice of language
$Language = 'en';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'fr'){
$l_title = "Cr&eacute;ation d'un usager";
$l_frame_top = "Gestion des usagers";
$l_frame = "Cr&eacute;ation d'un usager";
$l_user_exist = "existe d&eacute;j&agrave;";
$l_login = "Identifiant";
$l_password = "Mot de passe";
$l_passwd_gen = "g&eacute;n&eacute;rer";
$l_group = "Groupe";
$l_group_empty = "La liste des groupes est vide";
$l_name = "Nom et pr&eacute;nom";
$l_email = "Adresse de couriel";
}
else {
$l_title = "Create a user";
$l_frame_top = "Users admin";
$l_frame = "Create a user";
$l_user_exist = "already exist";
$l_login = "Login";
$l_password = "Password";
$l_passwd_gen = "generate";
$l_group = "Group";
$l_group_empty = "The group list is empty";
$l_name = "Surname and name";
$l_email = "Email Address";
}
 
 
require('/etc/freeradius-web/config.php');
if ($show == 1){
header("Location: user_admin.php?login=$login");
exit;
}
require('../lib/attrshow.php');
require('../lib/defaults.php');
 
if ($config[general_lib_type] == 'sql' && $config[sql_use_operators] == 'true'){
$colspan=2;
$show_ops=1;
}else{
$show_ops = 0;
$colspan=1;
}
echo "<html><head><title>$l_title</title>";
?>
 
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
<link rel="stylesheet" href="/css/style.css">
<script language="javascript" type="text/javascript">
var chars='0123456789abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ'
function password(size)
{
var pass=''
while(pass.length < size)
{
pass+=chars.charAt(Math.round(Math.random() * (chars.length)))
}
document.form1.passwd.value=pass
document.form1.pwdgene.value=pass
}
</script>
</head>
<body>
 
<?php
include("password_generator.jsc");
echo "<TABLE width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
echo "<tr><th>$l_frame_top</th></tr>";
?>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">
<center>
<table border=0 width=550 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=200>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
<font color="white"><? echo "$l_frame"; ?></font>
</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<?php
if ($create == 1){
if (is_file("../lib/$config[general_lib_type]/user_info.php"))
include("../lib/$config[general_lib_type]/user_info.php");
if ($user_exists != "no"){
echo <<<EOM
<b><i>$login</i> $l_user_exist</b>
EOM;
}
else{
if (is_file("../lib/$config[general_lib_type]/create_user.php"))
include("../lib/$config[general_lib_type]/create_user.php");
require("../lib/defaults.php");
if (is_file("../lib/$config[general_lib_type]/user_info.php"))
include("../lib/$config[general_lib_type]/user_info.php");
}
}
?>
<form name="form1" method=post>
<input type=hidden name=create value="0">
<input type=hidden name=show value="0">
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<?php
echo <<<EOM
<tr>
<td align=right colspan=$colspan bgcolor="#d0ddb0">
$l_login
</td><td>
<input type=text name="login" value="$login" size=35>
</td>
</tr>
<tr>
<td align=right colspan=$colspan bgcolor="#d0ddb0">
$l_password
</td><td>
<input type=password name="passwd" size=35>
<br /><input type="button" value="$l_passwd_gen" onclick="password(8)">
<input type="text" value="" name="pwdgene" size=20 readonly>
</td>
</tr>
EOM;
if ($config[general_lib_type] == 'sql'){
if (isset($member_groups))
$selected[$member_groups[0]] = 'selected';
echo <<<EOM
<tr>
<td align=right colspan=$colspan bgcolor="#d0ddb0">
$l_group
</td><td>
EOM;
include_once("../lib/$config[general_lib_type]/group_info.php");
if (isset($existing_groups)){
echo " <select name=\"Fgroup\">";
foreach ($member_groups as $group)
echo "<option value=\"$group\" $selected[$group]>$group\n";
echo " </select>";
}
else echo "$l_group_empty";
echo "</td></tr>";
}
if ($config[general_lib_type] == 'ldap' ||
($config[general_lib_type] == 'sql' && $config[sql_use_user_info_table] == 'true')){
echo <<<EOM
<tr>
<td align=right colspan=$colspan bgcolor="#d0ddb0">
$l_name
</td><td>
<input type=text name="Fcn" value="$cn" size=35>
</td>
</tr>
<tr>
<td align=right colspan=$colspan bgcolor="#d0ddb0">
$l_email
</td><td>
<input type=text name="Fmail" value="$mail" size=35>
</td>
</tr>
<tr>
<td align=right colspan=$colspan bgcolor="#d0ddb0">
Service
</td><td>
<input type=text name="Fou" value="$ou" size=35>
</td>
</tr>
<tr>
<td align=right colspan=$colspan bgcolor="#d0ddb0">
Nro TPH personnel
</td><td>
<input type=text name="Fhomephone" value="$homephone" size=35>
</td>
</tr>
<tr>
<td align=right colspan=$colspan bgcolor="#d0ddb0">
Nro TPH bureau
</td><td>
<input type=text name="Ftelephonenumber" value="$telephonenumber" size=35>
</td>
</tr>
<tr>
<td align=right colspan=$colspan bgcolor="#d0ddb0">
Nro TPH mobile
</td><td>
<input type=text name="Fmobile" value="$mobile" size=35>
</td>
</tr>
EOM;
}
foreach($show_attrs as $key => $desc){
$name = $attrmap["$key"];
if ($name == 'none')
continue;
$oper_name = $name . '_op';
$val = ($item_vals["$key"][0] != "") ? $item_vals["$key"][0] : $default_vals["$key"][0];
print <<<EOM
<tr>
<td align=right bgcolor="#d0ddb0">
$desc
</td>
EOM;
 
if ($show_ops){
switch ($key)
{
case 'Simultaneous-Use' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
case 'Login-Time' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
case 'Expiration' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
case 'Session-Timeout' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
break;
case 'Max-Daily-Session' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
case 'Max-Weekly-Session' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
case 'Max-Monthly-Session' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
default :
print <<<EOM
<td>
<select name=$oper_name>
<option $selected[$op_eq] value="=">=
<option $selected[$op_set] value=":=">:=
<option $selected[$op_add] value="+=">+=
<option $selected[$op_eq2] value="==">==
<option $selected[$op_ne] value="!=">!=
<option $selected[$op_gt] value=">">&gt;
<option $selected[$op_ge] value=">=">&gt;=
<option $selected[$op_lt] value="<">&lt;
<option $selected[$op_le] value="<=">&lt;=
<option $selected[$op_regeq] value="=~">=~
<option $selected[$op_regne] value="!~">!~
<option $selected[$op_exst] value="=*">=*
<option $selected[$op_nexst] value="!*">!*
</select>
</td>
EOM;
break;
}
}
print <<<EOM
<td>
<input type=text name="$name" value="$val" size=35>
</td>
</tr>
EOM;
}
echo "</table><BR>";
if ($create == 1)
echo "<input type=submit class=button value=\"Afficher le profil de l'utilisateur\" OnClick=\"this.form.show.value=1\">";
else{
echo "<input type=submit class=button value=\"Cr&eacute;er\" OnClick=\"this.form.create.value=1\">";}
?>
</form>
</td></tr>
</table>
</tr>
</table>
</TD></TR>
</TABLE>
</td></tr>
</TABLE>
</body>
</html>
/gestion/manager/htdocs/user_accounting.php
0,0 → 1,249
<?php
require('/etc/freeradius-web/config.php');
?>
<html>
<?php
require('../lib/functions.php');
require('../lib/sql/functions.php');
require('../lib/attrshow.php');
 
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
else{
echo <<<EOM
<title>Analyse pour $login</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="style.css">
</head>
<body>
<center>
<b>Could not include SQL library functions. Aborting</b>
</body>
</html>
EOM;
exit();
}
 
$now = time();
$now_str = ($now_str != '') ? "$now_str" : date($config[sql_date_format],$now + 86400);
$prev_str = ($prev_str != '') ? "$prev_str" : date($config[sql_date_format], $now - 604800 );
$num = 0;
$pagesize = ($pagesize) ? $pagesize : 10;
if (!is_numeric($pagesize) && $pagesize != 'all')
$pagesize = 10;
$limit = ($pagesize == 'all') ? '' : "$pagesize";
$selected[$pagesize] = 'selected';
$order = ($order != '') ? $order : $config[general_accounting_info_order];
if ($order != 'desc' && $order != 'asc')
$order = 'desc';
$selected[$order] = 'selected';
$now_str = da_sql_escape_string($now_str);
$prev_str = da_sql_escape_string($prev_str);
 
unset($da_name_cache);
if (isset($_SESSION['da_name_cache']))
$da_name_cache = $_SESSION['da_name_cache'];
 
 
echo <<<EOM
<head>
<title>Analyse pour $login</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th>Statistique des connexions</th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">
<center>
<table border=0 width=550 cellpadding=0 cellspacing=0>
<tr valign=top>
<!--<td align=center><img src="images/title2.gif"></td>-->
</tr>
</table>
<table border=0 width=400 cellpadding=0 cellspacing=2>
EOM;
 
include("../html/user_toolbar.html.php");
 
print <<<EOM
</table>
<br>
<table border=0 width=840 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=65%></td>
<td bgcolor="black" width=35%>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
<font color="white">Analyse pour $login</font>&nbsp;
</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
Dates du <b>$prev_str</b> au <b>$now_str</b>
EOM;
?>
 
<p>
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr bgcolor="#d0ddb0">
<th>#</th>
<?php
for($i=1;$i<=9;$i++){
if ($acct_attrs['ua']["$i"] != '')
echo "<th>" . $acct_attrs['ua']["$i"] . "</th>\n";
}
$sql_extra_query = '';
if ($config[sql_accounting_extra_query] != '')
$sql_extra_query = xlat($config[sql_accounting_extra_query],$login,$config);
?>
</tr>
 
<?php
$link = @da_sql_pconnect($config);
if ($link){
$search = @da_sql_query($link,$config,
"SELECT " . da_sql_limit($limit,0,$config) . " * FROM $config[sql_accounting_table]
WHERE username = '$login' AND acctstarttime <= '$now_str'
AND acctstarttime >= '$prev_str' $sql_extra_query " . da_sql_limit($limit,1,$config) .
" ORDER BY acctstarttime $order " . da_sql_limit($limit,2,$config). " ;");
if ($search){
while( $row = @da_sql_fetch_array($search,$config) ){
$tr_color='white';
$num++;
$acct_type = "$row[framedprotocol]/$row[nasporttype]";
if ($acct_type == '')
$acct_type = '-';
$acct_logedin = $row[acctstarttime];
$acct_sessiontime = $row[acctsessiontime];
$acct_sessiontime_sum += $acct_sessiontime;
$acct_sessiontime = time2str($acct_sessiontime);
$acct_ip = $row[framedipaddress];
if ($acct_ip == '')
$acct_ip = '-';
$acct_upload = $row[acctinputoctets];
$acct_upload_sum += $acct_upload;
$acct_upload = bytes2str($acct_upload);
$acct_download = $row[acctoutputoctets];
$acct_download_sum += $acct_download;
$acct_download = bytes2str($acct_download);
$acct_server = $row[nasipaddress];
if ($acct_server != ''){
$acct_server = $da_name_cache[$row[nasipaddress]];
if (!isset($acct_server)){
$acct_server = @gethostbyaddr($row[nasipaddress]);
if (!isset($da_name_cache) && $config[general_use_session] == 'yes'){
$da_name_cache[$row[nasipaddress]] = $acct_server;
session_register('da_name_cache');
}
else
$da_name_cache[$row[nasipaddress]] = $acct_server;
}
}
else
$acct_server = '-';
$acct_server = "$acct_server:$row[nasportid]";
$acct_terminate_cause = "$row[acctterminatecause]";
if ($acct_terminate_cause == '')
$acct_terminate_cause = '-';
if (ereg('Login-Incorrect',$acct_terminate_cause) ||
ereg('Multiple-Logins', $acct_terminate_cause) || ereg('Invalid-User',$acct_terminate_cause))
$tr_color='#ffe8e0';
$acct_callerid = "$row[callingstationid]";
if ($acct_callerid == '')
$acct_callerid = '-';
echo <<<EOM
<tr align=center bgcolor="$tr_color">
<td>$num</td>
EOM;
if ($acct_attrs[ua][1] != '') echo "<td>$acct_type</td>\n";
if ($acct_attrs[ua][2] != '') echo "<td>$acct_logedin</td>\n";
if ($acct_attrs[ua][3] != '') echo "<td>$acct_sessiontime</td>\n";
if ($acct_attrs[ua][4] != '') echo "<td>$acct_ip</td>\n";
if ($acct_attrs[ua][5] != '') echo "<td>$acct_upload</td>\n";
if ($acct_attrs[ua][6] != '') echo "<td>$acct_download</td>\n";
if ($acct_attrs[ua][7] != '') echo "<td>$acct_server</td>\n";
if ($acct_attrs[ua][8] != '') echo "<td>$acct_terminate_cause</td>\n";
if ($acct_attrs[ua][9] != '') echo "<td>$acct_callerid</td>\n";
echo "</tr>\n";
}
$acct_sessiontime_sum = time2str($acct_sessiontime_sum);
$acct_upload_sum = bytes2str($acct_upload_sum);
$acct_download_sum = bytes2str($acct_download_sum);
}
else
echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
}
else
echo "<b>Could not connect to SQL database</b><br>\n";
$colspan = 3;
if ($acct_attrs[ua][1] == '')
$colspan--;
if ($acct_attrs[ua][2] == '')
$colspan--;
echo <<<EOM
<tr bgcolor="lightyellow">
<td colspan=$colspan align="right">Total pages</td>
EOM;
if ($acct_attrs[ua][3] != '') echo "<td align=\"center\"><b>$acct_sessiontime_sum</td>\n";
if ($acct_attrs[ua][4] != '') echo "<td>&nbsp;</td>\n";
if ($acct_attrs[ua][5] != '') echo "<td align=\"right\" nowrap><b>$acct_upload_sum</td>\n";
if ($acct_attrs[ua][6] != '') echo "<td align=\"right\" nowrap><b>$acct_download_sum</td>\n";
if ($acct_attrs[ua][7] != '') echo "<td>&nbsp;</td>\n";
if ($acct_attrs[ua][8] != '') echo "<td>&nbsp;</td>\n";
if ($acct_attrs[ua][9] != '') echo "<td>&nbsp;</td>\n";
?>
</tr>
</table>
<tr><td>
<hr>
<tr><td align="center">
<form action="user_accounting.php" method="get" name="master">
<table border=0>
<tr><td colspan=6></td>
</tr>
<tr valign="bottom">
<td><small><b>Utilisateur</td><td><small><b>d&eacute;but date</td><td><small><b>fin date</td><td><small><b>nbr./page</td><td><b>class&eacute; le</td>
<tr valign="middle"><td>
<?php
echo <<<EOM
<input type="text" name="login" size="11" value="$login"></td>
<td><input type="text" name="prev_str" size="11" value="$prev_str"></td>
<td><input type="text" name="now_str" size="11" value="$now_str"></td>
<td><select name="pagesize">
<option $selected[5] value="5" >05
<option $selected[10] value="10">10
<option $selected[15] value="15">15
<option $selected[20] value="20">20
<option $selected[40] value="40">40
<option $selected[80] value="80">80
<option $selected[all] value="all">tous
</select>
</td>
<td><select name="order">
<option $selected[asc] value="asc">plus ancien en premier
<option $selected[desc] value="desc">plus r&eacute;cent en premier
</select>
</td>
EOM;
?>
 
<td><input type="submit" class=button value="show"></td></tr>
</table></td></tr></form>
</table>
</tr>
</table>
</TD></TR>
</TABLE>
</td></tr>
</TABLE>
</body>
</html>
/gestion/manager/html/user_admin.html.php
0,0 → 1,432
<?php
 
echo <<<EOM
<title>Informations de l'utilisateur $cn</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
</head>
<body>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th>Gestion des usagers</th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">
<link rel="stylesheet" href="/css/style.css">
EOM;
if ($logged_now)
print <<<EOM
<script Language="JavaScript">
<!--
var start;
var our_time;
function startcounter()
{
var start_date = new Date();
start = start_date.getTime();
our_time = $lastlog_session_time_jvs;
showcounter();
}
 
function showcounter ()
{
var now_date = new Date();
var diff = now_date.getTime() - start + our_time;
var hours = parseInt(diff / 3600000);
if(isNaN(hours)) hours = 0;
var minutes = parseInt((diff % 3600000) / 60000);
if(isNaN(minutes)) minutes = 0;
var seconds = parseInt(((diff % 3600000) % 60000) / 1000);
if(isNaN(seconds)) seconds = 0;
var timeValue = " " ;
timeValue += ((hours < 10) ? "0" : "") + hours;
timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
document.online.status.value = timeValue;
setTimeout("showcounter()", 1000);
}
//-->
</script>
EOM;
 
print <<<EOM
<center>
<table border=0 width=550 cellpadding=0 cellspacing=0>
<tr valign=top>
<!--<td align=center><img src="images/title2.gif"></td>-->
</tr>
</table>
<table border=0 width=400 cellpadding=0 cellspacing=2>
EOM;
 
include("../html/user_toolbar.html.php");
 
print <<<EOM
</table>
<br>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=250>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
<font color="white">Etat des connexions pour $login ($cn)</font>&nbsp;
</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
 
EOM;
if ($logged_now){
print <<<EOM
<form name="online" onSubmit="return(false);">
<tr><td align=center bgcolor="#d0ddb0">
L'utilisateur est <b>en ligne</b> depuis
</td><td>
$lastlog_time
</td></tr>
<tr><td align=center bgcolor="#d0ddb0">
Dur&eacute;e des connexions
</td><td>
<input type="text" name="status" size=10 value="$lastlog_session_time">
</form>
</td></tr>
EOM;
require('../html/user_admin_userinfo.html.php');
 
}else if ($not_known) print <<<EOM
<tr><td align=center bgcolor="#d0ddb0">
Cet utilisateur ne s'est <b>jamais</b> connect&eacute;
</td><td>-
</td></tr>
EOM;
else{
print <<<EOM
<tr><td align=center bgcolor="#d0ddb0">
L'utilisateur <b>n'est pas connect&eacute;</b> actuellement<br>
</td><td>-
</td></tr>
<tr><td align=center bgcolor="#d0ddb0">
Derni&egrave;re connexion
</td><td>
$lastlog_time
</td></tr>
<tr><td align=center bgcolor="#d0ddb0">
Dur&eacute;e de la connexion
</td><td>
$lastlog_session_time
</td></tr>
EOM;
require('../html/user_admin_userinfo.html.php');
}
 
print <<<EOM
<tr><td align=center bgcolor="#d0ddb0">
Sessions autoris&eacute;es
</td><td>
$msg
</td></tr>
<tr><td align=center bgcolor="#d0ddb0">
Description compl&egrave;te de l'utilisateur
</td><td>
$descr
</td></tr>
</table>
</table>
</table>
 
EOM;
 
if (is_file("../lib/$config[general_lib_type]/password_check.php"))
include("../lib/$config[general_lib_type]/password_check.php");
 
echo <<<EOM
<br>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=250>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
<font color="white">Analyse</font>&nbsp;
</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr><td align=center bgcolor="#d0ddb0">-</td><td align=center bgcolor="#d0ddb0"><b>mensuel</b></td><td align=center bgcolor="#d0ddb0"><b>hebdomadaire</b></td><td align=center bgcolor="#d0ddb0"><b>journalier</b></td><td align=center bgcolor="#d0ddb0"><b>par session</b></td></tr>
<tr><td align=center bgcolor="#d0ddb0"><b>limite</b></td><td>$monthly_limit</td><td>$weekly_limit</td><td>$daily_limit</td><td>$session_limit</td></tr>
<tr><td align=center bgcolor="#d0ddb0"><b>dur&eacute;e utilis&eacute;e</b></td><td>$monthly_used</td><td>$weekly_used</td><td>$daily_used</td><td>$lastlog_session_time</td></tr>
</table>
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" va
lign=top>
<tr><td align=center bgcolor="#d0ddb0"><b>Jour</b></td><td align=center bgcolor="#d0ddb0"><b>limite journali&egrave;re</b></td><td align=center bgcolor="#d0ddb0"><b>dur&eacute;e utilis&eacute;e</b></td><tr>
<tr><td align=center bgcolor="#d0ddb0">dimanche</td><td>$daily_limit</td><td>$used[0]</td></tr>
<tr><td align=center bgcolor="#d0ddb0">lundi</td><td>$daily_limit</td><td>$used[1]</td></tr>
<tr><td align=center bgcolor="#d0ddb0">mardi</td><td>$daily_limit</td><td>$used[2]</td></tr>
<tr><td align=center bgcolor="#d0ddb0">mercredi</td><td>$daily_limit</td><td>$used[3]</td></tr>
<tr><td align=center bgcolor="#d0ddb0">jeudi</td><td>$daily_limit</td><td>$used[4]</td></tr>
<tr><td align=center bgcolor="#d0ddb0">vendredi</td><td>$daily_limit</td><td>$used[5]</td></tr>
<tr><td align=center bgcolor="#d0ddb0">samedi</td><td>$daily_limit</td><td>$used[6]</td></tr>
</table></table>
</table>
<br>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=200>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
<font color="white">&Eacute;tat sur les 7 derniers jours</font>&nbsp;
</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr><td align=center bgcolor="#d0ddb0">Nombre de connexions</td><td>
<b><font color="darkblue">$tot_conns</font></b></td></tr>
<tr><td align=center bgcolor="#d0ddb0">Dur&eacute;e cumul&eacute;e des connexions</td><td>
<b><font color="darkblue">$tot_time</td></tr></td></tr>
<tr><td align=center bgcolor="#d0ddb0">Identifications d&eacute;fectueuses</td><td>
<b><font color="darkblue">$tot_badlogins</td></tr></td></tr>
<tr><td align=center bgcolor="#d0ddb0">Upload</td><td>
$tot_input</td></tr></td></tr>
<tr><td align=center bgcolor="#d0ddb0">Download</td><td>
$tot_output</td></tr></td></tr>
<tr><td align=center bgcolor="#d0ddb0">Dur&eacute; moyenne</td><td>
$avg_time</td></tr></td></tr>
<tr><td align=center bgcolor="#d0ddb0">Upload moyen</td><td>
$avg_input</td></tr></td></tr>
<tr><td align=center bgcolor="#d0ddb0">Download moyen</td><td>
$avg_output</td></tr></td></tr>
</table>
</table>
</table>
<br>
EOM;
 
if ($user_info){
echo <<<EOM
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=250>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
<font color="white">Informations personnelles</font>
</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr>
<td align=center bgcolor="#d0ddb0">
<b>nom</b>
</td>
<td>
$cn
</td>
</tr>
EOM;
if ($config[general_prefered_lang] != 'en'){
echo <<<EOM
<tr>
<td align=center bgcolor="#d0ddb0">
<b>nom ($config[general_prefered_lang_name])</b>
</td>
<td>
$cn_lang
</td>
</tr>
EOM;
}
echo <<<EOM
<tr>
<td align=center bgcolor="#d0ddb0">
<b>service</b>
</td>
<td>
$ou
</td>
</tr>
EOM;
if ($config[general_prefered_lang] != 'en'){
echo <<<EOM
<tr>
<td align=center bgcolor="#d0ddb0">
<b>service ($config[general_prefered_lang_name])</b>
</td>
<td>
$ou_lang
</td>
</tr>
EOM;
}
echo <<<EOM
<tr>
<td align=center bgcolor="#d0ddb0">
<b>titre</b>
</td>
<td>
$title
</td>
</tr>
EOM;
if ($config[general_prefered_lang] != 'en'){
echo <<<EOM
<tr>
<td align=center bgcolor="#d0ddb0">
<b>title ($config[general_prefered_lang_name])</b>
</td>
<td>
$title_lang
</td>
</tr>
EOM;
}
echo <<<EOM
<tr>
<td align=center bgcolor="#d0ddb0">
<b>adresse</b>
</td>
<td>
$address
</td>
</tr>
EOM;
if ($config[general_prefered_lang] != 'en'){
echo <<<EOM
<tr>
<td align=center bgcolor="#d0ddb0">
<b>adresse ($config[general_prefered_lang_name])</b>
</td>
<td>
$address_lang
</td>
</tr>
EOM;
}
echo <<<EOM
<tr>
<td align=center bgcolor="#d0ddb0">
<b>adresse personnelle</b>
</td>
<td>
$homeaddress
</td>
</tr>
EOM;
if ($config[general_prefered_lang] != 'en'){
echo <<<EOM
<tr>
<td align=center bgcolor="#d0ddb0">
<b>adresse personnelle ($config[general_prefered_lang_name])</b>
</td>
<td>
$homeaddress_lang
</td>
</tr>
EOM;
}
echo <<<EOM
<tr>
<td align=center bgcolor="#d0ddb0">
<b>t&eacute;l&eacute;phone</b>
</td>
<td>
$telephonenumber
</td>
</tr>
<tr>
<td align=center bgcolor="#d0ddb0">
<b>t&eacute;l&eacute;phone personnel</b>
</td>
<td>
$homephone
</td>
</tr>
<tr>
<td align=center bgcolor="#d0ddb0">
<b>mobile</b>
</td>
<td>
$mobile
</td>
</tr>
<tr>
<td align=center bgcolor="#d0ddb0">
<b>fax</b>
</td>
<td>
$fax
</td>
</tr>
<tr>
<td align=center bgcolor="#d0ddb0">
<b>home page</b>
</td>
<td>
<a href="$url" target=userpage onclick=window.open("$url","userpage","width=1000,height=550,toolbar=no,scrollbars=yes,resizable=yes") title="Aller à&agrave; la page d'accueil de l'utilisateur">$url</a>
</td>
</tr>
<tr>
<td align=center bgcolor="#d0ddb0">
<b>e-mail</b>
</td>
<td>
<a href="mailto: $mail" title="Envoyer un email">$mail</a>
</td>
</tr>
<tr>
<td align=center bgcolor="#d0ddb0">
<b>e-mail alias</b>
</td>
<td>
<a href="mailto: $mailalt" title="Envoyer un email">$mailalt</a>
</td>
</tr>
</table>
</table>
</table>
 
EOM;
}
?>
<tr> <td colspan=3 height=1></td></tr>
<tr> <td colspan=3>
</table>
<?php
if ($logged_now)
print <<<EOM
<script Language="JavaScript">
startcounter();
</script>
EOM;
?>
</TD></TR>
</TABLE>
</td></tr>
</TABLE>
 
</body>
</html>
/gestion/manager/html/stats.html.php
0,0 → 1,270
<form action="stats.php" method="get">
<table border=0 width=600 cellpadding=2 cellspacing=0>
<tr>
<td align=left>
<table border=0 cellspacing=0 cellpadding=2>
<tr valign=bottom>
<td><small><b>De </td>
<td><small><b>&agrave; </td>
<td><small><b>usager</td>
<td><small><b>sur le serveur</td>
<td>&nbsp;</td>
</tr>
<tr background="images/greenlines1.gif" valign=middle>
<?php
echo <<<EOM
<td valign=middle><input type="text" name="after" size="12" value="$after" ></td>
<td valign=middle><input type="text" name="before" size="12" value="$before"></td>
<td valign=middle><input type="text" name="login" size="12" value="$login" ></td>
<td valign=middle><select name="server" size=1>
EOM;
foreach($servers as $key => $val)
echo <<<EOM
<option value="$val">$key
EOM;
?>
</select></td>
<td valign=middle><input type="submit" class=button value="Go"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><hr size=1 noshade></td>
</tr>
<tr>
<td valign=top>
<table border=0 width="100%">
<tr> <td align=center valign=top width="45%">
<small>
<font color="darkblue"><b><?php echo $date ?></b></font>
</td>
<td align=center valign=top width="10%">&nbsp;</td>
<td align=center valign=top width="45%"><small>
P&eacute;riode observ&eacute;e :<br>
<?php
echo <<<EOM
<b>$after</b> &agrave; <b>$before</b>
EOM;
?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align=center><h1><b>Statistiques d'utilisation journali&egrave;re</td>
</tr>
<tr>
<td valign=top>
<table border=0 width="100%">
<tr>
<td colspan=2>
<center>
Statistiques pour
<?php
if ($login == '')
echo <<<EOM
<b><font color="darkblue">tous</font></b> les usagers
EOM;
else
echo <<<EOM
l'usager <b><font color="darkblue">$login</font></b>
EOM;
?>
</td>
</tr>
</table>
</td>
</tr>
 
<tr>
<td>
<table border=0 cellpadding=0 cellspacing=0 width="100%">
<tr> <td colspan=2><hr size=1 noshade>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center">
<table border=0 cellpadding=0 cellspacing=1 width="100%">
<?php
echo <<<EOM
<tr>
<td>Champs affich&eacute;s :</td><td colspan=10 align=center nowrap><select name="column1">
<option $selected1[sessions] value="sessions">Nbre de sessions
<option $selected1[usage] value="usage">Temps d'utilisation total
<option value="upload">------------------
<option $selected1[upload] value="upload">uploads
<option $selected1[download] value="download">downloads
</select> <select name="column2">
<option $selected2[sessions] value="sessions">Nbre de sessions
<option $selected2[usage] value="usage">Temps d'utilisation total
<option value="upload">------------------
<option $selected2[upload] value="upload">uploads
<option $selected2[download] value="download">downloads
</select> <select name="column3">
<option $selected3[sessions] value="sessions">Nbre de sessions
<option $selected3[usage] value="usage">Temps d'utilisation total
<option value="upload">------------------
<option $selected3[upload] value="upload">uploads
<option $selected3[download] value="download">downloads
EOM;
?>
</select>
</td>
</tr>
<tr>
<td colspan=10 background="images/greenlines1.gif" align=center valign=middle>
<table border=0 width="100%">
<tr>
<td width=50% align=left>
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td align=right><input type="submit" class=button value="Rafra&icirc;chir"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<tr>
<td colspan=10 height=20><img src="images/pixel.gif"></td>
</tr>
<tr>
<td colspan=10 height=20 align=center>
<table border=0 width=640 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=440></td>
<td bgcolor="black" width=200>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
<font color="white">Analyse journali&egrave;re</font>&nbsp;
</th></tr>
</table>
</td></tr>
<tr valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<p>
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr bgcolor="#d0ddb0">
<th>date</th>
<?php
echo <<<EOM
<th colspan=3>$message[$column1]</th>
<th colspan=3>$message[$column2]</th>
<th colspan=3>$message[$column3]</th>
EOM;
?>
</tr>
<?php
for($i = 0; $i <= $num_days; $i++){
$day = $days[$i];
$trcolor = ($i % 2) ? "#f7f7e4" : "#efefe4";
echo <<<EOM
<tr align=center bgcolor="$trcolor">
<td>$day</td>
<td>{$data[$day][1]}</td>
<td>{$perc[$day][1]}</td>
<td align=left height=14>
<table border=0 cellpadding=0>
<tr>
<td bgcolor="{$color[$day][1]}" width={$width[$day][1]}><img border=0 height=14 width={$width[$day][1]} src="images/pixel.gif" alt="the $message[$column1] for $day is {$data[$day][1]}"></td>
</tr>
</table>
</td>
<td>{$data[$day][2]}</td>
<td>{$perc[$day][2]}</td>
<td align=left height=14>
<table border=0 cellpadding=0>
<tr>
<td bgcolor="{$color[$day][2]}" width={$width[$day][2]}><img border=0 height=14 width={$width[$day][2]} src="images/pixel.gif" alt="the $message[$column3] for $day is {$data[$day][2]}"></td>
</tr>
</table>
</td>
<td>{$data[$day][3]}</td>
<td>{$perc[$day][3]}</td>
<td align=left height=14>
<table border=0 cellpadding=0>
<tr>
<td bgcolor="{$color[$day][3]}" width={$width[$day][3]}><img border=0 height=14 width={$width[$day][3]} src="images/pixel.gif" alt="the $message[$column3] for $day is {$data[$day][3]}"></td>
</tr>
</table>
</td>
</tr>
EOM;
}
?>
</table>
</td></tr>
</table>
</td></tr>
</table>
</td></tr>
</table>
<p>
<table border=0 width=640 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=440></td>
<td bgcolor="black" width=200>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
<font color="white">R&eacute;capitulatif journalier</font>&nbsp;
</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<p>
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ff
ffe0" valign=top>
<tr bgcolor="#d0ddb0">
<th>&nbsp;</th>
<?php
echo <<<EOM
<th>$message[$column1]</th>
<th>$message[$column2]</th>
<th>$message[$column3]</th>
EOM;
?>
</tr>
<?php
echo <<<EOM
<tr align=center bgcolor="#efefe4">
<td>maximum</td>
<td>{$data[max][1]}</td>
<td>{$data[max][2]}</td>
<td>{$data[max][3]}</td>
</tr>
<tr align=center bgcolor="#f7f7e4">
<td>moyenne</td>
<td>{$data[avg][1]}</td>
<td>{$data[avg][2]}</td>
<td>{$data[avg][3]}</td>
</tr>
<tr align=center bgcolor="#efefe4">
<td>r&eacute;capitulatif</td>
<td>{$data[sum][1]}</td>
<td>{$data[sum][2]}</td>
<td>{$data[sum][3]}</td>
</tr>
EOM;
?>
</table>
</table>
</td></tr>
</table>
</td></tr>
</table>
</form>
</center>
</body>
</html>
/gestion/manager/html/group_toolbar.html.php
0,0 → 1,13
<?php
$Login = urlencode($login);
print <<<EOM
<tr valign=top>
<td align=center bgcolor="#FFCC66">
<a href="group_admin.php?login=$Login" title="Gestion des membres du groupe"><font color="black"><b>MEMBRES</b></font></a></td>
<td align=center bgcolor="#FFCC66">
<a href="user_edit.php?login=$Login&user_type=group" title="Editer les propri&eacute;t&eacute;s du groupe"><font color="black"><b>ATTRIBUTS</b></font></a></td>
<td align=center bgcolor="#FFCC66">
<a href="user_delete.php?login=$Login&user_type=group" title="Supprimer le groupe"><font color="black"><b>SUPPRIMER</b></font></a></td>
</tr>
EOM;
?>
/gestion/manager/html/user_toolbar.html.php
0,0 → 1,28
<?php
$Login = urlencode($login);
print <<<EOM
<tr valign=top>
<td align=center bgcolor="#FFCC66">
<a href="user_admin.php?login=$Login" title="Afficher les informations de l'usager"><font color="black"><b>&Eacute;TAT</b></font></a></td>
<td align=center bgcolor="#FFCC66">
<a href="user_edit.php?login=$Login" title="Modifier les param&egrave;tres de l'usager"><font color="black"><b>ATTRIBUTS</b></font></a></td>
<td align=center bgcolor="#FFCC66">
<a href="user_info.php?login=$Login" title="Modifier les informations personnelles de l'usager"><font color="black"><b>INFOS PERSONNELLES</b></font></a></td>
</tr>
<tr valign=top>
<td align=center bgcolor="#FFCC66">
<a href="user_accounting.php?login=$Login" title="Afficher les informations de connexions de l'usager"><font color="black"><b>CONNEXIONS</b></font></a></td>
<!--<td align=center bgcolor="#FFCC66">
<a href="badusers.php?login=$Login" title="Show User Unauthorized Actions"><font color="black"><b>BADUSERS</b></font></a></td>
-->
<td align=center bgcolor="#FFCC66">
<a href="user_delete.php?login=$Login" title="Supprimer l'usager"><font color="black"><b>SUPPRIMER</b></font></a></td>
<!--<td align=center bgcolor="#FFCC66">
<a href="user_test.php?login=$Login" title="Test de l'usager"><font color="black"><b>TEST</b></font></a></td>
-->
<td align=center bgcolor="#FFCC66">
<a href="clear_opensessions.php?login=$Login" title="Effacer les sessions ouvertes de l'usager"><font color="black"><b>SESSIONS OUVERTES</b></font></a></td>
</tr>
</font>
EOM;
?>
/gestion/manager/html/user_admin_userinfo.html.php
0,0 → 1,29
<?php
echo <<<EOM
<tr><td align=center bgcolor="#d0ddb0">
Serveur
</td><td>
<b>$lastlog_server_name</b> ($lastlog_server_ip)
</td></tr>
<tr><td align=center bgcolor="#d0ddb0">
Port du serveur
</td><td>
$lastlog_server_port
</td></tr>
<tr><td align=center bgcolor="#d0ddb0">
@MAC de la station cliente
</td><td>
$lastlog_callerid
</td></tr>
<tr><td align=center bgcolor="#d0ddb0">
Upload
</td><td>
$lastlog_input
</td></tr>
<tr><td align=center bgcolor="#d0ddb0">
Download
</td><td>
$lastlog_output
</td></tr>
EOM;
?>
/gestion/manager/pass/index.php
0,0 → 1,143
<?php
# change user password on Alcasar captive Portal
# Copyright (C) 2003, 2004 Mondru AB.
# Copyright (C) 2008-2009 ANGEL95 & REXY
 
require('/etc/freeradius-web/config.php');
require('../lib/functions.php');
require('../lib/defaults.php');
 
$current_page = $_SERVER['PHP_SELF'];
 
# Choice of language
$Language = 'fr';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'es'){
$R_title = "User password change";
$R_form_l1 = "User";
$R_form_l2 = "Old password";
$R_form_l3 = "New password";
$R_form_l4 = "New password (confirmation)";
$R_form_button = "Modify";
$R_form_result1 = "Your password has been successfuly changed";
$R_form_result2 = "Error when trying to change password";
}
if($Language == 'de'){
$R_title = "User password change";
$R_form_l1 = "User";
$R_form_l2 = "Old password";
$R_form_l3 = "New password";
$R_form_l4 = "New password (confirmation)";
$R_form_button = "Modify";
$R_form_result1 = "Your password has been successfuly changed";
$R_form_result2 = "Error when trying to change password";
}
if($Language == 'nl'){
$R_title = "User password change";
$R_form_l1 = "User";
$R_form_l2 = "Old password";
$R_form_l3 = "New password";
$R_form_l4 = "New password (confirmation)";
$R_form_button = "Modify";
$R_form_result1 = "Your password has been successfuly changed";
$R_form_result2 = "Error when trying to change password";
}
if($Language == 'en'){
$R_title = "User password change";
$R_form_l1 = "User";
$R_form_l2 = "Old password";
$R_form_l3 = "New password";
$R_form_l4 = "New password (confirmation)";
$R_form_button = "Modify";
$R_form_result1 = "Your password has been successfuly changed";
$R_form_result2 = "Error when trying to change password";
}
if($Language == 'fr'){
$R_title = "Changement de mot de passe utilisateur";
$R_form_l1 = "Utilisateur";
$R_form_l2 = "Ancien mot de passe";
$R_form_l3 = "nouveau mot de passe";
$R_form_l4 = "nouveau mot de passe (confirmation)";
$R_form_button = "Modifier";
$R_form_result1 = "Votre mot de passe a &eacute;t&eacute; modifi&eacute; avec succ&egrave;s";
$R_form_result2 = "Erreur de changement de mot de passe";
}
echo "
<html>
<head>
<title>$R_title</title>
<meta http-equiv=\"Cache-control\" content=\"no-cache\">
<meta http-equiv=\"Pragma\" content=\"no-cache\">
<link rel=\"stylesheet\" href=\"/css/style.css\" type=\"text/css\">
</head>
<body>
<center>
<table border=0 width=400 cellpadding=0 cellspacing=2>
<tr>
<td>
<form name=\"master\" action=\"$current_page\" method=\"post\">
<input type=hidden name=action value=checkpass>
<br>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor=\"black\" width=200>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor=\"#907030\" align=right valign=top><th>
<font color=\"white\">$R_title</font>&nbsp;
</th></tr>
</table>
</td></tr>
<tr bgcolor=\"black\" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor=\"#ffffd0\" valign=top>
<tr><td>
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor=\"#ffffe0\" valign=top>
<tr><td align=center bgcolor=\"#d0ddb0\">$R_form_l1</td><td><input type=\"text\" name=\"login\" value=\"\"></td></tr>
<tr><td align=center bgcolor=\"#d0ddb0\">$R_form_l2</td><td><input type=\"password\" name=\"passwd\" value=\"\"></td></tr>
<tr><td align=center bgcolor=\"#d0ddb0\">$R_form_l3</td><td><input type=\"password\" name=\"newpasswd\" value=\"\"></td></tr>
<tr><td align=center bgcolor=\"#d0ddb0\">$R_form_l4</td><td><input type=\"password\" name=\"newpasswd2\" value=\"\">&nbsp;<input type=\"submit\" class=button value=\"$R_form_button\"></td></tr>
</table>
</table>
</table>";
 
#if (is_file("../lib/$config[general_lib_type]/password_check.php"))
# include("../lib/$config[general_lib_type]/password_check.php");
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
else{
echo "<b>Could not include SQL library</b><br>\n";
exit();
}
if ($action == 'checkpass'){
$link = @da_sql_pconnect($config);
if ($link){
$res = @da_sql_query($link,$config,
"SELECT attribute,value FROM $config[sql_check_table] WHERE username = '$login'
AND attribute = '$config[sql_password_attribute]';");
if ($res){
$row = @da_sql_fetch_array($res,$config);
if (is_file("../lib/crypt/$config[general_encryption_method].php")){
include("../lib/crypt/$config[general_encryption_method].php");
$enc_passwd = $row[value];
$passwd = da_encrypt($passwd,$enc_passwd);
$newpasswd = da_encrypt($newpasswd,$enc_passwd);
$newpasswd2 = da_encrypt($newpasswd2,$enc_passwd);
if (($passwd == $enc_passwd) and ($newpasswd == $newpasswd2)){
$msg = '<font color=blue><b>'.$R_form_result1.'</b></font>';
$res2 = @da_sql_query($link,$config,
"UPDATE $config[sql_check_table] set value='$newpasswd' WHERE username = '$login'
AND attribute = '$config[sql_password_attribute]';");}
else
$msg = '<font color=red><b>'.$R_form_result2.'</b></font>';
}
else
echo "<b>Could not open encryption library file</b><br>\n";
}
}
echo "<tr><td colspan=3 align=center>$msg</td></tr>\n";
}
?>
</body>
</html>
/gestion/manager/lib/sql/delete_group.php
0,0 → 1,31
<?php
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
else{
echo "<b>Could not include SQL library</b><br>\n";
exit();
}
$link = @da_sql_pconnect($config);
if ($link){
$res = @da_sql_query($link,$config,
"DELETE FROM $config[sql_groupreply_table] WHERE groupname = '$login';");
if ($res){
$res = @da_sql_query($link,$config,
"DELETE FROM $config[sql_groupcheck_table] WHERE groupname = '$login';");
if ($res){
$res = @da_sql_query($link,$config,
"DELETE FROM $config[sql_usergroup_table] WHERE groupname = '$login';");
if ($res)
echo "<b>Le groupe $login a &eacute;t&eacute; correctement supprim&eacute;</b><br>\n";
else
echo "<b>Error deleting group $login from usergroup table: " . da_sql_error($link,$config) . "</b><br>\n";
}
else
echo "<b>Error deleting group $login from group check table: " . da_sql_error($link,$config) . "</b><br>\n";
}
else
echo "<b>Error deleting group $login from group reply table: " . da_sql_error($link,$config) . "</b><br>\n";
}
else
echo "<b>Could not connect to SQL database</b><br>\n";
?>
/gestion/manager/lib/sql/create_group.php
0,0 → 1,89
<?php
require_once('../lib/functions.php');
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
else{
echo "<b>Could not include SQL library</b><br>\n";
exit();
}
if ($config[sql_use_operators] == 'true'){
include("../lib/operators.php");
$text = ',op';
$passwd_op = ",':='";
}
$da_abort=0;
$op_val2 = '';
$link = @da_sql_pconnect($config);
if ($link){
$Members = preg_split("/[\n\s]+/",$members,-1,PREG_SPLIT_NO_EMPTY);
if (!empty($Members)){
foreach ($Members as $member){
$member = da_sql_escape_string($member);
$res = @da_sql_query($link,$config,
"INSERT INTO $config[sql_usergroup_table] (username,groupname)
VALUES ('$member','$login');");
if (!$res || !@da_sql_affected_rows($link,$res,$config)){
echo "<b>Unable to add user $member in group $login: " . da_sql_error($link,$config) . "</b><br>\n";
$da_abort=1;
}
}
}
else
{
$res = @da_sql_query($link,$config,
"INSERT INTO $config[sql_usergroup_table] (username,groupname)
VALUES ('$login','$login');");
if (!$res || !@da_sql_affected_rows($link,$res,$config))
{
echo "<b>Unable to add user $member in group $login: " . da_sql_error($link,$config) . "</b><br>\n";
$da_abort=1;
}
else
{
echo "<b>Un groupe ne pouvant &ecirc;tre vide, l'usager '$login' a &eacute;t&eacute; cr&eacute;&eacute; (usager virtuel)<br>";
}
}
if (!$da_abort)
{
foreach($show_attrs as $key => $attr){
if ($attrmap["$key"] == 'none')
continue;
if ($attrmap["$key"] == ''){
$attrmap["$key"] = $key;
$attr_type["$key"] = 'replyItem';
$rev_attrmap["$key"] = $key;
}
if ($attr_type["$key"] == 'checkItem'){
$table = "$config[sql_groupcheck_table]";
$type = 1;
}
else if ($attr_type["$key"] == 'replyItem'){
$table = "$config[sql_groupreply_table]";
$type = 2;
}
$val = $$attrmap["$key"];
$val = da_sql_escape_string($val);
$op_name = $attrmap["$key"] . '_op';
$op_val = $$op_name;
if ($op_val != ''){
$op_val = da_sql_escape_string($op_val);
if (check_operator($op_val,$type) == -1){
echo "<b>Invalid operator ($op_val) for attribute $key</b><br>\n";
coninue;
}
$op_val2 = ",'$op_val'";
}
if ($val == '' || check_defaults($val,$op_val,$default_vals["$key"]))
continue;
$res = @da_sql_query($link,$config,
"INSERT INTO $table (attribute,value,groupname $text)
VALUES ('$attrmap[$key]','$val','$login' $op_val2);");
if (!$res || !@da_sql_affected_rows($link,$res,$config))
echo "<b>Query failed for attribute $key: " . da_sql_error($link,$config) . "</b><br>\n";
}
echo "<b>Le groupe $login a &eacute;t&eacute; correctement cr&eacute;&eacute;</b><br>\n";
}
}
else
echo "<b>Could not connect to SQL database</b><br>\n";
?>
/gestion/manager/lib/sql/password_check.php
0,0 → 1,36
<?php
require('password.php');
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
else{
echo "<b>Could not include SQL library</b><br>\n";
exit();
}
 
if ($action == 'checkpass'){
$link = @da_sql_pconnect($config);
if ($link){
$res = @da_sql_query($link,$config,
"SELECT attribute,value FROM $config[sql_check_table] WHERE username = '$login'
AND attribute = '$config[sql_password_attribute]';");
if ($res){
$row = @da_sql_fetch_array($res,$config);
if (is_file("../lib/crypt/$config[general_encryption_method].php")){
include("../lib/crypt/$config[general_encryption_method].php");
$enc_passwd = $row[value];
$passwd = da_encrypt($passwd,$enc_passwd);
if ($passwd == $enc_passwd)
// $msg = '<font color=blue><b>YES It is that</b></font>';
$msg = '<font color=blue><b>Le mot de passe est correct</b></font>';
else
// $msg = '<font color=red><b>NO It is wrong</b></font>';
$msg = '<font color=red><b>Le mot de passe n\'est pas correct</b></font>';
}
else
echo "<b>Could not open encryption library file</b><br>\n";
}
}
echo "<b>$msg</b>\n";
}
?>
</form>
/gestion/manager/lib/sql/delete_user.php
0,0 → 1,37
<?php
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
else{
echo "<b>Could not include SQL library</b><br>\n";
exit();
}
$link = @da_sql_pconnect($config);
if ($link){
$res = @da_sql_query($link,$config,
"DELETE FROM $config[sql_reply_table] WHERE username = '$login';");
if ($res){
$res = @da_sql_query($link,$config,
"DELETE FROM $config[sql_check_table] WHERE username = '$login';");
if ($res){
$res = @da_sql_query($link,$config,
"DELETE FROM $config[sql_usergroup_table] WHERE username = '$login';");
if (!$res)
echo "<b>Error deleting user $login from user group table: " . da_sql_error($link,$config) . "</b><br>\n";
if ($config[sql_use_user_info_table] == 'true'){
$res = @da_sql_query($link,$config,
"DELETE FROM $config[sql_user_info_table] WHERE username = '$login';");
if ($res)
echo "<b>L'usager $login a &eacute;t&eacute; correctement supprim&eacute;</b><br>\n";
else
echo "<b>Error deleting user $login from user info table: " . da_sql_error($link,$config) . "</b><br>\n";
}
}
else
echo "<b>Error deleting user $login from check table: " . da_sql_error($link,$config) . "</b><br>\n";
}
else
echo "<b>Error deleting user $login from reply table: " . da_sql_error($link,$config) . "</b><br>\n";
}
else
echo "<b>Could not connect to SQL database</b><br>\n";
?>
/gestion/manager/lib/sql/find.php
0,0 → 1,57
<?php
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
else{
echo "<b>Could not include SQL library</b><br>\n";
exit();
}
 
unset($found_users);
 
$link = @da_sql_pconnect($config);
if ($link){
$search = da_sql_escape_string($search);
if (!is_numeric($max))
# $max = 10;
# modif by MG fo Alcasar
$max = 40;
if ($max > 500)
$max = 10;
if (($search_IN == 'name' || $search_IN == 'department' || $search_IN == 'username') &&
$config[sql_use_user_info_table] == 'true'){
$res = @da_sql_query($link,$config,
"SELECT " . da_sql_limit($max,0,$config) . " username FROM $config[sql_user_info_table] WHERE
lower($search_IN) LIKE '%$search%' " .
# da_sql_limit($max,1,$config) . " " . da_sql_limit($max,2,$config) . " ;");
# modif by MG for Alcasar
da_sql_limit($max,1,$config) . " " . da_sql_limit($max,1,$config) . " ;");
if ($res){
while(($row = @da_sql_fetch_array($res,$config)))
$found_users[] = $row[username];
}
else
"<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
}
else if ($search_IN == 'radius' && $radius_attr != ''){
require("../lib/sql/attrmap.php");
if ($attrmap["$radius_attr"] == ''){
$attrmap["$radius_attr"] = $radius_attr;
$attr_type["$radius_attr"] = 'replyItem';
}
$table = ($attr_type[$radius_attr] == 'checkItem') ? $config[sql_check_table] : $config[sql_reply_table];
$attr = $attrmap[$radius_attr];
$attr = da_sql_escape_string($attr);
$res = @da_sql_query($link,$config,
"SELECT " . da_sql_limit($max,0,$config) . " username FROM $table WHERE attribute = '$attr'
AND value LIKE '%$search%' " . da_sql_limit($max,1,$config) . " " . da_sql_limit($max,2,$config) . " ;");
if ($res){
while(($row = @da_sql_fetch_array($res,$config)))
$found_users[] = $row[username];
}
else
"<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
}
}
else
echo "<b>Could not connect to SQL database</b><br>\n";
?>
/gestion/manager/lib/sql/create_user.php
0,0 → 1,120
<?php
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
else{
echo "<b>Could not include SQL library</b><br>\n";
exit();
}
include_once('../lib/functions.php');
if ($config[sql_use_operators] == 'true'){
include("../lib/operators.php");
$text = ',op';
$passwd_op = ",':='";
}
$da_abort=0;
$op_val2 = '';
$link = @da_sql_pconnect($config);
if ($link){
if (is_file("../lib/crypt/$config[general_encryption_method].php")){
include("../lib/crypt/$config[general_encryption_method].php");
$passwd = da_encrypt($passwd);
$passwd = da_sql_escape_string($passwd);
$res = @da_sql_query($link,$config,
"INSERT INTO $config[sql_check_table] (attribute,value,username $text)
VALUES ('$config[sql_password_attribute]','$passwd','$login' $passwd_op);");
if (!$res || !@da_sql_affected_rows($link,$res,$config)){
echo "<b>Unable to add user $login: " . da_sql_error($link,$config) . "</b><br>\n";
$da_abort=1;
}
if ($config[sql_use_user_info_table] == 'true' && !$da_abort){
$res = @da_sql_query($link,$config,
"SELECT username FROM $config[sql_user_info_table] WHERE
username = '$login';");
if ($res){
if (!@da_sql_num_rows($res,$config)){
$Fcn = da_sql_escape_string($Fcn);
$Fmail = da_sql_escape_string($Fmail);
$Fou = da_sql_escape_string($Fou);
$Fhomephone = da_sql_escape_string($Fhomephone);
$Fworkphone = da_sql_escape_string($Fworkphone);
$Fmobile = da_sql_escape_string($Fmobile);
$res = @da_sql_query($link,$config,
"INSERT INTO $config[sql_user_info_table]
(username,name,mail,department,homephone,workphone,mobile) VALUES
('$login','$Fcn','$Fmail','$Fou','$Fhomephone','$Ftelephonenumber','$Fmobile');");
if (!$res || !@da_sql_affected_rows($link,$res,$config))
echo "<b>Could not add user information in user info table: " . da_sql_error($link,$config) . "</b><br>\n";
}
else
echo "<b>Cet usager existe d&eacute;j&agrave; dans la table 'info'</b><br>\n";
}
else
echo "<b>Could not add user information in user info table: " . da_sql_error($link,$config) . "</b><br>\n";
}
if ($Fgroup != ''){
$Fgroup = da_sql_escape_string($Fgroup);
$res = @da_sql_query($link,$config,
"SELECT username FROM $config[sql_usergroup_table]
WHERE username = '$login' AND groupname = '$Fgroup';");
if ($res){
if (!@da_sql_num_rows($res,$config)){
$res = @da_sql_query($link,$config,
"INSERT INTO $config[sql_usergroup_table]
(username,groupname) VALUES ('$login','$Fgroup');");
if (!$res || !@da_sql_affected_rows($link,$res,$config))
echo "<b>Could not add user to group $Fgroup. SQL Error</b><br>\n";
}
else
echo "<b>User already is a member of group $Fgroup</b><br>\n";
}
else
echo "<b>Could not add user to group $Fgroup: " . da_sql_error($link,$config) . "</b><br>\n";
}
if (!$da_abort){
if ($Fgroup != '')
require('../lib/defaults.php');
foreach($show_attrs as $key => $attr){
if ($attrmap["$key"] == 'none')
continue;
if ($attrmap["$key"] == ''){
$attrmap["$key"] = $key;
$attr_type["$key"] = 'replyItem';
$rev_attrmap["$key"] = $key;
}
if ($attr_type["$key"] == 'checkItem'){
$table = "$config[sql_check_table]";
$type = 1;
}
else if ($attr_type["$key"] == 'replyItem'){
$table = "$config[sql_reply_table]";
$type = 2;
}
$val = $$attrmap["$key"];
$val = da_sql_escape_string($val);
$op_name = $attrmap["$key"] . '_op';
$op_val = $$op_name;
if ($op_val != ''){
$op_val = da_sql_escape_string($op_val);
if (check_operator($op_val,$type) == -1){
echo "<b>Invalid operator ($op_val) for attribute $key</b><br>\n";
coninue;
}
$op_val2 = ",'$op_val'";
}
if ($val == '' || check_defaults($val,$op_val,$default_vals["$key"]))
continue;
$res = @da_sql_query($link,$config,
"INSERT INTO $table (attribute,value,username $text)
VALUES ('$attrmap[$key]','$val','$login' $op_val2);");
if (!$res || !@da_sql_affected_rows($link,$res,$config))
echo "<b>Query failed for attribute $key: " . da_sql_error($link,$config) . "</b><br>\n";
}
}
echo "<b>Usager correctement cr&eacute;&eacute;</b><br>\n";
}
else
echo "<b>Could not open encryption library file</b><br>\n";
}
else
echo "<b>Could not connect to SQL database</b><br>\n";
?>
/gestion/manager/lib/sql/drivers/mysql/functions.php
0,0 → 1,136
<?php
function da_sql_limit($limit,$point,$config)
{
switch($point){
case 0:
return '';
case 1:
return '';
//modif by MG for Alcasar
case 2:
return "LIMIT $limit";
case 3:
return "LIMIT $limit";
}
}
 
function da_sql_host_connect($server,$config)
{
if ($config[sql_use_http_credentials] == 'yes'){
global $HTTP_SERVER_VARS;
$SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
$SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
}
else{
$SQL_user = $config[sql_username];
$SQL_passwd = $config[sql_password];
}
 
if ($config[sql_connect_timeout] != 0)
@ini_set('mysql.connect_timeout',$config[sql_connect_timeout]);
if ($config[sql_debug] == 'true')
print "<b>DEBUG(SQL,MYSQL DRIVER): Connect: User=$SQL_user,Password=$SQL_passwd </b><br>\n";
return @mysql_connect("$server:$config[sql_port]",$SQL_user,$SQL_passwd);
}
 
function da_sql_connect($config)
{
if ($config[sql_use_http_credentials] == 'yes'){
global $HTTP_SERVER_VARS;
$SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
$SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
}
else{
$SQL_user = $config[sql_username];
$SQL_passwd = $config[sql_password];
}
 
if ($config[sql_connect_timeout] != 0)
@ini_set('mysql.connect_timeout',$config[sql_connect_timeout]);
if ($config[sql_debug] == 'true')
print "<b>DEBUG(SQL,MYSQL DRIVER): Connect: User=$SQL_user,Password=$SQL_passwd </b><br>\n";
return @mysql_connect("$config[sql_server]:$config[sql_port]",$SQL_user,$SQL_passwd);
}
 
function da_sql_pconnect($config)
{
if ($config[sql_use_http_credentials] == 'yes'){
global $HTTP_SERVER_VARS;
$SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
$SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
}
else{
$SQL_user = $config[sql_username];
$SQL_passwd = $config[sql_password];
}
 
if ($config[sql_connect_timeout] != 0)
@ini_set('mysql.connect_timeout',$config[sql_connect_timeout]);
if ($config[sql_debug] == 'true')
print "<b>DEBUG(SQL,MYSQL DRIVER): Connect: User=$SQL_user,Password=$SQL_passwd </b><br>\n";
return @mysql_pconnect("$config[sql_server]:$config[sql_port]",$SQL_user,$SQL_passwd);
}
 
function da_sql_close($link,$config)
{
return @mysql_close($link);
}
 
function da_sql_escape_string($string)
{
return @mysql_escape_string($string);
}
 
function da_sql_query($link,$config,$query)
{
if ($config[sql_debug] == 'true')
print "<b>DEBUG(SQL,MYSQL DRIVER): Query: <i>$query</i></b><br>\n";
return @mysql_db_query($config[sql_database],$query,$link);
}
 
function da_sql_num_rows($result,$config)
{
if ($config[sql_debug] == 'true')
print "<b>DEBUG(SQL,MYSQL DRIVER): Query Result: Num rows:: " . @mysql_num_rows($result) . "</b><br>\n";
return @mysql_num_rows($result);
}
 
function da_sql_fetch_array($result,$config)
{
$row = array_change_key_case(@mysql_fetch_array($result,
MYSQL_ASSOC),CASE_LOWER);
if ($config[sql_debug] == 'true'){
print "<b>DEBUG(SQL,MYSQL DRIVER): Query Result: <pre>";
print_r($row);
print "</b></pre>\n";
}
return $row;
}
 
function da_sql_affected_rows($link,$result,$config)
{
if ($config[sql_debug] == 'true')
print "<b>DEBUG(SQL,MYSQL DRIVER): Query Result: Affected rows:: " . @mysql_affected_rows($result) . "</b><br>\n";
return @mysql_affected_rows($link);
}
 
function da_sql_list_fields($table,$link,$config)
{
return @mysql_list_fields($config[sql_database],$table);
}
 
function da_sql_num_fields($fields,$config)
{
return @mysql_num_fields($fields);
}
 
function da_sql_field_name($fields,$num,$config)
{
return @mysql_field_name($fields,$num);
}
 
function da_sql_error($link,$config)
{
return @mysql_error($link);
}
?>
/gestion/manager/lib/crypt/crypt.php
0,0 → 1,14
<?php
function da_encrypt()
{
$numargs=func_num_args();
$passwd=func_get_arg(0);
# calcul d'un salt pour forcer le chiffrement en MD5 au lieu de blowfish par defaut dans php versin mdva > 2007.1
$salt='$1$passwd$';
if ($numargs == 2){
$salt=func_get_arg(1);
return crypt($passwd,$salt);
}
return crypt($passwd,$salt);
}
?>
/gestion/manager/lib/functions.php
0,0 → 1,135
<?php
function time2str($time)
{
$time = floor($time);
if (!$time)
return "0 seconds";
$d = $time/86400;
$d = floor($d);
if ($d){
$str .= "$d days, ";
$time = $time % 86400;
}
$h = $time/3600;
$h = floor($h);
if ($h){
$str .= "$h hours, ";
$time = $time % 3600;
}
$m = $time/60;
$m = floor($m);
if ($m){
$str .= "$m minutes, ";
$time = $time % 60;
}
if ($time)
$str .= "$time seconds, ";
$str = ereg_replace(', $','',$str);
 
return $str;
}
 
function time2strclock($time)
{
$time = floor($time);
if (!$time)
return "00:00:00";
 
$str["days"] = $str["hour"] = $str["min"] = $str["sec"] = "00";
 
$d = $time/86400;
$d = floor($d);
if ($d){
if ($d < 10)
$d = "0" . $d;
$str["days"] = "$d";
$time = $time % 86400;
}
$h = $time/3600;
$h = floor($h);
if ($h){
if ($h < 10)
$h = "0" . $h;
$str["hour"] = "$h";
$time = $time % 3600;
}
$m = $time/60;
$m = floor($m);
if ($m){
if ($m < 10)
$m = "0" . $m;
$str["min"] = "$m";
$time = $time % 60;
}
if ($time){
if ($time < 10)
$time = "0" . $time;
}
else
$time = "00";
$str["sec"] = "$time";
if ($str["days"] != "00")
$ret = "$str[days]:$str[hour]:$str[min]:$str[sec]";
else
$ret = "$str[hour]:$str[min]:$str[sec]";
 
return $ret;
}
 
function date2timediv($date,$now)
{
list($day,$time)=explode(' ',$date);
$day = explode('-',$day);
$time = explode(':',$time);
$timest = mktime($time[0],$time[1],$time[2],$day[1],$day[2],$day[0]);
if (!$now)
$now = time();
return ($now - $timest);
}
 
function date2time($date)
{
list($day,$time)=explode(' ',$date);
$day = explode('-',$day);
$time = explode(':',$time);
$timest = mktime($time[0] ?"":0,$time[1],$time[2],$day[1],$day[2],$day[0]);
return $timest;
}
 
function bytes2str($bytes)
{
$bytes=floor($bytes);
if ($bytes > 536870912)
$str = sprintf("%5.2f GBs", $bytes/1073741824);
else if ($bytes > 524288)
$str = sprintf("%5.2f MBs", $bytes/1048576);
else
$str = sprintf("%5.2f KBs", $bytes/1024);
 
return $str;
}
 
function nothing($ret)
{
return $ret;
}
function check_defaults($val,$op,$def)
{
for($i=0;$i<$def[count];$i++){
if ($val == $def[$i] && ($op == '' || $op == $def[operator][$i]))
return 1;
}
 
return 0;
}
 
function check_ip($ipaddr) {
if(ereg("^([0-9]{1,3})\x2E([0-9]{1,3})\x2E([0-9]{1,3})\x2E([0-9]{1,3})$", $ipaddr,$digit)) {
if(($digit[1] <= 255) && ($digit[2] <= 255) && ($digit[3] <= 255) && ($digit[4] <= 255)) {
return(1);
}
}
return(0);
}
 
?>
/gestion/compteur.txt
0,0 → 1,0
7
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/gestion
Property changes:
Added: Author
+Franck BOUIJOUX
\ No newline at end of property
Added: Date
/gpl-3.0.txt
0,0 → 1,674
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
 
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
 
Preamble
 
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
 
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
 
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
 
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
 
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
 
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
 
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
 
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
 
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
 
The precise terms and conditions for copying, distribution and
modification follow.
 
TERMS AND CONDITIONS
 
0. Definitions.
 
"This License" refers to version 3 of the GNU General Public License.
 
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
 
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
 
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
 
A "covered work" means either the unmodified Program or a work based
on the Program.
 
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
 
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
 
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
 
1. Source Code.
 
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
 
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
 
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
 
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
 
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
 
The Corresponding Source for a work in source code form is that
same work.
 
2. Basic Permissions.
 
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
 
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
 
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
 
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
 
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
 
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
 
4. Conveying Verbatim Copies.
 
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
 
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
 
5. Conveying Modified Source Versions.
 
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
 
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
 
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
 
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
 
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
 
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
 
6. Conveying Non-Source Forms.
 
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
 
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
 
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
 
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
 
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
 
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
 
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
 
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
 
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
 
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
 
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
 
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
 
7. Additional Terms.
 
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
 
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
 
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
 
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
 
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
 
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
 
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
 
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
 
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
 
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
 
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
 
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
 
8. Termination.
 
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
 
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
 
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
 
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
 
9. Acceptance Not Required for Having Copies.
 
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
 
10. Automatic Licensing of Downstream Recipients.
 
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
 
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
 
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
 
11. Patents.
 
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
 
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
 
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
 
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
 
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
 
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
 
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
 
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
 
12. No Surrender of Others' Freedom.
 
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
 
13. Use with the GNU Affero General Public License.
 
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
 
14. Revised Versions of this License.
 
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
 
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
 
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
 
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
 
15. Disclaimer of Warranty.
 
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
 
16. Limitation of Liability.
 
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
 
17. Interpretation of Sections 15 and 16.
 
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
 
END OF TERMS AND CONDITIONS
 
How to Apply These Terms to Your New Programs
 
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
 
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
 
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
 
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 3 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
 
Also add information on how to contact you by electronic and paper mail.
 
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
 
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
 
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
 
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
 
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property