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


PHP href函数代码示例

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


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

示例1: news

 public static function news($toUser, $newList)
 {
     /*
     $newList = array(
         array(
             'title'=> '"Happy Day',
             'description'=> 'Is Really A Happy Day',
             'url'=> 'URL',
             'picurl'=> 'PIC_URL',
         ),
         array(
             'title'=> 'Happy Day',
             'description'=> 'Is Really A Happy Day',
             'url'=> 'URL',
             'picurl'=> 'PIC_URL',
         ),
     );
     */
     if (count($newList) > 10) {
         href('图文数量超过10条');
         exit;
     }
     $data = array('touser' => $toUser, 'msgtype' => 'news', 'news' => array('articles' => $newList));
     self::doCurl($data);
 }
开发者ID:lxpfigo,项目名称:blog,代码行数:25,代码来源:RequestInitiative.class.php

示例2: uploadNews

 public static function uploadNews($articles)
 {
     /* 传入data实例
        $articles[] = array(
            'thumb_media_id'=> $media_id,
            'author'=> '天王盖地虎',
            'title'=> '这个我的测试消息',
            'content_source_url'=> 'our-class.cn',
            'content'=> '这是一个图文摘要',
            'digest'=> '',
            'show_cover_pic'=> 1,
        );
        $articles[] = array(
            'thumb_media_id'=> $media_id,
            'author'=> '天王盖地虎',
            'title'=> '这个我的测试消息',
            'content_source_url'=> 'our-class.cn',
            'content'=> '这是一个图文摘要',
            'digest'=> '',
            'show_cover_pic'=> 1,
        );
        */
     $url = 'https://api.weixin.qq.com/cgi-bin/media/uploadnews?access_token=' . AccessToken::getAccessToken();
     if (count($articles) > 10) {
         href('文章总数大于10');
         return false;
     }
     $data = array('articles' => $articles);
     $res = Curl::httpGet($url, $data);
     return Error::isError($res) ? false : $res['media_id'];
 }
开发者ID:lxpfigo,项目名称:blog,代码行数:31,代码来源:Media.class.php

示例3: whole_page

function whole_page()
{
    global $domain;
    $output = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
    $output .= "<rss version=\"2.0\" xmlns:content=\"http://purl.org/rss/1.0/modules/content/\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">\n";
    $output .= "<channel>\n";
    $output .= "  <title>Stacks project -- Comments</title>\n";
    $output .= "  <link>";
    $output .= $domain . href('comments-feed.rss');
    $output .= "</link>\n";
    $output .= "  <description>Stacks project, see http://stacks.math.columbia.edu</description>\n";
    $output .= "  <language>en</language>\n";
    $output .= "  <managingEditor>stacks.project@gmail.com (Stacks Project)</managingEditor>\n";
    $output .= "  <webMaster>pieterbelmans@gmail.com (Pieter Belmans)</webMaster>\n";
    $output .= "  <image>\n";
    $output .= "    <url>";
    $output .= $domain . href('stacks.png');
    $output .= "</url>\n";
    $output .= "    <title>Stacks project -- Comments</title>\n";
    $output .= "    <link>";
    $output .= $domain . href('comments-feed.rss');
    $output .= "</link>\n";
    $output .= "  </image>\n";
    $output .= print_comments_feed(10);
    $output .= "</channel>\n";
    $output .= "</rss>";
    return $output;
}
开发者ID:robertcardona,项目名称:stacks-website,代码行数:28,代码来源:commentsfeed.php

示例4: page_edit

/**
 * The main Page editor panel.
 *
 * @param string|array $message The activity message
 */
