This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function _getHolidayList() { | |
$newArray = array(); | |
$dt = new \DateTime(); | |
$newArray[] = $dt->modify("First day of January")->format('Y-m-d'); | |
$newArray[] = $dt->modify("Third Monday of January")->format('Y-m-d'); | |
$newArray[] = $dt->modify("Third Monday of February")->format('Y-m-d'); | |
$newArray[] = $dt->modify("Last Monday of May")->format("Y-m-d"); | |
$newArray[] = $dt->modify("July 4")->format("Y-m-d"); | |
$newArray[] = $dt->modify("First Monday of September")->format("Y-m-d"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public $ourDate; | |
public function _getLastBusinessDay() { | |
// lets figure out the business days.. | |
$holidayList = array('2013-02-06'); | |
$this->ourDate = date('Y-m-d', strtotime('-5 weekdays')); | |
foreach ($holidayList as $holiday) { | |
$timestamp = strtotime($holiday);// holiday lists.. | |
$tmp = strtotime($this->ourDate); // todays date - 5 weekdays | |
$tmp1 = strtotime(date('Y-m-d')); // todays date |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function _getLastBusinessDay() { | |
// lets figure out the business days.. | |
$holidayList = array(); | |
$ourDate = date('Y-m-d', strtotime('-5 weekdays')); | |
if (in_array($ourDate, $holidayList)) { | |
$ourDate = date('Y-m-d', strtotime('-1 weekday', strtotime($ourDate))); | |
} | |
return $ourDate; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function replacer($array) { | |
$newArray = array(); | |
foreach ($array as $key => $val) { | |
foreach ($val as $k=>$v) { | |
if ($v == "" || $v === null) { | |
$newArray[$key][$k] = "empty"; | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function replacer($array) { | |
$newArray = array(); | |
foreach ($array as $key=>$val) { | |
if (preg_grep('/^$/', $val)) { | |
$newArray[$key] = "empty"; | |
} else { | |
$newArray[$key] = $val; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$count = $this->bookings->where('archive != 0')->where('status', Status::get('accepted')->id)->count_all() | |
$config['base_url'] = site_url('admin/creatives/manage'); | |
$config['uri_segment'] = 4; | |
$config['total_rows'] = $count; | |
$config['per_page'] = '20'; | |
$config['num_links'] = '10'; | |
$this->pagination->initialize($config); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="/assets/application.css?body=1" media="all" rel="stylesheet" type="text/css" /> | |
<link href="/assets/custom.css?body=1" media="all" rel="stylesheet" type="text/css" /> | |
<link href="/assets/sessions.css?body=1" media="all" rel="stylesheet" type="text/css" /> | |
<link href="/assets/static_pages.css?body=1" media="all" rel="stylesheet" type="text/css" /> | |
<link href="/assets/users.css?body=1" media="all" rel="stylesheet" type="text/css" /> | |
<script src="/assets/jquery.js?body=1" type="text/javascript"></script> | |
<script src="/assets/jquery_ujs.js?body=1" type="text/javascript"></script> | |
<script src="/assets/bootstrap-transition.js?body=1" type="text/javascript"></script> | |
<script src="/assets/bootstrap-affix.js?body=1" type="text/javascript"></script> | |
<script src="/assets/bootstrap-alert.js?body=1" type="text/javascript"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= link_to "delete", micropost, method: :delete, | |
data: { confirm: "You sure?" }, | |
title: micropost.content %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="<%= user_path(current_user) %>"> | |
<%= gravatar_for current_user, size: 52 %> | |
</a> | |
<h1> | |
<%= current_user.name %> | |
</h1> | |
<span> | |
<%= link_to "view my profile", current_user %> | |
</span> | |
<span> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% if signed_in? %> | |
<div class="row"> | |
<aside class="span4"> | |
<section> | |
<%= render 'shared/user_info' %> | |
</section> | |
<section> | |
<%= render 'shared/micropost_form' %> | |
</section> | |
</aside> |