dolibarr/htdocs/admin/osc-languages.php

92 lines
2.1 KiB
PHP
Raw Normal View History

<?php
2003-03-10 15:27:42 +01:00
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
2003-03-10 15:27:42 +01:00
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
2011-08-01 00:21:57 +02:00
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2003-03-10 15:27:42 +01:00
*/
2009-10-19 21:54:27 +02:00
/**
* \file htdocs/admin/osc-languages.php
* \ingroup boutique
* \brief Page d'administration/configuration du module Boutique
*/
require '../main.inc.php';
2003-03-10 15:27:42 +01:00
$langs->load("admin");
if (!$user->admin)
2010-08-09 17:42:57 +02:00
accessforbidden();
2003-03-10 15:27:42 +01:00
llxHeader();
if (! dol_strlen(OSC_DB_NAME))
2003-03-10 15:27:42 +01:00
{
2010-08-09 17:42:57 +02:00
print "Non dispo";
llxFooter();
2003-03-10 15:27:42 +01:00
}
if ($sortfield == "") {
2010-08-09 17:42:57 +02:00
$sortfield="lower(p.label),p.price";
2003-03-10 15:27:42 +01:00
}
if ($sortorder == "") {
2010-08-09 17:42:57 +02:00
$sortorder="ASC";
2003-03-10 15:27:42 +01:00
}
if ($page == -1) { $page = 0 ; }
$limit = $conf->liste_limit;
$offset = $limit * $page ;
2004-07-30 12:32:27 +02:00
print_barre_liste("Liste des langues oscommerce", $page, "osc-languages.php");
2003-03-10 15:27:42 +01:00
$sql = "SELECT l.languages_id, l.name, l.code FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."languages as l";
$sql.= $db->plimit($limit, $offset);
2003-03-10 15:27:42 +01:00
2010-08-09 17:42:57 +02:00
print "<p><TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
print "<tr class=\"liste_titre\">";
2010-08-09 17:42:57 +02:00
print "<td>id</td>";
print "<td>Name</td>";
print "<td>Code</td>";
2010-08-09 17:42:57 +02:00
print "</TR>\n";
$resql=$db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$i = 0;
$var=True;
while ($i < $num) {
$objp = $db->fetch_object($resql);
$var=!$var;
2013-06-20 09:18:12 +02:00
print "<tr ".$bc[$var].">";
2010-08-09 17:42:57 +02:00
print "<TD>$objp->languages_id</TD>\n";
print "<TD>$objp->name</TD>\n";
print "<TD>$objp->code</TD>\n";
print "</TR>\n";
$i++;
}
$db->free();
2003-03-10 15:27:42 +01:00
}
print "</TABLE>";
$db->close();
llxFooter();
2003-03-10 15:27:42 +01:00
?>