Ejemplo n.º 1
0
$model = $_REQUEST['model'];
$action = $_REQUEST['action'];
include_once MODELS_ADMIN . "/" . $model . "_model.php";
switch (strtoupper($action)) {
    case 'ADD':
        break;
    case 'SAVE':
        $objRedeem = new redeem();
        $objRedeem->setRedeem();
        $objComm->redirect('index.php?model=redeem');
        break;
    case 'VIEW':
    case 'EDIT':
        $objRedeem = new redeem();
        $row = $objRedeem->getRedeem($_REQUEST['id']);
        break;
    case 'UPDATE':
        $objRedeem = new redeem();
        $objRedeem->setRedeem();
        $objComm->redirect('index.php?model=' . $model . '&action=edit&id=' . $_REQUEST['pk_id']);
        break;
    case 'DELETE':
        $objRedeem = new redeem();
        $objRedeem->delRedeem($_REQUEST['id']);
        $objComm->redirect('index.php?model=' . $model);
        break;
    default:
        $objRedeem = new redeem();
        $Records = $objRedeem->getAllRedeem();
        break;
}
Ejemplo n.º 2
0
<?php

$model = $_REQUEST['model'];
$action = $_REQUEST['action'];
$objComm->checkSiteSession();
include_once MODELS . "/redeem_model.php";
switch (strtoupper($action)) {
    case 'SAVE':
        $objRedeem = new redeem();
        $objRedeem->setRedeem();
        $objComm->redirect1('index.php?model=redeem');
        break;
    default:
        break;
}
Ejemplo n.º 3
-19
<?php

require '..' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'bootstrap.config.php';
$product = new redeem(1);
$product->redeem(1);
$products = Redeem::getProducts();
foreach ($products as $product) {
    print_r($product);
}