1

(1 replies, posted in General)

i use Advanced Installer. never failed me

2

(0 replies, posted in General)

I would like to build a point of sale with mvd but i don't know where to start or how to do it properly. For example i would like to scan the product with a barcode scanner and add it to a grid and save that receipt somewhere. The fidelity card works in the following way , the customers receives for example from the total sale 5% back and in the end when it has enough money he can use it to pay for merchendise. The app must have an inventory , a customer database , the fidelity card has a barrcode on it so on the initial sale the card must be scanned. I know that there is a point of sale on this forum but it doesn't meet requirements.

3

(12 replies, posted in General)

I wish i could use the new features, but unfortunately, my license is not working because I have until 5.99, but someone decided to jump from 5.6 straight to 6.1. it`s bad because I currently use users and roles but by a script and involves a lot of work. I bought my license on 1st of June but whoever bought it after 1 of July receives this update freely and it doesn`t seem fair

4

(3 replies, posted in General)

Well i created the tables from MVD , and i did use the same script and i works except from the problems described in the firs post.

As for google translate i tried and is taking forever with copy paste . Never mind about the translation it was a long shot anyway.

keep up the good job

yes i know , but there are other software that does the same thing but free

Personally i use Advanced Installer .
I modify the existing app  , then compile a setup file => upload the setup file to a ftp server and at the customer side the app was already sent as a setup file with the updater executable file included. The updater looks on the ftp server for a new version every hour and when it finds one begins download of the setup.exe uninstall the previous version and install the new one ,making shortcuts on desktop ans that`s it.

I hope it helps

7

(3 replies, posted in General)

Hello ,

1) I had a look on the entire forum and found the program 13 anatomy. Looks awesome and i would like to copy several thing into my own app but i`m unable to do so because i don`t speak Russian therefore i don`t understand the text and the script explanations and i`m unable to learn how the program works. If someone is kind enough to translate it in English would be awesome.   

2) I tried to make the MySQL connect form go away because is annoying and i made it but the my software doesn`t work correctly anymore , login form does nothing , permission check gives admin privileges to anyone , all invisible buttons and text boxes are shown , disabled items are enabled.

I would like if is possible and not to hard to do a check box somewhere with enable mysql autologin. I tried with Form1.MysqlConnection.connect.click; but it says that connect is not declared so it lead me to the conclusion that Form1.MysqlConnection exists and is the actual connection dialog but the button does not or has a different name

8

(2 replies, posted in Script)

problem solved

9

(2 replies, posted in Script)

so ... this code works with sqllite verry well but for some reason does`t work with a real mysql database.

procedure frmLogin_bLogin_OnClick (Sender: string; var Cancel: boolean);
var
   s: string;
begin
     // SQL query for check user and password
     s := VarToStr( SQLExecute('SELECT count(id) FROM users WHERE (login ='''+frmLogin.edUser.Text+''') AND (password ='''+frmLogin.edPassword.Text+''');') );

     // if SQL query found login and password
     if (s <> '0') and (s<>'') then
     begin
          sUser := frmLogin.edUser.Text; // remember username

          // check admin rights
          s := VarToStr( SQLExecute('SELECT administrator FROM users WHERE (login = '''+sUser+''');') );
          if s='0' then Meniu.alimentara.Enabled := False; // if the user does not have administrator privileges, deactivate the button to create other users

// check admin rights
          s := VarToStr( SQLExecute('SELECT administrator FROM users WHERE (login ='''+sUser+''');') );
          if s='0' then meniu.bAngajati.Enabled := False; // if the user does not have administrator privileges, deactivate the button to create other users

          // check permissions to read
          s := VarToStr( SQLExecute('SELECT citire FROM users WHERE (login ='''+sUser+''');') );
          if s='0' then Frmadduser.Button1.Enabled := False; // deactivate the button to edit the record

          // check write permissions
          s := VarToStr( SQLExecute('SELECT scriere FROM users WHERE (login ='''+sUser+''');') );
          if s='0' then
          begin
               frmUsers.add.Enabled := False;      // deactivate the button to add the record
               frmUsers.edit.Enabled := False; // deactivate the button to save the record
          end;

          // check permission to delete
          s := VarToStr( SQLExecute('SELECT stergere FROM users WHERE (login ='''+sUser+''');') );
          if s='0' then frmUsers.delete.Enabled := False; // deactivate the button to delete the record

          // check permission to search
          s := VarToStr( SQLExecute('SELECT cautare FROM users WHERE (login ='''+sUser+''');') );
          if s='0' then angajati.search.Enabled := False; // deactivate the button to search the records


          frmLogin.Close; // close login form
     end else MessageDlg('password is incorrect', mtError, mbOk, 0); // message if the password is incorrect

end;


// window closing event for login
procedure frmLogin_OnClose (Sender: TObject; var Cancel: boolean);
begin
     // if the user has not been defined, and the user closes the login window, then close the main form
     if sUser='' then Meniu.Close;
end;





begin
  // Initial check whether there is a database administrator user
  // if not, create an administrator with username admin and password admin
     if VarToStr( SQLExecute('SELECT count(id) FROM users WHERE administrator=1;') ) = '0' then
     begin
         SQLExecute('INSERT INTO users(login, `password`, `citire`, `scriere`, `stergere`, `cautare`, `administrator`) VALUES ("admin", "admin", 1, 1, 1, 1, 1);');
         frmLogin.edUser.Text := 'admin';
         frmLogin.edPassword.Text := 'admin';
     end;

end.

I can login , i can change user and so on but al login is not checking permisions for user and deactivate the apropiate buttons , it gives admin rights to every user.