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 | |
App::uses('AppController', 'Controller'); | |
App::uses('CakeEmail', 'Network/Email'); | |
class EmailShellTestCase extends CakeTestCase { | |
public $uses = array('User', 'Issue', 'Control'); | |
public function testmail() { |
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
$tasks = $this->Control->find('all', array('conditions' => array( | |
'owner_id' => $user_id, | |
'Control.control_frequency_id' => CONTROL_FREQUENCY_WEEKLY, | |
'OR' => array ('date_last_copied' => "", | |
'date_last_copied' => Date("Y-m-d", strtotime("-7 days"))) | |
//'date_last_copied' => "" | |
))); |
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
$tasks = $this->Control->find('all', array('conditions' => array( | |
'owner_id' => $user_id, | |
'Control.control_frequency_id' => CONTROL_FREQUENCY_WEEKLY, | |
// 'OR' => array ('date_last_copied' => "", | |
'date_last_copied' => Date("Y-m-d", strtotime("+7 days")), | |
'date_last_copied' => "" | |
))); |
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
$Email = new CakeEmail('default'); // Php file | |
$Email->template('default', 'default') | |
->to($user_email) | |
->attachments(array( | |
'photo.png' => array( | |
'file' => 'http://135smart.com/wp-content/uploads/2014/08/logo.png', | |
'mimetype' => 'image/png', | |
'contentId' => 'cid:b7f792ab-98b1-435c-bbdb-14610be008c9' | |
) | |
)) |
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
; UNIX: "/path1:/path2" | |
include_path = "/usr/local/bin/phpunit.phar" | |
; | |
; Windows: "\path1;\path2" | |
;include_path = ".;c:\php\includes" | |
; | |
; PHP's default setting for include_path is ".;/path/to/php/pear" | |
; http://www.php.net/manual/en/ini.core.php#ini.include-path |
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
$Email = new CakeEmail('default'); | |
$Email->template('default', 'default') | |
->to($user_email) | |
->attachments (array('logo.png' => 'http://135smart.com/wp-content/uploads/2014/08/logo.png')) | |
->subject('Your Daily Tasks') | |
->send($email_body); |
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
<div class="controls form"> | |
<?php echo $this->Form->create('Control'); ?> | |
<?php $week_days = array(1 => "Monday", 2 => "Tuesday", 3 => "Wednesday", 4 => "Thursday", 5 => "Friday", 6 => "Saturday", 7 => "Sunday"); ?> | |
<?php $month_days = array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, | |
14 => 14, 15 => 15, 16 => 16, 17 => 17, 18 => 18, 19 => 19, 20 => 20, 21 => 21, 22 => 22, 23 => 23, 24 => 24, | |
25 => 25, 26 => 26, 27 => 27, 28 => 28, 29 => 29, 30 => 30, 31 => 31); ?> | |
<fieldset> | |
<legend><?php echo __('Add Control'); ?></legend> | |
<?php | |
echo $this->Form->input('name',array('label' => 'Task Title')); |
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 echo $this->Form->input('day_of_week',array('type' => 'select','options' => array( | |
'1' => 'Monday', 'Tuesday' => 'Tuesday','Wednesday' => 'Wednesday','Thursday' => 'Thursday', | |
'Friday' => 'Friday','Saturday' => 'Saturday','Sunday' => 'Sunday'))); ?> |
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
$('#day,#month').hide(); | |
$('#frequency').change(function(){ | |
var selection = $("option:selected", this).text(); | |
switch(selection) | |
{ | |
case 'Weekly': | |
$('#day').show(); | |
break; | |
case 'Monthly': | |
$('#month').show(); |
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 | |
echo $this->Form->input('control_frequency_id', array('id' => 'frequency')); | |
echo $this->Form->input('name', array('id' => 'week_day')); | |
?> | |
<script type="text/javascript"> | |
$('#frequency').hide(); | |
{ | |
selection = $(this).val(); |