Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Added search to the blog and fixed an XSS issue in tag.php
- Loading branch information
brianlmoon
committed
Jan 11, 2009
1 parent
586732d
commit be23028
Showing
20 changed files
with
139 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| <?php | ||
|
|
||
| include_once "./include/common.php"; | ||
| include_once "./include/database.php"; | ||
| include_once "./include/output.php"; | ||
| include_once "./include/format.php"; | ||
|
|
||
| $display = 10; | ||
|
|
||
| if(isset($_GET["s"])){ | ||
| $start = (int)$_GET["s"]; | ||
| } else { | ||
| $start = 0; | ||
| } | ||
|
|
||
| $query = (isset($_GET["q"])) ? trim((string)$_GET["q"]) : ""; | ||
|
|
||
| if(empty($query)){ | ||
| wc_output("notfound"); | ||
| return; | ||
| } | ||
|
|
||
| list($WCDATA["posts"], $total_posts) = wc_db_get_post_list($start, $display, true, $query); | ||
|
|
||
| if($total_posts<1){ | ||
| wc_output("notfound"); | ||
| return; | ||
| } | ||
|
|
||
| foreach($WCDATA["posts"] as &$post){ | ||
| wc_format_post($post); | ||
| } | ||
| unset($post); | ||
|
|
||
| $WCDATA["title"] = "Posts containing `".htmlspecialchars($query)."` - ".$WC["default_title"]; | ||
| $WCDATA["description"] = "Posts containing `".htmlspecialchars($query)."`. ".$WC["default_description"]; | ||
|
|
||
| $WCDATA["feed_url"] = wc_get_url("feed", "rss", "", $query); | ||
|
|
||
| if($total_posts > $start + $display) { | ||
| $s = $start + $display; | ||
| $WCDATA["older_url"] = wc_get_url("tag", $tag)."&s=$s"; | ||
| } | ||
|
|
||
| if(($start > 0)){ | ||
| $WCDATA["newer_url"] = wc_get_url("tag", $tag); | ||
| $s = $start - $display; | ||
| if($s>0){ | ||
| $WCDATA["newer_url"].="&s=$s"; | ||
| } | ||
| } | ||
|
|
||
|
|
||
| wc_output("post_list", $WCDATA); | ||
|
|
||
| ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -248,4 +248,8 @@ body | |
| #column2 li | ||
| { | ||
| border-bottom: dashed 1px #EFEFD6; | ||
| } | ||
|
|
||
| #q { | ||
| width: 70%; | ||
| } | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters