function searchDoc1(str,str1)
{
if (str=="")
{
document.getElementById("list").innerHTML="";
return;
}
if (str1=="")
{
document.getElementById("list").innerHTML="";
return;
}
if (window.XMLHttpRequest)
{
xmlhttp=new XMLHttpRequest();
}
else
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
//alert(xmlhttp.responseText);
document.getElementById("list").innerHTML=xmlhttp.responseText;
}
else if(xmlhttp.readyState==3)//waiting Module
{
document.getElementById("list").innerHTML = "waiting";// or "using the image tag to display image"
}
}
var url1="list_out.php"
url=url1+"?q1="+str+"&q2="+str1
xmlhttp.open("GET",url,true);
xmlhttp.send();
}
Friday, 15 July 2011
Wednesday, 13 July 2011
INNER JOIN in MYSQL
SELECT * FROM shipping_name as sn INNER JOIN region_shipping as rs ON (rs.ship_id=sn.id) where rs.reg1!='' and rs.reg_1!='' or rs.reg2!='' and rs.reg_2!='' or rs.reg3!='' and rs.reg_3!='' or rs.reg4!='' and rs.reg_4!='' or rs.reg5!='' and rs.reg_5!='' or rs.reg6!='' and rs.reg_6!='' and sn.ship_price!=''
Tuesday, 5 July 2011
bb-press customize login module
if ( !function_exists('bb_check_login') ) :
function bb_check_login($user, $pass, $already_md5 = false) {
global $wp_users_object;
if ( !bb_get_option( 'email_login' ) || false === strpos( $user, '@' ) )
{ // user_login
$user = $wp_users_object->get_user( $user, array( 'by' => 'login' ) );
} else { // maybe an email
echo $email_user = $wp_users_object->get_user( $user, array( 'by' => 'email' ) );
echo "
".$user = $wp_users_object->get_user( $user, array( 'by' => 'login' ) );
// 9 cases. each can be FALSE, USER, or WP_ERROR
if (
( !$email_user && $user ) // FALSE && USER, FALSE && WP_ERROR
||
( is_wp_error( $email_user ) && $user && !is_wp_error( $user ) ) // WP_ERROR && USER
) {
// nope: it really was a user_login
// [sic]: use $user
} elseif (
( $email_user && !$user ) // USER && FALSE, WP_ERROR && FALSE
||
( $email_user && !is_wp_error( $email_user ) && is_wp_error( $user ) ) // USER && WP_ERROR
) {
// yup: it was an email
$user =& $email_user;
} elseif ( !$email_user && !$user ) { // FALSE && FALSE
// Doesn't matter what it was: neither worked
return false;
} elseif ( is_wp_error( $email_user ) && is_wp_error( $user ) ) { // WP_ERROR && WP_ERROR
// This can't happen. If it does, let's use the email error. It's probably "multiple matches", so maybe logging in with a username will work
$user =& $email_user;
} elseif ( $email_user && $user ) { // USER && USER
// both are user objects
if ( $email_user->ID == $user->ID ); // [sic]: they are the same, use $user
elseif ( bb_check_password($pass, $user->user_pass, $user->ID) ); // [sic]: use $user
elseif ( bb_check_password($pass, $email_user->user_pass, $email_user->ID) )
$user =& $email_user;
} else { // This can't happen, that's all 9 cases.
// [sic]: use $user
}
}
if ( !$user )
return false;
if ( is_wp_error($user) )
return $user;
if ( !bb_check_password($pass, $user->user_pass, $user->ID) )
return false;
// User is logging in for the first time, update their user_status to normal
function bb_check_login($user, $pass, $already_md5 = false) {
global $wp_users_object;
if ( !bb_get_option( 'email_login' ) || false === strpos( $user, '@' ) )
{ // user_login
$user = $wp_users_object->get_user( $user, array( 'by' => 'login' ) );
} else { // maybe an email
echo $email_user = $wp_users_object->get_user( $user, array( 'by' => 'email' ) );
echo "
".$user = $wp_users_object->get_user( $user, array( 'by' => 'login' ) );
// 9 cases. each can be FALSE, USER, or WP_ERROR
if (
( !$email_user && $user ) // FALSE && USER, FALSE && WP_ERROR
||
( is_wp_error( $email_user ) && $user && !is_wp_error( $user ) ) // WP_ERROR && USER
) {
// nope: it really was a user_login
// [sic]: use $user
} elseif (
( $email_user && !$user ) // USER && FALSE, WP_ERROR && FALSE
||
( $email_user && !is_wp_error( $email_user ) && is_wp_error( $user ) ) // USER && WP_ERROR
) {
// yup: it was an email
$user =& $email_user;
} elseif ( !$email_user && !$user ) { // FALSE && FALSE
// Doesn't matter what it was: neither worked
return false;
} elseif ( is_wp_error( $email_user ) && is_wp_error( $user ) ) { // WP_ERROR && WP_ERROR
// This can't happen. If it does, let's use the email error. It's probably "multiple matches", so maybe logging in with a username will work
$user =& $email_user;
} elseif ( $email_user && $user ) { // USER && USER
// both are user objects
if ( $email_user->ID == $user->ID ); // [sic]: they are the same, use $user
elseif ( bb_check_password($pass, $user->user_pass, $user->ID) ); // [sic]: use $user
elseif ( bb_check_password($pass, $email_user->user_pass, $email_user->ID) )
$user =& $email_user;
} else { // This can't happen, that's all 9 cases.
// [sic]: use $user
}
}
if ( !$user )
return false;
if ( is_wp_error($user) )
return $user;
if ( !bb_check_password($pass, $user->user_pass, $user->ID) )
return false;
// User is logging in for the first time, update their user_status to normal
Friday, 11 March 2011
Sunday, 6 February 2011
Micosoft Tech Vista 2011
This is good experience for me and I know about the new technologies of the Microsoft.
Saturday, 4 September 2010
ITLAND CLUB
I establish the Club of IT it's called ITLAND. for the interested IT people...........
for new events for the IT
for new events for the IT
Thursday, 12 August 2010
Preparation of MSP selection
I am going to my dreams way.....because I was study in 12th then my dream of join Microsoft.............
Subscribe to:
Posts (Atom)