SHARE
TWEET

Untitled

a guest Mar 31st, 2014 38 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function IsBanned:Boolean;
  2. var
  3.   tmpIntBan: Integer;
  4. begin
  5.      StartWorkWithDB();
  6.      Form1.query.SQL.Text:='select ban from users where id = :id;';
  7.      Form1.query.ParamByName('id').AsInteger:=MyLogin;
  8.      BDWork();
  9.      tmpIntBan := Form1.query.FieldByName('ban').AsInteger;
  10.      EndWorkWithDB();
  11.      if (tmpIntBan = 1) then Result := True
  12.      else Result := False;
  13. end;
  14.  
  15. function LastLoginNotToday:boolean;
  16. var
  17.   tmpInt: Integer;
  18.   begin
  19.        Form1.query.SQL.Text:='select (select date_format((current_date),''%m''))-(select date_format((select time_start from time_used where user_id = :id),''%m''))+(select date_format((current_date),''%d''))-(select date_format((select time_start from time_used where user_id = :id),''%d'')) as yn;';
  20.        Form1.query.ParamByName('id').AsInteger:=MyLogin;
  21.        BDWork();
  22.        tmpInt:= Form1.query.FieldByName('yn').AsInteger;
  23.        EndWorkWithDB();
  24.        if (tmpInt > 0 ) then Result := True
  25.        else
  26.        Result := False;
  27.   end;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top