Changeset 16 for pro-bachkim-filespace/sourcecode/application/modules
- Timestamp:
- Jun 26, 2014 5:37:23 PM (11 years ago)
- Location:
- pro-bachkim-filespace/sourcecode/application/modules
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-bachkim-filespace/sourcecode/application/modules/ajax/controllers/privatecontent.php
r15 r16 63 63 echo json_encode($aryChild); 64 64 } 65 66 public function rename() { 67 $id = $this->input->post('id',TRUE); 68 $newName = $this->input->post('newname',TRUE); 69 $objectType = $this->input->post('objtype',TRUE); 70 71 $aryData = array(); 72 $aryData['RESULT'] = $this->objDirectory->rename($id, $newName, $objectType);; 73 $aryData['UPDATED'] = array('id' => $id, 'name' => $newName, 'type' => $objectType); 74 echo json_encode($aryData); 75 } 65 76 66 77 } -
pro-bachkim-filespace/sourcecode/application/modules/ajax/models/directory_model.php
r12 r16 154 154 if (file_exists($file) && count($aryDataSet) > 0) { 155 155 $h = fopen ($file, $flag); 156 foreach ($aryDataSet as $key => $ line) {156 foreach ($aryDataSet as $key => $aryTmp) { 157 157 $line = implode(',',$aryTmp); 158 fwrite($ line."\n", $h);158 fwrite($h, $line."\n"); 159 159 } 160 160 fclose ($h); … … 176 176 } 177 177 178 public function rename ($id, $newName, $type = 'directory') { 179 180 if (!$newName || !$id) return FALSE; 181 $aryObj = $type == 'directory' ? $this->getAllDirectory() : $this->getAllFile(); 182 $dbFile = $type == 'directory' ? $dbFile = 'directory.db' : $dbFile = 'file.db'; 183 184 if (count($aryObj) > 0) { 185 foreach ($aryObj as $key => $obj) { 186 if ($obj['id'] == $id) break; 187 } 188 189 $aryObj[$key]['name'] = $newName; 190 191 return $this->writeDB($dbFile, $aryObj); 192 } 193 194 return FALSE; 195 } 196 178 197 } -
pro-bachkim-filespace/sourcecode/application/modules/filemanager/views/main.php
r10 r16 25 25 <button id="btnDel" class="btn btn-success" title="Xóa"><i class="icon-eraser"></i></button> 26 26 <button id="btnCopy" class="btn btn-success" title="Sao chép"><i class="icon-copy"></i></button> 27 <button id="btnCut" class="btn btn-success" title="Cắt"><i class="icon-cut"></i></button>28 <button id="btnPaste" class="btn btn-success" title="Dán"><i class="icon-paste"></i></button>27 <button id="btnCut" class="btn btn-success" title="Cắt"><i class="icon-cut"></i></button> 28 <button id="btnPaste" class="btn btn-success" title="Dán"><i class="icon-paste"></i></button> 29 29 </div> 30 30 <div class="btn-group">
Note: See TracChangeset
for help on using the changeset viewer.