Wednesday, February 21, 2018

Password Management System in Microsoft Visual Foxrpo 9

A very simple password management system that I wrote using Microsoft Visual Foxpro 9 which allows the user to register information and upload pictures. This application can be used to protect your database application from unauthorized users in your system.

I am currently accepting programming and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental is (034) 4335675.


























Sample Program Output, Table Structure and Sample Records



Program Listing


Password.scx
============
Object : Form1 Procedure: Init

 SELECT 1
 USE users

 thisform.text2.value =0
 thisform.text2.Visible= .F.
 thisform.txtusername.SetFocus

 READ events

Ok Button
========
Object : Command1 Procedure: Click

SET DEFAULT TO d:\vfp\password\
SELECT users

LOCATE FOR ALLTRIM(LOWER(username)) == ALLTRIM(LOWER(thisform.txtusername.value)) AND ALLTRIM(LOWER(password)) ==  ALLTRIM(LOWER(thisform.txtpassword.Value)) 
       
        IF FOUND() then
           DO form menu 
            thisform.Release
            thisform.Hide
            RETURN .t.
        endif

if thisform.text2.Value <3 then
thisform.text2.Value = thisform.text2.Value +1
thisform.txtusername.Value=""
thisform.txtpassword.Value =""
thisform.txtusername.SetFocus
thisform.label1.caption ="User login attempt number " + TRANSFORM(thisform.text2.value) + "."
endif
IF thisform.text2.Value = 3 then
  MESSAGEBOX("Please contact your programmer to solve this problem")
  thisform.txtusername.Enabled= .F.
  thisform.txtpassword.Enabled= .F.
  thisform.command1.Enabled= .F.
  ENDIF


Register Button
===============
Object: Command3   Procedure: Click

thisform.Release
thisform.hide
DO FORM record_management

Cancel Button
=============
Object: Command2   Procedure: Click


thisform.Release
CLEAR EVENTS
CLOSE ALL
Quit

record_management.scx
=====================

New Button
============
Object: Command2   Procedure: Click

thisform.txtId.value=0
 thisform.txtUsername.value=""
 thisform.txtPassword.value=""
 thisform.txtLastname.value=""
  thisform.txtFirstname.value=""
  thisform.txtPixpath.value=""
  thisform.txtId.setfocus


Grid
=====
Object: grdUsers Procedure: Click

SELECT users

thisform.txtId.Value=id
thisform.txtUsername.Value = username
thisform.txtPassword.Value = password
thisform.txtLastname.Value = lastname
thisform.txtFirstname.Value = firstname
thisform.txtPixpath.Value = pixpath

     

  Save Button
============
Object: Command3   Procedure: Click

SELECT users


locate for id == thisform.txtId.value
if !found()
   && new record
   if Messagebox("Are you sure to add new record?",32+4,"Confirmation") = 6
   append blank  && add new record
   replace id WITH thisform.txtId.Value
   replace lastname WITH UPPER(ALLTRIM(thisform.txtLastname.value))
   replace firstname WITH UPPER(ALLTRIM(thisform.txtFirstname.Value))
   replace username WITH thisform.txtUsername.Value
   replace password WITH thisform.txtPassword.Value
   replace pixpath WITH thisform.txtPixpath.value
   
  endif
 else && update record
       if Messagebox("Are you sure to update existing record?",32+4,"Confirmation") = 6
       replace id WITH thisform.txtId.Value
     replace lastname WITH UPPER(ALLTRIM(thisform.txtLastname.value))
    replace firstname WITH UPPER(ALLTRIM(thisform.txtFirstname.Value))
    replace username WITH thisform.txtUsername.Value
  replace password WITH thisform.txtPassword.Value
  replace pixpath WITH thisform.txtPixpath.value && overwrite existing record
     endif
  endif

  thisform.grdUsers.refresh


 Delete Button
============
Object: Command4   Procedure: Click

 select users
SET DELETED on
locate for id = thisform.txtId.value
if found()
   
   if Messagebox("Are you sure to delete this record?",32+4,"Confirmation") = 6
   delete
  endif
 ENDIF
 thisform.txtId.value=0
 thisform.txtUsername.value=""
 thisform.txtPassword.value=""
 thisform.txtLastname.value=""
  thisform.txtFirstname.value=""
  thisform.txtPixpath.value=""
  thisform.txtId.setfocus

  thisform.refresh
  thisform.grdusers.refresh
  
 Close Button
============
Object: Command5   Procedure: Click

thisform.Release
DO FORM password 

PixPath Button
==============
Object: Command1   Procedure: Click

thisform.txtPixpath.value = GETPICT()
thisform.txtPixpath.Refresh

menu.scx
========
Object: Form1     Procedure: Init

SELECT users
fullname = TRIM(firstname) + "   " + TRIM(lastname)
thisform.label1.Caption = "Welcome " +fullname
thisform.image1.Picture=TRIM(pixpath)
thisform.image1.Visible= .T.

Close Button
===========
Object: Command1   Procedure: Click

thisform.Release
thisform.hide
DO FORM password








Login System with User Name With Pictures in Microsoft Visual Foxpro

A login program that I wrote that will allow the user to login and if the user is a registered it will display the username and its pictures. The code is very easy to understand and use that I wrote using Microsoft Visual Foxpro 9.

I am currently accepting programming and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental is (034) 4335675.





Table Structure and Sample Records










Sample Program Output


Program Listing

Password Form

Object: Form1    Procedure: Init
=====================================

 thisform.text2.value =0
 thisform.text2.Visible= .F.
 thisform.txtPassword.PasswordChar = "*"
 thisform.txtusername.SetFocus

 
 Ok Button
 
 Object: Command1 Procedure: Click
 ========================================

SET DEFAULT TO d:\vfp\password\
 
SELECT users

LOCATE FOR ALLTRIM(LOWER(username)) == ALLTRIM(LOWER(thisform.txtusername.value)) AND ALLTRIM(LOWER(password)) =  ALLTRIM(LOWER(thisform.txtpassword.Value)) 
        
         IF FOUND() then
            DO form menu 
             thisform.Release
             thisform.Hide
             RETURN .t.
         endif

if thisform.text2.Value <3 then
thisform.text2.Value =  thisform.text2.Value +1
thisform.txtusername.Value=""
thisform.txtpassword.Value =""
thisform.txtusername.SetFocus
thisform.label1.caption ="User login attempt number " + TRANSFORM(thisform.text2.value) + "."
endif
IF thisform.text2.Value = 3 then
  MESSAGEBOX("Please contact your programmer to solve this problem")
  thisform.txtusername.Enabled= .F.
  thisform.txtpassword.Enabled= .F.
  thisform.command1.Enabled= .F.
  ENDIF
  
  
  Cancel Button
 
 Object: Command2 Procedure: Click
 ========================================
 
 
thisform.Release


Menu Form

Object: Form1  Procedure: Init


SELECT users
fullname = TRIM(firstname) + "   " + TRIM(lastname)
thisform.label1.Caption = "Welcome " +fullname
thisform.image1.Picture=TRIM(pixpath)
thisform.image1.Visible= .T.

Close Button

Object: Command1 Procedure: Click
=========================================
 
thisform.Release
thisform.hide
DO FORM password



DOWNLOAD SOURCE CODE HERE

Tuesday, February 20, 2018

String Palindrome Checker in Visual Foxpro


A very simple program that I wrote using Microsoft Visual Foxpro 9 that will ask the user to give a word and a string and then our program will check if the given word or string is a Palindrome or Not a Palindrome. I provided also a an error checking code if the textbox if empty.

I am currently accepting programming and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental is (034) 4335675.






Sample Program Output


Program Listing


Object:  Form1      Procedure: Init
 ===================================

thisform.text1.Value=""

Check Button

Object:  Command1      Procedure: Click
 ===================================

&& Palindrome Program in Visual Foxpro
&& Written By Mr. Jake R. Pomperada, MAED-IT
&& February 20, 2018    Tuesday  

LOCAL StrOriginal, StrReverse
StrOriginal=allTRIM(UPPER(thisform.text1.value))
StrReverse=""
FOR StrCount=LEN(StrOriginal) TO 1 STEP -1
 StrReverse=ALLTRIM(UPPER(StrReverse))+SUBSTR(StrOriginal,StrCount,1)
ENDFOR 


IF EMPTY(thisform.text1.Value) then
    MESSAGEBOX("Can't be empty.",64,"Reminder")
    thisform.text1.SetFocus
    RETURN .t.
    endif

