当前位置: 首页>>代码示例>>PHP>>正文


PHP oci_set_client_identifier函数代码示例

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


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

示例1: __construct

 /**
  * Constructor opens a connection to the database
  * @param string $module Module text for End-to-End Application Tracing
  * @param string $cid Client Identifier for End-to-End Application Tracing
  */
 function __construct($module, $cid)
 {
     $this->conn = @oci_pconnect(SCHEMA, PASSWORD, DATABASE, CHARSET);
     if (!$this->conn) {
         $m = oci_error();
         throw new \Exception('No se puede conectar a la base de datos: ' . $m['message']);
     }
     // Record the "name" of the web user, the client info and the module.
     // These are used for end-to-end tracing in the DB.
     oci_set_client_info($this->conn, CLIENT_INFO);
     oci_set_module_name($this->conn, $module);
     oci_set_client_identifier($this->conn, $cid);
 }
开发者ID:nyandranzz,项目名称:todoticket,代码行数:18,代码来源:tt_db.inc.php

示例2: __construct

 /**
  * Constructor opens a connection to the database
  * @param string $module Module text for End-to-End Application Tracing
  * @param string $cid Client Identifier for End-to-End Application Tracing
  * @throws \Exception
  */
 public function __construct($module, $cid)
 {
     $this->conn = @oci_new_connect(O_USERNAME, O_PASSWORD, O_DATABASE, O_CHARSET);
     if (!$this->conn) {
         $m = oci_error();
         throw new \Exception("Cannot open connection to Oracle db " . $m["message"]);
     }
     // Record the "name" of the web user, the client info and the module.
     // These are used for end-to-end tracing in the DB.
     oci_set_client_info($this->conn, CLIENT_INFO);
     oci_set_module_name($this->conn, $module);
     oci_set_client_identifier($this->conn, $cid);
 }
开发者ID:kwakucsc,项目名称:php_framework,代码行数:19,代码来源:Oracle.php

示例3: session_start

<?php

require_once '../../_config/dbinfo.inc.php';
require_once '../../_config/misc.func.php';
require_once '../../_config/hash.pwd.php';
session_start();
$conn = oci_connect(ORA_CON_UN, ORA_CON_PW, ORA_CON_DB) or die;
$pass = $_POST['password'];
$username = $_POST['username'];
oci_set_client_identifier($conn, 'admin');
$sql = oci_parse($conn, "SELECT WMU.MART_PASS HASHPASS,\r\n                            WMU.MART_FULL_NAME FULLNAME,\r\n                            WMR.MART_ROLE_DESC COMP_ROLE_COMPLETE\r\n                       FROM MART_USER WMU\r\n                            INNER JOIN MART_ROLE WMR\r\n                               ON WMR.MART_ROLE_ID = WMU.MART_ROLE_ID\r\n                      WHERE WMU.MART_FULL_NAME = :finemail");
oci_bind_by_name($sql, ":finemail", $username);
oci_define_by_name($sql, "COMP_ROLE_COMPLETE", $role);
oci_define_by_name($sql, "HASHPASS", $hashpass);
oci_execute($sql);
$r = oci_fetch_array($sql, OCI_ASSOC);
$passMatchInt = validate_password($pass, $hashpass);
if ($passMatchInt == 1) {
    $_SESSION['userlogin'] = $username;
    $_SESSION['rolelogin'] = $role;
    echo '<script>location.href="../main.php"</script>';
} else {
    echo '<script>alert("LOGIN FAILED !!! \\nPLEASE ENTER APPROPRIATE USER NAME AND PASSWORD")</script>';
    echo '<script>location.href="../../index.php"</script>';
}
$globalName = SingleQryFld("SELECT WMS.SETTING_VALUE_STRING FROM MART_SETTINGS WMS WHERE WMS.SETTING_DESC = 'GLOBAL_NAME'", $conn);
$_SESSION['globalname'] = $globalName;
开发者ID:weltesdeveloper,项目名称:weltesmart,代码行数:27,代码来源:checklogin.php

示例4: session_start

