예제 #1
0
            if ($value["isactive"]) {
                $intstatus = 0;
                $hdlTpl->setVariable("status", "Active");
                //Assigns status
            } else {
                $intstatus = 1;
                $hdlTpl->setVariable("status", "In Active");
                //Assigns status
            }
            $hdlTpl->setVariable("returnurl", $hldGlobal->fnEncodeURL($_SERVER["REQUEST_URI"]));
            //Assigns encode url
            $hdlTpl->setVariable("id", $value["id"]);
            //Assigns id
            $hdlTpl->setVariable("activeflg", $intstatus);
            //Assigns flag
            $arrCMName = $hldGlobal->fnFetchCources($value["course_id"]);
            $cmname = $arrCMName[0]["cname"];
            $hdlTpl->setVariable("cmname", $cmname);
            //Assigns module name
            $hdlTpl->setVariable("question", substr($value["quiz_title"], 0, 20) . "..");
            //Assigns module order
            $hdlTpl->parse("managefiles");
        } else {
            $strPaging = $value;
        }
    }
    $hdlTpl->setVariable("paging", $strPaging);
    //Assigns Paging
    $hdlTpl->parse("StartManageFiles");
} else {
    $hdlTpl->setVariable("space", " ");
예제 #2
0
//Assigns footer
$hdlTpl->setVariable("leftmenu", $strLeftMenu);
//Assigns left menu
if ($_POST["submit"] == "Go") {
    if ($_POST["status"] != "--") {
        $strSearch = $_POST["status"];
        if ($strSearch) {
            $hdlTpl->setVariable("act", "selected='selected'");
        } else {
            if (!$strSearch) {
                $hdlTpl->setVariable("inact", "selected='selected'");
            }
        }
    }
}
$arrCources1 = $hldGlobal->fnFetchCources(0, $strSearch);
$arrCources = $hldGlobal->fnGetPagerArr($arrCources1);
if (is_array($arrCources) && count($arrCources) > 0) {
    foreach ($arrCources as $key => $value) {
        if (is_numeric($key)) {
            if ($value["isactive"]) {
                $intstatus = 0;
                $hdlTpl->setVariable("status", "Active");
                //Assigns status
            } else {
                $intstatus = 1;
                $hdlTpl->setVariable("status", "In Active");
                //Assigns status
            }
            $hdlTpl->setVariable("returnurl", $hldGlobal->fnEncodeURL($_SERVER["REQUEST_URI"]));
            //Assigns encode url
예제 #3
0
//Fetches footer template
$strLeftMenu = $hldGlobal->fnGetLMenu();
//Fetches left menu template
$hdlTpl->setVariable("metatag", $strMetatag);
//Assigns Metatag
$hdlTpl->setVariable("header", $strHeader);
//Assigns Header
$hdlTpl->setVariable("footer", $strFooter);
//Assigns footer
$hdlTpl->setVariable("leftmenu", $strLeftMenu);
//Assigns left menu
$intError = 1;
//print_r($arrQuizzes);
if (is_array($arrQuizzes) && count($arrQuizzes) > 0) {
    //$arrMname = $hldGlobal->fnFetchModule($arrQuizzes[0]["course_id"]);
    $arrMname = $hldGlobal->fnFetchCources($arrQuizzes[0]["course_id"]);
    $mcname = $arrMname[0]["cname"];
    $hdlTpl->setVariable("cname", $mcname);
    //Assigns module cource name
    $hdlTpl->setVariable("cid", $arrQuizzes[0]["course_id"]);
    //Assign course id
    $hdlTpl->setVariable("quiztitle", $arrQuizzes[0]["quiz_title"]);
    //Assigns quiz title
    $hdlTpl->setVariable("mid", $arrQuizzes[0]["module_id"]);
    //Assigns module id
    $hdlTpl->setVariable("id", $arrQuizzes[0]["id"]);
    //Assigns id
    $hdlTpl->setVariable("return", $_GET["return"]);
    //Assigns return
    $strTab = $hldGlobal->fnFetchQuestionQuiz($arrQuizzes[0]["id"], 0);
    $hdlTpl->setVariable("question", $strTab);
예제 #4
0
        $strErrormessage = "Please enter cources name.<br>";
        $intError = 0;
    }
    if ($intError) {
        foreach ($_POST as $key => $value) {
            $_POST[$key] = mysql_escape_string(trim($value));
        }
        $sql = "UPDATE tblcources SET cname='" . $_POST["cname"] . "',cdescription='" . $_POST["cdescription"] . "',dtmodified='" . date("Y-m-d H:i:s") . "' WHERE id=" . $_GET["id"];
        mysql_query($sql);
        $return = $_GET["return"];
        header("Location:message.php?mess=3&return={$return}");
    }
}
if (!$intError) {
    $hdlTpl->setVariable("error_message", $strErrormessage);
    //Assigns values
}
$arrCources = $hldGlobal->fnFetchCources($_GET["id"]);
foreach ($arrCources as $key => $value) {
    $hdlTpl->setVariable("id", $value["id"]);
    //Assigns id
    $hdlTpl->setVariable("return", $_GET["return"]);
    //Assigns return
    $hdlTpl->setVariable("cname", $value["cname"]);
    //Assigns cname
    $hdlTpl->setVariable("cdescription", $value["cdescription"]);
    //Assigns cdescription
}
$hdlTpl->parse("ADMIN_INNER_PAGE");
$hdlTpl->parse("INNER_PAGE");
echo $hdlTpl->get();