コード例 #1
0
        ?>
"
			data-year="<?php 
        echo $this->getAttribute('year');
        ?>
"
			class="<?php 
        echo $this->getAttribute('form');
        ?>
">

			<div id="pride-form-step-1">


				<?php 
        \OutSpokane\Entry::drawDefaultFormFields(array('organization'));
        ?>

				<div class="row">
					<div class="col-md-3">
						<label for="message">Embroidered Name</label>
					</div>
					<div class="col-md-6">
						<input class="form-control" name="message" id="message" placeholder="25 character limit">
					</div>
				</div>
				<div class="row">
					<div class="col-md-3">
						<label for="color">Color</label>
					</div>
					<div class="col-md-6">
コード例 #2
0
					</div>

				</div>
			</div>

		<?php 
    }
    ?>

	<?php 
} else {
    ?>

		<h1>
			Parade Entries
		</h1>

		<?php 
    \OutSpokane\Entry::drawExportForm(\OutSpokane\ParadeEntry::TABLE_NAME);
    $table = new \OutSpokane\EntryTable(\OutSpokane\ParadeEntry::TABLE_NAME);
    $table->prepare_items();
    $table->display();
    ?>

	<?php 
}
?>

</div>
コード例 #3
0
        \OutSpokane\Entry::drawFormField('Local Contact First Name', 'local_first_name');
        \OutSpokane\Entry::drawFormField('Local Contact Last Name', 'local_last_name');
        \OutSpokane\Entry::drawFormField('Local Contact Position', 'local_position');
        \OutSpokane\Entry::drawFormField('Email', 'local_email');
        \OutSpokane\Entry::drawFormField('Phone', 'local_phone');
        \OutSpokane\Entry::drawFormField('Address', 'local_address');
        \OutSpokane\Entry::drawFormField('City', 'local_city');
        \OutSpokane\Entry::drawFormField('State', 'local_state');
        \OutSpokane\Entry::drawFormField('Zip', 'local_zip');
        ?>

				<hr>

				<?php 
        \OutSpokane\Entry::drawFormField('Website To Link to', 'url');
        \OutSpokane\Entry::drawFormField('Sponsorship Amount', 'amount');
        ?>

				<div class="row">
					<div class="col-md-6 col-md-offset-3">

						<button id="btn-step-1">Submit</button>

					</div>
				</div>

			</div>

		</div>

	<?php 
コード例 #4
0
					</div>

				</div>
			</div>

		<?php 
    }
    ?>

	<?php 
} else {
    ?>

		<h1>
			Murder Mystery Entries
		</h1>

		<?php 
    \OutSpokane\Entry::drawExportForm(\OutSpokane\MurderMysteryEntry::TABLE_NAME);
    $table = new \OutSpokane\EntryTable(\OutSpokane\MurderMysteryEntry::TABLE_NAME);
    $table->prepare_items();
    $table->display();
    ?>

	<?php 
}
?>

</div>
コード例 #5
0
					</div>

				</div>
			</div>

		<?php 
    }
    ?>

	<?php 
} else {
    ?>

		<h1>
			Cruise Entries
		</h1>

		<?php 
    \OutSpokane\Entry::drawExportForm(\OutSpokane\CruiseEntry::TABLE_NAME);
    $table = new \OutSpokane\EntryTable(\OutSpokane\CruiseEntry::TABLE_NAME);
    $table->prepare_items();
    $table->display();
    ?>

	<?php 
}
?>

</div>
コード例 #6
0
        ?>
"
			data-year="<?php 
        echo $this->getAttribute('year');
        ?>
"
			class="<?php 
        echo $this->getAttribute('form');
        ?>
">

			<div id="pride-form-step-1">

				<?php 
        \OutSpokane\Entry::drawDefaultFormFields();
        \OutSpokane\Entry::drawFormField('Donation Amount', 'donation_amount');
        ?>

				<div class="row">
					<div class="col-md-6 col-md-offset-3">

						<button id="btn-step-1">Submit</button>

					</div>
				</div>

			</div>

		</div>

	<?php 
コード例 #7
0
								<?php 
            echo $entry_type;
            ?>
							</label><br>
						<?php 
        }
        ?>
					</div>
				</div>

				<?php 
        \OutSpokane\Entry::drawFormField('Short Description', 'description', 'textarea');
        \OutSpokane\Entry::drawFormField('Do you need float parking for after the parade?', 'float_parking_spaces', 'select', array(0 => 'No', 1 => '1 Space ($' . number_format(\OutSpokane\ParadeEntry::FLOAT_PARKING_SPACE_COST, 2) . ')', 2 => '2 Spaces ($' . number_format(\OutSpokane\ParadeEntry::FLOAT_PARKING_SPACE_COST * 2, 2) . ')'));
        \OutSpokane\Entry::drawFormField('Need Amplified Sound?', 'needs_amped_sound', 'select', array(0 => 'No', 1 => 'Yes'));
        \OutSpokane\Entry::drawFormField('Group Size');
        \OutSpokane\Entry::drawFormField('If you would like to make a donation to OutSpokane, please enter the amount here', 'donation_amount');
        ?>

				<div class="row">
					<div class="col-md-6 col-md-offset-3">

						<button id="btn-step-1">Submit</button>

					</div>
				</div>

			</div>

		</div>

	<?php 
コード例 #8
0
					</div>

				</div>
			</div>

		<?php 
    }
    ?>

	<?php 
} else {
    ?>

		<h1>
			Flag Handles
		</h1>

		<?php 
    \OutSpokane\Entry::drawExportForm(\OutSpokane\FlagHandle::TABLE_NAME);
    $table = new \OutSpokane\EntryTable(\OutSpokane\FlagHandle::TABLE_NAME);
    $table->prepare_items();
    $table->display();
    ?>

	<?php 
}
?>

</div>
コード例 #9
0
					</div>

				</div>
			</div>

		<?php 
    }
    ?>

	<?php 
} else {
    ?>

		<h1>
			Donations
		</h1>

		<?php 
    \OutSpokane\Entry::drawExportForm(\OutSpokane\Donation::TABLE_NAME);
    $table = new \OutSpokane\EntryTable(\OutSpokane\Donation::TABLE_NAME);
    $table->prepare_items();
    $table->display();
    ?>

	<?php 
}
?>

</div>
コード例 #10
0
            ?>
 Extra
								</option>
							</select>
						</div>
					</div>
				<?php 
        } else {
            ?>
					<input type="hidden" name="corner_booth" value="0">
				<?php 
        }
        ?>

				<?php 
        \OutSpokane\Entry::drawFormField('Comments/Notes', 'description', 'textarea');
        ?>

				<div class="row">
					<div class="col-md-6 col-md-offset-3">

						<button id="btn-step-1">Submit</button>

					</div>
				</div>

			</div>

		</div>

	<?php 
