<?php checkauthentication(); $table = "sifatsurat"; $h = ekstrak_get($get[1]); $q = ekstrak_get($get[2]); $omenu = xmenu("parent", "id = '" . $p . "'"); $xmenu = mysql_fetch_array($omenu); $p_next = $xmenu['parent'] . "&h=" . $h; $sql = sql_delete($table, "IdSifat", $q); $query = mysql_query($sql); if ($query == 1) { $msg = "Hapus sifat surat berhasil. Id = " . $q . "."; update_log($msg, $table, $susername, 1); $_SESSION['errmsg'] = $msg; } else { $msg = "Hapus sifat surat gagal. Id = " . $q . "."; update_log($msg, $table, $susername, 0); $_SESSION['errmsg'] = $msg; } ?> <meta http-equiv="refresh" content="0;URL=index.php?p=<?php echo enkripsi($p_next); ?> "><?php exit;
function get_list_link($p) { $xmenu = xmenu_id($p); $type = $xmenu->type; if ($type == "sub") { $parent = $xmenu->parent; } else { $parent = $p; } $rs = xmenu("parent='" . $parent . "' AND action='ls'"); $link = mysql_fetch_object($rs); return $link->id; }
</dd> </dl><?php } if (is_published("submenu")) { ?> <div id="submenu-box"> <div class="t"><div class="t"><div class="t"></div></div></div> <div class="m"> <ul id="submenu"><?php if ($xmenu['parent'] != "") { $parent = $xmenu['parent']; $id = $xmenu['id']; $link = ""; while ($parent != "") { $omenu2 = xmenu("id, name, parent, src", "id = '" . $id . "'"); $xmenu2 = mysql_fetch_array($omenu2); if ($xmenu2['parent'] != "") { $link = "<li><a href=\"index.php?p=" . enkripsi($xmenu2['id']) . "\">" . $xmenu2['name'] . "</a></li>" . $link; } else { $link = "<li><a href=\"index.php\">" . $xmenu2['name'] . "</a></li>" . $link; } $parent = $xmenu2['parent']; $id = $xmenu2['parent']; } echo $link; } else { echo " "; } ?>
$class = "row0"; } else { $class = "row1"; } ?> <tr class="<?php echo $class; ?> "> <td align="center"><?php echo $i + 1; ?> </td> <td><?php $ochild = xmenu("id", "parent = '" . $id[$i] . "'"); $nchild = mysql_num_rows($ochild); if ($nchild > 0) { ?> <a href="index.php?p=<?php echo enkripsi($p . "&q=" . $id[$i]); ?> "><?php echo $menuname[$i]; ?> </a><?php } else { echo $menuname[$i]; } ?>