Monday, 26 May 2014

Php Wordpress create table if not exists

We can create table for mysql through query for php and wordpress

as

just for simple php we can write code to create the table in mysql as

       $sql = "CREATE TABLE IF NOT EXISTS `social` (
       `id` int(11) unsigned NOT NULL auto_increment,
       `userid` int(11) NOT NULL default '0',
       `type` varchar(500) NOT NULL default '',
       PRIMARY KEY  (`id`)
       ) ENGINE=MyISAM  DEFAULT CHARSET=utf8";
    
mysql_query($sql);



through this lines of code we can create the DATABASE table


and for wordpress we will add the two line more as 

       $sql = "CREATE TABLE IF NOT EXISTS `social` (
       `id` int(11) unsigned NOT NULL auto_increment,
       `userid` int(11) NOT NULL default '0',
       `type` varchar(500) NOT NULL default '',
       PRIMARY KEY  (`id`)
       ) ENGINE=MyISAM  DEFAULT CHARSET=utf8";
    
         require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );                        
        dbDelta( $sql);


Tuesday, 20 May 2014

Html css Psecudo Class

:first-child Selector

We can use the style for first of every div paragraph or anything else.

For it we can use the selector :first-child

like for paragraphs <p>

and we want to make the first paragraph with red color 

we can make it as in css

p:first-child{ color: red; }

this property will make the first line of every paragraph will show in red color 


Here is the example .





<!DOCTYPE html>
<html>
<head>
<style>
p:first-child
{
background-color:red;
}
</style>
</head>
<body>

<p>This paragraph is the first child of its parent (body).</p>

<h1>Welcome world</h1>
<p>This paragraph is not the first child of its parent.</p>

<div>
<p>This paragraph is the first child of its parent (div).</p>
<p>This paragraph is not the first child of its parent.</p>
</div>


</body>
</html>

After running the code you will see that the first paragraph and and first paragraph of every div is red 

Prime Minister Loan Update

It is hereby that Prime minister loans are in next step.

Now the banks are given order to give loan to them who's names were in first lucky draw.

Now the second lucky draw will held on 31 of May.

Lets see who will be the lucky in coming lucky draw on 31May  .

Tuesday, 31 December 2013

scam mails

Be aware mails like such are scam


Dear Sir,

Thanks for your response regarding my intention to invest in your country. 
As i said earlier that i have interest to invest in your country and i strongly
need a trusted partner that will assist me to monitor and complete the investment. 
I intend to raise the capital fund through the claim of a pending contract fund 
payment as expalined below:

I am Mr. Franklin Olive, Group Managing Director (GMD) / Chairman Debt
Reconciliation Committee Hong Kong Highways Department(HKHD); I got
your contact from on LinkedIn after due consideration believing you are 
highly respected personality. Although, I do not know to what extent 
you are familiar with events, hence I contact you.

Firstly, I must solicit your strictest confidence in this transaction;
this is by virtue of its nature as being utterly confidential and “TOP
SECRET” with great magnitude involving a pending transaction requiring
maximum confidence, I am sure and have confidence of your ability and
reliability to prosecute this magnificent transaction. The new
government has principally mandated me to review and offset all
contractors’ outstanding overdue payments on contracts awarded since
May 1998 to June 2009, under the regimes of the former Heads Of
State.

Respectively, In May 2001, a contract worth USD$285,000,000.00 ( Two
Hundred & Eighty-Five Million United States Dollars Only) was awarded
to a foreign company by Hong Kong Highways Department (HKHD) for
Maintenance of Highway Structures in Hong Kong Island, Kowloon and New
Territories 2002-2005. I deliberately over-invoiced the contract with
USD$35,000,000.00 (Thirty Five Million United States Dollars Only).
Actually the company that executed the contracts has been fully paid
and the projects were officially commissioned.

Therefore, due to epigrammatic decision to redefine the outstanding
payment I am presenting you as the beneficiary who will present
original invoice to re-apply and to substitute the foreign company
which upon its presentation to Central Bank of Hong Kong (CBHK) your
designated bank account will be credited unconditionally. On receipt
of your immediate response, we shall discuss the compulsory
modalities. I have all necessary documents / approvals to secure the
transfer in your favour.

Note as a mandatory, I wish to make the clarifications as follows:
That you will be entitled to share 25% of the total funds. The
officials 70% while 5% will be set aside to incure any local and
foreign incidental expenses. I consequently request your maximum
assistance and approvals to facilitate the transfer of the above funds
from Central Bank of Hong Kong (CBHK), where these funds are
deposited. upon confirmation of your readiness to execute this
magnificent transaction with me, you will be urgently required to
furnish your companies letter headed paper signed & stamped, private
telephone & fax numbers, bank name and address, your corporate bank
account Number.

 In conclusion, I guarantee that this operation will be executed under
a legitimate arrangement that will protect us from any breach of law.

Please take note; I’m outside Hong Kong presently due to urgent
international conference in London and i want to ensure that all the
necessary preparation is done while i am away from my country. i want
you to immediately indicate your interest to me so that i can get in
touch with you while  i am in London and get the necessary information
to get the fund transferred to you. Once the money is transferred,i will 
then invest in a lucrative business in your country which you will advice 
and oversee,we can as well invest together as partners,so please get 
back to me immediately for further details in regards to this proposal.

Please include the following contact information;
1. FULL NAME AND ADDRESS
2. COMPANY NAME
3. OCCUPATION
4. AGE/TELEPHONE AND FAX NUMBERS.
5. BANKING DETAILS



Our users are receiving the mail such like this 
so don't share any things


Sunday, 22 December 2013

Wordress Adding Secondary Menu

In my recent project i have to create the second level menu
it will be pleasure for me to share with you.

Creating custom menu

For custom menu we will have to create the function
For it first of all we will have to declare or register the custom menu in the function.php
There are steps to create custom menu in wordpress

1. creating the function for register the menu
that function will be created in function.php
that is in theme directory

and will write function such as
first of all we will initialize function as below

add_action( 'init', 'joyrelish_menus' );
      function joyrelish_menus() {
         register_nav_menus(
            array(
      'primary-menu' => __( 'Primary Menu' ),
      'secondary-menu' => __( 'Secondary Menu' )
                    )
             );
      }


Now for it you can see the secondary menu in WordPress through wp-admin
go to appearance->menu 

you will see the secondary menu with the primary menu
Through selected the secondary menu 
create the new menu 
select he page post or something else for he menu 

then you can see or call that secondary navigation through the code 
in the header.php or the file in which you are going to call that secondary menu
 add below code to show the secondary menu

<?php wp_nav_menu( array( 'theme_location' => 'secondary-menu', 'menu_class' => 'secondary_menu_joyrelish'') ); ?>

Then will see the secondary menu ..



















Friday, 20 December 2013

Making Love

NO IS MORE THAN THE LOVE

The lover can leave the world for their love
The forgotten the world but will meet to each other 
The lovers can do everything for them self 














+getfit

Song