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


PHP Student::getID方法代码示例

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


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

示例1: validate

 protected function validate()
 {
     include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/student_class.php';
     global $objPDO;
     $student = new Student($objPDO);
     $roll = $_POST['roll'];
     $pass = $_POST['pwd'];
     if (!isset($roll) || $roll == '') {
         echo 'Enter your Roll No';
     } else {
         if (!isset($pass) || $pass == '') {
             echo 'Enter your Password';
         } else {
             if (!$student->loadByRoll($roll)) {
                 echo 'Incorrect Rollno';
             } else {
                 if ($student->getPassword() != $this->encrypt($pass)) {
                     echo 'Incorrect Password';
                 } else {
                     if ($student->getRollNo() == $roll && $student->getPassword() == $this->encrypt($pass)) {
                         global $user;
                         $user->login($student->getID());
                         echo '<META HTTP-EQUIV="Refresh" Content="0;url=http://localhost/cloud">';
                     }
                 }
             }
         }
     }
 }
开发者ID:srinivasans,项目名称:educloud,代码行数:29,代码来源:loginController.php

示例2: Department

						<h4><?php 
    $d = new Department();
    $d->getInfo($s->getDep());
    echo $d->getDepName();
    unset($d);
    ?>
</h4>
						<h4><i><?php 
    echo $s->getEmail();
    ?>
</i></h4>
						<h4><i><?php 
    $username = explode('@', $s->getEmail())[0];
    echo "http://nits.ac.in/s/{$username}";
    $name1 = strtolower(preg_replace('/\\s+/', '', $s->getName()));
    $id = $s->getID();
    $filename = $name1 . $id;
    ?>
</i></h4>
						<h4>Mobile : +91 <?php 
    echo $s->getMobile();
    ?>
</h4>
						<h4><u><a href="students_cv/<?php 
    echo $s->getCVLink();
    ?>
" target="_blank">Curriculum Vitae</a></u></h4>
					</div>
					<div class="box-title pull-right">
						
						<img src="images/profile/<?php 
开发者ID:mkrdip,项目名称:Management-Information-System,代码行数:31,代码来源:update_biography.php

示例3: makepdf

    public function makepdf()
    {
        global $user;
        // Get required files.
        require_once 'others/fpdf/fpdf.php';
        // Set some document variables
        $author = "eduCloud";
        $x = 35;
        $text = <<<EOT
Hello
EOT;
        // Create fpdf object
        $pdf = new FPDF('P', 'pt', 'Letter');
        // Set base font to start
        $pdf->SetFont('Arial', 'B', 16);
        // Add a new page to the document
        $pdf->addPage();
        $pdf->setLeftMargin($x);
        //page border
        $pdf->Line(35, 30, 35, 750);
        $pdf->Line(35, 30, 575, 30);
        $pdf->Line(575, 30, 575, 750);
        $pdf->Line(575, 750, 35, 750);
        //end of page border
        // Set the x,y coordinates of the cursor
        $pdf->SetXY($x + 20, 40);
        // Write 'Simple PDF' with a line height of 1 at the current position
        $pdf->Write(25, 'Employee Details');
        $pdf->Image($_SERVER['DOCUMENT_ROOT'] . '/cloud/images/school_logo.jpg', 500, 35, 50, 50, 'JPG');
        // Reset the font
        // Reset font, color, and coordinates
        $pdf->SetFont('Arial', '', 12);
        $pdf->SetTextColor(0, 0, 0);
        $pdf->SetLeftMargin($x + 50);
        $pdf->setXY($x + 50, 90);
        global $objPDO;
        require_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/teacher_class.php';
        $record = new Teacher($objPDO);
        if ($user->checkAdmin()) {
            $eid = $_GET['uid'];
        } else {
            $student = new Student($objPDO, $user->getuserId());
            $eid = $student->getID();
        }
        $record->loadByUserId($eid);
        // Write out a long text blurb.
        //$array=$record->getAsArray();
        //$x=0;
        /* TEMPLATE 1 DESIGN*/
        $pdf->SetFont('Arial', '', 8);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, 'Employee Id (reference) : ' . $record->getTeacherId(), 0, 1, 'L', true);
        $pdf->SetFont('Arial', '', 12);
        $pdf->setFillColor(50, 50, 50);
        $pdf->setTextColor(255, 255, 255);
        $pdf->cell(450, 20, 'Employee Details', 0, 1, 'C', true);
        $pdf->setTextColor(0, 0, 0);
        $pdf->setFillColor(221, 221, 221);
        $pdf->cell(200, 20, 'Employee Name', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getName(), 0, 1, 'C', true);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, 'Qualification', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getQualification(), 0, 1, 'C', true);
        require_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/subject_class.php';
        $subject_id = new Subject($objPDO);
        $subject_id->setID($record->getSubjectId());
        $pdf->setFillColor(221, 221, 221);
        $pdf->cell(200, 20, 'Subject', 0, 0, 'C', true);
        $pdf->cell(250, 20, $subject_id->getName(), 0, 1, 'C', true);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, 'Date Of Birth', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getDateOfBirth(), 0, 1, 'C', true);
        $pdf->setFillColor(221, 221, 221);
        $pdf->cell(200, 20, 'Gender', 0, 0, 'C', true);
        $pdf->cell(250, 20, ucfirst($record->getGender()), 0, 1, 'C', true);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, 'Blood Group', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getBloodGroup(), 0, 1, 'C', true);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, '', 0, 0, 'C', true);
        $pdf->cell(250, 20, '', 0, 1, 'C', true);
        $pdf->setFillColor(50, 50, 50);
        $pdf->setTextColor(255, 255, 255);
        $pdf->cell(450, 20, 'Contact Details', 0, 1, 'C', true);
        $pdf->setTextColor(0, 0, 0);
        $pdf->setFillColor(221, 221, 221);
        $pdf->cell(200, 20, 'Correspondence Address', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getCorrespondenceAddressLine1(), 0, 1, 'C', true);
        $pdf->cell(200, 20, '', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getCorrespondenceAddressLine2(), 0, 1, 'C', true);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, 'City', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getCorrespondenceCity(), 0, 1, 'C', true);
        $pdf->setFillColor(221, 221, 221);
        $pdf->cell(200, 20, 'State', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getCorrespondenceState(), 0, 1, 'C', true);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, 'Pincode', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getCorrespondencePincode(), 0, 1, 'C', true);
        $pdf->setFillColor(221, 221, 221);
//.........这里部分代码省略.........
开发者ID:srinivasans,项目名称:educloud,代码行数:101,代码来源:teacherController.php

示例4: sectionview

 protected function sectionview()
 {
     global $user;
     global $objPDO;
     $student = new Student($objPDO, $user->getuserId());
     if ($student->checkStudent()) {
         include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/student_section_class.php';
         include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/student_profile_class.php';
         $role = $student->getacctType();
         $stu_pro = new StudentProfile($objPDO);
         $stu_pro->loadByUserId($student->getID());
         $sec = new StudentSection($objPDO);
         $class = $sec->getByStudentId($stu_pro->getID());
     } else {
         $class = $_GET['uid'];
     }
     $student = new student($objPDO, $user->getuserId());
     $headMenu = array("username" => $student->getName());
     if ($user->checkAdmin() == true || $student->checkTeacher() || $student->checkStudent()) {
         include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/timetable_settings_class.php';
         $sett = new TimetableSettings($objPDO);
         $slots = $sett->getAllSlots();
         if (!isset($slots)) {
             $num_slots = 0;
         } else {
             $num_slots = count($slots);
         }
         include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/subject_class.php';
         include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/section_teacher_subject_class.php';
         include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/timetable_class.php';
         $rel = new SectionTeacherSubjectRelations($objPDO);
         $teasubrel = $rel->getByClass($class);
         $subjects = array();
         for ($i = 0; $i < count($teasubrel); $i++) {
             $subjects[$teasubrel[$i]['subject_id']] = Subject::getSubjectName($teasubrel[$i]['subject_id']);
         }
         $tt = new Timetable($objPDO);
         $timetable = $tt->getBySection($class);
         $total = 0;
         $count = array();
         foreach ($timetable as $key => $value) {
             $total++;
             if (array_key_exists($value, $count)) {
                 $count[$value]++;
             } else {
                 $count[$value] = 1;
             }
         }
         include $_SERVER['DOCUMENT_ROOT'] . '/cloud/view/section_timetable_view_template.php';
     } else {
         header('Location:http://localhost/cloud');
     }
 }
