| 1: | <?php
|
| 2: | |
| 3: | |
| 4: | |
| 5: | |
| 6: | |
| 7: | |
| 8: | |
| 9: | |
| 10: | |
| 11: | |
| 12: | |
| 13: | |
| 14: | |
| 15: | |
| 16: | |
| 17: | |
| 18: |
|
| 19: |
|
| 20: | defined('XOOPS_ROOT_PATH') || exit('Restricted access');
|
| 21: |
|
| 22: | $GLOBALS['xoopsLogger']->addDeprecated("'/class/module.errorhandler.php' is deprecated since XOOPS 2.5.4, please create your own error messages instead.");
|
| 23: |
|
| 24: | |
| 25: | |
| 26: | |
| 27: | |
| 28: | |
| 29: | |
| 30: |
|
| 31: | class ErrorHandler
|
| 32: | {
|
| 33: | |
| 34: | |
| 35: | |
| 36: | |
| 37: | |
| 38: | |
| 39: |
|
| 40: | public static function show($e_code, $pages = 1)
|
| 41: | {
|
| 42: | global $xoopsConfig;
|
| 43: |
|
| 44: | $errmsg = array(
|
| 45: | '0001' => 'Could not connect to the forums database.',
|
| 46: | '0002' => 'The forum you selected does not exist. Please go back and try again.',
|
| 47: | '0003' => 'Incorrect Password.',
|
| 48: | '0004' => 'Could not query the topics database.',
|
| 49: | '0005' => 'Error getting messages from the database.',
|
| 50: | '0006' => 'Please enter the Nickname and the Password.',
|
| 51: | '0007' => 'You are not the Moderator of this forum therefore you can\'t perform this function.',
|
| 52: | '0008' => 'You did not enter the correct password, please go back and try again.',
|
| 53: | '0009' => 'Could not remove posts from the database.',
|
| 54: | '0010' => 'Could not move selected topic to selected forum. Please go back and try again.',
|
| 55: | '0011' => 'Could not lock the selected topic. Please go back and try again.',
|
| 56: | '0012' => 'Could not unlock the selected topic. Please go back and try again.',
|
| 57: | '0013' => 'Could not query the database.',
|
| 58: | '0014' => 'No such user or post in the database.',
|
| 59: | '0015' => 'Search Engine was unable to query the forums database.',
|
| 60: | '0016' => 'That user does not exist. Please go back and search again.',
|
| 61: | '0017' => 'You must type a subject to post. You can\'t post an empty subject. Go back and enter the subject',
|
| 62: | '0018' => 'You must select message icon to post. Go back and select message icon.',
|
| 63: | '0019' => 'You must type a message to post. You can\'t post an empty message. Go back and enter a message.',
|
| 64: | '0020' => 'Could not enter data into the database. Please go back and try again.',
|
| 65: | '0021' => 'Can\'t delete the selected message.',
|
| 66: | '0022' => 'An error ocurred while querying the database.',
|
| 67: | '0023' => 'Selected message was not found in the forum database.',
|
| 68: | '0024' => 'You can\'t reply to that message. It wasn\'t sent to you.',
|
| 69: | '0025' => 'You can\'t post a reply to this topic, it has been locked. Contact the administrator if you have any question.',
|
| 70: | '0026' => 'The forum or topic you are attempting to post to does not exist. Please try again.',
|
| 71: | '0027' => 'You must enter your username and password. Go back and do so.',
|
| 72: | '0028' => 'You have entered an incorrect password. Go back and try again.',
|
| 73: | '0029' => 'Couldn\'t update post count.',
|
| 74: | '0030' => 'The forum you are attempting to post to does not exist. Please try again.',
|
| 75: | '0031' => 'Unknown Error',
|
| 76: | '0035' => 'You can\'t edit a post that\'s not yours.',
|
| 77: | '0036' => 'You do not have permission to edit this post.',
|
| 78: | '0037' => 'You did not supply the correct password or do not have permission to edit this post. Please go back and try again.',
|
| 79: | '1001' => 'Please enter value for Title.',
|
| 80: | '1002' => 'Please enter value for Phone.',
|
| 81: | '1003' => 'Please enter value for Summary.',
|
| 82: | '1004' => 'Please enter value for Address.',
|
| 83: | '1005' => 'Please enter value for City.',
|
| 84: | '1006' => 'Please enter value for State/Province.',
|
| 85: | '1007' => 'Please enter value for Zipcode.',
|
| 86: | '1008' => 'Please enter value for Description.',
|
| 87: | '1009' => 'Vote for the selected resource only once.<br>All votes are logged and reviewed.',
|
| 88: | '1010' => 'You cannot vote on the resource you submitted.<br>All votes are logged and reviewed.',
|
| 89: | '1011' => 'No rating selected - no vote tallied.',
|
| 90: | '1013' => 'Please enter a search query.',
|
| 91: | '1016' => 'Please enter value for URL.',
|
| 92: | '1017' => 'Please enter value for Home Page.',
|
| 93: | '9999' => 'OOPS! Unknown Error');
|
| 94: |
|
| 95: | $errorno = array_keys($errmsg);
|
| 96: | if (!in_array($e_code, $errorno)) {
|
| 97: | $e_code = '9999';
|
| 98: | }
|
| 99: | include_once XOOPS_ROOT_PATH . '/header.php';
|
| 100: | echo '<div><strong>' . $xoopsConfig['sitename'] . ' Error</strong><br><br>';
|
| 101: |
|
| 102: | echo "Error Code: $e_code<br><br><br>";
|
| 103: | echo "<strong>ERROR:</strong> $errmsg[$e_code]<br><br><br>";
|
| 104: | echo '[ <a href=\'javascript:history.go(-' . $pages . ')\'>Go Back</a> ]</div>';
|
| 105: |
|
| 106: | include_once XOOPS_ROOT_PATH . '/footer.php';
|
| 107: | exit();
|
| 108: | }
|
| 109: | }
|
| 110: |
|
| 111: |
|
| 112: | |