Exemple #1
0
    Workbench_Logic::setURLs(Workbench_Logic::defaultURLs($preset));
    Workbench_Logic::setWidths(Workbench_Logic::defaultWidths($preset));
    Workbench_Logic::setHeights(Workbench_Logic::defaultHeights($preset));
}
if (isset($_POST['save'])) {
    $urls = array();
    $widths = array();
    $row_heights = array();
    for ($row = 1; $row <= 3; $row++) {
        for ($column = 1; $column <= 5; $column++) {
            $urls[] = $_POST["url{$row}{$column}"];
            $widths[] = $_POST["width{$row}{$column}"];
        }
        $row_heights[] = $_POST["height{$row}"];
    }
    Workbench_Logic::setURLs($urls);
    Workbench_Logic::setWidths($widths);
    Workbench_Logic::setHeights($row_heights);
    Filter_Url::redirect("index.php");
    die;
}
$header = new Assets_Header(Locale_Translate::_("Edit workbench"));
$header->run();
$view = new Assets_View(__FILE__);
$urls = Workbench_Logic::getURLs(false);
$widths = Workbench_Logic::getWidths();
foreach ($urls as $key => $url) {
    $row = intval($key / 5) + 1;
    $column = $key % 5 + 1;
    $variable = "url" . $row . $column;
    $view->view->{$variable} = $url;
Exemple #2
0
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
require_once "../bootstrap/bootstrap.php";
page_access_level(Filter_Roles::CONSULTANT_LEVEL);
$database_config_user = Database_Config_User::getInstance();
@($add = $_POST['add']);
if (isset($add)) {
    $database_config_user->setActiveWorkbench($add);
    Workbench_Logic::setURLs(Workbench_Logic::defaultURLs(0));
    Workbench_Logic::setWidths(Workbench_Logic::defaultWidths(0));
    Workbench_Logic::setHeights(Workbench_Logic::defaultHeights(0));
}
@($workbenches = $_POST['workbenches']);
if (isset($workbenches)) {
    $workbenches = explode(",", $workbenches);
    Workbench_Logic::orderWorkbenches($workbenches);
    die;
}
$header = new Assets_Header(Locale_Translate::_("Workbenches"));
$header->jQueryUIOn("sortable");
$header->run();
$view = new Assets_View(__FILE__);
@($remove = $_GET['remove']);
if (isset($remove)) {