Mercurial > hg > mlmmj
comparison contrib/web/php-admin/htdocs/edit.php @ 759:73c8715367fb
Better techniques for locating support files in php-admin
- existing installations will need to have their conf/config.php altered to set
the variable $confdir
author | Ben Schmidt |
---|---|
date | Wed, 06 Oct 2010 10:35:04 +1100 |
parents | d03fae037eb4 |
children | dbb144f085a5 |
comparison
equal
deleted
inserted
replaced
752:c02582939bbc | 759:73c8715367fb |
---|---|
24 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | 24 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
25 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | 25 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS |
26 * IN THE SOFTWARE. | 26 * IN THE SOFTWARE. |
27 */ | 27 */ |
28 | 28 |
29 require("../conf/config.php"); | 29 require(dirname(dirname(__FILE__))."/conf/config.php"); |
30 require("class.rFastTemplate.php"); | 30 require(dirname(__FILE__)."/class.rFastTemplate.php"); |
31 | 31 |
32 function mlmmj_boolean($name, $nicename, $text) | 32 function mlmmj_boolean($name, $nicename, $text) |
33 { | 33 { |
34 global $tpl, $topdir, $list; | 34 global $tpl, $topdir, $list; |
35 | 35 |
115 "string" => "edit_string.html", | 115 "string" => "edit_string.html", |
116 "list" => "edit_list.html")); | 116 "list" => "edit_list.html")); |
117 | 117 |
118 $tpl->assign(array("LIST" =>htmlentities($list))); | 118 $tpl->assign(array("LIST" =>htmlentities($list))); |
119 | 119 |
120 $handle = fopen("$templatedir/../conf/tunables.pl", "r"); | 120 $tunables = file_get_contents($confdir.'/tunables.pl'); |
121 $tunables = fread($handle, filesize("$templatedir/../conf/tunables.pl")); | |
122 fclose($handle); | |
123 | |
124 eval($tunables); | 121 eval($tunables); |
125 | 122 |
126 $tpl->parse("MAIN","main"); | 123 $tpl->parse("MAIN","main"); |
127 $tpl->FastPrint("MAIN"); | 124 $tpl->FastPrint("MAIN"); |
128 | 125 |