~ubuntu-branches/ubuntu/karmic/ldap-account-manager/karmic

« back to all changes in this revision

Viewing changes to templates/pdfedit/pdfmain.php

  • Committer: Bazaar Package Importer
  • Author(s): Roland Gruber
  • Date: 2006-05-14 14:00:29 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060514140029-chr2mf30u7bajebu
Tags: 1.0.2-1
Updated to new upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
2
/*
3
 
$Id: pdfmain.php,v 1.9 2005/07/27 17:43:57 gruberroland Exp $
 
3
$Id: pdfmain.php,v 1.15 2006/03/26 17:51:25 gruberroland Exp $
4
4
 
5
5
  This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
6
 
  Copyright (C) 2003  Michael D�rgner
 
6
  Copyright (C) 2003 - 2006  Michael D�rgner
7
7
 
8
8
  This program is free software; you can redistribute it and/or modify
9
9
  it under the terms of the GNU General Public License as published by
28
28
* @package PDF
29
29
*/
30
30
 
 
31
/** security functions */
 
32
include_once("../../lib/security.inc");
31
33
/** access to PDF configuration files */
32
34
include_once("../../lib/pdfstruct.inc");
33
35
/** LDAP object */
38
40
include_once("../../lib/modules.inc");
39
41
 
40
42
// start session
41
 
session_save_path("../../sess");
42
 
@session_start();
 
43
startSecureSession();
43
44
 
44
45
setlanguage();
45
46
 
63
64
if ($_POST['forward'] == "yes") {
64
65
        // on abort go back to main page
65
66
        if ($_POST['abort']) {
66
 
                metaRefresh("../lists/listusers.php");
 
67
                metaRefresh("../tools.php");
67
68
        }
68
69
        // on submit forward to other pdf structure pages
69
70
        else if($_POST['submit']) {
82
83
        exit;
83
84
}
84
85
 
85
 
$scopes = getAvailableScopes();
 
86
$scopes = $_SESSION['config']->get_ActiveTypes();
86
87
 
87
88
$availableStructureDefinitions = '';
88
89
$availableScopes = '';
89
90
 
90
91
foreach($scopes as $scope) {
91
92
        $pdfStructDefs = getPDFStructureDefinitions($scope);
92
 
        $availableScopes .= '<option value="' . $scope . '">' . $scope . "</option>\n";
 
93
        $availableScopes .= '<option value="' . $scope . '">' . getTypeAlias($scope) . "</option>\n";
93
94
        
94
95
        foreach($pdfStructDefs as $pdfStructureDefinition) {
95
 
                $availableStructureDefinitions .= '<option value="' . $scope . ':' . $pdfStructureDefinition . '">' . $scope . ' - ' . $pdfStructureDefinition . "</option>\n";
 
96
                $availableStructureDefinitions .= '<option value="' . $scope . ':' . $pdfStructureDefinition . '">' . getTypeAlias($scope) . ' - ' . $pdfStructureDefinition . "</option>\n";
96
97
        }
97
98
}
98
99
 
100
101
?>
101
102
                <title>LDAP Account Manager</title>
102
103
                <link rel="stylesheet" type="text/css" href="../../style/layout.css">
 
104
                <link rel="stylesheet" type="text/css" href="../../style/type_user.css">
103
105
        </head>
104
106
        <body>
105
107
                <p></p>
106
108
                <form action="pdfmain.php" method="post">
107
109
                <!-- pdf structure options -->
108
 
                <fieldset>
 
110
                <fieldset class="useredit">
109
111
                        <legend>
110
112
                                <b><?php echo _("PDF structures"); ?></b>
111
113
                        </legend>
115
117
                                        <td>
116
118
                                                <input type="radio" name="pdf" value="new" checked="checked">
117
119
                                        </td>
118
 
                                        <td colspan=2><?php echo _("Create a new PDF structure for scope: "); ?><select name="scope" size="1"><?php echo $availableScopes; ?></select></td>
 
120
                                        <td><?php echo _("Create a new PDF structure for scope: "); ?><select name="scope" size="1"><?php echo $availableScopes; ?></select></td>
119
121
                                </tr>
120
122
                                <!-- edit pdf structure -->
121
123
                                <tr>
126
128
                                                <select name="edit" size=1>
127
129
                                                        <?php echo $availableStructureDefinitions; ?>
128
130
                                                </select>
129
 
                                        </td>
130
 
                                        <td><?php echo _("Edit PDF structure"); ?></td>
 
131
                                                <?php echo _("Edit PDF structure"); ?></td>
131
132
                                </tr>
132
133
                                <!-- delete pdf structure -->
133
134
                                <tr>
138
139
                                                <select name="delete" size=1>
139
140
                                                        <?php echo $availableStructureDefinitions; ?>
140
141
                                                </select>
141
 
                                        </td>
142
 
                                        <td><?php echo _("Delete PDF structure"); ?></td>
 
142
                                                <?php echo _("Delete PDF structure"); ?></td>
143
143
                                </tr>
144
144
                        </table>
145
145
                </fieldset>
149
149
                <p>
150
150
                <input type="hidden" name="forward" value="yes">
151
151
 
152
 
                <input type="submit" name="submit" value="<?php echo _("Submit"); ?>">
153
 
                <input type="submit" name="abort" value="<?php echo _("Abort"); ?>">
 
152
                <input type="submit" name="submit" value="<?php echo _("Ok"); ?>">
 
153
                <input type="submit" name="abort" value="<?php echo _("Cancel"); ?>">
154
154
                </p>
155
155
 
156
156
                </form>