"phplib_Session")); do{ if (isset($okey_x)){ // Is there data to process? $db = connect_to_db(); if (!$db){ $errors[]="can't connect to sql server"; break;} if ($sess->is_registered('auth')) $sess->unregister('auth'); if ($config->clear_text_pw) { $q="select phplib_id from ". $config->table_subscriber. " where username='$uname' and password='$passw' and domain='$config->realm'"; } else { $ha1=md5($uname.":".$config->realm.":".$passw); $q="select phplib_id from ". $config->table_subscriber. " where username='$uname' and domain='$config->realm' and ha1='$ha1'"; } $res=mySQL_query($q); if (!$res) {$errors[]="error in SQL query, line: ".__LINE__; break;} if (!MySQL_Num_Rows($res)) {$errors[]="Bad username or password"; break;} $row=MySQL_Fetch_Object($res); $sess->register('pre_uid'); $pre_uid=$row->phplib_id; Header("Location: ".$sess->url("my_account.php?kvrk=".uniqID(""))); page_close(); exit; } }while (false); $f = new form; // create a form object $f->add_element(array("type"=>"text", "name"=>"uname", "size"=>20, "maxlength"=>50, "value"=>"", "minlength"=>1, "length_e"=>"you must fill username", "extrahtml"=>"autocomplete='off' style='width:250px;'")); $f->add_element(array("type"=>"text", "name"=>"passw", "value"=>"", "size"=>20, "maxlength"=>25, "pass"=>1, "extrahtml"=>"style='width:250px;'")); $f->add_element(array("type"=>"submit", "name"=>"okey", "src"=>$config->img_src_path."butons/b_login.gif", "extrahtml"=>"alt='login'")); if ($okey_x){ //data isn't valid or error in sql $passw=""; $f->load_defaults(); // Load form with submitted data } ?> <?echo $config->title;?> "; print_errors($errors); // Display error print_message($message); ?>

realm;?> Userlogin

Please enter your sip number and password :
start("form"); // Start displaying form?>
Sip Number: show_element("uname");?>
Password: show_element("passw");?>
  show_element("okey");?>

">Forgot Password?     
spacer
spacer


finish(); // Finish form?>