| 
				 RE: Custom Profile Modification 
 
			
			
	Quote: 
	
		| 
					Originally Posted by 12345
					
				 
	Quote: 
	
		| 
					Originally Posted by Bloodrun
					
				 
	Quote: 
	
		| 
					Originally Posted by 12345
					
				 
	Quote: 
	
		| 
					Originally Posted by Bloodrun
					
				 
	Quote: 
	
		| 
					Originally Posted by 12345
					
				 
	Quote: 
	
		| 
					Originally Posted by Bloodrun
					
				 Okay try this for your account.php 
	PHP Code: 
		
			
<?php
 // **********************************************************************
 // Rusnak PHP Adoptables Script
 // Copyright 2009 Brandon Rusnak
 // For help and support: http://www.rusnakweb.com/forum/
 //
 // Redistribution prohibited without written permission
 // **********************************************************************
 
 // Wake the sleeping giant
 
 // **********************************************************************
 // Basic Configuration Info
 // **********************************************************************
 
 include("inc/functions.php");
 include("inc/config.php");
 include("lang/lang.php");
 
 $themeurl = grabanysetting("themeurl");
 
 // **********************************************************************
 // Define our top links by calling getlinks()
 // **********************************************************************
 
 $links = getlinks();
 
 // **********************************************************************
 // Define our ads by calling getads()
 // **********************************************************************
 
 $ads = getads("account");
 
 // **********************************************************************
 // Grab any dynamic article content from the content table
 // **********************************************************************
 
 $pagecontent = getsitecontent("index");
 $article_title = $pagecontent[title];
 $article_content = $pagecontent[content];
 $article_content = nl2br($article_content);
 
 // **********************************************************************
 // Grab any settings that we will need for the current page from the DB
 // **********************************************************************
 
 $browsertitle = grabanysetting("browsertitle");
 $sitename = grabanysetting("sitename");
 $slogan = grabanysetting("slogan");
 
 // **********************************************************************
 // Check and see if the user is logged in to the site
 // **********************************************************************
 
 $loginstatus = logincheck();
 $isloggedin = $loginstatus[loginstatus];
 $loggedinname = $loginstatus[username];
 
 // **********************************************************************
 // End Prepwork - Output the page to the user
 // **********************************************************************
 
 $act = $_GET["act"];
 $act = preg_replace("/[^a-zA-Z0-9\\040.]/", "", $act);
 $act = secure($act);
 
 $more = $_GET["more"];
 $more = preg_replace("/[^a-zA-Z0-9\\040.]/", "", $more);
 $more = secure($more);
 
 if($isloggedin == "yes"){
 
 // We are logged in, so we must have an account
 // Now we switch through our actions...
 
 if($act == ""){
 
 // No action specified
 $query = "SELECT * FROM ".$prefix."users WHERE username='$loggedinname'";
 $result = mysql_query($query);
 $num = mysql_numrows($result);
 
 if($num > 0){
 
 $i=0;
 while ($i < 1) {
 
 $changewarning=@mysql_result($result,$i,"changewarning");
 
 // the following shows the member their warning level
 
 if($changewarning == "0"){
 $warn = "Your Warning Level: <img src='http://mycookie.co.cc/img/0.png'>";
 }
 else if($changewarning == "1"){
 $warn = "Your Warning Level: <img src='http://mycookie.co.cc/img/1.png'>";
 }
 else if($changewarning == "2"){
 $warn = "Your Warning Level: <img src='http://mycookie.co.cc/img/2.png'>";
 }
 else if($changewarning == "3"){
 $warn = "Your Warning Level: <img src='http://mycookie.co.cc/img/3.png'>";
 }
 else if($changewarning == "4"){
 $warn = "Your Warning Level: <img src='http://mycookie.co.cc/img/4.png'>";
 }
 else if($changewarning == "5"){
 $warn = "Your Warning Level: <img src='http://mycookie.co.cc/img/5.png'><br>You are currently banned, and cannot use the PM System.";
 }
 
 $i++;
 }
 }
 $article_title = $loggedinname."'s Account";
 $article_content = $lang_account_manage."<br><br>
 // the following gets the users warning level from above and places it within the article content.
 <b>".$warn."</b><br>
 <b><u>Account Settings:</u></b><br><br>
 <a href='myadopts.php'>Manage Adoptables</a><br>
 <a href='profile.php?user=".$loggedinname."'>View Profile</a><br>
 <a href='account.php?act=changeemail'>Change Email Address</a><br>
 <a href='account.php?act=changepass'>Change Password</a><br>
 <a href='account.php?act=changesettings'>Change Settings and Profile Info</a>";
 
 }
 else if($act == "changeemail"){
 
 // We are changing the user's email address
 
 $article_title = $lang_email_change_title;
 $article_content = $lang_email_change."<br><form name='form1' method='post' action='accountpost.php'>
 <p>New Email Address :
 <input name='email' type='text' id='email'>
 <input name='act' type='hidden' id='act' value='changeemail'>
 </p>
 <p>
 <input type='submit' name='Submit' value='Change Email Address'>
 </p>
 </form>";
 
 }
 else if($act == "changepass"){
 
 // We are changing the password
 
 $article_title = $lang_changepass_title;
 $article_content = $lang_changepass."<br><form name='form1' method='post' action='accountpost.php'>
 <p>Your Current Password:
 <input name='cpass' type='password' id='cpass'>
 </p>
 <p>Your New Password:
 <input name='np1' type='password' id='np1' maxlength='20'>
 </p>
 <p>Confirm New Password:
 <input name='np2' type='password' id='np2' maxlength='20'>
 <input name='act' type='hidden' id='act' value='changepass'>
 </p>
 <p>
 <input type='submit' name='Submit' value='Change Password'>
 </p>
 </form>";
 
 }
 else if($act == "changesettings"){
 
 // We are changing the settings
 
 $article_title = $lang_changesettings_title;
 $article_content = $lang_changesettings."<br>";
 
 // Get the user's account details from the database...
 
 $query = "SELECT * FROM ".$prefix."users WHERE username='$loggedinname'";
 $result = mysql_query($query);
 $num = mysql_numrows($result);
 
 //Loop out code
 $i=0;
 while ($i < 1) {
 
 // Get the user's account details from the database...
 
 $query = "SELECT * FROM ".$prefix."users WHERE username='$loggedinname'";
 $result = mysql_query($query);
 $num = mysql_numrows($result);
 
 //Loop out code
 $i=0;
 while ($i < 1) {
 
 $ame=@mysql_result($result,$i,"ame");
 $location=@mysql_result($result,$i,"location");
 $age=@mysql_result($result,$i,"age");
 $occupation=@mysql_result($result,$i,"occupation");
 $interests=@mysql_result($result,$i,"interests");
 $profilepic=@mysql_result($result,$i,"profilepic");
 $displayquote=@mysql_result($result,$i,"displayquote");
 $usercss=@mysql_result($result,$i,"usercss");
 
 $ame = stripslashes($ame);
 $location = stripslashes($location);
 $age = stripslashes($age);
 $occupation = stripslashes($occupation);
 $interests = stripslashes($interests);
 $profilepic = stripslashes($profilepic);
 $displayquote = stripslashes($displayquote);
 $usercss = stripslashes($usercss);
 
 
 $i++;
 }
 
 // Show the form...
 
 if($newmessagenotify == 1){
 $box = "<input name='newmsgnotify' type='checkbox' id='newmsgnotify' value='1' checked>";
 }
 else{
 $box = "<input name='newmsgnotify' type='checkbox' id='newmsgnotify' value='1'>";
 }
 
 $article_content = $article_content."<form name='form1' method='post' action='accountpost.php'>
 <p>Profile Layout:
 <textarea name='usercss' type='text' id='usercss' cols='80' rows='30'>".$usercss."</textarea>
 </p>
 <p>About Me: <br>
 <textarea name='ame' type='text' id='ame' cols='40' rows='3'>".$ame."</textarea>
 </p>
 <p>Interests: <br>
 <textarea name='interests' type='text' id='interests' cols='40' rows='3'>".$interests."</textarea>
 </p>
 <p>Location:
 <input name='location' type='text' id='location' value='".$location."'>
 </p>
 <p>Age:
 <input name='age' type='text' id='age' value='".$age."'>
 </p>
 <p>Display Picture:
 <input name='profilepic' type='text' id='profilepic' value='".$profilepic."'>
 </p>
 <p>Favorite Quote:
 <input name='displayquote' type='text' id='displayquote' value='".$displayquote."'>
 </p>
 <p>Occupation:
 <input name='occupation' type='text' id='occupation' value='".$occupation."'>
 <input name='act' type='hidden' id='act' value='changesettings'>
 </p>
 <p>".$box."
 Notify me via email when I receive a new message or reward code</p>
 <p><u>Publically Viewable Details: </u></p>
 <p>Website:
 <input name='website' type='text' id='website' value='".$website."'>
 </p>
 <p>AIM Username:
 <input name='aim' type='text' id='aim' value='".$aim."'>
 </p>
 <p>YIM Username:
 <input name='yim' type='text' id='yim' value='".$yahoo."'>
 </p>
 <p>MSN Username:
 <input name='msn' type='text' id='msn' value='".$msn."'>
 <input name='act' type='hidden' id='act' value='changesettings'>
 </p>
 <p>
 <input type='submit' name='Submit' value='Submit Details'>
 </p>
 </form>";
 
 
 
 }
 }
 else{
 
 // No valid action specified...
 
 $article_title = "No Valid Action Specified";
 $article_content = "Invalid Action";
 
 
 
 }
 else{
 
 // Guest access to this page is forbidden
 
 $article_title = $accden;
 $article_content = $nopriv." ".$reqlogin;
 
 
 }
 
 
 
 // **********************************************************************
 // Begin Template Definition
 // **********************************************************************
 
 //Define our current theme
 $file = $themeurl;
 
 // Do the template changes and echo the ready template
 $template = file_get_contents($file);
 
 $template = replace(':ARTICLETITLE:',$article_title,$template);
 $template = replace(':ARTICLECONTENT:',$article_content,$template);
 $template = replace(':ARTICLEDATE:',$article_date,$template);
 
 $template = replace(':BROWSERTITLE:',$browsertitle,$template);
 $template = replace(':SITENAME:',$sitename,$template);
 
 //Define our links
 $template = replace(':LINKSBAR:',$links,$template);
 
 //Get the content for the side bar...
 
 $sidebar = getsidebar();
 $template = replace(':SIDEFEED:',$sidebar,$template);
 
 //Get the ad content...
 $template = replace(':ADS:',$ads,$template);
 
 //Get the slogan info
 $template = replace(':SLOGAN:',$slogan,$template);
 
 
 echo $template;
 
 // **********************************************************************
 // End Template Definition
 // **********************************************************************
 
 
 
 ?>
 And this for your profile.php
 
	PHP Code: 
		
			
<?php
 // **********************************************************************
 // Rusnak PHP Adoptables Script
 // Copyright 2009 Brandon Rusnak
 // For help and support: http://www.rusnakweb.com/forum/
 //
 // Redistribution prohibited without written permission
 // File ID: profile.php
 // Shows a user profile, or a member list.
 // **********************************************************************
 
 // Wake the sleeping giant
 
 // **********************************************************************
 // Basic Configuration Info
 // **********************************************************************
 
 include("inc/functions.php");
 include("inc/config.php");
 include("lang/lang.php");
 
 $themeurl = grabanysetting("themeurl");
 
 // **********************************************************************
 // Define our top links by calling getlinks()
 // **********************************************************************
 
 $links = getlinks();
 
 // **********************************************************************
 // Define our ads by calling getads()
 // **********************************************************************
 
 $ads = getads("any");
 
 // **********************************************************************
 // Grab any dynamic article content from the content table
 // **********************************************************************
 
 $pagecontent = getsitecontent("index");
 $article_title = $pagecontent[title];
 $article_content = $pagecontent[content];
 $article_content = nl2br($article_content);
 
 // **********************************************************************
 // Grab any settings that we will need for the current page from the DB
 // **********************************************************************
 
 $browsertitle = grabanysetting("browsertitle");
 $sitename = grabanysetting("sitename");
 $slogan = grabanysetting("slogan");
 
 // **********************************************************************
 // Check and see if the user is logged in to the site
 // **********************************************************************
 
 $loginstatus = logincheck();
 $isloggedin = $loginstatus[loginstatus];
 $loggedinname = $loginstatus[username];
 
 // **********************************************************************
 // End Prepwork - Output the page to the user
 // **********************************************************************
 
 
 // We did not specify a user, so show the memberlist
 
 $article_title = "Memberlist";
 $article_content = "Here are all of the members of this site, sorted by registration date.<br><br>";
 
 $query = "SELECT * FROM ".$prefix."users ORDER BY uid ASC";
 $result = mysql_query($query);
 $num = mysql_numrows($result);
 
 $rowsperpage = 15;
 $totalpages = ceil($num / $rowsperpage);
 
 if(is_numeric($page) and $page != ""){
 $currentpage = $page;
 }
 else{
 $currentpage = 1;
 }
 
 if ($currentpage > $totalpages) {
 $currentpage = $totalpages;
 }
 if ($currentpage < 1) {
 $currentpage = 1;
 }
 $offset = ($currentpage - 1) * $rowsperpage;
 
 $query = "SELECT * FROM ".$prefix."users ORDER BY uid ASC LIMIT $offset, $rowsperpage";
 $result = mysql_query($query);
 $num2 = mysql_numrows($result);
 
 //Loop out code
 $i=0;
 while ($i < $num2) {
 
 $id=@mysql_result($result,$i,"uid");
 $username=@mysql_result($result,$i,"username");
 $email=@mysql_result($result,$i,"email");
 $level=@mysql_result($result,$i,"usergroup");
 
 $star = "";
 $status = cancp($level);
 
 if($status == "yes"){
 $star = "<img src='templates/icons/star.gif' border=0'> ";
 }
 
 $article_content = $article_content."<b><a href='profile.php?user=".$username."'>".$star."".$username."</a></b><br>";
 
 $i++;
 }
 
 
 
 $article_content = $article_content."<br>";
 
 
 if($currentpage > 1) {
 $newpage = $currentpage - 1;
 $article_content = $article_content."<b><a href='profile.php?page=".$newpage."'><img src='templates/icons/prev.gif' border=0> Previous Page</a></b> ";
 }
 else{
 $article_content = $article_content."<b><img src='templates/icons/prev.gif' border=0> Previous Page</b> ";
 }
 if($currentpage < $totalpages) {
 $newpage = $currentpage + 1;
 $article_content = $article_content." ::  <b><a href='profile.php?page=".$newpage."'>Next Page <img src='templates/icons/next.gif' border=0></a></b> ";
 }
 else{
 $article_content = $article_content." ::  <b>Next Page <img src='templates/icons/next.gif' border=0></b>";
 
 }
 
 
 
 
 // **********************************************************************
 // Begin Template Definition
 // **********************************************************************
 
 //Define our current theme
 $file = $themeurl;
 
 // Do the template changes and echo the ready template
 $template = file_get_contents($file);
 
 $template = replace(':ARTICLETITLE:',$article_title,$template);
 $template = replace(':ARTICLECONTENT:',$article_content,$template);
 $template = replace(':ARTICLEDATE:',$article_date,$template);
 
 $template = replace(':BROWSERTITLE:',$browsertitle,$template);
 $template = replace(':SITENAME:',$sitename,$template);
 
 //Define our links
 $template = replace(':LINKSBAR:',$links,$template);
 
 //Get the content for the side bar...
 
 $sidebar = getsidebar();
 $template = replace(':SIDEFEED:',$sidebar,$template);
 
 //Get the ad content...
 $template = replace(':ADS:',$ads,$template);
 
 //Get the slogan info
 $template = replace(':SLOGAN:',$slogan,$template);
 
 
 echo $template;
 
 // **********************************************************************
 // End Template Definition
 // **********************************************************************
 
 
 
 ?>
 Those both should work now. |  Ok now Im really confused. Account file is still with problem but profile is good. Only when click on user(on profile.php) to see his profile it refresh page. |  OMG >.<
 
Okay, um let I'll have to wait till I get to my computer to compare the two. Ill probably end up just giving you my file page. And if that fails, Ill have to install it for you. |  Can you help me Bloodrun? |  Okay try this one for your account.php
 
	PHP Code: 
		
			
<?php
 // **********************************************************************
 // Rusnak PHP Adoptables Script
 // Copyright 2009 Brandon Rusnak
 // For help and support: http://www.rusnakweb.com/forum/
 //
 // Redistribution prohibited without written permission
 // **********************************************************************
 
 // Wake the sleeping giant
 
 // **********************************************************************
 // Basic Configuration Info
 // **********************************************************************
 
 include("inc/functions.php");
 include("inc/config.php");
 include("lang/lang.php");
 
 $themeurl = grabanysetting("themeurl");
 
 // **********************************************************************
 // Define our top links by calling getlinks()
 // **********************************************************************
 
 $links = getlinks();
 
 // **********************************************************************
 // Define our ads by calling getads()
 // **********************************************************************
 
 $ads = getads("account");
 
 // **********************************************************************
 // Grab any dynamic article content from the content table
 // **********************************************************************
 
 $pagecontent = getsitecontent("index");
 $article_title = $pagecontent[title];
 $article_content = $pagecontent[content];
 $article_content = nl2br($article_content);
 
 // **********************************************************************
 // Grab any settings that we will need for the current page from the DB
 // **********************************************************************
 
 $browsertitle = grabanysetting("browsertitle");
 $sitename = grabanysetting("sitename");
 $slogan = grabanysetting("slogan");
 
 // **********************************************************************
 // Check and see if the user is logged in to the site
 // **********************************************************************
 
 $loginstatus = logincheck();
 $isloggedin = $loginstatus[loginstatus];
 $loggedinname = $loginstatus[username];
 
 // **********************************************************************
 // End Prepwork - Output the page to the user
 // **********************************************************************
 
 $act = $_GET["act"];
 $act = preg_replace("/[^a-zA-Z0-9\\040.]/", "", $act);
 $act = secure($act);
 
 $more = $_GET["more"];
 $more = preg_replace("/[^a-zA-Z0-9\\040.]/", "", $more);
 $more = secure($more);
 
 if($isloggedin == "yes"){
 
 // We are logged in, so we must have an account
 // Now we switch through our actions...
 
 if($act == ""){
 
 // No action specified
 $query = "SELECT * FROM ".$prefix."users WHERE username='$loggedinname'";
 $result = mysql_query($query);
 $num = mysql_numrows($result);
 
 if($num > 0){
 
 $i=0;
 while ($i < 1) {
 
 $changewarning=@mysql_result($result,$i,"changewarning");
 
 // the following shows the member their warning level
 
 if($changewarning == "0"){
 $warn = "Your Warning Level: <img src='http://mycookie.co.cc/img/0.png'>";
 }
 else if($changewarning == "1"){
 $warn = "Your Warning Level: <img src='http://mycookie.co.cc/img/1.png'>";
 }
 else if($changewarning == "2"){
 $warn = "Your Warning Level: <img src='http://mycookie.co.cc/img/2.png'>";
 }
 else if($changewarning == "3"){
 $warn = "Your Warning Level: <img src='http://mycookie.co.cc/img/3.png'>";
 }
 else if($changewarning == "4"){
 $warn = "Your Warning Level: <img src='http://mycookie.co.cc/img/4.png'>";
 }
 else if($changewarning == "5"){
 $warn = "Your Warning Level: <img src='http://mycookie.co.cc/img/5.png'><br>You are currently banned, and cannot use the PM System.";
 }
 
 $i++;
 }
 }
 $article_title = $loggedinname."'s Account";
 $article_content = $lang_account_manage."<br><br>
 // the following gets the users warning level from above and places it within the article content.
 <b>".$warn."</b><br>
 <b><u>Account Settings:</u></b><br><br>
 <a href='myadopts.php'>Manage Adoptables</a><br>
 <a href='profile.php?user=".$loggedinname."'>View Profile</a><br>
 <a href='account.php?act=changeemail'>Change Email Address</a><br>
 <a href='account.php?act=changepass'>Change Password</a><br>
 <a href='account.php?act=changesettings'>Change Settings and Profile Info</a>";
 
 }
 else if($act == "changeemail"){
 
 // We are changing the user's email address
 
 $article_title = $lang_email_change_title;
 $article_content = $lang_email_change."<br><form name='form1' method='post' action='accountpost.php'>
 <p>New Email Address :
 <input name='email' type='text' id='email'>
 <input name='act' type='hidden' id='act' value='changeemail'>
 </p>
 <p>
 <input type='submit' name='Submit' value='Change Email Address'>
 </p>
 </form>";
 
 }
 else if($act == "changepass"){
 
 // We are changing the password
 
 $article_title = $lang_changepass_title;
 $article_content = $lang_changepass."<br><form name='form1' method='post' action='accountpost.php'>
 <p>Your Current Password:
 <input name='cpass' type='password' id='cpass'>
 </p>
 <p>Your New Password:
 <input name='np1' type='password' id='np1' maxlength='20'>
 </p>
 <p>Confirm New Password:
 <input name='np2' type='password' id='np2' maxlength='20'>
 <input name='act' type='hidden' id='act' value='changepass'>
 </p>
 <p>
 <input type='submit' name='Submit' value='Change Password'>
 </p>
 </form>";
 
 }
 else if($act == "changesettings"){
 
 // We are changing the settings
 
 $article_title = $lang_changesettings_title;
 $article_content = $lang_changesettings."<br>";
 
 // Get the user's account details from the database...
 
 $query = "SELECT * FROM ".$prefix."users WHERE username='$loggedinname'";
 $result = mysql_query($query);
 $num = mysql_numrows($result);
 
 //Loop out code
 $i=0;
 while ($i < 1) {
 
 // Get the user's account details from the database...
 
 $query = "SELECT * FROM ".$prefix."users WHERE username='$loggedinname'";
 $result = mysql_query($query);
 $num = mysql_numrows($result);
 
 //Loop out code
 $i=0;
 while ($i < 1) {
 
 $ame=@mysql_result($result,$i,"ame");
 $location=@mysql_result($result,$i,"location");
 $age=@mysql_result($result,$i,"age");
 $occupation=@mysql_result($result,$i,"occupation");
 $interests=@mysql_result($result,$i,"interests");
 $profilepic=@mysql_result($result,$i,"profilepic");
 $displayquote=@mysql_result($result,$i,"displayquote");
 $usercss=@mysql_result($result,$i,"usercss");
 
 $ame = stripslashes($ame);
 $location = stripslashes($location);
 $age = stripslashes($age);
 $occupation = stripslashes($occupation);
 $interests = stripslashes($interests);
 $profilepic = stripslashes($profilepic);
 $displayquote = stripslashes($displayquote);
 $usercss = stripslashes($usercss);
 
 
 $i++;
 }
 
 // Show the form...
 
 if($newmessagenotify == 1){
 $box = "<input name='newmsgnotify' type='checkbox' id='newmsgnotify' value='1' checked>";
 }
 else{
 $box = "<input name='newmsgnotify' type='checkbox' id='newmsgnotify' value='1'>";
 }
 
 $article_content = $article_content."<form name='form1' method='post' action='accountpost.php'>
 <p>Profile Layout:
 <textarea name='usercss' type='text' id='usercss' cols='80' rows='30'>".$usercss."</textarea>
 </p>
 <p>About Me: <br>
 <textarea name='ame' type='text' id='ame' cols='40' rows='3'>".$ame."</textarea>
 </p>
 <p>Interests: <br>
 <textarea name='interests' type='text' id='interests' cols='40' rows='3'>".$interests."</textarea>
 </p>
 <p>Location:
 <input name='location' type='text' id='location' value='".$location."'>
 </p>
 <p>Age:
 <input name='age' type='text' id='age' value='".$age."'>
 </p>
 <p>Display Picture:
 <input name='profilepic' type='text' id='profilepic' value='".$profilepic."'>
 </p>
 <p>Favorite Quote:
 <input name='displayquote' type='text' id='displayquote' value='".$displayquote."'>
 </p>
 <p>Occupation:
 <input name='occupation' type='text' id='occupation' value='".$occupation."'>
 <input name='act' type='hidden' id='act' value='changesettings'>
 </p>
 <p>".$box."
 Notify me via email when I receive a new message or reward code</p>
 <p><u>Publically Viewable Details: </u></p>
 <p>Website:
 <input name='website' type='text' id='website' value='".$website."'>
 </p>
 <p>AIM Username:
 <input name='aim' type='text' id='aim' value='".$aim."'>
 </p>
 <p>YIM Username:
 <input name='yim' type='text' id='yim' value='".$yahoo."'>
 </p>
 <p>MSN Username:
 <input name='msn' type='text' id='msn' value='".$msn."'>
 <input name='act' type='hidden' id='act' value='changesettings'>
 </p>
 <p>
 <input type='submit' name='Submit' value='Submit Details'>
 </p>
 </form>";
 
 
 
 }
 
 else{
 
 // No valid action specified...
 
 $article_title = "No Valid Action Specified";
 $article_content = "Invalid Action";
 
 
 }
 }
 else{
 
 // Guest access to this page is forbidden
 
 $article_title = $accden;
 $article_content = $nopriv." ".$reqlogin;
 
 
 }
 
 
 
 // **********************************************************************
 // Begin Template Definition
 // **********************************************************************
 
 //Define our current theme
 $file = $themeurl;
 
 // Do the template changes and echo the ready template
 $template = file_get_contents($file);
 
 $template = replace(':ARTICLETITLE:',$article_title,$template);
 $template = replace(':ARTICLECONTENT:',$article_content,$template);
 $template = replace(':ARTICLEDATE:',$article_date,$template);
 
 $template = replace(':BROWSERTITLE:',$browsertitle,$template);
 $template = replace(':SITENAME:',$sitename,$template);
 
 //Define our links
 $template = replace(':LINKSBAR:',$links,$template);
 
 //Get the content for the side bar...
 
 $sidebar = getsidebar();
 $template = replace(':SIDEFEED:',$sidebar,$template);
 
 //Get the ad content...
 $template = replace(':ADS:',$ads,$template);
 
 //Get the slogan info
 $template = replace(':SLOGAN:',$slogan,$template);
 
 
 echo $template;
 
 // **********************************************************************
 // End Template Definition
 // **********************************************************************
 
 
 
 ?>
 |  Error:
 
	Code: Parse error: syntax error, unexpected T_ELSE in /home/a1400075/public_html/account.php on line 274 ****! This is geting me crazy :( |  Okay screw it, use mine. And I have to ask you don't swear =/
 
	PHP Code: 
		
			
<?php
 
 include("inc/functions.php");
 include("inc/config.php");
 include("lang/lang.php");
 
 $themeurl = grabanysetting("themeurl");
 
 // **********************************************************************
 // Define our top links by calling getlinks()
 // **********************************************************************
 
 $links = getlinks();
 
 // **********************************************************************
 // Define our ads by calling getads()
 // **********************************************************************
 
 $ads = getads("account");
 
 // **********************************************************************
 // Grab any dynamic article content from the content table
 // **********************************************************************
 
 $pagecontent = getsitecontent("index");
 $article_title = $pagecontent[title];
 $article_content = $pagecontent[content];
 $article_content = nl2br($article_content);
 
 // **********************************************************************
 // Grab any settings that we will need for the current page from the DB
 // **********************************************************************
 
 $browsertitle = grabanysetting("browsertitle");
 $sitename = grabanysetting("sitename");
 $slogan = grabanysetting("slogan");
 
 // **********************************************************************
 // Check and see if the user is logged in to the site
 // **********************************************************************
 
 $loginstatus = logincheck();
 $isloggedin = $loginstatus[loginstatus];
 $loggedinname = $loginstatus[username];
 
 // **********************************************************************
 // End Prepwork - Output the page to the user
 // **********************************************************************
 
 $act = $_GET["act"];
 $act = preg_replace("/[^a-zA-Z0-9\\040.]/", "", $act);
 $act = secure($act);
 
 $more = $_GET["more"];
 $more = preg_replace("/[^a-zA-Z0-9\\040.]/", "", $more);
 $more = secure($more);
 
 
 
 
 if($isloggedin == "yes"){
 
 // We are logged in, so we must have an account
 // Now we switch through our actions...
 
 if($act == ""){
 
 // No action specified
 
 
 $article_title = $loggedinname."'s Account";
 $article_content = $lang_account_manage."<br><br>
 <b><u>Account Settings:</u></b><br><br>
 <a href='profile2.php?user=".$loggedinname."'>View Profile</a><br>
 <a href='account.php?act=changeemail'>Change Email Address</a><br>
 <a href='account.php?act=changepass'>Change Password</a><br>
 <a href='account.php?act=changesettings'>Change Settings and Profile Info</a>";
 }
 }
 else if($act == "changeemail"){
 
 // We are changing the user's email address
 
 $article_title = $lang_email_change_title;
 $article_content = $lang_email_change."<br><form name='form1' method='post' action='accountpost.php'>
 <p>New Email Address :
 <input name='email' type='text' id='email'>
 <input name='act' type='hidden' id='act' value='changeemail'>
 </p>
 <p>
 <input type='submit' name='Submit' value='Change Email Address'>
 </p>
 </form>";
 
 }
 else if($act == "changepass"){
 
 // We are changing the password
 
 $article_title = $lang_changepass_title;
 $article_content = $lang_changepass."<br>
 
 
 <form name='form1' method='post' action='accountpost.php'>
 <p>Your Current Password:
 <input name='cpass' type='password' id='cpass'>
 </p>
 <p>Your New Password:
 <input name='np1' type='password' id='np1' maxlength='20'>
 </p>
 <p>Confirm New Password:
 <input name='np2' type='password' id='np2' maxlength='20'>
 <input name='act' type='hidden' id='act' value='changepass'>
 </p>
 <p>
 <input type='submit' name='Submit' value='Change Password'>
 </p>
 </form>";
 
 }
 else if($act == "changesettings"){
 
 // We are changing the settings
 
 $article_title = $lang_changesettings_title;
 $article_content = $lang_changesettings."<br>";
 
 // Get the user's account details from the database...
 
 $query = "SELECT * FROM ".$prefix."users WHERE username='$loggedinname'";
 $result = mysql_query($query);
 $num = mysql_numrows($result);
 
 //Loop out code
 $i=0;
 while ($i < 1) {
 
 $newmessagenotify=@mysql_result($result,$i,"newmessagenotify");
 $website=@mysql_result($result,$i,"website");
 $aim=@mysql_result($result,$i,"aim");
 $yahoo=@mysql_result($result,$i,"yahoo");
 $msn=@mysql_result($result,$i,"msn");
 $ame=@mysql_result($result,$i,"ame");
 $location=@mysql_result($result,$i,"location");
 $age=@mysql_result($result,$i,"age");
 $occupation=@mysql_result($result,$i,"occupation");
 $interests=@mysql_result($result,$i,"interests");
 $profilepic=@mysql_result($result,$i,"profilepic");
 $displayquote=@mysql_result($result,$i,"displayquote");
 $usercss=@mysql_result($result,$i,"usercss");
 $friends=@mysql_result($result,$i,"friends");
 $signature=@mysql_result($result,$i,"signature");
 
 
 
 $website = stripslashes($website);
 $aim = stripslashes($aim);
 $yahoo = stripslashes($yahoo);
 $msn = stripslashes($msn);
 $ame = stripslashes($ame);
 $location = stripslashes($location);
 $age = stripslashes($age);
 $occupation = stripslashes($occupation);
 $interests = stripslashes($interests);
 $profilepic = stripslashes($profilepic);
 $displayquote = stripslashes($displayquote);
 $usercss = stripslashes($usercss);
 $friends = stripslashes($friends);
 $signature = stripslashes($signature);
 
 
 
 
 $i++;
 }
 
 
 
 
 // Show the form...
 
 if($newmessagenotify == 1){
 $box = "<input name='newmsgnotify' type='checkbox' id='newmsgnotify' value='1' checked>";
 }
 else{
 $box = "<input name='newmsgnotify' type='checkbox' id='newmsgnotify' value='1'>";
 }
 
 $article_content = $article_content."<br><br><br><br><br>
 
 <form name='form1' method='post' action='accountpost.php'>
 <p>".$box."
 Notify me via email when I receive a new message or reward code</p>
 <p><u>Publically Viewable Details: </u></p>
 
 <p>
 Profile Layout:<br>
 <textarea name='usercss' type='text' id='usercss' cols='80' rows='30'>".$usercss."</textarea>
 </p>
 
 <p>Website:
 <input name='website' type='text' id='website' value='".$website."'>
 </p>
 <p>AIM Username:
 <input name='aim' type='text' id='aim' value='".$aim."'>
 </p>
 <p>YIM Username:
 <input name='yim' type='text' id='yim' value='".$yahoo."'>
 </p>
 <p>MSN Username:
 <input name='msn' type='text' id='msn' value='".$msn."'>
 </p>
 <p>About Me: <br>
 <textarea name='ame' type='text' id='ame' cols='40' rows='3'>".$ame."</textarea>
 </p>
 <p>Interests: <br>
 <textarea name='interests' type='text' id='interests' cols='40' rows='3'>".$interests."</textarea>
 </p>
 <p>Location:
 <input name='location' type='text' id='location' value='".$location."'>
 </p>
 <p>Age:
 <input name='age' type='text' id='age' value='".$age."'>
 </p>
 <p>Favorite Quote:
 <input name='displayquote' type='text' id='displayquote' value='".$displayquote."'>
 </p>
 <p>Occupation:
 <input name='occupation' type='text' id='occupation' value='".$occupation."'>
 <input name='act' type='hidden' id='act' value='changesettings'>
 </p>
 
 <p>Display Picture:
 <input name='profilepic' type='text' id='profilepic' value='".$profilepic."'>
 </p>
 <p>Friends, make sure to seperate each one with a comma and space:<br>
 <textarea name='friends' type='text' id='friends' cols='40' rows='3'> ".$friends."</textarea><br>
 </p>
 <p>Forum signature, a max character limit of 800 is in effect:<br>
 <textarea name='signature' type='text' id='signature' cols='40' rows='3'>".$signature."</textarea><br>
 </p>
 <p>
 <input type='submit' name='Submit' value='Submit Details'>
 </p>
 
 </form>";
 
 
 
 }
 else{
 
 // No valid action specified...
 
 $article_title = "No Valid Action Specified";
 $article_content = "Invalid Action";
 
 }
 
 }
 else{
 
 // Guest access to this page is forbidden
 
 $article_title = $accden;
 $article_content = $nopriv." ".$reqlogin;
 
 
 }
 
 
 
 
 
 
 
 
 // **********************************************************************
 // Begin Template Definition
 // **********************************************************************
 
 //Define our current theme
 $file = $themeurl;
 
 // Do the template changes and echo the ready template
 $template = file_get_contents($file);
 
 $template = replace(':ARTICLETITLE:',$article_title,$template);
 $template = replace(':ARTICLECONTENT:',$article_content,$template);
 $template = replace(':ARTICLEDATE:',$article_date,$template);
 
 $template = replace(':BROWSERTITLE:',$browsertitle,$template);
 $template = replace(':SITENAME:',$sitename,$template);
 
 //Define our links
 $template = replace(':LINKSBAR:',$links,$template);
 
 //Get the content for the side bar...
 
 $sidebar = getsidebar();
 $template = replace(':SIDEFEED:',$sidebar,$template);
 
 //Get the ad content...
 $template = replace(':ADS:',$ads,$template);
 
 //Get the slogan info
 $template = replace(':SLOGAN:',$slogan,$template);
 
 
 echo $template;
 
 // **********************************************************************
 // End Template Definition
 // **********************************************************************
 
 
 
 ?>
 
			
			
			
			
				  |