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