• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP unsubscribe函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中unsubscribe函数的典型用法代码示例。如果您正苦于以下问题:PHP unsubscribe函数的具体用法?PHP unsubscribe怎么用?PHP unsubscribe使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了unsubscribe函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: response

/**
 * response all msg
 * @param $postObj
 * @return string
 */
function response($postObj)
{
    $log = new Logs();
    $return = '';
    $msgType = $postObj->MsgType;
    $logmsg = '[user] ' . $postObj->FromUserName . ' [msg-type] ' . $msgType;
    switch ($msgType) {
        case MSGTYPE_EVENT:
            $logmsg .= ' [event] ' . $postObj->Event;
            switch ($postObj->Event) {
                case 'subscribe':
                    //关注
                    $return = subscribe($postObj);
                    break;
                case 'unsubscribe':
                    unsubscribe($postObj);
                    break;
                case 'CLICK':
                    switch ($postObj->EventKey) {
                        case 'MENU_NEWS':
                            $return = news($postObj);
                            break;
                    }
            }
            break;
        case MSGTYPE_TEXT:
            //txt
            $logmsg .= ' [content] ' . $postObj->Content;
            $return = textResponse($postObj);
            break;
        default:
            $return = news($postObj);
            break;
    }
    if (!$log->write_log($logmsg, 'access')) {
        if (DEBUG) {
            echo 'error: ' . $log->error;
        }
    }
    return $return;
}
开发者ID:lampjian,项目名称:wechat-quick-start,代码行数:46,代码来源:wechat.php


示例2: switch

}
//all other actions require user to be logged in
if (check_logged_in()) {
    switch ($action) {
        case 'account-settings':
            display_account_form(get_email(), get_real_name(get_email()), get_mimetype(get_email()));
            break;
        case 'show-other-lists':
            display_items('Unsubscribed Lists', get_unsubscribed_lists(get_email()), 'information', 'show-archive', 'subscribe');
            break;
        case 'subscribe':
            subscribe(get_email(), $_GET['id']);
            display_items('Subscribed Lists', get_subscribed_lists(get_email()), 'information', 'show-archive', 'unsubscribe');
            break;
        case 'unsubscribe':
            unsubscribe(get_email(), $_GET['id']);
            display_items('Subscribed Lists', get_subscribed_lists(get_email()), 'information', 'show-archive', 'unsubscribe');
            break;
        case '':
        case 'show-my-lists':
            display_items('Subscribed Lists', get_subscribed_lists(get_email()), 'information', 'show-archive', 'unsubscribe');
            break;
        case 'change-password':
            display_password_form();
            break;
        case 'store-change-password':
            if (change_password(get_email(), $_POST['old_passwd'], $_POST['new_passwd'], $_POST['new_passwd2'])) {
                echo "<p style=\"padding-bottom: 50px\">OK: Password\n                changed.</p>";
            } else {
                echo "<p style=\"padding-bottom: 50px\">Sorry, your\n                password could not be changed.</p>";
                display_password_form();
开发者ID:kai-cn,项目名称:bookcode-php-mysql-web-development,代码行数:31,代码来源:index.php


示例3: translate

            } else {
                include "header.php";
                $stop = translate("This account or IP has been temporarily disabled. This means that either this IP, or user account has been moderated down more than x times in the last few hours. If you think this is unfair, you should contact the admin.") . "<br />";
                error_handler($stop);
                include "footer.php";
            }
        } else {
            redirect_url("index.php");
        }
    } else {
        redirect_url("index.php");
    }
}
settype($op, 'string');
switch ($op) {
    case "subscribe":
        subscribe($email);
        break;
    case "subscribeOK":
        //anti_spambot
        if (!R_spambot($asb_question, $asb_reponse, "")) {
            Ecr_Log("security", "LNL Anti-Spam : email=" . $email, "");
            redirect_url("index.php");
            die;
        }
        subscribe_ok($email);
        break;
    case "unsubscribe":
        unsubscribe($email);
        break;
}
开发者ID:Jireck-npds,项目名称:npds_dune,代码行数:31,代码来源:lnl.php


示例4: print_r

    // select 1 row from table where statecheck = 0
    $sqlBuilder = new \Simplon\Mysql\Manager\SqlQueryBuilder();
    $sqlBuilder->setQuery('SELECT * FROM bazanoua WHERE state = :state')->setConditions(array('state' => '0'));
    $select = $sqlManager->fetchRow($sqlBuilder);
    print_r($select);
    // change statecheck to 1
    $data = array('state' => '1');
    $sqlBuilder = new \Simplon\Mysql\Manager\SqlQueryBuilder();
    $sqlBuilder->setTableName('bazanoua')->setConditions(array('id' => $select['id']))->setConditionsQuery("id = :id")->setData($data);
    $update = $sqlManager->update($sqlBuilder);
    // print_r($select['email']);
    foreach ($csv as $key => $mail) {
        $email = $mail[0];
        if ($select['email'] == $email) {
            echo "\n" . "Am gasit rejectu" . "\n";
            unsubscribe($select['id'], $sqlManager);
            // sleep(2);
        }
        // print_r($email);
    }
    $data = array('state' => '2');
    $sqlBuilder = new \Simplon\Mysql\Manager\SqlQueryBuilder();
    $sqlBuilder->setTableName('bazanoua')->setConditions(array('id' => $select['id']))->setConditionsQuery("id = :id")->setData($data);
    $update = $sqlManager->update($sqlBuilder);
    // break;
} while ($select);
function unsubscribe($id, $sqlManager)
{
    try {
        $data = array('unsubscribe' => '1');
        $sqlBuilder = (new \Simplon\Mysql\Manager\SqlQueryBuilder())->setTableName('bazanoua')->setConditions(array('id' => $id))->setConditionsQuery("id = :id")->setData($data);
开发者ID:ElasticOrange,项目名称:canon-soho-newsletter,代码行数:31,代码来源:removeRejectedFromDb.php


示例5: clearOneTestsolveRequest

}
if (isset($_POST['clearOneTestsolveRequest'])) {
    $pid = $_POST['pid'];
    clearOneTestsolveRequest($pid);
    header("Location: " . URL . "/puzzle.php?pid=" . $pid);
    exit(0);
}
if (isset($_POST['emailSub'])) {
    $pid = $_POST['pid'];
    subscribe($uid, $pid);
    header("Location: " . URL . "/puzzle.php?pid=" . $pid);
    exit(0);
}
if (isset($_POST['emailUnsub'])) {
    $pid = $_POST['pid'];
    unsubscribe($uid, $pid);
    header("Location: " . URL . "/puzzle.php?pid=" . $pid);
    exit(0);
}
if (isset($_POST['getTest'])) {
    $pid = getPuzzleToTest($uid);
    if ($pid) {
        addPuzzleToTestQueue($uid, $pid);
    } else {
        $_SESSION['failedToAdd'] = TRUE;
    }
    header("Location: " . URL . "/testsolving.php");
    exit(0);
}
if (isset($_POST['SelfAddFactchecker'])) {
    // User wishes to opt in to factchecking duty.
开发者ID:portnoyslp,项目名称:puzzle-editing,代码行数:31,代码来源:form-submit.php


示例6: count

        // getting nb articles, gen random num, then select one article is much faster than "sql(order by rand limit 1)"
        $result = $GLOBALS['db_handle']->query("SELECT count(ID) FROM articles")->fetch();
        $rand = mt_rand(0, $result[0] - 1);
        $tableau = liste_elements("SELECT * FROM articles LIMIT {$rand}, 1", array(), 'articles');
    } catch (Exception $e) {
        die('Erreur rand: ' . $e->getMessage());
    }
    header('Location: ' . $tableau[0]['bt_link']);
    exit;
}
// unsubscribe from comments-newsletter and redirect on main page
if (isset($_GET['unsub']) and $_GET['unsub'] == 1 and (isset($_GET['comment']) and preg_match('#\\d{14}#', $_GET['comment'])) and isset($_GET['mail'])) {
    if (isset($_GET['all'])) {
        $res = unsubscribe(htmlspecialchars($_GET['comment']), $_GET['mail'], 1);
    } else {
        $res = unsubscribe(htmlspecialchars($_GET['comment']), $_GET['mail'], 0);
    }
    if ($res == TRUE) {
        header('Location: ' . $_SERVER['PHP_SELF'] . '?unsubsribe=yes');
    } else {
        header('Location: ' . $_SERVER['PHP_SELF'] . '?unsubsribe=no');
    }
}
/*****************************************************************************
 Show one post : 1 blogpost (with comments)
******************************************************************************/
// Single Blog Post
if (isset($_GET['d']) and preg_match('#^\\d{4}/\\d{2}/\\d{2}/\\d{2}/\\d{2}/\\d{2}#', $_GET['d'])) {
    $tab = explode('/', $_GET['d']);
    $id = substr($tab['0'] . $tab['1'] . $tab['2'] . $tab['3'] . $tab['4'] . $tab['5'], '0', '14');
    // 'admin' connected is allowed to see draft articles, but not 'public'. Same for article posted with a date in the future.
开发者ID:wazari972,项目名称:blogotext,代码行数:31,代码来源:index.php


示例7: page_head

{
    BoincSubscription::delete($user->id, $thread->id);
    if (!BoincSubscription::lookup($user->id, $thread->id)) {
        page_head(tra("Unsubscription successful"));
        show_forum_header($user);
        show_title($forum, $thread);
        echo "<p>" . tra("You are no longer subscribed to %1. You will no longer receive notifications for this thread.", "<b>" . cleanup_title($thread->title) . "</b>");
    } else {
        page_head(tra("Unsubscription failed"));
        echo "<p>" . tra("We are currently unable to unsubscribe you from %1. Please try again later..", "<b>" . cleanup_title($thread->title) . "</b>");
    }
    echo "</p><p><br /><a href=\"forum_thread.php?id=" . $thread->id . "\">" . tra("Return to thread") . "</a></p>";
    page_tail();
}
if (!$thread || !$action) {
    error_page(tra("Unknown subscription action"));
}
$user = get_logged_in_user();
check_tokens($user->authenticator);
if ($action == "subscribe") {
    subscribe($forum, $thread, $user);
    exit;
} else {
    if ($action == "unsubscribe") {
        unsubscribe($forum, $thread, $user);
        exit;
    }
}
?>

开发者ID:CalvinZhu,项目名称:boinc,代码行数:29,代码来源:forum_subscribe.php


示例8: log_campaign_activity

}
if (!empty($_REQUEST['identifier'])) {
    $keys = log_campaign_activity($_REQUEST['identifier'], 'removed');
    global $current_language;
    $mod_strings = return_module_language($current_language, 'Campaigns');
    global $beanFiles, $beanList;
    if (!empty($keys) && $keys['target_type'] == 'Users') {
        //Users cannot opt out of receiving emails, print out warning message.
        echo $mod_strings['LBL_USERS_CANNOT_OPTOUT'];
    } elseif (!empty($keys) && isset($keys['campaign_id']) && !empty($keys['campaign_id'])) {
        //we need to unsubscribe the user from this particular campaign
        $beantype = $beanList[$keys['target_type']];
        require_once $beanFiles[$beantype];
        $focus = new $beantype();
        $focus->retrieve($keys['target_id']);
        unsubscribe($keys['campaign_id'], $focus);
    } elseif (!empty($keys)) {
        $id = $keys['target_id'];
        $module = trim($keys['target_type']);
        $class = $beanList[$module];
        require_once $beanFiles[$class];
        $mod = new $class();
        $db = DBManagerFactory::getInstance();
        $id = $db->quote($id);
        //no opt out for users.
        if (preg_match('/^[0-9A-Za-z\\-]*$/', $id) && $module != 'Users') {
            //record this activity in the campaing log table..
            $query = "UPDATE email_addresses SET email_addresses.opt_out = 1 WHERE EXISTS(SELECT 1 FROM email_addr_bean_rel ear WHERE ear.bean_id = '{$id}' AND ear.deleted=0 AND email_addresses.id = ear.email_address_id)";
            $status = $db->query($query);
            if ($status) {
                echo "*";
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:31,代码来源:RemoveMe.php


示例9: stream_get_line

<?php

$subscription_file = "/database/smartwink-subscriptions";
# Barebones upnp subscribe / unsubscribe implementation.
# PHP on the Wink Hub doesn't come with sockets support, so we tie to socat.
$request = stream_get_line(STDIN, 4096, "\r\n\r\n");
$events = array();
$callbacks = array();
if (preg_match("@SUBSCRIBE /upnp/event/(\\w+)/(\\w+)@", $request, $events) && preg_match("@CALLBACK: <([^\\s>]+)>@", $request, $callbacks)) {
    subscribe($events[1], $events[2], $callbacks[1]);
} elseif (preg_match("@SUBSCRIBE /upnp/event/(\\w+)/(\\w+)@", $request, $events) && preg_match("@SID: (\\w+)@", $request, $sid)) {
    unsubscribe($events[1], $events[2], $sid[1]);
}
fclose(STDOUT);
fclose(STDIN);
function subscribe($publisher, $path, $callback)
{
    global $subscription_file;
    $key = "{$publisher} {$path}";
    $id = md5($key);
    $subscriptions = file($subscription_file) ?: array();
    $subscriptions = array_map(rtrim, $subscriptions);
    array_push($subscriptions, "{$key} {$callback}");
    $subscriptions = array_unique($subscriptions);
    file_put_contents($subscription_file, join("\n", $subscriptions));
    respond($id);
}
function unsubscribe($publisher, $path, $sid)
{
    global $subscription_file;
    $record = "{$publisher} {$path}";
开发者ID:jdmcgee,项目名称:SmartWink,代码行数:31,代码来源:subscribe.php


示例10: web_hook

 public function web_hook()
 {
     // $this->load->model('main');
     // // add to database
     // $info = array(
     // 'first_name' => 'photo ',
     // 'last_name' => 'last ',
     // 'email' =>  '[email protected] ',
     // 'originator_id' => '387 ',
     // 'type' => 27 // = photo client
     // 	);
     /***********************************************
     		Sample code for handling MailChimp Webhooks - to write the logfile, your webserver must be able to write 
     		to the file in the wh_log() function below.
     
     		This also assumes you use a key to secure the script and configure a URL like this in MailChimp:
     
     		http://www.mydomain.com/webhook.php?key=EnterAKey!
     
     		***********************************************/
     $this->load->helper('file');
     /***********************************************
     		    Helper Functions
     		***********************************************/
     // web hook login MailChimp
     function wh_log($msg)
     {
         $file_data = date("Y-m-d H:i:s") . " | " . $msg . "\n";
         if (write_file(FCPATH . '/assets/web_hook.log', $file_data, 'a') == FALSE) {
             echo $logfile;
             echo 'Unable to write the file';
         } else {
             echo 'File written!';
         }
     }
     function subscribe($data)
     {
         wh_log($data['email'] . ' just subscribed!');
     }
     function unsubscribe($data)
     {
         wh_log($data['email'] . ' just unsubscribed!');
     }
     function cleaned($data)
     {
         wh_log($data['email'] . ' was cleaned from your list!');
     }
     function upemail($data)
     {
         wh_log($data['old_email'] . ' changed their email address to ' . $data['new_email'] . '!');
     }
     function profile($data)
     {
         wh_log($data['email'] . ' updated their profile!');
     }
     $my_key = '19776';
     wh_log('==================[ Incoming Request ]==================');
     wh_log("Full _REQUEST dump:\n" . print_r($_REQUEST, true));
     if (!isset($_GET['key'])) {
         wh_log('No security key specified, ignoring request');
     } elseif ($_GET['key'] != $my_key) {
         wh_log('Security key specified, but not correct:');
         wh_log("\t" . 'Wanted: "' . $my_key . '", but received "' . $_GET['key'] . '"');
     } else {
         //process the request
         wh_log('Processing a "' . $_POST['type'] . '" request...');
         switch ($_POST['type']) {
             case 'subscribe':
                 subscribe($_POST['data']);
                 break;
             case 'unsubscribe':
                 unsubscribe($_POST['data']);
                 break;
             case 'cleaned':
                 cleaned($_POST['data']);
                 break;
             case 'upemail':
                 upemail($_POST['data']);
                 break;
             case 'profile':
                 profile($_POST['data']);
                 break;
             default:
                 wh_log('Request type "' . $_POST['type'] . '" unknown, ignoring.');
         }
     }
     wh_log('Finished processing request.');
 }
开发者ID:Bradslavens,项目名称:coephoto,代码行数:88,代码来源:Photo.php


示例11: elseif

                $param["geo"] = "zip";
            } elseif (isset($param["geonameid"])) {
                $param["geo"] = "geoname";
            }
            $is_update = true;
        }
    }
    if (isset($param["unsubscribe"]) && $param["unsubscribe"]) {
        $default_unsubscribe = true;
    }
    form($param);
}
if (isset($param["modify"]) && $param["modify"]) {
    subscribe($param);
} elseif (isset($param["unsubscribe"]) && $param["unsubscribe"]) {
    unsubscribe($param);
} else {
    form($param);
    // form always writes footer and exits
}
echo html_footer_bootstrap3();
exit;
function get_return_path($mailto)
{
    return "shabbat-return+" . strtr($mailto, "@", "=") . "@hebcal.com";
}
function echo_lead_text()
{
    global $echoed_lead_text;
    if (!$echoed_lead_text) {
        ?>
开发者ID:ardis196658,项目名称:dotcom,代码行数:31,代码来源:index.php


示例12: switch

 if (empty($user_id)) {
     $user_id = $_SESSION["user_id"];
 }
 switch ($action) {
     // case 'subscribe': echo "Action: " . $action . " title: " . $title;//subscribe($title);
     case 'subscribe':
         subscribe($title, $mysqli);
         break;
     case 'remove_user':
         remove_user($user_id, $mysqli);
         break;
     case 'remove_all_users':
         remove_user("", $mysqli);
         break;
     case 'unsubscribe':
         unsubscribe($title, $mysqli, $user_id);
         break;
     case 'query_series':
         db_query_series_json($mysqli, $title);
         break;
     case 'edit_profile':
         edit_user_profile($mysqli, $user_id);
         break;
     case 'update_profile':
         update_user_profile($mysqli, $user_id, $firstname, $lastname, $email);
         break;
     case 'remove_series':
         remove_series($mysqli, $title);
         break;
     case 'remove_all_series':
         remove_series($mysqli, "");
开发者ID:nthakrar,项目名称:DM2517-Project,代码行数:31,代码来源:client.php


示例13: display_login_form

                    display_login_form($action);
                }
                echo "<p>Added to list</p>";
                if (!empty($_POST['cList'])) {
                    foreach ($_POST['cList'] as $item) {
                        echo "<p>" . $item . "</p>";
                        subscribe($item, $_GET['id']);
                    }
                }
            }
            if ($_POST['remove'] == 'Remove from List') {
                $action = '';
                if (!check_admin_user()) {
                    display_login_form($action);
                }
                if (!empty($_POST['cList'])) {
                    foreach ($_POST['cList'] as $item) {
                        echo "<p>" . $item . "</p>";
                        unsubscribe($item, $_GET['id']);
                    }
                }
            }
            break;
    }
}
/**********************************************************************
* Section 4: display footer 
*********************************************************************/
do_html_footer();
?>
 
