<div  style="color:red;font-size: 15px " ><?php echo  $this->message; ?></div>
<div class="comm_div">
    <div class="comm_content_block">

        <h3>Manage Plans</h3>

         <div class="comm_content_block_items">
             <table>
                 <tr>

                     <td>
					 <div>
						<form name="frmsearch" method="post" action="<?php echo ConfigUrl::base();?>index/userplans">
						<span class="label-stl">Search</span>
						<input type="text" value="<?php echo ($_POST['txtSearch'])?$_POST['txtSearch']:$this->txtSearch?>" class="txt_area_2 txt_bx" name="txtSearch" >&nbsp;<input class="btn_styles" type="submit" name="btnSearch" value="Search">
						</form>
					 </div>
                         </td>
                         </tr>
             </table>
            <div class="comm_content_block_items">
            <div id="msgBox" style="color: red"></div>
            <table width="100%" cellspacing="1" cellpadding="0" border="0" class="list_table">
                <tbody>
                    <tr>
                        <th width="3%" valign="top" align="left">#</th>
                        <th width="13%" valign="top" align="left">User Name</th>
                        <th width="8%" valign="top" align="left">Plan Name</th>
                        <th width="8%" valign="top" align="left">Posted Date</th>

                        <th width="7%" valign="top" align="left">Product</th>
                        <th width="5%" valign="top" align="left">Payment Status</th>
                    </tr>
            <?php
            if(sizeof($this->resProducts)>0) {
                $i=0;
                foreach($this->resProducts as $row) {
                    $i++;
            ?>
                   <div id="listMsg<?php echo $row->nPlanId;?>" style="color: red"></div>
                   <div>
                       <tr class="row_color1" id="rate<?php echo $row->nPlanId;?>">
                                <td valign="top" align="left"><?php echo $i; ?></td>

                                <td valign="top" align="left"><?php echo stripslashes($row->vLoginName); ?></td>
                                <td valign="top" align="left"><?php echo stripslashes($row->vPlanName)?></td>
                                <td valign="top" align="left"><?php echo stripslashes($row->dDate)?></td>
                                <td valign="top" align="left"><?php echo stripslashes($row->Title)?></td>
                                <td valign="top" align="left"><?php  if( $row->vStatus==N){echo 'pending';}else echo 'completed'?></td>
                        </tr>
                   </div>
            <?php
                }
            } else {
                echo '<tr class="row_color1">
                      <td colspan="6">No Record Found</td></tr>';
            }
            ?>

       </tbody></table>

					<div class="clear"></div>
					</div>
				</div>
    </div>
			</div>

           <!--  start paging..................................................... -->
         <?php //if($this->pageCount > 1){  ?>
          <div class="pagination">
           <ul>
       		<li><a href="<?php echo ConfigUrl::base()?>index/userplans/1/" class="page_first" >First</a></li>
           	<li><a class="page_prev" href="<?php echo ConfigUrl::base()?>index/userplans/<?php if($this->page != 1) echo $this->page - 1; else echo $this->page; ?>/<?php echo $this->txtSearch?>" >Previous</a></li>
            <li class="pageinfo"><div id="page-info">Page <strong><?php echo $this->page; ?></strong> / <?php echo $this->pageCount; ?></div></li>
         	<li><a class="page_next" href="<?php echo ConfigUrl::base()?>index/userplans/<?php if($this->pageCount != $this->page) echo  $this->page + 1; else echo $this->pageCount; ?>/<?php echo $this->txtSearch?>" >Next</a></li>
            <li><a class="page_last" href="<?php echo ConfigUrl::base()?>index/userplans/<?php echo $this->pageCount; ?>/<?php echo $this->txtSearch?>" >Last</a></li>
            </ul>
		<div class="clear"></div>
		</div>
        <?php
        //}
       ?>
        <div id="divComm" style="top: 100px;left: 300px;position: absolute;background-color: gray"></div>
        