本文整理汇总了PHP中tree::move方法的典型用法代码示例。如果您正苦于以下问题:PHP tree::move方法的具体用法?PHP tree::move怎么用?PHP tree::move使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tree
的用法示例。
在下文中一共展示了tree::move方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
echo "\n";
}
echo "\n]";
break;
case "delete":
$id = (int) str_replace("node_", "", $_REQUEST["id"]);
$tree->remove($id);
$db->query("DELETE FROM content WHERE id = " . $id);
echo "OK";
break;
case "create":
case "move":
$id = (int) str_replace("node_", "", $_REQUEST["id"]);
$ref_id = (int) str_replace("node_", "", $_REQUEST["ref_id"]);
$type = $_REQUEST["move_type"];
$result = $tree->move($id, $ref_id, $type);
if ($id == 0) {
foreach ($languages as $k => $lang) {
$db->query("INSERT INTO content (id,language,name,data) VALUES(" . $result . "," . $k . ",'New folder','')");
}
echo "node_" . $result;
}
break;
case "rename":
$sql = "UPDATE content SET name = '" . addslashes($_REQUEST["data"]) . "' WHERE id = " . (int) str_replace("node_", "", $_REQUEST["id"]) . " AND language = " . (int) $_REQUEST["lang"];
$db->query($sql);
echo $sql;
break;
case "loadfile":
$db->query("SELECT * FROM content WHERE id = " . (int) str_replace("node_", "", $_REQUEST["id"]) . " AND language = " . (int) $_REQUEST["lang"]);
$db->nextr();