From 2e9cf161d65d40327410a667d53238f71e4fd74e Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 22 Mar 2004 10:26:00 +0000 Subject: [PATCH] Modif look --- htdocs/comm/prospect/fiche.php | 178 ++++++++++++++++++--------------- 1 file changed, 99 insertions(+), 79 deletions(-) diff --git a/htdocs/comm/prospect/fiche.php b/htdocs/comm/prospect/fiche.php index f6b793c76cd..89b894dfc6d 100644 --- a/htdocs/comm/prospect/fiche.php +++ b/htdocs/comm/prospect/fiche.php @@ -318,25 +318,33 @@ if ($socid > 0) print ' '; + + print ''; if ($obj->propalrowid) { - print ''.$obj->libelle.''; + print ''.$obj->libelle.''; } else { - print ''.$obj->libelle.''; + print ''.img_file().' '; + print ''.$obj->libelle.''; } + print ''; /* * Contact pour cette action * */ - if ($obj->fk_contact) { - $contact = new Contact($db); - $contact->fetch($obj->fk_contact); - print ''.$contact->fullname.''; - } else { - print ' '; - } + if ($obj->fk_contact) + { + $contact = new Contact($db); + $contact->fetch($obj->fk_contact); + // print ''.$contact->fullname.''; + print ''.$contact->fullname.''; + } + else + { + print ' '; + } /* */ print ''.$obj->code.''; @@ -356,95 +364,107 @@ if ($socid > 0) * Listes des actions effectuees * */ - print ''; - print ''; - print ''; - print '
Actions effectuées
'; - - $sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; - $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; - $sql .= " WHERE a.fk_soc = $societe->id "; - $sql .= " AND u.rowid = a.fk_user_author"; - $sql .= " AND c.id=a.fk_action AND a.percent = 100"; - $sql .= " ORDER BY a.datea DESC, a.id DESC"; if ( $db->query($sql) ) { - print ''; - + $i = 0 ; $num = $db->num_rows(); - $oldyear=''; - $oldmonth=''; - while ($i < $num) + + if ($num) { - $var = !$var; + + print '
'; + print ''; + print ''; + print '"; + $sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; + $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; + $sql .= " WHERE a.fk_soc = $societe->id "; + $sql .= " AND u.rowid = a.fk_user_author"; + $sql .= " AND c.id=a.fk_action AND a.percent = 100"; + $sql .= " ORDER BY a.datea DESC, a.id DESC"; - if ($oldyear == strftime("%Y",$obj->da) ) - { - print ''; - } - else - { - print "\n"; - $oldyear = strftime("%Y",$obj->da); - } + print '
Actions effectuées
'; - $obj = $db->fetch_object( $i); - print "
|" .strftime("%Y",$obj->da)."
'; - if ($oldmonth == strftime("%Y%b",$obj->da) ) - { - print ''; - } - else - { - print "\n"; - $oldmonth = strftime("%Y%b",$obj->da); - } - - print "\n"; - print "\n"; - print ''; - if ($obj->propalrowid) + $oldyear=''; + $oldmonth=''; + while ($i < $num) { - print ''; + $var = !$var; + + $obj = $db->fetch_object( $i); + print ""; + + if ($oldyear == strftime("%Y",$obj->da) ) + { + print ''; + } + else + { + print "\n"; + $oldyear = strftime("%Y",$obj->da); + } + + if ($oldmonth == strftime("%Y%b",$obj->da) ) + { + print ''; + } + else + { + print "\n"; + $oldmonth = strftime("%Y%b",$obj->da); + } + + print "\n"; + print "\n"; + + print ''; + + print ''; + } + else + { + print ''.img_file().' '; + print ''.$obj->libelle.''; + } + /* + * Contact pour cette action + * + */ + if ($obj->fk_contact) + { + $contact = new Contact($db); + $contact->fetch($obj->fk_contact); + print ''; + } + else + { + print ''; + } + /* + */ + print ''; + print "\n"; + $i++; } - else - { - print ''; - } - /* - * Contact pour cette action - * - */ - if ($obj->fk_contact) - { - $contact = new Contact($db); - $contact->fetch($obj->fk_contact); - print ''; - } - else - { - print ''; - } - /* - */ - print ''; - print "\n"; - $i++; - } - print "
|" .strftime("%b",$obj->da)."" .strftime("%d",$obj->da)."" .strftime("%H:%M",$obj->da)." '.$obj->libelle.'
|" .strftime("%Y",$obj->da)."|" .strftime("%b",$obj->da)."" .strftime("%d",$obj->da)."" .strftime("%H:%M",$obj->da)." '; + if ($obj->propalrowid) + { + print ''.img_file().' '; + print ''.$obj->libelle.''.$contact->fullname.' '.$obj->code.'
'.$obj->libelle.''.$contact->fullname.' '.$obj->code.'
"; - + print "
"; + print ""; + } $db->free(); } else { print $db->error(); } - print ""; + /* * * Notes sur la societe