Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.12 KB | None | 0 0
  1. Bootostrap Toggle button seems to refuse working with php
  2.  
  3.         <div class="article_02 dept-list" style=" max-height:600px; overflow:auto">
  4.         <div style="width:92%; height:auto; padding:10px 4%; color:#FFF" align="left" class="font_palatino_bold department_header">
  5.             DEPARTMENTS
  6.         </div>
  7.         <?php
  8.             while($row = $run->fetch(PDO::FETCH_OBJ))
  9.             {
  10.                 $dept = $row->departments;
  11.                 $count = $project->projectCount(array('dbh' => $dbh , 'department' => $dept));
  12.                
  13.                 if(strlen($dept) >30)
  14.                 {
  15.                     $dept_display = substr($dept , 0,30) . ' ...' ;
  16.                 }
  17.                 else
  18.                 {
  19.                     $dept_display = $dept;
  20.                 }
  21.     ?>
  22.         <a href="department.php?department=<?php print urlencode( $dept ) ?>">
  23.         <div class="departments font_palatino_bold dept-menu" style="font-size:13px; text-transform:capitalize;">
  24.             <?php print strtolower($dept_display) ?> <span class="badge"> <?php print $count ?> </span>
  25.         </div>
  26.         </a>
  27.         <?php
  28.         }
  29. }
  30. catch(PDOException $e)
  31. {
  32.     print $e->getMessage() . "*0";
  33. }       ?>     
  34. </div>
  35. <div class="dept-list-mobile">
  36.         <div style="width:100%; height:auto; padding:10px 0; background:#0F71BA; font-family:Verdana; color:#fff;" onclick="toggleDept()">
  37.         <span style="margin-left:10px;"> Select Department  </span>
  38.         <i class="fa-chevron-down fa" style="float:right; margin-right:10px; cursor:pointer"></i>
  39.     </div>
  40.         <div style="width:100%; background:#fff; height:400px; overflow:auto; display:none" id="dept-sub-list-mobile">
  41.         <?php
  42.             while($row = $run2->fetch(PDO::FETCH_OBJ))
  43.             {
  44.                 $dept = $row->departments;
  45.                 $count = $project->projectCount(array('dbh' => $dbh , 'department' => $dept));
  46.                
  47.                 if(strlen($dept) >30)
  48.                 {
  49.                     $dept_display = substr($dept , 0,30) . ' ...' ;
  50.                 }
  51.                 else
  52.                 {
  53.                     $dept_display = $dept;
  54.                 }
  55.             ?>
  56.         <a href="department.php?department=<?php print urlencode( $dept ) ?>">
  57.         <div class="departments font_palatino_bold dept-menu" style="font-size:13px; text-transform:capitalize;">
  58.             <?php print strtolower($dept_display) ?> <span class="badge"> <?php print $count ?> </span>
  59.         </div>
  60.         </a>
  61.         <?php
  62.         }      
  63.         ?>
  64.     </div>
  65. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement