当前位置: 首页>>代码示例>>PHP>>正文


PHP Requirements::create方法代码示例

本文整理汇总了PHP中Requirements::create方法的典型用法代码示例。如果您正苦于以下问题:PHP Requirements::create方法的具体用法?PHP Requirements::create怎么用?PHP Requirements::create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Requirements的用法示例。


在下文中一共展示了Requirements::create方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: doInsert


//.........这里部分代码省略.........
    $student->LNAME = $LNAME;
    $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=add');
    } elseif ($LNAME == "") {
        message('Last Name is required!', "error");
        redirect('index.php?view=add');
    } elseif ($FNAME == "") {
        message('First Name is required!', "error");
        redirect('index.php?view=add');
    } elseif ($MNAME == "") {
        message('Middle Name is required!', "error");
        redirect('index.php?view=add');
    } elseif ($EMAIL == "") {
        message('Email address is required!', "error");
        redirect('index.php?view=add');
    } else {
        $student->create();
        #$sy->create();
        $studdetails->create();
        $requirements->create();
        message('New student addedd successfully!', "success");
        redirect('index.php?view=list');
    }
}
开发者ID:allybitebo,项目名称:CCECourseCatalogue,代码行数:101,代码来源:controller.php


注:本文中的Requirements::create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。