diff --git a/admin/fair_stats.php b/admin/fair_stats.php index 03ad6aa..cd57523 100644 --- a/admin/fair_stats.php +++ b/admin/fair_stats.php @@ -193,7 +193,7 @@ } - echo notice(i18n('Getting statistics request and existing stats data from server %1', array($fair['url']))); + echo notice(i18n('Getting stats request and downloading existing stats from server %1', array($fair['url']))); /* Query the server to see what stats we need */ $xmldata=array("sfiab"=>array( "username"=>$fair['username'], diff --git a/fair_info.php b/fair_info.php index 9c1efc1..3500eeb 100644 --- a/fair_info.php +++ b/fair_info.php @@ -27,6 +27,16 @@ require_once("user.inc.php"); require_once("fair.inc.php"); + function yesno($name, $val) + { + echo ""; + } + if($_SESSION['embed'] == true) { $u = user_load($_SESSION['embed_edit_id']); @@ -50,14 +60,22 @@ $name = mysql_escape_string(stripslashes($_POST['name'])); $abbrv = mysql_escape_string(stripslashes($_POST['abbrv'])); $url = mysql_escape_string($_POST['url']); + $website = mysql_escape_string($_POST['website']); $type = array_key_exists($_POST['type'], $fair_type) ? $_POST['type'] : ''; $username = mysql_escape_string(stripslashes($_POST['username'])); $password = mysql_escape_string(stripslashes($_POST['password'])); + $enable_stats = ($_POST['enable_stats'] == 'yes') ? 'yes' : 'no'; + $enable_awards = ($_POST['enable_awards'] == 'yes') ? 'yes' : 'no'; + $enable_winners = ($_POST['enable_winners'] == 'yes') ? 'yes' : 'no'; $q = mysql_query("UPDATE fairs SET `name`='$name', `abbrv`='$abbrv', `url`='$url', + `website`='$website', `type`='$type' , `username`='$username', - `password`='$password' + `password`='$password', + `enable_stats`='$enable_stats', + `enable_awards`='$enable_awards', + `enable_winners`='$enable_winners' WHERE id=$id"); $u['fairs_id'] = $id; @@ -116,12 +134,26 @@ if($_SESSION['embed'] == true) { if($f['url'] == '') $f['url'] = 'http://'; echo ""; echo ''; + echo ''.i18n('Website').''; + if($f['website'] == '') $f['website'] = 'http://'; + echo ""; + echo ''; echo ''.i18n('Username').''; echo ""; echo ''; echo ''.i18n('Password').''; echo ""; echo ''; + echo ''.i18n('Enable stats').''; + yesno('enable_stats', $f['enable_stats']); + echo ''; + echo ''.i18n('Enable awards download').''; + yesno('enable_awards', $f['enable_awards']); + echo ''; + echo ''.i18n('Enable winners upload').''; + yesno('enable_winners', $f['enable_winners']); + echo ''; + echo ""; echo "
";