function generate_info_display($item, $table, $i = '') { if ($table == 'challenges') { $pronoun = 'I'; $CI =& get_instance(); $pronoun = $CI->MItems->hasTeammates($item->id); $decsize = strlen($item->challenge_declaration); $nposize = strlen($item->name); $npostandard = 24; $decstandard = 40; $hlbstandard = 28; $hlstandard = 22; $sizecoef = 0.6; $coef = ($npostandard + $decstandard) / ($npostandard + $decstandard > $sizecoef * ($nposize + $decsize) ? $npostandard + $decstandard : $sizecoef * ($nposize + $decsize)); $hlb = round($hlbstandard * $coef); $hl = round($hlstandard * $coef); ?> <style> #featured_id<?php echo $item->id; ?> .declaration .hl {font-size:<?php echo $hl; ?> px;} #featured_id<?php echo $item->id; ?> .declaration .hlb {font-size:<?php echo $hlb; ?> px;} #Declaration p.declare {font-size:<?php echo $hlb; ?> px;} #Featured<?php echo $i; ?> #Declaration p.declare {font-size:<?php echo $hlb; ?> px;} </style> <div id="MediaViewer" class="mediaviewer"> <div class="media"> <?php if ($video = $item->challenge_video) { ?> <div class="video"> <?php echo process_video_link($video); ?> </div> <?php } elseif ($image = $item->challenge_image) { ?> <img id="main_image" src="<?php echo base_url(); ?> /media/challenges/<?php echo $item->id . '/sized_' . $image; ?> " /> <?php } ?> </div> <div class="donation"> <?php echo $this->processProgressBar($table, $item->id); ?> <a class="ceebox" href="<?php echo base_url(); ?> pieces/donate.php?challenge_id=<?php echo $item->item_id; ?> &challenge_name=<?php echo urlencode($item->challenge_title); ?> "><div class="donatebutton" id="donatebutton<?php echo $item->item_id; ?> "></div></a> <script> /*jQuery("#donatebutton<?php echo $item->id; ?> ").colorbox({href:"/pieces/donate.php?challenge_id=<?php echo $item->id; ?> &challenge_name=<?php echo urlencode($item->challenge_title); ?> ", width:'420', height:'400px'}); jQuery("#donatebutton<?php echo $item->id; ?> ").colorbox({href:"http://www.beex.org/index.php/npo/donateTo/<?php echo $item->id; ?> "});*/ </script> </div> </div> <div id="Declaration" class="declaration_class"> <p class="declare"><span class="uppercase"><?php echo $pronoun; ?> will</span><br> <?php echo anchor('challenge/view/' . $item->id, $item->challenge_declaration); ?> </span> <span class="uppercase">if</span> <span class='copper'>$<?php echo number_format($item->challenge_goal); ?> </span> <br />is raised for<br /> <?php echo anchor('npo/view/' . $item->challenge_npo, $item->name); ?> <!--<div class="sponsor"> <p>Sponsored By:</p> </div>--> </div> <?php } elseif ($table == 'clusters') { ?> <div id="MediaViewer" class="mediaviewer"> <div class="media <?php if (!$item->cluster_goal) { echo 'media_large'; } ?> "> <?php if ($video = $item->cluster_video) { ?> <div class="video"> <?php echo process_video_link($video); ?> </div> <?php } elseif ($image = $item->cluster_image) { ?> <img id="main_image" src="<?php echo base_url(); ?> /media/clusters/<?php echo $item->theid . '/sized_' . $image; ?> " /> <?php } ?> </div> <div class="donation"> <?php echo $this->processProgressBar($table, $item->theid); ?> <?php if (!$item->cluster_goal) { ?> <div class="days_left_long"><?php echo process_days_left($item->cluster_completion); ?> days left</div> <?php } ?> <?php echo anchor('cluster/joina/' . $item->theid, '<div class="joinbutton"></div>'); ?> </div> </div> <div id="Declaration" class="declaration_class"> <p class="declare"><?php echo is_int($i) ? anchor('cluster/view/' . $item->theid, $item->cluster_blurb) : $item->cluster_blurb; ?> </p> </div> <?php } elseif ($table == 'people') { } elseif ($table == 'npos') { ?> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="media"> <?php if (@$video) { ?> <div class="video" style="width:400px;"> <?php echo process_video_link($video); ?> </div> <?php } elseif ($item->logo) { ?> <img src="<?php echo base_url(); ?> /media/npos/<?php echo $item->logo; ?> " id="main_image" /> <?php } ?> <div class="donation"> <img src="<?php echo base_url(); ?> /beex/images/buttons/learn-more-long.gif" style="display:block; margin:14px auto;;" /> </div> </td> <td class="declaration"> <p> <span class='hlb'><?php echo $item->name; ?> </span> <br /><?php echo $item->blurb; ?> </p> <div style="clear:both;"></div> </td> </tr> </table> <?php } }
</div> <div id="TheJourney"> <h2 class="title titlebg">The Journey</h2> <div id="JourneyInfo" class="InfoDisplay"> <table cellpadding="0" cellspacing="0" border="0" style="width:100%; margin-top:18px;"> <tbody> <tr> <td style="width:184px; padding-left:16px;"> <img src="/beex/images/challenge/prooftop.png" /> <div id="Proof"> <h3>Proof Countdown</h3> <p><span class='big'><?php echo process_days_left($item->challenge_completion); ?> </span> days</p> <?php echo anchor('gallery/new_media/challenge/' . $item->id . '/proof', 'New Proof'); ?> <?php if ($proof_id) { echo anchor('gallery/view_gallery/' . $proof_id, 'View Proof!'); } ?> </div> <img src="/beex/images/challenge/proofbottom.png" id="ProofBottom" /> <div id="ActivityFeed"> <h2>Activity Feed</h2>
</div> <div id="TheJourney"> <h2 class="title titlebg">The Journey</h2> <div id="JourneyInfo" class="InfoDisplay"> <table cellpadding="0" cellspacing="0" border="0" style="width:100%; margin-top:18px;"> <tbody> <tr> <td style="width:184px; padding-left:16px;"> <img src="/beex/images/challenge/prooftop.png" /> <div id="Proof"> <h3>Proof Countdown</h3> <p><span class='big'><?php echo process_days_left($item->cluster_ch_completion); ?> </span> days</p> </div> <img src="/beex/images/challenge/proofbottom.png" id="ProofBottom" /> <div id="ActivityFeed"> <h2>Activity Feed</h2> </div> </td> <td style="width:26px;"> </td> <td>