<?php
@ob_clean();
@ob_start();
?>
<html>
    <head>
        <title>CMS Plugin</title>
        <link href="<? //=GLOBAL_ADMIN_CSS_PATH  ?>style.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <div class="popup-brd" style="overflow:scroll;height:300px;width:310px;">
            <table width="100%" cellspacing="0" cellpadding="0" border="0">
                <tbody>
                    <tr>
                        <td valign="top" height="10px">&nbsp;</td>
                        <td valign="top" height="10px">&nbsp;</td>
                    </tr>
                    <?php if (!empty($data)) {   ?>
                        <tr>
                            <td valign="top" height="10px">&nbsp;</td>
                            <td valign="top" height="10px">&nbsp;</td>
                        </tr>
                        <tr>
                            <td><h2><a href="javascript:;" style="cursor:pointer; font-size:20px;" onClick="javascript:expandcollapsepanel('pagesdata');">Select Pages</a></h2></td>
                        </tr>
                    <input type="hidden" name="count" id="count" value="<?php echo count($data); ?>">
                    <tr id="pagesdata">
                        <td><table width="100%" cellspacing="0" cellpadding="0" border="0">
                                <tbody><tr>
                                        <td valign="top" height="10px">&nbsp;</td>
                                        <td valign="top" height="10px">&nbsp;</td>
                                    </tr>
                                    <?php
                                   $j=$countdata+1;
//$i=$i;
//echo count($data);
                                    foreach ($data as $value) { ?>
                                        <tr>
                                            <td width="9%" valign="top" style="border-bottom: 1px solid rgb(221, 221, 221); padding: 5px 0pt;">
                                                <input type="checkbox" name="cms<?php echo $j ?>" id="cms<?php echo $j ?>" value="">
                                                <input type="hidden" name="<?php echo $j ?>" id="<?php echo $j ?>" value="<?php echo "<br /><a href='" . SITE_PATH . $value['link'] . "' target='_blank'>" . $value['name'] . "</a>"; ?>">
                                            </td>
                                            <td width="91%" valign="top" style="border-bottom: 1px solid rgb(221, 221, 221); padding: 5px 0pt;"><?php echo $value['treename']; ?>
                                            </td>
                                        </tr>
        <?php
        $j++;    }    ?>
                                <input type="hidden" name="countpages" id="countpages" value="<?php echo $countdata+1; ?>">
                                <input type="hidden" name="totalcountpages" id="totalcountpages" value="<?php echo $j; ?>">
                                </tbody></table></td>
                    </tr>
                    <tr><td>
                            <table align="center" width="100%" cellspacing="0" cellpadding="0" border="0">
                                <tbody><tr>
                                        <td valign="top" height="10px">&nbsp;</td>
                                        <td valign="top" height="10px">&nbsp;</td>
                                    </tr>
                                </tbody></table>
                        </td></tr>
<?php }  ?>

                </tbody></table>
        </div>
    </body>
</html>


