<?php
// +-------------------------------------------------+
// © 2002-2012 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: cms_module_watcheslist_selector_all_watches.class.php,v 1.2 2025/09/03 12:55:50 jparis Exp $

if (stristr($_SERVER['REQUEST_URI'], ".class.php")) die("no access");

class cms_module_watcheslist_selector_all_watches extends cms_module_common_selector{

	/*
	 * Retourne toutes les veilles
	 */
	public function get_value(){
		$watches = [];

		$query = "SELECT id_watch, watch_title FROM docwatch_watches ORDER BY watch_title";
		$result = pmb_mysql_query($query);

		if (pmb_mysql_num_rows($result)) {
			while($row = pmb_mysql_fetch_object($result)) {
				$watches[] = $row->id_watch;
			}
		}

		return $watches;
	}
}