本文整理汇总了PHP中admin::build_css方法的典型用法代码示例。如果您正苦于以下问题:PHP admin::build_css方法的具体用法?PHP admin::build_css怎么用?PHP admin::build_css使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类admin
的用法示例。
在下文中一共展示了admin::build_css方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: install
function install()
{
setup::out('
<html>
<head>
<title>Simple Groupware & CMS</title>
<style>
body { width:526px; margin:10px auto; }
body, a { color: #666666; font-size: 13px; font-family: Arial, Helvetica, Verdana, sans-serif; }
a { color: #0000FF; }
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div style="border-bottom: 1px solid #666666; letter-spacing: 2px; font-size: 18px; font-weight: bold;">Simple Groupware ' . CORE_VERSION_STRING . '</div>
');
$_SESSION["groups"] = array();
$_SESSION["username"] = "setup";
$_SESSION["password"] = "";
$_SESSION["permission_sql"] = "1=1";
$_SESSION["permission_sql_read"] = "1=1";
$_SESSION["permission_sql_write"] = "1=1";
define("SETUP_DB_TYPE", $_REQUEST["db_type"]);
$update = sgsml_parser::table_column_exists("simple_sys_tree", "id");
setup::out('<img src="http://www.simple-groupware.de/cms/logo.php/' . CORE_VERSION . '/' . SETUP_DB_TYPE . '/' . PHP_VERSION . '/' . (int) $update . '" style="width:1px; height:1px;">', false);
setup::out(t("{t}Processing %s ...{/t}", "schema updates"));
setup_update::change_database_pre();
if (SETUP_DB_TYPE == "sqlite") {
sql_query("begin");
admin::rebuild_schema(false);
sql_query("commit");
} else {
admin::rebuild_schema(false);
}
setup_update::change_database_post();
setup::out(t("{t}Processing %s ...{/t}", "sessions"));
db_delete("simple_sys_session", array(), array());
setup::out(t("{t}Processing %s ...{/t}", "default groups"));
$groups = array("admin_calendar", "admin_news", "admin_projects", "admin_bookmarks", "admin_contacts", "admin_inventory", "admin_helpdesk", "admin_organisation", "admin_files", "admin_payroll", "admin_surveys", "admin_hr", "admin_intranet", "users_self_registration");
foreach ($groups as $group) {
trigger::creategroup($group);
}
setup_update::database_triggers();
setup::out(t("{t}Processing %s ...{/t}", "folder structure"));
$count = db_select_value("simple_sys_tree", "id", array());
if (empty($count)) {
$folders = "modules/core/folders.xml";
if (!empty($_REQUEST["folders"]) and file_exists(sys_custom($_REQUEST["folders"]))) {
$folders = $_REQUEST["folders"];
}
if (SETUP_DB_TYPE == "sqlite") {
sql_query("begin");
folders::create_default_folders($folders, 0, true);
sql_query("commit");
} else {
folders::create_default_folders($folders, 0, true);
}
}
setup_update::database_folders();
setup::out(t("{t}Processing %s ...{/t}", "css"));
admin::build_css();
setup::out(t("{t}Processing %s ...{/t}", "js"));
admin::build_js();
setup::out(t("{t}Processing %s ...{/t}", "icons"));
admin::build_icons();
setup::out(t("{t}Processing %s ...{/t}", "config.php"));
$vars = array("SETUP_DB_TYPE" => "'" . $_REQUEST["db_type"] . "'", "SETUP_DB_HOST" => "'" . $_REQUEST["db_host"] . "'", "SETUP_DB_NAME" => "'" . $_REQUEST["db_name"] . "'", "SETUP_DB_USER" => "'" . $_REQUEST["db_user"] . "'", "SETUP_DB_PW" => "'" . sys_encrypt($_REQUEST["db_pw"], sha1($_REQUEST["admin_user"])) . "'", "SETUP_ADMIN_USER" => "'" . $_REQUEST["admin_user"] . "'", "SETUP_ADMIN_PW" => "'" . (isset($_REQUEST["auto_update"]) ? $_REQUEST["admin_pw"] : sha1($_REQUEST["admin_pw"])) . "'");
setup::save_config($vars);
setup::install_footer();
db_optimize_tables();
}
示例2: debug_check_tpl
/**
* in debug mode, refresh template cache automatically on change
*/
function debug_check_tpl()
{
$lastmod = filemtime(SIMPLE_CACHE . "/smarty");
$folders = array("lang/", "templates/", "templates/helper/", "templates/css/", "templates/js/", SIMPLE_CUSTOM . "templates/", SIMPLE_CUSTOM . "templates/helper/", SIMPLE_CUSTOM . "templates/js/");
foreach ($folders as $folder) {
if (!is_dir($folder)) {
continue;
}
foreach (scandir($folder) as $file) {
if ($file[0] == "." or filemtime($folder . $file) <= $lastmod) {
continue;
}
dirs_create_empty_dir(SIMPLE_CACHE . "/smarty");
admin::build_css();
admin::build_js();
admin::build_icons();
return;
}
}
}