Hey guys. I have a problem getting rows to to look the same
as my row4 does. I have market with a red box the rows i got
to look like i wanted them to do. All i want is the other rows1
to look the same as row4
Here is my code and I cant find the code that makes all the row1 to a row 4
PHP Code:
<?
require_once("include/bittorrent.php");
loggedinorreturn();
$res = mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " AND location=1") or print(mysql_error());
$arr = mysql_fetch_row($res);
$messages = $arr[0];
$res = mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " && unread='yes'") or print(mysql_error());
$arr = mysql_fetch_row($res);
$unread = $arr[0];
$res = mysql_query("SELECT COUNT(*) FROM messages WHERE sender=" . $CURUSER["id"] . " AND saved='yes'") or print(mysql_error());
$arr = mysql_fetch_row($res);
$outmessages = $arr[0];
stdhead($CURUSER["username"] . "'s private page", true);
if ($_GET["edited"]) {
print("<h1>Dina inställningar har sparats.</h1>\n");
if ($_GET["mailsent"])
print("<h2>Confirmation email has been sent!</h2>\n");
}
elseif ($_GET["emailch"])
print("<h1>Email address changed!</h1>\n");
else
print("<h1>Profil, <a href=\"userdetails.php?id=$CURUSER[id]\">$CURUSER[username]</a></h1>\n");
begin_frame("Your Profile",true,5,500);
begin_table(true);
?>
<tr>
<td align="center" class="row2" width="33%"><a href="logout.php"><b>Logga Ut</b></a></td>
<td align="center" class="row2" width="33%"><a href="mytorrents.php"><b>Mina Torrents</b></a></td>
<td align="center" class="row2" width="33%"><a href="friends.php"><b>Vänner och Blockeringar</b></a></td>
</tr>
<? end_table(); ?>
<br />
<form method="post" action="takeprofedit.php">
<? begin_table(true);?>
<?
/***********************
$res = mysql_query("SELECT COUNT(*) FROM ratings WHERE user=" . $CURUSER["id"]);
$row = mysql_fetch_array($res);
tr("Ratings submitted", $row[0]);
$res = mysql_query("SELECT COUNT(*) FROM comments WHERE user=" . $CURUSER["id"]);
$row = mysql_fetch_array($res);
tr("Written comments", $row[0]);
****************/
$ss_r = mysql_query("SELECT * from stylesheets") or die;
$ss_sa = array();
while ($ss_a = mysql_fetch_array($ss_r))
{
$ss_id = $ss_a["id"];
$ss_name = $ss_a["name"];
$ss_sa[$ss_name] = $ss_id;
}
ksort($ss_sa);
reset($ss_sa);
while (list($ss_name, $ss_id) = each($ss_sa))
{
if ($ss_id == $CURUSER["stylesheet"]) $ss = " selected=\"selected\""; else $ss = "";
$stylesheets .= "<option value=\"$ss_id\" $ss>$ss_name</option>\n";
}
$countries = "<option value=\"0\">---- None selected ----</option>\n";
$ct_r = mysql_query("SELECT id,name FROM countries ORDER BY name") or die;
while ($ct_a = mysql_fetch_array($ct_r))
$countries .= "<option value=\"$ct_a[id]\"" . ($CURUSER["country"] == $ct_a['id'] ? " selected=\"selected\"" : "") . ">$ct_a[name]</option>\n";
$clients = "<option value=0>---- None selected ----</option>n";
$cl_r = mysql_query("SELECT id,name FROM clients ORDER BY name") or die;
while ($cl_a = mysql_fetch_array($cl_r))
$clients .= "<option value=$cl_a[id]" . ($CURUSER["client"] == $cl_a['id'] ? " selected" : "") . ">$cl_a[name]</option>n";
$downloadspeed = "<option value=0>---- None selected ----</option>\n";
$ds_a = mysql_query("SELECT id,name FROM downloadspeed ORDER BY id") or die;
while ($ds_b = mysql_fetch_array($ds_a))
$downloadspeed .= "<option value=$ds_b[id]" . ($CURUSER["download"] == $ds_b['id'] ? " selected" : "") . ">$ds_b[name]</option>\n";
$uploadspeed = "<option value=0>---- None selected ----</option>\n";
$us_a = mysql_query("SELECT id,name FROM uploadspeed ORDER BY id") or die;
while ($us_b = mysql_fetch_array($us_a))
$uploadspeed .= "<option value=$us_b[id]" . ($CURUSER["upload"] == $us_b['id'] ? " selected" : "") . ">$us_b[name]</option>\n";
function format_tz($a)
{
$h = floor($a);
$m = ($a - floor($a)) * 60;
return ($a >= 0?"+":"-") . (strlen(abs($h)) > 1?"":"0") . abs($h) .
":" . ($m==0?"00":$m);
}
$statboxcontent = array("show"=>"Show Statbox", "hide"=>"Hide Statbox");
$statbox = "";
foreach ($statboxcontent as $dbval => $dispval) {
$statbox .= "<input id=\"statbox$dbval\" type=\"radio\" name=\"statbox\" value=\"$dbval\"";
if ($CURUSER["statbox"] == $dbval)
$statbox .= " checked=\"checked\"";
$statbox .= "><label for=\"statbox$dbval\"> $dispval</label>\n";
}
tr("Parkera kontot",
"<input type=radio name=parked" . ($CURUSER["parked"] == "yes" ? " checked" : "") . " value=yes>Ja
<input type=radio name=parked" . ($CURUSER["parked"] == "no" ? " checked" : "") . " value=no>Nej
<br><font class=small size=1>Du kan parkera ditt konto för att förhindra att det blir borttaget på grund av inaktivitet. Du kommer dock ej kunna ladda ner och göra andra grejer på sidan under den tid du har parkerat ditt konto.</font>"
,1);
tr("Acceptera PM",
"<input type=\"radio\" name=\"acceptpms\"" . ($CURUSER["acceptpms"] == "yes" ? " checked=\"checked\"" : "") . " value=\"yes\" />Alla ( Förutom blockerade )
<input type=\"radio\" name=\"acceptpms\"" . ($CURUSER["acceptpms"] == "friends" ? " checked=\"checked\"" : "") . " value=\"friends\" />Endast Vänner
<input type=\"radio\" name=\"acceptpms\"" . ($CURUSER["acceptpms"] == "no" ? " checked=\"checked\"" : "") . " value=\"no\" />Endast staff"
,1);
$r = mysql_query("SELECT id,name FROM categories ORDER BY name") or sqlerr();
//$categories = "Default browsing categories:<br />\n";
if (mysql_num_rows($r) > 0)
{
$categories .= "<table><tr>\n";
$i = 0;
while ($a = mysql_fetch_assoc($r))
{
$categories .= ($i && $i % 2 == 0) ? "</tr><tr>" : "";
$categories .= "<td class=\"bottom\" style='padding-right: 5px'><input name=\"cat$a[id]\" type=\"checkbox\" " . (strpos($CURUSER['notifs'], "[cat$a[id]]") !== false ? " checked=\"checked\"" : "") . " value=\"yes\" /> " . htmlspecialchars($a["name"]) . "</td>\n";
++$i;
}
$categories .= "</tr></table>\n";
}
tr("Email notification", "<input type=\"checkbox\" name=\"pmnotif\"" . (strpos($CURUSER['notifs'], "[pm]") !== false ? " checked=\"checked\"" : "") . " value=\"yes\" /> Notify me when I have received a PM<br />\n" .
"<input type=\"checkbox\" name=\"emailnotif\"" . (strpos($CURUSER['notifs'], "[email]") !== false ? " checked=\"checked\"" : "") . " value=\"yes\" /> Notify me when a torrent is uploaded in one of <br /> my default browsing categories.\n"
, 1);
tr("Bläddra i förvalda<br />kategorier",$categories,1);
tr("Country", "<select name=\"country\">\n$countries\n</select>",1);
tr("BT Client", "<select name=client>$clients</select>",1);
tr("Gender",
"<input type=radio name=gender" . ($CURUSER["gender"] == "N/A" ? " checked" : "") . " value=N/A><img src=pic/na.gif>
<input type=radio name=gender" . ($CURUSER["gender"] == "Male" ? " checked" : "") . " value=Male><img src=pic/male.gif>
<input type=radio name=gender" . ($CURUSER["gender"] == "Female" ? " checked" : "") . " value=Female><img src=pic/female.gif>"
,1);
$avatar = (htmlspecialchars($CURUSER["avatar"]));
if (!$avatar)
$avatar = "pic/default_avatar.gif";
print("<tr align=right><td class=rowhead><Current<br>Avatar</td><td class=row4 align=left><img width=90 src=\"$avatar\" class=border></td></tr>\n");
///////////////// BIRTHDAY MOD /////////////////////
$birthday = $CURUSER["birthday"];
//$birthday = date("Y-m-d", strtotime($birthday));
list($year1, $month1, $day1) = split('-', $birthday);
if ($CURUSER[birthday] == "0000-00-00")
{
$year .= "<select name=year>";
$i = "1950";
while($i <= 2005){
$year .= "<option value=".$i.($year1 == $i ? " selected" : "").">".$i."</option>";
$i++;
}
$year .= "</select>";
$month .= "<select name=month>";
$month .= "<option value=01".($month1 == 01 ? " selected" : "") .">January</option>";
$month .= "<option value=02".($month1 == 02 ? " selected" : "") .">February</option>";
$month .= "<option value=03".($month1 == 03 ? " selected" : "") .">March</option>";
$month .= "<option value=04".($month1 == 04 ? " selected" : "") .">April</option>";
$month .= "<option value=05".($month1 == 05 ? " selected" : "") .">May</option>";
$month .= "<option value=06".($month1 == 06 ? " selected" : "") .">June</option>";
$month .= "<option value=07".($month1 == 07 ? " selected" : "") .">July</option>";
$month .= "<option value=08".($month1 == 08 ? " selected" : "") .">August</option>";
$month .= "<option value=09".($month1 == 09 ? " selected" : "") .">September</option>";
$month .= "<option value=10".($month1 == 10 ? " selected" : "") .">October</option>";
$month .= "<option value=11".($month1 == 11 ? " selected" : "") .">November</option>";
$month .= "<option value=12".($month1 == 12 ? " selected" : "") .">December</option>";
$month .= "</select>";
$day .= "<select name=day>";
$i = 1;
while($i <= 31){
if($i < 10){
$day .= "<option value=0".$i. ($day1 == "0".$i ? " selected" : "") .">0".$i."</option>";
}else{
$day .= "<option value=".$i. ($day1 == $i ? " selected" : "").">".$i."</option>";
}
$i++;
}
}
if($CURUSER[birthday] != "0000-00-00")
{
}
///////////////// BIRTHDAY MOD /////////////////////
tr("Avatar URL", "<input name=\"avatar\" size=\"50\" value=\"" . htmlspecialchars($CURUSER["avatar"]) .
"\" /><br />\nBredd bör vara 150 pixlar. ( kommer att storleksändras vid behov )\n",1);
$signature = $CURUSER["signature"];
if ($signature) {
print("<tr><td class=rowhead align=right>Current<br>Sig</td><td class=row4 align=left>" . format_comment($signature) . "</td></tr>\n");
}
print("<tr><td class=rowhead align=right>Forum Signatur</td><td class=row4><textarea name=signature cols=70 rows=4>" . htmlspecialchars($CURUSER[signature]) . "</textarea><br>Max. 225 tecken. </td></tr>\n");tr("Profil info", "<textarea name=\"info\" cols=\"70\" rows=\"4\">" . $CURUSER["info"] . "</textarea><br />Visas under din allmänna profil. Får innehålla <a href=\"tags.php\" target=\"_new\">BB koder</a>.", 1);
tr("Topics per sida", "<input type=\"text\" size=\"10\" name=\"topicsperpage\" value=\"$CURUSER[topicsperpage]\" /> (0=use default setting)",1);
tr("Inlägg per sida", "<input type=\"text\" size=\"10\" name=\"postsperpage\" value=\"$CURUSER[postsperpage]\" /> (0=use default setting)",1);
tr("Visa avatarer", "<input type=\"checkbox\" name=\"avatars\"" . ($CURUSER["avatars"] == "yes" ? " checked=\"checked\"" : "") . " />( Användare med låg bandbredd bör stänga av denna funktion )",1);
tr("Adresss", "<input type=\"text\" name=\"email\" size=\"50\" value=\"" . htmlspecialchars($CURUSER["email"]) . "\" />", 1);
print("<tr><td colspan=\"2\" class=\"row4\" align=\"left\"><b>OBS:</b> För att kunna byta email adress så måste du bekräfta din nya adress. En bekräftelse kommer därför skickas till din nya email adress.</td></tr>\n");
tr("Ändra lösenordet", "<input type=\"password\" name=\"chpassword\" size=\"50\" />", 1);
tr("Bekräfta lösenordet", "<input type=\"password\" name=\"passagain\" size=\"50\" />", 1);
tr("Återställ passkey","<input type=\"checkbox\" name=\"resetpasskey\" value=\"1\" /><br/>Återställ om du misstänker att din passkey kommit på villovägar. Alla aktiva torrents måste laddas ner på nytt..", 1);
function priv($name, $descr) {
global $CURUSER;
if ($CURUSER["privacy"] == $name)
return "<input type=\"radio\" name=\"privacy\" value=\"$name\" checked=\"checked\" /> $descr";
return "<input type=\"radio\" name=\"privacy\" value=\"$name\" /> $descr";
}
/* tr("Privacy level", priv("normal", "Normal") . " " . priv("low", "Low (email address will be shown)") . " " . priv("strong", "Strong (no info will be made available)"), 1); */
?>
<tr><td colspan="2" class="row4" align="center"><input type="submit" value="Spara inställningar" style='height: 25px' /></td>
</tr>
<? end_table(); ?>
</form>
<?
end_frame();
stdfoot();
?>
All helps is appreciated as always