'.__('You don\'t have enough privileges to view this section').''); } $max_print = 50; // barcode pdf download if (isset($_SESSION['barcodes'])) { // include printed settings configuration file require SB.'admin'.DS.'admin_template'.DS.'printed_settings.inc.php'; // check for custom template settings $custom_settings = SB.'admin'.DS.$sysconf['admin_template']['dir'].DS.$sysconf['template']['theme'].DS.'printed_settings.inc.php'; if (file_exists($custom_settings)) { include $custom_settings; } // load print settings from database to override value from printed_settings file loadPrintSettings($dbs, 'barcodegen'); // chunk barcode array $chunked_barcode_arrays = array_chunk($_SESSION['barcodes'], $sysconf['print']['barcodegen']['items_per_row']); // create html ouput $html_str = ''."\n"; $html_str .= 'Document Label Print Result'."\n"; $html_str .= ''; $html_str .= ''; $html_str .= ''."\n"; $html_str .= ''."\n"; $html_str .= ''."\n"; // loop the chunked arrays to row foreach ($chunked_barcode_arrays as $barcode_rows) { $html_str .= '
'; foreach ($barcode_rows as $barcode) { $html_str .= '
'; $html_str .= ''; $html_str .= '
'; } $html_str .= '
'; } $html_str .= ''."\n"; $html_str .= ''."\n"; // unset the session unset($_SESSION['barcodes']); // write to file $print_file_name = 'barcode_gen_print_result_'.strtolower(str_replace(' ', '_', $_SESSION['uname'])).'.html'; $file_write = @file_put_contents(UPLOAD.$print_file_name, $html_str); if ($file_write) { // open result in window echo ''; } else { utility::jsAlert('ERROR! Barcodes failed to generate, possibly because '.SB.FLS.' directory is not writable'); } exit(); } // barcodes generator proccess if (isset($_POST['saveData']) AND $can_write) { if (count($_POST['barcode']) > 0) { $size = intval($_POST['size']); // create AJAX request echo ''; echo ''; } exit(); } ?> table_attr = 'align="center" class="border fullWidth" cellpadding="5" cellspacing="0"'; // initial row count $row = 1; $row_num = 6; // submit button $table->appendTableRow(array(__('Barcode Size').' : ')); // set cell attribute $table->setCellAttr($row, 0, 'colspan="3" class="alterCell"'); $row++; // barcode text fields while ($row <= $row_num) { $table->appendTableRow(array('', '', '')); $row++; } // submit button $table->appendTableRow(array('')); // set cell attribute $table->setCellAttr($row_num+1, 0, 'colspan="3" class="alterCell"'); echo '
'; echo $table->printTable(); echo '
'; // for debugging purpose only // echo ''; echo '';