Example #1
0
/**
 * 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] . '&deg;</label>';
        $table->setText(0, $i, $text2display);
    }
    return $table;
}
Example #3
0
$default_value['a1'] = '';
$default_value['a2'] = '';
$output = intval(isset($_POST['output']) ? $_POST['output'] : $default_value['output']);
$thickness = intval(isset($_POST['thickness']) ? $_POST['thickness'] : $default_value['thickness']);
$res = intval(isset($_POST['res']) ? $_POST['res'] : $default_value['res']);
$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');
Example #4
0
$thickness = intval(isset($_POST['thickness']) ? $_POST['thickness'] : $default_value['thickness']);
$res = intval(isset($_POST['res']) ? $_POST['res'] : $default_value['res']);
$rotation = isset($_POST['rotation']) ? $_POST['rotation'] : $default_value['rotation'];
$font_family = isset($_POST['font_family']) ? $_POST['font_family'] : $default_value['font_family'];
$font_size = intval(isset($_POST['font_size']) ? $_POST['font_size'] : $default_value['font_size']);
$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');