troubleshooting Question

php to asp conversion help

Avatar of CWS (haripriya)
CWS (haripriya)Flag for India asked on
PHPAdobe DreamweaverWeb Languages and Standards
1 Comment1 Solution264 ViewsLast Modified:
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:both;">
<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">&nbsp</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">&nbsp</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">&nbsp</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:left">
<?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($id);      
 for ($i=1;$i<=$NrCol1;$i++)
 {
   if ($rez['dir'][0]!=$rez2['dir'][0]) {print'<br>';}
   print '<span>'.$rez['dir'].': </span><a href="showlink.php?cat='.$rez['id'].'&tp=0" style="color:'.$img.';">images</a><span>~</span><a href="showlink.php?cat='.$rez['id'].'&tp=1" style="color:'.$vid.';">videos</a><br>';
   $rez2=$rez;
   $rez=mysql_fetch_assoc($id);
 }
 
 ob_start();
 for ($i=1;$i<=$NrCol2;$i++)
 {
   if ($rez['dir'][0]!=$rez2['dir'][0]) {print'<br>';}
   print '<span>'.$rez['dir'].': </span><a href="showlink.php?cat='.$rez['id'].'&tp=0" style="color:'.$img.';">images</a><span>~</span><a href="showlink.php?cat='.$rez['id'].'&tp=1" style="color:'.$vid.';">videos</a><br>';
   $rez2=$rez;
   $rez=mysql_fetch_assoc($id);
 }
 $center=ob_get_clean();
?>
</div>
<div style="width:300px;float:right;">
<?php

 for ($i=1;$i<$NrCol3;$i++)
 {
   if ($rez['dir'][0]!=$rez2['dir'][0]) {print'<br>';}
   print '<span>'.$rez['dir'].': </span><a href="showlink.php?cat='.$rez['id'].'&tp=0" style="color:'.$img.';">images</a><span>~</span><a href="showlink.php?cat='.$rez['id'].'&tp=1" style="color:'.$vid.';">videos</a><br>';
   $rez2=$rez;
   $rez=mysql_fetch_assoc($id);
 }

?>
</div>
<div style="width:300px;margin-left:300px;margin-right:300px;">
<?php print $center ?>
</div>

</div>

</body>
</html>
ASKER CERTIFIED SOLUTION
netmunky

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 1 Comment.
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>

Mike

Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 1 Comment.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004