2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 /*********************************************************************************
4 * SugarCRM Community Edition is a customer relationship management program developed by
5 * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
7 * This program is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU Affero General Public License version 3 as published by the
9 * Free Software Foundation with the addition of the following permission added
10 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
11 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
12 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
14 * This program is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
19 * You should have received a copy of the GNU Affero General Public License along with
20 * this program; if not, see http://www.gnu.org/licenses or write to the Free
21 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
25 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
27 * The interactive user interfaces in modified source and object code versions
28 * of this program must display Appropriate Legal Notices, as required under
29 * Section 5 of the GNU Affero General Public License version 3.
31 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
32 * these Appropriate Legal Notices must retain the display of the "Powered by
33 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
34 * technical reasons, the Appropriate Legal Notices must display the words
35 * "Powered by SugarCRM".
36 ********************************************************************************/
38 /*********************************************************************************
40 * Description: TODO: To be written.
41 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
42 * All Rights Reserved.
43 * Contributor(s): ______________________________________..
44 ********************************************************************************/
46 /******** general UI Stuff ***********/
50 require_once('modules/Campaigns/utils.php');
55 global $app_list_strings;
58 global $sugar_version, $sugar_config;
61 /*************** GENERAL SETUP WORK **********/
63 $focus = new Campaign();
64 if(isset($_REQUEST['record'])) {
65 $focus->retrieve($_REQUEST['record']);
67 if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
76 $GLOBALS['log']->info("Campaign NewsLetter Wizard");
78 if( (isset($_REQUEST['wizardtype']) && $_REQUEST['wizardtype']==1) || ($focus->campaign_type=='NewsLetter')){
79 echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_NEWSLETTER WIZARD_TITLE'].$focus->name), true, false);
81 echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_CAMPAIGN'].$focus->name), true, false);
85 $ss = new Sugar_Smarty();
86 $ss->assign("MOD", $mod_strings);
87 $ss->assign("APP", $app_strings);
89 if (isset($_REQUEST['return_module'])) $ss->assign("RETURN_MODULE", $_REQUEST['return_module']);
90 if (isset($_REQUEST['return_action'])) $ss->assign("RETURN_ACTION", $_REQUEST['return_action']);
91 if (isset($_REQUEST['return_id'])) $ss->assign("RETURN_ID", $_REQUEST['return_id']);
92 // handle Create $module then Cancel
93 if (empty($_REQUEST['return_id'])) {
94 $ss->assign("RETURN_ACTION", 'index');
96 $ss->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
98 require_once('include/QuickSearchDefaults.php');
99 $qsd = new QuickSearchDefaults();
100 $qsd->setFormName('wizform');
101 $sqs_objects = array('parent_name' => $qsd->getQSParent(),
102 'assigned_user_name' => $qsd->getQSUser(),
103 //'prospect_list_name' => getProspectListQSObjects(),
104 'test_name' => getProspectListQSObjects('prospect_list_type_test', 'test_name','wiz_step3_test_name_id'),
105 'unsubscription_name' => getProspectListQSObjects('prospect_list_type_exempt', 'unsubscription_name','wiz_step3_unsubscription_name_id'),
106 'subscription_name' => getProspectListQSObjects('prospect_list_type_default', 'subscription_name','wiz_step3_subscription_name_id'),
110 $quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '</script>';
112 $ss->assign("JAVASCRIPT", $quicksearch_js);
115 //set the campaign type based on wizardtype value from request object
116 $campaign_type = 'newsletter';
117 if( (isset($_REQUEST['wizardtype']) && $_REQUEST['wizardtype']==1) || ($focus->campaign_type=='NewsLetter')){
118 $campaign_type = 'newsletter';
119 $ss->assign("CAMPAIGN_DIAGNOSTIC_LINK", diagnose());
120 }elseif( (isset($_REQUEST['wizardtype']) && $_REQUEST['wizardtype']==2) || ($focus->campaign_type=='Email') ){
121 $campaign_type = 'email';
122 $ss->assign("CAMPAIGN_DIAGNOSTIC_LINK", diagnose());
124 $campaign_type = 'general';
128 //******** CAMPAIGN HEADER AND BUDGET UI DIV Stuff (both divs) **********/
130 $popup_request_data = array(
131 'call_back_function' => 'set_return',
132 'form_name' => 'wizform',
133 'field_to_name_array' => array(
134 'id' => 'assigned_user_id',
135 'user_name' => 'assigned_user_name',
138 $ss->assign('encoded_users_popup_request_data', $json->encode($popup_request_data));
142 $ss->assign("CALENDAR_LANG", "en");
143 $ss->assign("USER_DATEFORMAT", '('. $timedate->get_user_date_format().')');
144 $ss->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
145 $ss->assign("CAMP_DATE_ENTERED", $focus->date_entered);
146 $ss->assign("CAMP_DATE_MODIFIED", $focus->date_modified);
147 $ss->assign("CAMP_CREATED_BY", $focus->created_by_name);
148 $ss->assign("CAMP_MODIFIED_BY", $focus->modified_by_name);
149 $ss->assign("ID", $focus->id);
150 $ss->assign("CAMP_TRACKER_TEXT", $focus->tracker_text);
151 $ss->assign("CAMP_START_DATE", $focus->start_date);
152 $ss->assign("CAMP_END_DATE", $focus->end_date);
153 $ss->assign("CAMP_BUDGET", $focus->budget);
154 $ss->assign("CAMP_ACTUAL_COST", $focus->actual_cost);
155 $ss->assign("CAMP_EXPECTED_REVENUE", $focus->expected_revenue);
156 $ss->assign("CAMP_EXPECTED_COST", $focus->expected_cost);
157 $ss->assign("CAMP_OBJECTIVE", $focus->objective);
158 $ss->assign("CAMP_CONTENT", $focus->content);
159 $ss->assign("CAMP_NAME", $focus->name);
160 $ss->assign("CAMP_RECORD", $focus->id);
161 $ss->assign("CAMP_IMPRESSIONS", $focus->impressions);
162 if (empty($focus->assigned_user_id) && empty($focus->id)) $focus->assigned_user_id = $current_user->id;
163 if (empty($focus->assigned_name) && empty($focus->id)) $focus->assigned_user_name = $current_user->user_name;
164 $ss->assign("ASSIGNED_USER_OPTIONS", get_select_options_with_id(get_user_array(TRUE, "Active", $focus->assigned_user_id), $focus->assigned_user_id));
165 $ss->assign("ASSIGNED_USER_NAME", $focus->assigned_user_name);
166 $ss->assign("ASSIGNED_USER_ID", $focus->assigned_user_id );
168 if((!isset($focus->status)) && (!isset($focus->id)))
169 $ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['campaign_status_dom'], 'Planning'));
171 $ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['campaign_status_dom'], $focus->status));
173 //hide frequency options if this is not a newsletter
174 if($campaign_type == 'newsletter'){
175 $ss->assign("HIDE_FREQUENCY_IF_NEWSLETTER", "Select");
176 $ss->assign("FREQUENCY_LABEL", $mod_strings['LBL_CAMPAIGN_FREQUENCY']);
177 if((!isset($focus->frequency)) && (!isset($focus->id))){
178 $ss->assign("FREQ_OPTIONS", get_select_options_with_id($app_list_strings['newsletter_frequency_dom'], 'Monthly'));
180 $ss->assign("FREQ_OPTIONS", get_select_options_with_id($app_list_strings['newsletter_frequency_dom'], $focus->frequency));
183 $ss->assign("HIDE_FREQUENCY_IF_NEWSLETTER", "input type='hidden'");
184 $ss->assign("FREQUENCY_LABEL", ' ');
186 global $current_user;
187 require_once('modules/Currencies/ListCurrency.php');
188 $currency = new ListCurrency();
189 if(isset($focus->currency_id) && !empty($focus->currency_id)){
190 $selectCurrency = $currency->getSelectOptions($focus->currency_id);
191 $ss->assign("CURRENCY", $selectCurrency);
193 else if($current_user->getPreference('currency') && !isset($focus->id))
195 $selectCurrency = $currency->getSelectOptions($current_user->getPreference('currency'));
196 $ss->assign("CURRENCY", $selectCurrency);
199 $selectCurrency = $currency->getSelectOptions();
200 $ss->assign("CURRENCY", $selectCurrency);
203 global $current_user;
204 if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
206 if(!empty($_REQUEST['record'])){
207 $record = $_REQUEST['record'];
209 $ss->assign("ADMIN_EDIT","<a href='index.php?action=index&module=DynamicLayout&from_action=".$_REQUEST['action'] ."&from_module=".$_REQUEST['module'] ."&record=".$record. "'>".SugarThemeRegistry::current()->getImage("EditLayout","border='0' alt='Edit Layout' align='bottom'")."</a>");
212 echo $currency->getJavascript();
214 $seps = get_number_seperators();
215 $ss->assign("NUM_GRP_SEP", $seps[0]);
216 $ss->assign("DEC_SEP", $seps[1]);
219 //fill out the campaign type dropdown based on type of campaign being created
220 if($campaign_type == 'general'){
221 //get regular campaign dom object and strip out entries for email and newsletter
222 $myTypeOptionsArr = array();
223 $OptionsArr = $app_list_strings['campaign_type_dom'];
224 foreach($OptionsArr as $key=>$val){
225 if($val =='Newsletter' || $val =='Email' || $val =='' ){
228 $myTypeOptionsArr[$key] = $val;
232 //now create select option html without the newsletter/email, or blank ('') options
233 $type_option_html =' ';
235 foreach($myTypeOptionsArr as $optionKey=>$optionName){
236 //if the selected flag is set to true, then just populate
238 $type_option_html .="<option value='$optionKey' >$optionName</option>";
239 }else{//if not selected yet, check to see if this option should be selected
240 //if the campaign type is not empty, then select the retrieved type
241 if(!empty($focus->campaign_type)){
242 //check to see if key matches campaign type
243 if($optionKey == $focus->campaign_type){
245 $type_option_html .="<option value='$optionKey' selected>$optionName</option>";
246 //mark as selected for next time
249 //key does not match, just populate
250 $type_option_html .="<option value='$optionKey' >$optionName</option>";
253 //since the campaign type is empty, then select first one
254 $type_option_html .="<option value='$optionKey' selected>$optionName</option>";
255 //mark as selected for next time
260 //assign the modified dropdown for general campaign creation
261 $ss->assign("CAMPAIGN_TYPE_OPTIONS", $type_option_html);
262 $ss->assign("SHOULD_TYPE_BE_DISABLED", "select");
263 }elseif($campaign_type == 'email'){
264 //Assign Email as type of campaign being created an disable the select widget
265 $ss->assign("CAMPAIGN_TYPE_OPTIONS", $mod_strings['LBL_EMAIL']);
266 $ss->assign("SHOULD_TYPE_BE_DISABLED", "input type='hidden' value='Email'");
268 //Assign NewsLetter as type of campaign being created an disable the select widget
269 $ss->assign("CAMPAIGN_TYPE_OPTIONS", $mod_strings['LBL_NEWSLETTER']);
270 $ss->assign("SHOULD_TYPE_BE_DISABLED", "input type='hidden' value='NewsLetter'");
278 /*************** TRACKER UI DIV Stuff ***************/
279 //retrieve the trackers
280 $focus->load_relationship('tracked_urls');
282 $trkr_lists = $focus->tracked_urls->get();
284 $ss->assign('TRACKER_COUNT',count($trkr_lists));
285 if(count($trkr_lists)>0){
286 global $odd_bg, $even_bg, $hilite_bg;
289 //create the html to create tracker table
290 foreach($trkr_lists as $trkr_id){
291 $ct_focus = new CampaignTracker();
292 $ct_focus->retrieve($trkr_id);
293 if(isset($ct_focus->tracker_name) && !empty($ct_focus->tracker_name)){
294 if($ct_focus->is_optout){$opt = 'checked';}else{$opt = '';}
295 $trkr_html .= "<div id='existing_trkr".$trkr_count."'> <table width='100%' border='0' cellspacing='0' cellpadding='0'>" ;
296 $trkr_html .= "<tr class='evenListRowS1'><td width='15%'><input name='wiz_step3_is_optout".$trkr_count."' title='".$mod_strings['LBL_EDIT_OPT_OUT'] . $trkr_count ."' id='existing_is_optout". $trkr_count ."' class='checkbox' type='checkbox' $opt /><input name='wiz_step3_id".$trkr_count."' value='".$ct_focus->id."' id='existing_tracker_id". $trkr_count ."'type='hidden''/></td>";
297 $trkr_html .= "<td width='40%'> <input id='existing_tracker_name". $trkr_count ."' type='text' size='20' maxlength='255' name='wiz_step3_tracker_name". $trkr_count ."' title='".$mod_strings['LBL_EDIT_TRACKER_NAME']. $trkr_count ."' value='".$ct_focus->tracker_name."' ></td>";
298 $trkr_html .= "<td width='40%'><input type='text' size='60' maxlength='255' name='wiz_step3_tracker_url". $trkr_count ."' title='".$mod_strings['LBL_EDIT_TRACKER_URL']. $trkr_count ."' id='existing_tracker_url". $trkr_count ."' value='".$ct_focus->tracker_url."' ></td>";
299 $trkr_html .= "<td><a href='#' onclick=\"javascript:remove_existing_tracker('existing_trkr".$trkr_count."','".$ct_focus->id."'); \" > ";
300 $trkr_html .= "<img src='".SugarThemeRegistry::current()->getImageURL("delete_inline.gif")."' border='0' alt='rem' align='absmiddle' border='0' height='12' width='12'>". $mod_strings['LBL_REMOVE']."</a></td></tr></table></div>";
303 $trkr_count =$trkr_count+1;
306 $trkr_html .= "<div id='no_trackers'></div>";
308 $trkr_html .= "<div id='no_trackers'><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr class='evenListRowS1'><td>".$mod_strings['LBL_NONE']."</td></tr></table></div>";
310 $ss->assign('EXISTING_TRACKERS', $trkr_html);
320 /************** SUBSCRIPTION UI DIV Stuff ***************/
321 //fill in popups for target list options
322 $popup_request_data = array(
323 'call_back_function' => 'set_return',
324 'form_name' => 'wizform',
325 'field_to_name_array' => array(
326 'id' => 'wiz_step3_subscription_name_id',
327 'name' => 'wiz_step3_subscription_name',
332 $json = getJSONobj();
333 $encoded_newsletter_popup_request_data = $json->encode($popup_request_data);
334 $ss->assign('encoded_subscription_popup_request_data', $encoded_newsletter_popup_request_data);
336 $popup_request_data = array(
337 'call_back_function' => 'set_return',
338 'form_name' => 'wizform',
339 'field_to_name_array' => array(
340 'id' => 'wiz_step3_unsubscription_name_id',
341 'name' => 'unsubscription_name',
346 $json = getJSONobj();
347 $encoded_newsletter_popup_request_data = $json->encode($popup_request_data);
348 $ss->assign('encoded_unsubscription_popup_request_data', $encoded_newsletter_popup_request_data);
350 $popup_request_data = array(
351 'call_back_function' => 'set_return', //set_return_and_save_background
352 'form_name' => 'wizform',
353 'field_to_name_array' => array(
354 'id' => 'wiz_step3_test_name_id',
355 'name' => 'test_name',
360 $json = getJSONobj();
361 $encoded_newsletter_popup_request_data = $json->encode($popup_request_data);
362 $ss->assign('encoded_test_popup_request_data', $encoded_newsletter_popup_request_data);
365 $popup_request_data = array(
366 'call_back_function' => 'set_return_prospect_list',
367 'form_name' => 'wizform',
368 'field_to_name_array' => array(
369 'id' => 'popup_target_list_id',
370 'name' => 'popup_target_list_name',
371 'list_type' => 'popup_target_list_type',
376 $json = getJSONobj();
377 $encoded_newsletter_popup_request_data = $json->encode($popup_request_data);
378 $ss->assign('encoded_target_list_popup_request_data', $encoded_newsletter_popup_request_data);
380 $ss->assign('TARGET_OPTIONS', get_select_options_with_id($app_list_strings['prospect_list_type_dom'], 'default'));
382 //retrieve the subscriptions
383 $focus->load_relationship('prospectlists');
385 $prospect_lists = $focus->prospectlists->get();
387 if((isset($_REQUEST['wizardtype']) && $_REQUEST['wizardtype'] ==1) || ($focus->campaign_type=='NewsLetter')){
388 //this is a newsletter type campaign, fill in subscription values
390 //if prospect lists are returned, then iterate through and populate form values
391 if(count($prospect_lists)>0){
393 foreach($prospect_lists as $pl_id){
394 //retrieve prospect list
395 $pl = new ProspectList();
396 $pl->retrieve($pl_id);
398 if(isset($pl->list_type) && !empty($pl->list_type)){
399 //assign values based on type
400 if(($pl->list_type == 'default') || ($pl->list_type == 'seed')){
401 $ss->assign('SUBSCRIPTION_ID', $pl->id);
402 $ss->assign('SUBSCRIPTION_NAME', $pl->name);
404 if($pl->list_type == 'exempt'){
405 $ss->assign('UNSUBSCRIPTION_ID', $pl->id);
406 $ss->assign('UNSUBSCRIPTION_NAME', $pl->name);
409 if($pl->list_type == 'test'){
410 $ss->assign('TEST_ID', $pl->id);
411 $ss->assign('TEST_NAME', $pl->name);
422 //this is not a newlsetter campaign, so fill in target list table
423 //create array for javascript, this will help to display the option text, not the value
425 foreach($app_list_strings['prospect_list_type_dom'] as $key=>$val){
426 $dom_txt .="if(trgt_type_text =='$key'){trgt_type_text='$val';}";
428 $ss->assign("PL_DOM_STMT", $dom_txt);
431 if(count($prospect_lists)>0){
433 foreach($prospect_lists as $pl_id){
434 //retrieve prospect list
435 $pl = new ProspectList();
436 $pl_focus = $pl->retrieve($pl_id);
437 $trgt_html .= "<div id='existing_trgt".$trgt_count."'> <table class='tabDetailViewDL2' width='100%'>" ;
438 $trgt_html .= "<td width='25%'> <input id='existing_target_name". $trgt_count ."' type='hidden' type='text' size='60' maxlength='255' name='existing_target_name". $trgt_count ."' value='". $pl_focus->name."' >". $pl_focus->name."</td>";
439 $trgt_html .= "<td width='25%'><input type='hidden' size='60' maxlength='255' name='existing_tracker_list_type". $trgt_count ."' id='existing_tracker_list_type". $trgt_count ."' value='".$pl_focus->list_type."' >".$app_list_strings['prospect_list_type_dom'][$pl_focus->list_type];
440 $trgt_html .= "<input type='hidden' name='added_target_id". $trgt_count ."' id='added_target_id". $trgt_count ."' value='". $pl_focus->id ."' ></td>";
441 $trgt_html .= "<td><a href='#' onclick=\"javascript:remove_existing_target('existing_trgt".$trgt_count."','".$pl_focus->id."'); \" > ";
442 $trgt_html .= "<img src='".SugarThemeRegistry::current()->getImageURL("delete_inline.gif")."' border='0' alt='rem' align='absmiddle' border='0' height='12' width='12'>". $mod_strings['LBL_REMOVE']."</a></td></tr></table></div>";
445 $trgt_count =$trgt_count +1;
448 $trgt_html .= "<div id='no_targets'></div>";
450 $trgt_html .= "<div id='no_targets'><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr class='evenListRowS1'><td>".$mod_strings['LBL_NONE']."</td></tr></table></div>";
453 $ss->assign('EXISTING_TARGETS', $trgt_html );
458 /**************************** WIZARD UI DIV Stuff *******************/
459 $mrkt_string = $mod_strings['LBL_NAVIGATION_MENU_MARKETING'];
460 if(!empty($focus->id)){
461 $mrkt_url = "<a href='index.php?action=WizardMarketing&module=Campaigns&return_module=Campaigns&return_action=WizardHome";
462 $mrkt_url .= "&return_id=".$focus->id."&campaign_id=".$focus->id;
463 $mrkt_url .= "'>". $mrkt_string."</a>";
464 $mrkt_string = $mrkt_url;
466 $summ_url = $mod_strings['LBL_NAVIGATION_MENU_SUMMARY'];
467 if(!empty($focus->id)){
468 $summ_url = "<a href='index.php?action=WizardHome&module=Campaigns";
469 $summ_url .= "&return_id=".$focus->id."&record=".$focus->id;
470 $summ_url .= "'> ". $mod_strings['LBL_NAVIGATION_MENU_SUMMARY']."</a>";
476 if (!empty($focus->id)){
477 $script_to_call = "link_navs(1,4);";
478 if(isset($_REQUEST['direct_step']) and !empty($_REQUEST['direct_step'])){
479 $script_to_call .=' direct('.$_REQUEST['direct_step'].');';
482 $ss->assign("HILITE_ALL", $script_to_call);
485 // this is the wizard control script that resides in page
488 <script type="text/javascript" language="javascript">
491 * this is the custom validation script that will call the right validation for each div
493 function validate_wiz_form(step){
496 if(!validate_step1()){return false;}
499 if(!validate_step2()){return false;}
501 default://no additional validation needed
507 showfirst('newsletter');
511 $ss->assign("DIV_JAVASCRIPT", $divScript);
517 //Create the html to fill in the wizard steps
519 if($campaign_type == 'general'){
520 $steps = create_campaign_steps();
521 $ss->assign('NAV_ITEMS',create_wiz_menu_items($steps,'campaign',$mrkt_string,$summ_url));
522 $ss->assign('HIDE_CONTINUE','hidden');
524 }elseif($campaign_type == 'email'){
525 $steps = create_email_steps();
526 $ss->assign('NAV_ITEMS',create_wiz_menu_items($steps,'email',$mrkt_string,$summ_url));
527 $ss->assign('HIDE_CONTINUE','submit');
529 $steps = create_newsletter_steps();
530 $ss->assign('NAV_ITEMS',create_wiz_menu_items($steps,'newsletter',$mrkt_string,$summ_url));
531 $ss->assign('HIDE_CONTINUE','submit');
534 $ss->assign('TOTAL_STEPS', count($steps));
535 $sshtml = create_wiz_step_divs($steps,$ss);
536 $ss->assign('STEPS',$sshtml);
539 /**************************** FINAL END OF PAGE UI Stuff *******************/
541 $ss->display("modules/Campaigns/tpls/WizardNewsletter.tpl");
544 function create_newsletter_steps(){
546 $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN1']] = 'modules/Campaigns/tpls/WizardCampaignHeader.tpl';
547 $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN2']] = 'modules/Campaigns/tpls/WizardCampaignBudget.tpl';
548 $steps[$mod_strings['LBL_NAVIGATION_MENU_TRACKERS']] = 'modules/Campaigns/tpls/WizardCampaignTracker.tpl';
549 $steps[$mod_strings['LBL_NAVIGATION_MENU_SUBSCRIPTIONS']] = 'modules/Campaigns/tpls/WizardCampaignTargetList.tpl';
553 function create_campaign_steps(){
555 $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN1']] = 'modules/Campaigns/tpls/WizardCampaignHeader.tpl';
556 $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN2']] = 'modules/Campaigns/tpls/WizardCampaignBudget.tpl';
557 $steps[$mod_strings['LBL_NAVIGATION_MENU_TRACKERS']] = 'modules/Campaigns/tpls/WizardCampaignTracker.tpl';
558 $steps[$mod_strings['LBL_TARGET_LISTS']] = 'modules/Campaigns/tpls/WizardCampaignTargetListForNonNewsLetter.tpl';
562 function create_email_steps(){
564 $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN1']] = 'modules/Campaigns/tpls/WizardCampaignHeader.tpl';
565 $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN2']] = 'modules/Campaigns/tpls/WizardCampaignBudget.tpl';
566 $steps[$mod_strings['LBL_NAVIGATION_MENU_TRACKERS']] = 'modules/Campaigns/tpls/WizardCampaignTracker.tpl';
567 $steps[$mod_strings['LBL_TARGET_LISTS']] = 'modules/Campaigns/tpls/WizardCampaignTargetListForNonNewsLetter.tpl';
572 function create_wiz_step_divs($steps,$ss){
574 if(isset($steps) && !empty($steps)){
576 foreach($steps as $name=>$step){
577 $step_html .="<p><div id='step$i'>";
578 $step_html .= $ss->fetch($step);
579 $step_html .="</div></p>";
586 function create_wiz_menu_items($steps,$type,$mrkt_string,$summ_url){
588 $nav_html = '<table border="0" cellspacing="0" cellpadding="0" width="100%" >';
589 if(isset($steps) && !empty($steps)){
591 foreach($steps as $name=>$step){
592 $nav_html .= "<tr><td scope='row' nowrap><div id='nav_step$i'>$name</div></td></tr>";
596 if($type == 'newsletter' || $type == 'email'){
597 $nav_html .= "<tr><td scope='row' nowrap><div id='nav_step'".($i+1).">$mrkt_string</div></td></tr>";
598 $nav_html .= "<tr><td scope='row' nowrap><div id='nav_step'".($i+2).">".$mod_strings['LBL_NAVIGATION_MENU_SEND_EMAIL']."</div></li>";
599 $nav_html .= "<tr><td scope='row' nowrap><div id='nav_step'".($i+3).">".$summ_url."</div></td></tr>";
601 $nav_html .= "<tr><td scope='row' nowrap><div id='nav_step'".($i+1).">".$summ_url."</div></td></tr>";
604 $nav_html .= '</table>';