<?php require_once('Config/bootstrap.php');
define('SUBTITLE', "Transfer Certificate");
include_once("header.php"); 

?>
<tr>
        <td>&nbsp;</td>
        <td><h2 style="font-size:44px;">T<span class="small"  style="font-size:36px;">ransfer Certificate</span> 
<!--                <span  style="font-size:44px;">U<span class="small1"  style="font-size:36px;">S</span></span>-->
            </h2></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td align="left"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="23%" valign="top">
           <div id='loaddata'>
                 <script>
                          function checkid(){ 
                          var id = document.getElementById('scholler').value ;
                          if(id==''){
                          alert('Please Enter Scholler No.'); 
                          document.getElementById('scholler').focus() ;
                           return false;
                           }}
                      </script> 
             <form action="" method="POST" name="frm" id="frm">
                    <table  style="background-color: 10px rgb(189, 218, 248); border:10px rgb(132, 179, 19) solid;border-radius: 10px;margin-left: 211px;">
                        <tr>
                            <td style="background-color: 10px rgb(189, 218, 248);">
                                Enter Admission No
                            </td>
                            <td><input type="text" id="scholler" name="scholler"></td>
                        </tr>
                        <tr>
                            <td>

                            </td>
                            <td><input type="submit" id="submit" onclick="return checkid();" name="submit" value="Search"></td>
                        </tr>
                    </table>
                </form>
                <?php 
                $row_count='test';
if(($_POST['scholler']!='') && ($_POST['scholler']!='test'))
{
    //echo "select * FROM managetc where name='".$_POST['scholler']."'";
        $rs=execute("select * FROM managetc where name='".$_POST['scholler']."'");
        $row_count=  mysql_num_rows($rs);
}
                if (($row_count==0) || $row_count>0) 
                {
                   if($row_count==0) 
                   {
                       Echo  "No Record Found";
                   }
                   else
                   {
                       $row=read($rs);
                       //print_r($row);
                       ?>
                      <table cellpadding="5" cellspacing="5" border="1" style="margin-left: 226px;margin-top: 59px;">
                    <tr>
                        <th>Admission No</th>
                        <th>Transfer Certificate</th>
                    </tr>
                    <tr>
                        <td><?php echo $row['name'];  ?></td>
                        <td><a style="color: red;font-weight: bold;text-decoration: none;" href="admin/ajax/<?php echo $row['fileurl'];?>" target="_blank">View TC</a></td>
                    </tr>
                </table>
                   <?php                   
                   }
                }
                ?>
                
            </div>  
        </td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
  </tr>
  <?php include_once 'footer.php'; ?>