Making this table smaller ... losing the white space
Posted: Sat Sep 11, 2004 8:15 pm
Weirdan | Please use
PLEASE HELP!!! I'm really stuck and that space is very annoying! Haha. Thanks!
Weirdan | Please use
Code: Select all
tags when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
Hi,
I'm using this dating software that my company purchased for this dating site I have to put together. Anyways, I'm stuck at trying to figure out how to resize this particular table. On the main page, there's a "Members" section displaying the amount of people registered and online. You can see it [url=http://midnytemedia.com/chit-chat/]here[/url]. It has a big amount of space above and below the information, and I've been going through the code trying to figure out how to resize it and get rid of that empty white space. The code is as follows:Code: Select all
$total_c = strlen( $_POST[total_c] ) ? (int)$_POST[total_c] : GetParam( "default_country" );
$total_c2 = strlen( $_POST[total_c2] ) ? (int)$_POST[total_c2] : GetParam( "default_country" );
$total_arr = db_arr( "SELECT COUNT(ID) FROM `Profiles` WHERE Status = 'Active'" );
$total_arr_week = db_arr( "SELECT COUNT(ID) FROM `Profiles` WHERE Status = 'Active' AND (TO_DAYS(NOW()) - TO_DAYS(LastReg)) <= 7" );
$total_arr_gold = db_arr( "SELECT COUNT(ID) FROM `Profiles` WHERE Status = 'Active' AND ExtraAddons IS NOT NULL AND ExtraAddons != ''" );
$total_c_arr = db_arr( "SELECT COUNT(ID) FROM `Profiles` WHERE Status = 'Active' AND Country = $total_c" );
$total_members = $total_arr[0];
$total_c_members = $total_c_arr[0];
$total_c_members_onl = get_users_online_number('c', $total_c2 );
$total_arr_chatting = get_users_online_number('t');
$members_online = get_users_online_number();
$c_arr = $prof[countries];
$out = "";
$out .= '<table width=140 cellpadding=0 cellspacing=0 border=0 align=center><tr><td>';
$out .= '<table width=140 cellpadding=0 cellspacing=0 class=text border=0 align=center>';
$out .= "<tr><td width=17><img width=17 height=14 src=$site[images]group1.gif></td><td width=100%><b> "._t("_Currently Online")."</b></td></tr>\n";
$out .= "<tr><td width=17 align='right'><img width=17 height=14 src='$site[images]us2.gif'></td><td width=100%> "._t("_Total")." - $members_online</td></tr>\n";
$out .= "<tr><td width=17 align='right'><img width=17 height=14 src='$site[images]us3.gif'></td><td width=100%> "._t("_Chatting")." - $total_arr_chatting </td></tr>\n";
$out .= "<tr><td width=17 align='right'><img width=17 height=14 src='$site[images]us4.gif'></td><td width=100%> $total_c_members_onl "._t("_members")." "._t("_from").":</td></tr>\n";
$out .= '<form action="'.$_SERVER[PHP_SELF].'" method=post name="cForm2"><tr><td align=right colspan=2>';
$out .= "<input type=hidden name=total_c value=$total_c>";
$out .= '<select class=index name=total_c2 onChange="javascript: document.forms[''cForm2''].submit();">';
foreach ( $c_arr as $key => $value )
{
$out .= "<option value=$key";
if ( $key == $total_c2 )
$out .= " selected";
$out .= ">$value</option>";
}
$out .= '</select>';
$out .= '</td></form></tr>';
$out .= "</table>\n";
$out .= '<table cellpadding=0 cellspacing=0 class=text>';
$out .= "<tr><td height=2><img src=$site[images]spacer.gif height=2></td></tr>\n";
$out .= "<tr><td width=17><img width=17 height=14 src=$site[images]/group2.gif></td><td width=100%><b> "._t("_Total Registered")."</b></td></tr>\n";
$out .= "<tr><td width=17 align='right'><img width=17 height=14 src=$site[images]us6.gif></td><td width=100%> "._t("_Total")." - $total_arr[0]</td></tr>\n";
if ( !$no_cart )
$out .= "<tr><td width=17 align='right'><img width=17 height=14 src=$site[images]us4.gif></td><td width=100%> "._t("_Gold Members")." - $total_arr_gold[0] </td></tr>\n";
$out .= "<tr><td width=17 align='right'><img width=17 height=14 src=$site[images]us7.gif></td><td width=100%> "._t("_New this week")." - $total_arr_week[0] </td></tr>\n";
$out .= "<tr><td width=17 align='right'><img width=17 height=14 src=$site[images]us1.gif></td><td width=100%> $total_c_members "._t("_members")." "._t("_from").":</td></tr>\n";
$out .= '<form action="'.$_SERVER[PHP_SELF].'" method=post name="cForm"><tr><td align=right colspan=2>';
$out .= "<input type=hidden name=total_c2 value=$total_c2>";
$out .= '<select class=index name=total_c onChange="javascript: document.forms[''cForm''].submit();">';
foreach ( $c_arr as $key => $value )
{
$out .= "<option value=$key";
if ( $key == $total_c )
$out .= " selected";
$out .= ">$value</option>";
}
$out .= '</select>';
$out .= '</td></form></tr>';
$out .= '</table>';
$out .= '</td></tr></table>';
return DesignBoxContent ( _t("Members"), $w, $out, $h );
}Weirdan | Please use
Code: Select all
tags when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]