| Current Path : /home/azimutno/www/demo/modules/mod_swmenupro/helpers/ |
| Current File : /home/azimutno/www/demo/modules/mod_swmenupro/helpers/tree_style.php |
<?php
/**
* swmenupro v6.0
* http://swmenupro.com
* Copyright 2006 Sean White
* */
defined('_JEXEC') or die('Restricted access');
function mygosuTreeMenuStyle($swmenupro, $ordered) {
$live_site = JURI::base();
if (substr($live_site, (strlen($live_site) - 1), 1) == "/") {
$live_site = substr($live_site, 0, (strlen($live_site) - 1));
}
if (substr($live_site, (strlen($live_site) - 13), 13) == "administrator") {
$live_site = substr($live_site, 0, (strlen($live_site) - 14));
}
if (substr($swmenupro['complete_background_image'], 0, 1) == "/") {
$swmenupro['complete_background_image'] = substr($swmenupro['complete_background_image'], 1, (strlen($swmenupro['complete_background_image']) - 1));
}
$swmenupro['complete_background_image'] = $swmenupro['complete_background_image'] ? $live_site . "/" . $swmenupro['complete_background_image'] : "";
$str="";
$str.="#menu" . $swmenupro['id'] . " {\n";
// $str.="#tree-outer" . $swmenupro['id'] . " {\n";
//$str.=" list-style: none;\n";
//$str.=" margin: 0 0 0 ".$swmenupro['level1_sub_left'].'px'.";\n";
//$str.=" padding: 0px 0 0 0;\n";
$str.= (@$swmenupro['tot_border']&&$swmenupro['main_border_width']) ? " border-top-width: " . $swmenupro['main_border_width'] . "px ;\n" : "";
$str.= (@$swmenupro['tot_border']&&($swmenupro['main_border_style']!="none")) ? " border-top-style: " . $swmenupro['main_border_style'] . " ;\n" : "";
$str.= (@$swmenupro['tot_border']&&$swmenupro['main_border_color'] )? " border-top-color: " . $swmenupro['main_border_color'] . " ;\n" : "";
$str.= (@$swmenupro['tor_border']&&$swmenupro['main_border_width']) ? " border-right-width: " . $swmenupro['main_border_width'] . "px ;\n" : "";
$str.= (@$swmenupro['tor_border']&&($swmenupro['main_border_style']!="none")) ? " border-right-style: " . $swmenupro['main_border_style'] . " ;\n" : "";
$str.= (@$swmenupro['tor_border']&&$swmenupro['main_border_color'] )? " border-right-color: " . $swmenupro['main_border_color'] . " ;\n" : "";
$str.= (@$swmenupro['tob_border']&&$swmenupro['main_border_width']) ? " border-bottom-width: " . $swmenupro['main_border_width'] . "px ;\n" : "";
$str.= (@$swmenupro['tob_border']&&($swmenupro['main_border_style']!="none")) ? " border-bottom-style: " . $swmenupro['main_border_style'] . " ;\n" : "";
$str.= (@$swmenupro['tob_border']&&$swmenupro['main_border_color'] )? " border-bottom-color: " . $swmenupro['main_border_color'] . " ;\n" : "";
$str.= (@$swmenupro['tol_border']&&$swmenupro['main_border_width']) ? " border-left-width: " . $swmenupro['main_border_width'] . "px ;\n" : "";
$str.= (@$swmenupro['tol_border']&&($swmenupro['main_border_style']!="none")) ? " border-left-style: " . $swmenupro['main_border_style'] . " ;\n" : "";
$str.= (@$swmenupro['tol_border']&&$swmenupro['main_border_color'] )? " border-left-color: " . $swmenupro['main_border_color'] . " ;\n" : "";
if ($swmenupro['main_width'] != 0) {
$str.= " width:" . $swmenupro['main_width'] . "px; \n";
}
$str.=$swmenupro['complete_background']?" background-color: " . $swmenupro['complete_background'] . ";":"";
$str.=$swmenupro['complete_background_image'] ? " background-image: URL(\"" . $swmenupro['complete_background_image'] . "\") ;\n" : "background-image:none ;\n";
$str.=$swmenupro['complete_background_image'] ? " background-repeat:" . $swmenupro['complete_background_repeat'] . ";\n" : "";
$str.=$swmenupro['complete_background_image'] ? " background-position:" . $swmenupro['complete_background_position'] . " ;\n" : "";
$str.= $swmenupro['complete_margin_top'] ? " padding-top: " . $swmenupro['complete_margin_top'] . "px ;\n" : "";
$str.= $swmenupro['complete_margin_right'] ? " padding-right: " . $swmenupro['complete_margin_right'] . "px ;\n" : "";
$str.= $swmenupro['complete_margin_bottom'] ? " padding-bottom: " . $swmenupro['complete_margin_bottom'] . "px ;\n" : "";
$str.= $swmenupro['complete_margin_left'] ? " padding-left: " . $swmenupro['complete_margin_left'] . "px ;\n" : "";
if ($swmenupro['c_corner_style'] == 'curvycorner') {
$ctext="";
@$swmenupro['ctl_corner']?$ctext.=$swmenupro['c_corner_size']."px ":$ctext.="0 ";
@$swmenupro['ctr_corner']?$ctext.=$swmenupro['c_corner_size']."px ":$ctext.="0 ";
@$swmenupro['cbr_corner']?$ctext.=$swmenupro['c_corner_size']."px ":$ctext.="0 ";
@$swmenupro['cbl_corner']?$ctext.=$swmenupro['c_corner_size']."px ":$ctext.="0 ";
$str.="border-radius: " . $ctext.";\n";
//$str.="-webkit-border-radius: " . $ctext.";\n";
$str.="-moz-border-radius: " . $ctext.";\n";
@$swmenupro['ctl_corner']?$str.="-webkit-border-top-left-radius: ".$swmenupro['c_corner_size']."px; \n":"";
@$swmenupro['ctr_corner']?$str.="-webkit-border-top-right-radius: ".$swmenupro['c_corner_size']."px; \n":"";
@$swmenupro['cbr_corner']?$str.="-webkit-border-bottom-right-radius: ".$swmenupro['c_corner_size']."px; \n":"";
@$swmenupro['cbl_corner']?$str.="-webkit-border-bottom-left-radius: ".$swmenupro['c_corner_size']."px; \n":"";
}
$str.="}\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview, .tree-menu" . $swmenupro['id'] . ".treeview ul {\n";
$str.=" list-style: none;\n";
//$str.=" margin: 0 0 0 ".$swmenupro['level1_sub_left'].'px'.";\n";
//$str.=" padding: 0px 0 0 0;\n";
//$str.=" width: ".$swmenupro['main_width'].'px'.";\n";
// $str.=" background-color: ".$swmenupro['main_back'].";\n";
//$str.=$swmenupro['main_back_image'] ? "background-image: URL(\"".$swmenupro['main_back_image']."\") ; \n":"";
$str.="}\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview ul {\n";
//$str.=" list-style-type: none;\n";
// $str.=" font-family: " . $swmenupro['font_family'] . ";\n";
// $str.=" font-size: " . $swmenupro['main_font_size'] . 'px' . ";\n";
// $str.=" text-decoration: none;\n";
// $str.=" color: " . $swmenupro['main_font_color'] . ";\n";
// $str.=" font-weight: " . $swmenupro['font_weight'] . ";\n";
// $str.=" text-align: " . $swmenupro['main_align'] . ";\n";
//$str.=" width: ".$swmenupro['main_width'].'px'.";\n";
//$str.=" line-height: 16px;\n";
$str.=" margin: 0;\n";
$str.=" padding: 0;\n";
$str.="}\n";
// $str.=".tree-menu" . $swmenupro['id'] . ".treeview a {\n";
//$str.=" list-style-type: none;\n";
// $str.=" font-family: " . $swmenupro['font_family'] . ";\n";
// $str.=" font-size: " . $swmenupro['main_font_size'] . 'px' . ";\n";
// $str.=" text-decoration: none;\n";
// $str.=" color: " . $swmenupro['main_font_color'] . ";\n";
// $str.=" font-weight: " . $swmenupro['font_weight'] . ";\n";
// $str.=" text-align: " . $swmenupro['main_align'] . ";\n";
//$str.=" width: ".$swmenupro['main_width'].'px'.";\n";
//$str.=" line-height: 16px;\n";
//$str.=" border: ".$swmenupro['main_border']."; \n";
//$str.=" background-color: ".$swmenupro['main_back'].";\n";
// $str.=$swmenupro['main_back_image'] ? "background-image: URL(\"".$swmenupro['main_back_image']."\") ; \n":"";
//$str.=" margin: 0;\n";
//$str.=" padding: 0;\n";
// $str.="}\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview .hitarea {\n";
$str.=" background: url(" . $live_site."/images/swmenupro/tree_lines/treeview-".$swmenupro['tree_lines'] . ".gif) -64px -25px no-repeat;\n";
//$str.=" background: url(" . $live_site . "/modules/mod_swmenupro/images/treeview-default.gif) -64px -25px no-repeat;\n";
$str.=" height: 16px;\n";
$str.=" width: 16px;\n";
$str.=" margin-left: -16px;\n";
$str.=" float:left;\n";
$str.=" cursor:pointer;\n";
$str.="}\n";
$str.="* html .hitarea {\n";
$str.=" display:inline;\n";
$str.=" float:none; \n";
$str.="}\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview li {\n";
$str.=" margin: 0;\n";
$str.="}\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview a:hover {\n";
$str.="background-color: transparent ; \n";
$str.=$swmenupro['main_font_color_over'] ? " color: " . $swmenupro['main_font_color_over'] . "; \n" : "";
// $str.=" font-weight: " . $swmenupro['font_weight_over'] . " ; \n";
$str.=" cursor:pointer;\n";
$str.="}\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview li {\n";
$str.=" background: url(" . $live_site."/images/swmenupro/tree_lines/treeview-".$swmenupro['tree_lines'] . "-line.gif) 0 0 no-repeat;\n";
//$str.=" background: url(" . $live_site . "/images/swmenu/tree_icons/treeview-default-line.gif) 0 0 no-repeat;\n";
$str.="}\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview li.tree-top" . $swmenupro['id'] . "{\n";
$str.=" background: url(" . $live_site."/".$swmenupro['tree_top_icon'] . ") 0 0 no-repeat;\n";
$str.="}\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview li.collapsable,\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview li.expandable {\n";
$str.=" background-position: 0 -176px;\n";
$str.="}\n";
// $str.=".tree-menu".$swmenupro['id'].".treeview li.collapsable,\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview .expandable-hitarea {\n";
$str.=" background-position: -80px -3px;\n";
$str.="}\n";
//$str.=".tree-menu".$swmenupro['id'].".treeview li.collapsable,\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview li.last {\n";
$str.=" background-position: 0 -1766px;\n";
$str.="}\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview li.lastCollapsable,\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview li.lastExpandable {\n";
$str.=" background: url(" . $live_site."/images/swmenupro/tree_lines/treeview-".$swmenupro['tree_lines'] . ".gif) 0 0 no-repeat;\n";
//$str.=" background: url(" . $live_site . "/images/swmenu/tree_icons/treeview-default.gif) 0 0 no-repeat;\n";
$str.="}\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview li.lastCollapsable {\n";
$str.=" background-position: 0 -111px;\n";
$str.="}\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview li.lastExpandable {\n";
$str.=" background-position: -32px -67px;\n";
$str.="}\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview li {\n";
// $str.=" margin: 0px;\n";
$str.= $swmenupro['top_margin_top'] ? " padding-top: " . $swmenupro['top_margin_top'] . "px ;\n" : "";
$str.= $swmenupro['top_margin_right'] ? " padding-right: " . $swmenupro['top_margin_right'] . "px ;\n" : "";
$str.= $swmenupro['top_margin_bottom'] ? " padding-bottom: " . $swmenupro['top_margin_bottom'] . "px ;\n" : "";
$str.= $swmenupro['top_margin_left'] ? " padding-left: " . $swmenupro['top_margin_left'] . "px ;\n" : "";
$str.="}\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview div.lastCollapsable-hitarea,\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview div.lastExpandable-hitarea {\n";
$str.=" background-position: 0;\n";
$str.="}\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview span.folder,\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview span.file {\n";
//$str.=" padding:1px 0 1px 16px;\n";
$str.=" display:block;\n";
$str.="}\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview span.folder {\n";
$str.=" background: url(" . $live_site."/".$swmenupro['tree_folder_open_icon'] . ") 0 0 no-repeat;\n";
$str.= $swmenupro['main_pad_top'] ? " padding-top: " . $swmenupro['main_pad_top'] . "px ;\n" : "";
$str.= $swmenupro['main_pad_right'] ? " padding-right: " . $swmenupro['main_pad_right'] . "px ;\n" : "";
$str.= $swmenupro['main_pad_bottom'] ? " padding-bottom: " . $swmenupro['main_pad_bottom'] . "px ;\n" : "";
$str.= $swmenupro['main_pad_left'] ? " padding-left: " . $swmenupro['main_pad_left'] . "px ;\n" : "";
$str.="}\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview li.expandable span.folder {\n";
$str.=" background: url(" . $live_site."/".$swmenupro['tree_folder_icon'] . ") 0 0 no-repeat;\n";
$str.="}\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview span.file {\n";
$str.=" background: url(" . $live_site."/".$swmenupro['tree_file_icon'] . ") 0 0 no-repeat;\n";
$str.= $swmenupro['sub_pad_top'] ? " padding-top: " . $swmenupro['sub_pad_top'] . "px;\n" : "";
$str.= $swmenupro['sub_pad_right'] ? " padding-right: " . $swmenupro['sub_pad_right'] . "px;\n" : "";
$str.= $swmenupro['sub_pad_bottom'] ? " padding-bottom: " . $swmenupro['sub_pad_bottom'] . "px;\n" : "";
$str.= $swmenupro['sub_pad_left'] ? " padding-left: " . $swmenupro['sub_pad_left'] . "px;\n" : "";
$str.="}\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview li.selected a:hover,\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview li.selected a{\n";
$str.=$swmenupro['active_background'] ? " background-color: " . $swmenupro['active_background'] . " ; \n" : "";
$str.="}\n";
// $str.=".tree-menu" . $swmenupro['id'] . ".treeview span.folder,\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview span.file a{\n";
//$str.= " padding: " . $swmenupro['sub_padding'] . " ; \n";
$str.= " font-size: " . $swmenupro['sub_font_size'] . "px ; \n";
$str.= " font-family: " . $swmenupro['sub_font_family'] . " ; \n";
$str.= " text-align: " . $swmenupro['sub_align'] . " ; \n";
$str.= " font-weight: " . $swmenupro['font_weight_over'] . " ; \n";
$str.=$swmenupro['sub_font_color'] ? " color: " . $swmenupro['sub_font_color'] . " ; \n" : "";
switch ($swmenupro['sub_font_extra']) {
case "italic":
case "oblique":
$str.=" font-style:" . $swmenupro['sub_font_extra'] . " ;\n";
$str.=" text-decoration: none ;\n";
$str.=" text-transform: none ;\n";
break;
case "underline":
case "overline":
case "line-through":
$str.=" text-decoration:" . $swmenupro['sub_font_extra'] . " ;\n";
$str.=" font-style: normal ;\n";
$str.=" text-transform: none ;\n";
break;
case "uppercase":
case "lowercase":
case "capitalize":
$str.=" text-transform:" . $swmenupro['sub_font_extra'] . " ;\n";
$str.=" text-decoration: none ;\n";
$str.=" font-style: normal ;\n";
break;
default:
$str.=" font-style: normal ;\n";
$str.=" text-decoration: none ;\n";
$str.=" text-transform: none ;\n";
break;
}
$str.= " display: block; \n";
$str.=" white-space: " . $swmenupro['sub_wrap'] . " ; \n";
// $str.=$swmenupro['sub_back_image'] ? "background-image: URL(\"".$swmenupro['sub_back_image']."\") ; \n":"";
$str.=$swmenupro['sub_back']?" background-color: " . $swmenupro['sub_back'] . ";":"";
$str.="}\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview span.file a:hover{\n";
$str.=$swmenupro['sub_font_color_over'] ? " color: " . $swmenupro['sub_font_color_over'] . " ; \n" : "";
// $str.=$swmenupro['sub_back_image_over'] ? "background-image: URL(\"".$swmenupro['sub_back_image_over']."\") ; \n":"";
$str.=$swmenupro['sub_over']?" background-color: " . $swmenupro['sub_over'] . ";":"";
$str.="}\n";
// $str.=".tree-menu" . $swmenupro['id'] . ".treeview li.collapsable li.expandable span.folder a,\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview span.folder a{\n";
$str.=" font-size: " . $swmenupro['main_font_size'] . "px ; \n";
$str.=" font-family: " . $swmenupro['font_family'] . "; \n";
$str.=" text-align: " . $swmenupro['main_align'] . " ; \n";
$str.=" font-weight: " . $swmenupro['font_weight'] . " ; \n";
$str.=$swmenupro['main_font_color'] ? " color: " . $swmenupro['main_font_color'] . " ; \n" : "";
switch ($swmenupro['top_font_extra']) {
case "italic":
case "oblique":
$str.=" font-style:" . $swmenupro['top_font_extra'] . " ;\n";
$str.=" text-decoration: none ;\n";
$str.=" text-transform: none ;\n";
break;
case "underline":
case "overline":
case "line-through":
$str.=" text-decoration:" . $swmenupro['top_font_extra'] . " ;\n";
$str.=" font-style: normal ;\n";
$str.=" text-transform: none ;\n";
break;
case "uppercase":
case "lowercase":
case "capitalize":
$str.=" text-transform:" . $swmenupro['top_font_extra'] . " ;\n";
$str.=" text-decoration: none ;\n";
$str.=" font-style: normal ;\n";
break;
default:
$str.=" font-style: normal ;\n";
$str.=" text-decoration: none ;\n";
$str.=" text-transform: none ;\n";
break;
}
$str.=" display: block; \n";
$str.=" white-space: " . $swmenupro['top_wrap'] . "; \n";
// $str.=$swmenupro['main_back_image'] ? "background-image: URL(\"".$swmenupro['main_back_image']."\") ; \n":"";
$str.=$swmenupro['main_back']?" background-color: " . $swmenupro['main_back'] . ";":"";
$str.="}\n";
// $str.=".tree-menu" . $swmenupro['id'] . ".treeview li.collapsable li.expandable span.folder a:hover,\n";
// $str.=".tree-menu" . $swmenupro['id'] . ".treeview li.collapsable span.folder a,\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview span.folder a:hover{\n";
$str.=$swmenupro['main_font_color_over'] ? " color: " . $swmenupro['main_font_color_over'] . " ; \n" : "";
// $str.=$swmenupro['main_back_image_over'] ? "background-image: URL(\"".$swmenupro['main_back_image_over']."\") ; \n":"";
$str.=$swmenupro['main_over']?" background-color: " . $swmenupro['main_over'] . ";":"";
$str.="}\n";
// $str.=".tree-menu" . $swmenupro['id'] . ".treeview .selected .file a:hover,\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview .selected a:hover,\n";
$str.=".tree-menu" . $swmenupro['id'] . ".treeview .selected a{\n";
// $str.="#tree" . $swmenupro['id'] .$active->id. " a{\n";
$str.=$swmenupro['sub_font_color'] ? " color: " . $swmenupro['active_font'] . " !important ; \n" : "";
$str.=$swmenupro['sub_back']?" background-color: " . $swmenupro['active_background'] . " !important;":"";
$str.="}\n";
// $str.=".tree-menu" . $swmenupro['id'] . ".treeview li.collapsable li.expandable span.folder a{\n";
// $str.=$swmenupro['main_back_image'] ? "background-image: URL(\"".$swmenupro['main_back_image']."\") ; \n":"";
// $str.="}\n";
/*
* .tree-menu125 span.folder { background: url(images/folder.gif) 0 0 no-repeat; }
.tree-menu125 li.expandable span.folder { background: url(images/folder-closed.gif) 0 0 no-repeat; }
.tree-menu125 span.file { background: url(images/file.gif) 0 0 no-repeat; }
* .tree-menu125 span.folder, .tree-menu125 span.file { padding: 1px 0 1px 16px; display: block; }
.treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; }
.tree-menu125 li { padding: 3px 0 2px 16px; }
.tree-menu125 span.folder, .tree-menu125 span.file { padding: 1px 0 1px 16px; display: block; }
.tree-menu125 span.folder { background: url(images/folder.gif) 0 0 no-repeat; }
.tree-menu125 li.expandable span.folder { background: url(images/folder-closed.gif) 0 0 no-repeat; }
.tree-menu125 span.file { background: url(images/file.gif) 0 0 no-repeat; }
*/
//-->
//</style>
for ($i = 0; $i < count($ordered); $i++) {
if ($ordered[$i]['NCSS']) {
$str.=" #tree" . $swmenupro['id'] . ($ordered[$i]['ID']) . " a{\n";
$str.=$ordered[$i]['NCSS'];
$str.="\n}\n";
}
if ($ordered[$i]['OCSS']) {
$str.=" #tree" . $swmenupro['id'] . ($ordered[$i]['ID']) . " .selected a,\n";
$str.=" #tree" . $swmenupro['id'] . ($ordered[$i]['ID']) . " a:hover{\n";
$str.=$ordered[$i]['OCSS'];
$str.="\n}\n";
}
}
return $str;
}
function TreeMenuStyle($swmenupro, $ordered) {
$live_site = JURI::base();
if (substr($live_site, (strlen($live_site) - 1), 1) == "/") {
$live_site = substr($live_site, 0, (strlen($live_site) - 1));
}
if (substr($live_site, (strlen($live_site) - 13), 13) == "administrator") {
$live_site = substr($live_site, 0, (strlen($live_site) - 14));
}
if (substr($swmenupro['complete_background_image'], 0, 1) == "/") {
$swmenupro['complete_background_image'] = substr($swmenupro['complete_background_image'], 1, (strlen($swmenupro['complete_background_image']) - 1));
}
$swmenupro['complete_background_image'] = $swmenupro['complete_background_image'] ? $live_site . "/" . $swmenupro['complete_background_image'] : "";
$str="";
$str.= ".dtree" . $swmenupro['id'] . " {\n";
$str.= (@$swmenupro['tot_border']&&$swmenupro['main_border_width']) ? " border-top-width: " . $swmenupro['main_border_width'] . "px ;\n" : "";
$str.= (@$swmenupro['tot_border']&&($swmenupro['main_border_style']!="none")) ? " border-top-style: " . $swmenupro['main_border_style'] . " ;\n" : "";
$str.= (@$swmenupro['tot_border']&&$swmenupro['main_border_color'] )? " border-top-color: " . $swmenupro['main_border_color'] . " ;\n" : "";
$str.= (@$swmenupro['tor_border']&&$swmenupro['main_border_width']) ? " border-right-width: " . $swmenupro['main_border_width'] . "px ;\n" : "";
$str.= (@$swmenupro['tor_border']&&($swmenupro['main_border_style']!="none")) ? " border-right-style: " . $swmenupro['main_border_style'] . " ;\n" : "";
$str.= (@$swmenupro['tor_border']&&$swmenupro['main_border_color'] )? " border-right-color: " . $swmenupro['main_border_color'] . " ;\n" : "";
$str.= (@$swmenupro['tob_border']&&$swmenupro['main_border_width']) ? " border-bottom-width: " . $swmenupro['main_border_width'] . "px ;\n" : "";
$str.= (@$swmenupro['tob_border']&&($swmenupro['main_border_style']!="none")) ? " border-bottom-style: " . $swmenupro['main_border_style'] . " ;\n" : "";
$str.= (@$swmenupro['tob_border']&&$swmenupro['main_border_color'] )? " border-bottom-color: " . $swmenupro['main_border_color'] . " ;\n" : "";
$str.= (@$swmenupro['tol_border']&&$swmenupro['main_border_width']) ? " border-left-width: " . $swmenupro['main_border_width'] . "px ;\n" : "";
$str.= (@$swmenupro['tol_border']&&($swmenupro['main_border_style']!="none")) ? " border-left-style: " . $swmenupro['main_border_style'] . " ;\n" : "";
$str.= (@$swmenupro['tol_border']&&$swmenupro['main_border_color'] )? " border-left-color: " . $swmenupro['main_border_color'] . " ;\n" : "";
if ($swmenupro['main_width'] != 0) {
$str.= " width:" . $swmenupro['main_width'] . "px; \n";
}
$str.=$swmenupro['complete_background']?" background-color: " . $swmenupro['complete_background'] . ";":"";
$str.=$swmenupro['complete_background_image'] ? " background-image: URL(\"" . $swmenupro['complete_background_image'] . "\") ;\n" : "background-image:none ;\n";
$str.=$swmenupro['complete_background_image'] ? " background-repeat:" . $swmenupro['complete_background_repeat'] . ";\n" : "";
$str.=$swmenupro['complete_background_image'] ? " background-position:" . $swmenupro['complete_background_position'] . " ;\n" : "";
$str.= $swmenupro['complete_margin_top'] ? " padding-top: " . $swmenupro['complete_margin_top'] . "px ;\n" : "";
$str.= $swmenupro['complete_margin_right'] ? " padding-right: " . $swmenupro['complete_margin_right'] . "px ;\n" : "";
$str.= $swmenupro['complete_margin_bottom'] ? " padding-bottom: " . $swmenupro['complete_margin_bottom'] . "px ;\n" : "";
$str.= $swmenupro['complete_margin_left'] ? " padding-left: " . $swmenupro['complete_margin_left'] . "px ;\n" : "";
if ($swmenupro['c_corner_style'] == 'curvycorner') {
$ctext="";
@$swmenupro['ctl_corner']?$ctext.=$swmenupro['c_corner_size']."px ":$ctext.="0 ";
@$swmenupro['ctr_corner']?$ctext.=$swmenupro['c_corner_size']."px ":$ctext.="0 ";
@$swmenupro['cbr_corner']?$ctext.=$swmenupro['c_corner_size']."px ":$ctext.="0 ";
@$swmenupro['cbl_corner']?$ctext.=$swmenupro['c_corner_size']."px ":$ctext.="0 ";
$str.="border-radius: " . $ctext.";\n";
//$str.="-webkit-border-radius: " . $ctext.";\n";
$str.="-moz-border-radius: " . $ctext.";\n";
@$swmenupro['ctl_corner']?$str.="-webkit-border-top-left-radius: ".$swmenupro['c_corner_size']."px; \n":"";
@$swmenupro['ctr_corner']?$str.="-webkit-border-top-right-radius: ".$swmenupro['c_corner_size']."px; \n":"";
@$swmenupro['cbr_corner']?$str.="-webkit-border-bottom-right-radius: ".$swmenupro['c_corner_size']."px; \n":"";
@$swmenupro['cbl_corner']?$str.="-webkit-border-bottom-left-radius: ".$swmenupro['c_corner_size']."px; \n":"";
}
$str.="}\n";
$str.=".dtree" . $swmenupro['id'] . " img {\n";
$str.=" border: 0px !important ; \n";
$str.=" vertical-align: middle !important ; \n";
$str.="}\n";
$str.=".dtree" . $swmenupro['id'] . " a.nodeSel ,\n";
$str.=".dtree" . $swmenupro['id'] . " a.node ,\n";
$str.=".dtree" . $swmenupro['id'] . " a.folder {\n";
$str.=" font-size: " . $swmenupro['main_font_size'] . "px ; \n";
$str.=" font-family: " . $swmenupro['font_family'] . "; \n";
$str.=" text-align: " . $swmenupro['main_align'] . " ; \n";
$str.=" font-weight: " . $swmenupro['font_weight'] . " ; \n";
$str.=$swmenupro['main_font_color'] ? " color: " . $swmenupro['main_font_color'] . " ; \n" : "";
switch ($swmenupro['top_font_extra']) {
case "italic":
case "oblique":
$str.=" font-style:" . $swmenupro['top_font_extra'] . " ;\n";
$str.=" text-decoration: none ;\n";
$str.=" text-transform: none ;\n";
break;
case "underline":
case "overline":
case "line-through":
$str.=" text-decoration:" . $swmenupro['top_font_extra'] . " ;\n";
$str.=" font-style: normal ;\n";
$str.=" text-transform: none ;\n";
break;
case "uppercase":
case "lowercase":
case "capitalize":
$str.=" text-transform:" . $swmenupro['top_font_extra'] . " ;\n";
$str.=" text-decoration: none ;\n";
$str.=" font-style: normal ;\n";
break;
default:
$str.=" font-style: normal ;\n";
$str.=" text-decoration: none ;\n";
$str.=" text-transform: none ;\n";
break;
}
// $str.=" display: block; \n";
$str.=" white-space: " . $swmenupro['top_wrap'] . "; \n";
// $str.=$swmenupro['main_back_image'] ? "background-image: URL(\"".$swmenupro['main_back_image']."\") ; \n":"";
$str.=$swmenupro['main_back']?" background-color: " . $swmenupro['main_back'] . ";":"";
$str.= $swmenupro['main_pad_top'] ? " padding-top: " . $swmenupro['main_pad_top'] . "px ;\n" : "";
$str.= $swmenupro['main_pad_right'] ? " padding-right: " . $swmenupro['main_pad_right'] . "px ;\n" : "";
$str.= $swmenupro['main_pad_bottom'] ? " padding-bottom: " . $swmenupro['main_pad_bottom'] . "px ;\n" : "";
$str.= $swmenupro['main_pad_left'] ? " padding-left: " . $swmenupro['main_pad_left'] . "px ;\n" : "";
$str.="}\n";
$str.=".dtree" . $swmenupro['id'] . " a.node, .dtree" . $swmenupro['id'] . " a.nodeSel {\n";
$str.=" white-space: nowrap; \n";
// $str.= $swmenupro['sub_pad_top'] ? " padding-top: " . $swmenupro['sub_pad_top'] . "px;\n" : "";
// $str.= $swmenupro['sub_pad_right'] ? " padding-right: " . $swmenupro['sub_pad_right'] . "px;\n" : "";
// $str.= $swmenupro['sub_pad_bottom'] ? " padding-bottom: " . $swmenupro['sub_pad_bottom'] . "px;\n" : "";
// $str.= $swmenupro['sub_pad_left'] ? " padding-left: " . $swmenupro['sub_pad_left'] . "px;\n" : "";
$str.="}\n";
$str.=".dtree" . $swmenupro['id'] . " a.node:hover, .dtree" . $swmenupro['id'] . " a.folder:hover {\n";
$str.=$swmenupro['main_font_color_over'] ? " color: " . $swmenupro['main_font_color_over'] . " ; \n" : "";
// $str.=$swmenupro['main_back_image_over'] ? "background-image: URL(\"".$swmenupro['main_back_image_over']."\") ; \n":"";
$str.=$swmenupro['main_over']?" background-color: " . $swmenupro['main_over'] . ";":"";
$str.="}\n";
$str.=".dtree" . $swmenupro['id'] . " a.file {\n";
//$str.= " padding: " . $swmenupro['sub_padding'] . " ; \n";
$str.= " font-size: " . $swmenupro['sub_font_size'] . "px ; \n";
$str.= " font-family: " . $swmenupro['sub_font_family'] . " ; \n";
$str.= " text-align: " . $swmenupro['sub_align'] . " ; \n";
$str.= " font-weight: " . $swmenupro['font_weight_over'] . " ; \n";
$str.=$swmenupro['sub_font_color'] ? " color: " . $swmenupro['sub_font_color'] . " ; \n" : "";
switch ($swmenupro['sub_font_extra']) {
case "italic":
case "oblique":
$str.=" font-style:" . $swmenupro['sub_font_extra'] . " ;\n";
$str.=" text-decoration: none ;\n";
$str.=" text-transform: none ;\n";
break;
case "underline":
case "overline":
case "line-through":
$str.=" text-decoration:" . $swmenupro['sub_font_extra'] . " ;\n";
$str.=" font-style: normal ;\n";
$str.=" text-transform: none ;\n";
break;
case "uppercase":
case "lowercase":
case "capitalize":
$str.=" text-transform:" . $swmenupro['sub_font_extra'] . " ;\n";
$str.=" text-decoration: none ;\n";
$str.=" font-style: normal ;\n";
break;
default:
$str.=" font-style: normal ;\n";
$str.=" text-decoration: none ;\n";
$str.=" text-transform: none ;\n";
break;
}
//$str.= " display: block; \n";
$str.=" white-space: " . $swmenupro['sub_wrap'] . " ; \n";
// $str.=$swmenupro['sub_back_image'] ? "background-image: URL(\"".$swmenupro['sub_back_image']."\") ; \n":"";
$str.=$swmenupro['sub_back']?" background-color: " . $swmenupro['sub_back'] . ";":"";
$str.= $swmenupro['sub_pad_top'] ? " padding-top: " . $swmenupro['sub_pad_top'] . "px;\n" : "";
$str.= $swmenupro['sub_pad_right'] ? " padding-right: " . $swmenupro['sub_pad_right'] . "px;\n" : "";
$str.= $swmenupro['sub_pad_bottom'] ? " padding-bottom: " . $swmenupro['sub_pad_bottom'] . "px;\n" : "";
$str.= $swmenupro['sub_pad_left'] ? " padding-left: " . $swmenupro['sub_pad_left'] . "px;\n" : "";
$str.="}\n";
$str.=".dtree" . $swmenupro['id'] . " a.node.file:hover {\n";
$str.=$swmenupro['sub_font_color_over'] ? " color: " . $swmenupro['sub_font_color_over'] . " ; \n" : "";
// $str.=$swmenupro['sub_back_image_over'] ? "background-image: URL(\"".$swmenupro['sub_back_image_over']."\") ; \n":"";
$str.=$swmenupro['sub_over']?" background-color: " . $swmenupro['sub_over'] . ";":"";
$str.="}\n";
$str.=".dtree" . $swmenupro['id'] . " .clip {\n";
$str.=" overflow: hidden; \n";
$str.="}\n";
//-->
//</style>
$str.=".dtree" . $swmenupro['id'] . " a.nodeSel {\n";
$str.=$swmenupro['active_font'] ? " color: " . $swmenupro['active_font'] . " !important ; \n" : "";
// $str.=" font-weight: " . $swmenupro['font_weight_over'] . " !important ; \n";
$str.=$swmenupro['active_background'] ? " background-color: " . $swmenupro['active_background'] . " !important ; \n" : "";
$str.="}\n";
for ($i = 0; $i < count($ordered); $i++) {
if ($ordered[$i]['NCSS']) {
$str.=" #sd" . $swmenupro['id'] . ($i + 1) . " {\n";
$str.=$ordered[$i]['NCSS'];
$str.="\n}\n";
}
if ($ordered[$i]['OCSS']) {
$str.=" a.nodeSel#sd" . $swmenupro['id'] . ($i + 1) . ",\n";
$str.=" #sd" . $swmenupro['id'] . ($i + 1) . ":hover {\n";
$str.=$ordered[$i]['OCSS'];
$str.="\n}\n";
}
}
return $str;
}
?>