CWS (haripriya)
asked on
php to asp conversion help
I want to convert this php page to asp. Can anybody convert this to me or atleast explain what is happening in this page. I know only asp. I don't know php. I have converted all the php files, but this one seems to be very complicated. I need your help in this:
Any help is appreciated.
Thank you.
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
<html>
<body>
<div style="width:905px;">
<div style="width:900px;clear:b oth;">
<p><a href="login.php">Add your own links!</a></p>
<p>
<?php
include 'database.php';
$id=mysql_query('Select * from link order by time limit 360');
print '<table cellpadding="2">';
$cnt=1;
while ($cnt!=120)
{
$rez=mysql_fetch_assoc($id );
if ($cnt%30==0) {print'<tr><td colspan="3"> </td></tr >';}
print '<tr>
<td width="300">
<a href="'.$rez['href'].'">'. $rez['name '].'</a>
</td></tr>';
$cnt++;
}
while ($cnt!=120)
{
$rez=mysql_fetch_assoc($id );
if ($cnt%30==0) {print'<tr><td colspan="3"> </td></tr >';}
print '<tr>
<td width="300">
<a href="'.$rez['href'].'">'. $rez['name '].'</a>
</td></tr>';
$cnt++;
}
while ($cnt!=120)
{
$rez=mysql_fetch_assoc($id );
if ($cnt%30==0) {print'<tr><td colspan="3"> </td></tr >';}
print '<tr>
<td width="300">
<a href="'.$rez['href'].'">'. $rez['name '].'</a>
</td></tr>';
$cnt++;
}
print'</table>
<br>
<br>
Arhive:
<br>
'
?>
</p>
</div>
<div style="width:300px;float:l eft">
<?php
include 'color.inc';
$id=mysql_query('Select * from dir order by dir');
$nr=mysql_num_rows($id);
$NrCol1=(int) $nr/3;
$NrCol2=(int) $nr/3;
$NrCol3=(int) $nr/3;
if ($nr%3!=0) {$NrCol1++;}
if ($nr%3!=2) {$NrCol2++;}
$rez=mysql_fetch_assoc($id );
$rez2=mysql_fetch_assoc($i d);
for ($i=1;$i<=$NrCol1;$i++)
{
if ($rez['dir'][0]!=$rez2['di r'][0]) {print'<br>';}
print '<span>'.$rez['dir'].': </span><a href="showlink.php?cat='.$ rez['id']. '&tp=0" style="color:'.$img.';">im ages</a><s pan>~</spa n><a href="showlink.php?cat='.$ rez['id']. '&tp=1" style="color:'.$vid.';">vi deos</a><b r>';
$rez2=$rez;
$rez=mysql_fetch_assoc($id );
}
ob_start();
for ($i=1;$i<=$NrCol2;$i++)
{
if ($rez['dir'][0]!=$rez2['di r'][0]) {print'<br>';}
print '<span>'.$rez['dir'].': </span><a href="showlink.php?cat='.$ rez['id']. '&tp=0" style="color:'.$img.';">im ages</a><s pan>~</spa n><a href="showlink.php?cat='.$ rez['id']. '&tp=1" style="color:'.$vid.';">vi deos</a><b r>';
$rez2=$rez;
$rez=mysql_fetch_assoc($id );
}
$center=ob_get_clean();
?>
</div>
<div style="width:300px;float:r ight;">
<?php
for ($i=1;$i<$NrCol3;$i++)
{
if ($rez['dir'][0]!=$rez2['di r'][0]) {print'<br>';}
print '<span>'.$rez['dir'].': </span><a href="showlink.php?cat='.$ rez['id']. '&tp=0" style="color:'.$img.';">im ages</a><s pan>~</spa n><a href="showlink.php?cat='.$ rez['id']. '&tp=1" style="color:'.$vid.';">vi deos</a><b r>';
$rez2=$rez;
$rez=mysql_fetch_assoc($id );
}
?>
</div>
<div style="width:300px;margin- left:300px ;margin-ri ght:300px; ">
<?php print $center ?>
</div>
</div>
</body>
</html>
Any help is appreciated.
Thank you.
--------------------------
<html>
<body>
<div style="width:905px;">
<div style="width:900px;clear:b
<p><a href="login.php">Add your own links!</a></p>
<p>
<?php
include 'database.php';
$id=mysql_query('Select * from link order by time limit 360');
print '<table cellpadding="2">';
$cnt=1;
while ($cnt!=120)
{
$rez=mysql_fetch_assoc($id
if ($cnt%30==0) {print'<tr><td colspan="3"> </td></tr
print '<tr>
<td width="300">
<a href="'.$rez['href'].'">'.
</td></tr>';
$cnt++;
}
while ($cnt!=120)
{
$rez=mysql_fetch_assoc($id
if ($cnt%30==0) {print'<tr><td colspan="3"> </td></tr
print '<tr>
<td width="300">
<a href="'.$rez['href'].'">'.
</td></tr>';
$cnt++;
}
while ($cnt!=120)
{
$rez=mysql_fetch_assoc($id
if ($cnt%30==0) {print'<tr><td colspan="3"> </td></tr
print '<tr>
<td width="300">
<a href="'.$rez['href'].'">'.
</td></tr>';
$cnt++;
}
print'</table>
<br>
<br>
Arhive:
<br>
'
?>
</p>
</div>
<div style="width:300px;float:l
<?php
include 'color.inc';
$id=mysql_query('Select * from dir order by dir');
$nr=mysql_num_rows($id);
$NrCol1=(int) $nr/3;
$NrCol2=(int) $nr/3;
$NrCol3=(int) $nr/3;
if ($nr%3!=0) {$NrCol1++;}
if ($nr%3!=2) {$NrCol2++;}
$rez=mysql_fetch_assoc($id
$rez2=mysql_fetch_assoc($i
for ($i=1;$i<=$NrCol1;$i++)
{
if ($rez['dir'][0]!=$rez2['di
print '<span>'.$rez['dir'].': </span><a href="showlink.php?cat='.$
$rez2=$rez;
$rez=mysql_fetch_assoc($id
}
ob_start();
for ($i=1;$i<=$NrCol2;$i++)
{
if ($rez['dir'][0]!=$rez2['di
print '<span>'.$rez['dir'].': </span><a href="showlink.php?cat='.$
$rez2=$rez;
$rez=mysql_fetch_assoc($id
}
$center=ob_get_clean();
?>
</div>
<div style="width:300px;float:r
<?php
for ($i=1;$i<$NrCol3;$i++)
{
if ($rez['dir'][0]!=$rez2['di
print '<span>'.$rez['dir'].': </span><a href="showlink.php?cat='.$
$rez2=$rez;
$rez=mysql_fetch_assoc($id
}
?>
</div>
<div style="width:300px;margin-
<?php print $center ?>
</div>
</div>
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.