This commit is contained in:
Rodolphe Quiedeville 2004-02-13 17:32:22 +00:00
parent c7da59b0da
commit e11c827d19
4 changed files with 25 additions and 96 deletions

View File

@ -29,106 +29,17 @@ if ($user->societe_id > 0)
exit;
}
require("../../includes/modules/rapport/pdf_paiement.class.php");
$dir = DOL_DOCUMENT_ROOT."/document/rapport/";
if ($HTTP_POST_VARS["action"] == 'gen')
{
$rap = new pdf_paiement($db);
$rap->write_pdf_file($dir, $HTTP_POST_VARS["remonth"], $HTTP_POST_VARS["reyear"]);
$year = $HTTP_POST_VARS["reyear"];
}
llxHeader();
print_titre("Paiements");
/*
*
*
*/
print_titre("Rapport paiements");
print '<form method="post" action="index.php?year='.$year.'">';
print '<input type="hidden" name="action" value="gen">';
$cmonth = date("n", time());
$syear = date("Y", time());
$strmonth[1] = "Janvier";
$strmonth[2] = "F&eacute;vrier";
$strmonth[3] = "Mars";
$strmonth[4] = "Avril";
$strmonth[5] = "Mai";
$strmonth[6] = "Juin";
$strmonth[7] = "Juillet";
$strmonth[8] = "Ao&ucirc;t";
$strmonth[9] = "Septembre";
$strmonth[10] = "Octobre";
$strmonth[11] = "Novembre";
$strmonth[12] = "D&eacute;cembre";
print '<select name="remonth">';
for ($month = 1 ; $month < 13 ; $month++)
{
if ($month == $cmonth)
{
print "<option value=\"$month\" SELECTED>" . $strmonth[$month];
}
else
{
print "<option value=\"$month\">" . $strmonth[$month];
}
}
print "</select>";
print '<select name="reyear">';
for ($formyear = $syear - 2; $formyear < $syear +1 ; $formyear++)
{
if ($formyear == $syear)
{
print "<option value=\"$formyear\" SELECTED>$formyear";
}
else
{
print "<option value=\"$formyear\">$formyear";
}
}
print "</select>\n";
print '<input type="submit" value="Générer">';
print '</form>';
clearstatcache();
$handle=opendir($dir);
while (($file = readdir($handle))!==false)
{
if (is_dir($dir.$file) && substr($file, 0, 1) <> '.')
{
print '<a href="index.php?year='.$file.'">'.$file.'</a> ';
}
}
if ($year)
{
$handle=opendir($dir.'/'.$year);
print '<table width="100%" id="wiborder">';
print '<tr><td>Rapport</td><td>Taille</td><td>Date de génération</td></tr>';
while (($file = readdir($handle))!==false)
{
if (substr($file, 0, 8) == 'paiement')
{
$tfile = $dir . '/'.$year.'/'.$file;
print '<tr><td><a href="'.DOL_URL_ROOT.'/document/rapport/'.$year.'/'.$file.'">'.$file.'</a></td>';
print '<td align="right">'.filesize($tfile). ' bytes</td>';
print '<td align="right">'.strftime("%d %b %Y %H:%M:%S",filemtime($tfile)).'</td></tr>';
}
}
print '</table>';
}
$db->close();
llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>");

View File

@ -34,6 +34,10 @@ if ($HTTP_POST_VARS["action"] == 'add')
$contact->poste = $HTTP_POST_VARS["poste"];
$contact->address = $HTTP_POST_VARS["adresse"];
$contact->cp = $HTTP_POST_VARS["cp"];
$contact->ville = $HTTP_POST_VARS["ville"];
$contact->fax = $HTTP_POST_VARS["fax"];
$contact->note = $HTTP_POST_VARS["note"];
$contact->email = $HTTP_POST_VARS["email"];
@ -69,6 +73,10 @@ if ($action == 'update')
$contact->firstname = $HTTP_POST_VARS["firstname"];
$contact->poste = $HTTP_POST_VARS["poste"];
$contact->address = $HTTP_POST_VARS["adresse"];
$contact->cp = $HTTP_POST_VARS["cp"];
$contact->ville = $HTTP_POST_VARS["ville"];
$contact->phone_pro = $HTTP_POST_VARS["phone_pro"];
$contact->phone_perso = $HTTP_POST_VARS["phone_perso"];
$contact->phone_mobile = $HTTP_POST_VARS["phone_mobile"];
@ -104,8 +112,15 @@ print '<a href="perso.php?id='.$_GET["id"].'" class="tab">Informations personnel
print '<a class="tab" href="vcard.php?id='.$_GET["id"].'">VCard</a>';
print '<a class="tab" href="info.php?id='.$_GET["id"].'">Info</a>';
print '</div>';
print '<div class="tabBar">';
if ($mesg)
{
print '<div class="message">'.$mesg;
print '</div>';
}
print '<div class="tabBar">';
if ($_GET["socid"] > 0)
{
@ -140,7 +155,7 @@ if ($_GET["action"] == 'create')
print '<td>Portable</td><td><input name="phone_mobile" type="text" size="18" maxlength="80"></td></tr>';
print '<tr><td>CP Ville</td><td colspan="3"><input name="cp" type="text" size="6" maxlength="80">&nbsp;<input name="cp" type="text" size="20" maxlength="80"></td>';
print '<tr><td>CP Ville</td><td colspan="3"><input name="cp" type="text" size="6" maxlength="80">&nbsp;<input name="ville" type="text" size="20" maxlength="80"></td>';
print '<td>Fax</td><td><input name="fax" type="text" size="18" maxlength="80"></td></tr>';
print '<tr><td>Email</td><td colspan="3"><input name="email" type="text" size="50" maxlength="80"></td></tr>';
@ -189,8 +204,11 @@ elseif ($_GET["action"] == 'edit')
print '<tr><td>Jabberid</td><td colspan="5"><input name="jabberid" type="text" size="50" maxlength="80" value="'.$contact->jabberid.'"></td></tr>';
print '<tr><td>Note</td><td colspan="5"><textarea name="note"></textarea></td></tr>';
print '<tr><td align="center" colspan="6"><input type="submit" value="Enregistrer"></td></tr>';
print "</table>";
print '<div class="FicheSubmit"><input type="submit" value="Enregistrer">';
print "</form>";
}
else

View File

@ -49,7 +49,7 @@ $filename = $v->getFileName();
Header("Content-Disposition: attachment; filename=$filename");
Header("Content-Length: ".strlen($output));
//Header("Connection: close");
Header("Connection: close");
Header("Content-Type: text/x-vCard; name=$filename");
echo $output;

View File

@ -28,7 +28,7 @@ Rechercher une exp
<input class="flat" type="text" name="sf_ref" size="10">&nbsp;<input type="submit" value="go" class="flat">
</form>';
function llxHeader($head = "", $title="", $help_url='', $form_search='')
function llxHeader($head = "", $title="", $help_url='', $form_search='', $author='')
{
global $user, $conf, $form_search;
@ -47,6 +47,6 @@ function llxHeader($head = "", $title="", $help_url='', $form_search='')
$menu->add(DOL_URL_ROOT."/expedition/stats/", "Statistiques");
left_menu($menu->liste, $help_url, $form_search);
left_menu($menu->liste, $help_url, $form_search, $author);
}
?>