diff --git a/admin/award_awards.php b/admin/award_awards.php index 55dfda0..3a76682 100644 --- a/admin/award_awards.php +++ b/admin/award_awards.php @@ -28,6 +28,9 @@ require_once('awards.inc.php'); switch($_GET['action']) { + case 'draw_awards_table': + draw_awards_table(); + exit; case 'awardinfo_load': $id = intval($_GET['id']); $q=mysql_query("SELECT * FROM award_awards WHERE id='$id'"); @@ -395,7 +398,7 @@ function awardinfo_save() $("#popup_editor").dialog('close'); popup_editor(award_id, ''); } - + draw_awards_table(); }); return false; } @@ -865,6 +868,10 @@ function award_delete(id) } +function draw_awards_table(){ + $('#awards_table').load("?action=draw_awards_table"); +} + $(document).ready(function() { awardlist_refresh(); }); @@ -965,43 +972,62 @@ echo "";

" /> +echo "
"; +draw_awards_table(); +echo "
"; -if($sponsors_id) $where_asi="AND sponsors_id='$sponsors_id'"; -if($award_types_id) $where_ati="AND award_types_id='$award_types_id'"; -// if($award_sponsors_confirmed) $where_asc="AND award_sponsors.confirmed='$award_sponsors_confirmed'"; +if($_GET['action'] == 'edit_prize_template') { -if(!$orderby) $orderby="order"; + ?> + " /> -if(mysql_num_rows($q)) - { - echo "* ".i18n("Click on the Script Order and drag to re-order the awards"); - echo ""; - echo ""; - echo " "; - echo " "; + if($sponsors_id) $where_asi="AND sponsors_id='$sponsors_id'"; + if($award_types_id) $where_ati="AND award_types_id='$award_types_id'"; + // if($award_sponsors_confirmed) $where_asc="AND award_sponsors.confirmed='$award_sponsors_confirmed'"; + + if(!$orderby) $orderby="order"; + + $q=mysql_query("SELECT + award_awards.id, + award_awards.name, + award_awards.order, + award_awards.award_source_fairs_id, + award_types.type, + sponsors.organization + FROM + award_awards + LEFT JOIN sponsors ON sponsors.id = award_awards.sponsors_id + LEFT JOIN award_types ON award_types.id = award_awards.award_types_id + WHERE + award_awards.year='{$config['FAIRYEAR']}' + $where_asi + $where_ati + AND award_types.year='{$config['FAIRYEAR']}' + ORDER BY `$orderby`"); + + echo mysql_error(); + + if(mysql_num_rows($q)){ + echo "* ".i18n("Click on the Script Order and drag to re-order the awards"); + echo "
".i18n("Order")."".i18n("Sponsor")."
"; + echo ""; + echo " "; + echo " "; echo " "; echo " "; echo " "; @@ -1031,8 +1057,8 @@ if(mysql_num_rows($q)) echo " "; echo " \n"; @@ -1041,24 +1067,9 @@ if(mysql_num_rows($q)) if($hasexternal) echo ""; echo "
".i18n("Order")."".i18n("Sponsor")."".i18n("Type")."".i18n("Name")."".i18n("Prizes")."{$numr['num']}"; -// echo ""; -// echo " "; + // echo ""; + // echo " "; echo "id});\" href=\"#\" >"; echo "
".i18n("Indicates award imported from an external source")."
\n"; - echo ""; +// echo ""; } echo "
"; -// echo "Edit prizes for the generic prize template"; - - - if($_GET['action'] == 'edit_prize_template') { - - ?> - Edit prizes for the generic prize template"; +} ?> diff --git a/admin/donors.php b/admin/donors.php index 5f311c3..2abe9c3 100644 --- a/admin/donors.php +++ b/admin/donors.php @@ -741,7 +741,7 @@ function draw_contact_form($sponsor_id, $contact = null){ - + @@ -1239,7 +1239,7 @@ echo "
"; */ ?> - + " onClick="return organizationinfo_save()" />