make sure variables are set in case of error
[tine20] / tine20 / Tinebase / views / update.php
1 <?php
2 /**
3  * update view
4  * 
5  * @package     Tinebase
6  * @subpackage  Views
7  * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
8  * @author      Philipp Schüle <p.schuele@metaways.de>
9  * @copyright   Copyright (c) 2007-2012 Metaways Infosystems GmbH (http://www.metaways.de)
10  *
11  */
12 ?>
13 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
14 <html>
15 <head>
16     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
17     <link rel="stylesheet" type="text/css" href="library/ExtJS/resources/css/ext-all.css"/>
18     <script type="text/javascript" src="library/ExtJS/adapter/ext/ext-base.js"></script>
19     <script type="text/javascript" src="library/ExtJS/ext-all.js"></script>
20
21 <?php
22     try {
23         $i18n = Tinebase_Translation::getTranslation('Tinebase');
24         $msg = $i18n->_('Tine 2.0 needs to be updated or is not installed yet.');
25         $title = $i18n->_('Please wait or contact your administrator');
26     } catch (Exception $e) {
27         // new tine installation with empty DB
28         $msg = 'Tine 2.0 needs to be updated or is not installed yet.';
29         $title = 'Please wait or contact your administrator';
30         header('Location: setup.php');
31     }
32     
33     echo <<<EOT
34     <script type="text/javascript">
35         Ext.BLANK_IMAGE_URL = "library/ExtJS/resources/images/default/s.gif";
36         Ext.onReady(function() {
37             Ext.MessageBox.wait('$msg', '$title');
38             window.setTimeout('location.href = location.href', 20000);
39         });
40     </script>
41 EOT;
42 ?>
43
44 </head>
45 <body>
46 <div id="button"></div>
47 </body>
48 </html>