diff --git a/admin/fundraising.php b/admin/fundraising.php index 4c973e4f..cb55e93a 100644 --- a/admin/fundraising.php +++ b/admin/fundraising.php @@ -29,6 +29,7 @@ include ("fundraising_sponsorship_handler.inc.php"); include ("fundraising_types_handler.inc.php"); + include ("fundraising_main.inc.php"); send_header("Fundraising", array('Committee Main' => 'committee_main.php', @@ -36,7 +37,107 @@ "fundraising" ); -require_once("../dialog.inc.php"); +?> + +"; +echo "
"; +echo "
"; - while($r=mysql_fetch_object($q)) { - echo ""; - echo "id',400,250)\" href=\"#\">"; - if($r->system=="no") { - echo "id\">"; - } - - echo "\n"; - echo "".i18n($r->name)."\n"; - echo "".format_money($r->goal)."\n"; - echo "\n"; - - if($r->type=="general") - $orsql.="OR fundraising_type IS NULL"; - - $typetotal=0; - $typeprobtotal=0; - $sq=mysql_query("SELECT sponsorships.id, sponsors.organization, sponsorships.value, sponsorships.status, sponsorships.probability - FROM sponsorships - JOIN sponsors ON sponsorships.sponsors_id=sponsors.id - WHERE (sponsorships.fundraising_type='$r->type' $orsql) - AND sponsorships.year='{$config['FAIRYEAR']}' - ORDER BY status DESC, probability DESC, organization"); - while($sr=mysql_fetch_object($sq)) { - echo "id\" class=\"fundraising{$sr->status}\">"; - echo ""; - echo "id\">"; - - echo ""; - echo "id&fundraising_type=$r->type',400,250)\" href=\"#\">$sr->organization\n"; - /* - echo "id\">"; - - //only user emails can be deleted, system ones are required and cannot be removed - if($r->type=="user") - { - echo " "; - echo "id\">"; - echo " "; - echo "id\">Send"; - } - - - */ - echo "$sr->status"; - echo ""; - if($sr->status=="pending") - { - echo "$sr->probability%"; - echo ""; - echo "".format_money($sr->value).""; - } - else - echo "\n"; - - $probval=$sr->probability/100*$sr->value; - echo "".format_money($probval).""; - echo "\n"; - echo "\n"; - $typeprobtotal+=$probval; - $typetotal+=$sr->value; - } - echo ""; - echo "type',400,250)\" href=\"#\">add"; - echo "".i18n("%1 Total",array($r->name),array("Fundraising type total, eg) Award Sponsorship Total"))."\n"; - echo "".format_money($typetotal)."\n"; - echo "".format_money($typeprobtotal)."\n"; - $typediff=$typeprobtotal-$r->goal; - echo "".format_money($typediff)."\n"; - echo "\n"; - - $totalgoal+=$r->goal; - $totaldiff+=$typediff; - echo " \n"; - } - echo ""; - echo "add fund type"; - echo "".i18n("Total Net Position")."".format_money($totaldiff)."\n"; - echo "\n"; echo "
\n"; echo "
\n"; echo "Manage Sponsorship Levels\n"; @@ -137,5 +158,15 @@ require_once("../dialog.inc.php"); echo "Manage Sponsors\n"; echo "
\n"; +?> +
" id="sponsorship_editor"> +
+
+
+
" id="fund_editor"> +
+
+
+ diff --git a/admin/fundraising_main.inc.php b/admin/fundraising_main.inc.php new file mode 100644 index 00000000..0dca1381 --- /dev/null +++ b/admin/fundraising_main.inc.php @@ -0,0 +1,95 @@ +"; + + while($r=mysql_fetch_object($q)) { + echo ""; + echo "id')\" href=\"#\">"; + if($r->system=="no") { + //echo "id\">"; + echo "id)\" border=\"0\" src=\"".$config['SFIABDIRECTORY']."/images/16/button_cancel.".$config['icon_extension']."\">"; + // echo ""; + } + + echo "\n"; + echo "".i18n($r->name)."\n"; + echo "".format_money($r->goal)."\n"; + echo "\n"; + + if($r->type=="general") + $orsql.="OR fundraising_type IS NULL"; + + $typetotal=0; + $typeprobtotal=0; + $sq=mysql_query("SELECT sponsorships.id, sponsors.organization, sponsorships.value, sponsorships.status, sponsorships.probability + FROM sponsorships + JOIN sponsors ON sponsorships.sponsors_id=sponsors.id + WHERE (sponsorships.fundraising_type='$r->type' $orsql) + AND sponsorships.year='{$config['FAIRYEAR']}' + ORDER BY status DESC, probability DESC, organization"); + while($sr=mysql_fetch_object($sq)) { + echo "id\" class=\"fundraising{$sr->status}\">"; + echo ""; +// echo "id\">"; + echo "id)\" border=\"0\" src=\"".$config['SFIABDIRECTORY']."/images/16/button_cancel.".$config['icon_extension']."\">"; + // echo ""; + + echo ""; + echo "id&fundraising_type=$r->type')\">"; + //echo "id&fundraising_type=$r->type',400,250)\" href=\"#\">$sr->organization\n"; + echo "$sr->organization\n"; + /* + echo "id\">"; + + //only user emails can be deleted, system ones are required and cannot be removed + if($r->type=="user") + { + echo " "; + echo "id\">"; + echo " "; + echo "id\">Send"; + } + + + */ + echo "$sr->status"; + echo ""; + if($sr->status=="pending") + { + echo "$sr->probability%"; + echo ""; + echo "".format_money($sr->value).""; + } + else + echo "\n"; + + $probval=$sr->probability/100*$sr->value; + echo "".format_money($probval).""; + echo "\n"; + echo "\n"; + $typeprobtotal+=$probval; + $typetotal+=$sr->value; + } + echo ""; + echo "type')\" href=\"#\">add"; + echo "".i18n("%1 Total",array($r->name),array("Fundraising type total, eg) Award Sponsorship Total"))."\n"; + echo "".format_money($typetotal)."\n"; + echo "".format_money($typeprobtotal)."\n"; + $typediff=$typeprobtotal-$r->goal; + echo "".format_money($typediff)."\n"; + echo "\n"; + + $totalgoal+=$r->goal; + $totaldiff+=$typediff; + echo " \n"; + } + echo ""; + echo "add fund type"; + echo "".i18n("Total Net Position")."".format_money($totaldiff)."\n"; + echo "\n"; + exit; +} + diff --git a/admin/fundraising_sponsorship.php b/admin/fundraising_sponsorship.php index 1fbac799..56684e13 100644 --- a/admin/fundraising_sponsorship.php +++ b/admin/fundraising_sponsorship.php @@ -29,20 +29,19 @@ if($_GET['id']) { $id=intval($_GET['id']); $q=mysql_query("SELECT sponsorships.*, sponsors.organization FROM sponsorships,sponsors WHERE sponsorships.id='$id' AND sponsorships.sponsors_id=sponsors.id"); - echo "

