Projet

Général

Profil

Révision b12817e1

Voir les différences:

plugins/pdf/inc/plugin_pdf.functions.php
194 194
	$pdf->setColor(0.8,0.8,0.8);
195 195
	$pdf->filledRectangle(25,$start_tab-5,$length_tab,15);
196 196
	$pdf->filledRectangle(25+$length_tab+5,$start_tab-5,$length_tab,15);
197
	$pdf->setColor(0.95,0.95,0.95);
198 197
	
199 198
	for($i=0;$i<13;$i++)
200
		{
199
	  {
200
	    //erics pour avoir la couleur une ligne sur deux
201
	    if($i%2){
202
	      $pdf->setColor(0.95,0.95,0.95);
203
	    }
204
	    else {
205
	      $pdf->setColor(1,1,1);
206
	    }
207
	    
201 208
		if($i<11)
202
			{
203
			$pdf->filledRectangle(25,($start_tab-25)-(20*$i),$length_tab,15);
204
			$pdf->filledRectangle(25+$length_tab+5,($start_tab-25)-(20*$i),$length_tab,15);
205
			}
209
		  {
210
		    //des lignes complètes pour l'arriere plan
211
		    $pdf->filledRectangle(25,($start_tab-20)-(15*$i),2*$length_tab+5,15);
212
		    //$pdf->filledRectangle(25+$length_tab+5,($start_tab-25)-(20*$i),$length_tab,15);
213
		  }
206 214
		else
207
			if($i==11)
208
			{
209
			$pdf->filledRectangle(25,($start_tab-25)-(20*$i),2*$length_tab+5,15);	
210
			}
211
			else
212
			{
213
			$i+=2;
214
			$pdf->filledRectangle(25,($start_tab-25)-(20*$i),2*$length_tab+5,55);
215
			}
215
		  if($i==11)
216
		    {
217
		      $pdf->filledRectangle(25,($start_tab-20)-(15*$i),2*$length_tab+5,15);	
218
		    }
219
		  else
220
		    {
221
		      $i+=2;
222
		      $pdf->filledRectangle(25,($start_tab-20)-(15*$i),2*$length_tab+5,30);
223
		    }
216 224
		}
217 225
	$pdf->restoreState();
218 226
		
219 227
	//erics on simplifie pas besoin de ca
220 228
	//	$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>'));
221
	$pdf->addText(30,$start_tab-20,9,utf8_decode('<b><i>'.$LANG["common"][16].' :</i></b> '.$computer->fields['name']));
222
	$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'])));
223
	$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'])));
224
	$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'])));
225
	$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'])));
226
	$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'])));
227
	$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'])));
228
	$pdf->addText(30,$start_tab-160,9,utf8_decode('<b><i>'.$LANG["computers"][10].' :</i></b> '.$computer->fields['os_license_number']));
229
	$pdf->addText(30,$start_tab-180,9,utf8_decode('<b><i>'.$LANG["computers"][11].' :</i></b> '.$computer->fields['os_license_id']));
229
	$pdf->addText(30,$start_tab-15,9,utf8_decode('<b><i>'.$LANG["common"][16].' :</i></b> '.$computer->fields['name']));
230
	$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'])));
231
	$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'])));
232
	$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'])));
233
	$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'])));
234
	$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'])));
235
	$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'])));
236
	$pdf->addText(30,$start_tab-120,9,utf8_decode('<b><i>'.$LANG["computers"][10].' :</i></b> '.$computer->fields['os_license_number']));
237
	$pdf->addText(30,$start_tab-135,9,utf8_decode('<b><i>'.$LANG["computers"][11].' :</i></b> '.$computer->fields['os_license_id']));
230 238
			
231 239
	if($computer->fields['ocs_import'])
232
		$pdf->addText(30,$start_tab-200,9,utf8_decode('<b><i>'.$LANG["ocsng"][6].' '.$LANG["Menu"][33].' :</i></b> '.$LANG["choice"][1]));
240
		$pdf->addText(30,$start_tab-150,9,utf8_decode('<b><i>'.$LANG["ocsng"][6].' '.$LANG["Menu"][33].' :</i></b> '.$LANG["choice"][1]));
233 241
	else
234
		$pdf->addText(30,$start_tab-200,9,utf8_decode('<b><i>'.$LANG["ocsng"][6].' '.$LANG["Menu"][33].' :</i></b> '.$LANG["choice"][0]));
235
	$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'])));
236
	$pdf->addText(30,$start_tab-260,9,utf8_decode('<b><i>'.$LANG["common"][25].' :</i></b> '));
242
		$pdf->addText(30,$start_tab-150,9,utf8_decode('<b><i>'.$LANG["ocsng"][6].' '.$LANG["Menu"][33].' :</i></b> '.$LANG["choice"][0]));
243
	$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'])));
244
	$pdf->addText(30,$start_tab-180,9,utf8_decode('<b><i>'.$LANG["common"][25].' :</i></b> '));
237 245
			
238
	$y=$start_tab-260;
246
	$y=$start_tab-195;
239 247
	$temp=utf8_decode($computer->fields['comments']);
240 248
	while($temp = $pdf->addTextWrap(105,$y,2*$length_tab-80,9,$temp))
241 249
		$y-=9;
......
249 257
		$pdf->addText($length_tab+80,$start_tab,9,utf8_decode('<b>'.$LANG["common"][26].' : '.convDateTime($computer->fields["date_mod"]).'</b>'));
250 258
	*/
251 259
			
252
	$pdf->addText($length_tab+35,$start_tab-20,9,utf8_decode('<b><i>'.$LANG["common"][18].' :</i></b> '.$computer->fields['contact']));
253
	$pdf->addText($length_tab+35,$start_tab-40,9,utf8_decode('<b><i>'.$LANG["common"][21].' :</i></b> '.$computer->fields['contact_num']));
254
	$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'])));
255
	$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'])));
256
	$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'])));
257
	$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'])));
258
	$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'])));
259
	$pdf->addText($length_tab+35,$start_tab-160,9,utf8_decode('<b><i>'.$LANG["common"][19].' :</i></b> '.$computer->fields['serial']));
260
	$pdf->addText($length_tab+35,$start_tab-180,9,utf8_decode('<b><i>'.$LANG["common"][20].' :</i></b> '.$computer->fields['otherserial']));
261
	$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'])));
262
	$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'])));
260
	$pdf->addText($length_tab+35,$start_tab-15,9,utf8_decode('<b><i>'.$LANG["common"][18].' :</i></b> '.$computer->fields['contact']));
261
	$pdf->addText($length_tab+35,$start_tab-30,9,utf8_decode('<b><i>'.$LANG["common"][21].' :</i></b> '.$computer->fields['contact_num']));
262
	$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'])));
263
	$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'])));
264
	$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'])));
265
	$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'])));
266
	$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'])));
267
	$pdf->addText($length_tab+35,$start_tab-120,9,utf8_decode('<b><i>'.$LANG["common"][19].' :</i></b> '.$computer->fields['serial']));
268
	$pdf->addText($length_tab+35,$start_tab-135,9,utf8_decode('<b><i>'.$LANG["common"][20].' :</i></b> '.$computer->fields['otherserial']));
269
	$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'])));
270
	$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'])));
263 271
	
264 272
	$start_tab = ($start_tab-20)-(20*$i) - 20;
265 273
	
......
291 299
		{
292 300
		if($i<5)
293 301
			{
294
			$pdf->filledRectangle(25,($start_tab-25)-(20*$i),$length_tab,15);
295
			$pdf->filledRectangle(25+$length_tab+5,($start_tab-25)-(20*$i),$length_tab,15);
302
			$pdf->filledRectangle(25,($start_tab-20)-(20*$i),$length_tab,15);
303
			$pdf->filledRectangle(25+$length_tab+5,($start_tab-20)-(20*$i),$length_tab,15);
296 304
			}
297 305
		else
298 306
			if($i==5)
299 307
			{
300
			$pdf->filledRectangle(25,($start_tab-25)-(20*$i),2*$length_tab+5,15);	
308
			$pdf->filledRectangle(25,($start_tab-20)-(20*$i),2*$length_tab+5,15);	
301 309
			}
302 310
			else
303 311
			{
304 312
			$i+=2;
305
			$pdf->filledRectangle(25,($start_tab-25)-(20*$i),2*$length_tab+5,55);
313
			$pdf->filledRectangle(25,($start_tab-20)-(20*$i),2*$length_tab+5,55);
306 314
			}
307 315
		}
308 316
	$pdf->restoreState();
......
452 460
			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"]));
453 461
			break;
454 462
		case CONTROL_DEVICE :;
455
			$pdf->addTextWrap($nb_x,($start_tab-25)-(25*$i),13,9,utf8_decode($val["quantity"].'x'));
456
			$pdf->addTextWrap($device_x,($start_tab-25)-(25*$i),73,9,utf8_decode($LANG["devices"][20]));
457
			$pdf->addTextWrap($design_x,($start_tab-25)-(25*$i),228,9,utf8_decode($device->fields["designation"]));
463
			$pdf->addTextWrap($nb_x,($start_tab-20)-(25*$i),13,9,utf8_decode($val["quantity"].'x'));
464
			$pdf->addTextWrap($device_x,($start_tab-20)-(25*$i),73,9,utf8_decode($LANG["devices"][20]));
465
			$pdf->addTextWrap($design_x,($start_tab-20)-(25*$i),228,9,utf8_decode($device->fields["designation"]));
458 466
			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"])));
459 467
			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"])));
460 468
			break;

Formats disponibles : Unified diff

Redmine Appliance - Powered by TurnKey Linux