exit; case "editCarouselImage": $result = DbManager::editCarouselImage($request->data); echo json_encode($result); exit; case "saveTestimonials": $result = DbManager::saveOrder($request->data, "testimonials"); echo json_encode($result); exit; case "saveProjects": $result = DbManager::saveOrder($request->data, "projects"); $result = DbManager::getManageProject(); echo json_encode($result); exit; case "updateObject": $result = DbManager::updateDb($request->table, $request->data); echo json_encode($result); exit; case "getAdminMiniProjects": $result = DbManager::getAdminMiniProjects($request->table, $request->data); echo json_encode($result); exit; case "sendEmail": $mail = new PHPMailer(); // defaults to using php "mail()" $body = file_get_contents('static/contact-us.html'); // $body = eregi_replace("[\]",'',$body); $mail->From = "*****@*****.**"; $mail->FromName = "Full Name"; $body = str_replace("###USERNAME###", 'Fuad', $body); $body = str_replace("###PHONE###", 'Fuad', $body);