<?php
include '../layout/header.php';
$pid=$_GET['id'];
                    

 ?>
          
    <!-- Page Title
 ============================================= -->
    <section id="page-title" class="page-title-parallax page-title-dark" style="background-image: url('../images/inner-headers/about-header.jpg'); padding: 70px 0;" data-stellar-background-ratio="0.3">

        <div class="container clearfix">
            <h1>Department Detail </h1>
            <span>All India Institute Of Medical Sciences, Raipur</span>
          <!--   <ol class="breadcrumb">
                <li><a href="#">Home</a></li>
                <li><a href="#">Vacancies</a></li>
                <li class="active">Vendor Category - Vendor Item Code</li>
            </ol> -->
        </div>

    </section>
    <!-- #page-title end -->

    <!-- Content
 ============================================= -->
    <section id="content">
        <div class="content-wrap">
            <div class="container topmargin clearfix">

            <?php
           $table="singledetails";
                
                    $stmt = $con->prepare("SELECT * FROM $table where formenu = ? ORDER BY id DESC ");
                                $stmt->bind_param('s', $pid);
                                $stmt->execute();
                                $result1 = $stmt->get_result();
                            
                                while($view =$result1->fetch_assoc())
                                {   
                    
                    $id= $view['id'];
                    $contact=$view['contact'];
                    $des=$view['description'];
                  
                    
                   ?>
                           
                         
                               <!--  <?php echo $contact ?> -->
                              <?php echo $des ?>
                            
                                
                         
                            <?php } ?>
                            <div class="clearfix">
                            </div>
                            <div class="fancy-title title-center title-dotted-border topmargin">
                            <h3>Members</h3>
                        </div>
                <div class="table-responsive">
                    <table class="table table-bordered table-striped nobottommargin">
                        <thead>
                            <tr>
                                <th>S No</th>
                                <th>Name</th>
                                <th>Email</th>
                                <th>Designation</th>
                                <th>Image</th>
                            </tr>
                        </thead>
                        
                          <tbody>
                        <?php

                        $table1="memberdetails";
                
                    
                    $stmt = $con->prepare("SELECT * FROM $table1 where membertype = ? ORDER BY rank ASC ");
                     $stmt2 = $con->prepare("SELECT * FROM $table1 where membertype = ? ORDER BY rank ASC ");
                                $stmt->bind_param('s', $pid);
                                $stmt->execute();
                                $result1 = $stmt->get_result();
                                $stmt2->bind_param('s', $pid);
                                $stmt2->execute();
                                $result2 = $stmt2->get_result();
                                $b=1;
                                //$a=3;
                                $a=1;
                                while($view1 =$result1->fetch_assoc())
                                {
                                    if($view1['email'] == "profdralokcagrawal@aiimsraipur.edu.in" || $view1['email'] == "drsandeepnema@gmail.com")   {
                                     $s1=$b++;
                                    $id1= $view1['id'];
                                    $name1=$view1['name'];
                                    $email1=$view1['email'];
                                    $des1=$view1['designation'];
                                    $img1=$view1['image'];
                        
                               ?>
                                    <tr>
                                        <td><?php echo $s1; ?></td>
                                        <td><?php echo $name1; ?></td>
                                        <td><?php echo $email1;?></td>
                                        <td><?php echo $des1; ?></td>
                                        <td><img src="../upload/member/<?php echo $img1 ?>" class="img-responsive"  style="width:100px;"> </td>
                                        
                                    </tr>
                            <?php }
                        } ?>


                         <?php 
                        $view2 =$result2->fetch_assoc();
                        $boy="https://www.aiimsraipur.edu.in/upload/member/5a7aed9027172Male2.jpg";
                        $girl="https://www.aiimsraipur.edu.in/upload/member/5a7aee76a2a07Female2.jpg";
                        if($view2['membertype'] == 'About Anaesthesiology') { ?> 
                                <tr>
                                    <td>1</td>
                                    <td>Dr Subrata Kumar Singha</td>
                                    <td>subratsingh@gmail.com</td>
                                    <td>Professor</td>
                                    <td><img src="<?php echo $boy ?>" class="img-responsive" style="width:100px;"></td>
                                </tr>
                                <tr>
                                    <td>2</td>
                                    <td>Dr. Monica Khetarpal</td>
                                    <td>monicakhetrapal@yahoo.com</td>
                                    <td>Professor</td>
                                    <td><img src="<?php echo $girl ?>" class="img-responsive" style="width:100px;"></td>
                                </tr>
                                <tr>
                                    <td>3</td>
                                    <td>Dr. Rashmi Dubey</td>
                                    <td>drrashmi1993@gmail.com</td>
                                    <td>Additional Professor</td>
                                    <td><img src="<?php echo $girl ?>" class="img-responsive" style="width:100px;"></td>
                                </tr>
                                <tr>
                                    <td>4</td>
                                    <td>Dr. Mayank Kumar</td>
                                    <td>mayanksonupmch@gmail.com</td>
                                    <td>Additional Professor</td>
                                    <td><img src="<?php echo $boy ?>" class="img-responsive" style="width:100px;"></td>
                                </tr>
                                <tr>
                                    <td>5</td>
                                    <td>Dr. Sarita Ramchandani</td>
                                    <td>drsaritaramchandani@gmail.com</td>
                                    <td>Additional Professor</td>
                                    <td><img src="<?php echo $girl ?>" class="img-responsive" style="width:100px;"></td>
                                </tr>
                                <tr>
                                    <td>6</td>
                                    <td>Dr. Rampal Singh</td>
                                    <td>lautikasingh@gmail.com</td>
                                    <td>Additional Professor</td>
                                    <td><img src="<?php echo $boy ?>" class="img-responsive" style="width:100px;"></td>
                                </tr>
                                <tr>
                                    <td>7</td>
                                    <td>Dr. Mamta Sinha</td>
                                    <td>mamta306@gmail.com</td>
                                    <td>Associate Professor</td>
                                    <td><img src="<?php echo $girl ?>" class="img-responsive" style="width:100px;"></td>
                                </tr>
                                <tr>
                                    <td>8</td>
                                    <td>Dr. Chinmaya Kumar Panda</td>
                                    <td>chinmaya.panda06@gmail.com</td>
                                    <td>Associate Professor</td>
                                    <td><img src="<?php echo $boy ?>" class="img-responsive" style="width:100px;"></td>
                                </tr>
                                <tr>
                                    <td>9</td>
                                    <td>Dr. Pradeep R. Khobragade</td>
                                    <td>drpradeepk1117@gmail.com</td>
                                    <td>Associate Professor</td>
                                    <td><img src="<?php echo $boy ?>" class="img-responsive" style="width:100px;"></td>
                                </tr>
                                <tr>
                                    <td>10</td>
                                    <td>Dr. Jitendra V. Kalbande</td>
                                    <td>drjitu222@gmail.com</td>
                                    <td>Assistant Professor</td>
                                    <td><img src="<?php echo $boy ?>" class="img-responsive" style="width:100px;"></td>
                                </tr>
                                <tr>
                                    <td>11</td>
                                    <td>Dr. Ketki Deotale</td>
                                    <td>drketki03@gmail.com</td>
                                    <td>Assistant Professor (Contractual)</td>
                                    <td><img src="<?php echo $girl ?>" class="img-responsive" style="width:100px;"></td>
                                </tr>

                        <?php }else{ ?>
                                      <?php 
                     if($view2['membertype'] == 'About FMT'){
                    ?>
                        <tr>
                            <td>1</td>
                            <td>Dr Krishnadutt Chavali</td>
                            <td>drkhchavali@aiimsraipur.edu.in </td>
                            <td> Professor</td>
                            <td><img src="<?php echo $boy ?>" class="img-responsive" style="width:100px;"></td>
                       </tr> 
                       <tr>
                            <td>2</td>
                            <td>Dr. Deepak HD' Souza</td>
                            <td>fmdeepak@gmail.com</td>
                            <td>Additional Professor</td>
                            <td><img src="<?php echo $boy ?>" class="img-responsive" style="width:100px;"></td>
                       </tr>
                       <tr>
                            <td>3</td>
                            <td>Dr. Pankaj Suresh Ghormade</td>
                            <td>kaustubhmanpiya@gmail.com </td>
                            <td>Additional Professor</td>
                            <td><img src="<?php echo $boy ?>" class="img-responsive" style="width:100px;"></td>
                       </tr>
                       <tr>
                            <td>4</td>
                            <td>Dr Shagun Thakur</td>
                            <td>- </td>
                            <td>Associate Professor</td>
                            <td><img src="../upload/member/Dr_Shagun_Thakur.jpg" class="img-responsive" style="width:100px;"></td>
                       </tr>
                       <tr>
                            <td>5</td>
                            <td>Dr. Swapnil P. Akhade</td>
                            <td>akhade.swapnil@gmail.com </td>
                            <td>Associate Professor</td>
                            <td><img src="<?php echo $boy ?>" class="img-responsive" style="width:100px;"></td>
                       </tr> 
                      
                    <?php 
                     } $s2 = 0
                    ?>
                        <?php 
                        while($view2 =$result2->fetch_assoc())
                                {   
                                    if($view2['name'] != "Dr.Ranjeet Choudhary" && $view2['email'] != "drsandeepnema@gmail.com" && $view2['email'] != "profdralokcagrawal@aiimsraipur.edu.in" && !($view2['membertype'] == 'About FMT'))   {
                                    $s2=$a++;
                                    $id2= $view2['id'];
                                    $name2=$view2['name'];
                                    $email2=$view2['email'];
                                    $des2=$view2['designation'];
                                    $img2=$view2['image'];
                        
                       ?>
                            <tr>
                                <td><?php echo $s2 ?></td>
                                <td><?php echo $name2 ?></td>
                                <td><?php echo $email2 ?></td>
                                <td><?php echo $des2 ?></td>
                                <td><img src="../upload/member/<?php echo $img2 ?>" class="img-responsive"  style="width:100px;"> </td>
                                
                            </tr>
                            <?php  }
                        }
                         ?>
                    <?php } ?>
                        </tbody>
                        
                    </table>
                    </div>
                    <div class="fancy-title title-center title-dotted-border topmargin">
                            <h3>Contact</h3>
                            </div>
                            <?php
           $table="singledetails";
                
                    $stmt = $con->prepare("SELECT * FROM $table where formenu = ? ORDER BY id DESC ");
                                $stmt->bind_param('s', $pid);
                                $stmt->execute();
                                $result1 = $stmt->get_result();
                            
                                while($view =$result1->fetch_assoc())
                                {   
                    
                    $id= $view['id'];
                    $contact=$view['contact'];
                    
                  
                    
                   ?>
                           
                         
                              
                            <table border="0" cellpadding="0" cellspacing="5" style="height: 70px; background-color: #595959; width: 100%;">
<tbody>
<tr>

<td align="center" style="background-color: #ffd200;" valign="middle">
<a href="#" data-rel="popup" data-transition="slideup"><?php echo $contact ?>
<!--<img alt="Call Us" height="29" src="http://designview.35487744.smartetailing.com/merchant/2166/images/site/HRM_m_call.png" title="Call Us" width="162">-->
</a> 
</td>
</tr>
</tbody>
</table>
<?php } ?>
                        
                    <div class="fancy-title title-center title-dotted-border topmargin">
                        <h3>Events</h3>
                    </div>
                    <div id="posts" class="post-grid grid-container clearfix" data-layout="fitRows">
                        <?php

                        $table12="events";
                        $did=0;
                        $stmt = $con->prepare("SELECT * FROM $table12 WHERE menutype = ? AND did= ? ");
                        $stmt->bind_param('si', $pid,$did);
                        $stmt->execute();
                        $result1 = $stmt->get_result();
                       
                        while($fed_info1 =$result1->fetch_assoc())
                        {                        
                            $glry_id = $fed_info1['id'];
                            $title = $fed_info1['title'];
                            $htitle = $fed_info1['htitle'];
                            $des = $fed_info1['description'];
                            $hdes = $fed_info1['hdescription'];
                            $did=$fed_info1['did'];
                            $Image =$fed_info1['img_url'];
                            $dt=$fed_info1['date'];                
                       ?>
                        <div class="entry clearfix">
                            <div class="entry-image">
                                <a href="../upload/events/<?php echo $Image?>" data-lightbox="image"><img class="image_fade" src="../upload/events/<?php echo $Image?>" alt="<?php echo $title ?>"></a>
                            </div>
                            <div class="entry-title">
                                <h2><a href="events-single.php?id=<?php echo $glry_id?>"><?php echo $title ?></a></h2>
                            </div>
                            <ul class="entry-meta clearfix">
                                <li><i class="icon-calendar3"></i> <?php echo date("d-m-Y",strtotime($dt)); ?></li>
                            </ul>
                            <div class="entry-content">
                                <p><?php echo substr($des, 0,60); ?></p>
                                <a href="../user/events-single.php?id=<?php echo $glry_id?>" class="more-link">Read More</a>
                            </div>
                        </div>
                        <?php } ?>
                    </div>  

                    <div class="fancy-title title-center title-dotted-border topmargin">
                        <h3>About Department</h3>
                    </div> 
                    
                    <div id="posts" class="post-grid grid-container clearfix" data-layout="fitRows">
                        <?php
                            $stmt = $con->prepare("SELECT * FROM $table where formenu = ? ORDER BY id DESC ");
                            $stmt->bind_param('s', $pid);
                            $stmt->execute();
                            $result1 = $stmt->get_result();
                        
                            while ($view = $result1->fetch_assoc()) 
                            {                                
                                $formenuValue = $view['formenu'];

                                if($formenuValue == 'About Psychiatry'){
                           ?>
                           <h5>
                            <a href="https://www.aiimsraipur.edu.in/upload/departmentpdf/Department_of_Psychiatry_intro.pdf" target="_blank">About Psychiatry</a>
                            </h5>
                        <?php } }?>
                    </div>             
                </div>
            </div>        
    </section>

    <?php
 include '../layout/footer.php';
  ?>