function waitlist_quick_meta_box_callback()
{
    $w = AC::load_waitlist_meta(get_the_ID());
    echo '
	<table class="meta-table">	
		<tr>
			<td><strong>Created: </strong></td>
			<td>' . $w->formatted_created . '</td>
		</tr>		
		<tr>
			<td><strong>Queue: </strong></td>
			<td>' . $w->queue_number . '</td>
		</tr>
		<tr>
			<td><strong>Reg Link: </strong></td>
			<td><a href="' . $w->reg_link . '" target="_blank">View</a></td>
		</tr>
		<tr>
			<td><strong>Link Used: </strong></td>
			<td>' . ucfirst($w->redeemed) . '</td>
		</tr>';
    if ($w->redeemed == 'true') {
        echo '<tr><td><strong>Reservation:</strong> </td><td><a href="post.php?post=' . $w->reservation . '&action=edit" target="_blank">View</a></td></tr>';
    }
    echo '
	</table>';
}
<div class="row event-header">
	<div class="col-md-6">
		<h2>View</h2>
		<form>
			<select class="event_filter" name="event_filter">
				<option value="">All Events</option>

				<?php 
foreach (AC::get_activity_types() as $t) {
    ?>
					<option value="type-<?php 
    echo $t->ID;
    ?>
"><?php 
    echo $t->post_title;
    ?>
</option>
				<?php 
}
?>

			</select>
		</form>
	</div>
</div>

<?php 
foreach (AC::get_activities() as $a) {
    include 'blurb.template.php';
}
示例#3
0
function edgimo_process_form_submission()
{
    if (isset($_POST['activity-center-submit']) || isset($_POST['activity-center-back']) || isset($_POST['waitlist-submit'])) {
        AC::process_submission();
    }
}
    ?>
				<tr>
					<td><?php 
    echo $w->formatted_created;
    ?>
</td>
					<td><?php 
    echo $w->queue_number;
    ?>
</td>
					<td><?php 
    echo $w->desired_seats;
    ?>
</td>
					<td><?php 
    echo AC::get_activity_backend_title($w->activity);
    ?>
</td>
					<td><?php 
    echo $w->name;
    ?>
</td>
					<td>
						<table>
							<tr>
								<td><a href="mailto:<?php 
    echo $w->email;
    ?>
"><?php 
    echo $w->email;
    ?>
function custom_reservation_column($column, $post_id)
{
    $r = AC::load_reservation_meta($post_id);
    //$a = AC::load_activity_meta($r->activity);
    switch ($column) {
        case 'activity':
            echo AC::get_activity_backend_title($r->activity);
            break;
        case 'seats':
            echo $r->registrant_count;
            break;
        case 'id':
            echo $r->ID;
            break;
        case 'charges':
            echo '$' . number_format($r->total, 2);
            break;
        case 'email':
            echo '<a href="mailto:' . $r->registrant_group[0]['email'] . '">' . $r->registrant_group[0]['email'] . '</a>';
            break;
        case 'phone':
            echo $r->formatted_billing_phone;
            break;
        case 'timestamp':
            echo $r->formatted_created;
            break;
    }
}
 /**
  * Add the options metabox to the array of metaboxes
  * @since  0.1.0
  */
 function add_options_page_metabox()
 {
     $cmb = new_cmb2_box(array('id' => $this->metabox_id, 'hookup' => false, 'show_on' => array('key' => 'options-page', 'value' => array($this->key))));
     $cmb->add_field(array('name' => __('Tax Rate', 'cmb2'), 'desc' => __('', 'cmb2'), 'id' => 'tax_rate', 'type' => 'select', 'options' => AC::get_tax_rate_array()));
     $cmb->add_field(array('name' => __('Admin Emails', 'cmb2'), 'desc' => __('To receive notifications in addition to the service contact', 'cmb2'), 'id' => 'admin_emails', 'type' => 'text', 'repeatable' => true));
     $cmb->add_field(array('name' => __('Cancellation/Terms', 'cmb2'), 'desc' => __('', 'cmb2'), 'id' => 'cancellation_terms', 'type' => 'textarea'));
     $cmb->add_field(array('name' => __('Confirmation Email Subject', 'cmb2'), 'desc' => __('', 'cmb2'), 'id' => 'confirmation_subject', 'type' => 'text'));
     $cmb->add_field(array('name' => __('Confirmation Email Message', 'cmb2'), 'desc' => __('', 'cmb2'), 'id' => 'confirmation_copy', 'type' => 'textarea'));
     $cmb->add_field(array('name' => __('Waitlist Email Subject', 'cmb2'), 'desc' => __('', 'cmb2'), 'id' => 'waitlist_subject', 'type' => 'text'));
     $cmb->add_field(array('name' => __('Waitlist Email Message', 'cmb2'), 'desc' => __('', 'cmb2'), 'id' => 'waitlist_copy', 'type' => 'textarea'));
     $cmb->add_field(array('name' => __('Registrant Service Contact E-mail', 'cmb2'), 'desc' => __('', 'cmb2'), 'id' => 'service_email', 'type' => 'text'));
     $cmb->add_field(array('name' => __('Waitlist Terms', 'cmb2'), 'desc' => __('', 'cmb2'), 'id' => 'waitlist_terms', 'type' => 'textarea'));
     $cmb->add_field(array('name' => __('Email Opt-In Text', 'cmb2'), 'desc' => __('', 'cmb2'), 'id' => 'optin_text', 'type' => 'textarea'));
     $cmb->add_field(array('name' => __('Opt-In Description/Disclaimer', 'cmb2'), 'desc' => __('', 'cmb2'), 'id' => 'optin_desc', 'type' => 'textarea'));
 }
