/** * Displays the resolution of the code * * @param int $number */ function display_res($number) { $table = new LSTable(1, 3, '100%', $null); $table->setTemplate('tpl_BLANK'); for ($i = 1; $i <= 3; $i++) { $text2display = ''; $text2display .= '<input type="radio" name="res" value="' . $i . '"'; if ($number === $i) { $text2display .= ' checked="checked"'; } $text2display .= ' /> ' . $i; $table->setText(0, $i - 1, $text2display); } return $table; }
/** * Displays the rotation * * @param int $rotation */ function display_rotation($rotation) { $availableRotation = array(0, 90, 180, 270); $c = count($availableRotation); $table = new LSTable(1, $c, '100%', $null); $table->setTemplate('tpl_BLANK'); for ($i = 0; $i < $c; $i++) { $text2display = ''; $text2display .= '<input type="radio" id="rotation' . $i . '" name="rotation" value="' . $availableRotation[$i] . '"'; if ($rotation == $availableRotation[$i]) { $text2display .= ' checked="checked"'; } $text2display .= ' /> <label for="rotation' . $i . '">' . $availableRotation[$i] . '°</label>'; $table->setText(0, $i, $text2display); } return $table; }
$font = intval(isset($_POST['font']) ? $_POST['font'] : $default_value['font']); $text2display = isset($_POST['text2display']) ? $_POST['text2display'] : $default_value['text2display']; $a1 = isset($_POST['a1']) ? $_POST['a1'] : $default_value['a1']; $a2 = isset($_POST['a2']) ? $_POST['a2'] : $default_value['a2']; ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?> " name="barcode_drawer" method="post"> <?php $table = new LSTable(8, 2, '500', $null); $table->setTitle('Configs for ' . $filename); $table->addRowAttribute(0, 'class', 'table_title'); $table->addCellAttribute(0, 0, 'colspan', '2'); $table->addCellAttribute(0, 0, 'align', 'center'); $table->setText(0, 0, '<font color="#ffffff"><b>General Configs</b></font>'); $table->addCellAttribute(1, 0, 'width', '100'); $table->setText(1, 0, 'Type'); $table->setText(1, 1, display_select($filename)); $table->setText(2, 0, 'Output'); $table->setText(2, 1, display_output($output)); $table->setText(3, 0, 'Thickness'); $table->setText(3, 1, display_thickness($thickness)); $table->setText(4, 0, 'Resolution'); $table->setText(4, 1, display_res($res)); $table->setText(5, 0, 'Font Size'); $table->setText(5, 1, display_font($font)); $table->setText(6, 0, 'Text'); $table->setText(6, 1, display_text($text2display)); $table->addCellAttribute(7, 0, 'align', 'center'); $table->addCellAttribute(7, 0, 'colspan', '2');
$text2display = isset($_POST['text2display']) ? $_POST['text2display'] : $default_value['text2display']; $a1 = isset($_POST['a1']) ? $_POST['a1'] : $default_value['a1']; $a2 = isset($_POST['a2']) ? $_POST['a2'] : $default_value['a2']; $a3 = isset($_POST['a3']) ? $_POST['a3'] : $default_value['a3']; ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?> " name="barcode_drawer" method="post"> <?php $table = new LSTable(10, 2, '500', $null); $table->setTitle('Configs for ' . $filename); $table->addRowAttribute(0, 'class', 'table_title'); $table->addCellAttribute(0, 0, 'colspan', '2'); $table->addCellAttribute(0, 0, 'align', 'center'); $table->setText(0, 0, '<font color="#ffffff"><b>General Configs</b></font>'); $table->addCellAttribute(1, 0, 'width', '100'); $table->setText(1, 0, 'Type'); $table->setText(1, 1, display_select($filename)); $table->setText(2, 0, 'Output'); $table->setText(2, 1, display_output($output, $dpi)); $table->setText(3, 0, 'DPI'); $table->setText(3, 1, display_dpi($output, $dpi)); $table->setText(4, 0, 'Thickness'); $table->setText(4, 1, display_thickness($thickness)); $table->setText(5, 0, 'Resolution'); $table->setText(5, 1, display_res($res)); $table->setText(6, 0, 'Rotation'); $table->setText(6, 1, display_rotation($rotation)); $table->setText(7, 0, 'Font'); $table->setText(7, 1, display_font($font_family, $font_size));