Example #1
0
 function main()
 {
     if (gpExists('gp_xajax')) {
         $sq = "UPDATE variables\n                    SET variable_value = " . SQLFC(gp('varval')) . "\n                  WHERE variable = " . SQLFC(gp('variable'));
         SQL($sq);
     }
     if (gpExists('gp_cache')) {
         //unlink($GLOBALS['AG']['dirs']['dynamic'].'table_variables.php');
         OptionGet('X');
     }
     if (gpExists('gp_xajax')) {
         return;
     }
     parent::main();
 }
Example #2
0
    function ehMain()
    {
        hidden('gp_page', 'reports');
        hidden('gp_skey', gp('gp_skey'));
        if ($this->mode != 'upd') {
            parent::ehMain();
            return;
        }
        // Reset this, set it later
        vgfSet('HTML_focus', '');
        ?>
      <script>
      function TableAdd() {
         TableX=ob('sel_tablesavl').value
         if(TableX=='') {
            alert("Please choose a table from the list first");
         }
         else {
            sndReq('&gp_ajax=tableadd&gp_rtable='+TableX);
         }
      }
      function TableDel() {
         TableX=ob('sel_tablesrep').value
         if(TableX=='') {
            alert("Please choose a table from the list first");
         }
         else {
            sndReq('&gp_ajax=tabledel&gp_rtable='+TableX);
         }
      }
      function ColumnAdd() {
         ColumnX=ob('sel_columnsavl').value
         if(ColumnX=='') {
            alert("Please choose a column from the list first");
         }
         else {
            sndReq('&gp_ajax=columnadd&gp_rcolumn='+ColumnX);
         }
      }
      function ColumnSort() {
         ColumnX=ob('sel_columnsrep').value
         if(ColumnX=='') {
            alert("Please choose a column from the list first");
         }
         else {
            sndReq('&gp_ajax=columnsort&gp_rcolumn='+ColumnX);
         }
      }
      function ColumnUnSort() {
         ColumnX=ob('sel_colsort').value
         if(ColumnX=='') {
            alert("Please choose a column from the list first");
         }
         else {
            sndReq('&gp_ajax=columnunsort&gp_rcolumn='+ColumnX);
         }
      }
      
      
      </script>
      <h1><?php 
        echo $this->PageSubtitle;
        ?>
</h1>
      <table cellpadding=0 cellspacing=0 width=100%  
             style="border-collapse:collapse">
        <tr>
          <td height="40" valign=top><?php 
        echo $this->h['ButtonBar'];
        ?>
        </tr>
        <tr>
          <td>
            <hr/>
            <div class="x2menubar" id="x2tabbar" name="x2tabbar">
            <?php 
        echo $this->ehTabbar(false);
        ?>
            <hr/>
            </div>
          </td>
        </tr>
        <tr><td>&nbsp;
        <tr>
          <td class="x2_content" id="x2_content" name="x2_content">
          <?php 
        echo $this->ehTab_Main();
        ?>
          </td>
        </tr>
      </table>
      <?php 
        return;
    }