# DATE 09/09/2024

# Module enable section tab:
   # File name: htdocs/core/lib/admin.lib
   # Line 788 TO 801

	// $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=marketplace";
	// $head[$h][1] = $langs->trans("ModulesMarketPlaces");
	// $head[$h][2] = 'marketplace';
	// $h++; 

	// $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=deploy";
	// $head[$h][1] = $langs->trans("AddExtensionThemeModuleOrOther");
	// $head[$h][2] = 'deploy';
	// $h++;

	// $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=develop";
	// $head[$h][1] = $langs->trans("ModulesDevelopYourModule");
	// $head[$h][2] = 'develop';
	// $h++;

# Display setting section tab:
   # File name: htdocs/core/lib/admin.lib
   # Line 842 TO 845
   
    // $head[$h][0] = DOL_URL_ROOT."/admin/tools/ui/index.php";
	// $head[$h][1] = $langs->trans("UxComponentsDoc").' '.img_picto('', 'external-link-square-alt');
	// $head[$h][2] = 'css';
	// $h++;

# Sms Setup warning text modified:
   # File location: htdocs/admin/sms.php
   # Line 170 TO 174

   if (!count($listofmethods)) {
	$descnosms = $langs->trans("NoSmsEngine", 'Cbeezai');
	// $descnosms = str_replace('{Cbeezai}', '<a href="https://www.dolistore.com/search.php?orderby=position&orderway=desc&search_query=smsmanager">Cbeezai</a>', $descnosms);
	print '<div class="warning">'.$descnosms.'</div>';
}


# Module builder warning msg removed/commanted:
   # File location: htdocs/modulebuilder/index.php
   # Line 3215 TO 3232 

$message = '';
if (!$dirins) {
	$message = info_admin($langs->trans("ConfFileMustContainCustom", DOL_DOCUMENT_ROOT.'/custom', DOL_DOCUMENT_ROOT));
	$allowfromweb = -1;
} else {
	if ($dirins_ok) {
		if (!is_writable(dol_osencode($dirins))) {
			$langs->load("errors");
			$message = info_admin($langs->trans("ErrorFailedToWriteInDir", $dirins));
			$allowfromweb = 0;
		}
	} else {
		// $message = info_admin($langs->trans("NotExistsDirect", $dirins).$langs->trans("InfDirAlt").$langs->trans("InfDirExample"));
		$allowfromweb = 0;
	}
}
if ($message) {
	print $message;
}


# Theme name changed:
   # File location: htdocs/core/lib/usergroups.lib.php
   # Line 475 to 522

   // if (is_dir($dirtheme)) {
		// 	$handle = opendir($dirtheme);
		// 	if (is_resource($handle)) {
		// 		while (($subdir = readdir($handle)) !== false) {
		// 			if (is_dir($dirtheme."/".$subdir) && substr($subdir, 0, 1) != '.'
		// 					&& substr($subdir, 0, 3) != 'CVS' && !preg_match('/common|phones/i', $subdir)) {
		// 				// Disable not stable themes (dir ends with _exp or _dev)
		// 				if (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2 && preg_match('/_dev$/i', $subdir)) {
		// 					continue;
		// 				}
		// 				if (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1 && preg_match('/_exp$/i', $subdir)) {
		// 					continue;
		// 				}

		// 				print '<div class="inline-block" style="margin-top: 10px; margin-bottom: 10px; margin-right: 20px; margin-left: 20px;">';
		// 				$file = $dirtheme."/".$subdir."/thumb.png";
		// 				$url = $urltheme."/".$subdir."/thumb.png";
		// 				if (!file_exists($file)) {
		// 					$url = DOL_URL_ROOT.'/public/theme/common/nophoto.png';
		// 				}
		// 				print '<a href="'.$_SERVER["PHP_SELF"].($edit ? '?action=edit&token='.newToken().'&mode=template&theme=' : '?theme=').$subdir.(GETPOST('optioncss', 'alpha', 1) ? '&optioncss='.GETPOST('optioncss', 'alpha', 1) : '').($fuser ? '&id='.$fuser->id : '').'" style="font-weight: normal;" alt="'.$langs->trans("Preview").'">';
		// 				if ($subdir == $conf->global->MAIN_THEME) {
		// 					$title = $langs->trans("ThemeCurrentlyActive");
		// 				} else {
		// 					$title = $langs->trans("ShowPreview");
		// 				}
		// 				print '<img class="img-skinthumb shadow" src="'.$url.'" alt="'.dol_escape_htmltag($title).'" title="'.dol_escape_htmltag($title).'" style="border: none; margin-bottom: 5px;">';
		// 				print '</a><br>';
		// 				if ($subdir == $selected_theme) {
		// 					print '<input '.($edit ? '' : 'disabled').' type="radio" class="themethumbs" style="border: 0px;" id="main_theme'.$subdir.'" checked name="main_theme" value="'.$subdir.'"><label for="main_theme'.$subdir.'"> <b>'.$subdir.'</b></label>';
		// 				} else {
		// 					print '<input '.($edit ? '' : 'disabled').' type="radio" class="themethumbs" style="border: 0px;" id="main_theme'.$subdir.'" name="main_theme" value="'.$subdir.'"><label for="main_theme'.$subdir.'"> '.$subdir.'</label>';
		// 				}
		// 				print '</div>';

		// 				$i++;
		// 			}
		// 		}
		// 	}
		// }