X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;ds=sidebyside;f=wwwroot%2Finc%2Fubik.inc;h=15f4d9d24c62f7d6e195f6080fae64b372462434;hb=383a2aea722ad94ce250425b5176909c9b51dae5;hp=edb1b4c06e4c8eda07b47b89d7397f1464818ebb;hpb=51ff32267c4949bad6a8dddc502cbc01ed56edc8;p=mirrors%2FKyberia-bloodline.git
diff --git a/wwwroot/inc/ubik.inc b/wwwroot/inc/ubik.inc
index edb1b4c..15f4d9d 100644
--- a/wwwroot/inc/ubik.inc
+++ b/wwwroot/inc/ubik.inc
@@ -9,9 +9,9 @@ class ubik {
global $db;
$user_info=$_POST['user_info'];
$login=$_POST['login'];
- $user_www=$_POST['user_www'];
+// $user_www=$_POST['user_www'];
$email=$_POST['email'];
- $icq=$_POST['user_icq'];
+// $icq=$_POST['user_icq'];
$text=nodes::processContent($user_info)."
";
$node_name="user $login registration";
@@ -30,12 +30,13 @@ class ubik {
else return false;
if (!empty($params['mail_text'])) $mail_text=addslashes($params['mail_text']);
else return false;
- $q="insert into mail set mail_from='".UBIK_ID."',mail_to='$mail_to',mail_user='$mail_to',mail_timestamp=NOW(),mail_text='$mail_text'";
- $db->query($q);
- $db->query("update users set
-user_mail_name='ubik',user_mail_id=".UBIK_ID.",user_mail=user_mail+1 where
-user_id='$mail_to'");
+
+ $q_i = sprintf('insert into mail set mail_user = %2$d, mail_from = %1$d, mail_to = %2$d, mail_timestamp = NOW(), mail_text = "%3$s"'
+ ,UBIK_ID, $mail_to, $mail_text);
+ $db->update($q_i);
+ $q_u = sprintf('update users set user_mail = user_mail + 1, user_mail_id = %1$d where user_id = %2$d', UBIK_ID, $mail_to);
+ $db->update($q_u);
}
}