Exemplo n.º 1
0
<?php

require_once '../Connections/ha.php';
// Load the common classes
require_once '../includes/common/KT_common.php';
// Load the tNG classes
require_once '../includes/tng/tNG.inc.php';
// Load the KT_back class
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;
        }
Exemplo n.º 2
0
<?php

//----------------------------------------------------------------------------------------------
// Desc: Saves ratings value
// Depd: Only used by {$_SESSION['RealS_prefix']}rafl.php viewer page and called by AJAX
//----------------------------------------------------------------------------------------------
// Gimme libraries
require_once "../../config.php";
require_once 'includes/rlsmart/header.php';
require_once "includes/get_sql_value_string.php";
require_once 'includes/common/KT_common.php';
require_once 'userviews_class.php';
require_once 'includes/tng/tNG.inc.php';
// Make a transaction dispatcher instance
$tNGs = new tNG_dispatcher("");
// Make unified connection variable
$conn_smart = new KT_connection($smart, $CFG->dbname);
//start Trigger_LinkTransactions trigger
//remove this line if you want to edit the code by hand
function Trigger_LinkTransactions(&$tNG)
{
    global $ins_items;
    $linkObj = new tNG_LinkedTrans($tNG, $ins_items);
    $linkObj->setLink("item_webcell");
    return $linkObj->Execute();
}
//end Trigger_LinkTransactions trigger
//start Trigger_LinkTransactions1 trigger
//remove this line if you want to edit the code by hand
function Trigger_LinkTransactions1(&$tNG)
{
Exemplo n.º 3
0
<?php

require_once '../Connections/ha.php';
// Load the common classes
require_once '../includes/common/KT_common.php';
// Load the tNG classes
require_once '../includes/tng/tNG.inc.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
// Make a logout transaction instance
$logoutTransaction = new tNG_logoutTransaction($conn_ha);
$tNGs->addTransaction($logoutTransaction);
// Register triggers
$logoutTransaction->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "VALUE", "true");
$logoutTransaction->registerTrigger("END", "Trigger_Default_Redirect", 99, "../login.php");
// Add columns
// End of logout transaction instance
// Execute all the registered transactions
$tNGs->executeTransactions();
// Get the transaction recordset
$rscustom = $tNGs->getRecordset("custom");
$row_rscustom = mysql_fetch_assoc($rscustom);
$totalRows_rscustom = mysql_num_rows($rscustom);
?>
Exemplo n.º 4
0
<?php

require_once '../Connections/ha.php';
// Load the common classes
require_once '../includes/common/KT_common.php';
// Load the tNG classes
require_once '../includes/tng/tNG.inc.php';
// Load the KT_back class
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_CheckPasswords trigger
//remove this line if you want to edit the code by hand
function Trigger_CheckPasswords(&$tNG)
{
    $myThrowError = new tNG_ThrowError($tNG);
    $myThrowError->setErrorMsg("Could not create account.");
    $myThrowError->setField("contrasena");
    $myThrowError->setFieldErrorMsg("The two passwords do not match.");
    return $myThrowError->Execute();
}
//end Trigger_CheckPasswords trigger
// Start trigger
$formValidation = new tNG_FormValidation();
Exemplo n.º 5
0
<?php

require_once 'Connections/ha.php';
// Load the common classes
require_once 'includes/common/KT_common.php';
// Load the tNG classes
require_once 'includes/tng/tNG.inc.php';
// Make a transaction dispatcher instance
$tNGs = new tNG_dispatcher("");
// Make unified connection variable
$conn_ha = new KT_connection($ha, $database_ha);
// Start trigger
$formValidation = new tNG_FormValidation();
$formValidation->addField("kt_login_user", true, "text", "", "", "", "");
$formValidation->addField("kt_login_password", true, "text", "", "", "", "");
$tNGs->prepareValidation($formValidation);
// End trigger
// Make a login transaction instance
$loginTransaction = new tNG_login($conn_ha);
$tNGs->addTransaction($loginTransaction);
// Register triggers
$loginTransaction->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "kt_login1");
$loginTransaction->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation);
$loginTransaction->registerTrigger("END", "Trigger_Default_Redirect", 99, "{kt_login_redirect}");
// Add columns
$loginTransaction->addColumn("kt_login_user", "STRING_TYPE", "POST", "kt_login_user");
$loginTransaction->addColumn("kt_login_password", "STRING_TYPE", "POST", "kt_login_password");
// End of login transaction instance
// Execute all the registered transactions
$tNGs->executeTransactions();
// Get the transaction recordset
Exemplo n.º 6
0
<?php

