$op = $_GET['op']; } if (isset($_POST['op'])) { $op = $_POST['op']; } switch ($op) { case "mod": $offerid = isset($_GET['offerid']) ? intval($_GET['offerid']) : 0; $fct = isset($_GET['fct']) ? $_GET['fct'] : ''; smart_xoops_cp_header(); editoffer(true, $offerid, $fct); break; case "addoffer": include_once XOOPS_ROOT_PATH . "/modules/smartobject/class/smartobjectcontroller.php"; $controller = new SmartObjectController($smartpartner_offer_handler); $offerObj = $controller->storeSmartObject(); $fct = isset($_POST['fct']) ? $_POST['fct'] : ''; if ($offerObj->hasError()) { redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR . $offerObj->getHtmlErrors()); } else { $partnerObj = $smartpartner_partner_handler->get($offerObj->getVar('partnerid', 'e')); $partnerObj->setUpdated(); if ($_POST['offerid'] == '') { $offerObj->sendNotifications(array(_SPARTNER_NOT_OFFER_NEW)); } redirect_header(smart_get_page_before_form(), 3, _CO_SOBJECT_SAVE_SUCCESS); } exit; break; case "del": include_once XOOPS_ROOT_PATH . "/modules/smartobject/class/smartobjectcontroller.php";
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; break; case "mod": smart_xoops_cp_header(); edittag($tagid, $language, $fct); break;
require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjectlink.php'; require_once XOOPS_ROOT_PATH . '/class/template.php'; $xoopsTpl = new XoopsTpl(); $myts =& MyTextSanitizer::getInstance(); $xoopsConfig['sitename'] = $myts->displayTarea($xoopsConfig['sitename']); xoops_header(false); echo smart_get_css_link(SMARTOBJECT_URL . 'module.css'); echo '</head><body>'; $smartobject_link_handler = xoops_getmodulehandler('link', 'smartobject'); $linkObj = $smartobject_link_handler->create(); $op = isset($_POST['op']) ? $_POST['op'] : ''; switch ($op) { case 'sendlink': include_once XOOPS_ROOT_PATH . "/modules/smartobject/class/smartobjectcontroller.php"; $controller = new SmartObjectController($smartobject_link_handler); $linkObj = $controller->storeSmartObject(); if ($linkObj->hasError()) { /** * @todo inform user and propose to close the window if a problem occured when saving the link */ } $xoopsMailer =& getMailer(); $xoopsMailer->useMail(); $xoopsMailer->setTemplateDir('language/' . $xoopsConfig['language'] . '/mail_template'); $xoopsMailer->setTemplate('sendlink.tpl'); $xoopsMailer->assign('X_SITENAME', $xoopsConfig['sitename']); $xoopsMailer->assign('TO_NAME', $linkObj->getVar('to_name')); $xoopsMailer->assign('FROM_NAME', $linkObj->getVar('from_name')); $xoopsMailer->assign('SITEURL', XOOPS_URL . "/"); $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']); $xoopsMailer->assign('MESSAGE', $_POST['body']);