- Timestamp:
- Feb 3, 2010, 9:51:01 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/admin/index.php
r491 r507 315 315 } 316 316 317 318 function xpress_config_report_view() 319 { 320 require_once dirname(dirname( __FILE__ )).'/class/config_from_xoops.class.php' ; 321 $xoops_config = new ConfigFromXoops; 322 echo 'XOOPS_ROOT_PATH: ' ; 323 if(XOOPS_ROOT_PATH !== $xoops_config->xoops_root_path) 324 echo 'ERROR '; 325 else 326 echo 'OK '; 327 echo "<br />\n"; 328 329 echo 'XOOPS_TRUST_PATH: ' ; 330 if(XOOPS_TRUST_PATH !== $xoops_config->xoops_trust_path) 331 echo 'ERROR '; 332 else 333 echo 'OK '; 334 echo "<br />\n"; 335 336 echo 'XOOPS_URL: ' ; 337 if(XOOPS_URL !== $xoops_config->xoops_url) 338 echo 'ERROR '; 339 else 340 echo 'OK '; 341 echo "<br />\n"; 342 343 if (defined('XOOPS_SALT')){ 344 echo 'XOOPS_SALT: ' ; 345 if(XOOPS_SALT !== $xoops_config->xoops_salt) 346 echo 'ERROR '; 347 else 348 echo 'OK '; 349 echo "<br />\n"; 350 } 351 352 if (defined('XOOPS_DB_SALT')){ 353 echo 'XOOPS_DB_SALT: ' ; 354 if(XOOPS_DB_SALT !== $xoops_config->xoops_db_salt) 355 echo 'ERROR '; 356 else 357 echo 'OK '; 358 echo "<br />\n"; 359 } 360 361 echo 'XOOPS_DB_HOST: ' ; 362 if(XOOPS_DB_HOST !== $xoops_config->xoops_db_host) 363 echo 'ERROR '; 364 else 365 echo 'OK '; 366 echo "<br />\n"; 367 368 echo 'XOOPS_DB_USER: ' ; 369 if(XOOPS_DB_USER !== $xoops_config->xoops_db_user) 370 echo 'ERROR '; 371 else 372 echo 'OK '; 373 echo "<br />\n"; 374 375 echo 'XOOPS_DB_PASS: ' ; 376 if(XOOPS_DB_PASS !== $xoops_config->xoops_db_pass) 377 echo 'ERROR '; 378 else 379 echo 'OK '; 380 echo "<br />\n"; 381 382 echo 'XOOPS_DB_NAME: ' ; 383 if(XOOPS_DB_NAME !== $xoops_config->xoops_db_name) 384 echo 'ERROR '; 385 else 386 echo 'OK '; 387 echo "<br />\n"; 388 389 echo 'XOOPS_DB_PREFIX: ' ; 390 if(XOOPS_DB_PREFIX !== $xoops_config->xoops_db_prefix) 391 echo 'ERROR '; 392 else 393 echo 'OK '; 394 echo "<br />\n"; 395 } 396 397 function xpress_config_nomal_view() 398 { 399 require_once dirname(dirname( __FILE__ )).'/class/config_from_xoops.class.php' ; 400 $xoops_config = new ConfigFromXoops; 401 402 echo '<table width="400" cellspacing="1" cellpadding="1" border="1">'; 403 echo '<tbody>'; 404 echo '<tr>'; 405 echo '<td>Define item</td>'; 406 echo '<td>XOOPS setting value</td>'; 407 echo '<td>xoops_config get value</td>'; 408 echo '</tr>'; 409 echo '<tr>'; 410 if(XOOPS_ROOT_PATH !== $xoops_config->xoops_root_path) 411 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_ROOT_PATH</span></strong></td>'; 412 else 413 echo '<td>XOOPS_ROOT_PATH</td>'; 414 echo '<td>' . XOOPS_ROOT_PATH . '</td>'; 415 echo '<td>' . $xoops_config->xoops_root_path . '</td>'; 416 echo '</tr>'; 417 418 echo '<tr>'; 419 if(XOOPS_TRUST_PATH !== $xoops_config->xoops_trust_path) 420 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_TRUST_PATH</span></strong></td>'; 421 else 422 echo '<td>XOOPS_TRUST_PATH</td>'; 423 echo '<td>' . XOOPS_TRUST_PATH . '</td>'; 424 echo '<td>' . $xoops_config->xoops_trust_path . '</td>'; 425 echo '</tr>'; 426 427 echo '<tr>'; 428 if(XOOPS_URL !== $xoops_config->xoops_url) 429 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_URL</span></strong></td>'; 430 else 431 echo '<td>XOOPS_URL</td>'; 432 echo '<td>' . XOOPS_URL . '</td>'; 433 echo '<td>' . $xoops_config->xoops_url . '</td>'; 434 echo '</tr>'; 435 436 if (defined('XOOPS_SALT')){ 437 echo '<tr>'; 438 if(XOOPS_SALT !== $xoops_config->xoops_salt) 439 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_SALT</span></strong></td>'; 440 else 441 echo '<td>XOOPS_SALT</td>'; 442 echo '<td>' . XOOPS_SALT . '</td>'; 443 echo '<td>' . $xoops_config->xoops_salt . '</td>'; 444 echo '</tr>'; 445 } 446 447 if (defined('XOOPS_DB_SALT')){ 448 echo '<tr>'; 449 if(XOOPS_DB_SALT !== $xoops_config->xoops_db_salt) 450 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_SALT</span></strong></td>'; 451 else 452 echo '<td>XOOPS_DB_SALT</td>'; 453 echo '<td>' . XOOPS_DB_SALT . '</td>'; 454 echo '<td>' . $xoops_config->xoops_db_salt . '</td>'; 455 echo '</tr>'; 456 } 457 458 echo '<tr>'; 459 if(XOOPS_DB_HOST !== $xoops_config->xoops_db_host) 460 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_HOST</span></strong></td>'; 461 else 462 echo '<td>XOOPS_DB_HOST</td>'; 463 echo '<td>' . XOOPS_DB_HOST . '</td>'; 464 echo '<td>' . $xoops_config->xoops_db_host . '</td>'; 465 echo '</tr>'; 466 467 echo '<tr>'; 468 if(XOOPS_DB_USER !== $xoops_config->xoops_db_user) 469 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_USER</span></strong></td>'; 470 else 471 echo '<td>XOOPS_DB_USER</td>'; 472 echo '<td>' . XOOPS_DB_USER . '</td>'; 473 echo '<td>' . $xoops_config->xoops_db_user . '</td>'; 474 echo '</tr>'; 475 476 echo '<tr>'; 477 if(XOOPS_DB_PASS !== $xoops_config->xoops_db_pass) 478 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_PASS</span></strong></td>'; 479 else 480 echo '<td>XOOPS_DB_PASS</td>'; 481 echo '<td>' . XOOPS_DB_PASS . '</td>'; 482 echo '<td>' . $xoops_config->xoops_db_pass . '</td>'; 483 echo '</tr>'; 484 485 echo '<tr>'; 486 if(XOOPS_DB_NAME !== $xoops_config->xoops_db_name) 487 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_NAME</span></strong></td>'; 488 else 489 echo '<td>XOOPS_DB_NAME</td>'; 490 echo '<td>' . XOOPS_DB_NAME . '</td>'; 491 echo '<td>' . $xoops_config->xoops_db_name . '</td>'; 492 echo '</tr>'; 493 494 echo '<tr>'; 495 if(XOOPS_DB_PREFIX !== $xoops_config->xoops_db_prefix) 496 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_PREFIX</span></strong></td>'; 497 else 498 echo '<td>XOOPS_DB_PREFIX</td>'; 499 echo '<td>' . XOOPS_DB_PREFIX . '</td>'; 500 echo '<td>' . $xoops_config->xoops_db_prefix . '</td>'; 501 echo '</tr>'; 502 echo '</tbody>'; 503 echo '</table>'; 504 } 317 505 function xpress_config_from_xoops_view($is_report = false) 318 506 { 507 global $xoopsUserIsAdmin; 508 319 509 require_once dirname(dirname( __FILE__ )).'/class/config_from_xoops.class.php' ; 320 510 $xoops_config = new ConfigFromXoops; 321 511 if ($is_report) { 322 512 echo "******** " . _AM_XP2_XOOPS_CONFIG_INFO . "********" . "<br />\n"; 323 echo 'XOOPS_ROOT_PATH: ' ; 324 if(XOOPS_ROOT_PATH !== $xoops_config->xoops_root_path) 325 echo 'ERROR '; 326 else 327 echo 'OK '; 328 echo "<br />\n"; 329 330 echo 'XOOPS_TRUST_PATH: ' ; 331 if(XOOPS_TRUST_PATH !== $xoops_config->xoops_trust_path) 332 echo 'ERROR '; 333 else 334 echo 'OK '; 335 echo "<br />\n"; 336 337 echo 'XOOPS_URL: ' ; 338 if(XOOPS_URL !== $xoops_config->xoops_url) 339 echo 'ERROR '; 340 else 341 echo 'OK '; 342 echo "<br />\n"; 343 344 if (defined('XOOPS_SALT')){ 345 echo 'XOOPS_SALT: ' ; 346 if(XOOPS_SALT !== $xoops_config->xoops_salt) 347 echo 'ERROR '; 348 else 349 echo 'OK '; 350 echo "<br />\n"; 351 } 352 353 if (defined('XOOPS_DB_SALT')){ 354 echo 'XOOPS_DB_SALT: ' ; 355 if(XOOPS_DB_SALT !== $xoops_config->xoops_db_salt) 356 echo 'ERROR '; 357 else 358 echo 'OK '; 359 echo "<br />\n"; 360 } 361 362 echo 'XOOPS_DB_HOST: ' ; 363 if(XOOPS_DB_HOST !== $xoops_config->xoops_db_host) 364 echo 'ERROR '; 365 else 366 echo 'OK '; 367 echo "<br />\n"; 368 369 echo 'XOOPS_DB_USER: ' ; 370 if(XOOPS_DB_USER !== $xoops_config->xoops_db_user) 371 echo 'ERROR '; 372 else 373 echo 'OK '; 374 echo "<br />\n"; 375 376 echo 'XOOPS_DB_PASS: ' ; 377 if(XOOPS_DB_PASS !== $xoops_config->xoops_db_pass) 378 echo 'ERROR '; 379 else 380 echo 'OK '; 381 echo "<br />\n"; 382 383 echo 'XOOPS_DB_NAME: ' ; 384 if(XOOPS_DB_NAME !== $xoops_config->xoops_db_name) 385 echo 'ERROR '; 386 else 387 echo 'OK '; 388 echo "<br />\n"; 389 390 echo 'XOOPS_DB_PREFIX: ' ; 391 if(XOOPS_DB_PREFIX !== $xoops_config->xoops_db_prefix) 392 echo 'ERROR '; 393 else 394 echo 'OK '; 395 echo "<br />\n"; 396 echo "<br />\n"; 397 513 xpress_config_report_view(); 514 echo "<br />\n"; 398 515 } else { 399 516 echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XP2_XOOPS_CONFIG_INFO . "</legend>"; 400 517 echo "<div style='padding: 8px;'>"; 401 echo '<table width="400" cellspacing="1" cellpadding="1" border="1">'; 402 echo '<tbody>'; 403 echo '<tr>'; 404 echo '<td>Define item</td>'; 405 echo '<td>XOOPS setting value</td>'; 406 echo '<td>xoops_config get value</td>'; 407 echo '</tr>'; 408 echo '<tr>'; 409 if(XOOPS_ROOT_PATH !== $xoops_config->xoops_root_path) 410 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_ROOT_PATH</span></strong></td>'; 411 else 412 echo '<td>XOOPS_ROOT_PATH</td>'; 413 echo '<td>' . XOOPS_ROOT_PATH . '</td>'; 414 echo '<td>' . $xoops_config->xoops_root_path . '</td>'; 415 echo '</tr>'; 416 417 echo '<tr>'; 418 if(XOOPS_TRUST_PATH !== $xoops_config->xoops_trust_path) 419 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_TRUST_PATH</span></strong></td>'; 420 else 421 echo '<td>XOOPS_TRUST_PATH</td>'; 422 echo '<td>' . XOOPS_TRUST_PATH . '</td>'; 423 echo '<td>' . $xoops_config->xoops_trust_path . '</td>'; 424 echo '</tr>'; 425 426 echo '<tr>'; 427 if(XOOPS_URL !== $xoops_config->xoops_url) 428 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_URL</span></strong></td>'; 429 else 430 echo '<td>XOOPS_URL</td>'; 431 echo '<td>' . XOOPS_URL . '</td>'; 432 echo '<td>' . $xoops_config->xoops_url . '</td>'; 433 echo '</tr>'; 434 435 if (defined('XOOPS_SALT')){ 436 echo '<tr>'; 437 if(XOOPS_SALT !== $xoops_config->xoops_salt) 438 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_SALT</span></strong></td>'; 439 else 440 echo '<td>XOOPS_SALT</td>'; 441 echo '<td>' . XOOPS_SALT . '</td>'; 442 echo '<td>' . $xoops_config->xoops_salt . '</td>'; 443 echo '</tr>'; 444 } 445 446 if (defined('XOOPS_DB_SALT')){ 447 echo '<tr>'; 448 if(XOOPS_DB_SALT !== $xoops_config->xoops_db_salt) 449 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_SALT</span></strong></td>'; 450 else 451 echo '<td>XOOPS_DB_SALT</td>'; 452 echo '<td>' . XOOPS_DB_SALT . '</td>'; 453 echo '<td>' . $xoops_config->xoops_db_salt . '</td>'; 454 echo '</tr>'; 455 } 456 457 echo '<tr>'; 458 if(XOOPS_DB_HOST !== $xoops_config->xoops_db_host) 459 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_HOST</span></strong></td>'; 460 else 461 echo '<td>XOOPS_DB_HOST</td>'; 462 echo '<td>' . XOOPS_DB_HOST . '</td>'; 463 echo '<td>' . $xoops_config->xoops_db_host . '</td>'; 464 echo '</tr>'; 465 466 echo '<tr>'; 467 if(XOOPS_DB_USER !== $xoops_config->xoops_db_user) 468 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_USER</span></strong></td>'; 469 else 470 echo '<td>XOOPS_DB_USER</td>'; 471 echo '<td>' . XOOPS_DB_USER . '</td>'; 472 echo '<td>' . $xoops_config->xoops_db_user . '</td>'; 473 echo '</tr>'; 474 475 echo '<tr>'; 476 if(XOOPS_DB_PASS !== $xoops_config->xoops_db_pass) 477 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_PASS</span></strong></td>'; 478 else 479 echo '<td>XOOPS_DB_PASS</td>'; 480 echo '<td>' . XOOPS_DB_PASS . '</td>'; 481 echo '<td>' . $xoops_config->xoops_db_pass . '</td>'; 482 echo '</tr>'; 483 484 echo '<tr>'; 485 if(XOOPS_DB_NAME !== $xoops_config->xoops_db_name) 486 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_NAME</span></strong></td>'; 487 else 488 echo '<td>XOOPS_DB_NAME</td>'; 489 echo '<td>' . XOOPS_DB_NAME . '</td>'; 490 echo '<td>' . $xoops_config->xoops_db_name . '</td>'; 491 echo '</tr>'; 492 493 echo '<tr>'; 494 if(XOOPS_DB_PREFIX !== $xoops_config->xoops_db_prefix) 495 echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_PREFIX</span></strong></td>'; 496 else 497 echo '<td>XOOPS_DB_PREFIX</td>'; 498 echo '<td>' . XOOPS_DB_PREFIX . '</td>'; 499 echo '<td>' . $xoops_config->xoops_db_prefix . '</td>'; 500 echo '</tr>'; 501 echo '</tbody>'; 502 echo '</table>'; 518 if ($xoopsUserIsAdmin){ 519 xpress_config_nomal_view(); 520 } else { 521 xpress_config_report_view(); 522 } 503 523 echo "</div>"; 504 524 echo "</fieldset><br />";
Note: See TracChangeset
for help on using the changeset viewer.