• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP DataConnector类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中DataConnector的典型用法代码示例。如果您正苦于以下问题:PHP DataConnector类的具体用法?PHP DataConnector怎么用?PHP DataConnector使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了DataConnector类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: __construct

 private function __construct()
 {
     $this->classloader = Classloader::getInstance();
     $this->classloader->initLoadLib();
     $this->dataConnector = DataConnector::getInstance();
     $this->routingEngine = RoutingEngine::getInstance();
     $this->templateEngine = TemplateEngine::getInstance();
 }
开发者ID:hendrikstill,项目名称:manusing,代码行数:8,代码来源:Manusing.php


示例2: SQLite3

<?php

$db = new SQLite3('../../common/testdata.sqlite');
require "../../common/connector/data_connector.php";
require "../../common/connector/db_sqlite3.php";
ConnectorSecurity::$xss = DHX_SECURITY_SAFEHTML;
$conn = new DataConnector($db, "SQLite3");
$conn->render_table("films", "id", "title,year,votes,rating,rank");
开发者ID:jeansung,项目名称:DSLResearch,代码行数:8,代码来源:connector_safe.php


示例3: session_start

<?php

session_start();
include_once "check.php";
include_once "defines.php";
include_once "ClassLibrary/Text.php";
include_once "ClassLibrary/DataConnector.php";
include_once "DataAccessObjects/ContractDAO.php";
include_once "DataTransferObjects/ContractDTO.php";
include_once "DataAccessObjects/SubContractDAO.php";
include_once "DataTransferObjects/SubContractDTO.php";
include_once "DataAccessObjects/BusinessPartnerDAO.php";
include_once "DataTransferObjects/BusinessPartnerDTO.php";
$slpCode = $_REQUEST["slpCode"];
// Abre a conexao com o banco de dados
$dataConnector = new DataConnector('both');
$dataConnector->OpenConnection();
if ($dataConnector->mysqlConnection == null || $dataConnector->sqlserverConnection == null) {
    echo 'Não foi possível se connectar ao bando de dados!';
    exit;
}
// Cria os objetos de mapeamento objeto-relacional
$contractDAO = new ContractDAO($dataConnector->mysqlConnection);
$contractDAO->showErrors = 1;
$subContractDAO = new SubContractDAO($dataConnector->mysqlConnection);
$subContractDAO->showErrors = 1;
// Busca os contratos pertencentes ao vendedor
$contractArray = $contractDAO->RetrieveRecordArray("vendedor=" . $slpCode . " AND id > 0 ORDER BY convert(numero, signed)");
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
开发者ID:renatosans,项目名称:contratos,代码行数:31,代码来源:contratos.php


示例4: DataConnector

// SOFTWARE NAME: Thematic Mapping Engine
// SOFTWARE RELEASE: 1.6
// COPYRIGHT NOTICE: Copyright (C) 2008 Bjorn Sandvik,
//                   [email protected]
// SOFTWARE LICENSE: GNU General Public License version 3 (GPLv3)
// NOTICE: >
//  This program is free software; you can redistribute it and/or
//  modify it under the terms of version 3 of the GNU General
//  Public License as published by the Free Software Foundation.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//  GNU General Public License for more details.
//  http://www.gnu.org/licenses/
//
//
// This file shows how maps can be created with the DataConnector
// and ThematicMap classes.
// Can be changed to another data connector class
require_once 'TME_MySQL_DataConnector.php';
// Include engine class
require_once 'TME_Engine.php';
$dataConnector = new DataConnector();
$dataStore = $dataConnector->getDataStore(1230, 2005, 0);
// indicator / year / region
$parameters = array('mapType' => 'prism', 'indicator' => 1230, 'year' => 2005, 'classification' => 'equal');
// Create thematic map object
$map = new ThematicMap($dataStore, $parameters);
$file = $map->getKML();
echo "<p><a href='{$file}'>{$file}</a>";
开发者ID:abidinamdar,项目名称:thematicmapping,代码行数:31,代码来源:TME_Example.php


示例5: DataConnector

<?php

require_once "../../../common/config.php";
$data = new DataConnector($conn, $dbtype);
$data->add_section("config", '
		<columns stack="true">
			<column id="package"		header="Name"			width="200"></column>
			<column id="section"		header="Section"		width="120"></column>
			<column id="size"			header="Size"			width="80"></column>
			<column id="architecture"	header="PC"				width="60"></column>
		</columns>
		<height>100</height>
		<autowidth>true</autowidth>
	');
$data->render_table("packages_plain", "id", "package, size, architecture, section");
开发者ID:ifzz,项目名称:distri.lua,代码行数:15,代码来源:data-config-xml.php


示例6: session_start

<?php

session_start();
require_once "../codebase/connector/scheduler_connector.php";
$res = mysql_connect("localhost", "root", "");
mysql_select_db("calendar");
// $conn = new SchedulerConnector($res);
$details = new DataConnector($res);
$details->configure("cus", "c_id", "c_id,c_fname");
$conn = new SchedulerConnector($res);
$conn->mix("cus", $details, array("c_id" => "c_id"));
// function my_update($data){
//     $data->add_field("c_id",1);
//  $data->set_value("c_id","10");
//     //will be included in update processing
// }
// $conn->event->attach("beforeUpdate","my_update");
$conn->enable_log("temp.log");
$c_id = $_SESSION["login"];
$type = $_GET['type'];
$eid = $_GET['eid'];
// $conn->render_table("bookevent","event_id","start_date,end_date,event_name");
function insert_session($action)
{
    $action->add_field("cid", $_SESSION["login"]);
    $action->add_field("eid", $_GET["eid"]);
}
$conn->event->attach("beforeProcessing", "insert_session");
// $conn->event->attach("Select","select * from bookevent where c_id={c_id}");
// $conn->render_table("bookevent","event_id","start_date,end_date,event_name,cid");
// $conn->render_sql("select * from bookevent where c_id = ".$c_id." AND `start_date` >= '2015-07-08 00:00:00' AND `end_date` <= '2015-07-11 00:00:00' ","event_id","start_date,end_date,event_name,rec_type,event_pid,event_length,details,event_location,lat,lng");
开发者ID:sandakin,项目名称:Calendar,代码行数:31,代码来源:connector2.php


示例7: createDatabaseTable

 /**
  * Creats table of the model like it is defined.
  * This is very usefull for the install process in your webapp.
  */
 public function createDatabaseTable()
 {
     $notFirst = false;
     $query = 'CREATE TABLE ' . $this->table . ' (';
     foreach ($this->attributes as $attribute) {
         if ($notFirst) {
             $query .= ',';
         } else {
             $notFirst = true;
         }
         $query .= $attribute[0] . ' ' . $attribute[1];
     }
     $query .= ');';
     DataConnector::getInstance()->query($query);
 }
开发者ID:hendrikstill,项目名称:manusing,代码行数:19,代码来源:Model.php


示例8: DataConnector

<?php

require_once "../../../common/config.php";
$data = new DataConnector($conn, $dbtype);
$data->render_table("packages_plain", "id", "package,version,maintainer");
开发者ID:ifzz,项目名称:distri.lua,代码行数:5,代码来源:data_xml.php


示例9: DataConnector

//  modify it under the terms of version 3 of the GNU General
//  Public License as published by the Free Software Foundation.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//  GNU General Public License for more details.
//  http://www.gnu.org/licenses/
//
//
// Can be changed to another data connector class
require_once 'TME_MySQL_DataConnector.php';
// Check if a task is specified
if (isset($_REQUEST['task'])) {
    // Make connection object
    $dataConnector = new DataConnector();
    // Check which task
    switch ($_REQUEST['task']) {
        // Fetch all statistical indicators in database
        case 'indicators':
            // Returns JSON encoded array of indicators
            echo $dataConnector->getIndicators();
            break;
            // Fetch available years for one indicator
        // Fetch available years for one indicator
        case 'indYears':
            $indicatorID = (int) $_REQUEST['id'];
            // Avoid exploitation
            // Returns JSON encoded array of available years for one indicator
            echo $dataConnector->getIndicatorYears($indicatorID);
            break;
开发者ID:abidinamdar,项目名称:thematicmapping,代码行数:31,代码来源:TME_FormHandler.php


示例10: DataConnector

<?php

require_once "../lib/DataConnector.class.php";
$myCon = new DataConnector("192.168.1.10", "8550", "rtls_user", "welcome");
$xmlRequest = new DOMDocument("1.0", "utf-8");
$xmlRequest->formatOutput  =  true;
$request = $xmlRequest->createElement("request");
$request = $xmlRequest->appendChild($request);
$params = $xmlRequest->createElement("PARAMS");
$params = $request->appendChild($params);
$params->appendChild($xmlRequest->createElement("fields", "all"));
try {
    $xmlResponse = $myCon->request($xmlRequest, "epe/pos/taglist");
    echo $xmlResponse->saveXML();
} catch (CannotConnectException $e) {
    echo $e->getMessage();
}
开发者ID:edmarbarbosa,项目名称:newt-rtls,代码行数:17,代码来源:test.php


示例11: array

        $ano = $colunas[0];
        $tipo = "year";
    }
    if (empty($barSize)) {
        $barSize = 5000;
    }
    if (empty($maxHeight)) {
        $maxHeight = 2000000;
    }
    $parametersTME = array('mapType' => 'bar', 'indicator' => 'valores', 'year' => $ano, 'classification' => 'quantile', 'mapTitle' => $_GET["titulo"], 'timeType' => $tipo, 'dirtmp' => $dir_tmp, 'barSize' => $barSize, 'maxHeight' => $maxHeight, 'outlinecolor' => $_GET["outlinecolor"], 'numvertices' => $_GET["numvertices"], 'symbolType' => 'polygon');
}
$nomeTemp = array_merge($_GET, $_POST);
$nomeTemp = md5(implode("", $nomeTemp));
$nomeFile = $dir_tmp . "/tme" . $nomeTemp . ".kmz";
//sesion e aberto com isso
$dataConnector = new DataConnector($_GET["sid"], $verificaSID);
if (!file_exists($nomeFile)) {
    $dataStore = $dataConnector->getDataStore($_GET["nomelayer"], $colunas, $_GET["colunanomeregiao"], $_GET["titulo"], $_GET["descricao"], "", $parametersTME["mapType"]);
} else {
    $dataStore = "";
}
$url = $_SESSION["tmpurl"] . "/tme" . $nomeTemp . ".kmz";
// Create thematic map object
$map = new ThematicMap($dataStore, $parametersTME, $nomeTemp);
$file = $map->getKML($dataConnector->url, $download, $nomeFile);
$nomeArquivo = $map->nomeArquivo;
$legenda = str_replace("kmz", "png", basename($nomeArquivo));
$legenda = str_replace("tme", "legend", $legenda);
$legenda = str_replace(basename($nomeArquivo), $legenda, $file);
if (isset($inclusao) && $inclusao == true) {
    $download = true;
开发者ID:edmarmoretti,项目名称:i3geo,代码行数:31,代码来源:TME_i3geo.php


示例12: logToDatabase

 private function logToDatabase($msg, $type)
 {
     DataConnector::getInstance()->query("INSERT INTO log (id,time,type,message,url) VALUES  (NULL,NOW(),{$type},{$msg}," . $_SERVER['REQUEST_URI'] . ")");
 }
开发者ID:hendrikstill,项目名称:manusingAnt,代码行数:4,代码来源:Log.php


示例13: session_start

<?php

session_start();
include_once "../check.php";
include_once "../defines.php";
include_once "../ClassLibrary/DataConnector.php";
include_once "../DataTransferObjects/ContractBonusDTO.php";
include_once "../DataAccessObjects/ContractBonusDAO.php";
include_once "../DataTransferObjects/CounterDTO.php";
include_once "../DataAccessObjects/CounterDAO.php";
$subContractId = 0;
if (isset($_REQUEST["subContractId"]) && $_REQUEST["subContractId"] != 0) {
    $subContractId = $_REQUEST["subContractId"];
}
// Abre a conexao com o banco de dados
$dataConnector = new DataConnector('mySql');
$dataConnector->OpenConnection();
if ($dataConnector->mysqlConnection == null) {
    echo 'Não foi possível se connectar ao bando de dados!';
    exit;
}
$nivelAutorizacao = GetAuthorizationLevel($dataConnector->mysqlConnection, $functionalities["gerenciamentoContratos"]);
if ($nivelAutorizacao <= 1) {
    DisplayNotAuthorizedWarning();
    exit;
}
// Cria os objetos de mapeamento objeto-relacional
$contractBonusDAO = new ContractBonusDAO($dataConnector->mysqlConnection);
$contractBonusDAO->showErrors = 1;
$counterDAO = new CounterDAO($dataConnector->mysqlConnection);
$counterDAO->showErrors = 1;
开发者ID:renatosans,项目名称:contratos,代码行数:31,代码来源:GetSubContractBonuses.php


示例14: executeSQL

 public static function executeSQL($sql)
 {
     DataConnector::getConnection();
     mysql_query($sql) or die(mysql_error());
 }
开发者ID:a4501150,项目名称:FDUGroup,代码行数:5,代码来源:Data.php


示例15: getInstance

 public static function getInstance()
 {
     if (null === self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
开发者ID:hendrikstill,项目名称:manusingAnt,代码行数:7,代码来源:DataConnector.php


示例16: getConnection

 public static function getConnection()
 {
     if (self::$connection == null) {
         $dbConfig = Rays::app()->getDbConfig();
         self::$connection = mysql_connect($dbConfig['host'], $dbConfig['user'], $dbConfig['password']) or die(mysql_error());
         mysql_select_db($dbConfig['db_name']) or die(mysql_error());
         mysql_query("set names " . $dbConfig['charset']) or die(mysql_error());
     }
     return self::$connection;
 }
开发者ID:a4501150,项目名称:FDUGroup,代码行数:10,代码来源:DataConnector.php


示例17: __construct

 public function __construct($res, $type = false, $item_type = false, $data_type = false)
 {
     if (!$item_type) {
         $item_type = "JSONCommonDataItem";
     }
     if (!$data_type) {
         $data_type = "CommonDataProcessor";
     }
     $this->data_separator = ",\n";
     parent::__construct($res, $type, $item_type, $data_type);
 }
开发者ID:mudassartufail,项目名称:dhtmlx,代码行数:11,代码来源:data_connector.php


示例18: parse_request

 protected function parse_request()
 {
     parent::parse_request();
     if (isset($_GET[$this->parent_name])) {
         $this->request->set_relation($_GET[$this->parent_name]);
     } else {
         $this->request->set_relation("0");
     }
     $this->request->set_limit(0, 0);
     //netralize default reaction on dyn. loading mode
 }
开发者ID:jekay100,项目名称:xwtec,代码行数:11,代码来源:data_connector.php



注:本文中的DataConnector类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP DataEdit类代码示例发布时间:2022-05-23
下一篇:
PHP DataCenter类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap