當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Requirements::update方法代碼示例

本文整理匯總了PHP中Requirements::update方法的典型用法代碼示例。如果您正苦於以下問題:PHP Requirements::update方法的具體用法?PHP Requirements::update怎麽用?PHP Requirements::update使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Requirements的用法示例。


在下文中一共展示了Requirements::update方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: doEdit


//.........這裏部分代碼省略.........
        $student->FNAME = $FNAME;
        $student->MNAME = $MNAME;
        $student->SEX = $SEX;
        $student->BDAY = $BDAY;
        $student->BPLACE = $BPLACE;
        $student->STATUS = $STATUS;
        $student->AGE = $AGE;
        $student->NATIONALITY = $NATIONALITY;
        $student->RELIGION = $RELIGION;
        $student->CONTACT_NO = $CONTACT_NO;
        $student->HOME_ADD = $HOME_ADD;
        $student->EMAIL = $EMAIL;
        //course infor
        /*$course	= $_POST['course'];
        $semester = $_POST['semester'];
        $ay		= $_POST['AY'];
        $sy = new Schoolyr();
        $sy->AY 		= $ay;
        $sy->SEMESTER 	= $semester;
        $sy->COURSE_ID	= $course;
        $sy->IDNO 		= $IDNO;*/
        /*if ($istrue) {
        	output_message('course info successfully added!');
        	redirect ('newstudent.php');
        }
        
        */
        //secondary Details
        $FATHER = $_POST['father'];
        $FATHER_OCCU = $_POST['fOccu'];
        $MOTHER = $_POST['mother'];
        $MOTHER_OCCU = $_POST['mOccu'];
        $BOARDING = $_POST['boarding'];
        $WITH_FAMILY = $_POST['withfamily'];
        $GUARDIAN = $_POST['guardian'];
        $GUARDIAN_ADDRESS = $_POST['guardianAdd'];
        $OTHER_PERSON_SUPPORT = $_POST['otherperson'];
        $ADDRESS = $_POST['otherAddress'];
        $studdetails = new Student_details();
        $studdetails->FATHER = $FATHER;
        $studdetails->FATHER_OCCU = $FATHER_OCCU;
        $studdetails->MOTHER = $MOTHER;
        $studdetails->MOTHER_OCCU = $MOTHER_OCCU;
        $studdetails->BOARDING = $BOARDING;
        $studdetails->WITH_FAMILY = $WITH_FAMILY;
        $studdetails->GUARDIAN = $GUARDIAN;
        $studdetails->GUARDIAN_ADDRESS = $GUARDIAN_ADDRESS;
        $studdetails->OTHER_PERSON_SUPPORT = $OTHER_PERSON_SUPPORT;
        $studdetails->ADDRESS = $ADDRESS;
        $studdetails->IDNO = $IDNO;
        //
        /*if ($istrue) {
        	output_message('Seccondary details successfully added!');
        	redirect ('newstudent.php');
        }
        */
        //requirements
        $nso = isset($_POST['nso']) ? "Yes" : "No";
        $bapt = isset($_POST['baptismal']) ? "Yes" : "No";
        $entrance = isset($_POST['entrance']) ? "Yes" : "No";
        $mir_contract = isset($_POST['mir_contract']) ? "Yes" : "No";
        $certifcateOfTransfer = isset($_POST['certifcateOfTransfer']) ? "Yes" : "No";
        $requirements = new Requirements();
        $requirements->NSO = $nso;
        $requirements->BAPTISMAL = $bapt;
        $requirements->ENTRANCE_TEST_RESULT = $entrance;
        $requirements->MARRIAGE_CONTRACT = $mir_contract;
        $requirements->CERTIFICATE_OF_TRANSFER = $certifcateOfTransfer;
        $requirements->IDNO = $IDNO;
        //$istrue = $requirements->create();
        /*if ($istrue) {
        	output_message('Student requirements successfully added!');
        	redirect ('newstudent.php');
        } 
        */
        if ($IDNO == "") {
            message('ID Number is required!', "error");
            redirect('index.php?view=edit&id=' . $IDNO);
        } elseif ($LNAME == "") {
            message('Last Name is required!', "error");
            redirect('index.php?view=edit&id=' . $IDNO);
        } elseif ($FNAME == "") {
            message('First Name is required!', "error");
            redirect('index.php?view=edit&id=' . $IDNO);
        } elseif ($MNAME == "") {
            message('Middle Name is required!', "error");
            redirect('index.php?view=edit&id=' . $IDNO);
        } elseif ($EMAIL == "") {
            message('Email address is required!', "error");
            redirect('index.php?view=edit&id=' . $IDNO);
        } else {
            $student->update($_GET['id']);
            //$sy->update($_GET['id']);
            $studdetails->update($_GET['id']);
            $requirements->update($_GET['id']);
            message('Student infomation updated successfully!', "info");
            redirect('index.php');
        }
    }
}
開發者ID:allybitebo,項目名稱:CCECourseCatalogue,代碼行數:101,代碼來源:controller.php


注:本文中的Requirements::update方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。