Funkster
06-14-2011, 05:30 PM
Hi there i just broke a page on my website can anyone help, i was messing about trying to add text after OUR DESIGNERS but now it is showing  top left of page and the spacing is all wrong on the published page, i medited in notepad :/ here is a link to the page now.
http://www.thebrightoncollective.co.uk/showcase_designer/
Hope you can help me !!
<?php
$path = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$adjacents = 1;
$query =mysql_query("select * from user WHERE img <> '' and seller = '1' order by register_date desc limit 0,100");
// mysql_query $query = mysql_query("select um.fname ,um.sname,pm.* FROM user as um,product as pm WHERE um.counter=pm.manu_id and pm.img <> '' and pm.live = 1 and pm.cat_plus like '%".$catdata['counter']."%' ".$search." order by pm.create_date desc");
$i=0;
$prodArr1=array();
if($query&&mysql_num_rows($query)>0)
{
while($prodArr1[$i]=mysql_fetch_array($query))
{
$i++;
}
}
//echo '<pre>'; print_r($prodArr1); exit;
//echo count($prodArr1);// exit;
$total_pages =mysql_num_rows($query);
/* Setup vars for query. */
$limit = 18; //how many items to show per page
$page = $_GET['page'];
if($page)
$start = ($page - 1) * $limit; //first item to display on this page
else
$start = 0;
////////////////////////
$catsel=0;
//echo $products;exit;
//////////////////paging seetting/////////////////
/* Setup page vars for display. */
if ($page == 0) $page = 1; //if no page var is given, default to 1.
$prev = $page - 1; //previous page is page - 1
$next = $page + 1; //next page is page + 1
$lastpage = ceil($total_pages/$limit); //lastpage is = total pages / items per page, rounded up.
$lpm1 = $lastpage - 1; //last page minus 1
/*
Now we apply our rules and draw the pagination object.
We're actually saving the code to a variable in case we want to draw it more than once.
*/
$pagination = "";
if($lastpage > 1)
{
$sort = str_replace(' ','-',$sort);
$pagination .= "<div class=\"pagination\">";
//previous button
if ($page > 1)
$pagination.= "<a href=?page=$prev>previous</a>";
else
$pagination.= "<span class=\"disabled\"> previous</span>";
//pages
if ($lastpage < 7 + ($adjacents * 2)) //not enough pages to bother breaking it up
{
for ($counter = 1; $counter <= $lastpage; $counter++)
{
if ($counter == $page)
$pagination.= "<span class=\"current\">$counter</span>";
else
$pagination.= "<a href=?sort=$sort&page=$counter>$counter</a>";
}
}
elseif($lastpage > 5 + ($adjacents * 2)) //enough pages to hide some
{
//close to beginning; only hide later pages
if($page < 1 + ($adjacents * 2))
{
for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++)
{
if ($counter == $page)
$pagination.= "<span class=\"current\">$counter</span>";
else
$pagination.= "<a href=?sort=$sort&page=$counter>$counter</a>";
}
$pagination.= "...";
$pagination.= "<a href=?sort=$sort&page=$lpm1>$lpm1</a>";
$pagination.= "<a href=?sort=$sort&page=$lastpage\">$lastpage</a>";
}
//in middle; hide some front and some back
elseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2))
{
$pagination.= "<a href=?sort=$sort&page=1>1</a>";
$pagination.= "<a href=?sort=$sort&page=2>2</a>";
$pagination.= "...";
for ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++)
{
if ($counter == $page)
$pagination.= "<span class=\"current\">$counter</span>";
else
$pagination.= "<a href=?sort=$sort&page=$counter>$counter</a>";
}
$pagination.= "...";
$pagination.= "<a href=?sort=$sort&page=$lpm1>$lpm1</a>";
$pagination.= "<a href=?sort=$sort&page=$lastpage>$lastpage</a>";
}
//close to end; only hide early pages
else
{
$pagination.= "<a href=?sort=$sort&page=1&>1</a>";
$pagination.= "<a href=?sort=$sort&page=2&>2</a>";
$pagination.= "...";
for ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++)
{
if ($counter == $page)
$pagination.= "<span class=\"current\">$counter</span>";
else
$pagination.= "<a href=?sort=$sort&page=$counter>$counter</a>";
}
}
}
//next button
if ($page < $counter - 1)
$pagination.= "<a href=?sort=$sort&page=$next>next</a>";
else
$pagination.= "<span class=\"disabled\">next</span>";
$pagination.= "</div>\n";
}
//////////////////END paging/////////////
?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<title>Handmade gifts, unique designs, original gifts, homemade crafts, hand made, designer crafts, handmade jewellery, vintage fashion, hand crafted gifts, designer paintings. Original artists design, unique gifts, gift ideas, fashion accessories, designer paintings, home made jewelery, handmade goods & creative collections from The Brighton Collective, Designed in England, British design, UK design, xmas gifts, christmas gifts. - <?php echo $cur_data['name']; ?></title>
<meta name="description" content="Handmade designer gifts, unique fashion designs, original handmade gifts, homemade arts & crafts, hand made designer crafts, unique handmade jewellery, vintage fashion accessories, hand made goods, designer paintings, handmade designer toys. Original artists designing unique gifts, creative designers, handmade jewellery, designer paintings, & hand made creations, creative collections from The Brighton Collective. Hand made art, handmade gifts, hand crafted jewellery, designer jewelry, fashion designs, unique designs, hand made necklaces, authentic jewellry, designer goods, original crafts, xmas gifts, gift ideas, designer fashion, handmade jewellery, hand crafted dolls, hand made toys, designer paintings, vintage jewellery, london fashion design, paris vintage fashion. Designed in England, British design, UK design, christmas ideas">
<meta content="index, follow" name="robots">
<meta content="� 2010 thebrightoncollective.co.uk - All Rights Reserved." name="copyright">
<meta content="General" name="rating">
<meta content="7 days" name="revisit">
<meta content="never" name="expires">
<link type="text/css" rel="stylesheet" href="/css/css1.css" />
<link type="text/css" rel="stylesheet" href="/css/menustyle.css" />
<script type="text/javascript" src="/js/chrome.js"></script>
<script type="text/javascript" >
function show_short()
{
var short_value = document.getElementById('short_by').value;
window.location='?sort='+short_value;
}
</script>
</head>
<body>
<div id="all">
<?php include($rootC.'toplinks.php'); ?>
<?//php include($rootC.'header.php'); ?>
<div id="mleft">
<div class="heading"><h1>OUR DESIGNERS<?=$designer_name['fname']?></h1></div>
<!-- <div class="short_by">Shot By<select name="short_by" id="short_by" onchange="show_short(this.value)"><option value="pm.create_date DESC" <? if($sort == "pm.create_date-DESC"){ echo "selected"; } ?>>Latest</option> <option value="pm.price ASC" <? if($sort == "pm.price-ASC"){ echo "selected"; } ?>>Price low to High</option><option value="pm.price DESC" <? if($sort == "pm.price-DESC"){ echo "selected"; } ?>>Price High to Low</option><option value="pm.name ASC"<? if($sort == "pm.name-ASC"){ echo "selected"; } ?>>Alphabetical</option></select> </div>-->
<div style="clear:both;"></div>
<?
if(isset($nothing))
{
echo '<p>There is nothing showcased here yet, but watch this space.</p>'."\n";
}
random_designer_showcase(2,6);
random_designer_showcase(2,6);
random_designer_showcase(2,6);
random_designer_showcase(2,6);
?>
</div>
<div class="pagination">
<!--<div class="total_prod"><?//=start?>/<?//=$total_pages?></div>-->
<div class="page_no">
<ul>
<!--<?=$pagination?>-->
</ul>
</div>
</div>
<div id="mright">
<?php
//include($rootC.'rightsidebar.php'); ?>
</div>
<div class="clearfloat"> </div>
</div>
<div class="clearfloat"> </div>
<?php include($rootC.'footer.php'); ?>
</body>
</html>
http://www.thebrightoncollective.co.uk/showcase_designer/
Hope you can help me !!
<?php
$path = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$adjacents = 1;
$query =mysql_query("select * from user WHERE img <> '' and seller = '1' order by register_date desc limit 0,100");
// mysql_query $query = mysql_query("select um.fname ,um.sname,pm.* FROM user as um,product as pm WHERE um.counter=pm.manu_id and pm.img <> '' and pm.live = 1 and pm.cat_plus like '%".$catdata['counter']."%' ".$search." order by pm.create_date desc");
$i=0;
$prodArr1=array();
if($query&&mysql_num_rows($query)>0)
{
while($prodArr1[$i]=mysql_fetch_array($query))
{
$i++;
}
}
//echo '<pre>'; print_r($prodArr1); exit;
//echo count($prodArr1);// exit;
$total_pages =mysql_num_rows($query);
/* Setup vars for query. */
$limit = 18; //how many items to show per page
$page = $_GET['page'];
if($page)
$start = ($page - 1) * $limit; //first item to display on this page
else
$start = 0;
////////////////////////
$catsel=0;
//echo $products;exit;
//////////////////paging seetting/////////////////
/* Setup page vars for display. */
if ($page == 0) $page = 1; //if no page var is given, default to 1.
$prev = $page - 1; //previous page is page - 1
$next = $page + 1; //next page is page + 1
$lastpage = ceil($total_pages/$limit); //lastpage is = total pages / items per page, rounded up.
$lpm1 = $lastpage - 1; //last page minus 1
/*
Now we apply our rules and draw the pagination object.
We're actually saving the code to a variable in case we want to draw it more than once.
*/
$pagination = "";
if($lastpage > 1)
{
$sort = str_replace(' ','-',$sort);
$pagination .= "<div class=\"pagination\">";
//previous button
if ($page > 1)
$pagination.= "<a href=?page=$prev>previous</a>";
else
$pagination.= "<span class=\"disabled\"> previous</span>";
//pages
if ($lastpage < 7 + ($adjacents * 2)) //not enough pages to bother breaking it up
{
for ($counter = 1; $counter <= $lastpage; $counter++)
{
if ($counter == $page)
$pagination.= "<span class=\"current\">$counter</span>";
else
$pagination.= "<a href=?sort=$sort&page=$counter>$counter</a>";
}
}
elseif($lastpage > 5 + ($adjacents * 2)) //enough pages to hide some
{
//close to beginning; only hide later pages
if($page < 1 + ($adjacents * 2))
{
for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++)
{
if ($counter == $page)
$pagination.= "<span class=\"current\">$counter</span>";
else
$pagination.= "<a href=?sort=$sort&page=$counter>$counter</a>";
}
$pagination.= "...";
$pagination.= "<a href=?sort=$sort&page=$lpm1>$lpm1</a>";
$pagination.= "<a href=?sort=$sort&page=$lastpage\">$lastpage</a>";
}
//in middle; hide some front and some back
elseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2))
{
$pagination.= "<a href=?sort=$sort&page=1>1</a>";
$pagination.= "<a href=?sort=$sort&page=2>2</a>";
$pagination.= "...";
for ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++)
{
if ($counter == $page)
$pagination.= "<span class=\"current\">$counter</span>";
else
$pagination.= "<a href=?sort=$sort&page=$counter>$counter</a>";
}
$pagination.= "...";
$pagination.= "<a href=?sort=$sort&page=$lpm1>$lpm1</a>";
$pagination.= "<a href=?sort=$sort&page=$lastpage>$lastpage</a>";
}
//close to end; only hide early pages
else
{
$pagination.= "<a href=?sort=$sort&page=1&>1</a>";
$pagination.= "<a href=?sort=$sort&page=2&>2</a>";
$pagination.= "...";
for ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++)
{
if ($counter == $page)
$pagination.= "<span class=\"current\">$counter</span>";
else
$pagination.= "<a href=?sort=$sort&page=$counter>$counter</a>";
}
}
}
//next button
if ($page < $counter - 1)
$pagination.= "<a href=?sort=$sort&page=$next>next</a>";
else
$pagination.= "<span class=\"disabled\">next</span>";
$pagination.= "</div>\n";
}
//////////////////END paging/////////////
?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<title>Handmade gifts, unique designs, original gifts, homemade crafts, hand made, designer crafts, handmade jewellery, vintage fashion, hand crafted gifts, designer paintings. Original artists design, unique gifts, gift ideas, fashion accessories, designer paintings, home made jewelery, handmade goods & creative collections from The Brighton Collective, Designed in England, British design, UK design, xmas gifts, christmas gifts. - <?php echo $cur_data['name']; ?></title>
<meta name="description" content="Handmade designer gifts, unique fashion designs, original handmade gifts, homemade arts & crafts, hand made designer crafts, unique handmade jewellery, vintage fashion accessories, hand made goods, designer paintings, handmade designer toys. Original artists designing unique gifts, creative designers, handmade jewellery, designer paintings, & hand made creations, creative collections from The Brighton Collective. Hand made art, handmade gifts, hand crafted jewellery, designer jewelry, fashion designs, unique designs, hand made necklaces, authentic jewellry, designer goods, original crafts, xmas gifts, gift ideas, designer fashion, handmade jewellery, hand crafted dolls, hand made toys, designer paintings, vintage jewellery, london fashion design, paris vintage fashion. Designed in England, British design, UK design, christmas ideas">
<meta content="index, follow" name="robots">
<meta content="� 2010 thebrightoncollective.co.uk - All Rights Reserved." name="copyright">
<meta content="General" name="rating">
<meta content="7 days" name="revisit">
<meta content="never" name="expires">
<link type="text/css" rel="stylesheet" href="/css/css1.css" />
<link type="text/css" rel="stylesheet" href="/css/menustyle.css" />
<script type="text/javascript" src="/js/chrome.js"></script>
<script type="text/javascript" >
function show_short()
{
var short_value = document.getElementById('short_by').value;
window.location='?sort='+short_value;
}
</script>
</head>
<body>
<div id="all">
<?php include($rootC.'toplinks.php'); ?>
<?//php include($rootC.'header.php'); ?>
<div id="mleft">
<div class="heading"><h1>OUR DESIGNERS<?=$designer_name['fname']?></h1></div>
<!-- <div class="short_by">Shot By<select name="short_by" id="short_by" onchange="show_short(this.value)"><option value="pm.create_date DESC" <? if($sort == "pm.create_date-DESC"){ echo "selected"; } ?>>Latest</option> <option value="pm.price ASC" <? if($sort == "pm.price-ASC"){ echo "selected"; } ?>>Price low to High</option><option value="pm.price DESC" <? if($sort == "pm.price-DESC"){ echo "selected"; } ?>>Price High to Low</option><option value="pm.name ASC"<? if($sort == "pm.name-ASC"){ echo "selected"; } ?>>Alphabetical</option></select> </div>-->
<div style="clear:both;"></div>
<?
if(isset($nothing))
{
echo '<p>There is nothing showcased here yet, but watch this space.</p>'."\n";
}
random_designer_showcase(2,6);
random_designer_showcase(2,6);
random_designer_showcase(2,6);
random_designer_showcase(2,6);
?>
</div>
<div class="pagination">
<!--<div class="total_prod"><?//=start?>/<?//=$total_pages?></div>-->
<div class="page_no">
<ul>
<!--<?=$pagination?>-->
</ul>
</div>
</div>
<div id="mright">
<?php
//include($rootC.'rightsidebar.php'); ?>
</div>
<div class="clearfloat"> </div>
</div>
<div class="clearfloat"> </div>
<?php include($rootC.'footer.php'); ?>
</body>
</html>