IF (StrReverse == StrOriginal) then
   thisform.label1.Caption = "The given word " + ALLTRIM(UPPER(TRANSFORM(thisform.text1.Value))) + " is a Palindrome."
   ELSE
   thisform.label1.Caption = "The given word " + ALLTRIM(UPPER(TRANSFORM(thisform.text1.Value))) + " Not a Palindrome."
 ENDIF


 Clear Button

  Object:  Command2      Procedure: Click
 ===================================

WITH thisform
     .text1.value=""
     .label1.caption=""
     .text1.setfocus
endwith


Quit Button

 Object:  Command3      Procedure: Click
 ===================================

thisform.Release






Database Driven Login System with Username Display in Microsoft Visual Foxrpo

This is a database drive login system with username display that I wrote using Microsoft Visual Foxpro. Writing this program is much easier company to other programming language that I used before maybe because Microsoft Visual Foxpro was designed to be database centered language. You can write a complete database application with only a few codes.

I am currently accepting programming and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental is (034) 4335675.





Table Structure and Sample Records










Sample Program Output


Program Listing


Password Form

Object: Form1   Procedure: Init
=====================================

 thisform.text2.value =0
 thisform.text2.Visible= .F.
 thisform.txtPassword.PasswordChar = "*"
 thisform.txtusername.SetFocus

 
 Ok Button
 
 Object: Command1 Procedure: Click
 ========================================
 
SELECT users

LOCATE FOR ALLTRIM(LOWER(username)) == ALLTRIM(LOWER(thisform.txtusername.value)) AND ALLTRIM(LOWER(password)) =  ALLTRIM(LOWER(thisform.txtpassword.Value)) 
       
        IF FOUND() then
           DO form menu 
            thisform.Release
            thisform.Hide
            RETURN .t.
        endif

if thisform.text2.Value <3 then
thisform.text2.Value = thisform.text2.Value +1
thisform.txtusername.Value=""
thisform.txtpassword.Value =""
thisform.txtusername.SetFocus
thisform.label1.caption ="User login attempt number " + TRANSFORM(thisform.text2.value) + "."
endif
IF thisform.text2.Value = 3 then
  MESSAGEBOX("Please contact your programmer to solve this problem")
  thisform.txtusername.Enabled= .F.
  thisform.txtpassword.Enabled= .F.
  thisform.command1.Enabled= .F.
  ENDIF
  
  
  Cancel Button
 
 Object: Command2 Procedure: Click
 ========================================
 
 
thisform.Release


Menu Form

Object: Form1 Procedure: Init

SELECT users

fullname = TRIM(firstname) + "   " + TRIM(lastname)
thisform.label1.Caption = "Welcome " +fullname

Close Button

Object: Command1 Procedure: Click
=========================================
 
thisform.Release
thisform.hide
DO FORM password




Login Security System with Three Attempts in Microsoft Visual Foxpro

In this article I would like to share with you a sample application that I wrote in Microsoft Visual Foxpro 9 it is not yet database driven for this example but shows you how to create a login security to protect your application from intruders. I hope you will find my work useful.  Thank you.

I am currently accepting programming and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental is (034) 4335675.







Sample Program Output


Program Listing


Object : Form1           Procedure: Init
=========================================

 thisform.text2.value =0
 thisform.text2.Visible= .F.
 thisform.txtPassword.PasswordChar = "*"
 thisform.txtusername.SetFocus
  
  
  Object: Command1 Procedure: Click
  ========================================
  
  if thisform.txtpassword.value = "123" AND thisform.txtusername.Value="123" then
MESSAGEBOX("Password Accepted")
RETURN .t.
endif


if thisform.text2.Value <3 then
thisform.text2.Value = thisform.text2.Value +1
thisform.txtusername.Value=""
thisform.txtpassword.Value =""
thisform.txtusername.SetFocus
thisform.label1.caption ="User login attempt number " + TRANSFORM(thisform.text2.value) + "."
endif
IF thisform.text2.Value = 3 then
  MESSAGEBOX("Please contact your programmer to solve this problem")
  thisform.txtusername.Enabled= .F.
  thisform.txtpassword.Enabled= .F.
  thisform.command1.Enabled= .F.
  ENDIF
  
  
  Object : Command2             Procedure: Click
  ==============================================
  
  thisform.release