<?php

$pagename = "home";
include "../../include/db.php";
include "../../include/general.php";
include "../../include/authenticate.php";
include "../../include/dash_functions.php";
#If can't manage own dash return to user home.
if (!hook("replace_dash_admin_permission_relocate")) {
    if (!($home_dash && checkPermission_dashmanage())) {
        header("location: " . $baseurl_short . "pages/user/user_home.php");
        exit;
    }
}
if (getvalescaped("quicksave", FALSE)) {
    $tile = getvalescaped("tile", "");
    #If a valid tile value supplied
    if (!empty($tile) && is_numeric($tile)) {
        #Tile available to this user?
        $available = get_user_available_tiles($userref, $tile);
        if (!empty($available)) {
            $tile = $available[0]["tile"];
            $usertile = $available[0]["usertile"];
            if (get_user_tile($usertile, $userref)) {
                #Delete if the user already has the tile
                delete_user_dash_tile($usertile, $userref);
                $dtiles_available = get_user_available_tiles($userref);
                exit("negativeglow");
            } else {
                #Add to the front of the pile if the user already has the tile
                add_user_dash_tile($userref, $tile, 5);
Example #2
0
								</h2>
								<?php 
                }
                ?>
					</div>
				<div class="PanelShadow"></div>
				</a>
				<?php 
            }
        }
    }
    # end hook homefeaturedcol
    if ($home_dash && checkPermission_dashmanage()) {
        get_user_dash($userref);
    } else {
        if ($home_dash && !checkPermission_dashmanage()) {
            get_managed_dash();
        }
    }
    ?>
	<div style="clear:both;"></div>
	</div> <!-- End HomePanelContainer -->
	
	<div class="clearerleft"></div>
	<?php 
    if ($small_slideshow && !$home_dash && !$welcometext) {
        loadWelcomeText();
    }
}
// End of ReplaceHome hook
include "../include/footer.php";
    if ($index > $tile["default_order_by"]) {
        $index += 5;
    } else {
        $index -= 5;
    }
    update_default_dash_tile_order($tile["ref"], $index);
    reorder_default_dash();
    echo "Tile " . $tile["ref"] . " at index: " . $index;
    exit;
}
/* 
 * Delete Tile 
 */
$delete = getvalescaped("delete", false);
if ($delete && isset($usertile)) {
    if (!checkPermission_dashmanage()) {
        exit($lang["error-permissiondenied"]);
    }
    delete_user_dash_tile($usertile["ref"], $userref);
    reorder_user_dash($userref);
    echo "Deleted U" . $usertile['ref'];
    exit;
}
if ($delete && isset($tile) && !isset($usertile)) {
    if (!checkPermission_dashcreate()) {
        exit($lang["error-permissiondenied"]);
    }
    #Check config tiles for permanent deletion
    $force = false;
    $search_string = explode('?', $tile["url"]);
    parse_str(str_replace("&amp;", "&", $search_string[1]), $search_string);