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

PHP logEvent函数代码示例

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

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



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

示例1: ProcessError

function ProcessError($message)
{
    print "{$message}";
    logEvent("Error: {$message}");
    finish("error", $message);
    exit;
}
开发者ID:alancohen,项目名称:alancohenexperience-com,代码行数:7,代码来源:getrss.php


示例2: deleteImages

function deleteImages($id)
{
    global $portfolioFolder;
    foreach (glob("{$portfolioFolder}/{$id}-*") as $filename) {
        unlink($filename);
    }
    logEvent("delete-images", $id);
}
开发者ID:haleystorm,项目名称:paradise,代码行数:8,代码来源:image-processing.php


示例3: setForceLogout

function setForceLogout($uid)
{
    global $mysqli;
    $fl = '' . time() . ',' . $_SERVER['REMOTE_ADDR'] . '';
    $M_query = "UPDATE users SET forcelogout='{$fl}' WHERE id='" . $uid . "';";
    error_log($M_query);
    $M_result = $mysqli->query($M_query);
    logEvent('users', 'force-logout', encodeHex("SESSION: ['" . implode("','", array_keys($_SESSION)) . "'], {'" . implode("', '", $_SESSION) . "'}, POST: ['" . implode("','", array_keys($_POST)) . "'], {'" . implode("', '", $_POST) . "'}, M_query: `{$M_query}`"));
}
开发者ID:NasalMusician,项目名称:Pantheum,代码行数:9,代码来源:users.php


示例4: workaroundToUpgradePortfolio

function workaroundToUpgradePortfolio()
{
    global $portfolioFolder;
    foreach (glob("{$portfolioFolder}/*-db.json") as $dbFilename) {
        $db = readDb($dbFilename);
        $db->sort = isset($db->sort) ? $db->sort : intval($db->id) * 10000;
        $db->original = isset($db->original) ? $db->original : $db->{"original-file-name"};
        $db->uploaded = isset($db->uploaded) ? $db->uploaded : $db->{"upload-date"};
        $db->display = isset($db->display) ? $db->display === "on" || $db->display === true : true;
        saveDb($dbFilename, $db);
    }
    logEvent("portfolio-upgrade-done", "last-image", $db->id, $db);
}
开发者ID:haleystorm,项目名称:paradise,代码行数:13,代码来源:startup.php


示例5: logout

    function logout(){
		logEvent('LOGOUT', $_SESSION['CurrentUser']['mid'], $_SESSION['CurrentUser']['mid'],
			addslashes($_SESSION['CurrentUser']['title'] . ' ' . $_SESSION['CurrentUser']['firstnames'] . ' ' . $_SESSION['CurrentUser']['surname']));
		foreach($_SESSION as $key => $val){
            unset($_SESSION[$key]);
        }
        		
		$msg = 'Thank you for using Pusthaka.<br>' .
			'We are always looking for ways to improve your experience with the UCSC Library and we ' .
			'welcome your suggestions as to how we may do so.<br>' .
			'Please send us your comments by email to ' . "<a href='mailto:[email protected]'>[email protected]</a><br>";
		$title = 'Thank You';
		$backlink = 'index.php';
		$backlinkTitle = 'Go Back to Pusthaka Home Page';
		displayMsg($msg, $title, $backlink, $backlinkTitle);		
    }
开发者ID:nalaka,项目名称:pusthaka1,代码行数:16,代码来源:Security.php


示例6: runGpio

function runGpio($cmd, $pin, $args = '')
{
    if ($cmd == 'write') {
        logEvent($pin, $args);
    }
    exec("/usr/bin/gpio mode {$pin} out", $out, $status);
    $status = NULL;
    $out = NULL;
    exec("/usr/bin/gpio {$cmd} {$pin} {$args}", $out, $status);
    if ($status) {
        print "<p class='error'>Failed to execute /usr/bin/gpio {$cmd} {$pin} {$args}: Status {$status}</p>\n";
    }
    if (is_array($out) && count($out) > 0) {
        return $out[0];
    } else {
        return NULL;
    }
}
开发者ID:johan--,项目名称:rasptimer,代码行数:18,代码来源:functions.php


示例7: send

    function send($to_name = "", $to_addr, $from_name, $from_addr, $subject = '', $headers = '',$envelope = '') {
    	$this->From = $from_addr;
			$this->FromName = $from_name;
      if (ereg("dev",VERSION)) {
      	# make sure we are not sending out emails to real users
        # when developing
      	$this->AddAddress('[email protected]');
      } else {
      	$this->AddAddress($to_addr);
      }
      $this->Subject = $subject;
      if(!parent::Send()) {
        #echo "Message was not sent <p>";
        logEvent("Mailer Error: " . $this->ErrorInfo);
        return 0;
      }#
      return 1;
    }
开发者ID:radicaldesigns,项目名称:amp,代码行数:18,代码来源:class.phplistmailer.php


示例8: send

 function send($to_name = "", $to_addr, $from_name, $from_addr, $subject = '', $headers = '', $envelope = '')
 {
     $this->From = $from_addr;
     $this->FromName = $from_name;
     if (strstr(VERSION, "dev")) {
         # make sure we are not sending out emails to real users
         # when developing
         $this->AddAddress($GLOBALS["developer_email"]);
     } else {
         $this->AddAddress($to_addr);
     }
     $this->Subject = $subject;
     if (!parent::Send()) {
         #echo "Message was not sent <p>";
         logEvent("Mailer Error: " . $this->ErrorInfo);
         return 0;
     }
     #
     return 1;
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:20,代码来源:class.phplistmailer.php


示例9: resendConfirm

function resendConfirm($id)
{
    global $tables, $envelope, $prepend;
    $userdata = Sql_Fetch_Array_Query("select * from {$tables["user"]} where id = {$id}");
    $lists_req = Sql_Query(sprintf('select %s.name from %s,%s where 
  	%s.listid = %s.id and %s.userid = %d', $tables["list"], $tables["list"], $tables["listuser"], $tables["listuser"], $tables["list"], $tables["listuser"], $id));
    while ($row = Sql_Fetch_Row($lists_req)) {
        $lists .= '  * ' . $row[0] . "\n";
    }
    if ($userdata["subscribepage"]) {
        $subscribemessage = ereg_replace('\\[LISTS\\]', $lists, getUserConfig("subscribemessage:" . $userdata["subscribepage"], $id));
        $subject = getConfig("subscribesubject:" . $userdata["subscribepage"]);
    } else {
        $subscribemessage = ereg_replace('\\[LISTS\\]', $lists, getUserConfig("subscribemessage", $id));
        $subject = getConfig("subscribesubject");
    }
    logEvent("Resending confirmation request to " . $userdata["email"]);
    if (!TEST) {
        return sendMail($userdata["email"], $subject, $prepend . $subscribemessage, system_messageheaders($userdata["email"]), $envelope);
    }
}
开发者ID:radicaldesigns,项目名称:amp,代码行数:21,代码来源:reconcileusers.php


示例10: resendConfirm

function resendConfirm($id)
{
    global $tables, $envelope;
    $userdata = Sql_Fetch_Array_Query("select * from {$tables['user']} where id = {$id}");
    $lists_req = Sql_Query(sprintf('select %s.name from %s,%s where
    %s.listid = %s.id and %s.userid = %d', $tables['list'], $tables['list'], $tables['listuser'], $tables['listuser'], $tables['list'], $tables['listuser'], $id));
    while ($row = Sql_Fetch_Row($lists_req)) {
        $lists .= '  * ' . $row[0] . "\n";
    }
    if ($userdata['subscribepage']) {
        $subscribemessage = str_replace('[LISTS]', $lists, getUserConfig('subscribemessage:' . $userdata['subscribepage'], $id));
        $subject = getConfig('subscribesubject:' . $userdata['subscribepage']);
    } else {
        $subscribemessage = str_replace('[LISTS]', $lists, getUserConfig('subscribemessage', $id));
        $subject = getConfig('subscribesubject');
    }
    logEvent($GLOBALS['I18N']->get('Resending confirmation request to') . ' ' . $userdata['email']);
    if (!TEST) {
        return sendMail($userdata['email'], $subject, $_REQUEST['prepend'] . $subscribemessage, system_messageheaders($userdata['email']), $envelope);
    }
}
开发者ID:gillima,项目名称:phplist3,代码行数:21,代码来源:reconcileusers.php


示例11: Pwd

    $contactId = $contactsNew->insertIntoDB();
    // Insert into DB
    $pwdNew = new Pwd();
    $pwdNew->setUsr($logon);
    $pwdNew->setContactsid($contactId);
    $pwdNew->setSeclev(100);
    $pwdNew->setPw(mkPwd($pw));
    file_put_contents('/etc/athenace/pwd', "{$_POST['custid']}\t{$_POST['suppid']}\t{$logon}\t{$pw}\n", FILE_APPEND);
    // Dont add to the Password table unless they have a custid or a suppid
    if (isset($_POST['custid']) && $_POST['custid'] > 0 || isset($_POST['suppid']) && $_POST['suppid'] > 0) {
        $pwdNew->insertIntoDB();
    } else {
        // Not adding to passwd table
        // i.e contacts not associated with a customer or supplier cant log in
    }
    $logresult = logEvent(6, $logContent);
    header("Location: /contacts/?Added=" . $result['id']);
    exit;
}
include "../tmpl/header.php";
if (isset($_GET['FromAddCustomer'])) {
    ?>

<div id=help>Your new Customer has been saved. You can now add a contact for this Customer</div>

<?php 
}
?>
<h1>Add a New Contact</h1>

<form role="form" action="<?php 
开发者ID:athenasystems,项目名称:athena,代码行数:31,代码来源:add.php


示例12: sprintf

     $report .= sprintf('<br/>' . $GLOBALS['I18N']->get('%d duplicate emails found.'), $count["duplicate"]);
 }
 if ($_SESSION["overwrite"] == "yes") {
     $report .= sprintf('<br/>' . $GLOBALS['I18N']->get('Subscriber data was updated for %d subscribers'), $count["dataupdate"]);
 }
 if ($count['foundblacklisted']) {
     $report .= sprintf('<br/>' . $GLOBALS['I18N']->get('%s emails were on the blacklist and have not been added to the lists'), $count["foundblacklisted"]);
 }
 $report .= sprintf('<br/>' . $GLOBALS['I18N']->get('%d subscribers were matched by foreign key, %d by email'), $count["fkeymatch"], $count["emailmatch"]);
 if (!$GLOBALS['commandline']) {
     print $report;
     if (function_exists('sendmail')) {
         sendMail(getConfig("admin_address"), $GLOBALS['I18N']->get('phplist Import Results'), $report);
     }
     if (function_exists('logevent')) {
         logEvent($report);
     }
     foreach ($GLOBALS['plugins'] as $pluginname => $plugin) {
         $plugin->importReport($report);
     }
 } else {
     output($report);
 }
 $htmlupdate = $report . '<br/>' . PageLinkButton("import2", s('Import some more emails'));
 $htmlupdate = str_replace("'", "\\'", $htmlupdate);
 clearImport();
 $status = '<script type="text/javascript">
   var parentJQuery = window.parent.jQuery;
   parentJQuery("#progressbar").progressbar("destroy");
   parentJQuery("#busyimage").hide();
   parentJQuery("#progresscount").html(\'' . $htmlupdate . '\');
开发者ID:Gerberus,项目名称:phplist3,代码行数:31,代码来源:import2.php


示例13: precacheMessage

function precacheMessage($messageid, $forwardContent = 0)
{
    global $cached;
    $domain = getConfig('domain');
    #    $message = Sql_query("select * from {$GLOBALS["tables"]["message"]} where id = $messageid");
    #    $cached[$messageid] = array();
    #    $message = Sql_fetch_array($message);
    $message = loadMessageData($messageid);
    ## the reply to is actually not in use
    if (preg_match("/([^ ]+@[^ ]+)/", $message["replyto"], $regs)) {
        # if there is an email in the from, rewrite it as "name <email>"
        $message["replyto"] = str_replace($regs[0], "", $message["replyto"]);
        $cached[$messageid]["replytoemail"] = $regs[0];
        # if the email has < and > take them out here
        $cached[$messageid]["replytoemail"] = str_replace("<", "", $cached[$messageid]["replytoemail"]);
        $cached[$messageid]["replytoemail"] = str_replace(">", "", $cached[$messageid]["replytoemail"]);
        # make sure there are no quotes around the name
        $cached[$messageid]["replytoname"] = str_replace('"', "", ltrim(rtrim($message["replyto"])));
    } elseif (strpos($message["replyto"], " ")) {
        # if there is a space, we need to add the email
        $cached[$messageid]["replytoname"] = $message["replyto"];
        $cached[$messageid]["replytoemail"] = "listmaster@{$domain}";
    } else {
        if (!empty($message["replyto"])) {
            $cached[$messageid]["replytoemail"] = $message["replyto"] . "@{$domain}";
            ## makes more sense not to add the domain to the word, but the help says it does
            ## so let's keep it for now
            $cached[$messageid]["replytoname"] = $message["replyto"] . "@{$domain}";
        }
    }
    $cached[$messageid]["fromname"] = $message["fromname"];
    $cached[$messageid]["fromemail"] = $message["fromemail"];
    $cached[$messageid]["to"] = $message["tofield"];
    #0013076: different content when forwarding 'to a friend'
    $cached[$messageid]["subject"] = $forwardContent ? stripslashes($message["forwardsubject"]) : $message["subject"];
    #0013076: different content when forwarding 'to a friend'
    $cached[$messageid]["content"] = $forwardContent ? stripslashes($message["forwardmessage"]) : $message["message"];
    if (USE_MANUAL_TEXT_PART && !$forwardContent) {
        $cached[$messageid]["textcontent"] = $message["textmessage"];
    } else {
        $cached[$messageid]["textcontent"] = '';
    }
    #  var_dump($cached);exit;
    #0013076: different content when forwarding 'to a friend'
    $cached[$messageid]["footer"] = $forwardContent ? stripslashes($message["forwardfooter"]) : $message["footer"];
    if (strip_tags($cached[$messageid]["footer"]) != $cached[$messageid]["footer"]) {
        $cached[$messageid]["textfooter"] = HTML2Text($cached[$messageid]["footer"]);
        $cached[$messageid]["htmlfooter"] = $cached[$messageid]["footer"];
    } else {
        $cached[$messageid]["textfooter"] = $cached[$messageid]["footer"];
        $cached[$messageid]["htmlfooter"] = parseText($cached[$messageid]["footer"]);
    }
    $cached[$messageid]["htmlformatted"] = strip_tags($cached[$messageid]["content"]) != $cached[$messageid]["content"];
    $cached[$messageid]["sendformat"] = $message["sendformat"];
    if ($message["template"]) {
        $req = Sql_Fetch_Row_Query("select template from {$GLOBALS["tables"]["template"]} where id = {$message["template"]}");
        $cached[$messageid]["template"] = stripslashes($req[0]);
        $cached[$messageid]["templateid"] = $message["template"];
        #   dbg("TEMPLATE: ".$req[0]);
    } else {
        $cached[$messageid]["template"] = '';
        $cached[$messageid]["templateid"] = 0;
    }
    ## @@ put this here, so it can become editable per email sent out at a later stage
    $cached[$messageid]["html_charset"] = 'UTF-8';
    #getConfig("html_charset");
    ## @@ need to check on validity of charset
    if (!$cached[$messageid]["html_charset"]) {
        $cached[$messageid]["html_charset"] = 'UTF-8';
        #'iso-8859-1';
    }
    $cached[$messageid]["text_charset"] = 'UTF-8';
    #getConfig("text_charset");
    if (!$cached[$messageid]["text_charset"]) {
        $cached[$messageid]["text_charset"] = 'UTF-8';
        #'iso-8859-1';
    }
    ## if we are sending a URL that contains user attributes, we cannot pre-parse the message here
    ## but that has quite some impact on speed. So check if that's the case and apply
    $cached[$messageid]['userspecific_url'] = preg_match('/\\[.+\\]/', $message['sendurl']);
    if (!$cached[$messageid]['userspecific_url']) {
        ## Fetch external content here, because URL does not contain placeholders
        if ($GLOBALS["can_fetchUrl"] && preg_match("/\\[URL:([^\\s]+)\\]/i", $cached[$messageid]["content"], $regs)) {
            $remote_content = fetchUrl($regs[1], array());
            #  $remote_content = fetchUrl($message['sendurl'],array());
            # @@ don't use this
            #      $remote_content = includeStyles($remote_content);
            if ($remote_content) {
                $cached[$messageid]['content'] = str_replace($regs[0], $remote_content, $cached[$messageid]['content']);
                #  $cached[$messageid]['content'] = $remote_content;
                $cached[$messageid]["htmlformatted"] = strip_tags($remote_content) != $remote_content;
                ## 17086 - disregard any template settings when we have a valid remote URL
                $cached[$messageid]["template"] = NULL;
                $cached[$messageid]["templateid"] = NULL;
            } else {
                #print Error(s('unable to fetch web page for sending'));
                logEvent("Error fetching URL: " . $message['sendurl'] . ' cannot proceed');
                return false;
            }
        }
//.........这里部分代码省略.........
开发者ID:bcantwell,项目名称:website,代码行数:101,代码来源:sendemaillib.php


示例14: repeatMessage

function repeatMessage($msgid)
{
    #  if (!USE_REPETITION && !USE_rss) return;
    $data = loadMessageData($msgid);
    ## do not repeat when it has already been done
    if ($data['repeatinterval'] == 0 || !empty($data['repeatedid'])) {
        return;
    }
    # calculate the future embargo, a multiple of repeatinterval minutes after the current embargo
    $msgdata = Sql_Fetch_Array_Query(sprintf('SELECT *,
        embargo +
            INTERVAL (FLOOR(TIMESTAMPDIFF(MINUTE, embargo, GREATEST(embargo, NOW())) / repeatinterval) + 1) * repeatinterval MINUTE AS newembargo
        FROM %s
        WHERE id = %d AND now() < repeatuntil', $GLOBALS['tables']['message'], $msgid));
    if (!$msgdata) {
        logEvent("Message {$msgid} not repeated due to reaching the repeatuntil date");
        return;
    }
    # check whether the new embargo is not on an exclusion
    if (isset($GLOBALS['repeat_exclude']) && is_array($GLOBALS['repeat_exclude'])) {
        $loopcnt = 0;
        while (excludedDateForRepetition($msgdata['newembargo'])) {
            if (++$loopcnt > 15) {
                logEvent("Unable to find new embargo date too many exclusions? for message {$msgid}");
                return;
            }
            $result = Sql_Fetch_Array_Query(sprintf("SELECT '%s' + INTERVAL repeatinterval MINUTE AS newembargo\n            FROM %s\n            WHERE id = %d", $msgdata['newembargo'], $GLOBALS['tables']['message'], $msgid));
            $msgdata['newembargo'] = $result['newembargo'];
        }
    }
    # copy the new message
    Sql_Query(sprintf('
    insert into %s (entered) values(now())', $GLOBALS['tables']['message']));
    $newid = Sql_Insert_id();
    require dirname(__FILE__) . '/structure.php';
    if (!is_array($DBstruct['message'])) {
        logEvent("Error including structure when trying to duplicate message {$msgid}");
        return;
    }
    foreach ($DBstruct['message'] as $column => $rec) {
        if ($column != 'id' && $column != 'entered' && $column != 'sendstart') {
            Sql_Query(sprintf('update %s set %s = "%s" where id = %d', $GLOBALS['tables']['message'], $column, addslashes($msgdata[$column]), $newid));
        }
    }
    $req = Sql_Query(sprintf("SELECT *\n    FROM %s\n    WHERE id = %d AND name NOT IN ('id')", $GLOBALS['tables']['messagedata'], $msgid));
    while ($row = Sql_Fetch_Array($req)) {
        setMessageData($newid, $row['name'], $row['data']);
    }
    Sql_Query(sprintf('update %s set embargo = "%s",status = "submitted",sent = "" where id = %d', $GLOBALS['tables']['message'], $msgdata['newembargo'], $newid));
    list($e['year'], $e['month'], $e['day'], $e['hour'], $e['minute'], $e['second']) = sscanf($msgdata['newembargo'], '%04d-%02d-%02d %02d:%02d:%02d');
    unset($e['second']);
    setMessageData($newid, 'embargo', $e);
    foreach (array('processed', 'astext', 'ashtml', 'astextandhtml', 'aspdf', 'astextandpdf', 'viewed', 'bouncecount') as $item) {
        Sql_Query(sprintf('update %s set %s = 0 where id = %d', $GLOBALS['tables']['message'], $item, $newid));
    }
    # lists
    $req = Sql_Query(sprintf('select listid from %s where messageid = %d', $GLOBALS['tables']['listmessage'], $msgid));
    while ($row = Sql_Fetch_Row($req)) {
        Sql_Query(sprintf('insert into %s (messageid,listid,entered) values(%d,%d,now())', $GLOBALS['tables']['listmessage'], $newid, $row[0]));
    }
    # attachments
    $req = Sql_Query(sprintf('select * from %s,%s where %s.messageid = %d and %s.attachmentid = %s.id', $GLOBALS['tables']['message_attachment'], $GLOBALS['tables']['attachment'], $GLOBALS['tables']['message_attachment'], $msgid, $GLOBALS['tables']['message_attachment'], $GLOBALS['tables']['attachment']));
    while ($row = Sql_Fetch_Array($req)) {
        if (is_file($row['remotefile'])) {
            # if the "remote file" is actually local, we want to refresh the attachment, so we set
            # filename to nothing
            $row['filename'] = '';
        }
        Sql_Query(sprintf('insert into %s (filename,remotefile,mimetype,description,size)
      values("%s","%s","%s","%s",%d)', $GLOBALS['tables']['attachment'], addslashes($row['filename']), addslashes($row['remotefile']), addslashes($row['mimetype']), addslashes($row['description']), $row['size']));
        $attid = Sql_Insert_id();
        Sql_Query(sprintf('insert into %s (messageid,attachmentid) values(%d,%d)', $GLOBALS['tables']['message_attachment'], $newid, $attid));
    }
    logEvent("Message {$msgid} was successfully rescheduled as message {$newid}");
    ## remember we duplicated, in order to avoid doing it again (eg when requeuing)
    setMessageData($msgid, 'repeatedid', $newid);
    if (getConfig('pqchoice') == 'phplistdotcom') {
        activateRemoteQueue();
    }
}
开发者ID:gillima,项目名称:phplist3,代码行数:80,代码来源:connect.php


示例15: logEvent

require_once "authlib.php";
$code = $_POST['ccode'];
$oldCode = $_POST['oldCode'];
$perms = $_POST['perms'];
$user = null;
if (!empty($oldCode) && hasPerm("codes.edit", $user)) {
    logEvent($conn, $logTable, "Changed SeaCode {$oldCode} to {$code}");
    $cmd = $conn->prepare("update {$codeTable} set codename = :code, perms = :perms \n\t\twhere codename = :oldCode");
    $cmd->bindParam(":code", $code, PDO::PARAM_STR, 10);
    $cmd->bindParam(":oldCode", $oldCode, PDO::PARAM_STR, 10);
    $cmd->bindParam(":perms", $perms, PDO::PARAM_STR, 100);
    $cmd->execute();
    $conn = $altConn = null;
    header('Location: codelist.php');
    die('');
}
$cmd = $conn->prepare("select userID from {$codeTable} where codename = :code");
$cmd->bindParam(":code", $code, PDO::PARAM_STR, 10);
$cmd->execute();
$results = $cmd->fetchAll();
if (count($results) === 0 && hasPerm("codes.add", $user)) {
    logEvent($conn, $logTable, "Added new SeaCode {$code}");
    $cmd = $conn->prepare("insert into {$codeTable} (codename, perms) \n\t\tvalues (:code, :perms)");
    $cmd->bindParam(":code", $code, PDO::PARAM_STR, 10);
    $cmd->bindParam(":perms", $perms, PDO::PARAM_STR, 100);
    $cmd->execute();
    header('Location: codelist.php');
} else {
    header('Location: code.php');
}
$conn = $altConn = null;
开发者ID:Jujunol,项目名称:SeaAuth,代码行数:31,代码来源:save-code.php


示例16: processBounceData

function processBounceData($bounceid, $msgid, $userid)
{
    global $tables;
    $useremailQ = Sql_fetch_row_query(sprintf('select email from %s where id = %d', $tables['user'], $userid));
    $useremail = $useremailQ[0];
    if ($msgid === "systemmessage" && !empty($userid)) {
        Sql_Query(sprintf('update %s
      set status = "bounced system message",
      comment = "%s marked unconfirmed"
      where id = %d', $tables["bounce"], $userid, $bounceid));
        logEvent("{$userid} " . $GLOBALS['I18N']->get("system message bounced, user marked unconfirmed"));
        addUserHistory($useremail, $GLOBALS['I18N']->get("Bounced system message"), "\n    <br/>" . $GLOBALS['I18N']->get("User marked unconfirmed") . "\n    <br/><a href=\"./?page=bounce&amp;id={$bounceid}\">" . $GLOBALS['I18N']->get("View Bounce") . "</a>\n\n    ");
        Sql_Query(sprintf('update %s
      set confirmed = 0
      where id = %d', $tables["user"], $userid));
    } elseif (!empty($msgid) && !empty($userid)) {
        ## check if we already have this um as a bounce
        ## so that we don't double count "delayed" like bounces
        $exists = Sql_Fetch_Row_Query(sprintf('select count(*) from %s where user = %d and message = %d', $tables["user_message_bounce"], $userid, $msgid));
        if (empty($exists[0])) {
            Sql_Query(sprintf('insert into %s
        set user = %d, message = %d, bounce = %d', $tables["user_message_bounce"], $userid, $msgid, $bounceid));
            Sql_Query(sprintf('update %s
        set status = "bounced list message %d",
        comment = "%s bouncecount increased"
        where id = %d', $tables["bounce"], $msgid, $userid, $bounceid));
            Sql_Query(sprintf('update %s
        set bouncecount = bouncecount + 1
        where id = %d', $tables["message"], $msgid));
            Sql_Query(sprintf('update %s
        set bouncecount = bouncecount + 1
        where id = %d', $tables["user"], $userid));
        } else {
            ## we create the relationship, but don't increase counters
            Sql_Query(sprintf('insert into %s
        set user = %d, message = %d, bounce = %d', $tables["user_message_bounce"], $userid, $msgid, $bounceid));
            ## we cannot translate this text
            Sql_Query(sprintf('update %s
        set status = "duplicate bounce for %d",
        comment = "duplicate bounce for subscriber %d on message %d"
        where id = %d', $tables["bounce"], $userid, $userid, $msgid, $bounceid));
        }
    } elseif ($userid) {
        Sql_Query(sprintf('update %s
      set status = "bounced unidentified message",
      comment = "%s bouncecount increased"
      where id = %d', $tables["bounce"], $userid, $bounceid));
        Sql_Query(sprintf('update %s
      set bouncecount = bouncecount + 1
      where id = %d', $tables["user"], $userid));
    } elseif ($msgid === 'systemmessage') {
        Sql_Query(sprintf('update %s
      set status = "bounced system message",
      comment = "unknown user"
      where id = %d', $tables["bounce"], $bounceid));
        logEvent("{$userid} " . $GLOBALS['I18N']->get("system message bounced, but unknown user"));
    } elseif ($msgid) {
        Sql_Query(sprintf('update %s
      set status = "bounced list message %d",
      comment = "unknown user"
      where id = %d', $tables["bounce"], $msgid, $bounceid));
        Sql_Query(sprintf('update %s
      set bouncecount = bouncecount + 1
      where id = %d', $tables["message"], $msgid));
    } else {
        Sql_Query(sprintf('update %s
      set status = "unidentified bounce",
      comment = "not processed"
      where id = %d', $tables["bounce"], $bounceid));
        return false;
    }
    return true;
}
开发者ID:narareddy,项目名称:phplist3,代码行数:73,代码来源:processbounces.php


示例17: forwardPage


//.........这里部分代码省略.........
                } elseif (isBlackListed($email)) {
                    $info .= $GLOBALS['strForwardBlacklistedEmail'];
                } else {
                    if (!TEST) {
                        # forward the message
                        # sendEmail will take care of blacklisting
                        ### CHECK $email vs $forwardemail
                        if (sendEmail($mid, $email, 'forwarded', $userdata['htmlemail'], array(), $userdata)) {
                            $info .= $GLOBALS['strForwardSuccessInfo'];
                            sendAdminCopy(s('Message Forwarded'), s('%s has forwarded message %d to %s', $userdata['email'], $mid, $email), $messagelists);
                            Sql_Query(sprintf('insert into %s (user,message,forward,status,time)
                 values(%d,%d,"%s","sent",now())', $tables['user_message_forward'], $userdata['id'], $mid, $email));
                            if ($iCountFriends) {
                                ++$nFriends;
                            }
                        } else {
                            $info .= $GLOBALS['strForwardFailInfo'];
                            sendAdminCopy(s('Message Forwarded'), s('%s tried forwarding message %d to %s but failed', $userdata['email'], $mid, $email), $messagelists);
                            Sql_Query(sprintf('insert into %s (user,message,forward,status,time)
                values(%d,%d,"%s","failed",now())', $tables['user_message_forward'], $userdata['id'], $mid, $email));
                            $ok = false;
                        }
                    }
                }
            }
            # foreach friend
            if ($iCountFriends) {
                saveUserAttribute($userdata['id'], $iCountFriends, array('name' => FORWARD_FRIEND_COUNT_ATTRIBUTE, 'value' => $nFriends));
            }
        }
        #ok & emails
    } else {
        # no valid sender
        logEvent(s('Forward request from invalid user ID: %s', substr($_REQUEST['uid'], 0, 150)));
        $info .= '<BR />' . $GLOBALS['strForwardFailInfo'];
        $ok = false;
    }
    /*
      $data = PageData($id);
      if (isset($data['language_file']) && is_file(dirname(__FILE__).'/texts/'.basename($data['language_file']))) {
        @include dirname(__FILE__).'/texts/'.basename($data['language_file']);
      }
    */
    ## BAS Multiple Forward
    ## build response page
    $form = '<form method="post" action="">';
    $form .= sprintf('<input type=hidden name="mid" value="%d">', $mid);
    $form .= sprintf('<input type=hidden name="id" value="%d">', $id);
    $form .= sprintf('<input type=hidden name="uid" value="%s">', $userdata['uniqid']);
    $form .= sprintf('<input type=hidden name="p" value="forward">');
    if (!$ok) {
        #0011860: forward to friend, multiple emails
        if (FORWARD_EMAIL_COUNT == 1) {
            $form .= '<br /><h2>' . $GLOBALS['strForwardEnterEmail'] . '</h2>';
            $form .= sprintf('<input type=text name="email" value="%s" size=50 class="attributeinput">', $forwardemail);
        } else {
            $form .= '<br /><h2>' . sprintf($GLOBALS['strForwardEnterEmails'], FORWARD_EMAIL_COUNT) . '</h2>';
            $form .= sprintf('<textarea name="email" rows="10" cols="50" class="attributeinput">%s</textarea>', $forwardemail);
        }
        #0011996: forward to friend - personal message
        if (FORWARD_PERSONAL_NOTE_SIZE) {
            $form .= sprintf('<h2>' . $GLOBALS['strForwardPersonalNote'] . '</h2>', FORWARD_PERSONAL_NOTE_SIZE);
            $cols = 50;
            $rows = min(10, ceil(FORWARD_PERSONAL_NOTE_SIZE / 40));
            $form .= sprintf('<br/><textarea type="text" name="personalNote" rows="%d" cols="%d" class="attributeinput">%s</textarea>', $rows, $cols, $personalNote);
        }
开发者ID:gillima,项目名称:phplist3,代码行数:67,代码来源:index.php


示例18: base64_decode

<?php

//Setup Connection and check authorization
require_once "authlib.php";
if (hasPerm("codes.clear")) {
    //Check if a UserID is specified
    $code = base64_decode($_GET['ccode']);
    //Grab the user and set address to null
    logEvent($conn, $logTable, "Cleared SeaCode {$code}");
    $cmd = $conn->prepare("update {$codeTable} set userID = null where codename = :code");
    $cmd->bindParam(":code", $code, PDO::PARAM_INT);
    $cmd->execute();
}
//Disconnect
$conn = $altConn = null;
header('Location: codelist.php');
开发者ID:Jujunol,项目名称:SeaAuth,代码行数:16,代码来源:clear-code.php


示例19: chkCookie

copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
include "/srv/athenace/lib/shared/common.php";
if (isset($_GET['pg']) && $_GET['pg'] == 'logout') {
    $loggedin = chkCookie();
    logEvent("30", $loggedin);
    killCookie();
    header("Location: {$www_url}");
    exit;
}
$token = base64_decode($_GET['t']);
$parts = preg_split('/\\|/', decrypt($token));
$usr = $parts[0];
$pw = $parts[1];
// $staffid = pass ( $usr, $pw, 'staff' );
if (!isset($_POST['pt']) || $_POST['pt'] == '') {
    $staffid = pass($usr, $pw, 'staff');
} else {
    $cke = base64_decode($_POST['pt']);
    $keywords = preg_split("/\\./", $cke);
    if ($keywords[4] == 'ATHENASECCHK') {
开发者ID:athenasystems,项目名称:athena,代码行数:31,代码来源:pass.php


示例20: postLogin

 public function postLogin(Request $request)
 {
     logEvent('user-logged-in', '[User=' . $request->email . ']' . ', User-Agent=[' . $request->header('User-Agent') . ']');
     return $this->login($request);
 }
开发者ID:kawsuj,项目名称:knock,代码行数:5,代码来源:AuthController.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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