<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));
$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, '', '');
/** * Manages all models. */ public function actionAdmin() { $model = new BannsRecord('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['BannsRecord'])) { $model->attributes = $_GET['BannsRecord']; } if (isset($_GET['export'])) { header("Content-Type: application/vnd.ms-excel; charset=utf-8"); header("Content-Disposition: inline; filename=\"banns-report.xls\""); $dataProvider = $model->search(); $dataProvider->pagination = false; $fields = array('id', 'groom_name', 'groom_parent', 'groom_parish', 'bride_name', 'bride_parent', 'bride_parish', 'banns_dt1', 'banns_dt2', 'banns_dt3'); $labels = $model->attributeLabels(); $fval = array(); foreach ($fields as $field) { array_push($fval, $labels[$field]); } echo implode("\t", $fval) . "\n"; foreach ($dataProvider->data as $data) { $fval = array(); foreach ($fields as $field) { $val = preg_match('/(?:bride|groom)_parish$/', $field) ? BannsRecord::get_parish($data->{$field}) : $data->{$field}; array_push($fval, $val); } echo implode("\t", $fval) . "\n"; } Yii::app()->end(); } $this->render('admin', array('model' => $model)); }
<?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: ';
?> <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 />