示例#1
0
require_once '../includes/nxt/KT_back.php';
// Make a transaction dispatcher instance
$tNGs = new tNG_dispatcher("../");
// Make unified connection variable
$conn_ha = new KT_connection($ha, $database_ha);
//Start Restrict Access To Page
$restrict = new tNG_RestrictAccess($conn_ha, "../");
//Grand Levels: Any
$restrict->Execute();
//End Restrict Access To Page
// Start trigger
$formValidation = new tNG_FormValidation();
$formValidation->addField("id_cat", true, "numeric", "", "", "", "");
$formValidation->addField("pag", true, "text", "", "", "", "");
$formValidation->addField("contenido", true, "text", "", "", "", "");
$tNGs->prepareValidation($formValidation);
// End trigger
if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
    {
        if (PHP_VERSION < 6) {
            $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
        }
        $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
        switch ($theType) {
            case "text":
                $theValue = $theValue != "" ? "'" . $theValue . "'" : "NULL";
                break;
            case "long":
            case "int":
                $theValue = $theValue != "" ? intval($theValue) : "NULL";