function page_edit($message = '')
{
    global $event, $step;
    pagetop(gTxt('edit_pages'), $message);
    extract(array_map('assert_string', gpsa(array('copy', 'save_error', 'savenew'))));
    $name = sanitizeForPage(assert_string(gps('name')));
    $newname = sanitizeForPage(assert_string(gps('newname')));
    if ($step == 'page_delete' || empty($name) && $step != 'page_new' && !$savenew) {
        $name = safe_field('page', 'txp_section', "name = 'default'");
    } elseif ((($copy || $savenew) && $newname || $newname && $newname != $name) && !$save_error) {
        $name = $newname;
    }
    $buttons = n . tag(gTxt('page_name'), 'label', array('for' => 'new_page')) . br . fInput('text', 'newname', $name, 'input-medium', '', '', INPUT_MEDIUM, '', 'new_page', false, true);
    if ($name) {
        $buttons .= span(href(gTxt('duplicate'), '#', array('id' => 'txp_clone', 'class' => 'clone', 'title' => gTxt('page_clone'))), array('class' => 'txp-actions'));
    } else {
        $buttons .= hInput('savenew', 'savenew');
    }
    $html = !$save_error ? fetch('user_html', 'txp_page', 'name', $name) : gps('html');
    // Format of each entry is popTagLink -> array ( gTxt() string, class/ID).
    $tagbuild_items = array('page_article' => array('page_article_hed', 'article-tags'), 'page_article_nav' => array('page_article_nav_hed', 'article-nav-tags'), 'page_nav' => array('page_nav_hed', 'nav-tags'), 'page_xml' => array('page_xml_hed', 'xml-tags'), 'page_misc' => array('page_misc_hed', 'misc-tags'), 'page_file' => array('page_file_hed', 'file-tags'));
    $tagbuild_links = '';
    foreach ($tagbuild_items as $tb => $item) {
        $tagbuild_links .= wrapRegion($item[1] . '_group', taglinks($tb), $item[1], $item[0], 'page_' . $item[1]);
    }
    echo hed(gTxt('tab_pages'), 1, array('class' => 'txp-heading'));
    echo n . tag(n . tag(hed(gTxt('tagbuilder'), 2) . $tagbuild_links, 'div', array('id' => 'tagbuild_links', 'class' => 'txp-layout-cell txp-layout-1-4')) . n . tag(form(graf($buttons) . graf(tag(gTxt('page_code'), 'label', array('for' => 'html')) . br . '<textarea class="code" id="html" name="html" cols="' . INPUT_LARGE . '" rows="' . TEXTAREA_HEIGHT_LARGE . '" dir="ltr">' . txpspecialchars($html) . '</textarea>') . graf(fInput('submit', '', gTxt('save'), 'publish') . eInput('page') . sInput('page_save') . hInput('name', $name)), '', '', 'post', 'edit-form', '', 'page_form'), 'div', array('id' => 'main_content', 'class' => 'txp-layout-cell txp-layout-2-4')) . n . tag(graf(sLink('page', 'page_new', gTxt('create_new_page')), ' class="action-create"') . page_list($name) . n, 'div', array('id' => 'content_switcher', 'class' => 'txp-layout-cell txp-layout-1-4')) . n, 'div', array('id' => $event . '_container', 'class' => 'txp-layout-grid'));
}
开发者ID:hcgtv,项目名称:textpattern,代码行数:33,代码来源:txp_page.php

示例5: getCenterPiece

function getCenterPiece(&$centerpiece, &$centerpiecelinks)
{
    $user =& atkGetUser();
    $theme =& atkinstance("atk.ui.atktheme");
    // Set the dispatchfile for this menu based on the theme setting, or to the default if not set.
    // This makes sure that all calls to dispatch_url will generate a url for the main frame and not
    // within the menu itself.
    $dispatcher = $theme->getAttribute('dispatcher', atkconfig("dispatcher", "index.php"));
    // do not use atkSelf here!
    $c =& atkinstance("atk.atkcontroller");
    $c->setPhpFile($dispatcher);
    if ($theme->getAttribute('useframes', true)) {
        $target = 'target="main"';
    } else {
        $target = "";
    }
    //$centerpiece = $centerpiecelinks['pim'] = href(dispatch_url("dashboard.mainboard", "start"), atktext("pim"), SESSION_NEW, false,$target);
    // change location link - if location_name is null there is only one location!
    if ($user['location_id'] !== null) {
        $current_location = atktext('current_location') . ': ' . $user['location_name'];
        $atktarget = "index.php?atknodetype=locations.location&atkaction=change&atklevel=0&atkprevlevel=0&atkselect=[atkprimkey]";
        $params = array("atkfilter" => $filter, "atktarget" => $atktarget);
        $centerpiece = $centerpiecelinks['change_location'] = href(dispatch_url("locations.location", "select", $params), $current_location, SESSION_NEW, false, $target);
    }
    // if user settings is allowed put link to it
    if (is_allowed("loginmanager.settings", "edit") && substr($user['name'], 0, 4) != 'demo') {
        $centerpiece .= '&nbsp; &nbsp; &nbsp;';
        $centerpiece .= $centerpiecelinks['userprefs'] = href(dispatch_url("loginmanager.settings", "edit"), atktext("userprefs"), SESSION_NEW, false, $target);
    }
}
开发者ID:rezaul101,项目名称:erp32,代码行数:30,代码来源:tools.php

