/**
	 * Creates a new model.
	 * If creation is successful, the browser will be redirected to the 'view' page.
	 */
	public function actionCreate()
	{
		$model=new EmployeeTransaction('smssearch');
		$model->unsetAttributes();  // clear any default values
		if(isset($_GET['EmployeeTransaction']))
			$model->attributes=$_GET['EmployeeTransaction'];

		$this->render('select_employee',array(
			'model'=>$model,
			));
	}
	public function leftresignsearch()
	{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.

		$criteria=new CDbCriteria;

		
		$criteria->with = array('Rel_Emp_Info','Rel_user1');

		$criteria->compare('Rel_Emp_Info.employee_no',$this->employee_no,true);
		$criteria->compare('Rel_Emp_Info.employee_unique_id',$this->employee_unique_id,true);	
		$criteria->compare('Rel_Emp_Info.employee_attendance_card_id',$this->employee_attendance_card_id,true);		
		$criteria->compare('Rel_Emp_Info.employee_first_name',$this->employee_first_name,true);
		$criteria->compare('Rel_Emp_Info.employee_last_name',$this->employee_last_name,true);
		$criteria->compare('employee_transaction_designation_id',$this->employee_transaction_designation_id);
		$criteria->compare('employee_transaction_department_id',$this->employee_transaction_department_id);
	
		$criteria->addCondition('employee_status=1');		

		$emp_data =  new CActiveDataProvider(EmployeeTransaction::model()->resetScope(), array(
			'criteria'=>$criteria,
					
		));
		$_SESSION['employee_records']=$emp_data;
		return $emp_data;
	}
 public function actionEmployeeFinalViewExportToPdf($id)
 {
     $employee_transaction = EmployeeTransaction::model()->findAll(' 	employee_transaction_id=' . $id);
     $employee_docs = EmployeeDocsTrans::model()->findAll('employee_docs_trans_user_id=' . $id);
     $employee_qual = EmployeeAcademicRecordTrans::model()->findAll('employee_academic_record_trans_user_id=' . $id);
     $employee_exp = EmployeeExperienceTrans::model()->findAll('employee_experience_trans_user_id=' . $id);
     $html = $this->renderPartial('/employeeTransaction/employeeFinalView', array('employee_docs' => $employee_docs, 'employee_qual' => $employee_qual, 'employee_transaction' => $employee_transaction, 'emp_exp' => $employee_exp), true);
     $this->exporttopdf('Employee Report', 'Employee.pdf', $html);
 }
	


	//$result1 = mysql_query("SELECT * FROM employee_attendence where date = '".$exdate."'");

	//$result1 = EmployeeInfo::model()->findByAttributes(array('employee_attendance_card_id'=>$var1));
	if(!empty($var1))
	{
	$result1 = Yii::app()->db->createCommand(
		'SELECT * FROM employee_info ef INNER JOIN employee_transaction et ON ef.employee_info_transaction_id = et.employee_transaction_id WHERE ef.employee_attendance_card_id ='.$var1.' AND et.employee_transaction_organization_id ='.Yii::app()->user->getState('org_id'))
	    ->queryRow();

	//print_r($result1); exit;

	$empid = $result1['employee_info_transaction_id'];
	$tr_id = EmployeeTransaction::model()->findByAttributes(array('employee_transaction_id'=>$empid,'employee_transaction_organization_id'=>Yii::app()->user->getState('org_id')));
	$eid = $tr_id['employee_transaction_id'];
	//print_r($leave_date);
	
	$result2 = Employee_attendence::model()->findByAttributes(array('employee_id'=>$eid,'date'=>$exdate));	
	
	if(empty($result2) && !empty($var1))
	{
		if($var6 == null)
			$atte = 'A';
		else
			$atte = 'P';
		if($eid != 0)
		{
		$sql = "INSERT INTO employee_attendence (employee_id,attendence,date,time1,time2,time3,time4,time5,time6,time7,
 time8, time9,time10,total_hour,overtime_hour,csvfile,employee_attendence_organization_id) VALUES 
Example #5
0
<?php
   $info = EmployeeInfo::model()->findByAttributes(array('employee_info_transaction_id'=>Yii::app()->user->getState('emp_id')));
   $tranDetails = EmployeeTransaction::model()->findByPk(Yii::app()->user->getState('emp_id'));
   $picPath = EmployeePhotos::model()->findByPk($tranDetails->employee_transaction_emp_photos_id);
?>
<div class="image-tab">
<div class="image-box-user"><img src="<?php echo Yii::app()->baseUrl; ?>/college_data/emp_images/<?php echo $picPath->employee_photos_path; ?>" width="112" height="112"></div>
</div>
<div class="info-tab">
<div class="myinfo">
	<div class="info-title">My Information</div>
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td class="info-label">Name - </td>
        <td class="info-content"><?php echo $info->employee_first_name.' '.$info->employee_last_name; ?></td>
        <td class="info-label">Birth Date -</td>
        <td class="info-content"><?php if(!empty($info->employee_dob) && $info->employee_dob!='0000-00-00') { echo $info->employee_dob; }else { echo "Not Set";} ?></td>
      </tr>
      <tr>
        <td class="info-label">Gender - </td>
        <td class="info-content"><?php echo (!empty($info->employee_gender) ? $info->employee_gender : "Not Set"); ?></td>
        <td class="info-label">Designation  -</td>
        <td class="info-content"><?php echo (!empty($tranDetails->Rel_Designation->employee_designation_name) ? $tranDetails->Rel_Designation->employee_designation_name : "Not Set"); ?></td>
      </tr>
      <tr>
        <td class="info-label">Department - </td>
        <td class="info-content"><?php echo (!empty($tranDetails->Rel_Department->department_name) ? $tranDetails->Rel_Department->department_name : "Not Set"); ?></td>
        <td class="info-label">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table>
Example #6
0
<div class="operation">
<?php echo CHtml::link('Back', array('admin'), array('class'=>'btnback'));?>
</div>
</div>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		array(
                'name'=>'student_notification_content',
		'type'=>'raw',
		),

		array(
                'name'=>'student_notification_alert_after_date',
                'value'=>date_format(date_create($model->student_notification_alert_after_date), "d-m-Y")
          	),
	
		array(
                'name'=>'student_notification_alert_before_date',
                'value'=>date_format(date_create($model->student_notification_alert_before_date), "d-m-Y")
          	),
	
		array(
		'name'=>'student_notification_from',
		'value'=>(User::model()->findByPk($model->student_notification_from)->user_type=='employee')?(EmployeeInfo::model()->findByAttributes(array('employee_info_transaction_id'=>(EmployeeTransaction::model()->findByAttributes(array('employee_transaction_user_id'=>$model->student_notification_from))->employee_transaction_id)))->employee_first_name):(ucfirst(strtolower(strstr(User::model()->findByPk($model->student_notification_from)->user_organization_email_id,'@',true)))),
		),
	),
	'htmlOptions'=> array('class'=>'custom-view'),
)); ?></div>
Example #7
0
 /**
  * Displays the login page
  */
 public function actionLogin()
 {
     $this->layout = 'loginLayout';
     if (Yii::app()->user->isGuest) {
         $login = new LoginUser();
         $model = $this->captchaRequired() ? new LoginForm('captchaRequired') : new LoginForm('login');
         // if it is ajax validation request
         if (isset($_POST['ajax']) && $_POST['ajax'] === 'login-form') {
             echo CActiveForm::validate($model);
             Yii::app()->end();
         }
         // collect user input data
         if (isset($_POST['LoginForm'])) {
             $model->attributes = $_POST['LoginForm'];
             // validate user input and redirect to the previous page if valid
             if ($model->validate() && $model->login()) {
                 $login->user_id = Yii::app()->user->id;
                 $loginuser = $login->user_id;
                 $emplogin = EmployeeTransaction::model()->findByAttributes(array('employee_transaction_user_id' => $loginuser));
                 $studlogin = StudentTransaction::model()->findByAttributes(array('student_transaction_user_id' => $loginuser));
                 if ($studlogin) {
                     Yii::app()->user->setState('stud_id', $studlogin->student_transaction_id);
                 }
                 if ($emplogin) {
                     Yii::app()->user->setState('emp_id', $emplogin->employee_transaction_id);
                 }
                 $login->status = 1;
                 $login->log_in_time = new CDbExpression('NOW()');
                 $login->user_ip_address = $_SERVER['REMOTE_ADDR'];
                 $login->save();
                 $this->redirect(array('dashboard/dashboard'));
             } else {
                 $this->counter = Yii::app()->session->itemAt('captchaRequired') + 1;
                 Yii::app()->session->add('captchaRequired', $this->counter);
             }
         }
         $this->render('login', array('model' => $model));
     } else {
         if (Yii::app()->user->getState('org_id') != NULL) {
             $this->redirect(array('site/dashboard'));
         } else {
             Yii::app()->user->logout();
             $this->redirect(Yii::app()->homeUrl);
         }
     }
 }
 /**
  * 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 = EmployeeTransaction::model()->findAll(array('condition' => 'employee_transaction_designation_id=' . $id));
             if (!empty($emp_tran)) {
                 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.');
         }
     }
 }
            ?>
	<tr>

        	<td>
			<?php echo ++$i; ?>
		</td>
       		<td>
			<?php echo  EmployeeInfo::model()->findByAttributes(array(
						'employee_info_transaction_id' => $v['student_attendence_email_emp_id']))->employee_first_name; ?>
		</td>
		<td>
			<?php echo  EmployeeInfo::model()->findByAttributes(array(
						'employee_info_transaction_id' => $v['student_attendence_email_emp_id']))->employee_last_name; ?>
		</td>
		<td>
			<?php echo EmployeeDesignation::model()->findByPk(EmployeeTransaction::model()->findByPk($v['student_attendence_email_emp_id'])->employee_transaction_designation_id)->employee_designation_name;?>
		</td>
		<td>
			<?php echo ($v['student_attendence_email_branch_id']==0)?"All Branch":Branch::model()->findByPk($v['student_attendence_email_branch_id'])->branch_name; ?>
		</td>
		<td>
			<?php echo $v['student_attendence_email_minute']; ?>
		</td>
       		<td>
			<?php echo $v['student_attendence_email_hour']; ?>
		</td>

       		       		<td>
			<?php echo User::model()->findByPk($v['student_attendence_email_created_by'])->user_organization_email_id; ?>
		</td>
       		<td>
	public function mysearch()
	{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.

		$criteria=new CDbCriteria;

		$trans = EmployeeTransaction::model()->resetScope()->findByPk($_REQUEST['id']);
		$users = EmployeeTransaction::model()->resetScope()->findAll('employee_transaction_user_id='.$trans->employee_transaction_user_id);	
		$arr = CHtml::listData($users,'employee_transaction_id','employee_transaction_id');	

		$criteria->addInCondition('employee_academic_record_trans_user_id',$arr);
		
		$criteria->compare('employee_academic_record_trans_id',$this->employee_academic_record_trans_id);
		$criteria->compare('employee_academic_record_trans_user_id',$this->employee_academic_record_trans_user_id);
		$criteria->compare('employee_academic_record_trans_qualification_id',$this->employee_academic_record_trans_qualification_id);
		$criteria->compare('employee_academic_record_trans_eduboard_id',$this->employee_academic_record_trans_eduboard_id);
		$criteria->compare('employee_academic_record_trans_year_id',$this->employee_academic_record_trans_year_id);
		$criteria->compare('theory_mark_obtained',$this->theory_mark_obtained);
		$criteria->compare('theory_mark_max',$this->theory_mark_max);
		$criteria->compare('theory_percentage',$this->theory_percentage);
		$criteria->compare('practical_mark_obtained',$this->practical_mark_obtained);
		$criteria->compare('practical_mark_max',$this->practical_mark_max);
		$criteria->compare('practical_percentage',$this->practical_percentage);
		
		$criteria->compare('employee_academic_record_trans_oraganization_id',$this->employee_academic_record_trans_oraganization_id);

		$data = new CActiveDataProvider($this, array(
		'criteria'=>$criteria,
	));
		$_SESSION['emp_qual']=$data;
		return $data;
	}
	/**
	 * Retrieves a list of models based on the current search/filter conditions .
	 *retrive list of certificate assign to particular employee
	 * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions .
	 */
	public function Employeesearch()
	{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.
		

		$criteria=new CDbCriteria;

		$trans = EmployeeTransaction::model()->resetScope()->findByPk($_REQUEST['id']);
		$users = EmployeeTransaction::model()->resetScope()->findAll('employee_transaction_user_id='.$trans->employee_transaction_user_id);	
		$arr = CHtml::listData($users,'employee_transaction_id','employee_transaction_id');	

		$criteria->addInCondition('employee_certificate_details_table_emp_id',$arr);
		$criteria->with = array('cer_employee_id');
		$criteria->compare('cer_employee_id.employee_first_name',$this->employee_first_name,true);
		$criteria->compare('employee_certificate_details_table_id',$this->employee_certificate_details_table_id);
		$criteria->compare('employee_certificate_details_table_emp_id',$this->employee_certificate_details_table_emp_id);
		$criteria->compare('employee_certificate_type_id',$this->employee_certificate_type_id);
		$criteria->compare('employee_certificate_created_by',$this->employee_certificate_created_by);
		$criteria->compare('employee_certificate_creation_date',$this->employee_certificate_creation_date,true);
		$criteria->compare('employee_certificate_org_id',$this->employee_certificate_org_id);
		$EmployeeCertificateDetailsTable_records=new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
		));
		 unset($_SESSION['exportData']);
		$_SESSION['exportData'] = $EmployeeCertificateDetailsTable_records;
		return $EmployeeCertificateDetailsTable_records;
	}
 public function actionDocumentsearchview($dept_id, $cat_id)
 {
     $model = new EmployeeTransaction('newsearch');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['EmployeeTransaction'])) {
         $model->employee_transaction_id = $_GET['EmployeeTransaction']['employee_transaction_id'];
         $model->employee_first_name = $_GET['EmployeeTransaction']['employee_first_name'];
     }
     $this->render('document_search_view', array('model' => $model, 'department_id' => $dept_id, 'category_id' => $cat_id));
 }
