本文整理汇总了PHP中xmenu函数的典型用法代码示例。如果您正苦于以下问题:PHP xmenu函数的具体用法?PHP xmenu怎么用?PHP xmenu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xmenu函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkauthentication
<?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;
示例2: get_list_link
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;
}
示例3: while
</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 " ";
}
?>
示例4: xmenu
$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];
}
?>