<?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>विभाग के बारे में </h1>
            <span>अखिल भारतीय आयुर्विज्ञान संस्थान, रायपुर</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['hdescription'];
                  
                    
                   ?>
                           
                         
                               <!--  <?php echo $contact ?> -->
                              <?php echo $des ?>
                            
                                
                         
                            <?php } ?>
                            <div class="clearfix">
                            </div>
                            <div class="fancy-title title-center title-dotted-border topmargin">
                            <h3>------------------------------------------------------------सदस्य---------------------------------------------------------</h3>
                        </div>
                <div class="table-responsive">
                    <table class="table table-bordered table-striped nobottommargin">
                        <thead>
                            <tr>
                                <th>क्रमांक</th>
                                <th>नाम</th>
                                <th>ई–मेल</th>
                                <th>पद</th>
                                <th>तस्वीर</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['hname'];
                                    $email1=$view1['email'];
                                    $des1=$view1['hdesignation'];
                                    $img=$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 $img ?>" class="img-responsive" style="width:100px;"> </td>
                                
                            </tr>
                            <?php } } ?>
                            <?php 
                                if(($view2 =$result2->fetch_assoc()) == ($view2['membertype'] == 'About FMT')){
                                     $boy = '../../upload/member/644f6365d3bf7man.jpg';
                                    $girl = '../../upload/member/5a7aee76a2a07Female2.jpg';
                                ?>
                                <tr>
                            <td>1</td>
                            <td>डॉ. कृष्णदत्त चावली</td>
                            <td>drkhchavali@aiimsraipur.edu.in </td>
                            <td> प्रोफ़ेसर</td>
                            <td><img src="<?php echo $boy ?>" class="img-responsive" style="width:100px;"></td>
                       </tr> 
                       <tr>
                            <td>2</td>
                            <td>डॉ. दीपक एचडी'सूजा</td>
                            <td>fmdeepak@gmail.com</td>
                            <td>अतिरिक्त प्रोफेसर</td>
                            <td><img src="<?php echo $boy ?>" class="img-responsive" style="width:100px;"></td>
                       </tr>
                       <tr>
                            <td>3</td>
                            <td>डॉ. पंकज सुरेश घोरमाडे</td>
                            <td>kaustubhmanpiya@gmail.com </td>
                            <td>अतिरिक्त प्रोफेसर</td>
                            <td><img src="<?php echo $boy ?>" class="img-responsive" style="width:100px;"></td>
                       </tr>
                       <tr>
                            <td>4</td>
                            <td>डॉ शगुन ठाकुर</td>
                            <td>- </td>
                            <td>सह - प्राध्यापक</td>
                            <td><img src="../../upload/member/Dr_Shagun_Thakur.jpg" class="img-responsive" style="width:100px;"></td>
                       </tr>
                       <tr>
                            <td>5</td>
                            <td>डॉ. स्वप्निल पी. अखाड़े</td>
                            <td>akhade.swapnil@gmail.com </td>
                            <td>सह - प्राध्यापक</td>
                            <td><img src="<?php echo $boy ?>" class="img-responsive" style="width:100px;"></td>
                       </tr> 

                                <?php }?>

                            <?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['hname'];
                                    $email2=$view2['email'];
                                    $des2=$view2['hdesignation'];
                                    $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 } } ?>
                        </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">मनोरोग के बारे में</a>
                            </h5>
                        <?php } }?>
                    </div>
                    
                </div>
            </div>
        
    </section>

    <?php
 include '../layout/footer.php';
  ?>