profile my files
This commit is contained in:
@@ -30,6 +30,30 @@ class UploadManager extends Model
|
||||
|
||||
switch ($action){
|
||||
|
||||
case WRENCHBOARD_RESOURCE_MYFILES:
|
||||
// MAKE SURE FOLDER AS PER PROECESS IS AVILABLE
|
||||
$thisProfileFolder = $this->savePath.'PROFILE/'.$in["uid"];
|
||||
if (!file_exists($thisProfileFolder)) {
|
||||
mkdir($thisProfileFolder, 0777, true);
|
||||
}
|
||||
if (!file_exists($thisProfileFolder."/MYFILES")) {
|
||||
mkdir($thisProfileFolder."/MYFILES", 0777, true);
|
||||
}
|
||||
|
||||
$myFilesFolder = $thisProfileFolder."/MYFILES";
|
||||
|
||||
if (file_exists($myFilesFolder)) {
|
||||
$tt_d = date('hisjmy');
|
||||
$out["message"] = $tt_d."-".$in['file_name'];
|
||||
$myFilesFolderFileName = $myFilesFolder.'/'.$out["message"];
|
||||
$myfile = fopen($myFilesFolderFileName, "w") or die("Unable to open file!");
|
||||
$file_data = base64_decode($in["file_data"]);
|
||||
fwrite($myfile, $file_data);
|
||||
fclose($myfile);
|
||||
$out["call_backend"] = true; // flag ready to save data entry
|
||||
}
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_CONTRACT_MESSAGE:
|
||||
// MAKE SURE FOLDER AS PER PROECESS IS AVILABLE
|
||||
$thisContactFolder = $this->savePath.'CONTRACTS/'.$in["contract"];
|
||||
|
||||
Reference in New Issue
Block a user