Debut module gestion noms de domaines

This commit is contained in:
Laurent Destailleur 2007-09-15 22:42:19 +00:00
parent 9ed072aad1
commit 75877ce4ae
5 changed files with 51 additions and 13 deletions

View File

@ -1,5 +1,6 @@
<?php <?php
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* $Id$ * $Id$
* $Source$ * $Source$
@ -17,23 +18,27 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
/*
* Affichage
*/
llxHeader(); llxHeader();
print_titre("Noms de domaines internet");
$sql = "SELECT label "; $sql = "SELECT label ";
$sql .= " FROM ".MAIN_DB_PREFIX."domain ORDER BY label ASC"; $sql .= " FROM ".MAIN_DB_PREFIX."domain ORDER BY label ASC";
$result = $db->query($sql); $result = $db->query($sql);
if ($result) { if ($result)
{
$num = $db->num_rows($result);
print_barre_liste($langs->trans("DomainNames"), $page, "liste.php","",$sortfield,$sortorder,"",$num);
print "<form method=\"post\" action=\"index.php?viewall=$viewall&vline=$vline&account=$account\">"; print "<form method=\"post\" action=\"index.php?viewall=$viewall&vline=$vline&account=$account\">";
print "<input type=\"hidden\" name=\"action\" value=\"add\">"; print "<input type=\"hidden\" name=\"action\" value=\"add\">";

View File

@ -724,6 +724,13 @@ class MenuLeft {
$newmenu->add_submenu(DOL_URL_ROOT."/exports/export.php?leftmenu=export",$langs->trans("NewExport"),1, $user->rights->export->creer); $newmenu->add_submenu(DOL_URL_ROOT."/exports/export.php?leftmenu=export",$langs->trans("NewExport"),1, $user->rights->export->creer);
} }
if ($conf->global->MAIN_MODULE_DOMAIN)
{
$langs->load("domains");
$newmenu->add_submenu(DOL_URL_ROOT."/domain/index.php?leftmenu=export",$langs->trans("DomainNames"),0, $user->rights->domain->read);
$newmenu->add_submenu(DOL_URL_ROOT."/domain/fiche.php?action=create&leftmenu=export",$langs->trans("NewDomain"),1, $user->rights->domain->create);
$newmenu->add_submenu(DOL_URL_ROOT."/domain/index.php?leftmenu=export",$langs->trans("List"),1, $user->rights->domain->read);
}
} }
/* /*

View File

@ -710,6 +710,14 @@ class MenuLeft {
$newmenu->add_submenu(DOL_URL_ROOT."/exports/index.php?leftmenu=export",$langs->trans("FormatedExport"),0, $user->rights->export->lire); $newmenu->add_submenu(DOL_URL_ROOT."/exports/index.php?leftmenu=export",$langs->trans("FormatedExport"),0, $user->rights->export->lire);
$newmenu->add_submenu(DOL_URL_ROOT."/exports/export.php?leftmenu=export",$langs->trans("NewExport"),1, $user->rights->export->creer); $newmenu->add_submenu(DOL_URL_ROOT."/exports/export.php?leftmenu=export",$langs->trans("NewExport"),1, $user->rights->export->creer);
} }
if ($conf->global->MAIN_MODULE_DOMAIN)
{
$langs->load("domains");
$newmenu->add_submenu(DOL_URL_ROOT."/domain/index.php?leftmenu=export",$langs->trans("DomainNames"),0, $user->rights->domain->read);
$newmenu->add_submenu(DOL_URL_ROOT."/domain/fiche.php?action=create&leftmenu=export",$langs->trans("NewDomain"),1, $user->rights->domain->create);
$newmenu->add_submenu(DOL_URL_ROOT."/domain/index.php?leftmenu=export",$langs->trans("List"),1, $user->rights->domain->read);
}
} }
/* /*

View File

@ -86,12 +86,26 @@ class modDomain extends DolibarrModules
$this->rights_class = 'domain'; $this->rights_class = 'domain';
$r=0; $r=0;
// $this->rights[$r][0] Id permission (unique tous modules confondus) $r++;
// $this->rights[$r][1] Libellé par défaut si traduction de clé "PermissionXXX" non trouvée (XXX = Id permission) $this->rights[$r][0] = 1301;
// $this->rights[$r][2] Non utilisé $this->rights[$r][1] = 'Read domain names';
// $this->rights[$r][3] 1=Permis par defaut, 0=Non permis par defaut $this->rights[$r][2] = 'r';
// $this->rights[$r][4] Niveau 1 pour nommer permission dans code $this->rights[$r][3] = 1;
// $this->rights[$r][5] Niveau 2 pour nommer permission dans code $this->rights[$r][4] = 'read';
$r++;
$this->rights[$r][0] = 1302;
$this->rights[$r][1] = 'Create/modify domain names';
$this->rights[$r][2] = 'w';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'create';
$r++;
$this->rights[$r][0] = 1303;
$this->rights[$r][1] = 'Delete domain names';
$this->rights[$r][2] = 'd';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'delete';
// Exports // Exports
//-------- //--------

View File

@ -958,7 +958,11 @@ function llxFooter($foot='',$limitIEbug=1)
if (function_exists("memory_get_usage")) if (function_exists("memory_get_usage"))
{ {
print ' - Memory usage: '.memory_get_usage(); print ' - Memory usage: '.memory_get_usage();
} }
if (function_exists("zend_loader_file_encoded"))
{
print ' - Zend encoded file: '.(zend_loader_file_encoded()?'yes':'no');
}
print '"</script>'; print '"</script>';
print "\n"; print "\n";
} }