zuzupus
07-02-2003, 03:16 AM
Hi,
i createdd user list on left frame as tree let say
tree right frame there is form
didi |
vidi |
fifi |
<?
$id += 0;
$r = once_query("SELECT * FROM t_user WHERE sys_pk = $id");
?>
<form action=user.php>
<input name="name" type="text" size="21" value="<?=htmlentities($r->name) ?>" >
<input name="password" type="text" size="21" value="<?=htmlentities($r->password) ?>" >
<input type="button" class="biggray1" value=" Cancel" name="cancel">
</form>
when i clcik on user list tree let say didi on right frame the above form will open with name=didi and pwd=didi
and when i click on this cancel the name didi must remove from tree(user) but when user clciks ont hsi button it always show some alert stating that whether he wants to cancel or not.
in user.php i wrote for insertion but how to use for delete i dont no
$id += 0;
if ($id <= 0) { // creating new user
if ($username && $password) { // check if username and password are set
query_db_trad("INSERT INTO t_user (sys_del, sys_state, sys_dlm, sys_klm, sys_doc, sys_koc, user, password, admin, name, logo_path, logo_width, logo_height, intern, radmin) VALUES ('f', 0, NOW(), 0, NOW(), 0, ".
"'".addslashes($username)."', ".
"'".addslashes($password)."', ".
($admin ? "'t'" : "'f'").", ".
"'".addslashes($name)."', ".
"'".addslashes($logo)."', ".
($width+0).", ".
($height+0).", ".
($intern ? "'t'" : "'f'").", ".
($radmin ? "'t'" : "'f'").
")", 'yes');
}
}
if anybody help me out in this matter i will be very thankful
thanks in advance
i createdd user list on left frame as tree let say
tree right frame there is form
didi |
vidi |
fifi |
<?
$id += 0;
$r = once_query("SELECT * FROM t_user WHERE sys_pk = $id");
?>
<form action=user.php>
<input name="name" type="text" size="21" value="<?=htmlentities($r->name) ?>" >
<input name="password" type="text" size="21" value="<?=htmlentities($r->password) ?>" >
<input type="button" class="biggray1" value=" Cancel" name="cancel">
</form>
when i clcik on user list tree let say didi on right frame the above form will open with name=didi and pwd=didi
and when i click on this cancel the name didi must remove from tree(user) but when user clciks ont hsi button it always show some alert stating that whether he wants to cancel or not.
in user.php i wrote for insertion but how to use for delete i dont no
$id += 0;
if ($id <= 0) { // creating new user
if ($username && $password) { // check if username and password are set
query_db_trad("INSERT INTO t_user (sys_del, sys_state, sys_dlm, sys_klm, sys_doc, sys_koc, user, password, admin, name, logo_path, logo_width, logo_height, intern, radmin) VALUES ('f', 0, NOW(), 0, NOW(), 0, ".
"'".addslashes($username)."', ".
"'".addslashes($password)."', ".
($admin ? "'t'" : "'f'").", ".
"'".addslashes($name)."', ".
"'".addslashes($logo)."', ".
($width+0).", ".
($height+0).", ".
($intern ? "'t'" : "'f'").", ".
($radmin ? "'t'" : "'f'").
")", 'yes');
}
}
if anybody help me out in this matter i will be very thankful
thanks in advance