Byronwells
01-09-2010, 06:42 PM
Alright Guys I have this following code:
// catagory list
function categories($db_domain)
{
include "common/config.php";
$query = "SELECT * FROM ".$prefix."category";
$result = mysql_query($query);
$admin_ads_top = "<br><table cellSpacing=0 cellPadding=5 align=center border=0><tr>";
$kk=0;
while ($row = mysql_fetch_array($result, MYSQL_NUM))
{
$kk++;
$tr=$etr=NULL;
$tr="</tr><tr>";
$cat_title=$row[1];
// Count how many products in this catagory
$qry="select count(*) as cnt from ".$prefix."products where category='$cat_title'";
$presult = $db_domain->get_a_line($qry);
$pcount=$presult[cnt];
$link = $cat_title;
$link = preg_replace('/([^a-z0-9])+/i', '_', $cat_title);
$starttable="$tr<td width=33% class=tbtext align=left valign=top>";
$endtable = "</td>";
$admin_ads_top.="$starttable <a href=marketplace.php?cat=t&category=$link><font color=#0000FF>$cat_title</font></a> ($pcount)$endtable";
$tr=$etr=NULL;
}
$admin_ads_top.="</tr><tr><td> </td></tr></table>";
return $admin_ads_top;
}
//=====================================================================================
That code allows me to display the catgeroies from a database on this site http://www.digitalresellersvault.com/marketplace.php on the left hand side in the categories box.. Those are the ones in the dark blue..
However I need to change that above code so that I can have them display just like the ones that I had added manually in light blue..
The css code for that section is as follows:
/************************************************
* Left Sidebar *
************************************************/
#l_sidebar {
float: left;
width: 175px;
margin: 0px 0px 0px 10px;
padding: 0px;
line-height: 20px;
display: inline;
}
#l_sidebar p {
padding: 0px;
margin: 0px;
}
#l_sidebar a img {
border: none;
margin: 0px;
padding: 0px;
}
#l_sidebar h2 {
height: 45px;
color: #f9ea45;
font-size: 12px;
font-family: Verdana;
font-weight: bold;
margin: 0px 0px 10px 0px;
padding: 1px 0px 1px 5px;
line-height: 42px;
}
#l_sidebar h3 {
color: #006699;
font-size: 18px;
font-family: Times New Roman, Tahoma, Verdana;
font-weight: normal;
margin: 0px 0px 5px 0px;
padding: 0px;
line-height: 20px;
}
#l_sidebar ul {
list-style: none;
margin: 0;
padding: 0; }
#l_sidebar li {
background: url(images/bulletback.jpg) no-repeat left;
}
#l_sidebar li a, #l_sidebar li a:visited {
color: #359CBB;
text-decoration: none;
margin: 0 0 0 20px;
}
.leftboxheader {
background: #FFFFFF;
float: left;
width: 175px;
height: 33px;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
}
.leftbox {
background: #FFFFFF;
float: left;
width: 171px;
margin: 0px 0px 0px 0px;
padding: 10px 0px 0px 0px;
border-left: 2px solid #9B9B9B;
border-right: 2px solid #9B9B9B;
font-size: 11px;
font-family: Tahoma;
font-weight: Bold;
color: #359CBB;
}
.leftbottom {
background: #FFFFFF url(images/borderbottom.jpg) no-repeat;
float: left;
width: 175px;
height: 10px;
margin: 0px 0px 0px 0px;
padding: 0px 0px 10px 0px;
}
Can anyone help please?
// catagory list
function categories($db_domain)
{
include "common/config.php";
$query = "SELECT * FROM ".$prefix."category";
$result = mysql_query($query);
$admin_ads_top = "<br><table cellSpacing=0 cellPadding=5 align=center border=0><tr>";
$kk=0;
while ($row = mysql_fetch_array($result, MYSQL_NUM))
{
$kk++;
$tr=$etr=NULL;
$tr="</tr><tr>";
$cat_title=$row[1];
// Count how many products in this catagory
$qry="select count(*) as cnt from ".$prefix."products where category='$cat_title'";
$presult = $db_domain->get_a_line($qry);
$pcount=$presult[cnt];
$link = $cat_title;
$link = preg_replace('/([^a-z0-9])+/i', '_', $cat_title);
$starttable="$tr<td width=33% class=tbtext align=left valign=top>";
$endtable = "</td>";
$admin_ads_top.="$starttable <a href=marketplace.php?cat=t&category=$link><font color=#0000FF>$cat_title</font></a> ($pcount)$endtable";
$tr=$etr=NULL;
}
$admin_ads_top.="</tr><tr><td> </td></tr></table>";
return $admin_ads_top;
}
//=====================================================================================
That code allows me to display the catgeroies from a database on this site http://www.digitalresellersvault.com/marketplace.php on the left hand side in the categories box.. Those are the ones in the dark blue..
However I need to change that above code so that I can have them display just like the ones that I had added manually in light blue..
The css code for that section is as follows:
/************************************************
* Left Sidebar *
************************************************/
#l_sidebar {
float: left;
width: 175px;
margin: 0px 0px 0px 10px;
padding: 0px;
line-height: 20px;
display: inline;
}
#l_sidebar p {
padding: 0px;
margin: 0px;
}
#l_sidebar a img {
border: none;
margin: 0px;
padding: 0px;
}
#l_sidebar h2 {
height: 45px;
color: #f9ea45;
font-size: 12px;
font-family: Verdana;
font-weight: bold;
margin: 0px 0px 10px 0px;
padding: 1px 0px 1px 5px;
line-height: 42px;
}
#l_sidebar h3 {
color: #006699;
font-size: 18px;
font-family: Times New Roman, Tahoma, Verdana;
font-weight: normal;
margin: 0px 0px 5px 0px;
padding: 0px;
line-height: 20px;
}
#l_sidebar ul {
list-style: none;
margin: 0;
padding: 0; }
#l_sidebar li {
background: url(images/bulletback.jpg) no-repeat left;
}
#l_sidebar li a, #l_sidebar li a:visited {
color: #359CBB;
text-decoration: none;
margin: 0 0 0 20px;
}
.leftboxheader {
background: #FFFFFF;
float: left;
width: 175px;
height: 33px;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
}
.leftbox {
background: #FFFFFF;
float: left;
width: 171px;
margin: 0px 0px 0px 0px;
padding: 10px 0px 0px 0px;
border-left: 2px solid #9B9B9B;
border-right: 2px solid #9B9B9B;
font-size: 11px;
font-family: Tahoma;
font-weight: Bold;
color: #359CBB;
}
.leftbottom {
background: #FFFFFF url(images/borderbottom.jpg) no-repeat;
float: left;
width: 175px;
height: 10px;
margin: 0px 0px 0px 0px;
padding: 0px 0px 10px 0px;
}
Can anyone help please?