Exemple #1
0
                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');
        break;
    case 'down':
        if (!isset($_GET['id'])) {
            jump('index.php?page=templates');
        }
        $template = new Templates((int) $_GET['id']);
        $template->moveDown();
        jump('index.php?page=templates');
        break;
}