Пример #1
0
if (isset($_REQUEST['record'])) {
    $this->ss->assign("RECORD", $_REQUEST['record']);
} else {
    $this->ss->assign("RECORD", '');
}
//if subsaction has been set, then process subscriptions
if (isset($_REQUEST['subs_action'])) {
    manageSubscriptions($focus);
}
//$title = $GLOBALS['app_strings']['LBL_MANAGE_SUBSCRIPTIONS_FOR'].$focus->name;
$params = array();
$params[] = "<a href='index.php?module={$focus->module_dir}&action=index'>{$focus->module_dir}</a>";
$params[] = "<a href='index.php?module={$focus->module_dir}&action=DetailView&record={$focus->id}'>{$focus->name}</a>";
$params[] = $mod_strings['LBL_MANAGE_SUBSCRIPTIONS_TITLE'];
$title = getClassicModuleTitle($focus->module_dir, $params, true);
$orig_vals_str = printOriginalValues($focus);
$orig_vals_array = constructDDSubscriptionList($focus);
$this->ss->assign('APP', $app_strings);
$this->ss->assign('MOD', $mod_strings);
$this->ss->assign('title', $title);
$this->ss->assign('enabled_subs', $orig_vals_array[0]);
$this->ss->assign('disabled_subs', $orig_vals_array[1]);
$this->ss->assign('enabled_subs_string', $orig_vals_str[0]);
$this->ss->assign('disabled_subs_string', $orig_vals_str[1]);
$buttons = array('<input id="save_button" title="' . $app_strings['LBL_SAVE_BUTTON_TITLE'] . '" accessKey="' . $app_strings['LBL_SAVE_BUTTON_KEY'] . '" class="button" onclick="save();this.form.action.value=\'Subscriptions\'; " type="submit" name="button" value="' . $app_strings['LBL_SAVE_BUTTON_LABEL'] . '">', '<input id="cancel_button" title="' . $app_strings['LBL_CANCEL_BUTTON_TITLE'] . '" accessKey="' . $app_strings['LBL_CANCEL_BUTTON_KEY'] . '" class="button" onclick="this.form.action.value=\'' . $this->ss->get_template_vars('RETURN_ACTION') . '\'; this.form.module.value=\'' . $this->ss->get_template_vars('RETURN_MODULE') . '\';" type="submit" name="button" value="' . $app_strings['LBL_CANCEL_BUTTON_LABEL'] . '">');
$this->ss->assign('BUTTONS', $buttons);
$this->ss->display('modules/Campaigns/Subscriptions.tpl');
/*
 *This function constructs Drag and Drop multiselect box of subscriptions for display in manage subscription form
*/
function constructDDSubscriptionList($focus, $classname = '')
}
if (isset($_REQUEST['return_id'])) {
    $xtpl->assign("RETURN_ID", $_REQUEST['return_id']);
}
if (isset($_REQUEST['return_action'])) {
    $xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']);
}
if (isset($_REQUEST['record'])) {
    $xtpl->assign("RECORD", $_REQUEST['record']);
}
//if subsaction has been set, then process subscriptions
if (isset($_REQUEST['subs_action'])) {
    manageSubscriptions($focus);
}
$xtpl->assign("FOCUS_NAME", $focus->name);
$orig_vals = printOriginalValues($focus, $xtpl);
$xtpl->assign("ORIG_SUBS_VALUES", $orig_vals[0]);
$xtpl->assign("ORIG_UNSUBS_VALUES", $orig_vals[1]);
$classname = "SUGAR_GRID";
$xtpl->assign("CLASSNAME", $classname);
$xtpl->assign("DRAG_DROP_CHOOSER", constructDDSubscriptionList($focus, $classname));
$xtpl->parse("main");
$xtpl->out("main");
/*
 *This function constructs Drag and Drop multiselect box of subscriptions for display in manage subscription form  
*/
function constructDDSubscriptionList($focus, $classname)
{
    require_once "include/templates/TemplateDragDropChooser.php";
    global $mod_strings;
    $unsubs_arr = '';