close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Problem with Boss

Thread began 1/06/2011 7:31 am by rico-m345501 | Last modified 1/07/2011 10:33 am by Jason Byrnes | 7794 views | 25 replies |

rico-m345501

Problem with Boss

Hello,
I have a problem with search for boss. I follow the steps in the tutorial, and then comes the following error message:
Parse error: syntax error, unexpected '}' in /mnt/weba/30/30/5593230/htdocs/fotos/results.php on line 69

Here can you see:
results.php

how can I solve the problem?

Sign in to reply to this post

Jason ByrnesWebAssist

please send a copy of your page so i can examine the code.

Sign in to reply to this post

rico-m345501

This is the Code from results.php
<?php
if ("".($Search1_BOSS_all) ."" > "0") { // WebAssist Show If
?>
<div>Viewing records <?php echo($Search1_BOSS_start); ?> to <?php echo($Search1_BOSS_end); ?> of <?php echo($Search1_BOSS_all); ?></div>
<div>
<?php
if ("".($Search1_BOSS_start) ."" != "1") { // WebAssist Show If
?>
<a href="<?php echo(getBOSSURL("Search1","first")); ?>">&lt;&lt;</a> <a href="<?php echo(getBOSSURL("Search1","previous")); ?>">&lt;</a>
<?php
} // ("".($Search1_BOSS_start) ."" != "1")
?>
<?php
if ("".($Search1_BOSS_end) ."" != "".($Search1_BOSS_all) ."") { // WebAssist Show If
?>
<a href="<?php echo(getBOSSURL("Search1","next")); ?>">&gt;</a> <a href="<?php echo(getBOSSURL("Search1","last")); ?>">&gt;&gt;</a>
<?php
} // ("".($Search1_BOSS_end) ."" != "".($Search1_BOSS_all) ."")
?>
</div>
<?php
} // ("".($Search1_BOSS_all) ."" > "0")
?>
<?php
if ("".($Search1_BOSS_all) ."" == "0") { // WebAssist Show If
?>
<div>No results found matching your search.</div>
<?php
} // ("".($Search1_BOSS_all) ."" == "0")
?>
<?php require_once("Yahoo/BOSS_include.php"); ?>
<?php
$Search1_BOSS_page_size = 10;
$Search1_BOSS_appID = "KwAW.dfV34FRo8WDt.sKj0tjyuLNnGRKH0Eclarc2bnBaAjvQWXz988wadpjWbxZFXcY";
$Search1_BOSS_domain = "http://lenkercrew.de/";
$Search1_BOSS_result = "";
$Search1_BOSS_start = 0;
$Search1_BOSS_end = 0;
$Search1_BOSS_all = 0;
$Search1_BOSS_index = 0;
$Search1_BOSS_term = "";
if($Search1_BOSS_page_size > 50) {
$Search1_BOSS_page_size = 50;
}
if(isset($_GET['Search1_BOSS_start']) && preg_match("/[0-9]+/",$_GET['Search1_BOSS_start'])) {
$Search1_BOSS_start = $_GET['Search1_BOSS_start'];
}
if (!session_id()) session_start();
if ("bold" != "") {
$Search1_BOSS_term = "bold";
$word = "/^[a-z|A-Z|0-9| |-|\"]+$/";
if(!preg_match($word,$Search1_BOSS_term)) {
$Search1_BOSS_term = "";
}
$_SESSION['Search1_BOSS_term'] = $Search1_BOSS_term;
} else if (isset($_SESSION['Search1_BOSS_term']) && $_SESSION['Search1_BOSS_term'] != "") {
$Search1_BOSS_term = $_SESSION['Search1_BOSS_term'];
}
if ($Search1_BOSS_term != "") {
$Search1_BOSS_result = getBOSSResults($Search1_BOSS_term, $Search1_BOSS_start, $Search1_BOSS_appID, $Search1_BOSS_domain, $Search1_BOSS_page_size);
if (!empty($Search1_BOSS_result)) {
$Search1_BOSS_feed = new SimpleXMLElement($Search1_BOSS_result); // convert the XML string into ab object structure
$Search1_BOSS_all = $Search1_BOSS_feed->resultset_web['totalhits']; // get the amount of results
if ($Search1_BOSS_all > 1000) $Search1_BOSS_all = 1000;
$Search1_BOSS_start = $Search1_BOSS_feed->resultset_web['start'];
$Search1_BOSS_end = ($Search1_BOSS_all > $Search1_BOSS_start+$Search1_BOSS_page_size) ? $Search1_BOSS_start+$Search1_BOSS_page_size : $Search1_BOSS_all;
if ($Search1_BOSS_end!=0) $Search1_BOSS_start = $Search1_BOSS_start+1;
} else {
$Search1_BOSS_start = 0;
}
}
?>
<?php
while ($Search1_BOSS_index <= ($Search1_BOSS_end - $Search1_BOSS_start ) && $Search1_BOSS_end != 0) {
?>
<div>
<h3><a href="<?php echo(getBOSSValue($Search1_BOSS_feed,$Search1_BOSS_index,"result url")); ?>"><?php echo(getBOSSValue($Search1_BOSS_feed,$Search1_BOSS_index,"title")); ?></a></h3>
<div><?php echo(getBOSSValue($Search1_BOSS_feed,$Search1_BOSS_index,"abstract")); ?></div>
<?php echo(getBOSSValue($Search1_BOSS_feed,$Search1_BOSS_index,"keywords")); ?> </div>
<?php
$Search1_BOSS_index ++;
}
$Search1_BOSS_index = 0;
?>

Sign in to reply to this post

Jason ByrnesWebAssist

please send the php page in a zip archive so i can open it in dreamweaver to navigate to line 69 where the error is occurring.

Sign in to reply to this post

rico-m345501

Error Message

here is the file...

Attached Files
results.zip
Sign in to reply to this post

Jason ByrnesWebAssist

it looks like some code was deleted from the page.


The code causing the error is lines 68 - 70:
<?php
} // ("".($Search1_BOSS_all) ."" > "0")
?>

the error is occurring because the corresponding opening if statement was removed. add this if statement before the opening body tag:

php:
<?php

  
if ("".($Search1_BOSS_all)  ."" "0") {  // WebAssist Show If
?>
Sign in to reply to this post

rico-m345501

the code is on line 1-3. I dont understand.

Sign in to reply to this post

Jason ByrnesWebAssist

it is not in the file you sent me. the code from the body tag that you sent to me is:

php:
<body>

<div>Viewing records <?php echo($Search1_BOSS_start); ?> to <?php echo($Search1_BOSS_end); ?> of <?php echo($Search1_BOSS_all); ?></div>
<div>



it should be:

php:
<body>

<?php
  
if ("".($Search1_BOSS_all)  ."" "0") {  // WebAssist Show If
?> 
<div>Viewing records <?php echo($Search1_BOSS_start); ?> to <?php echo($Search1_BOSS_end); ?> of <?php echo($Search1_BOSS_all); ?></div>
<div>




when i edited the page you sent me to include that code, it worked.

Sign in to reply to this post

rico-m345501

The file in the Zip archive is also on the server, nevertheless, there comes the same error message.

Attached Files
results.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the file in the zip archive has the following at line 50 - 52:

php:
<body>

<div>Viewing records <?php echo($Search1_BOSS_start); ?> to <?php echo($Search1_BOSS_end); ?> of <?php echo($Search1_BOSS_all); ?></div>
<div>



it needs to be changed to:

php:
<body>

<?php
  
if ("".($Search1_BOSS_all)  ."" "0") {  // WebAssist Show If
?> 
<div>Viewing records <?php echo($Search1_BOSS_start); ?> to <?php echo($Search1_BOSS_end); ?> of <?php echo($Search1_BOSS_all); ?></div>
<div>



as suggested previously.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...