"0") { $result = mysql_query("SELECT *, date_format(doc_date, '%b %D, %Y') AS DATE FROM documents WHERE doc_visible = 1 AND doc_id = '$pid' AND (doc_enddate > now() OR doc_enddate = '0000-00-00') AND (doc_startdate <= now()) AND doc_delete = 0 AND doc_tempid = 0", $linkid); @$data = mysql_fetch_array($result); } if ($data) { if ($pid <> 1) { $title = $data['doc_title']; $content = $data['doc_content']; $preview = $data['doc_preview']; $file = $data['doc_file']; $link = $data['doc_link']; if ($link <> "" AND $link <> "0") { header("Location: $data[doc_link]"); exit; } elseif ($file <> 0 AND strlen($data['doc_content']) < 50) { $fileresult = mysql_query("SELECT * FROM files WHERE file_id = $file", $linkid); @$filedata = mysql_fetch_array($fileresult); header("Location: dbfiles/$filedata[file_id]$filedata[file_extension]"); exit; } //record request in hits table $ip = getenv(REMOTE_ADDR); $refer = $_SERVER['HTTP_REFERER']; mysql_query("INSERT INTO hits (hits_document, hits_ip, hits_refer) VALUES ($data[doc_id], '$ip', '" . mysql_real_escape_string($refer) . "')", $linkid); //update hits records if ($title == "Home") { $title = ""; } LayoutTop("$title", $data['doc_metadescription'], $data['doc_metakeywords'], $data['doc_metatitle']); if ($_GET['open']) { ?>
11) { echo "

$title

"; } ?>
"0000-00-00" AND $data['doc_showdate'] == 1) { echo $data['DATE']; } ?>
0) { $fileresult = mysql_query("SELECT * FROM files WHERE file_id = $file", $linkid); $filedata = mysql_fetch_array($fileresult); echo "
"; echo ""; if ($filedata['file_icon'] <> "") { echo ""; } echo "
Download: $filedata[file_name]$filedata[file_extension]"; echo "
"; } echo $content; if ($data['doc_script'] <> "") { echo "

$data[doc_script]

"; } if ($data['doc_id'] == 11) { require_once("include/gallery.php"); } elseif ($data['doc_id'] == 93 OR $data['doc_id'] == 38) { require_once("include/subscribe.php"); } elseif ($data['doc_id'] == 36) { require_once("include/guest.php"); } elseif ($data['doc_id'] == 72) { ?> now() OR doc_enddate = '0000-00-00') AND (doc_startdate <= now()) AND doc_delete = 0 AND doc_tempid = 0 ORDER BY child_order, doc_date DESC LIMIT $limit1, $limit2", $linkid); $countresult = mysql_query("SELECT doc_title, doc_content, doc_preview, doc_link, doc_date, doc_file, doc_id, doc_source, date_format(doc_date, '%b %D, %Y') AS DATE, doc_showdate FROM documents, documentchildren WHERE child_related = doc_id AND child_document = $data[doc_id] AND doc_visible = 1 AND (doc_enddate > now() OR doc_enddate = '0000-00-00') AND (doc_startdate <= now()) AND doc_delete = 0 AND doc_tempid = 0", $linkid); } elseif ($data['doc_childorder'] == 2) { $result = mysql_query("SELECT doc_title, doc_content, doc_preview, doc_link, doc_date, doc_file, doc_id, doc_source, date_format(doc_date, '%b %D, %Y') AS DATE, doc_showdate, doc_shorturl, doc_link, doc_inchildlist FROM documents, documentchildren WHERE child_related = doc_id AND child_document = $data[doc_id] AND doc_visible = 1 AND (doc_enddate > now() OR doc_enddate = '0000-00-00') AND (doc_startdate <= now()) AND doc_delete = 0 AND doc_tempid = 0 ORDER BY doc_title, doc_date DESC LIMIT $limit1, $limit2", $linkid); $countresult = mysql_query("SELECT doc_title, doc_content, doc_preview, doc_link, doc_date, doc_file, doc_id, doc_source, date_format(doc_date, '%b %D, %Y') AS DATE, doc_showdate FROM documents, documentchildren WHERE child_related = doc_id AND child_document = $data[doc_id] AND doc_visible = 1 AND (doc_enddate > now() OR doc_enddate = '0000-00-00') AND (doc_startdate <= now()) AND doc_delete = 0 AND doc_tempid = 0", $linkid); } elseif ($data['doc_childorder'] == 3) { $result = mysql_query("SELECT doc_title, doc_content, doc_preview, doc_link, doc_date, doc_file, doc_id, doc_source, date_format(doc_date, '%b %D, %Y') AS DATE, doc_showdate, doc_shorturl, doc_link, doc_inchildlist FROM documents, documentchildren WHERE child_related = doc_id AND child_document = $data[doc_id] AND doc_visible = 1 AND (doc_enddate > now() OR doc_enddate = '0000-00-00') AND (doc_startdate <= now()) AND doc_delete = 0 AND doc_tempid = 0 ORDER BY doc_date, doc_id LIMIT $limit1, $limit2", $linkid); $countresult = mysql_query("SELECT doc_title, doc_content, doc_preview, doc_link, doc_date, doc_file, doc_id, doc_source, date_format(doc_date, '%b %D, %Y') AS DATE, doc_showdate FROM documents, documentchildren WHERE child_related = doc_id AND child_document = $data[doc_id] AND doc_visible = 1 AND (doc_enddate > now() OR doc_enddate = '0000-00-00') AND (doc_startdate <= now()) AND doc_delete = 0 AND doc_tempid = 0", $linkid); } else { $result = mysql_query("SELECT doc_title, doc_content, doc_preview, doc_link, doc_date, doc_file, doc_id, doc_source, date_format(doc_date, '%b %D, %Y') AS DATE, doc_showdate, doc_shorturl, doc_link, doc_inchildlist FROM documents, documentchildren WHERE child_related = doc_id AND child_document = $data[doc_id] AND doc_visible = 1 AND (doc_enddate > now() OR doc_enddate = '0000-00-00') AND (doc_startdate <= now()) AND doc_delete = 0 AND doc_tempid = 0 ORDER BY doc_date DESC, doc_id LIMIT $limit1, $limit2", $linkid); $countresult = mysql_query("SELECT doc_title, doc_content, doc_preview, doc_link, doc_date, doc_file, doc_id, doc_source, date_format(doc_date, '%b %D, %Y') AS DATE, doc_showdate FROM documents, documentchildren WHERE child_related = doc_id AND child_document = $data[doc_id] AND doc_visible = 1 AND (doc_enddate > now() OR doc_enddate = '0000-00-00') AND (doc_startdate <= now()) AND doc_delete = 0 AND doc_tempid = 0", $linkid); } if ($data['doc_showgallery'] == 1) { echo "

"; showGallery($data['doc_id']); echo "

"; } ?>
"; showChildren($result, $pid, $countresult, 10, $data['doc_childtype']); echo ""; } ?>
Nipika Mountain Resort is a place to stay, experience and explore in the Canadian Rockies.
now() OR doc_enddate = '0000-00-00') AND (doc_startdate <= now()) AND doc_delete = 0 AND doc_tempid = 0 ORDER BY doc_date DESC, doc_id DESC LIMIT 0, 1", $linkid); while ($traildata = mysql_fetch_array($trailresult)) { if ($traildata['doc_shorturl'] <> "") { $mainlink = $traildata['doc_shorturl']; } else { $mainlink = "main.php?p=$traildata[doc_id]&s=$site"; } echo "
$traildata[DATE]
"; echo "
"; //if (strlen($traildata['doc_content']) > 20) echo "$traildata[doc_title]"; //else // echo "$traildata[doc_title]"; echo "
"; echo "
$traildata[doc_preview]
"; } ?>
now() OR doc_enddate = '0000-00-00') AND (doc_startdate <= now()) AND doc_delete = 0 AND doc_tempid = 0 AND doc_date > now() ORDER BY doc_date, doc_id DESC LIMIT 0, 1", $linkid); while ($traildata = mysql_fetch_array($trailresult)) { if ($traildata['doc_shorturl'] <> "") { $mainlink = $traildata['doc_shorturl']; } else { $mainlink = "main.php?p=$traildata[doc_id]&s=$site"; } echo "
$traildata[DATE]
"; echo "
"; if (strlen($traildata['doc_content']) > 20) echo "$traildata[doc_title]"; else echo "$traildata[doc_title]"; echo "
"; echo "
$traildata[doc_preview]
"; } ?>
Where is Nipika?
\"$imgdata[img_name]\""; //show thumbnails of all images $optionimgresult = mysql_query("SELECT * FROM documentimages, imagelibrary WHERE docimg_document = $id AND docimg_image = img_id AND img_active = 1 ORDER BY docimg_order", $linkid); if (mysql_num_rows($optionimgresult) > 0) { echo "
[mouse over thumbnails, click image to enlarge]
"; echo ""; echo ""; $count = 0; while ($optimgdata = mysql_fetch_array($optionimgresult)) { if ($count % 6 == 0) { echo ""; } echo ""; $count++; } echo ""; echo "
\"$optimgdata[img_name]\"
"; } } } function navChild($id, $order) { global $linkid, $site, $pid, $parent; if ($order == 1) { $navlistresult = mysql_query("SELECT doc_title, doc_content, doc_preview, doc_link, doc_date, doc_file, doc_id, doc_source, date_format(doc_date, '%b %D, %Y') AS DATE, doc_showdate, doc_shorturl FROM documents, documentchildren WHERE child_related = doc_id AND child_document = $id AND doc_visible = 1 AND (doc_enddate > now() OR doc_enddate = '0000-00-00') AND (doc_startdate <= now()) AND doc_delete = 0 AND doc_tempid = 0 AND doc_top = 1 ORDER BY child_order, doc_date DESC", $linkid); } elseif ($order == 2) { $navlistresult = mysql_query("SELECT doc_title, doc_content, doc_preview, doc_link, doc_date, doc_file, doc_id, doc_source, date_format(doc_date, '%b %D, %Y') AS DATE, doc_showdate, doc_shorturl FROM documents, documentchildren WHERE child_related = doc_id AND child_document = $id AND doc_visible = 1 AND (doc_enddate > now() OR doc_enddate = '0000-00-00') AND (doc_startdate <= now()) AND doc_delete = 0 AND doc_tempid = 0 AND doc_top = 1 ORDER BY doc_title, doc_date DESC", $linkid); } elseif ($order == 3) { $navlistresult = mysql_query("SELECT doc_title, doc_content, doc_preview, doc_link, doc_date, doc_file, doc_id, doc_source, date_format(doc_date, '%b %D, %Y') AS DATE, doc_showdate, doc_shorturl FROM documents, documentchildren WHERE child_related = doc_id AND child_document = $id AND doc_visible = 1 AND (doc_enddate > now() OR doc_enddate = '0000-00-00') AND (doc_startdate <= now()) AND doc_delete = 0 AND doc_tempid = 0 AND doc_top = 1 ORDER BY doc_date, doc_id", $linkid); } else { $navlistresult = mysql_query("SELECT doc_title, doc_content, doc_preview, doc_link, doc_date, doc_file, doc_id, doc_source, date_format(doc_date, '%b %D, %Y') AS DATE, doc_showdate, doc_shorturl FROM documents, documentchildren WHERE child_related = doc_id AND child_document = $id AND doc_visible = 1 AND (doc_enddate > now() OR doc_enddate = '0000-00-00') AND (doc_startdate <= now()) AND doc_delete = 0 AND doc_tempid = 0 AND doc_top = 1 ORDER BY doc_date DESC, doc_id", $linkid); } if (mysql_num_rows($navlistresult) > 0) { echo "
"; } while ($navlistdata = mysql_fetch_array($navlistresult)) { if ($navlistdata['doc_shorturl'] <> "") { $link = $navlistdata['doc_shorturl']; } else { $link = "main.php?p=$navlistdata[doc_id]&s=$site"; } ?>