Viewing file: processTextQuestion.php (1.36 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include_once "../global1.php";
include_once "../../class/clsDB.php";
include_once "../../class/clsConnection.php";
include_once "../class/clsTextQuestion.php";
$oC = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_EASS'], $GLOBALS['USER_EASS'], $GLOBALS['PASSWORD_EASS']);
$obj = new TextQuestion($oC);
if($method=="add"){
$obj->AddNew();
$obj->TQid=$TQid;
$obj->assid=$assid;
$obj->sectionTQid=$sectionTQid;
$obj->nameTQ=$nameTQ;
$obj->sequence=$sequence;
$obj->Save();
echo "<meta http-equiv='refresh' content='0; URL=createForm.php?assid=$assid;'>";
}else if($method=="edit"){
$obj->SearchByKey($TQid);
$obj->GetRecord();
$obj->Edit();
$obj->TQid=$TQid;
$obj->assid=$assid;
$obj->sectionTQid=$sectionTQid;
$obj->nameTQ=$nameTQ;
$obj->sequence=$sequence;
$obj->Save();
echo "<meta http-equiv='refresh' content='0; URL=createForm.php?assid=$assid;'>";
}else if($method=="delete"){
$obj->SearchByKey($TQid);
$obj->GetRecord();
$obj->Delete();
echo "<meta http-equiv='refresh' content='0; URL=createForm.php?assid=$assid;'>";
}else if($method=="updown"){
$obj->swapQuestion($ud,$assid,$TQid,$sectionTQid,$sequence);
echo "<meta http-equiv='refresh' content='0; URL=createForm.php?assid=$assid;'>";
}
//$obj->Close();
//$oC->Disconnect();
//echo "< meta http-equiv='refresh' content='0; URL=XXXXXxxxxx.php'>";
?>
|