Jump to content

Dreous

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Dreous's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Have you tried somehtng like newColor = _ Color.(255, 0, 0, 0) ( which is black) try writing it in a value instead of the color it self.
  2. So about 6months ago I voulnteered to learn how to code to make webpages for my gaming community's webpage, since noone else knew how to do so other then the very basics. I got the webpage up and it was a bit plain so I wanted some extra options and started looking in to php coding. I'm still pretty new to it.. I added a couple of months ago a Log in script ( not of my own since it seemed to complicated for me to type all myself, although I probably could make it very basic. I just don't understand the session coding) So I used one from sourceforge. I've gotten it all working fine... Logging in, making it so members can add special things others cannot, registering, forgot password, ect.. And its all tied into my site.. But I'm trying to go a bit further and make it so the Users Details look better and have more details.. It comes with the basic, Change password, Change Email.. I want to add Aimname, Section, Discription and a body.. Maybe later i was thinking about adding a way for indivual users to change there background picture to something else.. Anyways the AIm name is working..in the useredit.php..However nothing else does and I cannot find out the problem.. So I was thinking someone else could see what I cannot. Cause other can see differently then you. <?php Process.php /** * procEditAccount - Attempts to edit the user's account * information, including the password, which must be verified * before a change is made. */ function procEditAccount(){ global $session, $form; /* Account edit attempt */ $retval = $session->editAccount($_POST['curpass'], $_POST['newpass'], $_POST['email'], $_POST['aimname'], $_POST['section'],$_POST['discription'], $_POST['body']); /* Added Aimname, Section, Discription, and Body.*/ /* Account edit successful */ if($retval){ $_SESSION['useredit'] = true; header("Location: ".$session->referrer); } /* Error found with form */ else{ $_SESSION['value_array'] = $_POST; $_SESSION['error_array'] = $form->getErrorArray(); header("Location: ".$session->referrer); } } }; // // // Session.php /** * editAccount - Attempts to edit the user's account information * including the password, which it first makes sure is correct * if entered, if so and the new password is in the right * format, the change is made. All other fields are changed * automatically. */ function editAccount($subcurpass, $subnewpass, $subemail, $subAim, $subChar, $subBody){ global $database, $form; //The database and form object /* New password entered */ if($subnewpass){ /* Current Password error checking */ $field = "curpass"; //Use field name for current password if(!$subcurpass){ $form->setError($field, "* Current Password not entered"); } else{ /* Check if password too short or is not alphanumeric */ $subcurpass = stripslashes($subcurpass); if(strlen($subcurpass) < 4 || !eregi("^([0-9a-z])+$", ($subcurpass = trim($subcurpass)))){ $form->setError($field, "* Current Password incorrect"); } /* Password entered is incorrect */ if($database->confirmUserPass($this->username,md5($subcurpass)) != 0){ $form->setError($field, "* Current Password incorrect"); } } /* New Password error checking */ $field = "newpass"; //Use field name for new password /* Spruce up password and check length*/ $subpass = stripslashes($subnewpass); if(strlen($subnewpass) < 4){ $form->setError($field, "* New Password too short"); } /* Check if password is not alphanumeric */ else if(!eregi("^([0-9a-z])+$", ($subnewpass = trim($subnewpass)))){ $form->setError($field, "* New Password not alphanumeric"); } } /* Change password attempted */ else if($subcurpass){ /* New Password error reporting */ $field = "newpass"; //Use field name for new password $form->setError($field, "* New Password not entered"); } /* Email error checking */ $field = "email"; //Use field name for email if($subemail && strlen($subemail = trim($subemail)) > 0){ /* Check if valid email address */ $regex = "^[_+a-z0-9-]+(\.[_+a-z0-9-]+)*" ."@[a-z0-9-]+(\.[a-z0-9-]{1,})*" ."\.([a-z]{2,}){1}$"; if(!eregi($regex,$subemail)){ $form->setError($field, "* Email invalid"); } $subemail = stripslashes($subemail); } /* Errors exist, have user correct them */ if($form->num_errors > 0){ return false; //Errors with form } /* Update password since there were no errors */ if($subcurpass && $subnewpass){ $database->updateUserField($this->username,"password",md5($subnewpass)); } /* Change Email */ if($subemail){ $database->updateUserField($this->username,"email",$subemail); } /* this is code I added to update users Profiles.. Aim name works. Nothing else does.. I had body working but I tried something and it no longer does. */ /* Change aimname */ if($subAim){ $database->updateUserField($this->username,"aimname",$subAim); } /* Change Section */ if($subSection){ $database->updateUserField($this->username,"section",$subSection); } /* Change Char */ if($subChar){ $database->updateUserField($this->username,"discription ",$subChar); } /* Change Information */ if($subBody){ $database->updateUserField($this->username,"body",$subBody); } /* Success! */ return true; } // // From - Database.php /* * updateUserField - Updates a field, specified by the field * parameter, in the user's row of the database. */ function updateUserField($username, $field, $value){ $q = "UPDATE ".TBL_USERS." SET ".$field." = '$value' WHERE username = '$username'"; return mysql_query($q, $this->connection); } This is all the code involved in the User Edit.. But there all different files ( I just pulled the code used to update useredit from the 3 files) ... And this is the file it posts from <? /** * UserEdit.php * * This page is for users to edit their account information * such as their password, email address, etc. Their * usernames can not be edited. When changing their * password, they must first confirm their current password. * * Written by: Jpmaster77 a.k.a. The Grandmaster of C++ (GMC) * Last Updated: August 26, 2004 */ include("include/session.php"); ?> <link rel="stylesheet" href="fontstyles.css" type="text/css" /> <link rel="stylesheet" href="bgstyle.css" type="text/css" /> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Profile Editing Page</title> <body> <? /** * User has submitted form without errors and user's * account has been edited successfully. */ if(isset($_SESSION['useredit'])){ unset($_SESSION['useredit']); echo "<h1>User Account Edit Success!</h1>"; echo "<p><b>$session->username</b>, your account has been successfully updated. " ."<a href=\"index.php\">Main</a>.</p>"; } else{ ?> <? /** * If user is not logged in, then do not display anything. * If user is logged in, then display the form to edit * account information, with the current email address * already in the field. */ if($session->logged_in){ ?> <h3>User Account Edit : <? echo $session->username; ?></h3> <? if($form->num_errors > 0){ echo "<td><font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font></td>"; } ?> <form action="process.php" method="POST"> <table align="left" border="0" cellspacing="0" cellpadding="3"> <tr> <td>Current Password:</td> <td><input type="password" name="curpass" maxlength="30" value=" <?echo $form->value("curpass"); ?>"></td> <td><? echo $form->error("curpass"); ?></td> </tr> <tr> <td>New Password:</td> <td><input type="password" name="newpass" maxlength="30" value=" <? echo $form->value("newpass"); ?>"></td> <td><? echo $form->error("newpass"); ?></td> </tr> <tr> <td>Email:</td> <td><input type="text" name="email" maxlength="50" value=" <? if($form->value("email") == ""){ echo $session->userinfo['email']; }else{ echo $form->value("email"); } ?>"> </td> <td><? echo $form->error("email"); ?></td> </tr> <tr> <td>AIM Name:</td> <td><input type="text" name="aimname" maxlength="50" value=" <? if($form->value("aimname") == ""){ echo $session->userinfo['aimname']; }else{ echo $form->value("aimname"); } ?>"> </td> <td><? echo $form->error("aimname"); ?></td> </tr> <tr> <td> Character Discription:</td> <td><textarea cols=50 rows=5 name="discription" maxlength="50" value=" <? if($form->value("discription") == ""){ echo $session->userinfo['discription']; }else{ echo $form->value("discription"); } ?>"> </td> <td><? echo $form->error("discription"); ?></td> </tr> </tr> <tr><td colspan="2" align="right"> <input type="hidden" name="subedit" value="1"> <input type="submit" value="Edit Account"></td></tr> <tr><td colspan="2" align="left"></td></tr> </table> </form> <? } } ?> </body> </html> Any help would be awesome. But be easy on me i'm a noobie here.
  3. I'd say #3 hands down.. I like the mouse look alot with the underlining with the cord. Very creative.
  4. What font? the Nostrfarian? And do you mean on the site or in the images? And keep in mind that this is for a game * guild * community.. and our alignment is more neutral/Evil and were planning to be Mercenaries. Which is why I made a contract section. Made it out of php but still have troubles with it actually sending a email to the person once its created. The reason I came here is because I started webdesign about 6 months ago because this guild needed a webpage.. and I voulnteered to be the one to learn what was needed. But as I'm learning I get stuck on obisticals for long periods of time.. where if i had someone to talk to they could be like " Oh heres your problem" and I could learn much more quickly.. But alas I'm alone in my learning.. It doesn't help that I also go to college and work(to learn more quickly that is)
  5. I figured you wouldn't want to use it. I just felt like messing around with it. If your ever looking for some type of abstract thing you can come to me
  6. Here since you got me all wanting to mess around with photoshop I just tweaked your banner up.. Its alot more abstract then yours the font however is quite close ( in the sence I chose a fatter font)
  7. Well truthfully the leader of the gaming communty wanted it to be opened up in new windows. Im not to font of it myself. But I dunno if it would look any nicer opening up in the same browser.
  8. Thats more my style of a banner. I definately like it better then your old one. the Oleaa.net font is awesome. I'd mess with the bottom font a bit. Make it look better
  9. Whats your website about? Just yourself? If so and thats your eye.. I would use photoshop to make your eye way more outstanding in the picture. Although I dunno if your tastes are like mine I like more abstract art.
  10. www.underworldassailants.com Me and a friend of mine Designed it.. Its not completely done still as of yet.. Its just made for a game community. I started messing with websites about 6months ago but more of an off on type of thing. I'm decently comfortable with Html.. Php+mySQL are a bit sketchy to me still. But I've been trying to learn. Anyways Go ahead and tell me what you guys think of it. It won't hurt my feelings to say it sucks horrible ;P
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.