/**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate($bid = null)
 {
     $model = new BannsRequest();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['banns_id'])) {
         $model->banns_id = $_POST['banns_id'];
         $model->req_dt = $_POST['cert_dt'];
         if ($model->save()) {
             $this->redirect(array('view', 'id' => $model->id));
         }
     }
     $banns = BannsRecord::model()->findByPk($bid);
     $this->render('create', array('model' => $model, 'banns' => $banns, 'now' => Yii::app()->dateFormatter->formatDateTime(time(), 'short', 'medium')));
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate($bid = null)
 {
     $model = new BannsResponse();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['banns_id'])) {
         $model->banns_id = $_POST['banns_id'];
         $model->res_dt = $_POST['cert_dt'];
         if ($model->save()) {
             $this->redirect(array('view', 'id' => $model->id));
         }
     }
     $banns = BannsRecord::model()->findByPk($bid);
     $this->render('create', array('model' => $model, 'banns' => $banns, 'now' => date_format(new DateTime(), 'Y-m-d H:i:s')));
 }
Example #3
0
<h1><?php 
echo $model->groom_name . ' & ' . $model->bride_name;
?>
: #<?php 
echo $model->id;
?>
</h1>

<?php 
$letters = false;
if (ctype_digit($model->groom_parish) xor ctype_digit($model->bride_parish)) {
    $letters = true;
}
$model->groom_parish = BannsRecord::get_parish($model->groom_parish);
$model->bride_parish = BannsRecord::get_parish($model->bride_parish);
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('groom_parent', 'groom_parish', 'bride_parent', 'bride_parish', 'banns_dt1', 'banns_dt2', 'banns_dt3')));
echo '<br />';
echo CHtml::link('Edit', array('bannsRecords/update', 'id' => $model->id));
if ($letters) {
    if ($model->requests) {
        echo ' | ';
        echo CHtml::link('View Request Letters', array('bannsRequest/byRecord', 'id' => $model->id));
    }
    if ($model->responses) {
        echo ' | ';
        echo CHtml::link('View Response Letters', array('bannsResponse/byRecord', 'id' => $model->id));
    }
    if ($model->noImpedimentLetters) {
        echo ' | ';
        echo CHtml::link('View No Impediment Letters', array('noImpedimentLetter/byRecord', 'id' => $model->id));
Example #4
0
$pdf->Cell(0, 1, '', 0, 1);
$pdf->SetFont("times", "R", 14);
$banns = $model->banns;
show_field($pdf, $banns->groom_name);
show_field_ln($pdf, '', ', ');
show_field_ln($pdf, $banns->groom_parent, 'S/o    ');
show_field($pdf, BannsRecord::get_parish($banns->groom_parish), 'of  ');
show_field_ln($pdf, '', ' parish');
/*	$pdf->Cell(2,0,"",0,0);
	$pdf->Cell(0,0.8,BannsRecord::get_parish($banns->groom_parish). ' Parish and ',0,1,'L');
*/
show_field_ln($pdf, '', '        and');
show_field($pdf, $banns->bride_name, '');
show_field_ln($pdf, '', ', ');
show_field_ln($pdf, $banns->bride_parent, 'D/o  ');
show_field($pdf, BannsRecord::get_parish($banns->bride_parish), 'of  ');
show_field_ln($pdf, '', ' parish');
if (ctype_digit($banns->groom_parish)) {
    $local = 'groom';
    $other = 'bride';
} elseif (ctype_digit($banns->bride_parish)) {
    $local = 'bride';
    $other = 'groom';
} else {
    echo 'ERROR: Neither from our parish';
}
show_field_ln($pdf, '', '');
show_field_ln($pdf, '', 'The banns have been published, and no');
show_field_ln($pdf, '', 'impediment has been brought to our notice. Nor do');
show_field_ln($pdf, '', 'we know of any objection to this marriage.');
show_field_ln($pdf, '', '');
Example #5
0
	<?php 
echo CHtml::encode($data->getAttributeLabel('bride_parent'));
?>
:
	<span class="val"><?php 
echo CHtml::encode($data->bride_parent);
?>
</span>
	<br />

	<?php 
echo CHtml::encode($data->getAttributeLabel('bride_parish'));
?>
:
	<span class="val"><?php 
echo BannsRecord::get_parish($data->bride_parish);
?>
</span>
	<br />

	<?php 
if (ctype_digit($data->bride_parish)) {
    if (isset($local)) {
        $local = 'both';
    } else {
        $local = 'bride';
    }
    echo 'Bride DOB: ';
    echo '<span class="val">' . CHtml::encode($data->bride()->dob) . '</span>';
    echo '<br />';
    echo 'Bride Baptism 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 $id the ID of the model to be loaded
  * @return BannsRecord the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = BannsRecord::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Example #7
0
?>
	<br />

	<b><?php 
echo CHtml::encode($data->getAttributeLabel('banns_dt1'));
?>
:</b>
	<?php 
echo BannsRecord::get_parish($data->banns_dt1);
?>
	<br />

	<b><?php 
echo CHtml::encode($data->getAttributeLabel('banns_dt2'));
?>
:</b>
	<?php 
echo BannsRecord::get_parish($data->banns_dt2);
?>
	<br />

	<b><?php 
echo CHtml::encode($data->getAttributeLabel('banns_dt3'));
?>
:</b>
	<?php 
echo BannsRecord::get_parish($data->banns_dt3);
?>
	<br />