From b33997983c69368476a84a6eb0b755ef37fb3924 Mon Sep 17 00:00:00 2001 From: niekt0 Date: Mon, 26 Sep 2011 20:40:50 +0200 Subject: [PATCH] mino code cleanup, moved rss to trash (to rewrite) --- {wwwroot/inc => trash}/lastRSS.php | 2 +- {wwwroot/inc => trash}/mail_rss.inc | 0 trash/rssparse.php | 25 +++++++++++++++ wwwroot/inc/rssparse.php | 23 -------------- wwwroot/inc/transaction.inc | 2 +- wwwroot/inc/ubik.inc | 48 +++++++++++++---------------- 6 files changed, 49 insertions(+), 51 deletions(-) rename {wwwroot/inc => trash}/lastRSS.php (99%) rename {wwwroot/inc => trash}/mail_rss.inc (100%) create mode 100644 trash/rssparse.php delete mode 100644 wwwroot/inc/rssparse.php diff --git a/wwwroot/inc/lastRSS.php b/trash/lastRSS.php similarity index 99% rename from wwwroot/inc/lastRSS.php rename to trash/lastRSS.php index e797a8c..6fc3081 100644 --- a/wwwroot/inc/lastRSS.php +++ b/trash/lastRSS.php @@ -182,4 +182,4 @@ class lastRSS { } } -?> \ No newline at end of file +?> diff --git a/wwwroot/inc/mail_rss.inc b/trash/mail_rss.inc similarity index 100% rename from wwwroot/inc/mail_rss.inc rename to trash/mail_rss.inc diff --git a/trash/rssparse.php b/trash/rssparse.php new file mode 100644 index 0000000..03711cf --- /dev/null +++ b/trash/rssparse.php @@ -0,0 +1,25 @@ +cache_dir = './cache'; +#$rss->cache_time = 3600; // one hour +# +#// load some RSS file +#// XXX +#if ($rs = $rss->get('http://h-k.sk/scripts/google2rss.php?num=15&q=smallpox')) { +# +#print_r($rs); +#} +#else { +# die ('Error: RSS file not found...'); +#} + +?> + diff --git a/wwwroot/inc/rssparse.php b/wwwroot/inc/rssparse.php deleted file mode 100644 index 7af7df0..0000000 --- a/wwwroot/inc/rssparse.php +++ /dev/null @@ -1,23 +0,0 @@ -cache_dir = './cache'; -$rss->cache_time = 3600; // one hour - -// load some RSS file -// XXX -if ($rs = $rss->get('http://h-k.sk/scripts/google2rss.php?num=15&q=smallpox')) { - -print_r($rs); -} -else { - die ('Error: RSS file not found...'); -} - -?> - diff --git a/wwwroot/inc/transaction.inc b/wwwroot/inc/transaction.inc index 38754b9..c738e4e 100644 --- a/wwwroot/inc/transaction.inc +++ b/wwwroot/inc/transaction.inc @@ -13,4 +13,4 @@ if ($status>1) { elseif ($status) { Header("Location: /id/".$node['node_id']."/"); } -*/ +*/ \ No newline at end of file diff --git a/wwwroot/inc/ubik.inc b/wwwroot/inc/ubik.inc index 15f4d9d..37f3e7d 100644 --- a/wwwroot/inc/ubik.inc +++ b/wwwroot/inc/ubik.inc @@ -1,35 +1,32 @@
"; + $node_name="user $login registration"; - $text=nodes::processContent($user_info)."

"; - $node_name="user $login registration"; + $params['node_creator']=UBIK_ID; + $params['node_content']=$text; + $params['node_name']=$node_name; + $params['node_parent']=63802; + return nodes::addNode($params); - $params['node_creator']=UBIK_ID; - $params['node_content']=$text; - $params['node_name']=$node_name; - $params['node_parent']=63802; - return nodes::addNode($params); - - } +} - function ubikMail($params) { - global $db; - if (is_numeric($params['mail_to'])) $mail_to=$params['mail_to']; - else return false; - if (!empty($params['mail_text'])) $mail_text=addslashes($params['mail_text']); - else return false; +function ubikMail($params) { + global $db; + if (is_numeric($params['mail_to'])) $mail_to=$params['mail_to']; + else return false; + if (!empty($params['mail_text'])) $mail_text=addslashes($params['mail_text']); + else return false; $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"' @@ -37,7 +34,6 @@ class ubik { $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); - } } -?> +} \ No newline at end of file -- 2.30.2