예제 #1
0
 public function doConfigPageInit($page)
 {
     $request = $_REQUEST;
     isset($request['action']) ? $action = $request['action'] : ($action = '');
     isset($request['view']) ? $view = $request['view'] : ($view = '');
     isset($request['itemid']) ? $itemid = $request['itemid'] : ($itemid = '');
     if (isset($request['action'])) {
         switch ($action) {
             case "add":
                 pinsets_add($request);
                 needreload();
                 redirect_standard();
                 break;
             case "delete":
                 pinsets_del($itemid);
                 needreload();
                 redirect_standard();
                 break;
             case "edit":
                 pinsets_edit($itemid, $request);
                 needreload();
                 redirect_standard('itemid', 'view');
                 break;
         }
     }
 }
예제 #2
0
//of the License, or (at your option) any later version.
//
//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.
isset($_REQUEST['action']) ? $action = $_REQUEST['action'] : ($action = '');
//the item we are currently displaying
isset($_REQUEST['itemid']) ? $itemid = $_REQUEST['itemid'] : ($itemid = '');
$dispnum = "pinsets";
//used for switch on config.php
//if submitting form, update database
if (isset($_POST['action'])) {
    switch ($action) {
        case "add":
            pinsets_add($_POST);
            needreload();
            redirect_standard();
            break;
        case "delete":
            pinsets_del($itemid);
            needreload();
            redirect_standard();
            break;
        case "edit":
            pinsets_edit($itemid, $_POST);
            needreload();
            redirect_standard('itemid');
            break;
    }
}