Esempio n. 1
0
     	//$bookingObj->setVar('attended', isset($_POST['attended_' . $bookingid]) ? intval($_POST['attended_' . $bookingid]) : 0);
     	$smartobject_currency_handler->insert($currencyObj);
     }
     */
     redirect_header($smart_previous_page, 3, _AM_SOBJECT_RECORDS_UPDATED);
     exit;
     break;
 case "addcurrency":
     include_once XOOPS_ROOT_PATH . "/modules/smartobject/class/smartobjectcontroller.php";
     $controller = new SmartObjectController($smartobject_currency_handler);
     $controller->storeFromDefaultForm(_AM_SOBJECT_CURRENCIES_CREATED, _AM_SOBJECT_CURRENCIES_MODIFIED, SMARTOBJECT_URL . 'admin/currency.php');
     break;
 case "del":
     include_once XOOPS_ROOT_PATH . "/modules/smartobject/class/smartobjectcontroller.php";
     $controller = new SmartObjectController($smartobject_currency_handler);
     $controller->handleObjectDeletion();
     break;
 default:
     smart_xoops_cp_header();
     smart_adminMenu(5, _AM_SOBJECT_CURRENCIES);
     smart_collapsableBar('createdcurrencies', _AM_SOBJECT_CURRENCIES, _AM_SOBJECT_CURRENCIES_DSC);
     include_once SMARTOBJECT_ROOT_PATH . "class/smartobjecttable.php";
     $objectTable = new SmartObjectTable($smartobject_currency_handler);
     $objectTable->addColumn(new SmartObjectColumn('name', 'left', false, 'getCurrencyLink'));
     $objectTable->addColumn(new SmartObjectColumn('rate', 'center', 150));
     $objectTable->addColumn(new SmartObjectColumn('iso4217', 'center', 150));
     $objectTable->addColumn(new SmartObjectColumn('default_currency', 'center', 150, 'getDefault_currencyControl'));
     $objectTable->addIntroButton('addcurrency', 'currency.php?op=mod', _AM_SOBJECT_CURRENCIES_CREATE);
     $objectTable->addActionButton('updateCurrencies', _SUBMIT, _AM_SOBJECT_CURRENCY_UPDATE_ALL);
     $objectTable->render();
     echo "<br />";
Esempio n. 2
0
$smartobject_tag_handler = xoops_getmodulehandler('tag');
$op = '';
if (isset($_GET['op'])) {
    $op = $_GET['op'];
}
if (isset($_POST['op'])) {
    $op = $_POST['op'];
}
$tagid = isset($_GET['tagid']) ? $_GET['tagid'] : 0;
$fct = isset($_GET['fct']) ? $_GET['fct'] : '';
$language = isset($_GET['language']) ? $_GET['language'] : false;
switch ($op) {
    case "del":
        include_once XOOPS_ROOT_PATH . "/modules/smartobject/class/smartobjectcontroller.php";
        $controller = new SmartObjectController($smartobject_tag_handler);
        $controller->handleObjectDeletion(_AM_SOBJECT_TAG_DELETE_CONFIRM);
        break;
    case "addtag":
        include_once XOOPS_ROOT_PATH . "/modules/smartobject/class/smartobjectcontroller.php";
        $controller = new SmartObjectController($smartobject_tag_handler);
        $tagObj = $controller->storeSmartObject();
        if ($tagObj->hasError()) {
            redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR . $tagObj->getHtmlErrors());
            exit;
        }
        if ($tagObj->hasError()) {
            redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR . $tagObj->getHtmlErrors());
        } else {
            redirect_header(smart_get_page_before_form(), 3, _CO_SOBJECT_SAVE_SUCCESS);
        }
        exit;
Esempio n. 3
0
include_once "admin_header.php";
include_once SMARTOBJECT_ROOT_PATH . "class/smartobjecttable.php";
include_once SMARTOBJECT_ROOT_PATH . "class/smartobjectlink.php";
$smartobject_link_handler = xoops_getmodulehandler('link');
$op = '';
if (isset($_GET['op'])) {
    $op = $_GET['op'];
}
if (isset($_POST['op'])) {
    $op = $_POST['op'];
}
switch ($op) {
    case "del":
        include_once XOOPS_ROOT_PATH . "/modules/smartobject/class/smartobjectcontroller.php";
        $controller = new SmartObjectController($smartobject_link_handler);
        $controller->handleObjectDeletion(_AM_SOBJECT_SENT_LINK_DELETE_CONFIRM);
        break;
    case "view":
        $linkid = isset($_GET['linkid']) ? $_GET['linkid'] : 0;
        $linkObj = $smartobject_link_handler->get($linkid);
        if ($linkObj->isNew()) {
            redirect_header(SMARTOBJECT_URL . "admin/link.php", 3, _AM_SOBJECT_LINK_NOT_FOUND);
        }
        smart_xoops_cp_header();
        smart_adminMenu(1, _AM_SOBJECT_SENT_LINK_DISPLAY);
        smart_collapsableBar('sentlinks', _AM_SOBJECT_SENT_LINK_DISPLAY, _AM_SOBJECT_SENT_LINK_DISPLAY_INFO);
        include_once XOOPS_ROOT_PATH . '/class/template.php';
        $xoopsTpl =& new XoopsTpl();
        $xoopsTpl->assign('link', $linkObj->toArray());
        $xoopsTpl->display('db:smartobject_sentlink_display.html');
        echo "<br />";