Fix: W3C
This commit is contained in:
parent
89e508b8da
commit
b309cd1380
@ -32,7 +32,8 @@ For developers:
|
|||||||
sources on two repositories.
|
sources on two repositories.
|
||||||
- Removed useless code of old commercial module.
|
- Removed useless code of old commercial module.
|
||||||
- Updated wiki documentation.
|
- Updated wiki documentation.
|
||||||
|
- Better W3C standard
|
||||||
|
|
||||||
|
|
||||||
***** Changelog for 2.6 compared to 2.5 *****
|
***** Changelog for 2.6 compared to 2.5 *****
|
||||||
|
|
||||||
|
|||||||
@ -181,82 +181,11 @@ if (isset($_GET["action"]) && $_GET["action"] == 'add')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
if (isset($_GET["action"]) && $_GET["action"] == 'add_const')
|
|
||||||
{
|
|
||||||
|
|
||||||
if($_POST['type'] == 'prede')
|
|
||||||
{
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."menu_const(fk_menu, fk_constraint) VALUES(".$_POST['menuId'].",".$_POST['constraint'].")";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
$sql = "SELECT max(rowid) as maxId FROM ".MAIN_DB_PREFIX."menu_constraint";
|
|
||||||
$result = $db->query($sql);
|
|
||||||
$objc = $db->fetch_object($result);
|
|
||||||
$constraint = ($objc->maxId) + 1;
|
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."menu_constraint(rowid,action) VALUES(".$constraint.",'".$_POST['constraint']."')";
|
|
||||||
$db->query($sql);
|
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."menu_const(fk_menu, fk_constraint) VALUES(".$_POST['menuId'].",".$constraint.")";
|
|
||||||
}
|
|
||||||
|
|
||||||
$db->query($sql);
|
|
||||||
|
|
||||||
header("location:edit.php?action=edit&menuId=".$_POST['menuId']);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_GET["action"]) && $_GET["action"] == 'del_const')
|
|
||||||
{
|
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."menu_const WHERE fk_menu = ".$_GET['menuId']." AND fk_constraint = ".$_GET['constId'];
|
|
||||||
$db->query($sql);
|
|
||||||
|
|
||||||
$sql = "SELECT count(rowid) as countId FROM ".MAIN_DB_PREFIX."menu_const WHERE fk_constraint = ".$_GET['constId'];
|
|
||||||
$result = $db->query($sql);
|
|
||||||
$objc = $db->fetch_object($result);
|
|
||||||
if($objc->countId == 0)
|
|
||||||
{
|
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."menu_constraint WHERE rowid = ".$_GET['constId'];
|
|
||||||
$db->query($sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
header("location:edit.php?action=edit&menuId=".$_GET['menuId']);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Suppression
|
// Suppression
|
||||||
if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes')
|
if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes')
|
||||||
{
|
{
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
/*
|
|
||||||
$sql = "SELECT c.rowid, c.fk_constraint FROM ".MAIN_DB_PREFIX."menu_const as c WHERE c.fk_menu = ".$_GET['menuId'];
|
|
||||||
$res = $db->query($sql);
|
|
||||||
if ($res)
|
|
||||||
{
|
|
||||||
|
|
||||||
while ($obj = $db->fetch_object($res))
|
|
||||||
{
|
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."menu_const WHERE rowid = ".$obj->rowid;
|
|
||||||
$result = $db->query($sql);
|
|
||||||
|
|
||||||
$sql = "SELECT count(rowid) as countId FROM ".MAIN_DB_PREFIX."menu_const WHERE fk_constraint = ".$obj->fk_constraint;
|
|
||||||
$result = $db->query($sql);
|
|
||||||
$objc = $db->fetch_object($result);
|
|
||||||
|
|
||||||
if($objc->countId == 0)
|
|
||||||
{
|
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."menu_constraint WHERE rowid = ".$obj->fk_constraint;
|
|
||||||
$db->query($sql);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."menu WHERE rowid = ".$_GET['menuId'];
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."menu WHERE rowid = ".$_GET['menuId'];
|
||||||
$db->query($sql);
|
$db->query($sql);
|
||||||
|
|
||||||
@ -481,101 +410,6 @@ elseif (isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
if ($mesg) print $mesg.'<br>';
|
if ($mesg) print $mesg.'<br>';
|
||||||
|
|
||||||
/*
|
|
||||||
* Lignes de contraintes
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
$sql = 'SELECT c.rowid, c.action';
|
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'menu_constraint as c, '.MAIN_DB_PREFIX.'menu_const as mc';
|
|
||||||
$sql.= ' WHERE c.rowid = mc.fk_constraint';
|
|
||||||
$sql.= ' AND mc.fk_menu = '.$_GET['menuId'];
|
|
||||||
|
|
||||||
dol_syslog("Edit: sql=".$sql, LOG_DEBUG);
|
|
||||||
$resql = $db->query($sql);
|
|
||||||
if ($resql)
|
|
||||||
{
|
|
||||||
$num = $db->num_rows($resql);
|
|
||||||
$i = 0;
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
|
||||||
if ($num)
|
|
||||||
{
|
|
||||||
print '<tr class="liste_titre">';
|
|
||||||
print '<td>'.$langs->trans('ConstraintsToShowOrNotEntry').' ('.$langs->trans("AllMustBeOk").')</td>';
|
|
||||||
print '<td width="16"> </td>';
|
|
||||||
print "</tr>\n";
|
|
||||||
}
|
|
||||||
$var=true;
|
|
||||||
|
|
||||||
$var = true;
|
|
||||||
while ($i < $num)
|
|
||||||
{
|
|
||||||
$objc = $db->fetch_object($resql);
|
|
||||||
|
|
||||||
$var = !$var;
|
|
||||||
print '<tr '.$bc[$var].'>';
|
|
||||||
print '<td>'.$objc->action.'</td>';
|
|
||||||
print '<td align="center"><a href="edit.php?action=del_const&menuId='.$_GET['menuId'].'&constId='.$objc->rowid.'">'.img_delete().'</a></td>';
|
|
||||||
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
|
||||||
print '<td>'.$langs->trans('ConstraintsToShowOrNotEntry').'</td>';
|
|
||||||
print '<td width="16"> </td>';
|
|
||||||
print "</tr>\n";
|
|
||||||
|
|
||||||
|
|
||||||
// Ajout de contraintes personalisees
|
|
||||||
print '<form action="edit.php?action=add_const" method="post">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<input type="hidden" name="menuId" value="'.$_GET['menuId'].'">';
|
|
||||||
print '<input type="hidden" name="type" value="perso">';
|
|
||||||
|
|
||||||
$var=true;
|
|
||||||
print '<tr '.$bc[$var].'>';
|
|
||||||
print ' <td><textarea cols="70" name="constraint" rows="1"></textarea></td>';
|
|
||||||
print ' <td align="center"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td>';
|
|
||||||
print '</tr>';
|
|
||||||
print '</form>';
|
|
||||||
|
|
||||||
|
|
||||||
// Ajout de contraintes predefinis
|
|
||||||
print '<form action="edit.php?action=add_const" method="post">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<input type="hidden" name="menuId" value="'.$_GET['menuId'].'">';
|
|
||||||
print '<input type="hidden" name="type" value="prede">';
|
|
||||||
|
|
||||||
$var=!$var;
|
|
||||||
print '<tr '.$bc[$var].'>';
|
|
||||||
print '<td>';
|
|
||||||
print '<select name="constraint">';
|
|
||||||
$sql = 'SELECT c.rowid, c.action FROM '.MAIN_DB_PREFIX.'menu_constraint as c ORDER BY c.action';
|
|
||||||
$resql = $db->query($sql);
|
|
||||||
$num = $db->num_rows($resql);
|
|
||||||
$i = 0;
|
|
||||||
while ($i < $num)
|
|
||||||
{
|
|
||||||
$objc = $db->fetch_object($resql);
|
|
||||||
print '<option value="'.$objc->rowid.'">'.dol_trunc($objc->action,70).'</option>';
|
|
||||||
$i++;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
print '</select>';
|
|
||||||
print '</td>';
|
|
||||||
print '<td align="center"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
print '</form>';
|
|
||||||
|
|
||||||
print '</table>';
|
|
||||||
$db->free($resql);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -156,34 +156,6 @@ if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes')
|
|||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
/*
|
|
||||||
$sql = "SELECT c.rowid, c.fk_constraint";
|
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."menu_const as c";
|
|
||||||
$sql.= " WHERE c.fk_menu = ".$_GET['menuId'];
|
|
||||||
$res = $db->query($sql);
|
|
||||||
if ($res)
|
|
||||||
{
|
|
||||||
while ($obj = $db->fetch_object ($res))
|
|
||||||
{
|
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."menu_const";
|
|
||||||
$sql.= " WHERE rowid = ".$obj->rowid;
|
|
||||||
$db->query($sql); // Do not test error since table can does not exists
|
|
||||||
|
|
||||||
$sql = "SELECT count(rowid) as countId";
|
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."menu_const";
|
|
||||||
$sql.= " WHERE fk_constraint = ".$obj->fk_constraint;
|
|
||||||
$result = $db->query($sql);
|
|
||||||
$objc = $db->fetch_object($result);
|
|
||||||
|
|
||||||
if($objc->countId == 0)
|
|
||||||
{
|
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."menu_constraint WHERE rowid = ".$obj->fk_constraint;
|
|
||||||
$db->query($sql);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."menu";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."menu";
|
||||||
$sql.= " WHERE rowid = ".$_GET['menuId'];
|
$sql.= " WHERE rowid = ".$_GET['menuId'];
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
@ -205,8 +177,9 @@ if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes')
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Affichage page
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$html=new Form($db);
|
$html=new Form($db);
|
||||||
$htmladmin=new FormAdmin($db);
|
$htmladmin=new FormAdmin($db);
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@ function printBookmarksList ($aDb, $aLangs)
|
|||||||
$ret = '';
|
$ret = '';
|
||||||
// Menu bookmark
|
// Menu bookmark
|
||||||
$ret.= '<div class="menu_titre">';
|
$ret.= '<div class="menu_titre">';
|
||||||
$ret.= '<table class="nobordernopadding" width="100%"><tr class="no"><td>';
|
$ret.= '<table class="nobordernopadding" width="100%" summary="bookmarkstable"><tr class="no"><td>';
|
||||||
$ret.= '<a class="vmenu" href="'.DOL_URL_ROOT.'/bookmarks/liste.php">'.$langs->trans('Bookm').'</a>';
|
$ret.= '<a class="vmenu" href="'.DOL_URL_ROOT.'/bookmarks/liste.php">'.$langs->trans('Bookm').'</a>';
|
||||||
$ret.= '</td><td align="right">';
|
$ret.= '</td><td align="right">';
|
||||||
if ($user->rights->bookmark->creer)
|
if ($user->rights->bookmark->creer)
|
||||||
|
|||||||
@ -117,14 +117,14 @@ class ModeleBoxes
|
|||||||
if (! empty($head['text']) || ! empty($head['sublink']))
|
if (! empty($head['text']) || ! empty($head['sublink']))
|
||||||
{
|
{
|
||||||
print '<div id="boxto_'.$this->box_id.'_title">'."\n";
|
print '<div id="boxto_'.$this->box_id.'_title">'."\n";
|
||||||
print '<table width="100%" class="noborder">'."\n";
|
print '<table summary="boxtabletitle'.$this->box_id.'" width="100%" class="noborder">'."\n";
|
||||||
print '<tr class="box_titre">';
|
print '<tr class="box_titre">';
|
||||||
print '<td';
|
print '<td';
|
||||||
if ($nbcol > 0) { print ' colspan="'.$nbcol.'"'; }
|
if ($nbcol > 0) { print ' colspan="'.$nbcol.'"'; }
|
||||||
print '>';
|
print '>';
|
||||||
if ($conf->use_javascript_ajax)
|
if ($conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td align="left">';
|
print '<table summary="" class="nobordernopadding" width="100%"><tr><td align="left">';
|
||||||
}
|
}
|
||||||
if (! empty($head['text']))
|
if (! empty($head['text']))
|
||||||
{
|
{
|
||||||
@ -151,7 +151,7 @@ class ModeleBoxes
|
|||||||
// Show box lines
|
// Show box lines
|
||||||
if ($nblines)
|
if ($nblines)
|
||||||
{
|
{
|
||||||
print '<table width="100%" class="noborder">'."\n";
|
print '<table summary="boxtablelines'.$this->box_id.'" width="100%" class="noborder">'."\n";
|
||||||
// Loop on each record
|
// Loop on each record
|
||||||
for ($i=0, $n=$nblines; $i < $n; $i++)
|
for ($i=0, $n=$nblines; $i < $n; $i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -64,7 +64,7 @@ class MenuTop {
|
|||||||
$_SESSION["leftmenuopened"]="";
|
$_SESSION["leftmenuopened"]="";
|
||||||
|
|
||||||
|
|
||||||
print '<table class="tmenu"><tr class="tmenu">';
|
print '<table class="tmenu" summary="topmenu"><tr class="tmenu">';
|
||||||
|
|
||||||
// Home
|
// Home
|
||||||
$class="";
|
$class="";
|
||||||
|
|||||||
@ -64,7 +64,7 @@ class MenuTop {
|
|||||||
$_SESSION["leftmenuopened"]="";
|
$_SESSION["leftmenuopened"]="";
|
||||||
|
|
||||||
|
|
||||||
print '<table class="tmenu"><tr class="tmenu">';
|
print '<table class="tmenu" summary="topmenu"><tr class="tmenu">';
|
||||||
|
|
||||||
// Home
|
// Home
|
||||||
$class="";
|
$class="";
|
||||||
|
|||||||
@ -51,7 +51,7 @@ class MenuTop {
|
|||||||
{
|
{
|
||||||
global $user,$conf,$langs,$dolibarr_main_db_name;;
|
global $user,$conf,$langs,$dolibarr_main_db_name;;
|
||||||
|
|
||||||
print '<table class="tmenu"><tr class="tmenu">';
|
print '<table class="tmenu" summary="topmenu"><tr class="tmenu">';
|
||||||
|
|
||||||
// Menu Home
|
// Menu Home
|
||||||
print '<td class="tmenu"><a href="'.DOL_URL_ROOT.'/index.php?mainmenu=home">'.$langs->trans("Home").'</a></td>';
|
print '<td class="tmenu"><a href="'.DOL_URL_ROOT.'/index.php?mainmenu=home">'.$langs->trans("Home").'</a></td>';
|
||||||
|
|||||||
@ -64,7 +64,7 @@ class MenuTop {
|
|||||||
$_SESSION["leftmenuopened"]="";
|
$_SESSION["leftmenuopened"]="";
|
||||||
|
|
||||||
|
|
||||||
print '<table class="tmenu"><tr class="tmenu">';
|
print '<table class="tmenu" summary="topmenu"><tr class="tmenu">';
|
||||||
|
|
||||||
// Home
|
// Home
|
||||||
$class="";
|
$class="";
|
||||||
|
|||||||
@ -808,7 +808,7 @@ function top_menu($head, $title='', $target='')
|
|||||||
{
|
{
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
print '<div class="fiche">'."\n";
|
print '<div class="fiche">'."\n";
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%" summary="">';
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $langs->trans("UpdateRequired",DOL_URL_ROOT.'/install/index.php');
|
print $langs->trans("UpdateRequired",DOL_URL_ROOT.'/install/index.php');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -905,7 +905,7 @@ function left_menu($menu_array, $helppagename='', $moresearchform='')
|
|||||||
$bookmarks='';
|
$bookmarks='';
|
||||||
|
|
||||||
// print '<div class="vmenuplusfiche">'."\n";
|
// print '<div class="vmenuplusfiche">'."\n";
|
||||||
print '<table width="100%" class="notopnoleftnoright"><tr><td class="vmenu" valign="top">';
|
print '<table width="100%" class="notopnoleftnoright" summary="leftmenutable"><tr><td class="vmenu" valign="top">';
|
||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user