Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Overlook determine global variable
#4
you are right, but I think i would fix it another way:

Code:
function get_page_url($a=false) {
    global $inter;
    global $url;
    global $SITEURL;
    global $PRETTYURLS;
    global $parent;
    if ($parent != '' ) { $parent = tsl($parent); }
    if ($url == 'index' ) { $urls = ''; } else { $urls = $url; }
    
    if ($PRETTYURLS == '1') {
        if (!$a) {
            echo $SITEURL . $parent . $urls;
        } else {
            return $SITEURL . $parent . $urls;
        }
    } else {

       if ($urls != '') {
          $inter = 'index.php?id=';
       } else {
          $inter = '';
       }

        if (!$a) {
            echo $SITEURL . $inter . $urls;
        } else {
            return $SITEURL . $inter . $urls;
        }
    }
    
}
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply


Messages In This Thread
Overlook determine global variable - by ccagle8 - 2010-02-26, 12:29:28
Overlook determine global variable - by ccagle8 - 2010-02-26, 13:15:08
Overlook determine global variable - by ccagle8 - 2010-02-26, 13:18:25



Users browsing this thread: 1 Guest(s)