Skip to content
Snippets Groups Projects
Commit 7b3793c7 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix W3C on FTP setup page

parent b15535c1
No related branches found
No related tags found
No related merge requests found
<?php
/* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
......@@ -37,7 +37,12 @@ $lastftpentry=0;
$action = GETPOST('action','alpha');
$entry = GETPOST('numero_entry','alpha');
// Positionne la variable pour le nombre de rss externes
/*
* Action
*/
// Get value for $lastftpentry
$sql ="select MAX(name) as name from ".MAIN_DB_PREFIX."const";
$sql.=" WHERE name like 'FTP_SERVER_%'";
$result=$db->query($sql);
......@@ -210,8 +215,6 @@ else
<?php
print '<table class="noborder" width="100%">'."\n";
$sql ="select name, value, note from ".MAIN_DB_PREFIX."const";
$sql.=" WHERE name like 'FTP_SERVER_%'";
$sql.=" ORDER BY name";
......@@ -235,9 +238,13 @@ else
print "<form name=\"externalrssconfig\" action=\"".$_SERVER["PHP_SELF"]."\" method=\"post\">";
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="numero_entry" value="'.$idrss.'">';
print '<table class="noborder" width="100%">'."\n";
print "<tr class=\"liste_titre\">";
print "<td colspan=\"2\">".$langs->trans("FTP")." ".($idrss)."</td>";
print '<tr class="liste_titre">';
print '<td class="fieldtitle">'.$langs->trans("FTP")." ".($idrss)."</td>";
print '<td></td>';
print "</tr>";
$var=!$var;
......@@ -281,12 +288,14 @@ else
print "<input type=\"submit\" class=\"button\" name=\"modify\" value=\"".$langs->trans("Modify")."\">";
print " &nbsp; ";
print "<input type=\"submit\" class=\"button\" name=\"delete\" value=\"".$langs->trans("Delete")."\">";
print "<input type=\"hidden\" name=\"numero_entry\" value=\"".$idrss."\">";
print "</td>";
print "</tr>";
print '</table>';
print "</form>";
print '<br>';
$i++;
}
}
......@@ -294,9 +303,6 @@ else
{
dol_print_error($db);
}
print '</table>';
}
llxFooter();
......
<?php
/* Copyright (C) 2008-2009 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2008-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2008-2009 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
......@@ -20,7 +20,6 @@
* \file htdocs/ftp/index.php
* \ingroup ftp
* \brief Main page for FTP section area
* \author Laurent Destailleur
*/
require('../main.inc.php');
......@@ -418,7 +417,6 @@ else
if ($action == 'delete_section')
{
print $form->formconfirm($_SERVER["PHP_SELF"].'?numero_ftp='.$numero_ftp.'&section='.urlencode($_REQUEST["section"]).'&file='.urlencode($_GET["file"]), $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$ecmdir->label), 'confirm_deletesection','','',1);
}
print $langs->trans("Server").': <b>'.$ftp_server.'</b><br>';
......@@ -646,8 +644,21 @@ else
}
else
{
$s_ftp_server='FTP_SERVER_1';
if (empty($s_ftp_server))
$foundsetup=false;
$MAXFTP=20;
$i=1;
while ($i <= $MAXFTP)
{
$paramkey='FTP_NAME_'.$i;
//print $paramkey;
if (! empty($conf->global->$paramkey))
{
$foundsetup=true;
break;
}
$i++;
}
if (! $foundsetup)
{
print $langs->trans("SetupOfFTPClientModuleNotComplete");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment