|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 // This file is part of Moodle - http://moodle.org/ 00003 // 00004 // Moodle is free software: you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation, either version 3 of the License, or 00007 // (at your option) any later version. 00008 // 00009 // Moodle is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU General Public License for more details. 00013 // 00014 // You should have received a copy of the GNU General Public License 00015 // along with Moodle. If not, see <http://www.gnu.org/licenses/>. 00016 00026 if (file_exists(dirname(dirname(__FILE__)).'/config.php')) { 00027 // already installed 00028 die; 00029 } 00030 00031 // include only the necessary stuff from themes, keep this small otherwise IE will complain... 00032 $files = array( 00033 'base/style/pagelayout.css', 00034 'base/style/core.css', 00035 'standard/style/core.css', 00036 'standard/style/css3.css'); 00037 00038 00039 $content = ''; 00040 00041 foreach($files as $file) { 00042 $content .= file_get_contents(dirname(dirname(__FILE__)).'/theme/'.$file) . "\n"; 00043 } 00044 00045 $content .= " 00046 00047 h2 { 00048 text-align:center; 00049 } 00050 00051 #installdiv { 00052 width: 800px; 00053 margin-left:auto; 00054 margin-right:auto; 00055 } 00056 00057 #installdiv dt { 00058 font-weight: bold; 00059 } 00060 00061 #installdiv dd { 00062 padding-bottom: 0.5em; 00063 } 00064 00065 .stage { 00066 margin-top: 2em; 00067 margin-bottom: 2em; 00068 width: 100%; 00069 padding:25px; 00070 } 00071 00072 #installform { 00073 width: 100%; 00074 } 00075 00076 #nav_buttons input { 00077 margin: 5px; 00078 } 00079 00080 #envresult { 00081 text-align:left; 00082 width: auto; 00083 margin-left:10em; 00084 } 00085 00086 #envresult dd { 00087 color: red; 00088 } 00089 00090 .formrow { 00091 clear:both; 00092 text-align:left; 00093 padding: 8px; 00094 } 00095 00096 .formrow label.formlabel { 00097 display:block; 00098 float:left; 00099 width: 260px; 00100 margin-right:5px; 00101 text-align:right; 00102 } 00103 00104 .formrow .forminput { 00105 display:block; 00106 float:left; 00107 } 00108 00109 fieldset { 00110 text-align:center; 00111 border:none; 00112 } 00113 00114 .hint { 00115 display:block; 00116 clear:both; 00117 padding-left: 265px; 00118 color: red; 00119 } 00120 00121 .configphp { 00122 text-align:left; 00123 background-color:white; 00124 padding:1em; 00125 width:95%; 00126 } 00127 00128 .stage6 .stage { 00129 font-weight: bold; 00130 color: red; 00131 } 00132 00133 "; 00134 00135 // fix used urls 00136 $content = str_replace('[[pix:theme|hgradient]]', '../theme/standard/pix/hgradient.jpg', $content); 00137 $content = str_replace('[[pix:theme|vgradient]]', '../theme/standard/pix/vgradient.jpg', $content); 00138 00139 @header('Content-Disposition: inline; filename="css.php"'); 00140 @header('Cache-Control: no-store, no-cache, must-revalidate'); 00141 @header('Cache-Control: post-check=0, pre-check=0', false); 00142 @header('Pragma: no-cache'); 00143 @header('Expires: Mon, 20 Aug 1969 09:23:00 GMT'); 00144 @header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); 00145 @header('Accept-Ranges: none'); 00146 @header('Content-Type: text/css; charset=utf-8'); 00147 00148 echo $content;