<?php include_once 'Entities.php'; include_once 'DBHandle.php'; use Entities\Category; $dao = new CouponsDAO(); $categoriesArray = $dao->getCategories(); ?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/html"> <head> <title>Page Title</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.1/jquery.mobile-1.2.1.min.css" /> <script src="http://code.jquery.com/jquery-1.8.3.min.js"></script> <script src="http://code.jquery.com/mobile/1.2.1/jquery.mobile-1.2.1.min.js"></script> <script> $('#ul-categories li').live('click', function() { }); </script> </head> <body> <!-- Start of first page --> <div data-role="page" id="page-categories"> <div data-role="header" data-theme="b">
$dao->addCoupon($couponObj); } catch (Exception $e) { echo "failed adding coupon to database"; } echo "<h3>Coupon was successfully uploaded!</h3><br /><a href='http://localhost:10088/Coupons/'>Back to form</a>"; } else { echo "There was an error uploading the file, please try again!"; } } } else { $dao = new CouponsDAO(); $businesses = $dao->getBusinesses(); foreach ($businesses as $businessInfo) { $busSelection .= "<option value={$businessInfo->getID()}>{$businessInfo->getName()}</option>"; } $categories = $dao->getCategories(); foreach ($categories as $categoryInfo) { $categoriesSelection .= "<option value={$categoryInfo->getID()}>{$categoryInfo->getName()}</option>"; } echo '<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Bootstrap --> <link href="css/bootstrap.min.css" rel="stylesheet" media="screen"> <link href="css/signin.css" rel="stylesheet"> <title>Insert Coupons Site</title> </head> <body> <div class="navbar">