Location: PHPKode > projects > NAR contents manager > software/libs/modelos.php
<?
//Implementación de las clases 'modelo' del patrón C-V-M

class user {
	var $username;
	var $password;
	var $rol;
	var $telephone;
	var $email;
	var $address;
	var $name;
	var $surnames;

	function fill_user ($username,$name,$surnames,$address,$email,$rol,$telephone,$password){
		$this->username=$username;
		$this->password=$password;
		$this->rol=$rol;
		$this->telephone=$telephone;
		$this->email=$email;
		$this->address=$address;
		$this->name=$name;
		$this->surnames=$surnames;
	}

}


class news {
	var $title;
	var $matter;
	var $contents;
	var $id_news;
	var $state;
	var $ndate;
	var $comment;

	function fill_news($id_news,$matter,$state,$ndate,$title,$contents,$comment){
		$this->title=$title;
		$this->matter=$matter;
		$this->contents=$contents;
		$this->id_news=$id_news;
		$this->state=$state;
		$this->ndate=$ndate;
		$this->comment=$comment;
	}

}


class report {
	var $rdate;
	var $type;
	var $state;
	var $title;
	var $id_report;
	var $contents;
	var $username;

	function fill_report($id_report,$title,$type,$state,$rdate,$contents,$username){
		$this->rdate=$rdate;
		$this->type=$type;
		$this->state=$state;
		$this->title=$title;
		$this->id_report=$id_report;
		$this->contents=$contents;
		$this->username=$username;
	}
}


class material {
	var $descriptor;
	var $type;
	var $mdate;
	var $attachednote;
	var $contents;
	var $username;

	function fill_material($descriptor,$type,$mdate,$attachednote,$contents,$username){
		$this->descriptor=$descriptor;
		$this->type=$type;
		$this->mdate=$mdate;
		$this->attachednote=$attachednote;
		$this->contents=$contents;
		$this->username=$username;
	}
}


class publication {
	var $publicationname;
	var $pdate;
	var $sections;
	var $state;

	function fill_publication($publicationname,$pdate,$sections,$state){
		$this->publicationname=$publicationname;
		$this->pdate=$pdate;
		$this->sections=$sections;
		$this->state=$state;
	}
}


class structure {
	var $id_structure;
	var $name;
	var $state;
	var $type;
	var $category;
	var $pagewi;
	var $pagehe;
	var $marginsize;
	var $username;

	function fill_structure($id_structure,$name,$state,$type,$category,$pagewi,$pagehe,$marginsize,$username){
		$this->id_structure=$id_structure;
		$this->name=$name;
		$this->state=$state;
		$this->type=$type;
		$this->category=$category;
		$this->pagewi=$pagewi;
		$this->pagehe=$pagehe;
		$this->marginsize=$marginsize;
		$this->username=$username;
	}
}


//No hace falta
/*class structdivision {
	var $structdivisionname;
	var $toppos;
	var $leftpos;
	var $width;
	var $height;

	function fill_structdivision($structdivisionname,$toppos,$leftpos,$height,$width){
		$this->structdivisionname=$structdivisionname;
		$this->toppos=$toppos;
		$this->leftpos=$leftpos;
		$this->width=$width;
		$this->height=$height;
	}

}*/


?>
Return current item: NAR contents manager