function custom_activity_column($column, $post_id)
{
    $a = AC::load_current_activity();
    switch ($column) {
        case 'faculty':
            echo $a->faculty_obj->post_title;
            break;
        case 'id':
            echo $a->ID;
            break;
        case 'location':
            echo $a->location_obj->post_title;
            break;
        case 'type':
            echo $a->activity_type_obj->post_title;
            break;
        case 'capacity':
            echo $a->capacity;
            break;
        case 'reservations':
            echo $a->registrant_count;
            break;
        case 'activity_date':
            echo $a->formatted_date;
            break;
    }
}
									<strong>Waitlist Terms</strong><br />
									<?php 
echo AC::replace_codes($a->waitlist_terms);
?>
								</p>
							</div>
						</div>
					</div>
					<div class="form-group">
						<div class="row">
							<div class="col-sm-12">
								<div class="g-recaptcha" data-sitekey="6LendQoTAAAAAB7NX6fLgLBwtvW-F7eHmqbfNKr3"></div>
								<br />
								<input type="submit" value="Submit Waitlist Request" name="waitlist-submit" class="btn btn-info">
								<input type="hidden" name="form[activity_id]" value="<?php 
echo get_the_ID();
?>
">
							</div>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>

<?php 
if (ACTIVITY_CENTER_TESTMODE) {
    AC::dump_data();
}
<?php

AC::get_form_header();
?>

<div class="container-fluid">
	<div class="row">
		<div class="col-md-12">
			<div class="alert alert-info">
				<h4>Registration opens <?php 
echo $a->formatted_long_date;
?>
</h4>
				This activity isn't open for registration yet. Check back later or try another activity!
			</div>
		</div>
	</div>
</div>
				<th>Activity</th>
				<th>Name</th>
				<th>Registrants</th>
				<th>Contact</th>
				<th>Details</th>
				<th>Notes</th>
				<th>Action</th>
			</tr>
		</thead>
		<tbody>
		<?php 
while ($query->have_posts()) {
    ?>
			<?php 
    $query->the_post();
    $r = AC::load_reservation_meta(get_the_ID());
    ?>
				<tr>
					<td><?php 
    echo $r->formatted_created;
    ?>
</td>
					<td><?php 
    echo $r->ID;
    ?>
</td>
					<td><?php 
    echo $r->activity_obj->post_title;
    ?>
</td>
					<td><?php 
示例#11
0
</title>
  <base href="<?php 
echo BASE_URL;
?>
" />
  <meta name="viewport" content="width=device-width">

  <link rel="stylesheet" href="css/foundation-3.2.5.min.css" />
  <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:regular,semibold|Droid+Sans+Mono" />
<?php 
if (IN_PRODUCTION === true) {
    ?>
  <link rel="stylesheet" href="css/site.css" />
  <link rel="stylesheet" href="css/autocomplete.css" />
<?php 
} else {
    ?>
  <link type="text/css" rel="stylesheet/less" href="css/site.less" />
  <link rel="stylesheet" href="css/autocomplete.css" />
  <script src="css/less-1.3.0.min.js"></script>
<?php 
}
?>
</head>
<body>
<?php 
echo AC::buildTopBar($active_nav_tab);
?>
<div class="row" id="body_container">
<div class="twelve columns">
示例#12
0
    require APP_PATH . 'pages/home.php';
    die;
}
// docs
if ($URI[0] === 'docs') {
    require APP_PATH . 'pages/docs.php';
    die;
}
// examples
if ($URI[0] === 'examples' && $URI[1] === '') {
    require APP_PATH . 'pages/examples.php';
    die;
}
// single example
if ($URI[0] === 'examples' && $URI[1] !== '') {
    $example = AC::getExample($URI[1]);
    if ($example !== false) {
        require APP_PATH . 'pages/single_example.php';
        die;
    }
}
// themes
if ($URI[0] === 'themes') {
    require APP_PATH . 'pages/themes.php';
    die;
}
// download
if ($URI[0] === 'download') {
    require APP_PATH . 'pages/download.php';
    die;
}
示例#13
0
<?php

$page_title = 'Download';
$active_nav_tab = 'Download';
include APP_PATH . 'pages/header.php';
$releases = AC::getReleases();
$mostRecentVersion = $releases[0]['version'];
?>

<div class="section">
<h1>Downloads</h1>
<a class="button large radius" href="releases/<?php 
echo $mostRecentVersion;
?>
/autocomplete-<?php 
echo $mostRecentVersion;
?>
.zip" style="line-height: 22px">
  Download Most Recent Version<br />
  <small style="font-weight: normal; font-size: 12px">v<?php 
echo $mostRecentVersion;
?>
</small>
</a>
</div>

<?php 
foreach ($releases as $release) {
    if (array_key_exists('released', $release) === true && $release['released'] === false) {
        continue;
    }
					</optgroup>
				<?php 
}
?>
			</select>
		</div>
	</div>

	<div class="group">
		<h2>Waitlists</h2>
		<div class="group-inner">
			<a class="btn" href="edit.php?post_type=waitlist">View All</a>
			<select onchange="document.location = this.value" value="GO">
				<option value="">-- View/Edit Waitlist --</option>
				<?php 
$list = AC::get_waitlist_grouped_list();
?>
				<?php 
