Commit 6e4eb47e18b51f25cf10bfe2ea27b5ddc0cbb53f

Authored by jarrett
1 parent 66a351b6

StoryId 778896: Installer Framework updates

Committed by: Jarrett Jordaan

Reviewed by: Megan Watson
setup/wizard/config/config.xml
... ... @@ -3,9 +3,8 @@
3 3 <!--
4 4 Document : config.xml
5 5 Created on : 01 July 2009, 9:57 AM
6   - Author : jarrett
7   - Description:
8   - Purpose of the document follows.
  6 + Author : KnowledgeTree Team
  7 + Description: Installer steps
9 8 -->
10 9  
11 10 <install version="3.3">
... ... @@ -18,4 +17,4 @@
18 17 <step name="Install">install</step>
19 18 <step name="Complete">complete</step>
20 19 </steps>
21 20 - </install>
  21 + </install>
22 22 \ No newline at end of file
... ...
setup/wizard/config/databases.xml
... ... @@ -3,9 +3,8 @@
3 3 <!--
4 4 Document : database.xml
5 5 Created on : 01 July 2009, 1:13 PM
6   - Author : jarrett
7   - Description:
8   - Purpose of the document follows.
  6 + Author : KnowledgeTree Team
  7 + Description: Installer Default MySql Database Configuration
