Preview: candidatelisting.php
Size: 9.28 KB
/home/jambtst2015/public_html/protected/views/webadmin/candidatelisting.php
<script language="javascript">
function open_src(){
if(document.getElementById("div_src").style.display=='none'){
//document.getElementById("div_src").style.display='block';
$("#div_src").show("slow");
}
else{
//document.getElementById("div_src").style.display='none';
$("#div_src").hide("slow");
}
}
</script>
<script>
//Fncy Box//
$(document).ready(function() {
/*
* Simple image gallery. Uses default settings
*/
$('.fancybox').fancybox();
});
//End of Fncy Box//
</script>
<?php
/* @var $this SiteController */
/* @var $model ContactForm */
/* @var $form CActiveForm */
$this->pageTitle=Yii::app()->name . ' - Candidate List';
$this->breadcrumbs=array(
'Candidate List',
);
?>
<h1> Candidate List</h1>
<?php if(Yii::app()->user->hasFlash('error')): ?>
<div class="flash-error">
<?php echo Yii::app()->user->getFlash('error'); ?>
</div>
<?php endif; ?>
<?php if(Yii::app()->user->hasFlash('exambody')): ?>
<div class="flash-success">
<?php echo Yii::app()->user->getFlash('exambody'); ?>
</div>
<?php endif; ?>
<div class="icon">
<!--<a href="javascript:open_src();"><img src="<?php echo Yii::app()->request->baseUrl; ?>/fileadmin/images/search-icon.png" alt="Search" title="Search" /></a>-->
<?php /*?><a href="<?php echo Yii::app()->request->baseUrl; ?>/webadmin/exambody/">
<img src="<?php echo Yii::app()->request->baseUrl; ?>/fileadmin/images/plus_icon.gif" alt="Add" title="Add" />
</a><?php */?>
</div>
<div style="margin:5px 5px -1px; <?php if($editRecord['name']=='' && $editRecord['validity']==''){ ?>display:none;<?php } ?> display:block; border: 1px solid rgb(196, 196, 196); padding: 19px 43px;" id="div_src" class='search_form'>
<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'exambodylist-form',
'action'=>Yii::app()->request->baseUrl.'/webadmin/candidatelisting/search/1',
//'enableClientValidation'=>true,
//'clientOptions'=>array(
//'validateOnSubmit'=>true,
//),
'htmlOptions' => array(
'enctype' => 'multipart/form-data',
),
)); ?>
<?php echo $form->errorSummary($model); ?>
<div class="row">
<div class="src_input">
<?php echo $form->labelEx($model,'name'); ?>
<?php echo $form->textField($model,'name',array('size'=>60,'maxlength'=>255,'value'=>$editRecord['name'])); ?>
<?php echo $form->error($model,'name'); ?>
</div>
<div class="row">
<div class="src_input">
<?php echo $form->labelEx($model,'pin'); ?>
<?php echo $form->textField($model,'pin',array('size'=>60,'maxlength'=>255,'value'=>$editRecord['pin_no'])); ?>
<?php echo $form->error($model,'pin'); ?>
</div>
</div>
</div>
<div class="row buttons">
<?php echo CHtml::submitButton('Search'); ?>
<a href="<?php echo Yii::app()->request->baseUrl; ?>/webadmin/candidatelisting/" style="text-decoration:none">
<?php echo CHtml::Button('Show All'); ?>
</a>
</div>
<?php $this->endWidget(); ?>
</div>
</div>
<div class="form " style="padding-top:10px;">
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'exambody-form',
'enableClientValidation'=>true,
'clientOptions'=>array(
'validateOnSubmit'=>true,
),
)); ?>
<?php //echo '<pre>'; print_r($allExambody); ?>
<table width="100%" cellspacing="0" cellpadding="0" border="0" class="table_list">
<tr>
<td class="block-block">No</td>
<td class="block-block"><a href="javascript:void(0);" onclick="tableordering('name');">Candidate Name<?php if(isset($_GET['order']) && $_GET['order']=='ASC' && $_GET['field']=='name'){?><img src="<?php echo Yii::app()->request->baseUrl; ?>/fileadmin/images/sort_asc.png" align='absmiddle' style="text-decoration:none;" /><?php }if(isset($_GET['order']) && $_GET['order']=='DESC' && $_GET['field']=='name'){ ?><img src="<?php echo Yii::app()->request->baseUrl; ?>/fileadmin/images/sort_desc.png" style="text-decoration:none;" /><?php } ?></a></td>
<td class="block-block"><a href="javascript:void(0);" onclick="tableordering('pin_no');">Pin No<?php if(isset($_GET['order']) && $_GET['order']=='ASC' && $_GET['field']=='pin_no'){?><img src="<?php echo Yii::app()->request->baseUrl; ?>/fileadmin/images/sort_asc.png" align='absmiddle' style="text-decoration:none;" /><?php }if(isset($_GET['order']) && $_GET['order']=='DESC' && $_GET['field']=='pin_no'){ ?><img src="<?php echo Yii::app()->request->baseUrl; ?>/fileadmin/images/sort_desc.png" style="text-decoration:none;" /><?php } ?></a></td>
<td class="block-block">Expiry</td>
<td class="block-block">Exam Body Registered For</td>
<td class="block-block">Last Login</td>
<td class="block-block">Status</td>
<!--<td class="block-block">Marks</td>-->
<td class="block-block">Action</td>
</tr>
<?php
if(count($allExambody)>0){
$inc = 0;
foreach($allExambody as $allExambody){
$no = ($pageMax*($pageNo-1))+1+$inc;
$expairetydate = explode(' ',$allExambody['expiry_date']);
//echo $allExambody['id'];exit;
$subjectsArray = Helpers::getresultCondition($allExambody['id'],"status='Active' and del_status='0'");
?>
<tr id="<?php echo $allExambody['id'];?>">
<td><?php echo $no; ?></td>
<td><?php echo $allExambody['name']; ?></td>
<td><?php echo $allExambody['pin_no']; ?></td>
<td><?php echo Helpers::dateformat($expairetydate[0],'mm-dd-yy'); ?></td>
<td><?php echo Helpers::getrecord('Exambody','id',$allExambody['exam_id'],'name'); ?></td>
<td>
<?php
if($allExambody['last_login']=='0000-00-00 00:00:00'){
echo '--';
}else{
echo date("m/d/Y h:i:s A",strtotime($allExambody['last_login']));
}
?>
</td>
<td><?php echo $allExambody['status'];?></td>
<td>
<?php /*?><a href="<?php echo Yii::app()->request->baseUrl; ?>/webadmin/exambody/edit/<?php echo $allExambody['id']; ?>" style="text-decoration:none;">
<img src="<?php echo Yii::app()->request->baseUrl; ?>/fileadmin/images/edit_icon.gif" alt="Edit" title="Edit" />
</a>
<a href="javascript:void(0);" onclick="change_status('1','<?php echo $allExambody['id'];?>','<?php echo $allExambody['status'];?>');" style="text-decoration:none;">
<?php if($allExambody['status']=='Active'){?>
<img src="<?php echo Yii::app()->request->baseUrl; ?>/fileadmin/images/active.png" alt="Change Status" title="Change Status" />
<?php } else { ?>
<img src="<?php echo Yii::app()->request->baseUrl; ?>/fileadmin/images/inactive.png" alt="Change Status" title="Change Status" />
<?php } ?><?php */?>
<a class="fancybox" href="#inline<?php echo $no; ?>" title="Result of <?php echo $allExambody['name']; ?>" style="font-size:13px;text-decoration:none; font:Verdana, Geneva, sans-serif; color:#00F">
<img src="<?php echo Yii::app()->request->baseUrl; ?>/fileadmin/images/list_icon.gif" alt="View Details" title="View Details" />
</a>
<div class="exam-body-list" id="inline<?php echo $no; ?>" style="width:600px;display: none;" align="left">
<?php if(count($subjectsArray)>0){ ?>
<table border="1" cellspacing="0" cellpadding="0" class="table">
<tr>
<th>Subject</th>
<th>Question Paper</th>
<th>Pass Marks(%)</th>
<th>Score(%)</th>
<th>Result</th>
</tr>
<?php
$total = 0;
foreach($subjectsArray as $subjectsArraysingle){
$isSubjectExist = Helpers::getrecord('Questionanswerbody','subject_id',$subjectsArraysingle['subject_id'],'id');
$isPaperExist = Helpers::getrecord('Questionanswerbody','paper_id',$subjectsArraysingle['paper_id'],'id');
if($isSubjectExist>0 && $isPaperExist>0){
?>
<tr>
<td><?php echo Helpers::getrecord('Subjectbody','id',$subjectsArraysingle['subject_id'],'subject'); ?></td>
<td><?php echo Helpers::getrecord('Questionbody','id',$subjectsArraysingle['paper_id'],'paper_name'); ?></td>
<td><?php echo $passMarks = Helpers::getrecord('Questionbody','id',$subjectsArraysingle['paper_id'],'pass_marks'); ?></td>
<td><?php echo $subjectsArraysingle['marks'];?></td>
<td><?php if($subjectsArraysingle['marks']>=$passMarks){ echo 'Pass'; }else{ echo 'Fail'; } ?></td>
</tr>
<?php //$total = $total+$subjectsArraysingle['marks']; ?>
<?php }
}?>
<!--<tr class="total">
<td colspan="2">total</td>
<td><?php echo $total;?></td>
</tr>-->
</table>
<?php }else{ ?>
<h2 class="qusHeader light-sorry">Sorry Candidate had not attend any examination yet.. </h2>
<div class="clear"></div>
<?php } ?>
</div>
</td>
</tr>
<?php
$inc++;
}
}else{
?>
<tr><td colspan="8" align="center" style="text-align:center;">No records Found</td></tr>
<?php } ?>
</table>
<?php
// display pagination
$this->widget('CLinkPager', array(
'pages' => $pages,
)) ?>
<?php $this->endWidget(); ?>
</div><!-- form -->
<?php //endif; ?>
Directory Contents
Dirs: 1 × Files: 36