X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=inc%2Fsmarty%2Fnode_methodz%2Ffunction.get_mail.php;fp=inc%2Fsmarty%2Fnode_methodz%2Ffunction.get_mail.php;h=d90dba0528125d98acfc10d4a2f85c0b7e744423;hb=e586807dafc64c3fe152ab518599e6cf3f0f84e1;hp=0000000000000000000000000000000000000000;hpb=bc13d5d6e1834068f8b690c32bba114e352dacdd;p=mirrors%2FKyberia-bloodline.git diff --git a/inc/smarty/node_methodz/function.get_mail.php b/inc/smarty/node_methodz/function.get_mail.php new file mode 100644 index 0000000..d90dba0 --- /dev/null +++ b/inc/smarty/node_methodz/function.get_mail.php @@ -0,0 +1,43 @@ +query($q2); + $userset->next(); + $id=$userset->getString('user_id'); + $sql_type=" and ".$params['search_type']."='$id'"; + } + } + + $query = "select date_format(mail.mail_timestamp,\"%e.%c. %k:%i:%s\") as cas, +userfrom.user_action as locationfrom_action, +userfrom.user_action_id as locationfrom_action_id, +userto.user_action as locationto_action, +userto.user_action_id as locationto_action_id, +userto.login as mail_to_name, userfrom.login as mail_from_name, +mail.* from mail left join users as userfrom on +mail_from=userfrom.user_id left join users as userto on mail_to=userto.user_id +where mail_user='$user_id' "; + if ($sql_type) $query.=$sql_type; + $query.=" order by mail_id desc limit $offset,$listing_amount"; + + $set = $db->query($query); + + while($set->next()) { + $get_mail[] = $set->getRecord(); + } + + $smarty->assign('get_mail', $get_mail); + + } + +?>