Example #13
0
<?php

$this->breadcrumbs = array('Employee Infos' => array('index'), $model->employee_id => array('view', 'id' => $model->employee_id), 'Update');
$emp_tran = EmployeeTransaction::model()->findByAttributes(array('employee_transaction_employee_id' => $model->employee_id));
//$branch_id = $emp_tran->employee_transaction_branch_id;
$this->menu = array(array('label' => 'List EmployeeInfo', 'url' => array('index')), array('label' => 'Create EmployeeInfo', 'url' => array('create')), array('label' => 'View EmployeeInfo', 'url' => array('view', 'id' => $model->employee_id)), array('label' => 'Manage EmployeeInfo', 'url' => array('admin')));
?>

<h1>Update Employee Details of : <?php 
echo $model->employee_first_name;
?>
</h1>

<?php 
echo $this->renderPartial('_form', array('model' => $model));
 /**
  * Displays the login page
  */
 public function actionLogin()
 {
     $this->layout = 'login_layout';
     if (Yii::app()->user->isGuest) {
         $login = new LoginUser();
         $model = $this->captchaRequired() ? new LoginForm('captchaRequired') : new LoginForm('login');
         if (isset($_POST['ajax']) && $_POST['ajax'] === 'login-form') {
             echo CActiveForm::validate($model);
             Yii::app()->end();
         }
         if (isset($_POST['LoginForm'])) {
             $model->attributes = $_POST['LoginForm'];
             if ($model->validate() && $model->login()) {
                 $emplogin = EmployeeTransaction::model()->findByAttributes(array('employee_transaction_user_id' => Yii::app()->user->id));
                 $studlogin = StudentTransaction::model()->findByAttributes(array('student_transaction_user_id' => Yii::app()->user->id));
                 if ($studlogin) {
                     Yii::app()->user->setState('stud_id', $studlogin->student_transaction_id);
                 }
                 if ($emplogin) {
                     Yii::app()->user->setState('emp_id', $emplogin->employee_transaction_id);
                 }
                 $login->user_id = Yii::app()->user->id;
                 $login->status = 1;
                 $login->log_in_time = new CDbExpression('NOW()');
                 $login->user_ip_address = $_SERVER['REMOTE_ADDR'];
                 $login->login_organization_id = 1;
                 $login->save();
                 $this->redirect(array('site/newdashboard'));
             } else {
                 $this->counter = Yii::app()->session->itemAt('captchaRequired') + 1;
                 Yii::app()->session->add('captchaRequired', $this->counter);
             }
         }
         $this->render('login', array('model' => $model));
     } else {
         $this->redirect(array('site/newdashboard'));
     }
 }
<?php 
	$resign_emp_data = EmployeeTransaction::model()->resetScope()->findAll(array('condition'=>'employee_status= 2 and employee_transaction_organization_id = '.Yii::app()->user->getState('org_id')));
?>
	<table>
	<tr>
		<td>First Name</td>
		<td>Last Name</td>
		<td>Attendence Card</td>
		<td>Designation</td>
		<td>Department</td>
		<td>Shift</td>
		<td>Resign Application Date</td>
		<td>Resign Approve Date</td>
		<td></td>
	</tr>
<?php	
	foreach($resign_emp_data as $list)
	{
		$emp_info = EmployeeInfo::model()->resetScope()->findByAttributes(array('employee_info_transaction_id'=>$list['employee_transaction_id']));
		$emp_level_max = Yii::app()->db->createCommand()
				->select('MAX(reporting_priority),employee_exit_reporting_employee_id')
				->from('employee_exit_reporting')
				->group('employee_exit_employee_id')
				->where('employee_exit_employee_id ='.$list['employee_transaction_id'])
				->queryRow();
		
		$max_priority = $emp_level_max['MAX(reporting_priority)'];
		$reporting_emp_id = EmployeeExitReporting::model()->findByAttributes(array('employee_exit_employee_id'=>$list['employee_transaction_id'],'reporting_priority'=>$max_priority));
		$report_emp = $reporting_emp_id['employee_exit_reporting_employee_id'];
		$exit_details = EmployeeExitDetails::model()->findByAttributes(array('employee_exit_details_employee_id'=>$list['employee_transaction_id'],'reporting_employee_id'=>$report_emp,'reporting_employee_review_status'=>2));
		$app_date = $exit_details['employee_resign_application_date'];
 /**
  * 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 = EmployeeTransaction::model()->findByPk((int) $id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
echo $form->error($model, 'batch_id');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'employee_id');
?>
		<?php 
//$faculty = array();
$facultytablelist = EmployeeTransaction::model()->findAll('employee_transaction_organization_id=' . Yii::app()->user->getState('org_id'));
//$i=0;
$facname = array();
foreach ($facultytablelist as $f) {
    //echo $f['employee_transaction_employee_id'];
    $res1 = EmployeeTransaction::model()->findByAttributes(array('employee_transaction_employee_id' => $f['employee_transaction_employee_id']));
    //	echo $res1[''];
    $temp1 = EmployeeInfo::model()->findByAttributes(array('employee_type' => 1, 'employee_id' => $f['employee_transaction_employee_id']));
    if ($temp1) {
        $temp = $res1['employee_transaction_id'];
        $facname[$temp] = $temp1['employee_first_name'];
    }
}
echo $form->dropDownList($model, 'employee_id', $facname, array('empty' => 'Select Faculty'));
?>
		<?php 
echo $form->error($model, 'employee_id');
?>
	</div>
	
	public function actionResignemployee()
	{
		$model=new EmployeeTransaction('resignsearch');
		$model->unsetAttributes();  // clear any default values
		if(isset($_GET['EmployeeTransaction']))
		{
			$model->attributes=$_GET['EmployeeTransaction'];
		}
		if(isset($_REQUEST['sbrexportexcel']))
		{
			Yii::app()->request->sendFile(date('YmdHis').'.xls',
				    $this->renderPartial('resign_employee_excel',array('model'=>$model), true));
		}
		$this->render('resignEmployee',array(
			'model'=>$model,
		));
	}
 public function actionUpdate_emp_password($id)
 {
     $model = $this->loadModel($id);
     //$emp_email=EmployeeInfo::model()->findByPk($_REQUEST['id'])->employee_private_email;
     $emp_data = EmployeeTransaction::model()->findByAttributes(array('employee_transaction_user_id' => $_REQUEST['id']));
     $emp_info = EmployeeInfo::model()->findByPk($emp_data->employee_transaction_employee_id)->employee_first_name;
     $model->user_password = MD5($model->user_organization_email_id . $model->user_organization_email_id);
     $model->save();
     Yii::app()->user->setFlash('resetemppassword', $emp_info . ' ' . "Password is Reset");
     $this->redirect(array('user/resetemppassword'));
 }
	/**
	 * Creates a new model.
	 * If creation is successful, the browser will be redirected to the 'view' page.
	 */
	public function actionCreate()
	{
		$model=new EmployeeNotification;

		// comment the following line if AJAX validation is not needed
		 $this->performAjaxValidation($model);

		if(isset($_POST['EmployeeNotification']))
		{
			if(!empty($_POST['EmployeeNotification']['to']))
	     	        {
			$model->attributes = $_POST['EmployeeNotification'];
			$to=$model->emp_notice_to;
			$emp_tran_id=EmployeeTransaction::model()->findByAttributes(array('employee_transaction_user_id'=>$to))->employee_transaction_id;
			
			$model->to=$emp_tran_id;
			}	
			else
		   	{
		
			$model->attributes = $_POST['EmployeeNotification'];
			$model->emp_notice_to=0;
			}	
			if(!empty($_POST['EmployeeNotification']['notifiyii_department_id']))
	     	        {
			$model->notifiyii_department_id=$_POST['EmployeeNotification']['notifiyii_department_id'];
			}	
			else
		   	{
		
			$model->notifiyii_department_id=0;
			}	

			$startdate = $_POST['EmployeeNotification']['alert_after_date'];
			
			$alertstartdate  = date("Y-m-d", strtotime($startdate));
			$model->alert_after_date = $alertstartdate ;
		
			$enddate = $_POST['EmployeeNotification']['alert_before_date'];
			$alertenddate = date("Y-m-d", strtotime($enddate));
			$model->alert_before_date = $alertenddate ;
			$expire=$_POST['EmployeeNotification']['expire'];
			$alertexpire = date("Y-m-d", strtotime($expire));
			$model->expire = $alertexpire ;
			$model->from=Yii::app()->user->id;	
	                $model->employee_notification_creation_date = new CDbExpression('NOW()'); 

			if($model->save())
				$this->redirect(array('view','id'=>$model->id));
		}

		$this->render('create',array(
			'model'=>$model,
		));
	}
		}
		?>
		<?php if(Yii::app()->user->checkAccess('Exam.BranchSubjectwiseScheduling.Studentexamtimetable') ) { ?>	
	<div id="divlink8" class="info-link">			
		<?php	echo CHtml::link('Exam Timetable',array('/exam/branchSubjectwiseScheduling/studentexamtimetable','id'=>Yii::app()->user->getState('stud_id')),array('target'=>'_blank','style'=>'text-decoration:none;color:white;')); ?>	
	</div>
	<?php }	?>
	
