$buildurl = str_replace("promimg=" . $buildstring["promimg"], "promimg=" . $promoted_image, $tile["url"]); } if (($tile["all_users"] || $all_users) && checkPermission_dashadmin()) { update_dash_tile($tile, $buildurl, $link, $title, $reload_interval, $all_users, $default_order_by, $resource_count, $text); } else { if (!$tile["all_users"] && !$all_users) { $newtile = create_dash_tile($buildurl, $link, $title, $reload_interval, $all_users, $default_order_by, $resource_count, $text); sql_query("UPDATE user_dash_tile SET dash_tile = " . $newtile . " WHERE dash_tile=" . $tile["ref"] . " AND user ="******"existingdashtilefound"]; } } } /* SAVE SUCCESSFUL? */ if (!$error) { redirect($baseurl); exit; } include "../include/header.php"; ?> <h2><?php echo $lang["createnewdashtile"]; ?>
function create_new_user_dash($user) { $tiles = sql_query("SELECT dash_tile.ref as 'tile',dash_tile.title,dash_tile.url,dash_tile.reload_interval_secs,dash_tile.link,dash_tile.default_order_by as 'order' FROM dash_tile WHERE dash_tile.all_users=1 AND (dash_tile.allow_delete=1 OR (dash_tile.allow_delete=0 AND dash_tile.ref IN (SELECT DISTINCT user_dash_tile.dash_tile FROM user_dash_tile))) ORDER BY default_order_by"); foreach ($tiles as $tile) { add_user_dash_tile($user, $tile["tile"], $tile["order"]); } }
exit("positiveglow"); } } } exit("Save Failed"); } if (getvalescaped("submit", FALSE)) { $tiles = getvalescaped("tiles", ""); if (empty($tiles)) { empty_user_dash($userref); } else { #Start Fresh empty_user_dash($userref, false); $order_by = 10; foreach ($tiles as $tile) { add_user_dash_tile($userref, $tile, $order_by); $order_by += 10; } } } include "../../include/header.php"; ?> <div class="BasicsBox"> <h1><?php echo $lang["manage_own_dash"]; ?> </h1> <p> <?php echo $lang["manageowndashinto"]; ?>