コード例 #1
0
{
	$trans = StudentTransaction::model()->findByPk($stud_info->student_info_transaction_id); 
	$titl = "<b>".$stud_info->title."</b>";
	$name = "<b>".$stud_info->student_first_name." ".$stud_info->student_middle_name." ".$stud_info->student_last_name."</b>"; 
	$smobile = "<b>".$stud_info->student_mobile_no."</b>";
	$pmobile = "<b>".$stud_info->student_guardian_mobile."</b>";

	$branch_model=Branch::model()->findByPk($trans->student_transaction_branch_id);
	$en_no = "<b>".$stud_info->student_enroll_no."</b>";
	$branch = "<b>".$branch_model->branch_name."</b>";
	$sem = "<b>Sem-".AcademicTerm::model()->findByPk($trans->student_academic_term_name_id)->academic_term_name."</b>";
        if($trans->student_transaction_division_id != 0)
	$div = "<b>".Division::model()->findByPk($trans->student_transaction_division_id)->division_name."</b>";
	else
	$div = '-';
	$photos=StudentPhotos::model()->findByPk($trans->student_transaction_student_photos_id)->student_photos_path;
	$photo=CHtml::image(Yii::app()->request->baseUrl.'/college_data/stud_images/'.$photos,'image',array('width'=>120,'height'=>140,'class'=>'photo','style'=>'padding-right:0px;','border'=>1));
	$gender = "<b>".$stud_info->student_gender."</b>";
	$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>";
コード例 #2
0
ファイル: main.php プロジェクト: sharmarakesh/EduSec2.0.0
$user = User::model()->findByPk(Yii::app()->user->id)->user_type;
if ($user == 'admin') {
    $username = '******';
} 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;
?>
コード例 #3
0
<div class="profile-details">
 <div class="profile-pic">
   <?php $stdId = StudentTransaction::model()->findByPk(Yii::app()->user->getState('stud_id'));
	 $pic = StudentPhotos::model()->findByPk($stdId->student_transaction_student_photos_id)->student_photos_path;
	 echo CHtml::image(Yii::app()->baseUrl.'/college_data/stud_images/'.$pic);
   ?>
 </div>
 <div class="profile-link">
  <ul class="links">

	<li><?php echo CHtml::link('Performance', array('/student/feedbackDetailsTable/studentPerformance','id'=>$stdId->student_transaction_id)); ?></li>

	<li><?php echo CHtml::link('Subject', array('/report/mysubjects','id'=>$stdId->student_transaction_id)); ?></li>

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

	<li><?php echo CHtml::link('Student History', array('/report/studenthistory','id'=>$stdId->student_transaction_id)); ?></li>

	<li class="last-row"><?php echo CHtml::link('Exam Timetable', array('/exam/branchSubjectwiseScheduling/studentexamtimetable','id'=>$stdId->student_transaction_id)); ?></li>

	<li class="last-row"><?php echo CHtml::link('Assignment', array('/assignment/assignment/studAssignments','id'=>$stdId->student_transaction_id)); ?></li>
  </ul>
 </div>
</div>
コード例 #4
0
$StudentAddress = StudentAddress::model()->findByPk($student_transaction[0]->student_transaction_student_address_id);
else
$StudentAddress = new StudentAddress;
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 class="title">Student Detail</h3>

<table class="no_border">

	<tr>

		<td  rowspan='4' width="135px" align="center" style="border:1px solid #74b9f0;">
<img src="college_data/stud_images/<?php echo StudentPhotos::model()->findBypk($student_transaction[0]->student_transaction_student_photos_id)->student_photos_path; ?>" height="147px" width="129px" class="photo" />
		</td>

		<td class="label" style="border:1.5px solid white;"><b>Name</b></td><td><?php echo $StudentInfo->title." ". $StudentInfo->student_first_name." ".$StudentInfo->student_middle_name." ".$StudentInfo->student_last_name;?></td>
		
	</tr>
	<tr style="background:none">
		<td  class="label" style = "border:1.5px solid white;width:18%;"><b>Student Unique ID<b></td><td><?php echo $StudentInfo->student_roll_no;?></td>
	</tr>
	<tr>
		<td class="label" style="border:1.5px solid white;"><b>Student Email<b></td><td><?php echo $StudentInfo->student_email_id_1;?></td>
	</tr>
	<tr style="background:none">
		<td class="label" style="border:1.5px solid white;"><b>Course</b></td><td><?php echo $Course->course_name;?>
	</tr>
コード例 #5
0
ファイル: header.php プロジェクト: rinodung/EduSec3.0.0
		    {
			$count = 0;
			$count = Mailbox::model()->newMsgs(Yii::app()->user->id);	
		     ?>
			<li><a href="<?php echo Yii::app()->baseUrl;?>/mailbox" class="nav-link green"><i class="fa fa-envelope"></i> <span class="nav-counter nav-counter-blue"><?php echo $count;?></span></a></li>
		   <?php			
		    }?>
                        <li><a href="#" class="nav-link orange"><i class="fa fa-tasks"></i> <span class="nav-counter nav-counter-green">15</span></a></li>
			<?php		
			$isStudent = Yii::app()->user->getState('stud_id');
			$isEmployee = Yii::app()->user->getState('emp_id');
			if(isset($isStudent))
			{
			  $stdinfo = StudentInfo::model()->findByAttributes(array('student_info_transaction_id'=>Yii::app()->user->getState('stud_id')));	
			  $stu_tran = StudentTransaction::model()->findByPk(Yii::app()->user->getState('stud_id'));
			  $stdpicPath = StudentPhotos::model()->findByPk($stu_tran->student_transaction_student_photos_id);
			  $stud_photo=Yii::app()->baseUrl."/college_data/stud_images/".$stdpicPath->student_photos_path;
			?>
                        <li><a href="#" class="nav-link user-image-nav"><img src="<?php echo $stud_photo; ?>" width="51" height="51" class="userimage"></a></li>
                        <li class="user-image-line" id="dropdown"><a href="#" class="nav-link">
				<?php	
				  echo $stdinfo->student_first_name;
	   			 ?>	
			 <i class="fa fa-caret-down"></i></a>
				<ul>
				<li><a href="<?php echo Yii::app()->baseUrl;?>/student/studentTransaction/update?id=<?php echo Yii::app()->user->getState('stud_id');?>">My Profile</a></li>
				<li><a href="<?php echo Yii::app()->baseUrl;?>/user/change"">Change Password</a></li>
				<li><a href="<?php echo Yii::app()->baseUrl;?>/mailbox">My Inbox</a></li>
				<li><?php echo CHtml::link('Log Out', Yii::app()->baseUrl.'/site/logout')?></li>
			      </ul>
			</li>
コード例 #6
0
<?php 
$gobackimage = CHtml::image('../images/Goback.png', 'No Image', array('height' => '40', 'width' => 40));
echo CHtml::link('GO BACK', Yii::app()->createUrl('report/Studentid'), array('title' => 'Go Back')) . "&nbsp;&nbsp;";
?>
<button style="float:right; margin-right:50%;" onclick="javascript:window.print()" id="printid">Print</button>
</div></br></br>
<?php 
$org_id = Yii::app()->user->getState('org_id');
$org_data = Organization::model()->findByAttributes(array('organization_id' => $org_id));
$orgcity = City::model()->findByPk($org_data->city)->city_name;
$orgstate = State::model()->findByPk($org_data->state)->state_name;
$i = 0;
if ($student_data1 && $selected_list) {
    foreach ($student_data1 as $stud) {
        $orglogo = CHtml::image(Yii::app()->controller->createUrl('/site/loadImage', array('id' => Yii::app()->user->getState('org_id'))), 'No Image', array('width' => 65, 'height' => 65));
        $studphoto = StudentPhotos::model()->findByPk($stud['student_transaction_student_photos_id'])->student_photos_path;
        ?>
<div class="outer">
<!--main div-->
<div class="main">
	<!--Header div-->
	<div class="idcardheader">
		<div class="logo">
			<?php 
        echo $orglogo;
        ?>
		</div>
		<div class="collegeheader">
			<h3 class="org_name"><?php 
        echo $org_data->organization_name;
        ?>
コード例 #7
0
<?php if(Yii::app()->user->getState('stud_id'))
{
$studentmodel = StudentTransaction::model()->find('student_transaction_id='.Yii::app()->user->getState('stud_id'));
$photo = StudentPhotos::model()->findByPk($studentmodel->student_transaction_student_photos_id);
?>
<div id="menulink">
	<div id="studentlogo">
	<?php
		if($photo->student_photos_path != null)
			echo CHtml::link(CHtml::image(Yii::app()->baseUrl.'/college_data/stud_images/'.$photo->student_photos_path,"",array("width"=>"176px","height"=>"178px")),array('/college_data/stud_images/'.$photo->student_photos_path),array('id'=>'photo'));
		/* $config = array( 
					'scrolling' => 'no',
					'autoDimensions' => false,
					'width' => 'auto',
					'height' => 'auto', 
				 //   'titleShow' => false,
				       'overlayColor' => '#000',
				       'padding' => '0',
				       'showCloseButton' => true,			
				       'onClose' => function() {
						return window.location.reload();
					},

				// change this as you need
				);
				$this->widget('application.extensions.fancybox.EFancyBox', array('target'=>'#photo', 'config'=>$config));*/
		?>
	</div> <?php //end of student logo div?>

	</br>
コード例 #8
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
         $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.');
     }
 }
コード例 #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
		));
	}
コード例 #10
0
      public function loadReadNotice()
      {
	$res = array();
	$emp_trans = EmployeeTransaction::model()->findAll(array('select'=>'employee_transaction_user_id'));
	$s=0;
	if($emp_trans)
	{
		$d = CHtml::listData($emp_trans,'employee_transaction_user_id','employee_transaction_user_id');
		$s = implode(',',$d);
	}
	
	$list = EmployeeNotification::model()->findAll(array('limit'=>10,'order'=>'id  desc','condition'=>'emp_notice_to = :to AND alert_after_date <= :afterdate AND alert_before_date >= :beforedate and t.from IN('.$s.')', 'params'=> array(':to' => Yii::app()->user->getState('emp_id'), ':afterdate'=>date('Y-m-d'),':beforedate'=>date('Y-m-d'))));
	$menu = null;
	
	foreach($list as $notice) {
        $usertype=User::model()->findByPk($notice->from)->user_type;
	$menu .= '<div class="notify-data">';
	if($usertype=="employee")
	{		
	  $tran=EmployeeTransaction::model()->findByAttributes(array('employee_transaction_user_id'=>$notice->from));
		
	  $emp_model = EmployeeInfo::model()->findByAttributes(array('employee_info_transaction_id'=>$tran->employee_transaction_id));
	  $photo=EmployeePhotos::model()->findByPk($tran['employee_transaction_emp_photos_id']);
	  $menu .= '<span class="userimage">';
	  if(file_exists(Yii::app()->baseUrl.'/college_data/emp_images/'.$photo->employee_photos_path))
	  $user_image = Yii::app()->baseUrl.'/college_data/emp_images/'.$photo->employee_photos_path;
	  else
	  $user_image = Yii::app()->baseUrl.'/college_data/emp_images/no-images';

	  $menu .= CHtml::image($user_image,"No Image",array("width"=>"50px","height"=>"50px"));
	  $menu .='</span><span class="username">'; 
	  $menu .= ucfirst(strtolower($emp_model->employee_first_name)).' '.ucfirst(strtolower($emp_model->employee_last_name)).'</span>';
	 
 	}
	else 
        {  
	  $tran=StudentTransaction::model()->findByAttributes(array('student_transaction_user_id'=>$notice->from));
	  $stud_model = StudentInfo::model()->findByAttributes(array('student_info_transaction_id'=>$tran->student_transaction_id));
		
	  $photo=StudentPhotos::model()->findByPk($tran['student_transaction_student_photos_id']);
	
    	   $menu .= '<span class="userimage">';
	   if(file_exists(Yii::app()->baseUrl.'/college_data/stud_images/'.$photo->student_photos_path))
	   $user_image = Yii::app()->baseUrl.'/college_data/stud_images/'.$photo->student_photos_path;
	  else
	  $user_image = Yii::app()->baseUrl.'/college_data/emp_images/no-images';
	  $menu .= CHtml::image($user_image,"No Image",array("width"=>"50px","height"=>"50px"));
 	
	   $menu .='</span><span class="username">'; 
	 $menu .= ucfirst(strtolower($stud_model->student_first_name))." ".ucfirst(strtolower($stud_model->student_last_name))." (".$stud_model->student_enroll_no.")</span>";
	 }
 	  $menu .='<div class="notificationlink">';
	  $menu .='<a href='.Yii::app()->request->baseUrl.'/notification/employeeNotification/Read?id='.$notice->id.'>';
	  $menu .=$notice->title.'</a></div></div>';
 
	}

	if(!empty($list))
	$menu .='<span class="view-more-notice">'.CHtml::link('View More..','../notification/employeeNotification/index').'</span>';
	return $menu;

      }
コード例 #11
0
<div class="row_photo_v">
		<?php 
//echo CHtml::image(Yii::app()->baseUrl.'/stud_images/' . $model->Rel_Photos->student_photos_path);
?>
		<?php 
$photoid = StudentTransaction::model()->findByPk($model->student_archive_stud_tran_id)->student_transaction_student_photos_id;
echo CHtml::image(Yii::app()->baseUrl . '/stud_images/' . StudentPhotos::model()->findByPk($photoid)->student_photos_path);
?>
  
</div>
<!--<div class = "row_all_a">
	<div class="row_t_v">
		<?php 
echo '<lable><b>ID :</b></lable>';
?>
		<div class="rowm">
			<?php 
echo $model->student_archive_stud_tran_id . '<br>';
?>
		</div>
	</div>
</div>
-->

<div class = "row_all">

	<div class="row_t_v">
		<?php 
echo '<lable><b>Roll No :</b></lable>';
?>
		<div class="rowm">
コード例 #12
0
	/** Delete Photo of update profile*/
	public function actionPhotoDelete($id)
	{
		$model = $this->loadModel($id);
		$stud_photo = StudentPhotos::model()->findByPk($model->student_transaction_student_photos_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);	
						//$stud_photo->delete();
						$stud_photo->student_photos_path = "no-images";
						$stud_photo->save();			
					}
					else
					{
						$stud_photo->student_photos_path = "no-images";
						$stud_photo->save();			

					}
				}
			}
			closedir($dh);	
		$this->redirect(array('studentTransaction/update','id'=>$model->student_transaction_id));
		
	}
コード例 #13
0
 /**
  * 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 = StudentPhotos::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }