Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 05-25-2009, 08:02 PM
Saphira Saphira is offline
Member
 
Join Date: Jan 2009
Posts: 89
Credits: 6,999
Saphira
Default Parse error: syntax error, unexpected T_ELSE in /home/.nyles/

On line 264. (lol topic title wasn't long enough.)

Line 264 has the underline bbcode around it:

PHP Code:
else if($act == "sentitems"){

}
else{

// No valid action...

$article_title $lang_invalidact_title;
$article_content $lang_invalidact;

}


[
u]else{[/u]

// User is either not logged in or does not have the proper privledges to send messages...

$article_title $lang_title_pmdenied;
$article_content $lang_pmdenied;


Reply With Quote
  #2  
Old 05-25-2009, 08:41 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 13,569
BMR777 is on a distinguished road
Default RE: Parse error: syntax error, unexpected T_ELSE in /home/.nyles/

What file is this in? Have you made any changes to the code for this file or is this file a part of a mod?

Try re-uploading a fresh copy of this file if it is from my script.
Reply With Quote
  #3  
Old 05-25-2009, 10:12 PM
Saphira Saphira is offline
Member
 
Join Date: Jan 2009
Posts: 89
Credits: 6,999
Saphira
Default RE: Parse error: syntax error, unexpected T_ELSE in /home/.nyles/

This is a part of messages.php, and yeah, I made the changes for the warning system mod. If I re-upload a fresh copy then the warning system won't work. :[
Reply With Quote
  #4  
Old 05-26-2009, 07:23 AM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 35,893
Bloodrun
Send a message via Yahoo to Bloodrun
Default RE: Parse error: syntax error, unexpected T_ELSE in /home/.nyles/

[s]Well for one thing. The else/else if/and if's can't have around them. You need to get rid of that.[/s]

Lol whoopsy daisy, thats for the indication of the line nvmd.

Anyway, you are either missing one of two things, or both:

A left bracket that closes the very top 'if' statement, such as:

if($isloggedin == "yes"){

} <--

else{

}

Or, you erased a 'if' statement, its more likely the first.
Reply With Quote
  #5  
Old 05-26-2009, 11:43 AM
Saphira Saphira is offline
Member
 
Join Date: Jan 2009
Posts: 89
Credits: 6,999
Saphira
Default RE: Parse error: syntax error, unexpected T_ELSE in /home/.nyles/

Well, it all looks okay to me, I don't think that there are any }'s out of place. (I don't remember changing any). Would you look through my messages.php for me and see what you think? Coz this is the only problem I have with everything now lol.
Reply With Quote
  #6  
Old 05-26-2009, 11:45 AM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 35,893
Bloodrun
Send a message via Yahoo to Bloodrun
Default RE: Parse error: syntax error, unexpected T_ELSE in /home/.nyles/

Quote:
Originally Posted by sarge
Well, it all looks okay to me, I don't think that there are any }'s out of place. (I don't remember changing any). Would you look through my messages.php for me and see what you think? Coz this is the only problem I have with everything now lol.
Yeah, just post a copy of your file. =D
Reply With Quote
  #7  
Old 05-26-2009, 12:08 PM
Saphira Saphira is offline
Member
 
Join Date: Jan 2009
Posts: 89
Credits: 6,999
Saphira
Default RE: Parse error: syntax error, unexpected T_ELSE in /home/.nyles/

The messages.php file in a .txt file

Thanks!
Reply With Quote
  #8  
Old 05-26-2009, 12:17 PM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 35,893
Bloodrun
Send a message via Yahoo to Bloodrun
Default RE: Parse error: syntax error, unexpected T_ELSE in /home/.nyles/

Quote:
Originally Posted by sarge
Okay I am looking at right now. And I need to tell you first while Im looking at it. That when I was making the report feature, i took out the part that deals with "sent items" I took that part out, because I dont use it, and at the time I wasn't thinking about if anyone else used it or not, I will have to add that part back in soon.

This isn't whats making your script not work, I just needed to tell you that.

Okay I need to know what exactly you changed, because I found brackets in the file that were missing/any totally the wrong places.
Reply With Quote
  #9  
Old 05-26-2009, 12:25 PM
Saphira Saphira is offline
Member
 
Join Date: Jan 2009
Posts: 89
Credits: 6,999
Saphira
Default RE: Parse error: syntax error, unexpected T_ELSE in /home/.nyles/

Quote:
Originally Posted by Bloodrun
Okay I am looking at right now. And I need to tell you first while Im looking at it. That when I was making the report feature, i took out the part that deals with "sent items" I took that part out, because I dont use it, and at the time I wasn't thinking about if anyone else used it or not, I will have to add that part back in soon.

This isn't whats making your script not work, I just needed to tell you that.
So that'd be:

PHP Code:
else if($act == "sentitems"){


?

I wouldn't really use it either, and if the members want it I can always add it back from the original source code.
Reply With Quote
  #10  
Old 05-26-2009, 12:27 PM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 35,893
Bloodrun
Send a message via Yahoo to Bloodrun
Default RE: Parse error: syntax error, unexpected T_ELSE in /home/.nyles/

Quote:
Originally Posted by sarge
Quote:
Originally Posted by Bloodrun
Okay I am looking at right now. And I need to tell you first while Im looking at it. That when I was making the report feature, i took out the part that deals with "sent items" I took that part out, because I dont use it, and at the time I wasn't thinking about if anyone else used it or not, I will have to add that part back in soon.

This isn't whats making your script not work, I just needed to tell you that.
So that'd be:

PHP Code:
else if($act == "sentitems"){


?

I wouldn't really use it either, and if the members want it I can always add it back from the original source code.
Your fixed code:

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("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
// **********************************************************************

$ugroup getgroup();
$canpm cando($ugroup"canpm");

if(
$isloggedin == "yes" and $canpm == "yes"){

// Get our actions...

$act $_GET["act"];
$act preg_replace("/[^a-zA-Z0-9\\040.]/"""$act);
$act secure($act);

$user $_GET["user"];
$user preg_replace("/[^a-zA-Z0-9\\040.]/"""$user);
$user secure($user);

$id $_GET["id"];
$id preg_replace("/[^a-zA-Z0-9\\040.]/"""$id);
$id secure($id);

if(
$act == "" or $act == "list"){

// We are showing the users all of their PMs...

$article_title $lang_mypms_title;
$article_content $lang_mypms."";

// Select all of the messages from the database...

$query "SELECT * FROM ".$prefix."messages WHERE touser='".$loggedinname."' ORDER BY id DESC";
$result mysql_query($query);
$num mysql_numrows($result);

if(
$num 0){

$article_content $article_content."<br><b><a href='messages.php?act=send'><img src='templates/icons/fans.gif' border=0> ".$lang_sendnewpm."</a></b><br><br><table width='550' border='1'>
  <tr>
    <td width='155'><strong>Message Title:</strong></td>
    <td width='98'><strong>From:</strong></td>
    <td width='68'><strong>Status:</strong></td>
    <td width='118'><strong>Date Received:</strong></td>
    <td width='77'><strong>Delete:</strong></td>
  </tr>"
;

//Loop out code
$i=0;
while (
$i $num) {

$nid=@mysql_result($result,$i,"id"); 
$status=@mysql_result($result,$i,"status"); 
$datesent=@mysql_result($result,$i,"datesent"); 
$fromuser=@mysql_result($result,$i,"fromuser"); 
$messagetitle=@mysql_result($result,$i,"messagetitle"); 

$messagetitle stripslashes($messagetitle);

if(
$fromuser != "SYSTEM"){
$fromuser "<a href='profile.php?user=".$fromuser."' target='_blank'>".$fromuser."</a>";
}

if(
$status == "unread"){
$status "<b>unread</b>";
}

$article_content $article_content."<tr>
    <td><b><a href='messages.php?act=read&id="
.$nid."'>".$messagetitle."</a></b></td>
    <td>"
.$fromuser."</td>
    <td><center>"
.$status."</center></td>
    <td><center>"
.$datesent."</center></td>
    <td><center><a href='messages.php?act=delete&id="
.$nid."'><img src='templates/icons/delete.gif' border=0></a></center></td>
  </tr>"
;

$i++;
}

$article_content $article_content."</table><br>";

}
else{

$article_content $article_content."".$lang_nopms."";

}

}
else if(
$act == "read"){

// We are reading a PM...

$query "SELECT * FROM ".$prefix."messages WHERE touser='".$loggedinname."' AND id='".$id."'";
$result mysql_query($query);
$num mysql_numrows($result);

if(
$num 0){

//Loop out code
$i=0;
while (
$i 1) {

$nid=@mysql_result($result,$i,"id"); 
$status=@mysql_result($result,$i,"status"); 
$datesent=@mysql_result($result,$i,"datesent"); 
$fromuser=@mysql_result($result,$i,"fromuser"); 
$touser=@mysql_result($result,$i,"touser"); 
$messagetitle=@mysql_result($result,$i,"messagetitle"); 
$messagetext=@mysql_result($result,$i,"messagetext");

$messagetitle stripslashes($messagetitle);
$messagetext stripslashes($messagetext);

$i++;
}

$article_title "Message From ".$fromuser.":";
$article_content "<b><u>Message Title:</u></b> ".$messagetitle."<br>
<b><u>Message Text:</u></b> "
.$messagetext."<br><br><b><a href='messages.php'><img src='templates/icons/next.gif' border=0> Return to Inbox</a><br> 
<a href='messages.php?act=send&user="
.$fromuser."'><img src='templates/icons/comment.gif' border=0> Reply to this Message</a></b>
<br><a href='messages.php?act=report&user="
.$fromuser."'><img src='templates/icons/next.gif' border=0> Report this member</a><br></b>"
// Set the message as read...

    
$query "UPDATE ".$prefix."messages SET status='read' WHERE id='".$nid."'";
    
mysql_query($query);

}
else{

// Message Does Not Exist...

$article_title $lang_messagenoexist_title;
$article_content $lang_messagenoexist;

}



}
else if(
$act == "send" or $act == "newpm"){

// Send a new message to someone else...

$article_title $lang_sendnew_title;
$article_content $lang_sendnew."<br><form name='form1' method='post' action='pmpost.php'>
  <p>Message Recipient: 
    <input name='pmto' type='text' id='pmto' maxlength='50' value='"
.$user."'>
</p>
  <p>Message Title: 
    <input name='mtitle' type='text' id='mtitle' maxlength='25'>
</p>
  <p>Message Text:  </p>
  <p>
    <textarea name='mtext' cols='45' id='mtext'></textarea>
</p>
  <p>
    <input type='submit' name='Submit' value='Send Private Message'>
</p>
</form>"


}
else if(
$act == "report"){

$id=$_GET['id'];
$article_title "Reporting a Member";
$article_content "You may report a member here, by providing a reason. Please only report a member if he/she is harassing you, or constantly spamming your inbox. This isn't a toy, and shouldn't be treated as such.<br><form name='form1' method='post' action='reportpost.php'>
  <p>
    <input name='member' type='hidden' id='member' maxlength='50' value='"
.$user."'>
</p>
  <p>
    <input name='fromuser' type='hidden' id='fromuser' maxlength='50' value='"
.$loggedinname."'>
</p>
  <p>Reason:  </p>
  <p>
    <textarea name='reason' cols='45' id='reason'></textarea>
</p>
  <p>
    <input type='submit' name='Submit' value='Send Report'>
</p>
</form>"



else if(
$act == "delete"){

// We are deleting a message...

$query "DELETE FROM ".$prefix."messages WHERE touser='".$loggedinname."' and id='".$id."'";
mysql_query($query);

$article_title $lang_delete_successful_t;
$article_content $lang_delete_successful;

}

}

else{

// User is either not logged in or does not have the proper privledges to send messages...

$article_title $lang_title_pmdenied;
$article_content $lang_pmdenied;

}


// **********************************************************************
// 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
// **********************************************************************



?>
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse error: syntax error, unexpected T_STRING MikiHeart Questions and Supports 29 10-31-2013 01:46 AM
Parse Error on clean install of 3.4 KirinCrossing Newcomer Center 3 09-09-2013 03:09 AM
ACP Error : Fatal error: Class 'AppController' not found in... Isura Questions and Supports 39 06-17-2013 03:26 AM
php 5.2 error powerchaos Questions and Supports 6 12-04-2012 07:32 PM
Parse error with myadopts.php Aasixx Questions and Supports 4 05-05-2012 11:05 PM


All times are GMT -5. The time now is 04:46 PM.

Currently Active Users: 865 (0 members and 865 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636