mino code cleanup, moved rss to trash (to rewrite)
[mirrors/Kyberia-bloodline.git] / wwwroot / inc / ubik.inc
CommitLineData
51ff3226 1<?php
51ff3226 2class ubik {
3
b3399798 4function ubikRegister() {
51ff3226 5
b3399798 6 global $db;
7 $user_info=$_POST['user_info'];
8 $login=$_POST['login'];
9// $user_www=$_POST['user_www'];
10 $email=$_POST['email'];
11// $icq=$_POST['user_icq'];
51ff3226 12
b3399798 13 $text=nodes::processContent($user_info)."<br><br>";
14 $node_name="user $login registration";
51ff3226 15
b3399798 16 $params['node_creator']=UBIK_ID;
17 $params['node_content']=$text;
18 $params['node_name']=$node_name;
19 $params['node_parent']=63802;
20 return nodes::addNode($params);
51ff3226 21
b3399798 22}
51ff3226 23
b3399798 24function ubikMail($params) {
25 global $db;
26 if (is_numeric($params['mail_to'])) $mail_to=$params['mail_to'];
27 else return false;
28 if (!empty($params['mail_text'])) $mail_text=addslashes($params['mail_text']);
29 else return false;
51ff3226 30
9a7d7230 31
32 $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"'
33 ,UBIK_ID, $mail_to, $mail_text);
34 $db->update($q_i);
35 $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);
36 $db->update($q_u);
51ff3226 37}
38
b3399798 39}
This page took 0.246633 seconds and 4 git commands to generate.