!C99Shell v. 1.0 pre-release build #13!

Software: Apache. PHP/5.5.15 

uname -a: Windows NT SVR-DMZ 6.1 build 7600 (Windows Server 2008 R2 Enterprise Edition) i586 

SYSTEM 

Safe-mode: OFF (not secure)

C:\Intranet\C\xampp\php\PEAR\adodb\tests\   drwxrwxrwx
Free 4.09 GB of 39.52 GB (10.36%)
Detected drives: [ a ] [ c ] [ d ] [ e ] [ f ]
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     test-active-record.php (2.28 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

    
include_once('../adodb.inc.php');
    include_once(
'../adodb-active-record.inc.php');
    
    
// uncomment the following if you want to test exceptions
    
if (@$_GET['except']) {
        if (
PHP_VERSION >= 5) {
            include(
'../adodb-exceptions.inc.php');
            echo 
"<h3>Exceptions included</h3>";
        }
    }

    
$db NewADOConnection('mysql://root@localhost/northwind');
    
$db->debug=1;
    
ADOdb_Active_Record::SetDatabaseAdapter($db);

    
$db->Execute("CREATE TEMPORARY TABLE `persons` (
                    `id` int(10) unsigned NOT NULL auto_increment,
                    `name_first` varchar(100) NOT NULL default '',
                    `name_last` varchar(100) NOT NULL default '',
                    `favorite_color` varchar(100) NOT NULL default '',
                    PRIMARY KEY  (`id`)
                ) ENGINE=MyISAM;
               "
);
               
    class 
Person extends ADOdb_Active_Record{}
    
$person = new Person();
    
    echo 
"<p>Output of getAttributeNames: ";
    
var_dump($person->getAttributeNames());
    
    
/**
     * Outputs the following:
     * array(4) {
     *    [0]=>
     *    string(2) "id"
     *    [1]=>
     *    string(9) "name_first"
     *    [2]=>
     *    string(8) "name_last"
     *    [3]=>
     *    string(13) "favorite_color"
     *  }
     */
    
    
$person = new Person();
    
$person->name_first 'Andi';
    
$person->name_last  'Gutmans';
    
$person->save(); // this save() will fail on INSERT as favorite_color is a must fill...
    
    
    
$person = new Person();
    
$person->name_first     'Andi';
    
$person->name_last      'Gutmans';
    
$person->favorite_color 'blue';
    
$person->save(); // this save will perform an INSERT successfully
    
    
echo "<p>The Insert ID generated:"print_r($person->id);
    
    
$person->favorite_color 'red';
    
$person->save(); // this save() will perform an UPDATE
    
    
$person = new Person();
    
$person->name_first     'John';
    
$person->name_last      'Lim';
    
$person->favorite_color 'lavender';
    
$person->save(); // this save will perform an INSERT successfully
    
    // load record where id=2 into a new ADOdb_Active_Record
    
$person2 = new Person();
    
$person2->Load('id=2');
    
    
var_dump($person2);
    
    
$activeArr $db->GetActiveRecordsClass($class "Person",$table "persons","id=".$db->Param(0),array(2));
    
$person2 =& $activeArr[0];
    echo 
"<p>Name (should be John): ",$person->name_first" <br> Class (should be Person): ",get_class($person2);    
    


?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0156 ]--