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


Ignore:
Timestamp:
09/22/07 00:08:35 (5 years ago)
Author:
hverton
Message:

changed copyright notice
changed Smarty directory pli-plugins to custom-plugins
added Smarty buttonlink function, to replace image buttons by real buttons using a locale for the button text

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/core_functions.php

    r807 r834  
    11<?php 
    22/*---------------------------------------------------+ 
    3 | PLi-Fusion Content Management System               | 
     3| ExiteCMS Content Management System                 | 
    44+----------------------------------------------------+ 
    5 | Copyright 2007 WanWizard (wanwizard@gmail.com)     | 
    6 | http://www.pli-images.org/pli-fusion              | 
     5| Copyright 2007 Harro "WanWizard" Verton, Exite BV  | 
     6| for support, please visit http://exitecms.exite.eu | 
    77+----------------------------------------------------+ 
    8 | Some portions copyright ? 2002 - 2006 Nick Jones   | 
     8| Some portions copyright 2002 - 2006 Nick Jones     | 
    99| http://www.php-fusion.co.uk/                       | 
     10+----------------------------------------------------+ 
    1011| Released under the terms & conditions of v2 of the | 
    1112| GNU General Public License. For details refer to   | 
     
    3738    if ((isset($_GET) == true) && (is_array($_GET) == true)) extract($_GET, EXTR_OVERWRITE); 
    3839} else { 
    39     trigger_error("'register_globals is on'. This is a security risk, and should be deactivated!", E_USER_WARNING); 
     40    // if not, unset all globals created by register_globals! 
     41    $rg = array_keys($_REQUEST); 
     42    foreach($rg as $var) { 
     43        if ($_REQUEST[$var] === $$var) { 
     44//          unset($$var); 
     45        } 
     46    } 
    4047} 
    4148 
     
    7582define("PATH_PM_ATTACHMENTS", PATH_ROOT."files/pm_attachments/"); 
    7683 
    77 // mark that PLi-Fusion is properly initialized 
    78 define("IN_FUSION", TRUE); 
     84// mark that ExiteCMS is properly initialized 
     85define("ExiteCMS_INIT", TRUE); 
    7986 
    8087// load the config file 
     
    184191    ".png", 
    185192); 
    186  
    187 /*---------------------------------------------------+ 
    188 | DEVELOPMENT DEBUGGING - LOG ALL GET AND POST VARS  | 
    189 +----------------------------------------------------*/ 
    190 $skip_modules = array(); 
    191 $skip_modules[] = "bartext.php"; 
    192 if (!in_array(FUSION_SELF, $skip_modules)) { 
    193     foreach ($_GET as $_name => $_value) { 
    194         $result = dbquery("INSERT INTO ".$db_prefix."0_varlog (module, type, name, value) VALUES ('".FUSION_SELF."', 'G', '".$_name."', '".mysql_escape_string($_value)."')"); 
    195     } 
    196     foreach ($_POST as $_name => $_value) { 
    197         if (is_array($_value)) { 
    198             $result = dbquery("INSERT INTO ".$db_prefix."0_varlog (module, type, name, value) VALUES ('".FUSION_SELF."', 'P', '".$_name."', 'array!')"); 
    199         } else { 
    200             $result = dbquery("INSERT INTO ".$db_prefix."0_varlog (module, type, name, value) VALUES ('".FUSION_SELF."', 'P', '".$_name."', '".mysql_escape_string($_value)."')"); 
    201         } 
    202     } 
    203 } 
    204193 
    205194// debug function, handy to print a standard debug text 
     
    682671} 
    683672 
     673function checkCMSversion($min=false, $max=false) { 
     674    global $locale; 
     675 
     676    $error   = ""; 
     677     
     678    if ($min) { 
     679        if (str_replace(".", "", $settings['version']) < str_replace(".", "", $min)) { 
     680            $error .= sprintf($locale['mod001'], $min); 
     681        } 
     682    } 
     683    if ($max) { 
     684        if (str_replace(".", "", $settings['version']) > str_replace(".", "", $max)) { 
     685            $error .= sprintf($locale['mod002'], $max); 
     686        } 
     687    } 
     688    return $error; 
     689} 
     690 
     691function checkCMSrevision($min=false, $max=false) { 
     692    global $locale; 
     693 
     694    $error   = ""; 
     695     
     696    if ($min) { 
     697        if ($settings['revision'] < $min) { 
     698            $error .= sprintf($locale['mod003'], $min); 
     699        } 
     700    } 
     701    if ($max) { 
     702        if ($settings['revision'] > $max) { 
     703            $error .= sprintf($locale['mod005'], $max); 
     704        } 
     705    } 
     706    return $error; 
     707} 
     708 
    684709function auth_BasicAuthentication() { 
    685710     
Note: See TracChangeset for help on using the changeset viewer.