Preview: PinactivationForm.php
                Size: 1.13 KB
              
              
                
              
            
            /home/jambtst2015/public_html/protected/models/PinactivationForm.php
            <?php
/**
 * ContactForm class.
 * ContactForm is the data structure for keeping
 * contact form data. It is used by the 'contact' action of 'SiteController'.
 */
class PinactivationForm extends CFormModel
{
	public $exam_id;
	public $pin_id;
	public $marks;
	public $compulsory;
	public $question_paper_name;
	public $pin_type;
	public $body;
	
	
	/**
	 * Declares the validation rules.
	 */
	public function rules()
	{
		if(Helpers::get_controler_name(5)=='pinactivationbody' && Helpers::get_controler_name(6)!='edit'){
		return array(
		
			array('exam_id, pin_id', 'required'),
		
		);
		}elseif(Helpers::get_controler_name(6)=='edit'){
			
			return array(
				array('exam_id', 'required'),
				array('pin_id', 'safe'),
			);
		}else{
			return array(
		
				array('exam_id, pin_id', 'safe'),
		
		);
		}
	}
	/**
	 * Declares customized attribute labels.
	 * If not declared here, an attribute would have a label that is
	 * the same as its name with the first letter in upper case.
	 */
	public function attributeLabels()
	{
		return array(
			'verifyCode'=>'Verification Code',
		);
	}
}
                                          Directory Contents
Dirs: 0 × Files: 45