当前位置: 首页>>代码示例>>PHP>>正文


PHP Observer::Raise方法代码示例

本文整理汇总了PHP中Observer::Raise方法的典型用法代码示例。如果您正苦于以下问题:PHP Observer::Raise方法的具体用法?PHP Observer::Raise怎么用?PHP Observer::Raise使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Observer的用法示例。


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

示例1: array

            PageEngine::runController("answer_edit", array("id" => $treffer[1] + 0));
            PageEngine::html("page_answer_edit", array("id" => $treffer[1] + 0));
            exit(1);
    }
}
if (preg_match("@^/badges/([0-9]+)/[^\\/]+(/[a-z]+)?\$@", $_SERVER["REQUEST_URIpure"], $treffer)) {
    PageEngine::html("page_badgeprofile", array("badge_id" => $treffer["1"] + 0));
    exit(1);
}
if (preg_match("@^/tags/(.*?)(/[a-z\\/]+)?\$@", $_SERVER["REQUEST_URIpure"], $treffer)) {
    switch (isset($treffer[2]) ? $treffer[2] : "/info") {
        case "/info":
            PageEngine::runController("tags_info", array("id" => $treffer[1]));
            PageEngine::html("page_tags_info", array("id" => $treffer[1]));
            exit(1);
        case "/info/edit":
            if ((!MyUser::isloggedin() or MyUser::getKarmaPoints() < 2500) and !MyUser::hasAdminRight()) {
                PageEngine::html("page_error_karma", array("karma" => 2500));
            }
            PageEngine::runController("tags_infoedit", array("id" => $treffer[1]));
            PageEngine::html("page_tags_infoedit", array("id" => $treffer[1]));
            exit(1);
        case "/synonyms":
            PageEngine::runController("tags_synonyms", array("id" => $treffer[1]));
            PageEngine::html("page_tags_synonyms", array("id" => $treffer[1]));
            exit(1);
    }
}
Observer::Raise("Error_404", array("path" => $_SERVER["REQUEST_URIpure"]));
PageEngine::html("page_404");
exit(1);
开发者ID:andreaskasper,项目名称:askbot_php,代码行数:31,代码来源:routing.php

示例2: date

echo date("Y-m-d");
?>
T01:00:00+01:00</lastmod>
    <changefreq>daily</changefreq>
    <priority>.1</priority>
</url>
<url>
    <loc><?php 
echo $_ENV["baseurl"];
?>
users</loc>
    <lastmod><?php 
echo date("Y-m-d");
?>
T01:00:00+01:00</lastmod>
    <changefreq>daily</changefreq>
    <priority>.1</priority>
</url>
<url>
    <loc><?php 
echo $_ENV["baseurl"];
?>
badges</loc>
    <lastmod>2012-01-01T01:00:00+01:00</lastmod>
    <changefreq>weekly</changefreq>
    <priority>.1</priority>
</url>
</urlset>
<?php 
Observer::Raise("XML_Sitemap_Created", array("Remote_IP" => isset($_SERVER["REMOTE_ADDR"]) ? $_SERVER["REMOTE_ADDR"] : "", "Remote_Host" => isset($_SERVER["REMOTE_HOST"]) ? $_SERVER["REMOTE_ADDR"] : "", "count_urls" => count($rows) + 1));
开发者ID:andreaskasper,项目名称:askbot_php,代码行数:30,代码来源:xml_sitemap.php

示例3: strtolower

        $w["username"] = $_POST["username"];
        $w["email_standard"] = strtolower($_POST["email"]);
        $w["dt_registered"] = time();
        $db->Create(0, "user_list", $w);
        $userid = $db->LastInsertKey();
        $w2 = array();
        $w2["username"] = "user[" . $userid . "]";
        $w2["pwd"] = md5($passwort);
        $w2["provider"] = "local";
        $w2["user"] = $userid;
        $db->Create(0, "user_login", $w2);
        $mail = new PHPMailer();
        $mail->SetFrom('no-reply@' . $_SERVER["HTTP_HOST"], 'Registrierung ' . SiteConfig::val("page/title"));
        $mail->AddAddress($_POST["email"], $w["username"]);
        $local = PageEngine::html_find("email_register", ".tpl");
        $body = file_get_contents($local);
        $body = str_replace(array("{{password}}", "{{page_title}}"), array($passwort, SiteConfig::val("page/title", "Q/A Forum")), $body);
        $mail->Subject = "Deine Registrierung bei " . SiteConfig::val("page/title");
        $mail->AltBody = 'Vielen Dank für Deine Registrierung,
wir schicken Dir nun Deine Zugangsdaten für ' . SiteConfig::val("page/title") . '. Solltest Du diese nicht beantragt haben, dann lösche bitte diese Nachricht umgehend, damit nicht Dritte Deine Identität nutzen können.
Passwort: ' . $passwort . '
Wir wünschen Dir viel Spaß auf ' . SiteConfig::val("page/title") . '';
        $mail->MsgHTML($body);
        if (!$mail->Send()) {
            Observer::Raise("Mail_Send_Error", array("errormsg" => $mail->ErrorInfo));
            Observer::Raise("Register_Error", array("errormsg" => "No Mail send", "errormsg" => $mail->ErrorInfo));
            PageEngine::AddErrorMessage("register", "Fehler beim senden der E-Mail (" . $mail->ErrorInfo . ").");
        }
        PageEngine::AddSuccessMessage("register", "Neuer User angelegt... Bitte prüfe Deine E-Mails!");
    }
}
开发者ID:andreaskasper,项目名称:askbot_php,代码行数:31,代码来源:register.php


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