</div>

<?php
} //end student if
 
else if(Yii::app()->user->getState('emp_id'))
{
$employeemodel = EmployeeTransaction::model()->find('employee_transaction_id='.Yii::app()->user->getState('emp_id'));
$info = EmployeeInfo::model()->findByPk($employeemodel->employee_transaction_employee_id);
$photo = EmployeePhotos::model()->findByPk($employeemodel->employee_transaction_emp_photos_id);

?>
<div id="menulink">
	
	<div id="studentlogo">
	<?php
		if($employeemodel->Rel_Photo->employee_photos_path != null)
			echo CHtml::link(CHtml::image(Yii::app()->baseUrl.'/college_data/emp_images/'.$photo->employee_photos_path,"",array("width"=>"178px","height"=>"176px")),array('/college_data/emp_images/'.$photo->employee_photos_path),array('id'=>'imagelink'))."</br></br>";
	
		/*
		$config = array( 
		    'scrolling' => 'no',
		    'autoDimensions' => false,
Example #22
0
<div class="profile-details">
 <div class="profile-pic">
   <?php $empId = EmployeeTransaction::model()->findByPk(Yii::app()->user->getState('emp_id'));
	 $pic = EmployeePhotos::model()->findByPk($empId->employee_transaction_emp_photos_id)->employee_photos_path;
	 echo CHtml::image(Yii::app()->baseUrl.'/college_data/emp_images/'.$pic);
   ?>
 </div>
 <div class="profile-link">
  <ul class="links">

	<li><?php echo CHtml::link('Holidays', array('/report/myholidays','id'=>$empId->employee_transaction_id)); ?></li>


  </ul>
 </div>
</div>
      public function loadAllNotice($list)
      {
	$menu = null;
	foreach($list as $notice) {
       	$menu .= '<div class="notify-data notifiche">';
	$menu .='<span class="username">'; 
	$menu .=$notice->student_notification_title;
	$menu .='</span></br>';
	$menu .='<span class="notice-lable"><b>From</b></span><span class="notice-content">';
	$menu .=(User::model()->findByPk($notice->student_notification_from)->user_type=='employee')?(EmployeeInfo::model()->findByAttributes(array('employee_info_transaction_id'=>(EmployeeTransaction::model()->findByAttributes(array('employee_transaction_user_id'=>$notice->student_notification_from))->employee_transaction_id)))->employee_first_name):(ucfirst(strtolower(strstr(User::model()->findByPk($notice->student_notification_from)->user_organization_email_id,'@',true)))); 	 
	$menu .='</span><span class="notice-lable"><b>Content</b></span>'; 
	$menu .='<span class="notice-content">'.$notice->student_notification_content.'</span></div>'; 	
	}

	return $menu;

      }
	public function actionEmployeeFinalViewExportToPdf($id)
	{
		$employee_transaction = EmployeeTransaction::model()->findAll('employee_transaction_id='.$id);
		$employee_docs = EmployeeDocsTrans::model()->findAll('employee_docs_trans_user_id='.$id);
		$employee_qual = EmployeeAcademicRecordTrans::model()->findAll('employee_academic_record_trans_user_id='.$id);
		$employee_exp = EmployeeExperienceTrans::model()->findAll('employee_experience_trans_user_id='.$id);

		$html = $this->renderPartial('/employeeTransaction/employeeFinalView', array(
		    'employee_docs'=>$employee_docs,
		    'employee_qual'=>$employee_qual,
		    'employee_transaction'=>$employee_transaction,
		    'emp_exp'=>$employee_exp,
		), true);
		
		
		ob_clean();
		//$pdf = new TCPDF();
		//$pdf->SetCreator(PDF_CREATOR);
		//$pdf->SetAuthor(Yii::app()->name);
		//$pdf->SetTitle($title);
		//$pdf->SetSubject($title);
		//$pdf->SetKeywords('example, text, report');
		//$pdf->SetHeaderData('', 0, $title, '');
		//$pdf->setHeaderFont(Array('helvetica', '', 8));
		//$pdf->setFooterFont(Array('helvetica', '', 6));
		//$pdf->SetMargins(15, 18, 15);
		//$pdf->SetHeaderMargin(5);
		//$pdf->SetFooterMargin(10);
		//$pdf->SetAutoPageBreak(TRUE, 15);
		//$pdf->SetFont('dejavusans', '', 7);
		//$resolution= array(150, 150);
		//$pdf->AddPage('P', $resolution);
		$html = '<style> table, th, td { border : 1px solid #000;} th {text-align: center;}</style>'.$html;
		//$pdf->writeHTML($html, true, false, true, false, '');
		//$pdf->LastPage();
		//$pdf->Output($filename, "I");
	  
		$this->exporttopdf('Employee Report','Employee.pdf',$html);	              
	}
Example #25
0
 $("#add-tab").click(function(event) {
      $('#updateData').attr('href', editLinkPath + '/employee/employeeTransaction/updateprofiletab4?id=' + '<?php echo $_REQUEST["id"]; ?>');
 });

 $("#personal-tab").click(function(event) {
      $('#updateData').attr('href', editLinkPath + '/employee/employeeTransaction/updateprofiletab1?id=' + '<?php echo $_REQUEST["id"]; ?>');
 });

});
</script>
            <div class="clear-div"></div>
            <div class="profile-page-box">
                <!--===============================Page header start============================-->
                <div class="page-title-header"><i class="fa fa-plus"></i> View Employee Profile</div>
                <!--===============================Page header end============================-->
		<?php $empInfo = EmployeeTransaction::model()->findByPk($_REQUEST['id']); 
		      $emppicPath = EmployeePhotos::model()->findByPk($empInfo->employee_transaction_emp_photos_id);
			  $emp_photo=Yii::app()->baseUrl."/college_data/emp_images/".$emppicPath->employee_photos_path;		
		?>
                <!--Profile Tab Start-->
                <div class="profile-box-bg">
                	<div class="profilebox-left">
                    	<div class="profile-image-tab">
		<?php  if(Yii::app()->user->checkAccess('EmployeeTransaction.UpdateEmployeeData')  && (Yii::app()->user->getState('emp_id') == $_REQUEST['id']) || Yii::app()->user->checkAccess('EmployeeTransaction.UpdateAllEmployeeData') && $model->employee_status==0)  { ?>
			<a title="Change Picture" href ="<?php echo Yii::app()->baseUrl.'/employee/employeeTransaction/updateprofilephoto?id='.$_REQUEST['id']; ?>">
		<?php   }?>
                            <div class="profile-box-user"><img src="<?php echo $emp_photo;?>" width="200" height="200"></div></a>
                        </div>
                    </div>
                    <div class="profilebox-middle" style="font-family : sans-serif; ">
                    	<div class="profile-username"><?php echo $empInfo->Rel_Emp_Info->employee_first_name.' '.$empInfo->Rel_Emp_Info->employee_last_name ;?> </div>
	public function mysearch()
		{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.

		$criteria=new CDbCriteria;
		$trans = EmployeeTransaction::model()->resetScope()->findByPk($_REQUEST['id']);
		$users = EmployeeTransaction::model()->resetScope()->findAll('employee_transaction_user_id='.$trans->employee_transaction_user_id);	
		$arr = CHtml::listData($users,'employee_transaction_id','employee_transaction_id');	

		$criteria->addInCondition('employee_experience_trans_user_id',$arr);
		$criteria->compare('employee_experience_trans_id',$this->employee_experience_trans_id);
		$criteria->compare('employee_experience_trans_user_id',$this->employee_experience_trans_user_id);
		$criteria->compare('employee_experience_trans_emp_experience_id',$this->employee_experience_trans_emp_experience_id);

		$data = new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
		));
		$_SESSION['emp_exp']=$data;
		return $data;
	}
	
if(!empty($_REQUEST['empid']))
{
echo CHtml::link('GO BACK', array('/employee/employeeTransaction/employeeCertificates','id'=>$_REQUEST['empid']),array('id'=>'printid1'));
}
else {
echo CHtml::link('GO BACK',array('certificate/EmployeeCertificategeneration'),array('id'=>'printid1'));
echo CHtml::button('Save',array('id'=>'printid1','class'=>'submit','submit' => array('certificate/SaveEmployeeCertificatedata','emp_id'=>$emp_info->employee_info_transaction_id,'ctype'=>$certificate_type)));
}

?>
<button style='margin-left:50px;' class='submit' onclick="javascript:window.print()" id="printid1" class="submit">Print</button>
<?php
if($emp_info)
{
	$trans = EmployeeTransaction::model()->findByPk($emp_info->employee_info_transaction_id); 
	$titl = "<b>".$emp_info->title."</b>"; 	
	$name = "<b>".$emp_info->employee_first_name." ".$emp_info->employee_middle_name." ".$emp_info->employee_last_name."</b>"; 
	
	$attendence_no = "<b>".$attendence_no."</b>";
	$gender = "<b>".$emp_info->employee_gender."</b>";
	$emobile = "<b>".$emp_info->employee_private_mobile."</b>";

	if($trans->employee_transaction_department_id !=0)
		$department = "<b>".Department::model()->findByPk($trans->employee_transaction_department_id)->department_name."</b>";
	else 
		$department = "<b>not set</b>";
	
	if($trans->employee_transaction_designation_id !=0)
		$designation = "<b>".EmployeeDesignation::model()->findByPk($trans->employee_transaction_designation_id)->employee_designation_name."</b>";
	else 
<?php
$this->breadcrumbs=array(
	'Employee',
);?>
<!-- For Employee  Birthday by Abhishek --> 
<div class="box birthday">
<div class="box-header">
<h1>Today's Birth Day</h1>
</div>
<?php 
$birthdays=EmployeeTransaction::Loadbirthdays();
echo $birthdays;
?>
</div>
<!-- Employee birthday Complete-->
<?php
$current_date = date('Y-m-d');
$criteria = new CDbCriteria;
//$criteria->select = 'academic_term_id';
$criteria->condition = 'current_sem = 1 AND academic_term_organization_id = '.Yii::app()->user->getState('org_id');
$data_arr = 0;
$semname = AcademicTerm::model()->findAll($criteria);
if($semname){
$data = CHtml::listData($semname,'academic_term_id','academic_term_id');
$data_arr = implode(',',$data);
}
$timetable_criteria = new CDbCriteria;
$timetable_criteria->condition = 'acdm_name_id in ('.$data_arr.') AND faculty_emp_id = '.Yii::app()->user->getState('emp_id').' AND lecture_date = "'.date('Y-m-d').'" order by lec';
$time_table_details = TimeTableDetail::model()->findAll($timetable_criteria);

if($time_table_details) {
Example #29
0
} else {
    if ($user == 'student') {
        $username = StudentInfo::model()->findByPk(StudentTransaction::model()->findByAttributes(array('student_transaction_user_id' => Yii::app()->user->id))->student_transaction_student_id)->student_first_name;
    } else {
        $username = EmployeeInfo::model()->findByPk(EmployeeTransaction::model()->findByAttributes(array('employee_transaction_user_id' => Yii::app()->user->id))->employee_transaction_employee_id)->employee_first_name;
    }
}
?>
		<a data-close-others="true" data-hover="dropdown" data-toggle="dropdown" class="dropdown-toggle" href="#">
		<?php 
$checkUser = StudentTransaction::model()->findByAttributes(array('student_transaction_user_id' => Yii::app()->user->id));
if ($checkUser) {
    $avtar = StudentPhotos::model()->findByPk($checkUser->student_transaction_student_photos_id)->student_photos_path;
    echo CHtml::image(Yii::app()->baseUrl . '/college_data/stud_images/' . $avtar, 'Student', array('height' => 29, 'width' => '29'));
} else {
    $checkUser = EmployeeTransaction::model()->findByAttributes(array('employee_transaction_user_id' => Yii::app()->user->id));
    if ($checkUser) {
        $avtar = EmployeePhotos::model()->findByPk($checkUser->employee_transaction_emp_photos_id)->employee_photos_path;
        echo CHtml::image(Yii::app()->baseUrl . '/college_data/emp_images/' . $avtar, 'Student', array('height' => 29, 'width' => '29'));
    } else {
        echo '<img src="' . Yii::app()->baseUrl . '/images/no_image_icon.jpg" alt="" height=29 width=29>';
    }
}
?>
		
		<span class="username"><?php 
echo $username;
?>
</span>
		<i class="icon-angle-down"></i>
		</a>
	/**
	* This method return employee wise attendence.
	*/
	public function emp_search()
	{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.

		$tran_id = EmployeeTransaction::model()->findByAttributes(array('employee_transaction_user_id'=>Yii::app()->user->id));
		$emp_id = $tran_id['employee_transaction_id'];
		//Yii::app()->user->setState('emp_id',$id);

		$criteria=new CDbCriteria;
		
		$criteria->condition ="t.employee_id = :emp_id";
		$criteria->params = array (
		':emp_id'=>$emp_id,
		);
		$criteria->with = array('Rel_Emp_Info');
		$criteria->compare('employee_attendence_id',$this->employee_attendence_id);
		$criteria->compare('Rel_Emp_Info.employee_first_name',$this->employee_first_name,true);
		$criteria->compare('Rel_Emp_Info.employee_attendance_card_id',$this->employee_attendance_card_id,true);
		$criteria->compare('Rel_Emp_Info.employee_no',$this->employee_no,true);
		$criteria->compare('Rel_Emp_Info.employee_info_transaction_id',$this->employee_info_transaction_id,true);
		$criteria->compare('date', $this->dbDateSearch($this->date), true);
		$criteria->compare('employee_id',$this->employee_id);
		$criteria->compare('time1',$this->time1,true);
		$criteria->compare('time2',$this->time2,true);
		$criteria->compare('time3',$this->time3,true);
		$criteria->compare('time4',$this->time4,true);
		$criteria->compare('time5',$this->time5,true);
		$criteria->compare('time6',$this->time6,true);
		$criteria->compare('time7',$this->time7,true);
		$criteria->compare('time8',$this->time8,true);
		$criteria->compare('time9',$this->time9,true);
		$criteria->compare('time10',$this->time10,true);
		$criteria->compare('attendence',$this->attendence,true);
		$criteria->compare('total_hour',$this->total_hour,true);
		$criteria->compare('overtime_hour',$this->overtime_hour,true);
		$criteria->compare('csvfile',$this->csvfile);
		return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
			'sort'=>array(
				    'defaultOrder'=>'employee_attendence_id DESC',
				),

		));
	}