Example #1
0
	<b><?php 
echo CHtml::encode($data->getAttributeLabel('ref_no'));
?>
:</b>
	<?php 
echo CHtml::encode($data->ref_no);
?>
, 

	<b><?php 
echo CHtml::encode($data->getAttributeLabel('sex'));
?>
:</b>
	<?php 
echo CHtml::encode(isset($data->sex) ? FieldNames::value('sex', $data->sex) : '');
?>
	<br />

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

	<b><?php 
echo CHtml::encode($data->getAttributeLabel('dob'));
?>
Example #2
0
	<b><?php 
echo CHtml::encode($data->getAttributeLabel('bride_residence'));
?>
:</b>
	<?php 
echo CHtml::encode($data->bride_residence);
?>
	<br />

	<b><?php 
echo CHtml::encode($data->getAttributeLabel('marriage_type'));
?>
:</b>
	<?php 
echo CHtml::encode(FieldNames::value('marriage_type', $data->marriage_type));
?>
	<br />

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

	<b><?php 
echo CHtml::encode($data->getAttributeLabel('minister'));
?>
 public function actionMassBookings()
 {
     $model = new MassBooking();
     if (isset($_POST['period'])) {
         $dt = $_POST['MassBooking']['mass_dt'];
         $dt = date('Y-m-d', CDateTimeParser::parse($dt, Yii::app()->locale->getDateFormat('short')));
         header("Content-Type: application/vnd.ms-excel; charset=utf-8");
         header("Content-Disposition: inline; filename=\"mass-bookings-report-{$dt}.xls\"");
         $period = $_POST['period'];
         $cond = "mass_dt BETWEEN '{$dt}' AND '{$dt}' + INTERVAL 1 {$period} ORDER BY mass_dt, mass.time, type";
         Yii::trace("R.massBookings dt={$dt}, period={$period}, cond={$cond}", 'application.controllers.ReportController');
         $crit = new CDbCriteria();
         $crit->mergeWith(array('join' => 'INNER JOIN masses mass ON mass.id = t.mass_id', 'condition' => $cond));
         $dataProvider = new CActiveDataProvider('MassBooking', array('criteria' => $crit));
         $dataProvider->pagination = false;
         $fields = array('mass_dt', 'mass' => array('time', 'language'), 'type', 'intention', 'booked_by');
         $labels = $model->attributeLabels();
         $fval = array();
         foreach ($fields as $key => $val) {
             if (!preg_match('/^\\d+$/', $key)) {
                 foreach ($val as $field) {
                     array_push($fval, ucfirst($field));
                 }
             } else {
                 array_push($fval, $labels[$val]);
             }
         }
         echo implode("\t", $fval) . "\n";
         $last_dt = '';
         $last_mass = 0;
         $last_type = '';
         foreach ($dataProvider->data as $data) {
             $fval = array();
             $this_dt = $data->mass_dt;
             $this_mass = $data->mass_id;
             $this_type = $data->type;
             $same_mass = false;
             $same_type = false;
             if ($this_dt == $last_dt and $this_mass == $last_mass) {
                 $same_mass = true;
                 if ($this_type == $last_type) {
                     $same_type = true;
                 }
             }
             foreach ($fields as $key => $val) {
                 if (!preg_match('/^\\d+$/', $key)) {
                     foreach ($val as $field) {
                         if ($same_mass) {
                             $value = '';
                         } elseif ('language' == $field) {
                             $value = FieldNames::value('languages', $data->{$key}->{$field});
                         } else {
                             $value = $data->{$key}->{$field};
                         }
                         array_push($fval, $value);
                     }
                 } else {
                     if ($this_dt == $last_dt and 'mass_dt' == $val) {
                         $value = '';
                     } elseif ($same_type and 'type' == $val) {
                         $value = '';
                     } else {
                         $value = $data->{$val};
                     }
                     array_push($fval, $value);
                 }
             }
             $last_dt = $this_dt;
             $last_mass = $this_mass;
             $last_type = $this_type;
             echo implode("\t", $fval) . "\n";
         }
         Yii::app()->end();
         return;
     }
     $this->render('mass-bookings', array('model' => $model));
 }
 public function testCreateParishioner()
 {
     $this->loginAs('pastor', 'pastor');
     $baps = array(array('name' => 'Subramaniam', 'baptism_dt' => '11/12/2013', 'baptism_place' => 'Bangalore', 'residence' => 'Bangalore', 'mother_tongue' => 'Kannada', 'fathers_name' => 'Prashanth Subramaniam', 'mothers_name' => 'Annapurna Subramaniam', 'godfathers_name' => 'Nirmal Raj', 'godmothers_name' => 'Arokia Mary', 'minister' => 'Fr. Adrian Gomes', 'confirmation_dt' => '11/12/2013', 'marriage_dt' => '05/02/2014', 'remarks' => 'Adult Baptism'));
     foreach ($baps as $bap) {
         $this->open('baptismRecords/create');
         $this->click("css=#member_search > img");
         sleep(2);
         $this->type("id=key", $bap['name']);
         $this->click('css=#find_match > input[name="yt0"]');
         sleep(1);
         $this->click("id=yw0_c0_0");
         sleep(2);
         $this->click("id=submitMatch");
         sleep(2);
         unset($bap['name']);
         foreach ($bap as $key => $value) {
             $this->type("name=BaptismRecord[{$key}]", $value);
         }
         $this->clickAndWait("//input[@value='Create']");
         foreach ($bap as $key => $value) {
             if (preg_match('/^sex$/', $key)) {
                 $this->assertTextPresent(FieldNames::value('sex', $value));
             } else {
                 $this->assertTextPresent($value);
             }
         }
         $this->clickAndWait("//input[@value='Create Certificate']");
         foreach ($bap as $key => $value) {
             if (preg_match('/^sex$/', $key)) {
                 $this->assertTextPresent(FieldNames::value('sex', $value));
             } else {
                 $this->assertTextPresent($value);
             }
         }
     }
 }
Example #5
0
        $sex = $data->sex ? strtolower(FieldNames::value('sex', $data->sex)) : 'generic';
        $photo_path = "/images/member-photo-{$sex}.jpg";
    }
    $src = Yii::app()->request->baseUrl . $photo_path;
    list($width, $height) = getimagesize(".{$photo_path}");
    $width = $width * 120 / $height;
    $height = 120;
    $alt = $data->fname . "'s photo";
    echo CHtml::image($src, $alt, array('width' => $width, 'height' => $height));
    foreach (array('sex', 'domicile_status', 'education', 'lang_pri', 'lang_lit', 'lang_edu', 'rite') as $field) {
        if ($data->{$field}) {
            $key = $field;
            if (preg_match('/^lang/', $field)) {
                $key = 'languages';
            }
            $data->{$field} = FieldNames::value($key, $data->{$field});
        }
    }
    ?>
</div>
<div class="fields">
<span class="head"><?php 
    echo CHtml::link($data->fullname() . ': #' . $data->id, array('/person/view', 'id' => $data->id));
    ?>
</span>

<?php 
    if ($data->profession or $data->occupation) {
        echo "<div>";
        if ($data->profession) {
            $ttxt = $data->occupation ? " title='{$data->profession} ( {$data->occupation} )'" : "";
Example #6
0
function format_mass($dt, $time, $lcode)
{
    $s = date_format(new DateTime($time), 'g:ia');
    $s .= ' ' . FieldNames::value('languages', $lcode);
    return $s;
}
Example #7
0
$pdf->AddPage();
$pdf->SetFont("times", "IU", 22);
$pdf->Cell(0, 6, "", 0, 1);
$pdf->Cell(0, 0, "Certificate", 0, 1, 'C');
$pdf->SetFont("times", "R", 16);
$pdf->Cell(0, 2, "", 0, 1);
$pdf->Cell(2, 0, '', 0, 0);
$member = $model->member;
function draw_line($pdf, $y = 20, $x1 = 8.5, $x2 = 16.0)
{
    $pdf->Line($x1, $y - 0.2, $x2, $y - 0.2, array('width' => 0.01, 'dash' => 3));
}
if ('child' == $member->role) {
    $rel = 'Male' === FieldNames::value('sex', $member->sex) ? 'son' : 'daughter';
    $rel_name = $member->family->head_name;
} elseif ('Female' == FieldNames::value('sex', $member->sex)) {
    $rel = 'wife';
    $husband = $member->family->husband;
    $rel_name = $husband->fullname();
}
if (isset($rel)) {
    $pdf->Cell(0, 1, "    This is to certify that " . sprintf("%-40s", $member->fname . " " . $member->lname) . ", {$rel} of", 0, 1, 'L');
    $pdf->Cell(2, 0, '', 0, 0);
    $pdf->Cell(0, 1, "    of " . sprintf("%-40s", $rel_name) . " belongs to my Parish and", 0, 1, 'L');
    draw_line($pdf, 11);
    $pdf->Cell(2, 0, '', 0, 0);
    $pdf->Cell(0, 0, "    is regular to Church services.", 0, 1, 'L');
    draw_line($pdf, 12, 4.3, 11.6);
} else {
    $pdf->Cell(0, 1, "    This is to certify that " . sprintf("%-40s", $member->fname . " " . $member->lname) . "", 0, 1, 'L');
    draw_line($pdf, 11);
<th>Language</th>
<?php 
if (Yii::app()->user->checkAccess('MassSchedule.Delete')) {
    ?>
	<th style="width:30px">Del</th>
<?php 
}
?>
</thead>

<?php 
foreach ($day_masses as $day => $masses) {
    $wday = FieldNames::value('weekdays', $day);
    $nm = count($masses);
    echo "<tr><th rowspan='{$nm}'>{$wday}</th>";
    foreach ($masses as $i => $mass) {
        if ($i > 0) {
            echo "<tr>";
        }
        echo "<td>" . CHtml::encode(date_format(new DateTime($mass['time']), 'g:i a')) . "</td><td>" . CHtml::encode(FieldNames::value('languages', $mass['language']));
        if (Yii::app()->user->checkAccess('MassSchedule.Delete')) {
            echo "</td><td>" . CHtml::link(CHtml::image(Yii::app()->request->baseUrl . '/images/del.png', 'Del'), array('/massSchedule/delete', 'id' => $mass['id']), array('class' => 'del'));
        }
        echo "</td></tr>";
    }
}
?>

</table>

 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new MarriageRecord('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['MarriageRecord'])) {
         $model->attributes = $_GET['MarriageRecord'];
     }
     if (isset($_GET['export'])) {
         Yii::trace("MarriageRecords.admin: Export to Excel", 'application.controllers.MarriageRecordsController');
         header("Content-Type: application/vnd.ms-excel; charset=utf-8");
         header("Content-Disposition: inline; filename=\"marriages-report.xls\"");
         $dataProvider = $model->search();
         $dataProvider->pagination = false;
         $fields = array('id', 'ref_no', 'groom_name', 'groom_dob', 'groom_baptism_dt', 'groom_status', 'groom_rank_prof', 'groom_fathers_name', 'groom_mothers_name', 'groom_residence', 'bride_name', 'bride_dob', 'bride_baptism_dt', 'bride_status', 'bride_rank_prof', 'bride_fathers_name', 'bride_mothers_name', 'bride_residence', 'marriage_dt', 'marriage_type', 'banns_licence', 'minister', 'witness1', 'witness2', 'groom_id', 'bride_id', 'remarks');
         $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 = 'marriage_type' == $field ? FieldNames::value('marriage_type', $data->{$field}) : $data->{$field};
                 array_push($fval, $val);
             }
             echo implode("\t", $fval) . "\n";
         }
         Yii::app()->end();
     }
     $this->render('admin', array('model' => $model));
 }
