<?php
    if(empty($_GET['id'])) { echo 'Params error, please input the lightbox banner id.'; exit; };

    require_once('global_nosession.php');

    $rs = $GLOBALS['db']->Query('select * from `wd_pa_banners` where `bannerid`="'.$_GET['id'].'"');
    if(!$rs || $rs->EOF) {
        echo 'Banner does not exist!';
        exit;
    }
    //$url = 'tearpage.php?surl='.$rs->fields['description'].'&burl='.$rs->fields['sourceurl'].'&desturl='.urlencode($rs->fields['destinationurl']).'&scriptsurl=';
?>
<html>
<head>
    <title>Test Lightbox</title>
    <link rel="stylesheet" type="text/css" media="screen" href="reset-min.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="lightbox/css/lightbox.css" />
    <script type="text/javascript">
        var fileLoadingImage = "lightbox/images/loading.gif";
        var fileBottomNavCloseImage = "lightbox/images/closelabel.gif";
    </script>
    <script type="text/javascript" src="lightbox/js/prototype.js"></script>
    <script type="text/javascript" src="lightbox/js/scriptaculous.js?load=effects,builder"></script>
    <script type="text/javascript" src="lightbox/js/lightbox.js"></script>
</head>
<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
<table align="center" border="0" width="100%" height="100%">
<tr><td align="center" valign="middle">
    <a href="<?php echo $rs->fields['sourceurl']; ?>" rev="<?php echo $rs->fields['destinationurl']; ?>" title="点此访问我们的网站！" rel="lightbox"><img src="<?php echo $rs->fields['description']; ?>" /></a>
</td></tr>
</table>
</body>
</html>