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


PHP html::escapeURL方法代码示例

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


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

示例1: gui

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

示例2: 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

示例3: gui

 public function gui($url)
 {
     $core =& $this->core;
     # Create list
     if (!empty($_POST['createlist'])) {
         try {
             $this->defaultWordsList();
             http::redirect($url . '&list=1');
         } 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);
             http::redirect($url . '&added=1');
         } catch (Exception $e) {
             $core->error->add($e->getMessage());
         }
     }
     # Removing spamwords
     if (!empty($_POST['swd']) && is_array($_POST['swd'])) {
         try {
             $this->removeRule($_POST['swd']);
             http::redirect($url . '&removed=1');
         } catch (Exception $e) {
             $core->error->add($e->getMessage());
         }
     }
     /* DISPLAY
     		---------------------------------------------- */
     $res = '';
     if (!empty($_GET['list'])) {
         $res .= '<p class="message">' . __('Words have been successfully added.') . '</p>';
     }
     if (!empty($_GET['added'])) {
         $res .= '<p class="message">' . __('Word has been successfully added.') . '</p>';
     }
     if (!empty($_GET['removed'])) {
         $res .= '<p class="message">' . __('Words have been successfully removed.') . '</p>';
     }
     $res .= '<form action="' . html::escapeURL($url) . '" method="post">' . '<fieldset><legend>' . __('Add a word') . '</legend>' . '<p>' . form::field('swa', 20, 128) . ' ';
     if ($core->auth->isSuperAdmin()) {
         $res .= '<label class="classic">' . form::checkbox('globalsw', 1) . ' ' . __('Global word') . '</label> ';
     }
     $res .= $core->formNonce() . '<input type="submit" value="' . __('Add') . '"/></p>' . '</fieldset>' . '</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">' . '<fieldset><legend>' . __('List') . '</legend>' . '<div style="' . $this->style_list . '">';
         while ($rs->fetch()) {
             $disabled_word = false;
             $p_style = $this->style_p;
             if (!$rs->blog_id) {
                 $disabled_word = !$core->auth->isSuperAdmin();
                 $p_style .= $this->style_global;
             }
             $res .= '<p style="' . $p_style . '"><label class="classic">' . form::checkbox(array('swd[]'), $rs->rule_id, false, '', '', $disabled_word) . ' ' . html::escapeHTML($rs->rule_content) . '</label></p>';
         }
         $res .= '</div>' . '<p>' . form::hidden(array('spamwords'), 1) . $core->formNonce() . '<input class="submit" type="submit" value="' . __('Delete selected words') . '"/></p>' . '</fieldset></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:HackerMajor,项目名称:root,代码行数:69,代码来源:class.dc.filter.words.php

