예제 #1
1
    </div>
</div>

<?php 
$content = ob_get_contents();
ob_clean();
?>
    


<?php 
$currentFileName = basename($_SERVER['PHP_SELF']);
$currentFolder = substr($_SERVER['REQUEST_URI'], 0, strlen($_SERVER['REQUEST_URI']) - strlen($currentFileName));
//echo "Current folder: ".$currentFolder."<br>";
//Specify the ABSOLUTE URL to the php file that will create the ClientPrintJob object
echo WebClientPrint::createScript(Utils::getRoot() . $currentFolder . 'DemoPrintFileProcess.php');
?>

<script type="text/javascript">

    $("#ddlFileType").change(function () {
        var s = $("#ddlFileType option:selected").text();
        if (s == 'DOC')
            $("#ifPreview").attr("src", "http://docs.google.com/gview?url=http://webclientprintphp.azurewebsites.net/files/LoremIpsum.doc&embedded=true");
        if (s == 'PDF')
            $("#ifPreview").attr("src", "http://docs.google.com/gview?url=http://webclientprintphp.azurewebsites.net/files/LoremIpsum.pdf&embedded=true");
        if (s == 'TXT')
            $("#ifPreview").attr("src", "http://docs.google.com/gview?url=http://webclientprintphp.azurewebsites.net/files/LoremIpsum.txt&embedded=true");
        if (s == 'TIF')
            $("#ifPreview").attr("src", "http://docs.google.com/gview?url=http://webclientprintphp.azurewebsites.net/files/patent2pages.tif&embedded=true");
        if (s == 'XLS')
예제 #2
0
//Set ABSOLUTE URL to WebClientPrint.php file
WebClientPrint::$webClientPrintAbsoluteUrl = Utils::getRoot() . '/lms/custom/webprint/WebClientPrint.php';
//WebClientPrint::$webClientPrintAbsoluteUrl = 'http://:'.$_SERVER['SCRIPT_NAME'] .'/lms/custom/webprint/WebClientPrint.php';
//Set wcpcache folder RELATIVE to WebClientPrint.php file
//FILE WRITE permission on this folder is required!!!
WebClientPrint::$wcpCacheFolder = 'wcpcache/';
//===================
// 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) 2016, Neodynamic SRL
 * @license http://neodynamic.com/eula Neodynamic EULA
 */
class WebClientPrint
{
    const VERSION = '2.0.2016.223';
    const CLIENT_PRINT_JOB = "clientPrint";
예제 #3
0
파일: index.php 프로젝트: sirromas/medical
                    wcppDetectOnFailure();
            }

            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>