Changeset 757 for branches/Ver3.0/xpressme_integration_kit/admin/index.php
- Timestamp:
- May 23, 2011, 3:03:57 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Ver3.0/xpressme_integration_kit/admin/index.php
r749 r757 319 319 320 320 321 function xpress_config_report_view()322 {323 require_once dirname(dirname( __FILE__ )).'/class/config_from_xoops.class.php' ;324 $xoops_config = new ConfigFromXoops;325 echo 'XOOPS_ROOT_PATH: ' ;326 if(XOOPS_ROOT_PATH !== $xoops_config->xoops_root_path)327 echo 'ERROR ';328 else329 echo 'OK ';330 echo "<br />\n";331 332 echo 'XOOPS_TRUST_PATH: ' ;333 if(XOOPS_TRUST_PATH !== $xoops_config->xoops_trust_path)334 echo 'ERROR ';335 else336 echo 'OK ';337 echo "<br />\n";338 339 echo 'XOOPS_URL: ' ;340 if(XOOPS_URL !== $xoops_config->xoops_url)341 echo 'ERROR ';342 else343 echo 'OK ';344 echo "<br />\n";345 346 if (defined('XOOPS_SALT')){347 echo 'XOOPS_SALT: ' ;348 if(XOOPS_SALT !== $xoops_config->xoops_salt)349 echo 'ERROR ';350 else351 echo 'OK ';352 echo "<br />\n";353 }354 355 if (defined('XOOPS_DB_SALT')){356 echo 'XOOPS_DB_SALT: ' ;357 if(XOOPS_DB_SALT !== $xoops_config->xoops_db_salt)358 echo 'ERROR ';359 else360 echo 'OK ';361 echo "<br />\n";362 }363 364 echo 'XOOPS_DB_HOST: ' ;365 if(XOOPS_DB_HOST !== $xoops_config->xoops_db_host)366 echo 'ERROR ';367 else368 echo 'OK ';369 echo "<br />\n";370 371 echo 'XOOPS_DB_USER: ' ;372 if(XOOPS_DB_USER !== $xoops_config->xoops_db_user)373 echo 'ERROR ';374 else375 echo 'OK ';376 echo "<br />\n";377 378 echo 'XOOPS_DB_PASS: ' ;379 if(XOOPS_DB_PASS !== $xoops_config->xoops_db_pass)380 echo 'ERROR ';381 else382 echo 'OK ';383 echo "<br />\n";384 385 echo 'XOOPS_DB_NAME: ' ;386 if(XOOPS_DB_NAME !== $xoops_config->xoops_db_name)387 echo 'ERROR ';388 else389 echo 'OK ';390 echo "<br />\n";391 392 echo 'XOOPS_DB_PREFIX: ' ;393 if(XOOPS_DB_PREFIX !== $xoops_config->xoops_db_prefix)394 echo 'ERROR ';395 else396 echo 'OK ';397 echo "<br />\n";398 }399 400 function xpress_config_nomal_view()401 {402 require_once dirname(dirname( __FILE__ )).'/class/config_from_xoops.class.php' ;403 $xoops_config = new ConfigFromXoops;404 405 echo '<table width="400" cellspacing="1" cellpadding="1" border="1">';406 echo '<tbody>';407 echo '<tr>';408 echo '<td>Define item</td>';409 echo '<td>XOOPS setting value</td>';410 echo '<td>xoops_config get value</td>';411 echo '</tr>';412 echo '<tr>';413 if(XOOPS_ROOT_PATH !== $xoops_config->xoops_root_path)414 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_ROOT_PATH</span></strong></td>';415 else416 echo '<td>XOOPS_ROOT_PATH</td>';417 echo '<td>' . XOOPS_ROOT_PATH . '</td>';418 echo '<td>' . $xoops_config->xoops_root_path . '</td>';419 echo '</tr>';420 421 echo '<tr>';422 if(XOOPS_TRUST_PATH !== $xoops_config->xoops_trust_path)423 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_TRUST_PATH</span></strong></td>';424 else425 echo '<td>XOOPS_TRUST_PATH</td>';426 echo '<td>' . XOOPS_TRUST_PATH . '</td>';427 echo '<td>' . $xoops_config->xoops_trust_path . '</td>';428 echo '</tr>';429 430 echo '<tr>';431 if(XOOPS_URL !== $xoops_config->xoops_url)432 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_URL</span></strong></td>';433 else434 echo '<td>XOOPS_URL</td>';435 echo '<td>' . XOOPS_URL . '</td>';436 echo '<td>' . $xoops_config->xoops_url . '</td>';437 echo '</tr>';438 439 if (defined('XOOPS_SALT')){440 echo '<tr>';441 if(XOOPS_SALT !== $xoops_config->xoops_salt)442 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_SALT</span></strong></td>';443 else444 echo '<td>XOOPS_SALT</td>';445 echo '<td>' . XOOPS_SALT . '</td>';446 echo '<td>' . $xoops_config->xoops_salt . '</td>';447 echo '</tr>';448 }449 450 if (defined('XOOPS_DB_SALT')){451 echo '<tr>';452 if(XOOPS_DB_SALT !== $xoops_config->xoops_db_salt)453 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_SALT</span></strong></td>';454 else455 echo '<td>XOOPS_DB_SALT</td>';456 echo '<td>' . XOOPS_DB_SALT . '</td>';457 echo '<td>' . $xoops_config->xoops_db_salt . '</td>';458 echo '</tr>';459 }460 461 echo '<tr>';462 if(XOOPS_DB_HOST !== $xoops_config->xoops_db_host)463 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_HOST</span></strong></td>';464 else465 echo '<td>XOOPS_DB_HOST</td>';466 echo '<td>' . XOOPS_DB_HOST . '</td>';467 echo '<td>' . $xoops_config->xoops_db_host . '</td>';468 echo '</tr>';469 470 echo '<tr>';471 if(XOOPS_DB_USER !== $xoops_config->xoops_db_user)472 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_USER</span></strong></td>';473 else474 echo '<td>XOOPS_DB_USER</td>';475 echo '<td>' . XOOPS_DB_USER . '</td>';476 echo '<td>' . $xoops_config->xoops_db_user . '</td>';477 echo '</tr>';478 479 echo '<tr>';480 if(XOOPS_DB_PASS !== $xoops_config->xoops_db_pass)481 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_PASS</span></strong></td>';482 else483 echo '<td>XOOPS_DB_PASS</td>';484 echo '<td>' . XOOPS_DB_PASS . '</td>';485 echo '<td>' . $xoops_config->xoops_db_pass . '</td>';486 echo '</tr>';487 488 echo '<tr>';489 if(XOOPS_DB_NAME !== $xoops_config->xoops_db_name)490 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_NAME</span></strong></td>';491 else492 echo '<td>XOOPS_DB_NAME</td>';493 echo '<td>' . XOOPS_DB_NAME . '</td>';494 echo '<td>' . $xoops_config->xoops_db_name . '</td>';495 echo '</tr>';496 497 echo '<tr>';498 if(XOOPS_DB_PREFIX !== $xoops_config->xoops_db_prefix)499 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_PREFIX</span></strong></td>';500 else501 echo '<td>XOOPS_DB_PREFIX</td>';502 echo '<td>' . XOOPS_DB_PREFIX . '</td>';503 echo '<td>' . $xoops_config->xoops_db_prefix . '</td>';504 echo '</tr>';505 echo '</tbody>';506 echo '</table>';507 }508 function xpress_config_from_xoops_view($is_report = false)509 {510 global $xoopsUserIsAdmin,$xoopsUser;511 512 $user_groups = $xoopsUser->getGroups();513 $is_admin_group = in_array('1',$user_groups);514 515 require_once dirname(dirname( __FILE__ )).'/class/config_from_xoops.class.php' ;516 $xoops_config = new ConfigFromXoops;517 if ($is_report) {518 echo "******** " . _AM_XP2_XOOPS_CONFIG_INFO . "********" . "<br />\n";519 xpress_config_report_view();520 echo "<br />\n";521 } else {522 echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XP2_XOOPS_CONFIG_INFO . "</legend>";523 echo "<div style='padding: 8px;'>";524 if ($xoopsUserIsAdmin && $is_admin_group){525 xpress_config_nomal_view();526 } else {527 xpress_config_report_view();528 }529 echo "</div>";530 echo '</legend>';531 echo "</fieldset><br />";532 }533 }534 321 535 322 function xpress_state($is_report = false) … … 818 605 if (!empty($_POST['submit_report'])) $report = true; else $report = false; 819 606 xpress_sys_info($report); 820 xpress_config_from_xoops_view($report);821 607 xpress_active_plugin_list($report); 822 608 xpress_block_state($report);
Note: See TracChangeset
for help on using the changeset viewer.