Exemplo n.º 1
0
function handleEvent($postObj)
{
    if ($postObj->Event == "subscribe") {
        handleSubscribe($postObj);
    } else {
        if ($postObj->Event == "unsubscribe") {
            handleUnsubscribe($postObj);
        } else {
            if ($postObj->Event == "SCAN") {
                handleScan($postObj);
            } else {
                if ($postObj->Event == "CLICK") {
                    handleClick($postObj);
                } else {
                    if ($postObj->Event == "VIEW") {
                        log_file("view test");
                    } else {
                        if ($postObj->Event == "TEMPLATESENDJOBFINISH") {
                            log_file("template msg send finished");
                        } else {
                            if ($postObj->Event == "LOCATION") {
                                handleLocation($postObj);
                            }
                        }
                    }
                }
            }
        }
    }
}
Exemplo n.º 2
0
         $pageBody .= handleEdit();
     } else {
         echo COM_refresh($_CONF['site_url'] . '/index.php');
         exit;
     }
     break;
 case 'subscribe':
     if (isset($_GET['sid'])) {
         $sid = COM_sanitizeID(COM_applyFilter($_GET['sid']));
         $type = COM_applyFilter($_GET['type']);
         if ($type != 'article') {
             if (!in_array($type, $_PLUGINS)) {
                 $type = 'article';
             }
         }
         $pageBody .= handleSubscribe($sid, $type);
     } else {
         echo COM_refresh($_CONF['site_url'] . '/index.php');
         exit;
     }
     break;
 case 'unsubscribe':
     if (isset($_GET['sid'])) {
         $sid = COM_sanitizeID(COM_applyFilter($_GET['sid']));
         $type = COM_applyFilter($_GET['type']);
         if ($type != 'article') {
             if (!in_array($type, $_PLUGINS)) {
                 $type = 'article';
             }
         }
         $pageBody .= handleunSubscribe($sid, $type);
Exemplo n.º 3
0
function handleEvent($postObj)
{
    if ($postObj->Event == "subscribe") {
        handleSubscribe($postObj);
    } else {
        if ($postObj->Event == "unsubscribe") {
            handleUnsubscribe($postObj);
        } else {
            if ($postObj->Event == "SCAN") {
                handleScan($postObj);
            } else {
                if ($postObj->Event == "CLICK") {
                    handleClick($postObj);
                } else {
                    if ($postObj->Event == "VIEW") {
                    } else {
                        if ($postObj->Event == "TEMPLATESENDJOBFINISH") {
                        } else {
                            if ($postObj->Event == "LOCATION") {
                            }
                        }
                    }
                }
            }
        }
    }
}
Exemplo n.º 4
0
    $hasargs = strstr($referer, '?');
    if ($hasargs) {
        $sep = '&';
    } else {
        $sep = '?';
    }
    $rc = PLG_unsubscribe('mediagallery', '', $album_id);
    echo COM_refresh($referer . $sep . 'msg=521');
    exit;
}
$op = '';
$album_id = 0;
$uid = $_USER['uid'];
if (isset($_GET['op'])) {
    $op = COM_applyFilter($_GET['op']);
}
if (isset($_GET['sid'])) {
    $album_id = (int) COM_applyFilter($_GET['sid'], true);
}
if ($album_id > 0) {
    switch ($op) {
        case 'subscribe':
            handleSubscribe($album_id);
            break;
        case 'unsubscribe':
            handleunSubscribe($album_id);
            break;
    }
}
echo COM_refresh($_MG_CONF['site_url']);
exit;