Changeset 843 in ExiteCMS for trunk/includes/core_functions.php


Ignore:
Timestamp:
09/27/07 19:34:07 (5 years ago)
Author:
hverton
Message:

Moved all CMS templates from the theme to the include directory. They are theme independent
Added a Smarty resource to load templates from strings
Some XHTML fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/core_functions.php

    r834 r843  
    498498     
    499499    $text = preg_replace('#\[flash width=([0-9]*?) height=([0-9]*?)\]([^\s\'\";:\+]*?)(\.swf)\[/flash\]#si', '<object classid=\'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\' codebase=\'http://active.macromedia.com/flash6/cabs/swflash.cab#version=6,0,0,0\' id=\'\3\4\' width=\'\1\' height=\'\2\'><param name=movie value=\'\3\4\'><param name=\'quality\' value=\'high\'><param name=\'bgcolor\' value=\'#ffffff\'><embed src=\'\3\4\' quality=\'high\' bgcolor=\'#ffffff\' width=\'\1\' height=\'\2\' type=\'application/x-shockwave-flash\' pluginspage=\'http://www.macromedia.com/go/getflashplayer\'></embed></object>', $text); 
    500     $text = preg_replace("#\[img\]((http|ftp|https|ftps)://)(.*?)(\.(jpg|jpeg|gif|png|JPG|JPEG|GIF|PNG))\[/img\]#sie","'<img src=\'\\1'.str_replace(array('.php','?','&','='),'','\\3').'\\4\' style=\'border:0px\' />'",$text); 
     500    $text = preg_replace("#\[img\]((http|ftp|https|ftps)://)(.*?)(\.(jpg|jpeg|gif|png|JPG|JPEG|GIF|PNG))\[/img\]#sie","'<img src=\'\\1'.str_replace(array('.php','?','&','='),'','\\3').'\\4\' style=\'border:0px\' alt=\'\' />'",$text); 
    501501 
    502502    $text = preg_replace('#\[quote=([\r\n]*)(.*?)\]#si', '<b>\2 '.$locale['199'].':</b><br />[quote]', $text); 
     
    711711    global $settings; 
    712712     
     713    // ask the user for authentication 
    713714    header('WWW-Authenticate: Basic realm="'.$settings['sitename'].'"'); 
    714715    header('HTTP/1.0 401 Unauthorized'); 
    715     echo "Pressed cancel. Need to replace this with something useful"; 
     716    // if the user cancels, redirect to the homepage 
     717    echo "<script type='text/javascript'>document.location.href='".BASEDIR."index.php'</script>\n"; 
    716718    exit; 
    717719} 
     
    735737        } 
    736738        if ($data['user_status'] == 0) {     
    737             // HV - set the 'remember me' status value into a cookie 
    738739            if (isset($_POST['remember_me'])) { 
    739740                setcookie("remember_me", "yes", time() + 31536000, "/", "", "0"); 
     
    743744                $cookie_exp = time() + 60*30; 
    744745            } 
    745             // HV - end of code change 
    746746            header("P3P: CP='NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM'"); 
    747747            setcookie("userinfo", $cookie_value, $cookie_exp, "/", "", "0"); 
Note: See TracChangeset for help on using the changeset viewer.