Skip to content
Snippets Groups Projects
Commit 60cff88a authored by Puguh Wijayanto's avatar Puguh Wijayanto
Browse files

remove unecessary files

parent 41052b3c
No related branches found
No related tags found
No related merge requests found
<?php
/*
* Name: TestImage CLass
* Version: 0.0.1
* Build: 0.0.1 pre
* Developer: Puguh Wijayanto (www.metalgenix.com)
* URI: www.metalgenix.com
* License: MIT License
* Icon: <i class="fa fa-cogs"></i>
*/
\ No newline at end of file
<?php
if( isset($_POST['upload']) ){
//echo "string";
//print_r($_FILES);
if(isset($_FILES['images']) && $_FILES['images'] != ''){
$path = "/assets/images/uploads/";
$allowed = array('png', 'jpg', 'gif');
$upload = Upload::go('images', $path, $allowed );
if(isset($upload['error']) != ''){
echo $upload['error'];
}else{
$im = $upload['filepath'];
$dst = GX_PATH."/assets/images/uploads/thumbs/".$upload['filename'];
Image::resize($im, $dst, "300", '300', 1);
list($w, $h) = getimagesize($im);
Image::resize($im, $im, $w, $h, 0);
}
}
echo "<pre>";
print_r($upload);
echo "</pre>";
}
?>
<div class="row">
<div class="col-md-12">
<h1>GeniXCMS TestImage Sample</h1>
<hr />
</div>
<div class="col-md-12">
<form action="" method="post" enctype="multipart/form-data">
<input type="file" name="images" class="form-control">
<button type="submit" class="btn btn-primary" name="upload"><i class="fa fa-upload"></i> Upload</button>
</form>
</div>
</div>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment