Exemplo n.º 1
0
 /**
  * The constructor
  * @param object Connection &$connection - either a ADODB Connection or a KT_Connection object
  * @access public
  */
 function KT_FakeRecordset(&$connection)
 {
     $this->connection =& $connection;
     if (!isset($GLOBALS['KT_serverModel'])) {
         KT_setDbType($this->connection);
     }
 }
Exemplo n.º 2
0
 function TFI_TableFilter($connection, $filterName)
 {
     KT_setDbType($connection);
     $this->filterName = $filterName;
     KT_SessionKtBack(KT_getFullUri());
     $_SESSION['KT_lastUsedList'] = substr($filterName, 4);
 }
Exemplo n.º 3
0
 function TOR_SetOrder(&$connection, $tableName, $pk, $pkType, $orderField, $orderPostField)
 {
     $this->connection =& $connection;
     $this->tableName = $tableName;
     $this->pk = $pk;
     $this->pkType = $pkType;
     $this->orderField = $orderField;
     $this->orderPostField = $orderPostField;
     $this->doRedirectOnExec = true;
     KT_setDbType($this->connection);
     //KT_SessionKtBack(KT_getFullUri());
 }
Exemplo n.º 4
0
 function IncludeDynamic(&$connection, $tableName, $urlField, $fileField, $titleField, $keywordsField, $descriptionField)
 {
     KT_setDbType($connection);
     $sql = "SELECT " . KT_escapeFieldName($urlField) . "," . KT_escapeFieldName($fileField);
     if ($titleField != "") {
         $sql .= "," . KT_escapeFieldName($titleField);
     }
     if ($keywordsField != "") {
         $sql .= "," . KT_escapeFieldName($keywordsField);
     }
     if ($descriptionField != "") {
         $sql .= "," . KT_escapeFieldName($descriptionField);
     }
     $sql .= " FROM " . $tableName;
     $localRs = $connection->Execute($sql);
     if (!$localRs) {
         $res_errorMsg = KT_getResource('SQL_ERROR', 'MXI', array($connection->ErrorMsg(), $sql));
         die($res_errorMsg);
     }
     $this->IncludeDynamicRecordset($localRs, $urlField, $fileField, $titleField, $keywordsField, $descriptionField);
 }
Exemplo n.º 5
0
 /**
  * Constructor. Sets the connection.
  * @param object KT_Connection &$connection the connection object
  * @access public
  */
 function tNG(&$connection)
 {
     $this->connection =& $connection;
     KT_setDbType($connection);
 }
Exemplo n.º 6
0
/*
	Copyright (c) InterAKT Online 2000-2005
*/
require_once dirname(realpath(__FILE__)) . '/WDG.php';
$WDG_sessInsTest =& $_SESSION['WDG_sessInsTest'];
$vars = $WDG_sessInsTest[$_GET['id']];
require_once dirname(realpath(__FILE__)) . '/../../Connections/' . $vars['conn'] . '.php';
$KT_conn = ${$vars['conn']};
$KT_conndb = ${'database_' . $vars['conn']};
// mysql adodb abstraction layer
if (is_resource($KT_conn)) {
    $conn = new KT_Connection($KT_conn, $KT_conndb);
} else {
    $conn =& $KT_conn;
}
KT_setDbType($conn);
$el = KT_getRealValue('GET', 'el');
$text = KT_getRealValue('GET', 'text');
$sql = 'INSERT INTO ' . $vars['table'] . ' (' . KT_escapeFieldName($vars['updatefield']) . ') VALUES (' . KT_escapeForSql($text, 'STRING_TYPE') . ')';
$conn->Execute($sql);
$ERROR = $conn->ErrorMsg();
$sql = 'SELECT ' . KT_escapeFieldName($vars['idfield']) . ' AS id FROM ' . $vars['table'] . ' WHERE ' . KT_escapeFieldName($vars['updatefield']) . ' = ' . KT_escapeForSql($text, 'STRING_TYPE');
$rsName = $vars['rsName'];
${$rsName} = $conn->Execute($sql);
${'row_' . $rsName} = ${$rsName}->fields;
$text = KT_escapeJS($text);
//JSRecordset($rsName);
?>
<html><body onLoad="parent.MXW_DynamicObject_reportDone('<?php 
echo $el;
?>