Commit 268c1768081e53967a20ee1f96ef80e272a5fe93
Merge branch 'edge' of github.com:ktgit/knowledgetree into edge
Showing
37 changed files
with
648 additions
and
368 deletions
search2/indexing/extractors/OpenOfficeTextExtractor.inc.php
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | +require_once(KT_DIR.'/thirdparty/peclzip/pclzip.lib.php'); | |
| 4 | + | |
| 3 | 5 | /** |
| 4 | 6 | * $Id:$ |
| 5 | 7 | * |
| ... | ... | @@ -41,11 +43,13 @@ class OpenOfficeTextExtractor extends ExternalDocumentExtractor |
| 41 | 43 | { |
| 42 | 44 | public function __construct() |
| 43 | 45 | { |
| 46 | + /* *** Replaced unzip binary with pclzip *** | |
| 44 | 47 | $config = KTConfig::getSingleton(); |
| 45 | 48 | |
| 46 | 49 | $this->unzip = KTUtil::findCommand("import/unzip", 'unzip'); |
| 47 | 50 | $this->unzip = str_replace('\\','/',$this->unzip); |
| 48 | 51 | $this->unzip_params = $config->get('extractorParameters/unzip', '"{source}" "{part}" -d "{target_dir}"'); |
| 52 | + */ | |
| 49 | 53 | parent::__construct(); |
| 50 | 54 | } |
| 51 | 55 | |
| ... | ... | @@ -94,6 +98,14 @@ class OpenOfficeTextExtractor extends ExternalDocumentExtractor |
| 94 | 98 | $this->sourcefile = str_replace('\\','/',$this->sourcefile); |
| 95 | 99 | $this->openxml_dir = str_replace('\\','/',$this->openxml_dir); |
| 96 | 100 | |
| 101 | + $archive = new PclZip($this->sourcefile); | |
| 102 | + | |
| 103 | + if ($archive->extract(PCLZIP_OPT_PATH, $this->openxml_dir) == 0){ | |
| 104 | + $this->output = _kt('Failed to extract content'); | |
| 105 | + return false; | |
| 106 | + } | |
| 107 | + | |
| 108 | + /* *** Original code using the unzip binary *** | |
| 97 | 109 | $cmd = '"' . $this->unzip . '"' . ' ' . str_replace( |
| 98 | 110 | array('{source}','{part}', '{target_dir}'), |
| 99 | 111 | array($this->sourcefile, 'content.xml',$this->openxml_dir), $this->unzip_params); |
| ... | ... | @@ -105,6 +117,7 @@ class OpenOfficeTextExtractor extends ExternalDocumentExtractor |
| 105 | 117 | $this->output = _kt('Failed to execute command: ') . $cmd; |
| 106 | 118 | return false; |
| 107 | 119 | } |
| 120 | + *** End unzip code *** */ | |
| 108 | 121 | |
| 109 | 122 | $filename = $this->openxml_dir . '/content.xml'; |
| 110 | 123 | if (!file_exists($filename)) |
| ... | ... | @@ -134,4 +147,4 @@ class OpenOfficeTextExtractor extends ExternalDocumentExtractor |
| 134 | 147 | |
| 135 | 148 | } |
| 136 | 149 | |
| 137 | 150 | -?> |
| 151 | +?> | |
| 138 | 152 | \ No newline at end of file | ... | ... |
search2/indexing/extractors/OpenXmlTextExtractor.inc.php
| ... | ... | @@ -43,9 +43,11 @@ class OpenXmlTextExtractor extends ExternalDocumentExtractor |
| 43 | 43 | { |
| 44 | 44 | $config = KTConfig::getSingleton(); |
| 45 | 45 | |
| 46 | + /* ** Using peclzip instead of the unzip binary ** | |
| 46 | 47 | $this->unzip = KTUtil::findCommand("import/unzip", 'unzip'); |
| 47 | 48 | $this->unzip = str_replace('\\','/',$this->unzip); |
| 48 | 49 | $this->unzip_params = $config->get('extractorParameters/unzip', '"{source}" "{part}" -d "{target_dir}"'); |
| 50 | + */ | |
| 49 | 51 | parent::__construct(); |
| 50 | 52 | } |
| 51 | 53 | |
| ... | ... | @@ -158,6 +160,14 @@ class OpenXmlTextExtractor extends ExternalDocumentExtractor |
| 158 | 160 | $this->sourcefile = str_replace('\\','/',$this->sourcefile); |
| 159 | 161 | $this->openxml_dir = str_replace('\\','/',$this->openxml_dir); |
| 160 | 162 | |
| 163 | + $archive = new PclZip($this->sourcefile); | |
| 164 | + | |
| 165 | + if ($archive->extract(PCLZIP_OPT_PATH, $this->openxml_dir) == 0){ | |
| 166 | + $this->output = _kt('Failed to extract content'); | |
| 167 | + return false; | |
| 168 | + } | |
| 169 | + | |
| 170 | + /* *** Original code using the unzip binary *** | |
| 161 | 171 | $cmd = '"' . $this->unzip . '"' . ' ' . str_replace( |
| 162 | 172 | array('{source}','{part}', '{target_dir}'), |
| 163 | 173 | array($this->sourcefile, '*Content_Types*.xml',$this->openxml_dir), $this->unzip_params); |
| ... | ... | @@ -169,6 +179,7 @@ class OpenXmlTextExtractor extends ExternalDocumentExtractor |
| 169 | 179 | $this->output = _kt('Failed to execute command: ') . $cmd; |
| 170 | 180 | return false; |
| 171 | 181 | } |
| 182 | + *** End unzip code *** */ | |
| 172 | 183 | |
| 173 | 184 | $filename = $this->openxml_dir . '/[Content_Types].xml'; |
| 174 | 185 | if (!file_exists($filename)) | ... | ... |
setup/migrate/stepAction.php
| ... | ... | @@ -76,7 +76,7 @@ class stepAction { |
| 76 | 76 | * @var boolean |
| 77 | 77 | */ |
| 78 | 78 | protected $displayFirst = false; |
| 79 | - | |
| 79 | + | |
| 80 | 80 | /** |
| 81 | 81 | * List of migrate properties |
| 82 | 82 | * |
| ... | ... | @@ -85,7 +85,7 @@ class stepAction { |
| 85 | 85 | * @var boolean |
| 86 | 86 | */ |
| 87 | 87 | protected $migrateProperties = array(); |
| 88 | - | |
| 88 | + | |
| 89 | 89 | /** |
| 90 | 90 | * Reference to session object |
| 91 | 91 | * |
| ... | ... | @@ -131,7 +131,7 @@ class stepAction { |
| 131 | 131 | $this->loadSession($session); |
| 132 | 132 | $this->setMigrateProperties($migrateProperties); |
| 133 | 133 | } |
| 134 | - | |
| 134 | + | |
| 135 | 135 | /** |
| 136 | 136 | * Sets steps class names in string format |
| 137 | 137 | * |
| ... | ... | @@ -179,7 +179,7 @@ class stepAction { |
| 179 | 179 | public function setDisplayFirst($displayFirst) { |
| 180 | 180 | $this->displayFirst = $displayFirst; |
| 181 | 181 | } |
| 182 | - | |
| 182 | + | |
| 183 | 183 | /** |
| 184 | 184 | * Sets session object |
| 185 | 185 | * |
| ... | ... | @@ -191,7 +191,7 @@ class stepAction { |
| 191 | 191 | public function loadSession($ses) { |
| 192 | 192 | $this->session = $ses; |
| 193 | 193 | } |
| 194 | - | |
| 194 | + | |
| 195 | 195 | /** |
| 196 | 196 | * Sets migrate properties |
| 197 | 197 | * |
| ... | ... | @@ -203,7 +203,7 @@ class stepAction { |
| 203 | 203 | public function setMigrateProperties($migrateProperties) { |
| 204 | 204 | $this->migrateProperties = $migrateProperties; |
| 205 | 205 | } |
| 206 | - | |
| 206 | + | |
| 207 | 207 | /** |
| 208 | 208 | * Main control to handle the steps actions |
| 209 | 209 | * |
| ... | ... | @@ -228,7 +228,7 @@ class stepAction { |
| 228 | 228 | $this->stepName = 'errors'; |
| 229 | 229 | $this->action = $this->createStep(); |
| 230 | 230 | $this->action->error = array('Class File Missing in Step Directory'); |
| 231 | - | |
| 231 | + | |
| 232 | 232 | } |
| 233 | 233 | if ($response == 'error') { |
| 234 | 234 | $this->_handleErrors(); // Send Errors to session |
| ... | ... | @@ -248,7 +248,7 @@ class stepAction { |
| 248 | 248 | */ |
| 249 | 249 | public function createStep() { |
| 250 | 250 | $step_class = "migrate".$this->makeCamelCase($this->stepName); |
| 251 | - | |
| 251 | + | |
| 252 | 252 | return new $step_class(); |
| 253 | 253 | } |
| 254 | 254 | |
| ... | ... | @@ -281,7 +281,7 @@ class stepAction { |
| 281 | 281 | |
| 282 | 282 | return $str; |
| 283 | 283 | } |
| 284 | - | |
| 284 | + | |
| 285 | 285 | /** |
| 286 | 286 | * Returns current step name |
| 287 | 287 | * |
| ... | ... | @@ -306,32 +306,35 @@ class stepAction { |
| 306 | 306 | */ |
| 307 | 307 | public function getLeftMenu() |
| 308 | 308 | { |
| 309 | - $menu = ''; | |
| 309 | + $sideMenuElements = array(); | |
| 310 | 310 | $active = false; |
| 311 | 311 | if($this->stepClassNames) { |
| 312 | - foreach ($this->stepClassNames as $step) { | |
| 312 | + $ele = array(); | |
| 313 | + foreach ($this->stepClassNames as $k=>$step) { | |
| 314 | + $ele['step'] = $step; | |
| 313 | 315 | if($this->step_names[$step] != '') { |
| 314 | - $item = $this->step_names[$step]; | |
| 316 | + $ele['name'] = $this->step_names[$step]; | |
| 315 | 317 | } else { |
| 316 | - $item = $this->makeHeading($step); | |
| 318 | + $ele['name'] = $this->makeHeading($step); | |
| 317 | 319 | } |
| 318 | 320 | if($step == $this->stepName) { |
| 319 | - $class = 'current'; | |
| 320 | - $active = true; | |
| 321 | + $ele['class'] = 'current'; | |
| 322 | + $active = true; | |
| 321 | 323 | } else { |
| 322 | - if($active){ | |
| 323 | - $class = 'inactive'; | |
| 324 | - }else{ | |
| 325 | - $class = 'indicator'; | |
| 326 | - $item = "<a href=\"index.php?step_name={$step}\">{$item}</a>"; | |
| 324 | + if($active) { | |
| 325 | + $ele['class'] = 'inactive'; | |
| 326 | + } else { | |
| 327 | + $ele['class'] = 'indicator'; | |
| 327 | 328 | } |
| 328 | 329 | } |
| 329 | - | |
| 330 | - $menu .= "<span class='{$class}'>$item</span><br />"; | |
| 330 | + $sideMenuElements[] = $ele; | |
| 331 | 331 | } |
| 332 | 332 | } |
| 333 | -// $menu .= '</div>'; | |
| 334 | - return $menu; | |
| 333 | + $step_tpl = new Template("..".DS."wizard".DS."templates".DS."sidemenu.tpl"); // Create template | |
| 334 | + $step_tpl->set("sideMenuElements", $sideMenuElements); // Set side menu elements | |
| 335 | + $step_tpl->set("ajax", AJAX); // Set ajax state | |
| 336 | + | |
| 337 | + return $step_tpl->fetch(); | |
| 335 | 338 | } |
| 336 | 339 | |
| 337 | 340 | /** |
| ... | ... | @@ -357,7 +360,7 @@ class stepAction { |
| 357 | 360 | public function displayFirst() { |
| 358 | 361 | return $this->displayFirst; |
| 359 | 362 | } |
| 360 | - | |
| 363 | + | |
| 361 | 364 | /** |
| 362 | 365 | * Returns session object |
| 363 | 366 | * |
| ... | ... | @@ -379,7 +382,6 @@ class stepAction { |
| 379 | 382 | * @return string |
| 380 | 383 | */ |
| 381 | 384 | public function paintAction() { |
| 382 | - | |
| 383 | 385 | $step_errors = $this->action->getErrors(); // Get errors |
| 384 | 386 | $step_warnings = $this->action->getWarnings(); // Get warnings |
| 385 | 387 | if($this->displayConfirm()) { // Check if theres a confirm step |
| ... | ... | @@ -396,18 +398,33 @@ class stepAction { |
| 396 | 398 | $step_tpl->set("warnings", $step_warnings); // Set template warnings |
| 397 | 399 | $step_vars = $this->action->getStepVars(); // Get template variables |
| 398 | 400 | $step_tpl->set("step_vars", $step_vars); // Set template errors |
| 399 | - foreach ($step_vars as $key => $value) { // Set template variables | |
| 400 | - $step_tpl->set($key, $value); // Load values to session | |
| 401 | - if($this->action->storeInSession()) { // Check if class values need to be stored in session | |
| 402 | - $this->_loadValueToSession($this->stepName, $key, $value); | |
| 401 | + $this->loadToSes($step_vars); | |
| 402 | + $this->loadToTpl($step_tpl, $step_vars); | |
| 403 | + // TODO: Force because it does not always recognize ajax request | |
| 404 | + if(AJAX && !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') { | |
| 405 | + echo $step_tpl->fetch(); | |
| 406 | + } else { | |
| 407 | + $content = $step_tpl->fetch(); | |
| 408 | + $tpl = new Template("templates/wizard.tpl"); | |
| 409 | + $vars = $this->getVars(); // Get template variables | |
| 410 | + $tpl->set("vars", $vars); // Set template errors | |
| 411 | + $tpl->set('content', $content); | |
| 412 | + echo $tpl->fetch(); | |
| 413 | + } | |
| 414 | + } | |
| 415 | + | |
| 416 | + public function loadToSes($step_vars) { | |
| 417 | + if($this->action->storeInSession()) { // Check if class values need to be stored in session | |
| 418 | + foreach ($step_vars as $key => $value) { // Set template variables | |
| 419 | + $this->_loadValueToSession($this->stepName, $key, $value); | |
| 403 | 420 | } |
| 404 | 421 | } |
| 405 | - $content = $step_tpl->fetch(); | |
| 406 | - $tpl = new Template("templates/wizard.tpl"); | |
| 407 | - $vars = $this->getVars(); // Get template variables | |
| 408 | - $tpl->set("vars", $vars); // Set template errors | |
| 409 | - $tpl->set('content', $content); | |
| 410 | - echo $tpl->fetch(); | |
| 422 | + } | |
| 423 | + | |
| 424 | + public function loadToTpl($step_tpl, $step_vars) { | |
| 425 | + foreach ($step_vars as $key => $value) { // Set template variables | |
| 426 | + $step_tpl->set($key, $value); // Load values to session | |
| 427 | + } | |
| 411 | 428 | } |
| 412 | 429 | |
| 413 | 430 | public function getVars() { | ... | ... |
setup/migrate/templates/installation.tpl
| ... | ... | @@ -26,11 +26,17 @@ |
| 26 | 26 | <?php } ?> |
| 27 | 27 | <div id="step_content_<?php echo $step_name; ?>" class="step"> |
| 28 | 28 | <p class="description"> |
| 29 | - Enter the full path of the installation you wish to upgrade: | |
| 29 | + Enter the full path of the installation you wish to upgrade: | |
| 30 | 30 | </p> |
| 31 | 31 | <p class="empty_space"> |
| 32 | 32 | <small>The default is <b>'C:\Program Files\ktdms'</b> on Windows and <b>'/opt/ktdms'</b> or <b>'/home/<i>username</i>/ktdms/'</b> on other operating systems.</small> |
| 33 | 33 | </p> |
| 34 | + <p class="empty_space"> | |
| 35 | + <small> | |
| 36 | + Make sure that the services are running for that installation. | |
| 37 | + </small> | |
| 38 | + </p> | |
| 39 | + <br/> | |
| 34 | 40 | <input id="location" name="location" type="text" style="width:430px; float:left" value="<?php if($location) echo $location; ?>"> |
| 35 | 41 | <br/><br/> |
| 36 | 42 | <?php | ... | ... |
setup/upgrade/steps/upgradeWelcome.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 |
| ... | ... | @@ -46,10 +46,10 @@ class upgradeWelcome extends step { |
| 46 | 46 | protected $temp_variables = array(); |
| 47 | 47 | protected $error = array() ; |
| 48 | 48 | protected $storeInSession = true; |
| 49 | - | |
| 49 | + | |
| 50 | 50 | public function doStep() { |
| 51 | 51 | $upgradeOnly = false; |
| 52 | - if(isset($_GET['action'])) { | |
| 52 | + if(isset($_GET['action'])) { | |
| 53 | 53 | if($_GET['action'] == 'installer') { |
| 54 | 54 | $upgradeOnly = true; |
| 55 | 55 | } |
| ... | ... | @@ -66,14 +66,14 @@ class upgradeWelcome extends step { |
| 66 | 66 | |
| 67 | 67 | return 'landing'; |
| 68 | 68 | } |
| 69 | - | |
| 69 | + | |
| 70 | 70 | private function doRun() { |
| 71 | 71 | // attempt login |
| 72 | 72 | $username = $_REQUEST['username']; |
| 73 | 73 | $password = $_REQUEST['password']; |
| 74 | 74 | |
| 75 | 75 | $authenticated = $this->checkPassword($username, $password); |
| 76 | - | |
| 76 | + | |
| 77 | 77 | if (!$authenticated) |
| 78 | 78 | { |
| 79 | 79 | session_unset(); |
| ... | ... | @@ -81,10 +81,10 @@ class upgradeWelcome extends step { |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | $_SESSION['setup_user'] = $username; |
| 84 | - | |
| 84 | + | |
| 85 | 85 | return true; |
| 86 | 86 | } |
| 87 | - | |
| 87 | + | |
| 88 | 88 | private function checkPassword($username, $password) { |
| 89 | 89 | $upgradeOnly = false; |
| 90 | 90 | |
| ... | ... | @@ -121,11 +121,11 @@ class upgradeWelcome extends step { |
| 121 | 121 | return false; |
| 122 | 122 | |
| 123 | 123 | } |
| 124 | - | |
| 124 | + | |
| 125 | 125 | public function getErrors() { |
| 126 | 126 | return $this->error; |
| 127 | 127 | } |
| 128 | - | |
| 128 | + | |
| 129 | 129 | /** |
| 130 | 130 | * Returns step variables |
| 131 | 131 | * |
| ... | ... | @@ -138,9 +138,9 @@ class upgradeWelcome extends step { |
| 138 | 138 | { |
| 139 | 139 | return $this->temp_variables; |
| 140 | 140 | } |
| 141 | - | |
| 141 | + | |
| 142 | 142 | public function storeSilent() { |
| 143 | - | |
| 143 | + | |
| 144 | 144 | } |
| 145 | 145 | } |
| 146 | 146 | ... | ... |
setup/upgrade/templates/database.tpl
| ... | ... | @@ -66,4 +66,5 @@ |
| 66 | 66 | else { ?><input type="submit" name="Previous" value="Restore" class="button_previous"/><?php } ?> |
| 67 | 67 | <?php } ?> |
| 68 | 68 | </div> |
| 69 | -</form> | |
| 70 | 69 | \ No newline at end of file |
| 70 | +</form> | |
| 71 | +<?php if (AJAX) { echo $html->js('form.js'); } ?> | |
| 71 | 72 | \ No newline at end of file | ... | ... |
setup/upgrade/templates/installation.tpl
| ... | ... | @@ -18,4 +18,5 @@ |
| 18 | 18 | <input type="submit" name="Upgrade" value="Upgrade" class="button_next"/> |
| 19 | 19 | <input type="submit" name="Restore" value="Restore Database" class="button_next"/> |
| 20 | 20 | <input type="submit" name="Next" value="Backup Now" class="button_next"/> |
| 21 | -</form> | |
| 22 | 21 | \ No newline at end of file |
| 22 | +</form> | |
| 23 | +<?php if (AJAX) { echo $html->js('form.js'); } ?> | |
| 23 | 24 | \ No newline at end of file | ... | ... |
setup/upgrade/templates/welcome.tpl
| ... | ... | @@ -13,7 +13,7 @@ |
| 13 | 13 | <tr><td>Password</td><td><input name=password type="password"></td></tr> |
| 14 | 14 | <?php if (!empty($errors)) { ?><tr><td></td><td><span class="error">Could Not Authenticate User</span></td></tr> <?php } ?> |
| 15 | 15 | </table> |
| 16 | - | |
| 16 | + | |
| 17 | 17 | </div> |
| 18 | 18 | </div> |
| 19 | 19 | <?php |
| ... | ... | @@ -29,4 +29,5 @@ |
| 29 | 29 | </form> |
| 30 | 30 | <script type="text/javascript"> |
| 31 | 31 | $('#username').focus(); |
| 32 | -</script> | |
| 33 | 32 | \ No newline at end of file |
| 33 | +</script> | |
| 34 | +<?php if (AJAX) { echo $html->js('form.js'); } ?> | |
| 34 | 35 | \ No newline at end of file | ... | ... |
setup/wizard/config/config.xml
| ... | ... | @@ -11,7 +11,7 @@ |
| 11 | 11 | <steps> |
| 12 | 12 | <step name="Welcome">welcome</step> |
| 13 | 13 | <step name="License Agreement">license</step> |
| 14 | -<!-- <step name="Install Type">installtype</step>--> | |
| 14 | + <step name="Install Type">installtype</step> | |
| 15 | 15 | <step name="PHP Dependencies" mode="silent">dependencies</step> |
| 16 | 16 | <step name="System Configuration" order="2">configuration</step> |
| 17 | 17 | <step name="Service Dependency" order="3" mode="silent">services</step> | ... | ... |
setup/wizard/installUtil.php
setup/wizard/installWizard.php
| ... | ... | @@ -85,7 +85,7 @@ class InstallWizard { |
| 85 | 85 | * @var mixed |
| 86 | 86 | */ |
| 87 | 87 | protected $debugLevel = 0; |
| 88 | - | |
| 88 | + | |
| 89 | 89 | /** |
| 90 | 90 | * Reference to installer utility object |
| 91 | 91 | * |
| ... | ... | @@ -114,7 +114,7 @@ class InstallWizard { |
| 114 | 114 | private function isSystemInstalled() { |
| 115 | 115 | return $this->util->isSystemInstalled(); |
| 116 | 116 | } |
| 117 | - | |
| 117 | + | |
| 118 | 118 | /** |
| 119 | 119 | * Display the wizard |
| 120 | 120 | * |
| ... | ... | @@ -132,7 +132,7 @@ class InstallWizard { |
| 132 | 132 | $ins->step(); // Run step |
| 133 | 133 | } |
| 134 | 134 | } |
| 135 | - | |
| 135 | + | |
| 136 | 136 | /** |
| 137 | 137 | * Set bypass flag |
| 138 | 138 | * |
| ... | ... | @@ -144,7 +144,7 @@ class InstallWizard { |
| 144 | 144 | private function setBypass($bypass) { |
| 145 | 145 | $this->bypass = $bypass; |
| 146 | 146 | } |
| 147 | - | |
| 147 | + | |
| 148 | 148 | /** |
| 149 | 149 | * Set debug level |
| 150 | 150 | * |
| ... | ... | @@ -157,7 +157,7 @@ class InstallWizard { |
| 157 | 157 | define('DEBUG', $debug); |
| 158 | 158 | $this->debugLevel = $debug; |
| 159 | 159 | } |
| 160 | - | |
| 160 | + | |
| 161 | 161 | /** |
| 162 | 162 | * Set util reference |
| 163 | 163 | * |
| ... | ... | @@ -169,7 +169,7 @@ class InstallWizard { |
| 169 | 169 | private function setIUtil($util) { |
| 170 | 170 | $this->util = $util; |
| 171 | 171 | } |
| 172 | - | |
| 172 | + | |
| 173 | 173 | /** |
| 174 | 174 | * Get bypass flag |
| 175 | 175 | * |
| ... | ... | @@ -181,7 +181,7 @@ class InstallWizard { |
| 181 | 181 | public function getBypass() { |
| 182 | 182 | return $this->bypass; |
| 183 | 183 | } |
| 184 | - | |
| 184 | + | |
| 185 | 185 | /** |
| 186 | 186 | * Bypass and force an install |
| 187 | 187 | * |
| ... | ... | @@ -191,9 +191,9 @@ class InstallWizard { |
| 191 | 191 | * @return boolean |
| 192 | 192 | */ |
| 193 | 193 | private function bypass() { |
| 194 | - | |
| 194 | + | |
| 195 | 195 | } |
| 196 | - | |
| 196 | + | |
| 197 | 197 | /** |
| 198 | 198 | * Create install file |
| 199 | 199 | * |
| ... | ... | @@ -205,7 +205,7 @@ class InstallWizard { |
| 205 | 205 | private function createInstallFile() { |
| 206 | 206 | @touch(SYSTEM_DIR.'var'.DS.'bin'.DS."install.lock"); |
| 207 | 207 | } |
| 208 | - | |
| 208 | + | |
| 209 | 209 | /** |
| 210 | 210 | * Remove install file |
| 211 | 211 | * |
| ... | ... | @@ -218,7 +218,7 @@ class InstallWizard { |
| 218 | 218 | if(file_exists(SYSTEM_DIR.'var'.DS.'bin'.DS."install.lock")) |
| 219 | 219 | @unlink(SYSTEM_DIR.'var'.DS.'bin'.DS."install.lock"); |
| 220 | 220 | } |
| 221 | - | |
| 221 | + | |
| 222 | 222 | /** |
| 223 | 223 | * Load default values |
| 224 | 224 | * |
| ... | ... | @@ -238,7 +238,7 @@ class InstallWizard { |
| 238 | 238 | } |
| 239 | 239 | $this->setIUtil(new InstallUtil()); |
| 240 | 240 | } |
| 241 | - | |
| 241 | + | |
| 242 | 242 | /** |
| 243 | 243 | * Run pre-installation system checks |
| 244 | 244 | * |
| ... | ... | @@ -264,7 +264,7 @@ class InstallWizard { |
| 264 | 264 | break; |
| 265 | 265 | } |
| 266 | 266 | } |
| 267 | - | |
| 267 | + | |
| 268 | 268 | /** |
| 269 | 269 | * Control all requests to wizard |
| 270 | 270 | * |
| ... | ... | @@ -282,7 +282,7 @@ class InstallWizard { |
| 282 | 282 | } |
| 283 | 283 | if(!$this->isSystemInstalled()) { // Check if the systems not installed |
| 284 | 284 | if($this->util->migrationSpecified()) { // Check if the migrator needs to be accessed |
| 285 | - $this->util->redirect('../migrate/index.php'); | |
| 285 | + $this->util->redirect('../migrate/index.php?'); | |
| 286 | 286 | } elseif ($this->util->upgradeSpecified()) { |
| 287 | 287 | $this->util->redirect('../upgrade/index.php?action=installer'); |
| 288 | 288 | } | ... | ... |
setup/wizard/path.php
| ... | ... | @@ -64,34 +64,25 @@ |
| 64 | 64 | } |
| 65 | 65 | $wizard = realpath(dirname(__FILE__)); |
| 66 | 66 | // Define environment root |
| 67 | + $wizard = realpath(dirname(__FILE__)); | |
| 68 | + $xdir = explode(DS, $wizard); | |
| 69 | + array_pop($xdir); | |
| 70 | + $sys = ''; | |
| 71 | + foreach ($xdir as $k=>$v) { | |
| 72 | + $sys .= $v.DS; | |
| 73 | + } | |
| 67 | 74 | if(isset($_GET['type'])) { |
| 68 | 75 | switch ($_GET['type']) { |
| 69 | 76 | case 'migrate' : |
| 70 | - $wizard = realpath(dirname(__FILE__)); | |
| 71 | - $xdir = explode(DS, $wizard); | |
| 72 | - array_pop($xdir); | |
| 73 | - $sys = ''; | |
| 74 | - foreach ($xdir as $k=>$v) { | |
| 75 | - $sys .= $v.DS; | |
| 76 | - } | |
| 77 | 77 | $wizard = $sys.'migrate'; |
| 78 | 78 | break; |
| 79 | 79 | case 'upgrade' : |
| 80 | - $wizard = realpath(dirname(__FILE__)); | |
| 81 | - $xdir = explode(DS, $wizard); | |
| 82 | - array_pop($xdir); | |
| 83 | - $sys = ''; | |
| 84 | - foreach ($xdir as $k=>$v) { | |
| 85 | - $sys .= $v.DS; | |
| 86 | - } | |
| 87 | 80 | $wizard = $sys.'upgrade'; |
| 88 | 81 | break; |
| 89 | 82 | default: |
| 90 | - | |
| 83 | + | |
| 91 | 84 | break; |
| 92 | 85 | } |
| 93 | - } else { | |
| 94 | -// die("Environment Error"); | |
| 95 | 86 | } |
| 96 | 87 | $xdir = explode(DS, $wizard); |
| 97 | 88 | array_pop($xdir); | ... | ... |
setup/wizard/resources/css/ie6.css
setup/wizard/resources/css/migrate.css
| ... | ... | @@ -2,26 +2,26 @@ |
| 2 | 2 | border: 1px solid rgb(207, 207, 207); |
| 3 | 3 | overflow: auto; |
| 4 | 4 | padding: 5px; |
| 5 | - min-height:365px; | |
| 5 | + /*min-height:365px;*/min-height:300px; | |
| 6 | 6 | } |
| 7 | 7 | |
| 8 | 8 | #step_content_services { |
| 9 | 9 | border: 1px solid rgb(207, 207, 207); |
| 10 | 10 | overflow: auto; |
| 11 | 11 | padding: 5px; |
| 12 | - min-height:340px; | |
| 12 | + /*min-height:340px;*/min-height:285px; | |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | #step_content_database { |
| 16 | 16 | border: 1px solid rgb(207, 207, 207); |
| 17 | 17 | overflow: auto; |
| 18 | 18 | padding: 5px; |
| 19 | - min-height:380px; | |
| 19 | + /*min-height:380px;*/min-height:315px; | |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | #step_content_complete { |
| 23 | 23 | border: 1px solid rgb(207, 207, 207); |
| 24 | 24 | overflow: auto; |
| 25 | 25 | padding: 5px; |
| 26 | - min-height:360px; | |
| 26 | + /*min-height:360px;*/min-height:295px; | |
| 27 | 27 | } | ... | ... |
setup/wizard/resources/css/wizard.css
| ... | ... | @@ -64,20 +64,20 @@ select { |
| 64 | 64 | /* *** Layout Styles *** */ |
| 65 | 65 | |
| 66 | 66 | #wrapper { |
| 67 | - background: white; | |
| 67 | + background: white; min-height:410px; | |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | #outer-wrapper { |
| 71 | 71 | border:1px solid #B7B7B7; |
| 72 | 72 | margin-top:20px; |
| 73 | - width:1024px; | |
| 73 | + /*width:1024px;*/width:964px; | |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | #header { |
| 77 | 77 | background: transparent url("../graphics/dame/installer_head.png") repeat scroll 0% 0%; |
| 78 | - text-align: right; | |
| 79 | - font-size: 100%; | |
| 80 | - color: rgb(167, 167, 167); | |
| 78 | + text-align: right; | |
| 79 | + font-size: 100%; | |
| 80 | + color: rgb(167, 167, 167); | |
| 81 | 81 | font-family: sans-serif; |
| 82 | 82 | height: 71px; |
| 83 | 83 | font-family:sans-serif; |
| ... | ... | @@ -87,11 +87,12 @@ select { |
| 87 | 87 | #container { |
| 88 | 88 | background: white url("../graphics/left.png") repeat-y left; |
| 89 | 89 | overflow:auto; |
| 90 | + /*min-height:630px;height:410px;*/min-height:410px; | |
| 90 | 91 | } |
| 91 | 92 | |
| 92 | 93 | #content { |
| 93 | 94 | margin-left: 220px; |
| 94 | - height:515px; | |
| 95 | + /*height:515px;*/height:400px; | |
| 95 | 96 | } |
| 96 | 97 | |
| 97 | 98 | #content_container { |
| ... | ... | @@ -104,43 +105,49 @@ select { |
| 104 | 105 | border: 1px solid rgb(207, 207, 207); |
| 105 | 106 | padding: 5px; |
| 106 | 107 | overflow: auto; |
| 107 | - min-height: 400px; | |
| 108 | + /*min-height: 400px;*/min-height: 300px; | |
| 108 | 109 | } |
| 109 | 110 | |
| 110 | 111 | #step_content_dependencies { |
| 111 | 112 | border: 1px solid rgb(207, 207, 207); |
| 112 | - padding: 5px; | |
| 113 | - min-height:270px; | |
| 113 | + /*padding: 5px;*/padding: 12px; | |
| 114 | + /*min-height:270px;*/min-height:170px; | |
| 114 | 115 | } |
| 115 | 116 | |
| 116 | 117 | #step_content_configuration { |
| 117 | 118 | border: 1px solid rgb(207, 207, 207); |
| 118 | 119 | padding: 5px; |
| 119 | - min-height:320px; | |
| 120 | + /*min-height:320px;*//*height:330px*/min-height:130px; | |
| 121 | +} | |
| 122 | + | |
| 123 | +#step_content_services { | |
| 124 | + border: 1px solid rgb(207, 207, 207); | |
| 125 | + padding: 5px; | |
| 126 | + min-height:230px; | |
| 120 | 127 | } |
| 121 | 128 | |
| 122 | 129 | #step_content_registration { |
| 123 | 130 | border: 1px solid rgb(207, 207, 207); |
| 124 | 131 | padding: 5px; |
| 125 | - min-height:320px; | |
| 132 | + /*min-height:320px;*/min-height:100px; | |
| 126 | 133 | } |
| 127 | 134 | |
| 128 | 135 | #step_content_registration_confirm { |
| 129 | 136 | border: 1px solid rgb(207, 207, 207); |
| 130 | 137 | padding: 5px; |
| 131 | - min-height:400px; | |
| 138 | + /*min-height:400px;*/min-height:300px; | |
| 132 | 139 | } |
| 133 | 140 | |
| 134 | 141 | #step_content_install { |
| 135 | 142 | border: 1px solid rgb(207, 207, 207); |
| 136 | 143 | padding: 5px; |
| 137 | - min-height:400px; | |
| 144 | + /*min-height:400px;*/min-height:150px; | |
| 138 | 145 | } |
| 139 | 146 | |
| 140 | 147 | #step_content_database { |
| 141 | 148 | border: 1px solid rgb(207, 207, 207); |
| 142 | 149 | padding: 5px; |
| 143 | - min-height:365px; | |
| 150 | + /*min-height:365px;*/min-height:240px; | |
| 144 | 151 | } |
| 145 | 152 | |
| 146 | 153 | #step_content_database_confirm { |
| ... | ... | @@ -157,15 +164,15 @@ select { |
| 157 | 164 | |
| 158 | 165 | .license_agreement { |
| 159 | 166 | overflow: scroll; |
| 160 | - height:370px; | |
| 167 | + /*height:370px;*/height:270px; | |
| 161 | 168 | overflow-x:hidden; |
| 162 | 169 | border:1px solid #CFCFCF; |
| 163 | 170 | } |
| 164 | 171 | |
| 165 | 172 | #sidebar { |
| 166 | 173 | font-size: 85%; |
| 167 | - color: grey; | |
| 168 | - font-family: sans-serif; | |
| 174 | + color: grey; | |
| 175 | + font-family: sans-serif; | |
| 169 | 176 | margin-top: 0px; |
| 170 | 177 | float: left; |
| 171 | 178 | padding-top: 20px; |
| ... | ... | @@ -197,8 +204,8 @@ select { |
| 197 | 204 | |
| 198 | 205 | #logo { |
| 199 | 206 | position:relative; |
| 200 | - right:760px; | |
| 201 | - top:20px; | |
| 207 | + /*right:760px;*/right:75%; | |
| 208 | + /*top:20px;*/top:25%; | |
| 202 | 209 | } |
| 203 | 210 | |
| 204 | 211 | #install_details { |
| ... | ... | @@ -208,26 +215,26 @@ select { |
| 208 | 215 | } |
| 209 | 216 | |
| 210 | 217 | .indicator a { |
| 211 | - background:url("../graphics/dame/tick1.png") no-repeat left; | |
| 212 | - padding-top:15px; | |
| 213 | - padding-bottom:10px; | |
| 214 | - padding-left:30px; | |
| 215 | - color: #1c9e00; | |
| 218 | + background:url("../graphics/dame/tick1.png") no-repeat left; | |
| 219 | + padding-top:15px; | |
| 220 | + padding-bottom:10px; | |
| 221 | + padding-left:30px; | |
| 222 | + color: #1c9e00; | |
| 216 | 223 | } |
| 217 | 224 | |
| 218 | 225 | .active { |
| 219 | - background:url("../graphics/dame/tick1.png") no-repeat left; | |
| 220 | - padding-top:15px; | |
| 221 | - padding-bottom:10px; | |
| 222 | - padding-left:30px; | |
| 223 | - color: #1c9e00; | |
| 226 | + background:url("../graphics/dame/tick1.png") no-repeat left; | |
| 227 | + padding-top:15px; | |
| 228 | + padding-bottom:10px; | |
| 229 | + padding-left:30px; | |
| 230 | + color: #1c9e00; | |
| 224 | 231 | } |
| 225 | 232 | |
| 226 | 233 | .inactive { |
| 227 | 234 | background:url("../graphics/dame/tick2.png") no-repeat left; |
| 228 | 235 | padding-top:15px; |
| 229 | 236 | padding-bottom:10px; |
| 230 | - padding-left:30px; | |
| 237 | + padding-left:30px; | |
| 231 | 238 | color:#a7a7a7; |
| 232 | 239 | } |
| 233 | 240 | |
| ... | ... | @@ -238,7 +245,7 @@ select { |
| 238 | 245 | padding-left:30px; |
| 239 | 246 | color: #f36a00; |
| 240 | 247 | } |
| 241 | - | |
| 248 | + | |
| 242 | 249 | .tick { |
| 243 | 250 | background: url("../graphics/tick.png") no-repeat; |
| 244 | 251 | height: 16px; |
| ... | ... | @@ -275,7 +282,7 @@ select { |
| 275 | 282 | } |
| 276 | 283 | |
| 277 | 284 | .conf_paths { |
| 278 | - width:755px; | |
| 285 | + /*width:755px;*/width:100%; | |
| 279 | 286 | } |
| 280 | 287 | |
| 281 | 288 | .errors { |
| ... | ... | @@ -361,7 +368,7 @@ select { |
| 361 | 368 | .onclick { |
| 362 | 369 | cursor: pointer; |
| 363 | 370 | color: #EC7725; |
| 364 | - width: 150px; | |
| 371 | + /*width: 150px;*/width:350px;top:12px;position:relative; | |
| 365 | 372 | } |
| 366 | 373 | |
| 367 | 374 | .description { |
| ... | ... | @@ -397,7 +404,7 @@ table#dbconf tr td { |
| 397 | 404 | } |
| 398 | 405 | |
| 399 | 406 | table#dbconf tr td input{ |
| 400 | - | |
| 407 | + | |
| 401 | 408 | } |
| 402 | 409 | |
| 403 | 410 | .options { |
| ... | ... | @@ -408,17 +415,17 @@ table#dbconf tr td input{ |
| 408 | 415 | padding: 5px 8px; |
| 409 | 416 | } |
| 410 | 417 | |
| 411 | -#section { | |
| 418 | +/*#section { | |
| 412 | 419 | |
| 413 | -} | |
| 420 | +}*/ | |
| 414 | 421 | |
| 415 | 422 | .php_ext_details table { |
| 416 | 423 | width:745px; |
| 417 | 424 | } |
| 418 | 425 | |
| 419 | -.php_ext_details table tr { | |
| 420 | - | |
| 421 | -} | |
| 426 | +/*.php_ext_details table tr { | |
| 427 | + | |
| 428 | +}*/ | |
| 422 | 429 | |
| 423 | 430 | td.ext_indicator { |
| 424 | 431 | width:10px; |
| ... | ... | @@ -449,7 +456,7 @@ td.dir_description { |
| 449 | 456 | } |
| 450 | 457 | |
| 451 | 458 | .php_con_details table { |
| 452 | - width:745px; | |
| 459 | + /*width:745px;*/width:675px; | |
| 453 | 460 | } |
| 454 | 461 | |
| 455 | 462 | .error_message { |
| ... | ... | @@ -471,7 +478,7 @@ td.dir_description { |
| 471 | 478 | margin-bottom:0.75em; |
| 472 | 479 | font-weight:bold; |
| 473 | 480 | } |
| 474 | - | |
| 481 | + | |
| 475 | 482 | .continue_message { |
| 476 | 483 | border:none; |
| 477 | 484 | width:550px; |
| ... | ... | @@ -533,7 +540,7 @@ td.dir_description { |
| 533 | 540 | |
| 534 | 541 | #loading { |
| 535 | 542 | bottom:250px; |
| 536 | - left:500px; | |
| 543 | + /*left:500px;*/left:400px; | |
| 537 | 544 | position:relative; |
| 538 | 545 | height:0px; |
| 539 | 546 | width:0px; |
| ... | ... | @@ -548,4 +555,42 @@ td.dir_description { |
| 548 | 555 | #left_space { |
| 549 | 556 | float:left; |
| 550 | 557 | width:50%; |
| 558 | + font-size:11pt; | |
| 559 | +} | |
| 560 | + | |
| 561 | +#welcome_license_dependencies { | |
| 562 | + height:100px; | |
| 563 | +} | |
| 564 | + | |
| 565 | +.dependency_details { | |
| 566 | + top:12px; | |
| 567 | + position:relative; | |
| 568 | + width:650px; | |
| 569 | +} | |
| 570 | + | |
| 571 | +.dependencies { | |
| 572 | + position:relative; | |
| 573 | + right:30%; | |
| 574 | +} | |
| 575 | + | |
| 576 | +.registration_template { | |
| 577 | + width:90%; | |
| 578 | +} | |
| 579 | + | |
| 580 | +.registration_select { | |
| 581 | + width: 270px; | |
| 582 | +} | |
| 583 | + | |
| 584 | +.description_complete { | |
| 585 | + position:relative; | |
| 586 | + right:35%; | |
| 587 | + width:100%; | |
| 588 | +} | |
| 589 | + | |
| 590 | +.space { | |
| 591 | + padding-bottom:5px; | |
| 592 | +} | |
| 593 | + | |
| 594 | +.advoptions { | |
| 595 | + top:0px; | |
| 551 | 596 | } |
| 552 | 597 | \ No newline at end of file | ... | ... |
setup/wizard/resources/graphics/loader.gif
0 โ 100755
10.6 KB
setup/wizard/resources/js/form.js
| ... | ... | @@ -9,8 +9,8 @@ $(document).ready(function() { |
| 9 | 9 | var options = {target: '#content_container', beforeSubmit: w.validateRegistration, success: w.adjustMenu($('form').attr('id'))}; |
| 10 | 10 | $('form').ajaxForm(options); |
| 11 | 11 | } |
| 12 | - $(document).bind('keydown', 'Ctrl+n',function (evt){alert("n"); return false; }); | |
| 13 | - $(document).bind('keydown', 'Ctrl+p',function (evt){alert("p"); return false; }); | |
| 14 | - $(document).bind('keydown', 'Ctrl+e',function (evt){alert("e"); return false; }); | |
| 15 | - $(document).bind('keydown', 'Ctrl+i',function (evt){alert("i"); return false; }); | |
| 12 | + $(document).bind('keydown', 'Ctrl+n',function (evt){ }); | |
| 13 | + $(document).bind('keydown', 'Ctrl+p',function (evt){ }); | |
| 14 | + $(document).bind('keydown', 'Ctrl+e',function (evt){ }); | |
| 15 | + $(document).bind('keydown', 'Ctrl+i',function (evt){ }); | |
| 16 | 16 | }); |
| 17 | 17 | \ No newline at end of file | ... | ... |
setup/wizard/resources/js/wizard.js
| 1 | 1 | // Class Wizard |
| 2 | -function wizard() { | |
| 2 | +var ajaxOn = false; | |
| 3 | +function wizard() { | |
| 4 | + this.ajaxOn = false; | |
| 3 | 5 | } |
| 4 | 6 | |
| 5 | 7 | // Toggle Advance Database options |
| ... | ... | @@ -10,12 +12,20 @@ wizard.prototype.toggleClass = function(ele, option) { //adv_options|php_details |
| 10 | 12 | var patt1=/none/gi; // preg match |
| 11 | 13 | var patt2=/block/gi; |
| 12 | 14 | if(style.match(patt1) == 'none') { |
| 13 | - $('.'+ele).attr('style', 'display: block;'); | |
| 15 | + if(this.ajaxOn) { | |
| 16 | + w.slideElement($('.'+ele), 'down'); | |
| 17 | + } else { | |
| 18 | + $('.'+ele).attr('style', 'display: block;'); | |
| 19 | + } | |
| 14 | 20 | if($('#'+option).attr('innerHTML') != ' Advanced Options') { |
| 15 | 21 | $('#'+option).attr('innerHTML', 'Hide Details'); |
| 16 | 22 | } |
| 17 | 23 | } else if(style.match(patt2) == 'block') { |
| 18 | - $('.'+ele).attr('style', 'display: none;'); | |
| 24 | + if(this.ajaxOn) { | |
| 25 | + w.slideElement($('.'+ele), 'up'); | |
| 26 | + } else { | |
| 27 | + $('.'+ele).attr('style', 'display: none;'); | |
| 28 | + } | |
| 19 | 29 | if($('#'+option).attr('innerHTML') != ' Advanced Options') { |
| 20 | 30 | $('#'+option).attr('innerHTML', 'Show Details'); |
| 21 | 31 | } |
| ... | ... | @@ -23,6 +33,13 @@ wizard.prototype.toggleClass = function(ele, option) { //adv_options|php_details |
| 23 | 33 | } |
| 24 | 34 | } |
| 25 | 35 | |
| 36 | +wizard.prototype.slideElement = function(el, dir) { | |
| 37 | + if(dir == 'down') | |
| 38 | + $(el).slideDown("slow"); | |
| 39 | + else | |
| 40 | + $(el).slideUp("slow"); | |
| 41 | +} | |
| 42 | + | |
| 26 | 43 | // Focus on element |
| 27 | 44 | wizard.prototype.focusElement = function(el) { |
| 28 | 45 | el.focus(); |
| ... | ... | @@ -59,7 +76,7 @@ wizard.prototype.validateRegistration = function() { |
| 59 | 76 | $('#sendAll').attr('value', 'previous'); |
| 60 | 77 | return true; |
| 61 | 78 | } |
| 62 | - | |
| 79 | + | |
| 63 | 80 | return false; |
| 64 | 81 | } |
| 65 | 82 | |
| ... | ... | @@ -92,7 +109,7 @@ wizard.prototype.valRegHelper = function() { |
| 92 | 109 | w.focusElement(email); |
| 93 | 110 | return false; |
| 94 | 111 | } |
| 95 | - | |
| 112 | + | |
| 96 | 113 | return true; |
| 97 | 114 | } |
| 98 | 115 | |
| ... | ... | @@ -107,7 +124,7 @@ wizard.prototype.nameCheck = function(str) { |
| 107 | 124 | } |
| 108 | 125 | |
| 109 | 126 | // Validate Registration Page Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/) |
| 110 | -wizard.prototype.emailCheck = function(str) { | |
| 127 | +wizard.prototype.emailCheck = function(str) { | |
| 111 | 128 | str = w.trim(str); |
| 112 | 129 | var at="@"; |
| 113 | 130 | var dot="."; |
| ... | ... | @@ -141,12 +158,12 @@ wizard.prototype.emailCheck = function(str) { |
| 141 | 158 | wizard.prototype.trim = function (str, chars) { |
| 142 | 159 | return w.ltrim(w.rtrim(str, chars), chars); |
| 143 | 160 | } |
| 144 | - | |
| 161 | + | |
| 145 | 162 | wizard.prototype.ltrim = function (str, chars) { |
| 146 | 163 | chars = chars || "\\s"; |
| 147 | 164 | return str.replace(new RegExp("^[" + chars + "]+", "g"), ""); |
| 148 | 165 | } |
| 149 | - | |
| 166 | + | |
| 150 | 167 | wizard.prototype.rtrim = function (str, chars) { |
| 151 | 168 | chars = chars || "\\s"; |
| 152 | 169 | return str.replace(new RegExp("[" + chars + "]+$", "g"), ""); |
| ... | ... | @@ -170,17 +187,18 @@ wizard.prototype.adjustMenu = function (form_id, previous) { |
| 170 | 187 | } |
| 171 | 188 | |
| 172 | 189 | wizard.prototype.dummy = function () { |
| 173 | - | |
| 190 | + | |
| 174 | 191 | } |
| 175 | 192 | |
| 176 | -// pre-submit callback | |
| 193 | +// pre-submit callback | |
| 177 | 194 | wizard.prototype.showRequest = function (formData, jqForm, options) { |
| 178 | - $.blockUI({message:''}); | |
| 195 | + //$.blockUI({message:''}); | |
| 196 | + $.blockUI({overlayCSS:{opacity:0.1}, fadeIn:500, fadeOut:500, message:''}); | |
| 179 | 197 | $('#loading').attr('style', 'display:block;'); |
| 180 | 198 | } |
| 181 | 199 | |
| 182 | -// post-submit callback | |
| 183 | -wizard.prototype.showResponse = function (responseText, statusText) { | |
| 200 | +// post-submit callback | |
| 201 | +wizard.prototype.showResponse = function (responseText, statusText) { | |
| 184 | 202 | $.unblockUI(); |
| 185 | 203 | $('#loading').attr('style', 'display:none;'); |
| 186 | 204 | } |
| ... | ... | @@ -194,12 +212,12 @@ wizard.prototype.refresh = function (page) { |
| 194 | 212 | type: "GET", |
| 195 | 213 | cache: false, |
| 196 | 214 | beforeSubmit: w.showRequest, |
| 197 | - success: function(data){ | |
| 198 | - $("#"+div).empty(); | |
| 199 | - $("#"+div).append(data); | |
| 200 | - w.showResponse; | |
| 201 | - return; | |
| 202 | - } | |
| 215 | + success: function(data) { | |
| 216 | + $("#"+div).empty(); | |
| 217 | + $("#"+div).append(data); | |
| 218 | + w.showResponse; | |
| 219 | + return; | |
| 220 | + } | |
| 203 | 221 | }); |
| 204 | 222 | } |
| 205 | 223 | |
| ... | ... | @@ -210,7 +228,7 @@ wizard.prototype.getUrl = function (address, div) { |
| 210 | 228 | dataType: "html", |
| 211 | 229 | type: "GET", |
| 212 | 230 | cache: false, |
| 213 | - success: function(data){ | |
| 231 | + success: function(data) { | |
| 214 | 232 | $("#"+div).empty(); |
| 215 | 233 | $("#"+div).append(data); |
| 216 | 234 | return; |
| ... | ... | @@ -227,11 +245,5 @@ wizard.prototype.sendRegistration = function () { |
| 227 | 245 | } |
| 228 | 246 | |
| 229 | 247 | wizard.prototype.clearSessions = function () { |
| 230 | -// var address = 'session.php?action=destroyAll'; | |
| 231 | -// $.ajax({ | |
| 232 | -// url: address, | |
| 233 | -// dataType: "html", | |
| 234 | -// type: "POST", | |
| 235 | -// cache: false, | |
| 236 | -// }); | |
| 248 | + | |
| 237 | 249 | } |
| 238 | 250 | \ No newline at end of file | ... | ... |
setup/wizard/stepAction.php
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | -* Steap Action Controller. | |
| 3 | +* Step Action Controller. | |
| 4 | 4 | * |
| 5 | 5 | * KnowledgeTree Community Edition |
| 6 | 6 | * Document Management Made Simple |
| ... | ... | @@ -76,7 +76,7 @@ class stepAction { |
| 76 | 76 | * @var boolean |
| 77 | 77 | */ |
| 78 | 78 | protected $displayFirst = false; |
| 79 | - | |
| 79 | + | |
| 80 | 80 | /** |
| 81 | 81 | * List of install properties |
| 82 | 82 | * |
| ... | ... | @@ -85,7 +85,7 @@ class stepAction { |
| 85 | 85 | * @var boolean |
| 86 | 86 | */ |
| 87 | 87 | protected $installProperties = array(); |
| 88 | - | |
| 88 | + | |
| 89 | 89 | /** |
| 90 | 90 | * Reference to session object |
| 91 | 91 | * |
| ... | ... | @@ -131,7 +131,7 @@ class stepAction { |
| 131 | 131 | $this->loadSession($session); |
| 132 | 132 | $this->setInstallProperties($installProperties); |
| 133 | 133 | } |
| 134 | - | |
| 134 | + | |
| 135 | 135 | /** |
| 136 | 136 | * Sets steps class names in string format |
| 137 | 137 | * |
| ... | ... | @@ -179,7 +179,7 @@ class stepAction { |
| 179 | 179 | public function setDisplayFirst($displayFirst) { |
| 180 | 180 | $this->displayFirst = $displayFirst; |
| 181 | 181 | } |
| 182 | - | |
| 182 | + | |
| 183 | 183 | /** |
| 184 | 184 | * Sets session object |
| 185 | 185 | * |
| ... | ... | @@ -191,7 +191,7 @@ class stepAction { |
| 191 | 191 | public function loadSession($ses) { |
| 192 | 192 | $this->session = $ses; |
| 193 | 193 | } |
| 194 | - | |
| 194 | + | |
| 195 | 195 | /** |
| 196 | 196 | * Sets install properties |
| 197 | 197 | * |
| ... | ... | @@ -203,7 +203,7 @@ class stepAction { |
| 203 | 203 | public function setInstallProperties($installProperties) { |
| 204 | 204 | $this->installProperties = $installProperties; |
| 205 | 205 | } |
| 206 | - | |
| 206 | + | |
| 207 | 207 | /** |
| 208 | 208 | * Main control to handle the steps actions |
| 209 | 209 | * |
| ... | ... | @@ -279,7 +279,7 @@ class stepAction { |
| 279 | 279 | |
| 280 | 280 | return $str; |
| 281 | 281 | } |
| 282 | - | |
| 282 | + | |
| 283 | 283 | /** |
| 284 | 284 | * Returns current step name |
| 285 | 285 | * |
| ... | ... | @@ -334,7 +334,7 @@ class stepAction { |
| 334 | 334 | |
| 335 | 335 | return $step_tpl->fetch(); |
| 336 | 336 | } |
| 337 | - | |
| 337 | + | |
| 338 | 338 | /** |
| 339 | 339 | * Returns confirmation page flag |
| 340 | 340 | * |
| ... | ... | @@ -358,7 +358,7 @@ class stepAction { |
| 358 | 358 | public function displayFirst() { |
| 359 | 359 | return $this->displayFirst; |
| 360 | 360 | } |
| 361 | - | |
| 361 | + | |
| 362 | 362 | /** |
| 363 | 363 | * Returns session object |
| 364 | 364 | * |
| ... | ... | @@ -401,7 +401,7 @@ class stepAction { |
| 401 | 401 | // TODO: Force because it does not always recognize ajax request |
| 402 | 402 | if(AJAX && !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') { |
| 403 | 403 | echo $step_tpl->fetch(); |
| 404 | - } else { | |
| 404 | + } else { | |
| 405 | 405 | $content = $step_tpl->fetch(); |
| 406 | 406 | $tpl = new Template("templates/wizard.tpl"); |
| 407 | 407 | $vars = $this->getVars(); // Get template variables |
| ... | ... | @@ -418,17 +418,17 @@ class stepAction { |
| 418 | 418 | } |
| 419 | 419 | } |
| 420 | 420 | } |
| 421 | - | |
| 421 | + | |
| 422 | 422 | public function loadToTpl($step_tpl, $step_vars) { |
| 423 | 423 | foreach ($step_vars as $key => $value) { // Set template variables |
| 424 | 424 | $step_tpl->set($key, $value); // Load values to session |
| 425 | 425 | } |
| 426 | 426 | } |
| 427 | - | |
| 427 | + | |
| 428 | 428 | public function getStepVars() { |
| 429 | 429 | return $this->action->getStepVars(); |
| 430 | 430 | } |
| 431 | - | |
| 431 | + | |
| 432 | 432 | public function getVars() { |
| 433 | 433 | $left = $this->getLeftMenu(); |
| 434 | 434 | $vars['left'] = $left; // Set left menu |
| ... | ... | @@ -436,6 +436,7 @@ class stepAction { |
| 436 | 436 | $vars['install_type'] = $this->installProperties['install_type']; // Set type |
| 437 | 437 | return $vars; |
| 438 | 438 | } |
| 439 | + | |
| 439 | 440 | /** |
| 440 | 441 | * Load class to session |
| 441 | 442 | * | ... | ... |
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 |
| ... | ... | @@ -44,7 +44,7 @@ class complete extends Step { |
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * List of services to check |
| 47 | - * | |
| 47 | + * | |
| 48 | 48 | * @access private |
| 49 | 49 | * @var array |
| 50 | 50 | */ |
| ... | ... | @@ -55,13 +55,16 @@ class complete extends Step { |
| 55 | 55 | private $migrate_check = false; |
| 56 | 56 | public $silent = true; |
| 57 | 57 | private $servicesValidation = false; |
| 58 | - | |
| 58 | + private $pathsSection = true; | |
| 59 | + private $databaseSection = true; | |
| 60 | + private $privilegesSection = true; | |
| 61 | + | |
| 59 | 62 | function doStep() { |
| 60 | 63 | $this->temp_variables = array("step_name"=>"complete", "silent"=>$this->silent); |
| 61 | 64 | $this->doRun(); |
| 62 | 65 | return 'landing'; |
| 63 | 66 | } |
| 64 | - | |
| 67 | + | |
| 65 | 68 | function doRun() { |
| 66 | 69 | $this->checkFileSystem(); // check filesystem (including location of document directory and logging) |
| 67 | 70 | $this->checkDb(); // check database |
| ... | ... | @@ -69,7 +72,7 @@ class complete extends Step { |
| 69 | 72 | $this->checkInstallType();// Set silent mode variables |
| 70 | 73 | $this->storeSilent();// Set silent mode variables |
| 71 | 74 | } |
| 72 | - | |
| 75 | + | |
| 73 | 76 | private function checkFileSystem() |
| 74 | 77 | { |
| 75 | 78 | // defaults |
| ... | ... | @@ -81,36 +84,33 @@ class complete extends Step { |
| 81 | 84 | $this->temp_variables['config'] = ''; |
| 82 | 85 | $this->temp_variables['docLocation'] = ''; |
| 83 | 86 | $docRoot = ''; |
| 84 | - // retrieve path information from session | |
| 85 | - $config = $this->getDataFromSession("configuration"); | |
| 87 | + $config = $this->getDataFromSession("configuration"); // retrieve path information from session | |
| 86 | 88 | $paths = $config['paths']; |
| 87 | - | |
| 88 | 89 | $html = '<td><div class="%s"></div></td>' |
| 89 | 90 | . '<td %s>%s</td>'; |
| 90 | 91 | $pathhtml = '<td><div class="%s"></div></td>' |
| 91 | 92 | . '<td>%s</td>' |
| 92 | 93 | . '<td %s>%s</td>'; |
| 93 | - // check paths are writeable | |
| 94 | - if(is_array($paths)) { | |
| 94 | + if(is_array($paths)) { // check paths are writeable | |
| 95 | 95 | foreach ($paths as $path) |
| 96 | 96 | { |
| 97 | 97 | $output = ''; |
| 98 | 98 | $path['path'] = $class = strtolower(substr($path['path'],0,1)).substr($path['path'],1); // Damn you windows |
| 99 | 99 | $result = $this->util->checkPermission($path['path']); |
| 100 | - $output = sprintf($pathhtml, $result['class'], $path['path'], | |
| 101 | - (($result['class'] == 'tick') ? 'class="green"' : 'class="error"' ), | |
| 100 | + $output = sprintf($pathhtml, $result['class'], $path['path'], | |
| 101 | + (($result['class'] == 'tick') ? 'class="green"' : 'class="error"' ), | |
| 102 | 102 | (($result['class'] == 'tick') ? 'Writeable' : 'Not Writeable' )); |
| 103 | 103 | $this->temp_variables[($path['setting'] != '') ? $path['setting'] : 'config'] = $output; |
| 104 | 104 | if($result['class'] != 'tick') { |
| 105 | + $this->pathsSection = false; | |
| 105 | 106 | $this->paths_check = $result['class']; |
| 106 | 107 | } |
| 107 | 108 | // for document location check |
| 108 | 109 | if ($path['setting'] == 'documentRoot') { |
| 109 | - $docRoot = $path['path']; | |
| 110 | + $docRoot = $path['path']; | |
| 110 | 111 | } |
| 111 | 112 | } |
| 112 | 113 | } |
| 113 | - | |
| 114 | 114 | // check document path internal/external to web root |
| 115 | 115 | // compare SYSTEM_DIR to root path of documentRoot |
| 116 | 116 | // NOTE preg_replace is to ensure all slash separators are the same (forward slash) |
| ... | ... | @@ -121,15 +121,15 @@ class complete extends Step { |
| 121 | 121 | . '<td class="warning" colspan="2">Your document directory is set to the default, which is inside the web root. ' |
| 122 | 122 | . 'This may present a security problem if your documents can be accessed from the web, ' |
| 123 | 123 | . 'working around the permission system in KnowledgeTree.</td>'; |
| 124 | - if($this->paths_check == 'tick') | |
| 125 | - $this->paths_check = 'cross_orange'; | |
| 126 | - $this->warnings[] = 'Move var directory'; | |
| 124 | + $this->paths_check = 'cross_orange'; | |
| 125 | + $this->warnings[] = 'Move var directory'; | |
| 126 | + $this->pathsSection = false; | |
| 127 | 127 | } |
| 128 | 128 | else { |
| 129 | 129 | $this->temp_variables['docLocation'] = sprintf($html, 'tick', '', 'Your document directory is outside the web root.'); |
| 130 | 130 | } |
| 131 | 131 | } |
| 132 | - | |
| 132 | + | |
| 133 | 133 | private function checkDb() |
| 134 | 134 | { |
| 135 | 135 | // defaults |
| ... | ... | @@ -146,16 +146,17 @@ class complete extends Step { |
| 146 | 146 | $loaded = $this->util->dbUtilities->getDatabaseLink(); |
| 147 | 147 | if (!$loaded) { |
| 148 | 148 | $this->temp_variables['dbConnectAdmin'] .= '<td><div class="cross"></div></td>' |
| 149 | - . '<td class="error">Unable to connect to database (user: ' | |
| 149 | + . '<td class="error">Unable to connect to database (user: ' | |
| 150 | 150 | . $dbconf['dmsname'] . ')</td>'; |
| 151 | 151 | $this->database_check = 'cross'; |
| 152 | 152 | $this->temp_variables['dbConnectAdmin'] .= sprintf($html, 'cross', 'class="error"', 'Unable to connect to database (user: ' . $dbconf['dmsname'] . ')'); |
| 153 | + $this->privilegesSection = false; | |
| 153 | 154 | } |
| 154 | 155 | else |
| 155 | 156 | { |
| 156 | 157 | $this->temp_variables['dbConnectAdmin'] .= sprintf($html, 'tick', '', 'Database connectivity successful (user: ' . $dbconf['dmsname'] . ')'); |
| 157 | 158 | } |
| 158 | - | |
| 159 | + | |
| 159 | 160 | // make db connection - user |
| 160 | 161 | $this->util->dbUtilities->load($dbconf['dhost'], $dbconf['dport'], $dbconf['dmsusername'], $dbconf['dmsuserpassword'], $dbconf['dname']); |
| 161 | 162 | $loaded = $this->util->dbUtilities->getDatabaseLink(); |
| ... | ... | @@ -170,17 +171,16 @@ class complete extends Step { |
| 170 | 171 | { |
| 171 | 172 | $this->temp_variables['dbPrivileges'] .= '<td style="width:15px;"><div class="cross" style="float:left;"></div></td>' |
| 172 | 173 | . '<td class="error" style="width:500px;">' |
| 173 | - . 'Unable to do a basic database query. Error: ' . $this->util->dbUtilities->getLastError() | |
| 174 | - . '</td>'; | |
| 175 | - $this->privileges_check = 'cross'; | |
| 174 | + . 'Unable to do a basic database query. Error: ' . $this->util->dbUtilities->getLastError() . '</td>'; | |
| 176 | 175 | $this->privileges_check = 'cross'; |
| 176 | + $this->privilegesSection = false; | |
| 177 | 177 | } |
| 178 | 178 | else |
| 179 | 179 | { |
| 180 | 180 | $this->temp_variables['dbPrivileges'] .= sprintf($html, 'tick', '', 'Basic database query successful'); |
| 181 | - | |
| 181 | + | |
| 182 | 182 | } |
| 183 | - | |
| 183 | + | |
| 184 | 184 | // check transaction support |
| 185 | 185 | $sTable = 'system_settings'; |
| 186 | 186 | $this->util->dbUtilities->startTransaction(); |
| ... | ... | @@ -190,6 +190,7 @@ class complete extends Step { |
| 190 | 190 | if (!$res) { |
| 191 | 191 | $this->temp_variables['dbTransaction'] .= sprintf($html, 'cross', 'class="error"', 'Transaction support not available in database'); |
| 192 | 192 | $this->privileges_check = 'cross'; |
| 193 | + $this->privilegesSection = false; | |
| 193 | 194 | } else { |
| 194 | 195 | $this->temp_variables['dbTransaction'] .= sprintf($html, 'tick', '', 'Database has transaction support'); |
| 195 | 196 | } |
| ... | ... | @@ -200,7 +201,7 @@ class complete extends Step { |
| 200 | 201 | $this->temp_variables['dbConnectUser'] .= sprintf($html, 'cross', 'class="error"', 'Unable to connect to database (user: ' . $dbconf['dmsusername'] . ')'); |
| 201 | 202 | } |
| 202 | 203 | } |
| 203 | - | |
| 204 | + | |
| 204 | 205 | private function checkServices() |
| 205 | 206 | { |
| 206 | 207 | $services = new services(); |
| ... | ... | @@ -215,10 +216,10 @@ class complete extends Step { |
| 215 | 216 | $this->temp_variables[$serviceName."Status"] = 'cross_orange'; |
| 216 | 217 | $this->services_check = 'cross_orange'; |
| 217 | 218 | } |
| 218 | - } | |
| 219 | + } | |
| 219 | 220 | return true; |
| 220 | 221 | } |
| 221 | - | |
| 222 | + | |
| 222 | 223 | function checkInstallType() { |
| 223 | 224 | if ($this->util->isMigration()) { |
| 224 | 225 | $this->migrate_check = true; |
| ... | ... | @@ -226,7 +227,7 @@ class complete extends Step { |
| 226 | 227 | $this->migrate_check = false; |
| 227 | 228 | } |
| 228 | 229 | } |
| 229 | - | |
| 230 | + | |
| 230 | 231 | /** |
| 231 | 232 | * Set all silent mode varibles |
| 232 | 233 | * |
| ... | ... | @@ -238,6 +239,10 @@ class complete extends Step { |
| 238 | 239 | $this->temp_variables['database_check'] = $this->database_check; |
| 239 | 240 | $this->temp_variables['migrate_check'] = $this->migrate_check; |
| 240 | 241 | $this->temp_variables['servicesValidation'] = $this->servicesValidation; |
| 242 | + //if(!$this->pathsSection) {die;} else {echo 'huh';} | |
| 243 | + $this->temp_variables['pathsSection'] = $this->pathsSection; | |
| 244 | + $this->temp_variables['databaseSection'] = $this->databaseSection; | |
| 245 | + $this->temp_variables['privilegesSection'] = $this->privilegesSection; | |
| 241 | 246 | } |
| 242 | 247 | } |
| 243 | 248 | ?> |
| 244 | 249 | \ No newline at end of file | ... | ... |
setup/wizard/steps/dependencies.php
| ... | ... | @@ -48,7 +48,7 @@ class dependencies extends Step |
| 48 | 48 | private $versionSection = false; |
| 49 | 49 | private $extensionSection = false; |
| 50 | 50 | private $configurationSection = false; |
| 51 | - | |
| 51 | + | |
| 52 | 52 | /** |
| 53 | 53 | * Flag to store class information in session |
| 54 | 54 | * |
| ... | ... | @@ -167,7 +167,7 @@ class dependencies extends Step |
| 167 | 167 | public function getWarnings() { |
| 168 | 168 | return $this->warnings; |
| 169 | 169 | } |
| 170 | - | |
| 170 | + | |
| 171 | 171 | /** |
| 172 | 172 | * Get the variables to be passed to the template |
| 173 | 173 | * |
| ... | ... | @@ -264,7 +264,7 @@ class dependencies extends Step |
| 264 | 264 | } |
| 265 | 265 | $check['class'] = 'tick'; |
| 266 | 266 | $check['version'] = "You are running version <b>{$phpversion}</b>."; |
| 267 | - | |
| 267 | + | |
| 268 | 268 | return $check; |
| 269 | 269 | } |
| 270 | 270 | |
| ... | ... | @@ -337,7 +337,7 @@ class dependencies extends Step |
| 337 | 337 | array('extension' => 'mysql', 'required' => 'yes', 'name' => 'MySQL', 'details' => 'Used for accessing a MySQL database.'), |
| 338 | 338 | array('extension' => 'curl', 'required' => 'yes', 'name' => 'cURL', 'details' => 'Allows the connection and communication between different servers types using various protocols.'), |
| 339 | 339 | array('extension' => 'xmlrpc', 'required' => 'yes', 'name' => 'XMLRPC', 'details' => 'Used with XML-RPC servers and clients.'), |
| 340 | - array('extension' => 'win32', 'required' => 'no', 'name' => 'Win32', 'details' => 'Allows control of Microsoft Windows services.'), | |
| 340 | + array('extension' => 'win32service', 'required' => 'no', 'name' => 'Win32 Services', 'details' => 'Allows control of Microsoft Windows services.'), | |
| 341 | 341 | array('extension' => 'mbstring', 'required' => 'no', 'name' => 'Multi Byte Strings', 'details' => 'Used in the manipulation of multi-byte strings.'), |
| 342 | 342 | array('extension' => 'ldap', 'required' => 'no', 'name' => 'LDAP', 'details' => 'Used to access LDAP directory servers.'), |
| 343 | 343 | array('extension' => 'json', 'required' => 'yes', 'name' => 'JSON', 'details' => 'Implements the javascript object notation (json) data-interchange format.'), |
| ... | ... | @@ -392,7 +392,7 @@ class dependencies extends Step |
| 392 | 392 | array('name' => 'Memory limit', 'configuration' => 'memory_limit', 'recommended' => '32M', 'type' => 'int'), |
| 393 | 393 | ); |
| 394 | 394 | } |
| 395 | - | |
| 395 | + | |
| 396 | 396 | public function storeSilent() { |
| 397 | 397 | $this->temp_variables['versionSection'] = $this->versionSection; |
| 398 | 398 | $this->temp_variables['extensionSection'] = $this->extensionSection; | ... | ... |
setup/wizard/steps/registration.php
| ... | ... | @@ -127,7 +127,10 @@ class registration extends Step |
| 127 | 127 | return true; |
| 128 | 128 | } |
| 129 | 129 | $this->setInSession(); |
| 130 | - | |
| 130 | + // Flip | |
| 131 | + $countries = $this->temp_variables['countries']; | |
| 132 | + $fcountries = array_flip($countries); | |
| 133 | + $_POST['submitted']['country'] = $fcountries[$_POST['submitted']['country']]; | |
| 131 | 134 | // Post the form using curl |
| 132 | 135 | $this->curlForm($_POST); |
| 133 | 136 | |
| ... | ... | @@ -280,6 +283,15 @@ class registration extends Step |
| 280 | 283 | ); |
| 281 | 284 | |
| 282 | 285 | $countries = array( |
| 286 | + 'noneselected' => 'Select Country...', | |
| 287 | + 'US' => 'UNITED STATES', | |
| 288 | + 'GB' => 'UNITED KINGDOM', | |
| 289 | + 'DE' => 'GERMANY', | |
| 290 | + 'FR' => 'FRANCE', | |
| 291 | + 'IT' => 'ITALY', | |
| 292 | + 'ES' => 'SPAIN', | |
| 293 | + 'AU' => 'AUSTRALIA', | |
| 294 | + 'IN' => 'INDIA', | |
| 283 | 295 | 'AF' => 'AFGHANISTAN', |
| 284 | 296 | 'AX' => 'ÅLAND ISLANDS', |
| 285 | 297 | 'AL' => 'ALBANIA', |
| ... | ... | @@ -293,7 +305,6 @@ class registration extends Step |
| 293 | 305 | 'AR' => 'ARGENTINA', |
| 294 | 306 | 'AM' => 'ARMENIA', |
| 295 | 307 | 'AW' => 'ARUBA', |
| 296 | - 'AU' => 'AUSTRALIA', | |
| 297 | 308 | 'AT' => 'AUSTRIA', |
| 298 | 309 | 'AZ' => 'AZERBAIJAN', |
| 299 | 310 | 'BS' => 'BAHAMAS', |
| ... | ... | @@ -353,14 +364,12 @@ class registration extends Step |
| 353 | 364 | 'FO' => 'FAROE ISLANDS', |
| 354 | 365 | 'FJ' => 'FIJI', |
| 355 | 366 | 'FI' => 'FINLAND', |
| 356 | - 'FR' => 'FRANCE', | |
| 357 | 367 | 'GF' => 'FRENCH GUIANA', |
| 358 | 368 | 'PF' => 'FRENCH POLYNESIA', |
| 359 | 369 | 'TF' => 'FRENCH SOUTHERN TERRITORIES', |
| 360 | 370 | 'GA' => 'GABON', |
| 361 | 371 | 'GM' => 'GAMBIA', |
| 362 | 372 | 'GE' => 'GEORGIA', |
| 363 | - 'DE' => 'GERMANY', | |
| 364 | 373 | 'GH' => 'GHANA', |
| 365 | 374 | 'GI' => 'GIBRALTAR', |
| 366 | 375 | 'GR' => 'GREECE', |
| ... | ... | @@ -380,16 +389,13 @@ class registration extends Step |
| 380 | 389 | 'HK' => 'HONG KONG', |
| 381 | 390 | 'HU' => 'HUNGARY', |
| 382 | 391 | 'IS' => 'ICELAND', |
| 383 | - 'IN' => 'INDIA', | |
| 384 | 392 | 'ID' => 'INDONESIA', |
| 385 | 393 | 'IR' => 'IRAN, ISLAMIC REPUBLIC OF', |
| 386 | 394 | 'IQ' => 'IRAQ', |
| 387 | 395 | 'IE' => 'IRELAND', |
| 388 | 396 | 'IM' => 'ISLE OF MAN', |
| 389 | 397 | 'IL' => 'ISRAEL', |
| 390 | - 'IT' => 'ITALY', | |
| 391 | 398 | 'JM' => 'JAMAICA', |
| 392 | - 'JP' => 'JAPAN', | |
| 393 | 399 | 'JE' => 'JERSEY', |
| 394 | 400 | 'JO' => 'JORDAN', |
| 395 | 401 | 'KZ' => 'KAZAKHSTAN', |
| ... | ... | @@ -486,7 +492,6 @@ class registration extends Step |
| 486 | 492 | 'SO' => 'SOMALIA', |
| 487 | 493 | 'ZA' => 'SOUTH AFRICA', |
| 488 | 494 | 'GS' => 'SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS', |
| 489 | - 'ES' => 'SPAIN', | |
| 490 | 495 | 'LK' => 'SRI LANKA', |
| 491 | 496 | 'SD' => 'SUDAN', |
| 492 | 497 | 'SR' => 'SURINAME', |
| ... | ... | @@ -512,8 +517,6 @@ class registration extends Step |
| 512 | 517 | 'UG' => 'UGANDA', |
| 513 | 518 | 'UA' => 'UKRAINE', |
| 514 | 519 | 'AE' => 'UNITED ARAB EMIRATES', |
| 515 | - 'GB' => 'UNITED KINGDOM', | |
| 516 | - 'US' => 'UNITED STATES', | |
| 517 | 520 | 'UM' => 'UNITED STATES MINOR OUTLYING ISLANDS', |
| 518 | 521 | 'UY' => 'URUGUAY', |
| 519 | 522 | 'UZ' => 'UZBEKISTAN', |
| ... | ... | @@ -528,7 +531,6 @@ class registration extends Step |
| 528 | 531 | 'ZM' => 'ZAMBIA', |
| 529 | 532 | 'ZW' => 'ZIMBABWE' |
| 530 | 533 | ); |
| 531 | - | |
| 532 | 534 | $this->temp_variables['countries'] = $countries; |
| 533 | 535 | $this->temp_variables['industries'] = $industries; |
| 534 | 536 | $this->temp_variables['org_size'] = $sizes; | ... | ... |
setup/wizard/template.php
| ... | ... | @@ -40,63 +40,63 @@ |
| 40 | 40 | * @version Version 0.1 |
| 41 | 41 | */ |
| 42 | 42 | |
| 43 | -class Template | |
| 43 | +class Template | |
| 44 | 44 | { |
| 45 | 45 | /** |
| 46 | 46 | * Hold all the variables that are going to be imported into the template file |
| 47 | 47 | * @var array |
| 48 | 48 | */ |
| 49 | - var $template_vars = Array(); | |
| 49 | + var $template_vars = Array(); | |
| 50 | + | |
| 50 | 51 | |
| 51 | - | |
| 52 | 52 | /** |
| 53 | 53 | * Constructor |
| 54 | - * | |
| 54 | + * | |
| 55 | 55 | * @author KnowledgeTree Team |
| 56 | 56 | * @param string $file the file name you want to load |
| 57 | 57 | * @access public |
| 58 | 58 | * @return void |
| 59 | 59 | */ |
| 60 | - public function Template($file = null) | |
| 60 | + public function Template($file = null) | |
| 61 | 61 | { |
| 62 | 62 | $this->file = $file; |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | - | |
| 65 | + | |
| 66 | 66 | /** |
| 67 | 67 | * Set a variable into the template |
| 68 | 68 | * If the variable is a template object, go and call its template::fetch() method |
| 69 | - * | |
| 69 | + * | |
| 70 | 70 | * @author KnowledgeTree Team |
| 71 | 71 | * @param string $name The name for this value in the template file |
| 72 | 72 | * @param string $value The value to show in the template file |
| 73 | 73 | * @access public |
| 74 | 74 | * @return void |
| 75 | 75 | */ |
| 76 | - public function set($name, $value) | |
| 76 | + public function set($name, $value) | |
| 77 | 77 | { |
| 78 | 78 | //if(is_a($value, 'Template')) { |
| 79 | 79 | $class = 'Template'; |
| 80 | 80 | $isA = $value instanceof $class; |
| 81 | 81 | if($isA) { |
| 82 | - $value = $value->fetch(); | |
| 82 | + $value = $value->fetch(); | |
| 83 | 83 | } |
| 84 | 84 | $this->template_vars[$name] = $value; |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - | |
| 87 | + | |
| 88 | 88 | /** |
| 89 | 89 | * Create the template and import its variables |
| 90 | - * | |
| 90 | + * | |
| 91 | 91 | * @author KnowledgeTree Team |
| 92 | 92 | * @param string $file The file to use as the template |
| 93 | 93 | * @access public |
| 94 | 94 | * @return string The parsed template |
| 95 | 95 | */ |
| 96 | - public function fetch($file = null) | |
| 96 | + public function fetch($file = null) | |
| 97 | 97 | { |
| 98 | 98 | if (is_null($file)) $file = $this->file; |
| 99 | - | |
| 99 | + | |
| 100 | 100 | $file = WIZARD_DIR . $file; |
| 101 | 101 | if (!file_exists($file)) { |
| 102 | 102 | trigger_error('Template file '.$file.' does not exist ', E_USER_ERROR); |
| ... | ... | @@ -105,10 +105,10 @@ class Template |
| 105 | 105 | extract($this->template_vars); // Extract the vars to local namespace |
| 106 | 106 | ob_start(); |
| 107 | 107 | include($file); |
| 108 | - $contents = ob_get_contents(); | |
| 109 | - ob_end_clean(); | |
| 108 | + $contents = ob_get_contents(); | |
| 109 | + ob_end_clean(); | |
| 110 | 110 | return $contents; |
| 111 | 111 | } |
| 112 | - | |
| 112 | + | |
| 113 | 113 | } |
| 114 | 114 | ?> |
| 115 | 115 | \ No newline at end of file | ... | ... |
setup/wizard/templates/complete.tpl
| 1 | 1 | <form id="install_complete_none"> |
| 2 | - <p class="title">Installation Completed</p> | |
| 3 | - | |
| 4 | - <p class="description">This allows you to check that your KnowledgeTree configuration is set | |
| 5 | - up correctly. You can run this at any time after configuration to check | |
| 6 | - that things are still set up correctly.</p> | |
| 7 | - | |
| 8 | - <?php | |
| 9 | -// if($errors || $warnings){ | |
| 10 | - echo '<div>' | |
| 11 | - . '<a href="http://wiki.knowledgetree.com/Web_Based_Installer#Post_Install" target="_blank">' | |
| 12 | - . 'Click Here for help on overcoming post install issues</a></div><br/>'; | |
| 13 | -// } | |
| 14 | - ?> | |
| 2 | + <p class="title"> | |
| 3 | + Installation Completed | |
| 4 | + </p> | |
| 5 | + <p class="description"> | |
| 6 | + This step allows you to check that your KnowledgeTree configuration is set up correctly. | |
| 7 | +<!-- <br/>--> | |
| 8 | + Click <b>Finish</b> to browse to the KnowledgeTree Web Interface. Default login credentials are <b>username:</b> <i>admin</i> and <b>password:</b> <i>admin</i>. | |
| 9 | +<!-- You can run this at any time after configuration to check that things are still set up correctly.--> | |
| 10 | + </p> | |
| 11 | + <div> | |
| 12 | + <a href="http://wiki.knowledgetree.com/Web_Based_Installer#Post_Install" target="_blank"> | |
| 13 | + Click Here for help on overcoming post install issues | |
| 14 | + </a> | |
| 15 | + </div> | |
| 16 | + <br/> | |
| 15 | 17 | <div id="step_content_<?php echo $step_name; ?>" class="step"> |
| 16 | - | |
| 17 | 18 | <?php if(!$servicesValidation) { ?> |
| 18 | 19 | <h3>Services</h3> |
| 19 | 20 | The KnowledgeTree services need to be started to allow for optimal functioning of the search, indexing and pdf generation. |
| 20 | 21 | <?php if(!WINDOWS_OS) { ?> |
| 21 | - To start the services, execute the dmsctl.sh shell script in the KnowledgeTree directory from a terminal.<br/><br/> | |
| 22 | + To start the services, execute the dmsctl.sh shell script in the KnowledgeTree directory from a terminal. | |
| 23 | + <br/> | |
| 24 | + <br/> | |
| 22 | 25 | <?php } else { ?> |
| 23 | - To start the services, execute the dmsctl.bat batch file in the KnowledgeTree directory from a command prompt, run as administrator.<br/><br/> | |
| 26 | + To start the services, execute the dmsctl.bat batch file in the KnowledgeTree directory from a command prompt, run as administrator. | |
| 27 | + <br/> | |
| 28 | + <br/> | |
| 24 | 29 | <?php } ?> |
| 25 | 30 | <p class="disclaimer"> |
| 26 | 31 | <?php if(WINDOWS_OS) { ?> |
| 27 | - cd KnowledgeTree_Installation_Folder<br/> | |
| 28 | - dmsctl.bat install<br/> | |
| 29 | - dmsctl.bat start | |
| 32 | + cd KnowledgeTree_Installation_Folder<br/> | |
| 33 | + dmsctl.bat install<br/> | |
| 34 | + dmsctl.bat start | |
| 30 | 35 | <?php } else { ?> |
| 31 | - cd /usr/share/knowledgetree-ce<br/> | |
| 32 | - sudo ./dmsctl.sh start | |
| 36 | + cd /usr/share/knowledgetree-ce<br/> | |
| 37 | + sudo ./dmsctl.sh start | |
| 33 | 38 | <?php } ?> |
| 34 | 39 | </p> |
| 35 | - | |
| 36 | 40 | <br/> |
| 37 | 41 | <?php } ?> |
| 38 | 42 | <!-- Paths and Permissions --> |
| 39 | - <div> | |
| 40 | - <h3><?php echo "<span class='{$paths_check}'> </span>"; ?>Paths and Permissions</h3> | |
| 43 | + <?php | |
| 44 | + $iconFlag = "<span class='{$paths_check}'> </span>"; | |
| 45 | + $checkHeading = "<h3 style='width:35%; float:left;'>".$iconFlag."Paths and Permissions</h3>"; | |
| 46 | + ?> | |
| 47 | +<!-- <div>--> | |
| 48 | + <?php if($pathsSection) { | |
| 49 | + $details = 'Show Details'; | |
| 50 | + $display = 'none'; | |
| 51 | + } else { | |
| 52 | + $details = 'Hide Details'; | |
| 53 | + $display = 'block'; | |
| 54 | + }?> | |
| 55 | +<!-- <h3><?php //echo "<span class='{$paths_check}'> </span>"; ?>Paths and Permissions</h3>--> | |
| 41 | 56 | <?php if($silent) { ?> |
| 42 | - <div id="option8" class="onclick" onclick="javascript:{w.toggleClass('paths_check', 'option8');}">Show Details</div> | |
| 43 | - <div class="paths_check" style="display:none"> | |
| 57 | +<!-- <div id="option8" class="onclick" onclick="javascript:{w.toggleClass('paths_check', 'option8');}">Show Details</div>--> | |
| 58 | +<!-- <div class="paths_check" style="display:none">--> | |
| 44 | 59 | <?php } ?> |
| 45 | - <table> | |
| 60 | + <?php | |
| 61 | + $pathsCheck = $checkHeading; | |
| 62 | + $pathsCheck .= "<div id='option8' class='onclick' onclick='javascript:{w.toggleClass(\"paths_check\", \"option8\");}'>"; | |
| 63 | + $pathsCheck .= $details."</div>"; | |
| 64 | + $pathsCheck .= "<div class='paths_check dependency_details' style='display:".$display.";'>"; | |
| 65 | + echo $pathsCheck; | |
| 66 | + ?> | |
| 67 | + <table class="description_complete"> | |
| 68 | +<!-- <table class="description">--> | |
| 46 | 69 | <tr><?php echo $varDirectory; ?></tr> |
| 47 | 70 | <tr><?php echo $documentRoot; ?></tr> |
| 48 | 71 | <tr><?php echo $logDirectory; ?></tr> |
| ... | ... | @@ -54,39 +77,78 @@ |
| 54 | 77 | <?php if($silent) { ?> |
| 55 | 78 | </div> |
| 56 | 79 | <?php } ?> |
| 57 | - </div> | |
| 58 | - <br/><br/> | |
| 59 | - <div> | |
| 80 | +<!-- </div>--> | |
| 81 | + <br/> | |
| 82 | + <br/> | |
| 83 | +<!-- <div>--> | |
| 60 | 84 | <!-- Database connectivity --> |
| 61 | - <h3><?php echo "<span class='{$database_check}'> </span>"; ?>Database connectivity</h3> | |
| 85 | + <?php | |
| 86 | + $iconFlag = "<span class='{$database_check}'> </span>"; | |
| 87 | + $checkHeading = "<h3 style='width:35%; float:left;'>".$iconFlag."Database connectivity</h3>"; | |
| 88 | + ?> | |
| 89 | + <?php if($databaseSection) { | |
| 90 | + $details = 'Show Details'; | |
| 91 | + $display = 'none'; | |
| 92 | + } else { | |
| 93 | + $details = 'Hide Details'; | |
| 94 | + $display = 'block'; | |
| 95 | + }?> | |
| 96 | +<!-- <h3><?php //echo "<span class='{$database_check}'> </span>"; ?>Database connectivity</h3>--> | |
| 62 | 97 | <?php if($silent) { ?> |
| 63 | - <div id="option9" class="onclick" onclick="javascript:{w.toggleClass('database_check', 'option9');}">Show Details</div> | |
| 64 | - <div class="database_check" style="display:none"> | |
| 98 | +<!-- <div id="option9" class="onclick" onclick="javascript:{w.toggleClass('database_check', 'option9');}">Show Details</div>--> | |
| 99 | +<!-- <div class="database_check" style="display:none">--> | |
| 100 | + <?php | |
| 101 | + $databaseCheck = $checkHeading; | |
| 102 | + $databaseCheck .= "<div id='option9' class='onclick' onclick='javascript:{w.toggleClass(\"database_check\", \"option9\");}'>"; | |
| 103 | + $databaseCheck .= $details."</div>"; | |
| 104 | + $databaseCheck .= "<div class='database_check dependency_details' style='display:".$display.";'>"; | |
| 105 | + echo $databaseCheck; | |
| 106 | + ?> | |
| 65 | 107 | <?php } ?> |
| 66 | - <table> | |
| 108 | + <table class="description_complete"> | |
| 67 | 109 | <tr><?php echo $dbConnectAdmin; ?></tr> |
| 68 | 110 | <tr><?php echo $dbConnectUser; ?></tr> |
| 69 | 111 | </table> |
| 70 | 112 | <?php if($silent) { ?> |
| 71 | 113 | </div> |
| 72 | 114 | <!-- Privileges --> |
| 73 | - <br/><br/> | |
| 115 | + <br/> | |
| 116 | + <br/> | |
| 74 | 117 | <?php } ?> |
| 75 | - <h3><?php echo "<span class='{$privileges_check}'> </span>"; ?>Privileges</h3> | |
| 118 | + <?php | |
| 119 | + $iconFlag = "<span class='{$privileges_check}'> </span>"; | |
| 120 | + $checkHeading = "<h3 style='width:35%; float:left;'>".$iconFlag."Privileges</h3>"; | |
| 121 | + ?> | |
| 122 | + <?php if($privilegesSection) { | |
| 123 | + $details = 'Show Details'; | |
| 124 | + $display = 'none'; | |
| 125 | + } else { | |
| 126 | + $details = 'Hide Details'; | |
| 127 | + $display = 'block'; | |
| 128 | + }?> | |
| 129 | +<!-- <h3><?php //echo "<span class='{$privileges_check}'> </span>"; ?>Privileges</h3>--> | |
| 76 | 130 | <?php if($silent) { ?> |
| 77 | - <div id="option1" class="onclick" onclick="javascript:{w.toggleClass('privileges_check', 'option1');}">Show Details</div> | |
| 78 | - <div class="privileges_check" style="display:none"> | |
| 131 | +<!-- <div id="option1" class="onclick" onclick="javascript:{w.toggleClass('privileges_check', 'option1');}">Show Details</div>--> | |
| 132 | +<!-- <div class="privileges_check" style="display:none">--> | |
| 133 | + <?php | |
| 134 | + $privilegesCheck = $checkHeading; | |
| 135 | + $privilegesCheck .= "<div id='option1' class='onclick' onclick='javascript:{w.toggleClass(\"privileges_check\", \"option1\");}'>"; | |
| 136 | + $privilegesCheck .= $details."</div>"; | |
| 137 | + $privilegesCheck .= "<div class='privileges_check dependency_details' style='display:".$display.";'>"; | |
| 138 | + echo $privilegesCheck; | |
| 139 | + ?> | |
| 79 | 140 | <?php } ?> |
| 80 | - <table style="width:265px;"> | |
| 141 | + <table class="description_complete"> | |
| 81 | 142 | <tr><?php echo $dbPrivileges; ?></tr> |
| 82 | 143 | <tr><?php echo $dbTransaction; ?></tr> |
| 83 | 144 | </table> |
| 84 | 145 | <?php if($silent) { ?> |
| 85 | 146 | </div> |
| 86 | 147 | <?php } ?> |
| 87 | - </div> | |
| 148 | +<!-- </div>--> | |
| 88 | 149 | <!-- Services --> |
| 89 | - <br/><br/> | |
| 150 | + <br/> | |
| 151 | +<!-- <br/>--> | |
| 90 | 152 | <?php if($servicesValidation) { ?> |
| 91 | 153 | <?php if(!$migrate_check) { ?> |
| 92 | 154 | <div> |
| ... | ... | @@ -95,7 +157,8 @@ |
| 95 | 157 | <div id="option2" class="onclick" onclick="javascript:{w.toggleClass('services_check', 'option2');}">Show Details</div> |
| 96 | 158 | <div class="services_check" style="display:none"> |
| 97 | 159 | <?php } ?> |
| 98 | - <table style="width:755px;"> | |
| 160 | +<!-- <table class="description_complete">--> | |
| 161 | + <table class="description"> | |
| 99 | 162 | <tr> |
| 100 | 163 | <td style="width:15px;"> <?php echo "<span class='{$LuceneStatus}'> </span>"; ?> </td> |
| 101 | 164 | <td style="width:640px;"> Lucene Service <?php if ($LuceneStatus != 'tick') { ?> Could not be started <?php } else { ?> Started <?php } ?></td> |
| ... | ... | @@ -108,7 +171,7 @@ |
| 108 | 171 | <?php } ?> |
| 109 | 172 | </td> |
| 110 | 173 | <?php } ?> |
| 111 | - </tr> | |
| 174 | + </tr> | |
| 112 | 175 | <tr> |
| 113 | 176 | <td> <?php echo "<span class='{$SchedulerStatus}'> </span>"; ?> </td> |
| 114 | 177 | <td> Scheduler Service <?php if ($SchedulerStatus != 'tick') { ?> Could not be started <?php } else { ?> Started <?php } ?></td> |
| ... | ... | @@ -154,7 +217,7 @@ |
| 154 | 217 | $root_url = substr($script, 0, $pos); |
| 155 | 218 | if($port == '') |
| 156 | 219 | $redirect = "http://".$_SERVER['SERVER_NAME'].$root_url."/admin.php"; |
| 157 | - else | |
| 220 | + else | |
| 158 | 221 | $redirect = "http://".$_SERVER['SERVER_NAME'].":$port".$root_url."/admin.php"; |
| 159 | 222 | ?> |
| 160 | 223 | <?php if($migrate_check) { ?> | ... | ... |
setup/wizard/templates/configuration.tpl
| 1 | 1 | <form id="dependencies_configuration_services" action="index.php?step_name=<?php echo $step_name; ?>" method="post"> |
| 2 | 2 | <p class="title">Checking System Configuration</p> |
| 3 | - | |
| 3 | + | |
| 4 | 4 | <p class="description"> |
| 5 | 5 | The wizard will review your system to determine whether KnowledgeTree is correctly configured. You’ll see whether KnowledgeTree has the correct settings or whether changes are required. |
| 6 | 6 | </p> |
| ... | ... | @@ -34,7 +34,7 @@ |
| 34 | 34 | <!--Content--> |
| 35 | 35 | <div id="step_content_<?php echo $step_name; ?>" class="step"> |
| 36 | 36 | <h3>Server Settings</h3> |
| 37 | - | |
| 37 | + | |
| 38 | 38 | <p class="description"> |
| 39 | 39 | The settings below have been drawn from the system information. The host and port should reflect the host and port that will be used to access KnowledgeTree. The Root Url is only needed if your installation is in a directory off the main web server root. |
| 40 | 40 | </p> |
| ... | ... | @@ -64,7 +64,7 @@ |
| 64 | 64 | <tr> |
| 65 | 65 | <td> <label for='yes'>Do you have SSL Enabled?: </label> </td> |
| 66 | 66 | <td> <div id="tooltips" title="Whether or not you have SSL installed"> </div> </td> |
| 67 | - <td> | |
| 67 | + <td> | |
| 68 | 68 | <label for='yes'>Yes</label> |
| 69 | 69 | <input class="radio" type='radio' name='ssl_enabled' id='yes' value='yes' <?php echo $server['ssl_enabled']['value'] == 'yes' ? 'CHECKED' : ''; ?> /> |
| 70 | 70 | |
| ... | ... | @@ -73,7 +73,7 @@ |
| 73 | 73 | </td> |
| 74 | 74 | </tr> |
| 75 | 75 | </table> |
| 76 | - | |
| 76 | + | |
| 77 | 77 | <h3><?php echo "<span class='{$paths_perms}'> </span>"; ?>Paths and Permissions</h3> |
| 78 | 78 | <?php if($silent) { ?> |
| 79 | 79 | <div id="option7" class="onclick" onclick="javascript:{w.toggleClass('paths_perms', 'option7');}">Show Details</div> |
| ... | ... | @@ -118,4 +118,4 @@ |
| 118 | 118 | <input type="submit" name="Previous" value="Previous" class="button_previous"/> |
| 119 | 119 | <input type="submit" name="Next" value="Next" class="button_next"/> |
| 120 | 120 | </form> |
| 121 | 121 | -<?php if (AJAX) { echo $html->js('form.js'); } ?> |
| 122 | +<?php if (AJAX) { echo $html->js('form.js'); } ?> | |
| 122 | 123 | \ No newline at end of file | ... | ... |
setup/wizard/templates/configuration_confirm.tpl
| ... | ... | @@ -55,24 +55,30 @@ |
| 55 | 55 | <td><?php echo $server['ssl_enabled']['value']; ?></td> |
| 56 | 56 | </tr> |
| 57 | 57 | </table> |
| 58 | - | |
| 58 | + | |
| 59 | 59 | <h3>Paths and Permissions</h3> |
| 60 | - | |
| 60 | + | |
| 61 | 61 | <table class="conf_paths"> |
| 62 | 62 | <?php |
| 63 | 63 | if($errors || $warnings) { |
| 64 | 64 | $width = "50%"; |
| 65 | + $width = "40%"; | |
| 65 | 66 | } else { |
| 66 | 67 | $width = "60%"; |
| 67 | 68 | } |
| 69 | + $td1 = "10"; | |
| 70 | + $td2 = "32%"; | |
| 71 | + $td3 = "27%"; | |
| 72 | + $td4 = "27%"; | |
| 73 | + $td5 = "10"; | |
| 68 | 74 | foreach ($paths as $key => $path){ |
| 69 | 75 | ?> |
| 70 | 76 | <tr> |
| 71 | - <td width="10"><div class='<?php echo $path['class']; ?>'></div></td> | |
| 72 | - <td width="22%"><?php echo $path['name']; ?>:</td> | |
| 77 | + <td width="<?php echo $td1; ?>"><div class='<?php echo $path['class']; ?>'></div></td> | |
| 78 | + <td width="<?php echo $td2; ?>"><?php echo $path['name']; ?>:</td> | |
| 73 | 79 | <td width="<?php echo $width; ?>"><?php echo $path['path']; ?></td> |
| 74 | 80 | <?php if($path['class'] != 'tick') { ?> |
| 75 | - <td class="error" width="27%"> <?php echo $path['msg']; ?> </td> | |
| 81 | + <td class="error" width="<?php echo $td3; ?>"> <?php echo $path['msg']; ?> </td> | |
| 76 | 82 | <td width="10"> |
| 77 | 83 | <?php if (AJAX) { ?> |
| 78 | 84 | <a href="#" class="refresh" onclick="w.refresh('configuration')">Refresh</a> |
| ... | ... | @@ -81,8 +87,8 @@ |
| 81 | 87 | <?php } ?> |
| 82 | 88 | </td> |
| 83 | 89 | <?php } else { ?> |
| 84 | - <td class="error" width="27%"> </td> | |
| 85 | - <td width="10"> </td> | |
| 90 | + <td class="error" width="<?php echo $td4; ?>"> </td> | |
| 91 | + <td width="<?php echo $td5; ?>"> </td> | |
| 86 | 92 | <?php } ?> |
| 87 | 93 | </tr> |
| 88 | 94 | <?php |
| ... | ... | @@ -94,4 +100,4 @@ |
| 94 | 100 | <input type="submit" name="Confirm" value="Confirm" class="button_next"/> |
| 95 | 101 | <input type="submit" name="Edit" value="Edit" class="button_next"/> |
| 96 | 102 | </form> |
| 97 | 103 | -<?php if (AJAX) { echo $html->js('form.js'); } ?> |
| 104 | +<?php if (AJAX) { echo $html->js('form.js'); } ?> | |
| 98 | 105 | \ No newline at end of file | ... | ... |
setup/wizard/templates/database.tpl
| ... | ... | @@ -52,9 +52,11 @@ |
| 52 | 52 | <td id="error" class="error"><?php if($errors['dpassword']) echo $errors['dpassword']; ?></td> |
| 53 | 53 | </tr> |
| 54 | 54 | </table> |
| 55 | -<br/><br/> | |
| 56 | - <div id="option3" class="onclick" onclick="javascript:{w.toggleClass('adv_options', 'option3');}"> Advanced Options</div> | |
| 55 | +<br/> | |
| 56 | +<!--<br/>--> | |
| 57 | + <div id="option3" class="onclick advoptions" onclick="javascript:{w.toggleClass('adv_options', 'option3');}"> Advanced Options</div> | |
| 57 | 58 | <div id="database" class="adv_options" style="display:none;"> |
| 59 | + <br/> | |
| 58 | 60 | <div class="description"> |
| 59 | 61 | These options are only necessary for some sites. If you're not sure what you should enter here, leave the default settings. |
| 60 | 62 | </div> | ... | ... |
setup/wizard/templates/dependencies.tpl
| 1 | -<form id="license_dependencies_configuration" action="index.php?step_name=<?php echo $step_name; ?>" method="post"> | |
| 1 | +<!--<form id="license_dependencies_configuration" action="index.php?step_name=<?php //echo $step_name; ?>" method="post">--> | |
| 2 | +<form id="installtype_dependencies_configuration" action="index.php?step_name=<?php echo $step_name; ?>" method="post"> | |
| 2 | 3 | <p class="title">Checking PHP Dependencies</p> |
| 3 | 4 | <p class="description"> |
| 4 | - The wizard will review your system to determine whether you have the right PHP components in place to run KnowledgeTree. <br/> | |
| 5 | - Once the scan is completed, you’ll see whether your system has met the requirements or whether there are areas you need to address. | |
| 5 | + The wizard will review your system to determine whether you have the right PHP components in place to run KnowledgeTree. <!--<br/> --> | |
| 6 | + Once the scan is completed, you’ll see whether your system has met the requirements or whether there are areas you need to address. | |
| 6 | 7 | </p> |
| 7 | 8 | <!--Continue Message--> |
| 8 | 9 | <?php |
| ... | ... | @@ -10,7 +11,8 @@ |
| 10 | 11 | ?> |
| 11 | 12 | <span class='big_ok'> </span> |
| 12 | 13 | <span class='description'>Congratulations! Your system is ready to run KnowledgeTree. Click <b>Next</b> to continue.</span> |
| 13 | - <br/><br/> | |
| 14 | + <br/> | |
| 15 | +<!-- <br/>--> | |
| 14 | 16 | <?php |
| 15 | 17 | } |
| 16 | 18 | ?> |
| ... | ... | @@ -18,19 +20,29 @@ |
| 18 | 20 | <?php if($errors) { ?> |
| 19 | 21 | <span class='cross'> </span> |
| 20 | 22 | <span class='error_message'>Your system is not quite ready to run KnowledgeTree. See the list below to determine which areas you need to address. </span> |
| 21 | - <br/> | |
| 23 | + <!--<br/>--> | |
| 22 | 24 | <?php } elseif ($warnings) { ?> |
| 23 | 25 | <span class='cross_orange'> </span> |
| 24 | - <span class='warning_message'>Not all optional dependencies required by KnowledgeTree have been met but you will be able to continue.</span><br/> | |
| 26 | + <span class='warning_message'>Not all optional dependencies required by KnowledgeTree have been met but you will be able to continue.</span> | |
| 27 | + <!--<br/>--> | |
| 25 | 28 | <?php } ?> |
| 26 | 29 | <?php |
| 27 | 30 | if($errors || $warnings) { |
| 28 | 31 | ?> |
| 29 | - <a href="http://wiki.knowledgetree.com/Web_Based_Installer#PHP_Dependencies" target="_blank" class="description_click">Click here for help on overcoming dependency issues</span></a> | |
| 32 | +<!-- --> | |
| 33 | + <a href="http://wiki.knowledgetree.com/Web_Based_Installer#PHP_Dependencies" target="_blank" class="description_click">Click here for help on overcoming dependency issues</span></a> | |
| 30 | 34 | <?php } ?> |
| 31 | 35 | <!--Content--> |
| 32 | 36 | <div id="step_content_<?php echo $step_name; ?>" class="step"> |
| 33 | - <h3><?php echo "<span class='{$php}'> </span>"; ?>PHP Version Check</h3> | |
| 37 | + <?php | |
| 38 | + $iconFlag = "<span class='{$php}'> </span>"; | |
| 39 | + $checkHeading = "<h3 style='width:30%; float:left'>".$iconFlag."PHP Version Check</h3>"; | |
| 40 | + ?> | |
| 41 | +<!-- <h3>--> | |
| 42 | + <?php | |
| 43 | +// echo "<span class='{$php}'> </span>"; | |
| 44 | + ?> | |
| 45 | +<!-- PHP Version Check</h3>--> | |
| 34 | 46 | <?php if($silent) { ?> |
| 35 | 47 | <?php if($versionSection) { |
| 36 | 48 | $details = 'Hide Details'; |
| ... | ... | @@ -40,25 +52,43 @@ |
| 40 | 52 | $display = 'none'; |
| 41 | 53 | } |
| 42 | 54 | ?> |
| 43 | - <div id="option1" class="onclick" onclick="javascript:{w.toggleClass('php_details', 'option1');}"><?php echo $details; ?></div> | |
| 44 | - <div class="php_details" style="display:<?php echo $display; ?>"> | |
| 55 | + <?php | |
| 56 | + $phpVersionCheck = $checkHeading; | |
| 57 | + $phpVersionCheck .= "<div id='option1' class='onclick' onclick='javascript:{w.toggleClass(\"php_details\", \"option1\");}'>"; | |
| 58 | + $phpVersionCheck .= $details."</div>"; | |
| 59 | + $phpVersionCheck .= "<div class='php_details dependency_details' style='display:".$display.";'>"; | |
| 60 | + ?> | |
| 61 | +<!-- <div id="option1" class="onclick" onclick="javascript:{w.toggleClass('php_details', 'option1');}"> <?php //echo $details; ?></div>--> | |
| 62 | +<!-- <div class="php_details" style="display:<?php //echo $display; ?>">--> | |
| 45 | 63 | <?php } ?> |
| 46 | - <p class="description"> | |
| 64 | + <?php | |
| 65 | + $phpVersionCheck .= "<p class='space'> </p><p class='description'>Your version of PHP must be between 5.0 and 5.2 to run optimally. Versions that are 5.3 or higher are not recommended.</p>"; | |
| 66 | + ?> | |
| 67 | +<!-- <p class="description"> | |
| 47 | 68 | Your version of PHP must be between 5.0 and 5.2 to run optimally. Versions that are 5.3 or higher are not recommended. |
| 48 | - </p> | |
| 49 | - <?php echo "<span class='{$version['class']}'> </span>{$version['version']}"; ?> | |
| 69 | + </p>--> | |
| 70 | + <?php $phpVersionCheck .= "<span class='{$version['class']}'> </span>{$version['version']}"; ?> | |
| 71 | + <?php //echo "<span class='{$version['class']}'> </span>{$version['version']}"; ?> | |
| 50 | 72 | <?php if($version['class'] != 'tick') { ?> |
| 51 | 73 | <?php if (AJAX) { ?> |
| 52 | - <a href="#" class="refresh" onclick="w.refresh('dependencies')">Refresh</a> | |
| 74 | + <?php $phpVersionCheck .= "<a href='#' class='refresh' onclick='w.refresh('dependencies')'>Refresh</a>"; ?> | |
| 75 | +<!-- <a href="#" class="refresh" onclick="w.refresh('dependencies')">Refresh</a>--> | |
| 53 | 76 | <?php } else { ?> |
| 54 | - <a href="javascript:this.location.reload();" class="refresh">Refresh</a> | |
| 77 | + <?php $phpVersionCheck .= "<a href='javascript:this.location.reload();' class='refresh'>Refresh</a>"; ?> | |
| 78 | +<!-- <a href="javascript:this.location.reload();" class="refresh">Refresh</a>--> | |
| 55 | 79 | <?php } ?> |
| 56 | 80 | <?php } ?> |
| 57 | 81 | <?php if($silent) { ?> |
| 58 | - </div> | |
| 82 | + <?php $phpVersionCheck .= "</div>"; ?> | |
| 83 | +<!-- </div>--> | |
| 59 | 84 | <?php } ?> |
| 85 | + <?php echo $phpVersionCheck; ?> | |
| 60 | 86 | <br /> |
| 61 | - <h3><?php echo "<span class='{$php_ext}'> </span>"; ?>PHP Extensions</h3> | |
| 87 | + <?php | |
| 88 | + $iconFlag = "<span class='{$php_ext}'> </span>"; | |
| 89 | + $checkHeading = "<h3 style='width:30%; float:left'>".$iconFlag."PHP Extensions</h3>"; | |
| 90 | + ?> | |
| 91 | +<!-- <h3><?php //echo "<span class='{$php_ext}'> </span>"; ?>PHP Extensions</h3>--> | |
| 62 | 92 | <?php |
| 63 | 93 | if($silent) { ?> |
| 64 | 94 | <?php if($extensionSection) { |
| ... | ... | @@ -69,12 +99,23 @@ |
| 69 | 99 | $display = 'none'; |
| 70 | 100 | } |
| 71 | 101 | ?> |
| 72 | - <div id="option2" class="onclick" onclick="javascript:{w.toggleClass('php_ext_details', 'option2');}"><?php echo $details; ?></div> | |
| 73 | - <div class="php_ext_details" style="display:<?php echo $display; ?>"> | |
| 102 | + <?php | |
| 103 | + $phpExtensionCheck = $checkHeading; | |
| 104 | + $phpExtensionCheck .= "<div id='option2' class='onclick' onclick='javascript:{w.toggleClass(\"php_ext_details\", \"option2\");}'>"; | |
| 105 | + $phpExtensionCheck .= $details."</div>"; | |
| 106 | + $phpExtensionCheck .= "<div class='php_ext_details dependency_details' style='display:".$display.";'>"; | |
| 107 | + ?> | |
| 108 | +<!-- <div id="option2" class="onclick" onclick="javascript:{w.toggleClass('php_ext_details', 'option2');}"><?php //echo $details; ?></div>--> | |
| 109 | +<!-- <div class="php_ext_details" style="display:<?php //echo $display; ?>">--> | |
| 74 | 110 | <?php } ?> |
| 75 | - <p class="description"> | |
| 111 | + <?php | |
| 112 | + $phpExtensionCheck .= "<p class='space'> </p><p class='description'>The extensions shown in red below are required for KnowledgeTree to run optimally. Items shown in orange are optional, but recommended.</p>"; | |
| 113 | + ?> | |
| 114 | +<!-- <p class="description"> | |
| 76 | 115 | The extensions shown in red below are required for KnowledgeTree to run optimally. Items shown in orange are optional, but recommended. |
| 77 | - </p> | |
| 116 | + </p>--> | |
| 117 | + <br/> | |
| 118 | + <?php echo $phpExtensionCheck; ?> | |
| 78 | 119 | <table class="description"> |
| 79 | 120 | <?php |
| 80 | 121 | foreach($extensions as $ext) { |
| ... | ... | @@ -118,7 +159,11 @@ |
| 118 | 159 | </div> |
| 119 | 160 | <?php } ?> |
| 120 | 161 | <br /> |
| 121 | - <h3><?php echo "<span class='{$php_con}'> </span>"; ?>PHP Configuration</h3> | |
| 162 | + <?php | |
| 163 | + $iconFlag = "<span class='{$php_con}'> </span>"; | |
| 164 | + $checkHeading = "<h3 style='width:30%; float:left'>".$iconFlag."PHP Configurations</h3>"; | |
| 165 | + ?> | |
| 166 | +<!-- <h3><?php //echo "<span class='{$php_con}'> </span>"; ?>PHP Configuration</h3>--> | |
| 122 | 167 | <?php |
| 123 | 168 | if($silent) { ?> |
| 124 | 169 | <?php if($configurationSection) { |
| ... | ... | @@ -129,12 +174,25 @@ |
| 129 | 174 | $display = 'none'; |
| 130 | 175 | } |
| 131 | 176 | ?> |
| 132 | - <div id="option3" class="onclick" onclick="javascript:{w.toggleClass('php_con_details', 'option3');}"><?php echo $details; ?></div> | |
| 133 | - <div class="php_con_details" style="display:<?php echo $display; ?>"> | |
| 177 | + <?php | |
| 178 | + $phpDirectivesCheck = $checkHeading; | |
| 179 | + $phpDirectivesCheck .= "<div id='option3' class='onclick' onclick='javascript:{w.toggleClass(\"php_con_details\", \"option3\");}'>"; | |
| 180 | + $phpDirectivesCheck .= $details."</div>"; | |
| 181 | + $phpDirectivesCheck .= "<div class='php_con_details dependency_details' style='display:".$display.";'>"; | |
| 182 | + ?> | |
| 183 | +<!-- <div id="option3" class="onclick" onclick="javascript:{w.toggleClass('php_con_details', 'option3');}"><?php //echo $details; ?></div>--> | |
| 184 | +<!-- <div class="php_con_details" style="display:<?php //echo $display; ?>">--> | |
| 134 | 185 | <?php } ?> |
| 135 | - <p class="description"> | |
| 136 | - The configurations shown in red below are required for KnowledgeTree to run optimally. Items shown in orange are optional, but recommended. | |
| 137 | - </p> | |
| 186 | + <?php | |
| 187 | + //$phpDirectivesCheck .= "<p class='description'>The configurations shown in red below are required for KnowledgeTree to run optimally. Items shown in orange are optional, but recommended.</p>"; | |
| 188 | + //$phpDirectivesCheck .= "Test"; | |
| 189 | + $phpDirectivesCheck .= "<p class='space'> </p><p class='description'>The configurations shown in red below are required for KnowledgeTree to run optimally. Items shown in orange are optional, but recommended.</p>"; | |
| 190 | + ?> | |
| 191 | +<!-- <p class="description">--> | |
| 192 | +<!-- The configurations shown in red below are required for KnowledgeTree to run optimally. Items shown in orange are optional, but recommended.--> | |
| 193 | +<!-- </p>--> | |
| 194 | + <br/> | |
| 195 | + <?php echo $phpDirectivesCheck; ?> | |
| 138 | 196 | <table class="description"> |
| 139 | 197 | <tr> |
| 140 | 198 | <th>Setting</th> | ... | ... |
setup/wizard/templates/install.tpl
| 1 | 1 | <form id="registration_install_complete" action="index.php?step_name=<?php echo $step_name; ?>" method="post"> |
| 2 | 2 | <p class="title">Finalizing System Installation</p> |
| 3 | 3 | <div id="step_content_<?php echo $step_name; ?>" class="step"> |
| 4 | - <p class="empty_space"> The wizard will now complete the installation and run a final check on your system. </p> | |
| 5 | - <br/> | |
| 6 | - <p class="empty_space" id="left_space"> | |
| 7 | - We would greatly appreciate it if you would allow us to collect anonymous usage statistics to help us provide a better quality product. | |
| 8 | - <br/><br/> | |
| 4 | + <p class="empty_space" style="font-size:11pt;"> The wizard will now complete the installation and run a final check on your system. </p> | |
| 5 | +<!-- <br/>--> | |
| 6 | + <p class="empty_space" style="font-size:11pt;" id="left_space"> | |
| 7 | + We would greatly appreciate it if you would allow us to collect anonymous usage statistics to help us provide a better quality product. | |
| 8 | + <br/> | |
| 9 | + <br/> | |
| 9 | 10 | The information includes a unique identification number, number of users you have created, your operating system type and your IP address. Your privacy is protected by the <a href="http://www.knowledgetree.com/about/legal" target="_blank">KnowledgeTree Privacy and Data Protection Agreements.</a> |
| 10 | 11 | </p> |
| 11 | 12 | <div class="demo"><?php echo $html->image('greenit.jpg', array('style'=>'padding-left: 35px;')); ?></div> |
| 12 | - <br/><br/><br/><br/> | |
| 13 | +<!-- <br/><br/><br/><br/>--> | |
| 13 | 14 | <p> <input type='checkbox' name='call_home' value='enable' checked style="float:left;"/> |
| 14 | 15 | <label for='call_home'>Help to improve KnowledgeTree by providing anonymous usage statistics</label></p> |
| 15 | 16 | </div> | ... | ... |
setup/wizard/templates/installtype.tpl
| 1 | -<form id="registration_install_complete" action="index.php?step_name=<?php echo $step_name; ?>" method="post"> | |
| 1 | +<form id="license_installtype_dependencies" action="index.php?step_name=<?php echo $step_name; ?>" method="post"> | |
| 2 | 2 | <p class="title">Installation Type</p> |
| 3 | 3 | |
| 4 | 4 | <div id="step_content" class="step"> |
| ... | ... | @@ -9,11 +9,11 @@ |
| 9 | 9 | <td> <input type="radio" name="installtype" value="Clean Install" checked id="clean" /> </td> |
| 10 | 10 | <td> <label for="clean"><b>Default Install</b> <br/>Install a new copy of KnowledgeTree</label> </td> |
| 11 | 11 | </tr> |
| 12 | -<!-- <tr> | |
| 12 | + <tr> | |
| 13 | 13 | <td> <input type="radio" name="installtype" value="Upgrade Installation" id="migrate" /> </td> |
| 14 | 14 | <td> <label for="migrate"><b>Upgrade - KnowledgeTree Stack</b> <br/> Upgrade from a previous version of the KnowledgeTree Stack</label></td> |
| 15 | 15 | </tr> |
| 16 | - <tr> | |
| 16 | +<!-- <tr> | |
| 17 | 17 | <td> <input type="radio" name="installtype" value="Upgrade Only" id="upgrade" /> </td> |
| 18 | 18 | <td> <label for="upgrade"><b>Upgrade - Source Only</b> <br/> Upgrade from a Source Only Installation of KnowledgeTree</label></td> |
| 19 | 19 | </tr>--> |
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 | </form> |
| 25 | 25 | <script type="text/javascript"> |
| 26 | 26 | function clear() { |
| 27 | - | |
| 27 | + | |
| 28 | 28 | } |
| 29 | 29 | </script> |
| 30 | 30 | <?php if (AJAX) { echo $html->js('form.js'); } ?> |
| 31 | 31 | \ No newline at end of file | ... | ... |
setup/wizard/templates/license.tpl
| 1 | -<form id="welcome_license_dependencies" action="index.php?step_name=license" method="POST"> | |
| 1 | +<form id="welcome_license_installtype" action="index.php?step_name=license" method="POST"> | |
| 2 | 2 | <p class="title">License Agreement</p> |
| 3 | 3 | <?php if(isset($errors)) { |
| 4 | 4 | foreach($errors as $k=>$e) { |
| 5 | 5 | echo "<span class='error'>".$e."</span>"; |
| 6 | 6 | } |
| 7 | + //print_r($errors); | |
| 7 | 8 | }?> |
| 8 | 9 | <p class="description"> |
| 9 | 10 | Please read and accept the license agreement below before continuing with the setup. |
| 10 | 11 | </p> |
| 11 | 12 | |
| 12 | -<?php if(isset($errors)) { ?> | |
| 13 | +<?php if(!empty($errors)) { ?> | |
| 13 | 14 | <div class="license_agreement" tabindex="-1" style="height:270px;"> |
| 14 | 15 | <?php } else { ?> |
| 15 | 16 | <div class="license_agreement" tabindex="-1"> | ... | ... |
setup/wizard/templates/registration.tpl
| ... | ... | @@ -9,8 +9,12 @@ |
| 9 | 9 | //echo $sel_country; |
| 10 | 10 | ?> |
| 11 | 11 | <p class="description"> |
| 12 | - Register with KnowledgeTree to receive important product updates. | |
| 13 | - <a href="index.php?step_name=install">Skip Registration</a> | |
| 12 | + Register your KnowledgeTree installation and receive the KnowledgeTree Drop Box for Windows software, a drag and drop tool that makes placing documents into KnowledgeTree even easier. | |
| 13 | + <?php if(AJAX) { ?> | |
| 14 | + <a href='#' onclick='javascript:{w.getUrl("index.php?step_name=install", "content_container");}'>Skip Registration</a> | |
| 15 | + <?php } else { ?> | |
| 16 | + <a href="index.php?step_name=install">Skip Registration</a> | |
| 17 | + <?php } ?> | |
| 14 | 18 | </p> |
| 15 | 19 | <!-- Hidden Fields --> |
| 16 | 20 | <input type="hidden" id="sendAll" name="" value="" /> |
| ... | ... | @@ -22,16 +26,17 @@ |
| 22 | 26 | <br/> |
| 23 | 27 | <div id="step_content_<?php echo $step_name; ?>" class="step"> |
| 24 | 28 | <span class="error" id="reg_error"></span> |
| 25 | - <?php if(WINDOWS_OS) $input_width = 40; else { $input_width = 32; } ?> | |
| 26 | - <table> | |
| 29 | + <?php $rowspan = "6";?> | |
| 30 | + <?php if(WINDOWS_OS) $input_width = 40; else { $input_width = 28; } ?> | |
| 31 | + <table class="registration_template"> | |
| 27 | 32 | <tr> |
| 28 | 33 | <td><label for='first'>First Name</label></td> |
| 29 | - <td rowspan='6' width='5%'> </td> | |
| 34 | + <td rowspan='<?php echo $rowspan; ?>' width='5%'> </td> | |
| 30 | 35 | <td><input value="<?php echo $first_name; ?>" name='submitted[first_name]' id='first' size='<?php echo $input_width; ?>' style="float:left;"/></td> |
| 31 | - <td rowspan='6' width='5%'> </td> | |
| 32 | - <td rowspan='6'> <?php echo $html->image('dropbox.png'); ?> </td> | |
| 36 | + <td rowspan='<?php echo $rowspan; ?>' width='5%'> </td> | |
| 37 | + <td rowspan='<?php echo $rowspan; ?>'> <?php echo $html->image('dropbox.png'); ?> </td> | |
| 33 | 38 | </tr> |
| 34 | - | |
| 39 | + | |
| 35 | 40 | <tr> |
| 36 | 41 | <td><label for='last'>Last Name</label></td> |
| 37 | 42 | <td><input value="<?php echo $last_name; ?>" name='submitted[last_name]' id='last' size='<?php echo $input_width; ?>' style="float:left;"/></td> |
| ... | ... | @@ -43,7 +48,7 @@ |
| 43 | 48 | <tr> |
| 44 | 49 | <td><label for='country'>Country</label></td> |
| 45 | 50 | <td> |
| 46 | - <select id='country' name='submitted[country]'> | |
| 51 | + <select id='country' class="registration_select" name='submitted[country]'> | |
| 47 | 52 | <?php |
| 48 | 53 | $str = ''; |
| 49 | 54 | foreach ($countries as $code => $country) { |
| ... | ... | @@ -52,9 +57,9 @@ |
| 52 | 57 | } else { |
| 53 | 58 | $str .= "<option name='{$code}' value='{$country}'>{$country}</option>"; |
| 54 | 59 | } |
| 55 | - | |
| 60 | + | |
| 56 | 61 | } |
| 57 | - | |
| 62 | + | |
| 58 | 63 | echo $str; |
| 59 | 64 | ?> |
| 60 | 65 | </select> |
| ... | ... | @@ -63,7 +68,7 @@ |
| 63 | 68 | <tr> |
| 64 | 69 | <td><label for='industry'>Industry</label></td> |
| 65 | 70 | <td> |
| 66 | - <select id='industry' name='submitted[industry]'> | |
| 71 | + <select id='industry' name='submitted[industry]' class="registration_select"> | |
| 67 | 72 | <?php |
| 68 | 73 | $str = ''; |
| 69 | 74 | foreach ($industries as $code => $industry) { |
| ... | ... | @@ -73,7 +78,7 @@ |
| 73 | 78 | $str .= "<option name='{$code}' value='{$industry}'>{$industry}</option>"; |
| 74 | 79 | } |
| 75 | 80 | } |
| 76 | - | |
| 81 | + | |
| 77 | 82 | echo $str; |
| 78 | 83 | ?> |
| 79 | 84 | </select> |
| ... | ... | @@ -82,7 +87,7 @@ |
| 82 | 87 | <tr> |
| 83 | 88 | <td><label for='size'>Organization Size</label></td> |
| 84 | 89 | <td> |
| 85 | - <select id='size' name='submitted[organization_size]'> | |
| 90 | + <select id='size' name='submitted[organization_size]' class="registration_select"> | |
| 86 | 91 | <?php |
| 87 | 92 | $str = ''; |
| 88 | 93 | foreach ($org_size as $code => $size) { |
| ... | ... | @@ -92,18 +97,18 @@ |
| 92 | 97 | $str .= "<option name='{$code}' value='{$size}'>{$size}</option>"; |
| 93 | 98 | } |
| 94 | 99 | } |
| 95 | - | |
| 100 | + | |
| 96 | 101 | echo $str; |
| 97 | 102 | ?> |
| 98 | 103 | </select> |
| 99 | 104 | </td> |
| 100 | 105 | </tr> |
| 101 | 106 | </table> |
| 102 | - | |
| 107 | + | |
| 103 | 108 | <input type='hidden' name='form_id' value='webform_client_form_242' /> |
| 104 | 109 | <input type='hidden' name='op' value='Submit' /> |
| 105 | 110 | </div> |
| 106 | - | |
| 111 | + | |
| 107 | 112 | <input type="submit" name="Previous" value="Previous" onclick="w.pClick()" class="button_previous"/> |
| 108 | 113 | <input type="submit" name="Next" value="Register" onclick="w.nClick()" class="button_next"/> |
| 109 | 114 | </form> | ... | ... |
setup/wizard/templates/services.tpl
| ... | ... | @@ -5,9 +5,9 @@ |
| 5 | 5 | <?php } ?> |
| 6 | 6 | |
| 7 | 7 | <p class="title">Checking Service Dependencies</p> |
| 8 | - | |
| 8 | + | |
| 9 | 9 | <p class="description"> |
| 10 | - The wizard will review your system to determine whether you can run KnowledgeTree background services. <br/>Once the scan is completed, you’ll see whether your system has met the requirements or whether there are areas you need to address. | |
| 10 | + The wizard will review your system to determine whether you can run KnowledgeTree background services. <br/>Once the scan is completed, you’ll see whether your system has met the requirements or whether there are areas you need to address. | |
| 11 | 11 | </p> |
| 12 | 12 | <!--Continue Message--> |
| 13 | 13 | <?php if($servicesValidation) { ?> |
| ... | ... | @@ -39,7 +39,7 @@ |
| 39 | 39 | <?php } ?> |
| 40 | 40 | <?php } ?> |
| 41 | 41 | <!--Content--> |
| 42 | - <div id="step_content_configuration" class="step"> | |
| 42 | + <div id="step_content_<?php echo $step_name; ?>" class="step"> | |
| 43 | 43 | <?php if(!$alreadyInstalled) { ?> |
| 44 | 44 | <?php if($servicesValidation) { ?> |
| 45 | 45 | <?php if($javaExeError) { ?> |
| ... | ... | @@ -93,7 +93,7 @@ |
| 93 | 93 | <tr> |
| 94 | 94 | <td> <span class='<?php echo $step_vars['java']['class']; ?>'> </span> </td> |
| 95 | 95 | <td style="width:645px;"> <?php echo $step_vars['java']['found']; ?> </td> |
| 96 | - <?php | |
| 96 | + <?php | |
| 97 | 97 | if ($step_vars['java']['class'] != 'tick') { |
| 98 | 98 | ?> |
| 99 | 99 | <td> |
| ... | ... | @@ -122,7 +122,7 @@ |
| 122 | 122 | </td> |
| 123 | 123 | <?php |
| 124 | 124 | } |
| 125 | - ?> | |
| 125 | + ?> | |
| 126 | 126 | </tr> |
| 127 | 127 | </table> |
| 128 | 128 | <?php if($silent) { ?> | ... | ... |
setup/wizard/templates/sidemenu.tpl
| 1 | 1 | <?php |
| 2 | + $passCurrent = false; | |
| 2 | 3 | foreach ($sideMenuElements as $ele) { |
| 3 | 4 | ?> |
| 4 | 5 | <span id="<?php echo $ele['step']; ?>" class="<?php echo $ele['class']; ?>"> |
| 5 | 6 | <?php if ($ele['class'] == "current") { ?> |
| 6 | 7 | <?php echo $ele['name']; ?> |
| 8 | + <?php $passCurrent = true; ?> | |
| 9 | + <?php //echo 'cur'; ?> | |
| 7 | 10 | <?php } else { ?> |
| 8 | 11 | <?php if ($ajax) { ?> |
| 12 | + <?php if(!$passCurrent) { ?> | |
| 9 | 13 | <a tabindex="-1" href='#' onclick='javascript:{w.getUrl("index.php?step_name=<?php echo $ele['step']; ?>", "content_container");}'> |
| 14 | + <?php } ?> | |
| 10 | 15 | <?php echo $ele['name']; ?> |
| 16 | + <?php echo ''; ?> | |
| 11 | 17 | </a> |
| 12 | 18 | <?php } else { ?> |
| 13 | 19 | <?php if($ele['class'] == 'inactive') { ?> |
| 14 | 20 | <?php echo $ele['name']; ?> |
| 21 | + <?php echo ''; ?> | |
| 15 | 22 | <?php } else { ?> |
| 16 | 23 | <a tabindex="-1" href="index.php?step_name=<?php echo $ele['step'];?>"> |
| 17 | 24 | <?php echo $ele['name']; ?> |
| 25 | + <?php echo ''; ?> | |
| 18 | 26 | </a> |
| 19 | 27 | <?php } ?> |
| 20 | 28 | <?php } ?> | ... | ... |
setup/wizard/templates/wizard.tpl
| ... | ... | @@ -32,11 +32,17 @@ |
| 32 | 32 | <?php echo $content; ?> |
| 33 | 33 | </div> |
| 34 | 34 | </div> |
| 35 | - <div id="loading" style="display:none;"> <?php echo $html->image('loading.gif', array("height"=>"32px", "width"=>"32px")); ?> </div> | |
| 35 | + <div id="loading" style="display:none;"> | |
| 36 | + <?php | |
| 37 | + $options = array("height"=>"32px", "width"=>"32px"); | |
| 38 | + $options = array(); | |
| 39 | + echo $html->image('loader.gif', $options); | |
| 40 | + ?> | |
| 41 | + </div> | |
| 36 | 42 | </div> |
| 37 | 43 | <div class="clearing"> </div> |
| 38 | 44 | </div> |
| 39 | - | |
| 45 | + | |
| 40 | 46 | <div id="footer"> |
| 41 | 47 | <?php echo $html->image('dame/powered-by-kt.png', array("height"=>"23px", "width"=>"105px", "style"=>"padding: 5px;")); ?> |
| 42 | 48 | </div> | ... | ... |
webservice/clienttools/ajaxhandler.php
| ... | ... | @@ -185,11 +185,9 @@ class ajaxHandler{ |
| 185 | 185 | $this->auth['session']=session_id(); |
| 186 | 186 | $this->ret->setStatus('session_id',session_id()); |
| 187 | 187 | $this->ret->addDebug('Auth',array('Session Check'=>$valid)); |
| 188 | -// echo $valid?'true':'false'.'<br /><br /><br /><br /><br /><br /><br />'; | |
| 189 | 188 | return $valid; |
| 190 | 189 | } |
| 191 | 190 | |
| 192 | - //TODO: Alter this to verify whether token was used before or whether it is new | |
| 193 | 191 | protected function checkTokenValidity(){ |
| 194 | 192 | if($this->parameters['permanentURL'])return true; |
| 195 | 193 | $token=$this->auth['token']; |
| ... | ... | @@ -395,6 +393,7 @@ class ajaxHandler{ |
| 395 | 393 | } |
| 396 | 394 | } |
| 397 | 395 | |
| 396 | + //TODO: Remove this function - deprecated | |
| 398 | 397 | protected function verifyToken(){ |
| 399 | 398 | $token=isset($this->auth['token'])?$this->auth['token']:NULL; |
| 400 | 399 | if(!$token){ |
| ... | ... | @@ -422,14 +421,17 @@ class ajaxHandler{ |
| 422 | 421 | return $dir; |
| 423 | 422 | } |
| 424 | 423 | |
| 424 | + //TODO: Remove this function - deprecated | |
| 425 | 425 | protected function verifySession(){ |
| 426 | 426 | return $this->authenticator->pickup_session(); |
| 427 | 427 | } |
| 428 | 428 | |
| 429 | + //TODO: Remove this function - deprecated | |
| 429 | 430 | protected function isAuthenticated(){ |
| 430 | 431 | return $this->authenticator->pickup_session(); |
| 431 | 432 | } |
| 432 | 433 | |
| 434 | + //TODO: Remove this function - deprecated | |
| 433 | 435 | protected function doLogin(){ |
| 434 | 436 | if($this->authenticator->login()){ |
| 435 | 437 | return true; | ... | ... |
webservice/clienttools/services/0.2/kt.php
| ... | ... | @@ -972,19 +972,37 @@ class kt extends client_service { |
| 972 | 972 | // } |
| 973 | 973 | // } |
| 974 | 974 | |
| 975 | + /** | |
| 976 | + | |
| 977 | +Fatal error: Cannot unset string offsets in on line 981 | |
| 978 | + */ | |
| 979 | + | |
| 980 | +// foreach($meta as $item){ | |
| 981 | +// $isSpecial=substr($item['name'],0,2)=='__'; | |
| 982 | +// if($isSpecial){ | |
| 983 | +// $special[$item['name']]=$item['value']; | |
| 984 | +// }else{ | |
| 985 | +// $fieldSet=$item['fieldset']; | |
| 986 | +// unset($item['fieldset']); | |
| 987 | +// $metadata[$fieldSet]['fieldset']=$fieldSet; | |
| 988 | +// $metadata[$fieldSet]['fields'][]=$item; | |
| 989 | +// } | |
| 990 | +// } | |
| 991 | + | |
| 992 | + $metadata=array(); | |
| 993 | + $special=array(); | |
| 994 | + | |
| 975 | 995 | foreach($meta as $item){ |
| 976 | - $isSpecial=substr($item['name'],0,2)=='__'; | |
| 977 | - if($isSpecial){ | |
| 996 | + if(substr($item['name'],0,2)=='__'){ | |
| 978 | 997 | $special[$item['name']]=$item['value']; |
| 979 | 998 | }else{ |
| 980 | - $fieldSet=$item['fieldset']; | |
| 981 | - unset($item['fieldset']); | |
| 982 | - $metadata[$fieldSet]['fieldset']=$fieldSet; | |
| 983 | - $metadata[$fieldSet]['fields'][]=$item; | |
| 984 | - } | |
| 999 | + $metadata[$item['fieldset']]['fieldset']=$item['fieldset']; | |
| 1000 | + $metadata[$item['fieldset']]['fields'][]=array('name'=>$item['name'],'value'=>$item['value']); | |
| 1001 | + } | |
| 985 | 1002 | } |
| 986 | 1003 | |
| 987 | 1004 | |
| 1005 | + | |
| 988 | 1006 | $this->addDebug('after processing',array('metadata'=>$metadata,'special'=>$special)); |
| 989 | 1007 | |
| 990 | 1008 | $document_id=$arr['document_id']; | ... | ... |