Exemple #1
0
             if (!$template->uploadThumbOnAmazon($_FILES['thumb']['tmp_name'], $err)) {
                 Messages::addError($err);
             }
         }
         if (!empty($_FILES['background']['name'])) {
             if (!$template->uploadBgImageOnAmazon($_FILES['background']['tmp_name'], $err)) {
                 Messages::addError($err);
             }
         }
         if (!empty($_FILES['xml']['name'])) {
             if (!$template->uploadXmlOnAmazon($_FILES['xml']['tmp_name'], $err)) {
                 Messages::addError($err);
             }
         }
         if (!empty($_FILES['swf']['name'])) {
             if (!$template->uploadSwfOnAmazon($_FILES['swf']['tmp_name'], $err)) {
                 Messages::addError($err);
             }
         }
         Messages::addNotice('Saved');
         jump('?page=templates');
     }
     $smarty->assign('template', $template);
     break;
 case 'up':
     if (!isset($_GET['id'])) {
         jump('index.php?page=templates');
     }
     $template = new Templates((int) $_GET['id']);
     $template->moveUp();
     jump('index.php?page=templates');