function panelTitle($id) { $query = "SELECT mn_menuIcon,mn_subMenuName FROM mn_menu"; $query .= " JOIN mn_submenu ON mn_submenu.mn_menu_mn_menuID=mn_menu.mn_menuID"; $query .= " WHERE mn_subMenuFolder='lab.php?id=" . $id . "'"; $result = selQuery($query); $row = mysqli_fetch_assoc($result); ?> <i class="<?php echo $row['mn_menuIcon']; ?> "></i><?php echo $row['mn_subMenuName']; ?> <label id='panelInfo'></label> <?php if ($id == 2 or $id == 5 or $id == 8 or $id == 11 or $id == 14) { ?> <ul class="nav panel-tabs-border panel-tabs"> <input type="hidden" value="<?php echo taskCount($id, 1); ?> " /> <li class="dropdown active"> <a style="cursor:pointer;" class="dropdown-toggle" href="#" role="menu" data-toggle="dropdown" aria-expanded="true">Product Category<i class="fa fa-caret-down pl5"></i></a> <ul class="dropdown-menu"> <li class=""> <a style="cursor:pointer;" onclick="content(1)" tabindex="-1" data-toggle="tab" aria-expanded="true">NCE <?php echo taskCount($id, 1); ?> </a> </li> <li class=""> <a style="cursor:pointer;" onclick="content(2)" tabindex="-1" data-toggle="tab" aria-expanded="true">BIOLOGICS <?php echo taskCount($id, 2); ?> </a> </li> <li class=""> <a style="cursor:pointer;" onclick="content(3)" tabindex="-1" data-toggle="tab" aria-expanded="true">PRESCRIPTION <?php echo taskCount($id, 3); ?> </a> </li> <li class=""> <a style="cursor:pointer;" onclick="content(4)" tabindex="-1" data-toggle="tab" aria-expanded="true">NON-PRESCRIPTION <?php echo taskCount($id, 4); ?> </a> </li> <li class=""> <a style="cursor:pointer;" onclick="content(5)" tabindex="-1" data-toggle="tab" aria-expanded="true">NATURAL PRODUCT <?php echo taskCount($id, 5); ?> </a> </li> <li class=""> <a style="cursor:pointer;" onclick="content(6)" tabindex="-1" data-toggle="tab" aria-expanded="true">HEALTH SUPPLEMENT <?php echo taskCount($id, 6); ?> </a> </li> </ul> </li> </ul> <?php } else { if ($id == 16 or $id == 18 or $id == 34 or $id == 19 or $id == 21 or $id == 23 or $id == 25 or $id == 27) { ?> <ul class="nav panel-tabs-border panel-tabs"> <?php $query = "SELECT rpjp_kod,rpjp_desc FROM ref_pkk_jnsprdk\n WHERE rpjp_show=1 AND rpjp_active=1 ORDER by rpjp_sort"; $result = selQuery($query); $count = 1; while ($row = mysqli_fetch_assoc($result)) { if ($count == 1) { echo "<li class='active'>"; } else { echo "<li class=''>"; } ?> <a style="cursor:pointer;" onclick="content(<?php echo $count; ?> )" tabindex="-1" data-toggle="tab" aria-expanded="true"><?php echo $row['rpjp_desc']; ?> <?php echo getSampleTask($count, $id); ?> </a> </li> <?php $count++; } ?> </ul> <?php } elseif ($id == 29 or $id == 30) { ?> <ul class="nav panel-tabs-border panel-tabs"> <li class="active"> <a style="cursor:pointer;" onclick="content(1)" tabindex="-1" data-toggle="tab" aria-expanded="true">General</a> </li> <li class=""> <a style="cursor:pointer;" onclick="content(2)" tabindex="-1" data-toggle="tab" aria-expanded="true">Status</a> </li> </ul> <?php } elseif ($id == 32) { ?> <ul class="nav panel-tabs-border panel-tabs"> <li class="active"> <a style="cursor:pointer;" onclick="content(1)" tabindex="-1" data-toggle="tab" aria-expanded="true">Home</a> </li> <li class=""> <a style="cursor:pointer;" onclick="content(2)" tabindex="-1" data-toggle="tab" aria-expanded="true">History</a> </li> </ul> <?php } elseif ($id == 33) { ?> <ul class="nav panel-tabs-border panel-tabs"> <li class="active"> <a style="cursor:pointer;" onclick="content(1)" tabindex="-1" data-toggle="tab" aria-expanded="true">Protocol</a> </li> <li class=""> <a style="cursor:pointer;" onclick="content(2)" tabindex="-1" data-toggle="tab" aria-expanded="true">Sample</a> </li> </ul> <?php } } }
function panelTitle($id) { $query = "SELECT mn_menuIcon,mn_subMenuName FROM mn_menu"; $query .= " JOIN mn_submenu ON mn_submenu.mn_menu_mn_menuID=mn_menu.mn_menuID"; $query .= " WHERE mn_subMenuFolder='lab.php?id=" . $id . "'"; $result = selectQuery($query); $row = mysqli_fetch_assoc($result); ?> <span class="<?php echo $row['mn_menuIcon']; ?> "></span><?php echo $row['mn_subMenuName']; if ($id == 2 or $id == 5 or $id == 8 or $id == 11 or $id == 14) { ?> <ul class="nav panel-tabs-border panel-tabs"> <li class="dropdown active"> <a class="dropdown-toggle" href="#" role="menu" data-toggle="dropdown" aria-expanded="true">Product Category<i class="fa fa-caret-down pl5"></i></a> <ul class="dropdown-menu"> <li class=""> <a style="cursor:pointer;" onclick="content(1)" tabindex="-1" data-toggle="tab" aria-expanded="true">NCE <?php echo taskCount(3); ?> </a> </li> <li class=""> <a style="cursor:pointer;" onclick="content(2)" tabindex="-1" data-toggle="tab" aria-expanded="true">BIOLOGICS <?php echo taskCount(1); ?> </a> </li> <li class=""> <a style="cursor:pointer;" onclick="content(3)" tabindex="-1" data-toggle="tab" aria-expanded="true">PRESCRIPTION <?php echo taskCount(6); ?> </a> </li> <li class=""> <a style="cursor:pointer;" onclick="content(4)" tabindex="-1" data-toggle="tab" aria-expanded="true">NON-PRESCRIPTION <?php echo taskCount(7); ?> </a> </li> <li class=""> <a style="cursor:pointer;" onclick="content(5)" tabindex="-1" data-toggle="tab" aria-expanded="true">NATURAL PRODUCT <?php echo taskCount(10); ?> </a> </li> <li class=""> <a style="cursor:pointer;" onclick="content(6)" tabindex="-1" data-toggle="tab" aria-expanded="true">HEALTH SUPPLEMENT <?php echo taskCount(5); ?> </a> </li> <li class=""> <a style="cursor:pointer;" onclick="content(7)" tabindex="-1" data-toggle="tab" aria-expanded="true">VATERINARY <?php echo taskCount(17); ?> </a> </li> <li class=""> <a style="cursor:pointer;" onclick="content(8)" tabindex="-1" data-toggle="tab" aria-expanded="true">ADDITIONAL <?php echo taskCount(15); ?> </a> </li> <li class=""> <a style="cursor:pointer;" onclick="content(9)" tabindex="-1" data-toggle="tab" aria-expanded="true">COMBO <?php echo taskCount(16); ?> </a> </li> </ul> </li> </ul> <?php } else { if ($id == 18) { ?> <ul class="nav panel-tabs-border panel-tabs"> <li class='active'><a style="cursor:pointer;" onclick="content(1)" tabindex="-1" data-toggle="tab" aria-expanded="true">Pass</a></li> <li class=""><a style="cursor:pointer;" onclick="content(2)" tabindex="-1" data-toggle="tab" aria-expanded="true">Fail</a></li> </ul> <?php } else { if ($id == 16 or $id == 19 or $id == 23 or $id == 25 or $id == 27) { ?> <ul class="nav panel-tabs-border panel-tabs"> <?php $query = "SELECT rsc_kod,rsc_desc FROM ref_sample_category"; $result = selectQuery($query); $count = 1; while ($row = mysqli_fetch_assoc($result)) { if ($count == 1) { echo "<li class='active'>"; } else { echo "<li class=''>"; } ?> <a style="cursor:pointer;" onclick="content(<?php echo $row['rsc_kod']; ?> )" tabindex="-1" data-toggle="tab" aria-expanded="true"><?php echo $row['rsc_desc']; ?> ()</a> </li> <?php $count++; } ?> </ul> <?php } elseif ($id == 29 or $id == 30) { ?> <ul class="nav panel-tabs-border panel-tabs"> <li class="active"> <a style="cursor:pointer;" onclick="content(1)" tabindex="-1" data-toggle="tab" aria-expanded="true">General</a> </li> <li class=""> <a style="cursor:pointer;" onclick="content(2)" tabindex="-1" data-toggle="tab" aria-expanded="true">Status</a> </li> </ul> <?php } elseif ($id == 32) { ?> <ul class="nav panel-tabs-border panel-tabs"> <li class="active"> <a style="cursor:pointer;" onclick="content(1)" tabindex="-1" data-toggle="tab" aria-expanded="true">Home</a> </li> <li class=""> <a style="cursor:pointer;" onclick="content(2)" tabindex="-1" data-toggle="tab" aria-expanded="true">History</a> </li> </ul> <?php } elseif ($id == 33) { ?> <ul class="nav panel-tabs-border panel-tabs"> <li class="active"> <a style="cursor:pointer;" onclick="content(1)" tabindex="-1" data-toggle="tab" aria-expanded="true">Protocol</a> </li> <li class=""> <a style="cursor:pointer;" onclick="content(2)" tabindex="-1" data-toggle="tab" aria-expanded="true">Sample</a> </li> </ul> <?php } } } }