<?php
include_once(__DIR__."/../../core.php");


	switch (filter('op')) {
		case "update" :
			require 'class/PdfLabel.php';
			$text	= $_POST['descrizione'];
			$qty	= intval($_POST['qty']);
			$skip	= intval($_POST['skip']);
			$family	= $_POST['family'];
			$size	= intval($_POST['size']);
			$format	= $_POST['format'];
			$pdf = new PdfLabel(PdfLabel::$labelFormats[$format]);
			$pdf->Open();
			$pdf->Set_Font_Size($size);
			$pdf->Set_Font_Name($family);
			$pdf->skipLabels($skip);
			for($i=0; $i<$qty; $i++)
			{
				$pdf->Add_PDF_Label($text);
			}
			$pdf->Output('labels.pdf','I');
			exit;

			break;

		
	}

?>