4 define('WARAQ_ROOT', '../..');
5 require_once WARAQ_ROOT
.'/'. 'ini.php';
7 require_once "database.php";
12 <script src
="../codepress/codepress.js" type
="text/javascript"></script
>
13 <script src
="../prototype-1.6.0.2.js" type
="text/javascript"></script
>
14 <script src
="../bazdig.js" type
="text/javascript"></script
>
15 <link rel
="stylesheet" type
="text/css" href
="../bazdig.css" />
20 <a href
="../history/" accesskey
="c" title
="(c)">console
</a
><a href
="../history/" accesskey
="h" title
="(h)">history
</a
><a href
="../db/">database
</a
><a href
="../bazdig.db" accesskey
="s" title
="(s)">save
</a
>
23 <form method
="get" action
="../sql/exec/" target
="_new">
26 <textarea id
="input" name
="input" class="codepress sql linenumbers-off" style
="width:100%;height:350px;" wrap
="off" tabindex
="1">
27 <?php
echo stripslashes($_GET['q']); ?
>
30 <div id
="schema"><?php
32 if ($_SESSION['db_type']) {
33 $work_db = new BDB(array('type' => $_SESSION['db_type'], 'name' => $_SESSION['db_name'], 'host' => $_SESSION['db_host']), $_SESSION['db_user'], $_SESSION['db_password']);
34 echo "<p><b>".$work_db->name
."</b>";
35 echo " @". $work_db->host
."</p>";
36 echo $work_db->httpGet($bazdig->get('/db/schema/'));
41 <button id
="ok" accesskey
="k" title
="(k)" onclick
="q.value=input.getCode(); submit();">OK
</button
>
42 <input type
="hidden" name
="q" id
="q"/>
44 <div id
="settings" style
="display:none">
45 <label
>Type
<input type
='text' name
='dbt' /></label
>
46 <label
>Name
<input type
='text' name
='dbn' /></label
>
47 <label
>Host
<input type
='text' name
='dbh' /></label
>
48 <label
>User
<input type
='text' name
='dbu' /></label
>
49 <label
>Password
<input type
='password' name
='dbp' /></label
>
54 <div id
="history" style
="display:none">
55 <form method
="get" action
=".">
56 <input type
="text" name
="q" value
="<?php echo $_GET['q'] ?>"/>