~fabiocbalbuquerque/sahana-agasti/web-services

1 by Usman Akeju
- initial commit; migrating to new branch internally
1
<?php
2
/**
3
 * Sahana Agasti install.php, this file should be used only upon installation of Sahana Agasti
4
 * The purpose of the file is to automate the distro-like creation of the Agasti Application
5
 * The installer takes the input of users to customize the install of Agasti
6
 *
7
 * PHP version 5
8
 *
9
 * LICENSE: This source file is subject to LGPLv3.0 license
10
 * that is available through the worldwideweb at the following URI:
11
 * http://www.gnu.org/copyleft/lesser.html
12
 *
13
 * @author     Charles Wisniewski, CUNY SPS
14
 *
15
 * Copyright of the Sahana Software Foundation, sahanafoundation.org
16
 */
17
require_once(dirname(__FILE__) . '/install.inc.php');
18
19
1.1.134 by Usman Akeju
- fixes favicon
20
global $AG_CONFIG;
21
22
if (isset($_REQUEST['cancel']) || isset($_REQUEST['finish'])) {
23
  //redirect('admin/new');
24
  ag_unsetcookie('AG_CONFIG');
25
}
26
//ag_flush_post_cookies();
27
$AG_CONFIG = get_cookie('AG_CONFIG', null);
28
if (isset($AG_CONFIG)) {
29
  $AG_CONFIG = unserialize(stripcslashes($AG_CONFIG));
30
} else {
31
  $AG_CONFIG = array();
32
}
33
if (!isset($AG_CONFIG['step']))
34
  $AG_CONFIG['step'] = 0;
35
if (!isset($AG_CONFIG['agree']))
36
  $AG_CONFIG['agree'] = false;
37
38
global $AG_INSTALL;
39
40
$AG_INSTALL = new agInstall($AG_CONFIG);
41
42
ag_set_post_cookie('AG_CONFIG', serialize($AG_CONFIG));
43
44
ag_flush_post_cookies();
45
46
unset($_POST);
1 by Usman Akeju
- initial commit; migrating to new branch internally
47
?>
48
<!--?xml version="1.0" encoding="utf-8"?-->
49
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
50
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
51
  <head>
52
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
1.1.597 by Chad Heuschober
Okay, one more minor edit to the installer title.
53
    <title>Sahana Agasti 2.0 Installer</title>
1.1.141 by Usman Akeju
- re-fixes installer
54
    <link rel="shortcut icon" href="images/favicon.ico" />
1.1.762 by Usman Akeju
- updates stylesheet reference in installer
55
    <link rel="stylesheet" type="text/css" media="screen" href="css/agMain.css" />
1 by Usman Akeju
- initial commit; migrating to new branch internally
56
  </head>
57
  <body>
58
    <div id="header">
59
      <h1>
1.1.597 by Chad Heuschober
Okay, one more minor edit to the installer title.
60
        Sahana Agasti 2.0 Installer
1 by Usman Akeju
- initial commit; migrating to new branch internally
61
      </h1>
62
    </div>
63
    <div id="wrapper">
64
      <div id="columns">
1.1.134 by Usman Akeju
- fixes favicon
65
        <h3><?php echo $AG_INSTALL->steps[$AG_INSTALL->getStep()]['title']; ?></h3>
1 by Usman Akeju
- initial commit; migrating to new branch internally
66
        <div id="columnLeft">
1.1.134 by Usman Akeju
- fixes favicon
67
<?php echo $AG_INSTALL->getList(); ?>
1 by Usman Akeju
- initial commit; migrating to new branch internally
68
        </div>
69
        <div id="columnRight">
1.5.1 by charles wisniewski
removed backend, Agasti plugins are now considered `packages` and live in apps/frontend/lib/packages, symlinks still remain in web. new package manager, a little css cleanup on installer
70
          <form action="install.php" method="post" class="configure" style="margin-right: 80px; float: left;">
1.1.134 by Usman Akeju
- fixes favicon
71
          <?php echo $AG_INSTALL->getState(); ?>
1 by Usman Akeju
- initial commit; migrating to new branch internally
72
73
            <ul>
74
              <li style="text-align: right">
75
                <input type="hidden" name="_enter_check" value="1" />
76
                <input type="hidden" name="_sql_check" value="<?php echo $install_flag; ?>" />
77
1.1.1165 by charles wisniewski
facility json export format set, awaiting data from db. installer ui clean up and logic fixes
78
                <input id="back[<?php echo $AG_INSTALL->getStep(); ?>]" name="back[<?php echo $AG_INSTALL->getStep(); ?>]" type="submit" value="<< Previous" class="generalButton" />
79
                <input type="submit" value="Cancel" class="deleteButton" id="cancel" name="cancel" />
1 by Usman Akeju
- initial commit; migrating to new branch internally
80
<?php
1.1.134 by Usman Akeju
- fixes favicon
81
          if (!isset($AG_INSTALL->steps[$AG_INSTALL->getStep() + 1])) {
82
            //checking to see if there is anything left in the ag_install stage
1.1.1165 by charles wisniewski
facility json export format set, awaiting data from db. installer ui clean up and logic fixes
83
            $dolab = 'Finish';
84
            $doval = 'Finish';
1.1.134 by Usman Akeju
- fixes favicon
85
          } else {
1.1.1165 by charles wisniewski
facility json export format set, awaiting data from db. installer ui clean up and logic fixes
86
            $dolab = "Next[" . $AG_INSTALL->getStep() . "]";
87
            $doval = "Next >>";
1.1.134 by Usman Akeju
- fixes favicon
88
          } ?>
1.1.1165 by charles wisniewski
facility json export format set, awaiting data from db. installer ui clean up and logic fixes
89
                <input id="next[<?php echo $dolab; ?>]" name="<?php echo $dolab ?>" type="submit" value="<?php echo $doval ?>" class="continueButton" <?php if ($AG_INSTALL->DISABLE_NEXT)
1.1.134 by Usman Akeju
- fixes favicon
90
                  echo " disabled=true"; ?> />
1 by Usman Akeju
- initial commit; migrating to new branch internally
91
              </li>
92
            </ul>
93
          </form>
94
        </div>
95
      </div>
96
    </div>
97
    <div id="footer">
1.1.1056 by Usman Akeju
- removes nyc_logo.png
98
      <img src="images/logo.png" alt="NYC Office of Emergency Management Logo" />
1 by Usman Akeju
- initial commit; migrating to new branch internally
99
    </div>
100
  </body>
101
</html>