Пример #1
0
         }
     }
     if ($result) {
         // delete according definition of primary resources and alternatives for adapted content
         $filename = '../' . $pathext . $filename;
         // 1. delete secondary resources types
         $secondaryResourcesTypesDAO = new SecondaryResourcesTypesDAO();
         $secondaryResourcesTypesDAO->DeleteByResourceName($filename);
         // 2. delete secondary resources
         $secondaryResourcesDAO = new SecondaryResourcesDAO();
         $secondaryResourcesDAO->DeleteByResourceName($filename);
         // 3. delete primary resources types
         $primaryResourcesTypesDAO = new PrimaryResourcesTypesDAO();
         $primaryResourcesTypesDAO->DeleteByResourceName($filename);
         // 4. delete primary resources
         $primaryResourcesDAO = new PrimaryResourcesDAO();
         $primaryResourcesDAO->DeleteByResourceName($filename);
         $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
     }
 }
 /* delete directory */
 if (isset($_POST['listofdirs'])) {
     $checkbox = explode(',', $_POST['listofdirs']);
     $count = count($checkbox);
     $result = true;
     for ($i = 0; $i < $count; $i++) {
         $filename = $checkbox[$i];
         if (strpos($filename, '..') !== false) {
             $msg->addError('UNKNOWN');
             $result = false;
             header('Location: index.php?pathext=' . $_POST['pathext'] . SEP . 'framed=' . $_POST['framed'] . SEP . 'popup=' . $_POST['popup'] . SEP . 'cp=' . $_POST['cp'] . SEP . 'cid=' . $_POST['cid'] . SEP . 'pid=' . $_POST['pid'] . SEP . 'a_type=' . $_POST['a_type'] . SEP . '_course_id=' . $_course_id);
Пример #2
0
 function deleteA4a()
 {
     include_once TR_INCLUDE_PATH . 'classes/DAO/PrimaryResourcesDAO.class.php';
     $primaryResourcesDAO = new PrimaryResourcesDAO();
     $rows = $primaryResourcesDAO->Delete($this->cid);
 }