<?php if (isset($_POST["search"]) && $_POST["search"] || isset($_GET["search"]) && $_GET["search"]) { include "draggable.php"; ?> <script>$("#nested_container").removeClass("nested_table");</script> <?php } else { if (isset($_POST["view"])) { $bigtree["view"] = BigTreeAutoModule::getView($_POST["view"]); $bigtree["module"] = $admin->getModule(BigTreeAutoModule::getModuleForView($bigtree["view"])); } $module_page = ADMIN_ROOT . $bigtree["module"]["route"] . "/"; $permission = $admin->getAccessLevel($bigtree["module"]["id"]); // Setup the preview action if we have a preview URL and field. if ($bigtree["view"]["preview_url"]) { $bigtree["view"]["actions"]["preview"] = "on"; } function _localDrawLevel($items, $depth) { global $bigtree, $module_page, $permission, $admin; foreach ($items as $item) { $expanded = !empty($_COOKIE["bigtree_admin"]["nested_views"][$bigtree["view"]["id"]][$item["id"]]) ? true : false; $children = BigTreeAutoModule::getViewDataForGroup($bigtree["view"], $item["id"], "position DESC, id ASC", "both"); // Stop the item status notice if (!isset($item["status"])) { $item["status"] = false; } if ($item["status"] == "p") { $status = "Pending"; $status_class = "pending";
<?php BigTree::globalizeArray($bigtree["view"]); $m = BigTreeAutoModule::getModuleForView($bigtree["view"]); $perm = $admin->checkAccess($m); if (isset($_GET["sort"])) { $sort = $_GET["sort"] . " " . $_GET["sort_direction"]; } elseif (isset($options["sort_column"])) { $sort = $options["sort_column"] . " " . $options["sort_direction"]; } elseif (isset($options["sort"])) { $sort = $options["sort"]; } else { $sort = "id DESC"; } // Retrieve the column and the sort direction from the consolidated ORDER BY statement. $sort = ltrim($sort, "`"); $sort_column = BigTree::nextSQLColumnDefinition($sort); $sort_pieces = explode(" ", $sort); $sort_direction = end($sort_pieces); // See if we're searching for anything. $search = isset($_GET["search"]) ? $_GET["search"] : ""; ?> <div class="table auto_modules"> <summary> <input type="search" class="form_search" id="search" placeholder="Search" value="<?php echo htmlspecialchars($search); ?> " /> <span class="form_search_icon"></span> <nav id="view_paging" class="view_paging"></nav> </summary>
<?php header("Content-type: text/javascript"); $id = sqlescape($_GET["id"]); // Grab View Data $view = BigTreeAutoModule::getView(sqlescape($_GET["view"])); $table = $view["table"]; // Get module $module = $admin->getModule(BigTreeAutoModule::getModuleForView($view["id"])); // Get the item $current_item = BigTreeAutoModule::getPendingItem($table, $id); $item = $current_item["item"]; // Check permission $access_level = $admin->getAccessLevel($module, $item, $table); if ($access_level != "n") { $original_item = BigTreeAutoModule::getItem($table, $id); $original_access_level = $admin->getAccessLevel($module, $original_item["item"], $table); if ($original_access_level != "p") { $access_level = $original_access_level; } }
<?php header("Content-type: text/javascript"); $id = sqlescape($_GET["id"]); // Grab View Data $view = BigTreeAutoModule::getView($_GET["view"]); $table = $view["table"]; // Get module $module = $admin->getModule(BigTreeAutoModule::getModuleForView($_GET["view"])); // Get the item $current_item = BigTreeAutoModule::getPendingItem($table, $id); $item = $current_item["item"]; // Check permission $access_level = $admin->getAccessLevel($module, $item, $table); if ($access_level != "n") { $original_item = BigTreeAutoModule::getItem($table, $id); $original_access_level = $admin->getAccessLevel($module, $original_item["item"], $table); if ($original_access_level != "p") { $access_level = $original_access_level; } }