foreach ($list as $k => $v) {
    ?>
					<optgroup label="<?php 
    echo $k;
    ?>
">
						<?php 
    foreach ($list[$k] as $x => $y) {
        ?>
							<option value="post.php?post=<?php 
        echo $x;
        ?>
&action=edit"><?php 
示例#15
0
<?php

$page_title = 'Documentation';
$active_nav_tab = 'Docs';
include APP_PATH . 'pages/header.php';
$examples = AC::getExamples();
$docs = AC::getDocs();
?>

<div class="section">
<h2 id="config_object">Config Object</h2>
<p>The Config Object initializes the AutoComplete widget.</p>
<p>You define your <a href="docs#list_object">List Objects</a> - which control which options are available to the user - on the <a href="docs#config_object:lists"><code class="js plain">lists</code></a> property.</p>
<p>As a shorthand method, you can provide an array of <a href="docs#option_object">Option Objects</a> to the config object and it will be expanded as the default list for the widget. See the <a href="examples#1000">Simple List Example</a>.</p>
<p>As another shorthand method, you can provide a single string value and AutoComplete assumes it's an AJAX url. See the <a href="examples#2000">Simple AJAX example</a>.</p>
<table cellspacing="0">
<thead>
<tr>
  <th>Property / Type</th>
  <th>Required</th>
  <th>Default</th>
  <th>Description</th>
  <th>Example</th>
</tr>
</thead>
<tbody>
<?php 
foreach ($docs['Config Object'] as $prop) {
    echo buildPropRow('config_object', $prop, $examples);
}
?>
    	<tr class="darker">
			<td><strong>Subtotal</strong></td>
			<td><strong><?php 
    echo '$' . number_format(AC::get_subtotal(), 2);
    ?>
</strong></td>
		</tr>
		<tr class="darker">
			<td><strong>Tax</strong></td>
			<td><strong><?php 
    echo '$' . number_format(AC::calculate_tax(), 2);
    ?>
</strong></td>
		</tr>

	<?php 
}
?>

	<tr class="total">
		<td><strong>Total</strong></td>
		<td><?php 
echo '$' . number_format(AC::get_total(), 2);
?>
</td>
	</tr>
	
</table>

<hr>
 public static function replace_codes($copy)
 {
     global $a;
     global $r;
     global $w;
     $activity_codes = AC::get_activity_replacement_codes();
     preg_match_all('/\\{\\{.*?\\}\\}/', $copy, $matches);
     foreach ($matches as $match) {
         foreach ($match as $hook) {
             if (!is_null($hook)) {
                 $temp = str_replace('}}', '', $hook);
                 if (strstr($temp, '{{a_')) {
                     $tag = str_replace('{{a_', '', $temp);
                     $converted = $a->{$tag};
                     switch ($tag) {
                         case 'fee':
                             $converted = 'Fee: $' . number_format($converted, 2);
                             break;
                         case 'id':
                             $converted = $a->ID;
                             break;
                     }
                 }
                 if (strstr($temp, '{{r_')) {
                     $tag = str_replace('{{r_', '', $temp);
                     $converted = $r->{$tag};
                     switch ($tag) {
                         case 'total':
                             $converted = '$' . number_format($converted, 2);
                             break;
                         case 'gratuity':
                             if ($converted == 0) {
                                 $converted = '';
                             } else {
                                 $converted = 'Gratuity: $' . number_format($converted, 2);
                             }
                             break;
                         case 'donation':
                             if ($converted == 0) {
                                 $converted = '';
                             } else {
                                 $converted = 'Donation: $' . number_format($converted, 2);
                             }
                             break;
                         case 'id':
                             $converted = $r->ID;
                             break;
                     }
                 }
                 if (strstr($temp, '{{w_')) {
                     $tag = str_replace('{{w_', '', $temp);
                     $converted = $w->{$tag};
                     switch ($tag) {
                         case 'id':
                             $converted = $a->ID;
                             break;
                     }
                 }
                 $copy = str_replace($hook, $converted, $copy);
             }
         }
     }
     return $copy;
 }
示例#18
0
<?php

$page_title = 'Examples';
$active_nav_tab = 'Examples';
include APP_PATH . 'pages/header.php';
$examples = AC::getExamples();
?>

<div class="row">

<div class="three columns">
<div id="examples_list_container">
<?php 
echo buildExampleList($examples);
?>
</div><!-- end #examples_list -->
</div><!-- end .three.columns -->

<div class="nine columns">
  <h2 id="example_name"></h2>
  <p><a href="#" id="example_single_page_link" target="_blank">View example in new window.</a></p>
  <div id="example_html_container"></div>
  <h4>Code</h4>
  <div id="example_js_container"></div>
</div>

</div><!-- end div.row -->

<script src="js/json3.min.js"></script>
<script src="js/jquery-1.8.2.min.js"></script>
<script src="js/prettify.js"></script>
				<th>Capacity</th>
				<th>Registered</th>
				<th>Fee</th>
				<th>Gross Fees</th>
				<th>Taxes</th>
				<!--<th>Gratuity</th>-->
				<th>Add-Ons</th>
			</tr>
		</thead>
		<tbody>
		<?php 
while ($query->have_posts()) {
    ?>
			<?php 
    $query->the_post();
    $a = AC::load_current_activity();
    ?>
				<tr>
					<td><?php 
    echo $a->ID;
    ?>
</td>
					<td><a href="<?php 
    echo get_permalink($a->ID);
    ?>
" title="Edit"><?php 
    echo $a->backend_title;
    ?>
</a></td>
					<td><?php 
    echo $a->capacity;
示例#20
0
interface IAA
{
    public function method();
}
interface IAB
{
    public function method2();
}
interface IAC extends IAA, IAB
{
    public function method3();
}
class AC implements IAC
{
    public function method()
    {
        echo "method" . PHP_EOL;
    }
    public function method2()
    {
        echo "method2" . PHP_EOL;
    }
    public function method3()
    {
        echo "method3" . PHP_EOL;
    }
}
$ac = new AC();
$ac->method();
$ac->method2();
$ac->method3();