PHP Classes

File: View/Users/uw2.ctp

Recommend this page to a friend!
  Classes of Andraž   pingvincek   View/Users/uw2.ctp   Download  
File: View/Users/uw2.ctp
Role: Example script
Content type: text/plain
Description: Example script
Class: pingvincek
Manage a site for organizing dates between people
Author: By
Last change:
Date: 6 years ago
Size: 1,613 bytes
 

Contents

Class file image Download
<div class="span-19">
    <h1>Ozna?ite del slike, ki bo uporabljen za va? profil</h1>

    <?php
   
if (isset($javascript))
    {
       echo
$javascript->link('jquery.imgareaselect.pack', FALSE);
    }

    echo
$this->Form->create('User', array('action' => 'uw3'));

    echo
$this->Html->image('upload/' . $profilePicName, array('id' => 'urediSliko', 'width' => $tmpWidth . 'px'));

    echo
$this->Form->hidden('x1', array('id' => 'x1'));
    echo
$this->Form->hidden('y1', array('id' => 'y1'));
    echo
$this->Form->hidden('x2', array('id' => 'x2'));
    echo
$this->Form->hidden('y2', array('id' => 'y2'));
    echo
$this->Form->hidden('width', array('id' => 'width'));
    echo
$this->Form->hidden('height', array('id' => 'height'));
    echo
$this->Form->hidden('tmpImageName', array('value' => $profilePicName));
    echo
$this->Form->hidden('tmpRatio', array('value' => $tmpRatio));

    echo
"<br>";
    echo
$this->Form->end('Shrani sliko');
   
?>
</div>

<script type="text/javascript">
$(document).ready(function () {
    $('img#urediSliko').imgAreaSelect({
        handles: true,
        aspectRatio: "1:1",
        minHeight: 15,
        minWidth: 15,
        persistent: true,
        show: true,
        x1: 0,
        y1: 0,
        x2: 100,
        y2: 100,
        onSelectEnd: function (img, selection) {
            $('#x1').val(selection.x1);
            $('#y1').val(selection.y1);
            $('#x2').val(selection.x2);
            $('#y2').val(selection.y2);
            $('#width').val(selection.width);
            $('#height').val(selection.height);
    }
    });
});
</script>