示例4: __

        echo '<form action="comments_actions.php" method="post">';
    }
    echo '<h3>' . __('Trackbacks') . '</h3>';
    if (!$trackbacks->isEmpty()) {
        showComments($trackbacks, $has_action);
    } else {
        echo '<p>' . __('No trackback') . '</p>';
    }
    echo '<h3>' . __('Comments') . '</h3>';
    if (!$comments->isEmpty()) {
        showComments($comments, $has_action);
    } else {
        echo '<p>' . __('No comment') . '</p>';
    }
    if ($has_action) {
        echo '<div class="two-cols">' . '<p class="col checkboxes-helpers"></p>' . '<p class="col right">' . __('Selected comments action:') . ' ' . form::combo('action', $combo_action) . form::hidden('redir', html::escapeURL($redir_url) . '&amp;id=' . $post_id . '&amp;co=1') . $core->formNonce() . '<input type="submit" value="' . __('ok') . '" /></p>' . '</div>' . '</form>';
    }
    echo '</div>';
}
/* Add a comment
-------------------------------------------------------- */
if ($post_id) {
    echo '<div class="multi-part" id="add-comment" title="' . __('Add a comment') . '">' . '<h3>' . __('Add a comment') . '</h3>' . '<form action="comment.php" method="post" id="comment-form">' . '<fieldset class="constrained">' . '<p><label class="required" title="' . __('Required field') . '">' . __('Name:') . form::field('comment_author', 30, 255, html::escapeHTML($core->auth->getInfo('user_cn'))) . '</label></p>' . '<p><label>' . __('Email:') . form::field('comment_email', 30, 255, html::escapeHTML($core->auth->getInfo('user_email'))) . '</label></p>' . '<p><label>' . __('Web site:') . form::field('comment_site', 30, 255, html::escapeHTML($core->auth->getInfo('user_url'))) . '</label></p>' . '<p class="area"><label for="comment_content" class="required" title="' . __('Required field') . '">' . __('Comment:') . '</label> ' . form::textarea('comment_content', 50, 8, html::escapeHTML('')) . '</p>' . '<p>' . form::hidden('post_id', $post_id) . $core->formNonce() . '<input type="submit" name="add" value="' . __('save') . '" /></p>' . '</fieldset>' . '</form>' . '</div>';
}
# Show comments or trackbacks
function showComments(&$rs, $has_action)
{
    echo '<table class="comments-list"><tr>' . '<th colspan="2">' . __('Author') . '</th>' . '<th>' . __('Date') . '</th>' . '<th class="nowrap">' . __('IP address') . '</th>' . '<th>' . __('Status') . '</th>' . '<th>&nbsp;</th>' . '</tr>';
    while ($rs->fetch()) {
        $comment_url = 'comment.php?id=' . $rs->comment_id;
        $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />';
开发者ID:HackerMajor,项目名称:root,代码行数:31,代码来源:page.php

示例5: debugInfo

 private static function debugInfo()
 {
     $global_vars = implode(', ', array_keys($GLOBALS));
     $res = '<div id="debug"><div>' . '<p>memory usage: ' . memory_get_usage() . ' (' . files::size(memory_get_usage()) . ')</p>';
     if (function_exists('xdebug_get_profiler_filename')) {
         $res .= '<p>Elapsed time: ' . xdebug_time_index() . ' seconds</p>';
         $prof_file = xdebug_get_profiler_filename();
         if ($prof_file) {
             $res .= '<p>Profiler file : ' . xdebug_get_profiler_filename() . '</p>';
         } else {
             $prof_url = http::getSelfURI();
             $prof_url .= strpos($prof_url, '?') === false ? '?' : '&';
             $prof_url .= 'XDEBUG_PROFILE';
             $res .= '<p><a href="' . html::escapeURL($prof_url) . '">Trigger profiler</a></p>';
         }
         /* xdebug configuration:
         			zend_extension = /.../xdebug.so
         			xdebug.auto_trace = On
         			xdebug.trace_format = 0
         			xdebug.trace_options = 1
         			xdebug.show_mem_delta = On
         			xdebug.profiler_enable = 0
         			xdebug.profiler_enable_trigger = 1
         			xdebug.profiler_output_dir = /tmp
         			xdebug.profiler_append = 0
         			xdebug.profiler_output_name = timestamp
         			*/
     }
     $res .= '<p>Global vars: ' . $global_vars . '</p>' . '</div></div>';
     return $res;
 }
开发者ID:nikrou,项目名称:dotclear,代码行数:31,代码来源:lib.dc.page.php

示例6: mediaItemLine

function mediaItemLine($f, $i)
{
    global $core, $page_url, $popup, $post_id;
    $fname = $f->basename;
    if ($f->d) {
        $link = html::escapeURL($page_url) . '&amp;d=' . html::sanitizeURL($f->relname);
        if ($f->parent) {
            $fname = '..';
        }
    } else {
        $link = 'media_item.php?id=' . $f->media_id . '&amp;popup=' . $popup . '&amp;post_id=' . $post_id;
    }
    $class = 'media-item media-col-' . $i % 2;
    $res = '<div class="' . $class . '"><a class="media-icon media-link" href="' . $link . '">' . '<img src="' . $f->media_icon . '" alt="" /></a>' . '<ul>' . '<li><a class="media-link" href="' . $link . '">' . $fname . '</a></li>';
    if (!$f->d) {
        $res .= '<li>' . $f->media_title . '</li>' . '<li>' . $f->media_dtstr . ' - ' . files::size($f->size) . ' - ' . '<a href="' . $f->file_url . '">' . __('open') . '</a>' . '</li>';
    }
    $res .= '<li class="media-action">&nbsp;';
    if ($post_id && !$f->d) {
        $res .= '<form action="post_media.php" method="post">' . '<input type="image" src="images/plus.png" alt="' . __('Attach this file to entry') . '" ' . 'title="' . __('Attach this file to entry') . '" /> ' . form::hidden('media_id', $f->media_id) . form::hidden('post_id', $post_id) . form::hidden('attach', 1) . $core->formNonce() . '</form>';
    }
    if ($popup && !$f->d) {
        $res .= '<a href="' . $link . '"><img src="images/plus.png" alt="' . __('Insert this file into entry') . '" ' . 'title="' . __('Insert this file into entry') . '" /></a> ';
    }
    if ($f->del) {
        $res .= '<a class="media-remove" ' . 'href="' . html::escapeURL($page_url) . '&amp;d=' . rawurlencode($GLOBALS['d']) . '&amp;remove=' . rawurlencode($f->basename) . '">' . '<img src="images/trash.png" alt="' . __('delete') . '" title="' . __('delete') . '" /></a>';
    }
    $res .= '</li>';
    if ($f->type == 'audio/mpeg3') {
        $res .= '<li>' . dcMedia::mp3player($f->file_url, 'index.php?pf=player_mp3.swf') . '</li>';
    }
    $res .= '</ul></div>';
    return $res;
}
开发者ID:HackerMajor,项目名称:root,代码行数:34,代码来源:media.php

示例7: gui

 public function gui($url)
 {
     $blog =& $this->core->blog;
     $ak_key = $blog->settings->ak_key;
     $ak_verified = null;
     if (isset($_POST['ak_key'])) {
         try {
             $ak_key = $_POST['ak_key'];
             $blog->settings->setNameSpace('akismet');
             $blog->settings->put('ak_key', $ak_key, 'string');
             http::redirect($url . '&up=1');
         } catch (Exception $e) {
             $this->core->error->add($e->getMessage());
         }
     }
     if ($blog->settings->ak_key) {
         try {
             $ak = new akismet($blog->url, $blog->settings->ak_key);
             $ak_verified = $ak->verify();
         } catch (Exception $e) {
             $this->core->error->add($e->getMessage());
         }
     }
     $res = '<form action="' . html::escapeURL($url) . '" method="post">' . '<p><label class="classic">' . __('Akismet API key:') . ' ' . form::field('ak_key', 12, 128, $ak_key) . '</label>';
     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://wordpress.com/api-keys/">' . __('Get your own API key') . '</a></p>' . '<p><input type="submit" value="' . __('save') . '" />' . $this->core->formNonce() . '</p>' . '</form>';
     return $res;
 }
开发者ID:HackerMajor,项目名称:root,代码行数:35,代码来源:class.dc.filter.akismet.php

示例8: displayForms

 private function displayForms($url, $type, $title)
 {
     $res = '<h3>' . $title . '</h3>' . '<form action="' . html::escapeURL($url) . '" method="post">' . '<fieldset><legend>' . __('m_antispam_Add_IP_address') . '</legend><p>' . form::hidden(array('ip_type'), $type) . form::text(array('addip'), 18, 255) . ' ';
     $res .= adminPage::formtoken() . '<input type="submit" value="' . __('c_c_action_Add') . '"/></p>' . '</fieldset></form>';
     $rs = $this->getRules($type);
     if ($rs->isEmpty()) {
         $res .= '<p><strong>' . __('m_antispam_No_IP_address_in_list') . '</strong></p>';
     } else {
         $res .= '<form action="' . html::escapeURL($url) . '" method="post">' . '<fieldset><legend>' . __('m_antispam_IP_list') . '</legend>' . '<div style="' . $this->style_list . '">';
         while ($rs->fetch()) {
             $bits = explode(':', $rs->rule_content);
             $pattern = $bits[0];
             $ip = $bits[1];
             $bitmask = $bits[2];
             $p_style = $this->style_p;
             $res .= '<p style="' . $p_style . '"><label class="classic">' . form::checkbox(array('delip[]'), $rs->rule_id, false) . ' ' . html::escapeHTML($pattern) . '</label></p>';
         }
         $res .= '</div>' . '<p><input type="submit" value="' . __('c_c_action_Delete') . '"/>' . adminPage::formtoken() . form::hidden(array('ip_type'), $type) . '</p>' . '</fieldset></form>';
     }
     return $res;
 }
开发者ID:jewelhuq,项目名称:okatea,代码行数:21,代码来源:class.filter.ip.php

示例9: 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

示例10: 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

示例11: foreach

}
dcPage::open(__('Users'), dcPage::jsLoad('js/_users_actions.js') . $core->callBehavior('adminUsersActionsHeaders'), $breadcrumb);
if (!isset($action)) {
    dcPage::close();
    exit;
}
$hidden_fields = '';
foreach ($users as $u) {
    $hidden_fields .= form::hidden(array('users[]'), $u);
}
if (isset($_POST['redir']) && strpos($_POST['redir'], '://') === false) {
    $hidden_fields .= form::hidden(array('redir'), html::escapeURL($_POST['redir']));
} else {
    $hidden_fields .= form::hidden(array('q'), html::escapeHTML($_POST['q'])) . form::hidden(array('sortby'), $_POST['sortby']) . form::hidden(array('order'), $_POST['order']) . form::hidden(array('page'), $_POST['page']) . form::hidden(array('nb'), $_POST['nb']);
}
echo '<p><a class="back" href="' . html::escapeURL($redir) . '">' . __('Back to user profile') . '</a></p>';
# --BEHAVIOR-- adminUsersActionsContent
$core->callBehavior('adminUsersActionsContent', $core, $action, $hidden_fields);
# Blog list where to set permissions
if (!empty($users) && empty($blogs) && $action == 'blogs') {
    try {
        $rs = $core->getBlogs();
        $nb_blog = $rs->count();
    } catch (Exception $e) {
    }
    foreach ($users as $u) {
        $user_list[] = '<a href="' . $core->adminurl->get("admin.user", array('id' => $u)) . '">' . $u . '</a>';
    }
    echo '<p>' . sprintf(__('Choose one or more blogs to which you want to give permissions to users %s.'), implode(', ', $user_list)) . '</p>';
    if ($nb_blog == 0) {
        echo '<p><strong>' . __('No blog') . '</strong></p>';
开发者ID:nikrou,项目名称:dotclear,代码行数:31,代码来源:users_actions.php

示例12: mediaItemLine

function mediaItemLine($f, $i, $query, $table = false)
{
    global $core, $page_url, $popup, $select, $post_id, $plugin_id, $page_url_params;
    $fname = $f->basename;
    $file = $query ? $f->relname : $f->basename;
    $class = $table ? '' : 'media-item media-col-' . $i % 2;
    if ($f->d) {
        // Folder
        $link = $core->adminurl->get('admin.media', array_merge($page_url_params, array('d' => html::sanitizeURL($f->relname))));
        if ($f->parent) {
            $fname = '..';
            $class .= ' media-folder-up';
        } else {
            $class .= ' media-folder';
        }
    } else {
        // Item
        $params = new ArrayObject(array('id' => $f->media_id, 'plugin_id' => $plugin_id, 'popup' => $popup, 'select' => $select, 'post_id' => $post_id));
        $core->callBehavior('adminMediaURLParams', $params);
        $params = (array) $params;
        $link = $core->adminurl->get('admin.media.item', $params);
    }
    $maxchars = 36;
    if (strlen($fname) > $maxchars) {
        $fname = substr($fname, 0, $maxchars - 4) . '...' . ($f->d ? '' : files::getExtension($fname));
    }
    $act = '';
    if (!$f->d) {
        if ($select > 0) {
            if ($select == 1) {
                // Single media selection button
                $act .= '<a href="' . $link . '"><img src="images/plus.png" alt="' . __('Select this file') . '" ' . 'title="' . __('Select this file') . '" /></a> ';
            } else {
                // Multiple media selection checkbox
                $act .= form::checkbox(array('medias[]', 'media_' . rawurlencode($file)), $file);
            }
        } else {
            // Item
            if ($post_id) {
                // Media attachment button
                $act .= '<a class="attach-media" title="' . __('Attach this file to entry') . '" href="' . $core->adminurl->get("admin.post.media", array('media_id' => $f->media_id, 'post_id' => $post_id, 'attach' => 1)) . '">' . '<img src="images/plus.png" alt="' . __('Attach this file to entry') . '"/>' . '</a>';
            }
            if ($popup) {
                // Media insertion button
                $act .= '<a href="' . $link . '"><img src="images/plus.png" alt="' . __('Insert this file into entry') . '" ' . 'title="' . __('Insert this file into entry') . '" /></a> ';
            }
        }
    }
    if ($f->del) {
        // Deletion button or checkbox
        if (!$popup && !$f->d) {
            if ($select < 2) {
                // Already set for multiple media selection
                $act .= form::checkbox(array('medias[]', 'media_' . rawurlencode($file)), $file);
            }
        } else {
            $act .= '<a class="media-remove" ' . 'href="' . html::escapeURL($page_url) . '&amp;plugin_id=' . $plugin_id . '&amp;d=' . rawurlencode($GLOBALS['d']) . '&amp;q=' . rawurlencode($GLOBALS['q']) . '&amp;remove=' . rawurlencode($file) . '">' . '<img src="images/trash.png" alt="' . __('Delete') . '" title="' . __('delete') . '" /></a>';
        }
    }
    // Render markup
    if (!$table) {
        $res = '<div class="' . $class . '"><p><a class="media-icon media-link" href="' . rawurldecode($link) . '">' . '<img src="' . $f->media_icon . '" alt="" />' . ($query ? $file : $fname) . '</a></p>';
        $lst = '';
        if (!$f->d) {
            $lst .= '<li>' . $f->media_title . '</li>' . '<li>' . $f->media_dtstr . ' - ' . files::size($f->size) . ' - ' . '<a href="' . $f->file_url . '">' . __('open') . '</a>' . '</li>';
        }
        $lst .= $act != '' ? '<li class="media-action">&nbsp;' . $act . '</li>' : '';
        // Show player if relevant
        $file_type = explode('/', $f->type);
        if ($file_type[0] == 'audio') {
            $lst .= '<li>' . dcMedia::audioPlayer($f->type, $f->file_url, $core->adminurl->get("admin.home", array('pf' => 'player_mp3.swf')), null, $core->blog->settings->system->media_flash_fallback) . '</li>';
        }
        $res .= $lst != '' ? '<ul>' . $lst . '</ul>' : '';
        $res .= '</div>';
    } else {
        $res = '<tr class="' . $class . '">';
        $res .= '<td class="media-action">' . $act . '</td>';
        $res .= '<td class="maximal" scope="row"><a class="media-flag media-link" href="' . rawurldecode($link) . '">' . '<img src="' . $f->media_icon . '" alt="" />' . ($query ? $file : $fname) . '</a>' . '<br />' . ($f->d ? '' : $f->media_title) . '</td>';
        $res .= '<td class="nowrap count">' . ($f->d ? '' : $f->media_dtstr) . '</td>';
        $res .= '<td class="nowrap count">' . ($f->d ? '' : files::size($f->size) . ' - ' . '<a href="' . $f->file_url . '">' . __('open') . '</a>') . '</td>';
        $res .= '</tr>';
    }
    return $res;
}
开发者ID:nikrou,项目名称:dotclear,代码行数:84,代码来源:media.php

示例13: __

        }
        echo '</ul>';
    }
}
if ($file->type == 'image/jpeg') {
    echo '<h3>' . __('Image details') . '</h3>';
    if (count($file->media_meta) == 0) {
        echo '<p>' . __('No detail') . '</p>';
    } else {
        echo '<ul>';
        foreach ($file->media_meta as $k => $v) {
            if ((string) $v) {
                echo '<li><strong>' . $k . ':</strong> ' . html::escapeHTML($v) . '</li>';
            }
        }
        echo '</ul>';
    }
}
if ($file->editable && $core_media_writable) {
    if ($file->media_type == 'image') {
        echo '<form class="clear" action="' . html::escapeURL($page_url) . '" method="post">' . '<fieldset><legend>' . __('Update thumbnails') . '</legend>' . '<p>' . __('This will create or update thumbnails for this image.') . '</p>' . '<p><input type="submit" name="thumbs" value="' . __('update thumbnails') . '" />' . form::hidden(array('id'), $id) . $core->formNonce() . '</p>' . '</fieldset></form>';
    }
    if ($file->type == 'application/zip') {
        $inflate_combo = array(__('Extract in a new directory') => 'new', __('Extract in current directory') => 'current');
        echo '<form class="clear" id="file-unzip" action="' . html::escapeURL($page_url) . '" method="post">' . '<fieldset><legend>' . __('Extract archive') . '</legend>' . '<ul>' . '<li><strong>' . __('Extract in a new directory') . '</strong> : ' . __('This will extract archive in a new directory that should not exists yet.') . '</li>' . '<li><strong>' . __('Extract in current directory') . '</strong> : ' . __('This will extract archive in current directory and will overwrite existing files or directory.') . '</li>' . '</ul>' . '<p><label class="classic">' . __('Extract mode:') . ' ' . form::combo('inflate_mode', $inflate_combo, 'new') . '</label> ' . '<input type="submit" name="unzip" value="' . __('extract') . '" />' . form::hidden(array('id'), $id) . $core->formNonce() . '</p>' . '</fieldset></form>';
    }
    echo '<form class="clear" action="' . html::escapeURL($page_url) . '" method="post">' . '<fieldset><legend>' . __('Change media properties') . '</legend>' . '<p><label>' . __('File name:') . form::field('media_file', 30, 255, html::escapeHTML($file->basename)) . '</label></p>' . '<p><label>' . __('File title:') . form::field('media_title', 30, 255, html::escapeHTML($file->media_title)) . '</label></p>' . '<p><label>' . __('File date:') . form::field('media_dt', 16, 16, html::escapeHTML($file->media_dtstr)) . '</label></p>' . '<p><label class="classic">' . form::checkbox('media_private', 1, $file->media_priv) . ' ' . __('Private') . '</label></p>' . '<p><label>' . __('New directory:') . form::combo('media_path', $dirs_combo, dirname($file->relname)) . '</label></p>' . '<p><input type="submit" accesskey="s" value="' . __('save') . '" />' . form::hidden(array('id'), $id) . $core->formNonce() . '</p>' . '</fieldset></form>';
    echo '<form class="clear" action="' . html::escapeURL($page_url) . '" method="post" enctype="multipart/form-data">' . '<fieldset><legend>' . __('Change file') . '</legend>' . '<div>' . form::hidden(array('MAX_FILE_SIZE'), DC_MAX_UPLOAD_SIZE) . '</div>' . '<p><label>' . __('Choose a file:') . ' (' . sprintf(__('Maximum size %s'), files::size(DC_MAX_UPLOAD_SIZE)) . ') ' . '<input type="file" name="upfile" size="35" />' . '</label></p>' . '<p><input type="submit" value="' . __('send') . '" />' . form::hidden(array('id'), $id) . $core->formNonce() . '</p>' . '</fieldset></form>';
}
echo '</div>' . '</div>';
call_user_func($close_f);
开发者ID:HackerMajor,项目名称:root,代码行数:31,代码来源:media_item.php

