<?php
$fh = fopen('login.cfg', "r") or die("Can't open file!");
$login = fread($fh, filesize('login.cfg'));
fclose($fh);
$fh = fopen('pass.cfg', "r") or die("Can't open file!");
$pass = fread($fh, filesize('pass.cfg'));
fclose($fh);
$fh = fopen('sid.cfg', "r") or die("Can't open file!");
$sid = fread($fh, filesize('sid.cfg'));
fclose($fh);
  
$c=OCILogon($login, $pass, $sid);
if(!$c)
			{
			echo "Невозможно подключится к базе: " . var_dump( OCIError() );
			die();
			}
$s = OCIParse($c, "select * from user_objects order by OBJECT_TYPE, OBJECT_NAME");
	OCIExecute($s, OCI_DEFAULT);
	$i=0;
	while (OCIFetch($s))
			{
				$obj_name[$i]=ociresult($s,"OBJECT_NAME");
				$obj_type[$i]=ociresult($s,"OBJECT_TYPE");
				$i++;
			}			
			
OCICommit($c);
OCILogoff($c);
?>
<html>
<head>
<title>Users object</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
</head>
<body>
<a href="login.php">К логину</a>
<table border=1>
<tr><th>NAME</th><th>TYPE</th></tr>
<?php
for($i=0;$i<count($obj_name);$i++){
	echo "<tr><td>".$obj_name[$i]."</td><td>".$obj_type[$i]."</td></tr>";
}
?>
</table>
</body>
</html>







