MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with Dragoon. If not, see <http://www.gnu.org/licenses/>. */ //require "../www/db-login.php"; //require "../www/error-handler.php"; set_time_limit(30000); include "createDashboard.php"; date_default_timezone_set('America/Phoenix'); !empty($_REQUEST["fromDate"]) ? $fromDate = $_REQUEST["fromDate"] : ($fromDate = Date("Y-m-d")); !empty($_REQUEST["toDate"]) ? $toDate = $_REQUEST["toDate"] : ''; !empty($_REQUEST["fromTime"]) ? $fromTime = $_REQUEST["fromTime"] : ($fromTime = '15:00:000'); !empty($_REQUEST["toTime"]) ? $toTime = $_REQUEST["toTime"] : ($toTime = '16:15:000'); !empty($_REQUEST["section"]) ? $section = $_REQUEST["section"] : ($section = 'sos-326-spring14'); !empty($_REQUEST["mode"]) ? $mode = $_REQUEST["mode"] : ($mode = 'STUDENT'); !empty($_REQUEST["user"]) ? $user = $_REQUEST["user"] : ($user = ''); !empty($_REQUEST["dashboard"]) && $_REQUEST["dashboard"] === 'small' ? $smallDashboard = true : ($smallDashboard = false); $mysqli = mysqli_connect("localhost", $dbuser, $dbpass, $dbname) or die("Connection not established. Check the user log file"); //$mysqli = mysqli_connect("localhost", "root", "qwerty211", "laits_stable14") or die("Connection not established. Check the user log file"); $db = new Dashboard($mysqli); if ($smallDashboard) { $db->createSmallDashboard($section, $mode, $fromDate, $toDate, $fromTime, $toTime, $user); } else { $db->createDashboard($section, $mode, $fromDate, $toDate, $fromTime, $toTime, $user); } mysqli_close($mysqli); ?> </body> </html>
Dragoon is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with Dragoon. If not, see <http://www.gnu.org/licenses/>. */ require "../www/db-login.php"; require "../www/error-handler.php"; set_time_limit(30000); include "createDashboard_js.php"; date_default_timezone_set('America/Phoenix'); !empty($_REQUEST["fd"]) ? $fromDate = $_REQUEST["fd"] : ($fromDate = ''); !empty($_REQUEST["td"]) ? $toDate = $_REQUEST["td"] : ($toDate = ''); !empty($_REQUEST["ft"]) ? $fromTime = $_REQUEST["ft"] : ($fromTime = ''); !empty($_REQUEST["tt"]) ? $toTime = $_REQUEST["tt"] : ($toTime = ''); !empty($_REQUEST["s"]) ? $section = $_REQUEST["s"] : ($section = 'login.html'); !empty($_REQUEST["m"]) ? $mode = $_REQUEST["m"] : ($mode = 'STUDENT'); !empty($_REQUEST["u"]) ? $user = $_REQUEST["u"] : ($user = ''); !empty($_REQUEST["p"]) ? $sproblem = $_REQUEST["p"] : ($sproblem = ''); $problem = strlen($sproblem) > 30 ? substr($sproblem, 0, 30) : $sproblem; !empty($_REQUEST["db_name"]) ? $dbname = $_REQUEST["db_name"] : ''; !empty($_REQUEST["db_user"]) ? $dbuser = $_REQUEST["db_user"] : ''; !empty($_REQUEST["db_name"]) ? $dbpass = $_REQUEST["db_password"] : ''; $mysqli = mysqli_connect("localhost", $dbuser, $dbpass, $dbname) or die("Connection not established. Check the user log file"); //$mysqli = mysqli_connect("localhost", "root", "qwerty211", "laits_cpi") or die("Connection not established. Check the user log file"); $db = new Dashboard($mysqli); $resultObjects = $db->createDashboard($section, $mode, $user, $problem, $fromDate, $toDate, $fromTime, $toTime); print json_encode($resultObjects); mysqli_close($mysqli);