">@</div> </li> <?php } $i++; } ?> </ul> </div> <div id="secondary"> <h4>Big Rocks<br /><span><?php echo getWeekRange($start, $end); ?> </span></h4> <ul> <?php if (!empty($big_rocks)) { foreach ($big_rocks as $big_rock) { ?> <li><span>»</span> <?php echo stripslashes($big_rock->item); ?> </li> <?php } } else {
function getFilter($n) { $ret = array(); switch ($n) { case 1: // 昨天 $ret['sdate'] = date('Y-m-d 00:00:00', strtotime('-1 day')); $ret['edate'] = date('Y-m-d 23:59:59', strtotime('-1 day')); break; case 2: //本星期 $ret = getWeekRange(date('Y-m-d')); break; case 3: //上一个星期 $strDate = date('Y-m-d', strtotime('-1 week')); $ret = getWeekRange($strDate); break; case 4: //上上星期 $strDate = date('Y-m-d', strtotime('-2 week')); $ret = getWeekRange($strDate); break; case 5: //本月 $ret = getMonthRange(date('Y-m-d')); break; case 6: //上月 $strDate = date('Y-m-d', strtotime('-1 month')); $ret = getMonthRange($strDate); break; } return $ret; }
<?php set_time_limit(0); //include('configDev.php'); include 'config.php'; global $DB; $DB = str_replace("\"", "", $DB); $connection_string = odbc_connect($DB, "", ""); $sqlquery = "Exec usp_USI_RefDash_GetReferralsWithoutClaims2 '" . $_GET['pPayors'] . "','" . $_GET['pYear'] . "'"; $process = odbc_exec($connection_string, $sqlquery); //echo $sqlquery; //getWeekRange(date('d-m-Y'),$WTDarray); $WTDarray = getWeekRange(date('d-m-Y')); $WTDStart = $WTDarray[0]; $WTDEnd = $WTDarray[6]; $WTD = $WTDStart . ' thru ' . $WTDEnd; $YTDStart = $_GET['pYear'] . "-01-01 00:00:00.000"; $YTDEnd = $_GET['pYear'] . "-12-31 23:59:59.999"; //Result table header echo "<div id=\"divCol1\">"; echo "<span class=\"spanLarge\">Referrals with No Claims</span>"; echo "<table><tr>"; echo "<th width=\"170px\" scope=\"col\" class=\"thDarkBlue thCenter\">Payor</th>"; echo "<th width=\"70px\" scope=\"col\" class=\"thDarkBlue thCenter\">w/in 7 <br/>Days</th>"; echo "<th width=\"70px\" scope=\"col\" class=\"thDarkBlue thCenter\">w/in 14 <br/>Days</th>"; echo "<th width=\"70px\" scope=\"col\" class=\"thDarkBlue thCenter\">w/in 21 <br/>Days</th>"; echo "<th width=\"70px\" scope=\"col\" class=\"thDarkBlue thCenter\">over 21 <br/>Days</th>"; echo "<th width=\"70px\" scope=\"col\" class=\"thDarkBlue thCenter\">YTD</th>"; echo "</tr></table>"; echo "<div class=\"Scrollable\" style=\"height:800px;\">"; echo "<table class=\"tabRefNoStatus\">";
<?php include_once "phplib/base.php"; if (isset($_GET['week'])) { if (is_numeric($_GET['week'])) { $_POST['date'] = date("r", $_GET['week']); } else { die("Wat?"); } } $time_requested = getOrSetRequestedDate(); $my_username = getUsername(); $start_end = getWeekRange($time_requested); $start_ts = $start_end[0]; $end_ts = $start_end[1]; $oncall_period = getOnCallWeekRange($time_requested); $oncall_start = $oncall_period[0]; $oncall_end = $oncall_period[1]; $protocol = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' || $_SERVER['SERVER_PORT'] == 443 ? "https://" : "http://"; $permalink = "{$protocol}{$_SERVER['SERVER_NAME']}/meeting.php?week={$start_ts}"; $page_title = getTeamName() . " Weekly Updates - Meeting View"; include_once 'phplib/header.php'; include_once 'phplib/nav.php'; $root_url = getTeamUrl(); ?> <script> function setDateToLastWeek() { $.post("meeting.php", { date: '<?php echo date("r", strtotime("1 week ago")); ?>
function sendMeetingReminder($fqdn) { $team_name = getTeamName(); $start_end = getWeekRange("1 week ago"); $start_ts = $start_end[0]; $end_ts = $start_end[1]; $permalink = "http://{$fqdn}{$ROOT_URL}/meeting.php?week={$start_ts}"; // If IRC is configured, send an IRC reminder if ($irc_channel = getTeamConfig('irc_channel')) { $message = "{$team_name} Weekly meeting time! Link to this week's meeting: {$permalink}"; sendIRCMessage($message, $irc_channel); } if ($email_report_to = getTeamConfig('email_report_to')) { $subject = "{$team_name} Weekly Meeting time!"; $message = "<html><body>"; $message .= "<h3>Weekly Meeting for week " . date("l jS F Y", $start_ts) . " to " . date("l jS F Y", $end_ts) . "</h3>"; $message .= "<p>"; $message .= "It's that time again! <br>"; $message .= "Click here for this week's meeting report: <a href='{$permalink}'>{$permalink}</a>"; $message .= "</p>"; $message .= "</body></html>"; sendEmail($email_report_to, $email_report_to, $subject, $message); } }
function event() { $data['title'] = 'CLUB BAND::Event Detail'; $data['activeMenu'] = '/'; $uri = $this->uri->segment_array(); $enqId = isset($uri[3]) ? $uri[3] : ''; $action = isset($uri[4]) ? $uri[4] : ''; if (!$enqId) { echo 'No valid parameters found'; die; } $event = $this->consultants->getEnquiryById($enqId); $data['event'] = $event; $data['products'] = $this->consultants->getProducts(); $data['invitedMusicians'] = $this->consultants->getMusicianInvitationForEvent(array('event_id' => $enqId)); $showcase = ''; $showcasels = ''; if ($event['showcaseAttended']) { $showcase = $this->consultants->getEnquiryById($event['showcaseAttended']); $showcasels = $this->consultants->getEventLeadSingers($event['showcaseAttended']); } $enquries = $this->consultants->getAllEnquiresByDate($event['eventDate']); $weeks = getWeekRange(); $enqArr = array(); $evids = array(); if ($enquries && count($enquries) > 0) { foreach ($enquries as $enq) { $enqArr[] = $enq; $evids[] = $enq['eventID']; } } $invarr = array(); if (count($evids) > 0) { $invitations = $this->consultants->getMusicianInvitationForEvent('', array('event_id' => $evids)); foreach ($invitations as $inv) { $invarr[$inv->event_id][] = $inv; } } $data['events'] = $enqArr; $data['eventInv'] = $invarr; $data['showcase'] = $showcase; $data['showcasels'] = $showcasels; $this->load->view('consultant/event', $data); }
function genratePayble() { error_reporting(1); $filename = "data.xls"; header('Content-type: application/ms-excel'); header('Content-Disposition: attachment; filename=' . $filename); $postData = $this->input->post(); $enquries = $this->consultants->getPay($postData); $weeks = getWeekRange(); $enqArr = array(); $evids = 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>Gig Name</th><th>Date</th><th>Day</th><th>Lead Singer</th><th>Band brand</th><th>Musician name</th><th>Paid Amount</th></tr>"; $events = $enqArr; $eventInv = $invarr; $awaitingDepositsList = array(); $showcaseInfo = array(); 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) { if ($inv->event_lead_singer) { $lead = "Yes"; } else { $lead = "No"; } $musician_name = $inv->first_name . ' ' . $inv->last_name; $band_brand = $inv->band_brand; $musiciancost = $inv->base_cost + $inv->extra_time_cost + $inv->distance_cost; $htmlcontent .= "<tr><td>" . $ev['firstName'] . ' ' . $ev['lastName'] . "</td><td>" . mysqlDate2UkDate($ev['eventDate']) . "</td><td>" . getDayFromMysqlDate($ev['eventDate']) . "</td><td>" . $lead . "</td><td>" . $band_brand . "</td><td>" . $musician_name . "</td><td>" . $musiciancost . "</td></tr>"; } } } } } $htmlcontent .= "</table>"; // Create as XLS file and send to browser for download echo $htmlcontent; }
// user is not logged in } else { // user is logged in. $user = User::find_by_id($_SESSION['user_id']); $home_link = DS . 'home' . DS; if (empty($user->timezone)) { $timezone_message = '<p class="error">Please set your timezone in <a href="' . SITE_URL . DS . 'account' . DS . '">your account</a>.</p>'; defined('TODAY') ? null : define('TODAY', date('l, F j, Y')); } else { date_default_timezone_set($user->timezone); defined('TODAY') ? null : define('TODAY', date('l, F j, Y')); } defined('USER_DATE_FORMAT') ? 'mm/dd/yy' : define('USER_DATE_FORMAT', $user->date_format); if ($user->week_start == 'M') { $week_start = 1; $week_range = getWeekRange($start, $end); $sql_week_range = week_range_for_sql($start, $end); } else { $week_start = 0; $week_range = getWeekRangeSunday(date('Y-m-d')); $sql_week_range = getWeekRangeSundaySql(date('Y-m-d')); } } // Login Code if (isset($_POST['login'])) { // Check fields if (!isset($_POST['username']) or strlen($_POST['username']) == 0) { $error = 'Please enter your user name'; } elseif (!isset($_POST['password']) or strlen($_POST['password']) == 0) { $error = 'Please enter your password'; } else {
function getAstroWeek($astor_name = '', $day = '') { if (empty($astor_name)) { return false; } if (empty($day)) { $day = date('Ymd'); } $url = "http://vip.astro.sina.com.cn/astro/view/{$astor_name}/weekly"; echo $url . "\n"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $content = curl_exec($ch); if (curl_errno($ch)) { echo curl_error($ch); } #else echo $content; curl_close($ch); $tg = "/作者\\/(.*?)<\\/cite>/ims"; $d = preg_match($tg, $content, $matches); $data['author'] = $matches[1]; $tg = "/<li class=\"notes\">(.*?)<\\/li>/ims"; $d = preg_match($tg, $content, $matches); $data['content'] = $matches[1]; $tg = "/<h4>整体运势(.*?)<\\/h4>(.*?)<p>(.*?)<\\/p>/is"; $d = preg_match($tg, $content, $matches); $num = getImgCount($matches[1]); $data['sum'] = $num; $data['sum_content'] = $matches[3]; $tg = "/<h4>爱情运势(.*?)<\\/h4>(.*?)<p>(.*?)<\\/p>/is"; //有对象 无对象 $tg = "/<h4>爱情运势<\\/h4>(.*?)<em>有对象:(.*?)<\\/em>(.*?)<em>没对象:(.*?)<\\/em>(.*?)<\\/div>/is"; $d = preg_match($tg, $content, $matches); $num = getImgCount($matches[2]); $data['love'] = $num; $data['love_content'] = $matches[3]; $num = getImgCount($matches[4]); $data['love_no'] = $num; $data['love_content_no'] = $matches[5]; $tg = "/<h4>健康运势(.*?)<\\/h4>(.*?)<p>(.*?)<\\/p>/is"; $d = preg_match($tg, $content, $matches); $num = getImgCount($matches[1]); $data['study'] = $num; $data['study_content'] = $matches[3]; $tg = "/<h4>工作学业运(.*?)<\\/h4>(.*?)<p>(.*?)<\\/p>/is"; $d = preg_match($tg, $content, $matches); $num = getImgCount($matches[1]); $data['work'] = $num; $data['work_content'] = $matches[3]; $tg = "/<h4>性欲指数(.*?)<\\/h4>(.*?)<p>(.*?)<\\/p>/is"; $d = preg_match($tg, $content, $matches); $num = getImgCount($matches[1]); $data['sex'] = $num; $data['sex_content'] = $matches[3]; $tg = "/<h4>红心日<\\/h4>(.*?)<p>(.*?)<br \\/>(.*?)<\\/p>/is"; $d = preg_match($tg, $content, $matches); $data['red'] = $matches[2]; $data['red_content'] = $matches[3]; $tg = "/<h4>黑梅日<\\/h4>(.*?)<p>(.*?)<br \\/>(.*?)<\\/p>/is"; $d = preg_match($tg, $content, $matches); $data['black'] = $matches[2]; $data['black_content'] = $matches[3]; $date = date('Y-m-d'); $ret = getWeekRange($date); $data['day'] = date('Ymd'); $data['day_start'] = $ret['day_start']; $data['day_end'] = $ret['day_end']; //星期开始日 //星期结束日 return $data; }