~fabiocbalbuquerque/sahana-agasti/web-services

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
/**
 * Sahana Agasti install.php, this file should be used only upon installation of Sahana Agasti
 * The purpose of the file is to automate the distro-like creation of the Agasti Application
 * The installer takes the input of users to customize the install of Agasti
 *
 * PHP version 5
 *
 * LICENSE: This source file is subject to LGPLv3.0 license
 * that is available through the worldwideweb at the following URI:
 * http://www.gnu.org/copyleft/lesser.html
 *
 * @author     Charles Wisniewski, CUNY SPS
 *
 * Copyright of the Sahana Software Foundation, sahanafoundation.org
 */
require_once(dirname(__FILE__) . '/install.inc.php');


global $AG_CONFIG;

if (isset($_REQUEST['cancel']) || isset($_REQUEST['finish'])) {
  //redirect('admin/new');
  ag_unsetcookie('AG_CONFIG');
}
//ag_flush_post_cookies();
$AG_CONFIG = get_cookie('AG_CONFIG', null);
if (isset($AG_CONFIG)) {
  $AG_CONFIG = unserialize(stripcslashes($AG_CONFIG));
} else {
  $AG_CONFIG = array();
}
if (!isset($AG_CONFIG['step']))
  $AG_CONFIG['step'] = 0;
if (!isset($AG_CONFIG['agree']))
  $AG_CONFIG['agree'] = false;

global $AG_INSTALL;

$AG_INSTALL = new agInstall($AG_CONFIG);

ag_set_post_cookie('AG_CONFIG', serialize($AG_CONFIG));

ag_flush_post_cookies();

unset($_POST);
?>
<!--?xml version="1.0" encoding="utf-8"?-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Sahana Agasti 2.0 Installer</title>
    <link rel="shortcut icon" href="images/favicon.ico" />
    <link rel="stylesheet" type="text/css" media="screen" href="css/agMain.css" />
  </head>
  <body>
    <div id="header">
      <h1>
        Sahana Agasti 2.0 Installer
      </h1>
    </div>
    <div id="wrapper">
      <div id="columns">
        <h3><?php echo $AG_INSTALL->steps[$AG_INSTALL->getStep()]['title']; ?></h3>
        <div id="columnLeft">
<?php echo $AG_INSTALL->getList(); ?>
        </div>
        <div id="columnRight">
          <form action="install.php" method="post" class="configure" style="margin-right: 80px; float: left;">
          <?php echo $AG_INSTALL->getState(); ?>

            <ul>
              <li style="text-align: right">
                <input type="hidden" name="_enter_check" value="1" />
                <input type="hidden" name="_sql_check" value="<?php echo $install_flag; ?>" />

                <input id="back[<?php echo $AG_INSTALL->getStep(); ?>]" name="back[<?php echo $AG_INSTALL->getStep(); ?>]" type="submit" value="<< Previous" class="generalButton" />
                <input type="submit" value="Cancel" class="deleteButton" id="cancel" name="cancel" />
<?php
          if (!isset($AG_INSTALL->steps[$AG_INSTALL->getStep() + 1])) {
            //checking to see if there is anything left in the ag_install stage
            $dolab = 'Finish';
            $doval = 'Finish';
          } else {
            $dolab = "Next[" . $AG_INSTALL->getStep() . "]";
            $doval = "Next >>";
          } ?>
                <input id="next[<?php echo $dolab; ?>]" name="<?php echo $dolab ?>" type="submit" value="<?php echo $doval ?>" class="continueButton" <?php if ($AG_INSTALL->DISABLE_NEXT)
                  echo " disabled=true"; ?> />
              </li>
            </ul>
          </form>
        </div>
      </div>
    </div>
    <div id="footer">
      <img src="images/logo.png" alt="NYC Office of Emergency Management Logo" />
    </div>
  </body>
</html>