Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Protection Plus for Clipper - <u>pp_upddate()</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
PP_UPDDATE()
Updates the last time used fields
------------------------------------------------------------------------------

Syntax
  PP_UPDDATE()  .  lResult

Returns
  .T. if successful, else .F.

Description
  Stores the current value of date() and time() in the control file.
  This should be run upon exiting the program.  This is because
  if the user keeps setting back the clock, it would be impossible
  to avoid the narrowing window.  If he uses the program for an
  hour every day, eventually, no matter how much he changes the
  date and time, will not be able to access the program.  This
  occurs provided that you run the check date function
  pp_valdate() upon entry.

Example

A function to clean up screen and update the last used date and time
is recommended.  The last used date and time should be updated upon
exiting because if the user keeps setting back the clock, it would be
impossible to avoid the narrowing window. If he uses the program for
an hour every day, eventually, no matter how much he changes the date
and time, will not be able to access the program.  This occurs
provided that you run the check date function pp_valdate upon entry.

FUNCTION exit_program
    pp_upddate()
    set color to
    clear
    cancel
return .T.

NOTE that if it has expired (by date) it is important to perform a
pp_upddate() (described later) so that the combination of the date
checking and the expiration date checking prohibit unauthorized use
of your application.

if pp_expired()
    ? "Sorry, but the demo for this product has expired... "
    ? "Please call and order from C.R.S. at 412-471-7638"
    ?
    pp_upddate()
    cancel
endif

See Also: PP_UCODE() PP_VALDATE()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson