PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Estefano Salazar  >  Image Amatore  >  example.php  >  Download  
File: example.php
Role: Auxiliary script
Content type: text/plain
Description: Example file
Class: Image Amatore
Resize or crop JPEG, PNG or GIF image files
Author: By
Last change: Update
Date: 3 years ago
Size: 1,632 bytes


Class file image Download
    <meta http-equiv="content-type" content="text/html" />
    <meta name="author" content="Estefano" />

    <title>Upload an Image</title>


<?php if( !isset( $_GET['image'] ) ): ?>
<form action="uploader.php" method="post" enctype="multipart/form-data">
    <input type="file" name="image" id="image" />
    <input type="submit" name="send" id="send" value="Subir Imagen" />
<?php else: ?>

<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/jquery.Jcrop.js" type="text/javascript"></script>

<script type="text/javascript">

        onChange: showCoords,
        onSelect: showCoords
    // Simple event handler, called from onChange and onSelect
    // event handlers, as per the Jcrop invocation above
    function showCoords(c)
    function sendCrop()


<img src="./resizeadas/<?= $_GET['image']; ?>" id="crop-me" />
<br /><br />
<a href="#" onclick="sendCrop(); return false;">send crop</a>

<form action="" method="post" id="crop-all">
    <input type="hidden" name="send-crop" id="send-crop" />
    <input type="hidden" name="crop-x" id="crop-x" />
    <input type="hidden" name="crop-y" id="crop-y" />
    <input type="hidden" name="crop-w" id="crop-w" />
    <input type="hidden" name="crop-h" id="crop-h" />
    <input type="hidden" name="image" id="image" value="<?= $_GET['image']; ?>" />

<?php endif; ?>