forked from science-ation/science-ation
Half implement temporary saving divs/cats for single uploads. That's
going to be a lot of work. For now, always save the div/cat preferences when they hit next. Fixes a bug where the divs/cats have never been saved, but the award proceeded to upload with a div/cat id=0. Also, the uploader made a temp change to the div/cat, the change wouldn't get picked up by the upload, now it will.
This commit is contained in:
parent
8ffb710715
commit
e3cda665c2
@ -27,7 +27,7 @@ require_once('curl.inc.php');
|
|||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
|
|
||||||
//function get_cwsf_award_winners()
|
//function get_cwsf_award_winners()
|
||||||
function get_winners($awardid)
|
function get_winners($awardid, $catmap_str=NULL, $divmap_str=NULL)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -77,8 +77,8 @@ function get_winners($awardid)
|
|||||||
/* Get the fair for the div/cat mappings */
|
/* Get the fair for the div/cat mappings */
|
||||||
$q = mysql_query("SELECT * FROM fairs WHERE id='{$award['award_source_fairs_id']}'");
|
$q = mysql_query("SELECT * FROM fairs WHERE id='{$award['award_source_fairs_id']}'");
|
||||||
$fair = mysql_fetch_assoc($q);
|
$fair = mysql_fetch_assoc($q);
|
||||||
$catmap = unserialize($fair['catmap']);
|
$catmap = unserialize(($catmap_str != NULL) ? $catmap_str : $fair['catmap']);
|
||||||
$divmap = unserialize($fair['divmap']);
|
$divmap = unserialize(($divmap_str != NULL) ? $divmap_str : $fair['divmap']);
|
||||||
|
|
||||||
$winners=array( 'prizes' => array(),
|
$winners=array( 'prizes' => array(),
|
||||||
'award_name' => $award['name'],
|
'award_name' => $award['name'],
|
||||||
@ -272,7 +272,7 @@ case 'catdiv_save':
|
|||||||
echo "UPDATE fairs SET catmap='$catmap',divmap='$divmap' WHERE id='$fairs_id'";
|
echo "UPDATE fairs SET catmap='$catmap',divmap='$divmap' WHERE id='$fairs_id'";
|
||||||
echo mysql_error();
|
echo mysql_error();
|
||||||
|
|
||||||
happy_("Category/Division mapping information saved");
|
// happy_("Category/Division mapping information saved");
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
case 'confirm_load':
|
case 'confirm_load':
|
||||||
@ -433,6 +433,13 @@ $(document).ready(function() {
|
|||||||
<input type="hidden" name="award_source_fairs_id" id="award_source_fairs_id" value="0" />
|
<input type="hidden" name="award_source_fairs_id" id="award_source_fairs_id" value="0" />
|
||||||
<h4><?=i18n("Category Mapping")?></h4>
|
<h4><?=i18n("Category Mapping")?></h4>
|
||||||
<br />
|
<br />
|
||||||
|
<table style="border-width:0; width:100%">
|
||||||
|
<tr><td></td>
|
||||||
|
<td width="30%"><input type="submit" onClick="#" disabled="disabled" value="<?=i18n("<< Prev")?>" /></td>
|
||||||
|
<td width="30%"> </td>
|
||||||
|
<td width="40%"><input type="submit" onClick="catdiv_save();catdiv_next();return false;" value="<?=i18n("Next >>")?>" /></td>
|
||||||
|
</tr></table>
|
||||||
|
<br />
|
||||||
<table class="editor">
|
<table class="editor">
|
||||||
<tr><th><?=i18n("Our Category")?></th><th><?=i18n("Server Category")?></th></tr>
|
<tr><th><?=i18n("Our Category")?></th><th><?=i18n("Server Category")?></th></tr>
|
||||||
<?
|
<?
|
||||||
@ -458,15 +465,16 @@ $(document).ready(function() {
|
|||||||
echo "<option value=\"-1\">Loading...</option>";
|
echo "<option value=\"-1\">Loading...</option>";
|
||||||
echo '</select></td></tr>';
|
echo '</select></td></tr>';
|
||||||
}
|
}
|
||||||
|
/* <input type="submit" onClick="catdiv_save();return false;" value="<?=i18n("Save")?>" /></td>*/
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<table style="border-width:0; width:100%">
|
<table style="border-width:0; width:100%">
|
||||||
<tr><td></td>
|
<tr><td></td>
|
||||||
<td><input type="submit" onClick="#" disabled="disabled" value="<?=i18n("<< Prev")?>" /></td>
|
<td width="30%"><input type="submit" onClick="#" disabled="disabled" value="<?=i18n("<< Prev")?>" /></td>
|
||||||
<td><input type="submit" onClick="catdiv_save();return false;" value="<?=i18n("Save")?>" /></td>
|
<td width="30%"> </td>
|
||||||
<td><input type="submit" onClick="catdiv_next();return false;" value="<?=i18n("Next >>")?>" /></td>
|
<td width="40%"><input type="submit" onClick="catdiv_save();catdiv_next();return false;" value="<?=i18n("Next >>")?>" /></td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
@ -478,9 +486,9 @@ $(document).ready(function() {
|
|||||||
<br />
|
<br />
|
||||||
<table style="border-width:0; width:100%">
|
<table style="border-width:0; width:100%">
|
||||||
<tr><td></td>
|
<tr><td></td>
|
||||||
<td><input type="submit" onClick="confirm_prev();return false;" value="<?=i18n("<< Prev")?>" /></td>
|
<td width="30%"><input type="submit" onClick="confirm_prev();return false;" value="<?=i18n("<< Prev")?>" /></td>
|
||||||
<td><input type="submit" onClick="confirm_upload();return false;" value="<?=i18n("Upload")?>" /></td>
|
<td width="30%"><input type="submit" onClick="confirm_upload();return false;" value="<?=i18n("Upload")?>" /></td>
|
||||||
<td><input type="submit" onClick="#" disabled="disabled" value="<?=i18n("Next >>")?>" /></td>
|
<td width="40%"><input type="submit" onClick="#" disabled="disabled" value="<?=i18n("Next >>")?>" /></td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user