示例6: printResult

 private function printResult($result, $includeProofs)
 {
     $output = "";
     switch ($result["type"]) {
         case "item":
             $parent = getEnclosingTag($result["position"]);
             $section = getEnclosingSection($result["position"]);
             // enumeration can live in sections, hence we should take care of this sidecase
             if ($parent["tag"] == $section["tag"]) {
                 $output .= "<li><p><a href='" . href("tag/" . $result["tag"]) . "'>" . ucfirst($result["type"]) . " " . $result["book_id"] . "</a> of the enumeration in <a href='" . href("tag/" . $section["tag"]) . "'>" . ucfirst($section["type"]) . " " . $section["book_id"] . "</a></p>";
             } else {
                 $output .= "<li><p><a href='" . href("tag/" . $result["tag"]) . "'>" . ucfirst($result["type"]) . " " . $result["book_id"] . "</a> of the enumeration in <a href='" . href("tag/" . $parent["tag"]) . "'>" . ucfirst($parent["type"]) . " " . $parent["book_id"] . "</a> in <a href='" . href("tag/" . $section["tag"]) . "'>" . "Section " . $section["book_id"] . ": " . parseAccents($section["name"]) . "</a></p>";
             }
             break;
         case "section":
             $output .= "<li><p><a href='" . href("tag/" . $result["tag"]) . "'>" . ucfirst($result["type"]) . " " . $result["book_id"] . ((!empty($result["name"]) and $result["type"] != "equation") ? ": " . parseAccents($result["name"]) . "</a>" : "</a>") . "</p>";
             break;
         default:
             $section = getEnclosingSection($result["position"]);
             $output .= "<li><p><a href='" . href("tag/" . $result["tag"]) . "'>" . ucfirst($result["type"]) . " " . $result["book_id"] . ((!empty($result["name"]) and $result["type"] != "equation") ? ": " . parseAccents($result["name"]) . "</a>" : "</a>") . " in <a href='" . href("tag/" . $section["tag"]) . "'>" . "Section " . $section["book_id"] . ": " . parseAccents($section["name"]) . "</a></p>";
             break;
     }
     if (!in_array($result["type"], array("section", "subsection"))) {
         if ($includeProofs) {
             $output .= "<pre class='preview' id='text-" . $result["tag"] . "'>" . parsePreview($result["text"]) . "</pre>";
         } else {
             $output .= "<pre class='preview' id='text-" . $result["tag"] . "'>" . parsePreview($result["text_without_proofs"]) . "</pre>";
         }
     }
     return $output;
 }
开发者ID:robertcardona,项目名称:stacks-website,代码行数:31,代码来源:results.php

示例7: linkTo

/**
 * Формирование ссылок.
 * 
 * @param string $text
 * @param string $query
 * @param string $attribute
 * @param bool $abs
 *
 * @return string 
 */
function linkTo(...$args)
{
    $default = ['attribute' => null, 'abs' => false];
    $args = array_merge($default, $args);
    extract($args);
    return '<a href="' . href($query, $abs) . '" ' . $attribute . ' >' . htmlspecialchars($text) . '</a>';
}
开发者ID:twin-ch,项目名称:abc-framework,代码行数:17,代码来源:functions.php

示例8: wlist