9 8 -->
10 9  
11 10 <database>
... ...
setup/wizard/config/mysql.xml deleted
1   -<?xml version="1.0" encoding="UTF-8"?>
2   -
3   -<!--
4   - Document : mysql.xml
5   - Created on : 01 July 2009, 1:56 PM
6   - Author : jarrett
7   - Description:
8   - Purpose of the document follows.
9   --->
10   -
11   -<mysql version="3.6">
12   - <host>localhost</host>
13   - <name>dms</name>
14   - <username>root</username>
15   - <password></password>
16   - <port>3306</port>
17   - <adminu>dmsadmin</adminu>
18   - <adminp></adminp>
19   -</mysql>
setup/wizard/config/oracle.xml deleted
1   -<?xml version="1.0" encoding="UTF-8"?>
2   -
3   -<!--
4   - Document : oracle.xml
5   - Created on : 01 July 2009, 1:57 PM
6   - Author : jarrett
7   - Description:
8   - Purpose of the document follows.
9   --->
10   -
11   -<oracle>
12   - <host></host>
13   - <name></name>
14   - <username></username>
15   - <password></password>
16   - <port></port>
17   - <adminu></adminu>
18   - <adminp></adminp>
19   -</oracle>
setup/wizard/config/postgres.xml deleted
1   -<?xml version="1.0" encoding="UTF-8"?>
2   -
3   -<!--
4   - Document : postgres.xml
5   - Created on : 01 July 2009, 1:57 PM
6   - Author : jarrett
7   - Description:
8   - Purpose of the document follows.
9   --->
10   -
11   -<postgres>
12   - <host></host>
13   - <name></name>
14   - <username></username>
15   - <password></password>
16   - <port></port>
17   - <adminu></adminu>
18   - <adminp></adminp>
19   -</postgres>
setup/wizard/resources/wizard.css
... ... @@ -10,38 +10,33 @@ body {
10 10 }
11 11  
12 12 h1 {
13   - font-size: 2em;
  13 + font-size: 3em;
14 14 font-weight: normal;
15 15 padding: 10px 0;
16   - color: #444;
  16 + color: #555;
17 17 }
18 18  
19 19 h2 {
20   - font-size: 1.5em;
  20 + font-size: 2em;
21 21 font-weight: normal;
22 22 padding: 10px 0;
23 23 color: #555;
24 24 }
25 25  
26 26 h3 {
27   - font-size: 1.2em;
  27 + font-size: 1.5em;
28 28 font-weight: normal;
29 29 padding: 10px 0;
30 30 color: #555;
31 31 }
32 32  
33   -p {
34   - padding-bottom: 10px;
35   - word-wrap: break-word;
36   -}
37   -
38 33 a {
39 34 color: #EC7725;
40 35 }
41 36  
42 37 th {
43 38 font-weight: bold;
44   - text-align: left;
  39 + font-size: 1.1em;
45 40 padding: 5px 5px;
46 41 }
47 42  
... ... @@ -54,7 +49,6 @@ td {
54 49 margin: 50px;
55 50 margin-top: 20px;
56 51 text-align: left;
57   - z-index: -1;
58 52 }
59 53  
60 54 .header {
... ... @@ -72,32 +66,22 @@ td {
72 66 }
73 67  
74 68 .content {
75   - background: #F1F1F1;
76 69 }
77 70  
78 71 .left {
79   - position: relative;
80 72 float: left;
81 73 width: 200px;
82 74 text-align: center;
83 75 /*background: url("graphics/left.png") repeat-y;*/
84 76 background-position: top left;
85   - background: #F1F1F1;
86 77 height: inherit;
87 78 padding-bottom: 20px;
88 79 padding-top: 40px;
89 80 }
90 81  
91 82 .right {
92   - position: relative;
93 83 float: left;
94 84 padding: 20px;
95   - background: white;
96   -}
97   -
98   -.onclick {
99   - color: #EC7725;
100   - cursor: pointer;
101 85 }
102 86  
103 87 .menu {
... ... @@ -130,7 +114,6 @@ td {
130 114 height: 15px;
131 115 width: 15px;
132 116 padding-left: 20px;
133   - color: #919191;
134 117 }
135 118  
136 119 .tick {
... ... @@ -155,10 +138,6 @@ td {
155 138 align: center;
156 139 }
157 140  
158   -.error {
159   - color: #9F0000;
160   -}
161   -
162 141 .buttons {
163 142 margin-top: 20px;
164 143 position: relative;
... ... @@ -187,7 +166,7 @@ td {
187 166 }
188 167  
189 168 .adv_options {
190   - display: none;
  169 +
191 170 }
192 171  
193 172 .description {
... ... @@ -197,8 +176,13 @@ td {
197 176 }
198 177  
199 178 .top {
200   - font-size: 2em;
201   - font-weight: normal;
202   - padding: 10px 0;
203   - color: #444;
  179 + color:#EC7725;
  180 +}
  181 +
  182 +.right_top {
  183 + height:45px;
  184 +}
  185 +
  186 +#database td {
  187 + width : 340px;
204 188 }
205 189 \ No newline at end of file
... ...
setup/wizard/session.php
... ... @@ -193,7 +193,9 @@ class Session
193 193 */
194 194 public function get($fld) {
195 195 $this->startSession();
196   - return $_SESSION [$fld];
  196 + if(isset($_SESSION [$fld]))
  197 + return $_SESSION [$fld];
  198 + return false;
197 199 }
198 200  
199 201 /**
... ...
setup/wizard/step.php
... ... @@ -260,7 +260,7 @@ class Step
260 260 }
261 261  
262 262 /**
263   - * Safer way to return post data helper
  263 + * Safer way to return post data
264 264 *
265 265 * @author KnowledgeTree Team
266 266 * @params SimpleXmlObject $simplexml
... ... @@ -272,6 +272,18 @@ class Step
272 272 }
273 273  
274 274 /**
  275 + * Safer way to return post data
  276 + *
  277 + * @author KnowledgeTree Team
  278 + * @params SimpleXmlObject $simplexml
  279 + * @access public
  280 + * @return void
  281 + */
  282 + public function getPostBoolean($key) {
  283 + return isset($_POST[$key]) ? $_POST[$key] : false;
  284 + }
  285 +
  286 + /**
275 287 * Runs step install if required
276 288 *
277 289 * @author KnowledgeTree Team
... ...
setup/wizard/steps/complete.php
1 1 <?php
2 2 /**
3   -* Complete Step Controller.
  3 +* Complete Step Controller.
4 4 *
5 5 * KnowledgeTree Community Edition
6 6 * Document Management Made Simple
... ...
setup/wizard/steps/configuration.php
1 1 <?php
2 2 /**
3   -* Configuration Step Controller.
  3 +* Configuration Step Controller.
4 4 *
5 5 * KnowledgeTree Community Edition
6 6 * Document Management Made Simple
... ... @@ -58,12 +58,12 @@ class configuration extends Step
58 58 * @var array
59 59 */
60 60 protected $storeInSession = true;
61   -
  61 +
62 62 public function __construct()
63 63 {
64 64 $this->done = true;
65 65 }
66   -
  66 +
67 67 private function setDetails() {
68 68 $conf = $this->getDataFromSession("configuration");
69 69 if($conf) {
... ... @@ -71,7 +71,7 @@ class configuration extends Step
71 71 $this->temp_variables['paths'] = $conf['paths'];
72 72 }
73 73 }
74   -
  74 +
75 75 public function doStep() {
76 76 if($this->next()) {
77 77 if($this->doRun()){
... ... @@ -97,7 +97,7 @@ class configuration extends Step
97 97 $this->doRun();
98 98 return 'landing';
99 99 }
100   -
  100 +
101 101 public function doRun()
102 102 {
103 103 $server = $this->getServerInfo();
... ... @@ -120,7 +120,7 @@ class configuration extends Step
120 120 $port = $_SERVER['SERVER_PORT'];
121 121 $ssl_enabled = isset($_SERVER['HTTPS']) ? (strtolower($_SERVER['HTTPS']) === 'on' ? 'yes' : 'no') : true;
122 122  
123   - $pos = strpos($script, '/setup/wizard/');
  123 + $pos = strpos($script, '/wizard/');
124 124 $root_url = substr($script, 0, $pos);
125 125  
126 126 $server = array();
... ...
setup/wizard/steps/database.php
1 1 <?php
2 2 /**
3   -* Database Step Controller.
  3 +* Database Step Controller.
4 4 *
5 5 * KnowledgeTree Community Edition
6 6 * Document Management Made Simple
... ... @@ -123,6 +123,33 @@ class database extends Step
123 123 * @var string
124 124 */
125 125 private $dmspassword = '';
  126 +
  127 + /**
  128 + * Default dms user username
  129 + *
  130 + * @author KnowledgeTree Team
  131 + * @access private
  132 + * @var boolean
  133 + */
  134 + private $dmsusername = '';
  135 +
  136 + /**
  137 + * Default dms user password
  138 + *
  139 + * @author KnowledgeTree Team
  140 + * @access private
  141 + * @var boolean
  142 + */
  143 + private $dmsuserpassword = '';
  144 +
  145 + /**
  146 + * Location of database binary.
  147 + *
  148 + * @author KnowledgeTree Team
  149 + * @access private
  150 + * @var string
  151 + */
  152 + private $dbbinary = '';
126 153  
127 154 /**
128 155 * Database table prefix
... ... @@ -227,17 +254,17 @@ class database extends Step
227 254 if($this->next()) {
228 255 $this->setDBConfig(); // Set any posted variables
229 256 $this->setDetails();
230   - return 'confirm';
  257 + if($this->doTest()) { // Test
  258 + return 'confirm';
  259 + } else {
  260 + return 'error';
  261 + }
231 262 } else if($this->previous()) {
232 263 return 'previous';
233 264 } else if($this->confirm()) {
234 265 $this->setDataFromSession("database"); // Set Session Information
235 266 $this->setDBConfig(); // Set any posted variables
236   - if($this->doTest()) { // Test
237   - return 'next';
238   - } else {
239   - return 'error';
240   - }
  267 + return 'next';
241 268 } else if($this->edit()) {
242 269 $this->setDataFromSession("database"); // Set Session Information, since its an edit
243 270 return 'landing';
... ... @@ -253,6 +280,14 @@ class database extends Step
253 280 * @return boolean
254 281 */
255 282 public function doTest() {
  283 + if($this->match($this->dmspassword, $this->getPassword1()) != 0) {
  284 + $this->error = array("19"=>"Passwords do not match: " . $this->dmspassword." ". $this->getPassword1());
  285 + return false;
  286 + }
  287 + if($this->match($this->dmsuserpassword, $this->getPassword2()) != 0) {
  288 + $this->error = array("17"=>"Passwords do not match: " . $this->dmsuserpassword." ". $this->getPassword2());
  289 + return false;
  290 + }
256 291 $con = @mysql_connect($this->dhost, $this->duname, $this->dpassword);
257 292 if (!$con) {
258 293 $this->error = array("1"=>"Could not connect: " . mysql_error());
... ... @@ -262,6 +297,17 @@ class database extends Step
262 297 }
263 298 }
264 299  
  300 + public function match($str1, $str2) {
  301 + return strcmp($str1, $str2);
  302 + }
  303 +
  304 + public function getPassword1() {
  305 + return $_POST['dmspassword2'];
  306 + }
  307 +
  308 + public function getPassword2() {
  309 + return $_POST['dmsuserpassword2'];
  310 + }
265 311 /**
266 312 * Check if theres a database type
267 313 *
... ... @@ -306,16 +352,19 @@ class database extends Step
306 352 */
307 353 public function setDBConfig() {
308 354 $this->dtype = $this->getPostSafe("dtype");
309   - $this->dtypes = array("0"=>"mysql");//$this->getPostSafe("dtypes");
  355 + $this->dtypes = array("0"=>"mysql"); // TODO:multiple databases
310 356 $this->dhost = $this->getPostSafe("dhost");
311 357 $this->dport = $this->getPostSafe("dport");
312 358 $this->dname = $this->getPostSafe("dname");
313 359 $this->duname = $this->getPostSafe("duname");
314 360 $this->dpassword = $this->getPostSafe("dpassword");
315 361 $this->dmsname = $this->getPostSafe("dmsname");
  362 + $this->dmsusername = $this->getPostSafe("dmsusername");
316 363 $this->dmspassword = $this->getPostSafe("dmspassword");
  364 + $this->dmsuserpassword = $this->getPostSafe("dmsuserpassword");
  365 + $this->dbbinary = $this->getPostSafe("dbbinary");
317 366 $this->tprefix = $this->getPostSafe("tprefix");
318   - $this->ddrop = $this->getPostSafe("ddrop");
  367 + $this->ddrop = $this->getPostBoolean("ddrop");
319 368 }
320 369  
321 370 /**
... ... @@ -329,16 +378,19 @@ class database extends Step
329 378 public function loadDefaults($simplexml) {
330 379 if($simplexml) {
331 380 $this->temp_variables['dtype'] = "";
332   - $this->temp_variables['dtypes'] = array("0"=>"mysql");//$this->getTypes($simplexml->dtypes);
  381 + $this->temp_variables['dtypes'] = array("0"=>"mysql"); // TODO:multiple databases
333 382 $this->temp_variables['dname'] = (string) $simplexml->dname;
334 383 $this->temp_variables['duname'] = (string) $simplexml->duname;
335 384 $this->temp_variables['dhost'] = (string) $simplexml->dhost;
336 385 $this->temp_variables['dport'] = (string) $simplexml->dport;
337 386 $this->temp_variables['dpassword'] = '';
338 387 $this->temp_variables['dmsname'] = '';
  388 + $this->temp_variables['dmsusername'] = '';
339 389 $this->temp_variables['dmspassword'] = '';
  390 + $this->temp_variables['dmsuserpassword'] = '';
  391 + $this->temp_variables['dbbinary'] = '';
340 392 $this->temp_variables['tprefix'] = '';
341   - $this->temp_variables['ddrop'] = 0;
  393 + $this->temp_variables['ddrop'] = false;
342 394 }
343 395 }
344 396  
... ... @@ -352,16 +404,19 @@ class database extends Step
352 404 */
353 405 private function setDetails() {
354 406 $this->temp_variables['dtype'] = $this->getPostSafe('dtype');
355   - $this->temp_variables['dtypes'] = array("0"=>"mysql");//$this->getPostSafe('dtypes');
  407 + $this->temp_variables['dtypes'] = array("0"=>"mysql"); // TODO:multiple databases;
356 408 $this->temp_variables['dhost'] = $this->getPostSafe('dhost');
357 409 $this->temp_variables['dport'] = $this->getPostSafe('dport');
358 410 $this->temp_variables['dname'] = $this->getPostSafe('dname');
359 411 $this->temp_variables['duname'] = $this->getPostSafe('duname');
360 412 $this->temp_variables['dpassword'] = $this->getPostSafe('dpassword');
361 413 $this->temp_variables['dmsname'] = $this->getPostSafe('dmsname');
  414 + $this->temp_variables['dmsusername'] = $this->getPostSafe('dmsusername');
362 415 $this->temp_variables['dmspassword'] = $this->getPostSafe('dmspassword');
  416 + $this->temp_variables['dmsuserpassword'] = $this->getPostSafe('dmsuserpassword');;
  417 + $this->temp_variables['dbbinary'] = $this->getPostSafe('dbbinary');
363 418 $this->temp_variables['tprefix'] = $this->getPostSafe('tprefix');
364   - $this->temp_variables['ddrop'] = $this->getPostSafe('ddrop');
  419 + $this->temp_variables['ddrop'] = $this->getPostBoolean('ddrop');
365 420 }
366 421  
367 422 /**
... ... @@ -474,23 +529,27 @@ class database extends Step
474 529 * @return object mysql connection
475 530 */
476 531 private function createDB($con) {
477   - if($this->usedb($con)) { // attempt to use the db
478   - if($this->dropdb($con)) { // attempt to drop the db
479   - if($this->create($con)) { // attempt to create the db
480   -
481   - }
482   - }
483   - } else {
484   - if($this->create($con)) { // attempt to create the db
485   -
486   - }
487   - }
488   -
  532 + if($this->usedb($con)) { // attempt to use the db
  533 + if($this->dropdb($con)) { // attempt to drop the db
  534 + if(!$this->create($con)) { // attempt to create the db
  535 + $this->error = array("15"=>"Could create database: " . mysql_error());
  536 + return false;// cannot overwrite database
  537 + }
  538 + } else {
  539 + $this->error = array("14"=>"Could not drop database: " . mysql_error());
  540 + return false;// cannot overwrite database
  541 + }
  542 + } else {
  543 + if(!$this->create($con)) { // attempt to create the db
  544 + $this->error = array("16"=>"Could create database: " . mysql_error());
  545 + return false;// cannot overwrite database
  546 + }
  547 + }
489 548 $this->createDmsUser($con);
490   - $this->createSchema($con);
491   - $this->populateSchema($con);
492   -
493   - return $con;
  549 + $this->createSchema($con);
  550 + $this->populateSchema($con);
  551 +
  552 + return true;
494 553 }
495 554  
496 555 /**
... ... @@ -550,24 +609,8 @@ class database extends Step
550 609  
551 610 return false;
552 611 }
553   - }
554   -
555   - /**
556   - * Attempts to use a db
557   - *
558   - * @author KnowledgeTree Team
559   - * @params mysql connection object $con
560   - * @access private
561   - * @return boolean
562   - */
563   - private function usedb2($con) {
564   - $sql = "USE {$this->dname};";
565   - if (@mysql_query($sql, $con)) {
566   - return $con;
567   - } else {
568   - $this->error = array("4"=>"Error using database: ".mysql_error()."");
569   - return false;
570   - }
  612 +
  613 + return true;
571 614 }
572 615  
573 616 /**
... ... @@ -579,21 +622,20 @@ class database extends Step
579 622 * @return boolean
580 623 */
581 624 private function createDmsUser($con) {
582   - //TODO
583   - $com = "mysql -u{$this->duname} -p{$this->dpassword} {$this->dname} < sql/user.sql";
584   - exec($com, $output);
585   -// $sql = @file_get_contents("sql/user.sql");
586   -// if($sql) {
587   -// if (@mysql_query($sql, $con)) {
588   -// return true;
589   -// } else {
590   -// $this->error = array("7"=>"Error populating database : ".mysql_error()."");
591   -// return false;
592   -// }
593   -// } else {
594   -// $this->error = array("8"=>"Error Reading sql File : ".mysql_error()."");
595   -// return false;
596   -// }
  625 + if($this->dmsname == '' || $this->dmspassword == '') {
  626 + $command = "{$this->dbbinary} -u{$this->duname} -p{$this->dpassword} {$this->dname} < sql/user.sql";
  627 +
  628 + return exec($command, $output);
  629 + } else {
  630 + $sql = "GRANT SELECT, INSERT, UPDATE, DELETE ON {$this->dname}.* TO {$this->dmsusername}@{$this->dhost} IDENTIFIED BY '{$this->dmsuserpassword}';GRANT ALL PRIVILEGES ON {$this->dname}.* TO {$this->dmsname}@{$this->dhost} IDENTIFIED BY '{$this->dmspassword}';";
  631 + if (@mysql_query($sql, $con)) {
  632 + return true;
  633 + } else {
  634 + $this->error = array("18"=>"Could not create users in database: ".mysql_error()."");
  635 + return false;
  636 + }
  637 + }
  638 +
597 639 }
598 640  
599 641 /**
... ... @@ -605,25 +647,8 @@ class database extends Step
605 647 * @return boolean
606 648 */
607 649 private function createSchema($con) {
608   - // TODO :
609   - $com = "mysql -u{$this->duname} -p{$this->dpassword} {$this->dname} < sql/structure.sql";
610   - exec($com, $output);
611   -// $sql = "USE {$this->dname};";
612   -// $sql .= file_get_contents("sql/structure.sql");
613   -// echo $sql;die;
614   -// if($sql) {
615   -// if (mysql_query($sql, $con)) {
616   -//
617   -// return true;
618   -// } else {
619   -//
620   -// $this->error = array("9"=>"Error creating database schema : ".mysql_error()."");
621   -// return false;
622   -// }
623   -// } else {
624   -// $this->error = array("10"=>"Error Reading sql File : ".mysql_error()."");
625   -// return false;
626   -// }
  650 + $command = "{$this->dbbinary} -u{$this->duname} -p{$this->dpassword} {$this->dname} < sql/structure.sql";
  651 + exec($command, $output);
627 652 }
628 653  
629 654 /**
... ... @@ -635,21 +660,8 @@ class database extends Step
635 660 * @return boolean
636 661 */
637 662 private function populateSchema($con) {
638   - // TODO :
639   - $com = "mysql -u{$this->duname} -p{$this->dpassword} {$this->dname} < sql/data.sql";
640   - exec($com, $output);
641   -// $sql = @file_get_contents("sql/data.sql");
642   -// if($sql) {
643   -// if (@mysql_query($sql, $con)) {
644   -// return true;
645   -// } else {
646   -// $this->error = array("11"=>"Error populating database : ".mysql_error()."");
647   -// return false;
648   -// }
649   -// } else {
650   -// $this->error = array("12"=>"Error Reading sql File : ".mysql_error()."");
651   -// return false;
652   -// }
  663 + $command = "{$this->dbbinary} -u{$this->duname} -p{$this->dpassword} {$this->dname} < sql/data.sql";
  664 + return exec($command, $output);
653 665 }
654 666  
655 667 /**
... ...
setup/wizard/steps/dependency_check.php
1 1 <?php
2 2 /**
3   -* Dependency Step Step Controller.
  3 +* Dependency Step Step Controller.
4 4 *
5 5 * KnowledgeTree Community Edition
6 6 * Document Management Made Simple
... ... @@ -39,7 +39,6 @@
39 39 * @package Installer
40 40 * @version Version 0.1
41 41 */
42   -
43 42 require_once(WIZARD_DIR.'step.php');
44 43  
45 44 class dependencyCheck extends Step
... ... @@ -47,7 +46,15 @@ class dependencyCheck extends Step
47 46 private $maxPHPVersion = '6.0.0';
48 47 private $minPHPVersion = '5.0.0';
49 48 private $done;
50   -
  49 + /**
  50 + * Flag to store class information in session
  51 + *
  52 + * @author KnowledgeTree Team
  53 + * @access public
  54 + * @var array
  55 + */
  56 + public $storeInSession = true;
  57 +
51 58 /**
52 59 * Constructor
53 60 *
... ... @@ -75,7 +82,7 @@ class dependencyCheck extends Step
75 82  
76 83 return 'landing';
77 84 }
78   -
  85 +
79 86 public function doRun()
80 87 {
81 88 $check = $this->checkPhpVersion();
... ...
setup/wizard/steps/install.php
1 1 <?php
2 2 /**
3   -* Install Step Controller.
  3 +* Install Step Controller.
4 4 *
5 5 * KnowledgeTree Community Edition
6 6 * Document Management Made Simple
... ...
setup/wizard/steps/license.php
1 1 <?php
2 2 /**
3   -* License Step Controller.
  3 +* License Step Controller.
4 4 *
5 5 * KnowledgeTree Community Edition
6 6 * Document Management Made Simple
... ... @@ -50,7 +50,7 @@ class license extends step {
50 50 public function doStep() {
51 51 if($this->next()) {
52 52 if($this->doRun())
53   -
  53 +
54 54 return 'next';
55 55 else
56 56 return 'error';
... ... @@ -59,7 +59,7 @@ class license extends step {
59 59 return 'previous';
60 60 }
61 61  
62   - return 'landing'; // Just a welcome, so return "next" action
  62 + return 'landing'; // Just a license, so return "next" action
63 63 }
64 64  
65 65 public function doRun() {
... ...
setup/wizard/steps/welcome.php
1 1 <?php
2 2 /**
3   -* Welcome Step Controller.
  3 +* Welcome Step Controller.
4 4 *
5 5 * KnowledgeTree Community Edition
6 6 * Document Management Made Simple
... ...
setup/wizard/templates/configuration.tpl
1 1 <h1>System Configuration</h1>
2 2  
3   -<form action="index.php?step_name=configuration" method="POST">
  3 +<form action="index.php?step_name=configuration" method="post">
4 4  
5 5 <h3>Server Settings</h3>
6 6  
... ...
setup/wizard/templates/configuration_confirm.tpl
... ... @@ -44,7 +44,7 @@
44 44 ?>
45 45 </table>
46 46  
47   -<form action="index.php?step_name=configuration" method="POST">
  47 +<form action="index.php?step_name=configuration" method="post">
48 48  
49 49 <div class="buttons">
50 50 <!--<input type="submit" onclick="history.back();" name="Back" value="Back"/>
... ...
setup/wizard/templates/database.tpl
1 1 <h1>Database Configuration</h1>
2 2  
3   -<form action="index.php?step_name=<?php echo $step_name; ?>" method='POST'>
  3 +<form action="index.php?step_name=<?php echo $step_name; ?>" method="post">
  4 +<div id="database" class="step1" style="display:block;">
  5 + Select your database type:
  6 + <div class="dtype">
  7 + <?php if($dtypes) {
  8 + foreach($dtypes as $k=>$v) {
  9 + ?>
  10 + <input type="radio" name="dtype" value="<?php echo $v; ?>" <?php if(!$k)echo 'checked="checked"'; ?>/>&nbsp;&nbsp;<?php echo ucwords($v); ?>
  11 + <br/>
  12 + <?php }
  13 + }
  14 + ?>
  15 + </div>
4 16  
5   -Select your database type:
6   -<div class='dtype'>
7   -<?php if($dtypes) {
8   - foreach($dtypes as $k=>$v) {
9   - ?>
10   - <input type='radio' name='dtype' value="<?php echo $v; ?>" <?php echo (!$k) ? 'CHECKED' : ''; ?>"/>&nbsp;&nbsp;<?php echo ucwords($v); ?>
11   -<!-- <input type='hidden' name='dtypes' value='<?php echo $v; ?>'>-->
12   - <br/>
13   -<?php }
14   -}
15   -?>
16   -<!--<input type='hidden' name='dtypes' value='postgres'>-->
17   -<!--<input type='hidden' name='dtypes' value='oracle'>-->
18   -<br />
  17 + <table>
  18 + <tr>
  19 + <td><label for='dname'>Enter a name for the database: </label></td>
  20 + <td><input type='text' value="<?php echo $dname?>" id='dname' name='dname' size='40' /></td>
  21 + </tr>
  22 + <tr>
  23 + <td><label for='duname'>Enter the username for the Root or Administrative User: </label></td>
  24 + <td><input type='text' value="<?php echo $duname?>" id='duname' name='duname' size='40' /></td>
  25 + </tr>
  26 + <tr>
  27 + <td><label for='dpassword'>Enter the password for the user: </label></td>
  28 + <td><input type='text' value="<?php echo $dpassword?>" id='dpassword' name='dpassword' size='40' /></td>
  29 + </tr>
  30 + <tr>
  31 + <td><label for='ddrop'>Drop database if it exists: </label></td>
  32 + <td><input type="checkbox" id='ddrop' name="ddrop" <?php echo ($ddrop) ? 'CHECKED' : ''; ?>/></td>
  33 + </table>
  34 + <div id="options" onclick="showAO();" style="cursor:pointer;">Advanced Options</div>
  35 + <div id="database" class="adv_options" style="display:none;">
  36 + <div class="description">
  37 + These options are only necessary for some sites. If you're not sure what you should enter here, leave the default settings or check with your hosting provider.
  38 + </div>
  39 + <table>
  40 + <tr>
  41 + <td><label for='dname'>Host: </label></td>
  42 + <td><input type="text" value="<?php echo $dhost?>" id="dhost" name="dhost" size='40'/><br/></td>
  43 +
  44 + </tr>
  45 + <tr><td><div class="description">If your database is located on a different server, change this.</div></td></tr>
  46 + <tr>
  47 + <td><label for='dname'>Port: </label></td>
  48 + <td><input type="text" value="<?php echo $dport?>" id="dport" name="dport" size="40"/></td>
  49 + <tr><td><div class="description">If your database server is listening to a non-standard port, enter its number.</div></tr></td>
  50 + </tr>
  51 + <tr>
  52 + <td><label for='dname'>Binary: </label></td>
  53 + <td><input type="text" value="<?php echo $dbbinary?>" id="dbbinary" name="dbbinary" size="40"/></td>
  54 + <tr><td><div class="description">If your database binary is not in the system path, change this.</div></tr></td>
  55 + </tr>
  56 + <tr>
  57 + <td><label for='dname'>Table Prefix: </label></td>
  58 + <td><input type="text" value="<?php echo $tprefix?>" id="tprefix" name="tprefix" size="40"/></td>
  59 + <tr><td><div class="description">If more than one application will be sharing this database, enter a table prefix such as kt_ for your KnowledgeTree site here.</div></tr></td>
  60 + </tr>
  61 + </table>
  62 + </div>
  63 + <div class="buttons">
  64 + <input type="submit" name="Previous" value="previous" />
  65 + <input type="button" name="Next" value="next" onclick="showStep(1, 'n');"/>
  66 + </div>
19 67 </div>
20   -
21   -<table>
22   - <tr>
23   - <td><label for='dname'>Enter a name for the database: </label></td>
24   - <td><input type='text' value="<?php echo $dname?>" id='dname' name='dname' size='40' /></td>
25   - </tr>
26   - <tr>
27   - <td><label for='duname'>Enter the username for the Root or Administrative User: </label></td>
28   - <td><input type='text' value="<?php echo $duname?>" id='duname' name='duname' size='40' /></td>
29   - </tr>
30   - <tr>
31   - <td><label for='dpassword'>Enter the password for the user: </label></td>
32   - <td><input type='text' value="<?php echo $dpassword?>" id='dpassword' name='dpassword' size='40' /></td>
33   - </tr>
34   - <tr>
35   - <td><label for='ddrop'>Drop database if it exists: </label></td>
36   - <td><input type="checkbox" id='ddrop' name="ddrop" <?php echo ($ddrop) ? 'CHECKED' : ''; ?>></td>
37   -</table>
38   -
39   -<br />
40   -
41   -<div id='options' onclick='showAO();' class='onclick'>Advanced Options</div>
42   -<div class='description'>
43   - These options are only necessary for some sites. If you're not sure what you should enter here, leave the default settings.
44   - </div>
45   -<div class='adv_options'>
46   -
47   - <p>
48   - <label for='dhost'>Host:</label><br />
49   - <span class='description'>If your database is located on a different server, change this.</span><br />
50   - <input type='text' value='<?php echo $dhost?>' name='dhost' id='dhost' size='40' />
51   - </p>
52   -
53   - <p>
54   - <label for='dport'>Port:</label><br />
55   - <span class='description'>If your database server is listening to a non-standard port, enter its number.</span><br />
56   - <input type='text' value='<?php echo $dport?>' name='dport' id='dport' size='10' />
57   - </p>
58   -
59   - <p>
60   - <label for='prefix'>Table Prefix: </label><br />
61   - <span class='description'>If more than one application will be sharing this database, enter a table prefix such as kt_ for your KnowledgeTree site here.</span><br />
62   - <input type='text' value='' name='prefix' id='prefix' size='40' />
63   - </p>
64   -
  68 +<div id="database" class="step2" style="display:none;">
  69 + <table>
  70 + <tr>
  71 + <td><label for='dmsname'>Enter a name for the DMS Admin User: </label></td>
  72 + <td><input type='text' value="<?php echo $dmsname; ?>" id='dmsname' name='dmsname' size='40' /></td>
  73 + </tr>
  74 + <tr>
  75 + <td><label for='dmspassword'>Enter the password for the DMS Admin User: </label></td>
  76 + <td><input type='text' value="<?php echo $dmspassword; ?>" id='dmspassword' name='dmspassword' size='40' /></td>
  77 + </tr>
  78 + <tr>
  79 + <td><label for='dmspassword2'>Re Enter the password for the DMS Admin User: </label></td>
  80 + <td><input type='text' value="" id='dmspassword2' name='dmspassword2' size='40' /></td>
  81 + </tr>
  82 + </table>
  83 +
  84 + <div class="buttons">
  85 + <input type="button" name="Previous" value="previous" onclick="showStep(2, 'p');"/>
  86 + <input type="button" name="Next" value="next" onclick="showStep(2, 'n');"/>
  87 + </div>
65 88 </div>
66   -<div class="buttons">
67   - <input type="submit" name="Previous" value="previous"/>
68   - <input type="submit" name="Next" value="next"/>
  89 +
  90 +<div id="database" class="step3" style="display:none;":>
  91 + <table>
  92 + <tr>
  93 + <td><label for='dmsusername'>Enter a name for the DMS Default User: </label></td>
  94 + <td><input type='text' value="<?php echo $dmsusername; ?>" id='dmsusername' name='dmsusername' size='40' /></td>
  95 + </tr>
  96 + <tr>
  97 + <td><label for='dmsuserpassword'>Enter the password for the DMS Default User: </label></td>
  98 + <td><input type='text' value="<?php echo $dmsuserpassword?>" id='dmsuserpassword' name='dmsuserpassword' size='40' /></td>
  99 + </tr>
  100 + <tr>
  101 + <td><label for='dmsuserpassword2'>Re Enter the password for the DMS Default User: </label></td>
  102 + <td><input type='text' value="" id='dmsuserpassword2' name='dmsuserpassword2' size='40' /></td>
  103 + </tr>
  104 + </table>
  105 + <div class="buttons">
  106 + <input type="button" name="Previous" value="previous" onclick="showStep(3, 'p');"/>
  107 + <input type="submit" name="Next" value="next"/>
  108 + </div>
69 109 </div>
  110 +
70 111 <div class="errors">
71 112 <?php if(isset($errors)) {
72 113 foreach($errors as $k=>$e) {
... ... @@ -75,12 +116,25 @@ Select your database type:
75 116 }?>
76 117 </div>
77 118 </form>
78   -<script>
  119 +<script type="text/javascript">
  120 +// Toggle Advance Database options
79 121 function showAO() {
80   - var v = document.getElementsByClassName("adv_options");
81   - if(v[0].style.display == 'none')
82   - v[0].style.display = 'block';
  122 + var el = document.getElementsByClassName("adv_options");
  123 + if(el[0].style.display == 'none')
  124 + el[0].style.display = 'block';
83 125 else
84   - v[0].style.display = 'none';
  126 + el[0].style.display = 'none';
  127 + }
  128 +// Handle steps within database page
  129 + function showStep(p, d) {
  130 + var el = document.getElementsByClassName("step"+p);
  131 + el[0].style.display = 'none';
  132 + if(d == "n") {
  133 + var j = p+1;
  134 + } else if(d == "p") {
  135 + var j = p-1;
  136 + }
  137 + var el = document.getElementsByClassName("step"+j);
  138 + el[0].style.display = 'block';
85 139 }
86 140 </script>
87 141 \ No newline at end of file
... ...
setup/wizard/templates/database_confirm.tpl
1   -<h1>Database Configuration Confirmation</h1>
2   -
3   -<form action="index.php?step_name=<?php echo $step_name; ?>" method="POST">
4   -
  1 +<form action="index.php?step_name=<?php echo $step_name; ?>" method="post">
  2 +DB Configuration Confirmation:
5 3 <div class="dtype">
6 4 <?php if($dtypes) {
7 5 foreach($dtypes as $k=>$v) {
8   - if(!$k) $dtype = $v;
9   - }
10   - }
  6 + ?>
  7 + <input type="radio" name="dtype" value="<?php echo $v; ?>" <?php if(!$k)echo 'checked="checked"'; ?>/><?php echo $v; ?>
  8 + <br/>
  9 +<?php }
  10 +}
11 11 ?>
12   -
13 12 </div>
14   -
15   -<table>
16   - <tr>
17   - <td><b>Selected database type:</b></td>
18   - <td>MySQL</td>
19   - </tr>
20   - <tr>
21   - <td><b>Databse Name:</b></td>
22   - <td><?php echo $dname; ?></td>
23   - </tr>
24   - <tr>
25   - <td><b>Administrative / Root Username:</b></td>
26   - <td><?php echo $duname; ?></td>
27   - </tr>
28   - <tr>
29   - <td><b>Password:</b></td>
30   - <td><?php echo $dpassword; ?></td>
31   - </tr>
32   - <tr>
33   - <td><b>Database Server Host:</b></td>
34   - <td><?php echo $dhost; ?></td>
35   - </tr>
36   - <tr>
37   - <td><b>Port:</b></td>
38   - <td><?php echo $dport; ?></td>
39   - </tr>
40   - <tr>
41   - <td><b>Table Prefix:</b></td>
42   - <td><?php echo $tprefix; ?></td>
43   - </tr>
44   - <tr>
45   - <td colspan='2'>You have selected the option to drop the database if it already exists.</td>
46   - </tr>
47   -</table>
48   -
49   -
  13 +Name:<?php echo $dname; ?><br/>
  14 +Root Username:<?php echo $duname; ?><br/>
  15 +Root Password:<?php echo $dpassword; ?><br/>
  16 +DMS Admin Username:<?php echo $dmsname; ?><br/>
  17 +DMS Admin Password:<?php echo $dmspassword; ?><br/>
  18 +DMS User Username:<?php echo $dmsusername; ?><br/>
  19 +DMS User Password:<?php echo $dmsuserpassword; ?><br/>
  20 +Host:<?php echo $dhost; ?><br/>
  21 +Port:<?php echo $dport; ?><br/>
  22 +Binary:<?php echo $dbbinary; ?><br/>
  23 +Table Prefix:<?php echo $tprefix; ?><br/>
  24 +<?php if($ddrop) { ?> You are about to drop the table if it exists <?php } ?>
50 25 <div class="buttons">
51 26 <input type="submit" name="Edit" value="Edit"/>
52 27 <input type="submit" name="Confirm" value="Confirm"/>
... ...
setup/wizard/templates/dependency_check.tpl
1 1 <h1>PHP Dependencies Check</h1>
2 2  
3   -<?php
4   -if($errors){
5   - echo '<div class="error">';
6   - foreach ($errors as $msg){
7   - echo $msg . "<br />\n";
8   - }
9   - echo '</div>';
10   -}
11   -?>
12   -
13 3 <h3>PHP Version Check</h3>
14 4  
15 5 <?php echo "<span class='{$version['class']}'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>{$version['version']}"; ?>
... ... @@ -70,7 +60,7 @@ if($errors){
70 60 ?>
71 61  
72 62 </table>
73   -<form action="index.php?step_name=dependency_check" method="POST">
  63 +<form action="index.php?step_name=dependency_check" method="post">
74 64  
75 65 <div class="buttons">
76 66 <input type="submit" name="Previous" value="Previous"/>
... ...
setup/wizard/templates/install.tpl
1 1 install
2 2 <br/>
3   -<form action="index.php?step_name=install" method="POST">
  3 +<form action="index.php?step_name=install" method="post">
4 4 <div class="buttons">
5 5 <input type="submit" name="Previous" value="Previous"/>
6 6 <input type="submit" name="Install" value="Install"/>
... ...
setup/wizard/templates/license.tpl
1   -<h1>License Agreement</h1>
2   -
3   -<div class="error">
4   - <?php if(isset($errors)) {
5   - foreach($errors as $k=>$e) {
6   - echo $e;
7   - }
8   - }?>
9   -</div>
10   -
11   -<form action="index.php?step_name=license" method="POST">
12   -<div style="overflow: scroll; height: 500px; width:800px;">
13   -<h2>KnowledgeTree On-premise Commercial End-User</h2>
14   -<p>
  1 +<form action="index.php?step_name=license" method="post">
  2 +<div>
  3 +<textarea cols="100" rows="20">
  4 +KnowledgeTree On-premise Commercial End-User
15 5 License Agreement Version 2.3
16   -</p>
17   -<p>
18   -PLEASE READ THIS DOCUMENT CAREFULLY BEFORE INSTALLING THE SOFTWARE. BY INSTALLING AND USING THE SOFTWARE, YOU AGREE ON BEHALF
19   -OF THE ENTITY LICENSING THE SOFTWARE AND WHO IS BECOMING A PARTY TO THIS LICENSE AGREEMENT ("THE COMPANY") TO BE BOUND BY THE TERMS OF
20   -THIS AGREEMENT AND THAT YOU HAVE THE NECESSARY AUTHORITY TO BIND THE COMPANY TO THIS AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS OF
  6 +PLEASE READ THIS DOCUMENT CAREFULLY BEFORE INSTALLING THE
  7 +SOFTWARE. BY INSTALLING AND USING THE SOFTWARE, YOU AGREE ON BEHALF
  8 +OF THE ENTITY LICENSING THE SOFTWARE AND WHO IS BECOMING A PARTY TO
  9 +THIS LICENSE AGREEMENT (“THE COMPANYâ€?) TO BE BOUND BY THE TERMS OF
  10 +THIS AGREEMENT AND THAT YOU HAVE THE NECESSARY AUTHORITY TO BIND
  11 +THE COMPANY TO THIS AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS OF
21 12 THE AGREEMENT, DO NOT INSTALL OR USE THE SOFTWARE.
22   -</p>
23   -<p>
24   -This is an agreement entered into by and between you (the "Company") and KnowledgeTree Inc. and
25   -its subsidiaries ("KT"). This Agreement states the terms and conditions upon which KT offers to
  13 +This is an agreement entered into by and between you (the “Companyâ€?) and KnowledgeTree Inc. and
  14 +its subsidiaries (“KTâ€?). This Agreement states the terms and conditions upon which KT offers to
26 15 license the KnowledgeTree Commercial Editions software provided in this package together with all
27 16 related documentation and accompanying items including, but not limited to, the executable programs,
28   -drivers, libraries and data files associated with such programs (collectively, the "Software").
29   -</p>
30   -
31   -<h3>DEFINITIONS</h3>
32   -<p>
  17 +drivers, libraries and data files associated with such programs (collectively, the “Softwareâ€?).
  18 +DEFINITIONS
33 19 Accessible Code means source code contained within the Software that is accessible under this
34 20 Agreement.
35   -</p>
36   -<p>
37 21 Affiliate means a company which is controlled, under common control or controlling the Company
38 22 during the period of such control. For the purposes of this Agreement, "control" shall mean ownership,
39 23 directly or indirectly, of more than 50% of the shares in the Company (or other voting securities) which
40 24 vote for the election of the board of directors or other managing body of the Company.
41   -</p>
42   -<p>
43 25 End User means an employee, contractor or agent of the Company and its Affiliates authorized by the
44 26 Company to use the Software as per the terms of this Agreement.
45   -</p>
46   -<p>
47 27 OEM Distribution means distribution of the Software as either a bundled add-on to, or embedded
48 28 component of, another application with such application being made available to its users as, but not
49 29 limited to, an on-premise application, a hosted application, a Software-as-a-Service offering or a
50 30 subscription service for which the distributor of the application receives a license fee or any form of
51 31 direct or indirect compensation.
52   -</p>
53   -<p>
54 32 Protected Code means source code contained within the Software that is protected against access by
55 33 KT and is not accessible under this Agreement.
56   -</p>
57   -<p>
58 34 Distribution Archive means a software installer package or any other distribution medium commonly
59 35 utilized to package and distribute software.
60   -</p>
61   -<p>
62 36 Customer Service Systems means any online system provided by KT or its service providers to provide
63 37 Company with product support, access to the Software, or user licenses, though not limited to these
64 38 services.
65   -</p>
66   -<p>
67 39 Unlimited Use License means a grant of license under this agreement that is not limited to a set
68 40 number of End Users, but is limited to one physical server device that the Software may be run on.
69 41 Grant of Rights
70   -</p>
71   -<p>
72 42 For the term of this Agreement and subject to the Company's payment of the license fees as defined
73 43 below KT grants the Company a non-exclusive, non-transferable, non-sublicensable right to use and
74 44 modify the Software only for the Company's own internal use and limited to the number of End Users
75 45 for which the Company has paid the applicable license fee.
76   -</p>
77   -<h3>Company's responsibility for End Users</h3>
78   -<p>
  46 +Company’s responsibility for End Users
79 47 The Company shall be responsible for any act or omission of all End Users and for their compliance
80 48 with all of the terms of this Agreement. Any action or breach by any of the Company's employees,
81 49 contractors, agents or Affiliates shall be deemed an action or breach by the Company of this
... ... @@ -84,25 +52,19 @@ breaches of this Agreement. The Company waives all of those defenses that the Co
84 52 law or otherwise which may be raised to avoid liability should the Company not be liable for its
85 53 employees, contractors', agents' or Affiliates' acts, omissions and non-compliance with the terms of this
86 54 Agreement.
87   -</p>
88   -<h3>Delivery and acceptance of the Software</h3>
89   -<p>
  55 +Delivery and acceptance of the Software
90 56 The Software shall be deemed accepted once the Company has successfully downloaded and unpacked
91 57 the Distribution Archive.
92   -</p>
93   -<h3>Restrictions</h3>
94   -<p>
  58 +Restrictions
95 59 The Company shall not, directly or indirectly: (i) remove or alter any copyright, trademark or
96 60 proprietary notice in the Software; (ii) transfer, use or export the Software in violation of any laws or
97 61 regulations of any government or governmental agency; (iii) reverse engineer, decompile or modify
98 62 any protected code which forms part of the Software; (iv) distribute the Software via OEM Distribution
99 63 without entering into a separate OEM Distribution Agreement with KT; (v) redistribute the Accessible
100 64 or Protected Code; (vi) use and or modify the Software to develop a competitive product; and (vii)
101   -commit any act or omission the likely result of which is that KT's reputation will be brought into
  65 +commit any act or omission the likely result of which is that KT’s reputation will be brought into
102 66 disrepute or which act or omission could reasonably be expected to have or does have a material and
103   -adverse effect on KT's interests.
104   -</p>
105   -<p>
  67 +adverse effect on KT’s interests.
106 68 The Software includes license protection mechanisms that are designed to manage and protect the
107 69 intellectual property rights of KT. The Company must not modify or alter those features to try to defeat
108 70 the Software use rules that the license protection mechanisms are designed to enforce.
... ... @@ -111,16 +73,12 @@ Company may continue to use the Software initially provided under this Agreement
111 73 code and license key and use differing databases, web servers or operating systems than the database,
112 74 web server or operating system initially selected by the Company on installation of the Software at no
113 75 charge.
114   -</p>
115   -<h3>Proprietary Rights</h3>
116   -<p>
  76 +Proprietary Rights
117 77 KT and its licensors shall own all right, title, and interest to the Software, technology, information,
118 78 code or software provided to Company, including all portions, copies or modifications thereof. Except
119 79 as expressly provided herein, no licenses of any kind are granted hereunder, whether by implication,
120 80 estoppel, or otherwise.
121   -</p>
122   -<h3>Fees and Payment</h3>
123   -<p>
  81 +Fees and Payment
124 82 End User Accounts: The Company shall designate an Administrator and notify KT of the identity and
125 83 contact information for said Administrator. The Administrator may add End Users to the Company's
126 84 subscription for the Software by placing an order with KT. The Company is responsible for all activity
... ... @@ -129,8 +87,6 @@ unauthorized use of any password or account that provides Company access to the
129 87 Systems, or unauthorized copying or distribution of the Software or related proprietary material. End
130 88 User accounts cannot be shared or used by more than one individual End User but may be reassigned to
131 89 new End Users replacing former End Users.
132   -</p>
133   -<p>
134 90 License fee: The Company shall pay to KT an amount specified on the KnowledgeTree website for the
135 91 number of End Users that Company selects. Payment of the license fee shall be due and payable as set
136 92 forth in the terms and conditions on the KnowledgeTree website. All fees paid to KT are non-
... ... @@ -138,50 +94,37 @@ refundable. The Company will also pay all applicable taxes, including sales, use
138 94 value-added, excise, customs fees, import duties, stamp duties and any other similar taxes and duties,
139 95 including penalties and interest, imposed by any federal, state, provincial or other government entity on
140 96 the transactions contemplated by this Agreement.
141   -</p>
142   -<p>
143 97 Records Retention: Unless the company has purchased an Unlimited Use License, the Company shall
144 98 maintain accurate records necessary to verify the number of End Users. Upon KT's written request, the
145 99 Company shall provide KT with such records within ten (10) days. If the Company has more End
146 100 Users than the Company has paid for, the Company shall immediately pay KT an additional license fee
147 101 in addition to any costs incurred by KT associated with reviewing such records.
148   -</p>
149   -<h3>COPYRIGHT</h3>
150   -<p>
  102 +COPYRIGHT
151 103 KT reserves all rights not expressly granted to you in this EULA. The Software is protected by
152 104 copyright and other intellectual property laws and treaties. KT and/or its licensors own the title,
153 105 copyright, and other intellectual property rights in the Software. The Software is licensed, not sold. The
154 106 Company may not remove the copyright notice from any copy of the Software or any copy of the
155 107 written materials, if any, accompanying the Software.
156   -</p>
157   -<h3>MERGER OR INTEGRATION</h3>
158   -<p>
  108 +MERGER OR INTEGRATION
159 109 Should the Company merge any portion of the Software or accessible code into, or integrate any
160 110 portion of the Software or accessible code with, any other program or code, any portion of the Software
161 111 or accessible code merged into or integrated with another program, if any, will continue to be subject to
162 112 the terms and conditions of this Agreement, and the Company must reproduce on the merged or
163 113 integrated portion all copyright and other proprietary rights notices included in the originals of the
164 114 Software or accessible code.
165   -</p>
166   -<h3>TRANSFER OF LICENSE</h3>
167   -<p>
  115 +TRANSFER OF LICENSE
168 116 The Company may not transfer its license in terms of this Agreement to any external third parties.
169   -</p>
170   -<h3>LIMITATIONS ON USING, COPYING, AND MODIFYING THE SOFTWARE</h3>
171   -<p>
  117 +LIMITATIONS ON USING, COPYING, AND MODIFYING THE SOFTWARE
172 118 Except to the extent expressly permitted by this Agreement or by the laws of the jurisdiction where the
173 119 Company acquired the Software, it may not use, copy or modify the Software. Nor may the Company
174 120 sub-license any of its rights under this Agreement.
175   -</p>
176   -<h3>DECOMPILING, DISASSEMBLING, OR REVERSE ENGINEERING</h3>
177   -<p>
  121 +DECOMPILING, DISASSEMBLING, OR REVERSE ENGINEERING
178 122 The Company acknowledges that the Software contains trade secrets and other proprietary information
179 123 of KT and its licensors. Except to the extent expressly permitted by this Agreement or by the laws of
180 124 the jurisdiction where the Company is located, it may not decompile, disassemble or otherwise reverse
181 125 engineer the Software, or engage in any other activities to obtain underlying information that is not
182 126 visible to the user in connection with the normal use of the Software.
183   -</p>
184   -<p>
  127 +
185 128 In particular, the Company agrees not for any purpose to transmit the Software or display the
186 129 Software's object code on any computer screen or to make any hardcopy memory dumps of the
187 130 Software's object code. If the Company believes that it requires information related to the
... ... @@ -190,40 +133,29 @@ Software to obtain such information, and it agrees to request such information f
190 133 listed below. Upon receiving such a request, KT shall determine whether the Company requires such
191 134 information for a legitimate purpose and, if so, KT will provide such information to the Company
192 135 within a reasonable time and on reasonable conditions.
193   -</p>
194   -<p>
  136 +
195 137 In any event, the Company will notify KT of any information derived from reverse engineering or such
196 138 other activities, and the results thereof will constitute the confidential information of KT that may be
197 139 used only in connection with the Software.
198   -</p>
199   -<h3>DURATION AND TERMINATION</h3>
200   -<p>
  140 +DURATION AND TERMINATION
201 141 The license granted to the Company is effective for 1 (ONE) year. The license will also terminate
202 142 automatically without any notice from KT if the Company fails to comply with any term or condition
203 143 of this Agreement. Upon termination, KT may also enforce any rights provided by law. The provisions
204 144 of this Agreement that protect the proprietary rights of KT will continue in force after termination.
205   -</p>
206   -<h3>SOFTWARE MAINTENANCE</h3>
207   -<p>
208   -Software Maintenance includes KT's provisioning to the Company of updates and/or enhancements of
  145 +SOFTWARE MAINTENANCE
  146 +Software Maintenance includes KT’s provisioning to the Company of updates and/or enhancements of
209 147 the Software made generally available to customers from time to time, and online technical support
210 148 (and where applicable, phone support) to one Company-designated technical contact for the sole
211 149 purpose of addressing technical issues relating to the use of the Software (excluding any form of on-
212 150 site visits by KT personnel or contractors).
213   -</p>
214   -<h3>DISCLAIMER OF ANY WARRANTY</h3>
215   -<p>
216   -KT does not warrant that the functions contained in the Software will meet the Company's
  151 +DISCLAIMER OF ANY WARRANTY
  152 +KT does not warrant that the functions contained in the Software will meet the Company’s
217 153 requirements or that the operation of the Software will be correct, uninterrupted or error-free. KT
218 154 provides evaluation copies of the Product so that customers can assess the Product.
219   -</p>
220   -<p>
221 155 THE SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, EITHER
222 156 EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES
223 157 OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, TITLE OR
224 158 NONINFRINGEMENT.
225   -</p>
226   -<p>
227 159 The Company assumes responsibility for the support and fault-finding of any modifications made to
228 160 the Software, or merger and integration undertaken with or between any other program or code.
229 161 The Company assumes full responsibility for the selection of the Software to achieve its intended
... ... @@ -231,70 +163,52 @@ results, and for the installation, use and results obtained from the Software. T
231 163 the entire risk as it applies to the quality and performance of the Software. Should the Software prove
232 164 defective, the Company (and not KT, or its distributors or dealers) assumes the entire cost of any and
233 165 all necessary servicing, repair or correction.
234   -</p>
235   -<p>
236 166 Some countries/states do not allow the exclusion of implied warranties, so the above exclusion may not
237 167 apply to the Company. KT disclaims all warranties of any kind if the Software was customized,
238 168 repackaged or altered in any way by any third party other than KT.
239   -</p>
240   -<h3>INFRINGEMENT</h3>
241   -<p>
  169 +INFRINGEMENT
242 170 During any term of this Agreement, if any portion of the Software is held by a court of competent
243 171 jurisdiction to infringe any third party intellectual property rights and the Company incurs a liability or
244   -expense as a result of such holding, then the Company's sole remedy shall be, and KT will, at its
  172 +expense as a result of such holding, then the Company’s sole remedy shall be, and KT will, at its
245 173 option: (i) obtain the right for the Company to continue to use the Software consistent with this
246 174 Agreement; (ii) modify the Software so that it is non-infringing; or (iii) replace the infringing
247 175 component with a non-infringing component, or (iv) refund all money paid in the then-current calendar
248   -quarter under this Agreement and all of the Company's rights and licenses under this Agreement shall
  176 +quarter under this Agreement and all of the Company’s rights and licenses under this Agreement shall
249 177 automatically terminate.
250   -</p>
251   -<h3>PUBLICITY RIGHTS</h3>
252   -<p>
253   -<ol>
254   -<li>a. The Company grants KT the right to include the Company as a customer in promotional
255   -material for the Software or for KT.</li>
256   -<li>b. The Company can deny KT this right by submitting a written request via e-mail to
  178 +PUBLICITY RIGHTS
  179 +a. The Company grants KT the right to include the Company as a customer in promotional
  180 +material for the Software or for KT.
  181 +b. The Company can deny KT this right by submitting a written request via e-mail to
257 182 marketing@knowledgetree.com requesting to be excluded from such promotional material.
258 183 Confirmation of such denial (via reply e-mail) must be received prior to purchasing for this to
259   -be effective.</li>
260   -<li>c. Should the Company come to be or already be included in promotional material, as a result of
  184 +be effective.
  185 +c. Should the Company come to be or already be included in promotional material, as a result of
261 186 any prior purchases where the Company did not request exclusion from the promotional
262 187 material, the Company can at any point, submit a written request via e-mail to
263   -marketing@knowledgetree.com to have KT remove the Company's name from the
  188 +marketing@knowledgetree.com to have KT remove the Company’s name from the
264 189 promotional material. Upon receipt of such request, KT will remove any reference to the
265 190 Company from such promotional material within 30 days and make no further reference to the
266   -Company.</li>
267   -</ol>
268   -</p>
269   -<p>
  191 +Company.
270 192 During any term of this Agreement, the Company grants to KT a non-transferable, non-exclusive,
271 193 license to reproduce and display its logos, trademarks, trade names and similar identifying material so
272 194 that KT may refer to the Company as a user of the Software should KT so desire, such as on the KT
273 195 website, in press releases and in other marketing materials.
274   -</p>
275   -<h3>INDEMNIFICATION</h3>
276   -<p>
  196 +INDEMNIFICATION
277 197 If the Company distributes the Software in violation of this Agreement, it hereby indemnifies, hold
278 198 harmless and defends KT from and against any and all claims or lawsuits, including attorney's fees and
279 199 costs that arise, result from or are connected with the use or distribution of the Software in violation of
280 200 this Agreement.
281   -</p>
282   -<h3>LIMITATION OF REMEDIES AND DAMAGES</h3>
283   -<p>
  201 +LIMITATION OF REMEDIES AND DAMAGES
284 202 In no event will KT or its licensors be liable for any indirect, incidental, special or consequential
285 203 damages, or for any personal injury or bodily injury (including death) to any persons caused by KT's
286 204 negligence, or for any lost profits, lost savings, loss of use, lost revenues or lost data arising from or
287 205 relating to the Software or this Agreement, even if KT or its licensors have been advised of the
288   -possibility of such damages. In no event will KT's liability or damages to the Company or any other
  206 +possibility of such damages. In no event will KT’s liability or damages to the Company or any other
289 207 person ever exceed the amount paid by the Company to use the Software, regardless of the form of the
290 208 claim.
291   -</p>
292   -<p>
293 209 Some countries/states do not allow the limitation or exclusion of liability for incidental or
294 210 consequential damages, so the above limitation or exclusion may not apply to the Company.
295   -</p>
296   -<h3>GOVERNMENT RESTRICTED RIGHTS</h3>
297   -<p>
  211 +GOVERNMENT RESTRICTED RIGHTS
298 212 Programs delivered to the U.S. Defense Dept. are delivered with Restricted Rights and the following
299 213 applies: "Restricted Rights Legend: Use, duplication or disclosure by Government is subject to
300 214 restrictions as currently set forth in subparagraph (c)(1)(ii) of DFARS 252-227-7013, Rights in
... ... @@ -302,18 +216,14 @@ Technical Data and Computer Software (October 1988). Software manufacturer is Kn
302 216 Inc., c/o DLA Piper US LLP, 2000 University Avenue, East Palo Alto, CA 94303. Programs delivered
303 217 to a U.S. Government Agency not within the Defense, Dept. are delivered with "Restricted Rights" as
304 218 defined in FAR 52.227-14, Rights in Data - General, including Alternate III (June 1987).
305   -</p>
306   -<h3>CONTRACTOR/MANUFACTURER</h3>
307   -<p>
308   -The Contractor/Manufacturer for the Software is:<br />
309   -KnowledgeTree Inc.<br />
310   -c/o DLA Piper US LLP<br />
311   -2000 University Avenue<br />
312   -East Palo Alto, CA 94303<br />
  219 +CONTRACTOR/MANUFACTURER
  220 +The Contractor/Manufacturer for the Software is:
  221 +KnowledgeTree Inc.
  222 +c/o DLA Piper US LLP
  223 +2000 University Avenue
  224 +East Palo Alto, CA 94303
313 225 Phone: +1 415.200.0225
314   -</p>
315   -<h3>GENERAL</h3>
316   -<p>
  226 +GENERAL
317 227 This Agreement is binding on the Company as well as its employees, employers, contractors and
318 228 agents, and on any successors and assignees. Neither the Software nor any information derived
319 229 therefrom may be exported except in accordance with the laws of the State of Delaware or other
... ... @@ -327,19 +237,24 @@ Software. If any provision of this Agreement is deemed invalid or unenforceable
327 237 government agency having jurisdiction, that particular provision will be deemed modified to the extent
328 238 necessary to make the provision valid and enforceable, and the remaining provisions will remain in full
329 239 force and effect. The original of this Agreement has been written in English, and that version will
330   -govern. Les parties aux prŽsentes confirment leur volontŽ que cette convention, de mme que tous les
331   -documents, y compris tout avis, qui s?y rattachent, soient rŽdigŽs en langue anglaise.
332   -</p>
333   -</div>
334   -
  240 +govern. Les parties aux présentes confirment leur volonté que cette convention, de même que tous les
  241 +documents, y compris tout avis, qui s′y rattachent, soient rédigés en langue anglaise.
  242 +</textarea>
335 243 <div class="agree">
336   -<br />
337   - <input type="radio" name="license" value="1" checked="checked"/>&nbsp;&nbsp;I accept the agreement
  244 + <input type="radio" name="license" value="1" checked="checked"/>I accept the agreement
338 245 <br/>
339   - <input type="radio" name="license" value="0"/>&nbsp;&nbsp;I do not accept the agreement
  246 + <input type="radio" name="license" value="0"/>I do not accept the agreement
  247 +</div>
  248 +<div class="errors">
  249 + <?php if(isset($errors)) {
  250 + foreach($errors as $k=>$e) {
  251 + echo $e;
  252 + }
  253 + }?>
340 254 </div>
341 255 <div class="buttons">
342 256 <input type="submit" name="Previous" value="Previous"/>
343 257 <input type="submit" name="Next" value="Next"/>
344 258 </div>
  259 +</div>
345 260 </form>
346 261 \ No newline at end of file
... ...
setup/wizard/templates/welcome.tpl
... ... @@ -12,7 +12,7 @@ applications.
12 12 </p>
13 13 </div>
14 14  
15   -<form action="index.php?step_name=welcome" method="POST">
  15 +<form action="index.php?step_name=welcome" method="post">
16 16 <div class="buttons">
17 17 <input type="submit" name="Next" value="Next"/>
18 18 </div>
... ...
setup/wizard/templates/wizard.tpl
1 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 2 <html>
3 3 <head>
4   -<link rel="stylesheet" type="text/css" href="resources/wizard.css" />
  4 + <title>KnowledgeTree Installer</title>
  5 + <link rel="stylesheet" type="text/css" href="resources/wizard.css" />
5 6 </head>
6 7  
7 8 <body>
... ...