1<?php
2if(!defined('OSTSCPINC') || !$thisstaff || !$thisstaff->isAdmin()) die('Access Denied');
3?>
4<h2><?php echo __('osTicket Upgrader');?></h2>
5<div id="upgrader">
6
7    <div id="main">
8            <div id="intro">
9             <p><?php echo __('Thank you for being a loyal osTicket user!');?></p>
10             <p><?php echo __("The upgrade wizard will guide you every step of the way in the upgrade process. While we try to ensure that the upgrade process is straightforward and painless, we can't guarantee it will be the case for every user.");?></p>
11            </div>
12            <h2><?php echo __('Getting ready!');?></h2>
13            <p><?php echo __("Before we begin, we'll check your server configuration to make sure you meet the minimum requirements to run the latest version of osTicket.");?></p>
14            <h3><?php echo __('Prerequisites');?>: <font color="red"><?php echo $errors['prereq']; ?></font></h3>
15            <?php echo __('These items are necessary in order to run the latest version of osTicket.');?>
16            <ul class="progress">
17                <li class="<?php echo $upgrader->check_php()?'yes':'no'; ?>">
18                <?php echo sprintf(__('%s or later'), 'PHP v'.SetupWizard::getPHPVersion()); ?> - (<small><b><?php echo PHP_VERSION; ?></b></small>)</li>
19                <li class="<?php echo $upgrader->check_mysql()?'yes':'no'; ?>">
20                <?php echo __('MySQLi extension for PHP'); ?> - (<small><b><?php
21                    echo extension_loaded('mysqli')?__('module loaded'):__('missing!'); ?></b></small>)</li>
22                <li class="<?php echo $upgrader->check_mysql_version()?'yes':'no'; ?>">
23                <?php echo sprintf(__('%s or later'), 'MySQL v'.SetupWizard::getMySQLVersion()); ?> - (<small><b><?php echo db_version(); ?></b></small>)</li>
24            </ul>
25            <h3><?php echo __('Highly Recommended');?>:</h3>
26            <?php echo __('We highly recommend that you follow the steps below.');?>
27            <ul>
28                <li><?php echo __("Back up the current database if you haven't done so already."); ?></li>
29                <li><?php echo __("Be patient. The upgrade process will take a couple of seconds."); ?></li>
30            </ul>
31            <div id="bar">
32                <form method="post" action="upgrade.php" id="prereq">
33                    <?php csrf_token(); ?>
34                    <input type="hidden" name="s" value="prereq">
35                    <input class="btn"  type="submit" name="submit" value="<?php echo __('Start Upgrade Now');?> &raquo;">
36                </form>
37            </div>
38    </div>
39    <div class="sidebar pull-right">
40            <h3><?php echo __('Upgrade Tips');?></h3>
41            <p>1. <?php echo __('Remember to back up your osTicket database');?></p>
42            <p>2. <?php echo sprintf(__('Refer to %1$s Upgrade Guide %2$s for the latest tips'), '<a href="https://docs.osticket.com/en/latest/Getting%20Started/Upgrade%20and%20Migration.html" target="_blank">', '</a>');?></p>
43            <p>3. <?php echo __('If you experience any problems, you can always restore your files/database backup.');?></p>
44            <p>4. <?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>
45
46    </div>
47    <div class="clear"></div>
48</div>
49
50<div id="overlay"></div>
51<div id="loading">
52    <h4><?php echo __('Doing stuff!');?></h4>
53    <?php echo __('Please wait... while we upgrade your osTicket installation!');?>
54    <div id="msg"></div>
55</div>
56