</div> <div class="value"> <div class="add_person_link"> <?php echo link_to_function(image_tag('add', array('alt' => 'add')) . ' Add a contact', visual_effect('blind_down', 'etime_add_person_contact', array('duration' => 0.5))); ?> </div> <?php echo include_partial('add_person', array('etime_id' => $etime->getId(), 'obj_type' => 'etime', 'type' => 'contact', 'event_id' => $etime->getEvent()->getId())); ?> </div> <div class="clear_float"></div> <div class="label">Interested parties:</div> <div id="etime_interested-party" class="value"> <?php echo list_people($etime, 'getEtimePeoples', 'interested party', 'etime'); ?> </div> <div class="label"> </div> <div class="value"> <div class="add_person_link"> <?php echo link_to_function(image_tag('add', array('alt' => 'add')) . ' Add an intersted party', visual_effect('blind_down', 'etime_add_person_interested', array('duration' => 0.5))); ?> </div> <?php echo include_partial('add_person', array('etime_id' => $etime->getId(), 'obj_type' => 'etime', 'type' => 'interested', 'event_id' => $etime->getEvent()->getId())); ?> </div> <div class="clear_float"></div>
<?php /*TODO 11/24/15 -Make this code more object oriented. */ $dbh = new PDO("mysql:host=localhost;dbname=peeps", "root", ""); $function = $_POST['function_called']; switch ($function) { case "new_person": create_new_person(); break; case "list_people": list_people(); break; case "search": search($_POST['search_string']); break; } function create_new_person() { global $dbh; $dbh->exec("insert into people () values ()"); } function does_name_exist($name) { //Need to extend this to include a search of first and last names then pop up with an error indicating previous people. global $dbh; $sth = $dbh->prepare("select count(*) from people where primary_full_name=?"); $sth->bindValue(1, $name, PDO::PARAM_STR);
?> </div> <div class="clear_float"></div> </div> <div id="event"> <div class="yui-gc"> <div class="yui-u first"> <p><?php print $event->getDescription(); ?> </p> <div class="label">Contact(s):</div> <div class="value"> <?php echo list_people($event, 'getEventPeoples', 'contact', 'event', true); ?> </div> <div class="clear_float"></div> </div> <!-- end yui-u --> <div class="yui-u"> <?php if ($event->getImageUrl()) { ?> <img src="<?php echo $event->getImageUrl(); ?> "/> <?php } ?>
<?php use_helper('People'); echo list_people($event, 'getEventPeoples', $type, 'event');
<?php use_helper('People'); echo list_people($etime, 'getEtimePeoples', $type, 'etime');
<div class="label">RSVP:</div> <div class="value"> <ul> <?php foreach ($etime->getEtimeRsvps() as $rsvp) { ?> <li><?php print $etime->linkRsvp($rsvp->getRsvp()); ?> </li> <?php } ?> </ul> </div> <div class="clear_float"></div> <div class="label">Fee:</div> <div class="value"><?php print $etime->getHasFeeString(); ?> </div> <div class="clear_float"></div> <div class="label">Contact(s):</div> <div id="etime_contact" class="value"> <?php echo list_people($etime, 'getEtimePeoples', 'contact', 'etime', true); ?> </div> <div class="clear_float"></div> </div>
</div> <div class="value"> <div class="add_person_link"> <?php echo link_to_function(image_tag('add', array('alt' => 'add')) . ' Add a contact', visual_effect('blind_down', 'event_add_person_contact', array('duration' => 0.5))); ?> </div> <?php echo include_partial('add_person', array('etime_id' => null, 'obj_type' => 'event', 'type' => 'contact', 'event_id' => $event->getId())); ?> </div> <div class="clear_float"></div> <div class="label">Interested parties:</div> <div id="event_interested-party" class="value"> <?php echo list_people($event, 'getEventPeoples', 'interested party', 'event'); ?> </div> <div class="label"> </div> <div class="value"> <div class="add_person_link"> <?php echo link_to_function(image_tag('add', array('alt' => 'add')) . ' Add an intersted party', visual_effect('blind_down', 'event_add_person_interested', array('duration' => 0.5))); ?> </div> <?php echo include_partial('add_person', array('etime_id' => null, 'obj_type' => 'event', 'type' => 'interested', 'event_id' => $event->getId())); ?> </div> <div class="clear_float"></div>