Exemple #1
0
 public function series($noMonth)
 {
     $officials = Officials::model()->findAll(array('condition' => 'now() >= start_date and now() <= end_date', 'order' => 'off_id asc'));
     $resolutions = Resolution::model()->findAll(array('condition' => 'date_passed like "' . date('Y') . '-' . $noMonth . '%"'));
     $series = array();
     $off = array();
     $off2 = array();
     $x = 0;
     foreach ($officials as $v) {
         $off2[$v->off_id] = 0;
         $x++;
     }
     foreach ($officials as $val) {
         array_push($off, $val->off_id);
     }
     foreach ($resolutions as $reso) {
         $temp_reso = explode(',', $reso->author);
         foreach ($off as $val) {
             if (in_array($val, $temp_reso)) {
                 $off2[$val]++;
             }
         }
     }
     foreach ($off2 as $values => $key) {
         $temp = array('name' => Officials::model()->findByPK($values)->Fullname, 'data' => array($key));
         array_push($series, $temp);
     }
     return $series;
 }
            <td style="text-align:center; width:35%;">Subject Matter</td>
            <td style="text-align:center; width:20%;">Author</td>
            <td style="text-align:center; width:20%;">Origin</td>
            <td style="text-align:center; width:15%;">Date Passed</td>
        </tr>
        </thead>';
    $b = 1;
    foreach ($details as $values) {
        $pdf->SetFont('helvetica', '', 8);
        $tbl .= '<tr style="width:100%;" nobr="true">';
        $tbl .= '<td style="text-align:center; width:10%;">' . $values['res_no'] . '</td>';
        $tbl .= '<td style="text-align:left;width:35%;">' . $values->subj_matter . '</td>';
        $x = explode(',', $values['author']);
        $auth_name = '';
        foreach ($x as $y) {
            $auth = Officials::model()->findByPK($y);
            $auth_name = $auth->Fullname . '<br/>' . $auth_name;
        }
        $orig = !empty($values->ctrlNo->ctrlNo->orig->orig_name) ? $values->ctrlNo->ctrlNo->orig->orig_name : 'No Origin';
        $tbl .= '<td style="text-align:center;width:20%;">' . $auth_name . '</td>';
        $tbl .= '<td style="text-align:center;width:20%;">' . $orig . '</td>';
        $tbl .= '<td style="text-align:center;width:15%;">' . $values->date_passed . '</td>';
        $tbl .= '</tr>';
    }
    $tbl .= '</table></div>';
    $pdf->writeHTML($tbl, true, false, false, false, '');
} else {
    $pdf->Ln(15);
    $pdf->Write(0, 'No Resolutions for the Year ' . $start_year . ' to ' . $end_year, '', 0, 'C', true, 0, false, false, 0);
}
// reset pointer to the last page
Exemple #3
0
	<?php 
echo $form->errorSummary($model);
?>

	<?php 
echo $form->textFieldRow($model, 'ord_no', array('class' => 'span2', 'value' => '', 'placeholder' => '000 - 0000'));
?>
    
  <?php 
echo $form->textAreaRow($model, 'subj_matter', array('class' => 'span6', 'rows' => 5, 'value' => ''));
?>
 

	<?php 
echo $form->select2Row($model, 'author', array('asDropDownList' => true, 'data' => CHtml::listData(Officials::model()->findAll(array('condition' => 'now() >= start_date')), 'off_id', 'Fullname'), 'multiple' => 'multiple', 'options' => array('width' => '63%', 'placeholder' => '        ------------ Choose Author ------------', 'tokenSeparators' => array(',', ' '))));
?>

    <?php 
echo $form->select2Row($model, 'imp_agency', array('asDropDownList' => true, 'data' => CHtml::listData(Agency::model()->findAll(), 'agency_id', 'agency_name'), 'multiple' => 'multiple', 'options' => array('width' => '63%', 'placeholder' => '        ------------ Choose Agency ------------', 'tokenSeparators' => array(',', ' '))));
?>
  <?php 
echo $form->textFieldRow($model, 'amend', array('class' => 'span2', 'value' => ''));
?>
  <?php 
echo $form->datepickerRow($model, 'firstreading', array('prepend' => '<i class="icon-calendar"></i>', 'options' => array('format' => 'yyyy-mm-dd')));
?>
	<?php 
echo $form->datepickerRow($model, 'secondreading', array('prepend' => '<i class="icon-calendar"></i>', 'options' => array('format' => 'yyyy-mm-dd')));
?>
  <?php 
Exemple #4
0
?>

	<?php 
echo $form->textFieldRow($model, 'shortname', array('size' => 50, 'maxlength' => 50));
?>

	<?php 
echo $form->dropDownListRow($model, 'chairman', CHtml::listData(Officials::model()->findAll(array('condition' => 'start_date <= now() and end_date >= now()')), 'off_id', 'Fullname'), array('prompt' => '---------- Choose Chairman ----------', 'class' => 'span4'));
?>

	<?php 
echo $form->dropDownListRow($model, 'v_chairman', CHtml::listData(Officials::model()->findAll(array('condition' => 'start_date <= now() and end_date >= now()')), 'off_id', 'Fullname'), array('prompt' => '---------- Choose Vice Chairman ----------', 'class' => 'span4'));
?>

	<?php 
echo $form->select2Row($model, 'members', array('asDropDownList' => true, 'data' => CHtml::listData(Officials::model()->findAll(array('condition' => 'start_date <= now() and end_date >= now()')), 'off_id', 'Fullname'), 'multiple' => 'multiple', 'class' => 'span4', 'options' => array('placeholder' => '        ------------ Choose Members ------------', 'tokenSeparators' => array(',', ' '))));
?>
<br/>
<br/>
	<div class="form-actions">
	<?php 
$this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'primary', 'label' => 'Search'));
?>
             </div>
</div>

<?php 
$this->endWidget();
?>
    <?php 
$this->endWidget();
 /**
  * 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 Officials the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Officials::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Exemple #6
0
 public function getAuthorView()
 {
     $x = explode(',', $this->author);
     $names = '';
     foreach ($x as $value) {
         $criteria = new CDbCriteria();
         $criteria->condition = 'off_id=:postID';
         $criteria->params = array(':postID' => $value);
         $auth = Officials::model()->find($criteria);
         $names = '(' . $auth->Fullname . ')' . $names;
     }
     return $names;
 }
    // 2010-05-01, 2010-05-02, etc
}
$box = $this->beginWidget('bootstrap.widgets.TbBox', array('title' => 'Choose Board Member and Year', 'headerIcon' => 'icon-th-list', 'htmlOptions' => array('class' => 'bootstrap-widget-table', 'style' => 'width:853px;')));
?>

<br>
<div class="span8">
<div class="well form-inline">

    <?php 
echo CHtml::beginForm();
?>
    <div style="alignment-baseline:5px; ">  
        <label>Author Name: </label>
        <?php 
$this->widget('bootstrap.widgets.TbSelect2', array('name' => 'auth_name', 'data' => CHtml::listData(Officials::model()->findAll(), 'off_id', 'fullname'), 'asDropDownList' => true));
?>
        
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <?php 
echo CHtml::htmlButton('<i class="icon-search icon-white"></i> Search', array('class' => 'btn btn-success', 'type' => 'submit', 'name' => 'searchButton'));
?>
         <br/>
        <br/>
        <label>Year : </label>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <?php 
$this->widget('bootstrap.widgets.TbSelect2', array('name' => 'year', 'data' => $x, 'asDropDownList' => true, 'htmlOptions' => array('style' => 'width:20%;')));
?>
    </div>
    <?php 
Exemple #8
0
 public function getCMembers()
 {
     $x = explode(',', $this->members);
     $result = null;
     foreach ($x as $key) {
         $result = $result . '(' . Officials::model()->findByPK($key)->Fullname . ')';
     }
     return $result;
 }
Exemple #9
0
	<?php 
echo $form->dropDownListRow($model, 'res_no', CHtml::listData(Resolution::model()->findAll(), 'res_no', 'res_no'), array('class' => 'span3', 'empty' => 'Choose Resolution No.'));
?>
    
	<?php 
//echo $form->textFieldRow($model, 'res_no', array('class'=>'span4'));
?>
 
	<?php 
echo $form->textFieldRow($model, 'subj_matter', array('class' => 'span4'));
?>
 

	<?php 
echo $form->select2Row($model, 'author', array('asDropDownList' => true, 'data' => CHtml::listData(Officials::model()->findAll(''), 'off_id', 'Fullname'), 'multiple' => 'multiple', 'data-placeholder' => '       ------------ Select Author ------------', 'options' => array('width' => '40%')));
?>
    <?php 
echo $form->datepickerRow($model, 'date_passed', array('prepend' => '<i class="icon-calendar"></i>', 'options' => array('format' => 'yyyy-mm-dd')));
?>
                                                            	

	<div class="form-actions">
	<?php 
$this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'primary', 'label' => 'Search', 'icon' => 'icon-search icon-white'));
?>
             </div>
</div>

<?php 
$this->endWidget();