2004-10-19 20:58:50 +02:00
|
|
|
<?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
|
2013-01-16 15:36:08 +01:00
|
|
|
* 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
|
|
|
|
|
*/
|
2004-08-29 14:01:58 +02:00
|
|
|
|
2012-08-22 23:24:21 +02:00
|
|
|
require '../main.inc.php';
|
2003-03-10 15:27:42 +01:00
|
|
|
|
2004-08-29 14:01:58 +02:00
|
|
|
$langs->load("admin");
|
|
|
|
|
|
|
|
|
|
if (!$user->admin)
|
2010-08-09 17:42:57 +02:00
|
|
|
accessforbidden();
|
2004-08-29 14:01:58 +02:00
|
|
|
|
|
|
|
|
|
2003-03-10 15:27:42 +01:00
|
|
|
llxHeader();
|
|
|
|
|
|
2004-08-29 14:01:58 +02:00
|
|
|
|
2010-08-24 16:42:18 +02:00
|
|
|
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
|
|
|
|
2009-01-31 02:17:53 +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";
|
2011-09-14 23:50:18 +02:00
|
|
|
$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\">";
|
2011-09-14 23:50:18 +02:00
|
|
|
print "<tr class=\"liste_titre\">";
|
2010-08-09 17:42:57 +02:00
|
|
|
print "<td>id</td>";
|
|
|
|
|
print "<td>Name</td>";
|
2011-09-14 23:50:18 +02:00
|
|
|
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();
|
|
|
|
|
|
2011-08-27 16:24:16 +02:00
|
|
|
llxFooter();
|
2003-03-10 15:27:42 +01:00
|
|
|
?>
|