require_once '../Connections/ha.php';
// Load the common classes
require_once '../includes/common/KT_common.php';
// Load the tNG classes
require_once '../includes/tng/tNG.inc.php';
// Load the KT_back class
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("servicio", true, "text", "", "", "", "");
$formValidation->addField("imagen", true, "", "", "", "", "");
$formValidation->addField("pag_serv", true, "text", "", "", "", "");
$tNGs->prepareValidation($formValidation);
// End trigger
//start Trigger_FileDelete trigger
//remove this line if you want to edit the code by hand
function Trigger_FileDelete(&$tNG)
{
    $deleteObj = new tNG_FileDelete($tNG);
    $deleteObj->setFolder("../imgs/servicios/");
Exemplo n.º 7
0
<?php

require_once '../Connections/ha.php';
// Load the common classes
require_once '../includes/common/KT_common.php';
// Load the tNG classes
require_once '../includes/tng/tNG.inc.php';
// Load the KT_back class
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("banner", true, "", "", "", "", "");
$tNGs->prepareValidation($formValidation);
// End trigger
//start Trigger_FileDelete trigger
//remove this line if you want to edit the code by hand
function Trigger_FileDelete(&$tNG)
{
    $deleteObj = new tNG_FileDelete($tNG);
    $deleteObj->setFolder("../imgs/banners/");
    $deleteObj->setDbFieldName("banner");
    return $deleteObj->Execute();
Exemplo n.º 8
0
<?php

require_once '../Connections/ha.php';
// Load the common classes
require_once '../includes/common/KT_common.php';
// Load the tNG classes
require_once '../includes/tng/tNG.inc.php';
// Load the KT_back class
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("categoria", true, "text", "", "", "", "");
$tNGs->prepareValidation($formValidation);
// End trigger
// Make an insert transaction instance
$ins_categorias = new tNG_multipleInsert($conn_ha);
$tNGs->addTransaction($ins_categorias);
// Register triggers
$ins_categorias->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1");
$ins_categorias->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation);
$ins_categorias->registerTrigger("END", "Trigger_Default_Redirect", 99, "../includes/nxt/back.php");
// Add columns
Exemplo n.º 9
0
<?php

require_once '../Connections/conn_cms.php';
// Load the common classes
require_once '../includes/common/KT_common.php';
// Load the tNG classes
require_once '../includes/tng/tNG.inc.php';
// Load the KT_back class
require_once '../includes/nxt/KT_back.php';
// Make a transaction dispatcher instance
$tNGs = new tNG_dispatcher("../");
// Make unified connection variable
$conn_conn_cms = new KT_connection($conn_cms, $database_conn_cms);
// Start trigger
$formValidation = new tNG_FormValidation();
$formValidation->addField("tieudetin", true, "text", "", "", "", "Tiêu đề tin này đã có rồi.");
$tNGs->prepareValidation($formValidation);
// End trigger
//start Trigger_CheckUnique trigger
//remove this line if you want to edit the code by hand
function Trigger_CheckUnique(&$tNG)
{
    $tblFldObj = new tNG_CheckUnique($tNG);
    $tblFldObj->setTable("tintuc");
    $tblFldObj->addFieldName("tieudetin");
    $tblFldObj->setErrorMsg("Tiều đề tin này bạn đã nhập rồi");
    return $tblFldObj->Execute();
}
//end Trigger_CheckUnique trigger
//start Trigger_FileDelete trigger
//remove this line if you want to edit the code by hand