. */ require_once 'Widget.class.php'; require_once 'common/frs/FRSPackageFactory.class.php'; /** * Widget_MyMonitoredFp * * Filemodules that are actively monitored */ class Widget_MyMonitoredFp extends Widget { function Widget_MyMonitoredFp() { $this->Widget('mymonitoredfp'); } function getTitle() { return _("Monitored File Packages"); } function getContent() { $frsrf = new FRSReleaseFactory(); $html_my_monitored_fp = ''; $sql="SELECT groups.group_name,groups.group_id ". "FROM groups,filemodule_monitor,frs_package ". "WHERE groups.group_id=frs_package.group_id ". "AND frs_package.status_id !=$1". "AND frs_package.package_id=filemodule_monitor.filemodule_id ". "AND filemodule_monitor.user_id=$2"; $um =& UserManager::instance(); $current_user =& $um->getCurrentUser(); if ($current_user->isRestricted()) { $projects = $current_user->getProjects(); $sql .= "AND groups.group_id IN (". implode(',', $projects) .") "; } $sql .= "GROUP BY group_id ORDER BY group_id ASC LIMIT 100"; $result=db_query_params($sql,array($frsrf->STATUS_DELETED,user_getid())); $rows=db_numrows($result); if (!$result || $rows < 1) { $html_my_monitored_fp .= '
' . _("You are not monitoring any files.") . '
' . _("If you monitor files, you will be sent new release notices via email, with a link to the new file on our download server.") . '
' . _("You can monitor files by visiting a project's “Summary Page” and clicking on the appropriate icon in the files section.") . '
'; } else { $html_my_monitored_fp .= ''. $hide_url.''. db_result($result,$j,'group_name').' '; $html = ''; $count_new = max(0, $count_diff); for ($i=0; $i<$rows2; $i++) { if (!$hide_now) { $html .=' | |
- '. db_result($result2,$i,'name').' | '. ''. ' |