Beispiel #1
0
                        <div>
		                 <input id="stags" name="tags" class="search_list" type="text" />
		                 <br />
                        <input name="commit" class="secondary_search" type="submit" value="" /><br /><br />
                        </div>
		            </form>
		      </div>
              </center>
              </div>
              <div class="sidebar2 sidebar4">
              <center>
		          <div class="sidebar3">
                    <h5>Tags</h5><br />
                        <ul id="tag-sidebar">';
    foreach ($ttags as $current) {
        $count = $post->index_count($current);
        echo '<li><span style="color: #a0a0a0;">? <a href="index.php?page=post&amp;s=list&amp;tags=' . $current . '">' . str_replace('_', ' ', $current) . "</a> " . $count['index_count'] . "</span></li>";
    }
    echo '</ul><br /><br /><br /><br /><br /><br /><br /><br /><div id="stats">
                <h5>Statistics</h5><br />
                    <ul>
                        <li>Id: ' . $id . '</li>
                        <li>Posted: ' . $post_data['creation_date'] . '<br /> by <a href="index.php?page=account_profile&amp;uname=' . $post_data['owner'] . '">' . $post_data['owner'] . '</a></li>
                        <li>Size: ' . $post_data['height'] . 'x' . $post_data['width'] . '</li>
                        <li>Source: <a href="' . $post_data['source'] . '" rel="nofollow">Click here</a></li>
                        <li>Rating: ' . $post_data['rating'] . '</li>
                        <li>Score: <a id="psc">' . $post_data['score'] . '</a> (vote <a href="#" onclick="Javascript:post_vote(\'' . $id . '\', \'up\')">up</a>/<a href="#" onclick="Javascript:post_vote(\'' . $id . '\', \'down\')">down</a>)
				        </li>';
    echo '</ul><li style="padding-top: 10px;"></li>
                <div>
                    <h5>Options</h5><br />
		<div id="tag_list">
		<!--<h5>Tags</h5>-->
		<ul>';
    //foreach($special_tags as $cur_tag)
    foreach ($categories as $cat => $tag_arr) {
        echo "<h5>" . ucfirst(str_replace('_', ' ', $cat));
        if (count($tag_arr) > 1) {
            if (substr($cat, -1) == 's') {
                echo "'";
            } else {
                echo "s";
            }
        }
        echo "</h5>";
        foreach ($tag_arr as $spec_tag) {
            $count = $post->index_count($spec_tag);
            //Capitalize characters immediatly after a period
            for ($i = 1; $i < strlen($spec_tag); $i++) {
                if (ctype_alpha($spec_tag[$i]) && ($spec_tag[$i - 1] == '.' || $spec_tag[$i - 1] == '(')) {
                    $spec_tag[$i] = strtoupper($spec_tag[$i]);
                }
            }
            echo '<li><span style="color: #a0a0a0;">? ' . '<a href="index.php?page=post&amp;s=list&amp;tags=' . $spec_tag . '" class="' . $cat . '">' . ucwords(str_replace('_', ' ', $spec_tag)) . "</a> " . $count['index_count'] . "</span></li>";
        }
        echo "<br/>";
    }
    echo "<h5>Tags</h5>";
    foreach ($ttags as $current) {
        $count = $post->index_count($current);
        echo '<li><span style="color: #a0a0a0;">? <a href="index.php?page=post&amp;s=list&amp;tags=' . $current . '" class="' . $categories[$current] . '">' . str_replace('_', ' ', $current) . "</a> " . $count['index_count'] . "</span></li>";
    }