2 define('AT_INCLUDE_PATH', '../../include/');
\r
3 require (AT_INCLUDE_PATH.'vitals.inc.php');
\r
4 $_custom_css = $_base_path . 'mods/mediawiki/module.css'; // use a custom stylesheet
\r
5 admin_authenticate(AT_ADMIN_PRIV_MEDIAWIKI);
\r
7 $_POST['mw-url'] = $addslashes($_POST['mw-url']);
\r
9 if($_POST['submit']){
\r
10 foreach($_POST as $key=>$mw_config)
\r
11 if($key != "submit"){
\r
12 $sql="REPLACE INTO ".TABLE_PREFIX."config SET name='$key', value='".$mw_config."'";
\r
13 if($result= mysql_query($sql, $db)){
\r
14 $msg->addFeedback("MW_CONFIG_SAVED");
\r
15 $_config['mw-url'] = $_POST['mw-url'];
\r
18 $msg->addError("WP_CONFIG_FAIL");
\r
24 require (AT_INCLUDE_PATH.'header.inc.php');
\r
28 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
\r
29 <label for="mw-url"><?php echo _AT('mediawiki_login_url'); ?></label>
\r
30 <input type="text" name="mw-url" id="mw-url" value="<?php if($_config['mw-url']){echo $_config['mw-url'];}else{ echo 'http://';} ?>" size="60" /><br />
\r
32 <input type="submit" name="submit" value="<?php echo _AT('mediawiki_save'); ?>">
\r
37 if($_config['mw-url']){?>
\r
38 <br /><br /><a href="<?php echo $_config['mw-url']; ?>index.php?title=Special:UserLogin&returnto=Special:UserLogin" target="toolframe"><?php echo _AT('mediawiki_login'); ?></a>
\r
39 <iframe name="toolframe" src="<?php echo $_config['mw-url']; ?>" width="95%" height="450" id="frame_set">
\r
40 <p><?php echo _AT('mediawiki_no_iframes',$_config['mw-url']); ?> ?></p>
\r
43 <p><?php echo _AT('mediawiki_do_setup'); ?> ?></p>
\r
48 <?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>