示例14: mediaItemLine

function mediaItemLine($f, $i)
{
    global $okt, $page_url, $popup;
    $fname = $f->basename;
    if ($f->d) {
        $link = html::escapeURL($page_url) . '&amp;d=' . html::sanitizeURL($f->relname);
        if ($f->parent) {
            $fname = '..';
        }
    } else {
        $link = 'module.php?m=media_manager&action=item&id=' . $f->media_id . '&amp;popup=' . $popup;
    }
    $class = 'media-item media-col-' . $i % 2;
    $res = '<div class="' . $class . '"><a class="media-icon media-link" href="' . $link . '">' . '<img src="' . $f->media_icon . '" alt="" /></a>' . '<ul>' . '<li><a class="media-link" href="' . $link . '">' . $fname . '</a></li>';
    if (!$f->d) {
        $res .= '<li>' . $f->media_title . '</li>' . '<li>' . $f->media_dtstr . ' - ' . util::l10nFileSize($f->size) . ' - ' . '<a href="' . $f->file_url . '">' . __('c_c_action_open') . '</a>' . '</li>';
    }
    $res .= '<li class="media-action">&nbsp;';
    if ($popup && !$f->d) {
        $res .= '<a href="' . $link . '"><img src="' . OKT_PUBLIC_URL . '/img/ico/plus.png" alt="' . __('Insert this file') . '" ' . 'title="' . __('Insert this file') . '" /></a> ';
    }
    if ($f->del) {
        $res .= '<a href="' . html::escapeURL($page_url) . '&amp;d=' . rawurlencode($GLOBALS['d']) . '&amp;remove=' . rawurlencode($f->basename) . '" class="icon delete">' . __('c_c_action_delete') . '</a>';
    }
    $res .= '</li>';
    if ($f->type == 'audio/mpeg3') {
        $res .= '<li>' . oktMedia::mp3player($f->file_url, 'index.php?pf=player_mp3.swf') . '</li>';
    }
    $res .= '</ul></div>';
    return $res;
}
开发者ID:jewelhuq,项目名称:okatea,代码行数:31,代码来源:index.php

示例15: displayForms

 private function displayForms($url, $type, $title)
 {
     $core =& $this->core;
     $res = '<div class="multi-part" id="tab_' . $type . '" title="' . $title . '">' . '<form action="' . html::escapeURL($url) . '" method="post">' . '<fieldset><legend>' . __('Add an IP address') . '</legend><p>' . form::hidden(array('ip_type'), $type) . form::field(array('addip'), 18, 255) . ' ';
     if ($core->auth->isSuperAdmin()) {
         $res .= '<label class="classic">' . form::checkbox(array('globalip'), 1) . ' ' . __('Global IP') . '</label> ';
     }
     $res .= $core->formNonce() . '<input type="submit" value="' . __('Add') . '"/></p>' . '</fieldset></form>';
     $rs = $this->getRules($type);
     if ($rs->isEmpty()) {
         $res .= '<p><strong>' . __('No IP address in list.') . '</strong></p>';
     } else {
         $res .= '<form action="' . html::escapeURL($url) . '" method="post">' . '<fieldset><legend>' . __('IP list') . '</legend>' . '<div style="' . $this->style_list . '">';
         while ($rs->fetch()) {
             $bits = explode(':', $rs->rule_content);
             $pattern = $bits[0];
             $ip = $bits[1];
             $bitmask = $bits[2];
             $disabled_ip = false;
             $p_style = $this->style_p;
             if (!$rs->blog_id) {
                 $disabled_ip = !$core->auth->isSuperAdmin();
                 $p_style .= $this->style_global;
             }
             $res .= '<p style="' . $p_style . '"><label class="classic">' . form::checkbox(array('delip[]'), $rs->rule_id, false, '', '', $disabled_ip) . ' ' . html::escapeHTML($pattern) . '</label></p>';
         }
         $res .= '</div>' . '<p><input class="submit" type="submit" value="' . __('Delete') . '"/>' . $core->formNonce() . form::hidden(array('ip_type'), $type) . '</p>' . '</fieldset></form>';
     }
     $res .= '</div>';
     return $res;
 }
开发者ID:HackerMajor,项目名称:root,代码行数:31,代码来源:class.dc.filter.ip.php


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