";
$toolkits = self::get_toolkits();
foreach ($toolkits as $toolkit) {
$cms_toolkit = new cms_toolkit($toolkit);
$form .= $cms_toolkit->get_form();
}
$form .= "
";
return $form;
}
public static function get_json_title() {
global $base_path;
$title = array();
$toolkits = self::get_toolkits();
foreach ($toolkits as $toolkit) {
$cms_toolkit = new cms_toolkit($toolkit);
$title[$toolkit] = $cms_toolkit->get_title();
}
return encoding_normalize::json_encode($title);
}
public static function load() {
$headers = array();
$query = "select cms_toolkit_name from cms_toolkits where cms_toolkit_active = 1 order by cms_toolkit_order";
$result = pmb_mysql_query($query);
if($result) {
while ($row = pmb_mysql_fetch_object($result)) {
$cms_toolkit = new cms_toolkit($row->cms_toolkit_name);
$headers = array_merge($headers, $cms_toolkit->load());
}
}
return $headers;
}
public static function is_active($name) {
global $base_path;
$toolkits = self::get_toolkits();
foreach ($toolkits as $toolkit) {
if($toolkit == $name) {
$cms_toolkit = new cms_toolkit($toolkit);
return $cms_toolkit->get_active();
}
}
return false;
}
public static function get_toolkits() {
global $base_path;
$toolkits = array();
if(file_exists($base_path.'/opac_css/styles/common/toolkits')) {
$dh = opendir($base_path.'/opac_css/styles/common/toolkits');
while(($toolkit = readdir($dh)) !== false){
if($toolkit != "." && $toolkit != ".." && $toolkit != "CVS"){
$toolkits[] = $toolkit;
}
}
}
if(in_array('jquery', $toolkits)) {
array_splice($toolkits, array_search('jquery', $toolkits), 1);
array_unshift($toolkits,'jquery');
}
return $toolkits;
}
}