function poll_self_by_date($fields = "*", $date = "", $by_col = 'voternum', $order = "desc", $num = 10) { if ($by_col != 'voternum') { $by_col = 'comments'; } $num = intval($num); $order = filt_order($order); $condition = str_replace("{date}", "dateline", date_filter($date)); return poll_read_base($fields, $condition, "", $num, $by_col, $order, 1, "poll_" . $by_col . "_"); }
function group_sub_by_date($fields = "*", $date = '', $col_by = 'hits', $order = 'desc', $num = 10) { $fields = filt_fields($fields); if ($col_by != 'hits') { $col_by = "comments"; } $order = filt_order($order); $condition = str_replace("{date}", "add_time", date_filter($date)); return group_sub_read_base($fields, $condition, '', $num, $col_by, $order); }
function blog_self_by_date($fields = "*", $date = '', $by_col = 'hits', $order = "desc", $num = 10) { $num = intval($num); $fields = filt_fields($fields); $order = filt_order($order); if ($by_col != 'hits') { $by_col = 'comments'; } $condition = str_replace("{date}", "add_time", date_filter($date)); return blog_read_base("*", $condition, "", $by_col, $order, $num); }
function msgboard_self_by_uid($fields = "*", $uid = "", $is_read = "", $num = "", $date = "") { $uid = $uid ? $uid : get_sess_userid(); $is_read = intval($is_read); $fields = filt_fields($fields); $condition = " to_user_id = {$uid} "; if ($date != '') { $condition .= str_replace("{date}", "add_time", date_filter($date)); } if ($is_read != '') { $condition .= " and readed = {$is_read} "; } return msgboard_read_base($fields, $condition, "getRs", $num); }
function scrip_inbox_get_mine($fields = "*", $date = "", $is_read = "", $from_id = "") { $from_id_str = filt_num_array($from_id); $fields = filt_fields($fields); $condition = ""; $condition .= str_replace("{date}", "add_time", date_filter($date)); if ($is_read == '0' || $is_read == '1') { $is_read = intval($is_read); $condition .= " and readed = {$is_read} "; } if ($from_id != '') { $condition .= " and from_user_id in ({$from_id_str}) "; } return inbox_read_base($fields, $condition); }
function scrip_outbox_get_mine($fields = "*", $to_id = "", $is_read = "", $date = "") { $to_id_str = filt_num_array($to_id); $fields = filt_fields($fields); $condition = ""; $condition .= str_replace("{date}", "add_time", date_filter($date)); if ($is_read !== '') { $is_read = intval($is_read); $condition .= " and state = {$is_read} "; } if ($to_id != '') { $condition .= " and to_user_id in ({$to_id_str}) "; } return outbox_read_base($fields, $condition); }
function user_self_by_logindate($fields = "*", $date, $num = 10) { $fields = filt_fields($fields); $condition = str_replace("{date}", "lastlogin_datetime", date_filter($date)); return user_read_base($fields, $condition, "", $num, "lastlogin_datetime"); }