示例#1
0
文件: Image.php 项目: kizz66/meat
 public function sort()
 {
     $oImage = new Catalog_Image();
     $oImage->updateSorting($this->show->itemID, $this->post['Sorting']);
     exit;
 }
示例#2
0
文件: Catalog.php 项目: kizz66/meat
 public function delete($itemIDs)
 {
     if (!is_array($itemIDs)) {
         $itemIDs = array($itemIDs);
     }
     $db = MySQL::getInstance();
     $db->query('SELECT `Image` FROM `catalog` WHERE ItemID IN (' . implode(',', $db->escape($itemIDs)) . ')');
     while ($fileName = $db->fetchField()) {
         //			File::delete($fileName, 'var/catalog/');
         //			File::delete('thumb_' . $fileName, 'var/catalog/');
         File::delete($fileName, 'var/catalog/');
         File::delete($fileName, 'var/catalog/tmb/');
     }
     $db->query('DELETE FROM `catalog` WHERE ItemID IN (' . implode(',', $db->escape($itemIDs)) . ')');
     $oImage = new Catalog_Image();
     $oImage->deleteByItemID($itemIDs);
     return true;
 }