Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Student {
- public $strStudentID;
- public $strName;
- public $strBirthday;
- public $strAdress;
- public $strCity;
- public $strEmail;
- public $strPhone;
- public $strMobile;
- public function ShowFiche($strStudentid){
- $this->GetStudent("oef6/studentgegevens.csv",$strStudentid);
- echo'<table border="0">
- <tr>
- <td colspan="2" align="center"><img src="oef6/fotos/'.$this->strStudentID.'.jpg"alt="niels"/></td>
- </tr>
- <tr>
- <td>
- id <br />
- naam <br />
- geboortedatum <br />
- Adress <br />
- Stad <br />
- E-mail <br />
- tel. <br />
- gsm <br />
- </td>
- <td>
- '.$this->strStudentID.'<br />
- '.$this->strName.'<br />
- '.$this->strBirthday.'<br />
- '.$this->strAdress.'<br />
- '.$this->strCity.'<br />
- '.$this->strEmail.'<br />
- '.$this->strPhone.'<br />
- '.$this->strMobile.'<br />
- </td>
- </tr>
- </table>';
- }
- public function GetStudent($strFile,$strStudentid){
- if (($rscFileHandle = fopen($strFile,"r")) !== FALSE){
- while(($arrStudentData = fgetcsv($rscFileHandle,1000,";")) !== FALSE){
- if($arrStudentData[0]==$strStudentid){
- $this->strStudentID = $arrStudentData[0];
- $this->strName = $arrStudentData[1];
- $this->strBirthday = $arrStudentData[2];
- $this->strAdress = $arrStudentData[3];
- $this->strCity = $arrStudentData[4];
- $this->strEmail = $arrStudentData[5];
- $this->strPhone = $arrStudentData[6];
- $this->strMobile = $arrStudentData[7];
- }
- }
- }
- fclose($rscFileHandle);
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement