-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filter Categories for Tags Change $url position to correct location at Comments.class.php Add Author Pages #60 Security Fix Issue Change Ajax URL Router format Change Ajax, Mods router scrapper
- Loading branch information
Puguh Wijayanto
committed
Jan 8, 2017
1 parent
0496452
commit 6e21c01
Showing
37 changed files
with
710 additions
and
387 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
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 |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<?php | ||
|
||
defined('GX_LIB') or die('Direct Access Not Allowed!'); | ||
/* | ||
* GeniXCMS - Content Management System | ||
* | ||
* PHP Based Content Management System and Framework | ||
* | ||
* @since 0.0.1 build date 20141006 | ||
* | ||
* @version 1.0.0 | ||
* | ||
* @link https://github.com/semplon/GeniXCMS | ||
* @link http://genixcms.org | ||
* | ||
* @author Puguh Wijayanto <psw@metalgenix.com> | ||
* @copyright 2014-2016 Puguh Wijayanto | ||
* @license http://www.opensource.org/licenses/mit-license.php MIT | ||
*/ | ||
|
||
$post = ''; | ||
$data = Router::scrap($param); | ||
$data['p_type'] = 'author'; | ||
|
||
//$cat = Db::escape(Typo::Xclean($_GET['cat'])); | ||
$author = (SMART_URL) ? $data['author'] : Typo::cleanX(Typo::strip($_GET['author'])); | ||
$data['max'] = Options::v('post_perpage'); | ||
//echo User::isExist($author); | ||
if (User::isExist($author)) { | ||
if (SMART_URL) { | ||
if (isset($data['paging'])) { | ||
$paging = $data['paging']; | ||
} | ||
$type = isset($data['type']) ? $data['type']: ''; | ||
} else { | ||
if (isset($_GET['paging'])) { | ||
$paging = Typo::int($_GET['paging']); | ||
} | ||
$type = isset($_GET['type']) ? $_GET['type']: ''; | ||
} | ||
|
||
if ($type != '') { | ||
$where = " AND `type` = '{$type}' "; | ||
} else { | ||
$where = ''; | ||
} | ||
//$paging = (SMART_URL) ? $data['paging'] : Typo::int(is_int($_GET['paging'])); | ||
if (isset($paging) && $paging != '') { | ||
if ($paging > 0) { | ||
$offset = ($paging - 1) * $data['max']; | ||
} else { | ||
$offset = 0; | ||
} | ||
// echo $offset; | ||
$pagingtitle = " - Page {$paging}"; | ||
} else { | ||
$offset = 0; | ||
$paging = 1; | ||
$pagingtitle = ''; | ||
} | ||
// echo $paging; | ||
$data['sitetitle'] = 'Post by : '.$author.$pagingtitle; | ||
$data['posts'] = Db::result( | ||
sprintf( | ||
"SELECT * FROM `posts` | ||
WHERE `author` = '%s' %s | ||
AND `status` = '1' | ||
ORDER BY `date` | ||
DESC LIMIT %d, %d", | ||
$author, | ||
$where, | ||
$offset, | ||
$data['max'] | ||
) | ||
); | ||
$data['num'] = Db::$num_rows; | ||
// echo $data['num']; | ||
$data['posts'] = Posts::prepare($data['posts']); | ||
// print_r($data['posts']); | ||
$url = Url::author($author, $type); | ||
$paging = array( | ||
'paging' => $paging, | ||
'table' => 'posts', | ||
'where' => '`author` = \''.$author.'\' AND `status` = \'1\' '.$where, | ||
'max' => $data['max'], | ||
'url' => $url, | ||
'type' => Options::v('pagination'), | ||
); | ||
$data['paging'] = Paging::create($paging, SMART_URL); | ||
Theme::theme('header', $data); | ||
Theme::theme('author', $data); | ||
Theme::footer($data); | ||
exit; | ||
} else { | ||
Control::error('404'); | ||
exit; | ||
} | ||
/* End of file cat.control.php */ | ||
/* Location: ./inc/lib/Control/Frontend/cat.control.php */ |
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
Oops, something went wrong.