Login   Register  
PHP Classes
elePHPant
Icontem

File: common.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Alex Lau  >  Mix2ool  >  common.php  >  Download  
File: common.php
Role: Auxiliary script
Content type: text/plain
Description: The common include file
Class: Mix2ool
Web development framework integrated with jQuery
Author: By
Last change:
Date: 2009-09-02 17:04
Size: 787 bytes
 

Contents

Class file image Download
<?php

include_once("config.php");

function 
jsonResponse($success$code$msg){
    echo 
json_encode(array(
        
"success" => $success,
        
"code" => $code,
        
"msg" => $msg
    
));
    exit; 
}

function 
caseStripslashes(& $str){
    if (
is_array($str)){
        foreach (
$str AS &$v){
            
caseStripslashes($v);
        }
    }else{
        if (
get_magic_quotes_gpc()){
            
$str stripslashes($str);
        }
    }
}

foreach (
$_GET AS $k => &$v){
    
caseStripslashes($v);
}
foreach (
$_POST AS $k => &$v){
    
caseStripslashes($v);
}
$action $_GET["action"] ? $_GET["action"] : $_POST["action"];
if (! 
$action$action "default";

define("IN_MIX2OOL"true);


$language "en";
include_once(
$mixPath "mixLanguage.php");
$lang = new mixLanguage($langPath);
$lang->useLang($language);

?>