コード例 #1
0
ファイル: security_roles.php プロジェクト: pthdnq/ivalley-svn
    }
    foreach ($sections as $s) {
        $_POST['Section' . $s] = 1;
    }
    if ($clone) {
        set_focus('name');
        $Ajax->activate('_page_body');
    } else {
        $_POST['role'] = $id;
    }
}
//--------------------------------------------------------------------------------------------------
start_form();
start_table(TABLESTYLE_NOBORDER);
start_row();
security_roles_list_cells(_("Role:") . " ", 'role', null, true, true, check_value('show_inactive'));
$new_role = get_post('role') == '';
check_cells(_("Show inactive:"), 'show_inactive', null, true);
end_row();
end_table();
echo "<hr>";
if (get_post('_show_inactive_update')) {
    $Ajax->activate('role');
    set_focus('role');
}
if (find_submit('_Section')) {
    $Ajax->activate('details');
}
//-----------------------------------------------------------------------------------------------
div_start('details');
start_table(TABLESTYLE2);
コード例 #2
0
if ($selected_id != -1) {
    if ($Mode == 'Edit') {
        //editing an existing payment reminder
        $myrow = get_dashboard_reminder($selected_id);
        $_POST['role_id'] = $myrow["role_id"];
        $_POST['next_date'] = sql2date($myrow["next_date"]);
        $_POST['description'] = $myrow["description"];
        $_POST['frequency'] = $myrow["frequency"];
        $_POST['param'] = $myrow["param"];
        $data = json_decode(html_entity_decode($_POST['param']));
        $_POST['occurrence'] = coalesce($data, 'occurrence');
    }
    hidden('selected_id', $selected_id);
}
label_cell(_("Role:"), "class='label'");
security_roles_list_cells(null, 'role_id');
date_row(_("Next Date"), 'next_date', '', null, 0, 0, 1001);
textarea_row(_("Description:"), 'description', null, 40, 5);
select_row(_("Frequency:"), "frequency", null, $frequencies, array('select_submit' => true));
switch ($_POST['frequency']) {
    case 'daily':
        text_row_ex(_("Recur every:"), 'occurrence', 3, null, null, null, null, _("days"));
        break;
    case 'weekly':
        text_row_ex(_("Recur every:"), 'occurrence', 3, null, null, null, null, _("weeks"));
        break;
    case 'monthly':
        text_row_ex(_("Recur every:"), 'occurrence', 3, null, null, null, null, _("months"));
        break;
    case 'yearly':
        break;