Showing posts with label Android Development. Show all posts
Showing posts with label Android Development. Show all posts

Sunday, 19 January 2014

Android Local SQLite Database Example

Android platform includes the SQLite embedded database and provides out of the box support to use it via Android APIs. In this tutorial we shall see how to get started with SQLitedatabase in Android. SQLiteis nothing but a relational database and our SQLskills will help.

How to Use SQLite with Android?

To use SQLite in Android, a java class should be created as a sub class of SQLiteOpenHelper. This class will act as a database controller which will have the methods to perform the CRUD operations. This custom java class should override the methods named onCreate()and .onUpgrade()

onCreate() method will be called for the first time when the Android application is run. First the database instance should be created using the method like getReadableDatabase() or getWritableDatabase() based on the type of access required. Android supports this method by providing in-built methods. For that, SQLiteQueryBuilder class should be imported.

Lets have three Android Activity for List, Add and Edit operations and ensure that these are declared in manifest file. And then we need to create subclass of SQLiteHelper to manage SQLite database.
Database & Table Structure :
+------------+------------+------------------------------+---+--------+--+
| Field Name |  Field Type                   | Sample                    |
+------------+------------+------------------------------+---+--------+--+
| ID         |  PRIMARY KEY [Auto Generated] |  1                        |
| Name       |  TEXT                         | Chintan Khetiya           |
| Number     |  TEXT                         | 787-806-0124              |
| Email      |  TEXT                         | khetiya.chintan@gmail.com |
+------------+------------+------------------------------+---+--------+--+
Create or Setup Database
DatabaseHandler.java is going to be our custom java class that will manage the SQLite database. We should extend SQLiteOpenHelper and override the essential methods. The constructor is the hook that will be used to setup the database. While running the Android application, the database will be created for the first time.
public DatabaseHandler(Context applicationcontext) {
super(applicationcontext, "androidsqlite.db", null, 1);
Log.d(LOGCAT,"Created");
}

Table Creation and Upgrade

SQLiteOpenHelper provides callback methods and we should override it to get our job done. Those callback methods that we can override are onCreate(), onUpgrade(), onOpen() and onDowngrade(). And onCreate() and onUpgrade() are abstract methods and must be overridden.

onCreate(SQLiteDatabase database) – is the method which is called first time when the database is created and we need to use this method to create the tables and populate it as per the need.

@Override
public void onCreate(SQLiteDatabase db) {
String CREATE_CONTACTS_TABLE = "CREATE TABLE " + TABLE_CONTACTS + "("
+ KEY_ID + " INTEGER PRIMARY KEY," + KEY_NAME + " TEXT,"
+ KEY_PH_NO + " TEXT," + KEY_EMAIL + " TEXT" + ")";
db.execSQL(CREATE_CONTACTS_TABLE);
}

onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) – is the method called when upgrade is done. We can drop the database and reset if required.

// Upgrading database
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
// Drop older table if existed
db.execSQL("DROP TABLE IF EXISTS " + TABLE_CONTACTS);

// Create tables again
onCreate(db);
}

 

 
How it looks after all task ?

New
Add New user

Update
Update Record
Delete
Delete Record

View
View All

Note: The Contact details are fake or random

Do some Task : Insert, Read, Update and Delete
We shall have other user defined methods to handle the sql aobve operations. The <code>Contact table </code> will be created when the onCreate() method is invoked while installing the application. For performing operations like insert, update, the SQLiteDatabase instance should be created using the methods like getReadableDatabase() or getWritableDatabase(). ContentValues() are used to pass values to the query.

Insert Records :
// Adding new contact
public void Add_Contact(Contact contact) {
SQLiteDatabase db = this.getWritableDatabase();
ContentValues values = new ContentValues();
values.put(KEY_NAME, contact.getName()); // Contact Name
values.put(KEY_PH_NO, contact.getPhoneNumber()); // Contact Phone
values.put(KEY_EMAIL, contact.getEmail()); // Contact Email
// Inserting Row
db.insert(TABLE_CONTACTS, null, values);
db.close(); // Closing database connection
}
Read Records  :
// Getting single contact
Contact Get_Contact(int id) {
SQLiteDatabase db = this.getReadableDatabase();

Cursor cursor = db.query(TABLE_CONTACTS, new String[] { KEY_ID,
KEY_NAME, KEY_PH_NO, KEY_EMAIL }, KEY_ID + "=?",
new String[] { String.valueOf(id) }, null, null, null, null);
if (cursor != null)
cursor.moveToFirst();

Contact contact = new Contact(Integer.parseInt(cursor.getString(0)),
cursor.getString(1), cursor.getString(2), cursor.getString(3));
// return contact
cursor.close();
db.close();

return contact;
}
 
Update Records :
// Updating single contact
public int Update_Contact(Contact contact) {
SQLiteDatabase db = this.getWritableDatabase();

ContentValues values = new ContentValues();

values.put(KEY_NAME, contact.getName());
values.put(KEY_PH_NO, contact.getPhoneNumber());
values.put(KEY_EMAIL, contact.getEmail());

// updating row

return db.update(TABLE_CONTACTS, values, KEY_ID + " = ?",
new String[] { String.valueOf(contact.getID()) });

}
 
Delete Records :
// Deleting single contact
public void Delete_Contact(int id) {
SQLiteDatabase db = this.getWritableDatabase();
db.delete(TABLE_CONTACTS, KEY_ID + " = ?",
new String[] { String.valueOf(id) });
db.close();
}
 
 
Read All records
// Getting All Contacts
public ArrayList<Contact> Get_Contacts() {
try {
contact_list.clear();

// Select All Query
String selectQuery = "SELECT * FROM " + TABLE_CONTACTS;

SQLiteDatabase db = this.getWritableDatabase();
Cursor cursor = db.rawQuery(selectQuery, null);

// looping through all rows and adding to list
if (cursor.moveToFirst()) {
do {
Contact contact = new Contact();
contact.setID(Integer.parseInt(cursor.getString(0)));
contact.setName(cursor.getString(1));
contact.setPhoneNumber(cursor.getString(2));
contact.setEmail(cursor.getString(3));
// Adding contact to list
contact_list.add(contact);
} while (cursor.moveToNext());
}

// return contact list
cursor.close();
db.close();
return contact_list;
} catch (Exception e) {
// TODO: handle exception
Log.e("all_contact", "" + e);
}

return contact_list;
} 

DOWNLOAD SOURCE CODE

Simple SQLiteHelper example in android

DOWNLOAD : SQLiteHelper.jar


This jar has the following functions.

1. public SQLiteHelper(Context context, String dbname, CursorFactory factory, int version)
This constructor is used to initialize SQLiteOpenHelper class.

2. public void createTable(String table_name, String[] fields, String[] types)
This method is used to create table with fields. Total number of fields and types must be equal.

3. public ArrayList<HashMap<String, Object>> getFields(String table_name)
This method will return all fields with their types as ArrayList.

4. public String insertData(String table_name, String[] fields, String[] data)
This method used to insert record in our table. This will return a String as
Transaction successfully completed
if the transaction completed. Otherwise it will return exception.

5. public ArrayList<HashMap<String, Object>> getAllData(String table_name)
This method used to get all record from our table as arraylist.

6. public ArrayList<HashMap<String, Object>> getSelectedData(String table_name, String fields[], String[] WhereClolmn, String[] WhereClolmnType, String[] data)
This method will return selected data as ArrayList

7. public String UpdateData(String table_name, String[] fields, String[] data, String WHereClassField, String WhereClassFieldData)
This method used to update record in our table. This will return a String as
Transaction Successfully Updated
if the transaction completed. Otherwise it will return exception.

8. public String deleteRecords(String table_name, String field_name, String[] data)
This method used to delete record in our table. This will return a String as
Number of rows deleted


