예제 #1
0
파일: operations.php 프로젝트: hipogea/zega
 public function processPosts()
 {
     //only for admins
     if ($this->levelAccess === 2) {
         if (isset($_POST['setStandardShop'])) {
             return shop::setStandardShop();
         }
         if (isset($_POST['loadDefaultConfig'])) {
             return FBAdmin::loadDefaultConfig();
         }
         if (isset($_POST['Cfg'])) {
             return FBAdmin::updateGalleryConfig();
         }
     }
     //for users with access
     if ($this->levelAccess) {
         if (isset($_POST['function'])) {
             return self::switchToFunction();
         }
         if (isset($_SERVER["HTTP_CONTENT_TYPE"]) || isset($_SERVER["CONTENT_TYPE"])) {
             return Uploader::uploadFiles();
         }
     }
 }
예제 #2
0
 /**
  * Processate POST and FILES
  */
 private function processPosts()
 {
     if ($this->userType === 'admin') {
         if (isset($_POST['loadDefaultConfig'])) {
             FBAdmin::loadDefaultConfig();
         }
         if (isset($_POST['Cfg'])) {
             FBAdmin::updateGalleryConfig();
         }
     }
     if ($this->userType === 'editor' || $this->userType === 'admin') {
         if (isset($_POST['deleteImg']) && isset($_POST['gImg'])) {
             $this->deleteImage();
         }
         if (isset($_POST['newImgOrder'])) {
             $this->newSort();
         }
         if (isset($_POST['function']) && $_POST['function'] === 'renameItem') {
             $this->renameItem();
         }
         if (isset($_FILES['uploader'])) {
             Uploader::preUpload();
         }
     }
 }