コード例 #1
0
function deleteFileByCommentId($iCommentId)
{
    global $sModule;
    $sDBModule = DB_PREFIX . ucfirst($sModule);
    $iId = (int) getValue("SELECT `ID` FROM `" . $sDBModule . "Files` WHERE `Description`='" . $iCommentId . "' LIMIT 1");
    if ($iId > 0) {
        _deleteFile($iId);
    }
}
コード例 #2
0
     }
     break;
     /**
      * Delete files (reported files)
      */
 /**
  * Delete files (reported files)
  */
 case 'removeFile':
     if ($sFile == "") {
         $sContents = parseXml($aXmlTemplates['result'], "msgErrorDelete", FAILED_VAL);
     } elseif ($sFile != "") {
         $aFiles = explode(",", $sFile);
         if (count($aFiles) > 0) {
             for ($i = 0; $i < count($aFiles); $i++) {
                 $bResult = _deleteFile($aFiles[$i]);
             }
         }
         $sContents = parseXml($aXmlTemplates['result'], "", SUCCESS_VAL);
     }
     break;
     /**
      * Upload user's file
      */
 /**
  * Upload user's file
  */
 case 'uploadFile':
     $sContents = uploadFile($_FILES['Filedata']['tmp_name'], $sId);
     $sContentsType = "other";
     break;