<div class="tblrow th"> <div class="fleft wp15 th center">Status</div> <div class="fleft wp15 th center">Gig Name</div> <div class="fleft wp12 th center">Date</div> <div class="fleft wp12 th center">Hold Until Date</div> <div class="fleft wp12 th center">Vanue</div> <div class="clear"></div> </div> <?php if ($showcaseInfo) { foreach ($showcaseInfo as $ev) { ?> <div class="tblrow" style="margin-top:5px;"> <div class="fleft wp15 td "> <?php echo eventStatusList($ev['status']); ?> </div> <div class="fleft wp15 td "> <a href="<?php echo my_site_url(); ?> consultant/event/<?php echo $ev['eventID']; ?> "><?php echo $ev['firstName'] . ' ' . $ev['lastName']; ?> </a></div> <div class="fleft wp12 td center"> <?php echo mysqlDate2UkDate($ev['eventDate']); ?>
echo getImage('ajax-loader.gif'); ?> " /> <div style="float:right;width:50%;"> <span id="showcase_blockmsg"></span> </div> <div class="clear"></div> </div> <div class="clear"></div> <div class="row"> <label>Status:</label> <div class="inputs" > <select name ="status" id="gnenqstatus"> <?php foreach (eventStatusList() as $key => $es) { $sel = ''; if ($key == $event['status']) { $sel = 'selected'; } echo '<option value=' . $key . ' ' . $sel . '>' . $es . '</option>'; } ?> </select> </div> <label>Consultant Name:</label> <div class="inputs" > <select name="consultant"> <option value="Alen">Alen</option> </select>
function genraterecive() { $filename = "data.xls"; header('Content-type: application/ms-excel'); header('Content-Disposition: attachment; filename=' . $filename); $postData = $this->input->post(); $enquries = $this->consultants->getrecive($postData); $weeks = getWeekRange(); $enqArr = array(); $evids = array(); $invarr = array(); if ($enquries && count($enquries) > 0) { foreach ($enquries as $enq) { $dateDiff = myDateDiff($weeks[1]['start']['date'], $enq['eventDate']); $week = (int) ($dateDiff['days'] / 7 + 1); $enqArr[$week][] = $enq; $evids[] = $enq['eventID']; } $invitations = $this->consultants->getMusicianInvitationForEvent('', array('event_id' => $evids)); $invarr = array(); foreach ($invitations as $inv) { $invarr[$inv->event_id][] = $inv; } } $htmlcontent = "<table>"; $htmlcontent .= "<tr><th>Status</th><th>Gig Name</th><th>Date</th><th>Day</th><th>Lead Singer</th><th>band size</th><th>Declined</th></tr>"; $events = $enqArr; $eventInv = $invarr; //echo '<pre>'; //print_r($enquries); //die; $awaitingDepositsList = array(); $showcaseInfo = array(); //echo '<pre>'; //print_r($events); //die; if ($events) { foreach ($events as $week => $val) { foreach ($val as $ev) { $leadsinger = ''; $leadsingertip = ''; $bandsizetip = ''; $bandsize = '0'; $nrplytip = ''; $nrply = '0'; $declinedtip = ''; $declined = '0'; $musiciancost = 0; $event = $ev['eventID']; if (isset($eventInv[$ev['eventID']])) { foreach ($eventInv[$ev['eventID']] as $inv) { $cls = $inv->status == '1' ? 'yellow' : ($inv->status == '2' ? "white" : "red"); $status = $inv->status == '1' ? 'Invited' : ($inv->status == '2' ? "Accepted" : "Declined"); if ($inv->event_lead_singer) { if ($leadsinger == '') { $leadsinger = $inv->first_name . ' ' . $inv->last_name; } $leadsingertip .= '<span class=' . $cls . '>' . $inv->first_name . ' ' . $inv->last_name; $leadsingertip .= ' | ' . $status . '</span><br />'; } if ($inv->status == '1') { $nrplytip .= '<span class=' . $cls . '>' . $inv->first_name . ' ' . $inv->last_name; $nrplytip .= $inv->instrument ? ' | ' . $inv->instrument : ' | N/A'; $nrplytip .= ' | ' . $status . '</span><br />'; $nrply++; } else { if ($inv->status == '3') { $declinedtip .= '<span class=' . $cls . '>' . $inv->first_name . ' ' . $inv->last_name; $declinedtip .= $inv->instrument ? ' | ' . $inv->instrument : ' | N/A'; $declinedtip .= ' | ' . $status . '</span><br />'; $declined++; } } $bandsizetip .= '<span class=' . $cls . '>' . $inv->first_name . ' ' . $inv->last_name; $bandsizetip .= $inv->instrument ? ' | ' . $inv->instrument : ' | N/A'; $bandsizetip .= ' | ' . $status . '</span><br />'; $bandsize++; $musiciancost += $inv->base_cost + $inv->extra_time_cost + $inv->distance_cost; } } $htmlcontent .= "<tr><td>" . eventStatusList($ev['status']) . "</td><td>" . $ev['firstName'] . ' ' . $ev['lastName'] . "</td><td>" . mysqlDate2UkDate($ev['eventDate']) . "</td><td>" . getDayFromMysqlDate($ev['eventDate']) . "</td><td>" . $leadsinger . "</td><td>" . $bandsize . "</td><td>" . $declined . "</td></tr>"; } } } $htmlcontent .= "</table>"; // Create as XLS file and send to browser for download echo $htmlcontent; }