开发者ID:srinivasans,项目名称:educloud,代码行数:53,代码来源:timetableController.php

示例5: Student

<?php

require_once "../../includes/functions.inc";
$student = new Student(Tools::valuePost("studId"));
$check;
if (Tools::valuePost("type")) {
    $check = "1";
} else {
    $check = "0";
}
if (Tools::valuePost("behaviour")) {
    echo $student->setBehaviour($user->getID(), Tools::valuePost("behaviour"), $check);
}
if (Tools::valuePost("referer") == "modal_profile") {
    Tools::redirect("../../profile.php?guid=" . $student->getID());
}
开发者ID:sheyooo,项目名称:gradeaccess,代码行数:16,代码来源:ajax_update_behaviour.php

示例6: validate

 protected function validate()
 {
     $required = array("admission_number" => "Admission Number", "admission_date" => "Admission Date", "name" => "Name", "class_level" => "Class", "date_of_birth" => "Date of Birth", "gender" => "Gender", "mobile" => "Mobile");
     global $user;
     if ($user->checkAdmin() == true) {
         if (isset($_POST)) {
             foreach ($required as $key => $value) {
                 if (!isset($_POST[$key]) || $_POST[$key] == '' || $_POST[$key] == 'select') {
                     echo $value . ' is Required<br/>';
                     return;
                 }
             }
             if (!is_numeric($_POST['mobile'])) {
                 echo "Mobile number must be Numeric";
             } else {
                 if (isset($_POST['permanent_pincode']) && $_POST['permanent_pincode'] != '' && !is_numeric($_POST['permanent_pincode']) || isset($_POST['correspondence_pincode']) && $_POST['correspondence_pincode'] != '' && !is_numeric($_POST['correspondence_pincode'])) {
                     echo "Pincode must be Numeric";
                 } else {
                     echo 'Saving...';
                     global $objPDO;
                     require_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/student_class.php';
                     require_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/student_profile_class.php';
                     $student = new Student($objPDO);
                     $studentProfile = new StudentProfile($objPDO);
                     if (!isset($_POST['roll_no']) || $_POST['roll_no'] == '') {
                         $roll_no = rand(1000, 9999);
                     } else {
                         $roll_no = $_POST['roll_no'];
                     }
                     $temp_pass = substr(md5(microtime()), 5, 10);
                     $pass = md5($temp_pass);
                     if ($_POST['category'] == 'select') {
                         unset($_POST['category']);
                     }
                     if ($_POST['blood_group'] == 'select') {
                         unset($_POST['blood_group']);
                     }
                     $acct_type = 'student';
                     $student->setRollNo($roll_no);
                     $student->setPhone($_POST['phone']);
                     $student->setName($_POST['name']);
                     $student->setEmail($_POST['email']);
                     $student->setacctType($acct_type);
                     $student->loadByRoll($roll_no);
                     if ($student->getPassword() == '' || $student->getPassword() == NULL) {
                         $student->setPassword($pass);
                     }
                     $student->save();
                     $id = $student->getID();
                     $studentProfile->setByArray($_POST);
                     $studentProfile->setRollNo($roll_no);
                     $studentProfile->setTempPass($temp_pass);
                     $studentProfile->setUserId($id);
                     $studentProfile->save();
                     echo '<meta http-equiv="Refresh" content="0;url=http://localhost/cloud/parent/addparent/' . $studentProfile->getUserId() . '"/>';
                 }
             }
         }
     } else {
         header('Location:http://localhost/cloud');
     }
 }
开发者ID:srinivasans,项目名称:educloud,代码行数:62,代码来源:studentprofileController.php


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