Your IP : 216.73.216.65


Current Path : /home/ataenra/www/ATA/INTRANET/Admin/
Upload File :
Current File : /home/ataenra/www/ATA/INTRANET/Admin/sign.php

<?php

//$FILES = $_GET['F'];
//$ID=$_GET['ID'];

$files = '../../FICHIERS/'.$ID.'/A_Signer/'.$nom.'.pdf';
$check = @fopen($files, 'r');
if($check){
$img = new Imagick();
$img->setResolution(200, 200);
$img->readImage(__DIR__.'../'.$files.'[0]');
$d = $img->getImageGeometry();
  $cw = $d["width"];
  $ch = $d["height"];
  $nh = ceil( $ch / ( $cw / 900 ) );
$img->resizeImage( 900, $nh, Imagick::FILTER_CUBIC, 0.4, false );
$img = $img->flattenImages();
$img->writeImages(__DIR__.'../../../FICHIERS/'.$ID.'/A_Signer/'.$nom.'.jpg',false);

$files = '../../FICHIERS/'.$ID.'/A_Signer/'.$nom.'.jpg';
}

?>

    

        <div class="row" id="signature-pad" class="signature-pad">
            <div class="col-md-10" >           
                    

                        <canvas id="myCanvas" width="900" height="<?php echo $nh; ?>" ></canvas>
                    
                    <style>#myCanvas {<?php echo 'background: url('.$files.') no-repeat; center center;'; ?>
                     
                    
                    }
                    </style>   

                
                    <input type="hidden" name="signature" id="signature" value="">  
                    <input type="hidden" name="fichier" value="<?php echo $nom; ?>">               
            </div>
            <div class="col-md-2">
                    <button type="button" class="button clear" data-action="clear">Clear</button>       
            
            </div>                   
        
        </div>

<script src="../outils/sign/docs/js/signature_pad.umd.js"></script>
<script src="../outils/sign/docs/js/app.js"></script>
</body>
</html>