<commit_before><?php
require_once 'configuration.php';

if ($_SESSION['logged'] != true) {
    header("location:login.php");
}

// assign values from session array
$org_code = $_SESSION['org_code'];
$org_name = $_SESSION['org_name'];
$org_type_name = $_SESSION['org_type_name'];
$user_name = $_SESSION['username'];

$echoAdminInfo = "";

// assign values admin users
if ($_SESSION['user_type'] == "admin" && $_GET['org_code'] != "") {
    $org_code = (int) mysql_real_escape_string($_GET['org_code']);
    $org_name = getOrgNameFormOrgCode($org_code);
    $org_type_name = getOrgTypeNameFormOrgCode($org_code);
    $echoAdminInfo = " | Administrator";
    $isAdmin = TRUE;
}

// GET
$seach_type = mysql_real_escape_string($_GET['type']);

?>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title><?php echo $org_name . " | " . $app_name; ?></title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">

        <!-- Le styles -->
        <link href="assets/css/bootstrap.min.css" rel="stylesheet">
        <link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
        <link href="library/font-awesome/css/font-awesome.min.css" rel="stylesheet">
        <link href="library/bootstrap-editable/css/bootstrap-editable.css" rel="stylesheet">
        <link href="assets/css/style.css" rel="stylesheet">
        <link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet">


        <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
          <script src="assets/js/html5shiv.js"></script>
        <![endif]-->

        <!-- favicon and touch icons -->
        <?php include_once 'include/header/header_icon.inc.php'; ?>

        <!--Google analytics code-->
        <?php include_once 'include/header/header_ga.inc.php'; ?>

    </head>

    <body data-spy="scroll" data-target=".bs-docs-sidebar">

        <!-- Top navigation bar
        ================================================== -->
        <?php include_once 'include/header/header_top_menu.inc.php'; ?>

        <!-- Subhead
        ================================================== -->
        <header class="jumbotron subhead" id="overview">
            <div class="container">
                <h1><?php echo $org_name; ?></h1>
                <p class="lead"><?php echo "$org_type_name"; ?></p>
            </div>
        </header>


        <div class="container">

            <!-- Docs nav
            ================================================== -->
            <div class="row-fluid">
                <div class="span3 bs-docs-sidebar">
                    <ul class="nav nav-list bs-docs-sidenav">
                        <li><a href="admin_home.php"><i class="icon-chevron-right"></i><i class="icon-home"></i> Admin Homepage</a>
                        <li class="active"><a href="search.php"><i class="icon-chevron-right"></i><i class="icon-search"></i> Search</a></li>
                        <li><a href="add_new.php"><i class="icon-chevron-right"></i><i class="icon-plus"></i> Add New</a>
                        <!--                        
                        <li><a href="home.php?org_code=<?php echo $org_code; ?>"><i class="icon-chevron-right"></i><i class="icon-home"></i> Homepage</a>
                        <li><a href="org_profile.php?org_code=<?php echo $org_code; ?>"><i class="icon-chevron-right"></i><i class="icon-hospital"></i> Organization Profile</a></li>
                        <li><a href="sanctioned_post.php?org_code=<?php echo $org_code; ?>"><i class="icon-chevron-right"></i><i class="icon-group"></i> Sanctioned Post</a></li>
                        <li><a href="employee.php?org_code=<?php echo $org_code; ?>"><i class="icon-chevron-right"></i><i class="icon-user-md"></i> Employee Profile</a></li>
                        -->
                        <li><a href="settings.php?org_code=<?php echo $org_code; ?>"><i class="icon-chevron-right"></i><i class="icon-cogs"></i> Settings</a></li>
                        <li><a href="logout.php"><i class="icon-chevron-right"></i><i class="icon-signout"></i> Sign out</a></li>
                    </ul>
                </div>
                <div class="span9">
                    <!-- Search main div
                    ================================================== -->
                    <section id="search_main">
                        
                        <!-- search options -->
                        <?php if ($seach_type == ""): ?>
                        <div id="search_options">
                            <div class="row-fluid">
                                <table class="table table-striped">
                                    <tbody>
                                        <tr>
                                            <td>
                                                <a href="search.php?type=org" class="btn btn-large btn-warning">
                                                    <i class="icon-hospital icon-2x pull-left"></i> Search Organization
                                                </a>
                                            </td>
                                            <td>Search an organization using the organization name organization code, organization type or find it form the administrative divisions.</td>
                                        </tr>
                                        <!--
                                        <tr>
                                            <td>
                                                <a href="search.php?type=staff" class="btn btn-large btn-info">
                                                    <i class="icon-user-md icon-2x pull-left"></i> Search Employee
                                                </a>
                                            </td>
                                            <td>Find an individual staff from an organization, search by his name or staff id.</td>
                                        </tr>
                                        -->
                                        <tr>
                                            <td>
                                                <a href="search.php?type=user" class="btn btn-large btn-primary">
                                                    <i class="icon-user icon-2x pull-left"></i> Search HRM Users
                                                </a>
                                            </td>
                                            <td>Find an individual staff from an organization, search by his name or staff id.</td>
                                        </tr>
                                    </tbody>
                                </table>                            
                            </div>
                        </div>
                        <?php endif; ?> <!-- /search options -->
                        
                        <!-- search organization -->
                        <?php if ($seach_type == "org"): ?>
                        <h3>Search Organization</h3>
                            <div id="search_org_main">
                                <div  id="search_org">
                                    <!-- Search Organization by Organization name or code -->
                                    <div class="row-fluid">
                                        <div class="span12 alert">
                                            <div class="control-group">
                                                <p class="lead">Search By Organization Name or Organization Code</p>
                                                <div class="controls input-append">
                                                    <input type="text" id="searchOrg" class="input-xlarge" placeholder="Enter Organization Name or Code">
                                                    <button id="btn_search_org" class="btn btn-info" type="button">Find Organization(s)</button>
                                                    <button id="btn_reset" class="btn" type="button">Reset</button>
                                                </div>
                                            </div>
                                        </div>                            
                                    </div>
                                    <!-- Search Organization by administrative location -->
                                    <div class="row-fluid">
                                        <div class="span12 alert">
                                            <div class="">
                                                <p class="lead">Find Organization(s) from the administrative requin, agency type or organization type</p>
                                                <div class="control-group">
                                                    <select id="admin_division" name="admin_division">
                                                        <option value="0">Select Division</option>
                                                        <?php
                                                        /**
                                                         * @todo change old_visision_id to division_bbs_code
                                                         */
                                                        $sql = "SELECT admin_division.division_name, admin_division.old_division_id FROM admin_division";
                                                        $result = mysql_query($sql) or die(mysql_error() . "<br /><br />Code:<b>loadDivision:1</b><br /><br /><b>Query:</b><br />___<br />$sql<br />");

                                                        while ($rows = mysql_fetch_assoc($result)) {
                                                            echo "<option value=\"" . $rows['old_division_id'] . "\">" . $rows['division_name'] . "</option>";
                                                        }<commit_msg>autofocus +<commit_after><?php
