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


PHP Newsletter::set方法代码示例

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


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

示例1: Newsletter

// Exec actions
$oNewsletter = new Newsletter();
$oNewsletter->loadByPrimaryKey($idnewsletter);
if ($oNewsletter->virgin == false && $oNewsletter->get("idclient") == $client && $oNewsletter->get("idlang") == $lang) {
    // Check and set values
    if (!is_numeric($_REQUEST["selTemplate"])) {
        $_REQUEST["selTemplate"] = 0;
    }
    // Saving message changes; note, that if a user doesn't have the right to save the
    // text message he may still have the right to change the html article. To prevent
    // changing the html article, give the user only read access right for the newsletter
    // article category - the article will be shown also, if he doesn't have any rights at all...
    if ($action == "news_save" && $perm->have_perm_area_action("news", $action)) {
        // Changing e.g. \' back to ' (magic_quotes)
        $sMessage = Contenido_Security::unescapeDB($_REQUEST["txtMessage"]);
        $oNewsletter->set("message", $sMessage);
        if ($oNewsletter->get("template_idart") != $_REQUEST["selTemplate"]) {
            if ($oNewsletter->get("idart") > 0) {
                // Template has been changed: Delete old article
                // (this discards the current html content as it deletes the existing newsletter article)
                conDeleteArt($oNewsletter->get("idart"));
                $iIDArt = 0;
            }
            if ($_REQUEST["selTemplate"] > 0) {
                // Template has been changed, but specified: Store template article as new newsletter article
                $iIDArt = conCopyArticle($_REQUEST["selTemplate"], $oClientLang->getProperty("newsletter", "html_newsletter_idcat"), sprintf(i18n("Newsletter: %s", $plugin_name), $oNewsletter->get("name")));
                conMakeOnline($iIDArt, $lang);
                // Article has to be online for sending...
            }
            $oNewsletter->set("idart", $iIDArt);
            $oNewsletter->set("template_idart", $_REQUEST["selTemplate"]);
开发者ID:Spider-IT-Deutschland,项目名称:drugCMS-Plugin_newsletter,代码行数:31,代码来源:include.newsletter_edit_message.php


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