All pastes #109314 Raw Edit

Anonymous

public text v1 · immutable
#109314 ·published 2006-08-01 00:05 UTC
rendered paste body
<?phpM
require("/usr/home/public_html/links/resources/LinkSql.inc.php");M
$db = new LinkSQL($DBName);M
M
if (empty($page)){M
$page = 0;M
}M
$record = 20;M
M
$PicturePath = "/usr/home/public_html/links/resources/photo/";M
M
if (empty($catid)){M
$catid = 0;M
}M
M
$cataresult = $db->getchildcatalog($catid);M
M
$linkresult = $db->getlinks($page,$record,$catid);M
?>M
<html>M
<head>M
<title></title>M
<meta http-equiv="Content-Type" content="text/html; charset=<?php print
"$front_charset"; ?>">M
<link rel="stylesheet" href="./style/style.css" type="text/css">M
<script language="JavaScript">M
<!--M
function MM_reloadPage(init) {  //reloads the window if Nav4 resizedM
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {M
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}M   
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();M
}M
MM_reloadPage(true);M
// -->M   
</script>M
</head>M
M
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">M
<?phpM
include("/usr/home/public_html/links/resources/top.php3");M
?>M  
    M
    <?phpM
    if (!empty($cataresult)) {M
 ?>M
          &gt;&gt; <?php print "$front_categories"; ?> M
              
            <?php            M
            while ( list($key,$val)=each($cataresult) ) {M
            $catalogid = stripslashes($val["catalogid"]);M
            $catalogname = stripslashes($val["catalogname"]);M
            ?>M
            <a href="<?php print "$PHP_SELF?catid=$catalogid"; ?>"><?php print "$catalogname"; ?></a><br> M
            <?php            M
            }M 
            ?>M
              M
      <?phpM
      }M
      M
    if (!empty($linkresult)) {M
    ?>M
            <?phpM
            M
            while ( list($key,$val)=each($linkresult) ) {M
            $title = stripslashes($val["title"]);M
            $url = stripslashes($val["url"]);M
            $description = stripslashes($val["description"]);M
            $picture = stripslashes($val["picture"]);M
            $code = stripslashes($val["code"]);M
                    if (!empty($code)) {M  
                    print "$code<br><br>";M
                    }else{M
                    print "<a href=\"$url\" target=\"_blank\">";M
                            if (!empty($picture)){M
                            print "<img src=\"$PicturePath$picture\" alt=\"$title\" border=\"0\">";M
                            }else{M
                            print "$title";M
                            }M
                            print "</a>";M
                            if (!empty($description)) {M
                            print "-- $description";M
                            }M
                            print "<br><br>";M
        }            M
            }M
            ?>M
              <?phpM
              $pagenext = $page+1;M
                $result1 = $db->getlinks($pagenext,$record,$catid);M
                if ($page!=0)M
                {M
                $pagepre = $page-1;             M
print "<a href=\"$PHP_SELF?page=$pagepre&catid=$catid\"><font color=\"#FF0000\">$front_previouspage</font></a>&nbsp;&nbsp;&nbsp;";M
                }M
                if (!empty($result1))M
                {M
                print "<a href=\"$PHP_SELF?page=$pagenext&catid=$catid\"><font color=\"#FF0000\">$front_nextpage</font></a>&nbsp;";M
                }M
                ?>M
         M
      <?phpM
      }M
      ?>M
      M  
<?phpM   
include("/usr/home/public_html/links/resources/bottom.php3");M
?>M