Example #10
0
if ($data->phone) {
    echo '<span class="phone">';
    echo '<span class="val">' . CHtml::encode($data->phone) . '</span>, ';
    echo '</span>';
}
if ($data->mobile) {
    echo '<span class="mobile">';
    echo '<span class="val">' . CHtml::encode($data->mobile) . '</span>';
    echo '</span>, ';
}
if ($data->email) {
    echo '<span class="email">';
    echo '<span class="val">' . CHtml::encode($data->email) . '</span>';
    echo '</span>, ';
}
echo 'Zone <span class="zone">' . FieldNames::value('zones', $data->zone) . '</span>, ';
?>

	<?php 
echo CHtml::encode('Code');
?>
:
	<span class="fid"><?php 
echo CHtml::encode($data->fid);
?>
</span>

	<?php 
if ($data->bpl_card) {
    echo ', <span class="bpl">BPL Card</span>';
}
Example #11
0
	<b><?php 
echo CHtml::encode($data->getAttributeLabel('id'));
?>
:</b>
	<?php 
echo CHtml::link(CHtml::encode($data->id), array('view', 'id' => $data->id));
?>
	<br />

	<b><?php 
echo CHtml::encode(FieldNames::value('pastor_role', $data->role));
?>
:</b>
	<?php 
echo CHtml::encode(FieldNames::value('salutation', $data->sal));
?>
	<?php 
