Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/local/bin/php -q
- <?php
- $system_path = '/home/funder/public_html/system/';
- $application_folder = '/home/funder/public_html/application';
- //The default controler
- define('DCS', 'none');
- // The name of THIS file
- define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
- // The PHP file extension
- // this global constant is deprecated.
- define('EXT', '.php');
- // Path to the system folder
- define('BASEPATH', str_replace("\\", "/", $system_path));
- // Path to the front controller (this file)
- define('FCPATH', str_replace(SELF, '', __FILE__));
- // Name of the "system folder"
- define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));
- define('APPPATH', $application_folder.'/');
- require_once BASEPATH.'core/CodeIgniter.php';
- $CI =& get_instance();
- $CI->load->model('members_model');
- $CI->load->model('projects_model');
- $user = $CI->members_model->get_users(array('is_admin' => 1));
- $email = array();
- $message = '';
- foreach ($user as $value) {
- array_push($email, $value->email);
- }
- $projects = $CI->projects_model->get_completed_project_cron();
- if (!empty($projects)) {
- foreach ($projects as $value) {
- $message .= '<a href="'.site_url().'projects/view/'.$value->url.'">'.$value->title.'</a><br />';
- }
- }
- $CI->load->library('email', $CI->config->item('email'));
- $CI->email->from('info@funderhut.com', 'FunderHut');
- $CI->email->to($email);
- $CI->email->subject('Today ends projects');
- $CI->email->message($message);
- $CI->email->send();
- // }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement