Jump to content
MakeWebGames

assassincity[dot]com

Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by assassincity[dot]com

  1. Re: Email change for preferences.php Fatal error: Call to undefined function email_change() in /home/ie3/public_html/preferences.php on line 48
  2. Re: [mccode] Profile Signatures Great ;) I kinda edited it abit to get it to work so here is the edited version, This works for me so should work for you! -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- open viewuser.php find if($ir['donatordays'] > 0) { print " [[url='friendslist.php?action=add&ID={$r[']Add Friends[/url]] [[url='blacklist.php?action=add&ID={$r[']Add Enemies[/url]]<td/></td>"; } print "</td></tr> "; print "</td></tr></table>"; } $h->endpage(); } } ?>     replace with if($ir['donatordays'] > 0) { print " [[url='friendslist.php?action=add&ID={$r[']Add Friends[/url]] [[url='blacklist.php?action=add&ID={$r[']Add Enemies[/url]]<td/></td>"; } print "</td></tr> "; print " <table width=100%><tr style='background:gray'><th>Profile Signature</th> <tr><td rowspan='1'>"; if($r['signature']) { print "{$r['signature']}"; } else { print "[b]This User has no Profile Signature[/b]"; } print "</td></tr></table>"; } $h->endpage(); } } ?>     run this sql   ALTER users ADD `signature` text NOT NULL;     ---------------------------- preferences.php Name Change     after it, add Profile Signature     find: case 'picchange2': do_pic_change(); break; case 'picchange': pic_change(); break;     after that add case 'signature2': do_signature_change(); break; case 'signature': signature_change(); break;     find function do_name_change() { global $ir,$c,$userid,$h; if($_POST['newname'] == "") { print "You did not enter a new name. [url='preferences.php?action=namechange']> Back[/url]"; } else { $_POST['newname']=str_replace(array("<", ">", "\\\'"), array("<", ">", "'"), $_POST['newname']); mysql_query("UPDATE users SET username='{$_POST['newname']}' WHERE userid=$userid",$c); print "Username changed!"; } }     after that, add function signature_change() { global $ir,$c,$userid,$h; print "<h3>Profile Signature Change</h3> <font color='gold'>[b]NOTICE: THIS SIGNATURE CANNOT CONTAIN ANY INAPPROPRIATE CONTENT/IMAGE/SHOOTS! YOU WILL BE IP BANNED AND YOUR ACCOUNT FEDDED! <form action='preferences.php?action=signature2' method='post'> New Profile Signature: <textarea rows=7 cols=40 name='newsignature'>{$ir['signature']}</textarea> <input type='submit' value='Change Profile Signature' /></form> [b]Current Profile Signature :[/b]{$r['signature']}"; } function do_signature_change() { global $ir,$c,$userid,$h; if($_POST['newsignature'] == "") { print "You did not enter a new signature. > [url='preferences.php?action=signature']Back[/url]"; } else { mysql_query("UPDATE users SET signature='{$_POST['newsignature']}' WHERE userid=$userid",$c); print "Profile Signature changed!"; } }   This is my preferences.php   <?php /*----------------------------------------------------- -- Mono Country v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- INDEX.php -----------------------------------------------------*/ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); switch($_GET['action']) { case 'sexchange2': do_sex_change(); break; case 'sexchange': conf_sex_change(); break; case 'passchange2': do_pass_change(); break; case 'passchange': pass_change(); break; case 'namechange2': do_name_change(); break; case 'namechange': name_change(); break; case 'picchange2': do_pic_change(); break; case 'picchange': pic_change(); break; case 'signature2': do_signature_change(); break; case 'signature': signature_change(); break; default: prefs_home(); break; } function prefs_home() { global $ir,$c,$userid,$h; print "<h3>Preferences</h3> [url='preferences.php?action=sexchange']Sex Change[/url] [url='preferences.php?action=passchange']Password Change[/url] [url='preferences.php?action=namechange']Name Change[/url] [url='preferences.php?action=signature']Profile Signature[/url] [url='preferences.php?action=emailchange']Email Address Change [b]<font color='gold'>* COMING SOON *[/b]</font>[/url] [url='preferences.php?action=picchange']Display Pic Change[/url] "; } function conf_sex_change() { global $ir,$c,$userid,$h; if($ir['gender'] == "Male") { $g="Female"; } else { $g="Male"; } print "Are you sure you want to become a $g? [url='preferences.php?action=sexchange2']Yes[/url] | [url='preferences.php']No[/url]"; } function do_sex_change() { global $ir,$c,$userid,$h; if($ir['gender'] == "Male") { $g="Female"; } else { $g="Male"; } mysql_query("UPDATE users SET gender='$g' WHERE userid=$userid",$c); print "Success, you are now $g! [url='preferences.php']Back[/url]"; } function pass_change() { global $ir,$c,$userid,$h; print "<h3>Password Change</h3><form action='preferences.php?action=passchange2' method='post'>Current Password: <input type='password' name='oldpw' /> New Password: <input type='password' name='newpw' /> Confirm: <input type='password' name='newpw2' /> <input type='submit' value='Change PW' /></form>"; } function do_pass_change() { global $ir,$c,$userid,$h; if(md5($_POST['oldpw']) != $ir['userpass']) { print "The current password you entered was wrong. [url='preferences.php?action=passchange']> Back[/url]"; } else if($_POST['newpw'] !== $_POST['newpw2']) { print "The new passwords you entered did not match! [url='preferences.php?action=passchange']> Back[/url]"; } else { mysql_query("UPDATE users SET userpass=md5('{$_POST['newpw']}') WHERE userid=$userid",$c); print "Password changed!"; } } function name_change() { global $ir,$c,$userid,$h; print "<h3>Name Change</h3> <font size=3 color=yellow> If Your Username Contains Special Characters Then Your Account Will Be Fedded For 25 Days! Anything That Is Not On The Standard UK Keyboard [b]- ™ ® ë ø ç -[/b] etc, Is Not Permitted! (NOTE: Please DO NOT use ' in your name either, thank you.)</font> Please note that you still use the same name to login, this procedure simply changes the name that is displayed.<form action='preferences.php?action=namechange2' method='post'> New Name: <input type='text' name='newname' /> <input type='submit' value='Change Name' /></form>"; } function do_name_change() { global $ir,$c,$userid,$h; if($_POST['newname'] == "") { print "You did not enter a new name. [url='preferences.php?action=namechange']> Back[/url]"; } else { $_POST['newname']=str_replace(array("<", ">", "\\\'"), array("<", ">", "'"), $_POST['newname']); mysql_query("UPDATE users SET username='{$_POST['newname']}' WHERE userid=$userid",$c); print "Username changed!"; } } function signature_change() { global $ir,$c,$userid,$h; print "<h3>Profile Signature Change</h3> <form action='preferences.php?action=signature2' method='post'> New Profile Signature: <textarea rows=7 cols=40 name='newsignature'>{$ir['signature']}</textarea> <input type='submit' value='Change Profile Signature' /></form> [b]Current Profile Signature :[/b]{$r['signature']}"; } function do_signature_change() { global $ir,$c,$userid,$h; if($_POST['newsignature'] == "") { print "You did not enter a new signature. > [url='preferences.php?action=signature']Back[/url]"; } else { mysql_query("UPDATE users SET signature='{$_POST['newsignature']}' WHERE userid=$userid",$c); print "Profile Signature changed!"; } } function pic_change() { global $ir,$c,$userid,$h; print "<h3>Pic Change</h3> Please note that this must be externally hosted, [url='http://imageshack.us']ImageShack[/url] is our recommendation. <font color='gold'>[b]NOTICE: THIS IMAGE CANNOT CONTAIN ANY INAPPROPRIATE IMAGE/SHOOTS! YOU WILL BE IP BANNED AND YOUR ACCOUNT FEDDED!</font>[/b] Any images that are not 150x150 will be automatically resized <form action='preferences.php?action=picchange2' method='post'> New Pic: <input type='text' name='newpic' value='{$ir['display_pic']}' /> <input type='submit' value='Change Name' /></form>"; } function do_pic_change() { global $ir,$c,$userid,$h; if($_POST['newpic'] == "") { print "You did not enter a new pic. [url='preferences.php?action=picchange']> Back[/url]"; } else { $_POST['newpic']=str_replace('\\\'',''', $_POST['newpic']); mysql_query("UPDATE users SET display_pic='{$_POST['newpic']}' WHERE userid=$userid",$c); print "Pic changed!"; } function email_change() { global $ir,$c,$userid,$h; print "<h3>Email Change</h3> <form action='preferences.php?action=emailchange2' method='post'> New Email adress: <input type='text' name='newemail' /> <input type='submit' value='Change Email' /></form>"; } function do_email_change() { global $ir,$c,$userid,$h; if($_POST['newname'] == "") { print "You did not enter a new email. [url='preferences.php?action=emailchange']> Back[/url]"; } else { $_POST['newemail']=str_replace(array("<", ">", "\\\'"), array("<", ">", "'"), $_POST['newemail']); mysql_query("UPDATE users SET email='{$_POST['newemail']}' WHERE userid=$userid",$c); print "Email changed!"; } } } $h->endpage(); ?>   Enjoy ;) If it don't work just post and I will try and post a fix! Credits to LostOne & on_fire
×
×
  • Create New...