Exemplo n.º 1
0
     mkdir($upload_dir, 0777);
     chmod($upload_dir, 0777);
 }
 //Check to see if any images with the same name already exist
 if (file_exists($large_image_location)) {
     if (file_exists($thumb_image_location)) {
         $thumb_photo_exists = "<img src=\"" . $upload_path . $thumb_image_name . $_SESSION['user_file_ext'] . "\" alt=\"Thumbnail Image\"/>";
     } else {
         $thumb_photo_exists = "";
     }
     $large_photo_exists = "<img src=\"" . $upload_path . $large_image_name . $_SESSION['user_file_ext'] . "\" alt=\"Large Image\"/>";
 } else {
     $large_photo_exists = "";
     $thumb_photo_exists = "";
 }
 if (isset($_POST["upload"]) && !esMobil()) {
     $_SESSION['user_file_ext'] = "";
     //Get the file information
     $userfile_name = $_FILES['image']['name'];
     $userfile_tmp = $_FILES['image']['tmp_name'];
     $userfile_size = $_FILES['image']['size'];
     $userfile_type = $_FILES['image']['type'];
     $filename = basename($_FILES['image']['name']);
     $file_ext = strtolower(substr($filename, strrpos($filename, '.') + 1));
     //Only process if the file is a JPG, PNG or GIF and below the allowed limit
     if (!empty($_FILES["image"]) && $_FILES['image']['error'] == 0) {
         foreach ($allowed_image_types as $mime_type => $ext) {
             //loop through the specified image types and if they match the extension then break out
             //everything is ok so go and check file size
             if ($file_ext == $ext && $userfile_type == $mime_type) {
                 $error = "";
Exemplo n.º 2
0
    });


    /* initialize the calendar
     -----------------------------------------------------------------*/

    var date = new Date();
    var d = date.getDate();
    var m = date.getMonth();
    var y = date.getFullYear();

    $('#calendar').fullCalendar({

        <?php 
if (esMobil()) {
    ?>
        defaultView: 'basicDay',
        header: {
            left: '',
            center: '',
            right: 'prev,today,next,basicWeek,basicDay'
         },
        <?php 
} else {
    ?>
        header: {
             right: 'prev,next today',
             center: 'title',
             left: 'month,basicWeek,basicDay'
         },
Exemplo n.º 3
0
      })
      .done(function(json) {
          if(json.success){
            $("#estado").html(json.html);
          }
      })
      .fail(function() {
          alert("Ups Ocurrio un error");
      })      
    });
</script>
<?php 
}
?>
     <?php 
if (isset($_GET['action']) && $_GET['action'] == "changepic" && !esMobil()) {
    ?>
      <script type="text/javascript" src="js/jquery-pack.js"></script>
  <script type="text/javascript" src="js/jquery.imgareaselect.min.js"></script>

<?php 
    //Only display the javacript if an image has been uploaded
    if (isset($large_photo_exists) && strlen($large_photo_exists) > 0) {
        $current_large_image_width = getWidth($large_image_location);
        $current_large_image_height = getHeight($large_image_location);
        ?>
<script type="text/javascript">
function preview(img, selection) { 
  var scaleX = <?php 
        echo $thumb_width;
        ?>