<?php
$module_css_path = ($line_domain['theme'] != "" && $line_domain['theme'] != "default") ? ($path . ('assets/themes/' . $line_domain['theme'] . '/')) : $path;

$qsm = "select * from sm_domains where domainname='$ultra_domainname' and app_status='1' order by app asc;";
$rsm = @mysql_query($qsm);
if($rsm && mysql_num_rows($rsm) > 0) {
	$sm_config = dirname(__FILE__) . "/sm_config.php";
	if(file_exists($sm_config)) include($sm_config);
	
	
	$sm_defaults = array();
	foreach ($sm_objs as $app_code=>$app_name) {
		$sm_defaults[$app_code] = array();
	}
	
	while ($rowsm = mysql_fetch_assoc($rsm)) {
		//echo '<pre>', var_export($rowsm, true), '</pre>';
		if(isset($sm_defaults [$rowsm['app']])) $sm_defaults [$rowsm['app']] = array_map('stripslashes', $rowsm);
	}
	
	//echo '<pre>', var_export($sm_defaults, true), '</pre>';
	
	$sm_init = dirname(__FILE__) . "/sm_init.php";
	$sm_default = dirname(__FILE__) . "/sm_default.php";
	
	if(file_exists($sm_init)) require_once($sm_init);
	if(file_exists($sm_default)) include($sm_default);
}


//include(dirname(__FILE__) . "/sm_single.php");
/*
$sm_init = dirname(__FILE__) . "/sm_init.php";
$sm_default = dirname(__FILE__) . "/sm_default.php";

if(file_exists($sm_functions)) require_once($sm_functions);
if(file_exists($sm_init)) require_once($sm_init);
if(file_exists($sm_default)) include($sm_default);
*/
?>