source: pmb4.2/trunk/fuentes/pmb/circ/print_card/zebra_print_card.inc.php @ 815

Last change on this file since 815 was 815, checked in by jrpelegrina, 4 years ago

Initial release of pmb 4.2

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1<?php
2// +-------------------------------------------------+
3// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
4// +-------------------------------------------------+
5// $Id: zebra_print_card.inc.php,v 1.2 2014-05-12 15:28:40 dbellamy Exp $
6
7if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) die("no access");
8
9require_once($class_path."/printer.class.php");
10
11$id_empr+=0;
12$printer= new printer();
13if($pdfcartelecteur_printer_card_handler==2) {
14        $printer->printer_jzebra=true;
15} else {
16        $printer->printer_jzebra=false;
17}
18if($pdfcartelecteur_printer_card_name) {
19        $printer->printer_name = $pdfcartelecteur_printer_card_name;
20}
21if($pdfcartelecteur_printer_card_url) {
22        $printer->printer_url = $pdfcartelecteur_printer_card_url;
23}
24
25$card_tpl='';
26if(file_exists($base_path."/circ/print_card/print_card.tpl.php")) {
27        require_once ($base_path."/circ/print_card/print_card.tpl.php");
28}
29
30$printer->initialize();
31
32switch($sub) {
33        case 'one':
34                $r=$printer->print_card($id_empr,$card_tpl);
35                ajax_http_send_response($r);
36                break;
37        case 'get_script':     
38                $r = $printer->get_script();
39                ajax_http_send_response($r);
40                break;
41        default:
42                ajax_http_send_error('400',"commande inconnue");
43                break;         
44}
45
Note: See TracBrowser for help on using the repository browser.