1<?php
2if(!defined('OSTSCPINC') || !$thisstaff || !$thisstaff->isAdmin()) die('Access Denied');
3
4//See if we need to switch the mode of upgrade...e.g from ajax (default) to manual
5if(($mode = $ost->get_var('m', $_GET)) &&  $mode!=$upgrader->getMode()) {
6    //Set Persistent mode/
7    $upgrader->setMode($mode);
8    //Log warning about ajax calls - most likely culprit is AcceptPathInfo directive.
9    if($mode=='manual')
10        $ost->logWarning('Ajax calls are failing',
11                'Make sure your server has AcceptPathInfo directive set to "ON" or get technical help');
12}
13
14$action=$upgrader->getNextAction();
15?>
16    <h2><?php echo sprintf(__('Migrate to osTicket %s'), THIS_VERSION); ?></h2>
17<div id="upgrader">
18    <div id="main">
19            <div id="intro">
20             <p><?php echo __('Thank you for taking the time to upgrade your osTicket intallation!');?></p>
21             <p><strong><?php echo __("Please don't cancel or close the browser. Any errors at this stage will be fatal.");?></strong></p>
22            </div>
23            <h2 id="task"><?php echo sprintf(__('Applying updates to database stream: %s'),
24                $upgrader->getCurrentStream()->name); ?></h2>
25            <p><?php echo __('In order to upgrade to this version of osTicket, a database migration is required. This upgrader will automatically apply the database patches shipped with osTicket since your last upgrade.'); ?></p>
26            <p><?php echo __('The upgrade wizard will now attempt to upgrade your database and core settings!'); ?>
27            <?php echo __('Below is a summary of the database patches to be applied.'); ?>
28            </p>
29            <?php echo $upgrader->getUpgradeSummary(); ?>
30            <div id="bar">
31                <form method="post" action="upgrade.php" id="upgrade">
32                    <?php csrf_token(); ?>
33                    <input type="hidden" name="s" value="upgrade">
34                    <input type="hidden" id="mode" name="m" value="<?php echo $upgrader->getMode(); ?>">
35                    <input type="hidden" name="sh" value="<?php echo $upgrader->getSchemaSignature(); ?>">
36                    <input class="btn"  type="submit" name="submit" value="<?php echo __('Upgrade Now');?>">
37                </form>
38            </div>
39    </div>
40    <div class="sidebar">
41        <div class="content">
42            <h3><?php echo __('Upgrade Tips');?></h3>
43            <p>1. <?php echo __("Be patient. The upgrade process will take a couple of seconds.");?></p>
44
45            <p>2. <?php echo __('If you experience any problems, you can always restore your files/database backup.');?></p>
46            <p>3. <?php echo sprintf(__('We can help. Feel free to %1$s contact us %2$s for professional help.'), '<a href="https://osticket.com/support" target="_blank">', '</a>');?></p>
47        </div>
48    </div>
49    <div class="clear"></div>
50    <div id="upgrading">
51        <i class="icon-spinner icon-spin icon-3x pull-left icon-light"></i>
52        <div style="display: inline-block; width: 220px">
53        <h4 id="action"><?php echo $action; ?></h4>
54        <?php echo __('Please wait... while we upgrade your osTicket installation!');?>
55        <div id="msg" style="font-weight: bold;padding-top:10px;">
56            <?php echo sprintf(__('%s - Relax!'), $thisstaff->getFirstName()); ?>
57        </div>
58        </div>
59    </div>
60</div>
61<div class="clear"></div>
62