WHERE m.member_id IN(' . $member_ids . ')');
 $member_datas = array();
 while ($member_d = $member_q->fetch_assoc()) {
     if ($member_d['member_id']) {
         $member_datas[] = $member_d;
     }
 }
 // include printed settings configuration file
 include 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, 'membercard');
 // chunk cards array
 $chunked_card_arrays = array_chunk($member_datas, $sysconf['print']['membercard']['items_per_row']);
 // create html ouput
 $html_str = '<!DOCTYPE html>' . "\n";
 $html_str .= '<html><head><title>Member Card by Jushadi Arman Saz</title>' . "\n";
 $html_str .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
 $html_str .= '<meta http-equiv="Pragma" content="no-cache" /><meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate, post-check=0, pre-check=0" /><meta http-equiv="Expires" content="Fry, 02 Oct 2012 12:00:00 GMT" />';
 $html_str .= '<style type="text/css">' . "\n";
 $html_str .= '*{font:' . $sysconf['print']['membercard']['bio_font_size'] . 'px Arial, Helvetica, sans-serif;}' . "\n";
 $html_str .= 'p, li{position: relative;}' . "\n";
 $html_str .= 'p{margin-bottom: 0px;margin-top: 0px;font-weight: bold;}' . "\n";
 $html_str .= 'li{margin-bottom: 0px; margin-top: 0px;list-style-type: disc;font-size: ' . $sysconf['print']['membercard']['rules_font_size'] . 'px;}' . "\n";
 $html_str .= 'ul{margin: 0px;padding-left: 10px;}' . "\n";
 $html_str .= 'h1{margin: 0px;font-weight: bold;text-align: center;font-size:' . $sysconf['print']['membercard']['front_header1_font_size'] . 'px;}' . "\n";
 $html_str .= 'h2{margin: 0px;font-weight: bold;text-align: center;padding-bottom:3px;font-size:' . $sysconf['print']['membercard']['front_header2_font_size'] . 'px;}' . "\n";
if (isset($_GET['type'])) {
    $type = trim($_GET['type']);
}
if (!in_array($type, array('barcode', 'label', 'membercard'))) {
    $type = 'barcode';
}
// include printed settings configuration file
include 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;
}
// create form instance
$form = new simbio_form_table_AJAX('mainForm', $_SERVER['PHP_SELF'], 'post');
$form->submit_button_attr = 'name="updateSettings" value="' . __('Save Settings') . '" class="btn btn-primary"';
// form table attributes
$form->table_attr = 'align="center" id="dataList" cellpadding="5" cellspacing="0"';
$form->table_header_attr = 'class="alterCell" style="font-weight: bold;"';
$form->table_content_attr = 'class="alterCell2"';
// load print settings from database
loadPrintSettings($dbs, $type);
$form->addAnything(__('Print setting for'), ucwords($type));
foreach ($sysconf['print'][$type] as $setting_name => $val) {
    $setting_name_label = ucwords(str_ireplace('_', ' ', $setting_name));
    $form->addTextField('text', $type . '[' . $setting_name . ']', __($setting_name_label), $val, 'style="width: 90%;"');
}
$form->addHidden('settingType', $type);
// print out the object
echo $form->printOut();
/* main content end */
 WHERE i.item_code IN(' . $item_ids . ')');
 $item_data_array = array();
 while ($item_d = $item_q->fetch_row()) {
     if ($item_d[0]) {
         $item_data_array[] = $item_d;
     }
 }
 // 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, 'barcode');
 // chunk barcode array
 $chunked_barcode_arrays = array_chunk($item_data_array, $sysconf['print']['barcode']['barcode_items_per_row']);
 // create html ouput
 $html_str = '<!DOCTYPE html>' . "\n";
 $html_str .= '<html><head><title>Item Barcode Label Print Result</title>' . "\n";
 $html_str .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
 $html_str .= '<meta http-equiv="Pragma" content="no-cache" /><meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate, post-check=0, pre-check=0" /><meta http-equiv="Expires" content="Sat, 26 Jul 1997 05:00:00 GMT" />';
 $html_str .= '<style type="text/css">' . "\n";
 $html_str .= 'body { padding: 0; margin: 1cm; font-family: ' . $sysconf['print']['barcode']['barcode_fonts'] . '; font-size: ' . $sysconf['print']['barcode']['barcode_font_size'] . 'pt; background: #fff; }' . "\n";
 $html_str .= '.labelStyle { width: ' . $sysconf['print']['barcode']['barcode_box_width'] . 'cm; height: ' . $sysconf['print']['barcode']['barcode_box_height'] . 'cm; text-align: center; margin: ' . $sysconf['print']['barcode']['barcode_items_margin'] . 'cm; border: ' . $sysconf['print']['barcode']['barcode_border_size'] . 'px solid #000000;}' . "\n";
 $html_str .= '.labelHeaderStyle { background-color: #CCCCCC; font-weight: bold; padding: 5px; margin-bottom: 5px; }' . "\n";
 $html_str .= '</style>' . "\n";
 $html_str .= '</head>' . "\n";
 $html_str .= '<body>' . "\n";
 $html_str .= '<a href="#" onclick="window.print()">Print Again</a>' . "\n";
Esempio n. 4
0
 // echo 'SELECT IF(i.call_number!=\'\', i.call_number, b.call_number) FROM biblio AS b LEFT JOIN item AS i ON b.biblio_id=i.biblio_id WHERE '.$criteria;
 $label_data_array = array();
 while ($biblio_d = $biblio_q->fetch_row()) {
     if ($biblio_d[0]) {
         $label_data_array[] = $biblio_d[0];
     }
 }
 // include printed settings configuration file
 include 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, 'label');
 // chunk label array
 $chunked_label_arrays = array_chunk($label_data_array, $sysconf['print']['label']['items_per_row']);
 // create html ouput of images
 $html_str = '<!DOCTYPE html>' . "\n";
 $html_str .= '<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Document Label Print Result</title>' . "\n";
 $html_str .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
 $html_str .= '<meta http-equiv="Pragma" content="no-cache" /><meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate, post-check=0, pre-check=0" /><meta http-equiv="Expires" content="Sat, 26 Jul 1997 05:00:00 GMT" />';
 $html_str .= '<style type="text/css">' . "\n";
 $html_str .= 'body { padding: 0; margin: 1cm; font-family: ' . $sysconf['print']['label']['fonts'] . '; font-size: ' . $sysconf['print']['label']['font_size'] . 'pt; background: #fff; }' . "\n";
 $html_str .= '.labelStyle { width: ' . $sysconf['print']['label']['box_width'] . 'cm; height: ' . $sysconf['print']['label']['box_height'] . 'cm; text-align: center; margin: ' . $sysconf['print']['label']['items_margin'] . 'cm; padding: 0; border: ' . $sysconf['print']['label']['border_size'] . 'px solid #000000; }' . "\n";
 $html_str .= '.labelHeaderStyle { background-color: #CCCCCC; font-weight: bold; padding: 5px; margin-bottom: 5px; }' . "\n";
 $html_str .= '</style>' . "\n";
 $html_str .= '</head>' . "\n";
 $html_str .= '<body>' . "\n";
 $html_str .= '<a href="#" onclick="window.print()">Print Again</a>' . "\n";