开发者ID:jamaBHacker,项目名称:TrimartEmailBlasts,代码行数:30,代码来源:index.php


示例14: subscribe

			</fieldset>
		</form>
	</div>

	<p>Unsubscribe Sensors:</p>
	<div id="us_sensor_panel">
		<form action="" method="post">
			<fieldset>
				Enter Sensor ID: <input type="text" name="unsub_sensorid">
				<input type="submit" name="unsubscribe_sensor" value="Unsubscribe">

			</fieldset>
		</form>
	</div>

	<span style="color:green">
	
	
	<?php 
subscribe($conn);
unsubscribe($conn);
?>
	
	</span>
	
	
</body>
</html>


开发者ID:ayunita,项目名称:OOSproject,代码行数:28,代码来源:subscribe.php


示例15: empty

 *  3 - Add comment (anonymously)
 * 11 - List patches
 * 12 - Patch details
 * 13 - Add patch
 *
 * @var integer
 */
$edit = empty($_REQUEST['edit']) || !(int) $_REQUEST['edit'] ? 0 : (int) $_REQUEST['edit'];
if (isset($_GET['unsubscribe'])) {
    $unsubcribe = (int) $_GET['unsubscribe'];
    $hash = isset($_GET['t']) ? $_GET['t'] : false;
    SITE == 'pear' ? $redirect = 'pecl' : ($redirect = 'pear');
    if (!$hash) {
        localRedirect('bug.php?id=' . $id);
    }
    unsubscribe($id, $hash);
    $_GET['thanks'] = 9;
}
// captcha is not necessary if the user is logged in
if (isset($auth_user) && $auth_user && $auth_user->registered && isset($_SESSION['answer'])) {
    unset($_SESSION['answer']);
}
$trytoforce = isset($_POST['trytoforce']) ? (int) $_POST['trytoforce'] : false;
// fetch info about the bug into $bug
if ($dbh->getOne('SELECT handle FROM bugdb WHERE id=?', array($id))) {
    $query = 'SELECT b.id, b.package_name, b.bug_type, b.email, b.handle as bughandle, b.reporter_name,
        b.passwd, b.sdesc, b.ldesc, b.php_version, b.package_version, b.php_os,
        b.status, b.ts1, b.ts2, b.assign, UNIX_TIMESTAMP(b.ts1) AS submitted,
        users.registered,
        UNIX_TIMESTAMP(b.ts2) AS modified,
        COUNT(bug=b.id) AS votes,
开发者ID:stof,项目名称:pearweb,代码行数:31,代码来源:bug.php


示例16: portal_set_newsletters

function portal_set_newsletters($session, $subscribe_ids, $unsubscribe_ids)
{
    global $beanList, $beanFiles;
    $error = new SoapError();
    if (!portal_validate_authenticated($session)) {
        $error->set_error('invalid_session');
        return array('result_count' => -1, 'entry_list' => array(), 'error' => $error->get_soap_array());
    }
    require_once 'modules/Campaigns/utils.php';
    $contact = new Contact();
    $contact->retrieve($_SESSION['user_id']);
    if (!empty($contact->id)) {
        foreach ($subscribe_ids as $campaign_id) {
            subscribe($campaign_id, null, $contact, true);
        }
        foreach ($unsubscribe_ids as $campaign_id) {
            unsubscribe($campaign_id, $contact);
        }
    }
    return $error->get_soap_array();
}
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:21,代码来源:SoapPortalUsers.php


示例17: array

// Init common variables
$errors = array();
// Set edit mode
$edit = isset($_REQUEST['edit']) ? (int) $_REQUEST['edit'] : 0;
// Authenticate
bugs_authenticate($user, $pw, $logged_in, $user_flags);
$is_trusted_developer = $user_flags & BUGS_TRUSTED_DEV;
$is_security_developer = $user_flags & (BUGS_TRUSTED_DEV | BUGS_SECURITY_DEV);
// Handle unsubscription
if (isset($_GET['unsubscribe'])) {
    $unsubcribe = (int) $_GET['unsubscribe'];
    $hash = isset($_GET['t']) ? $_GET['t'] : false;
    if (!$hash) {
        redirect("bug.php?id={$bug_id}");
    }
    unsubscribe($bug_id, $hash);
    $_GET['thanks'] = 9;
}
// Subscription / Unsubscription
if (isset($_POST['subscribe_to_bug']) || isset($_POST['unsubscribe_to_bug'])) {
    // Check if session answer is set, then compare it with the post captcha value.
    // If it's not the same, then it's an incorrect password.
    if (!$logged_in) {
        if (!isset($_SESSION['answer'])) {
            $errors[] = 'Please enable cookies so the Captcha system can work';
        } elseif ($_POST['captcha'] != $_SESSION['answer']) {
            $errors[] = 'Incorrect Captcha';
        }
    }
    if (empty($errors)) {
        if ($logged_in && !empty($auth_user->email)) {
开发者ID:phpsource,项目名称:web-bugs,代码行数:31,代码来源:bug.php


示例18: page_open

if (!class_exists("Template")) {
    include "template.inc";
}
$in_trail = 3;
page_open(array("sess" => "Linktrail_Session", "auth" => "Linktrail_Auth", "perm" => "Linktrail_Perm", "user" => "Linktrail_User"));
$auth->login_if($auth->auth["uid"] == "nobody");
$mytrail = get_node_info($PATH_INFO);
if ($mytrail == -1) {
    $mytrail = get_node_info($PATH_INFO . "?");
}
if (get_notification_method($auth->auth['uname'], $mytrail['id']) != -1) {
    $ft = SFT_CHSUBS;
} else {
    $ft = SFT_SUBSCRIBE;
}
if ($action == "exec") {
    if (isset($unsubscribe)) {
        unsubscribe($auth->auth['uname'], $mytrail['id']);
        $str = "";
        if ($HTTP_POST_VARS['reloadparent'] == "1") {
            $str = "?reloadparent=1";
        }
        // die("Location: ".$sess->url($mytrail['path'].$str));
        header("Location: " . $sess->url($mytrail['path'] . $str));
    } else {
        doit();
    }
} else {
    form($HTTP_GET_VARS['reload_parent'] == "1");
}
page_close();
开发者ID:pilif,项目名称:linktrail,代码行数:31,代码来源:editsubs.php


示例19: switch

}
//all other actions require user to be logged in
if (check_logged_in()) {
    switch ($action) {
        case 'account-settings':
            display_account_form(get_email(), get_real_name(get_email()), get_mimetype(get_email()));
            break;
        case 'show-other-lists':
            display_items('Unsubscribed Lists', get_unsubscribed_lists(get_email()), 'information', 'show-archive', 'subscribe');
            break;
        case 'subscribe':
            subscribe(get_email(), $HTTP_GET_VARS['id']);
            display_items('Subscribed Lists', get_subscribed_lists(get_email()), 'information', 'show-archive', 'unsubscribe');
            break;
        case 'unsubscribe':
            unsubscribe(get_email(), $HTTP_GET_VARS['id']);
            display_items('Subscribed Lists', get_subscribed_lists(get_email()), 'information', 'show-archive', 'unsubscribe');
            break;
        case '':
        case 'show-my-lists':
            display_items('Subscribed Lists', get_subscribed_lists(get_email()), 'information', 'show-archive', 'unsubscribe');
            break;
        case 'change-password':
            display_password_form();
            break;
        case 'store-change-password':
            if (change_password(get_email(), $HTTP_POST_VARS['old_passwd'], $HTTP_POST_VARS['new_passwd'], $HTTP_POST_VARS['new_passwd2'])) {
                echo '<p>OK: Password changed.</p>
                <br /><br /><br /><br /><br /><br />';
            } else {
                echo '<p>Sorry, your password could not be changed.</p>';
开发者ID:andersonbporto,项目名称:programacao_internet_2015_1,代码行数:31,代码来源:index.php


示例20: mysql_query

        $result = mysql_query($sql, $con);
        echo $email . ' has been removed from the mailing list';
    }
    mysql_close($con);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Unsubscribe </title>
<meta name="description" content="Unsubscribe from Marty's mailing list" />

<?php 
include_once 'head.php';
?>


</head>
<body>
<?php 
include_once 'top.php';
?>
	<div class="row">
			<div class="hero-unit">
			<h1>Unsubscribe</h1><hr/>
  <?php 
unsubscribe();
?>
</div></div>
<?php 
include_once 'footer.php';
开发者ID:bradleytrager,项目名称:bais-mordechai-legacy,代码行数:31,代码来源:un_subscribe.php



注:本文中的unsubscribe函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP untrailingslashit函数代码示例发布时间:2022-05-23
下一篇:
PHP unstick_post函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap