<?php
/*
* @package LabCMS
* @copyright (c) 2006 Alexander Levin aka Loki (loki_angel@mail.ru)
* @support http://labcms.ru
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/
	$mod_template="versions.tpl";
	
	$versions=Db::i()->select("SELECT v.version_id, version, bug_id as no_delete
					FROM ?_bt_versions v
					LEFT JOIN ?_bt_bugs b ON v.version_id=b.version_id
					WHERE v.project_id=?
					GROUP BY v.version_id
					ORDER BY v.version_id", $project_id);

	Tpl::i()->assign('versions', $versions);