function new_dynamicAction()
 {
     $this->setTitle("Add Dynamic Content");
     $this->readFeeds($this->ndc_feeds, Feed::priv_get($_SESSION['user'], 'dynamic'));
 }
Пример #2
0
	function avail_feeds(){
		if($this->screen_set){
			$sql = "SELECT id FROM feed WHERE id NOT IN (SELECT feed_id FROM position WHERE field_id = '$this->id' AND screen_id = '$this->screen_id') ORDER BY id ASC";
			$res = sql_query($sql);
			$i = 0;
			while($feed_row = sql_row_keyed($res, $i)){
				//$data[$i] = new Feed($feed_row['id']);
				$feeds[$i] = $feed_row['id'];
				$i++;
			}
			$obj = new Feed();
			$access = $obj->priv_get(new Screen($this->screen_id), 'subscribe');
			foreach($access as $feed){
				$allowed[] = $feed->id;
			}
			$intersect = array_intersect($allowed, $feeds);
			foreach($intersect as $feed_id){
				$data[] = new Feed($feed_id);
			}
			return $data;
		} else {
			return false;  //No screen = no fun!  Get it through your head!
		}
	}
 function listAction()
 {
     $this->feeds = Feed::priv_get($_SESSION['user'], 'list');
 }