session_start();
// CHECK IF THE USER IS LOGGED ON ACCORDING
// TO THE APPLICATION AUTHENTICATION
if (!isset($_SESSION['username'])) {
    echo <<<EOD
       <h1>You are UNAUTHORIZED !</h1>
       <p>INVALID usernames/passwords<p>
       <p><a href="/WeltesinformationCenter/index.html">LOGIN PAGE</a><p>
EOD;
    exit;
}
// GENERATE THE APPLICATION PAGE
$conn = oci_pconnect(ORA_CON_UN, ORA_CON_PW, ORA_CON_DB);
// 1. SET THE CLIENT IDENTIFIER AFTER EVERY CALL
// 2. USING UNIQUE VALUE FOR BACK END USER
oci_set_client_identifier($conn, $_SESSION['username']);
$username = htmlentities($_SESSION['username'], ENT_QUOTES);
function hitungProsentase($onsite, $preparation, $erection, $qc)
{
    $presentaseOnsite = $onsite / 100 * 5;
    $prsentasePreparation = $preparation / 100 * 5;
    $prsentaseErection = $erection / 100 * 85;
    $presentaseQc = $qc / 100 * 5;
    $result = $presentaseOnsite + $prsentasePreparation + $prsentaseErection + $presentaseQc;
    return $result;
}
function totalWeightErection($onsite, $prep, $erec, $qc)
{
    $w_onsite = $onsite * 5 / 100;
    $w_prep = $prep * 5 / 100;
    $w_erect = $erec * 85 / 100;
开发者ID:weltesdeveloper,项目名称:weltesinformationcenter,代码行数:31,代码来源:tierTwoInfoXlsGen.php

示例5: SetClientID

 public function SetClientID(string $client_id)
 {
     return @oci_set_client_identifier($this->conn_handle, $client_id);
 }
开发者ID:Zniel,项目名称:fl_crtlpanel_self_dev,代码行数:4,代码来源:pm_oracle.class.php

示例6: setUserInformation

 /**
  * Utiliza o recurso do Oracle que permite vincular informações do usuário da aplicação à sua sessão no banco de dados.
  * @param type $userId
  * @param type $userIP
  * @param type $module
  * @param type $action
  */
 public function setUserInformation($userId, $userIP = null, $module = null, $action = null)
 {
     oci_set_client_identifier($this->dbh, $userId);
     if ($userIP) {
         oci_set_client_info($this->dbh, $userIP);
     }
     if ($module) {
         oci_set_module_name($this->dbh, $module);
     }
     if ($action) {
         oci_set_action($this->dbh, $action);
     }
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:20,代码来源:OCI8Connection.php

示例7: define

define("ORA_CON_DB2", "192.168.100.68/WENLOGINV");
$conn_wenloginv = oci_connect(ORA_CON_UN, ORA_CON_PW, ORA_CON_DB2) or die;
// koneksi ke wenmart
define("ORA_CON_DB", "192.168.100.71/WENMART");
$conn = oci_connect(ORA_CON_UN, ORA_CON_PW, ORA_CON_DB) or die;
/* $con = oci_connect(ORA_CON_UN, ORA_CON_PW, ORA_CON_DB);
  if($con)
  echo 'success';
  else
  echo 'fail';

  $sql = "select count(inv_desc) from MASTER_INV where inv_desc = 'MIKO H'";
  $r = oci_parse($con, $sql);
  oci_execute($r);
  $row = oci_fetch_array($r);
  echo $row[0]; */
session_start();
if (!isset($_SESSION['userlogin'])) {
    echo <<<EOD
   <h1>You are UNAUTHORIZED !</h1>
   <p>INVALID usernames/passwords<p>
   <p><a href="/WeltesMart/_includes/login/login_view.php">LOGIN PAGE</a></p>

EOD;
    exit;
}
// 1. SET THE CLIENT IDENTIFIER AFTER EVERY CALL
// 2. USING UNIQUE VALUE FOR BACK END USER
oci_set_client_identifier($conn, $_SESSION['userlogin']);
$username = htmlentities($_SESSION['userlogin'], ENT_QUOTES);
$user_role = $_SESSION['rolelogin'];
开发者ID:weltesdeveloper,项目名称:weltesmart,代码行数:31,代码来源:dbinfo.inc.php

示例8: actionLogon

 public function actionLogon()
 {
     if ($_GET != '') {
         Yii::app()->oracle->sessStart();
         $_SESSION['session'] = session_id();
         $conn = Yii::app()->oracle_auth->getOracleAuthConnection();
         $dataset = $_GET['dataset_id'];
         $complex = $_GET['complex_id'];
         $user_id = $_GET['user_id'];
         $s = oci_parse($conn, "begin :p1:=ini.BSFT_LOGON(:p_ds, :p_cmp, :p_user, :p_sid); end;");
         oci_bind_by_name($s, ":p1", $client_sess_id, 16, SQLT_CHR);
         oci_bind_by_name($s, ":p_ds", $dataset, -1, SQLT_CHR);
         oci_bind_by_name($s, ":p_cmp", $complex, -1, SQLT_CHR);
         oci_bind_by_name($s, ":p_user", $user_id, -1, SQLT_CHR);
         oci_bind_by_name($s, ":p_sid", $_SESSION['session'], -1, SQLT_CHR);
         oci_execute($s);
         //ini_set('session.cookie_lifetime', 60*60*24);
         //setcookie('PHPSESSID', session_id(), time()+86400);
         //session_start();
         //Yii::app()->oracle->sessStart();
         //$conn = Yii::app()->oracle_auth->getOracleAuthConnection();
         if ($client_sess_id != '') {
             $_SESSION['session'] = session_id();
             $_SESSION['username'] = $_GET['username'];
             $_SESSION['user_id'] = $user_id;
             $_SESSION['dataset'] = $dataset;
             $_SESSION['complex'] = $complex;
             $_SESSION['client_session_id'] = $client_sess_id;
             $offset = 4;
             $time = time();
             $time += $offset * 3600;
             $_SESSION['activity'] = $time;
             oci_set_client_identifier($conn, $_SESSION['user_id']);
             //$GLOBALS['session_id'];
         }
     }
 }
开发者ID:Szaharov,项目名称:GCB,代码行数:37,代码来源:SiteController.php

示例9: session_start

<?php 
require_once '../../../_config/dbinfo.inc.php';
require_once '../../../_config/hash.pwd.php';
session_start();
$email = $_POST['email'];
$pass = $_POST['password'];
oci_set_client_identifier($conn_finance, 'admin');
$sql = oci_parse($conn_finance, 'SELECT WFU.FINANCE_PASS HASHPASS, WFU.FINANCE_ROLE_ID COMP_ROLE, WFU.FINANCE_FULL_NAME FULLNAME FROM WEN_FINANCE_USER WFU WHERE WFU.FINANCE_EMAIL = :finemail');
oci_bind_by_name($sql, ":finemail", $email);
oci_define_by_name($sql, "COMP_ROLE", $role);
oci_define_by_name($sql, "HASHPASS", $hashpass);
oci_define_by_name($sql, "FULLNAME", $username);
oci_execute($sql);
$r = oci_fetch_array($sql, OCI_ASSOC);
$passMatchInt = validate_password($pass, $hashpass);
if ($passMatchInt == 1) {
    $_SESSION['username'] = $username;
    $_SESSION['role'] = $role;
    echo '<script>location.href="../../main.php"</script>';
} else {
    echo '<script>alert("LOGIN FAILED !!! \\nPLEASE ENTER APPROPRIATE USER NAME AND PASSWORD")</script>';
    echo '<script>location.href="../../login.php"</script>';
}
开发者ID:weltesdeveloper,项目名称:WeltesFinance,代码行数:23,代码来源:checklogin.php

示例10: setClientIdentifier

 public function setClientIdentifier($clientIdentifier)
 {
     set_error_handler(static::getErrorHandler());
     $isSuccess = oci_set_client_identifier($this->resource, $clientIdentifier);
     restore_error_handler();
     return $isSuccess;
 }
开发者ID:jpina,项目名称:oci8,代码行数:7,代码来源:Oci8Connection.php


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