commit 5343dc68e6cc14da1a87585c43975ad516580bed Author: Pierre Gilles Mialon Date: Wed Apr 26 12:28:53 2006 +0000 AlternC Plugin are now part of AlternC svn repository\n Migration Phase 2 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..c859cf23 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,441 @@ +* text=auto !eol +/BUILD -text +/HACKING -text +/README -text +/TODO -text +aide/bin/build.sh -text +aide/bin/frames.dsl -text +aide/brouteur.sgml -text +aide/domain.sgml -text +aide/ftp.sgml -text +aide/index.sgml -text +aide/sommaire.sgml -text +aide/stats.sgml -text +aide/test.sgml -text +bureau/admin/adm_add.php -text +bureau/admin/adm_defquotas.php -text +bureau/admin/adm_del.php -text +bureau/admin/adm_doadd.php -text +bureau/admin/adm_dodefquotas.php -text +bureau/admin/adm_dodel.php -text +bureau/admin/adm_doedit.php -text +bureau/admin/adm_domlock.php -text +bureau/admin/adm_doms.php -text +bureau/admin/adm_donosu.php -text +bureau/admin/adm_dosu.php -text +bureau/admin/adm_edit.php -text +bureau/admin/adm_list.php -text +bureau/admin/adm_list2.php -text +bureau/admin/adm_login.php -text +bureau/admin/adm_panel.php -text +bureau/admin/adm_quotadoedit.php -text +bureau/admin/adm_quotaedit.php -text +bureau/admin/adm_slaveaccount.php -text +bureau/admin/adm_slaveip.php -text +bureau/admin/adm_tld.php -text +bureau/admin/adm_tldadd.php -text +bureau/admin/adm_tlddoadd.php -text +bureau/admin/adm_tlddoedit.php -text +bureau/admin/adm_tldedit.php -text +bureau/admin/adm_variables.php -text +bureau/admin/aide/files/browser_set.png -text +bureau/admin/aide/files/ftp_add.png -text +bureau/admin/aide/files/ftp_list.png -text +bureau/admin/aide/files/readme -text +bureau/admin/aide/files/sta_add.png -text +bureau/admin/aide/files/sta_view1.png -text +bureau/admin/aide/files/sta_view2.png -text +bureau/admin/aide/help.php -text +bureau/admin/aide/help.png -text +bureau/admin/aide/html/book1.html -text +bureau/admin/aide/html/c126.html -text +bureau/admin/aide/html/c18.html -text +bureau/admin/aide/html/c26.html -text +bureau/admin/aide/html/c72.html -text +bureau/admin/aide/html/c84.html -text +bureau/admin/aide/html/docbook.css -text +bureau/admin/aide/html/files/browser_set.png -text +bureau/admin/aide/html/files/ftp_add.png -text +bureau/admin/aide/html/files/ftp_list.png -text +bureau/admin/aide/html/files/readme -text +bureau/admin/aide/html/files/sta_add.png -text +bureau/admin/aide/html/files/sta_view1.png -text +bureau/admin/aide/html/files/sta_view2.png -text +bureau/admin/aide/html/frameset.html -text +bureau/admin/aide/html/plus.gif -text +bureau/admin/aide/html/tiret.gif -text +bureau/admin/aide/html/toc.htm -text +bureau/admin/aide/html/x105.html -text +bureau/admin/aide/html/x23.html -text +bureau/admin/aide/html/x53.html -text +bureau/admin/aide/inline/docbook.css -text +bureau/admin/aide/inline/frameset.html -text +bureau/admin/aide/inline/plus.gif -text +bureau/admin/aide/inline/tiret.gif -text +bureau/admin/alternc.png -text +bureau/admin/bro_editor.php -text +bureau/admin/bro_main.php -text +bureau/admin/bro_pref.php -text +bureau/admin/bro_tgzdown.php -text +bureau/admin/bro_view.php -text +bureau/admin/browseforfolder.php -text +bureau/admin/direct.php -text +bureau/admin/dom_add.php -text +bureau/admin/dom_doadd.php -text +bureau/admin/dom_dodel.php -text +bureau/admin/dom_edit.php -text +bureau/admin/dom_editdns.php -text +bureau/admin/dom_subdel.php -text +bureau/admin/dom_subdodel.php -text +bureau/admin/dom_subdoedit.php -text +bureau/admin/dom_subedit.php -text +bureau/admin/domlist.php -text +bureau/admin/ftp_add.php -text +bureau/admin/ftp_del.php -text +bureau/admin/ftp_doadd.php -text +bureau/admin/ftp_doedit.php -text +bureau/admin/ftp_edit.php -text +bureau/admin/ftp_list.php -text +bureau/admin/head.php -text +bureau/admin/hta_add.php -text +bureau/admin/hta_adduser.php -text +bureau/admin/hta_del.php -text +bureau/admin/hta_doadd.php -text +bureau/admin/hta_doadduser.php -text +bureau/admin/hta_dodeluser.php -text +bureau/admin/hta_doedituser.php -text +bureau/admin/hta_edit.php -text +bureau/admin/hta_edituser.php -text +bureau/admin/hta_list.php -text +bureau/admin/icon/browse.png -text +bureau/admin/icon/delfile.png -text +bureau/admin/icon/doc.png -text +bureau/admin/icon/encrypted.png -text +bureau/admin/icon/exe.png -text +bureau/admin/icon/file.png -text +bureau/admin/icon/folder.png -text +bureau/admin/icon/htm.png -text +bureau/admin/icon/jpg.png -text +bureau/admin/icon/m3u.png -text +bureau/admin/icon/move.png -text +bureau/admin/icon/newfile.png -text +bureau/admin/icon/newfolder.png -text +bureau/admin/icon/newhtml.png -text +bureau/admin/icon/openfold.png -text +bureau/admin/icon/pdf.png -text +bureau/admin/icon/php.png -text +bureau/admin/icon/ppt.png -text +bureau/admin/icon/properties.png -text +bureau/admin/icon/protect.png -text +bureau/admin/icon/ra.png -text +bureau/admin/icon/selall.png -text +bureau/admin/icon/sort0.png -text +bureau/admin/icon/sort1.png -text +bureau/admin/icon/swf.png -text +bureau/admin/icon/sxc.png -text +bureau/admin/icon/sxd.png -text +bureau/admin/icon/sxi.png -text +bureau/admin/icon/sxw.png -text +bureau/admin/icon/txt.png -text +bureau/admin/icon/wav.png -text +bureau/admin/icon/winresize.gif -text +bureau/admin/icon/xls.png -text +bureau/admin/icon/zip.png -text +bureau/admin/index.php -text +bureau/admin/js/alternc.js -text +bureau/admin/js/wz_dragdrop.js -text +bureau/admin/login.php -text +bureau/admin/lst_addown.php -text +bureau/admin/lst_addsub.php -text +bureau/admin/lst_addsub1.php -text +bureau/admin/lst_affallsub.php -text +bureau/admin/lst_affsub.php -text +bureau/admin/lst_delown.php -text +bureau/admin/lst_delsub.php -text +bureau/admin/lst_doedit.php -text +bureau/admin/lst_doeditsub.php -text +bureau/admin/lst_doedittxt.php -text +bureau/admin/lst_downsub.php -text +bureau/admin/lst_owner.php -text +bureau/admin/lst_subscribers.php -text +bureau/admin/mail_add.php -text +bureau/admin/mail_doadd.php -text +bureau/admin/mail_dodel.php -text +bureau/admin/mail_doedit.php -text +bureau/admin/mail_edit.php -text +bureau/admin/mail_list.php -text +bureau/admin/main.php -text +bureau/admin/mem_admin.php -text +bureau/admin/mem_chgmail.php -text +bureau/admin/mem_cm.php -text +bureau/admin/mem_cm2.php -text +bureau/admin/mem_logout.php -text +bureau/admin/mem_param.php -text +bureau/admin/mem_passwd.php -text +bureau/admin/menu.php -text +bureau/admin/menu_adm.php -text +bureau/admin/menu_aide.php -text +bureau/admin/menu_brouteur.php -text +bureau/admin/menu_dom.php -text +bureau/admin/menu_ftp.php -text +bureau/admin/menu_mail.php -text +bureau/admin/menu_mem.php -text +bureau/admin/menu_quota.php -text +bureau/admin/menu_sql.php -text +bureau/admin/menu_sta2.php -text +bureau/admin/menu_web.php -text +bureau/admin/phpinfo.php -text +bureau/admin/quota_show.php -text +bureau/admin/quota_show_all.php -text +bureau/admin/sql_add.php -text +bureau/admin/sql_addmain.php -text +bureau/admin/sql_admin.php -text +bureau/admin/sql_bck.php -text +bureau/admin/sql_del.php -text +bureau/admin/sql_doadd.php -text +bureau/admin/sql_dobck.php -text +bureau/admin/sql_dorestore.php -text +bureau/admin/sql_getparam.php -text +bureau/admin/sql_list.php -text +bureau/admin/sql_pass.php -text +bureau/admin/sql_passchg.php -text +bureau/admin/sql_restore.php -text +bureau/admin/sta2_add_raw.php -text +bureau/admin/sta2_del_raw.php -text +bureau/admin/sta2_doadd_raw.php -text +bureau/admin/sta2_doedit_raw.php -text +bureau/admin/sta2_edit_raw.php -text +bureau/admin/sta2_list.php -text +bureau/admin/styles/style.css -text +bureau/admin/template.php -text +bureau/admin/web_list.php -text +bureau/admin/webmail/.htaccess -text +bureau/admin/webmail/index.php -text +bureau/class/config.php -text +bureau/class/config_nochk.php -text +bureau/class/config_real.php -text +bureau/class/db_mysql.php -text +bureau/class/export_account.php -text +bureau/class/functions.php -text +bureau/class/lang_env.php -text +bureau/class/local.php -text +bureau/class/m_admin.php -text +bureau/class/m_bro.php -text +bureau/class/m_dom.php -text +bureau/class/m_err.php -text +bureau/class/m_ftp.php -text +bureau/class/m_hta.php -text +bureau/class/m_mail.php -text +bureau/class/m_mem.php -text +bureau/class/m_mysql.php -text +bureau/class/m_quota.php -text +bureau/class/m_sta2.php -text +bureau/class/mime.php -text +bureau/class/reset_stats_conf.php -text +bureau/class/variables.php -text +bureau/de_DE.png -text +bureau/en_UK.png -text +bureau/en_US.png -text +bureau/es_ES.png -text +bureau/es_VE.png -text +bureau/fr_CA.png -text +bureau/fr_FR.png -text +bureau/fr_ca.png -text +bureau/head.php -text +bureau/index.php -text +bureau/locales/README -text +bureau/locales/admin.po -text +bureau/locales/admin_manual.po -text +bureau/locales/bro.po -text +bureau/locales/bromime.po -text +bureau/locales/de_DE/LC_MESSAGES/alternc.po -text +bureau/locales/dom.po -text +bureau/locales/dom_manual.po -text +bureau/locales/en_US/LC_MESSAGES/admin.po -text +bureau/locales/en_US/LC_MESSAGES/bro.po -text +bureau/locales/en_US/LC_MESSAGES/dom.po -text +bureau/locales/en_US/LC_MESSAGES/err.po -text +bureau/locales/en_US/LC_MESSAGES/ftp.po -text +bureau/locales/en_US/LC_MESSAGES/head.txt -text +bureau/locales/en_US/LC_MESSAGES/hta.po -text +bureau/locales/en_US/LC_MESSAGES/mail.po -text +bureau/locales/en_US/LC_MESSAGES/main.po -text +bureau/locales/en_US/LC_MESSAGES/mem.po -text +bureau/locales/en_US/LC_MESSAGES/mysql.po -text +bureau/locales/en_US/LC_MESSAGES/sta2.po -text +bureau/locales/es_ES/LC_MESSAGES/admin.po -text +bureau/locales/es_ES/LC_MESSAGES/bro.po -text +bureau/locales/es_ES/LC_MESSAGES/dom.po -text +bureau/locales/es_ES/LC_MESSAGES/err.po -text +bureau/locales/es_ES/LC_MESSAGES/ftp.po -text +bureau/locales/es_ES/LC_MESSAGES/head.txt -text +bureau/locales/es_ES/LC_MESSAGES/hta.po -text +bureau/locales/es_ES/LC_MESSAGES/mail.po -text +bureau/locales/es_ES/LC_MESSAGES/main.po -text +bureau/locales/es_ES/LC_MESSAGES/mem.po -text +bureau/locales/es_ES/LC_MESSAGES/mysql.po -text +bureau/locales/es_ES/LC_MESSAGES/sta2.po -text +bureau/locales/es_VE/LC_MESSAGES/alternc.po -text +bureau/locales/es_VE/LC_MESSAGES/alternc_message.po -text +bureau/locales/fr_FR/LC_MESSAGES/admin.po -text +bureau/locales/fr_FR/LC_MESSAGES/admin_manual.po -text +bureau/locales/fr_FR/LC_MESSAGES/alternc -text +bureau/locales/fr_FR/LC_MESSAGES/bro.po -text +bureau/locales/fr_FR/LC_MESSAGES/bro_manual.po -text +bureau/locales/fr_FR/LC_MESSAGES/bromime.po -text +bureau/locales/fr_FR/LC_MESSAGES/dom.po -text +bureau/locales/fr_FR/LC_MESSAGES/dom_manual.po -text +bureau/locales/fr_FR/LC_MESSAGES/ftp.po -text +bureau/locales/fr_FR/LC_MESSAGES/ftp_manual.po -text +bureau/locales/fr_FR/LC_MESSAGES/head.txt -text +bureau/locales/fr_FR/LC_MESSAGES/hta.po -text +bureau/locales/fr_FR/LC_MESSAGES/hta_manual.po -text +bureau/locales/fr_FR/LC_MESSAGES/mail.po -text +bureau/locales/fr_FR/LC_MESSAGES/mail_manual.po -text +bureau/locales/fr_FR/LC_MESSAGES/main.po -text +bureau/locales/fr_FR/LC_MESSAGES/main_manual.po -text +bureau/locales/fr_FR/LC_MESSAGES/sql.po -text +bureau/locales/fr_FR/LC_MESSAGES/sql_manual.po -text +bureau/locales/fr_FR/LC_MESSAGES/sta2.po -text +bureau/locales/fr_FR/LC_MESSAGES/sta2_manual.po -text +bureau/locales/ftp.po -text +bureau/locales/ftp_manual.po -text +bureau/locales/hta.po -text +bureau/locales/hta_manual.po -text +bureau/locales/mail.po -text +bureau/locales/mail_manual.po -text +bureau/locales/main.po -text +bureau/locales/main_manual.po -text +bureau/locales/sql.po -text +bureau/locales/sql_manual.po -text +bureau/locales/sta2.po -text +bureau/locales/sta2_manual.po -text +bureau/locales/updatelang.sh -text +bureau/phpinfo.php -text +bureau/style.css -text +debian/.cvsignore -text +debian/README.Debian -text +debian/alternc.cron.d -text +debian/alternc.links -text +debian/alternc.logrotate -text +debian/changelog -text +debian/compat -text +debian/config -text +debian/control -text +debian/copyright -text +debian/dirs -text +debian/docs -text +debian/lintian-override -text +debian/postinst -text +debian/postrm -text +debian/preinst -text +debian/prerm -text +debian/rules -text +debian/templates -text +etc/alternc/menulist.txt -text +etc/alternc/phpmyadmin.inc.php -text +etc/alternc/templates/apache-ssl/httpd.conf -text +etc/alternc/templates/apache/httpd.conf -text +etc/alternc/templates/bind/automatic.conf -text +etc/alternc/templates/bind/named.conf -text +etc/alternc/templates/bind/slaveip.conf -text +etc/alternc/templates/bind/templates/mx.template -text +etc/alternc/templates/bind/templates/named.template -text +etc/alternc/templates/bind/templates/slave.template -text +etc/alternc/templates/bind/templates/zone.template -text +etc/alternc/templates/courier/authdaemonrc -text +etc/alternc/templates/courier/authmysqlrc -text +etc/alternc/templates/default/saslauthd -text +etc/alternc/templates/php4/apache/php.ini -text +etc/alternc/templates/php4/cgi/php.ini -text +etc/alternc/templates/postfix/ca.der -text +etc/alternc/templates/postfix/main.cf -text +etc/alternc/templates/postfix/myalias.cf -text +etc/alternc/templates/postfix/mydomain.cf -text +etc/alternc/templates/postfix/mygid.cf -text +etc/alternc/templates/postfix/myvirtual.cf -text +etc/alternc/templates/postfix/sasl/smtpd.conf -text +etc/alternc/templates/proftpd.conf -text +etc/alternc/templates/squirrelmail/apache.conf -text +etc/alternc/templates/welcome.msg -text +flags/de_DE.png -text +flags/en_UK.png -text +flags/en_US.png -text +flags/es_ES.png -text +flags/es_VE.png -text +flags/fr_CA.png -text +flags/fr_FR.png -text +install/alternc.install -text +install/body_checks -text +install/domaines.template -text +install/dopo.sh -text +install/header_checks -text +install/initrep.sh -text +install/local.php -text +install/mysql.sh -text +install/mysql.sql -text +install/newone.php -text +install/reset_root.php -text +install/upgrade_check.sh -text +install/upgrades/0.9.1.sh -text +install/upgrades/0.9.1.sql -text +install/upgrades/0.9.1_migrationldap.php -text +install/upgrades/0.9.2.php -text +install/upgrades/0.9.2.sql -text +install/upgrades/0.9.3.1.sql -text +install/upgrades/0.9.3.sql -text +install/upgrades/0.9.4.sql -text +install/upgrades/README -text +man/alternc-admintools.8 -text +man/alternc-admintools.fr.8 -text +man/alternc.install.8 -text +man/get_account_by_domain.8 -text +man/get_domains_by_account.8 -text +man/top_ftp_users.8 -text +man/top_ftp_users.fr.8 -text +man/top_http_users.8 -text +man/top_http_users.fr.8 -text +man/top_mysql_users.8 -text +man/top_mysql_users.fr.8 -text +modules/admin -text +modules/bro -text +modules/dom -text +modules/ftp -text +modules/hta -text +modules/mail -text +modules/main -text +modules/sql -text +modules/sta2 -text +po/alternc-admintools.fr.po -text +po/fr/LC_MESSAGES/alternc-admintools.mo -text +po/make_po -text +/quota_delete -text +/quota_init -text +/searchmissing.pot.sh -text +src/.cvsignore -text +src/Makefile -text +src/basedir_prot.sh -text +src/db_create.c -text +src/do_domaines.sh -text +src/du.pl -text +src/mail_add.c -text +src/mail_del.c -text +src/mem_add.c -text +src/mem_del.c -text +src/quota_delete -text +src/quota_edit.c -text +src/quota_edit.sh -text +src/quota_get.c -text +src/quota_get.sh -text +src/quota_init -text +src/rawstat.daily -text +src/sendmail -text +src/slave_dns -text +src/sqlbackup.sh -text +src/update_domains.sh -text +tools/get_account_by_domain -text +tools/get_domains_by_account -text +tools/top_ftp_users -text +tools/top_http_users -text +tools/top_mysql_users -text +/updatepot.sh -text diff --git a/BUILD b/BUILD new file mode 100644 index 00000000..3b8d2b87 --- /dev/null +++ b/BUILD @@ -0,0 +1,23 @@ +Build instructions +================== + +1- get the source + +# cvs co alternc + +2- get the dependencies + +You probably need at least dpkg-dev, dehelper and optionally fakeroot, to +build the package as non-root. + +3- build the package + +Should be as simple as calling dpkg-buildpackage now. The package will +be in ../alternc__.deb + +You can verify the validity of the package using: + +lintian -i ../*.deb + +Warning: this will print out a lot of messages, since the package is +really not clean right now. diff --git a/HACKING b/HACKING new file mode 100644 index 00000000..381c9ebf --- /dev/null +++ b/HACKING @@ -0,0 +1,117 @@ +Modularisation d'AlternC +======================== + +- Chaque classe a un nom en lettres (pas trop long). +- Chaque classe fournit : + * Un fichier m_.php contenant la déclaration de la classe php + * Une classe qui s'appelle "m_" + * La variable globale instanciant la classe est $, elle est créée automatiquement par config_real.php + * Un fichier .pot dans locales/.po (et eventuellement _manual.po pour les entrees non détectées par gettext + * Les messages d'erreur sont du type "err__" ou est un entier positif. 0 pour "OK" + * Une classe PEUT présenter un fichier "menu_.php" dans admin/ + +- Une classe peut présenter les fonctions particulières suivantes : + * alternc_add_domain($domain) qui est appellée quand un domaine est créé sur le compte membre courant + * alternc_del_domain($domain) qui est appellée quand un domaine est supprimé sur le compte membre courant + * alternc_add_member($uid) quand un membre est créé + * alternc_del_member($uid) quand un membre est détruit + * alternc_quota_check($uid) pour recalculer le quota utilisé par un membre + * alternc_quota_names() qui retourne une chaine ou un tableau avec le(s) noms des quota(s) gérés par cette classe. + si elle ne les contient pas, ces fonctions ne seront pas appellées... + + +AlternC est fourni en standard avec les classes : +- domain (installation domaines / dns / mx) +- ftp (maintenance des comptes ftp) +- mail (maintenance des emails pop/alias) +- quota (gestion globale des quotas de service et de disques) +- bro (navigateur dans le système de fichier) +- admin (panneau administrateur) +- mem (connexion et préférences membre) +- mysql (maintenance de bdd mysql) +- err (gestion des erreurs) +- sta2 (demande de sortie de logs bruts apache) +- hta (protection de dossiers web par htaccess/htpasswd) + +Les modules additionnels dispo : +- alternc-webinstaller (cette classe particulière permet l'intégration facile d'outils (dmanager, spip, forum, chat ...) ) +- alternc-mailman (gestion de listes sous mailman) +- alternc-sympa (gestion de listes sous sympa) +- alternc-webalizer (gestion de stats webalizer) +- procmail_builder (plugin spécial pour squirrelmail) + +Donc, pour s'installer, une classe a besoin de : +- Créer les éventuelles structures de données nécessaires (mysql) +- Copier le fichier m_ dans bureau/class/ +- Copier l'eventuel fichier menu_.php +- Copier les éventuels autres fichiers dans bureau/admin, bureau/locales/* ... + +Quotas +------ + +Le système de quota est simple : la classe peut appeler + $quota->inc dec ... +pour le membre donné, sur le nom de quota utilisé par celle-ci, +(utiliser est conseillé ;) + +Quand un nouveau membre est créé, la valeur par défaut choisi par +l'admin lui est associé, et cette valeur vaut 0 par défaut. + +Autres +------ + +Il est conseillé que chaque classe non standard fournisse un dossier +dans /bureau/admin/ dans lequel elle stocke les pages web +correspondantes, ceci afin de ne pas alourdir le dossier bureau/admin... + +Ajout à l'API : +- La variable globale "$classes" contient un tableau avec le nom des + classes disponibles (nom court sans m_ =>mail, quota, err...) + +Hooks ou "events" AlternC +========================= + +Liste des fonctions "events" appellées lorsqu'un évènement particulier a lieu +sur un compte, tel que l'ajout d'un domaine, la suppression d'un domaine etc. + +- Ces fonctions commencent TOUJOURS par "alternc_" +- SEULES ces fonctions ont le droit d'utiliser le prefixe alternc_ dans les +classes +- Les fonctions ne peuvent apparaitre que dans les classes d'AlternC, ayant +pour nom m_ +- Chaque fonction est prototypée ci-dessous et son évènement est expliqué en +détail + + + +alternc_del_domain($dom) + fonction appellée lorsqu'un domaine est effacé d'un compte AlternC. + $dom est le nom de domaine concerné. + +alternc_add_domain($dom) + fonction appellée lorsqu'un domaine est installé sur un compte AlternC. + $dom est le nom de domaine concerné. + +alternc_quota_check($id) + fonction appellée afin de recalculer le quota d'un membre pour le service correspondant. + $id est le numéro unique du membre concerné. + +alternc_add_member($id) + fonction appellée lorsqu'un compte membre est créé sur le serveur AlternC. + $id est le numéro unique du membre concerné, qui a déjà été créé dans les tables principales. + +alternc_del_member($id) + fonction appellée lorsqu'un compte membre est supprimé sur le serveur AlternC. + $id est le numéro unique du membre concerné, qui sera détruit après l'appel. + +alternc_add_mx_domain($dom) + fonction appellée lorsqu'un domaine déjà hébergé mais n'ayant pas le mx pointant vers nous voit son mx + pointer vers nous. Pour les classes sensible au mail, cela équivaut bien souvent à add_domain + +alternc_del_mx_domain($dom) + fonction appellée lorsqu'un domaine déjà hébergé et ayant son mx pointant vers nous voit son mx + nous quitter. Pour les classes sensible au mail, cela équivaut bien souvent à del_domain + +alternc_description() + retourne la chaine ou la liste de chaine de description du module, traduit par gettext. + permet de savoir à quoi sert un module ou les éléments d'un module. diff --git a/README b/README new file mode 100644 index 00000000..38749b14 --- /dev/null +++ b/README @@ -0,0 +1,42 @@ +AlternC: Architecture pour serveurs d'hébergement +================================================= + +Introduction +------------ + +AlternC est un ensemble de logiciels d'hébergement facile à utiliser, +facile à installer, basé uniquement sur des logiciels OpenSource, +AlternC étant sous licence GPL. + +Ce logiciel contient un système d'installation et de configuration +automatique, ainsi qu'un panneau de contrôle accessible par le web, pour +la gestion des utilisateurs et des services web (domaines, mails, +comptes ftp, statistiques ...) + +Techniquement, AlternC se base sur la distribution Debian GNU/Linux +'Woody', et utilise d'autres logiciels tels Apache, Postfix, Mailman ... +Il contient aussi une documentation d'API, permettant une +personnalisation facile et rapide du bureau, le 'panneau de contrôle +web' d'AlternC. + +La langue natale de ce projet est le Français. Cependant, le paquet +debian contient le bureau en Français ET en Anglais. Une version +Espagnole et Allemande est en cours de préparation. Les traductions dans +d'autres langues auront lieu si vous nous y aidez. La documentation +n'est actuellement disponible qu'en Français, mais une traduction +multilingue devrait arriver un jour ... + +AlternC est développé par les administrateurs système de l'Autre Net, +les membres de l'Autre Net, ainsi que d'autres structures / développeurs +parmis lesquels Globenet. + +Installation +------------ + +Pour l'instant, AlternC doit être installé en package Debian. Ceci prend +soin d'installer AlternC lui-même est toutes ses dépendances. Pour +télécharger les packages Debian d'alternc, veuillez insérer les linges +suivantes dans votre fichier /etc/apt/sources.list + + deb http://debian.alternc.org debian/ + deb-src http://debian.alternc.org debian/ diff --git a/TODO b/TODO new file mode 100644 index 00000000..25b6e802 --- /dev/null +++ b/TODO @@ -0,0 +1,2 @@ +See http://dev.alternc.org/trac/alternc/roadmap to get up to date information +about what's left to do for AlternC. diff --git a/aide/bin/build.sh b/aide/bin/build.sh new file mode 100755 index 00000000..5e9730e4 --- /dev/null +++ b/aide/bin/build.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# $Id: build.sh,v 1.1.1.1 2003/03/26 17:41:29 root Exp $ + +cd /data/bureau/admin/aide/ +# BUILD HTML +rm -rf html +mkdir html +docbook2html --dsl /data/bureau/admin/aide/bin/frames.dsl -o html index.sgml +rsync files/ html/files/ -a +rsync inline/ html/ -a +cd .. + +# Construction du fichier langue : +# fr_FR : +cd /data/bureau/admin/locale/fr_FR/LC_MESSAGES +msgfmt -o alternc.mo alternc.po +cd /data/bureau/admin/locale/en_US/LC_MESSAGES +msgfmt -o alternc.mo alternc.po + diff --git a/aide/bin/frames.dsl b/aide/bin/frames.dsl new file mode 100644 index 00000000..34de737f --- /dev/null +++ b/aide/bin/frames.dsl @@ -0,0 +1,144 @@ + +]> + + + + + +(define %stylesheet-version% + "DocBook HTML Frames Stylesheet version 2.0") + + +(define %stylesheet% "docbook.css"); + + + +(root + (make sequence + (process-children) + (with-mode manifest + (process-children)) + (make-dhtml-toc))) + + + +(define (make-dhtml-toc) + (make entity + system-id: "toc.htm" + (make element gi: "HTML" + (make element gi: "HEAD" + (make element gi: "TITLE" (literal "DocBook TOC")) + ($standard-html-header$)) + (make element gi: "BODY" + (with-mode dhtmltoc + (process-children)) + ))) + ) + + + + + + + +(define (dhtml-toc-entry nd gilist) + (let* + + ( + (subdivnodes (node-list-filter-by-gi (children nd) gilist)) + (subdivs (and (> (node-list-length subdivnodes) 0) (not (node-list=? nd (sgml-root-element))) ) ) + + ) + + + (if (node-list=? nd (sgml-root-element)) + ; SEQUENCE 1 : ROOT element + (make sequence + (make element gi: "NOBR" + (make element gi: "A" + attributes: (list (list "HREF" (href-to (current-node))) + (list "TARGET" "right") + ) + (element-title-sosofo (current-node)) + ) + (make empty-element gi: "BR") + (make element gi: "UL" + attributes: (list (list "CLASS" "TOC")) + (process-children)) + ) + ) + ; SEQUENCE 2 : Children elements + (make sequence + (make empty-element gi: "LI") + (make element gi: "NOBR" + (make element gi: "A" + attributes: (list (list "HREF" (href-to (current-node))) + (list "TARGET" "right") + ) + (element-title-sosofo (current-node)) + )) + ; DIV ENFANT : + (make element gi: "UL" + attributes: (list (list "CLASS" "TOC2")) + (process-children)) + + ) ; sequence + ) ; if node-list ... + + )) + + + + + + + + + + +(mode dhtmltoc + (default (empty-sosofo)) + + (element set (dhtml-toc-entry (current-node) + (list (normalize "book")))) + + (element book (dhtml-toc-entry (current-node) + (list (normalize "part") + (normalize "preface") + (normalize "chapter") + (normalize "appendix") + (normalize "reference")))) + + (element preface (dhtml-toc-entry (current-node) + (list (normalize "sect1")))) + + (element part (dhtml-toc-entry (current-node) + (list (normalize "preface") + (normalize "chapter") + (normalize "appendix") + (normalize "reference")))) + + (element chapter (dhtml-toc-entry (current-node) + (list (normalize "sect1")))) + + (element appendix (dhtml-toc-entry (current-node) + (list (normalize "sect1")))) + + (element sect1 (dhtml-toc-entry (current-node) '())) + + (element reference (dhtml-toc-entry (current-node) + (list (normalize "refentry")))) + + (element refentry (dhtml-toc-entry (current-node) '())) + + ) + + + + + + + + + diff --git a/aide/brouteur.sgml b/aide/brouteur.sgml new file mode 100644 index 00000000..ecccc5e7 --- /dev/null +++ b/aide/brouteur.sgml @@ -0,0 +1,65 @@ +Le gestionnaire de fichiers + +Introduction / Description + + +Sur AlternC, vous disposez d'un espace disque personnel sur lequel vous pouvez installer vos +domaines, sous-domaines, comptes ftp, statistiques web etc. Cet espace est en fait un dossier +sur le serveur, dans lequel vous pouvez stocker des fichiers, mais aussi des sous-dossiers, +afin d'organiser au mieux votre espace disponible. + + +Afin de pouvoir modifier facilement vos fichiers, vous pouvez utiliser le FTP, en créant un +compte sur votre bureau virtuel. Plus d'info sur le FTP dans la section FTP de l'Aide.. +Vous pouvez aussi utiliser le gestionnaire de fichier pour gérer vos fichiers directement depuis le +bureau virtuel. Pour cela, dans le menu principal, cliquez sur "Gestionnaire de fichiers" + + + +Le gestionnaire de fichier permet de gérer l'ensemble de vos fichiers, à savoir : + + Créer Supprimer et Renommer des fichiers + Créer Supprimer et Renommer des dossiers / Sous-dossiers + Editer les fichiers présents dans le compte (fichiers textes, html ...) + Visualiser les fichiers du compte (html, images, document ...) + Télécharger l'ensemble de votre compte dans un fichier compressé (plusieurs formats supportés) + Accéder aux autres fonctions du bureau, tels la création de comptes FTP ou la protection de + dossier par nom d'utilisateur et mot de passe. + + + + + + +Paramètres du gestionnaire de fichiers + + +Vous pouvez régler les préférences du gestionnaire de fichier en cliquant sur "Régler mes préférences" +en bas du gestionnaire. + +Les éléments ci-dessous peuvent être réglés : + +Type d'affichage du gestionnaire (1 colonne de fichiers, 2 colonnes, 3 colonnes) +L'affichage ou pas des icones des fichiers +L'affichage ou pas des types des fichiers (image jpeg, page html, ...) +Le format de compression utilisé pour téléchargé tout le site au format compressé. (zip, tgz, tar.z, tar.bz2 supportés) +La largeur et la hauteur de la fenêtre de l'éditeur de fichiers. +Si vous préférer aller à l'éditeur de fichiers ou au gestionnaire après la création d'un nouveau fichier. + + + + + + + + + + + + + + + + + + diff --git a/aide/domain.sgml b/aide/domain.sgml new file mode 100644 index 00000000..39d0eb93 --- /dev/null +++ b/aide/domain.sgml @@ -0,0 +1,69 @@ +Les Noms de Domaines + +Introduction / Installation d'un nouveau domaine + + +AlternC propose de l'hébergement de noms de domaine personnels sur votre compte. +Un nom de domaine est toujours de la forme quelquechose.tld. Exemple : virtuel.org, masociete.com etc. + + +Un nom de domaine, pour être hébergé chez un hébergeur de site, doit être proprement installé. Pour cela, il faut procéder par étape : + + Acheter le nom de domaine voulu chez un registrar. + Exemple de registrar + On peut acheter par exemple un domaine en .fr auprès d'un partenaire de l'AFNIC, + ou un .com .org .net auprès de Gandi + + + Lors de l'achat du nom de domaine, préciser le nom des serveurs DNS d'AlternC au registrar. + Exemple de DNS + Chaque hébergeur dispose d'au moins 2 serveurs DNS. Votre hébergeur vous donnera les noms et adresse Internet des siens. + Exemple : ns1.alternc.net (80.67.172.5) et ns2.alternc.net (80.67.172.9) + + Installer le domaine sur AlternC. + Une fois acheté et ses DNS corrects, le domaine peut être installé sur + AlternC. Pour cela, cliquez sur le lien "Ajouter un domaine" dans le bureau virtuel. + + + + + + + +Configuration d'un domaine / sous-domaine + + +Lorsque vous avez installé un domaine sur AlternC, vous pouvez choisir dans quel dossier +de votre espace disque vous souhaitez connecter ce domaine, ou tout sous-domaine associé. +Pour cela, Cliquez sur le domaine dans le menu de gauche. Cela affiche l'ensemble des +sous-domaines installé. Vous pouvez ensuite modifier l'emplacement de ces sous-domaines, +ou en créer de nouveaux. + + + +Par défaut, les sous-domaines suivants sont installés : (exemple pour virtuel.org) + + virtuel.org Ce sous-domaine est en fait le domaine + lui-même. Vous pouvez choisir comment vous voulez rediriger le domaine lui-même. + Le plus simple est de le rediriger vers l'URL http://www.virtuel.org ou vers + le même dossier que www.virtuel.org + www.virtuel.org Ce sosu-domaine correspond à l'adresse + qu'utiliseront la plupart des internautes, l'adresse www de votre site web. Vous pouvez donc + l'héberger sur un dossier local. Par défaut, c'est la racine (nommé /) de votre espace + disque qui recoit ce domaine. + mail.virtuel.org Ce sous-domaine particulier recoit le webmail + de votre domaine. Vous pouvez donc accéder à votre mail par l'adresse http://mail.virtuel.org + Si vous souhaitez connecter le webmail sur un autre nom, détruisez ce sous-domaine et recréez-en un + en lui affectant le type "webmail". + + admin.virtuel.org Ce sous-domaine particulier recoit l'interface + du bureau virtuel. Ainsi, vous pouvez administrer votre domaine directement depuis le domaine lui-même. + Si vous souhaitez connecter le bureau d'administration sur un autre nom, détruisez ce sous-domaine et recréez-en un + en lui affectant le type "bureau virtuel". + + + + + + + diff --git a/aide/ftp.sgml b/aide/ftp.sgml new file mode 100644 index 00000000..33d67887 --- /dev/null +++ b/aide/ftp.sgml @@ -0,0 +1,37 @@ +Comptes FTP + + Introduction + + +Le FTP est un moyen pratique de pouvoir échanger des fichiers entre un serveur et une +machine connectée à Internet. Pour cela, il faut disposer d'un compte FTP sur le serveur, +constitué d'un nom d'utilisateur et d'un mot de passe. + + + +Sur AlternC, vous pouvez créer des comptes FTP, en précisant le nom d'utilisateur, le mot de passe, +et le dossier dans lequel sera connecté ce compte FTP. Ainsi, chaque compte pourra accéder à son dossier +et ses sous-dossiers, en lecture et en écriture. + + + +Par exemple, si vous disposez des dossiers suivants dans votre compte : + +Vous pouvez créer, par exemple, un compte ftp pour philippe, que vous hébergez sur +http://virtuel.org/philippe/ +Pour cela, il suffit de cliquer sur "Comptes FTP" puis "Créer un compte FTP" et enfin, +entrez les paramètres de connexion, à savoir, un nom d'utilisateur, un mot de passe, et un répertoire. + + + +Philippe peut donc modifier les fichiers de son dossier en utilisant les paramètres suivants : + +Serveur ftp : "virtuel.org" +Nom d'utilisateur : "virtuel.org_philippe" +Mot de passe : "philpas" + + + + + + diff --git a/aide/index.sgml b/aide/index.sgml new file mode 100644 index 00000000..ee821a15 --- /dev/null +++ b/aide/index.sgml @@ -0,0 +1,42 @@ + + + + + + + +]> + + +AlternC, Documentation Utilisateur + + + + AlternC Development Team +
tech@alternc.org
+
+
+ +2002-06-11 +0.1 + + +Bienvenue dans l'aide en ligne d'AlternC. + + + +AlternC +Hébergement + +
+ +&chap1; + +&hlpdomain; +&hlpftp; +&hlpbrouteur; +&hlpstats; + +
diff --git a/aide/sommaire.sgml b/aide/sommaire.sgml new file mode 100644 index 00000000..ab446e5a --- /dev/null +++ b/aide/sommaire.sgml @@ -0,0 +1,24 @@ +Introduction + + Introduction à AlternC + +AlternC est un logiciel de gestion d'hébergeur de sites Internet, d'emails, de +noms de domaines et de tout service web disponible pour le public. Ce +logiciel utilise des programmes comme apache pour serveur web ou postfix +pour le courrier électronique. Il fournit une suite logicielle écrite en php4 +qui permet de gérer intégralement un serveur depuis une interface web, +et permet d'allouer à chaque utilisateur un certain nombre de ressources +sur le serveur. + + + +Fonctionnement de l'aide en ligne + +Cette aide en ligne est accessible par le lien "aide en ligne" du bureau virtuel. +vous pouvez aussi cliquer sur les "?" situés dans le bureau virtuel pour avoir +une aide contextuelle sur la page en cours. + + + + + diff --git a/aide/stats.sgml b/aide/stats.sgml new file mode 100644 index 00000000..5a8bc3f9 --- /dev/null +++ b/aide/stats.sgml @@ -0,0 +1,37 @@ +Les statistiques Web. + +Introduction / Mode d'emploi + + +Sur AlternC, vous pouvez héberger des domaines / sous-domaines, sur lesquels vous hébergez un ou +plusieurs sites web. Maintenant que votre site est en marche, vous souhaitez savoir qui va voir votre +site, d'où ils viennent, quelles pages sont les plus vues etc. Pour cela, vous pouvez utiliser l'outil +de génération de statistiques web. + + +Ce menu vous permet de demander la génération quotidienne de pages html dans un dossier de votre espace disque. +Pour créer un jeu de statistiques associé à votre site web, cliquez sur "Statistiques web" puis sur +"Créer un jeu de statistiques". + +Ensuite, choisissez dans la liste le nom de domaine dont vous souhaitez obtenir des statistiques, +Choisissez la langue dans laquelle vous souhaitez que ces statistiques soit générées. +Enfin, Entrez le nom du dossier dans lequel vous voulez voir apparaitre les pages HTML de statistiques. + + +Notez qu'il faut attendre le lendemain pour voir apparaitre comme par magie les premiers +fichiers de statistique dans le dossier désigné. En effet, ceux-ci sont générés tous les matins. + + +Dès le lendemain, vous pourrez aller sur la page web du dossier contenant vos statistiques pour y retrouver +les pages générées: + +Une page index, contenant un résumé des visites par mois, ainsi qu'un graphique le représentant, +ainsi qu'une page par mois, détaillant les visites, les mots-clés utilisés sur les moteurs de recherche, +les liens vers le site etc. + + + + + + + diff --git a/aide/test.sgml b/aide/test.sgml new file mode 100644 index 00000000..46ee8c3d --- /dev/null +++ b/aide/test.sgml @@ -0,0 +1,16 @@ +Coucou + + le Coucou premier + +Juste histoire de tester les manipulations à effectuer pour créer un fichier d'aide + + + +le coucou en second + +A voir donc + + + + + diff --git a/bureau/admin/adm_add.php b/bureau/admin/adm_add.php new file mode 100644 index 00000000..9e836ab5 --- /dev/null +++ b/bureau/admin/adm_add.php @@ -0,0 +1,112 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} + +if (!isset($canpass)) $canpass=1; + +include("head.php"); + +?> + + +

+$error

"; +} +?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
 / 
+
" />
+
+ + + diff --git a/bureau/admin/adm_defquotas.php b/bureau/admin/adm_defquotas.php new file mode 100644 index 00000000..3bec03eb --- /dev/null +++ b/bureau/admin/adm_defquotas.php @@ -0,0 +1,104 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} + +include("head.php"); +?> + + +

+$error

"; + } + +?> +

+ + +" /> +

+ +

+ + +" /> +

+ +

+ +

+ +
+ +getdefaults(); +reset($qlist); +foreach($qlist as $type => $q) { +?> +

+ + + $value) { + $key = $type . ":" . $name; + $col=3-$col; +?> + + + + + +
+ +" /> +
+ + + diff --git a/bureau/admin/adm_del.php b/bureau/admin/adm_del.php new file mode 100644 index 00000000..47ac1c8e --- /dev/null +++ b/bureau/admin/adm_del.php @@ -0,0 +1,30 @@ + diff --git a/bureau/admin/adm_doadd.php b/bureau/admin/adm_doadd.php new file mode 100644 index 00000000..13dad2fe --- /dev/null +++ b/bureau/admin/adm_doadd.php @@ -0,0 +1,80 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit; +} + +if ($pass != $passconf) { + $error = _("Passwords do not match"); + include("adm_add.php"); + exit(); +} +if (!($u=$admin->add_mem($login, $pass, $nom, $prenom, $nmail, $canpass, $type))) { + $error=$err->errstr(); + include ("adm_add.php"); + exit; +} else { + + // Add here all what you want when an account is created ! + $mem->su($u); + + /* + * 0 = pas d'hébergement dns, en effet, pas besoin vu que les + * domaines *.koumbit.net sont bien sur le serveur + * + * 1 = noerase = empêche à l'utilisateur de modifier le dns ou de + * supprimer le domaine + * + * 1 = force = ne tient pas compte du whois ou des droits de tld + */ + if ($create_dom) { + if (variable_get("hosting_tld")) { + # make sure we don't have multiple dots there + $dom->lock(); + $dom->add_domain($login.".".preg_replace("/^\.\.*/", "", variable_get("hosting_tld")),0,1,1); + $dom->unlock(); + } else { + $err->log("no 'hosting_tld' variable defined in `variables` table, not creating domain"); + } + } + $ftp->add_ftp($login,"",$pass,"/"); + $mem->unsu(); + + $error=_("The new member has been successfully created"); + + include("adm_list.php"); + exit; +} +?> diff --git a/bureau/admin/adm_dodefquotas.php b/bureau/admin/adm_dodefquotas.php new file mode 100644 index 00000000..79969c85 --- /dev/null +++ b/bureau/admin/adm_dodefquotas.php @@ -0,0 +1,64 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} + +if($_POST["action"] == "add") { + $type = $_POST['type']; + + $quota->addtype($type); + $error=_("Account type"). " \"$type\" "._("added"); +} else if($_POST["action"] == "delete") { + $quota->deltype($_POST['type']); + $error=_("Account type"). " \"$type\" "._("deleted"); +} else if($_POST["action"] == "modify") { + reset($_POST); + $c=array(); + foreach($_POST as $key => $val) { + if($key == "action") + continue; + + list($type, $q) = explode(":", $key, 2); + $c[$type][$q] = $val; + } + + $quota->setdefaults($c); + + $error=_("Default quotas successfully changed"); +} +include("adm_panel.php"); +exit; +?> \ No newline at end of file diff --git a/bureau/admin/adm_dodel.php b/bureau/admin/adm_dodel.php new file mode 100644 index 00000000..de8112d2 --- /dev/null +++ b/bureau/admin/adm_dodel.php @@ -0,0 +1,57 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} + + +if (!is_array($d)) { + $d[]=$d; +} + +reset($d); +while (list($key,$val)=each($d)) { + if (!$admin->checkcreator($val)) { + __("This page is restricted to authorized staff"); + exit(); + } + if (!($u=$admin->get($val)) || !$admin->del_mem($val)) { + $error.=sprintf(_("Member '%s' does not exist"),$val)."
"; + } else { + $error.=sprintf(_("Member %s successfully deleted"),$u["login"])."
"; + } +} +include("adm_list.php"); +exit(); + +?> diff --git a/bureau/admin/adm_doedit.php b/bureau/admin/adm_doedit.php new file mode 100644 index 00000000..6cd83b4a --- /dev/null +++ b/bureau/admin/adm_doedit.php @@ -0,0 +1,56 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} +if (!$admin->checkcreator($uid)) { + __("This page is restricted to authorized staff"); + exit(); +} + +if ($pass != $passconf) { + $error = _("Passwords do not match"); + include("adm_edit.php"); + exit(); +} + +if (!$admin->update_mem($uid, $nmail, $nom, $prenom, $pass, $enabled, $canpass, $type)){ + $error=$err->errstr(); + include("adm_edit.php"); +} else { + $error=_("The member has been successfully edited"); + include("adm_list.php"); +} +?> diff --git a/bureau/admin/adm_domlock.php b/bureau/admin/adm_domlock.php new file mode 100644 index 00000000..b26b542c --- /dev/null +++ b/bureau/admin/adm_domlock.php @@ -0,0 +1,43 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} + +if (!$admin->dom_lock($domain)) { + $error=$err->errstr(); +} +include("adm_doms.php"); +exit; + +?> \ No newline at end of file diff --git a/bureau/admin/adm_doms.php b/bureau/admin/adm_doms.php new file mode 100644 index 00000000..af8cb6a2 --- /dev/null +++ b/bureau/admin/adm_doms.php @@ -0,0 +1,79 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} + +include("head.php"); +?> + + +

+$error

"; + } + +$c=$admin->dom_list(); + +?> +

+ +

+ +
+ + + + + + + + + + + +
Lock
"; + } ?>
+
+ + + diff --git a/bureau/admin/adm_donosu.php b/bureau/admin/adm_donosu.php new file mode 100644 index 00000000..bd8e719c --- /dev/null +++ b/bureau/admin/adm_donosu.php @@ -0,0 +1,45 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} + +if (!$admin->su2normal($uid)) { + $error=$err->errstr(); +} + +include("adm_edit.php"); + +exit(); + +?> \ No newline at end of file diff --git a/bureau/admin/adm_dosu.php b/bureau/admin/adm_dosu.php new file mode 100644 index 00000000..984a96d9 --- /dev/null +++ b/bureau/admin/adm_dosu.php @@ -0,0 +1,45 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} + +if (!$admin->normal2su($uid)) { + $error=$err->errstr(); +} + +include("adm_edit.php"); + +exit(); + +?> \ No newline at end of file diff --git a/bureau/admin/adm_edit.php b/bureau/admin/adm_edit.php new file mode 100644 index 00000000..af9c5f74 --- /dev/null +++ b/bureau/admin/adm_edit.php @@ -0,0 +1,152 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} +if (!$admin->checkcreator($uid)) { + __("This page is restricted to authorized staff"); + exit(); +} + +if (!$r=$admin->get($uid)) { + $error=$err->errstr(); +} + +include("head.php"); +?> + + +

+$error

"; + } +?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
" size="20" maxlength="128" /> / " size="20" maxlength="128" />
" size="30" maxlength="128" />
" /> +
+
+ +

+user[uid]==2000) { // PATCHBEN only admin can change su/nosu :) +if ($r["su"]) { +?> +
+onesu()) { + __("There is only one administrator account, you cannot turn this account back to normal"); +} else { +?> +"> + +"> + +

+ + +

get($r["creator"]); +printf(_("Account created by %s"),$c["login"]); +?> +

+

+ + diff --git a/bureau/admin/adm_list.php b/bureau/admin/adm_list.php new file mode 100644 index 00000000..7be234e4 --- /dev/null +++ b/bureau/admin/adm_list.php @@ -0,0 +1,211 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} + +if (!$r=$admin->get_list()) { + $error=$err->errstr(); +} +include("head.php"); +?> + + +

+$error

"; + } +?> +

+ +  + +Liste de tous les comptes +

+

+ +

+"._("No account defined for now")."

"; +} else { +?> + +
+user["admlist"]==0) { // Normal (large) mode +?> + + + + + + + + + + + + + + + + + + + +user["admlist"]==1) { // Short mode TODO : make 3 columns instead of 2 + XHTML compliance instead of 1px img trick ;) +?> + + +
 ("._("Email address").")"; ?>
 " />">">"; + else { + ?> + " target="_parent"> + + >"> 
+ + + + + + + + + + + + + + + + + + + + + + +"; + +$val=$r[$z+2*$rz]; +if (is_array($val)) { +?> + + + + + + + + +"; +} // for loop +} // Short Mode + + +?> + +
   
 "> + "> + "> + "; + else { + ?> + " target="_parent"> + + "> "> + "> + "> + "; + else { + ?> + " target="_parent"> + + ">
 "> + "> + "> + "; + else { + ?> + " target="_parent"> + + ">
" />
+
+ + + + + diff --git a/bureau/admin/adm_list2.php b/bureau/admin/adm_list2.php new file mode 100644 index 00000000..1baee4ad --- /dev/null +++ b/bureau/admin/adm_list2.php @@ -0,0 +1,209 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} + +if (!$r=$admin->get_list(1)) { + $error=$err->errstr(); +} +include("head.php"); +?> + + +

+$error

"; + } +?> +

+ +  +

+

+ +

+"._("No account defined for now")."

"; +} else { +?> + +
+user["admlist"]==0) { // Normal (large) mode +?> + + + + + + + + + + + + + + + + + + + +user["admlist"]==1) { // Short mode TODO : make 3 columns instead of 2 + XHTML compliance instead of 1px img trick ;) +?> + + +
 ("._("Email address").")"; ?>
 " />">">"; + else { + ?> + " target="_parent"> + + >"> 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +"; +} // for loop +} // Short Mode + + +?> + +
   
 "> + "> + "> + "; + else { + ?> + " target="_parent"> + + "> "> + "> + "> + "; + else { + ?> + " target="_parent"> + + "> "> + "> + "> + "; + else { + ?> + " target="_parent"> + + ">
" />
+
+ + + + + diff --git a/bureau/admin/adm_login.php b/bureau/admin/adm_login.php new file mode 100644 index 00000000..2869ad09 --- /dev/null +++ b/bureau/admin/adm_login.php @@ -0,0 +1,91 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} +/* +if (!$admin->checkcreator($id)) { + __("This page is restricted to authorized staff"); + exit(); +} +*/ + +if (!$r=$admin->get($id)) { + $error=$err->errstr(); +} else { + +if (!$mem->setid($id)) { + $error=$err->errstr(); + include("index.php"); + exit(); +} + +?> + + + +<?php __("AlternC Desktop"); ?> + + + + + + + +<body> +<p> + Votre navigateur doit supporter les cadres.<br /> + Your browser must support frames +</p> +</body> + + + + + + +

+$error

"; + exit(); + } +?> + + + + diff --git a/bureau/admin/adm_panel.php b/bureau/admin/adm_panel.php new file mode 100644 index 00000000..7d1e1237 --- /dev/null +++ b/bureau/admin/adm_panel.php @@ -0,0 +1,81 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} + +include("head.php"); +?> + + +

+$error

"; + exit(); + } +?> +
+ + + + + + + + +"; + include($c); + echo "\n"; + $lst=3-$lst; + } + } +} + +closedir($d); +?> + +
+
+ + + + diff --git a/bureau/admin/adm_quotadoedit.php b/bureau/admin/adm_quotadoedit.php new file mode 100644 index 00000000..93060271 --- /dev/null +++ b/bureau/admin/adm_quotadoedit.php @@ -0,0 +1,55 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} + +if ($submit) { + + $mem->su($uid); + $qlist=$quota->qlist(); + reset($qlist); + + while (list($key,$val)=each($qlist)) { + $var="q_".$key; + $quota->setquota($key,$$var); + } + $mem->unsu(); + $error=_("The quotas has been successfully edited"); + include("adm_list.php"); + exit; + +} + + +?> diff --git a/bureau/admin/adm_quotaedit.php b/bureau/admin/adm_quotaedit.php new file mode 100644 index 00000000..cff8e0fd --- /dev/null +++ b/bureau/admin/adm_quotaedit.php @@ -0,0 +1,81 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} + +if (!$us=$admin->get($uid)) { + $error=$err->errstr(); +} + +$mem->su($uid); +if (!$r=$quota->getquota()) { + $error=$err->errstr(); +} +$mem->unsu(); +include("head.php"); +?> + + +

+$error

"; + exit(); + } +?> +
+ + + +qlist(); +reset($ql); +while (list($key,$val)=each($ql)) { + echo ""; + echo ""; + if ($r[$key]["t"]==$r[$key]["u"] && $r[$key]["u"]) echo ""; + echo ""; + echo ""; + echo ""; +} +?> + +
+ 
"; + if ($r[$key]["t"]==$r[$key]["u"] && $r[$key]["u"]) echo ""; + echo _("quota_".$key)." 
" /> +
+
+ + diff --git a/bureau/admin/adm_slaveaccount.php b/bureau/admin/adm_slaveaccount.php new file mode 100644 index 00000000..5564f2fc --- /dev/null +++ b/bureau/admin/adm_slaveaccount.php @@ -0,0 +1,102 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} + +if ($delaccount) { + // Delete an account + if ($dom->del_slave_account($delaccount)) { + $error=_("The requested account has been deleted. It is now denied."); + } +} +if ($newlogin) { + // Add an account + if ($dom->add_slave_account($newlogin,$newpass)) { + $error=_("The requested account address has been created. It is now allowed."); + unset($newlogin); unset($newpass); + } +} + +include("head.php"); +?> + + +

+$error

"; + } + +$c=$dom->enum_slave_account(); + +if (is_array($c)) { + +?> +

+ +

+ + + + + + + + + + + +
">
+ +

+
+ + + + + + +
/
+ " class="inb" /> +
+ +
+ + diff --git a/bureau/admin/adm_slaveip.php b/bureau/admin/adm_slaveip.php new file mode 100644 index 00000000..1714c92b --- /dev/null +++ b/bureau/admin/adm_slaveip.php @@ -0,0 +1,103 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} + +if ($delip) { + // Delete an ip address/class + if ($dom->del_slave_ip($delip)) { + $error=_("The requested ip address has been deleted. It will be denied in one hour."); + } +} +if ($newip) { + // Add an ip address/class + if ($dom->add_slave_ip($newip,$newclass)) { + $error=_("The requested ip address has been added to the list. It will be allowed in one hour."); + unset($newip); unset($newclass); + } +} + +if (!$newclass) $newclass=32; + +include("head.php"); +?> + + +

+$error

"; + } + +$c=$dom->enum_slave_ip(); + +if (is_array($c)) { + +?> +

+ +

+ + + + + + + + + + +
+ +

+
+ + + + + + +
/
+ " class="inb" /> +
+ +
+ + diff --git a/bureau/admin/adm_tld.php b/bureau/admin/adm_tld.php new file mode 100644 index 00000000..f743c046 --- /dev/null +++ b/bureau/admin/adm_tld.php @@ -0,0 +1,87 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} + +if (is_array($sel)) { + $error=""; + for($i=0;$ideltld($sel[$i])) { + $error.=_("Some TLD cannot be deleted...")." : ".$sel[$i]."
"; + } + } + if (!$error) $error=_("The requested TLD has been deleted"); +} + + +include("head.php"); +?> + + +

+$error

"; + } + +$c=$admin->listtld(); + +?> +

+ +

+ +
+ + + + + + + + + + + +
" /> ">tldmode[$c[$i]["mode"]]); ?>
" />
+
+ + + diff --git a/bureau/admin/adm_tldadd.php b/bureau/admin/adm_tldadd.php new file mode 100644 index 00000000..ae6ea2a9 --- /dev/null +++ b/bureau/admin/adm_tldadd.php @@ -0,0 +1,67 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} + +include("head.php"); +?> + + +

+$error

"; + } + + +?> +

+

+
+ +

+ +
+ + + + + +
" />
+
+ + + diff --git a/bureau/admin/adm_tlddoadd.php b/bureau/admin/adm_tlddoadd.php new file mode 100644 index 00000000..6c788e9d --- /dev/null +++ b/bureau/admin/adm_tlddoadd.php @@ -0,0 +1,46 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} + +if (!$admin->addtld($tld,$mode)) { + $error=$err->errstr(); + include("adm_tldadd.php"); + exit(); +} else { + $error=_("The TLD has been successfully added"); + include("adm_tld.php"); + exit(); +} +?> \ No newline at end of file diff --git a/bureau/admin/adm_tlddoedit.php b/bureau/admin/adm_tlddoedit.php new file mode 100644 index 00000000..40d504a6 --- /dev/null +++ b/bureau/admin/adm_tlddoedit.php @@ -0,0 +1,46 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} + +if (!$admin->edittld($tld,$mode)) { + $error=$err->errstr(); + include("adm_tldedit.php"); + exit(); +} else { + $error=_("The TLD has been successfully edited"); + include("adm_tld.php"); + exit(); +} +?> \ No newline at end of file diff --git a/bureau/admin/adm_tldedit.php b/bureau/admin/adm_tldedit.php new file mode 100644 index 00000000..42f00a9a --- /dev/null +++ b/bureau/admin/adm_tldedit.php @@ -0,0 +1,67 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} + +$mode=$admin->gettld($tld); +if ($mode===false) { + $error=$err->errstr(); + include("adm_tld.php"); + exit(); +} + +include("head.php"); +?> + + +

+$error

"; + } +?> +

+ +
+ + + + +
" />
+
+ + + diff --git a/bureau/admin/adm_variables.php b/bureau/admin/adm_variables.php new file mode 100644 index 00000000..4b38e260 --- /dev/null +++ b/bureau/admin/adm_variables.php @@ -0,0 +1,76 @@ +enabled) { + __("This page is restricted to authorized staff"); + exit(); +} + +$conf = variable_init(); +foreach ($conf as $name => $val) { + if (isset($$name)) { + variable_set($name, $$name); + } +} + +include("head.php"); +?> + + +

+ +

+ +

+ +
+ + +query("SELECT * FROM `variable` WHERE `comment` IS NOT NULL ORDER BY `name`"); + +while ($db->next_record()) { + $vars = $db->Record; + $col=3-$col; + ?> + + + + + + + +
+" /> +
+ + diff --git a/bureau/admin/aide/files/browser_set.png b/bureau/admin/aide/files/browser_set.png new file mode 100644 index 00000000..cd274b37 Binary files /dev/null and b/bureau/admin/aide/files/browser_set.png differ diff --git a/bureau/admin/aide/files/ftp_add.png b/bureau/admin/aide/files/ftp_add.png new file mode 100644 index 00000000..83c8d129 Binary files /dev/null and b/bureau/admin/aide/files/ftp_add.png differ diff --git a/bureau/admin/aide/files/ftp_list.png b/bureau/admin/aide/files/ftp_list.png new file mode 100644 index 00000000..40aa60be Binary files /dev/null and b/bureau/admin/aide/files/ftp_list.png differ diff --git a/bureau/admin/aide/files/readme b/bureau/admin/aide/files/readme new file mode 100644 index 00000000..b2217222 --- /dev/null +++ b/bureau/admin/aide/files/readme @@ -0,0 +1 @@ +Contient les fichiers utilisés par les pages sgml diff --git a/bureau/admin/aide/files/sta_add.png b/bureau/admin/aide/files/sta_add.png new file mode 100644 index 00000000..02871ed7 Binary files /dev/null and b/bureau/admin/aide/files/sta_add.png differ diff --git a/bureau/admin/aide/files/sta_view1.png b/bureau/admin/aide/files/sta_view1.png new file mode 100644 index 00000000..d3f19246 Binary files /dev/null and b/bureau/admin/aide/files/sta_view1.png differ diff --git a/bureau/admin/aide/files/sta_view2.png b/bureau/admin/aide/files/sta_view2.png new file mode 100644 index 00000000..70e3772e Binary files /dev/null and b/bureau/admin/aide/files/sta_view2.png differ diff --git a/bureau/admin/aide/help.php b/bureau/admin/aide/help.php new file mode 100644 index 00000000..5a0892ab --- /dev/null +++ b/bureau/admin/aide/help.php @@ -0,0 +1,60 @@ +"c26.html", + 0=>"book1.html" + ); + +if (!$hlist[$hid]) { + $hid=0; +} + +?> + + +Aide en ligne <?php echo $host ?> + + + + + + + + + Votre navigateur doit supporter les cadres.<br /> + Your browser must support frames + + +ames + + + diff --git a/bureau/admin/aide/help.png b/bureau/admin/aide/help.png new file mode 100644 index 00000000..4ea3df0d Binary files /dev/null and b/bureau/admin/aide/help.png differ diff --git a/bureau/admin/aide/html/book1.html b/bureau/admin/aide/html/book1.html new file mode 100644 index 00000000..af795b59 --- /dev/null +++ b/bureau/admin/aide/html/book1.html @@ -0,0 +1,228 @@ +AlternC, Documentation Utilisateur

  Suivant
  Introduction
\ No newline at end of file diff --git a/bureau/admin/aide/html/c126.html b/bureau/admin/aide/html/c126.html new file mode 100644 index 00000000..afaddca9 --- /dev/null +++ b/bureau/admin/aide/html/c126.html @@ -0,0 +1,186 @@ +Les statistiques Web.
AlternC, Documentation Utilisateur
Précédent 

Chapitre 5. Les statistiques Web.

Introduction / Mode d'emploi

Sur AlternC, vous pouvez héberger des domaines / sous-domaines, sur lesquels vous hébergez un ou +plusieurs sites web. Maintenant que votre site est en marche, vous souhaitez savoir qui va voir votre +site, d'où ils viennent, quelles pages sont les plus vues etc. Pour cela, vous pouvez utiliser l'outil +de génération de statistiques web.

Ce menu vous permet de demander la génération quotidienne de pages html dans un dossier de votre espace disque. +Pour créer un jeu de statistiques associé à votre site web, cliquez sur "Statistiques web" puis sur +"Créer un jeu de statistiques". +

+Ensuite, choisissez dans la liste le nom de domaine dont vous souhaitez obtenir des statistiques, +Choisissez la langue dans laquelle vous souhaitez que ces statistiques soit générées. +Enfin, Entrez le nom du dossier dans lequel vous voulez voir apparaitre les pages HTML de statistiques.

Attention
Notez qu'il faut attendre le lendemain pour voir apparaitre comme par magie les premiers +fichiers de statistique dans le dossier désigné. En effet, ceux-ci sont générés tous les matins.

Dès le lendemain, vous pourrez aller sur la page web du dossier contenant vos statistiques pour y retrouver +les pages générées: +

+Une page index, contenant un résumé des visites par mois, ainsi qu'un graphique le représentant, +ainsi qu'une page par mois, détaillant les visites, les mots-clés utilisés sur les moteurs de recherche, +les liens vers le site etc. +


PrécédentSommaire 
Paramètres du gestionnaire de fichiers  
\ No newline at end of file diff --git a/bureau/admin/aide/html/c18.html b/bureau/admin/aide/html/c18.html new file mode 100644 index 00000000..483dfef1 --- /dev/null +++ b/bureau/admin/aide/html/c18.html @@ -0,0 +1,171 @@ +Introduction
AlternC, Documentation Utilisateur
PrécédentSuivant


PrécédentSommaireSuivant
AlternC, Documentation Utilisateur Fonctionnement de l'aide en ligne
\ No newline at end of file diff --git a/bureau/admin/aide/html/c26.html b/bureau/admin/aide/html/c26.html new file mode 100644 index 00000000..0dc4274d --- /dev/null +++ b/bureau/admin/aide/html/c26.html @@ -0,0 +1,234 @@ +Les Noms de Domaines
AlternC, Documentation Utilisateur
PrécédentSuivant

Chapitre 2. Les Noms de Domaines

Introduction / Installation d'un nouveau domaine

AlternC propose de l'hébergement de noms de domaine personnels sur votre compte. +Un nom de domaine est toujours de la forme quelquechose.tld. Exemple : virtuel.org, masociete.com etc.

Un nom de domaine, pour être hébergé chez un hébergeur de site, doit être proprement installé. Pour cela, il faut procéder par étape : +

  1. Acheter le nom de domaine voulu chez un registrar.

  2. Lors de l'achat du nom de domaine, préciser le nom des serveurs DNS d'AlternC au registrar.

  3. Installer le domaine sur AlternC.

    Une fois acheté et ses DNS corrects, le domaine peut être installé sur + AlternC. Pour cela, cliquez sur le lien "Ajouter un domaine" dans le bureau virtuel. +


PrécédentSommaireSuivant
Fonctionnement de l'aide en ligne Configuration d'un domaine / sous-domaine
\ No newline at end of file diff --git a/bureau/admin/aide/html/c72.html b/bureau/admin/aide/html/c72.html new file mode 100644 index 00000000..57a790c7 --- /dev/null +++ b/bureau/admin/aide/html/c72.html @@ -0,0 +1,177 @@ +Comptes FTP
AlternC, Documentation Utilisateur
PrécédentSuivant

Chapitre 3. Comptes FTP

Introduction

Le FTP est un moyen pratique de pouvoir échanger des fichiers entre un serveur et une +machine connectée à Internet. Pour cela, il faut disposer d'un compte FTP sur le serveur, +constitué d'un nom d'utilisateur et d'un mot de passe.

Sur AlternC, vous pouvez créer des comptes FTP, en précisant le nom d'utilisateur, le mot de passe, +et le dossier dans lequel sera connecté ce compte FTP. Ainsi, chaque compte pourra accéder à son dossier +et ses sous-dossiers, en lecture et en écriture.

Par exemple, si vous disposez des dossiers suivants dans votre compte : +

+Vous pouvez créer, par exemple, un compte ftp pour philippe, que vous hébergez sur +http://virtuel.org/philippe/ +Pour cela, il suffit de cliquer sur "Comptes FTP" puis "Créer un compte FTP" et enfin, +entrez les paramètres de connexion, à savoir, un nom d'utilisateur, un mot de passe, et un répertoire. +

Philippe peut donc modifier les fichiers de son dossier en utilisant les paramètres suivants : +

Serveur ftp : "virtuel.org"
+Nom d'utilisateur : "virtuel.org_philippe"
+Mot de passe : "philpas"


PrécédentSommaireSuivant
Configuration d'un domaine / sous-domaine Le gestionnaire de fichiers
\ No newline at end of file diff --git a/bureau/admin/aide/html/c84.html b/bureau/admin/aide/html/c84.html new file mode 100644 index 00000000..eb3623d6 --- /dev/null +++ b/bureau/admin/aide/html/c84.html @@ -0,0 +1,206 @@ +Le gestionnaire de fichiers
AlternC, Documentation Utilisateur
PrécédentSuivant

Chapitre 4. Le gestionnaire de fichiers

Introduction / Description

Sur AlternC, vous disposez d'un espace disque personnel sur lequel vous pouvez installer vos +domaines, sous-domaines, comptes ftp, statistiques web etc. Cet espace est en fait un dossier +sur le serveur, dans lequel vous pouvez stocker des fichiers, mais aussi des sous-dossiers, +afin d'organiser au mieux votre espace disponible.

Afin de pouvoir modifier facilement vos fichiers, vous pouvez utiliser le FTP, en créant un +compte sur votre bureau virtuel. Plus d'info sur le FTP dans la section FTP de l'Aide.. +Vous pouvez aussi utiliser le gestionnaire de fichier pour gérer vos fichiers directement depuis le +bureau virtuel. Pour cela, dans le menu principal, cliquez sur "Gestionnaire de fichiers"

Le gestionnaire de fichier permet de gérer l'ensemble de vos fichiers, à savoir : +


PrécédentSommaireSuivant
Comptes FTP Paramètres du gestionnaire de fichiers
\ No newline at end of file diff --git a/bureau/admin/aide/html/docbook.css b/bureau/admin/aide/html/docbook.css new file mode 100644 index 00000000..5f7c0040 --- /dev/null +++ b/bureau/admin/aide/html/docbook.css @@ -0,0 +1,42 @@ + +BODY { + font-size: 12px; + font-family: Verdana, Helvetica, Sans-Serif; + font-weight: normal; +} + +/* Titres de chapitres : */ +H1 { + font-size: 18px; + font-family: Bookman Old Style, Times, Serif; + font-weight: bold; +} + +/* En-tete haut cache */ +.navheader { + position: absolute; + visibility: hidden; +} + +/* En-tete bas : petite police */ +.navfooter td, .navfooter { + font-size: 10px; + font-family: Verdana, Helvetica, Sans-Serif; +} + +/* Police standard pour le code */ +.literal, .programlisting, .screen { + font-size: 12px; +} + +/* Listes a puce pour la table des matieres : */ +.toc { + list-style-image: url(tiret.gif); + padding-left: 4px; + margin-left: 2px; +} +.toc2 { + list-style-image: url(plus.gif); + padding-left: 4px; + margin-left: 2px; +} diff --git a/bureau/admin/aide/html/files/browser_set.png b/bureau/admin/aide/html/files/browser_set.png new file mode 100644 index 00000000..cd274b37 Binary files /dev/null and b/bureau/admin/aide/html/files/browser_set.png differ diff --git a/bureau/admin/aide/html/files/ftp_add.png b/bureau/admin/aide/html/files/ftp_add.png new file mode 100644 index 00000000..83c8d129 Binary files /dev/null and b/bureau/admin/aide/html/files/ftp_add.png differ diff --git a/bureau/admin/aide/html/files/ftp_list.png b/bureau/admin/aide/html/files/ftp_list.png new file mode 100644 index 00000000..40aa60be Binary files /dev/null and b/bureau/admin/aide/html/files/ftp_list.png differ diff --git a/bureau/admin/aide/html/files/readme b/bureau/admin/aide/html/files/readme new file mode 100644 index 00000000..b2217222 --- /dev/null +++ b/bureau/admin/aide/html/files/readme @@ -0,0 +1 @@ +Contient les fichiers utilisés par les pages sgml diff --git a/bureau/admin/aide/html/files/sta_add.png b/bureau/admin/aide/html/files/sta_add.png new file mode 100644 index 00000000..02871ed7 Binary files /dev/null and b/bureau/admin/aide/html/files/sta_add.png differ diff --git a/bureau/admin/aide/html/files/sta_view1.png b/bureau/admin/aide/html/files/sta_view1.png new file mode 100644 index 00000000..d3f19246 Binary files /dev/null and b/bureau/admin/aide/html/files/sta_view1.png differ diff --git a/bureau/admin/aide/html/files/sta_view2.png b/bureau/admin/aide/html/files/sta_view2.png new file mode 100644 index 00000000..70e3772e Binary files /dev/null and b/bureau/admin/aide/html/files/sta_view2.png differ diff --git a/bureau/admin/aide/html/frameset.html b/bureau/admin/aide/html/frameset.html new file mode 100644 index 00000000..56c75b94 --- /dev/null +++ b/bureau/admin/aide/html/frameset.html @@ -0,0 +1,14 @@ + + +Documentation développeur d'AlternC + + + + + +<body> +Your browser does not support frames. +</body> + + + diff --git a/bureau/admin/aide/html/plus.gif b/bureau/admin/aide/html/plus.gif new file mode 100644 index 00000000..720dd8bd Binary files /dev/null and b/bureau/admin/aide/html/plus.gif differ diff --git a/bureau/admin/aide/html/tiret.gif b/bureau/admin/aide/html/tiret.gif new file mode 100644 index 00000000..3ff978e4 Binary files /dev/null and b/bureau/admin/aide/html/tiret.gif differ diff --git a/bureau/admin/aide/html/toc.htm b/bureau/admin/aide/html/toc.htm new file mode 100644 index 00000000..19177ff7 --- /dev/null +++ b/bureau/admin/aide/html/toc.htm @@ -0,0 +1,144 @@ +DocBook TOCAlternC, Documentation Utilisateur
\ No newline at end of file diff --git a/bureau/admin/aide/html/x105.html b/bureau/admin/aide/html/x105.html new file mode 100644 index 00000000..c0f5bdfe --- /dev/null +++ b/bureau/admin/aide/html/x105.html @@ -0,0 +1,190 @@ +Paramètres du gestionnaire de fichiers
AlternC, Documentation Utilisateur
PrécédentChapitre 4. Le gestionnaire de fichiersSuivant


PrécédentSommaireSuivant
Le gestionnaire de fichiersNiveau supérieurLes statistiques Web.
\ No newline at end of file diff --git a/bureau/admin/aide/html/x23.html b/bureau/admin/aide/html/x23.html new file mode 100644 index 00000000..dc39165e --- /dev/null +++ b/bureau/admin/aide/html/x23.html @@ -0,0 +1,149 @@ +Fonctionnement de l'aide en ligne
AlternC, Documentation Utilisateur
PrécédentChapitre 1. IntroductionSuivant


PrécédentSommaireSuivant
IntroductionNiveau supérieurLes Noms de Domaines
\ No newline at end of file diff --git a/bureau/admin/aide/html/x53.html b/bureau/admin/aide/html/x53.html new file mode 100644 index 00000000..57304698 --- /dev/null +++ b/bureau/admin/aide/html/x53.html @@ -0,0 +1,206 @@ +Configuration d'un domaine / sous-domaine
AlternC, Documentation Utilisateur
PrécédentChapitre 2. Les Noms de DomainesSuivant

Configuration d'un domaine / sous-domaine

Lorsque vous avez installé un domaine sur AlternC, vous pouvez choisir dans quel dossier +de votre espace disque vous souhaitez connecter ce domaine, ou tout sous-domaine associé. +Pour cela, Cliquez sur le domaine dans le menu de gauche. Cela affiche l'ensemble des +sous-domaines installé. Vous pouvez ensuite modifier l'emplacement de ces sous-domaines, +ou en créer de nouveaux.

Par défaut, les sous-domaines suivants sont installés : (exemple pour virtuel.org) +


PrécédentSommaireSuivant
Les Noms de DomainesNiveau supérieurComptes FTP
\ No newline at end of file diff --git a/bureau/admin/aide/inline/docbook.css b/bureau/admin/aide/inline/docbook.css new file mode 100644 index 00000000..5f7c0040 --- /dev/null +++ b/bureau/admin/aide/inline/docbook.css @@ -0,0 +1,42 @@ + +BODY { + font-size: 12px; + font-family: Verdana, Helvetica, Sans-Serif; + font-weight: normal; +} + +/* Titres de chapitres : */ +H1 { + font-size: 18px; + font-family: Bookman Old Style, Times, Serif; + font-weight: bold; +} + +/* En-tete haut cache */ +.navheader { + position: absolute; + visibility: hidden; +} + +/* En-tete bas : petite police */ +.navfooter td, .navfooter { + font-size: 10px; + font-family: Verdana, Helvetica, Sans-Serif; +} + +/* Police standard pour le code */ +.literal, .programlisting, .screen { + font-size: 12px; +} + +/* Listes a puce pour la table des matieres : */ +.toc { + list-style-image: url(tiret.gif); + padding-left: 4px; + margin-left: 2px; +} +.toc2 { + list-style-image: url(plus.gif); + padding-left: 4px; + margin-left: 2px; +} diff --git a/bureau/admin/aide/inline/frameset.html b/bureau/admin/aide/inline/frameset.html new file mode 100644 index 00000000..56c75b94 --- /dev/null +++ b/bureau/admin/aide/inline/frameset.html @@ -0,0 +1,14 @@ + + +Documentation développeur d'AlternC + + + + + +<body> +Your browser does not support frames. +</body> + + + diff --git a/bureau/admin/aide/inline/plus.gif b/bureau/admin/aide/inline/plus.gif new file mode 100644 index 00000000..720dd8bd Binary files /dev/null and b/bureau/admin/aide/inline/plus.gif differ diff --git a/bureau/admin/aide/inline/tiret.gif b/bureau/admin/aide/inline/tiret.gif new file mode 100644 index 00000000..3ff978e4 Binary files /dev/null and b/bureau/admin/aide/inline/tiret.gif differ diff --git a/bureau/admin/alternc.png b/bureau/admin/alternc.png new file mode 100644 index 00000000..57163e32 Binary files /dev/null and b/bureau/admin/alternc.png differ diff --git a/bureau/admin/bro_editor.php b/bureau/admin/bro_editor.php new file mode 100644 index 00000000..1c49fcf7 --- /dev/null +++ b/bureau/admin/bro_editor.php @@ -0,0 +1,80 @@ +convertabsolute($R,1); +$p=$bro->GetPrefs(); + +if ($cancel) { + include("bro_main.php"); + exit(); +} +if ($saveret) { + $bro->Save($file,$R,$texte); + $error=sprintf(_("Your file %s has been saved"),$file)." (".format_date('%3$d-%2$d-%1$d %4$d:%5$d',date("Y-m-d H:i:s")).")"; + include("bro_main.php"); + exit(); +} +if ($save) { + $bro->Save($file,$R,$texte); + $error=sprintf(_("Your file %s has been saved"),$file)." (".format_date('%3$d-%2$d-%1$d %4$d:%5$d',date("Y-m-d H:i:s")).")"; +} + +include("head.php"); +?> + + + +

+$error
"; ?> +$R/$file
"; ?> +

+

+

shift+click and drag to resize textarea

+ " /> + " /> + + " name="save" /> + " name="saveret" /> + " name="cancel" /> +

+ +
+ + diff --git a/bureau/admin/bro_main.php b/bureau/admin/bro_main.php new file mode 100644 index 00000000..2f3d74f8 --- /dev/null +++ b/bureau/admin/bro_main.php @@ -0,0 +1,417 @@ +GetPrefs(); +if (!$R && $p["golastdir"]) { + $R=$p["lastdir"]; +} +$R=$bro->convertabsolute($R,1); +// on fait ? +if ($formu) { + switch ($formu) { + case 1: // Créer le répertoire $R.$nomfich + $bro->CreateDir($R,$nomfich); + $p=$bro->GetPrefs(); + break; + case 6: // Créer le fichier $R.$nomfich + $bro->CreateFile($R,$nomfich); + $p=$bro->GetPrefs(); + if ($p["createfile"]==1) { + $file=$nomfich; + include("bro_editor.php"); + exit(); + } + break; + case 2: // act vaut Supprimer Copier ou Renommer. + if ($actdel) { + $bro->DeleteFile($d,$R); + } + if ($actmove) { + $bro->MoveFile($d,$R,$actmoveto); + } + break; + case 4: // Renommage Effectif... + $bro->RenameFile($R,$o,$d); // Rename $R (directory) $o (old) $d (new) names + break; + case 3: // Upload de fichier... + $bro->UploadFile($R); + break; + } +} + +/* Creation de la liste des fichiers courants */ +$c=$bro->filelist($R); +if ($c===false) $error=$err->errstr(); + +include("head.php"); +?> + + + + + +"; + for ($i=0;$i"; + echo ""; + } + echo ""; + echo "
+ +
+ +
+user["login"]; ?> / PathList($R,"bro_main.php") ?>
+ +$error"; ?> +
+

