function is_published($kode) { $oposition = xposition("published", "kode = '" . $kode . "'"); $nposition = mysql_num_rows($oposition); if ($nposition > 0) { $position = mysql_fetch_array($oposition); $published = $position['published']; if ($published == "1") { $is_published = true; } else { $is_published = false; } } else { $is_published = false; } return $is_published; }
<td><input type="text" name="name" size="40" value="<?php echo $menuname; ?> " /></td> </tr> <tr> <td class="key">Judul</td> <td><input type="text" name="title" size="40" value="<?php echo $judul; ?> " /></td> </tr> <tr> <td class="key">Tipe</td> <td><?php $oposition = xposition("kode, name"); $nposition = mysql_num_rows($oposition); if ($nposition > 0) { while ($xposition = mysql_fetch_array($oposition)) { ?> <input type="checkbox" name="<?php echo $xposition['kode']; ?> " value="<?php echo $xposition['kode']; ?> " <?php if (in_array($xposition['kode'], $positionname)) { echo "checked=\"checked\""; }