function wlist()
{
    $lines = null;
    $args = func_get_args();
    switch ($args[0]) {
        case 'scan':
            if ($elements = scan_dir($args[2]['path'], 'DIR')) {
                foreach ($elements as $value) {
                    if (is_file($args[2]['path'] . $value . $args[2]['find'])) {
                        $about = @parse_ini_file($args[2]['path'] . $value . '/protocol/about.gl.php');
                        $name = $about['product'] ? $about['product'] : $value;
                        $lines[$name] = $args[3] ? href(THIS, $args[3], $value) : href($value);
                        unset($about);
                    }
                }
            }
            break;
        default:
            if (is_array($args[2])) {
                foreach ($args[2] as $link => $name) {
                    $lines[$link] = href(THIS, $args[3], $name);
                }
            }
            break;
    }
    //Выводим массив ссылок ;)
    if ($lines) {
        foreach ($lines as $name => $link) {
            form("label", icon($args[1]) . '<a href="' . $link . '">' . $name . '</a>');
        }
    } else {
        html('<br> Wlist lib. (C) Kazin Fedor, 2010');
    }
}
开发者ID:cheevauva,项目名称:trash,代码行数:34,代码来源:wlist.gl.php

示例9: getMain

 public function getMain()
 {
     global $config;
     $value = "";
     $value .= "<h2><a href='" . href("about") . "'>About</a></h2>";
     $value .= "<p>This is the home page of the Stacks project. It is an open source textbook and reference work on algebraic stacks and the algebraic geometry needed to define them. For more general information see our extensive <a href='" . href("about") . "'>about page</a>.</p>";
     $value .= "<h2><a href='" . href("contribute") . "'>How to contribute?</a></h2>";
     $value .= "<p>The Stacks project is a collaborative effort. There is a <a href='https://github.com/stacks/stacks-project/blob/master/CONTRIBUTORS'>list of people who have contributed so far</a>. While browsing the Stacks project please provide feedback by leaving a comment. Another option is to suggest slogans for results. For more details please visit the <a href='/contribute'>contribute page</a>.</p>";
     $value .= "<h2><a href='" . href("browse") . "'>Browsing and downloads</a></h2>";
     $value .= "<p>The entire project in <a href='download/book.pdf'>one pdf file</a>. You can also <a href='" . href("browse") . "'>browse the project online</a>, and there is a tree view which starts at <a href='" . href("chapter/1") . "'>Chapter 1</a>. To download the source files there is <a href='https://github.com/stacks/stacks-project/'>stacks/stacks-project</a> at GitHub.</p>";
     $value .= "<h2><a href='" . href("tag") . "'>Looking up tags</a></h2>";
     $value .= "<p>You can search the Stacks project by keywords:";
     $value .= getSimpleSearchForm();
     $value .= "<p>If you on the other hand have a tag for an item (which can be anything, from section, lemma, theorem, etc.) in the Stacks project, you can <a href='" . href("tag") . "'>look up the tag's page</a>.</p>";
     $value .= "<h2><a href='" . href("tags") . "'>Referencing the Stacks project</a></h2>";
     $value .= "<p>Items (sections, lemmas, theorems, etc.) in the Stacks project are referenced by their tag. See the <a href='" . href("tags") . "'>tags explained page</a> to learn more about tags and how to reference them in a LaTeX document.</p>";
     $value .= "<h2>Leaving comments</h2>";
     $value .= "<p>You can leave comments on each and every tag's page. If you wish to stay updated on the comments, there is both a <a href='" . href("recent-comments") . "'>page containing recent comments</a> and an <a href='" . href("recent-comments.xml") . "' class='rss'>RSS feed</a> available.</p>";
     // TODO recent-comments.xml doesn't exist yet
     $value .= "<h2>Recent changes to the Stacks project</h2>";
     $value .= "<p>The Stacks project is hosted at GitHub, so you can <a href='https://github.com/stacks/stacks-project/commits/master'>browse the complete history</a> there.</p>";
     $value .= "<h2>License</h2>";
     $value .= "This project is licensed under the <a href='https://github.com/stacks/stacks-project/blob/master/COPYING'>GNU Free Documentation License</a>.";
     return $value;
 }
开发者ID:robertcardona,项目名称:stacks-website,代码行数:25,代码来源:index.php

示例10: doEdit

 public function doEdit()
 {
     $data['describe_info'] = doSafe($_POST['describe_info']);
     $data['nav'] = intval($_POST['nav']);
     if (empty($data['describe_info'])) {
         href('请填写完整的信息');
     }
     if ($this->id === 0) {
         //新增标签
         $res = $this->tag->addTag($data);
         if ($res) {
             href('新增标签成功', 2);
         } else {
             href('新增标签失败');
         }
     } else {
         //修改标签
         $res = $this->tag->chengeTagByTagId($this->id, $data);
         if ($res) {
             href('修改标签成功', 2);
         } else {
             href('修改标签失败');
         }
     }
 }
开发者ID:lxpfigo,项目名称:blog,代码行数:25,代码来源:TagController.class.php

示例11: process

 public function process()
 {
     $http_host = $_SERVER['HTTP_HOST'];
     if ($http_host == 'localhost:8080') {
         $http_host = 'localhost';
     }
     $host_name = 'http://' . $http_host;
     $actual_url = str_replace($host_name, '', APPLICATION_ROOT);
     $actual_url = str_replace($actual_url, '', $_SERVER['REQUEST_URI']);
     $size = $this->getP3();
     if (!$size) {
         location('/error/base/' . urlencode('The url was invalid'));
     }
     $size_ex = explode('x', $size);
     $height = isset($size_ex[0]) ? $size_ex[0] : '100';
     $width = isset($size_ex[1]) ? $size_ex[1] : '100';
     $image_path = str_replace('/images/process/' . $size, '', $actual_url);
     $full_image_path = 'http://' . $http_host . $image_path;
     $headers = get_headers($full_image_path);
     foreach ($headers as $header) {
         if (strpos($header, 'Content-Type') !== false) {
             header($header);
         }
     }
     $new_url = 'http://' . $http_host . href('/framework/external/timthumb/timthumb.php');
     $new_url .= '?src=' . $image_path;
     $new_url .= '&h=' . $height;
     $new_url .= '&w=' . $width;
     echo file_get_contents($new_url);
 }
开发者ID:nikhildixit,项目名称:Generatrix,代码行数:30,代码来源:imagesController.php

示例12: getMain

 public function getMain()
 {
     $value = "";
     $value .= "<h2>The tag system</h2>";
     $value .= "<p>Each tag refers to a unique item (section, lemma, theorem, etc.) in order for this project to be referenceable. These tags don't change even if the item moves within the text.";
     $value .= "<h2>How to use it?</h2>";
     $value .= "<p>To find the tag for an item, hover/click on the item in the <a href='download/book.pdf'>pdf file</a> or find the item in the tree view starting at <a href='" . href("chapter/1") . "'>Chapter 1</a>. See below for LaTeX instructions on how to reference a tag.";
     $value .= "<p>To find an item using a tag, <a href='" . href('tag') . "'>search for the tag's page</a>. The tag's page contains the location for the item referenced by the tag. It also contains its LaTeX code and a section for leaving comments.";
     $value .= "<h2>More information</h2>";
     $value .= "<p>The tag system provides stable references to definitions, lemmas, propositions, theorems, remarks, examples, exercises, situations and even equations, sections and items. As the project grows, each of these gets a tag which will always point to the same mathematical result. The place of the lemma in the document may change, the lemma may be moved to a different chapter, but its tag always keeps pointing to it.</p>";
     $value .= "<p>If it ever turns out that a lemma, theorem, etc. was wrong then we may remove it from the project. However, we will keep the tag, and there will be an explanation for its disappearance (in the file tags mentioned below).";
     $value .= "<h2 id='reference'>How to reference tags</h2>";
     $value .= "<p>In your BibTeX file put";
     $value .= "<pre><code>@misc{stacks-project,\n";
     $value .= "  shorthand    = {Stacks},\n";
     $value .= "  author       = {The {Stacks Project Authors}},\n";
     $value .= "  title        = {\\itshape Stacks Project},\n";
     $value .= "  howpublished = {\\url{http://stacks.math.columbia.edu}},\n";
     $value .= "  year         = {" . date('Y') . "},\n";
     $value .= "}</code></pre>";
     $value .= "Then you can use the citation code we provide on each tag's page (below the preview) to <em>cite</em> and <em>link</em> the corresponding tag, for example by";
     $value .= "<pre><code>\\cite[\\href{http://stacks.math.columbia.edu/tag/0123}{Tag 0123}]{stacks-project}</code></pre>";
     $value .= "<p>This can be changed according to your tastes. In order to make the <code>\\url</code> and <code>\\href</code> commands to work, one should use the <a href='http://ctan.org/pkg/hyperref'><code>hyperref</code></a> package. Some options are provided on the lookup page for a tag.</p>";
     $value .= "<h2>Technical information</h2>";
     $value .= "<p>There is a file called <a href='https://github.com/stacks/stacks-project/blob/master/tags/tags'><var>tags</var></a> (in the <a href='https://github.com/stacks/stacks-project/tree/master/tags'>tags subdirectory</a> of the Stacks project) which has on each line the tag followed by an identifier. Example:";
     $value .= "<pre><code>01MB,constructions-lemma-proj-scheme</code></pre>";
     $value .= "<p>Here the tag is <var>01MB</var> and the identifier is <var>constructions-lemma-proj-scheme</var>. This means that the tag points to a lemma from the file <var>constructions.tex</var>. It currently has the label <var>lemma-proj-scheme</var>. If we ever change the lemma's  label, or move the lemma to a different file, then we will change the corresponding line in the file tags by changing the identifier correspondingly. But we will <strong>never change the tag</strong>.</p>";
     $value .= "<p>A tag is a four character string made up out of digits and capital letters. They are ordered lexicographically between <var>0000</var> and <var>ZZZZ</var> originally giving 1679616 possible tags. But as there might arise confusion from the similarities between <var>0</var> and <var>O</var> it was decided to stop using the letter <var>O</var>. The last tag using <var>O</var> is <a href='" . href('tag/04DO') . "'>tag <var>04DO</var></a>. Thus from <var>04DP</var> on there are only 35 values per position. The 302 tags assigned before this new guideline will remain, as tags are constant.";
     $value .= "<h2 id='stacks-epoch'>Stacks epoch</h2>";
     $value .= "<p>The first 3026 tags were introduced in the Stacks project on <a href='https://github.com/stacks/stacks-project/commit/fad2e125112d54e1b53a7e130ef141010f9d151d'>May 16, 2009</a>. New tags are assigned by the maintainer of the Stacks project every once in a while using a script. As the Stacks project is always under construction the available tags on the website, in the git repository, and the available results in the Stacks project can sometimes be a little bit out of sync.";
     return $value;
 }
开发者ID:robertcardona,项目名称:stacks-website,代码行数:32,代码来源:tags.php

示例13: getMain

 public function getMain()
 {
     $value = "";
     $value .= "<h2>About</h2>";
     $value .= "<p>The Stacks project started in 2005. The initial idea was for it to be a collaborative web-based project with the aim of writing an introductory text about algebraic stacks. Temporarily there was a mailing list and some discussion as to how to proceed. For example, there are issues with referencing such a document, how to distribute credit, who does what, and many more. Although we have definite ideas about most of these points we would like to take a more positive approach. Namely, to simply create something and solve problems and answer questions as they come up.</p>";
     $value .= "<hr>";
     $value .= "<p>We do want to answer a few basic questions that the casual visitor may have about this project:</p>";
     $value .= "<ol>";
     $value .= "<li>The Stacks project is no longer an introductory text, but aims to build up enough basic algebraic geometry as foundations for algebraic stacks. This implies a good deal of theory on commutative algebra, schemes, varieties, algebraic spaces, has to be developed en route.";
     $value .= "<li>The Stacks project has a maintainer (currently <a href='http://www.math.columbia.edu/~dejong/'>Aise Johan de Jong</a>) who accepts changes etc. proposed by contributors. Although everyone is encouraged to participate it is not a wiki.";
     $value .= "<li>The Stacks project is meant to be read online, and therefore we do not worry about length of the chapters, etc. Moreover, with hyperlinks it is possible to quickly browse through the chapters to find the lemmas, theorems, etc. that a given result depends on.";
     $value .= "</ol>";
     $value .= "<h2><a href='" . href("acknowledgements") . "'>Acknowledgements</a></h2>";
     $value .= "<p>We have a page <a href='" . href("acknowledgements") . "'>acknowledging support</a>.";
     $value .= "<h2>The Stacks project, its website, and tools</h2>";
     $value .= "<p>There are currently three open source repositories tracking development for the Stacks project and its website:</p>";
     $value .= "<ol>";
     $value .= "<li>The LaTeX files making up the Stacks project itself can be found <a href='https://github.com/stacks/stacks-project'>here</a>.";
     $value .= "<li>The website is being developed as a <a href='https://github.com/stacks/stacks-website'>separate project</a>. It is currently maintained by <a href='http://pbelmans.wordpress.com/'>Pieter Belmans</a>.";
     $value .= "<li>There is a <a href='https://github.com/stacks/stacks-tools'>repository</a> containing tools and infrastructure used by both the project and the website.";
     $value .= "</ol>";
     $value .= "<p>If you wish to start your own project, inspired by the Stacks project we hope the combination of these projects can serve as a starting point. If you have any questions about this, please do not hesitate to send an email to <a href='mailto:stacks.project@gmail.com'>stacks.project@gmail.com</a>.";
     $value .= "<h2><a href='" . href("api") . "'>API</a></h2>";
     $value .= "<p>You can query the Stacks project through an <a href='" . href("api") . "'><abbr title='Application Programming Interface'>API</abbr></a>.";
     return $value;
 }
开发者ID:robertcardona,项目名称:stacks-website,代码行数:26,代码来源:about.php

示例14: plugin_list

function plugin_list($message = '')
{
    pagetop(gTxt('edit_plugins'), $message);
    echo n . n . startTable('edit') . tr(tda(plugin_form(), ' colspan="8" style="height: 30px; border: none;"')) . endTable();
    extract(gpsa(array('sort', 'dir')));
    $dir = $dir == 'desc' ? 'desc' : 'asc';
    if (!in_array($sort, array('name', 'status', 'author', 'version', 'modified', 'load_order'))) {
        $sort = 'name';
    }
    $sort_sql = $sort . ' ' . $dir;
    $switch_dir = $dir == 'desc' ? 'asc' : 'desc';
    $rs = safe_rows_start('name, status, author, author_uri, version, description, length(help) as help, abs(strcmp(md5(code),code_md5)) as modified, load_order, flags', 'txp_plugin', '1 order by ' . $sort_sql);
    if ($rs and numRows($rs) > 0) {
        echo '<form action="index.php" method="post" name="longform" onsubmit="return verify(\'' . gTxt('are_you_sure') . '\')">' . startTable('list') . tr(column_head('plugin', 'name', 'plugin', true, $switch_dir, '', '', 'name' == $sort ? $dir : '') . column_head('author', 'author', 'plugin', true, $switch_dir, '', '', 'author' == $sort ? $dir : '') . column_head('version', 'version', 'plugin', true, $switch_dir, '', '', 'version' == $sort ? $dir : '') . column_head('plugin_modified', 'modified', 'plugin', true, $switch_dir, '', '', 'modified' == $sort ? $dir : '') . hCell(gTxt('description')) . column_head('active', 'status', 'plugin', true, $switch_dir, '', '', 'status' == $sort ? $dir : '') . column_head('order', 'load_order', 'plugin', true, $switch_dir, '', '', 'load_order' == $sort ? $dir : '') . hCell(gTxt('manage'), '', ' class="manage"') . hCell());
        while ($a = nextRow($rs)) {
            foreach ($a as $key => $value) {
                ${$key} = htmlspecialchars($value);
            }
            // Fix up the description for clean cases
            $description = preg_replace(array('#&lt;br /&gt;#', '#&lt;(/?(a|b|i|em|strong))&gt;#', '#&lt;a href=&quot;(https?|\\.|\\/|ftp)([A-Za-z0-9:/?.=_]+?)&quot;&gt;#'), array('<br />', '<$1>', '<a href="$1$2">'), $description);
            $help = !empty($help) ? n . t . '<li><a href="?event=plugin' . a . 'step=plugin_help' . a . 'name=' . urlencode($name) . '">' . gTxt('help') . '</a></li>' : '';
            $plugin_prefs = $flags & PLUGIN_HAS_PREFS && $status ? n . t . '<li><a href="?event=plugin_prefs.' . urlencode($name) . '">' . gTxt('plugin_prefs') . '</a></li>' : '';
            echo tr(n . td($name) . td(href($author, $author_uri)) . td($version, 10) . td($modified ? gTxt('yes') : '') . td($description, 260) . td(status_link($status, $name, yes_no($status)), 30) . td($load_order) . td(n . '<ul class="plugin_manage">' . $help . n . t . '<li>' . eLink('plugin', 'plugin_edit', 'name', $name, gTxt('edit')) . '</li>' . $plugin_prefs . n . '</ul>') . td(fInput('checkbox', 'selected[]', $name), 30));
            unset($name, $page, $deletelink);
        }
        echo tr(tda(select_buttons() . plugin_multiedit_form('', $sort, $dir, '', ''), ' colspan="10" style="text-align: right; border: none;"')) . n . endTable() . n . '</form>';
    }
}
开发者ID:joebushi,项目名称:textpattern,代码行数:28,代码来源:txp_plugin.php

示例15: doLoginForm

/**
 * Renders and outputs a login form.
 *
 * This function outputs a full HTML document,
 * including &lt;head&gt; and footer.
 *
 * @param string|array $message The activity message
 */
function doLoginForm($message)
{
    global $textarray_script, $event, $step;
    include txpath . '/lib/txplib_head.php';
    $event = 'login';
    if (gps('logout')) {
        $step = 'logout';
    } elseif (gps('reset')) {
        $step = 'reset';
    }
    pagetop(gTxt('login'), $message);
    $stay = (cs('txp_login') and !gps('logout') ? 1 : 0);
    $reset = gps('reset');
    $name = join(',', array_slice(explode(',', cs('txp_login')), 0, -1));
    $out = array();
    if ($reset) {
        $out[] = hed(gTxt('password_reset'), 2, array('id' => 'txp-login-heading')) . graf(n . span(tag(gTxt('name'), 'label', array('for' => 'login_name')), array('class' => 'txp-label')) . n . span(fInput('text', 'p_userid', $name, '', '', '', INPUT_REGULAR, '', 'login_name'), array('class' => 'txp-value')), ' class="login-name"') . graf(fInput('submit', '', gTxt('password_reset_button'), 'publish') . n) . graf(href(gTxt('back_to_login'), 'index.php'), array('class' => 'login-return')) . hInput('p_reset', 1);
    } else {
        $out[] = hed(gTxt('login_to_textpattern'), 2, array('id' => 'txp-login-heading')) . graf(n . span(tag(gTxt('name'), 'label', array('for' => 'login_name')), array('class' => 'txp-label')) . n . span(fInput('text', 'p_userid', $name, '', '', '', INPUT_REGULAR, '', 'login_name'), array('class' => 'txp-value')), array('class' => 'login-name')) . graf(n . span(tag(gTxt('password'), 'label', array('for' => 'login_password')), array('class' => 'txp-label')) . n . span(fInput('password', 'p_password', '', '', '', '', INPUT_REGULAR, '', 'login_password'), array('class' => 'txp-value')), array('class' => 'login-password')) . graf(checkbox('stay', 1, $stay, '', 'login_stay') . n . tag(gTxt('stay_logged_in'), 'label', array('for' => 'login_stay')) . popHelp('remember_login') . n, array('class' => 'login-stay')) . graf(fInput('submit', '', gTxt('log_in_button'), 'publish') . n) . graf(href(gTxt('password_forgotten'), '?reset=1'), array('class' => 'login-forgot'));
        if (gps('event')) {
            $out[] = eInput(gps('event'));
        }
    }
    echo form(tag(join('', $out), 'section', array('role' => 'region', 'class' => 'txp-login', 'aria-labelledby' => 'txp-login-heading')), '', '', 'post', '', '', 'login_form') . script_js('textpattern.textarray = ' . json_encode($textarray_script)) . n . '</main><!-- /txp-body -->' . n . '</body>' . n . '</html>';
    exit(0);
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:34,代码来源:txp_auth.php


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