Beispiel #1
0
<?php

include "_setup.php";
if ($item["approved"]) {
    if ($access_level != "p") {
        echo 'BigTree.Growl("' . $module["name"] . '","You don\'t have permission to perform this action.");';
    } else {
        echo 'BigTree.Growl("' . $module["name"] . '","Item is now unapproved.");';
        if (is_numeric($id)) {
            sqlquery("UPDATE `{$table}` SET approved = '' WHERE id = '{$id}'");
        } else {
            BigTreeAutoModule::updatePendingItemField(substr($id, 1), "approved", "");
        }
    }
} else {
    if ($access_level != "p") {
        echo 'BigTree.Growl("' . $module["name"] . '","You don\'t have permission to perform this action.");';
    } else {
        echo 'BigTree.Growl("' . $module["name"] . '","Item is now approved.");';
        if (is_numeric($id)) {
            sqlquery("UPDATE `{$table}` SET approved = 'on' WHERE id = '{$id}'");
        } else {
            BigTreeAutoModule::updatePendingItemField(substr($id, 1), "approved", "on");
        }
    }
}
include "_recache.php";
Beispiel #2
0
<?php

include "_setup.php";
if ($item["featured"]) {
    if ($access_level != "p") {
        echo 'BigTree.growl("' . $module["name"] . '","You don\'t have permission to perform this action.");';
    } else {
        echo 'BigTree.growl("' . $module["name"] . '","Item is now unfeatured.");';
        if (is_numeric($id)) {
            sqlquery("UPDATE `{$table}` SET featured = '' WHERE id = '{$id}'");
        } else {
            BigTreeAutoModule::updatePendingItemField(substr($id, 1), "featured", "");
        }
    }
} else {
    if ($access_level != "p") {
        echo 'BigTree.growl("' . $module["name"] . '","You don\'t have permission to perform this action.");';
    } else {
        echo 'BigTree.growl("' . $module["name"] . '","Item is now featured.");';
        if (is_numeric($id)) {
            sqlquery("UPDATE `{$table}` SET featured = 'on' WHERE id = '{$id}'");
        } else {
            BigTreeAutoModule::updatePendingItemField(substr($id, 1), "featured", "on");
        }
    }
}
include "_recache.php";
Beispiel #3
0
<?php

// Grab View Data
$view = BigTreeAutoModule::getView($_POST["view"]);
$module = $admin->getModule(BigTreeAutoModule::getModuleForView($view));
$access_level = $admin->getAccessLevel($module);
$table = $view["table"];
if ($access_level == "p") {
    parse_str($_POST["sort"]);
    foreach ($row as $position => $id) {
        if (is_numeric($id)) {
            sqlquery("UPDATE `{$table}` SET position = '" . (count($row) - $position) . "' WHERE id = '" . sqlescape($id) . "'");
            BigTreeAutoModule::recacheItem($id, $table);
        } else {
            BigTreeAutoModule::updatePendingItemField(substr($id, 1), "position", count($row) - $position);
            BigTreeAutoModule::recacheItem(substr($id, 1), $table, true);
        }
    }
}
// Find any view that uses this table for grouping and wipe its view cache
$dependant = BigTreeAutoModule::getDependantViews($table);
foreach ($dependant as $v) {
    BigTreeAutoModule::clearCache($v["table"]);
}