echo CHtml::encode($data->fname);
?>
	<?php 
echo CHtml::encode($data->lname);
?>
	<br />

	<b><?php 
echo CHtml::encode($data->getAttributeLabel('mobile'));
?>
:</b>
	<?php 
echo CHtml::encode($data->mobile);
 public function testCreate()
 {
     $this->loginAs('pastor', 'pastor');
     $banns = array(array('groom_name' => 'Ronald Cornelius', 'groom_parish' => 'St. John the Evangelist', 'groom_parent' => 'Gerson Cornelius', 'bride_name' => 'Sally Victor', 'bride_parish' => 'Resurrection', 'bride_parent' => 'Brendon Victor', 'banns_dt1' => '05/01/2014', 'banns_dt2' => '12/01/2014', 'banns_dt3' => '19/01/2014'), array('groom_name' => 'Luigi', 'bride_name' => 'Nicole', 'banns_dt1' => '09/02/2014', 'banns_dt2' => '16/02/2014', 'banns_dt3' => '23/02/2014'), array('groom_name' => 'Gennaro', 'bride_name' => 'Marceline Platska', 'bride_parish' => 'Resurrection', 'bride_parent' => 'Augustine Platska', 'banns_dt1' => '09/02/2014', 'banns_dt2' => '16/02/2014', 'banns_dt3' => '23/02/2014'), array('groom_name' => 'Ignace Toppo', 'groom_parish' => 'Infant Jesus', 'groom_parent' => 'Raguel Toppo', 'bride_name' => 'Celine', 'banns_dt1' => '09/02/2014', 'banns_dt2' => '16/02/2014', 'banns_dt3' => '23/02/2014'));
     foreach ($banns as $bann) {
         $this->open('bannsRecords/create');
         if (!isset($bann['groom_parish'])) {
             $this->click("css=#groom_search > img");
             sleep(2);
             $this->type("id=key", $bann['groom_name']);
             $this->click('css=#find_match > input[name="yt0"]');
             sleep(1);
             $this->click("id=yw0_c0_0");
             sleep(1);
             $this->click("id=submitMatch");
             sleep(1);
             unset($bann['groom_name']);
         }
         if (!isset($bann['bride_parish'])) {
             $this->click("css=#bride_search > img");
             sleep(2);
             $this->type("id=key", $bann['bride_name']);
             $this->click('css=#find_match > input[name="yt0"]');
             sleep(1);
             $this->click("id=yw0_c0_0");
             sleep(1);
             $this->click("id=submitMatch");
             sleep(1);
             unset($bann['bride_name']);
         }
         foreach ($bann as $key => $value) {
             if (preg_match('/^sex$/', $key)) {
                 $this->select("name=BannsRecord[{$key}]", "value={$value}");
             } else {
                 $this->type("name=BannsRecord[{$key}]", $value);
             }
         }
         $this->clickAndWait("//input[@value='Create']");
         foreach ($bann as $key => $value) {
             if (preg_match('/^sex$/', $key)) {
                 $this->assertTextPresent(FieldNames::value('sex', $value));
             } else {
                 $this->assertTextPresent($value);
             }
         }
         if (isset($bann['groom_parish']) xor isset($bann['bride_parish'])) {
             $this->clickAndWait("link=Create Request Letter");
             foreach ($bann as $key => $value) {
                 $this->assertTextPresent($value);
             }
             $this->clickAndWait("link=View Record");
             foreach ($bann as $key => $value) {
                 $this->assertTextPresent($value);
             }
             $this->clickAndWait("link=Create Response Letter");
             foreach ($bann as $key => $value) {
                 $this->assertTextPresent($value);
             }
             $this->clickAndWait("link=View Record");
             foreach ($bann as $key => $value) {
                 $this->assertTextPresent($value);
             }
             $this->clickAndWait("link=Create No Impediment Letter");
             foreach ($bann as $key => $value) {
                 $this->assertTextPresent($value);
             }
             $this->clickAndWait("link=View Record");
             foreach ($bann as $key => $value) {
                 $this->assertTextPresent($value);
             }
         }
     }
 }
Example #13
0
 public function getFullname()
 {
     return implode(' ', array(FieldNames::value('salutation', $this->sal), $this->fname, $this->lname));
 }
$pdf->Cell(6, $ht, 'Time', 'RB', 0, 'C');
$pdf->Cell(6, $ht, 'Language', 'RB', 1, 'C');
foreach ($day_masses as $day => $masses) {
    $wday = FieldNames::value('weekdays', $day);
    $nm = count($masses);
    $pdf->Cell(1.5, 0, '', 0, 0, 'L');
    $pdf->Cell(4, $ht * $nm, $wday, 'LRB', 0, 'C');
    $border = 'R';
    $nxtpref = 5.5;
    foreach ($masses as $i => $mass) {
        if ($i == $nm - 1) {
            $border = 'RB';
            $nxtpref = 0;
        }
        $pdf->Cell(6, $ht, date_format(new DateTime($mass['time']), 'g:i a'), $border, 0, 'C');
        $pdf->Cell(6, $ht, FieldNames::value('languages', $mass['language']), $border, 1, 'C');
        if ($nxtpref > 0) {
            $pdf->Cell($nxtpref, 0, '', 0, 0, 'L');
        }
    }
}
$pdf->SetFontSize(14);
$pdf->SetLineStyle(array('width' => 0.01, 'dash' => 3));
$pdf->Cell(1, 0.4, '', 0, 1, 'L');
$pdf->Cell(1.0, 0, '', 0, 0, 'L');
$pdf->Cell(2.5, 1, 'Adoration', 0, 0, 'L');
$pdf->Cell(10, 1, '', 'B', 1);
$pdf->Cell(1.0, 0, '', 0, 0, 'L');
$pdf->Cell(2.5, 1, 'Confession', 0, 0, 'L');
$pdf->Cell(10, 1, '', 'B', 1);
$pdf->Cell(1.0, 0, '', 0, 0, 'L');
Example #15
0
 protected function _testMember($role, $member)
 {
     $this->assertTextPresent($role);
     $this->click("link={$role}");
     $this->assertTextPresent($member['dob']);
     $this->assertTextPresent($member['baptism_dt']);
     if (isset($member['marriage_dt'])) {
         $this->assertTextPresent($member['marriage_dt']);
     }
     $url = $this->getLocation();
     $this->clickAndWait("link=" . $member['fname'] . ' ' . $member['lname'] . ': #*');
     foreach (array('mobile', 'profession', 'occupation', 'baptism_church', 'baptism_place', 'god_parents', 'cemetery_church') as $fld) {
         if (isset($member[$fld]) and $member[$fld]) {
             $this->assertTextPresent($member[$fld]);
         }
     }
     foreach (array('lang_pri', 'lang_lit', 'lang_edu') as $fld) {
         if (isset($member[$fld])) {
             $val = FieldNames::value('languages', $member[$fld]);
             $this->assertTextPresent($val);
         }
     }
     $this->open($url);
 }
 public function testCreateParishioner()
 {
     $this->loginAs('pastor', 'pastor');
     $marriages = array(array('groom' => array('groom_name' => 'Luigi', 'groom_status' => 1, 'groom_rank_prof' => 'Engineer', 'groom_residence' => 'Bangalore'), 'bride' => array('bride_name' => 'Nicole', 'bride_status' => 1, 'bride_rank_prof' => 'Housewife', 'bride_residence' => 'Bangalore'), 'marriage_dt' => '15/12/2010', 'marriage_type' => 1, 'banns_licence' => 'banns', 'minister' => 'Fr. Marcion', 'witness1' => 'Sam Lopez', 'witness2' => 'Gregory Peron', 'remarks' => ''));
     foreach ($marriages as $marriage) {
         $this->open('marriageRecords/create');
         $groom_details = $marriage['groom'];
         $this->click("css=#groom_search > img");
         sleep(2);
         $this->type("id=key", $groom_details['groom_name']);
         $this->click('css=#find_match > input[name="yt0"]');
         sleep(1);
         $this->click("id=yw0_c0_0");
         sleep(1);
         $this->click("id=submitMatch");
         sleep(1);
         foreach ($groom_details as $key => $value) {
             if ('groom_name' === $key) {
                 continue;
             }
             if (preg_match('/^groom_status$/', $key)) {
                 $this->select("name=MarriageRecord[{$key}]", "value={$value}");
             } else {
                 $this->type("name=MarriageRecord[{$key}]", $value);
             }
         }
         unset($marriage['groom']);
         $this->click('link=Bride Details');
         $bride_details = $marriage['bride'];
         $this->click("css=#bride_search > img");
         sleep(2);
         $this->type("id=key", $bride_details['bride_name']);
         $this->click('css=#find_match > input[name="yt0"]');
         sleep(1);
         $this->click("id=yw0_c0_0");
         sleep(1);
         $this->click("id=submitMatch");
         sleep(1);
         foreach ($bride_details as $key => $value) {
             if ('bride_name' === $key) {
                 continue;
             }
             if (preg_match('/^bride_status$/', $key)) {
                 $this->select("name=MarriageRecord[{$key}]", "value={$value}");
             } else {
                 $this->type("name=MarriageRecord[{$key}]", $value);
             }
         }
         unset($marriage['bride']);
         foreach ($marriage as $key => $value) {
             if (preg_match('/^(?:marriage_type|banns_licence)$/', $key)) {
                 $this->select("name=MarriageRecord[{$key}]", "value={$value}");
             } else {
                 $this->type("name=MarriageRecord[{$key}]", $value);
             }
         }
         $this->clickAndWait("//input[@value='Create']");
         $this->spouse_test($groom_details);
         $this->spouse_test($bride_details);
         foreach ($marriage as $key => $value) {
             if ('banns_licence' == $key) {
                 $value = ucfirst($value);
             }
             if (preg_match('/^(?:marriage_type)$/', $key)) {
                 $this->assertTextPresent(FieldNames::value('marriage_type', $value));
             } else {
                 $this->assertTextPresent($value);
             }
         }
         $this->clickAndWait("//input[@value='Create Certificate']");
         $this->spouse_test($groom_details);
         $this->spouse_test($bride_details);
         foreach ($marriage as $key => $value) {
             if ('banns_licence' == $key) {
                 $value = ucfirst($value);
             }
             if (preg_match('/^(?:marriage_type)$/', $key)) {
                 $this->assertTextPresent(FieldNames::value('marriage_type', $value));
             } else {
                 $this->assertTextPresent($value);
             }
         }
         $this->assertTextPresent(date('d/m/Y'));
         $this->assertElementPresent("link=Download Certificate");
     }
 }
Example #17
0
	<b><?php 
echo CHtml::encode($data->getAttributeLabel('visit_dt'));
?>
:</b>
	<?php 
echo CHtml::encode($data->visit_dt);
?>
	<br />

	<b><?php 
echo CHtml::encode($data->getAttributeLabel('purpose'));
?>
:</b>
	<?php 
echo CHtml::encode(FieldNames::value('visit_purpose', $data->purpose));
?>
	<br />

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


</div>
Example #18
0
    $pdf->Cell(0, 0.7, sprintf("%-20s: %s", strtoupper($label), strtoupper($value)), 0, 1, 'L');
    draw_line($pdf);
}
show_field($pdf, "Date of Marriage", $marriage->marriage_dt);
show_field($pdf, "Name of Bridegroom", $marriage->groom_name);
show_field($pdf, "DATE OF BIRTH/AGE", $marriage->groom_dob);
show_field($pdf, "Groom Baptism Date", $marriage->groom_baptism_dt);
show_field($pdf, "Status", FieldNames::value('marital_status', $marriage->groom_status));
show_field($pdf, "Rank or Profession", $marriage->groom_rank_prof);
show_field($pdf, "Name of father", $marriage->groom_fathers_name);
show_field($pdf, "name of mother", $marriage->groom_mothers_name);
show_field($pdf, "residence", $marriage->groom_residence);
show_field($pdf, "Name of Bride", $marriage->bride_name);
show_field($pdf, "DATE OF BIRTH/AGE", $marriage->bride_dob);
show_field($pdf, "Bride Baptism Date", $marriage->bride_baptism_dt);
show_field($pdf, "Status", FieldNames::value('marital_status', $marriage->bride_status));
show_field($pdf, "Rank or Profession", $marriage->bride_rank_prof);
show_field($pdf, "Name of father", $marriage->bride_fathers_name);
show_field($pdf, "name of mother", $marriage->bride_mothers_name);
show_field($pdf, "residence", $marriage->bride_residence);
show_field($pdf, "by banns or licence", $marriage->banns_licence);
show_field($pdf, "minister", $marriage->minister);
show_field($pdf, "Witness 1", $marriage->witness1);
show_field($pdf, "Witness 2", $marriage->witness2);
show_field($pdf, 'Remarks', $marriage->remarks);
draw_line($pdf);
$pdf->SetFont("courier", "R", 9);
$pdf->Cell(0, 1, '', 0, 1);
$pdf->Cell(0, 0, 'I CERTIFY THAT THE ABOVE IS A TRUE COPY OF AN ENTRY IN THE REGISTER', 0, 1, 'C');
$pstr = strtoupper($parish->name . ", " . $parish->city);
$pdf->Cell(0, 0, "OF MARRIAGES KEPT AT {$pstr}", 0, 1, 'C');
Example #19
0
    $src = Yii::app()->request->baseUrl . $photo_path;
    list($width, $height) = getimagesize(".{$photo_path}");
    $label = 'Upload Photo';
}
$alt = $model->fname . "'s photo";
echo CHtml::image($src, $alt, array('width' => $width, 'height' => $height));
echo "<p>";
echo CHtml::link($label, array('photo', 'id' => $model->id));
echo "</p>";
foreach (array('sex', 'domicile_status', 'education', 'lang_pri', 'lang_lit', 'lang_edu', 'rite') as $field) {
    if ($model->{$field}) {
        $key = $field;
        if (preg_match('/^lang/', $field)) {
            $key = 'languages';
        }
        $model->{$field} = FieldNames::value($key, $model->{$field});
    }
}
?>
</div>
<div class="fields">
<?php 
if ($model->profession or $model->occupation) {
    echo "<div>";
    if ($model->profession) {
        echo "<span class='val'>" . $model->profession . "</span>";
        if ($model->occupation) {
            echo " (<span class='val'>" . $model->occupation . "</span>)";
        }
    } else {
        echo "<span class='val'>" . $model->occupation . "</span>";
Example #20
0
#
# Alive Parish - software to manage tomorrow's parish
# Copyright (C) 2013  Redemptorist Media Center
#
# Alive Parish Software is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# Alive Parish Software is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
/* @var $this VisitController */
/* @var $model Visits */
$this->breadcrumbs = array('Visits' => array('index'), $model->id);
$this->menu = array(array('label' => 'List Visits', 'url' => array('index')), array('label' => 'Create Visits', 'url' => array('create')), array('label' => 'Update Visits', 'url' => array('update', 'id' => $model->id)), array('label' => 'Delete Visits', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure you want to delete this item?')), array('label' => 'Manage Visits', 'url' => array('admin')));
?>

<h1>View Visits #<?php 
echo $model->id;
?>
</h1>

<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('id', array('label' => 'Pastor', 'name' => 'pastor_id', 'value' => Pastors::model()->findByPk($model->pastor_id)->fullname), 'visit_dt', array('label' => 'Purpose', 'name' => 'purpose', 'value' => FieldNames::value('visit_purpose', $model->purpose)))));
echo CHtml::link('View Family', array('/family/view', 'id' => $model->family_id));
Example #21
0
if ($data->isRelevantDate) {
    $masses = $this->getMasses($data->date);
    $class = "";
    $title = "";
    if ($feast = $this->isSpecialMass($data->date)) {
        $class = "special";
        $title = "title='{$feast}'";
    }
    echo "<div class='mass {$class}'>";
    echo "<div class='left'>";
    foreach ($masses as $i => $mass) {
        if ($i == 5) {
            echo "</div><div class='right'>";
        }
        $text = date_format(new DateTime($mass->time), 'g:ia') . '&nbsp;' . '&nbsp;';
        $lang = FieldNames::value('languages', $mass->language);
        $bookings = $this->getMassBookings($data->date, $mass->id);
        $ttip = null;
        foreach ($bookings as $bkg) {
            if (isset($ttip)) {
                $ttip .= '&#10;' . $bkg->type . ': ' . $bkg->intention;
            } else {
                $ttip = '&#10;' . $bkg->type . ': ' . $bkg->intention;
            }
        }
        if (isset($ttip)) {
            echo "<a class='mass booked' title='{$lang} {$ttip}' onclick='js:return confirm(" . '"Mass already booked. Still want to book?"' . ")' ";
        } else {
            echo "<a class='mass' title='{$lang}' ";
        }
        if ($data->date > new DateTime()) {
Example #22
0
	</div>

	<div class="marriage">
		Married <span class="dt"><?php 
echo CHtml::encode($data->marriage_date);
?>
</span> at 
			<span class="church"><?php 
echo CHtml::encode($data->marriage_church);
?>
</span>.
			Type: <span class="type"><?php 
echo CHtml::encode(FieldNames::value('marriage_type', $data->marriage_type));
?>
</span>, 
			Status: <span class="status"><?php 
echo CHtml::encode(FieldNames::value('marriage_status', $data->marriage_status));
?>
</span>
	</div>
	
	<?php 
if ($data->monthly_income) {
    echo '<span class="label">' . CHtml::encode($data->getAttributeLabel('monthly_income')) . ': </span>';
    echo '<span class="income">' . CHtml::encode(FieldNames::value('monthly_household_income', $data->monthly_income)) . '</span>';
}
?>


</div>