Announcement

Collapse
No announcement yet.

Form sc_include Contrtol app

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Form sc_include Contrtol app

    I have a form app which is calling a blank app and it does not work. Is something wrong with the below code?
    onapplicatoininti
    [gvapp] = "binloc_maint.php";
    sc_include(blank_security.php);

    setting global variable gvapp then including the blank_security.php app

  • #2
    What do you want to achieve? Useually you use the macro sc_redir to move to another application. Including simply includes the code without calling it.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Originally posted by aducom View Post
      What do you want to achieve? Useually you use the macro sc_redir to move to another application. Including simply includes the code without calling it.
      Here is the code in my control app
      If I start with this control app, it works, but trying to include it does not.


      // Check for record
      echo" [gvlogin]";
      echo" [gvapp]";
      // sc_exit();
      $check_sql = "SELECT sec_login,sec_access FROM sec_table WHERE sec_login = [gvlogin]"
      . " and sec_app_name = [gvapp]";
      sc_select(rs, $check_sql);

      if (false == {rs})
      {
      // Error while accessing database
      echo" Not Authorized for this App 11";
      sc_redir(GTEKmenu);
      }
      elseif ({rs}->EOF)
      {
      // No record found
      echo" Not Authorized for this App 22";
      sc_redir(GTEKmenu);
      }
      else
      {
      // Record found
      echo" here";
      {clientName} = $rs->fields["sec_login"];
      {clientacc} = $rs->fields["sec_access"];
      echo" {clienName}";
      echo" {clientacc}";
      exit();
      if ({clientacc} == 'Y')
      {
      sc_redir([gvapp]);
      }
      else
      {
      echo" Not Authorized for this App";
      sc_redir(GTEKmenu);
      }
      }
      Last edited by SLADS; 06-03-2013, 05:25 PM.

      Comment

      Working...
      X