<?php session_start(); include_once '../configuration/db.php'; include_once '../configuration/ClassUser.php'; include_once '../configuration/ClassTicket.php'; include_once '../function/funcs.php'; //setup user $user = new User(); setupUser($user); //setup tkt $ticket = new Ticket(); //get input id if (isset($_GET['id'])) { $token = $_GET['id']; $ticket->getTicketBy($token); } //checking group afference if ($user->getGroup() == $ticket->groupAssigned || $user->getPosition() == 'admin') { echo "\n <html>\n <head>"; if (isset($_GET['new'])) { echo "<title>OpenTroubleTicketing | New Ticket </title>"; } else { echo "<title>OpenTroubleTicketing | View Ticket : " . $ticket->id[0] . " </title>"; } echo "\n <meta charset='utf-8'>\n <meta name='viewport' content='width=device-width, initial-scale=1'>\n <link rel='icon' href='icon/icon.png'/>\n <link rel='stylesheet' href='../style/bootstrap.min.css'>\n <link rel='stylesheet' href='windowTicketStyle.css'>\n <link rel='stylesheet' href='../style/defaultStyle.css'>\n <script src='../js/jquery.min.js'></script>\n <script src='../js/bootstrap.min.js'></script>\n <script src='windowTicketScript.js'></script>\n <script src='../js/defaultScript.js'></script>\n </head>\n <body>\n <div class='container-fluid'>"; if (isset($_GET['new'])) { echo "<span id='tktID' hidden='true'>new</span>"; } else { echo "<span id='tktID' hidden='true'>" . $ticket->id[0] . "</span>"; }
<?php require_once dirname(__FILE__) . '/../lib/smob/SMOB.php'; if (file_exists($arc)) { include_once $arc; } if (isset($_GET['cmd'])) { $cmd = $_GET['cmd']; if ($cmd == "create-db") { echo createDB(); } elseif ($cmd == "setup-smob") { setupSMOB(); } elseif ($cmd == "setup-user") { setupUser(); } else { echo "<p>Sorry, I didn't understand the command ...</p>"; } } function createDB() { $host = urldecode($_GET['host']); $name = $_GET['name']; $user = $_GET['user']; $pwd = $_GET['pwd']; $store = $_GET['store']; $ret = "<p>"; $dbExists = false; $con = mysql_connect($host, $user, $pwd); // try to connect if (!$con) { die('Could not connect: ' . mysql_error());
<?php include_once '../functions.php'; include_once '../db_connect.php'; sec_session_start(); if (isset($_SESSION['user_id'], $_POST['graduation_year'], $_FILES['image'])) { $fileName = $_FILES['image']['tmp_name']; echo setupUser($mysqli, $_SESSION['user_id'], $fileName, $_POST['graduation_year']); } else { echo "POST/FILES variables not set"; }