40 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
44 $dirskins = array(
'/public/includes/ckeditor/ckeditor/skins');
45 if (!empty(
$conf->modules_parts[
'theme'])) {
46 foreach (
$conf->modules_parts[
'theme'] as $reldir) {
47 $dirskins = array_merge($dirskins, (array) ($reldir.
'theme'));
50 $dirskins = array_unique($dirskins);
58 print
'<table class="noborder centpercent">';
63 print
'<tr class="liste_titre"><th width="35%">'.$langs->trans(
"DefaultSkin").
'</th>';
64 print
'<th class="right">';
67 print
'<tr class="oddeven">';
68 print
'<td>'.$langs->trans(
"ThemeDir").
'</td>';
70 foreach ($dirskins as $dirskin) {
71 echo
'"'.$dirskin.
'" ';
77 print
'<tr class="oddeven"><td colspan="'.$colspan.
'">';
79 print
'<table class="nobordernopadding" width="100%"><tr><td><div class="center">';
82 foreach ($dirskins as $dir) {
87 if (is_dir($dirskin)) {
88 $handle = opendir($dirskin);
89 if (is_resource($handle)) {
90 while (($subdir = readdir($handle)) !==
false) {
91 if (is_dir($dirskin.
"/".$subdir) && substr($subdir, 0, 1) !=
'.'
92 && substr($subdir, 0, 3) !=
'CVS' && !preg_match(
'/common|phones/i', $subdir)) {
94 if (
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2 && preg_match(
'/_dev$/i', $subdir)) {
97 if (
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1 && preg_match(
'/_exp$/i', $subdir)) {
101 print
'<div class="inline-block" style="margin-top: 10px; margin-bottom: 10px; margin-right: 20px; margin-left: 20px;">';
102 if ($subdir == $selected_theme) {
103 print
'<input '.($edit ?
'' :
'disabled').
' type="radio" '.$bc[$var].
' style="border: 0px;" checked name="fckeditor_skin" value="'.$subdir.
'"> <b>'.$subdir.
'</b>';
105 print
'<input '.($edit ?
'' :
'disabled').
' type="radio" '.$bc[$var].
' style="border: 0px;" name="fckeditor_skin" value="'.$subdir.
'"> '.$subdir;
116 print
'</div></td></tr></table>';
show_skin($fuser, $edit=0)
Show list of ckeditor's themes.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.