function test_addSpecialCourse() { $_POST['spCourse'] = 1; $_POST['cbxactive'] = 1; $_POST['txtcredits'] = 3; if (isset($_POST['spCourse'])) { $spActive = $_POST['spCourse']; } $i = 0; if (isset($_POST["cbxactive"])) { $i = 1; } //@@ -59,8 +60,8 @@ $credits = $_POST['txtcredits']; //$credits=$_POST["txtcredits"]; // $cdet=str_replace("'","\'",$cdet); $cid = 1; $cnm = "Test Name"; $cdet = "Test description"; $prereq = 20; $coreq = 21; $credits = 3; $sql = "insert into courses(courseno,coursename,special,description,prereqid,coreqid,credits,active,deptid)values("; $sql .= "'" . strtoupper($cid) . "','" . $cnm . "',{$spActive},'{$cdet}',{$prereq},{$coreq},{$credits},{$i},1)"; echo $sql; $result = ExecuteNonQuery($sql); $this->assertTrue($result); }
</div> <div id="content"> <div id="viewcatdiv"> <div id="info"> <p>This page displays Departments.<span style="float:right;"><a href="adddepartment.php"><img src="images/Add.png" alt="Add" width="50px"></a></span></p> </div> <div id="viewbannercontent"> <table> <tr> <th align="left">Prefix</th> <th>Deptartment Name</th> <th>Active??</th> <th>Edit</th> </tr> <?php $data = ExecuteNonQuery('select * FROM dept'); while ($info = mysqli_fetch_assoc($data)) { ?> <tr> <td ><?php echo $info["prefix"]; ?> </td> <td><?php echo $info["deptname"]; ?> </td> <td><input type="checkbox" <?php if ($info["active"] == 1) { echo " checked";
<?php session_start(); require "header.php"; require "checkUser.php"; ?> <?php $upd = "update question set views=views+1 where question_id={$_GET['qid']}"; $res = ExecuteNonQuery($upd); $str = "SELECT * from question, user where user.user_id=question.user_id AND question_id={$_GET['qid']}"; $result = ExecuteQuery($str); $no_rows = mysql_num_rows($result); $head = ""; if ($no_rows > 0) { while ($row = mysql_fetch_array($result)) { $head = $row['heading']; echo "<h4>"; echo $head; echo "</h4>"; echo "<span class='box2'>"; echo "<span class='head'><a href='answer.php?id={$_GET['qid']}'>REPLY</a></span>"; echo "<table>"; echo "<tr><td valign='top' width='100px'>\n\t\t\t\t<img src='{$row['uimg']}' alt='' class='uimg'/>\n\t\t\t\t<br/>\n\t\t\t{$row['fullname']}\n\t\t\t<td valign='top'>\n\t\t\t<b>{$head}</b><br/>\n\t\t\t{$row['datetime']}<br/><br/>\n\t\t\t{$row['question_detail']}</tr>"; echo "</table></span><div class='h10'></div>"; } } ?> <?php
<img src="images/cross.png" width="25px" height="25px"><?php echo $_GET["msg"]; ?> </div> <?php } ?> <form method="post" action="kimgcategories.php"> <table style="margin-top:20px;"> <tr> <td>Select Category</td> <td>:</td> <td> <select name="ddcatid"> <?php $data = ExecuteNonQuery('select * FROM kitchencategories where active=1') or die(mysql_error()); while ($info = mysql_fetch_assoc($data)) { ?> <option value="<?php echo $info["imgcatid"]; ?> "><?php echo $info["imgcatname"]; ?> </option> <?php } ?> </select> </td> </tr>
<?php session_start(); require "header.php"; require "checkUser.php"; $uto = $_POST['uto']; $tt = $_POST['tt']; $sql = "INSERT INTO chatmaster (user_id_from,user_id_to) values ({$_SESSION['uid']},{$uto})"; $result = ExecuteNonQuery($sql); $sql = "SELECT MAX(chat_id) as cid FROM chatmaster"; $row = mysql_fetch_array(ExecuteQuery($sql)); $cid = $row['cid']; $sql = "INSERT INTO chat (user_id, chat_id, message) values ({$_SESSION['uid']},{$cid},'{$tt}')"; $result += ExecuteNonQuery($sql); if ($result == 2) { header("location:messaged.php"); } require "footer.php";
<?php if ($_GET["flag"] == 2) { ?> <div id="diverror"> <img src="images/cross.png" width="25px" height="25px"><?php echo $_GET["msg"]; ?> </div> <?php } ?> <div id="info"> <p>This page will change the admin email.</p> </div> <?php $data = ExecuteNonQuery('select * FROM users where id=' . $_SESSION["a_userid"]) or die(mysql_error()); while ($info = mysql_fetch_assoc($data)) { $email = $info["email"]; } ?> <form method="post" action="changeemail.php"> <table> <tr> <td colspan="3" > <?php if (!empty($message)) { echo "<p class=message>" . $message . "</p>"; } else { echo " "; } ?>
<textarea name="tagp" id="tagp" rows="10" cols="50"> <?php if (isset($gp) && $gp != "") { echo $gp; } else { ?> <table> <tr> <td style="vertical-align:top;"> <table border="1"> <tr> <th>Grade Componenent</th> <th>Weight</th> </tr> <?php $data = ExecuteNonQuery("select camid,camname from cams where csid=" . $_SESSION["mapcsid"] . " and uid=" . $_SESSION["userid"] . " and semid=" . $_SESSION["ddlsem3"]); // $cnt=1; while ($info = mysqli_fetch_assoc($data)) { ?> <tr> <th><?php echo $info["camname"]; ?> </th> <th>[NN%]</th> </tr> <?php } ?> </table> </td>
if ($_GET["flag"] == "0") { $cnt = CountRecords("select * from fileinfo where ftype='matrix'"); if ($cnt != 0) { ExecuteNonQuery("update fileinfo set active=0 where ftype='matrix'"); } $sql = "update fileinfo set active=1 where version='" . $_SESSION["ver"] . "' and ftype='matrix'"; ExecuteNonQuery($sql); redirect_to("welcome.php"); } else { if ($_GET["flag"] == "1") { $cnt = CountRecords("select * from fileinfo where ftype='gmatrix'"); if ($cnt != 0) { ExecuteNonQuery("update fileinfo set active=0 where ftype='gmatrix'"); } $sql = "update fileinfo set active=1 where version='" . $_SESSION["ver"] . "' and ftype='gmatrix'"; ExecuteNonQuery($sql); redirect_to("welcome.php"); } } } } } ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>Thank You</title> <link href="css/style.css" rel="stylesheet" type="text/css"> </head>
CKEDITOR.config.toolbar_MA = [['Source', '-', 'Cut', 'Copy', 'Paste', '-', 'Undo', 'Redo', 'RemoveFormat', '-', 'Link', 'Unlink', 'Anchor', '-', 'Image', 'Table', 'HorizontalRule', 'SpecialChar'], '/', ['Format', 'Templates', 'Bold', 'Italic', 'Underline', '-', 'Superscript', '-', ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'], '-', 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent']]; CKEDITOR.replace('tabooks', {toolbar: 'MA'} ); </script> </td> </tr> <tr> <td>Course Assessment Method</td> <td>:</td> <td> <?php $cnt = 0; if (isset($_POST["ddlcnm"])) { $sql = "select camid,camname,camdetails from cams where csid=" . $_POST["ddlcnm"] . " and uid=" . $_SESSION["userid"] . " and semid=" . $_SESSION["ddlsem3"]; $data3 = ExecuteNonQuery($sql); //echo $sql; $cntrec1 = mysqli_num_rows($data3); $cnt = mysqli_num_rows($data3); // echo $cnt; } ?> <div style="width:100%"> <table align="left" id="camtable" style="float:left;width:60%"> <tr> <th align="left">Name</th> <th align="left">Description</th> </tr> <?php if ($cnt > 0) { $cnt = 1;
<?php include "leftpane.php"; ?> </div> <div id="content"> <div id="addcatdiv"> <div id="info"> <p>This page edit user details<span style="float:right;"><a href="viewusers.php"><img src="images/view.png" alt="view" width="50px"></a></p> </div> <div id="contentdetail"> <form method="post" action="edituser.php?id=<?php echo $_GET["id"]; ?> "> <?php $data = ExecuteNonQuery('select * FROM users where uid=' . $_GET["id"]); while ($info = mysqli_fetch_assoc($data)) { $username = $info["username"]; $firstname = $info["firstname"]; $lastname = $info["lastname"]; $sal = $info["salutation"]; $email = $info["email"]; $officeno = $info["officeno"]; $office = $info["office"]; $isadmin = $info["permission"]; $isactive = $info["active"]; } ?> <table style="width:60%;"> <tr>
require_once "includes/session.php"; include_once "includes/form_functions.php"; require_once "includes/functions.php"; include_once "includes/DataAccess.php"; if (!logged_in()) { redirect_to("index.php"); } if (isset($_POST["Submit"])) { backup_tables(); $old_date = date('l, F d y h:i:s'); // returns Saturday, January 30 10 02:06:34 $old_date_timestamp = strtotime($old_date); $new_date = date('m-d-Y', $old_date_timestamp); $str = 'db-backup_' . $new_date; $qry = "insert into dbbackup(backupname)values('" . $str . ".sql')"; $cnt = ExecuteNonQuery($qry); if ($cnt > 0) { redirect_to("viewbackups.php"); } } ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>Add Back Up</title> <link href="css/style.css" rel="stylesheet" type="text/css"> </head> <body>
<p>This page displays banner uploaded into website.<span style="float:right;"><a href="addimage.php"><img src="images/Add.png" alt="Add" width="50px"></a></span></p> </div> <div id="viewbannercontent"> <table> <!-- <tr> <td colspan="3"><img src="images/viewbanner.png" height="100px" width="100%"></td> </tr> --><tr> <th>Image Name</th> <th>Image</th> <th>Display Order</th> <th>Visible</th> <th> </th> </tr> <?php $data = ExecuteNonQuery('select * FROM images order by disporder') or die(mysql_error()); while ($info = mysql_fetch_assoc($data)) { $tit = getfilename($info["imagetitle"]); $ext = getExtension($info["imagetitle"]); ?> <tr> <td><a href="viewimagedetails.php?id=<?php echo $info["imageid"]; ?> "><?php echo $info["imagename"]; ?> </a></td> <td> <a href="../usrfiles/large/<?php
<div id="profilecontent"> <form method="post" action="editoffhrs.php?id=<?php echo $_GET["id"]; ?> "> <?php $data2 = ExecuteNonQuery('select semname,year FROM semester where active=1'); $snm = ""; $syr = ""; while ($info2 = mysqli_fetch_assoc($data2)) { $snm = $info2["semname"]; $syr = $info2["year"]; } ?> <?php $data3 = ExecuteNonQuery('select * from facultyhours where fhid=' . $_GET["id"]); $sttime = ""; $entime = ""; $cday = array(); while ($info3 = mysqli_fetch_assoc($data3)) { $sttime = explode(":", $info3["starttime"]); $entime = explode(":", $info3["endtime"]); $cday = explode(" ", $info3["cday"]); } ?> <table> <tr> <td colspan="3"><?php echo "<i>Current Semester:</i>" . $snm . " " . $syr; ?> </td>
?> </div> <div id="content"> <div id="viewcatdiv"> <div id="info"> <p>This page displays buildings.<span style="float:right;"><a href="addbuilding.php"><img src="images/Add.png" alt="Add" width="50px"></a></span></p> </div> <div id="viewbannercontent"> <table> <tr> <th>Building Name</th> <th>Active??</th> <th>Edit</th> </tr> <?php $data = ExecuteNonQuery('select * FROM buildings'); while ($info = mysqli_fetch_assoc($data)) { ?> <tr> <td><?php echo $info["bname"]; ?> </td> <td><input type="checkbox" <?php if ($info["active"] == 1) { echo " checked"; } ?> disabled></td> <td><a href="editbuilding.php?id=<?php
<?php include "leftpane.php"; ?> </div> <div id="content"> <div id="addcatdiv"> <div id="info"> <p>This page edit building details of image<span style="float:right;"><a href="viewcategories.php"><img src="images/view.png" alt="view" width="50px"></a></p> </div> <div id="contentdetail"> <form method="post" action="editbuilding.php?id=<?php echo $_GET["id"]; ?> "> <?php $data = ExecuteNonQuery('select * FROM buildings where bid=' . $_GET["id"]); while ($info = mysqli_fetch_assoc($data)) { $bname = $info["bname"]; $active = $info["active"]; } ?> <table> <tr> <td colspan="3" > <?php if (!empty($message)) { echo "<p class=message>" . $message . "</p>"; } else { echo " "; }
<?php include "leftpane.php"; ?> </div> <div id="content"> <div id="addcatdiv"> <div id="info"> <p>This page edit category details of image<span style="float:right;"><a href="viewcategories.php"><img src="images/view.png" alt="view" width="50px"></a></p> </div> <div id="contentdetail"> <form method="post" action="editcategory.php?id=<?php echo $_GET["id"]; ?> "> <?php $data = ExecuteNonQuery('select * FROM imagecategories where imgcatid=' . $_GET["id"]) or die(mysql_error()); while ($info = mysql_fetch_assoc($data)) { $catname = $info["imgcatname"]; $active = $info["active"]; } ?> <table> <tr> <td colspan="3" > <?php if (!empty($message)) { echo "<p class=message>" . $message . "</p>"; } else { echo " "; }
<?php require_once "includes/functions.php"; include "includes/DataAccess.php"; if (isset($_GET["uid"])) { $str = "delete from users where uid=" . $_GET["uid"]; ExecuteNonQuery($str); redirect_to("viewusers.php"); } else { redirect_to("index.php"); }
<?php include "includes/DataAccess.php"; ini_set('display_errors', 'off'); $q = $_GET["q"]; $cntrec = CountRecords('select * FROM objectives where subid=' . $q) or die(mysql_error()); if ($cntrec > 0) { $data = ExecuteNonQuery('select * FROM objectives where subid=' . $q) or die(mysql_error()); while ($info = mysql_fetch_assoc($data)) { ?> <table> <tr> <td class="namecol">Objective 1</td> <td>:</td> <td><input type="text" name="objective1" value="<?php echo $info["obj1"]; ?> " class="inputtext"></td> </tr> <tr> <td class="namecol">Objective 2</td> <td>:</td> <td><input type="text" name="objective2" value="<?php echo $info["obj2"]; ?> " class="inputtext"></td> </tr> <tr> <td class="namecol">Objective 3</td> <td>:</td> <td><input type="text" name="objective3" value="<?php
<?php if ($_SESSION["username"] != null) { include 'menu.php'; } ?> </div> <div id="wrapper"> <div id="surveycontent"> <form> <div id="subseldiv"> <table> <tr> <td>Select Course</td> <td>:</td> <?php $data = ExecuteNonQuery('select * FROM subject where userid=' . mysql_real_escape_string($_SESSION["userid"])) or die(mysql_error()); // $info = mysql_fetch_array($data); ?> <td><select onchange="showUser(this.value)"> <option value="">Select</option> <?php while ($info = mysql_fetch_assoc($data)) { ?> <option value="<?php echo $info['subid']; ?> "><?php echo $info['subname']; ?> </option>
<?php ini_set('display_errors', 'off'); include "includes/DataAccess.php"; require_once "includes/functions.php"; echo "hello"; $id = $_GET["id"]; $cnt = ExecuteNonQuery("delete from subject where subid=" . $id); $cntrec = CountRecords("select * from outcomes_result where subid=" . $id); if ($cntrec > 0) { $cnt = ExecuteNonQuery("delete from outcomes_result where subid=" . $id); } if ($cnt > 0) { redirect_to("viewsubjects.php?flag=1&msg=Record deleted successfully"); }
<?php include "leftpane.php"; ?> </div> <div id="content"> <div id="addcatdiv"> <div id="info"> <p>This page edit Co-Requisite details of</p> </div> <div id="contentdetail"> <form method="post" action="editprereq.php?id=<?php echo $_GET["id"]; ?> "> <?php $data = ExecuteNonQuery('select * FROM pre_req where prereqid=' . $_GET["id"]); while ($info = mysqli_fetch_assoc($data)) { $pcname = $info["pcname"]; } ?> <table> <tr> <td colspan="3" > <?php if (!empty($message)) { echo "<p class=message>" . $message . "</p>"; } else { echo " "; } ?>
<td><?php echo $info["email"]; ?> </td> <td><?php echo $info["office"]; ?> </td> <td><?php echo $info["officeno"]; ?> </td> <td> <?php $semid = GetSingleField("select semid from semester where active=1", "semid"); $data1 = ExecuteNonQuery("select cday,starttime,endtime from facultyhours where uid=" . $info["uid"] . " and semid=" . $semid . " and type='office'"); while ($info1 = mysqli_fetch_assoc($data1)) { echo $info1["cday"] . " " . $info1["starttime"] . ":" . $info1["endtime"] . "<br>"; } ?> </td> </tr> <?php } ?> </table> </form> </div> </div> <div id="footer"> <?php
<?php $data1 = ExecuteNonQuery('select * from outcomes_detail where ocmmainid=' . $info["ocmmainid"]) or die(mysql_error()); $cnt = 1; echo "<table width=100%;padding-top:2px;>"; $cnt = 1; while ($info1 = mysql_fetch_assoc($data1)) { ?> <?php $cntcbx = 0; echo "<tr><td>" . $cnt . "</td><td WIDTH=80% style=font-size:14px>" . $info1["subobj"] . "</td>"; echo "<td align=right;>"; echo "<div style=float:right>"; $noofrec = CountRecords("select * from outcomes_result where subid=" . $q . " and ocmdetailid=" . $info1["ocmdetailid"]); if ($noofrec > 0) { $data2 = ExecuteNonQuery("select obj1,obj2,obj3,obj4,obj5 from outcomes_result where subid=" . $q . " and ocmdetailid=" . $info1["ocmdetailid"]); while ($info2 = mysql_fetch_assoc($data2)) { ?> <?php if (!empty($obj1)) { ?> <input type=checkbox name=mycb<?php echo $info1["ocmdetailid"]; ?> [<?php echo $cntcbx; ?> ] <?php if ($info2["obj1"] == "1") {
<?php include "leftpane.php"; ?> </div> <div id="content"> <div id="addbannerdiv"> <div id="info"> <p>This page edit banner details which rotates automatically front end side.<span style="float:right;"><a href="viewbanners.php"><img src="images/view.png" alt="view" width="50px"></a></p> </div> <div id="contentdetail"> <form method="post" action="editbanner.php?id=<?php echo $_GET["id"]; ?> " enctype="multipart/form-data"> <?php $data = ExecuteNonQuery('select * FROM banners where id=' . $_GET["id"]) or die(mysql_error()); while ($info = mysql_fetch_assoc($data)) { $bnm = $info["bannername"]; $imgnm = $info["imagetitle"]; $dispord = $info["disporder"]; $visible = $info["visible"]; } ?> <table> <tr> <td colspan="3" > <?php if (!empty($message)) { echo "<p class=message>" . $message . "</p>"; } else { echo " ";
?> <?php if (!empty($errors)) { display_errors1($errors); } ?> </td> </tr> <tr> <td>Select Semester</td> <td>:</td> <td> <?php $data1 = ExecuteNonQuery('select semid,semname,year,active from semester order by sortorder'); ?> <select name="ddlsem1"> <option value="">Select</option> <?php while ($info1 = mysqli_fetch_assoc($data1)) { ?> <option value="<?php echo $info1["semid"]; ?> " <?php if ($info1["active"] == "1") { echo "selected"; } ?> ><?php
$strqry = $strqry . $strcols . "requiredcol text,cno text,objno int,version text)"; // echo $strqry."<br><br>"; ExecuteNonQuery($strqry); $strinsert = "insert into {$tnm}("; for ($i = 0; $i < $cols - 3; $i++) { $strinsert .= "col{$i},"; } $strinsert .= "requiredcol,cno,objno,version)values"; //echo $strinsert; $temp = 0; for ($i = 2; $i < count($matrixfields); $i++, $temp++) { if (strtoupper(substr($matrixfields[$i][0], 0, 4)) == "CIS_" || strtoupper(substr($matrixfields[$i][0], 0, 4)) == "ECE_" || strtoupper(substr($matrixfields[$i][0], 0, 5)) == "GCIS_") { $flag = $matrixfields[$i][0]; $temp = 0; continue; } else { $strinsert .= "("; } for ($j = 2; $j < $cols - 1; $j++) { if (trim($matrixfields[$i][$j]) == "") { $strinsert .= "0,"; } else { $strinsert .= "1,"; } } $strinsert .= "'" . $matrixfields[$i][$j] . "','{$flag}',++{$temp},'{$ver}'),"; } $strinsert = substr($strinsert, 0, strlen($strinsert) - 1); // echo $strinsert; ExecuteNonQuery($strinsert); redirect_to("thankyou.php?flag=0");
<p>This page views users.<span style="float:right;"><a href="adduser.php"><img src="images/Add.png" alt="Add" width="50px"></a></span></p> </div> <div id="viewbannercontent"> <table> <tr> <th>First Name</th> <th>Last Name</th> <th>Email</th> <th>Cell Phone</th> <th>Active??</th> <th>Admin??</th> <th>Edit</th> <th>Delete</th> </tr> <?php $data = ExecuteNonQuery('select * FROM users order by lastname'); while ($info = mysqli_fetch_assoc($data)) { ?> <tr> <td ><?php echo $info["firstname"]; ?> </td> <td><?php echo $info["lastname"]; ?> </td> <td><?php echo $info["email"]; ?>
<div id="viewbannerdiv"> <div id="info"> <p>This page displays database backups.<span style="float:right;"><a href="addbackup.php"><img src="images/Add.png" alt="Add" width="50px"></a></span></p> </div> <div id="viewbannercontent"> <table> <!-- <tr> <td colspan="3"><img src="images/viewbanner.png" height="100px" width="100%"></td> </tr> --> <tr> <th>Id</th> <th>Dabatabase Bacup Name</th> <th>Delete</th> </tr> <?php $data = ExecuteNonQuery('select * FROM dbbackup order by id desc') or die(mysql_error()); $cnt = mysql_num_rows($data); if ($cnt == 0) { ?> <td colspan="3" style="text-align:center;font-weight:bold">No BackUp stored into the database</td> <?php } else { while ($info = mysql_fetch_assoc($data)) { ?> <tr> <td><?php echo $info["id"]; ?> </td> <td><a href="dbbackup/<?php
<?php include "leftpane.php"; ?> </div> <div id="content"> <div id="addcatdiv"> <div id="info"> <p>This page edit department details of image<span style="float:right;"><a href="viewcategories.php"><img src="images/view.png" alt="view" width="50px"></a></p> </div> <div id="contentdetail"> <form method="post" action="editdepartment.php?id=<?php echo $_GET["id"]; ?> "> <?php $data = ExecuteNonQuery('select * FROM dept where deptid=' . $_GET["id"]); while ($info = mysqli_fetch_assoc($data)) { $prefix = $info["prefix"]; $deptname = $info["deptname"]; $active = $info["active"]; } ?> <table> <tr> <td colspan="3" > <?php if (!empty($message)) { echo "<p class=message>" . $message . "</p>"; } else { echo " ";
} ?> </select> </td> </tr> <td>Co-requisites</td> <td>:</td> <td><input type="text" name="txtcoreq" value="<?php if (isset($_POST["txtcoreq"]) != "") { echo $_POST["txtcoreq"]; } ?> "> <?php $data = ExecuteNonQuery("select * from co_req"); ?> <select name="ddlcoreq"> <option value="">Select</option> <?php $nccnm = ""; while ($info = mysqli_fetch_assoc($data)) { if (strlen($info["ccname"]) > 50) { $nccnm = substr($info["ccname"], 0, 50) . ".."; } else { $nccnm = $info["ccname"]; } ?> <option value="<?php echo $info["coreqid"];