{ $now = date('Y'); $query = "SELECT max(idbcf15) as maxID FROM bcf15 where tahun='{$now}'"; $hasil = mysql_query($query); $data = mysql_fetch_array($hasil); $idMax = $data['maxID']; $querybcfbaru = "SELECT * FROM bcf15 where idbcf15='{$idMax}' "; $hasilbcfbaru = mysql_query($querybcfbaru); $databcfbaru = mysql_fetch_array($hasilbcfbaru); $bcfbaru = $databcfbaru['bcf15no']; $noUrut = (int) substr($bcfbaru, 0, 6); $noUrut++; $id = sprintf("%06s", $noUrut); return $id; } $bcf15nobaru = newID(); ?> </td> </tr>--> <tr align="center"> <td height="22" colspan="4" bgcolor="#84B9D5" class="HEAD"><b>Input BCF 15</b> </td> </tr> <tr> <td height="20" align="center" colspan="4" bgcolor="#dfe9ff"><b>BCF 1.5</b></td> </tr> <tr><td colspan="4"> <?php $sql = "select idbcf15, bcf15no, DATE_FORMAT(bcf15tgl,'%Y') as bcf15tgl,Pecahpos,tahun from bcf15 where Pecahpos='2' order by idbcf15 desc limit 0,1"; $qry = @mysql_query($sql) or die("Gagal query"); $data = mysql_fetch_array($qry);
} return true; } return -1; } return false; } function flag() { global $admin; if ($admin) { echo "Welcome admin, flag is: " . FLAG . "<br/>\n"; } else { echo "You are just a crap :((<br/>\n"; } } $t = lolsession_start(); if ($t == true) { flag(); } else { if (array_key_exists('user', $_POST) and array_key_exists('pass', $_POST)) { session_id(newID()); session_start(); flag(); } else { if ($t == -1) { echo "kotu seyler oldu sanirim :((<br/>\n"; } echo $loginform; } }