$cdate = "<b>".date('d/m/Y')."</b>";
	if($trans->student_transaction_category_id !=0)
		$category = "<b>".Category::model()->findByPk($trans->student_transaction_category_id)->category_name."</b>";
	else 
		$category = "<b>not set</b>";
	$lin1 = "<b>not set</b>";
	$lin2 = "<b>not set</b>";
	$ct = "<b>not set</b>";
	$stat = "<b>not set</b>";
	$pc = "<b>not set</b>";
	$padd = "<b>not set</b>";
	$pct = "<b>not set</b>";
	$pstat = "<b>not set</b>";
	if($trans->student_transaction_student_address_id !=0)
	{
		$address = StudentAddress::model()->findByPk($trans->student_transaction_student_address_id);
		$lin1 = "<b>".$address->student_address_c_line1."</b>";
		$lin2 = "<b>".$address->student_address_c_line2."</b>";
		$pc = "<b>".$address->student_address_c_pin."</b>";
		if($address->student_address_c_city != 0)
		   $ct = "<b>".City::model()->findByPk($address->student_address_c_city)->city_name."</b>";		
		if($address->student_address_c_state != 0)
		   $stat = "<b>".State::model()->findByPk($address->student_address_c_state)->state_name."</b>";
		
		$padd = "<b>".$address->student_address_p_line1.",".$address->student_address_p_line2."</b>";

		if($address->student_address_p_city != 0)
		   $pct = "<b>".City::model()->findByPk($address->student_address_p_city)->city_name."</b>";		
		if($address->student_address_p_state != 0)
		   $pstat = "<b>".State::model()->findByPk($address->student_address_p_state)->state_name."</b>";	
	}
                }
                if ($value == 'student_address_c_line1') {
                    $line1 = StudentAddress::model()->findByPk($stud['student_transaction_student_address_id'])->student_address_c_line1;
                    $line2 = StudentAddress::model()->findByPk($stud['student_transaction_student_address_id'])->student_address_c_line2;
                    $city = City::model()->findByPk(StudentAddress::model()->findByPk($stud['student_transaction_student_address_id'])->student_address_c_city)->city_name;
                    $pin = StudentAddress::model()->findByPk($stud['student_transaction_student_address_id'])->student_address_c_pin;
                    $state = State::model()->findByPk(StudentAddress::model()->findByPk($stud['student_transaction_student_address_id'])->student_address_p_state)->state_name;
                    $label = "Address";
                    $field_value = $line1 . "," . $line2 . " " . $city . "-" . $pin . "," . $state;
                }
                if ($value == 'student_address_p_line1') {
                    $line1 = StudentAddress::model()->findByPk($stud['student_transaction_student_address_id'])->student_address_p_line1;
                    $line2 = StudentAddress::model()->findByPk($stud['student_transaction_student_address_id'])->student_address_p_line2;
                    $city = City::model()->findByPk(StudentAddress::model()->findByPk($stud['student_transaction_student_address_id'])->student_address_p_city)->city_name;
                    $pin = StudentAddress::model()->findByPk($stud['student_transaction_student_address_id'])->student_address_p_pin;
                    $state = State::model()->findByPk(StudentAddress::model()->findByPk($stud['student_transaction_student_address_id'])->student_address_p_state)->state_name;
                    $label = "Address";
                    $field_value = $line1 . "," . $line2 . " " . $city . "-" . $pin . "," . $state;
                }
                if ($value == 'student_mobile_no') {
                    $label = "Contact";
                    $field_value = StudentInfo::model()->findByPk($stud['student_transaction_student_id'])->student_mobile_no;
                }
                if ($value == 'student_guardian_mobile') {
                    $label = "Contact";
                    $field_value = StudentInfo::model()->findByPk($stud['student_transaction_student_id'])->student_guardian_mobile;
                }
                ?>
	
		<div class="student-details">
			<?php 
Ejemplo n.º 3
0
 /**
  * Deletes a particular model.
  * If deletion is successful, the browser will be redirected to the 'admin' page.
  * @param integer $id the ID of the model to be deleted
  */
 public function actionDelete($id)
 {
     if (Yii::app()->request->isPostRequest) {
         // we only allow deletion via POST request
         $this->loadModel($id)->delete();
         // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
         if (!isset($_GET['ajax'])) {
             $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));
         }
     } else {
         if (!Yii::app()->request->isPostRequest) {
             $emp_tran = EmployeeAddress::model()->findAll(array('condition' => 'employee_address_c_state=' . $id));
             $stud_tran = StudentAddress::model()->findAll(array('condition' => 'student_address_c_state=' . $id));
             $organization = Organization::model()->findAll(array('condition' => 'state=' . $id));
             $city = City::model()->findAll(array('condition' => 'state_id=' . $id));
             if (!empty($emp_tran) || !empty($stud_tran) || !empty($city) || !empty($organization)) {
                 throw new CHttpException(400, 'You can not delete this record because it is used in another table.');
             } else {
                 $this->loadModel($id)->delete();
                 $this->redirect(array('admin'));
             }
         } else {
             throw new CHttpException(400, 'Invalid request. Please do not repeat this request again.');
         }
     }
 }
     }
     echo "<tr class=" . $class . ">";
     echo "<td>" . $i . "</td>";
     foreach ($selected_list as $s) {
         if ($s == 'sem') {
             if ($sd['student_academic_term_name_id'] != 0) {
                 echo "<td>" . AcademicTerm::model()->findByPk($sd['student_academic_term_name_id'])->academic_term_name . "</td>";
             } else {
                 echo "<td><i>Not Set</i></td>";
             }
         } else {
             if ($s == 'student_address_c_line1') {
                 echo "<td>" . StudentAddress::model()->findByPk($sd['student_transaction_student_address_id'])->student_address_c_line1 . " " . StudentAddress::model()->findByPk($sd['student_transaction_student_address_id'])->student_address_c_line2 . "</td>";
             } else {
                 if ($s == 'city') {
                     $add = StudentAddress::model()->findByPk($sd['student_transaction_student_address_id']);
                     if ($add->student_address_c_city != 0) {
                         echo "<td>" . City::model()->findByPk($add->student_address_c_city)->city_name . "</td>";
                     } else {
                         echo "<td style='text-align:center;'><i>Not Set</i></td>";
                     }
                 } else {
                     echo "<td>" . StudentInfo::model()->findByPk($sd['student_transaction_student_id'])->{$s} . "</td>";
                 }
             }
         }
     }
     $i++;
     echo "</tr>";
     $m++;
 }
                     echo "<td>" . Division::model()->findByPk($sd['student_transaction_division_id'])->{$s} . "</td>";
                 } else {
                     if ($s == 'sem') {
                         echo "<td>" . AcademicTerm::model()->findByPk($sd['student_academic_term_name_id'])->academic_term_name . "</td>";
                     } else {
                         if ($s == 'student_address_c_line1') {
                             echo "<td>" . StudentAddress::model()->findByPk($sd['student_transaction_student_address_id'])->student_address_c_line1 . " " . StudentAddress::model()->findByPk($sd['student_transaction_student_address_id'])->student_address_c_line2 . "</td>";
                         } else {
                             if ($s == 'student_address_p_line1') {
                                 echo "<td>" . StudentAddress::model()->findByPk($sd['student_transaction_student_address_id'])->student_address_p_line1 . " " . StudentAddress::model()->findByPk($sd['student_transaction_student_address_id'])->student_address_p_line2 . "</td>";
                             } else {
                                 if ($s == 'category_name') {
                                     echo "<td>" . Category::model()->findByPk($sd['student_transaction_category_id'])->category_name . "</td>";
                                 } else {
                                     if ($s == 'city') {
                                         echo "<td>" . City::model()->findByPk(StudentAddress::model()->findByPk($sd['student_transaction_student_address_id'])->student_address_c_city)->city_name . "</td>";
                                     } else {
                                         echo "<td>" . StudentInfo::model()->findByPk($sd['student_transaction_student_id'])->{$s} . "</td>";
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     $i++;
     echo "</tr>";
     $m++;
 }
Ejemplo n.º 6
0
                 </div>
                <!--Guardian Info Tab end-->

		<!--Address Info Tab Start-->
                <div id="tab5" class="tab-content hide">
                    <div class="content-box-border">
                        <div class="content-bg-he">Address Info</div>
                        <div class="content-bg-inner">
                            <div class="content-bg-inner-one">
                                <table width="100%" cellpadding="0" cellspacing="0">
				<tr>
                                    <td class="table-cell-title" colspan="2" style="border-right:2px solid #FFAD12;text-align:center;font-size:20px">Local Address</td>
                                    <td class="table-cell-title" colspan="2" style=";text-align:center;font-size:20px">International Address</td>
                                </tr>
                                  <tr>
			<?php $address = StudentAddress::model()->findByPk($studInfo->student_transaction_student_address_id);?>
                                    <td class="table-cell-title" width="23%">Street 1</td>
                                    <td class="table-cell-content" width="23%"><?php echo (!empty($address->student_address_c_line1) ? $address->student_address_c_line1 :"Not Set"); ?></td>
                                    <td class="table-cell-title" width="23%">Street 1</td>
                                    <td class="table-cell-content" width="23%"><?php echo (!empty($address->student_address_p_line1) ? $address->student_address_p_line1 : "Not Set");?></td>
                                  </tr>
                                  <tr>
                                    <td class="table-cell-title">Street 2</td>
                                    <td class="table-cell-content"><?php echo (!empty($address->student_address_c_line2) ? $address->student_address_c_line2 : "Not Set"); ?></td>
                                    <td class="table-cell-title">Street 2</td>
                                    <td class="table-cell-content"><?php echo (!empty($address->student_address_p_line2) ? $address->student_address_p_line2 :"Not Set");?></td>
                                  </tr>
                                  <tr>
                                    <td class="table-cell-title">Country</td>
                                    <td class="table-cell-content">
				<?php if($address->student_address_c_country!=0)
Ejemplo n.º 7
0
	public function actionStudentperformance()
	{
	   $id = Yii::app()->user->getState('stud_id');
	   $model=StudentTransaction::model()->findByPk($id);
	   $info = StudentInfo::model()->findByPk($model->student_transaction_student_id);
	   $address = StudentAddress::model()->findByPk($model->student_transaction_student_address_id);
	   $photo = StudentPhotos::model()->findByPk($model->student_transaction_student_photos_id);
	   $lang = LanguagesKnown::model()->findByPk($model->student_transaction_languages_known_id);
	   $stud_qua = new StudentAcademicRecordTrans;
	   $stud_feed = new FeedbackDetailsTable;
	   $studentcertificate=new StudentCertificateDetailsTable;
	   $studentdocstrans=new StudentDocsTrans;
	   $stud_qua=new StudentAcademicRecordTrans;
	   $stud_feed=new FeedbackDetailsTable('mysearch');
	   $parent = new ParentLogin;
		
	   $stud_feed->unsetAttributes();  // clear any default values
		if(isset($_GET['FeedbackDetailsTable']))
			$stud_feed->attributes=$_GET['FeedbackDetailsTable'];

		$this->render('update',array(
			'model'=>$model,'info'=>$info,'photo'=>$photo,'address'=>$address,'lang'=>$lang,'studentdocstrans'=>$studentdocstrans, 'stud_qua'=>$stud_qua,'stud_feed'=>$stud_feed,'flag'=>0,'studentcertificate'=>$studentcertificate,'parent'=>$parent
		));
	}
 /**
  * Deletes a particular model.
  * If deletion is successful, the browser will be redirected to the 'admin' page.
  * @param integer $id the ID of the model to be deleted
  */
 public function actionDelete($id)
 {
     if (Yii::app()->request->isPostRequest) {
         // we only allow deletion via POST request
         $model = $this->loadModel($id);
         $student_info = StudentInfo::model()->findByPk($model->student_transaction_student_id);
         if ($model->student_transaction_student_address_id != null) {
             $address = StudentAddress::model()->findByPk($model->student_transaction_student_address_id);
         }
         $stud_photo = StudentPhotos::model()->findByPk($model->student_transaction_student_photos_id);
         if ($model->student_transaction_languages_known_id != null) {
             $lang_known = LanguagesKnown::model()->findByPk($model->student_transaction_languages_known_id);
         }
         $dir1 = Yii::getPathOfAlias('webroot') . '/college_data/stud_images/';
         if ($dh = opendir($dir1)) {
             if ($stud_photo->student_photos_path == "no-images") {
             } else {
                 if (file_exists($dir1 . $stud_photo->student_photos_path)) {
                     //chmod($dir1.$stud_photo->student_photos_path, 777);
                     unlink($dir1 . $stud_photo->student_photos_path);
                 }
             }
         }
         closedir($dh);
         if ($this->loadModel($id)->delete()) {
             $use_model = User::model()->findByPk($model->student_transaction_user_id)->delete();
             $stud_photo->delete();
             $student_info->delete();
             if ($model->student_transaction_student_address_id != null) {
                 $address->delete();
             }
             if ($model->student_transaction_languages_known_id != null) {
                 $lang_known->delete();
             }
             StudentPaidFeesDetails::model()->deleteAll("student_paid_student_id = :studId", array(':studId' => $id));
             StudentAcademicRecordTrans::model()->deleteAll("student_academic_record_trans_stud_id = :studId", array(':studId' => $id));
             StudentDocsTrans::model()->deleteAll("student_docs_trans_user_id = :studId", array(':studId' => $id));
         }
         if (!isset($_GET['ajax'])) {
             $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));
         }
     } else {
         throw new CHttpException(400, 'Invalid request. Please do not repeat this request again.');
     }
 }
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = StudentAddress::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Ejemplo n.º 10
0
					else if($s=='branch_name')
						$field_value = Branch::model()->findByPk($info['student_transaction_branch_id'])->branch_name;
					else if($s=='division_code')
						$field_value = Division::model()->findByPk($info['student_transaction_division_id'])->$s;
					else if($s=='sem')
						$field_value = AcademicTerm::model()->findByPk($info['student_academic_term_name_id'])->academic_term_name;
					else if($s=='student_address_c_line1')
					{	$field_value = StudentAddress::model()->findByPk($info['student_transaction_student_address_id'])->student_address_c_line1." ".StudentAddress::model()->findByPk($info['student_transaction_student_address_id'])->student_address_c_line2;
					}
					else if($s=='student_address_p_line1')
					{	$field_value = StudentAddress::model()->findByPk($info['student_transaction_student_address_id'])->student_address_p_line1." ".StudentAddress::model()->findByPk($info['student_transaction_student_address_id'])->student_address_p_line2;
					}
					else if($s=='category_name')
						$field_value = Category::model()->findByPk($info['student_transaction_category_id'])->category_name;
					else if($s=='city')
						$field_value = City::model()->findByPk(StudentAddress::model()->findByPk($info['student_transaction_student_address_id'])->student_address_c_city)->city_name;
					else	
					{	$field_value = StudentInfo::model()->findByPk($info['student_transaction_student_id'])->$s;
					}
					echo $field_value;
				?>
			    </span>
			    </br>
			  
			 <?php 
			} echo "</br></br>".Certificate::model()->findByPk($certificate_type)->certificate_content; ?>
			</div>
			<div class="content_footer">
			    Principal
			</div>
		</div>
	/**
	 * Deletes a particular model.
	 * If deletion is successful, the browser will be redirected to the 'admin' page.
	 * @param integer $id the ID of the model to be deleted
	 */
	public function actionDelete($id)
	{
		$model = $this->loadModel($id);
		$student_info = StudentInfo::model()->findByPk($model->student_transaction_student_id);
		if($model->student_transaction_student_address_id != null)
		$address = StudentAddress::model()->findByPk($model->student_transaction_student_address_id);
		$stud_photo = StudentPhotos::model()->findByPk($model->student_transaction_student_photos_id);
		if($model->student_transaction_languages_known_id != null)		
		$lang_known = LanguagesKnown::model()->findByPk($model->student_transaction_languages_known_id);
		$yearModel=new Year;
		//$assign_comp_model = assignCompanyUserTable::model()->findByPk($ass_comp->id);
		$dir1 = Yii::getPathOfAlias('webroot').'/college_data/stud_images/';
		if($dh = opendir($dir1))
		{
			if($stud_photo->student_photos_path == "no-images")
			{

			}
			else
			{
				if(file_exists($dir1.$stud_photo->student_photos_path))
				{
					//chmod($dir1.$stud_photo->student_photos_path, 777);
					unlink($dir1.$stud_photo->student_photos_path);				
				}
			}
		}
		closedir($dh);
		if($model->delete()){
		$use_model = User::model()->findByPk($model->student_transaction_user_id)->delete();
		$stud_photo->delete();
		$student_info->delete();
		if($model->student_transaction_student_address_id != null)
		$address->delete();
		if($model->student_transaction_languages_known_id != null)
		$lang_known->delete();
		}
		//echo $model->student_transaction_student_id; exit;

		// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
		if(!isset($_GET['ajax']))
			$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));
	}
Ejemplo n.º 12
0
<?php

$studInfo = StudentInfo::model()->findByPk($student_transaction[0]->student_transaction_student_id);
$studAdd = StudentAddress::model()->findByPk($student_transaction[0]->student_transaction_student_address_id);
if ($student_transaction[0]->student_transaction_parent_id != null || $student_transaction[0]->student_transaction_parent_id != 0) {
    $parent = ParentLogin::model()->findByPk($student_transaction[0]->student_transaction_parent_id);
} else {
    $parent = new $ParentLogin();
}
?>
<h3>Student Detail</h3>
<h4>Personal Info</h4>
<table border="1" width="200px">

<tr>
	<td>
	<label> Enrollment No  </label></td><td><?php 
echo $studInfo->student_enroll_no;
?>
	</td>
</tr>
<tr>
	<td>
	<label> First Name </label></td><td><?php 
echo $studInfo->student_first_name;
?>
	</td>
</tr>	

<tr>
	<td>
 /**
  * Deletes a particular model.
  * If deletion is successful, the browser will be redirected to the 'admin' page.
  * @param integer $id the ID of the model to be deleted
  */
 public function actionDelete($id)
 {
     if (Yii::app()->request->isPostRequest) {
         // we only allow deletion via POST request
         $model = $this->loadModel($id);
         $student_info = StudentInfo::model()->findByPk($model->student_transaction_student_id);
         if ($model->student_transaction_student_address_id != null) {
             $address = StudentAddress::model()->findByPk($model->student_transaction_student_address_id);
         }
         $stud_photo = StudentPhotos::model()->findByPk($model->student_transaction_student_photos_id);
         if ($model->student_transaction_languages_known_id != null) {
             $lang_known = LanguagesKnown::model()->findByPk($model->student_transaction_languages_known_id);
         }
         $dir1 = Yii::getPathOfAlias('webroot') . '/stud_images/';
         if ($dh = opendir($dir1)) {
             if ($stud_photo->student_photos_path == "no-images") {
             } else {
                 if (file_exists($dir1 . $stud_photo->student_photos_path)) {
                     //chmod($dir1.$stud_photo->student_photos_path, 777);
                     unlink($dir1 . $stud_photo->student_photos_path);
                 }
             }
         }
         closedir($dh);
         if ($this->loadModel($id)->delete()) {
             $use_model = User::model()->findByPk($model->student_transaction_user_id)->delete();
             $stud_photo->delete();
             $student_info->delete();
             if ($model->student_transaction_student_address_id != null) {
                 $address->delete();
             }
             if ($model->student_transaction_languages_known_id != null) {
                 $lang_known->delete();
             }
         }
         //echo $model->student_transaction_student_id; exit;
         // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
         if (!isset($_GET['ajax'])) {
             $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));
         }
     } else {
         throw new CHttpException(400, 'Invalid request. Please do not repeat this request again.');
     }
 }
	public function actionAprove($id)
	{
		$model= StudentRegistrationInfo::model()->findByPk($id);
		$info = new StudentInfo;
		$stud_trans = new StudentTransaction;
		$user =new User;
		$photo =new StudentPhotos;
		$address=new StudentAddress;
		$lang=new LanguagesKnown;
		$ass_comp = new assignCompanyUserTable;
		$auth_assign = new AuthAssignment;
		$qualification=new StudentAcademicRecordTrans;

		if(isset($_REQUEST['StudentRegistrationInfo']))
		{
			$org_id = $model->organization_id;
	
			if($model->student_status==1){

				$acd = Yii::app()->db->createCommand()
					->select("academic_term_id,academic_term_name,academic_term_period_id")
					->from('academic_term')
					->where('current_sem=1 and academic_term_name =1 and academic_term_organization_id='.$org_id)
					->queryAll();
			
				if(!$acd){
					Yii::app()->user->setFlash('notice','Semester-1 is not an Active semester');
					$this->redirect(array('admin'));
				}
				$info->student_dtod_regular_status = 'Regular';	
			}
			elseif($model->student_status==2){

				$acd = Yii::app()->db->createCommand()
					->select("academic_term_id,academic_term_name,academic_term_period_id")
					->from('academic_term')
					->where('current_sem=1 and academic_term_name =3 and academic_term_organization_id='.$org_id)
					->queryAll();
			
				if(!$acd){
					Yii::app()->user->setFlash('notice','Semester-3 is not an Active semester');
					$this->redirect(array('admin'));
				}	
				$info->student_dtod_regular_status = 'DTOD';
			}
			$info->title = 	$model->student_title;
			$info->student_merit_no = $model->student_merit_no;
			$info->student_first_name = $model->student_first_name;
			$info->student_middle_name =$model->student_middle_name;
			$info->student_last_name = $model->student_last_name;
			$info->student_father_name = $model->student_father_name;
			$info->student_mother_name = $model->student_mother_name;
			$info->student_dob = $model->student_dob;
			$info->student_adm_date =  new CDbExpression('NOW()');
			$info->student_birthplace = $model->student_place_of_birth;
			$info->student_gender = $model->student_gender;
			$info->student_email_id_1 = $model->student_email_id;
			$info->student_mobile_no = $model->student_mobile;
			$info->student_created_by = Yii::app()->user->id;
			$info->student_creation_date = new CDbExpression('NOW()');

			$user->user_organization_email_id = strtolower($info->student_email_id_1);
			$user->user_password =  md5($info->student_email_id_1.$info->student_email_id_1);
			$user->user_created_by =  Yii::app()->user->id;
			$user->user_creation_date = new CDbExpression('NOW()');
			$user->user_organization_id = $org_id;
			$user->user_type = "student";

			$photo->student_photos_path = $model->student_photo;
		
			$address->student_address_c_line1 = $model->student_address_c_line1;
			$address->student_address_c_line2 = $model->student_address_c_line2;
			$address->student_address_c_taluka = $model->student_address_c_taluka;
			$address->student_address_c_district = $model->student_address_c_district;
			$address->student_address_c_country = $model->student_address_c_country;
			$address->student_address_c_city = $model->student_address_c_city;
			$address->student_address_c_pin  = $model->student_address_c_pin ;
			$address->student_address_c_state = $model->student_address_c_state;
			$address->student_address_p_line1 = $model->student_address_p_line1;
			$address->student_address_p_line2 = $model->student_address_p_line2;
			$address->student_address_p_taluka = $model->student_address_p_taluka;
			$address->student_address_p_district = $model->student_address_p_district;
			$address->student_address_p_country = $model->student_address_p_country;
			$address->student_address_p_city = $model->student_address_p_city;
			$address->student_address_p_pin  = $model->student_address_p_pin ;
			$address->student_address_p_state = $model->student_address_p_state;
			$address->student_address_phone = $model->student_phoneno;
			$address->student_address_mobile = $model->student_mobile;

			if($info->save(false)){
				
				$user->save(false);
				$photo->save(false);
				$address->save(false);
				$lang->save(false);		
			
				$stud_trans->student_transaction_user_id = $user->user_id;
				$stud_trans->student_transaction_student_id = $info->student_id;
				//$stud_trans->student_transaction_branch_id = $model->student_branch_id;
				if(!empty($model->student_category_id))
				$stud_trans->student_transaction_category_id = $model->student_category_id;
				$stud_trans->student_transaction_organization_id = $org_id;
				$stud_trans->student_transaction_student_address_id = $address->student_address_id;
				$stud_trans->student_transaction_languages_known_id= $lang->languages_known_id;
				$stud_trans->student_transaction_detain_student_flag='5';
				$stud_trans->student_transaction_student_photos_id = $photo->student_photos_id;
				$stud_trans->student_transaction_branch_id=$_POST['StudentRegistrationInfo']['student_branch_id'];
				$stud_trans->student_academic_term_period_tran_id = $acd[0]['academic_term_period_id']; 
				$stud_trans->student_academic_term_name_id = $acd[0]['academic_term_id'];
				$stud_trans->save(false);

				StudentInfo::model()->updateByPk($stud_trans->student_transaction_student_id, array('student_info_transaction_id'=>$stud_trans->student_transaction_id));					
		
				$org_data = Organization::model()->findByPk($org_id);
				$org_name = $org_data->organization_name;
				$org_arr = explode(' ',$org_name);
				$suffix_lab = '';
				foreach($org_arr as $list)
					$suffix_lab .= $list[0];
				$bizrule = 'return Yii::app()->user->getState("org_id")=='.$org_id.";";
				$var_data = serialize(Yii::app()->user->getState('org_id'));

				$auth_assign->itemname = 'Student of '.$suffix_lab;
				$auth_assign->userid = $user->user_id;
				$auth_assign->bizrule = $bizrule;
				$auth_assign->data = $var_data;
				$auth_assign->save();

				$ass_comp->assign_user_id = $user->user_id;
				$ass_comp->assign_org_id = $org_id;
				$ass_comp->assign_created_by = Yii::app()->user->id;
				$ass_comp->assign_creation_date = new CDbExpression('NOW()');
				$ass_comp->save();
	
				StudentRegistrationInfo::model()->updateByPk($id, 
					array(
						'student_aproved'=>'1',
						));
				$this->redirect(array('admin'));
				}	
		}
		$this->render('aprove',array('model'=>$model));
	}
		<?php 
echo '<lable><b>Phone No :</b></lable>';
?>
		<div class="rown">
			<?php 
if (StudentAddress::model()->findByPk($addressid)->student_address_phone != 0) {
    echo StudentAddress::model()->findByPk($addressid)->student_address_phone . '<br>';
} else {
    echo "N/A";
}
?>
		</div>
	</div>

	<div class="rowv">
		<?php 
echo '<lable><b>Mobile :</b></lable>';
?>
		<div class="rown">
			<?php 
if (StudentAddress::model()->findByPk($addressid)->student_address_mobile != 0) {
    echo StudentAddress::model()->findByPk($addressid)->student_address_mobile . '<br>';
} else {
    echo "N/A";
}
?>

		</div>
	</div>
</div>