Browse Source
- Add Media and MediaUpload widget to upload and manage pictures in Movim
pull/16/head
- Add Media and MediaUpload widget to upload and manage pictures in Movim
pull/16/head
17 changed files with 784 additions and 131 deletions
-
57database.php
-
4loader.php
-
29system/Controller/ControllerMain.php
-
11system/Utils.php
-
24system/UtilsPicture.php
-
100system/Widget/widgets/Bookmark/Bookmark.php
-
6system/Widget/widgets/Explore/Explore.php
-
148system/Widget/widgets/Media/Media.php
-
82system/Widget/widgets/Media/media.css
-
175system/Widget/widgets/Media/media.js
-
88system/Widget/widgets/MediaUpload/MediaUpload.php
-
32system/Widget/widgets/MediaUpload/mediaupload.css
-
78system/Widget/widgets/Node/Node.php
-
1themes/movim/css/forms.css
-
26themes/movim/css/style2.css
-
28themes/movim/media.tpl
-
26upload.php
@ -1,30 +1,33 @@ |
|||
<?php |
|||
require('init.php'); |
|||
$pd = new \modl\PostDAO(); |
|||
$pd->create(); |
|||
|
|||
$nd = new \modl\NodeDAO(); |
|||
$nd->create(); |
|||
|
|||
$cd = new \modl\ContactDAO(); |
|||
$cd->create(); |
|||
|
|||
$cad = new \modl\CapsDAO(); |
|||
$cad->create(); |
|||
|
|||
$prd = new \modl\PresenceDAO(); |
|||
$prd->create(); |
|||
|
|||
$rd = new \modl\RosterLinkDAO(); |
|||
$rd->create(); |
|||
|
|||
$sd = new \modl\SessionDAO(); |
|||
$sd->create(); |
|||
|
|||
$cd = new \modl\CacheDAO(); |
|||
$cd->create(); |
|||
|
|||
$md = new \modl\MessageDAO(); |
|||
$md->create(); |
|||
require('init.php'); |
|||
/*$pd = new \modl\PostDAO(); |
|||
$pd->create(); |
|||
|
|||
$nd = new \modl\NodeDAO(); |
|||
$nd->create(); |
|||
|
|||
$cd = new \modl\ContactDAO(); |
|||
$cd->create(); |
|||
|
|||
$cad = new \modl\CapsDAO(); |
|||
$cad->create(); |
|||
|
|||
$prd = new \modl\PresenceDAO(); |
|||
$prd->create(); |
|||
|
|||
$rd = new \modl\RosterLinkDAO(); |
|||
$rd->create(); |
|||
|
|||
$sd = new \modl\SessionDAO(); |
|||
$sd->create(); |
|||
|
|||
$cd = new \modl\CacheDAO(); |
|||
$cd->create(); |
|||
|
|||
$md = new \modl\MessageDAO(); |
|||
$md->create();*/ |
|||
|
|||
$cd = new \modl\SubscriptionDAO(); |
|||
$cd->create(); |
|||
|
|||
echo 'Recreate database... done !'; |
|||
@ -0,0 +1,148 @@ |
|||
<?php |
|||
|
|||
/** |
|||
* @package Widgets |
|||
* |
|||
* @file Media.php |
|||
* This file is part of MOVIM. |
|||
* |
|||
* @brief The media manager. |
|||
* |
|||
* @author Timothée Jaussoin <edhelas@gmail.com> |
|||
* |
|||
* @version 1.0 |
|||
* @date 07 December 2011 |
|||
* |
|||
* Copyright (C)2010 MOVIM project |
|||
* |
|||
* See COPYING for licensing information. |
|||
*/ |
|||
|
|||
class Media extends WidgetBase { |
|||
|
|||
private $_userdir; |
|||
private $_useruri; |
|||
public $_sizelimit; |
|||
|
|||
function WidgetLoad() |
|||
{ |
|||
$this->addcss('media.css'); |
|||
$this->addjs('media.js'); |
|||
|
|||
$this->_sizelimit = (int)Conf::getServerConfElement('sizeLimit'); |
|||
|
|||
$this->_userdir = BASE_PATH.'users/'.$this->user->getLogin().'/'; |
|||
$this->_useruri = BASE_URI.'users/'.$this->user->getLogin().'/'; |
|||
|
|||
if(!is_dir($this->_userdir)) |
|||
mkdir($this->_userdir); |
|||
} |
|||
|
|||
function dirSize() |
|||
{ |
|||
$sum = 0; |
|||
|
|||
foreach(scandir($this->_userdir) as $s) { |
|||
if($s != '.' && $s != '..') |
|||
$sum = $sum + filesize($this->_userdir.$s); |
|||
} |
|||
|
|||
return $sum; |
|||
} |
|||
|
|||
function listFiles() |
|||
{ |
|||
$html = '<ul class="thumb">'; |
|||
|
|||
foreach(scandir($this->_userdir) as $s) { |
|||
if( |
|||
$s != '.' && |
|||
$s != '..' && |
|||
substr($s, 0, 6) != 'thumb_' && |
|||
substr($s, 0, 7) != 'medium_') |
|||
$html .= |
|||
'<a href="?q=media&f='.$s.'">
|
|||
<li style="background-image: url('.$this->_useruri.'thumb_'.$s.');"></li> |
|||
</a>'; |
|||
} |
|||
|
|||
$html .= '</ul>'; |
|||
|
|||
return $html; |
|||
} |
|||
|
|||
function mainFolder() |
|||
{ |
|||
$percent = number_format(($this->dirSize()/$this->_sizelimit)*100, 2); |
|||
?>
|
|||
<div class="tabelem" title="<?php echo t('Media'); ?>" id="media"> |
|||
<?php echo $this->listFiles(); ?>
|
|||
|
|||
<span class="size"> |
|||
<?php |
|||
echo sizeToCleanSize($this->dirSize()).' '.t('on').' '.sizeToCleanSize($this->_sizelimit); |
|||
echo ' - '; |
|||
echo $percent.'%'; |
|||
?>
|
|||
</span> |
|||
</div> |
|||
<?php |
|||
} |
|||
|
|||
function pictureViewer($f) |
|||
{ |
|||
//var_dump(exif_read_data($this->_userdir.$f));
|
|||
|
|||
if(file_exists($this->_userdir.$f) && getimagesize($this->_userdir.$f) != 0) { |
|||
|
|||
$er = @exif_read_data($this->_userdir.$f); |
|||
|
|||
|
|||
$exif = ''; |
|||
|
|||
if($er) { |
|||
if(isset($er['FileName'])) |
|||
$exif .= '<li><span>'.t('Name').'</span>'.$er['FileName'].'</li>'; |
|||
if(isset($er['COMPUTED']['Width']) && isset($er['COMPUTED']['Height'])) |
|||
$exif .= '<li><span>'.t('Resolution').'</span>'.$er['COMPUTED']['Width'].'x'.$er['COMPUTED']['Height'].'</li>'; |
|||
if(isset($er['FileSize'])) |
|||
$exif .= '<li><span>'.t('Size').'</span>'.sizeToCleanSize($er['FileSize']).'</li>'; |
|||
if(isset($er['DateTime'])) |
|||
$exif .= '<li><span>'.t('Date').'</span>'.prepareDate(strtotime($er['DateTime'])).'</li>'; |
|||
if(isset($er['ISOSpeedRatings'])) |
|||
$exif .= '<li><span>'.t('ISO').'</span>'.$er['ISOSpeedRatings'].'</li>'; |
|||
if(isset($er['Model'])) |
|||
$exif .= '<li><span>'.t('Camera').'</span>'.$er['Model'].'</li>'; |
|||
if(isset($er['Artist'])) |
|||
$exif .= '<li><span>'.t('Artist').'</span>'.$er['Artist'].'</li>'; |
|||
} |
|||
|
|||
$exif .= '<li><span>'.t('Original').'</span><a target="_blank" href="'.$this->_useruri.$f.'">'.t('Link').'</a></li>'; |
|||
|
|||
?>
|
|||
<div class="tabelem" title="<?php echo t('Viewer'); ?>" id="viewer"> |
|||
<div class="viewer"> |
|||
<img src="<?php echo $this->_useruri.'medium_'.$f; ?>"/> |
|||
|
|||
<div class="exif"> |
|||
<ul> |
|||
<?php echo $exif; ?>
|
|||
</ul> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<?php |
|||
} |
|||
} |
|||
|
|||
function build() |
|||
{ |
|||
if(!isset($_GET['f'])) |
|||
$this->mainFolder(); |
|||
else { |
|||
$this->pictureViewer($_GET['f']); |
|||
$this->mainFolder(); |
|||
} |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,82 @@ |
|||
#main { |
|||
box-shadow: 0px -1px 0px rgba(0, 0, 0, 0.4), 0px 0px 2px rgba(0, 0, 0, 0.2); |
|||
} |
|||
|
|||
#center { |
|||
position: relative; |
|||
} |
|||
|
|||
#navtabs { |
|||
background-color: transparent; |
|||
border-bottom: 0px; |
|||
} |
|||
|
|||
#media .breadcrumb { |
|||
background-color: transparent; |
|||
} |
|||
|
|||
#media .breadcrumb a:after { |
|||
border-color: #222; |
|||
} |
|||
|
|||
#media a:link, #media a:visited, |
|||
#viewer a:link, #viewer a:visited { |
|||
color: #DDD; |
|||
} |
|||
|
|||
#navtabs li:hover { |
|||
background-color: #222; |
|||
} |
|||
|
|||
#center { |
|||
background-color: #333; |
|||
color: white; |
|||
} |
|||
|
|||
#viewer .viewer { |
|||
position: relative; |
|||
} |
|||
|
|||
#viewer .viewer img { |
|||
width: 100%; |
|||
height: auto; |
|||
display: block; |
|||
} |
|||
|
|||
#viewer .viewer .exif { |
|||
position: absolute; |
|||
bottom: 0px; |
|||
background-color: rgba(0, 0, 0, 0.8); |
|||
width: 100%; |
|||
padding: 1em; |
|||
} |
|||
|
|||
#viewer .viewer .exif ul { |
|||
list-style-type: none; |
|||
} |
|||
|
|||
#viewer .viewer .exif ul li { |
|||
width: 50%; |
|||
display: block; |
|||
float: left; |
|||
overflow: hidden; |
|||
white-space: nowrap; |
|||
text-overflow: ellipsis; |
|||
} |
|||
|
|||
#viewer .viewer .exif span { |
|||
font-weight: bold; |
|||
display: inline-block; |
|||
text-align: right; |
|||
margin-right: 1em; |
|||
width: 5em; |
|||
} |
|||
|
|||
#media .size { |
|||
position: absolute; |
|||
top: 0px; |
|||
right: 0px; |
|||
line-height: 3em; |
|||
display: block; |
|||
padding-right: 1em; |
|||
} |
|||
@ -0,0 +1,175 @@ |
|||
// common variables
|
|||
var iBytesUploaded = 0; |
|||
var iBytesTotal = 0; |
|||
var iPreviousBytesLoaded = 0; |
|||
var iMaxFilesize = 1048576; // 1MB
|
|||
var oTimer = 0; |
|||
var sResultFileSize = ''; |
|||
|
|||
function secondsToTime(secs) { // we will use this function to convert seconds in normal time format
|
|||
var hr = Math.floor(secs / 3600); |
|||
var min = Math.floor((secs - (hr * 3600))/60); |
|||
var sec = Math.floor(secs - (hr * 3600) - (min * 60)); |
|||
|
|||
if (hr < 10) {hr = "0" + hr; } |
|||
if (min < 10) {min = "0" + min;} |
|||
if (sec < 10) {sec = "0" + sec;} |
|||
if (hr) {hr = "00";} |
|||
return hr + ':' + min + ':' + sec; |
|||
}; |
|||
|
|||
function bytesToSize(bytes) { |
|||
var sizes = ['Bytes', 'KB', 'MB']; |
|||
if (bytes == 0) return 'n/a'; |
|||
var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024))); |
|||
return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i]; |
|||
}; |
|||
|
|||
function fileSelected() { |
|||
|
|||
// hide different warnings
|
|||
document.getElementById('upload_response').style.display = 'none'; |
|||
document.getElementById('error').style.display = 'none'; |
|||
document.getElementById('error2').style.display = 'none'; |
|||
document.getElementById('abort').style.display = 'none'; |
|||
document.getElementById('warnsize').style.display = 'none'; |
|||
|
|||
// get selected file element
|
|||
var oFile = document.getElementById('image_file').files[0]; |
|||
|
|||
// filter for image files
|
|||
var rFilter = /^(image\/bmp|image\/gif|image\/jpeg|image\/png|image\/tiff)$/i; |
|||
if (! rFilter.test(oFile.type)) { |
|||
document.getElementById('error').style.display = 'block'; |
|||
return; |
|||
} |
|||
|
|||
// little test for filesize
|
|||
if (oFile.size > iMaxFilesize) { |
|||
document.getElementById('warnsize').style.display = 'block'; |
|||
return; |
|||
} |
|||
|
|||
// get preview element
|
|||
var oImage = document.getElementById('preview'); |
|||
|
|||
// prepare HTML5 FileReader
|
|||
var oReader = new FileReader(); |
|||
oReader.onload = function(e){ |
|||
|
|||
// e.target.result contains the DataURL which we will use as a source of the image
|
|||
oImage.src = e.target.result; |
|||
|
|||
oImage.onload = function () { // binding onload event
|
|||
|
|||
// we are going to display some custom image information here
|
|||
sResultFileSize = bytesToSize(oFile.size); |
|||
document.getElementById('fileinfo').style.display = 'block'; |
|||
document.getElementById('filename').innerHTML = 'Name: ' + oFile.name; |
|||
document.getElementById('filesize').innerHTML = 'Size: ' + sResultFileSize; |
|||
document.getElementById('filetype').innerHTML = 'Type: ' + oFile.type; |
|||
document.getElementById('filedim').innerHTML = 'Dimension: ' + oImage.naturalWidth + ' x ' + oImage.naturalHeight; |
|||
}; |
|||
}; |
|||
|
|||
// read selected file as DataURL
|
|||
oReader.readAsDataURL(oFile); |
|||
} |
|||
|
|||
function startUploading() { |
|||
// cleanup all temp states
|
|||
iPreviousBytesLoaded = 0; |
|||
document.getElementById('upload_response').style.display = 'none'; |
|||
document.getElementById('error').style.display = 'none'; |
|||
document.getElementById('error2').style.display = 'none'; |
|||
document.getElementById('abort').style.display = 'none'; |
|||
document.getElementById('warnsize').style.display = 'none'; |
|||
document.getElementById('progress_percent').innerHTML = ''; |
|||
var oProgress = document.getElementById('progress'); |
|||
oProgress.style.display = 'block'; |
|||
oProgress.style.width = '0px'; |
|||
|
|||
// get form data for POSTing
|
|||
//var vFD = document.getElementById('upload_form').getFormData(); // for FF3
|
|||
var vFD = new FormData(document.getElementById('upload_form')); |
|||
|
|||
// create XMLHttpRequest object, adding few event listeners, and POSTing our data
|
|||
var oXHR = new XMLHttpRequest(); |
|||
oXHR.upload.addEventListener('progress', uploadProgress, false); |
|||
oXHR.addEventListener('load', uploadFinish, false); |
|||
oXHR.addEventListener('error', uploadError, false); |
|||
oXHR.addEventListener('abort', uploadAbort, false); |
|||
oXHR.open('POST', 'upload.php'); |
|||
oXHR.send(vFD); |
|||
|
|||
// set inner timer
|
|||
oTimer = setInterval(doInnerUpdates, 300); |
|||
} |
|||
|
|||
function doInnerUpdates() { // we will use this function to display upload speed
|
|||
var iCB = iBytesUploaded; |
|||
var iDiff = iCB - iPreviousBytesLoaded; |
|||
|
|||
// if nothing new loaded - exit
|
|||
if (iDiff == 0) |
|||
return; |
|||
|
|||
iPreviousBytesLoaded = iCB; |
|||
iDiff = iDiff * 2; |
|||
var iBytesRem = iBytesTotal - iPreviousBytesLoaded; |
|||
var secondsRemaining = iBytesRem / iDiff; |
|||
|
|||
// update speed info
|
|||
var iSpeed = iDiff.toString() + 'B/s'; |
|||
if (iDiff > 1024 * 1024) { |
|||
iSpeed = (Math.round(iDiff * 100/(1024*1024))/100).toString() + 'MB/s'; |
|||
} else if (iDiff > 1024) { |
|||
iSpeed = (Math.round(iDiff * 100/1024)/100).toString() + 'KB/s'; |
|||
} |
|||
|
|||
document.getElementById('speed').innerHTML = iSpeed; |
|||
document.getElementById('remaining').innerHTML = ' ' + secondsToTime(secondsRemaining); |
|||
} |
|||
|
|||
function uploadProgress(e) { // upload process in progress
|
|||
if (e.lengthComputable) { |
|||
iBytesUploaded = e.loaded; |
|||
iBytesTotal = e.total; |
|||
var iPercentComplete = Math.round(e.loaded * 100 / e.total); |
|||
var iBytesTransfered = bytesToSize(iBytesUploaded); |
|||
|
|||
document.getElementById('progress_percent').innerHTML = iPercentComplete.toString() + '%'; |
|||
document.getElementById('progress').style.width = (iPercentComplete * 4).toString() + 'px'; |
|||
document.getElementById('b_transfered').innerHTML = iBytesTransfered; |
|||
if (iPercentComplete == 100) { |
|||
var oUploadResponse = document.getElementById('upload_response'); |
|||
oUploadResponse.innerHTML = '<h1>Please wait...processing</h1>'; |
|||
oUploadResponse.style.display = 'block'; |
|||
} |
|||
} else { |
|||
document.getElementById('progress').innerHTML = 'unable to compute'; |
|||
} |
|||
} |
|||
|
|||
function uploadFinish(e) { // upload successfully finished
|
|||
var oUploadResponse = document.getElementById('upload_response'); |
|||
oUploadResponse.innerHTML = e.target.responseText; |
|||
oUploadResponse.style.display = 'block'; |
|||
|
|||
document.getElementById('progress_percent').innerHTML = '100%'; |
|||
document.getElementById('progress').style.width = '400px'; |
|||
document.getElementById('filesize').innerHTML = sResultFileSize; |
|||
document.getElementById('remaining').innerHTML = ' 00:00:00'; |
|||
|
|||
clearInterval(oTimer); |
|||
} |
|||
|
|||
function uploadError(e) { // upload error
|
|||
document.getElementById('error2').style.display = 'block'; |
|||
clearInterval(oTimer); |
|||
} |
|||
|
|||
function uploadAbort(e) { // upload abort
|
|||
document.getElementById('abort').style.display = 'block'; |
|||
clearInterval(oTimer); |
|||
} |
|||
@ -0,0 +1,88 @@ |
|||
<?php |
|||
|
|||
/** |
|||
* @package Widgets |
|||
* |
|||
* @file MediaUpload.php |
|||
* This file is part of MOVIM. |
|||
* |
|||
* @brief The media upload. |
|||
* |
|||
* @author Timothée Jaussoin <edhelas@gmail.com> |
|||
* |
|||
* @version 1.0 |
|||
* @date 07 December 2011 |
|||
* |
|||
* Copyright (C)2010 MOVIM project |
|||
* |
|||
* See COPYING for licensing information. |
|||
*/ |
|||
|
|||
class MediaUpload extends WidgetBase { |
|||
function WidgetLoad() |
|||
{ |
|||
$this->addcss('mediaupload.css'); |
|||
} |
|||
|
|||
function build() |
|||
{ |
|||
$media = new Media(); |
|||
|
|||
if($media->dirSize() < $media->_sizelimit) { |
|||
?>
|
|||
<div class="tabelem" title="<?php echo t('Upload'); ?>" id="mediaupload"> |
|||
<form id="upload_form" enctype="multipart/form-data" method="post" action="upload.php"> |
|||
<fieldset> |
|||
<div class="element"> |
|||
<label for="image_file"><?php echo t('Please select image file'); ?></label>
|
|||
<input type="file" name="image_file" id="image_file" onchange="fileSelected();" /> |
|||
</div> |
|||
|
|||
<img id="preview" /> |
|||
|
|||
<div id="fileinfo"> |
|||
<div id="filename"></div> |
|||
<div id="filesize"></div> |
|||
<div id="filetype"></div> |
|||
<div id="filedim"></div> |
|||
</div> |
|||
|
|||
<div class="clear"></div> |
|||
|
|||
<div id="progress_info"> |
|||
<div id="progress"></div> |
|||
<div id="progress_percent"></div> |
|||
<div class="clear_both"></div> |
|||
<div> |
|||
<div id="speed"></div> |
|||
<div id="remaining"></div> |
|||
<div id="b_transfered"></div> |
|||
<div class="clear_both"></div> |
|||
</div> |
|||
<div id="upload_response"></div> |
|||
</div> |
|||
|
|||
</fieldset> |
|||
|
|||
<div class="clear"></div> |
|||
<a class="button icon upload tiny black" onclick="startUploading()" /><?php echo t('Upload'); ?></a>
|
|||
|
|||
<div class="message info" id="error"> |
|||
<?php echo t('You should select valid image files only!'); ?>
|
|||
</div> |
|||
<div class="message error" id="error2"> |
|||
<?php echo t('An error occurred while uploading the file'); ?>
|
|||
</div> |
|||
<div class="message info" id="abort"> |
|||
<?php echo t('The upload has been canceled by the user or the browser dropped the connection'); ?>
|
|||
</div> |
|||
<div class="message info" id="warnsize"> |
|||
<?php echo t("Your file is very big. We can't accept it. Please select more small file"); ?>
|
|||
</div> |
|||
|
|||
</form> |
|||
</div> |
|||
<?php |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
#mediaupload { |
|||
padding: 1.5em; |
|||
} |
|||
|
|||
#mediaupload #fileinfo { |
|||
clear: left; |
|||
} |
|||
|
|||
#progress_info { |
|||
margin-top: 1em; |
|||
} |
|||
#fileinfo,#error,#error2,#abort,#warnsize { |
|||
display:none; |
|||
} |
|||
#progress { |
|||
margin-right: 1em; |
|||
display:none; |
|||
float:left; |
|||
height:16px; |
|||
background-color: #111; |
|||
} |
|||
#progress_percent { |
|||
float:right; |
|||
} |
|||
|
|||
#mediaupload #preview { |
|||
display:block; |
|||
float:right; |
|||
max-width: 200px; |
|||
max-height: 150px; |
|||
margin-top: 1em; |
|||
} |
|||
@ -0,0 +1,28 @@ |
|||
<?php /* -*- mode: html -*- */ |
|||
?> |
|||
|
|||
<?php $this->widget('Poller');?> |
|||
<?php $this->widget('Logout');?> |
|||
<?php $this->widget('Notifs');?> |
|||
<?php $this->widget('Chat');?> |
|||
|
|||
<div id="head"> |
|||
<?php $this->widget('Profile');?> |
|||
</div> |
|||
|
|||
<div id="main"> |
|||
<div id="left"> |
|||
<?php $this->widget('Bookmark');?> |
|||
<?php $this->widget('ProfileData');?> |
|||
</div> |
|||
|
|||
<div id="center"> |
|||
<?php $this->widget('Tabs');?> |
|||
<?php $this->widget('Media');?> |
|||
<?php $this->widget('MediaUpload');?> |
|||
</div> |
|||
</div> |
|||
|
|||
<div id="right"> |
|||
<?php $this->widget('Roster');?> |
|||
</div> |
|||
@ -0,0 +1,26 @@ |
|||
<?php |
|||
|
|||
require('init.php'); |
|||
|
|||
function bytesToSize1024($bytes, $precision = 2) { |
|||
$unit = array('B','KB','MB'); |
|||
return @round($bytes / pow(1024, ($i = floor(log($bytes, 1024)))), $precision).' '.$unit[$i]; |
|||
} |
|||
|
|||
$sFileName = $_FILES['image_file']['name']; |
|||
$sFileType = $_FILES['image_file']['type']; |
|||
$sFileSize = bytesToSize1024($_FILES['image_file']['size'], 1); |
|||
|
|||
$user = new User(); |
|||
|
|||
define('USER_PATH', BASE_PATH . 'users/'.$user->getLogin().'/'); |
|||
|
|||
$error = $_FILES['image_file']['error']; |
|||
|
|||
if ($error == UPLOAD_ERR_OK) { |
|||
$tmp_name = $_FILES["image_file"]["tmp_name"]; |
|||
$name = $_FILES["image_file"]["name"]; |
|||
move_uploaded_file($tmp_name, USER_PATH.$name); |
|||
|
|||
createThumbnailPicture(USER_PATH, $name); |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue