• Модуль: learning
  • Путь к файлу: ~/bitrix/modules/learning/classes/general/course.php
  • Класс: CCourse
  • Вызов: CCourse::GetSitePathes
static function GetSitePathes($siteId, $in_type = 'U')
{
	global $DB;

	$in_type = mb_strtoupper($in_type);
	switch ($in_type)
	{
		case 'L':
		case 'C':
		case 'H':
		case 'U':
			$type = $DB->ForSql($in_type);
		break;

		default:
			throw new LearnException ('EA_PARAMS', LearnException::EXC_ERR_ALL_PARAMS);
		break;
	}

	$strSql = 
	"SELECT TSP.PATH 
	FROM b_learn_site_path TSP 
	WHERE TSP.SITE_ID='" . $DB->ForSql($siteId) . "' AND TSP.TYPE = '" . $type . "'";

	$rc = $DB->Query($strSql, true);
	if ($rc === false)
		throw new LearnException ('EA_SQLERROR', LearnException::EXC_ERR_ALL_GIVEUP);

	$arPathes = array();
	while ($row = $rc->Fetch())
		$arPathes[] = $row['PATH'];

	return ($arPathes);
}