we now pass in an object type parameter to browse.php so that it knows what type...
authorxzilla <xzilla>
Sat, 26 Jun 2004 22:24:09 +0000 (22:24 +0000)
committerxzilla <xzilla>
Sat, 26 Jun 2004 22:24:09 +0000 (22:24 +0000)
browser.php
display.php
tables.php
tblproperties.php

index ac2d67e015799eddccb48a9d3e07f019535ac285..95027bc880e71e15f343aad2ccbd8b8884776c52 100644 (file)
@@ -5,7 +5,7 @@
         * if you click on a database it shows a list of database objects in that
         * database.
         *
-        * $Id: browser.php,v 1.37 2004/05/10 15:21:59 chriskl Exp $
+        * $Id: browser.php,v 1.38 2004/06/26 22:24:09 xzilla Exp $
         */
 
        // Include application functions
@@ -62,7 +62,7 @@
                                                                'expandedIcon' => "../../../images/themes/{$conf['theme']}/tables.png",
                                                                'expanded' => false,
                                                                'linkTarget' => 'detail',
-                                                               'iconLink' => addslashes(htmlspecialchars('display.php?table='.urlencode($tables->f[$data->tbFields['tbname']]).'&'.$querystr.
+                                                               'iconLink' => addslashes(htmlspecialchars('display.php?table='.urlencode($tables->f[$data->tbFields['tbname']]).'&objtype=table&'.$querystr.
                                                                        "&return_url={$return_url}&return_desc=" . urlencode($lang['strback'])))
                                                                ));
 
@@ -97,7 +97,7 @@
                                                                'expanded' => false,
                                                                'linkTarget' => 'detail',
                                                                // XXX: FIX BROWSE
-                                                               'iconLink' => addslashes(htmlspecialchars('display.php?table='.urlencode($views->f[$data->vwFields['vwname']]).'&'.$querystr.
+                                                               'iconLink' => addslashes(htmlspecialchars('display.php?table='.urlencode($views->f[$data->vwFields['vwname']]).'&objtype=view&'.$querystr.
                                                                        "&return_url={$return_url}&return_desc=" . urlencode($lang['strback'])))
                                                                ));
 
index aef91a8fcb1fa4af34fd0eededc98235dbaa0e00..5ecf0ad2fbd177822bb7b00dc24959db82c64b3a 100644 (file)
@@ -9,7 +9,7 @@
         * @param $return_desc The return link name
         * @param $page The current page
         *
-        * $Id: display.php,v 1.38 2004/05/12 22:40:49 soranzo Exp $
+        * $Id: display.php,v 1.39 2004/06/26 22:24:09 xzilla Exp $
         */
 
        // Include application functions
                        echo $misc->form;
                        if (isset($_REQUEST['table']))
                                echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\" />\n";
+                       if (isset($_REQUEST['objtype']))
+                               echo "<input type=\"hidden\" name=\"objtype\" value=\"", htmlspecialchars($_REQUEST['objtype']), "\" />\n";
                        if (isset($_REQUEST['query']))
                                echo "<input type=\"hidden\" name=\"query\" value=\"", htmlspecialchars($_REQUEST['query']), "\" />\n";
                        if (isset($_REQUEST['count']))
                        echo $misc->form;
                        if (isset($_REQUEST['table']))
                                echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\" />\n";
+                       if (isset($_REQUEST['objtype']))
+                               echo "<input type=\"hidden\" name=\"objtype\" value=\"", htmlspecialchars($_REQUEST['objtype']), "\" />\n";
                        if (isset($_REQUEST['query']))
                                echo "<input type=\"hidden\" name=\"query\" value=\"", htmlspecialchars($_REQUEST['query']), "\" />\n";
                        if (isset($_REQUEST['count']))
                // Build strings for GETs
                $str =  $misc->href; // . "&amp;page=" . urlencode($_REQUEST['page']);
                if (isset($_REQUEST['table'])) $str .= "&amp;table=" . urlencode($_REQUEST['table']);
