Avatar of CWS (haripriya)
CWS (haripriya)Flag for India

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: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>
PHPAdobe DreamweaverWeb Languages and Standards

Avatar of undefined
Last Comment
netmunky
ASKER CERTIFIED SOLUTION
Avatar of netmunky
netmunky
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
PHP
PHP

PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.

125K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo