summary refs log tree commit diff stats
path: root/includes/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/functions.php')
-rwxr-xr-xincludes/functions.php60
1 files changed, 60 insertions, 0 deletions
diff --git a/includes/functions.php b/includes/functions.php index 6b5d8e9..bc839df 100755 --- a/includes/functions.php +++ b/includes/functions.php
@@ -376,4 +376,64 @@ function getTagColor($i)
376 } 376 }
377} 377}
378 378
379function getLayout()
380{
381 if (!isset($_COOKIE['layout']))
382 {
383 return '7';
384 } else {
385 return $_COOKIE['layout'];
386 }
387}
388
389function getRewriteURL()
390{
391 if (!isset($_GET['area']))
392 {
393 return '/';
394 } else {
395 if ($_GET['area'] == 'blog')
396 {
397 if (isset($_GET['author']))
398 {
399 return '/blog/author/' . $_GET['author'] . '.php';
400 } else if (isset($_GET['tag']))
401 {
402 return '/blog/tag/' . $_GET['tag'] . '.php';
403 } else if (isset($_GET['post']))
404 {
405 return '/blog/' . $_GET['post'] . '/';
406 } else {
407 return '/blog/';
408 }
409 } else if ($_GET['area'] == 'poll')
410 {
411 if (isset($_GET['id']))
412 {
413 return '/poll/' . $_GET['id'] . '.php';
414 } else {
415 return '/poll/';
416 }
417 } else if ($_GET['area'] == 'quotes')
418 {
419 if (isset($_GET['act']))
420 {
421 return '/quotes/' . $_GET['act'] . '.php';
422 } else {
423 return '/quotes/';
424 }
425 } else if ($_GET['area'] == 'error')
426 {
427 if (isset($_GET['id']))
428 {
429 return '/error/' . $_GET['id'] . '.php';
430 } else {
431 return '/error/';
432 }
433 } else {
434 return '/' . $_GET['area'] . '/';
435 }
436 }
437}
438
379?> 439?>