function count_dislike($plcno) { $dislikes = select1_wop('fs_plcm_dislike', 3, array('plcno', $plcno), '='); if (!empty($dislikes)) { return intval(count($dislikes)); } else { return 0; } }
public function top_member() { $dates = $this->date_difference(); if (empty($_SESSION['show'])) { $_SESSION['show'] = 'today'; } if ($_SESSION['show'] == 'today') { $luptoday = select1_wop('postedlooks', 7, array('date_', $dates['today']), '>'); $tmtoday = $this->calc_topmember($luptoday, 'today'); $this->top_members = $tmtoday; } if ($_SESSION['show'] == 'week') { $lupweek = select1_wop('postedlooks', 7, array('date_', $dates['last_week']), '>'); $tmweek = $this->calc_topmember($lupweek, 'last_week'); $this->top_members = $tmweek; } if ($_SESSION['show'] == 'month') { $lupmonth = select1_wop('postedlooks', 7, array('date_', $dates['last_month']), '>'); $tmmonth = $this->calc_topmember($lupmonth, 'last_month'); $this->top_members = $tmmonth; } if ($_SESSION['show'] == 'year') { $lupyear = select1_wop('postedlooks', 7, array('date_', $dates['last_year']), '>'); $tmyear = $this->calc_topmember($lupyear, 'last_year'); $this->top_members = $tmyear; } if ($_SESSION['show'] == 'all') { $lupall = select('postedlooks', 7); $tmall = $this->calc_topmember($lupall, 'all'); $this->top_members = $tmall; } return $this->top_members; }
function get_look_uploaded($date = null) { if (empty($date)) { $look = select('ratings', 4, array('mno', $mno)); } else { $look = select1_wop('postedlooks', 7, array('date_', $date), '>'); } if (!empty($look)) { $look = convert_1d($look, 0); return $look; } else { return 0; } }