function KiemTraQuyen($p)
 {
     $group1 = array("home", "contacts-xem", "contacts-chitiet", "orders-xem", "support-xem", "support-chitiet", "hoithao-xem", "gopy-xem", "tk-doi", "tk-sua");
     $group2 = array("pa-xem", "pa-sua", "pa-them", "pa-xoa", "ch-xem", "ch-sua", "ch-them", "product-xem", "product-them", "product-xoa", "product-sua", "product2-xem", "product2-them", "product2-sua", "ser-xem", "ser-them", "ser-sua");
     $group3 = array("contacts-xoa", "support-xoa", "gopy-xoa", "tk-xem", "tk-them", "tk-mk", "tk-cv", "tk-tt", "tk-xoa", "catalog-xem", "catalog-them", "catalog-xoa", "catalog-sua");
     $this_fun = new quantri();
     if ($_SESSION['kt_login_level'] == 1) {
         if (!in_array($p, $group1)) {
             $this_fun->KichUser();
         }
     }
     if ($_SESSION['kt_login_level'] == 2) {
         if (!in_array($p, $group1)) {
             if (!in_array($p, $group2)) {
                 $this_fun->KichUser();
             }
         }
     }
     if ($_SESSION['kt_login_level'] == 3) {
         if (!in_array($p, $group1)) {
             if (!in_array($p, $group2)) {
                 if (!in_array($p, $group3)) {
                     $this_fun->KichUser();
                 }
             }
         }
     }
 }
 function KiemTraQuyen($p)
 {
     $group1 = array("home", "tv-xem", "tv-den", "tv-chua", "tv-sua", "tv-them", "tk-doi", "tk-sua", "tt-xem");
     $group2 = array("home", "tt-xem", "tt-sua", "tt-add", "tt-them", "tk-doi", "tk-sua");
     $group3 = array("tv-xoa", "tt-xoa", "tk-xem", "tk-them", "tk-mk", "tk-cv", "tk-tt", "tk-xoa", "to-tv-xem", "to-tt-xem", "catalog-xem", "catalog-them", "catalog-sua", "catalog-xoa", "kv-xem", "kv-them", "kv-sua", "kv-xoa", "nv-tv-xem", "nv-tv-them", "nv-tv-sua", "nv-tv-xoa", "nv-tt-xem", "nv-tt-them", "nv-tt-sua", "nv-tt-xoa");
     $this_fun = new quantri();
     if ($_SESSION['kt_login_level'] == 1) {
         if (!in_array($p, $group1)) {
             $this_fun->KichUser();
         }
     }
     if ($_SESSION['kt_login_level'] == 2) {
         if (!in_array($p, $group2)) {
             $this_fun->KichUser();
         }
     }
     if ($_SESSION['kt_login_level'] == 3) {
         if (!in_array($p, $group1)) {
             if (!in_array($p, $group2)) {
                 if (!in_array($p, $group3)) {
                     $this_fun->KichUser();
                 }
             }
         }
     }
 }