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


PHP dcPage::notices方法代码示例

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


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

示例1: gui

 public function gui($url)
 {
     $bls = $this->getServers();
     if (isset($_POST['bls'])) {
         try {
             $this->core->blog->settings->addNamespace('antispam');
             $this->core->blog->settings->antispam->put('antispam_dnsbls', $_POST['bls'], 'string', 'Antispam DNSBL servers', true, false);
             dcPage::addSuccessNotice(__('The list of DNSBL servers has been succesfully updated.'));
             http::redirect($url);
         } catch (Exception $e) {
             $core->error->add($e->getMessage());
         }
     }
     /* DISPLAY
     		---------------------------------------------- */
     $res = dcPage::notices();
     $res .= '<form action="' . html::escapeURL($url) . '" method="post" class="fieldset">' . '<h3>' . __('IP Lookup servers') . '</h3>' . '<p><label for="bls">' . __('Add here a coma separated list of servers.') . '</label>' . form::textarea('bls', 40, 3, html::escapeHTML($bls), 'maximal') . '</p>' . '<p><input type="submit" value="' . __('Save') . '" />' . $this->core->formNonce() . '</p>' . '</form>';
     return $res;
 }
开发者ID:nikrou,项目名称:dotclear,代码行数:19,代码来源:class.dc.filter.iplookup.php

示例2: gui

 public function gui($url)
 {
     global $default_tab;
     $core =& $this->core;
     # Set current type and tab
     $ip_type = 'black';
     if (!empty($_REQUEST['ip_type']) && $_REQUEST['ip_type'] == 'white') {
         $ip_type = 'white';
     }
     $default_tab = 'tab_' . $ip_type;
     # Add IP to list
     if (!empty($_POST['addip'])) {
         try {
             $global = !empty($_POST['globalip']) && $core->auth->isSuperAdmin();
             $this->addIP($ip_type, $_POST['addip'], $global);
             dcPage::addSuccessNotice(__('IP address has been successfully added.'));
             http::redirect($url . '&ip_type=' . $ip_type);
         } catch (Exception $e) {
             $core->error->add($e->getMessage());
         }
     }
     # Remove IP from list
     if (!empty($_POST['delip']) && is_array($_POST['delip'])) {
         try {
             $this->removeRule($_POST['delip']);
             dcPage::addSuccessNotice(__('IP addresses have been successfully removed.'));
             http::redirect($url . '&ip_type=' . $ip_type);
         } catch (Exception $e) {
             $core->error->add($e->getMessage());
         }
     }
     /* DISPLAY
     		---------------------------------------------- */
     $res = dcPage::notices();
     $res .= $this->displayForms($url, 'black', __('Blacklist')) . $this->displayForms($url, 'white', __('Whitelist'));
     return $res;
 }
开发者ID:nikrou,项目名称:dotclear,代码行数:37,代码来源:class.dc.filter.ip.php

示例3: __

if (empty($tasks)) {
    echo dcPage::breadcrumb(array(__('Plugins') => '', __('Maintenance') => '')) . '<p class="warn">' . __('You have not sufficient permissions to view this page.') . '</p>' . '</body></html>';
    return null;
}
if ($task && ($res = $task->step()) !== null) {
    // Page title
    echo dcPage::breadcrumb(array(__('Plugins') => '', '<a href="' . $p_url . '">' . __('Maintenance') . '</a>' => '', html::escapeHTML($task->name()) => '')) . dcPage::notices();
    // content
    if (substr($res, 0, 1) != '<') {
        $res = sprintf('<p class="step-msg">%s</p>', $res);
    }
    // Intermediate task (task required several steps)
    echo '<div class="step-box" id="' . $task->id() . '">' . '<p class="step-back">' . '<a class="back" href="' . $p_url . '&amp;tab=' . $task->tab() . '#' . $task->tab() . '">' . __('Back') . '</a>' . '</p>' . '<h3>' . html::escapeHTML($task->name()) . '</h3>' . '<form action="' . $p_url . '" method="post">' . $res . '<p class="step-submit">' . '<input type="submit" value="' . $task->task() . '" /> ' . form::hidden(array('task'), $task->id()) . form::hidden(array('code'), (int) $code) . $core->formNonce() . '</p>' . '</form>' . '</div>';
} else {
    // Page title
    echo dcPage::breadcrumb(array(__('Plugins') => '', __('Maintenance') => '')) . dcPage::notices();
    // Simple task (with only a button to start it)
    foreach ($maintenance->getTabs() as $tab_obj) {
        $res_group = '';
        foreach ($maintenance->getGroups() as $group_obj) {
            $res_task = '';
            foreach ($tasks as $t) {
                if (!$t->id() || $t->group() != $group_obj->id() || $t->tab() != $tab_obj->id()) {
                    continue;
                }
                $res_task .= '<p>' . form::radio(array('task', $t->id()), $t->id()) . ' ' . '<label class="classic" for="' . $t->id() . '">' . html::escapeHTML($t->task()) . '</label>';
                // Expired task alert message
                $ts = $t->expired();
                if ($core->blog->settings->maintenance->plugin_message && $ts !== false) {
                    if ($ts === null) {
                        $res_task .= '<br /> <span class="warn">' . __('This task has never been executed.') . ' ' . __('You should execute it now.') . '</span>';
开发者ID:nikrou,项目名称:dotclear,代码行数:31,代码来源:index.php

示例4: sprintf

    echo dcPage::jsLoad('js/jquery/jquery-ui.custom.js') . dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js') . dcPage::jsLoad(dcPage::getPF('antispam/antispam.js'));
}
echo dcPage::cssLoad(dcPage::getPF('antispam/style.css'));
?>
</head>
<body>
<?php 
if ($filter_gui !== false) {
    echo dcPage::breadcrumb(array(__('Plugins') => '', $page_name => $p_url, sprintf(__('%s filter configuration'), $filter->name) => '')) . dcPage::notices();
    echo '<p><a href="' . $p_url . '" class="back">' . __('Back to filters list') . '</a></p>';
    echo $filter_gui;
    if ($filter->help) {
        dcPage::helpBlock($filter->help);
    }
} else {
    echo dcPage::breadcrumb(array(__('Plugins') => '', $page_name => '')) . dcPage::notices();
    # Information
    $spam_count = dcAntispam::countSpam($core);
    $published_count = dcAntispam::countPublishedComments($core);
    $moderationTTL = $core->blog->settings->antispam->antispam_moderation_ttl;
    echo '<form action="' . $p_url . '" method="post" class="fieldset">' . '<h3>' . __('Information') . '</h3>';
    echo '<ul class="spaminfo">' . '<li class="spamcount"><a href="' . $core->adminurl->get('admin.comments', array('status' => '-2')) . '">' . __('Junk comments:') . '</a> ' . '<strong>' . $spam_count . '</strong></li>' . '<li class="hamcount"><a href="' . $core->adminurl->get('admin.comments', array('status' => '1')) . '">' . __('Published comments:') . '</a> ' . $published_count . '</li>' . '</ul>';
    if ($spam_count > 0) {
        echo '<p>' . $core->formNonce() . form::hidden('ts', time()) . '<input name="delete_all" class="delete" type="submit" value="' . __('Delete all spams') . '" /></p>';
    }
    if ($moderationTTL != null && $moderationTTL >= 0) {
        echo '<p>' . sprintf(__('All spam comments older than %s day(s) will be automatically deleted.'), $moderationTTL) . ' ' . sprintf(__('You can modify this duration in the %s'), '<a href="' . $core->adminurl->get('admin.blog.pref') . '#antispam_moderation_ttl"> ' . __('Blog settings') . '</a>') . '.</p>';
    }
    echo '</form>';
    # Filters
    echo '<form action="' . $p_url . '" method="post" id="filters-list-form">';
开发者ID:nikrou,项目名称:dotclear,代码行数:31,代码来源:index.php

示例5: gui

 public function gui($url)
 {
     $blog =& $this->core->blog;
     $blog->settings->addNamespace('akismet');
     $ak_key = $blog->settings->akismet->ak_key;
     $ak_verified = null;
     if (isset($_POST['ak_key'])) {
         try {
             $ak_key = $_POST['ak_key'];
             $blog->settings->akismet->put('ak_key', $ak_key, 'string');
             dcPage::addSuccessNotice(__('Filter configuration have been successfully saved.'));
             http::redirect($url);
         } catch (Exception $e) {
             $this->core->error->add($e->getMessage());
         }
     }
     if ($blog->settings->akismet->ak_key) {
         try {
             $ak = new akismet($blog->url, $blog->settings->akismet->ak_key);
             $ak_verified = $ak->verify();
         } catch (Exception $e) {
             $this->core->error->add($e->getMessage());
         }
     }
     $res = dcPage::notices();
     $res .= '<form action="' . html::escapeURL($url) . '" method="post" class="fieldset">' . '<p><label for="ak_key" class="classic">' . __('Akismet API key:') . '</label> ' . form::field('ak_key', 12, 128, $ak_key);
     if ($ak_verified !== null) {
         if ($ak_verified) {
             $res .= ' <img src="images/check-on.png" alt="" /> ' . __('API key verified');
         } else {
             $res .= ' <img src="images/check-off.png" alt="" /> ' . __('API key not verified');
         }
     }
     $res .= '</p>';
     $res .= '<p><a href="http://akismet.com/">' . __('Get your own API key') . '</a></p>' . '<p><input type="submit" value="' . __('Save') . '" />' . $this->core->formNonce() . '</p>' . '</form>';
     return $res;
 }
开发者ID:nikrou,项目名称:dotclear,代码行数:37,代码来源:class.dc.filter.akismet.php

示例6: __

}
/* DISPLAY Main page
-------------------------------------------------------- */
$starting_scripts = '<script type="text/javascript">' . "\n" . "//<![CDATA[" . "\n" . dcPage::jsVar('dotclear.msg.confirm_delete_media', __('Are you sure to delete this media?')) . "\n" . "//]]>" . "</script>" . dcPage::jsLoad('js/_media_item.js');
if ($popup && !empty($plugin_id)) {
    $starting_scripts .= $core->callBehavior('adminPopupMedia', $plugin_id);
}
$temp_params = $media_page_url_params;
$temp_params['d'] = '%s';
$bc_template = $core->adminurl->get('admin.media', $temp_params, '&amp;', true);
$temp_params['d'] = '';
$home_url = $core->adminurl->get('admin.media', $temp_params);
call_user_func($open_f, __('Media manager'), $starting_scripts . dcPage::jsDatePicker() . ($popup ? dcPage::jsPageTabs($tab) : ''), dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', __('Media manager') => $home_url, $core->media->breadCrumb($bc_template) . '<span class="page-title">' . $file->basename . '</span>' => ''), array('home_link' => !$popup, 'hl' => false)));
if ($popup) {
    // Display notices
    echo dcPage::notices();
}
if ($file === null) {
    call_user_func($close_f);
    exit;
}
if (!empty($_GET['fupd']) || !empty($_GET['fupl'])) {
    dcPage::success(__('File has been successfully updated.'));
}
if (!empty($_GET['thumbupd'])) {
    dcPage::success(__('Thumbnails have been successfully updated.'));
}
if (!empty($_GET['blogprefupd'])) {
    dcPage::success(__('Default media insertion settings have been successfully updated.'));
}
# Get major file type (first part of mime type)
开发者ID:nikrou,项目名称:dotclear,代码行数:31,代码来源:media_item.php

示例7: gui

 public function gui($url)
 {
     $core =& $this->core;
     # Create list
     if (!empty($_POST['createlist'])) {
         try {
             $this->defaultWordsList();
             dcPage::addSuccessNotice(__('Words have been successfully added.'));
             http::redirect($url);
         } catch (Exception $e) {
             $core->error->add($e->getMessage());
         }
     }
     # Adding a word
     if (!empty($_POST['swa'])) {
         $globalsw = !empty($_POST['globalsw']) && $core->auth->isSuperAdmin();
         try {
             $this->addRule($_POST['swa'], $globalsw);
             dcPage::addSuccessNotice(__('Word has been successfully added.'));
             http::redirect($url);
         } catch (Exception $e) {
             $core->error->add($e->getMessage());
         }
     }
     # Removing spamwords
     if (!empty($_POST['swd']) && is_array($_POST['swd'])) {
         try {
             $this->removeRule($_POST['swd']);
             dcPage::addSuccessNotice(__('Words have been successfully removed.'));
             http::redirect($url);
         } catch (Exception $e) {
             $core->error->add($e->getMessage());
         }
     }
     /* DISPLAY
     		---------------------------------------------- */
     $res = dcPage::notices();
     $res .= '<form action="' . html::escapeURL($url) . '" method="post" class="fieldset">' . '<p><label class="classic" for="swa">' . __('Add a word ') . '</label> ' . form::field('swa', 20, 128);
     if ($core->auth->isSuperAdmin()) {
         $res .= '<label class="classic" for="globalsw">' . form::checkbox('globalsw', 1) . __('Global word (used for all blogs)') . '</label> ';
     }
     $res .= $core->formNonce() . '</p>' . '<p><input type="submit" value="' . __('Add') . '"/></p>' . '</form>';
     $rs = $this->getRules();
     if ($rs->isEmpty()) {
         $res .= '<p><strong>' . __('No word in list.') . '</strong></p>';
     } else {
         $res .= '<form action="' . html::escapeURL($url) . '" method="post" class="fieldset">' . '<h3>' . __('List of bad words') . '</h3>' . '<div class="antispam">';
         $res_global = '';
         $res_local = '';
         while ($rs->fetch()) {
             $disabled_word = false;
             $p_style = '';
             if (!$rs->blog_id) {
                 $disabled_word = !$core->auth->isSuperAdmin();
                 $p_style .= ' global';
             }
             $item = '<p class="' . $p_style . '"><label class="classic" for="word-' . $rs->rule_id . '">' . form::checkbox(array('swd[]', 'word-' . $rs->rule_id), $rs->rule_id, false, '', '', $disabled_word) . ' ' . html::escapeHTML($rs->rule_content) . '</label></p>';
             if ($rs->blog_id) {
                 // local list
                 if ($res_local == '') {
                     $res_local = '<h4>' . __('Local words (used only for this blog)') . '</h4>';
                 }
                 $res_local .= $item;
             } else {
                 // global list
                 if ($res_global == '') {
                     $res_global = '<h4>' . __('Global words (used for all blogs)') . '</h4>';
                 }
                 $res_global .= $item;
             }
         }
         $res .= '<div class="local">' . $res_local . '</div>';
         $res .= '<div class="global">' . $res_global . '</div>';
         $res .= '</div>' . '<p>' . form::hidden(array('spamwords'), 1) . $core->formNonce() . '<input class="submit delete" type="submit" value="' . __('Delete selected words') . '"/></p>' . '</form>';
     }
     if ($core->auth->isSuperAdmin()) {
         $res .= '<form action="' . html::escapeURL($url) . '" method="post">' . '<p><input type="submit" value="' . __('Create default wordlist') . '" />' . form::hidden(array('spamwords'), 1) . form::hidden(array('createlist'), 1) . $core->formNonce() . '</p>' . '</form>';
     }
     return $res;
 }
开发者ID:nikrou,项目名称:dotclear,代码行数:80,代码来源:class.dc.filter.words.php

示例8: __

';
  $(function() {
    $('#tag_delete').submit(function() {
      return window.confirm(dotclear.msg.confirm_tag_delete);
    });
  });
  //]]>
  </script>
  <?php 
echo dcPage::jsConfirmClose('tag_rename');
?>
</head>
<body>

<?php 
echo dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', __('Tags') => $p_url . '&amp;m=tags', __('Tag') . ' &ldquo;' . html::escapeHTML($tag) . '&rdquo;' => '')) . dcPage::notices();
?>

<?php 
echo '<p><a class="back" href="' . $p_url . '&amp;m=tags">' . __('Back to tags list') . '</a></p>';
if (!$core->error->flag()) {
    if (!$posts->isEmpty()) {
        echo '<div class="tag-actions vertical-separator">' . '<h3>' . html::escapeHTML($tag) . '</h3>' . '<form action="' . $this_url . '" method="post" id="tag_rename">' . '<p><label for="new_tag_id" class="classic">' . __('Rename') . '</label> ' . form::field('new_tag_id', 20, 255, html::escapeHTML($tag)) . '<input type="submit" value="' . __('OK') . '" />' . $core->formNonce() . '</p></form>';
        # Remove tag
        if (!$posts->isEmpty() && $core->auth->check('contentadmin', $core->blog->id)) {
            echo '<form id="tag_delete" action="' . $this_url . '" method="post">' . '<p><input type="submit" class="delete" name="delete" value="' . __('Delete this tag') . '" />' . $core->formNonce() . '</p></form>';
        }
        echo '</div>';
    }
    # Show posts
    echo '<h4 class="vertical-separator pretty-title">' . sprintf(__('List of entries with the tag “%s”'), html::escapeHTML($tag)) . '</h4>';
开发者ID:nikrou,项目名称:dotclear,代码行数:31,代码来源:tag_posts.php


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