9. public void addFields(String table_name, String field_name, String type, String defaultValue)
This method used to add new field in our table

10. public String executeQuery(String query)
This method used to execute the dynamic query

Sample program using this jar

                                                         MainActivity.java

package com.example.myproject;

import com.example.dbhelper.SQLiteHelper;

import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase.CursorFactory;

public class MainActivity extends Activity {

 SQLiteHelper helper;
 Context context;
 String DBName;
 CursorFactory factory = null;
 int version = 1;

 @Override
 protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  context = this;
  DBName = "MyDBname";
  helper = new SQLiteHelper(context, DBName, factory, version);
  helper.createTable("MyFirstTable", new String[] { "id", "name" },
    new String[] { "INTEGER PRIMARY KEY AUTOINCREMENT", "TEXT" });
  System.out.println(helper.getFields("MyFirstTable"));
  System.out.println(helper.insertData("MyFirstTable",
    new String[] { "name" }, new String[] { "Gunaseelan" }));
  System.out.println(helper.getAllData("MyFirstTable"));
  System.out.println(helper.UpdateData("MyFirstTable",
    new String[] { "name" }, new String[] { "Guna" }, "name",
    "Gunaseelan"));
  System.out.println(helper.getAllData("MyFirstTable"));
  System.out.println(helper.deleteRecords("MyFirstTable", "name",
    new String[] { "Guna" }));
  System.out.println(helper.getAllData("MyFirstTable"));
 
  helper.addFields("MyFirstTable", "mark", "NUMBER", "");
 
  System.out.println(helper.insertData("MyFirstTable", new String[] {
    "name", "mark" }, new String[] { "Gunaseelan", "98" }));
  System.out.println(helper.getSelectedData("MyFirstTable", new String[] {
    "name", "mark" }, new String[] { "name", "mark" },
    new String[] { "Text", "Number" }, new String[] { "Gunaseelan",
      "98" }));
  System.out.println(helper.executeQuery("Select * from MyFirstTable"));
 }
}
 


                                                              Logcat output

[{Type=INTEGER, Filed=id}, {Type=TEXT, Filed=name}, {Type=NUMBER, Filed=mark}]
Transaction successfully completed
[{id=4, mark=, name=Gunaseelan}]
Transaction Successfully Updated
[{id=4, mark=, name=Guna}]
Number of rows deleted 1
Transaction successfully completed
[{mark=98, name=Gunaseelan}]


Wednesday, 15 January 2014

Zoom Image Demo In Android, Zoom Image Example with code in Android , MotionEvent, Matrix example in Android

1- Screen


 





https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5O9IO8M6qO2dgKMmRru-VvzFyWgjmN80R-GIXXrGQ4BymcPfY8oH4LnPqYus2obrCA1O739-SoYULn-R57duAvDYdhmDUjtKrx_RHaay27t00YlnKwPKk6PJJjHV7EQWreyrG_hInEOI/s1600/Screenshot_2013-05-22-11-31-56.png

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTeD4DZL6J8OX7S5YAD_6woMhWcOsX56V0tTVCIHwQI-o3DQSsLC4WNmpMUzzwlxaF7RQ0UwfZkjIBC5sostAP4MP2AbQZ_9fdA4OsH0Fh9oEH6GUJe0q3nL1FlxC6zE66QAFFR3eE3_A/s1600/Screenshot_2013-05-22-11-32-13.png



2-MainActivity

package com.kiran.zoomimage;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.graphics.Matrix;
import android.graphics.PointF;
import android.os.Bundle;
import android.util.FloatMath;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ImageView;

