$url = $HTTP_SERVER_VARS['HTTP_HOST'];
$page = $_SERVER['REQUEST_URI'];
if ($url != "www.angelsandurchins.co.uk") {
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.angelsandurchins.co.uk".$page);
}
include_once("../admin/func/db_func.php");
include_once("../admin/global.php");
global $img_small, $img_medium, $img_large, $img_xlarge;
$page = get_pages_info("6");
$replacethis = array(" ", "'");
$withthis = array("-", "");
$replacethis_cat_drop = array(' ','class="select-field"');
$withthis_cat_drop = array('all categories ','class="select-field2"');
//echo 'this = '.$_GET['pid'];
if (isset($_GET['uid'])) {
if ($_GET['mode'] =="item") {
$currenttid = get_parties_info($_GET['uid']);
$tid = $currenttid['cid'];
$titleparties = ' - '.stripslashes($currenttid['title']);
} else {
$tid = $_GET['uid'];
}
buildTitles_parties($tid); //here we call our function - pass your ID variable for the current category here
//reverse sort the arrays (sorting on the key not the value)
krsort($titles_arr, SORT_NUMERIC);
krsort($titles_arr, SORT_NUMERIC);
//cycle through arrays - we only need to cycle through one as the keys will be identical on both arrays
foreach($titles_arr as $key => $value) {
//$crumb .= ' - '.stripslashes(htmlspecialchars(str_replace($replacethis,$withthis,$value)));
//we are pulling data from MySQL so we must clean slashes
//and protect against HTML code in the category names
//using stripslashes and htmlspecialchars
$title_name .= ' - '.stripslashes(htmlspecialchars($value)) . ' ';
}
//our crumb will have a trailing > character with a space either side -
//let’s chop that off
$title_name = substr($title_name, 0, strlen($titles) - 1);
//echo $title_name;
//$title_name = ' - '.get_dcategory_name_by_uid($_GET['pid']);
}
?>
if ($_GET['mode'] =="search") {
?>
//search results
if ($_GET['sstring'] == ""){
$sstring = "";
echo '
Your search produced the following results
';
} else {
$sstring = $_GET['sstring'];
echo '
Your search for " '.stripslashes($sstring).' " produced the following results
';
}
$cat = $_GET['pid'];
if (strlen($sstring) > 0) {
$hiddensearch = '
';
}
if (strlen($cat) != 0) {
$get_sub_categories = get_pcategory($cat);
$count_categories = count_sub_pcategory($cat);
$categories_count = mysql_fetch_array($count_categories);
if ($categories_count['acount'] != 0) {
echo '
Narrow your search ';
$rows = 0;
while($currentsubcat = mysql_fetch_array($get_sub_categories))
{
$rows++;
echo '
'.stripslashes($currentsubcat['name']).' ('.get_uids_parties($currentsubcat['uid']).') ';
$num_items = 0;
$count = 0;
//echo $rows;
if ($rows == 3) {
echo '
';
$rows = 0;
}
}
echo '
';
}
} else {
?>
}
?>
$paging = search_parties_fe($sstring,$cat);
$isResults = $paging->isResult();
if(!$isResults == 0)
{
while($current=$paging->result_assoc())
{
$imagefile = $_SERVER['DOCUMENT_ROOT'].'/parties/images/'.$current['uid'].'.jpg';
if( file_exists($imagefile) ) {
$p_image = '
';
}
echo '
';
echo $p_image;
echo '
'.stripslashes(get_pcategory_name_by_uid($current['cid'])).' '.stripslashes($current['title']).' '.stripslashes($current['details']).'
'.$current['link'].' ';
echo '
';
$p_image = '';
}
echo $paging->print_link2();
} else {
echo '
No items found! Please check your spelling. Alternatively, you may wish to broaden your search criteria.
';
}
?>
Not found what you're looking for?
} elseif ($_GET['mode'] =="browse") {
?>
if ($_GET['uid'] != 0) {
echo '
'.stripslashes(get_pcategory_name_by_uid($_GET['uid'])).' currently has '.get_uids_parties($_GET['uid']).' items.
';
$num_items = 0;
$count = 0;
$get_sub_categories = get_pcategory($_GET['uid']);
$count_categories = count_sub_pcategory($_GET['uid']);
$categories_count = mysql_fetch_array($count_categories);
if ($categories_count['acount'] != 0) {
echo '
Narrow your search ';
$rows = 0;
while($currentsubcat = mysql_fetch_array($get_sub_categories))
{
$rows++;
echo '
'.stripslashes($currentsubcat['name']).' ('.get_uids_parties($currentsubcat['uid']).') ';
$num_items = 0;
$count = 0;
//echo $rows;
if ($rows == 3) {
echo '
';
$rows = 0;
}
}
echo '
';
}
?>
$paging = browse_parties_fe($_GET['uid']);
$isResults = $paging->isResult();
if(!$isResults == 0)
{
$updateviews = update_views_parties_cat($_GET['uid']);
while($current=$paging->result_assoc())
{
$imagefile = $_SERVER['DOCUMENT_ROOT'].'/parties/images/'.$current['uid'].'.jpg';
if( file_exists($imagefile) ) {
$p_image = '
';
}
if(strlen($current['link']) != 0) {
$itemlink = '
'.$current['link'].' ';
}
echo '
';
echo $p_image;
echo '
'.stripslashes(get_pcategory_name_by_uid($current['cid'])).' '.stripslashes($current['title']).' '.stripslashes($current['details']).''.$itemlink.'
';
echo '
';
$p_image = '';
$itemlink = '';
}
echo $paging->print_link_browse();
} else {
if ($categories_count['acount'] == 0) {
echo '
No items found!
';
}
}
} else {
echo '
Children\'s Parties currently has '.get_uids_parties($_GET['uid']).' items.
';
$num_items = 0;
$count = 0;
$get_categories = get_pcategory($_GET['uid']);
while($currentcat = mysql_fetch_array($get_categories))
{
echo '
'.stripslashes($currentcat['name']).' ('.get_uids_parties($currentcat['uid']).') ';
$num_items = 0;
$count = 0;
$get_sub_categories = get_pcategory($currentcat['uid']);
$count_categories = count_sub_pcategory($currentcat['uid']);
$categories_count = mysql_fetch_array($count_categories);
if ($categories_count['acount'] != 0) {
echo '
';
$rows = 0;
while($currentsubcat = mysql_fetch_array($get_sub_categories))
{
$rows++;
echo '
';
if ($rows == 2) {
echo '
';
$rows = 0;
}
}
echo '
';
}
echo '
';
}
}
?>
}
?>
} else {
?>
#### ROOT PAGE ####
?>
echo stripslashes($page['name']); ?>
include_once("intro.php");
?>
$get_categories = get_pcategory($pid);
echo '
';
echo '
';
$rows = 0;
while($current = mysql_fetch_array($get_categories))
{
$rows++;
echo '
';
//echo $rows;
if ($rows == 2) {
echo '
';
$rows = 0;
}
$num_items = 0;
$count = 0;
}
echo '
';
echo '
';
?>
News
$news = explode(",", $page['news']);
$news_count = 0;
foreach($news as $news_item) {
if ($news_count < 3) {
if (strlen($news_item) != 0) {
$unique_news = get_news_info($news_item);
?>
if (strlen(stripslashes(strip_tags($unique_news['descrip']))) > 100) {
$ndescrip = stripslashes(substr(strip_tags($unique_news['descrip']),0,100)).' ...';
} else {
$ndescrip = stripslashes(strip_tags($unique_news['descrip']));
}
?>
$imagefile_n = $_SERVER['DOCUMENT_ROOT'].'/news/images/'.$unique_news['uid'].'.jpg';
if( file_exists($imagefile_n) ) {
$n_image = '
';
}
echo '
';
$n_image = '';
?>
}
$news_count++;
}
}
?>
Features
$features = explode(",", $page['features']);
$feature_count = 0;
foreach($features as $feature_item) {
if ($feature_count < 3) {
if (strlen($feature_item) != 0) {
$unique_feature = get_news_info($feature_item);
?>
if (strlen(stripslashes(strip_tags($unique_feature['descrip']))) > 100) {
$fdescrip = stripslashes(substr(strip_tags($unique_feature['descrip']),0,100)).' ...';
} else {
$fdescrip = stripslashes(strip_tags($unique_feature['descrip']));
}
?>
$imagefile_f = $_SERVER['DOCUMENT_ROOT'].'/news/images/'.$unique_feature['uid'].'.jpg';
if( file_exists($imagefile_f) ) {
$f_image = '
';
}
echo '
';
$f_image = '';
?>
}
$feature_count++;
}
}
?>
Search Children's Parties
most popular
$getmostpopcat = get_parties_most_popular_cat();
while($mostpopcat = mysql_fetch_array($getmostpopcat))
{
echo '
'.stripslashes($mostpopcat['name']).' ';
$getmostpop = get_parties_most_popular_cat_items($mostpopcat['uid']);
while($mostpop = mysql_fetch_array($getmostpop))
{
if (strlen(stripslashes(strip_tags($mostpop['name']))) > 45) {
$mostpopname = stripslashes(substr(strip_tags($mostpop['title']),0,45)).' ...';
} else {
$mostpopname = stripslashes(strip_tags($mostpop['title']));
}
echo '
'.$mostpopname.' ';
}
}
?>
Browse Children's Parties by category
include_once("../includes/banner2.php");
?>
include_once("../includes/sponsoredlinks.php");
?>
Competitions
$competitions = get_competitions_fe_homepages();
while($competition = mysql_fetch_array($competitions))
{
echo '
';
}
?>
}
?>
include_once("../includes/bookmarks.php");
?>
if (isset($_GET['mode'])) {
include_once("../includes/right_wide.php");
} else {
include_once("../includes/right_narrow.php");
}
?>
include_once("../includes/footer.php");
?>