EOQ; $ss->assign("DIV_JAVASCRIPT", $divScript); $sshtml = ' '; $i = 1; //Create the html to fill in the wizard steps if ($campaign_type == 'general') { $steps = create_campaign_steps(); $ss->assign('NAV_ITEMS', create_wiz_menu_items($steps, 'campaign', $mrkt_string, $summ_url)); $ss->assign('HIDE_CONTINUE', 'hidden'); } elseif ($campaign_type == 'email') { $steps = create_email_steps(); $ss->assign('NAV_ITEMS', create_wiz_menu_items($steps, 'email', $mrkt_string, $summ_url)); $ss->assign('HIDE_CONTINUE', 'submit'); } else { $steps = create_newsletter_steps(); $ss->assign('NAV_ITEMS', create_wiz_menu_items($steps, 'newsletter', $mrkt_string, $summ_url)); $ss->assign('HIDE_CONTINUE', 'submit'); } $ss->assign('TOTAL_STEPS', count($steps)); $sshtml = create_wiz_step_divs($steps, $ss); $ss->assign('STEPS', $sshtml); /**************************** FINAL END OF PAGE UI Stuff *******************/ $ss->display("modules/Campaigns/tpls/WizardNewsletter.tpl"); function create_newsletter_steps() { global $mod_strings; $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN1']] = 'modules/Campaigns/tpls/WizardCampaignHeader.tpl'; $steps[$mod_strings['LBL_NAVIGATION_MENU_GEN2']] = 'modules/Campaigns/tpls/WizardCampaignBudget.tpl'; $steps[$mod_strings['LBL_NAVIGATION_MENU_TRACKERS']] = 'modules/Campaigns/tpls/WizardCampaignTracker.tpl'; $steps[$mod_strings['LBL_NAVIGATION_MENU_SUBSCRIPTIONS']] = 'modules/Campaigns/tpls/WizardCampaignTargetList.tpl'; return $steps;
$mrkt_url = "<a href='index.php?action=WizardMarketing&module=Campaigns&return_module=Campaigns&return_action=WizardHome"; $mrkt_url .= "&return_id=" . $focus->id . "&campaign_id=" . $focus->id; $mrkt_url .= "'>" . $mod_strings['LBL_NAVIGATION_MENU_MARKETING'] . "</a>"; $ss->assign("MRKT_WIZ_URL", $mrkt_url); $summ_url = "<a href='index.php?action=WizardHome&module=Campaigns"; $summ_url .= "&return_id=" . $focus->id . "&record=" . $focus->id; $summ_url .= "'> " . $mod_strings['LBL_NAVIGATION_MENU_SUMMARY'] . "</a>"; //Create the html to fill in the wizard steps if ($focus->campaign_type == 'NewsLetter') { $ss->assign('NAV_ITEMS', create_wiz_menu_items('newsletter', $mrkt_string, $camp_url, $summ_url)); $ss->assign("CAMPAIGN_DIAGNOSTIC_LINK", diagnose()); } elseif ($focus->campaign_type == 'Email') { $ss->assign('NAV_ITEMS', create_wiz_menu_items('email', $mrkt_string, $camp_url, $summ_url)); $ss->assign("CAMPAIGN_DIAGNOSTIC_LINK", diagnose()); } else { $ss->assign('NAV_ITEMS', create_wiz_menu_items('general', $mrkt_string, $camp_url, $summ_url)); } /********** FINAL END OF PAGE UI Stuff ********/ $ss->display(file_exists('custom/modules/Campaigns/WizardHome.html') ? 'custom/modules/Campaigns/WizardHome.html' : 'modules/Campaigns/WizardHome.html'); } else { //there is no record to retrieve, so ask which type of campaign wizard to launch /* $header_URL = "Location: index.php?module=Campaigns&action=index"; $GLOBALS['log']->debug("about to post header URL of: $header_URL"); header($header_URL); */ global $mod_strings; global $app_list_strings; global $app_strings; global $current_user; //if (!is_admin($current_user)) sugar_die("Unauthorized access to administration."); //account for use within wizards