Edit Sponsorship

"; $sponsorship=mysql_fetch_object($q); $formaction="sponsorshipedit"; } else { - echo "

Create New Sponsorship

"; $formaction="sponsorshipadd"; $fundraising_type=$_GET['fundraising_type']; } + echo "
"; echo ""; echo ""; - echo ""; + echo "
"; echo ""; echo "\n"; echo "
".i18n("Sponsor").""; @@ -101,5 +100,6 @@ echo "
\n"; + echo "
\n"; ?> diff --git a/admin/fundraising_sponsorship_handler.inc.php b/admin/fundraising_sponsorship_handler.inc.php index 7a0a0048..fca76f5d 100644 --- a/admin/fundraising_sponsorship_handler.inc.php +++ b/admin/fundraising_sponsorship_handler.inc.php @@ -1,8 +1,9 @@ diff --git a/admin/fundraising_types.php b/admin/fundraising_types.php index dccbb36c..b4793cda 100644 --- a/admin/fundraising_types.php +++ b/admin/fundraising_types.php @@ -29,19 +29,19 @@ if($_GET['id']) { $id=intval($_GET['id']); $q=mysql_query("SELECT * FROM fundraising WHERE id='$id'"); - echo "

Edit Fund

"; + // echo "

Edit Fund

"; $fund=mysql_fetch_object($q); $formaction="fundedit"; } else { - echo "

Create New Fund

"; + // echo "

Create New Fund

"; $formaction="fundadd"; } - + echo "
"; echo ""; echo ""; - echo ""; + echo "
"; if($fund->system=="yes") { echo "\n"; echo "\n"; @@ -55,5 +55,6 @@ echo "\n"; echo "\n"; echo "
".i18n("Type")."".i18n("System (non-editable)")."
".i18n("Name")."".htmlspecialchars($fund->name)."
".i18n("Description")."
".i18n("Goal")."goal\">
\n"; + echo "
\n"; ?> diff --git a/admin/fundraising_types_handler.inc.php b/admin/fundraising_types_handler.inc.php index 2082b46d..b662bb88 100644 --- a/admin/fundraising_types_handler.inc.php +++ b/admin/fundraising_types_handler.inc.php @@ -1,7 +1,7 @@ diff --git a/theme/default/sfiab.css b/theme/default/sfiab.css index f7bd24fa..13900bf6 100644 --- a/theme/default/sfiab.css +++ b/theme/default/sfiab.css @@ -315,63 +315,6 @@ tr.externalaward { } -.SFIABDialog { - font-size: 0.8em; - background-color: #EEEEFF; - border: 3px solid #5C6F90; - z-index: 140; -} - -.SFIABDialogInner { - background-color: #EEEEFF; - margin: 4px; - padding: 4px; - z-index: 150; - -} - -#FadeScreenDiv { - filter:alpha(opacity=50); - -moz-opacity:.50; - opacity:.50; - position: fixed; - display: block; - visibility: hidden; - top: 0px; - left: 0px; - width: 100%; - height: 100%; - z-index: 100; - background-color: black; - _background: none; - margin: 0px 0px 0px 0px; - clear: none; -} - -.SFIABDialogTable { - border-spacing: 1px; - color: black; - margin-left: 20px; - margin-right: 20px; - font-size: 0.9em; - border: 0px; - border-collapse: collapse; -} - -.SFIABDialogTable td { - border: 0px solid #5C6F90; - padding: 1px; -} - -.SFIABDialogTable th { - border: 1px solid #5C6F90; - font-weight: bold; - text-align: left; - color: #FFFFFF; - background-color: #5C6F90; - padding: 2px; -} - div.notice_area { position: fixed; }