";
gros_titre(_T('sktheme:public_theme_choice'));
echo "Configuration | Documentation
";
// Include 'onglets'
sktheme_public_choice_onglets();
debut_gauche();
// download a squelette distribution
// debut_cadre_gris_clair();
// echo '
';
// fin_cadre_gris_clair();
// download a habillage distribution
// debut_cadre_gris_clair();
// echo '';
// fin_cadre_gris_clair();
// Include 'raccourcis'
sktheme_public_theme_doc_box();
debut_droite();
//
// Choose Squelette
$s_dir = _DIR_RACINE.$GLOBALS['meta']['sktheme_squelettes_public_dir'];
debut_cadre_trait_couleur('', false, "sktheme_public_squelette_list",
_T('sktheme:available_squelette_list')." : ".$GLOBALS['meta']['sktheme_squelettes_public_dir']);
$squelettes_list = array('dist' => '' );
if (is_dir($s_dir)) {
if ($dh = opendir($s_dir)) {
while (($dir = readdir($dh)) !== false) {
if ( (is_dir($s_dir."/".$dir)) AND ($dir[0]!=".") ) {
// Check if a theme.xml exists and if the type is squelettes
if (is_file($s_dir."/".$dir."/theme.xml")) {
$s_info = sktheme_xml_get_infos($s_dir."/".$dir,"theme");
$type = (isset($s_info['type'])) ? propre($s_info['type']) : "";
if ($type == 'squelettes') {
$squelettes_list[$dir]=$s_dir."/".$dir;
}
}
}
}
closedir($dh);
}
} else {
echo _T('sktheme:no_available_squelette');
}
// Save if needed
if ($sktheme_action=="set_squelette") {
echo _T('sktheme:update_squelette_to') . $squelette_public_name. "
";
ecrire_meta('sktheme_squelette_public_name',$squelette_public_name);
// Set habillage to the original one when squelette is changed
ecrire_meta('sktheme_habillage_public_name',$original);
ecrire_metas();
} else {
$squelette_public_name = $GLOBALS['meta']['sktheme_squelette_public_name'];
}
echo '
';
echo '';
fin_cadre_trait_couleur();
//
// Choose Habillage
$h_dir = _DIR_RACINE.$GLOBALS['meta']['sktheme_habillages_public_dir'];
debut_cadre_trait_couleur('', false, "sktheme_public_habillage_list",
_T('sktheme:available_habillage_list')." : ".$GLOBALS['meta']['sktheme_habillages_public_dir']);
$habillages_list = array($original => '');
if (is_dir($h_dir)) {
if ($dh = opendir($h_dir)) {
while (($dir = readdir($dh)) !== false) {
if ( (is_dir($h_dir."/".$dir)) AND ($dir[0]!=".") ) {
// Check if a theme.xml exists and if the type is themes
if (is_file($h_dir."/".$dir."/theme.xml")) {
$h_info = sktheme_xml_get_infos($h_dir."/".$dir,"theme");
$type = (isset($h_info['type'])) ? propre($h_info['type']) : "";
if ($type == 'themes') {
$habillages_list[$dir]=$h_dir."/".$dir;
}
}
}
}
closedir($dh);
}
} else {
echo _T('sktheme:no_available_habillage');
}
// Save habillage if needed
if ($sktheme_action=="set_habillage") {
echo _T('sktheme:update_habillage_to') . $habillage_public_name . "
";
ecrire_meta('sktheme_habillage_public_name',$habillage_public_name);
ecrire_metas();
} else {
$habillage_public_name = $GLOBALS['meta']['sktheme_habillage_public_name'];
}
echo '
';
echo '';
fin_cadre_trait_couleur();
fin_page();
}
?>