+ +
+ + + + +
" />
+ /> + /> +
+
+
+ +
+ +\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "
"._("Rename")."
".$d[$i]."
\n"; + echo "
\n"; +} + +/* We draw the file list and button bar only if there is files here ! */ +if (count($c)) { + +?> +
+ + +
+ +" /> + +" /> +    +" /> :  + +
+ + + +"; +$col=1; +for($i=0;$i\n"; +if ($c[$i]["type"]) { +echo " "; +if ($p["showicons"]) { +echo "icon($c[$i]["name"])."\" width=\"16\" height=\"16\" alt=\"\" />"; +} +echo "
".$c[$i]["name"]."\n"; +echo " ".format_size($c[$i]["size"]).""; +echo "".format_date('%3$d-%2$d-%1$d %4$d:%5$d',date("Y-m-d H:i:s",$c[$i]["date"]))."
"; +if ($p["showtype"]) { +echo "".$bro->mime($c[$i]["name"]).""; +} +$vu=$bro->viewurl($R,$c[$i]["name"]); +if ($vu) { +echo ""._("View").""; +} else { +echo " "; +} +echo "\n"; +} else { // DOSSIER : +echo " "; +if ($p["showicons"]) { +echo "\"\""; +} +echo "".$c[$i]["name"]."/\n"; +echo " ".format_size($c[$i]["size"]).""; +echo "".format_date('%3$d-%2$d-%1$d %4$d:%5$d',date("Y-m-d h:i:s",$c[$i]["date"]))."
"; +if ($p["showtype"]) { +echo "Dossier"; +} +echo " "; +echo "\n"; +} + +echo "\n"; +} +echo ""; +break; +case 1: +/* AFFICHE 2 COLONNES COURTES */ +reset($c); +echo ""; +echo ""; +echo "
"; +echo ""; +$col=1; +for($i=0;$i\n"; +if ($c[$i]["type"]) { +echo " \n"; +echo " \n"; +} else { +echo " \n"; +echo " \n"; +} + +echo "\n"; +} +echo "
".$c[$i]["name"]."".format_size($c[$i]["size"]).""; +$vu=$bro->viewurl($R,$c[$i]["name"]); +if ($vu) { +echo ""._("V").""; +} else { +echo " "; +} +echo "".$c[$i]["name"]."/".format_size($c[$i]["size"]).""; +echo " "; +echo "
"; +echo "
"; +echo ""; +$col=1; +for($i=round(count($c)/2);$i\n"; +if ($c[$i]["type"]) { +echo " \n"; +echo " \n"; +} else { +echo " \n"; +echo " \n"; +} + +echo "\n"; +} +echo "
".$c[$i]["name"]."".format_size($c[$i]["size"]).""; +$vu=$bro->viewurl($R,$c[$i]["name"]); +if ($vu) { +echo ""._("V").""; +} else { +echo " "; +} +echo "".$c[$i]["name"]."/".format_size($c[$i]["size"]).""; +echo " "; +echo "
"; +echo "
"; +break; +case 2: +/* AFFICHE 3 COLONNES COURTES */ +reset($c); +echo ""; +echo ""; +echo "
"; +echo ""; +$col=1; +for($i=0;$i\n"; +if ($c[$i]["type"]) { +echo " \n"; +echo " \n"; +} else { +echo " \n"; +echo " \n"; +} + +echo "\n"; +} +echo "
".$c[$i]["name"]."".format_size($c[$i]["size"]).""; +$vu=$bro->viewurl($R,$c[$i]["name"]); +if ($vu) { +echo ""._("V").""; +} else { +echo " "; +} +echo "".$c[$i]["name"]."/".format_size($c[$i]["size"]).""; +echo " "; +echo "
"; +echo "
"; +echo ""; +$col=1; +for($i=round(count($c)/3);$i\n"; +if ($c[$i]["type"]) { +echo " \n"; +echo " \n"; +} else { +echo " \n"; +echo " \n"; +} + +echo "\n"; +} +echo "
".$c[$i]["name"]."".format_size($c[$i]["size"]).""; +$vu=$bro->viewurl($R,$c[$i]["name"]); +if ($vu) { +echo ""._("V").""; +} else { +echo " "; +} + +echo "".$c[$i]["name"]."/".format_size($c[$i]["size"]).""; +echo " "; +echo "
"; +echo "
"; +echo ""; +$col=1; +for($i=round(2*count($c)/3);$i\n"; +if ($c[$i]["type"]) { +echo " \n"; +echo " \n"; +} else { +echo " \n"; +echo " \n"; +} + +echo "\n"; +} +echo "
".$c[$i]["name"]."".format_size($c[$i]["size"]).""; +$vu=$bro->viewurl($R,$c[$i]["name"]); +if ($vu) { +echo ""._("View").""; +} else { +echo " "; +} +echo "".$c[$i]["name"]."/".format_size($c[$i]["size"]).""; +echo " "; +echo "
"; +echo "
"; +break; +} +?> +
+"._("No files in this folder")."

"; +} +?> + + + + + +
+ + +
+    + + " /> +
+
+

 

+ + is_ftp($R)) { +echo _("There is an ftp account in this folder")." "._("Click here to edit this ftp account.")."
"; +} +else { +echo ""._("Click here to create an ftp account in this folder.")."
"; +} + +if ($hta->is_protected($R)) { +echo ""._("This folder has restricted access")."
"; +} +else { +echo ""._("Click here to protect this folder with login/password")."
"; +} +?> +
+ (l_tgz[$p["downfmt"]]; ?>)
+
+ + + + + diff --git a/bureau/admin/bro_pref.php b/bureau/admin/bro_pref.php new file mode 100644 index 00000000..664e6357 --- /dev/null +++ b/bureau/admin/bro_pref.php @@ -0,0 +1,143 @@ +SetPrefs($editsizex, $editsizey, $listmode, $showicons, $downfmt, $createfile, $showtype, $editor_font, $editor_size, $golastdir); + $error=_("Your preferences have been updated."); + include("bro_main.php"); + exit; +} +$p=$bro->GetPrefs(); + +include("head.php"); +?> + + +$error
"; ?> +

+
+ + + + + + + +

+

 

+ + + + + + + + + + +

+

">

+ +
+

 

+ + + diff --git a/bureau/admin/bro_tgzdown.php b/bureau/admin/bro_tgzdown.php new file mode 100644 index 00000000..ce00face --- /dev/null +++ b/bureau/admin/bro_tgzdown.php @@ -0,0 +1,47 @@ +GetPrefs(); +switch ($p["downfmt"]) { + case 0: + $bro->DownloadTGZ($dir); + break; + case 1: + $bro->DownloadTBZ($dir); + break; + case 2: + $bro->DownloadZIP($dir); + break; + case 3: + $bro->DownloadZ($dir); + break; +} +?> diff --git a/bureau/admin/bro_view.php b/bureau/admin/bro_view.php new file mode 100644 index 00000000..8badd02d --- /dev/null +++ b/bureau/admin/bro_view.php @@ -0,0 +1,35 @@ +content_send(dirname($PATH_INFO),basename($PATH_INFO)); + +?> + diff --git a/bureau/admin/browseforfolder.php b/bureau/admin/browseforfolder.php new file mode 100644 index 00000000..5b6c22a2 --- /dev/null +++ b/bureau/admin/browseforfolder.php @@ -0,0 +1,168 @@ + "directory" Nom du dossier + level => 0-n Niveau du dossier (0=racine 1,2 ...) + put => "/sub/sub/directory" Contenu de la variable post à ajouter pour la balise A si ="" c'est le dossier courant. + Si probleme, positionne $errbrowsefold + Sinon, retourne le tableau et $maxlevel contient le nombre maximum de sous-dossiers. +*/ +include("../class/config.php"); + +function _subbrowse($curdir,$pos,$level) { + global $maxlevel,$root,$brlist; + if ($level>$maxlevel) + $maxlevel=$level; + $rot=substr($curdir,0,$pos); + $next=@strpos($curdir,"/",$pos+1); + $nextstr=substr($curdir,$pos+1,$next-$pos-1); + $c=opendir($root.$rot); + $i=0; $tmp = array(); + while ($r=readdir($c)) { + if (is_dir($root.$rot."/".$r) && $r!="." && $r!="..") { $tmp[$i++]=$r; } + } + sort($tmp); + foreach ($tmp as $r) { + /* Ajout */ + $brlist[]=array("dir"=>$r,"level"=>$level,"put"=> ife($curdir==$rot."/".$r."/","",$rot."/".$r)); + if ($r==$nextstr) { + _subbrowse($curdir,$next,$level+1); + } + } +} + +function browseforfolder($curdir) { + global $maxlevel,$root,$brlist; + $maxlevel=0; + $pat=explode("/",$curdir); + $brlist=array(array("dir"=>"/","level"=>0,"put"=> ife($curdir=="/","","/") )); + _subbrowse($curdir,0,1); + return $brlist; +} + +$root="/var/alternc/html/".substr($mem->user["login"],0,1)."/".$mem->user["login"]."/"; +// pour utiliser 'la ou est browseforfolder', mettre dirname($HTTP_SERVER_VARS["PATH_TRANSLATED"]); + +if (substr($file,0,1)!="/") $file="/".$file; +if (substr($file,-1)!="/") $file.="/"; +if (!$file) $file="/"; + +$errbrowsefold=0; /* Erreur lors de la création d'un dossier */ +$brlist=array(); /* Liste des dossiers ... */ +$maxlevel=0; + + +if ($select) { + /* Go ahead, let's send the javascript ...*/ +?> + + +Browser for folder + + + +\n"; + echo ""; + exit(); +} + +?> + + + +Recherche d'un dossier + + + + + +

+"; + /* Retour : */ + echo ""._("Back to the root folder")."
"; +} else { + /* Sinon, tout va bien, on affiche le tableau */ + reset($ar); +?> +
+

+ + + +
+ +" class="inb" />  +" class="inb" onclick="window.close();" />  +

+
+ + + +\n"; + for ($i=0;$i<$val["level"];$i++) + echo ""; + if ($val["put"]!="") { + ?> + + + + "; + if ($val["put"]!="") { + echo "".$val["dir"].""; + } else { + echo "".$val["dir"].""; + } + echo "\n\n"; + } +} // OK ? +?> +
+ + diff --git a/bureau/admin/direct.php b/bureau/admin/direct.php new file mode 100644 index 00000000..7d609a74 --- /dev/null +++ b/bureau/admin/direct.php @@ -0,0 +1,54 @@ +checkid()) { + $error=$err->errstr(); + include("index.php"); + exit(); +} + +?> + + + +Administration de <?php echo $host ?> + + + + + + + Votre navigateur doit supporter les cadres.<br /> + Your browser must support frames + + + diff --git a/bureau/admin/dom_add.php b/bureau/admin/dom_add.php new file mode 100644 index 00000000..cafebd2a --- /dev/null +++ b/bureau/admin/dom_add.php @@ -0,0 +1,72 @@ + + + +

+cancreate("dom")) { ?> +

+$error

"; +?> +
+ +
+ +
" />
+

+ />
+ +

+

+ +

+show_help("add_domain"); ?> +
+dns)) { + echo "
"._("Whois result on the domain")." :
";
+		reset($dom->dns);
+		while (list($key,$val)=each($dom->dns)) {
+			echo "nameserver: $val\n";
+		}
+		echo "
"; + } +?> + + diff --git a/bureau/admin/dom_doadd.php b/bureau/admin/dom_doadd.php new file mode 100644 index 00000000..c06117c2 --- /dev/null +++ b/bureau/admin/dom_doadd.php @@ -0,0 +1,64 @@ +lock(); + +if (!$dom->add_domain($newdomain,$dns)) { + $error=$err->errstr(); + include("dom_add.php"); + exit(); +} + +$dom->unlock(); + +include("head.php"); +?> + + +

+

+
+
+show_help("add_domain"); ?> +
+dns)) { + echo "
"._("Whois result on the domain")." :

";
+		reset($dom->dns);
+		while (list($key,$val)=each($dom->dns)) {
+			echo "nameserver: $val\n";
+		}
+		echo "
"; + } +?> +

+ + diff --git a/bureau/admin/dom_dodel.php b/bureau/admin/dom_dodel.php new file mode 100644 index 00000000..3bb401d3 --- /dev/null +++ b/bureau/admin/dom_dodel.php @@ -0,0 +1,73 @@ +lock(); +if ($del_confirm=="y") + if (!$dom->del_domain($domain)) { + $error=$err->errstr(); + include("dom_edit.php"); + $dom->unlock(); + exit(); + } + +$dom->unlock(); +if ($del_confirm!="y") { + +include("head.php"); +?> + + +

+



+

+
+

+ + +" /> - " onclick="history.back()" /> +

+ + + + + +

+

+
+ +show_help("del_domain"); ?> +

+ + diff --git a/bureau/admin/dom_edit.php b/bureau/admin/dom_edit.php new file mode 100644 index 00000000..cab96716 --- /dev/null +++ b/bureau/admin/dom_edit.php @@ -0,0 +1,174 @@ +lock(); +if (!$r=$dom->get_domain_all($domain)) { + $error=$err->errstr(); +} +$dom->unlock(); + +include("head.php"); +?> + + + +

:

+$error

"; + } +?> +
+ +

+ + + + + + + + + +
+ &sub="> +   + &sub=">" target="_blank">'.htmlspecialchars($r["sub"][$i]["dest"]).'' : htmlspecialchars($r["sub"][$i]["dest"]); ?> 
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+ " /> + + +." />
+ + +
+
+
+  
+
+show_help("edit_domain"); ?> +

 

+

 

+ + + +
+

+
" method="post" id="dns"> + + + + + + + + + + + +
onclick="dnson();" /> onclick="dnsoff();" />
+

+ +

+ " /> +
+

+

+ +
" />
+
+ + +
+
+
+

+" /> +

+
+
+ + + diff --git a/bureau/admin/dom_editdns.php b/bureau/admin/dom_editdns.php new file mode 100644 index 00000000..8675ca89 --- /dev/null +++ b/bureau/admin/dom_editdns.php @@ -0,0 +1,60 @@ +lock(); +if ($dns!="1") { + // On fixe mx : + if ($email=="1") { + $mx=$L_MX; + } else { + $mx=""; + } +} + +if (!$dom->edit_domain($domain,$dns,$mx)) { + $error=$err->errstr(); + include("dom_edit.php"); + $dom->unlock(); + exit(); +} +$dom->unlock(); + +include("head.php"); +?> + + +

+

+
+ +

+ + diff --git a/bureau/admin/dom_subdel.php b/bureau/admin/dom_subdel.php new file mode 100644 index 00000000..2ea8b713 --- /dev/null +++ b/bureau/admin/dom_subdel.php @@ -0,0 +1,65 @@ +lock(); +if (!$r=$dom->get_sub_domain_all($domain,$sub)) { + $error=$err->errstr(); +} +$dom->unlock(); + +include("head.php"); +?> + + +

:

+$error

"; + exit(); + } +?> +
+ +
+

+ + + :

+

+
+ " />   + " onclick="history.back();" /> +
+
+ + diff --git a/bureau/admin/dom_subdodel.php b/bureau/admin/dom_subdodel.php new file mode 100644 index 00000000..c2c868f1 --- /dev/null +++ b/bureau/admin/dom_subdodel.php @@ -0,0 +1,55 @@ +lock(); + +if (!$dom->del_sub_domain($domain,$sub)) { + $error=$err->errstr(); +} + +$dom->unlock(); + +include("head.php"); +?> + + +

Suppression du sous-domaine http:// :

+$error

"; + exit(); + } else { + echo "

Le sous-domaine a ete supprime, les modifications seront prises en comptes dans 5 minutes.

"; + } +?> +

Continuer

+ + diff --git a/bureau/admin/dom_subdoedit.php b/bureau/admin/dom_subdoedit.php new file mode 100644 index 00000000..4f2421bf --- /dev/null +++ b/bureau/admin/dom_subdoedit.php @@ -0,0 +1,58 @@ +lock(); + +switch ($type) { + case $dom->type_local: + $r=$dom->set_sub_domain($domain,$sub,$type,$action,$sub_local); + break; + case $dom->type_url: + $r=$dom->set_sub_domain($domain,$sub,$type,$action,$sub_url); + break; + case $dom->type_ip: + $r=$dom->set_sub_domain($domain,$sub,$type,$action,$sub_ip); + break; + case $dom->type_webmail: + $r=$dom->set_sub_domain($domain,$sub,$type,$action,""); + break; +} +$dom->unlock(); + +if (!$r) { + $error=$err->errstr(); +} else { + $error=_("The modifications will take effect in 5 minutes."); +} +include("dom_edit.php"); +exit; + +?> \ No newline at end of file diff --git a/bureau/admin/dom_subedit.php b/bureau/admin/dom_subedit.php new file mode 100644 index 00000000..6fd09160 --- /dev/null +++ b/bureau/admin/dom_subedit.php @@ -0,0 +1,93 @@ +lock(); +if (!$r=$dom->get_sub_domain_all($domain,$sub)) { + $error=$err->errstr(); +} +$dom->unlock(); + +include("head.php"); +?> + + +

Edition du sous-domaine http:// :

+$error

"; + exit(); + } +?> +
+ +

Sous-domaine http://

+
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +type_local); ?> onclick="document.main.sub_local.focus();" /> + " size="40" /> + +
type_url); ?> onclick="document.main.sub_url.focus();" /> + " size="50" />
type_ip); ?> onclick="document.main.sub_ip.focus();" /> + " size="16" />
type_webmail); ?> /> +  
+
+ + diff --git a/bureau/admin/domlist.php b/bureau/admin/domlist.php new file mode 100644 index 00000000..06e6ae4b --- /dev/null +++ b/bureau/admin/domlist.php @@ -0,0 +1,47 @@ +check_slave_account($_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW'])) { + $dom->echo_domain_list(); + } else { + header('WWW-Authenticate: Basic realm="Domain List Authentication"'); + header('HTTP/1.0 401 Unauthorized'); + exit; + } + } + +?> \ No newline at end of file diff --git a/bureau/admin/ftp_add.php b/bureau/admin/ftp_add.php new file mode 100644 index 00000000..d3f21372 --- /dev/null +++ b/bureau/admin/ftp_add.php @@ -0,0 +1,70 @@ +cancreate("ftp")) { + $error=_("You cannot add any new ftp account, your quota is over."); + $fatal=1; +} +include("head.php"); +?> + + +

+$error

"; + if ($fatal) { + echo ""; + exit(); + } + } +?> +
+ + + + + + +
+ +  _  +
+ +
" />
+
+show_help("ftp_add"); ?> + + diff --git a/bureau/admin/ftp_del.php b/bureau/admin/ftp_del.php new file mode 100644 index 00000000..8fa254e3 --- /dev/null +++ b/bureau/admin/ftp_del.php @@ -0,0 +1,48 @@ +delete_ftp($val); + if (!$r) { + $error.=$err->errstr()."
"; + } else { + $error.=sprintf(_("The ftp account %s has been successfully deleted"),$r)."
"; + } + } +} +include("ftp_list.php"); +exit(); +?> diff --git a/bureau/admin/ftp_doadd.php b/bureau/admin/ftp_doadd.php new file mode 100644 index 00000000..2322e4b1 --- /dev/null +++ b/bureau/admin/ftp_doadd.php @@ -0,0 +1,48 @@ +add_ftp($prefixe,$login,$pass,$dir); +if (!$r) { + $error=$err->errstr(); + include("ftp_add.php"); + exit(); +} else { + $error=_("The FTP account has been successfully created"); + include("ftp_list.php"); + exit(); +} +?> diff --git a/bureau/admin/ftp_doedit.php b/bureau/admin/ftp_doedit.php new file mode 100644 index 00000000..91b49bdd --- /dev/null +++ b/bureau/admin/ftp_doedit.php @@ -0,0 +1,64 @@ +put_ftp_details($id,$prefixe,$login,$pass,$rep); + if (!$r) { + $error=$err->errstr(); + include("ftp_edit.php"); + exit(); + } else { + $error=_("The ftp account has been successfully changed"); + include("ftp_list.php"); + exit(); + } +} + +include("head.php"); +?> + + +

+$error

"; + } +?> + + diff --git a/bureau/admin/ftp_edit.php b/bureau/admin/ftp_edit.php new file mode 100644 index 00000000..4bed749c --- /dev/null +++ b/bureau/admin/ftp_edit.php @@ -0,0 +1,73 @@ +get_ftp_details($id); + if (!$r) { + $error=$err->errstr(); + } +} + +include("head.php"); +?> + + +

+$error

"; + exit(); + } +?> +
+ + + + + + + +
+ +  _ " size="20" maxlength="64" /> +
" size="20" maxlength="64" />
" size="20" maxlength="64" />
" size="20" maxlength="64" /> + + +
" />
+
+ + diff --git a/bureau/admin/ftp_list.php b/bureau/admin/ftp_list.php new file mode 100644 index 00000000..c528bc6b --- /dev/null +++ b/bureau/admin/ftp_list.php @@ -0,0 +1,91 @@ +get_list($domain)) { + $noftp=true; + $error=$err->errstr(); +} + +include("head.php"); +?> + + +

+ +

+
+ show_help("ftp_list_no"); ?> + + +

+ +
+ + + + + + + + + + + + +
 
" name="del_" value="" />">")); ?>/
" />
+
+ +cancreate("ftp")) { ?> +

+ +

+show_help("ftp_list"); +?> + + diff --git a/bureau/admin/head.php b/bureau/admin/head.php new file mode 100644 index 00000000..b6720e12 --- /dev/null +++ b/bureau/admin/head.php @@ -0,0 +1,38 @@ + + + + +Bureau + + + diff --git a/bureau/admin/hta_add.php b/bureau/admin/hta_add.php new file mode 100644 index 00000000..4c55b31e --- /dev/null +++ b/bureau/admin/hta_add.php @@ -0,0 +1,65 @@ + + + + +

+

+ +

+$error

"; + exit; + } +?> + +
+ + + + + + +
+
" />
+
+ + + + diff --git a/bureau/admin/hta_adduser.php b/bureau/admin/hta_adduser.php new file mode 100644 index 00000000..a7ec290a --- /dev/null +++ b/bureau/admin/hta_adduser.php @@ -0,0 +1,56 @@ + + + + +

+$error

"; + } +?> + +
+ + + + + + +
+
" />
+
+ + + diff --git a/bureau/admin/hta_del.php b/bureau/admin/hta_del.php new file mode 100644 index 00000000..52ffe975 --- /dev/null +++ b/bureau/admin/hta_del.php @@ -0,0 +1,48 @@ +DelDir($val); + if (!$r) { + $error.=$err->errstr()."
"; + } else { + $error.=sprintf(_("The protected folder %s has been successfully unprotected"),$val)."
"; + } + } +} +include("hta_list.php"); +exit(); +?> diff --git a/bureau/admin/hta_doadd.php b/bureau/admin/hta_doadd.php new file mode 100644 index 00000000..383486ac --- /dev/null +++ b/bureau/admin/hta_doadd.php @@ -0,0 +1,42 @@ +CreateDir($dir)) { + $error=$err->errstr(); + include("hta_add.php"); + exit(); +} + +include("hta_list.php"); +exit(); + +?> diff --git a/bureau/admin/hta_doadduser.php b/bureau/admin/hta_doadduser.php new file mode 100644 index 00000000..d497ccd1 --- /dev/null +++ b/bureau/admin/hta_doadduser.php @@ -0,0 +1,50 @@ + add_user($user, $password,$dir)) { + $error=$err->errstr(); + include ("hta_adduser.php"); + } else { + include ("hta_edit.php"); +} +?> diff --git a/bureau/admin/hta_dodeluser.php b/bureau/admin/hta_dodeluser.php new file mode 100644 index 00000000..5ebd0784 --- /dev/null +++ b/bureau/admin/hta_dodeluser.php @@ -0,0 +1,46 @@ +del_user($d,$dir)) { + $error=$err->errstr(); + + +} + +include("hta_edit.php"); +exit(); +?> + diff --git a/bureau/admin/hta_doedituser.php b/bureau/admin/hta_doedituser.php new file mode 100644 index 00000000..3a749069 --- /dev/null +++ b/bureau/admin/hta_doedituser.php @@ -0,0 +1,57 @@ +change_pass($user,$newpass,$dir)) { + $error=$err->errstr(); +} +include("head.php"); +?> + + +

+$error

"; + } + else { + echo "

".sprintf(_("The password of the user %s has been successfully changed"),$user)."

"; + } + echo "

"._("Click here to continue")."

"; +?> + + + diff --git a/bureau/admin/hta_edit.php b/bureau/admin/hta_edit.php new file mode 100644 index 00000000..76ad097a --- /dev/null +++ b/bureau/admin/hta_edit.php @@ -0,0 +1,85 @@ +get_hta_detail($dir); + if (!$r) { + $error=$err->errstr(); + } +} + +include("head.php"); +?> + + +

+".sprintf(_("No authorized user in %s"),$dir)."

"; + echo ""._("Add a username")."
"; + echo "
"._("File browser")."
"; + exit(); + } +reset($r); + +?> +
+ + + + + + + + + + +
" />
+
+ +

+ +

+

+ +

+ + diff --git a/bureau/admin/hta_edituser.php b/bureau/admin/hta_edituser.php new file mode 100644 index 00000000..81911dd5 --- /dev/null +++ b/bureau/admin/hta_edituser.php @@ -0,0 +1,56 @@ + + + + +

+$error

"; + } +?> +
+ + + + + + +
+ +
" />
+
+ + + diff --git a/bureau/admin/hta_list.php b/bureau/admin/hta_list.php new file mode 100644 index 00000000..b753b2f7 --- /dev/null +++ b/bureau/admin/hta_list.php @@ -0,0 +1,92 @@ +ListDir()) { + $error=$err->errstr(); +} +else { + reset($r); +} + +include("head.php"); +?> + + +

+$error

"; + } + + if (!is_array($r)) { + echo "

"._("Protect a folder")."
"; + $mem->show_help("hta_list"); + echo "

"; + exit(); + } + +?> + +

+show_help("hta_list2"); +?> +

+ +
+ + + + + + + + + + +
 
" />
+
+

+ +

+

+show_help("hta_list"); ?> +

+ + diff --git a/bureau/admin/icon/browse.png b/bureau/admin/icon/browse.png new file mode 100644 index 00000000..d5bbfcc7 Binary files /dev/null and b/bureau/admin/icon/browse.png differ diff --git a/bureau/admin/icon/delfile.png b/bureau/admin/icon/delfile.png new file mode 100644 index 00000000..7de481da Binary files /dev/null and b/bureau/admin/icon/delfile.png differ diff --git a/bureau/admin/icon/doc.png b/bureau/admin/icon/doc.png new file mode 100644 index 00000000..fa88841e Binary files /dev/null and b/bureau/admin/icon/doc.png differ diff --git a/bureau/admin/icon/encrypted.png b/bureau/admin/icon/encrypted.png new file mode 100644 index 00000000..2153f182 Binary files /dev/null and b/bureau/admin/icon/encrypted.png differ diff --git a/bureau/admin/icon/exe.png b/bureau/admin/icon/exe.png new file mode 100644 index 00000000..678d971f Binary files /dev/null and b/bureau/admin/icon/exe.png differ diff --git a/bureau/admin/icon/file.png b/bureau/admin/icon/file.png new file mode 100644 index 00000000..7323203b Binary files /dev/null and b/bureau/admin/icon/file.png differ diff --git a/bureau/admin/icon/folder.png b/bureau/admin/icon/folder.png new file mode 100644 index 00000000..f1ae1bbc Binary files /dev/null and b/bureau/admin/icon/folder.png differ diff --git a/bureau/admin/icon/htm.png b/bureau/admin/icon/htm.png new file mode 100644 index 00000000..68921013 Binary files /dev/null and b/bureau/admin/icon/htm.png differ diff --git a/bureau/admin/icon/jpg.png b/bureau/admin/icon/jpg.png new file mode 100644 index 00000000..afdbace6 Binary files /dev/null and b/bureau/admin/icon/jpg.png differ diff --git a/bureau/admin/icon/m3u.png b/bureau/admin/icon/m3u.png new file mode 100644 index 00000000..0468529e Binary files /dev/null and b/bureau/admin/icon/m3u.png differ diff --git a/bureau/admin/icon/move.png b/bureau/admin/icon/move.png new file mode 100644 index 00000000..db13557e Binary files /dev/null and b/bureau/admin/icon/move.png differ diff --git a/bureau/admin/icon/newfile.png b/bureau/admin/icon/newfile.png new file mode 100644 index 00000000..0fd3461b Binary files /dev/null and b/bureau/admin/icon/newfile.png differ diff --git a/bureau/admin/icon/newfolder.png b/bureau/admin/icon/newfolder.png new file mode 100644 index 00000000..e9ddcf60 Binary files /dev/null and b/bureau/admin/icon/newfolder.png differ diff --git a/bureau/admin/icon/newhtml.png b/bureau/admin/icon/newhtml.png new file mode 100644 index 00000000..1e2adfe9 Binary files /dev/null and b/bureau/admin/icon/newhtml.png differ diff --git a/bureau/admin/icon/openfold.png b/bureau/admin/icon/openfold.png new file mode 100644 index 00000000..951766b6 Binary files /dev/null and b/bureau/admin/icon/openfold.png differ diff --git a/bureau/admin/icon/pdf.png b/bureau/admin/icon/pdf.png new file mode 100644 index 00000000..1357fcf2 Binary files /dev/null and b/bureau/admin/icon/pdf.png differ diff --git a/bureau/admin/icon/php.png b/bureau/admin/icon/php.png new file mode 100644 index 00000000..4078c56a Binary files /dev/null and b/bureau/admin/icon/php.png differ diff --git a/bureau/admin/icon/ppt.png b/bureau/admin/icon/ppt.png new file mode 100644 index 00000000..13214c3e Binary files /dev/null and b/bureau/admin/icon/ppt.png differ diff --git a/bureau/admin/icon/properties.png b/bureau/admin/icon/properties.png new file mode 100644 index 00000000..665f2cb6 Binary files /dev/null and b/bureau/admin/icon/properties.png differ diff --git a/bureau/admin/icon/protect.png b/bureau/admin/icon/protect.png new file mode 100644 index 00000000..76a2671b Binary files /dev/null and b/bureau/admin/icon/protect.png differ diff --git a/bureau/admin/icon/ra.png b/bureau/admin/icon/ra.png new file mode 100644 index 00000000..88c4356c Binary files /dev/null and b/bureau/admin/icon/ra.png differ diff --git a/bureau/admin/icon/selall.png b/bureau/admin/icon/selall.png new file mode 100644 index 00000000..7f44838e Binary files /dev/null and b/bureau/admin/icon/selall.png differ diff --git a/bureau/admin/icon/sort0.png b/bureau/admin/icon/sort0.png new file mode 100644 index 00000000..f986bcff Binary files /dev/null and b/bureau/admin/icon/sort0.png differ diff --git a/bureau/admin/icon/sort1.png b/bureau/admin/icon/sort1.png new file mode 100644 index 00000000..5f860c47 Binary files /dev/null and b/bureau/admin/icon/sort1.png differ diff --git a/bureau/admin/icon/swf.png b/bureau/admin/icon/swf.png new file mode 100644 index 00000000..d5d3a086 Binary files /dev/null and b/bureau/admin/icon/swf.png differ diff --git a/bureau/admin/icon/sxc.png b/bureau/admin/icon/sxc.png new file mode 100644 index 00000000..06c1b8f3 --- /dev/null +++ b/bureau/admin/icon/sxc.png @@ -0,0 +1,30 @@ +/* XPM */ +static char * _004_spreadsheet_document_xpm[] = { +/* width height ncols cpp */ +"16 16 8 2", + /* Colors */ + "00 c #000000", + "01 c #000080", + "02 c #800080", + "03 c #C0C0C0", + "04 c #808080", + "05 c #0000FF", + "06 c #FFFFFF", + ".. s None c None", + "....04040404040404040404040400..", + "....04060606060606060606060300..", + "....04060303030303030303030300..", + "....04060304040304040404030300..", + "....04060303030303030303030300..", + "....04060304040306060606030300..", + "....04060303030303030303030300..", + "....04060304040306060606030300..", + "....04060303030303030301030300..", + "....04060304040306060201030300..", + "....04060303030303000201030300..", + "....04060304040305050201030300..", + "....04060303030303030303030300..", + "....04060606060606060606060300..", + "....04030303030303030303030300..", + "....00000000000000000000000000..", +}; diff --git a/bureau/admin/icon/sxd.png b/bureau/admin/icon/sxd.png new file mode 100644 index 00000000..4476fadc --- /dev/null +++ b/bureau/admin/icon/sxd.png @@ -0,0 +1,33 @@ +/* XPM */ +static char * _006_drawing_document_xpm[] = { +/* width height ncols cpp */ +"16 16 11 2", + /* Colors */ + "00 c #000000", + "01 c #008000", + "02 c #808000", + "03 c #000080", + "04 c #C0C0C0", + "05 c #808080", + "06 c #FFFF00", + "07 c #0000FF", + "08 c #00FFFF", + "09 c #FFFFFF", + ".. s None c None", + "....05050505050505050505050500..", + "....05090909090909090909090400..", + "....05090004040400040400090400..", + "....05090408060806080604090500..", + "....05090406080808080904050905..", + "....05090408060806090903070500..", + "....05090406080809090307030005..", + "....05090008060909030703000400..", + "....05090408090903070300090400..", + "....05090409090606030004090400..", + "....05090409090602000904090400..", + "....05090409060201090904090400..", + "....05090004040400040400090400..", + "....05090909090909090909090400..", + "....05040404040404040404040400..", + "....00000000000000000000000000..", +}; diff --git a/bureau/admin/icon/sxi.png b/bureau/admin/icon/sxi.png new file mode 100644 index 00000000..63dda9b0 --- /dev/null +++ b/bureau/admin/icon/sxi.png @@ -0,0 +1,30 @@ +/* XPM */ +static char * _008_presentation_document_xpm[] = { +/* width height ncols cpp */ +"16 16 8 2", + /* Colors */ + "00 c #000000", + "01 c #800000", + "02 c #800080", + "03 c #C0C0C0", + "04 c #808080", + "05 c #0000FF", + "06 c #FFFFFF", + ".. s None c None", + "....04040404040404040404040400..", + "....04060606060606060606060300..", + "....04030303030303030303030300..", + "....04000000000000000000000000..", + "....04060006060606060606000300..", + "....04060006010101030602000300..", + "....04060006030303060502000300..", + "....04060006010103050002000300..", + "....04060003030303030303000300..", + "....04060000000000000000000300..", + "....04060606060300030606060300..", + "....04060606060400040606060300..", + "....04060606030003000306060300..", + "....04060606000306030006060300..", + "....04030303030303030303030300..", + "....00000000000000000000000000..", +}; diff --git a/bureau/admin/icon/sxw.png b/bureau/admin/icon/sxw.png new file mode 100644 index 00000000..3234eaa9 --- /dev/null +++ b/bureau/admin/icon/sxw.png @@ -0,0 +1,28 @@ +/* XPM */ +static char * _002_text_document_xpm[] = { +/* width height ncols cpp */ +"16 16 6 2", + /* Colors */ + "00 c #000000", + "01 c #C0C0C0", + "02 c #808080", + "03 c #0000FF", + "04 c #FFFFFF", + ".. s None c None", + "....02020202020202020202020200..", + "....02040404040404040404040100..", + "....02040404040404040202020100..", + "....02040404040404040204020100..", + "....02040303030303040202020100..", + "....02040404040404040404040100..", + "....02040303030303030303030100..", + "....02040404040404040404040100..", + "....02040303030303030304040100..", + "....02040404040404040404040100..", + "....02040303030303030303030100..", + "....02040404040404040404040100..", + "....02040303030303040404040100..", + "....02040404040404040404040100..", + "....02010101010101010101010100..", + "....00000000000000000000000000..", +}; diff --git a/bureau/admin/icon/txt.png b/bureau/admin/icon/txt.png new file mode 100644 index 00000000..c445d96e Binary files /dev/null and b/bureau/admin/icon/txt.png differ diff --git a/bureau/admin/icon/wav.png b/bureau/admin/icon/wav.png new file mode 100644 index 00000000..12feca8f Binary files /dev/null and b/bureau/admin/icon/wav.png differ diff --git a/bureau/admin/icon/winresize.gif b/bureau/admin/icon/winresize.gif new file mode 100644 index 00000000..923665d8 Binary files /dev/null and b/bureau/admin/icon/winresize.gif differ diff --git a/bureau/admin/icon/xls.png b/bureau/admin/icon/xls.png new file mode 100644 index 00000000..ca600ced Binary files /dev/null and b/bureau/admin/icon/xls.png differ diff --git a/bureau/admin/icon/zip.png b/bureau/admin/icon/zip.png new file mode 100644 index 00000000..47156d68 Binary files /dev/null and b/bureau/admin/icon/zip.png differ diff --git a/bureau/admin/index.php b/bureau/admin/index.php new file mode 100644 index 00000000..c7dd531e --- /dev/null +++ b/bureau/admin/index.php @@ -0,0 +1,82 @@ +del_session()) { + // No need to draw an error message ... + //$error=$err->errstr(); +} + +$H=getenv("HTTP_HOST"); +?> + + + +AlternC Desktop + + + + +

+$error"; ?> +

+
+
+ + + + + + +
+
+

 

+ + + + +
+ +
+ +
+ + <?php __($l); ?> +   + +
+

AlternC

+
+ + diff --git a/bureau/admin/js/alternc.js b/bureau/admin/js/alternc.js new file mode 100644 index 00000000..ba169537 --- /dev/null +++ b/bureau/admin/js/alternc.js @@ -0,0 +1,26 @@ +function help(hid) { + var top=100; /* (10-screen.height); */ + var left=100; /*(10-screen.width); */ + var largeur=700; + var hauteur=550; + window.open('/admin/aide/help.php?hid='+hid,'help','top='+top+',left='+left+',width='+largeur+',height='+hauteur); +} + +function browseforfolder(caller) { + eval("file=document."+caller+".value"); + w=window.open("browseforfolder.php?caller="+caller+"&file="+file,"browseforfolder","width=300,height=400,scrollbars,left=100,top=100"); +} + +function CheckAll() { + var fi = 1; + for (var i = 0; i < document.main.elements.length; i++) { + if(document.main.elements[i].type == 'checkbox'){ + if (fi) { + fi=0; + chk=!document.main.elements[i].checked; + } + document.main.elements[i].checked = chk; + } + } +} + diff --git a/bureau/admin/js/wz_dragdrop.js b/bureau/admin/js/wz_dragdrop.js new file mode 100644 index 00000000..4f9e6c04 --- /dev/null +++ b/bureau/admin/js/wz_dragdrop.js @@ -0,0 +1,1380 @@ +/* This notice must be untouched at all times. + +wz_dragdrop.js v. 4.53 +The latest version is available at +http://www.walterzorn.com +or http://www.devira.com +or http://www.walterzorn.de + +Copyright (c) 2002-2003 Walter Zorn. All rights reserved. +Created 26. 8. 2002 by Walter Zorn (Web: http://www.walterzorn.com ) +Last modified: 23. 4. 2004 + +This DHTML & Drag&Drop Library adds Drag&Drop functionality +to the following types of html-elements: +- images, even if not positioned via layers, + nor via stylesheets or any other kind of "hard-coding" +- relatively and absolutely positioned layers (DIV elements). +Moreover, it provides extended DHTML abilities. + +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 +at http://www.gnu.org/copyleft/gpl.html for more details. +*/ + + +// PATH TO THE TRANSPARENT 1*1 PX IMAGE (required by NS 4 as spacer) +var spacer = 'transparentpixel.gif'; + + + + +//window.onerror = new Function('return true;'); + + +// Optional commands passed to SET_DHTML() on the html-page (g: may be applied globally, i: individually) +var CLONE = 'C10nE'; // i img clone image +var COPY = 'C0pY'; // i img create copies +var DETACH_CHILDREN = 'd37aCH'; // i lyr detach images +var HORIZONTAL = 'H0r1Z'; // i img,lyr horizontally draggable only +var MAXHEIGHT = 'm7x8I'; // i img,lyr maximum height limit, " +var MAXOFFBOTTOM = 'm7xd0wN'; // i img,lyr downward offset limit +var MAXOFFLEFT = 'm7x23Ft'; // i img,lyr leftward offset limit +var MAXOFFRIGHT = 'm7x0Ff8'; // i img,lyr rightward offset limit +var MAXOFFTOP = 'm7xu9'; // i img,lyr upward offset limit +var MAXWIDTH = 'm7xW1'; // i img,lyr maximum width limit, use with resizable or scalable +var MINWIDTH = 'm1nw1'; // i img,lyr minimum width limit, " +var MINHEIGHT = 'm1n8I'; // i img,lyr minimum height limit, " +var NO_ALT = 'no81T'; // gi img disable alt and title attributes +var NO_DRAG = 'N0d4Ag'; // i img,lyr disable draggability +var RESET_Z = 'r35E7z'; // gi img,lyr reset z-index when dropped +var RESIZABLE = 'r5IZbl'; // gi img,lyr resizable if or pressed +var SCALABLE = 'SCLbl'; // gi img,lyr scalable " +var SCROLL = 'sC8lL'; // gi img,lyr enable auto scroll functionality +var VERTICAL = 'V3Rt1C'; // i img,lyr vertically draggable only + +var dd_cursors = new Array( + 'c:default', + 'c:crosshair', + 'c:e-resize', + 'c:hand', + 'c:help', + 'c:move', + 'c:n-resize', + 'c:ne-resize', + 'c:nw-resize', + 'c:s-resize', + 'c:se-resize', + 'c:sw-resize', + 'c:text', + 'c:w-resize', + 'c:wait' +); +var dd_i = dd_cursors.length; while(dd_i--) + eval('var CURSOR_' + (dd_cursors[dd_i].substring(2).toUpperCase().replace('-', '_')) + ' = "' + dd_cursors[dd_i] + '";'); + + + +function WZDD() +{ + this.n = navigator.userAgent.toLowerCase(); + this.db = (document.compatMode && document.compatMode.toLowerCase() != "backcompat")? + document.documentElement + : (document.body || null); + this.op = !!(window.opera && document.getElementById); + this.op6 = !!(this.op && !(this.db && this.db.innerHTML)); + if (this.op && !this.op6) document.onmousedown = new Function('e', + 'if (((e = e || window.event).target || e.srcElement).tagName == "IMAGE") return false;' + ); + this.ie = !!(this.n.indexOf("msie") >= 0 && document.all && this.db && !this.op); + this.iemac = !!(this.ie && this.n.indexOf("mac") >= 0); + this.ie4 = !!(this.ie && !document.getElementById); + this.n4 = !!(document.layers && typeof document.classes != "undefined"); + this.n6 = !!(typeof window.getComputedStyle != "undefined" && typeof document.createRange != "undefined"); + this.w3c = !!(!this.op && !this.ie && !this.n6 && document.getElementById); + this.ce = !!(document.captureEvents && document.releaseEvents); + this.px = (this.n4 || this.op6)? '' : 'px'; +} +var dd = new WZDD(); + +dd.Int = function(d_x, d_y) +{ + return isNaN(d_y = parseInt(d_x))? 0 : d_y; +}; + +dd.getWndW = function() +{ + return dd.Int( + (dd.db && !dd.op && dd.db.clientWidth)? dd.db.clientWidth + : (window.innerWidth || 0) + ); +}; + +dd.getWndH = function() +{ + return dd.Int( + (dd.db && !dd.op && dd.db.clientHeight)? dd.db.clientHeight + : (window.innerHeight || 0) + ); +}; + +dd.getScrollX = function() +{ + return dd.Int(window.pageXOffset || (dd.db? dd.db.scrollLeft : 0)); +}; + +dd.getScrollY = function() +{ + return dd.Int(window.pageYOffset || (dd.db? dd.db.scrollTop : 0)); +}; + +dd.getPageXY = function(d_o) +{ + if (dd.n4 && d_o) + { + dd.x = d_o.pageX || 0; + dd.y = d_o.pageY || 0; + } + else + { + dd.x = dd.y = 0; //global helper vars + while (d_o) + { + dd.x += dd.Int(d_o.offsetLeft); + dd.y += dd.Int(d_o.offsetTop); + d_o = d_o.offsetParent || null; + } + } +}; + +dd.getCssXY = function(d_o) +{ + if (d_o.div) + { + if (dd.n4) + { + d_o.cssx = d_o.div.x; + d_o.cssy = d_o.div.y; + } + else if (dd.ie4) + { + d_o.cssx = d_o.css.pixelLeft; + d_o.cssy = d_o.css.pixelTop; + } + else + { + d_o.css.left = d_o.css.top = 0 + dd.px; + dd.getPageXY(d_o.div); + d_o.cssx = d_o.x - dd.x; + d_o.cssy = d_o.y - dd.y; + d_o.css.left = d_o.cssx + dd.px; + d_o.css.top = d_o.cssy + dd.px; + } + } + else + { + d_o.cssx = 0; + d_o.cssy = 0; + } +}; + +dd.getImgW = function(d_o) +{ + return d_o? dd.Int(d_o.width) : 0; +}; + +dd.getImgH = function(d_o) +{ + return d_o? dd.Int(d_o.height) : 0; +}; + +dd.getDivW = function(d_o) +{ + return dd.Int( + dd.n4? (d_o.div? d_o.div.clip.width : 0) + : d_o.div? (d_o.div.offsetWidth || d_o.css.pixelWidth || d_o.css.width || 0) + : 0 + ); +}; + +dd.getDivH = function(d_o) +{ + return dd.Int( + dd.n4? (d_o.div? d_o.div.clip.height : 0) + : d_o.div? (d_o.div.offsetHeight || d_o.css.pixelHeight || d_o.css.height || 0) + : 0 + ); +}; + +dd.getWH = function(d_o) +{ + d_o.w = dd.getDivW(d_o); + d_o.h = dd.getDivH(d_o); + if (d_o.css) + { + d_o.css.width = d_o.w + dd.px; + d_o.css.height = d_o.h + dd.px; + d_o.dw = dd.getDivW(d_o)-d_o.w; + d_o.dh = dd.getDivH(d_o)-d_o.h; + d_o.css.width = (d_o.w-d_o.dw) + dd.px; + d_o.css.height = (d_o.h-d_o.dh) + dd.px; + } + else d_o.dw = d_o.dh = 0; +}; + +dd.getCssProp = function(d_o, d_pn6, d_pstyle, d_pn4) +{ + if (d_o && dd.n6) return ''+window.getComputedStyle(d_o, null).getPropertyValue(d_pn6); + if (d_o && d_o.currentStyle) return ''+eval('d_o.currentStyle.'+d_pstyle); + if (d_o && d_o.style) return ''+eval('d_o.style.'+d_pstyle); + if (d_o && dd.n4) return ''+eval('d_o.'+d_pn4); + return ''; +}; + +dd.getDiv = function(d_x, d_d) +{ + d_d = d_d || document; + if (dd.n4) + { + if (d_d.layers[d_x]) return d_d.layers[d_x]; + for (var d_i = d_d.layers.length; d_i--;) + { + var d_y = dd.getDiv(d_x, d_d.layers[d_i].document); + if (d_y) return d_y; + } + } + if (dd.ie) return d_d.all[d_x] || null; + if (d_d.getElementById) return d_d.getElementById(d_x) || null; + return null; +}; + +dd.getImg = function(d_o, d_nm, d_xy, d_w) +{ + d_w = d_w || window; + var d_img; + if ((d_img = d_w.document.images[d_nm]) && d_img.name == d_nm) + { + if (d_xy) + { + if (dd.n4) + { + dd.getPageXY(d_w); + d_o.defx = d_img.x + dd.x; + d_o.defy = d_img.y + dd.y; + } + else + { + dd.getPageXY(d_img); + d_o.defx = dd.x; + d_o.defy = dd.y; + } + } + return d_img; + } + if (dd.n4) for (var d_i = d_w.document.layers.length; d_i--;) + { + var d_y = dd.getImg(d_o, d_nm, d_xy, d_w.document.layers[d_i]); + if (d_y) return d_y; + } + return null; +}; + +dd.getParent = function(d_o) +{ + if (dd.n4) + { + for (var d_p, d_i = dd.elements.length; d_i--;) + { + if (!((d_p = dd.elements[d_i]).is_image) && d_p.div && (d_p.div.document.layers[d_o.name] || d_o.oimg && d_p.div.document.images[d_o.oimg.name])) + d_p.addChild(d_o, d_p.detach, 1); + } + } + else + { + var d_p = d_o.is_image? dd.getImg(d_o, d_o.oimg.name) : (d_o.div || null); + while (d_p && !!(d_p = d_p.offsetParent || d_p.parentNode || null)) + { + if (d_p.ddObj) + { + d_p.ddObj.addChild(d_o, d_p.ddObj.detach, 1); + break; + } + } + } +}; + +dd.getCmd = function(d_o, d_cmd, d_cmdStr) +{ + var d_i = d_o.id.indexOf(d_cmd), d_j, + d_y = (d_i >= 0)*1; + if (d_y) + { + d_j = d_i+d_cmd.length; + if (d_cmdStr) d_o.cmd += d_o.id.substring(d_i, d_j); + d_o.id = d_o.id.substring(0, d_i) + d_o.id.substring(d_j); + } + return d_y; +}; + +dd.getCmdVal = function(d_o, d_cmd, d_cmdStr, int0) +{ + var d_i = d_o.id.indexOf(d_cmd), d_j, + d_y = (d_o.id.indexOf(d_cmd) >= 0)? dd.Int(d_o.id.substring(d_o.id.indexOf(d_cmd)+d_cmd.length)) : int0? -1 : 0; + if (!int0 && d_y || int0 && d_y >= 0) + { + d_j = d_i+d_cmd.length+d_y.toString().length; + if (d_cmdStr) d_o.cmd += d_o.id.substring(d_i, d_j); + d_o.id = d_o.id.substring(0, d_i) + d_o.id.substring(d_j); + } + return d_y; +}; + +dd.addElt = function(d_o, d_p) +{ + dd.elements[dd.elements.length] = dd.elements[d_o.name] = d_o; + if (d_p) d_p.copies[d_p.copies.length] = d_p.copies[d_o.name] = d_o; +}; + +dd.mkWzDom = function() +{ + var d_i = dd.elements.length; while(d_i--) dd.getParent(dd.elements[d_i]); + d_i = dd.elements.length; while(d_i--) + d_o = dd.elements[d_i]; + if (d_o.children && !d_o.parent) + { + var d_j = d_o.children.length; while(d_j--) + d_o.children[d_j].setZ(d_o.z+d_o.children[d_j].z, 1); + } +}; + +dd.addProps = function(d_o) +{ + var d_i, d_c; + if (d_o.is_image) + { + d_o.div = dd.getDiv(d_o.id); + if (d_o.div && typeof d_o.div.style != "undefined") d_o.css = d_o.div.style; + d_o.nimg = (dd.n4 && d_o.div)? d_o.div.document.images[0] : (document.images[d_o.id+'NImG'] || null); + if (!d_o.noalt && !dd.noalt && d_o.nimg && d_o.oimg) + { + d_o.nimg.alt = d_o.oimg.alt || ''; + if (d_o.oimg.title) d_o.nimg.title = d_o.oimg.title; + } + d_o.bgColor = ''; + } + else + { + d_o.bgColor = dd.getCssProp(d_o.div, 'background-color','backgroundColor','bgColor').toLowerCase(); + if (dd.n6 && d_o.div) + { + if ((d_c = d_o.bgColor).indexOf('rgb') >= 0) + { + d_c = d_c.substring(4, d_c.length-1).split(','); + d_o.bgColor = '#'; + for (var d_i = 0; d_i < d_c.length; d_i++) d_o.bgColor += parseInt(d_c[d_i]).toString(0x10); + } + else d_o.bgColor = d_c; + } + } + if (dd.scalable) d_o.scalable = d_o.resizable^1; + else if (dd.resizable) d_o.resizable = d_o.scalable^1; + d_o.setZ(d_o.defz); + d_o.cursor = d_o.cursor || dd.cursor || 'auto'; + d_o._setCrs(d_o.nodrag? 'auto' : d_o.cursor); + d_o.visible = true; +}; + +dd.init = function() +{ + if (!(dd && (dd.n4 || dd.n6 || dd.ie || dd.op || dd.w3c))) return; + if (dd.op6) WINSZ(2); + else if (dd.n6 || dd.ie || dd.op && !dd.op6 || dd.w3c) dd.recalc(1); + var d_drag = (document.onmousemove == DRAG), + d_resize = (document.onmousemove == RESIZE); + if (dd.loadFunc) dd.loadFunc(); + if (d_drag && document.onmousemove != DRAG) dd.setEvtHdl(1, DRAG); + else if (d_resize && document.onmousemove != RESIZE) dd.setEvtHdl(1, RESIZE); + if ((d_drag || d_resize) && document.onmouseup != DROP) dd.setEvtHdl(2, DROP); + dd.setEvtHdl(0, PICK); +}; + +dd.finlz = function() +{ + if (dd.ie && dd.elements) + { + var d_i = dd.elements.length; while (d_i--) + dd.elements[d_i].del(); + } +}; + +dd.setEvtHdl = function(d_typ, d_func) +{ + if (!d_typ) + { + if (document.onmousedown != d_func) dd.downFunc = document.onmousedown || null; + document.onmousedown = d_func; + } + else if (d_typ&1) + { + if (document.onmousemove != d_func) dd.moveFunc = document.onmousemove || null; + document.onmousemove = d_func; + } + else + { + if (document.onmouseup != d_func) dd.upFunc = document.onmouseup || null; + document.onmouseup = d_func; + } + if (dd.ce) + { + var d_e = (!d_typ)? Event.MOUSEDOWN : (d_typ&1)? Event.MOUSEMOVE : Event.MOUSEUP; + d_func? document.captureEvents(d_e) : document.releaseEvents(d_e); + } +}; + +dd.evt = function(d_e) +{ + this.but = (this.e = d_e || window.event).which || this.e.button || 0; + this.button = (this.e.type == 'mousedown')? this.but + : (dd.e && dd.e.button)? dd.e.button + : 0; + this.src = this.e.target || this.e.srcElement || null; + this.src.tag = (this.src.tagName || this.src).toString().toLowerCase(); + this.x = dd.Int(this.e.pageX || this.e.clientX || 0); + this.y = dd.Int(this.e.pageY || this.e.clientY || 0); + if (dd.ie) + { + this.x += dd.getScrollX() - (dd.ie && !dd.iemac)*1; + this.y += dd.getScrollY() - (dd.ie && !dd.iemac)*1; + } + this.modifKey = this.e.modifiers? (this.e.modifiers&Event.SHIFT_MASK || this.e.modifiers&Event.CONTROL_MASK) + : (this.e.shiftKey || this.e.ctrlKey || false); +}; + +dd.recalc = function(d_x) +{ + if (dd.elements) + { + var d_o, d_i = dd.elements.length; while(d_i--) + { + if (!(d_o = dd.elements[d_i]).is_image && d_o.div) + { + dd.getWH(d_o); + if (d_o.div.pos_rel) + { + dd.getPageXY(d_o.div); + var d_dx = dd.x - d_o.x, d_dy = dd.y - d_o.y; + d_o.defx += d_dx; + d_o.x += d_dx; + d_o.defy += d_dy; + d_o.y += d_dy; + var d_p, d_j = d_o.children.length; while(d_j--) + { + if (!(d_p = d_o.children[d_j]).detached && (d_o != d_p.defparent || !(d_p.is_image && dd.getImg(d_p, d_p.oimg.name, 1)))) + { + d_p.defx += d_dx; + d_p.defy += d_dy; + d_p.moveBy(d_dx, d_dy); + } + } + } + } + else if (d_o.is_image && !dd.op6 && !dd.n4) + { + if (dd.n6 && d_x && !d_o.defw) d_o.resizeTo(d_o.defw = dd.getImgW(d_o.oimg), d_o.defh = dd.getImgH(d_o.oimg)); + var d_defx = d_o.defx, d_defy = d_o.defy; + if (!(d_o.parent && d_o.parent != d_o.defparent) && (d_x || !d_o.detached || d_o.horizontal || d_o.vertical) && dd.getImg(d_o, d_o.oimg.name, 1)) + d_o.moveBy(d_o.defx-d_defx, d_o.defy-d_defy); + } + } + } +}; + + + +function WINSZ(d_x) +{ + if (d_x) + { + if (dd.n4 || dd.op6 && d_x&2) + { + dd.iW = innerWidth; + dd.iH = innerHeight; + if (dd.op6) setTimeout("WINSZ()", 0x1ff); + } + window.onresize = new Function('WINSZ();'); + } + else if ((dd.n4 || dd.op6) && (innerWidth != dd.iW || innerHeight != dd.iH)) location.reload(); + else if (dd.op6) setTimeout("WINSZ()", 0x1ff); + else if (!dd.n4) setTimeout('dd.recalc()', 0xa); +} +WINSZ(1); + + + +function DDObj(d_o, d_i) +{ + this.id = d_o; + this.cmd = ''; + this.cpy_n = dd.getCmdVal(this, COPY); + this.maxoffb = dd.getCmdVal(this, MAXOFFBOTTOM, 0, 1); + this.maxoffl = dd.getCmdVal(this, MAXOFFLEFT, 0, 1); + this.maxoffr = dd.getCmdVal(this, MAXOFFRIGHT, 0, 1); + this.maxofft = dd.getCmdVal(this, MAXOFFTOP, 0, 1); + var d_j = dd_cursors.length; while(d_j--) + if (dd.getCmd(this, dd_cursors[d_j], 1)) this.cursor = dd_cursors[d_j].substring(2); + this.clone = dd.getCmd(this, CLONE, 1); + this.detach = dd.getCmd(this, DETACH_CHILDREN); + this.scalable = dd.getCmd(this, SCALABLE, 1); + this.horizontal = dd.getCmd(this, HORIZONTAL); + this.noalt = dd.getCmd(this, NO_ALT, 1); + this.nodrag = dd.getCmd(this, NO_DRAG); + this.scroll = dd.getCmd(this, SCROLL, 1); + this.resizable = dd.getCmd(this, RESIZABLE, 1); + this.re_z = dd.getCmd(this, RESET_Z, 1); + this.vertical = dd.getCmd(this, VERTICAL); + this.maxw = dd.getCmdVal(this, MAXWIDTH, 1, 1); + this.minw = Math.abs(dd.getCmdVal(this, MINWIDTH, 1, 1)); + this.maxh = dd.getCmdVal(this, MAXHEIGHT, 1, 1); + this.minh = Math.abs(dd.getCmdVal(this, MINHEIGHT, 1, 1)); + + this.name = this.id + (d_i || ''); + this.oimg = dd.getImg(this, this.id, 1); + this.is_image = !!this.oimg; + this.copies = new Array(); + this.children = new Array(); + this.parent = this.original = null; + if (this.oimg) + { + this.id += 'div' + (d_i || ''); + this.w = dd.getImgW(this.oimg); + this.h = dd.getImgH(this.oimg); + this.dw = this.dh = 0; + this.defz = dd.Int(dd.getCssProp(this.oimg, 'z-index','zIndex','zIndex')) || 1; + this.defsrc = this.src = this.oimg.src; + this.htm = ''; + this.t_htm = '
'+ + this.htm + '<\/div>'; + } + else + { + if (!!(this.div = dd.getDiv(this.id)) && typeof this.div.style != "undefined") this.css = this.div.style; + dd.getWH(this); + if (this.div) + { + this.div.ddObj = this; + this.div.pos_rel = ((this.div.parentNode? this.div.parentNode.tagName : this.div.parentElement? this.div.parentElement.tagName : '').toString().toLowerCase().indexOf('body') < 0); + } + dd.getPageXY(this.div); + this.defx = this.x = dd.x; + this.defy = this.y = dd.y; + dd.getCssXY(this); + this.defz = dd.Int(dd.getCssProp(this.div, 'z-index','zIndex','zIndex')); + } + this.defw = this.w || 0; + this.defh = this.h || 0; +} + +DDObj.prototype.moveBy = function(d_x, d_y, d_kds, d_o) +{ + if (!this.div) return; + this.x += (d_x = dd.Int(d_x)); + this.y += (d_y = dd.Int(d_y)); + if (!d_kds || this.is_image || this.parent != this.defparent) + { + (d_o = this.css || this.div).left = (this.cssx += d_x) + dd.px; + d_o.top = (this.cssy += d_y) + dd.px; + } + var d_i = this.children.length; while (d_i--) + { + if (!(d_o = this.children[d_i]).detached) d_o.moveBy(d_x, d_y, 1); + d_o.defx += d_x; + d_o.defy += d_y; + } +}; + +DDObj.prototype.moveTo = function(d_x, d_y) +{ + this.moveBy(dd.Int(d_x)-this.x, dd.Int(d_y)-this.y); +}; + +DDObj.prototype.hide = function(d_o) +{ + if (this.div) (this.css || this.div).visibility = "hidden"; + this.visible = false; + var d_i = this.children.length; while (d_i--) + if (!(d_o = this.children[d_i]).detached) d_o.hide(); +}; + +DDObj.prototype.show = function() +{ + if (this.div) (this.css || this.div).visibility = "visible"; + this.visible = true; + var d_i = this.children.length; while (d_i--) + if (!(d_o = this.children[d_i]).detached) d_o.show(); +}; + +DDObj.prototype.resizeTo = function(d_w, d_h, d_o) +{ + if (!this.div) return; + d_w = (this.w = dd.Int(d_w))-this.dw; + d_h = (this.h = dd.Int(d_h))-this.dh; + if (dd.n4) + { + this.div.resizeTo(d_w, d_h); + if (this.is_image) + { + this.write(''); + (this.nimg = this.div.document.images[0]).src = this.src; + } + } + else if (typeof this.css.pixelWidth != "undefined") + { + this.css.pixelWidth = d_w; + this.css.pixelHeight = d_h; + if (this.is_image) + { + (d_o = this.nimg.style).pixelWidth = d_w; + d_o.pixelHeight = d_h; + } + } + else + { + this.css.width = d_w + dd.px; + this.css.height = d_h + dd.px; + if (this.is_image) + { + (d_o = this.nimg).width = d_w; + d_o.height = d_h; + if (!d_o.complete) d_o.src = this.src; + } + } +}; + +DDObj.prototype.resizeBy = function(d_dw, d_dh) +{ + this.resizeTo(this.w+dd.Int(d_dw), this.h+dd.Int(d_dh)); +}; + +DDObj.prototype.swapImage = function(d_x, d_cp) +{ + if (!this.is_image || !this.nimg) return; + this.nimg.src = d_x; + this.src = this.nimg.src; + if (d_cp) + { + var d_i = this.copies.length; while (d_i--) + this.copies[d_i].src = this.copies[d_i].nimg.src = this.nimg.src; + } +}; + +DDObj.prototype.setBgColor = function(d_x, d_o) +{ + if (dd.n4 && this.div) this.div.bgColor = d_x; + else if (this.css) this.css.background = d_x; + this.bgColor = d_x; +}; + +DDObj.prototype.write = function(d_x, d_o) +{ + if (!this.div) return; + if (dd.n4) + { + (d_o = this.div.document).open(); + d_o.write(d_x); + d_o.close(); + dd.getWH(this); + } + else if (!dd.op6) + { + this.css.height = 'auto'; + this.div.innerHTML = d_x; + if (!dd.ie4) dd.recalc(); + if (dd.ie4 || dd.n6) setTimeout('dd.recalc();', 0); // n6.0: recalc twice + } +}; + +DDObj.prototype.copy = function(d_n, d_p) +{ + if (!this.oimg) return; + d_n = d_n || 1; + while (d_n--) + { + var d_l = this.copies.length, + d_o = new DDObj(this.name+this.cmd, d_l+1); + if (dd.n4) + { + d_o.id = (d_p = new Layer(d_o.w)).name; + d_p.clip.height = d_o.h; + d_p.visibility = 'show'; + (d_p = d_p.document).open(); + d_p.write(d_o.htm); + d_p.close(); + } + else if (dd.db.insertAdjacentHTML) dd.db.insertAdjacentHTML("AfterBegin", d_o.t_htm); + else if (document.createElement && dd.db && dd.db.appendChild) + { + dd.db.appendChild(d_p = document.createElement('div')); + d_p.innerHTML = d_o.htm; + d_p.id = d_o.id; + d_p.style.position = 'absolute'; + d_p.style.width = d_o.w + 'px'; + d_p.style.height = d_o.h + 'px'; + } + else if (dd.db && dd.db.innerHTML) dd.db.innerHTML += d_o.t_htm; + d_o.defz = this.defz+1+d_l; + dd.addProps(d_o); + d_o.original = this; + dd.addElt(d_o, this); + if (this.parent) + { + this.parent.addChild(d_o, this.detached); + d_o.defparent = this.defparent; + } + d_o.moveTo(d_o.defx = this.defx, d_o.defy = this.defy); + if (dd.n4) d_o.defsrc = d_o.src = this.defsrc; + d_o.swapImage(this.src); + } +}; + +DDObj.prototype.addChild = function(d_kd, detach, defp) +{ + if (typeof d_kd != "object") d_kd = dd.elements[d_kd]; + if (d_kd.parent && d_kd.parent == this || d_kd == this || !d_kd.is_image && d_kd.defparent && !defp) return; + + this.children[this.children.length] = this.children[d_kd.name] = d_kd; + d_kd.detached = detach || 0; + if (defp) d_kd.defparent = this; + else if (this == d_kd.defparent && d_kd.is_image) dd.getImg(this, d_kd.oimg.name, 1); + if (!d_kd.defparent || this != d_kd.defparent) + { + d_kd.defx = d_kd.x; + d_kd.defy = d_kd.y; + } + if (!detach) + { + d_kd.defz = d_kd.defz+this.defz-(d_kd.parent? d_kd.parent.defz : 0)+(!d_kd.is_image*1); + d_kd.setZ(d_kd.z+this.z-(d_kd.parent? d_kd.parent.z : 0)+(!d_kd.is_image*1), 1); + } + if (d_kd.parent) d_kd.parent._removeChild(d_kd, 1); + d_kd.parent = this; +}; + +DDObj.prototype._removeChild = function(d_kd, d_newp) +{ + if (typeof d_kd != "object") d_kd = this.children[d_kd]; + var d_oc = this.children, d_nc = new Array(); + for (var d_i = 0; d_i < d_oc.length; d_i++) + if (d_oc[d_i] != d_kd) d_nc[d_nc.length] = d_oc[d_i]; + this.children = d_nc; + d_kd.parent = null; + if (!d_newp) + { + d_kd.detached = d_kd.defp = 0; + if (d_kd.is_image) dd.getImg(d_kd, d_kd.oimg.name, 1); + } +}; + +DDObj.prototype.attachChild = function(d_kd) +{ + (d_kd = (typeof d_kd != "object")? this.children[d_kd]: d_kd).detached = 0; + d_kd.setZ(d_kd.defz + this.z-this.defz, 1); +}; + +DDObj.prototype.detachChild = function(d_kd) +{ + (d_kd = (typeof d_kd != "object")? this.children[d_kd]: d_kd).detached = 1; +}; + +DDObj.prototype.setZ = function(d_x, d_kds) +{ + if (d_kds) + { + var d_dz = d_x-this.z, + d_i = this.children.length; while (d_i--) + if (!(d_o = this.children[d_i]).detached) d_o.setZ(d_o.z+d_dz, 1); + } + dd.z = Math.max(dd.z, this.z = this.div? ((this.css || this.div).zIndex = d_x) : 0); +}; + +DDObj.prototype.maximizeZ = function() +{ + this.setZ(dd.z+1, 1); +}; + +DDObj.prototype._resetZ = function(d_o) +{ + if (this.re_z || dd.re_z) + { + this.setZ(this.defz); + var d_i = this.children.length; while (d_i--) + if (!(d_o = this.children[d_i]).detached) d_o.setZ(d_o.defz); + } +}; + +DDObj.prototype.setCursor = function(d_x) +{ + this._setCrs(this.cursor = (d_x.indexOf('c:')+1)? d_x.substring(2) : d_x); +}; + +DDObj.prototype._setCrs = function(d_x) +{ + if (this.css) this.css.cursor = ((!dd.ie || dd.iemac) && d_x == 'hand')? 'pointer' : d_x; +}; + +DDObj.prototype.setDraggable = function(d_x) +{ + this.nodrag = !d_x*1; + this._setCrs(d_x? this.cursor : 'auto'); +}; + +DDObj.prototype.setResizable = function(d_x) +{ + this.resizable = d_x*1; + if (d_x) this.scalable = 0; +}; + +DDObj.prototype.setScalable = function(d_x) +{ + this.scalable = d_x*1; + if (d_x) this.resizable = 0; +}; + +DDObj.prototype.del = function(d_os, d_o) +{ + if (this.parent && this.parent._removeChild) this.parent._removeChild(this); + if (this.original) + { + this.hide(); + if (this.original.copies) + { + d_os = new Array(); + for (var d_i = 0; d_i < this.original.copies.length; d_i++) + if ((d_o = this.original.copies[d_i]) != this) d_os[d_os.length] = d_os[d_o.name] = d_o; + this.original.copies = d_os; + } + } + else if (this.is_image) + { + this.hide(); + if (dd.n4 && this.oimg) this.oimg.src = this.defsrc; + else if (this.oimg && this.oimg.style) this.oimg.style.visibility = 'visible'; + } + else if (this.moveTo) + { + if (this.css) this.css.cursor = 'default'; + this.moveTo(this.defx, this.defy); + this.resizeTo(this.defw, this.defh); + } + d_os = new Array(); + for (var d_i = 0; d_i < dd.elements.length; d_i++) + { + if ((d_o = dd.elements[d_i]) != this) d_os[d_os.length] = d_os[d_o.name] = d_o; + else d_o._free(); + } + dd.elements = d_os; + if (!dd.op6 && !dd.n4) dd.recalc(); +}; + +DDObj.prototype._free = function() +{ + for (var d_i in this) + this[d_i] = null; + dd.elements[this.name] = null; +}; + + + +dd.n4RectVis = function(vis) +{ + for (var d_i = 4; d_i--;) + { + dd.rectI[d_i].visibility = dd.rectA[d_i].visibility = vis? 'show' : 'hide'; + if (vis) dd.rectI[d_i].zIndex = dd.rectA[d_i].zIndex = dd.z+2; + } +}; + +dd.n4RectPos = function(d_o, d_x, d_y, d_w, d_h) +{ + d_o.x = d_x; + d_o.y = d_y; + d_o.clip.width = d_w; + d_o.clip.height = d_h; +}; + +// NN4: draw img resize rectangle +dd.n4Rect = function(d_w, d_h) +{ + if (!dd.rectI) + { + dd.rectI = new Array(); + dd.rectA = new Array(); + } + if (!dd.rectI[0]) + { + for (var d_i = 4; d_i--;) + { + (dd.rectI[d_i] = new Layer(1)).bgColor = '#000000'; + (dd.rectA[d_i] = new Layer(1)).bgColor = '#ffffff'; + } + } + if (!dd.rectI[0].visibility || dd.rectI[0].visibility == 'hide') dd.n4RectVis(1); + dd.obj.w = d_w; + dd.obj.h = d_h; + for (var d_i = 4; d_i--;) + { + dd.n4RectPos(dd.rectI[d_i], dd.obj.x + (!(d_i-1)? (dd.obj.w-1) : 0), dd.obj.y + (!(d_i-2)? (dd.obj.h-1) : 0), d_i&1 || dd.obj.w, !(d_i&1) || dd.obj.h); + dd.n4RectPos(dd.rectA[d_i], !(d_i-1)? dd.rectI[1].x+1 : (dd.obj.x-1), !(d_i-2)? dd.rectI[2].y+1 : (dd.obj.y-1), d_i&1 || dd.obj.w+2, !(d_i&1) || dd.obj.h+2); + } +}; + +dd.reszTo = function(d_w, d_h) +{ + if (dd.n4 && dd.obj.is_image) dd.n4Rect(d_w, d_h); + else dd.obj.resizeTo(d_w, d_h); +}; + +dd.embedVis = function(d_vis) +{ + var d_o = new Array('iframe', 'applet', 'embed', 'object'); + var d_i = d_o.length; while (d_i--) + { + var d_p = dd.ie? document.all.tags(d_o[d_i]) : document.getElementsByTagName? document.getElementsByTagName(d_o[d_i]) : null; + if (d_p) + { + var d_j = d_p.length; while (d_j--) + { + var d_q = d_p[d_j]; + while (d_q.offsetParent || d_q.parentNode) + { + if ((d_q = d_q.parentNode || d_q.offsetParent || null) == dd.obj.div) + { + d_p[d_j].style.visibility = d_vis; + break; + } + } + } + } + } +}; + +dd.maxOffX = function(d_x, d_y) +{ + return ( + (dd.obj.maxoffl+1 && (d_y = dd.obj.defx-dd.obj.maxoffl)-d_x > 0 + || dd.obj.maxoffr+1 && (d_y = dd.obj.defx+dd.obj.maxoffr)-d_x < 0)? d_y + : d_x + ); +}; + +dd.maxOffY = function(d_x, d_y) +{ + return ( + (dd.obj.maxofft+1 && (d_y = dd.obj.defy-dd.obj.maxofft)-d_x > 0 + || dd.obj.maxoffb+1 && (d_y = dd.obj.defy+dd.obj.maxoffb)-d_x < 0)? d_y + : d_x + ); +}; + +dd.inWndW = function(d_x, d_y) +{ + var d_wx = dd.getScrollX(), + d_ww = dd.getWndW(); + return ( + ((d_y = d_wx+2)-d_x > 0) || ((d_y = d_wx+d_ww+dd.obj.w-2)-d_x < 0)? d_y + : d_x + ); +}; + +dd.inWndH = function(d_x, d_y) +{ + var d_wy = dd.getScrollY(), + d_wh = dd.getWndH(); + return ( + ((d_y = d_wy+2)-d_x > 0) || ((d_y = d_wy+d_wh+dd.obj.h-2)-d_x < 0)? d_y + : d_x + ); +}; + +// These two funcs limit the size of element when mouseresized. +// Implemented 22.5.2003 by Gregor Lütolf , modified by Walter Zorn +dd.limW = function(d_w) +{ + return ( + (dd.obj.minw-d_w > 0)? dd.obj.minw + : (dd.obj.maxw > 0 && dd.obj.maxw-d_w < 0)? dd.obj.maxw + : d_w + ); +}; + +dd.limH = function(d_h) +{ + return ( + (dd.obj.minh-d_h > 0)? dd.obj.minh + : (dd.obj.maxh > 0 && dd.obj.maxh-d_h < 0)? dd.obj.maxh + : d_h + ); +}; + + +// Optional autoscroll-page functionality. Courtesy Cedric Savarese. +// Implemented by Walter Zorn +function DDScroll() +{ + if (!dd.obj || !dd.obj.scroll && !dd.scroll || dd.op || dd.ie4 || dd.whratio) + { + dd.scrx = dd.scry = 0; + return; + } + var d_bnd = 0x1c, + d_wx = dd.getScrollX(), d_wy = dd.getScrollY(); + if (dd.msmoved) + { + var d_ww = dd.getWndW(), d_wh = dd.getWndH(), d_y; + dd.scrx = ((d_y = dd.e.x-d_ww-d_wx+d_bnd) > 0)? (d_y>>=2)*d_y + : ((d_y = d_wx+d_bnd-dd.e.x) > 0)? -(d_y>>=2)*d_y + : 0; + dd.scry = ((d_y = dd.e.y-d_wh-d_wy+d_bnd) > 0)? (d_y>>=2)*d_y + : ((d_y = d_wy+d_bnd-dd.e.y) > 0)? -(d_y>>=2)*d_y + : 0; + } + if (dd.scrx || dd.scry) + { + window.scrollTo( + d_wx + (dd.scrx = dd.obj.is_resized? dd.limW(dd.obj.w+dd.scrx)-dd.obj.w : dd.obj.vertical? 0 : (dd.maxOffX(dd.obj.x+dd.scrx)-dd.obj.x)), + d_wy + (dd.scry = dd.obj.is_resized? dd.limH(dd.obj.h+dd.scry)-dd.obj.h : dd.obj.horizontal? 0 : (dd.maxOffY(dd.obj.y+dd.scry)-dd.obj.y)) + ); + dd.obj.is_dragged? dd.obj.moveTo(dd.obj.x+dd.getScrollX()-d_wx, dd.obj.y+dd.getScrollY()-d_wy) + : dd.reszTo(dd.obj.w+dd.getScrollX()-d_wx, dd.obj.h+dd.getScrollY()-d_wy); + } + dd.msmoved = 0; + window.setTimeout('DDScroll()', 0x33); +} + + + +function PICK(d_ev) +{ + dd.e = new dd.evt(d_ev); + if (dd.e.x >= dd.getWndW()+dd.getScrollX() || dd.e.y >= dd.getWndH()+dd.getScrollY()) return true; // on scrollbar + var d_o, d_cmp = -1, d_i = dd.elements.length; while (d_i--) + { + d_o = dd.elements[d_i]; + if (dd.n4 && dd.e.but > 1 && dd.e.src == d_o.oimg && !d_o.clone) return false; + if (d_o.visible && dd.e.but <= 1 && !d_o.nodrag && dd.e.x >= d_o.x && dd.e.x <= d_o.x+d_o.w && dd.e.y >= d_o.y && dd.e.y <= d_o.y+d_o.h) + { + if (d_o.z > d_cmp && dd.e.src.tag.indexOf('input') < 0 && dd.e.src.tag.indexOf('textarea') < 0 && dd.e.src.tag.indexOf('select') < 0 && dd.e.src.tag.indexOf('option') < 0) + { + d_cmp = d_o.z; + dd.obj = d_o; + } + } + } + if (dd.obj) + { + dd.e.e.cancelBubble = true; + var d_rsz = dd.e.modifKey && (dd.obj.resizable || dd.obj.scalable); + if (dd.op && !dd.op6) + { + (d_o = document.getElementById('OpBlUr')).style.pixelLeft = dd.e.x; + d_o.style.pixelTop = dd.e.y; + (d_o = d_o.children[0].children[0]).focus(); + d_o.blur(); + } + else if (dd.ie && !dd.ie4) + { + if (document.selection && document.selection.empty) document.selection.empty(); + dd.db.onselectstart = function() + { + event.returnValue = false; + }; + } + if (d_rsz) + { + dd.obj._setCrs('se-resize'); + dd.obj.is_resized = 1; + dd.whratio = dd.obj.scalable? dd.obj.defw/dd.obj.defh : 0; + if (dd.ie) + { + if (dd.ie4) + { + window.dd_x = dd.getScrollX(); + window.dd_y = dd.getScrollY(); + } + setTimeout( + 'if (dd.obj && document.selection && document.selection.empty)'+ + '{'+ + 'document.selection.empty();'+ + 'if (dd.ie4) window.scrollTo(window.dd_x, window.dd_y);'+ + '}' + ,0); + } + dd.setEvtHdl(1, RESIZE); + dd.reszTo(dd.obj.w, dd.obj.h); + } + else if (!dd.obj.nodrag) + { + dd.obj.is_dragged = 1; + dd.setEvtHdl(1, DRAG); + } + dd.setEvtHdl(2, DROP); + dd.embedVis('hidden'); + dd.obj.maximizeZ(); + dd.ofx = dd.obj.x+dd.obj.w-dd.e.x; + dd.ofy = dd.obj.y+dd.obj.h-dd.e.y; + if (window.my_PickFunc) my_PickFunc(); + DDScroll(); + return !( + dd.obj.is_resized + || dd.n4 && dd.obj.is_image + || dd.n6 || dd.w3c + ); + } + if (dd.downFunc) return dd.downFunc(d_ev); + return true; +} + +function DRAG(d_ev) +{ + if (!dd.obj || !dd.obj.visible) return true; + if (dd.ie4 || dd.w3c || dd.n6 || dd.obj.children.length > 0xf) + { + if (dd.wait) return false; + dd.wait = 1; + setTimeout('dd.wait = 0;', 5); + } + dd.e = new dd.evt(d_ev); + if (dd.ie && !dd.e.but) + { + DROP(d_ev); + return true; + } + dd.msmoved = 1; + dd.obj.moveTo( + dd.obj.vertical? dd.obj.x : dd.maxOffX(dd.inWndW(dd.ofx+dd.e.x)-dd.obj.w), + dd.obj.horizontal? dd.obj.y : dd.maxOffY(dd.inWndH(dd.ofy+dd.e.y)-dd.obj.h) + ); + + if (window.my_DragFunc) my_DragFunc(); + return false; +} + +function RESIZE(d_ev) +{ + if (!dd.obj || !dd.obj.visible) return true; + if (dd.wait) return false; + dd.wait = 1; + setTimeout('dd.wait = 0;', 5); + dd.e = new dd.evt(d_ev); + if (dd.ie && !dd.e.but) + { + DROP(d_ev); + return true; + } + dd.msmoved = 1; + var d_w = dd.limW(dd.inWndW(dd.ofx+dd.e.x)-dd.obj.x); + if (!dd.whratio) var d_h = dd.limH(dd.inWndH(dd.ofy+dd.e.y)-dd.obj.y); + else + { + var d_h = dd.limH(dd.inWndH(Math.round(d_w/dd.whratio)+dd.obj.y)-dd.obj.y); + d_w = Math.round(d_h*dd.whratio); + } + dd.reszTo(d_w, d_h); + if (window.my_ResizeFunc) my_ResizeFunc(); + return false; +} + +function DROP(d_ev) +{ + if (dd.obj) + { + if (dd.obj.is_dragged) + { + if (!dd.obj.is_image) dd.getWH(dd.obj); + } + else if (dd.n4) + { + if (dd.obj.is_image) + { + dd.n4RectVis(0); + dd.obj.resizeTo(dd.obj.w, dd.obj.h); + } + } + if (!dd.n4 && !dd.op6 || !dd.obj.is_image) dd.recalc(); + dd.setEvtHdl(1, dd.moveFunc); + dd.setEvtHdl(2, dd.upFunc); + if (dd.db) dd.db.onselectstart = null; + dd.obj._setCrs(dd.obj.cursor); + dd.embedVis('visible'); + dd.obj._resetZ(); + if (window.my_DropFunc) + { + dd.e = new dd.evt(d_ev); + my_DropFunc(); + } + dd.msmoved = dd.obj.is_dragged = dd.obj.is_resized = dd.whratio = 0; + dd.obj = null; + } + dd.setEvtHdl(0, PICK); +} + + + +function SET_DHTML() +{ + dd.elements = new Array(); + var d_a = SET_DHTML.arguments, d_ai, d_htm = '', d_o, d_i = d_a.length; while (d_i--) + { + if (dd.op6) + { + var d_t0 = (new Date()).getTime(); + while ((new Date()).getTime()-d_t0 < 0x99); + } + if (!(d_ai = d_a[d_i]).indexOf('c:')) dd.cursor = d_ai.substring(2); + else if (d_ai == NO_ALT) dd.noalt = 1; + else if (d_ai == SCROLL) dd.scroll = 1; + else if (d_ai == RESET_Z) dd.re_z = 1; + else if (d_ai == RESIZABLE) dd.resizable = 1; + else if (d_ai == SCALABLE) dd.scalable = 1; + else + { + d_o = new DDObj(d_ai); + dd.addElt(d_o); + d_htm += d_o.t_htm || ''; + if (d_o.oimg && d_o.cpy_n) + { + var d_j = 0; while (d_j < d_o.cpy_n) + { + var d_p = new DDObj(d_o.name+d_o.cmd, ++d_j); + dd.addElt(d_p, d_o); + d_p.defz = d_o.defz+d_j; + d_p.original = d_o; + d_htm += d_p.t_htm; + } + } + } + } + if (dd.n4 || dd.n6 || dd.ie || dd.op || dd.w3c) document.write( + (dd.n4? '
<\/div>\n' + : (dd.op && !dd.op6)? '