PHP Classes

File: common.php

Recommend this page to a friend!
  Packages 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: 17 years ago
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);

?>