|
                                    <i class="icon-folder-close"></i> 标签:
                                    <?php 
            if (is_array($post["post_tag"])) {
                $i = 0;
                $__LIST__ = $post["post_tag"];
                if (count($__LIST__) == 0) {
                    echo "";
                } else {
                    foreach ($__LIST__ as $key => $tag) {
                        $mod = $i % 2;
                        ++$i;
                        ?>
<a
                                            href="<?php 
                        echo get_tag_url($tag);
                        ?>
"><?php 
                        echo $tag["tag_name"];
                        ?>
</a>,<?php 
                    }
                }
            }
            ?>
                                    |
                                    <i class="icon-calendar"></i> <?php 
            echo gettimeurl($post['post_date'], $post['post_type']);
            ?>
                                </p>
예제 #2
0
                        <input name='url' type='text'   size='30' style="border: 1px #000000 solid;  solid;text-align: center;font-family: 'Arial, Sans-Serif';font-size:16px;background-color: #B1B1B1;padding: 5px;" onkeydown="if (event.keyCode==13) {document.linkurl.url.click();}" />
                        <input type='button' value='Link it!' onclick="parent.location='{$FULLPATH}{$request_uri}|'+document.linkurl.url.value"/>
                        </form>
MSG;
        }
    } elseif (valid_url($request_uri)) {
        if ($tag = register_url($request_uri)) {
            //tag registration successful
            //store this info and take it to the tag page where he will be congratulated
            $_SESSION['newtag'] = $tag;
            header("Location: " . $FULLPATH . $tag);
        } else {
            //the URL was valid but some error occured. Contact the admin.
            die('<br/>An error occured, URL not registered');
        }
    } elseif ($tag_url = get_tag_url($request_uri)) {
        if ($tag = register_url_tag($tag_url[1], $tag_url[0])) {
            //15min
            $_SESSION['newtag'] = $tag;
            header("Location: " . $FULLPATH . $tag);
        } else {
            //the URL and tag was valid but some error occured. Contact the admin.
            die('<br/>An error occured, URL not registered');
        }
    } else {
        $err_msg = <<<MSG
                <div style="text-align: left;">
                An error occured. You didn't used Linkpit in a syntax that it understand. This may be due to following reasons:
                <ul>
                <li>You didn't specified a valid tag name. A tag name is an 
                alphanumeric string which can also have hyphens(-), underscores(_) and period(.) but no spaces whole length must not exceed {$max_tag_length} </li>