ShellBanner
System:Linux MiraNet 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011 i686
Software:Apache. PHP/5.3.6-13ubuntu3.10
ID:uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
Safe Mode:OFF
Open_Basedir:OFF
Freespace:27.14 GB of 70.42 GB (38.54%)
MySQL: ON MSSQL: OFF Oracle: OFF PostgreSQL: OFF Curl: OFF Sockets: ON Fetch: OFF Wget: ON Perl: ON
Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,

/ usr/ share/ php/ adodb/ drivers/ - drwxr-xr-x

Directory:
Viewing file:     adodb-ado_mssql.inc.php (4.35 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/* 
V5.10 10 Nov 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
  Released under both BSD license and Lesser GPL library license. 
  Whenever there is any discrepancy between the two licenses, 
  the BSD license will take precedence. 
Set tabs to 4 for best viewing.
  
  Latest version is available at http://adodb.sourceforge.net
  
  Microsoft SQL Server ADO data driver. Requires ADO and MSSQL client. 
  Works only on MS Windows.
  
  Warning: Some versions of PHP (esp PHP4) leak memory when ADO/COM is used. 
  Please check http://bugs.php.net/ for more info.
*/

// security - hide paths
if (!defined('ADODB_DIR')) die();

if (!
defined('_ADODB_ADO_LAYER')) {
    if (
PHP_VERSION >= 5) include(ADODB_DIR."/drivers/adodb-ado5.inc.php");
    else include(
ADODB_DIR."/drivers/adodb-ado.inc.php");
}


class  
ADODB_ado_mssql extends ADODB_ado {        
    var 
$databaseType 'ado_mssql';
    var 
$hasTop 'top';
    var 
$hasInsertID true;
    var 
$sysDate 'convert(datetime,convert(char,GetDate(),102),102)';
    var 
$sysTimeStamp 'GetDate()';
    var 
$leftOuter '*=';
    var 
$rightOuter '=*';
    var 
$ansiOuter true// for mssql7 or later
    
var $substr "substring";
    var 
$length 'len';
    var 
$_dropSeqSQL "drop table %s";
    
    
//var $_inTransaction = 1; // always open recordsets, so no transaction problems.
    
    
function ADODB_ado_mssql()
    {
            
$this->ADODB_ado();
    }
    
    function 
_insertid()
    {
            return 
$this->GetOne('select SCOPE_IDENTITY()');
    }
    
    function 
_affectedrows()
    {
            return 
$this->GetOne('select @@rowcount');
    }
    
    function 
SetTransactionMode$transaction_mode 
    {
        
$this->_transmode  $transaction_mode;
        if (empty(
$transaction_mode)) {
            
$this->Execute('SET TRANSACTION ISOLATION LEVEL READ COMMITTED');
            return;
        }
        if (!
stristr($transaction_mode,'isolation')) $transaction_mode 'ISOLATION LEVEL '.$transaction_mode;
        
$this->Execute("SET TRANSACTION ".$transaction_mode);
    }
    
    function 
qstr($s,$magic_quotes=false)
    {
        
$s ADOConnection::qstr($s$magic_quotes);
        return 
str_replace("\0""\\\\000"$s);
    }
    
    function 
MetaColumns($table$normalize=true)
    {
        
$table strtoupper($table);
        
$arr= array();
        
$dbc $this->_connectionID;
        
        
$osoptions = array();
        
$osoptions[0] = null;
        
$osoptions[1] = null;
        
$osoptions[2] = $table;
        
$osoptions[3] = null;
        
        
$adors=@$dbc->OpenSchema(4$osoptions);//tables

        
if ($adors){
                while (!
$adors->EOF){
                        
$fld = new ADOFieldObject();
                        
$c $adors->Fields(3);
                        
$fld->name $c->Value;
                        
$fld->type 'CHAR'// cannot discover type in ADO!
                        
$fld->max_length = -1;
                        
$arr[strtoupper($fld->name)]=$fld;
        
                        
$adors->MoveNext();
                }
                
$adors->Close();
        }
        
$false false;
        return empty(
$arr) ? $false $arr;
    }
    
    function 
CreateSequence($seq='adodbseq',$start=1)
    {
        
        
$this->Execute('BEGIN TRANSACTION adodbseq');
        
$start -= 1;
        
$this->Execute("create table $seq (id float(53))");
        
$ok $this->Execute("insert into $seq with (tablock,holdlock) values($start)");
        if (!
$ok) {
                
$this->Execute('ROLLBACK TRANSACTION adodbseq');
                return 
false;
        }
        
$this->Execute('COMMIT TRANSACTION adodbseq'); 
        return 
true;
    }

    function 
GenID($seq='adodbseq',$start=1)
    {
        
//$this->debug=1;
        
$this->Execute('BEGIN TRANSACTION adodbseq');
        
$ok $this->Execute("update $seq with (tablock,holdlock) set id = id + 1");
        if (!
$ok) {
            
$this->Execute("create table $seq (id float(53))");
            
$ok $this->Execute("insert into $seq with (tablock,holdlock) values($start)");
            if (!
$ok) {
                
$this->Execute('ROLLBACK TRANSACTION adodbseq');
                return 
false;
            }
            
$this->Execute('COMMIT TRANSACTION adodbseq'); 
            return 
$start;
        }
        
$num $this->GetOne("select id from $seq");
        
$this->Execute('COMMIT TRANSACTION adodbseq'); 
        return 
$num;
        
        
// in old implementation, pre 1.90, we returned GUID...
        //return $this->GetOne("SELECT CONVERT(varchar(255), NEWID()) AS 'Char'");
    
}
    
    } 
// end class 
    
    
class  ADORecordSet_ado_mssql extends ADORecordSet_ado {        
    
    var 
$databaseType 'ado_mssql';
    
    function 
ADORecordSet_ado_mssql($id,$mode=false)
    {
            return 
$this->ADORecordSet_ado($id,$mode);
    }
}
?>
Command:
Quick Commands:
Upload:
[Read-Only] Max size: 100MB
PHP Filesystem: <@ Ú
Search File:
regexp
Create File:
Overwrite [Read-Only]
View File:
Mass Defacement:
[+] Main Directory: [+] Defacement Url:
LmfaoX Shell - Private Build [BETA] - v0.1 -; Generated: 0.7402 seconds