correction de bugs sur les dates

This commit is contained in:
opensides 2004-09-08 14:40:48 +00:00
parent 13f921be0a
commit 95068b7121
6 changed files with 43 additions and 19 deletions

View File

@ -275,10 +275,23 @@ if ($_GET["action"] == 'create')
if ($_GET["afaire"] == 1) if ($_GET["afaire"] == 1)
{ {
print $html->select_date('','ac'); print $html->select_date('','ac');
} else if ($_GET["afaire"] == 2) { print '<tr><td width="10%">'.$langs->trans("Hour").'</td><td width="40%">';
print_heure_select("heure",8,20);
print '</td></tr>';
}
else if ($_GET["afaire"] == 2)
{
print $html->select_date('','ac',1,1); print $html->select_date('','ac',1,1);
} else { print '<tr><td width="10%">'.$langs->trans("Hour").'</td><td width="40%">';
print_heure_select("heure",8,20);
print '</td></tr>';
}
else
{
print $html->select_date('','ac',1,1); print $html->select_date('','ac',1,1);
print '<tr><td width="10%">'.$langs->trans("Hour").'</td><td width="40%">';
print_heure_select("heure",8,20);
print '</td></tr>';
} }
print '</td></tr>'; print '</td></tr>';

View File

@ -489,16 +489,24 @@ if ($_socid > 0)
$obj = $db->fetch_object( $i); $obj = $db->fetch_object( $i);
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
if ($oldyear == strftime("%Y",$obj->da) ) { if ($oldyear == strftime("%Y",$obj->da) )
print '<td align="center">|</td>'; {
} else { //print '<td align="center">|</td>';
print "<td align=\"center\">" .strftime("%Y",$obj->da)."</TD>\n";
}
else
{
print "<td align=\"center\">" .strftime("%Y",$obj->da)."</TD>\n"; print "<td align=\"center\">" .strftime("%Y",$obj->da)."</TD>\n";
$oldyear = strftime("%Y",$obj->da); $oldyear = strftime("%Y",$obj->da);
} }
if ($oldmonth == strftime("%Y%b",$obj->da) ) { if ($oldmonth == strftime("%Y%b",$obj->da) )
print '<td align="center">|</td>'; {
} else { //print '<td align="center">|</td>';
print "<td align=\"center\">" .strftime("%Y",$obj->da)."</TD>\n";
}
else
{
print "<td align=\"center\">" .strftime("%b",$obj->da)."</TD>\n"; print "<td align=\"center\">" .strftime("%b",$obj->da)."</TD>\n";
$oldmonth = strftime("%Y%b",$obj->da); $oldmonth = strftime("%Y%b",$obj->da);
} }

View File

@ -137,6 +137,7 @@ if ($_POST["action"] == "set")
$dir[5] = "$main_data_dir/rapport"; $dir[5] = "$main_data_dir/rapport";
$dir[6] = "$main_data_dir/images"; $dir[6] = "$main_data_dir/images";
$dir[7] = "$main_data_dir/rsscache"; $dir[7] = "$main_data_dir/rsscache";
$dir[8] = "$main_data_dir/logo";
if (! is_dir($main_dir)) if (! is_dir($main_dir))
{ {

View File

@ -65,12 +65,13 @@ if ($_GET["id"])
if ( $result ) if ( $result )
{ {
$dir = DOL_DOCUMENT_ROOT."/document/produit/".$product->id; $dir = DOL_DOCUMENT_ROOT."/documents/produit/".$product->id;
if (! file_exists($dir)) if (! file_exists($dir))
{ {
umask(0); umask(0);
mkdir(DOL_DOCUMENT_ROOT."/document"); rmdir(DOL_DOCUMENT_ROOT."/documents/produits");
mkdir(DOL_DOCUMENT_ROOT."/document/produit"); //mkdir(DOL_DOCUMENT_ROOT."/documents");
mkdir(DOL_DOCUMENT_ROOT."/documents/produit");
if (! mkdir($dir, 0755)) if (! mkdir($dir, 0755))
{ {
$mesg = $langs->trans("ErrorCanNotCreateDir",$dir); $mesg = $langs->trans("ErrorCanNotCreateDir",$dir);
@ -152,10 +153,10 @@ if ($_GET["id"])
print '<td align="center" width="50%" colspan="2">Nombre de pièces vendues</td></tr>'; print '<td align="center" width="50%" colspan="2">Nombre de pièces vendues</td></tr>';
print '<tr><td align="center" colspan="2">'; print '<tr><td align="center" colspan="2">';
print '<img src="'.DOL_URL_ROOT.'/document/produit/'.$product->id.'/vente12mois.png" alt="Ventes sur les 12 derniers mois">'; print '<img src="'.DOL_URL_ROOT.'/documents/produit/'.$product->id.'/vente12mois.png" alt="Ventes sur les 12 derniers mois">';
print '</td><td align="center" colspan="2">'; print '</td><td align="center" colspan="2">';
print '<img src="'.DOL_URL_ROOT.'/document/produit/'.$product->id.'/vendu12mois.png" alt="Ventes sur les 12 derniers mois">'; print '<img src="'.DOL_URL_ROOT.'/documents/produit/'.$product->id.'/vendu12mois.png" alt="Ventes sur les 12 derniers mois">';
print '</td></tr><tr>'; print '</td></tr><tr>';
if (file_exists($filenbvente) && filemtime($filenbvente)) if (file_exists($filenbvente) && filemtime($filenbvente))
@ -182,7 +183,7 @@ if ($_GET["id"])
print '<td align="center" width="50%" colspan="2">-</td></tr>'; print '<td align="center" width="50%" colspan="2">-</td></tr>';
print '<tr><td align="center" colspan="2">'; print '<tr><td align="center" colspan="2">';
print '<img src="'.DOL_URL_ROOT.'/document/produit/'.$product->id.'/'.$img_propal_name.'" alt="Propales sur les 12 derniers mois">'; print '<img src="'.DOL_URL_ROOT.'/documents/produit/'.$product->id.'/'.$img_propal_name.'" alt="Propales sur les 12 derniers mois">';
print '</td><td align="center" colspan="2">TODO AUTRE GRAPHIQUE'; print '</td><td align="center" colspan="2">TODO AUTRE GRAPHIQUE';

View File

@ -26,7 +26,8 @@ require("pre.inc.php");
*/ */
if ($user->societe_id > 0) if ($user->societe_id > 0)
{ {
$socid = $user->societe_id; //$socid = $user->societe_id;
$socid = $_GET["socid"];
} }
$socid = $_GET["socid"]; $socid = $_GET["socid"];
@ -62,10 +63,10 @@ if ($_GET["action"] == 'delete')
$sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def where rowid=".$_GET["actid"].";"; $sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def where rowid=".$_GET["actid"].";";
$db->query($sql); $db->query($sql);
if ($db->query($sql)) // if ($db->query($sql))
{ // {
// TODO ajouter une sécu pour la suppression // TODO ajouter une sécu pour la suppression
} //}
} }
/* /*