}
                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 
     }
     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++;
 }
	$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>";	
	}
Exemplo n.º 4
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)
Exemplo n.º 5
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.');
         }
     }
 }
 /**
  * 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.');
     }
 }
                     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++;
 }
Exemplo n.º 8
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>
Exemplo n.º 9
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
		));
	}
 /**
  * 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;
 }
	/**
	 * 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'));
	}
Exemplo 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.');
     }
 }
		<?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>