Server IP : 103.233.192.212 / Your IP : 18.117.167.132 Web Server : Apache/2 System : Linux sv1.inde.co.th 3.10.0-1160.36.2.el7.x86_64 #1 SMP Wed Jul 21 11:57:15 UTC 2021 x86_64 User : sumpatuan ( 1058) PHP Version : 5.5.38 Disable Function : symlink,shell_exec,exec,proc_close,proc_open,popen,system,dl,putenv,passthru,escapeshellarg,escapeshellcmd,pcntl_exec,proc_get_status,proc_nice,proc_terminate,pclose,ini_alter,virtual,openlog,ini_restore MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/sumpatuan/domains/sumpatuan.go.th/private_html/backup/protected/views/main/about/ |
Upload File : |
<?php $model = new tbVillage(); $model = $model->findAll(); $criteria = new CDbCriteria(); $criteria->select = 'SUM(village_family) AS village_family, SUM(village_male) AS village_male, SUM(village_female) AS village_female, SUM(village_total) AS village_total'; $resultSum = tbVillage::model()->find($criteria); // date village update $criteria = new CDbCriteria(); $criteria->compare('config_name', 'date_village_update'); $modelConfig = tbConfig::model()->find($criteria); ?> <script type="text/javascript"> $(function() { $(".table-village tr:odd").css('background-color','#f3f3f3'); $(".table-village tr:even").css('background-color','white'); }) </script> <table class="table-show-content"> <tr> <div class="divVillageUpdate"> <i class="icon-time"></i> <label class="divVillageUpdate-label">วันที่ปรับปรุงข้อมูลล่าสุด : <?php echo OtherFunction::DateThai($modelConfig->config_value); ?></label> </div> </tr> <tr> <td> <table class="table-show-content table-village" border="1" width="100%;"> <tr style="background-color: #5BA3C9 !important;"> <th width="250" style="padding: 10px;">ชื่อหมู่บ้าน</th> <th width="100">ครัวเรือน</th> <th width="70">ชาย</th> <th width="70">หญิง</th> <th width="100">รวม</th> <th>-</th> </tr> <?php foreach ($model as $value): ?> <tr> <td style="padding-left: 10px;"><?php echo $value->village_name; ?></td> <td class="table-village-right"><?php echo number_format($value->village_family); ?></td> <td class="table-village-right"><?php echo number_format($value->village_male); ?></td> <td class="table-village-right"><?php echo number_format($value->village_female); ?></td> <td class="table-village-right" style="font-weight: bold;"><?php echo number_format($value->village_total); ?></td> <td style="font-weight: bold;">คน</td> </tr> <?php endforeach; ?> <tr> <td style="text-align: right; background-color: #bbb;"> <span style="font-weight: bold;">ข้อมูลรวม :</span> </td> <td class="table-village-footer"><?php echo number_format($resultSum->village_family); ?></td> <td class="table-village-footer"><?php echo number_format($resultSum->village_male); ?></td> <td class="table-village-footer"><?php echo number_format($resultSum->village_female); ?></td> <td class="table-village-footer"><?php echo number_format($resultSum->village_total); ?></td> <td style="font-weight: bold;">คน</td> </tr> </table> </td> </tr> </table>