Ejemplo n.º 1
0
            }

            function wcppDetectOnFailure() {
                // It seems WCPP is not installed at the client side
                // ask the user to install it
                $('#msgInProgress').hide();
                $('#msgInstallWCPP').show();                
            }

            $(document).ready(function () {
                // Create the Spinner with options (http://fgnass.github.io/spin.js/)
                var spinner = new Spinner({
                      lines: 12, 
                      length: 7, 
                      width: 3, 
                      radius: 10, 
                      color: '#336699', 
                      speed: 1, 
                      trail: 60               
                  }).spin($('#mySpinner')[0]); 
            });

        </script>
        
        <?php 
// Create WCPP detection script
echo WebClientPrint::createWcppDetectionScript();
?>
    </body>
</html>
Ejemplo n.º 2
0
                var options = '';
                for (var i = 0; i < p.length; i++) {
                    options += '<option>' + p[i] + '</option>';
                }
                $('#installedPrinters').css('visibility','visible');
                $('#installedPrinterName').html(options);
                $('#installedPrinterName').focus();
                $('#loadPrinters').hide();                                                        
            }else{
                alert("No printers are installed in your system.");
            }
        }

        function wcpGetPrintersOnFailure() {
            // Do something if printers cannot be got from the client
            alert("No printers are installed in your system.");
        }
    </script>
    
    <!-- Add Reference to jQuery at Google CDN -->
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"></script>

    <?php 
//Specify the ABSOLUTE URL to the php file that will create the ClientPrintJob object
//In this case, this same page
echo WebClientPrint::createScript(Utils::getRoot() . '/scolav2/webClientPrint/printTicket.php');
?>
</body>
</html>

Ejemplo n.º 3
-1
//===================
//Set ABSOLUTE URL to WebClientPrint.php file
WebClientPrint::$webClientPrintAbsoluteUrl = Utils::getRoot() . '/scolav2/webClientPrint/WebClientPrint.php';
//Set wcpcache folder RELATIVE to WebClientPrint.php file
//FILE WRITE permission on this folder is required!!!
WebClientPrint::$wcpCacheFolder = '../wpcache';
//===================
// Clean built-in Cache
// NOTE: Remove it if you implement your own cache system
WebClientPrint::cacheClean(30);
//in minutes
// Process request
$urlParts = parse_url($_SERVER['REQUEST_URI']);
if (isset($urlParts['query'])) {
    if (Utils::strContains($urlParts['query'], WebClientPrint::WCP)) {
        WebClientPrint::processRequest($urlParts['query']);
    }
}
/**
 * WebClientPrint provides functions for registering the "WebClientPrint for PHP" solution 
 * script code in PHP web pages as well as for processing client requests and managing the
 * internal cache.
 * 
 * @author Neodynamic <http://neodynamic.com/support>
 * @copyright (c) 2013, Neodynamic SRL
 * @license http://neodynamic.com/eula Neodynamic EULA
 */
class WebClientPrint
{
    const VERSION = '2.0.2013.1216';
    const CLIENT_PRINT_JOB = "clientPrint";