Adobe Dreamweaver Forums



Last 10 THreads :         Seeking advise on flv in Captivate 3 (Last Post : 9060 - Replies : 0 - Views : 1 )           »          Global variables (Last Post : jfb00 - Replies : 0 - Views : 1 )           »          catching errors from remotely invoked processes (Last Post : Cr99 - Replies : 4 - Views : 5 )           »          Dreamweaver CS4 Beta Uninstaller? (Last Post : _Burn_ - Replies : 0 - Views : 1 )           »          Div or iFrame resize depending on content. (Last Post : Nancy O - Replies : 5 - Views : 7 )           »          Flex and ColdFusion web services (Last Post : jfb00 - Replies : 1 - Views : 2 )           »          Advanced datagrid using Remote Objects (Last Post : rkcy - Replies : 5 - Views : 6 )           »          Flickering tooltip in bottom right corner (Last Post : aperitech - Replies : 4 - Views : 5 )           »          Change Font on Buttons (Last Post : CJ KY - Replies : 0 - Views : 1 )           »          RoboHelp & Knowledge Bases (Last Post : lmarden - Replies : 2 - Views : 3 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Dreamweaver: Main > Dreamweaver Application Development
 
Tags: ,



Reply
  #1 (permalink)  
Old 08-27-2008, 11:00 PM
Bipalla
 
Posts: n/a
Diggs:
Default Newland Tours

Can somebody help please.
In Newland Tours (DreamweaverMX or Dreamweaver 8 with asp,coldfusion and php,
by Jeffrey Bardzell), there is a problem with the Navigation bar, I think. I
have added 5 more tours to Country Italy making 6 tours in total for Italy. If
i select Italy from the list/menu (By Country) the first five tours are listed
which is ok as Repeat Region is set to 5 but when I click NEXT it jumps to
Highlights of Nothern India instead of the 6th tour for Italy, if I click
PREVIOUS it jumps to Highlights of Argentina.... Please, please can anybody
help and tell me what to do to solve this problem. Many thanks




Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-31-2008, 11:38 PM
Coach Bob
 
Posts: n/a
Diggs:
Default Re: Newland Tours

@Bipalla

Have you compared your code to the code in the Complete folder in the book?
The code should be the same. It should not be affected by the number of records
in the database.

If the code is the same as the completed code example, please post it here and
give reference to the page number of the book.

Bob

Reply With Quote
  #3 (permalink)  
Old 09-01-2008, 09:17 PM
Bipalla
 
Posts: n/a
Diggs:
Default Re: Newland Tours

Hi Bob,
Thank you very much for your reply.
I have installed Newland Tours on my system from the CD (Dreamweaver 8 with
ASP, Coldfusion, and PHP ? Jeffrey Bardzell), I have also added 5 more tours in
the database to country United Kingdom making it 7 altogether - the Repeat
Region was set to 6 on the CD . When you go to Find Tours/By Country and click
on United Kingdom, the first 6 tours are displayed fine but when you click
NEXT on the Nav Bar it jumps to Highlights of Argentina?.
On the above book see pages from 351-361
This is the code:
?>
<?php require_once('Connections/conn_newland.php'); ?>
<?php
$currentPage = $_SERVER["PHP_SELF"];

$maxRows_rs_tourDetail = 6;
$pageNum_rs_tourDetail = 0;
if (isset($_GET['pageNum_rs_tourDetail'])) {
$pageNum_rs_tourDetail = $_GET['pageNum_rs_tourDetail'];
}
$startRow_rs_tourDetail = $pageNum_rs_tourDetail * $maxRows_rs_tourDetail;

mysql_select_db($database_conn_newland, $conn_newland);

if (!isset($_POST['tourCountry'])) {
if (!isset($_GET['regionID'])) {
$query_rs_tourDetail = "SELECT * FROM tbl_tours INNER JOIN tbl_country ON
tbl_country.countryID = tbl_tours.country ORDER BY tbl_country.countryName";
} else {
$query_rs_tourDetail = "SELECT * FROM tbl_tours INNER JOIN tbl_country ON
tbl_country.countryID = tbl_tours.country WHERE
tbl_country.region=".$_GET['regionID']." ORDER BY tbl_country.countryName";
}
} else {
$query_rs_tourDetail = "SELECT * FROM tbl_tours INNER JOIN tbl_country ON
tbl_country.countryID = tbl_tours.country WHERE
tbl_country.countryName='".$_POST['tourCountry']."' ORDER BY
tbl_country.countryName";
}


$query_limit_rs_tourDetail = sprintf("%s LIMIT %d, %d", $query_rs_tourDetail,
$startRow_rs_tourDetail, $maxRows_rs_tourDetail);
$rs_tourDetail = mysql_query($query_limit_rs_tourDetail, $conn_newland) or
die(mysql_error());
$row_rs_tourDetail = mysql_fetch_assoc($rs_tourDetail);

if (isset($_GET['totalRows_rs_tourDetail'])) {
$totalRows_rs_tourDetail = $_GET['totalRows_rs_tourDetail'];
} else {
$all_rs_tourDetail = mysql_query($query_rs_tourDetail);
$totalRows_rs_tourDetail = mysql_num_rows($all_rs_tourDetail);
}
$totalPages_rs_tourDetail =
ceil($totalRows_rs_tourDetail/$maxRows_rs_tourDeta il)-1;

$queryString_rs_tourDetail = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_rs_tourDetail") == false &&
stristr($param, "totalRows_rs_tourDetail") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_rs_tourDetail = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_rs_tourDetail = sprintf("&totalRows_rs_tourDetail=%d%s",
$totalRows_rs_tourDetail, $queryString_rs_tourDetail);
?><!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>
<title>Newland Tours: Tour Descriptions</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="css/newland.css" rel="stylesheet" type="text/css" />
</head>

<body>
<a href="#top"><img src="images/spacer.gif" alt="Skip to main page content"
width="1" height="1" border="0" align="left" /></a>
<table width="750" border="0" cellpadding="3" cellspacing="0">
<tr>
<td><img src="images/banner_left.gif" width="451" height="68" alt="Newland
Tours Banner, Left." /></td>
<td width="280"><img src="images/banner_right.jpg" width="276" height="68"
alt="Newland Tour Banner, Right." /></td>
</tr>
<tr>
<td><img src="images/navbar.gif" name="navbar" width="450" height="20"
border="0" usemap="#navbarMap" alt="Navigation Bar." /></td>
<td><img name="copyright_bar" src="images/copyright_bar.gif" width="272"
height="20" border="0" alt="Copyright 2006 Newland Tours." /></td>
</tr>
<tr>
<td colspan="2">
<h1><br />
<a name="top" id="top"></a>Tour Descriptions </h1>
<p><a href="tours.php">Find Tours</a>: Tour Descriptions </p>
<?php do { ?>
<hr />
<h2><img src="<?php echo $row_rs_tourDetail['tour_imageURL']; ?>"
alt="<?php echo $row_rs_tourDetail['tour_imageALT']; ?>" align="right" /><?php
echo $row_rs_tourDetail['countryName']; ?>: <?php echo
$row_rs_tourDetail['tourName']; ?></h2>
<p>Tour Description: <?php echo $row_rs_tourDetail['description'];
?></p>
<p>Number of Nights: <?php echo $row_rs_tourDetail['numNights'];
?></p>
<p>Meals Per Day Included: <?php echo
$row_rs_tourDetail['meals_per_day']; ?></p>
<p>Exercise Required: <?php echo
$row_rs_tourDetail['meals_per_day']; ?></p>
<table width="60%" border="1" cellspacing="0" cellpadding="3">
<tr>
<td>Itinerary:</td>
<td><?php echo $row_rs_tourDetail['itinerary']; ?></td>
</tr>
</table>
<p> Learn More About <a href="profiles_detail.php?countryID=<?php echo
$row_rs_tourDetail['countryID']; ?>"><?php echo
$row_rs_tourDetail['countryName']; ?></a></p>
<p>Price This Tour With the <a href="tourprice.php?tourID=<?php echo
$row_rs_tourDetail['tourID']; ?>">Tour Price Calculator</a></p>
<?php } while ($row_rs_tourDetail = mysql_fetch_assoc($rs_tourDetail));
?><p>

<?php if ($totalPages_rs_tourDetail != 0) { ?>

<table width="50%" border="0" align="center" bgcolor="#dddddd">
<tr>
<td width="23%" align="center"><?php if ($pageNum_rs_tourDetail > 0) { //
Show if not first page ?>
<a href="<?php printf("%s?pageNum_rs_tourDetail=%d%s", $currentPage, 0,
$queryString_rs_tourDetail); ?>">First</a>
<?php } // Show if not first page ?>
</td>
<td width="31%" align="center"><?php if ($pageNum_rs_tourDetail > 0) { //
Show if not first page ?>
<a href="<?php printf("%s?pageNum_rs_tourDetail=%d%s", $currentPage,
max(0, $pageNum_rs_tourDetail - 1), $queryString_rs_tourDetail);
?>">Previous</a>
<?php } // Show if not first page ?>
</td>
<td width="23%" align="center"><?php if ($pageNum_rs_tourDetail <
$totalPages_rs_tourDetail) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_rs_tourDetail=%d%s", $currentPage,
min($totalPages_rs_tourDetail, $pageNum_rs_tourDetail + 1),
$queryString_rs_tourDetail); ?>">Next</a>
<?php } // Show if not last page ?>
</td>
<td width="23%" align="center"><?php if ($pageNum_rs_tourDetail <
$totalPages_rs_tourDetail) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_rs_tourDetail=%d%s", $currentPage,
$totalPages_rs_tourDetail, $queryString_rs_tourDetail); ?>">Last</a>
<?php } // Show if not last page ?>
</td>
</tr>
</table>

<?php } ?>
Many thanks for your help.
Marie


Reply With Quote


  #4 (permalink)  
Old 09-10-2008, 01:23 PM
Coach Bob
 
Posts: n/a
Diggs:
Default Re: Newland Tours

Bipalla,

Just so I am clear, you have copied the completed files directly from the
book's CD and only added records to the database? So the code you list above is
the same as in the book? I want to know where to focus our troubleshooting.

Bob

Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 08:19 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk