public function actionStep2()
 {
     if (isFrontUserLoggedIn()) {
         $solicitor_name = Yii::app()->session['solicitor_name'];
         $criteria = new CDbCriteria();
         $criteria->addSearchCondition('first_name', $solicitor_name, true, 'OR');
         $criteria->addSearchCondition('last_name', $solicitor_name, true, 'OR');
         $sol_list = Solicitor::model()->findAll($criteria);
         //pre($sol_list,true);
         $this->render('step2', array('sol_list' => $sol_list));
     } else {
         $this->redirect(array("/user"));
     }
 }
 public function gridSolicitor($data, $row) {
     $code = Solicitor::model()->findByPk($data->solicitor_id);
     return $code->first_name.' '.$code->last_name.'('.$code->solicitor_code.')';
 }
 /**
  * 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 $id the ID of the model to be loaded
  * @return Solicitor the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Solicitor::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Exemple #4
0
				<div class="box-body">
					<div class="col-xs-12 table-responsive">
						<?php $this->widget('zii.widgets.CDetailView', array(
								// 'itemsCssClass' => 'table table-bordered table-hover dataTable',
								'htmlOptions' => array("class" => "table table-bordered table-hover dataTable"),
								'data'=>$model,
								'attributes'=>array(
									array(
							            'label'=>'User',
							            'type'=>'raw',
							            'value'=>Users::model()->findByPk($model->user_id)->username,
							        ),
							        array(
							            'label'=>'Solictor',
							            'type'=>'raw',
							            'value'=>Solicitor::model()->findByPk($model->solicitor_id)->solicitor_code,
							        ),
							        array(
							            'label'=>'Visit',
							            'type'=>'raw',
							            'value'=>Visits::model()->findByPk($model->visit_id)->visit_code,
							        ),
									'mobile',
									'amount',
									'mode',
									'payment_status',
									'reference_number',
								),
							)); ?>
					</div>
				</div>
Exemple #5
0
 public function solicitorName($id) {
     $model = Solicitor::model()->findByPk($id);
     return $model->first_name . ' ' . $model->last_name . '(' . $model->solicitor_code . ')';
 }
Exemple #6
0
</section>
<section class="content">
	<div class="row">
		<div class="col-xs-12">
			<div class="box box-info">
				<div class="box-header with-border">
					<h3 class="box-title"><?php 
echo $solicitor->first_name . ' ' . $solicitor->last_name;
?>
 <small><a href="<?php 
echo base_url() . '/admin/donation/update?id=' . $model->id;
?>
">EDIT</a></small></h3>
				</div>
				<div class="box-body">
					<div class="col-xs-12 table-responsive">
						<?php 
$this->widget('zii.widgets.CDetailView', array('htmlOptions' => array("class" => "table table-bordered table-hover dataTable"), 'data' => $model, 'attributes' => array(array('label' => 'User', 'type' => 'raw', 'value' => Users::model()->findByPk($model->user_id)->username), array('label' => 'Solictor', 'type' => 'raw', 'value' => Solicitor::model()->findByPk($model->solicitor_id)->solicitor_code), array('label' => 'Visit', 'type' => 'raw', 'value' => Visits::model()->findByPk($model->visit_id)->visit_code), 'mobile', 'amount', 'mode', 'payment_status', 'reference_number')));
?>
					</div>
				</div>
				<div class="box-footer">
					<?php 
echo CHtml::link('Back', array('/admin/donation'), array("class" => 'btn btn-info pull-right', "style" => "margin-left:10px;"));
?>
				</div>
			</div>
		</div>
	</div>
</section>