This file contains 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
function get_message_summary_by_range($start_date, $end_date) | |
{ | |
// Convert the date to start and end for MongoDB ISODate format | |
$start_date = new UTCDateTime(new \DateTime($start_date . ' 00:00:00', new DateTimeZone('UTC'))); | |
$end_date = new UTCDateTime(new \DateTime($end_date . ' 23:59:59', new DateTimeZone('UTC'))); | |
// get the date range correct | |
$match_stage = [ | |
'$match' => [ | |
'date_sent' => [ |
This file contains 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
function get_message_summary($start_date, $end_date) | |
{ | |
// get the date range correct | |
$match_stage = [ | |
'$match' => [ | |
'date_sent' => [ | |
'$gte' => $start_date, | |
'$lt' => $end_date, | |
], |
This file contains 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
function netacy_report() | |
{ | |
$cbs_deal_id = 105; | |
$report_date = date('Y-m-d', strtotime('yesterday')); | |
$title = sprintf("CBS Report: %s: %s", $this->get_title($cbs_deal_id), $report_date); | |
$payable_sql = <<<EOQ | |
SELECT sum(CASE cbs_entry_post_status_id | |
WHEN 1 THEN gross | |
WHEN 2 THEN gross | |
WHEN 3 THEN gross |
This file contains 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 is_bot() { | |
$spiders = array( | |
"abot", | |
"dbot", | |
"ebot", | |
"hbot", | |
"kbot", |
This file contains 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 | |
/** | |
* php-ansi-color | |
* | |
* Original | |
* https://github.com/loopj/commonjs-ansi-color | |
* | |
* @code | |
* <?php | |
* require_once "ansi-color.php"; |