36 global $conf, $langs, $db;
39 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
43 $dirskins = array(
'/includes/ckeditor/ckeditor/skins');
44 if (!empty($conf->modules_parts[
'theme'])) {
45 foreach ($conf->modules_parts[
'theme'] as $reldir) {
46 $dirskins = array_merge($dirskins, (array) ($reldir.
'theme'));
49 $dirskins = array_unique($dirskins);
57 print
'<table class="noborder centpercent">';
62 print
'<tr class="liste_titre"><th width="35%">'.$langs->trans(
"DefaultSkin").
'</th>';
63 print
'<th class="right">';
66 print
'<tr class="oddeven">';
67 print
'<td>'.$langs->trans(
"ThemeDir").
'</td>';
69 foreach ($dirskins as $dirskin) {
70 echo
'"'.$dirskin.
'" ';
76 print
'<tr class="oddeven"><td colspan="'.$colspan.
'">';
78 print
'<table class="nobordernopadding" width="100%"><tr><td><div class="center">';
81 foreach ($dirskins as $dir) {
86 if (is_dir($dirskin)) {
87 $handle = opendir($dirskin);
88 if (is_resource($handle)) {
89 while (($subdir = readdir($handle)) !==
false) {
90 if (is_dir($dirskin.
"/".$subdir) && substr($subdir, 0, 1) <>
'.'
91 && substr($subdir, 0, 3) <>
'CVS' && !preg_match(
'/common|phones/i', $subdir)) {
93 if (
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2 && preg_match(
'/_dev$/i', $subdir)) {
96 if (
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1 && preg_match(
'/_exp$/i', $subdir)) {
100 print
'<div class="inline-block" style="margin-top: 10px; margin-bottom: 10px; margin-right: 20px; margin-left: 20px;">';
101 if ($subdir == $selected_theme) {
102 print
'<input '.($edit ?
'' :
'disabled').
' type="radio" '.$bc[$var].
' style="border: 0px;" checked name="fckeditor_skin" value="'.$subdir.
'"> <b>'.$subdir.
'</b>';
104 print
'<input '.($edit ?
'' :
'disabled').
' type="radio" '.$bc[$var].
' style="border: 0px;" name="fckeditor_skin" value="'.$subdir.
'"> '.$subdir;
115 print
'</div></td></tr></table>';