Changeset 7
- Timestamp:
- 2007-11-21 15:27:52 (5 years ago)
- Files:
-
- trunk/admin/classes/pages/Permissions.php (modified) (1 diff)
- trunk/classes/pages/Editprofile.php (modified) (2 diffs)
- trunk/db/spamboard.sql (modified) (2 diffs)
- trunk/includes/lang/en.php (modified) (2 diffs)
- trunk/redirectors/showip.php (modified) (4 diffs)
- trunk/redirectors/uploadavatar.php (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/admin/classes/pages/Permissions.php
r1 r7 46 46 $_exclude_pages = Array('Page', 'Category', 'Forum', 'Topic', 'Newpoll', 'Reply', 'Moderate', 'Newtopic'); 47 47 // define special 'pseudo-pages' 48 $_pseudo_pages = Array('Markasread', 'Pollvote', 'Postinghelp', 'Preview', 'Attachments', 'Delete_Topic', 'Edit_Title', 'Lock', 'Merge', 'Move', 'Pin', 'Split', 'Unlock', 'Unpin', 'Showip', ' admin/');48 $_pseudo_pages = Array('Markasread', 'Pollvote', 'Postinghelp', 'Preview', 'Attachments', 'Delete_Topic', 'Edit_Title', 'Lock', 'Merge', 'Move', 'Pin', 'Split', 'Unlock', 'Unpin', 'Showip', 'Uploadavatar', 'admin/'); 49 49 // define the forum-specific pages 50 50 $_forum_pages = Array('Forum', 'Newpoll', 'Newtopic', 'Reply'); trunk/classes/pages/Editprofile.php
r1 r7 308 308 while (FALSE !== ($file = @readdir($handle))) { 309 309 // only image files 310 if ($file != '.' && $file != '..' && $file != 'index.htm') {310 if ($file != '.' && $file != '..' && (strtolower(substr($file, strlen($file) - 4)) == '.png' || strtolower(substr($file, strlen($file) - 4)) == '.gif' || strtolower(substr($file, strlen($file) - 4)) == '.jpg' || strtolower(substr($file, strlen($file) - 5)) == '.jpeg')) { 311 311 $_col1 .= '<option value="images/avatars/' . $file . '"'; 312 312 if ($m->getAvatar() == 'images/avatars/' . $file) { … … 319 319 @closedir($handle); 320 320 } 321 $_col1 .= '</select><br /><a href="javascript:void( );" onclick="window.open(\'redirectors/uploadavatar.php\', \'uploadwindow\', \'width=350, height=200\');">' . $LANG['Upload_Avatar'] . '</a></td>';321 $_col1 .= '</select><br /><a href="javascript:void(0);" onclick="window.open(\'redirectors/uploadavatar.php\', \'uploadwindow\', \'width=350, height=200\');">' . $LANG['Upload_Avatar'] . '</a></td>'; 322 322 $_col2 = '<td>'; 323 323 /* it shouldn't really occur that the avatar is an empty string, trunk/db/spamboard.sql
r1 r7 228 228 INSERT INTO "sb_rights" VALUES('Delete',3,0,0); 229 229 INSERT INTO "sb_rights" VALUES('Edit',3,0,0); 230 INSERT INTO "sb_rights" VALUES('Uploadavatar',1,1,1); 231 INSERT INTO "sb_rights" VALUES('Uploadavatar',2,1,1); 232 INSERT INTO "sb_rights" VALUES('Uploadavatar',3,1,1); 233 INSERT INTO "sb_rights" VALUES('Uploadavatar',4,1,1); 234 INSERT INTO "sb_rights" VALUES('Uploadavatar',5,0,0); 230 235 231 236 CREATE TABLE sb_rights_default ( … … 382 387 INSERT INTO "sb_rights_default" VALUES('Delete',3,0,0); 383 388 INSERT INTO "sb_rights_default" VALUES('Edit',3,0,0); 389 INSERT INTO "sb_rights_default" VALUES('Uploadavatar',1,1,1); 390 INSERT INTO "sb_rights_default" VALUES('Uploadavatar',2,1,1); 391 INSERT INTO "sb_rights_default" VALUES('Uploadavatar',3,1,1); 392 INSERT INTO "sb_rights_default" VALUES('Uploadavatar',4,1,1); 393 INSERT INTO "sb_rights_default" VALUES('Uploadavatar',5,0,0); 384 394 385 395 CREATE TABLE sb_usergroups ( trunk/includes/lang/en.php
r5 r7 367 367 $LANG['welcome_mail'] = 'Hello and welcome to ' . $SETTINGS['forumname'] . "!\n\nYour initial password is %password%\n\nYou can now use it to log in and change your profile settings.\n\n" . $SETTINGS['forumadmin'] . "\nhttp://" . $_SERVER['SERVER_NAME'] . substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER[PHP_SELF], '/')); 368 368 $LANG['lost_password_mail'] = "%membername%,\n\nsomebody (hopefully you) has requested a new password for your account over at " . $SETTINGS['forumname'] . ".\n\nThis is said password: %password%\n\nUse it to log in and change it to whatever you like.\n\n" . $SETTINGS['forumadmin'] . "\nhttp://" . $_SERVER['SERVER_NAME'] . substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER[PHP_SELF], '/')); 369 $LANG['upload_avatar_hints'] = "<ul><li>File size must be smaller or equal 50KB</li><li>Width and height of the image mustn't exceed " . $SETTINGS['maxavatarsize'] . " pixels each</li><li>Allow file types are PNG, JPEG and GIF</li></ul>"; 370 $LANG['upload_avatar_success'] = 'Your avatar has been uploaded successfully. You can now safely close this window, then reload the page from which you opened it and the new file should appear in the list.'; 369 371 370 372 /* error messages */ … … 411 413 $LANG['error_bans_file_not_writable'] = "Error: The bans file isn't writable. Please adjust the permissions accordingly."; 412 414 $LANG['error_mail_address_already_used'] = "Error: The e-mail address you entered has already been used to register another account. The board administrators have chosen to allow only one account per address."; 415 $LANG['error_avatar_file_missing'] = "Error: It seems you didn't select a file to upload."; 416 $LANG['error_avatar_filesize'] = "Error: The file you tried to upload is larger than 50KB."; 417 $LANG['error_avatar_filetype'] = "Error: The file you uploaded is neither a PNG, a JPEG or a GIF."; 418 $LANG['error_avatar_dimension'] = "Error: The file's width or height exceeds " . $SETTINGS['maxavatarsize'] . ' pixels.'; 419 $LANG['error_avatar_filename'] = "Error: A file with the same name as the one you tried to upload already exists among the avatars. Please rename it and try again."; 420 $LANG['error_avatar_move'] = "Error: Something unforseen went wrong with the upload. Please try again. If this error persists, contact the administrators."; 413 421 414 422 ?> trunk/redirectors/showip.php
r1 r7 38 38 // formatting object 39 39 $F = new Format(); 40 require('../includes/lang/' .$SETTINGS['language'].'.php');40 require('../includes/lang/' . $SETTINGS['language'] . '.php'); 41 41 // open database connection 42 42 $C = new Connection('../'); 43 43 require_once('../includes/session.php'); 44 44 if ($_SESSION['lang'] != '') { 45 include('../includes/lang/' .$_SESSION['lang'].'.php');45 include('../includes/lang/' . $_SESSION['lang'] . '.php'); 46 46 } 47 47 // translate passed variables to local identifiers … … 62 62 $_style = $_SESSION['boardstyle']; 63 63 } 64 $_css->addAttribute('href', '../includes/styles/' .$_style);64 $_css->addAttribute('href', '../includes/styles/' . $_style); 65 65 // tell spiders not to index this 66 66 $_meta = $html->head->addChild('meta'); … … 70 70 $html->addChild('body'); 71 71 72 // check if user has permission; required: read; independent fromid72 // check if user has permission; required: read; dependent on id 73 73 if (Member::checkRights('Showip', 'read', $id)) { 74 74 // permission granted … … 118 118 header('Pragma: no-cache'); 119 119 header('Cache-Control: no-cache, must-revalidate'); 120 header('Expires: ' .gmdate('D, d M Y H:i:s').' GMT');121 header('Last-Modified: ' .gmdate('D, d M Y H:i:s').' GMT');120 header('Expires: ' . gmdate('D, d M Y H:i:s').' GMT'); 121 header('Last-Modified: ' . gmdate('D, d M Y H:i:s').' GMT'); 122 122 // send document to client 123 123 print(str_replace(Array('&omicron;', '&raquo;', '&alpha;', '&copy;', '&nbsp;'), Array('ο', '»', 'α', '©', ' '), $html->asXML()));
