Exemplo n.º 1
0
                                <th><center>Status</center>
                            <table style="font-size:15px;width:100%" cellpadding="3px">
                                <td>M</td>
                                <td>RM</td>
                                <td>Web</td>
                                <td>GP</td>
                                <td>CP</td>
                                <td>AI</td>
                                <td>CT</td>
                            </table>
                            </th>
                            </tr>
<?php 
$data = ExecuteNonQuery('select * FROM section where uid=' . $_SESSION["userid"] . " and semid=" . $semid . " and active=1");
while ($info = mysqli_fetch_assoc($data)) {
    $cntrecords = CountRecords("select * from fcamm where csid=" . $info["csid"] . " and semid=" . $info["semid"] . " and uid=" . $info["uid"]);
    if ($cntrecords > 0) {
        $sql = "SELECT SUM(obj1) + SUM(obj2) + SUM(obj3)+ SUM(obj4)+ SUM(obj5)+ SUM(obj6)+ SUM(obj7)+ SUM(obj8)+ SUM(obj9)+ SUM(obj10) as 'Total'\r\nFROM fcamm where csid=" . $info["csid"] . " and semid=" . $info["semid"] . " and uid=" . $info["uid"];
        //echo $sql;
        $sfld = GetSingleField($sql, "Total");
        if ($sfld != 0) {
            $cntrecords = 1;
        } else {
            $cntrecords = 0;
        }
    } else {
        $cntrecords = 0;
    }
    $csnm = GetSingleField("select sections from course_section where csid=" . $info["csid"], "sections");
    ?>
                                <tr>
Exemplo n.º 2
0
 $unm = $_POST["username"];
 $pwd = $_POST["password"];
 $fnm = $_POST["firstname"];
 $lnm = $_POST["lastname"];
 $sal = $_POST["ddlsal"];
 $eml = $_POST["email"];
 $office = $_POST["office"];
 $user = $_POST["ddluser"];
 $active = $_POST["cbxactive"];
 //					echo $active;
 if ($active == "on") {
     $active = 1;
 } else {
     $active = 0;
 }
 $chkusrexist = CountRecords("select * from users where username='******'");
 if ($chkusrexist == 0) {
     if ($_POST["password"] == $_POST["confirmpassword"]) {
         $strinsert = "insert into users(username,password,firstname,lastname,salutation,\r\n\t\t\t\t\t\temail,office,permission,active) values('" . $unm . "','" . $pwd . "','" . $fnm . "','" . $lnm . "','" . $sal . "','" . $eml . "','" . $office . "',b'" . $user . "',b'" . $active . "')";
         echo $strinsert;
         $cnt = ExecuteNonQuery($strinsert);
         if ($cnt == 1) {
             redirect_to("viewfaculties.php?msg=Record inserted successfully.&flag=1");
         } else {
             redirect_to("viewfaculties.php?msg=Error in inserting record..Please try later.&flag=2");
         }
     } else {
         $message = "There was 1 error in the form.";
         single_errormessage('Password and Confirm password does not match');
     }
 } else {
Exemplo n.º 3
0
 } else {
     $coreq = $_POST["ddlcoreq"];
 }
 if (trim($_POST["txtprereq"]) != "" && isset($_POST["txtprereq"])) {
     $cntrec = CountRecords("select * from pre_req where pcname like '" . $_POST["txtprereq"] . "'");
     if ($cntrec == 1) {
         $prereq = GetSingleField("select prereqid from pre_req where pcname like '" . $_POST["txtprereq"] . "'", "prereqid");
     } else {
         $sql = "insert into pre_req(pcname)values('" . str_replace("'", "\\'", $_POST["txtprereq"]) . "')";
         ExecuteNonQuery($sql);
         $prereq = GetSingleField("SELECT MAX(prereqid) as newid from pre_req", "newid");
         //	echo $prereq;
     }
 }
 if (trim($_POST["txtcoreq"]) != "" && isset($_POST["txtcoreq"])) {
     $cntrec = CountRecords("select * from co_req where ccname like '" . $_POST["txtcoreq"] . "'");
     if ($cntrec == 1) {
         $coreq = GetSingleField("select coreqid from co_req where ccname like '" . $_POST["txtcoreq"] . "'", "coreqid");
     } else {
         $sql = "insert into co_req(ccname)values('" . str_replace("'", "\\'", $_POST["txtcoreq"]) . "')";
         $cnt = ExecuteNonQuery($sql);
         $coreq = GetSingleField("SELECT MAX(coreqid) as newid from co_req", "newid");
     }
 }
 $credits = $_POST["txtcredits"];
 //	$cdet=str_replace("'","\'",$cdet);
 $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;
 ExecuteNonQuery($sql);
 redirect_to("viewcourses.php");
Exemplo n.º 4
0
                                </td>
                            </tr>

                            <tr>
                                <td>Assessment Method Mappings</td>
                                <td>:</td>
                                <td>
                                    <?php 
$myc = substr($cnm, 0, 1);
if ($myc == "C") {
    $cnt = CountRecords("select cocmid from course_mappings where cno='" . $cnm . "' and version='" . $version . "'");
} else {
    $cnt = CountRecords("select cocmid from gcourse_mappings where cno='" . $cnm . "' and version='" . $version . "'");
}
$sql = "select * from fclo where semid=" . $_SESSION["ddlsem3"] . " and uid=" . $_SESSION["userid"] . " and csid=" . $_SESSION["mapcsid"];
$cnt2 = CountRecords($sql);
?>
                                    <table align="left" border="1">
                                        <tr>
                                            <td rowspan="2">ASSESSMENT METHODS</td>

                                            <td colspan="<?php 
echo $cnt + $cnt2;
?>
" align="center">
                                                OBJECTIVES
                                            </td>
                                        </tr>
                                        <tr>
                                            <?php 
for ($i = 1; $i <= $cnt + $cnt2; $i++) {
Exemplo n.º 5
0
<?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 
Exemplo n.º 6
0
            	<tr>
                	<td>Visible</td>
					<td>:</td>
                    <td><input type="checkbox" name="cbvisible" <?php 
if ($visible == 1) {
    echo "checked";
}
?>
></td>
                </tr>
            	<tr>
                	<td>Display Order</td>
                    <td>:</td>
                        <td>
                        <?php 
$cntrec = CountRecords("select disporder from banners");
$i = 1;
?>
                        <select name="dispord">
       
                        <?php 
while ($i <= $cntrec) {
    ?>
  
                        <option value="<?php 
    echo $i;
    ?>
" <?php 
    if ($i == $dispord) {
        echo "selected";
    }
     						
                            </div>
                        </td>
                </tr>
               <tr>
                		<td>Assessment Method Mappings:</td>
                		
                		<td>
                                                    <?php 
    $frstc = substr($cno, 0, 1);
    if ($frstc == "C") {
        $cnt = CountRecords("select cocmid from course_mappings where cno='" . $cno . "' and version='" . $version . "'");
    } else {
        $cnt = CountRecords("select cocmid from gcourse_mappings where cno='" . $cno . "' and version='" . $version . "'");
    }
    $cnt2 = CountRecords("select * from fclo where semid=" . $_SESSION["ddlsem4"] . " and uid=" . $_SESSION["userid"] . " and csid=" . $_POST["ddlcnm"]);
    ?>
                               <table align="left" border="1" style="text-align:center">
                               	<tr>
                                	<td rowspan="2">ASSESSMENT METHODS</td>
                                    
                                            	<td colspan="<?php 
    echo $cnt + $cnt2;
    ?>
" align="center">
                                                	OBJECTIVES
                              		          </td>
                                </tr>
                                <tr>
                                        <?php 
    for ($i = 1; $i <= $cnt + $cnt2; $i++) {
            if ($cntrec == 0) {
                $sql = "insert into course_section(sections,active,cid)values('" . $cnm . "',1," . $_POST["ddlcourse"] . ")";
                //			echo $sql;
                ExecuteNonQuery($sql);
            } else {
                $sql = "update course_section set active=1 where sections='" . $cnm . "'";
                //		echo $sql;
                ExecuteNonQuery($sql);
            }
        } else {
            $cnm = GetSingleField("select courseno from courses where cid=" . $_POST["ddlcourse"], "courseno");
            if (strpos($cnm, " ")) {
                $cnm = str_replace(" ", "_", $cnm);
            }
            $cnm = $cnm . "_NU";
            $cntrec = CountRecords("select sections from course_section where sections='" . $cnm . "'");
            if ($cntrec > 0) {
                $sql = "update course_section set active=0 where sections='" . $cnm . "'";
                ExecuteNonQuery($sql);
                $cbx_nu = "";
            }
        }
    }
}
if (!isset($_SESSION["rdbdeg"])) {
    redirect_to("index.php");
}
if (isset($_POST["ddlcourse"])) {
    $sql = "select sections from course_section where cid=" . $_POST["ddlcourse"] . " and active=1";
    //for graduate
    //rdb name:	cbx_oa,cbx_ob,cbx_oc
require_once "includes/session.php";
include "includes/DataAccess.php";
include_once "includes/form_functions.php";
if (!logged_in()) {
    redirect_to("index.php");
}
if (isset($_POST["btnsubmit"])) {
    $errors = array();
    $required_fields = array('oldpassword', 'newpassword', 'confirmpassword');
    $errors = array_merge($errors, check_required_fields($required_fields, $_POST));
    $opwd = $_POST["oldpassword"];
    $npwd = $_POST["newpassword"];
    $cpwd = $_POST["confirmpassword"];
    if (empty($errors)) {
        if ($npwd == $cpwd) {
            $cntrec = CountRecords("select * from users where id=" . $_SESSION["a_userid"] . " and password='******'");
            echo $cntrec;
            if ($cntrec > 0) {
                $query = "update users set password='******' where id=" . $_SESSION["a_userid"];
                $ctrec = ExecuteNonQuery($query);
                if ($ctrec == 1) {
                    //		redirect_to("changepassword.php?msg=Password successfully.&flag=1");
                    redirect_to("logout.php");
                } else {
                    redirect_to("changepassword.php?msg=Error in updating password..Please try later.&flag=2");
                }
            } else {
                $message = "password is incorrect...Please try later.";
            }
        } else {
            $message = "There was 1 error in the form.";
 }
 if (trim($info1["corequisite"]) != "" && !is_null($info1["corequisite"]) && strlen(trim($info1["corequisite"])) > 0) {
     $cntrec = CountRecords("select * from co_req where ccname='" . trim($info1["corequisite"]) . "'");
     if ($cntrec == 0) {
         $str = "insert into co_req(ccname)values('" . trim($info1["corequisite"]) . "')";
         $cnt = ExecuteNonQuery($str);
         if ($cnt == 1) {
             $coid = mysqli_insert_id();
         }
     } else {
         $sql = "select coreqid from co_req where ccname='" . trim($info1["corequisite"]) . "'";
         //	echo $sql."<br>";
         $coid = GetSingleField($sql, "coreqid");
     }
 }
 $cnt = CountRecords("select * from courses where courseno='" . $info1["courseid"] . "'");
 if ($cnt > 0) {
     $cid = GetSingleField("select cid from courses where courseno='" . $info1["courseid"] . "'", "cid");
     //		$tmparray[$i][0]=$info1["courseid"];
     //	$tmparray[$i][1]=$info1["coursename"];
     //	$i++;
     $str = "update courses set courseno='" . $info1["courseid"] . "',coursename='" . $info1["coursename"] . "',description='" . str_replace("'", "\\'", $info1["coursedesc"]) . "',prereqid={$preid},coreqid={$coid},credits=" . $info1["credits"] . ",set active=1, set deptid=1 where cid=" . $cid;
     //echo $str."<br>";
     ExecuteNonQuery($str);
     $str1 = "update catelog_temp set approve=1 where id=" . $info1["id"];
     //	echo $str1."<br>";
     ExecuteNonQuery($str1);
 } else {
     $str = "insert into courses(courseno,coursename,description,prereqid,coreqid,credits,active,deptid)values('";
     $str .= $info1["courseid"] . "','" . $info1["coursename"] . "','" . str_replace("'", "\\'", $info1["coursedesc"]) . "',{$preid},{$coid}," . $info1["credits"] . ",1,1)";
     //	echo $str."<br>";
Exemplo n.º 11
0
			<table>
                 <tr>
            <td>Upload file(.csv only)</td>
            <td>:</td>
            <td><input type="file" name="matrixfile"></td>
            </tr>
            <tr>
            <td>Make new version</td>
            <td>:</td>
            <?php 
$currentver = "";
if ($_GET["flag"] == "1") {
    $cnt = CountRecords("select filename from fileinfo where ftype='gmatrix'");
} else {
    if ($_GET["flag"] == "0") {
        $cnt = CountRecords("select filename from fileinfo where ftype='matrix'");
    } else {
        redirect_to("index.php");
    }
}
if ($_GET["flag"] == "1") {
    if ($cnt != 0) {
        $currentver = GetSingleField("select version from fileinfo where ftype='gmatrix' and active=1", "version");
    } else {
        $currentver = "No Active Version";
    }
} else {
    if ($_GET["flag"] == "0") {
        if ($cnt != 0) {
            $currentver = GetSingleField("select version from fileinfo where ftype='matrix' active=1", "version");
        } else {
 if (!empty($subid) || !empty($subrid)) {
     if ($subid != $subrid) {
         $q1 = CountRecords("select * from objectives where subid =" . $subid);
         $flag = 0;
         if ($q1 == 0) {
             $flag = 1;
         } else {
             $q2 = ExecuteNonQuery("select * from objectives where subid=" . $subid);
             while ($inf1 = mysql_fetch_assoc($q2)) {
                 if (empty($inf1["obj1"]) && empty($inf1["obj2"]) && empty($inf1["obj3"]) && empty($inf1["obj4"]) && empty($inf1["obj5"])) {
                     $flag = 1;
                 }
             }
         }
         if ($flag == 0) {
             $cntrec = CountRecords("select * from outcomes_Result where subid={$subid}");
             if ($cntrec == 0) {
                 $query = ExecuteNonQuery("select * from outcomes_result where subid={$subid}");
                 //	echo $query;
                 $strinsert = "insert into outcomes_result(ocmdetailid,obj1,obj2,obj3,obj4,obj5,subid,userid)values";
                 while ($info2 = mysql_fetch_assoc($query)) {
                     $strinsert .= "(";
                     $strinsert .= $info2["ocmdetailid"] . ",b'" . $info2["obj1"] . "',b'" . $info2["obj2"] . "',b'" . $info2["obj3"] . "',b";
                     $strinsert .= "'" . $info2["obj4"] . "',b'" . $info2["obj5"] . "'," . $subrid . "," . $_SESSION["userid"] . "),";
                 }
                 $strinsert = substr($strinsert, 0, -1);
                 echo $strinsert;
                 $cnt = ExecuteNonQuery($strinsert);
                 if ($cnt > 0) {
                     redirect_to("retrivesurvey.php?msg=Survey inserted successfully&flag=1");
                 } else {
Exemplo n.º 13
0
<?php

ob_start();
ini_set('display_errors', 'off');
include_once "includes/connect.php";
require_once "includes/functions.php";
require_once "includes/session.php";
include "includes/DataAccess.php";
include_once "includes/form_functions.php";
include "../fckeditor/fckeditor.php";
if (!logged_in()) {
    redirect_to("index.php");
}
$cnt = CountRecords("select * from insidepage where pagename='" . $_GET["page"] . "'");
if ($cnt == 1) {
    $pnm = GetSingleField("select pageietitle from insidepage where pagename='" . $_GET["page"] . "'", "pageietitle");
    $desc = GetSingleField("select pagedesc from insidepage where pagename='" . $_GET["page"] . "'", "pagedesc");
}
if (isset($_POST["Submit"])) {
    $errors = array();
    $required_fields = array('pagetitle');
    $errors = array_merge($errors, check_required_fields($required_fields, $_POST));
    if (empty($errors)) {
        if ($cnt == 1) {
            $c_date = date("Y-m-d");
            $qry = "update insidepage set pageietitle='" . $_POST["pagetitle"] . "',pagedesc='" . $_POST["editor1"] . "'";
            $qry = $qry . ",modifyip='" . getip() . "',modifydate='" . $c_date . "' where pagename='" . $_GET["page"] . "'";
            //	echo $qry;
            $cntrec = ExecuteNonQuery($qry);
            if ($cntrec == 1) {
                redirect_to("welcome.php?msg=page content updated successfully.&flag=1");
Exemplo n.º 14
0
ob_start();
ini_set('display_errors', 'off');
require_once "includes/functions.php";
require_once "includes/session.php";
include "includes/DataAccess.php";
include_once "includes/form_functions.php";
if (!logged_in()) {
    redirect_to("index.php");
}
if (isset($_POST["btnsubmit"])) {
    $obj1 = $_POST["objective1"];
    $obj2 = $_POST["objective2"];
    $obj3 = $_POST["objective3"];
    $obj4 = $_POST["objective4"];
    $obj5 = $_POST["objective5"];
    $cnt = CountRecords("select * from objectives where subid=" . $_GET["subid"]);
    if ($cnt == 0) {
        $query = "insert into objectives(subid,obj1,obj2,obj3,obj4,obj5)values(";
        $query .= $_GET["subid"] . ",'" . $obj1 . "','" . $obj2 . "','" . $obj3 . "','" . $obj4 . "','" . $obj5 . "')";
        $cnt1 = ExecuteNonQuery($query);
        echo $query;
        if ($cnt1 == 1) {
            redirect_to("viewsubjects.php?msg=Record inserted successfully.&flag=1");
        } else {
            redirect_to("viewsubjects.php?msg=Error in inserting record..Please try later.&flag=2");
        }
    } else {
        $getid = GetSingleField("select objid from objectives where subid=" . $_GET["subid"], "objid");
        $query = "update objectives set obj1='" . $obj1 . "',obj2='" . $obj2 . "',obj3='" . $obj3 . "',obj4='" . $obj4 . "',";
        $query .= "obj5='" . $obj5 . "' where objid=" . $getid;
        $cnt1 = ExecuteNonQuery($query);
Exemplo n.º 15
0
                	<label><?php 
    echo $prereq;
    ?>
                   <?php 
}
?>
                    </td>
                </tr>
                  <tr>
                	<td>Corequisite</td>
					<td>:</td>
                    <td>
                    <?php 
$flag = 0;
if ($coreq != "") {
    $cntrec = CountRecords("select ccname from co_req where ccname='" . $coreq . "'");
    if ($cntrec == 0) {
        $flag = 1;
    }
} else {
    $flag = 1;
}
?>
                    
                   <?php 
if ($flag == 1) {
    ?>
                    <input type="text" value="<?php 
    echo $coreq;
    ?>
" name="txtcoreq" id="txtcoreq">
    if ($_POST["ddlfac"] == $info["uid"]) {
        echo "selected";
    }
    ?>
><?php 
    echo $info["firstname"] . " " . $info["lastname"];
    ?>
</option>		
		<?php 
}
?>
                    </select>
                    </td>
                </tr>
        <?php 
$cnt = CountRecords("select sections from course_section where semid=" . $_SESSION["ddlsem1"]);
if ($cnt == 0) {
    $data1 = ExecuteNonQuery('select csid,sections from course_section');
}
?>
                <tr>
   				<td align="right">
               	<br>
                Sections
                <select size="10" id="select1" name="select1[]" multiple>
             <?php 
while ($info1 = mysqli_fetch_assoc($data1)) {
    ?>
				<option value="<?php 
    echo $info1["csid"];
    ?>
$data = ExecuteNonQuery('select uid FROM section where semid=' . $_SESSION["statusincsem"] . " group by uid");
while ($info = mysqli_fetch_assoc($data)) {
    $fnm = GetSingleField("select firstname from users where uid=" . $info["uid"], "firstname");
    $lnm = GetSingleField("select lastname from users where uid=" . $info["uid"], "lastname");
    ?>
				
                <tr>
               		<td ><?php 
    echo "<b>" . $fnm . " " . $lnm . "</b>";
    ?>
</td>
               <?php 
    $data1 = ExecuteNonQuery('select * FROM section where semid=' . $_SESSION["statusincsem"] . " and uid=" . $info["uid"] . " and active=1");
    while ($info1 = mysqli_fetch_assoc($data1)) {
        $section = GetSingleField("select sections from course_section where csid=" . $info1["csid"], "sections");
        $cntrecords = CountRecords("select * from fcamm where csid=" . $info1["csid"] . " and semid=" . $_SESSION["statusincsem"] . " and uid=" . $info["uid"]);
        if ($cntrecords > 0) {
            $sql = "SELECT SUM(obj1) + SUM(obj2) + SUM(obj3)+ SUM(obj4)+ SUM(obj5)+ SUM(obj6)+ SUM(obj7)+ SUM(obj8)+ SUM(obj9)+ SUM(obj10) as 'Total'\r\nFROM fcamm where csid=" . $info1["csid"] . " and semid=" . $_SESSION["statusincsem"] . " and uid=" . $info["uid"];
            //echo $sql;
            $sfld = GetSingleField($sql, "Total");
            if ($sfld != 0) {
                $cntrecords = 1;
            } else {
                $cntrecords = 0;
            }
        } else {
            $cntrecords = 0;
        }
        ?>
               <tr>
                   <td>&nbsp;</td>
            <?php 
            $cnt++;
        }
    } else {
        $cntrec = CountRecords("select * from course_mappings where cno='" . str_replace(" ", "_", $cno) . "' and version='" . $ver . "'");
        ?>
                                                    <input type="hidden" value="<?php 
        echo $cntrec + $cnt2;
        ?>
" name="hfclotot" id="hfclotot">

        <?php 
    }
} else {
    $ver = GetSingleField("SELECT version FROM fileinfo where active=1 and ftype='gmatrix'", "version");
    $cntrec = CountRecords("select * from gcourse_mappings where cno='" . str_replace(" ", "_", $cno) . "' and version='" . $ver . "'");
    if ($cntrec > 0) {
        $data2 = ExecuteNonQuery("select mappingname from gcourse_mappings where cno='" . str_replace(" ", "_", $cno) . "' and version='" . $ver . "'");
        $cnt = 1;
        while ($info2 = mysqli_fetch_assoc($data2)) {
            ?>
                                                        <tr>
                                                            <td>
                                                                <input type="text" name="<?php 
            echo "txtclo_" . $cnt;
            ?>
" value="<?php 
            echo $info2["mappingname"];
            ?>
" size="70" disabled>
                                                                <input type="hidden" value="<?php 
function filldata($syllabustmp)
{
    recursiveRemoveDirectory("tmpfilesloc");
    if ($syllabustmp == "All") {
        $str = "";
        $syllabusdata = ExecuteNonQuery("select * from section where semid=" . $_SESSION['ddlsbssem'] . " and active=1");
        $sylarr = array();
        $sbscnt = 0;
        while ($syllabusinfo = mysqli_fetch_assoc($syllabusdata)) {
            $cno = GetSingleField("select courseno from courses where cid=(select cid from course_section where csid=" . $syllabusinfo["csid"] . ")", "courseno");
            $cnot = substr($cno, 0, 1);
            if ($cnot == "C") {
                $version = GetSingleField("select version from fileinfo where active=1 and ftype='matrix'", "version");
            } else {
                $version = GetSingleField("select version from fileinfo where active=1 and ftype='gmatrix'", "version");
            }
            $cnm = GetSingleField("select coursename from courses where courseno like '" . $cno . "'", "coursename");
            $desc = GetSingleField("select description from courses where courseno like '" . $cno . "'", "description");
            $credits = GetSingleField("select credits from courses where courseno like '" . $cno . "'", "credits");
            $sem = GetSingleField("select semname from semester where active=1", "semname");
            $pid = GetSingleField("select prereqid from courses  where courseno like '" . $cno . "'", "prereqid");
            $cid = GetSingleField("select coreqid from courses  where courseno like '" . $cno . "'", "coreqid");
            $prereq = GetSingleField("select pcname from pre_req  where prereqid={$pid}", "pcname");
            $coreq = GetSingleField("select ccname from co_req  where coreqid={$cid}", "ccname");
            $sql = "select starttime,endtime,cday,roomno from facultyhours where uid=" . $syllabusinfo["uid"] . " and semid=" . $_SESSION["ddlsbssem"] . " and csid=" . $syllabusinfo["csid"];
            $web = GetSingleField('select website from section where sectionid=' . $syllabusinfo["sectionid"], 'website');
            $reqmaterials = GetSingleField('select reqmaterials from section where sectionid=' . $syllabusinfo["sectionid"], 'reqmaterials');
            $uid = $syllabusinfo["uid"];
            $dt2 = ExecuteNonQuery($sql);
            while ($inf2 = mysqli_fetch_assoc($dt2)) {
                $classloc = $inf2["roomno"];
                $cday = explode(" ", $inf2["cday"]);
                $tmp = explode(":", $inf2["starttime"]);
                $sttimehr = $tmp[0];
                $sttimemin = substr($tmp[1], 0, 2);
                $sttimeampm = substr($tmp[1], -2);
                $tmp1 = explode(":", $inf2["endtime"]);
                $entimehr = $tmp1[0];
                $entimemin = substr($tmp1[1], 0, 2);
                $entimeampm = substr($tmp1[1], -2);
            }
            $str = "<table width='100%'><tr>\r\n\t\t\t\t\t\t <td><h3><b>Gannon University</b></h3></td>\r\n\t\t\t\t\t\t<td style='text-align:right'><h3><b>Department of Computer and Information Science</b></h3></td>\r\n\t\t\t\t\t   </tr> \r\n\t\t\t\t\t   </table>\r\n\t\t\t\t\t<table style='width:100%' border='1'>\r\n\t\t\t\t<tr>\r\n\t\t\t\t<td>\r\n\t\t\t\t\r\n\t\t\t\t\t   <table>";
            $data = ExecuteNonQuery('select * from users where uid=' . $uid);
            $inst = '';
            $offrno = '';
            $ph = '';
            $email = '';
            while ($info = mysqli_fetch_assoc($data)) {
                $inst = $info['salutation'] . ' ' . $info['firstname'] . $info['lastname'];
                $offrno = $info['office'];
                $ph = $info['officeno'];
                $email = $info['email'];
            }
            $str .= "<tr><td><b>Instructor:</b></td>\r\n\t\t\t\t\t\t<td>" . $inst . "</td>" . "</tr><tr>\r\n\t\t\t\t\t\t<td><b>Office:</b></td>\r\n\t\t\t\t\t\t<td>" . $offrno . "</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td><b>Phone:</b></td>\r\n\t\t\t\t\t\t<td>" . $ph . "</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td><b>Email:</b></td>\r\n\t\t\t\t\t\t<td>" . $email . "</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t   </table>\r\n\t\t\t\t\t   </td>\r\n\t\t\t\t\t   <td>\r\n\t\t\t\t\t   <table>\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td colspan='2'><b>Office Hours</b></td>\r\n\t\t\t\t\t\t</tr>";
            $data1 = ExecuteNonQuery('select starttime,endtime,cday from facultyhours where uid=' . $uid . ' and semid=' . $_SESSION['ddlsbssem'] . ' and type=\'office\'');
            while ($info1 = mysqli_fetch_assoc($data1)) {
                $str .= "<tr>\r\n\t\t\t\t\t\t\t\t\t<td>" . $info1['cday'] . ':' . "</td>" . "<td>" . $info1['starttime'] . ':' . $info1['endtime'] . "</td>\r\n\t\t\t\t\t\t\t\t</tr>";
            }
            $str .= "</table></td>\r\n        \t\t\t\t\t </tr>\r\n        \t\t\t\t\t </table>\r\n        \t<table border='1'>\r\n\t        <tr>\r\n            \t<td>Course Title:</td>\r\n                <td>";
            if (isset($cnm) && $cnm != '') {
                $str .= $cnm;
            }
            $str .= "</td>" . "</tr>\r\n        \t<tr>\r\n            \t<td>Credit Hours:</td>\r\n                <td>";
            if (isset($credits) && $credits != '') {
                $str .= $credits;
            }
            $str .= ' credit(s)' . "</td>" . "\r\n             </tr>";
            $str .= "<tr>\r\n            \t<td>Semester:</td>\r\n                <td>";
            if (isset($sem) && $sem != '') {
                $str .= $sem;
            }
            $str .= "</td>\r\n            </tr>\r\n         \t<tr>\r\n            \t<td>Class Location:</td>\r\n                <td>";
            if (isset($classloc) && $classloc != '') {
                $str .= $classloc;
            }
            $str .= "</td></tr>";
            $sday = "";
            if (in_array('M', $cday)) {
                $sday .= 'M ';
            }
            if (in_array('T', $cday)) {
                $sday .= 'T ';
            }
            if (in_array('W', $cday)) {
                $sday .= 'W ';
            }
            if (in_array('Th', $cday)) {
                $sday .= 'Th ';
            }
            if (in_array('F', $cday)) {
                $sday .= 'F ';
            }
            $str .= "\r\n             <tr>\r\n            \t<td>Class Time:</td>\r\n                <td>";
            $str .= $sday . " " . $sttimehr . ':' . $sttimemin . ' ' . $sttimeampm . "\r\n               <b> to</b>" . $entimehr . ':' . $entimemin . ' ' . $entimeampm . "</option>\r\n                   \r\n                   </td>\r\n            </tr> <tr>\r\n            \t\t<td>Course Description:</td>\r\n                    \r\n            \t\t<td>";
            if (isset($desc) && $desc != '') {
                $str .= $desc;
            }
            $str .= "</td></tr>";
            $str .= "<tr>\r\n            \t\t<td>Course Learning Objectives:</td>\r\n                    \r\n                    <td>\r\n                    The student will be able to<br>";
            $cnot = substr($cno, 0, 1);
            if ($cnot == "C") {
                $cntrec = CountRecords("select cno from course_mappings where cno='" . str_replace(' ', '_', $cno) . "' and version='" . strtoupper($version) . "'");
            } else {
                $cntrec = CountRecords("select cno from gcourse_mappings where cno='" . str_replace(' ', '_', $cno) . "' and version='" . strtoupper($version) . "'");
            }
            $cnt2 = CountRecords('select * from fclo where semid=' . $_SESSION['ddlsbssem'] . ' and csid=' . $syllabusinfo["csid"] . " and uid=" . $uid);
            if ($cntrec > 0) {
                if ($cnot == "C") {
                    $data2 = ExecuteNonQuery("select mappingname from course_mappings where cno='" . str_replace(' ', '_', $cno) . "' and version='" . strtoupper($version) . "'");
                } else {
                    $data2 = ExecuteNonQuery("select mappingname from gcourse_mappings where cno='" . str_replace(' ', '_', $cno) . "' and version='" . strtoupper($version) . "'");
                }
                $cnt = 1;
                while ($info2 = mysqli_fetch_assoc($data2)) {
                    $str .= $info2['mappingname'] . '<br>';
                }
            }
            if ($cnt2 > 0) {
                $data5 = ExecuteNonQuery('select * from fclo where semid=' . $_SESSION['ddlsbssem'] . ' and uid=' . $uid . ' and csid=' . $syllabusinfo["csid"]);
                while ($info5 = mysqli_fetch_assoc($data5)) {
                    $str .= $info5['name'] . '<br>';
                }
            }
            $str .= "\t\r\n                    </td>\r\n            </tr>";
            $str .= "<tr>\r\n            \t\t<td>Co-requisites:</td>\r\n            \t\t\r\n            \t\t<td>";
            if (isset($coreq) && $coreq != '') {
                $str .= $coreq;
            }
            $str .= "</td>\r\n            </tr>\r\n           \t<tr>\r\n            \t\t<td>Prerequisites:</td>\r\n            \t\t\r\n            \t\t<td>";
            if (isset($prereq) && $prereq != '') {
                $str .= $prereq;
            }
            $str .= "</td></tr>";
            //echo $str;
            $str .= "<tr>\r\n         \t\t\t<td>Resources:</td>\r\n            \t\t<td>{$web}       </td>\r\n            </tr>\r\n\t\t\t<tr>\t<td>Required Textbooks:</td>\r\n            \t\t\r\n            \t\t<td>{$reqmaterials}\r\n          \t\t    </td>\r\n            </tr>";
            $str .= " <tr>\r\n            \t\t<td>Course Assessment Method:</td>\r\n            \t\t<td>";
            $cnt = 0;
            $sql = 'select camid,camname,camdetails from cams where csid=' . $syllabusinfo["csid"] . ' and semid=' . $_SESSION["ddlsbssem"] . " and uid=" . $uid;
            $data3 = ExecuteNonQuery($sql);
            //echo $sql;
            $cntrec1 = mysqli_num_rows($data3);
            $cnt = mysqli_num_rows($data3);
            //	echo $cnt;
            $str .= "<div>\r\n \t             \t\t<table align='left' id='camtable' style='text-align:left;' border='1' >";
            if ($cnt > 0) {
                $cnt = 1;
                while ($info3 = mysqli_fetch_assoc($data3)) {
                    $str .= "  <tr>\r\n                                        <td>" . $info3['camname'] . "</td>\r\n                                        <td width='100%'>" . $info3['camdetails'] . "\r\n                                     </td>\r\n                                  </tr>";
                }
            }
            $str .= " </table>\r\n \t\t\t\t\t\t\r\n                        </div>\r\n                    </td>\r\n            </tr>";
            $str .= " <tr>\r\n            \t\t<td>Assessment Method Mappings:</td>\r\n            \t\t\r\n            \t\t<td>";
            //		$sql="select * from course_mappings where cno='".str_replace(" ","_",$cno)."'";
            //	echo $sql;
            $cnot = substr($cno, 0, 1);
            if ($cnot == "C") {
                $cnt = CountRecords("select * from course_mappings where cno='" . str_replace(" ", "_", $cno) . "'");
            } else {
                $cnt = CountRecords("select * from gcourse_mappings where cno='" . str_replace(" ", "_", $cno) . "'");
            }
            $cnt2 = CountRecords('select * from fclo where semid=' . $_SESSION["ddlsbssem"] . ' and csid=' . $syllabusinfo["csid"] . " and uid=" . $uid);
            $myval = $cnt + $cnt2;
            //      echo $myval;
            $str .= "<table align='left' border='1' style='text-align:center'>\r\n                           \t<tr>\r\n                            \t<td rowspan='2'>ASSESSMENT METHODS</td>\r\n                                        \t<td colspan=" . $myval . " align='center'>\r\n                                            \tOBJECTIVES\r\n                          \t\t          </td>\r\n                            </tr>\r\n                            <tr>";
            for ($i = 1; $i <= $cnt + $cnt2; $i++) {
                $str .= "<td>" . $i . "</td>";
            }
            $str .= "</tr>";
            $sql = 'select camid,camname from cams where csid=' . $syllabusinfo["csid"] . ' and semid=' . $_SESSION["ddlsbssem"] . " and uid=" . $uid;
            $data = ExecuteNonQuery($sql);
            while ($info = mysqli_fetch_assoc($data)) {
                $str .= "\t\r\n                            <tr>\r\n                            \t<td>" . $info['camname'] . "</td>";
                for ($i = 1; $i <= $myval; $i++) {
                    $objnm = 'obj' . $i;
                    $t1 = GetSingleField('select ' . $objnm . ' from fcamm where camid=' . $info['camid'] . ' and csid=' . $syllabusinfo["csid"] . ' and semid=' . $_SESSION['ddlsbssem'] . " and uid=" . $uid, $objnm);
                    $str .= "<td>";
                    if ($t1 == '1') {
                        $str .= 'X';
                    } else {
                        $str .= '';
                    }
                    $str .= "</td>";
                }
                $str .= "</tr>";
            }
            $str .= "<tr>\r\n                                <td>Department-Wide Outcomes</td>";
            $cnot = substr($cno, 0, 1);
            if ($cnot == "C") {
                $data = ExecuteNonQuery('select * from matrix_' . strtolower($version) . " where cno like '" . str_replace(" ", "_", $cno) . "'");
            } else {
                $data = ExecuteNonQuery('select * from matrix_' . strtolower($version) . " where cno like '" . str_replace(" ", "_", $cno) . "'");
            }
            //						  echo mysqli_num_rows($data);
            //					  echo $sql;
            while ($info = mysqli_fetch_assoc($data)) {
                $temp = '';
                if ($info['col0'] == '1') {
                    $temp = 'CIS-1';
                }
                if ($info['col1'] == '1') {
                    if ($temp == '') {
                        $temp = 'CIS-2';
                    } else {
                        $temp .= ',' . 'CIS-2';
                    }
                }
                if ($info['col2'] == '1') {
                    if ($temp == '') {
                        $temp = 'CIS-3';
                    } else {
                        $temp .= ',' . 'CIS-3';
                    }
                }
                if ($info['col3'] == '1' || $info['col4'] == '1' || $info['col5'] == '1' || $info['col6'] == '1' || $info['col7'] == '1') {
                    if ($temp == '') {
                        $temp = 'CIS-4';
                    } else {
                        $temp .= ',' . 'CIS-4';
                    }
                }
                if ($info['col8'] == '1') {
                    if ($temp == '') {
                        $temp = 'CIS-5';
                    } else {
                        $temp .= ',' . 'CIS-5';
                    }
                }
                if ($info['col9'] == '1' || $info['col9'] == '1') {
                    if ($temp == '') {
                        $temp = 'CIS-6';
                    } else {
                        $temp .= ',' . 'CIS-6';
                    }
                }
                $str .= "<td>{$temp}</td>";
            }
            $data = ExecuteNonQuery('select * from fclo where csid=' . $syllabusinfo["csid"] . ' and semid=' . $_SESSION['ddlsbssem'] . " and uid=" . $uid);
            $i = mysqli_num_rows($data);
            while ($info = mysqli_fetch_assoc($data)) {
                $str .= "<td>" . $info['docm'] . "</td>";
            }
            $str .= "\r\n\t\t\t\t\t\t\t</tr> \r\n                           <tr>\r\n                                <td>Program-Specific Outcomes</td>";
            $cnot = substr($cno, 0, 1);
            if ($cnot == "C") {
                $data = ExecuteNonQuery('select * from matrix_' . strtolower($version) . " where cno='" . str_replace(" ", "_", $cno) . "'");
            } else {
                $data = ExecuteNonQuery('select * from gmatrix_' . strtolower($version) . " where cno='" . str_replace(" ", "_", $cno) . "'");
            }
            while ($info = mysqli_fetch_assoc($data)) {
                $temp = '';
                if ($info['col11'] == '1' || $info['col12'] == '1') {
                    if ($temp == '') {
                        $temp = 'CS-1';
                    } else {
                        $temp .= ',' . 'CS-1';
                    }
                }
                if ($info['col13'] == '1' || $info['col14'] == '1') {
                    if ($temp == '') {
                        $temp = 'CS-2';
                    } else {
                        $temp .= ',' . 'CS-2';
                    }
                }
                if ($info['col15'] == '1') {
                    if ($temp == '') {
                        $temp = 'CS-3';
                    } else {
                        $temp .= ',' . 'CS-3';
                    }
                }
                if ($info['col16'] == '1') {
                    if ($temp == '') {
                        $temp = 'CS-4';
                    } else {
                        $temp .= ',' . 'CS-4';
                    }
                }
                if ($info['col17'] == '1') {
                    if ($temp == '') {
                        $temp = 'CS-5';
                    } else {
                        $temp .= ',' . 'CS-5';
                    }
                }
                if ($info['col18'] == '1' || $info['col19'] == '1' || $info['col20'] == '1' || $info['col21'] == '1') {
                    if ($temp == '') {
                        $temp = 'IS-1';
                    } else {
                        $temp .= ',' . 'IS-1';
                    }
                }
                if ($info['col22'] == '1') {
                    if ($temp == '') {
                        $temp = 'IS-2';
                    } else {
                        $temp .= ',' . 'IS-2';
                    }
                }
                if ($info['col23'] == '1' || $info['col24'] == '1') {
                    if ($temp == '') {
                        $temp = 'IS-3';
                    } else {
                        $temp .= ',' . 'IS-3';
                    }
                }
                if ($info['col25'] == '1') {
                    if ($temp == '') {
                        $temp = 'IS-4';
                    } else {
                        $temp .= ',' . 'IS-4';
                    }
                }
                if ($info['col26'] == '1' || $info['col27'] == '1' || $info['col28'] == '1' || $info['col29'] == '1' || $info['col30'] == '1' || $info['col31'] == '1') {
                    if ($temp == '') {
                        $temp = 'SE-1';
                    } else {
                        $temp .= ',' . 'SE-1';
                    }
                }
                if ($info['col32'] == '1') {
                    if ($temp == '') {
                        $temp = 'SE-2';
                    } else {
                        $temp .= ',' . 'SE-2';
                    }
                }
                if ($info['col33'] == '1') {
                    if ($temp == '') {
                        $temp = 'SE-3';
                    } else {
                        $temp .= ',' . 'SE-3';
                    }
                }
                $str .= "<td>{$temp}</td>";
            }
            $data = ExecuteNonQuery('select * from fclo where csid=' . $syllabusinfo["csid"] . ' and semid=' . $_SESSION['ddlsbssem'] . " and uid=" . $uid);
            $i = mysqli_num_rows($data);
            while ($info = mysqli_fetch_assoc($data)) {
                $str .= "<td>" . $info['pocm'] . "</td>";
            }
            $str .= "</tr> \r\n                           </table>\r\n\t                </td>\r\n            </tr>\r\n\t\t\t  <tr>";
            $gp = GetSingleField("select gradingpolicy from section where csid=" . $syllabusinfo["csid"] . " and semid=" . $_SESSION['ddlsbssem'] . " and uid=" . $uid, "gradingpolicy");
            $str .= "      \r\n    \t   \t<td>Grading Policy:</td>\r\n           \t<td style='text-align:center'>";
            if (isset($gp) && $gp != "") {
                $str .= str_replace("<table>", "<table border='1'>", $gp);
            }
            $str .= "\r\n \t                </td>\r\n            </tr>\r\n\t\t\t <tr>\r\n           \r\n            \t<td>Course Policies:</td>\r\n            \t\r\n           \t\t<td>";
            $sql = "select coursepolicy from section where csid=" . $syllabusinfo["csid"] . " and semid=" . $_SESSION['ddlsbssem'] . " and uid=" . $uid;
            $cp = GetSingleField($sql, "coursepolicy");
            $str .= $cp;
            $str .= "</td></tr>\r\n\t\t\t\t\t<tr>\r\n        \t\t    \t<td>Attendance Policies:</td>\r\n\t\t\t\t\t\t<td>";
            $attp = GetSingleField("select attpolicy from section where csid=" . $syllabusinfo["csid"] . " and semid=" . $_SESSION['ddlsbssem'] . " and uid=" . $uid, "attpolicy");
            $str .= $attp;
            $str .= "</td></tr>\r\n\t\t\t\t\t <tr>\r\n            \r\n            \t<td>Academic Integrity:</td>\r\n            \t\r\n           \t\t<td>";
            $ai = GetSingleField("select academicintegrity from section where csid=" . $syllabusinfo["csid"] . " and  semid=" . $_SESSION['ddlsbssem'] . " and uid=" . $uid, "academicintegrity");
            $str .= $ai;
            $str .= "</td></tr>\r\n\t\t\t\t\t<tr>\r\n            \t<td>Course Calendar with Topics:</td>\r\n            \t\r\n           \t\t<td>";
            $cctopics = GetSingleField("select coursetopics from section where csid=" . $syllabusinfo["csid"] . " and  semid=" . $_SESSION['ddlsbssem'] . " and uid=" . $uid, "coursetopics");
            $csnm = GetSingleField("select sections from course_section where csid=" . $syllabusinfo["csid"], "sections");
            $fnm = GetSingleField("select firstname from users where uid=" . $uid, "firstname");
            $lnm = GetSingleField("select lastname from users where uid=" . $uid, "lastname");
            $str .= $cctopics;
            $str .= "</td>\r\n            </tr></table>";
            if (!mkdir("tmpfilesloc", 0777, true)) {
                $sylarr[$sbscnt] = "tmpfilesloc/" . $csnm . "_" . substr($fnm, 0, 1) . substr($lnm, 0, 1) . ".doc";
                $htmltodoc = new HTML_TO_DOC();
                $htmltodoc->createDoc($str, $sylarr[$sbscnt]);
                $sbscnt++;
            }
        }
        if (!mkdir("tmpzips", 0777, true)) {
            //----------------Creating zip
            $file = 'tmpzips/allcourses.zip';
            if (file_exists($file)) {
                unlink($file);
            }
            $result = create_zip($sylarr, 'tmpzips/allcourses.zip');
        }
        // We'll be outputting a PDF
        header('Content-type: application/zip');
        // It will be called downloaded.pdf
        header('Content-Disposition: attachment; filename=allcourses.zip');
        // The PDF source is in original.pdf
        readfile('tmpzips/allcourses.zip');
        //	return $str;
        //	rmdir("tmpfilesloc");
        //-----------------------------
    } else {
    }
}
<?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");
}
Exemplo n.º 21
0
ini_set('display_errors', 'on');
require_once "includes/functions.php";
require_once "includes/session.php";
include_once "includes/DataAccess.php";
include_once "includes/form_functions.php";
?>

<?php 
if (isset($_POST["submit"])) {
    $errors = array();
    $required_fields = array('username', 'password');
    $errors = array_merge($errors, check_required_fields($required_fields, $_POST));
    if (empty($errors)) {
        $unm = $_POST["username"];
        $pwd = $_POST["password"];
        $cnt = CountRecords("select * from users where username='******' and password='******' and permission=1");
        //	echo ".............".$usrid."asdas ".$permission;
        if ($cnt > 0) {
            $usrid = GetSingleField("select uid from users where username='******' and password='******'", "uid");
            $permission = GetSingleField("select permission from users where username='******' and password='******'", "permission");
            $activefld = GetSingleField("select active from users where username='******' and password='******'", "active");
            if ($activefld == "1") {
                $_SESSION["a_username"] = $unm;
                $_SESSION["a_userid"] = $usrid;
                $_SESSION["a_usrpermission"] = $permission;
                redirect_to('welcome.php');
            } else {
                $message = "You are not active user..Please contact administrator";
            }
        } else {
            $message = "Username or password is incorrect...";
Exemplo n.º 22
0
            	<tr>
                	<td>Visible</td>
					<td>:</td>
                    <td><input type="checkbox" name="cbvisible" <?php 
if ($visible == 1) {
    echo "checked";
}
?>
></td>
                </tr>
                 	<tr>
                	<td>Display Order</td>
                    <td>:</td>
                        <td>
                        <?php 
$cntrec = CountRecords("select disporder from images");
$i = 1;
?>
                        <select name="dispord">
       
                        <?php 
while ($i <= $cntrec) {
    ?>
  
                        <option value="<?php 
    echo $i;
    ?>
" <?php 
    if ($i == $dispord) {
        echo "selected";
    }
Exemplo n.º 23
0
require_once "includes/functions.php";
include_once "includes/DataAccess.php";
if (!logged_in()) {
    redirect_to("index.php");
}
if (isset($_POST["Submit"])) {
    $errors = array();
    $required_fields = array('txtyear');
    $errors = array_merge($errors, check_required_fields($required_fields, $_POST));
    if (empty($errors)) {
        $i = 0;
        if (isset($_POST["cbxactive"])) {
            ExecuteNonQuery("update semester set active=0");
            $i = 1;
        }
        $crec = CountRecords("select * from semester");
        $str = "insert into semester(semname,year,active,sortorder)";
        $str .= "values('" . $_POST["ddlsem"] . "','" . $_POST["txtyear"] . "',{$i}," . ++$crec . ")";
        //					echo $str;
        $cnt = ExecuteNonQuery($str);
        if ($cnt == 1) {
            redirect_to("viewsemesters.php");
        } else {
            show_alert("Error in adding record..Please verify values");
        }
    } else {
        if (count($errors) == 1) {
            $message = "There was 1 error in the form.";
        } else {
            $message = "There were " . count($errors) . " errors in the form.";
        }
Exemplo n.º 24
0
    session_start();
}
if (isset($_POST["Submit"])) {
    if (isset($_SESSION["ver"])) {
        if (isset($_POST["cbxactive"])) {
            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>
Exemplo n.º 25
0
                 </div>
                 	
         			<?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);
            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;
                        ?>
]
                 </div>
                 	
         			<?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;
                        ?>
]
 $cntrec1 = mysqli_num_rows($data3);
 $cnt = mysqli_num_rows($data3);
 //	echo $cnt;
 $str .= "<div>\r\n \t             \t\t<table align='left' id='camtable' style='text-align:left;' border='1' >";
 if ($cnt > 0) {
     $cnt = 1;
     while ($info3 = mysqli_fetch_assoc($data3)) {
         $str .= "  <tr>\r\n                                        <td>" . $info3['camname'] . "</td>\r\n                                        <td width='100%'>" . $info3['camdetails'] . "\r\n                                     </td>\r\n                                  </tr>";
     }
 }
 $str .= " </table>\r\n \t\t\t\t\t\t\r\n                        </div>\r\n                    </td>\r\n            </tr>";
 $str .= " <tr>\r\n            \t\t<td>Assessment Method Mappings:</td>\r\n            \t\t\r\n            \t\t<td>";
 //		$sql="select * from course_mappings where cno='".str_replace(" ","_",$cno)."'";
 //	echo $sql;
 $cnt = CountRecords("select * from course_mappings where cno='" . str_replace(" ", "_", $cno) . "'");
 $cnt2 = CountRecords('select * from fclo where semid=' . $_SESSION["ddlsbssem"] . ' and csid=' . $syllabusinfo["csid"]);
 $myval = $cnt + $cnt2;
 //      echo $myval;
 $str .= "<table align='left' border='1' style='text-align:center'>\r\n                           \t<tr>\r\n                            \t<td rowspan='2'>ASSESSMENT METHODS</td>\r\n                                        \t<td colspan=" . $myval . " align='center'>\r\n                                            \tOBJECTIVES\r\n                          \t\t          </td>\r\n                            </tr>\r\n                            <tr>";
 for ($i = 1; $i <= $cnt + $cnt2; $i++) {
     $str .= "<td>" . $i . "</td>";
 }
 $str .= "</tr>";
 $sql = 'select camid,camname from cams where csid=' . $syllabusinfo["csid"] . ' and semid=' . $_SESSION["ddlsbssem"];
 $data = ExecuteNonQuery($sql);
 while ($info = mysqli_fetch_assoc($data)) {
     $str .= "\t\r\n                            <tr>\r\n                            \t<td>" . $info['camname'] . "</td>";
     for ($i = 1; $i <= $myval; $i++) {
         $objnm = 'obj' . $i;
         $t1 = GetSingleField('select ' . $objnm . ' from fcamm where camid=' . $info['camid'] . ' and csid=' . $syllabusinfo["csid"] . ' and semid=' . $_SESSION['ddlsbssem'], $objnm);
         $str .= "<td>";