require_once 'configuration.php';

if ($_SESSION['logged'] != true) {
    header("location:login.php");
}

// assign values from session array
$org_code = $_SESSION['org_code'];
$org_name = $_SESSION['org_name'];
$org_type_name = $_SESSION['org_type_name'];
$user_name = $_SESSION['username'];

$echoAdminInfo = "";

// assign values admin users
if ($_SESSION['user_type'] == "admin" && $_GET['org_code'] != "") {
    $org_code = (int) mysql_real_escape_string($_GET['org_code']);
    $org_name = getOrgNameFormOrgCode($org_code);
    $org_type_name = getOrgTypeNameFormOrgCode($org_code);
    $echoAdminInfo = " | Administrator";
    $isAdmin = TRUE;
}

// GET
$seach_type = mysql_real_escape_string($_GET['type']);

?>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title><?php echo $org_name . " | " . $app_name; ?></title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">

        <!-- Le styles -->
        <link href="assets/css/bootstrap.min.css" rel="stylesheet">
        <link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
        <link href="library/font-awesome/css/font-awesome.min.css" rel="stylesheet">
        <link href="library/bootstrap-editable/css/bootstrap-editable.css" rel="stylesheet">
        <link href="assets/css/style.css" rel="stylesheet">
        <link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet">


        <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
          <script src="assets/js/html5shiv.js"></script>
        <![endif]-->

        <!-- favicon and touch icons -->
        <?php include_once 'include/header/header_icon.inc.php'; ?>

        <!--Google analytics code-->
        <?php include_once 'include/header/header_ga.inc.php'; ?>

    </head>

    <body data-spy="scroll" data-target=".bs-docs-sidebar">

        <!-- Top navigation bar
        ================================================== -->
        <?php include_once 'include/header/header_top_menu.inc.php'; ?>

        <!-- Subhead
        ================================================== -->
        <header class="jumbotron subhead" id="overview">
            <div class="container">
                <h1><?php echo $org_name; ?></h1>
                <p class="lead"><?php echo "$org_type_name"; ?></p>
            </div>
        </header>


        <div class="container">

            <!-- Docs nav
            ================================================== -->
            <div class="row-fluid">
                <div class="span3 bs-docs-sidebar">
                    <ul class="nav nav-list bs-docs-sidenav">
                        <li><a href="admin_home.php"><i class="icon-chevron-right"></i><i class="icon-home"></i> Admin Homepage</a>
                        <li class="active"><a href="search.php"><i class="icon-chevron-right"></i><i class="icon-search"></i> Search</a></li>
                        <li><a href="add_new.php"><i class="icon-chevron-right"></i><i class="icon-plus"></i> Add New</a>
                        <!--                        
                        <li><a href="home.php?org_code=<?php echo $org_code; ?>"><i class="icon-chevron-right"></i><i class="icon-home"></i> Homepage</a>
                        <li><a href="org_profile.php?org_code=<?php echo $org_code; ?>"><i class="icon-chevron-right"></i><i class="icon-hospital"></i> Organization Profile</a></li>
                        <li><a href="sanctioned_post.php?org_code=<?php echo $org_code; ?>"><i class="icon-chevron-right"></i><i class="icon-group"></i> Sanctioned Post</a></li>
                        <li><a href="employee.php?org_code=<?php echo $org_code; ?>"><i class="icon-chevron-right"></i><i class="icon-user-md"></i> Employee Profile</a></li>
                        -->
                        <li><a href="settings.php?org_code=<?php echo $org_code; ?>"><i class="icon-chevron-right"></i><i class="icon-cogs"></i> Settings</a></li>
                        <li><a href="logout.php"><i class="icon-chevron-right"></i><i class="icon-signout"></i> Sign out</a></li>
                    </ul>
                </div>
                <div class="span9">
                    <!-- Search main div
                    ================================================== -->
                    <section id="search_main">
                        
                        <!-- search options -->
                        <?php if ($seach_type == ""): ?>
                        <div id="search_options">
                            <div class="row-fluid">
                                <table class="table table-striped">
                                    <tbody>
                                        <tr>
                                            <td>
                                                <a href="search.php?type=org" class="btn btn-large btn-warning">
                                                    <i class="icon-hospital icon-2x pull-left"></i> Search Organization
                                                </a>
                                            </td>
                                            <td>Search an organization using the organization name organization code, organization type or find it form the administrative divisions.</td>
                                        </tr>
                                        <!--
                                        <tr>
                                            <td>
                                                <a href="search.php?type=staff" class="btn btn-large btn-info">
                                                    <i class="icon-user-md icon-2x pull-left"></i> Search Employee
                                                </a>
                                            </td>
                                            <td>Find an individual staff from an organization, search by his name or staff id.</td>
                                        </tr>
                                        -->
                                        <tr>
                                            <td>
                                                <a href="search.php?type=user" class="btn btn-large btn-primary">
                                                    <i class="icon-user icon-2x pull-left"></i> Search HRM Users
                                                </a>
                                            </td>
                                            <td>Find an individual staff from an organization, search by his name or staff id.</td>
                                        </tr>
                                    </tbody>
                                </table>                            
                            </div>
                        </div>
                        <?php endif; ?> <!-- /search options -->
                        
                        <!-- search organization -->
                        <?php if ($seach_type == "org"): ?>
                        <h3>Search Organization</h3>
                            <div id="search_org_main">
                                <div  id="search_org">
                                    <!-- Search Organization by Organization name or code -->
                                    <div class="row-fluid">
                                        <div class="span12 alert">
                                            <div class="control-group">
                                                <p class="lead">Search By Organization Name or Organization Code</p>
                                                <div class="controls input-append">
                                                    <input type="text" id="searchOrg" class="input-xlarge" placeholder="Enter Organization Name or Code" autofocus="">
                                                    <button id="btn_search_org" class="btn btn-info" type="button">Find Organization(s)</button>
                                                    <button id="btn_reset" class="btn" type="button">Reset</button>
                                                </div>
                                            </div>
                                        </div>                            
                                    </div>
                                    <!-- Search Organization by administrative location -->
                                    <div class="row-fluid">
                                        <div class="span12 alert">
                                            <div class="">
                                                <p class="lead">Find Organization(s) from the administrative requin, agency type or organization type</p>
                                                <div class="control-group">
                                                    <select id="admin_division" name="admin_division">
                                                        <option value="0">Select Division</option>
                                                        <?php
                                                        /**
                                                         * @todo change old_visision_id to division_bbs_code
                                                         */
                                                        $sql = "SELECT admin_division.division_name, admin_division.old_division_id FROM admin_division";
                                                        $result = mysql_query($sql) or die(mysql_error() . "<br /><br />Code:<b>loadDivision:1</b><br /><br /><b>Query:</b><br />___<br />$sql<br />");

                                                        while ($rows = mysql_fetch_assoc($result)) {
                                                            echo "<option value=\"" . $rows['old_division_id'] . "\">" . $rows['division_name'] . "</option>";
                                                        }
{'fraction_non_alphanumeric': 0.15111986217080975, 'fraction_numerical': 0.002362786118631553, 'mean_word_length': 1.1068132323965572, 'pattern_counts': {'":': 0, '<': 435, '<?xml version=': 0, '>': 433, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 210, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4683358', 'n_tokens_mistral': 4567, 'n_tokens_neox': 4329, 'n_words': 944}