17 require_once SQ_INCLUDE_PATH.
'/package_manager.inc';
38 $this->_full_path = SQ_PACKAGES_PATH.
'/bulkmail';
55 'cron_job_queue_scheduled_job',
70 $system_management_folder = $GLOBALS[
'SQ_SYSTEM']->am->getSystemAsset(
'system_management_folder');
72 $GLOBALS[
'SQ_SYSTEM']->am->includeAsset(
'bulkmail_manager');
74 $bulkmail_manager_link = Array(
'asset' => &$system_management_folder,
'link_type' => SQ_LINK_TYPE_1,
'is_exclusive' => 1);
75 if (!$bulkmail_manager->create($bulkmail_manager_link)) {
76 trigger_localised_error(
'SCH0007', E_USER_ERROR);
78 pre_echo(
'Bulkmail Manager Asset Id : '.$bulkmail_manager->id);
79 $GLOBALS[
'SQ_SYSTEM']->am->registerSystemAsset(
'bulkmail_manager', $bulkmail_manager->id);
81 return $bulkmail_manager;
94 $cron_manager = $GLOBALS[
'SQ_SYSTEM']->am->getSystemAsset(
'cron_manager');
95 if (is_null($cron_manager)) {
96 trigger_localised_error(
'CORE0022', E_USER_WARNING);
101 $GLOBALS[
'SQ_SYSTEM']->am->includeAsset(
'cron_job_queue_scheduled_job');
104 $root_user = $GLOBALS[
'SQ_SYSTEM']->am->getSystemAsset(
'root_user');
105 if (!$cron_manager->addJob($cron_job, $root_user, SQ_LINK_TYPE_2)) {
106 trigger_localised_error(
'CORE0001', E_USER_ERROR,
'Queue Scheduled Bulkmail Cron Job');
108 pre_echo(
'Queue Scheduled Bulkmail Job Cron Job Id: '.$cron_job->id);
110 $GLOBALS[
'SQ_SYSTEM']->am->registerSystemAsset(
'cron_job_queue_scheduled_job', $cron_job->id);