Example #1
0
 /**
  * Set status of branch (0 = inactive; 1 = active)
  *
  * @param idBranch, status
  * @return str
  */
 public function setStatusBranch($domain, $idBranch, $status)
 {
     $str = '';
     $branch = new Branch();
     if ($branch->updateItem($idBranch, array('status' => $status))) {
         if ($status == 0) {
             $str = "Đã chuyển sang trạng thái inactive thành công!";
         } else {
             $str = "Đã chuyển sang trạng thái active thành công!";
         }
     }
     return $str;
 }