Beispiel #1
0
}
switch ($op) {
    case "BlocksAdmin":
        BlocksAdmin();
        break;
    case "BlocksNew":
        BlocksNew();
        break;
    case "BlocksFile":
        BlocksFile();
        break;
    case "BlocksFileEdit":
        BlocksFileEdit();
        break;
    case "BlocksAdd":
        BlocksAdd($title, $content, $bposition, $active, $hide, $blockfile, $view, $expire, $action);
        break;
    case "BlocksEdit":
        BlocksEdit($bid);
        break;
    case "BlocksEditSave":
        BlocksEditSave($newexpire, $bid, $bkey, $title, $content, $oldposition, $bposition, $active, $hide, $weight, $blockfile, $view, $expire, $action);
        break;
    case "BlocksChange":
        BlocksChange($bid, $ok, $de);
        break;
    case "BlocksDelete":
        $bid = intval($_REQUEST['bid']);
        list($bposition, $weight) = mysql_fetch_row(sql_query("SELECT bposition, weight FROM " . $prefix . "_blocks WHERE bid='{$bid}'"));
        $result = sql_query("SELECT bid FROM " . $prefix . "_blocks WHERE weight>'{$weight}' AND bposition='{$bposition}'");
        while (list($nbid) = mysql_fetch_row($result)) {
Beispiel #2
0
         GraphicAdmin();
         OpenTable();
         echo "<center><br>";
         echo "<font class=\"option\">";
         echo "<b>" . _SURE2DELHEADLINE . "</b></font><br><br>";
     }
     echo "[ <a href=\"" . $admin_file . ".php?op=HeadlinesDel&amp;hid={$hid}&amp;ok=1\">" . _YES . "</a> | <a href=\"" . $admin_file . ".php?op=HeadlinesAdmin\">" . _NO . "</a> ]<br><br>";
     CloseTable();
     include "footer.php";
 }
 switch ($op) {
     case "BlocksAdmin":
         BlocksAdmin();
         break;
     case "BlocksAdd":
         BlocksAdd($title, $content, $url, $bposition, $active, $refresh, $headline, $blanguage, $blockfile, $view, $expire, $action, $subscription);
         break;
     case "BlocksEdit":
         BlocksEdit($bid);
         break;
     case "BlocksEditSave":
         BlocksEditSave($bid, $bkey, $title, $content, $url, $oldposition, $bposition, $active, $refresh, $weight, $blanguage, $blockfile, $view, $expire, $action, $subscription, $moretime);
         break;
     case "ChangeStatus":
         ChangeStatus($bid, $ok, $de);
         break;
     case "BlocksDelete":
         BlocksDelete($bid, $ok);
         break;
     case "BlockOrder":
         BlockOrder($weightrep, $weight, $bidrep, $bidori);
Beispiel #3
0
     if (!isset($bposition) || isset($_POST['cancel'])) {
         URL::redirect(URL::admin());
     }
     if (isset($_POST['confirm'])) {
         $db->sql_uquery('UPDATE ' . $prefix . '_blocks SET weight=weight-1 WHERE bposition=\'' . $bposition . '\' AND weight>' . $weight);
         $db->sql_uquery('DELETE FROM ' . $prefix . '_blocks WHERE bid=' . $bid);
         $db->sql_uquery('DELETE FROM ' . $prefix . '_blocks_custom WHERE bid=' . $bid);
         Cache::array_delete('blocks_list');
         URL::redirect(URL::admin());
     }
     cpg_delete_msg(URL::admin('&amp;del=' . $bid), sprintf(_ERROR_DELETE_CONF, '<strong>' . (defined($title) ? constant($title) : $title) . '</strong>'));
 } else {
     if (isset($_GET['save'])) {
         BlocksEditSave(intval($_GET['save']));
     } else {
         if (isset($_POST['add']) && !BlocksAdd()) {
             rssfail();
             return;
         }
         if (Security::check_post()) {
             $sides = array('l', 'c', 'r', 'd', 'n');
             $count = count($_POST['id']);
             $blocks = blocks_list();
             $mid = intval($_POST['mid']);
             $module = $db->sql_escape_string($_POST['module']);
             for ($i = 0; $i < $count; ++$i) {
                 if (!intval($_POST['id'][$i])) {
                     continue;
                 }
                 if ($_POST['id'][$i] < 0) {
                     $side = $_POST['side'][$i];