Example #1
0
        $q1 = "update articletype set  textorder=0";
        $dbcon->execute($q1) or die($dbcon->errorMsg());
        //	for($v=0; $v<$count; $v++) {
        while (list($key, $value) = each($ids)) {
            //	echo $value."<br>";
            $q = "update articletype set  textorder= '{$value}' where id={$key}";
            $dbcon->execute($q) or die($dbcon->errorMsg());
        }
        $qs = array('msg' => urlencode('Selected items posted as draft.'));
    }
    //send_to($_SERVER['PHP_SELF'], $qs);
}
# a switch to see what the page should be doing
switch ($_POST['act']) {
    case 'Update':
        art_publish($_POST['publish']);
        art_order($_POST['order']);
        break;
}
include "header.php";
?>

<h2>Sections</h2>

<form  action="<?php 
echo $PHP_SELF;
?>
" method="POST">
<div class='list_table'> <table class='list_table'><tr class="intitle">
    
          <td></td>
Example #2
0
    global $_POST;
    if (is_array($query)) {
        $q = '?';
        foreach ($query as $k => $v) {
            $q .= "{$k}={$v}&";
        }
    }
    $type = "&type=" . $_POST[type];
    header("location:{$loc}{$q}{$type}");
}
/**
 * a switch to see what the page should be doing
 */
switch ($_POST['act']) {
    case 'Publish':
        art_publish($_POST['id']);
        break;
    case 'Unpublish':
        art_unpublish($_POST['id']);
        break;
    case 'Delete':
        art_delete($_POST['id']);
        break;
    case 'Move Articles':
        art_change_section($_POST['id'], $_POST['change_type']);
        break;
    case 'Change Class':
        art_change_class($_POST['id'], $_POST['change_class']);
        break;
    case 'Change Order':
        art_order($_POST['order']);