コード例 #11
0
 /**
  *
  */
 public function formCapture()
 {
     if (isset($_POST['pride_export'])) {
         Entry::exportToCsv();
         exit;
     }
     if (isset($_POST['edit_outspokane_entry'])) {
         switch ($_POST['form']) {
             case 'festival':
                 $entry = new FestivalEntry($_POST['id']);
                 break;
             case 'cruise':
                 $entry = new CruiseEntry($_POST['id']);
                 break;
             case 'parade':
                 $entry = new ParadeEntry($_POST['id']);
                 break;
             case 'donation':
                 $entry = new Donation($_POST['id']);
                 break;
             case 'flag':
                 $entry = new FlagHandle($_POST['id']);
                 break;
             case 'sponsorship':
                 $entry = new Sponsorship($_POST['id']);
                 break;
             default:
                 $entry = new MurderMysteryEntry($_POST['id']);
         }
         $entry->setEntryYear($_POST['entry_year'])->setOrganization($_POST['organization'])->setFirstName($_POST['first_name'])->setLastName($_POST['last_name'])->setEmail($_POST['email'])->setPhone($_POST['phone'])->setAddress($_POST['address'])->setCity($_POST['city'])->setState($_POST['state'])->setZip($_POST['zip'])->setQty($_POST['qty']);
         if ($_POST['form'] == 'festival') {
             $entry->setEntryTypeId($_POST['entry_type_id'])->setIsCornerBooth($_POST['is_corner_booth'])->setPricePerQty(preg_replace('/[^0-9\\.]/', '', $_POST['price_per_qty']))->setPriceForCornerBooth(preg_replace('/[^0-9\\.]/', '', $_POST['price_for_corner_booth']))->setDescription($_POST['description']);
         } elseif ($_POST['form'] == 'cruise') {
             $entry->setPricePerQty(preg_replace('/[^0-9\\.]/', '', $_POST['price_per_qty']));
         } elseif ($_POST['form'] == 'parade') {
             $entry->setEntryTypes($_POST['parade_entry_type'])->setDescription($_POST['description'])->setFloatParkingSpaces($_POST['float_parking_spaces'])->setFloatParkingSpaceCost(preg_replace('/[^0-9\\.]/', '', $_POST['float_parking_space_cost']))->setNeedsAmpedSound($_POST['needs_amped_sound'])->setGroupSize($_POST['group_size']);
         } elseif ($_POST['form'] == 'murder_mystery') {
             $entry->setIsSponsor($_POST['is_sponsor'])->setPricePerQty(preg_replace('/[^0-9\\.]/', '', $_POST['price_per_qty']))->setIsUpgraded($_POST['is_upgraded'])->setVegetarianQty($_POST['vegetarian_qty']);
         } elseif ($_POST['form'] == 'donation') {
             $entry->setDonationAmount($_POST['donation_amount']);
         } elseif ($_POST['form'] == 'flag') {
             $entry->setMessage($_POST['message'])->setColor($_POST['color']);
         } elseif ($_POST['form'] == 'sponsorship') {
             $entry->setPosition($_POST['position'])->setLocalPosition($_POST['local_position'])->setAmount($_POST['amount'])->setUrl($_POST['url'])->setLevel($_POST['level'])->setLocalFirstName($_POST['local_first_name'])->setLocalLastName($_POST['local_last_name'])->setLocalAddress($_POST['local_address'])->setLocalCity($_POST['local_city'])->setLocalState($_POST['local_state'])->setLocalZip($_POST['local_zip'])->setLocalEmail($_POST['local_email'])->setLocalPhone($_POST['local_phone']);
         }
         $entry->update();
         header('Location:admin.php?page=' . $_POST['return'] . '&action=view&id=' . $entry->getId());
         exit;
     }
     if (isset($_POST['pride_action'])) {
         if (wp_verify_nonce($_POST['_wpnonce'], 'pride-nonce')) {
             if ($_POST['pride_action'] == 'cc') {
                 $parts = explode('-', $_POST['txid']);
                 if (count($parts) == 2) {
                     if (is_numeric($parts[1])) {
                         switch ($_POST['form']) {
                             case 'cruise':
                                 $entry = new CruiseEntry($parts[1]);
                                 $title = 'Pride Cruise';
                                 break;
                             case 'festival':
                                 $entry = new FestivalEntry($parts[1]);
                                 $title = 'Pride Festival Entry';
                                 break;
                             case 'murder_mystery':
                                 $entry = new MurderMysteryEntry($parts[1]);
                                 $title = 'Murder Mystery Ticket';
                                 break;
                             case 'donation':
                                 $entry = new Donation($parts[1]);
                                 $title = 'Donation';
                                 break;
                             case 'flag':
                                 $entry = new FlagHandle($parts[1]);
                                 $title = 'Flag Handle';
                                 break;
                             case 'sponsorship':
                                 $entry = new Sponsorship($parts[1]);
                                 $title = 'Sponsorship';
                                 break;
                             default:
                                 /* 'parade' */
                                 $entry = new ParadeEntry($parts[1]);
                                 $title = 'Pride Parade Entry';
                         }
                         if ($entry->getCreatedAt() !== NULL && isset($_POST['stripeToken']) && strlen($_POST['stripeToken']) > 0) {
                             $stripe_keys = Entry::getStripeKeys();
                             Stripe::setApiKey($stripe_keys['secret']);
                             Stripe::setApiVersion('2016-03-07');
                             try {
                                 /** @var \Stripe\Charge $charge */
                                 $charge = Charge::create(array('amount' => round($entry->getAmountDue() * 100), 'currency' => 'usd', 'source' => $_POST['stripeToken'], 'description' => $entry->getEntryYear() . ' ' . $title));
                                 $entry->setPaidAt(time())->setPaymentMethodId(Entry::PAYMENT_METHOD_CARD)->setPaymentAmount($entry->getAmountDue())->setPaymentConfirmationNumber($charge->id)->update();
                                 header('Location:' . $_POST['_wp_http_referer']);
                                 exit;
                             } catch (Card $e) {
                                 /* card was declined */
                             }
                         }
                     }
                 }
             }
         }
     }
 }
コード例 #12
0
        }
        ?>

				</div>
			</div>

		<?php 
    }
    ?>

	<?php 
} else {
    ?>

		<h1>
			Festival Entries
		</h1>

		<?php 
    \OutSpokane\Entry::drawExportForm(\OutSpokane\FestivalEntry::TABLE_NAME);
    $table = new \OutSpokane\EntryTable(\OutSpokane\FestivalEntry::TABLE_NAME);
    $table->prepare_items();
    $table->display();
    ?>

	<?php 
}
?>

</div>
コード例 #13
0
					</div>

				</div>
			</div>

		<?php 
    }
    ?>

	<?php 
} else {
    ?>

		<h1>
			Sponsorships
		</h1>

		<?php 
    \OutSpokane\Entry::drawExportForm(\OutSpokane\Sponsorship::TABLE_NAME);
    $table = new \OutSpokane\EntryTable(\OutSpokane\Sponsorship::TABLE_NAME);
    $table->prepare_items();
    $table->display();
    ?>

	<?php 
}
?>

</div>