public class MainActivity extends Activity {
 ImageView imageDetail;
 Matrix matrix = new Matrix();
 Matrix savedMatrix = new Matrix();
 PointF startPoint = new PointF();
 PointF midPoint = new PointF();
 float oldDist = 1f;
 static final int NONE = 0;
 static final int DRAG = 1;
 static final int ZOOM = 2;
 int mode = NONE;

 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  imageDetail = (ImageView) findViewById(R.id.imageView1);
  /**
   * set on touch listner on image
   */
  imageDetail.setOnTouchListener(new View.OnTouchListener() {

   @Override
   public boolean onTouch(View v, MotionEvent event) {

    ImageView view = (ImageView) v;
    System.out.println("matrix=" + savedMatrix.toString());
    switch (event.getAction() & MotionEvent.ACTION_MASK) {
    case MotionEvent.ACTION_DOWN:

     savedMatrix.set(matrix);
     startPoint.set(event.getX(), event.getY());
     mode = DRAG;
     break;

    case MotionEvent.ACTION_POINTER_DOWN:

     oldDist = spacing(event);

     if (oldDist > 10f) {
      savedMatrix.set(matrix);
      midPoint(midPoint, event);
      mode = ZOOM;
     }
     break;

    case MotionEvent.ACTION_UP:

    case MotionEvent.ACTION_POINTER_UP:
     mode = NONE;

     break;

    case MotionEvent.ACTION_MOVE:
     if (mode == DRAG) {
      matrix.set(savedMatrix);
      matrix.postTranslate(event.getX() - startPoint.x,
        event.getY() - startPoint.y);
     } else if (mode == ZOOM) {
      float newDist = spacing(event);
      if (newDist > 10f) {
       matrix.set(savedMatrix);
       float scale = newDist / oldDist;
       matrix.postScale(scale, scale, midPoint.x, midPoint.y);
      }
     }
     break;

    }
    view.setImageMatrix(matrix);

    return true;
   }

   @SuppressLint("FloatMath")
   private float spacing(MotionEvent event) {
    float x = event.getX(0) - event.getX(1);
    float y = event.getY(0) - event.getY(1);
    return FloatMath.sqrt(x * x + y * y);
   }

   private void midPoint(PointF point, MotionEvent event) {
    float x = event.getX(0) + event.getX(1);
    float y = event.getY(0) + event.getY(1);
    point.set(x / 2, y / 2);
   }
  });

 }

}

3-activity_main

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:scaleType="matrix"
        android:src="@drawable/images" />

</RelativeLayout>

Tuesday, 14 January 2014

Android code to zoom an image in ImageView

 Java Code
-----------------------------------------------------------------------------------

package com.example.calender;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.graphics.Matrix;
import android.graphics.PointF;
import android.os.Bundle;
import android.util.FloatMath;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ImageView;

public class April extends Activity {
 ImageView imageDetail;
 Matrix matrix1 = new Matrix();
 Matrix savedMatrix = new Matrix();
 PointF startPoint = new PointF();
 PointF midPoint = new PointF();
 float oldDist = 1f;
 static final int NONE = 0;
 static final int DRAG = 1;
 static final int ZOOM = 2;
 int mode = NONE;

 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.april);
  imageDetail = (ImageView) findViewById(R.id.imageView1);
  /**
   * set on touch listner on image
   */
  imageDetail.setOnTouchListener(new View.OnTouchListener() {

   @Override
   public boolean onTouch(View v, MotionEvent event) {

    ImageView view = (ImageView) v;
    System.out.println("matrix=" + savedMatrix.toString());
    switch (event.getAction() & MotionEvent.ACTION_MASK) {
    case MotionEvent.ACTION_DOWN:

     savedMatrix.set(matrix1);
     startPoint.set(event.getX(), event.getY());
     mode = DRAG;
     break;

    case MotionEvent.ACTION_POINTER_DOWN:

     oldDist = spacing(event);

     if (oldDist > 10f) {
      savedMatrix.set(matrix1);
      midPoint(midPoint, event);
      mode = ZOOM;
     }
     break;

    case MotionEvent.ACTION_UP:

    case MotionEvent.ACTION_POINTER_UP:
     mode = NONE;

     break;

    case MotionEvent.ACTION_MOVE:
     if (mode == DRAG) {
      matrix1.set(savedMatrix);
      matrix1.postTranslate(event.getX() - startPoint.x,
        event.getY() - startPoint.y);
     } else if (mode == ZOOM) {
      float newDist = spacing(event);
      if (newDist > 10f) {
       matrix1.set(savedMatrix);
       float scale = newDist / oldDist;
       matrix1.postScale(scale, scale, midPoint.x, midPoint.y);
      }
     }
     break;

    }
    view.setImageMatrix(matrix1);

    return true;
   }

   @SuppressLint("FloatMath")
   private float spacing(MotionEvent event) {
    float x = event.getX(0) - event.getX(1);
    float y = event.getY(0) - event.getY(1);
    return FloatMath.sqrt(x * x + y * y);
   }

   private void midPoint(PointF point, MotionEvent event) {
    float x = event.getX(0) + event.getX(1);
    float y = event.getY(0) + event.getY(1);
    point.set(x / 2, y / 2);
   }
  });

 }

}

Thursday, 9 January 2014

Code to make a phone call in Android


Java code:

  Intent callIntent = new Intent(Intent.ACTION_CALL);
                                    callIntent.setData(Uri.parse("tel:0123456789"));
                                    startActivity(callIntent);




Add  Code to AndroidManifest.xml :

<uses-permission android:name="android.permission.CALL_PHONE" />

After the code :
 <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />

Android code to open a URL in Browser

 Intent intent = new Intent(Intent.ACTION_VIEW,
                                 Uri.parse("http://www.techwizardblog.blogspot.com"));
                                 startActivity(intent);

How to Create Option Menu In Android



We can create an Option Menu with following :

  1. Create a menu xml
  2. Register the menu in Activity
  3. Write code to Handle the Clicks on menu items

1: Create xml for menu


     Create a new folder named "menu" in res folder (if menu folder is not there in res folder)
     inside this  Menu folder create .xml    file

here I have created option.xml   xml for the option menu in  above  Image

           <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
   
     <item android:id="@+id/ChangeColor"
          android:icon="@drawable/setting"
          android:title="Settings"
          />
    <item android:id="@+id/phoneInformation"
          android:icon="@drawable/phone"
          android:title="My Phone Information" />
   
    <item android:id="@+id/callInfo"
          android:icon="@drawable/callinfo"
          android:title="In and Out Call Info" />

   
    <item android:id="@+id/email"
          android:icon="@drawable/mail"
          android:title="Mail to Developer" />
   
 </menu>

android:id
A resource ID that's unique to the item, which allows the application can recognize the item when the user selects it.
android:icon
An image  to use as the item's icon.
android:title
A tittle to show.


2: Register In Activity


Override onCreateOptionMenu   method and inflate the .xml (here options.xml) inside method

            @Override
                     public boolean onCreateOptionsMenu(Menu menu) {
                            MenuInflater inflater = getMenuInflater();
                            inflater.inflate(R.menu.options, menu);
                            return true;
                     }


3: Handle Click Events



When the user selects an item from the options menu (including action items in the action bar), the system calls your activity's onOptionsItemSelected() method. This method passes the MenuItem selected. You can identify the item by calling getItemId(), which returns the unique ID for the menu item (defined by the android:id attribute in the menu resource

 To Handle click events override  onOptionsItemSelected  method


                               @Override
                     public boolean onOptionsItemSelected(MenuItem item) {
                         // Handle item selection
                        
                      
                         switch (item.getItemId()) {
                             case R.id.ChangeColor:
                                                              // write code to execute when clicked on this option
                                                                return true;   


                             case R.id.phoneInformation:
                                                             // write code to execute when clicked on this option
                                                             return true;
                            
                              case R.id.callInfo:
                                                              // write code to execute when clicked on this option
                                                             return true;
                                
                             case R.id.email:
                                                            // write code to execute when clicked on this option
                                                              return true;
                                
                               default:
                                                   return super.onOptionsItemSelected(item);
                         }
                     }


                    

Option Menu Full Source Code


public classMainActivity extends Activity
{
            @Override
        public void onCreate(Bundle savedInstanceState)
        {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.main);
        }


       // Create Option Menu
     @Override
        public boolean onCreateOptionsMenu(Menu menu) 

        {
            MenuInflater inflater = getMenuInflater();
            inflater.inflate(R.menu.options, menu);
            return true;
        }


         // Handle click events
         @Override
          public boolean onOptionsItemSelected(MenuItem item) 

           {
                         // Handle item selection
                        
                      
                         switch (item.getItemId()) {
                             case R.id.ChangeColor:
                                                              // write code to execute when clicked on this option
                                                                return true;   


                             case R.id.phoneInformation:
                                                             // write code to execute when clicked on this option
                                                             return true;
                            
                              case R.id.callInfo:
                                                              // write code to execute when clicked on this option
                                                             return true;
                                
                             case R.id.email:
                                                            // write code to execute when clicked on this option
                                                              return true;
                                
                               default:
                                                   return super.onOptionsItemSelected(item);
                         }
                     }

}

Sending Email In Android



Intent i = new Intent(Intent.ACTION_SEND);
                                   i.setType("message/rfc822");
                                   i.putExtra(Intent.EXTRA_EMAIL  , new String[]{"gbss.mumbai@gmail.com"});
                                   i.putExtra(Intent.EXTRA_SUBJECT, "Inquiry");
                                   i.putExtra(Intent.EXTRA_TEXT   , "I will be glad if you respond on my email");
                                   try {
                                             startActivity(Intent.createChooser(i, "Sending mail..."));
                                          
                                     }
                                   finally {
                                      
                                            // Code to execute when unable to send Email
                                        }

Friday, 27 September 2013

Touch Counter Android App




  ----------------------------------------------------------------
                 XML CODE
 ----------------------------------------------------------------

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    >
<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Total is : 0"
    android:textSize="45dp"
    android:layout_gravity="center"
    android:gravity="center"
     android:id="@+id/tvDisplay"
    />


<Button
    android:layout_width="250dp"
    android:layout_height="wrap_content"
    android:id="@+id/bAdd"
    android:text="Add"
    android:layout_gravity="center"
    android:textSize="20dp"
    android:onClick="perfrom"
    />
<Button
    android:layout_width="250dp"
    android:layout_height="wrap_content"
    android:id="@+id/bSub"
    android:layout_gravity="center"
    android:text="Sub"
    android:textSize="20dp"
    android:onClick="perfrom"
    />
</LinearLayout>




  ----------------------------------------------------------------
              JAVA CODE
 ----------------------------------------------------------------



package com.example.newapp;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends Activity {
  
       int counter;
       Button add ,sub;
       TextView display;
       @Override
       protected void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.activity_main);
              counter=0;
              add = (Button) findViewById(R.id.bAdd);
              sub = (Button) findViewById(R.id.bSub);
              display = (TextView) findViewById(R.id.tvDisplay);
             
              add.setOnClickListener(new View.OnClickListener() {
                    
                     @Override
                     public void onClick(View v) {
                           // TODO Auto-generated method stub
                           counter++;
                           display.setText("Total : "+counter);
                     }
              });
             
        sub.setOnClickListener(new View.OnClickListener() {
                    
                     @Override
                     public void onClick(View v) {
                           // TODO Auto-generated method stub
                           counter--;
                           display.setText("Total : "+counter);
                     }
              });
       }

       @Override
       public boolean onCreateOptionsMenu(Menu menu) {
              // Inflate the menu; this adds items to the action bar if it is present.
              getMenuInflater().inflate(R.menu.main, menu);
              return true;
       }

}


  ----------------------------------------------------------------
OUTPUT
 ----------------------------------------------------------------



 



Total Pageviews

DjKiRu Initative. Powered by Blogger.