public function getMetaDescriptionParts($preset = false) { if ($this->getData('kadencja_id')) { $output[] = 'Kadencja ' . romanic_number($this->getData('kadencja_id')); } return $output; }
</select> </div> <div class="col-md-4"> <select class="form-control" id="semester_select"><option value="0">Select</option> <?php for ($i = 1; $i <= 8; $i++) { echo '<option value="' . $i . '">' . romanic_number($i) . '</option>' . PHP_EOL; } ?> </select> </div> <div class="col-md-4"> <select class="form-control" id="section_select"><option value="0">Select</option> <?php for ($i = 1; $i <= 3; $i++) { echo '<option value="' . $i . '">' . romanic_number($i) . '</option>' . PHP_EOL; } ?> </select> </div> </div> </form> </div> <div class="row" id="submit_message"></div> </div> <hr> <div class="col-md-12"> <div class="table-responsive"> <table class="table table-bordered"> <thead> <tr>
<td class="center"><?php echo $data->jumlah_kk; ?> </td> <td class="center"><?php echo $data->jumlah_penduduk; ?> </td> <tr> <?php } ?> </table> <br/> <br/> <table style="max-width:300px;"> <tr> <td> Ket :<br/> Pendidikan Terakhir<br/> <?php foreach ($pendidikan_terakhir as $_pk) { echo "<div style='float:left;width:60px;'>" . romanic_number($_pk->id) . "</div>:" . $_pk->nama . "<br/>"; } ?> </td> </tr> </table> </body> </html>
<?php /*Sample code to read in test cases: $fh = fopen($argv[1], "r"); while (true) { $test = fgets($fh); # break loop if $test is an empty line # $test represents the test case, do something with it } */ function romanic_number($integer) { $table = array('M' => 1000, 'CM' => 900, 'D' => 500, 'CD' => 400, 'C' => 100, 'XC' => 90, 'L' => 50, 'XL' => 40, 'X' => 10, 'IX' => 9, 'V' => 5, 'IV' => 4, 'I' => 1); $return = ''; while ($integer > 0) { foreach ($table as $rom => $arb) { if ($integer >= $arb) { $integer -= $arb; $return .= $rom; break; } } } return $return; } $fh = fopen($argv[1], "r"); while (!feof($fh)) { $num = trim(fgets($fh)); echo romanic_number($num); echo "\n"; }
<div class="col-lg-offset-1 col-lg-9"> <h4><?php echo $language->get('STATS_VEHICLE_VEHICLES_HEADLINE'); ?> </h4> <div class="vehicles-scrollbox"> <table class="table"> <?php foreach ($vehicles as $vehicle) { $vehicleInfo = $tankInfo->{$vehicle->tank_id}; ?> <tr> <td> <div class="vehicle-wrapper"> <span class="level"><?php echo romanic_number((int) $vehicleInfo->level); ?> </span> <img src="<?php echo $vehicleInfo->image_small; ?> " alt="<?php echo $vehicleInfo->short_name_i18n; ?> " /> </div> <span class="name"><?php echo $vehicleInfo->name_i18n; ?> </span>
function naikOrTinggalkelas($id_siswa, $id_kelas, $id_ta_berikutnya) { $kelascurrentq = $this->db->query('SELECT * FROM ak_kelas WHERE id=? AND publish=1 ', array($id_kelas)); $kelascurrent = $kelascurrentq->result_array(); $query = $this->db->query('SELECT adj.*, ak.kelas, ak.nama as nama_kelas, aj.nama as jurusan FROM ak_det_jenjang adj JOIN ak_kelas ak JOIN ak_jurusan aj ON ak.id=adj.id_kelas AND aj.id=ak.id_jurusan WHERE adj.id_sekolah=? AND adj.id_siswa=? AND adj.id_ta=? AND ak.publish=1 ', array($this->session->userdata['user_authentication']['id_sekolah'], $id_siswa, $id_ta_berikutnya)); $kenaikan = $query->result_array(); if (!empty($kenaikan)) { if ($kelascurrent[0]['kelas'] == $kenaikan[0]['kelas']) { //$kenaikannya['statusnaik']='Tinggal di kelas '.$kelascurrent[0]['kelas'].''.$kelascurrent[0]['nama'].''; $kenaikannya['statusnaik'] = 'Tinggal di kelas ' . romanic_number($kelascurrent[0]['kelas']) . ' (' . Terbilang($kenaikan[0]['kelas']) . ' )'; } else { //$kenaikannya['statusnaik']='Naik ke kelas '.$kenaikan[0]['kelas'].''.$kenaikan[0]['nama_kelas'].''; $kenaikannya['statusnaik'] = 'Naik ke kelas ' . romanic_number($kenaikan[0]['kelas']) . ' (' . Terbilang($kenaikan[0]['kelas']) . ' )'; } $kenaikannya['data'] = $kenaikan; return $kenaikannya; } else { $querylulusan = $this->db->query('SELECT adj.*, ak.kelas, ak.nama as nama_kelas, aj.nama as jurusan FROM ak_det_jenjang adj JOIN ak_kelas ak JOIN ak_jurusan aj ON ak.id=adj.id_kelas AND aj.id=ak.id_jurusan WHERE adj.id_sekolah=? AND adj.id_siswa=? AND adj.id_ta=? AND ak.publish=1 ', array($this->session->userdata['user_authentication']['id_sekolah'], $id_siswa, $this->session->userdata['ak_setting']['ta'])); $kelulusan = $querylulusan->result_array(); if ($kelulusan[0]['kelulusan'] == 1) { $kelulusannya['statuslulus'] = 'LULUS'; } elseif ($kelulusan[0]['kelulusan'] == 0) { $kelulusannya['statuslulus'] = 'TIDAK LULUS'; } elseif ($kelulusan[0]['kelulusan'] == 2) { $kelulusannya['statuslulus'] = 'BELUM LULUS'; } $kelulusannya['data'] = $kelulusan; return $kelulusannya; } }