commit b12817e1fc98b28a7acb58c82379c56cb60b9fdd
Author: Eric Seigne <eric.seigne@ryxeo.com>
Date:   Fri Aug 6 10:18:38 2010 +0200

    amelioration de la 1ere partie du tableau pdf

diff --git a/plugins/pdf/inc/plugin_pdf.functions.php b/plugins/pdf/inc/plugin_pdf.functions.php
index 7755247..8a558a2 100644
--- a/plugins/pdf/inc/plugin_pdf.functions.php
+++ b/plugins/pdf/inc/plugin_pdf.functions.php
@@ -194,48 +194,56 @@ function plugin_pdf_config_computer($tab,$width,$ID){
 	$pdf->setColor(0.8,0.8,0.8);
 	$pdf->filledRectangle(25,$start_tab-5,$length_tab,15);
 	$pdf->filledRectangle(25+$length_tab+5,$start_tab-5,$length_tab,15);
-	$pdf->setColor(0.95,0.95,0.95);
 	
 	for($i=0;$i<13;$i++)
-		{
+	  {
+	    //erics pour avoir la couleur une ligne sur deux
+	    if($i%2){
+	      $pdf->setColor(0.95,0.95,0.95);
+	    }
+	    else {
+	      $pdf->setColor(1,1,1);
+	    }
+	    
 		if($i<11)
-			{
-			$pdf->filledRectangle(25,($start_tab-25)-(20*$i),$length_tab,15);
-			$pdf->filledRectangle(25+$length_tab+5,($start_tab-25)-(20*$i),$length_tab,15);
-			}
+		  {
+		    //des lignes complètes pour l'arriere plan
+		    $pdf->filledRectangle(25,($start_tab-20)-(15*$i),2*$length_tab+5,15);
+		    //$pdf->filledRectangle(25+$length_tab+5,($start_tab-25)-(20*$i),$length_tab,15);
+		  }
 		else
-			if($i==11)
-			{
-			$pdf->filledRectangle(25,($start_tab-25)-(20*$i),2*$length_tab+5,15);	
-			}
-			else
-			{
-			$i+=2;
-			$pdf->filledRectangle(25,($start_tab-25)-(20*$i),2*$length_tab+5,55);
-			}
+		  if($i==11)
+		    {
+		      $pdf->filledRectangle(25,($start_tab-20)-(15*$i),2*$length_tab+5,15);	
+		    }
+		  else
+		    {
+		      $i+=2;
+		      $pdf->filledRectangle(25,($start_tab-20)-(15*$i),2*$length_tab+5,30);
+		    }
 		}
 	$pdf->restoreState();
 		
 	//erics on simplifie pas besoin de ca
 	//	$pdf->addText(100,$start_tab,9,utf8_decode('<b>'.$LANG["common"][2].' '.$computer->fields['ID'].' ('.plugin_pdf_getDropdownName('glpi_entities',$computer->fields['FK_entities']).')</b>'));
-	$pdf->addText(30,$start_tab-20,9,utf8_decode('<b><i>'.$LANG["common"][16].' :</i></b> '.$computer->fields['name']));
-	$pdf->addText(30,$start_tab-40,9,utf8_decode('<b><i>'.$LANG["common"][17].' :</i></b> '.plugin_pdf_getDropdownName('glpi_type_computers',$computer->fields['type'])));
-	$pdf->addText(30,$start_tab-60,9,utf8_decode('<b><i>'.$LANG["common"][22].' :</i></b> '.plugin_pdf_getDropdownName('glpi_dropdown_model',$computer->fields['model'])));
-	$pdf->addText(30,$start_tab-80,9,utf8_decode('<b><i>'.$LANG["common"][5].' :</i></b> '.plugin_pdf_getDropdownName('glpi_dropdown_manufacturer',$computer->fields['FK_glpi_enterprise'])));
-	$pdf->addText(30,$start_tab-100,9,utf8_decode('<b><i>'.$LANG["computers"][9].' :</i></b> '.plugin_pdf_getDropdownName('glpi_dropdown_os',$computer->fields['os'])));
-	$pdf->addText(30,$start_tab-120,9,utf8_decode('<b><i>'.$LANG["computers"][52].' :</i></b> '.plugin_pdf_getDropdownName('glpi_dropdown_os_version',$computer->fields['os_version'])));
-	$pdf->addText(30,$start_tab-140,9,utf8_decode('<b><i>'.$LANG["computers"][53].' :</i></b> '.plugin_pdf_getDropdownName('glpi_dropdown_os_sp',$computer->fields['os_sp'])));
-	$pdf->addText(30,$start_tab-160,9,utf8_decode('<b><i>'.$LANG["computers"][10].' :</i></b> '.$computer->fields['os_license_number']));
-	$pdf->addText(30,$start_tab-180,9,utf8_decode('<b><i>'.$LANG["computers"][11].' :</i></b> '.$computer->fields['os_license_id']));
+	$pdf->addText(30,$start_tab-15,9,utf8_decode('<b><i>'.$LANG["common"][16].' :</i></b> '.$computer->fields['name']));
+	$pdf->addText(30,$start_tab-30,9,utf8_decode('<b><i>'.$LANG["common"][17].' :</i></b> '.plugin_pdf_getDropdownName('glpi_type_computers',$computer->fields['type'])));
+	$pdf->addText(30,$start_tab-45,9,utf8_decode('<b><i>'.$LANG["common"][22].' :</i></b> '.plugin_pdf_getDropdownName('glpi_dropdown_model',$computer->fields['model'])));
+	$pdf->addText(30,$start_tab-60,9,utf8_decode('<b><i>'.$LANG["common"][5].' :</i></b> '.plugin_pdf_getDropdownName('glpi_dropdown_manufacturer',$computer->fields['FK_glpi_enterprise'])));
+	$pdf->addText(30,$start_tab-75,9,utf8_decode('<b><i>'.$LANG["computers"][9].' :</i></b> '.plugin_pdf_getDropdownName('glpi_dropdown_os',$computer->fields['os'])));
+	$pdf->addText(30,$start_tab-90,9,utf8_decode('<b><i>'.$LANG["computers"][52].' :</i></b> '.plugin_pdf_getDropdownName('glpi_dropdown_os_version',$computer->fields['os_version'])));
+	$pdf->addText(30,$start_tab-105,9,utf8_decode('<b><i>'.$LANG["computers"][53].' :</i></b> '.plugin_pdf_getDropdownName('glpi_dropdown_os_sp',$computer->fields['os_sp'])));
+	$pdf->addText(30,$start_tab-120,9,utf8_decode('<b><i>'.$LANG["computers"][10].' :</i></b> '.$computer->fields['os_license_number']));
+	$pdf->addText(30,$start_tab-135,9,utf8_decode('<b><i>'.$LANG["computers"][11].' :</i></b> '.$computer->fields['os_license_id']));
 			
 	if($computer->fields['ocs_import'])
-		$pdf->addText(30,$start_tab-200,9,utf8_decode('<b><i>'.$LANG["ocsng"][6].' '.$LANG["Menu"][33].' :</i></b> '.$LANG["choice"][1]));
+		$pdf->addText(30,$start_tab-150,9,utf8_decode('<b><i>'.$LANG["ocsng"][6].' '.$LANG["Menu"][33].' :</i></b> '.$LANG["choice"][1]));
 	else
-		$pdf->addText(30,$start_tab-200,9,utf8_decode('<b><i>'.$LANG["ocsng"][6].' '.$LANG["Menu"][33].' :</i></b> '.$LANG["choice"][0]));
-	$pdf->addText(30,$start_tab-240,9,utf8_decode('<b><i>'.$LANG["common"][15].' :</i></b> '.plugin_pdf_getDropdownName('glpi_dropdown_locations',$computer->fields['location'])));
-	$pdf->addText(30,$start_tab-260,9,utf8_decode('<b><i>'.$LANG["common"][25].' :</i></b> '));
+		$pdf->addText(30,$start_tab-150,9,utf8_decode('<b><i>'.$LANG["ocsng"][6].' '.$LANG["Menu"][33].' :</i></b> '.$LANG["choice"][0]));
+	$pdf->addText(30,$start_tab-165,9,utf8_decode('<b><i>'.$LANG["common"][15].' :</i></b> '.plugin_pdf_getDropdownName('glpi_dropdown_locations',$computer->fields['location'])));
+	$pdf->addText(30,$start_tab-180,9,utf8_decode('<b><i>'.$LANG["common"][25].' :</i></b> '));
 			
-	$y=$start_tab-260;
+	$y=$start_tab-195;
 	$temp=utf8_decode($computer->fields['comments']);
 	while($temp = $pdf->addTextWrap(105,$y,2*$length_tab-80,9,$temp))
 		$y-=9;
@@ -249,17 +257,17 @@ function plugin_pdf_config_computer($tab,$width,$ID){
 		$pdf->addText($length_tab+80,$start_tab,9,utf8_decode('<b>'.$LANG["common"][26].' : '.convDateTime($computer->fields["date_mod"]).'</b>'));
 	*/
 			
-	$pdf->addText($length_tab+35,$start_tab-20,9,utf8_decode('<b><i>'.$LANG["common"][18].' :</i></b> '.$computer->fields['contact']));
-	$pdf->addText($length_tab+35,$start_tab-40,9,utf8_decode('<b><i>'.$LANG["common"][21].' :</i></b> '.$computer->fields['contact_num']));
-	$pdf->addText($length_tab+35,$start_tab-60,9,utf8_decode('<b><i>'.$LANG["common"][34].' :</i></b> '.plugin_pdf_getDropdownName('glpi_users',$computer->fields['FK_users'])));
-	$pdf->addText($length_tab+35,$start_tab-80,9,utf8_decode('<b><i>'.$LANG["common"][35].' :</i></b> '.plugin_pdf_getDropdownName('glpi_groups',$computer->fields['FK_groups'])));
-	$pdf->addText($length_tab+35,$start_tab-100,9,utf8_decode('<b><i>'.$LANG["common"][10].' :</i></b> '.plugin_pdf_getDropdownName('glpi_users',$computer->fields['tech_num'])));
-	$pdf->addText($length_tab+35,$start_tab-120,9,utf8_decode('<b><i>'.$LANG["setup"][88].' :</i></b> '.plugin_pdf_getDropdownName('glpi_dropdown_network',$computer->fields['network'])));
-	$pdf->addText($length_tab+35,$start_tab-140,9,utf8_decode('<b><i>'.$LANG["setup"][89].' :</i></b> '.plugin_pdf_getDropdownName('glpi_dropdown_domain',$computer->fields['domain'])));
-	$pdf->addText($length_tab+35,$start_tab-160,9,utf8_decode('<b><i>'.$LANG["common"][19].' :</i></b> '.$computer->fields['serial']));
-	$pdf->addText($length_tab+35,$start_tab-180,9,utf8_decode('<b><i>'.$LANG["common"][20].' :</i></b> '.$computer->fields['otherserial']));
-	$pdf->addText($length_tab+35,$start_tab-200,9,utf8_decode('<b><i>'.$LANG["state"][0].' :</i></b> '.plugin_pdf_getDropdownName('glpi_dropdown_state',$computer->fields['state'])));
-	$pdf->addText($length_tab+35,$start_tab-220,9,utf8_decode('<b><i>'.$LANG["computers"][51].' :</i></b> '.plugin_pdf_getDropdownName('glpi_dropdown_auto_update',$computer->fields['auto_update'])));
+	$pdf->addText($length_tab+35,$start_tab-15,9,utf8_decode('<b><i>'.$LANG["common"][18].' :</i></b> '.$computer->fields['contact']));
+	$pdf->addText($length_tab+35,$start_tab-30,9,utf8_decode('<b><i>'.$LANG["common"][21].' :</i></b> '.$computer->fields['contact_num']));
+	$pdf->addText($length_tab+35,$start_tab-45,9,utf8_decode('<b><i>'.$LANG["common"][34].' :</i></b> '.plugin_pdf_getDropdownName('glpi_users',$computer->fields['FK_users'])));
+	$pdf->addText($length_tab+35,$start_tab-60,9,utf8_decode('<b><i>'.$LANG["common"][35].' :</i></b> '.plugin_pdf_getDropdownName('glpi_groups',$computer->fields['FK_groups'])));
+	$pdf->addText($length_tab+35,$start_tab-75,9,utf8_decode('<b><i>'.$LANG["common"][10].' :</i></b> '.plugin_pdf_getDropdownName('glpi_users',$computer->fields['tech_num'])));
+	$pdf->addText($length_tab+35,$start_tab-90,9,utf8_decode('<b><i>'.$LANG["setup"][88].' :</i></b> '.plugin_pdf_getDropdownName('glpi_dropdown_network',$computer->fields['network'])));
+	$pdf->addText($length_tab+35,$start_tab-105,9,utf8_decode('<b><i>'.$LANG["setup"][89].' :</i></b> '.plugin_pdf_getDropdownName('glpi_dropdown_domain',$computer->fields['domain'])));
+	$pdf->addText($length_tab+35,$start_tab-120,9,utf8_decode('<b><i>'.$LANG["common"][19].' :</i></b> '.$computer->fields['serial']));
+	$pdf->addText($length_tab+35,$start_tab-135,9,utf8_decode('<b><i>'.$LANG["common"][20].' :</i></b> '.$computer->fields['otherserial']));
+	$pdf->addText($length_tab+35,$start_tab-150,9,utf8_decode('<b><i>'.$LANG["state"][0].' :</i></b> '.plugin_pdf_getDropdownName('glpi_dropdown_state',$computer->fields['state'])));
+	$pdf->addText($length_tab+35,$start_tab-165,9,utf8_decode('<b><i>'.$LANG["computers"][51].' :</i></b> '.plugin_pdf_getDropdownName('glpi_dropdown_auto_update',$computer->fields['auto_update'])));
 	
 	$start_tab = ($start_tab-20)-(20*$i) - 20;
 	
@@ -291,18 +299,18 @@ function plugin_pdf_config_software($tab,$width,$ID){
 		{
 		if($i<5)
 			{
-			$pdf->filledRectangle(25,($start_tab-25)-(20*$i),$length_tab,15);
-			$pdf->filledRectangle(25+$length_tab+5,($start_tab-25)-(20*$i),$length_tab,15);
+			$pdf->filledRectangle(25,($start_tab-20)-(20*$i),$length_tab,15);
+			$pdf->filledRectangle(25+$length_tab+5,($start_tab-20)-(20*$i),$length_tab,15);
 			}
 		else
 			if($i==5)
 			{
-			$pdf->filledRectangle(25,($start_tab-25)-(20*$i),2*$length_tab+5,15);	
+			$pdf->filledRectangle(25,($start_tab-20)-(20*$i),2*$length_tab+5,15);	
 			}
 			else
 			{
 			$i+=2;
-			$pdf->filledRectangle(25,($start_tab-25)-(20*$i),2*$length_tab+5,55);
+			$pdf->filledRectangle(25,($start_tab-20)-(20*$i),2*$length_tab+5,55);
 			}
 		}
 	$pdf->restoreState();
@@ -452,9 +460,9 @@ function plugin_pdf_device($tab,$width,$ID,$type){
 			else if (!empty($device->fields["frequence"])) $pdf->addTextWrap($other_x,($start_tab-20)-(20*$i),99,9,utf8_decode('<b><i>'.$LANG["device_ram"][1].' :</i></b> '.$device->fields["frequence"]));
 			break;
 		case CONTROL_DEVICE :;
-			$pdf->addTextWrap($nb_x,($start_tab-25)-(25*$i),13,9,utf8_decode($val["quantity"].'x'));
-			$pdf->addTextWrap($device_x,($start_tab-25)-(25*$i),73,9,utf8_decode($LANG["devices"][20]));
-			$pdf->addTextWrap($design_x,($start_tab-25)-(25*$i),228,9,utf8_decode($device->fields["designation"]));
+			$pdf->addTextWrap($nb_x,($start_tab-20)-(25*$i),13,9,utf8_decode($val["quantity"].'x'));
+			$pdf->addTextWrap($device_x,($start_tab-20)-(25*$i),73,9,utf8_decode($LANG["devices"][20]));
+			$pdf->addTextWrap($design_x,($start_tab-20)-(25*$i),228,9,utf8_decode($device->fields["designation"]));
 			if (!empty($device->fields["interface"])) $pdf->addTextWrap($spec_x,($start_tab-20)-(20*$i),99,9,utf8_decode('<b><i>'.$LANG["common"][65].' :</i></b> '.plugin_pdf_getDropdownName("glpi_dropdown_interface",$device->fields["interface"])));
 			if (!empty($device->fields["raid"])) $pdf->addTextWrap($other_x,($start_tab-20)-(20*$i),103,9,utf8_decode('<b><i>'.$LANG["device_control"][0].' :</i></b> '.getYesNo($device->fields["raid"])));
 			break;
