Example #1
0
     include_page('home.php');
     exit;
 }
 if ($action == 'deleteTag') {
     $id = getRequest('id');
     if ($id) {
         echo json_encode(File::deleteTagById($id));
     }
     exit;
 }
 if ($action == 'addTag') {
     $pid = getRequest('pid');
     $fid = getRequest('fid');
     $type = getRequest('type');
     if ($pid && $fid) {
         echo json_encode(File::addTag($pid, $fid, $type));
     }
     exit;
 }
 if ($action == 'updateFile') {
     $file = getRequest('file');
     $file = json_decode($file);
     $file = recast("File", $file);
     $result = $file->save();
     echo json_encode($result);
     exit;
 }
 if ($action == 'deleteIndividual') {
     $response = array();
     // $response[] = "we're here";
     $response = array();