<?php

// PHPMaker 6 configuration for Table usuario
$usuario = new cusuario; // Initialize table object

// Define table class
class cusuario {

	// Define table level constants
	var $TableVar;
	var $TableName;
	var $SelectLimit = FALSE;
	var $cod_usuario;
	var $cod_distrito;
	var $cod_provincia;
	var $cod_dpto;
	var $cod_area;
	var $cod_grupo_usuario;
	var $num_dni;
	var $nom_usuario;
	var $ape_usuario;
	var $des_direccion;
	var $num_telefono;
	var $des_email;
	var $fec_ingreso;
	var $des_info_adicional;
	var $nom_usuario_sistema;
	var $des_password;
	var $ind_activo;
	var $cod_usuario_registro;
	var $fec_registro;
	var $cod_usuario_modificacion;
	var $fec_ultima_modificacion;
	var $fields = array();
	var $UseTokenInUrl = EW_USE_TOKEN_IN_URL;
	var $Export; // Export
	var $ExportOriginalValue = EW_EXPORT_ORIGINAL_VALUE;
	var	$ExportAll = EW_EXPORT_ALL;
	var $SendEmail; // Send Email
	var $TableCustomInnerHtml; // Custom Inner Html

	function cusuario() {
		$this->TableVar = "usuario";
		$this->TableName = "usuario";
		$this->SelectLimit = TRUE;
		$this->cod_usuario = new cField('usuario', 'x_cod_usuario', 'cod_usuario', "`cod_usuario`", 3, -1, FALSE);
		$this->fields['cod_usuario'] =& $this->cod_usuario;
		$this->cod_distrito = new cField('usuario', 'x_cod_distrito', 'cod_distrito', "`cod_distrito`", 200, -1, FALSE);
		$this->fields['cod_distrito'] =& $this->cod_distrito;
		$this->cod_provincia = new cField('usuario', 'x_cod_provincia', 'cod_provincia', "`cod_provincia`", 200, -1, FALSE);
		$this->fields['cod_provincia'] =& $this->cod_provincia;
		$this->cod_dpto = new cField('usuario', 'x_cod_dpto', 'cod_dpto', "`cod_dpto`", 200, -1, FALSE);
		$this->fields['cod_dpto'] =& $this->cod_dpto;
		$this->cod_area = new cField('usuario', 'x_cod_area', 'cod_area', "`cod_area`", 3, -1, FALSE);
		$this->fields['cod_area'] =& $this->cod_area;
		$this->cod_grupo_usuario = new cField('usuario', 'x_cod_grupo_usuario', 'cod_grupo_usuario', "`cod_grupo_usuario`", 3, -1, FALSE);
		$this->fields['cod_grupo_usuario'] =& $this->cod_grupo_usuario;
		$this->num_dni = new cField('usuario', 'x_num_dni', 'num_dni', "`num_dni`", 200, -1, FALSE);
		$this->fields['num_dni'] =& $this->num_dni;
		$this->nom_usuario = new cField('usuario', 'x_nom_usuario', 'nom_usuario', "`nom_usuario`", 200, -1, FALSE);
		$this->fields['nom_usuario'] =& $this->nom_usuario;
		$this->ape_usuario = new cField('usuario', 'x_ape_usuario', 'ape_usuario', "`ape_usuario`", 200, -1, FALSE);
		$this->fields['ape_usuario'] =& $this->ape_usuario;
		$this->des_direccion = new cField('usuario', 'x_des_direccion', 'des_direccion', "`des_direccion`", 200, -1, FALSE);
		$this->fields['des_direccion'] =& $this->des_direccion;
		$this->num_telefono = new cField('usuario', 'x_num_telefono', 'num_telefono', "`num_telefono`", 200, -1, FALSE);
		$this->fields['num_telefono'] =& $this->num_telefono;
		$this->des_email = new cField('usuario', 'x_des_email', 'des_email', "`des_email`", 200, -1, FALSE);
		$this->fields['des_email'] =& $this->des_email;
		$this->fec_ingreso = new cField('usuario', 'x_fec_ingreso', 'fec_ingreso', "`fec_ingreso`", 133, 5, FALSE);
		$this->fields['fec_ingreso'] =& $this->fec_ingreso;
		$this->des_info_adicional = new cField('usuario', 'x_des_info_adicional', 'des_info_adicional', "`des_info_adicional`", 201, -1, FALSE);
		$this->fields['des_info_adicional'] =& $this->des_info_adicional;
		$this->nom_usuario_sistema = new cField('usuario', 'x_nom_usuario_sistema', 'nom_usuario_sistema', "`nom_usuario_sistema`", 200, -1, FALSE);
		$this->fields['nom_usuario_sistema'] =& $this->nom_usuario_sistema;
		$this->des_password = new cField('usuario', 'x_des_password', 'des_password', "`des_password`", 200, -1, FALSE);
		$this->fields['des_password'] =& $this->des_password;
		$this->ind_activo = new cField('usuario', 'x_ind_activo', 'ind_activo', "`ind_activo`", 200, -1, FALSE);
		$this->fields['ind_activo'] =& $this->ind_activo;
		$this->cod_usuario_registro = new cField('usuario', 'x_cod_usuario_registro', 'cod_usuario_registro', "`cod_usuario_registro`", 3, -1, FALSE);
		$this->fields['cod_usuario_registro'] =& $this->cod_usuario_registro;
		$this->fec_registro = new cField('usuario', 'x_fec_registro', 'fec_registro', "`fec_registro`", 135, 5, FALSE);
		$this->fields['fec_registro'] =& $this->fec_registro;
		$this->cod_usuario_modificacion = new cField('usuario', 'x_cod_usuario_modificacion', 'cod_usuario_modificacion', "`cod_usuario_modificacion`", 3, -1, FALSE);
		$this->fields['cod_usuario_modificacion'] =& $this->cod_usuario_modificacion;
		$this->fec_ultima_modificacion = new cField('usuario', 'x_fec_ultima_modificacion', 'fec_ultima_modificacion', "`fec_ultima_modificacion`", 135, 5, FALSE);
		$this->fields['fec_ultima_modificacion'] =& $this->fec_ultima_modificacion;
	}

	// Records per page
	function getRecordsPerPage() {
		return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_REC_PER_PAGE];
	}

	function setRecordsPerPage($v) {
		$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_REC_PER_PAGE] = $v;
	}

	// Start record number
	function getStartRecordNumber() {
		return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_START_REC];
	}

	function setStartRecordNumber($v) {
		$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_START_REC] = $v;
	}

	// Search Highlight Name
	function HighlightName() {
		return "usuario_Highlight";
	}

	// Advanced search
	function getAdvancedSearch($fld) {
		return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ADVANCED_SEARCH . "_" . $fld];
	}

	function setAdvancedSearch($fld, $v) {
		if (@$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ADVANCED_SEARCH . "_" . $fld] <> $v) {
			$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ADVANCED_SEARCH . "_" . $fld] = $v;
		}
	}

	// Basic search Keyword
	function getBasicSearchKeyword() {
		return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_BASIC_SEARCH];
	}

	function setBasicSearchKeyword($v) {
		$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_BASIC_SEARCH] = $v;
	}

	// Basic Search Type
	function getBasicSearchType() {
		return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_BASIC_SEARCH_TYPE];
	}

	function setBasicSearchType($v) {
		$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_BASIC_SEARCH_TYPE] = $v;
	}

	// Search where clause
	function getSearchWhere() {
		return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_SEARCH_WHERE];
	}

	function setSearchWhere($v) {
		$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_SEARCH_WHERE] = $v;
	}

	// Single column sort
	function UpdateSort(&$ofld) {
		if ($this->CurrentOrder == $ofld->FldName) {
			$sSortField = $ofld->FldExpression;
			$sLastSort = $ofld->getSort();
			if ($this->CurrentOrderType == "ASC" || $this->CurrentOrderType == "DESC") {
				$sThisSort = $this->CurrentOrderType;
			} else {
				$sThisSort = ($sLastSort == "ASC") ? "DESC" : "ASC";
			}
			$ofld->setSort($sThisSort);
			$this->setSessionOrderBy($sSortField . " " . $sThisSort); // Save to Session
		} else {
			$ofld->setSort("");
		}
	}

	// Session WHERE Clause
	function getSessionWhere() {
		return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_WHERE];
	}

	function setSessionWhere($v) {
		$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_WHERE] = $v;
	}

	// Session ORDER BY
	function getSessionOrderBy() {
		return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ORDER_BY];
	}

	function setSessionOrderBy($v) {
		$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ORDER_BY] = $v;
	}

	// Session Key
	function getKey($fld) {
		return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_KEY . "_" . $fld];
	}

	function setKey($fld, $v) {
		$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_KEY . "_" . $fld] = $v;
	}

	// Table level SQL
	function SqlSelect() { // Select
		return "SELECT * FROM `usuario`";
	}

	function SqlWhere() { // Where
		return "";
	}

	function SqlGroupBy() { // Group By
		return "";
	}

	function SqlHaving() { // Having
		return "";
	}

	function SqlOrderBy() { // Order By
		return "";
	}

	// SQL variables
	var $CurrentFilter; // Current filter
	var $CurrentOrder; // Current order
	var $CurrentOrderType; // Current order type

	// Get SQL
	function GetSQL($where, $orderby) {
		return ew_BuildSelectSql($this->SqlSelect(), $this->SqlWhere(),
			$this->SqlGroupBy(), $this->SqlHaving(), $this->SqlOrderBy(),
			$where, $orderby);
	}

	// Table SQL
	function SQL() {
		$sFilter = $this->CurrentFilter;
		$sSort = $this->getSessionOrderBy();
		return ew_BuildSelectSql($this->SqlSelect(), $this->SqlWhere(),
			$this->SqlGroupBy(), $this->SqlHaving(), $this->SqlOrderBy(),
			$sFilter, $sSort);
	}

	// Return table sql with list page filter
	function SelectSQL() {
		$sFilter = $this->getSessionWhere();
		if ($this->CurrentFilter <> "") {
			if ($sFilter <> "") $sFilter .= " AND ";
			$sFilter .= $this->CurrentFilter;
		}
		$sSort = $this->getSessionOrderBy();
		return ew_BuildSelectSql($this->SqlSelect(), $this->SqlWhere(),
			$this->SqlGroupBy(), $this->SqlHaving(), $this->SqlOrderBy(),
			$sFilter, $sSort);
	}

	// Return record count
	function SelectRecordCount() {
		global $conn;
		$cnt = -1;
		$sFilter = $this->CurrentFilter;
		$this->Recordset_Selecting($this->CurrentFilter);
		if ($this->SelectLimit) {
			$sSelect = $this->SelectSQL();
			if (strtoupper(substr($sSelect, 0, 13)) == "SELECT * FROM") {
				$sSelect = "SELECT COUNT(*) FROM" . substr($sSelect, 13);
				if ($rs = $conn->Execute($sSelect)) {
					if (!$rs->EOF)
						$cnt = $rs->fields[0];
					$rs->Close();
				}
			}
		}
		if ($cnt == -1) {
			if ($rs = $conn->Execute($this->SelectSQL())) {
				$cnt = $rs->RecordCount();
				$rs->Close();
			}
		}
		$this->CurrentFilter = $sFilter;
		return intval($cnt);
	}

	// INSERT statement
	function InsertSQL(&$rs) {
		$names = "";
		$values = "";
		foreach ($rs as $name => $value) {
			if (EW_MD5_PASSWORD && $name == 'des_password') {
				$value = (EW_CASE_SENSITIVE_PASSWORD) ? md5($value) : md5(strtolower($value));
			}
			$names .= $this->fields[$name]->FldExpression . ",";
			$values .= (is_null($value) ? "NULL" : ew_QuotedValue($value, $this->fields[$name]->FldDataType)) . ",";
		}
		if (substr($names, -1) == ",") $names = substr($names, 0, strlen($names)-1);
		if (substr($values, -1) == ",") $values = substr($values, 0, strlen($values)-1);
		return "INSERT INTO `usuario` ($names) VALUES ($values)";
	}

	// UPDATE statement
	function UpdateSQL(&$rs) {
		$SQL = "UPDATE `usuario` SET ";
		foreach ($rs as $name => $value) {
			if (EW_MD5_PASSWORD && $name == 'des_password') {
				$value = (EW_CASE_SENSITIVE_PASSWORD) ? md5($value) : md5(strtolower($value));
			}
			$SQL .= $this->fields[$name]->FldExpression . "=" .
					(is_null($value) ? "NULL" : ew_QuotedValue($value, $this->fields[$name]->FldDataType)) . ",";
		}
		if (substr($SQL, -1) == ",") $SQL = substr($SQL, 0, strlen($SQL)-1);
		if ($this->CurrentFilter <> "")	$SQL .= " WHERE " . $this->CurrentFilter;
		return $SQL;
	}

	// DELETE statement
	function DeleteSQL(&$rs) {
		$SQL = "DELETE FROM `usuario` WHERE ";
		$SQL .= EW_DB_QUOTE_START . 'cod_usuario' . EW_DB_QUOTE_END . '=' .	ew_QuotedValue($rs['cod_usuario'], $this->cod_usuario->FldDataType) . ' AND ';
		if (substr($SQL, -5) == " AND ") $SQL = substr($SQL, 0, strlen($SQL)-5);
		if ($this->CurrentFilter <> "")	$SQL .= " AND " . $this->CurrentFilter;
		return $SQL;
	}

	// Key filter for table
	function SqlKeyFilter() {
		return "`cod_usuario` = @cod_usuario@";
	}

	// Return Key filter for table
	function KeyFilter() {
		$sKeyFilter = $this->SqlKeyFilter();
		if (!is_numeric($this->cod_usuario->CurrentValue))
			$sKeyFilter = "0=1"; // Invalid key
		$sKeyFilter = str_replace("@cod_usuario@", ew_AdjustSql($this->cod_usuario->CurrentValue), $sKeyFilter); // Replace key value
		return $sKeyFilter;
	}

	// Return url
	function getReturnUrl() {

		// Get referer URL automatically
		if (ew_ServerVar("HTTP_REFERER") <> "" && ew_ReferPage() <> ew_CurrentPage() && ew_ReferPage() <> "login.php") // Referer not same page or login page
			$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_RETURN_URL] = ew_ServerVar("HTTP_REFERER"); // Save to Session
		if (@$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_RETURN_URL] <> "") {
			return $_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_RETURN_URL];
		} else {
			return "usuariolist.php";
		}
	}

	function setReturnUrl($v) {
		$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_RETURN_URL] = $v;
	}

	// View url
	function ViewUrl() {
		return $this->KeyUrl("usuarioview.php", $this->UrlParm());
	}

	// Add url
	function AddUrl() {
		$AddUrl = "usuarioadd.php";
		$sUrlParm = $this->UrlParm();
		if ($sUrlParm <> "")
			$AddUrl .= "?" . $sUrlParm;
		return $AddUrl;
	}

	// Edit url
	function EditUrl() {
		return $this->KeyUrl("usuarioedit.php", $this->UrlParm());
	}

	// Inline edit url
	function InlineEditUrl() {
		return $this->KeyUrl(ew_CurrentPage(), $this->UrlParm("a=edit"));
	}

	// Copy url
	function CopyUrl() {
		return $this->KeyUrl("usuarioadd.php", $this->UrlParm());
	}

	// Inline copy url
	function InlineCopyUrl() {
		return $this->KeyUrl(ew_CurrentPage(), $this->UrlParm("a=copy"));
	}

	// Delete url
	function DeleteUrl() {
		return $this->KeyUrl("usuariodelete.php", $this->UrlParm());
	}

	// Key url
	function KeyUrl($url, $parm = "") {
		$sUrl = $url . "?";
		if ($parm <> "") $sUrl .= $parm . "&";
		if (!is_null($this->cod_usuario->CurrentValue)) {
			$sUrl .= "cod_usuario=" . urlencode($this->cod_usuario->CurrentValue);
		} else {
			return "javascript:alert('Invalid Record! Key is null');";
		}
		return $sUrl;
	}

	// Sort Url
	function SortUrl(&$fld) {
		if ($this->CurrentAction <> "" || $this->Export <> "" ||
			($fld->FldType == 205)) { // Unsortable data type
			return "";
		} else {
			$sUrlParm = $this->UrlParm("order=" . urlencode($fld->FldName) . "&ordertype=" . $fld->ReverseSort());
			return ew_CurrentPage() . "?" . $sUrlParm;
		}
	}

	// URL parm
	function UrlParm($parm = "") {
		$UrlParm = ($this->UseTokenInUrl) ? "t=usuario" : "";
		if ($parm <> "") {
			if ($UrlParm <> "")
				$UrlParm .= "&";
			$UrlParm .= $parm;
		}
		return $UrlParm;
	}

	// Function LoadRs
	// - Load rows based on filter
	function LoadRs($sFilter) {
		global $conn;

		// Set up filter (Sql Where Clause) and get Return Sql
		$this->CurrentFilter = $sFilter;
		$sSql = $this->SQL();
		return $conn->Execute($sSql);
	}

	// Load row values from recordset
	function LoadListRowValues(&$rs) {
		$this->cod_usuario->setDbValue($rs->fields('cod_usuario'));
		$this->cod_distrito->setDbValue($rs->fields('cod_distrito'));
		$this->cod_provincia->setDbValue($rs->fields('cod_provincia'));
		$this->cod_dpto->setDbValue($rs->fields('cod_dpto'));
		$this->cod_area->setDbValue($rs->fields('cod_area'));
		$this->cod_grupo_usuario->setDbValue($rs->fields('cod_grupo_usuario'));
		$this->num_dni->setDbValue($rs->fields('num_dni'));
		$this->nom_usuario->setDbValue($rs->fields('nom_usuario'));
		$this->ape_usuario->setDbValue($rs->fields('ape_usuario'));
		$this->des_direccion->setDbValue($rs->fields('des_direccion'));
		$this->num_telefono->setDbValue($rs->fields('num_telefono'));
		$this->des_email->setDbValue($rs->fields('des_email'));
		$this->fec_ingreso->setDbValue($rs->fields('fec_ingreso'));
		$this->des_info_adicional->setDbValue($rs->fields('des_info_adicional'));
		$this->nom_usuario_sistema->setDbValue($rs->fields('nom_usuario_sistema'));
		$this->des_password->setDbValue($rs->fields('des_password'));
		$this->ind_activo->setDbValue($rs->fields('ind_activo'));
		$this->cod_usuario_registro->setDbValue($rs->fields('cod_usuario_registro'));
		$this->fec_registro->setDbValue($rs->fields('fec_registro'));
		$this->cod_usuario_modificacion->setDbValue($rs->fields('cod_usuario_modificacion'));
		$this->fec_ultima_modificacion->setDbValue($rs->fields('fec_ultima_modificacion'));
	}

	// Render list row values
	function RenderListRow() {
		global $conn, $Security;

		// Call Row Rendering event
		$this->Row_Rendering();

		// cod_usuario
		$this->cod_usuario->ViewValue = $this->cod_usuario->CurrentValue;
		$this->cod_usuario->CssStyle = "";
		$this->cod_usuario->CssClass = "";
		$this->cod_usuario->ViewCustomAttributes = "";

		// des_email
		$this->des_email->ViewValue = $this->des_email->CurrentValue;
		$this->des_email->CssStyle = "";
		$this->des_email->CssClass = "";
		$this->des_email->ViewCustomAttributes = "";

		// nom_usuario_sistema
		$this->nom_usuario_sistema->ViewValue = $this->nom_usuario_sistema->CurrentValue;
		$this->nom_usuario_sistema->CssStyle = "";
		$this->nom_usuario_sistema->CssClass = "";
		$this->nom_usuario_sistema->ViewCustomAttributes = "";

		// des_password
		$this->des_password->ViewValue = $this->des_password->CurrentValue;
		$this->des_password->CssStyle = "";
		$this->des_password->CssClass = "";
		$this->des_password->ViewCustomAttributes = "";

		// cod_usuario
		$this->cod_usuario->HrefValue = "";

		// des_email
		$this->des_email->HrefValue = "";

		// nom_usuario_sistema
		$this->nom_usuario_sistema->HrefValue = "";

		// des_password
		$this->des_password->HrefValue = "";

		// Call Row Rendered event
		$this->Row_Rendered();
	}
	var $CurrentAction; // Current action
	var $EventName; // Event name
	var $EventCancelled; // Event cancelled
	var $CancelMessage; // Cancel message
	var $RowType; // Row Type
	var $CssClass; // Css class
	var $CssStyle; // Css style
	var $RowClientEvents; // Row client events

	// Row Attribute
	function RowAttributes() {
		$sAtt = "";
		if (trim($this->CssStyle) <> "") {
			$sAtt .= " style=\"" . trim($this->CssStyle) . "\"";
		}
		if (trim($this->CssClass) <> "") {
			$sAtt .= " class=\"" . trim($this->CssClass) . "\"";
		}
		if ($this->Export == "") {
			if (trim($this->RowClientEvents) <> "") {
				$sAtt .= " " . trim($this->RowClientEvents);
			}
		}
		return $sAtt;
	}

	// Field objects
	function fields($fldname) {
		return $this->fields[$fldname];
	}

	// Table level events
	// Recordset Selecting event
	function Recordset_Selecting(&$filter) {

		// Enter your code here	
	}

	// Recordset Selected event
	function Recordset_Selected(&$rs) {

		//echo "Recordset Selected";
	}

	// Recordset Searching event
	function Recordset_Searching(&$filter) {

		// Enter your code here	
	}

	// Row_Selecting event
	function Row_Selecting(&$filter) {

		// Enter your code here	
	}

	// Row Selected event
	function Row_Selected(&$rs) {

		//echo "Row Selected";
	}

	// Row Rendering event
	function Row_Rendering() {

		// Enter your code here	
	}

	// Row Rendered event
	function Row_Rendered() {

		// To view properties of field class, use:
		//var_dump($this-><FieldName>); 

	}

	// Row Inserting event
	function Row_Inserting(&$rs) {

		// Enter your code here
		// To cancel, set return value to FALSE

		return TRUE;
	}

	// Row Inserted event
	function Row_Inserted(&$rs) {

		//echo "Row Inserted"
	}

	// Row Updating event
	function Row_Updating(&$rsold, &$rsnew) {

		// Enter your code here
		// To cancel, set return value to FALSE

		return TRUE;
	}

	// Row Updated event
	function Row_Updated(&$rsold, &$rsnew) {

		//echo "Row Updated";
	}

	// Row Deleting event
	function Row_Deleting($rs) {

		// Enter your code here
		// To cancel, set return value to False

		return TRUE;
	}

	// Row Deleted event
	function Row_Deleted(&$rs) {

		//echo "Row Deleted";
	}

	// Email Sending event
	function Email_Sending(&$Email, &$Args) {

		//var_dump($Email); var_dump($Args); exit();
		return TRUE;
	}
}
?>