+               if (isset($_REQUEST['objtype'])) $str .= "&amp;objtype=" . urlencode($_REQUEST['objtype']);
                if (isset($_REQUEST['query'])) $str .= "&amp;query=" . urlencode($_REQUEST['query']);
                if (isset($_REQUEST['count'])) $str .= "&amp;count=" . urlencode($_REQUEST['count']);
                if (isset($_REQUEST['return_url'])) $str .= "&amp;return_url=" . urlencode($_REQUEST['return_url']);
                        echo " | <a class=\"navlink\" href=\"dataexport.php?query=",
                                        urlencode($_REQUEST['query']), "&amp;{$misc->href}\">{$lang['strdownload']}</a>\n";     
                }
+
+               // Insert
+               if ( isset($_REQUEST['table']) && ( isset($_REQUEST['objtype']) && $_REQUEST['objtype'] == 'table') ) {
+                       echo " | <a class=\"navlink\" href=\"tables.php?action=confinsertrow&amp;table=",
+                               urlencode($_REQUEST['table']), "&amp;{$misc->href}\">{$lang['strinsert']}</a>\n";
+               }
+
                // Refresh
                echo "| <a class=\"navlink\" href=\"display.php?{$str}&amp;{$str2}&amp;strings=", urlencode($_REQUEST['strings']), 
                        "&amp;page=" . urlencode($_REQUEST['page']),
                        "\">{$lang['strrefresh']}</a></p>\n";
-                               
                echo "</p>\n";
        }
        
index d03363f440428f7d0991cab0ea760f395a02d0af..e1de12860a70644052beb5261d3fb2b4103134be 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List tables in a database
         *
-        * $Id: tables.php,v 1.55 2004/06/07 11:38:38 soranzo Exp $
+        * $Id: tables.php,v 1.56 2004/06/26 22:24:09 xzilla Exp $
         */
 
        // Include application functions
                                echo "<tr>\n\t<td class=\"data{$id}\">", $misc->printVal($tables->f[$data->tbFields['tbname']]), "</td>\n";
                                echo "\t<td class=\"data{$id}\">", $misc->printVal($tables->f[$data->tbFields['tbowner']]), "</td>\n";
                                echo "\t<td class=\"opbutton{$id}\"><a href=\"display.php?{$misc->href}&amp;table=",
-                                       urlencode($tables->f[$data->tbFields['tbname']]), "&amp;return_url={$return_url}&amp;return_desc=",
+                                       urlencode($tables->f[$data->tbFields['tbname']]), "&amp;objtype=table&amp;return_url={$return_url}&amp;return_desc=",
                                        urlencode($lang['strback']), "\">{$lang['strbrowse']}</a></td>\n";
                                echo "\t<td class=\"opbutton{$id}\"><a href=\"$PHP_SELF?action=confselectrows&amp;{$misc->href}&amp;table=",
                                        urlencode($tables->f[$data->tbFields['tbname']]), "\">{$lang['strselect']}</a></td>\n";
index 268b16f0f5fccfa9b893ef9af1f91eff9726768d..d28228ee10609c7d3c069dc625bc7fddc94947c1 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List tables in a database
         *
-        * $Id: tblproperties.php,v 1.49 2004/06/10 07:16:38 chriskl Exp $
+        * $Id: tblproperties.php,v 1.50 2004/06/26 22:24:09 xzilla Exp $
         */
 
        // Include application functions
 
                echo "<ul>\n";
                $return_url = urlencode("tblproperties.php?{$misc->href}&table={$_REQUEST['table']}");
-               echo "\t<li><a href=\"display.php?{$misc->href}&table=", urlencode($_REQUEST['table']), "&return_url={$return_url}&return_desc=",
+               echo "\t<li><a href=\"display.php?{$misc->href}&table=", urlencode($_REQUEST['table']), "&objtype=table&return_url={$return_url}&return_desc=",
                        urlencode($lang['strback']), "\">{$lang['strbrowse']}</a></li>\n";
                echo "\t<li><a href=\"tables.php?action=confselectrows&{$misc->href}&table=", urlencode($_REQUEST['table']),"\">{$lang['strselect']}</a></li>\n";
                echo "\t<li><a href=\"tables.php?action=confinsertrow&{$misc->href}&table=", urlencode($_REQUEST['table']),"\">{$lang['strinsert']}</a></li>\n";