diff --git a/CalendarPopup.js b/CalendarPopup.js index acb306e..0b7a890 100644 --- a/CalendarPopup.js +++ b/CalendarPopup.js @@ -11,7 +11,7 @@ // use. That means, you can include it in your product, or your web // site, or any other form where the code is actually being used. You // may not put the plain javascript up on your site for download or -// include it in your javascript libraries for download. +// include it in your javascript libraries for download. // If you wish to share this code with others, please just point them // to the URL instead. // Please DO NOT link directly to my .js files from your site. Copy @@ -21,7 +21,7 @@ /* SOURCE FILE: AnchorPosition.js */ -/* +/* AnchorPosition.js Author: Matt Kruse Last modified: 10/11/02 @@ -30,7 +30,7 @@ DESCRIPTION: These functions find the position of an tag in a document, so other elements can be positioned relative to it. COMPATABILITY: Netscape 4.x,6.x,Mozilla, IE 5.x,6.x on Windows. Some small -positioning errors - usually with Window positioning - occur on the +positioning errors - usually with Window positioning - occur on the Macintosh platform. FUNCTIONS: @@ -44,16 +44,16 @@ getAnchorWindowPosition(anchorname) NOTES: -1) For popping up separate browser windows, use getAnchorWindowPosition. +1) For popping up separate browser windows, use getAnchorWindowPosition. Otherwise, use getAnchorPosition -2) Your anchor tag MUST contain both NAME and ID attributes which are the +2) Your anchor tag MUST contain both NAME and ID attributes which are the same. For example: -3) There must be at least a space between for IE5.5 to see the +3) There must be at least a space between for IE5.5 to see the anchor tag correctly. Do not do with no space. -*/ +*/ // getAnchorPosition(anchorname) // This function returns an object having .x and .y properties which are the coordinates @@ -139,7 +139,7 @@ function AnchorPosition_getPageOffsetLeft (el) { } function AnchorPosition_getWindowOffsetLeft (el) { return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft; - } + } function AnchorPosition_getPageOffsetTop (el) { var ot=el.offsetTop; while((el=el.offsetParent) != null) { ot += el.offsetTop; } @@ -156,14 +156,14 @@ function AnchorPosition_getWindowOffsetTop (el) { // May 17, 2003: Fixed bug in parseDate() for dates <1970 // March 11, 2003: Added parseDate() function // March 11, 2003: Added "NNN" formatting option. Doesn't match up -// perfectly with SimpleDateFormat formats, but +// perfectly with SimpleDateFormat formats, but // backwards-compatability was required. // ------------------------------------------------------------------ -// These functions use the same 'format' strings as the +// These functions use the same 'format' strings as the // java.text.SimpleDateFormat class, with minor exceptions. // The format string consists of the following abbreviations: -// +// // Field | Full Form | Short Form // -------------+--------------------+----------------------- // Year | yyyy (4 digits) | yy (2 digits), y (2 or 4 digits) @@ -286,7 +286,7 @@ function formatDate(date,format) { } return result; } - + // ------------------------------------------------------------------ // Utility functions for parsing in getDateFromFormat() // ------------------------------------------------------------------ @@ -305,12 +305,12 @@ function _getInt(str,i,minlength,maxlength) { } return null; } - + // ------------------------------------------------------------------ // getDateFromFormat( date_string , format_string ) // // This function takes a date string and a format string. It matches -// If the date string matches the format string, it returns the +// If the date string matches the format string, it returns the // getTime() of the date. If it does not match, it returns 0. // ------------------------------------------------------------------ function getDateFromFormat(val,format) { @@ -330,7 +330,7 @@ function getDateFromFormat(val,format) { var mm=now.getMinutes(); var ss=now.getSeconds(); var ampm=""; - + while (i_format < format.length) { // Get next token from format string c=format.charAt(i_format); @@ -469,7 +469,7 @@ function parseDate(val) { /* SOURCE FILE: PopupWindow.js */ -/* +/* PopupWindow.js Author: Matt Kruse Last modified: 02/16/04 @@ -479,20 +479,20 @@ in a certain place. The window can either be a DIV or a separate browser window. COMPATABILITY: Works with Netscape 4.x, 6.x, IE 5.x on Windows. Some small -positioning errors - usually with Window positioning - occur on the -Macintosh platform. Due to bugs in Netscape 4.x, populating the popup +positioning errors - usually with Window positioning - occur on the +Macintosh platform. Due to bugs in Netscape 4.x, populating the popup window with
- + Create(); */ ?> - - - + + + @@ -163,7 +163,7 @@ tinyMCE.init({ - +Strips $a and $b swapped successfully.
'; adminlog("Strips $a and $b have been swapped.", MTS_STRIP, MTA_MODIFY); } @@ -48,7 +48,7 @@ adminmenu('swap-comics.php');User Account Created
'; @@ -25,19 +25,19 @@ if( isset($_POST['edit']) ) { $userid = (int) $_POST['edit']; $user_old = $user = get_userdatabyid( $userid ); } - + $user->nameplate = $_POST['nickname']; $user->default_image = $user_old->default_image; $user->default_link = $_POST['rant-link']; $user->email = $_POST['email']; - + if( !empty($_POST['password_new1']) && !empty($_POST['password_new2']) ) { - + if( $_POST['password_new1'] !== $_POST['password_new2'] ) { $error.='New passwords do not match.
'; } else { /* password change */ - if( ! $mtdb->getOne( 'SELECT id FROM contributor WHERE id = "' . (int)$user->id . '" AND (password = SHA1("' . mysql_real_escape_string($_POST['password_old']) . '") OR password = "")' )) { + if( ! $mtdb->getOne( 'SELECT id FROM contributor WHERE id = "' . (int)$user->id . '" AND (password = SHA1("' . mysqli_real_escape_string($mtdb->link, $_POST['password_old']) . '") OR password = "")' )) { $error.='Specified password is incorrect.
'; } else { /* Password match */ @@ -50,13 +50,13 @@ if( isset($_POST['edit']) ) { function handle_upload( &$user ) { global $info,$error; - + if( !$_FILES['rant_image'] ) return; - + if( '' == $_FILES['rant_image']['name'] ) return; if( UPLOAD_ERR_NO_FILE == $_FILES['rant_image']['error'] ) return; if( 0 == $_FILES['rant_image']['size'] ) return; - + $info.='Tried to upload an image.
'; // Uploading new rant image $imagedata = getimagesize($_FILES['rant_image']['tmp_name']); @@ -68,7 +68,7 @@ if( isset($_POST['edit']) ) { $error.='Image wrong height: '.$imagedata[1].'
'; return; } - + switch( $_FILES['rant_image']['type'] ) { case 'image/jpeg': case 'image/jpg': $ext = 'jpg'; break; @@ -80,7 +80,7 @@ if( isset($_POST['edit']) ) { $error.='Unknown image extension. Upload refused.
'; return; } - + $destination_path = $user->name.'.'.$ext; if( !is_uploaded_file( $_FILES['rant_image']['tmp_name'] )) { $error.='Something went wrong while retrieving the uploaded image.
'; @@ -103,8 +103,8 @@ if( isset($_POST['edit']) ) { } else { $userid = (int) $_GET['edit']; $user = get_userdatabyid( $userid ); -} - +} + if( !$user ) $error.='The specified user does not exist.
'; adminhead('Edit User Profile'); diff --git a/users.php b/users.php index e9f2a32..26c5d62 100644 --- a/users.php +++ b/users.php @@ -54,13 +54,13 @@ $users = $mtdb->getAll("SELECT id,name,email,nameplate FROM contributor");| Username |
|---|