$filter['fullname'] = $_GET['search_text'];
        $filter['phone'] = $_GET['search_text'];
    } else {
        $filter = objectToArray(str2json($_GET['search_text']));
    }
    if ($_GET['admin_data'] == 'history') {
        $rs = vcn_report_search($filter, null, true, array_merge(array('bind' => 'OR'), $opts));
    }
    if ($_GET['admin_data'] == 'customer') {
        $rs = vcn_customers_search($filter, null, true, array_merge(array('bind' => 'OR'), $opts));
    }
}
//final
if (!isset($rs)) {
    if ($_GET['admin_data'] == 'history') {
        $rs = vcn_report($common_filter, $opts);
    }
    //filter reports
    if ($_GET['admin_data'] == 'customer') {
        $rs = get_customers($common_filter, $opts);
    }
    //get filter customers
}
//segment
$totals = mysql_fetch_array($rs);
if (mysql_num_rows($rs)) {
    mysql_data_seek($rs, 0);
}
//reset mysql
$total_pages = isset($totals['total_results']) ? total_pages($totals['total_results'], $num) : 0;
//get total pages
    <script src="js/js.js"></script>
    <link rel="stylesheet" type="text/css" href="css/style.css">
    <link rel="stylesheet" type="text/css" href="css/style1.css">
    <script src="js/jquery-ui.min.1.8.23.js"></script>
    <link rel="stylesheet" type="text/css" href="css/jquery-ui.1.8.23.css">
</head>
<body>
<div id='vcn_wrap'><div id="header"><h1>Vaycanhan.com</h1></div>
<?php 
include 'include/functions.php';
$id = _GET('id');
//URL: ?id=x
if (!isset($id) || !$id) {
    show_error('Error', 'Không chỉ định lịch sử khách hàng ?');
}
$rs = vcn_report($id);
//get history
if (!mysql_num_rows($rs)) {
    show_error('Page Not Found', 'Không tìm thấy lịch sử này !');
}
$result = mysql_fetch_assoc($rs);
$data['history_rs'] = get_history($result['id'], $result['save_history']);
//get history
$data['result'] = $result;
extract($data);
?>
<h2>Thông tin khách hàng</h2><br/>
<table border='1' cellpadding='5'>
    <tr>
        <td>Họ & tên</td>
        <td><strong><?php