]> git.bts.cx Git - cx.git/blob - cx/lib/url.php
Added support for previewing posts when logged in
[cx.git] / cx / lib / url.php
1 <?php
2
3 cx_require('lib', 'site.php');
4
5 function cx_url($path) {
6         return $path;
7 }
8
9 function cx_url_admin($path) {
10         return cx_url('/cx' . $path);
11 }
12
13 function cx_url_site($path) {
14         return cx_site_url() . cx_url($path);
15 }
16
17 function cx_url_page($number, $delta = 0) {
18         $next_number = $number + $delta;
19         if ($next_number <= 0) {
20                 return cx_url_site('/');
21         } else {
22                 return cx_url_site('/page/' . $next_number );
23         }
24 }