Location: PHPKode > projects > GuanxiCRM Business Solution > include/Auth/sql.inc
<?php
/* $Id: sql.inc,v 1.12 2003/01/24 14:26:18 k-fish Exp $ */

function authentify_user($user, $pass, $encrypted_pwd=''){
    global $conn;

    if ($encrypted_pwd == '') $encrypted_pwd = md5($pass);

    $sql = "SELECT id FROM mgw_users WHERE username=".$conn->qstr($user,get_magic_quotes_gpc())." AND pw='".$encrypted_pwd."'";
    if(!$res = $conn->Execute($sql)) exit(showSQLerror($sql, $conn->ErrorMsg(), __LINE__, __FILE__));

    return $res->NumRows();
}
?>
Return current item: GuanxiCRM Business Solution