<?php

$this->layout = "no_layout";
$currentBarangayModel = BarangayInfo::model()->find();
$baseUrl = Yii::app()->theme->baseUrl;
?>
<!DOCTYPE html>
<html>
<body>
<table width="100%">
	<tbody>
		<tr>
			<td style="text-align: right;"><img src="<?php 
echo 'data:image/png;base64,' . base64_encode(file_get_contents(Yii::getPathOfAlias("application") . '/../themes/abound/img/barangaylogo.png'));
?>
"></td>
			<td>
				<div>
					Republic of the Philippines <br>
					Province of <?php 
echo ucfirst($currentBarangayModel->province);
?>
 <br>
					Municipality of <?php 
echo ucfirst($currentBarangayModel->municipality);
?>
 <br>
					<strong>BARANGAY <?php 
echo strtoupper($currentBarangayModel->barangay);
?>
</strong> <br></td>
 /**
  * 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 BarangayInfo the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = BarangayInfo::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
 public function actionVisionMission()
 {
     $model = BarangayInfo::model()->find();
     if (!$model) {
         throw new CHttpException(404, "Cant find Barangay Information . Please run the migration to import default barangay information or contact the developers.");
     }
     $vision = $model->vision;
     $mission = $model->mission;
     $this->render('visionMission', compact('vision', 'mission'));
 }