phpBMS

root/trunk/phpbms/modules/bms/paymentmethods_addedit.php

Revision 702, 6.1 KB (checked in by brieb, 2 years ago)

Updated copyrights to 2010

Line 
1<?php
2/*
3 $Rev: 155 $ | $LastChangedBy: mipalmer $
4 $LastChangedDate: 2006-10-22 15:09:20 -0600 (Sun, 22 Oct 2006) $
5 +-------------------------------------------------------------------------+
6 | Copyright (c) 2004 - 2010, Kreotek LLC                                  |
7 | All rights reserved.                                                    |
8 +-------------------------------------------------------------------------+
9 |                                                                         |
10 | Redistribution and use in source and binary forms, with or without      |
11 | modification, are permitted provided that the following conditions are  |
12 | met:                                                                    |
13 |                                                                         |
14 | - Redistributions of source code must retain the above copyright        |
15 |   notice, this list of conditions and the following disclaimer.         |
16 |                                                                         |
17 | - Redistributions in binary form must reproduce the above copyright     |
18 |   notice, this list of conditions and the following disclaimer in the   |
19 |   documentation and/or other materials provided with the distribution.  |
20 |                                                                         |
21 | - Neither the name of Kreotek LLC nor the names of its contributore may |
22 |   be used to endorse or promote products derived from this software     |
23 |   without specific prior written permission.                            |
24 |                                                                         |
25 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS     |
26 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT       |
27 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
28 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT      |
29 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,   |
30 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT        |
31 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,   |
32 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY   |
33 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT     |
34 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   |
35 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.    |
36 |                                                                         |
37 +-------------------------------------------------------------------------+
38*/
39        include("../../include/session.php");
40        include("include/tables.php");
41        include("include/fields.php");
42
43        $thetable = new phpbmstable($db,"tbld:380d4efa-a825-f377-6fa1-a030b8c58ffe");
44        $therecord = $thetable->processAddEditPage();
45
46        if(isset($therecord["phpbmsStatus"]))
47                $statusmessage = $therecord["phpbmsStatus"];
48
49        $pageTitle="Payment Method";
50
51        $phpbms->cssIncludes[] = "pages/paymentmethods.css";
52        $phpbms->jsIncludes[] = "modules/bms/javascript/paymentmethods.js";
53
54                //Form Elements
55                //==============================================================
56                $theform = new phpbmsForm();
57
58                $theinput = new inputCheckbox("inactive",$therecord["inactive"]);
59                $theform->addField($theinput);
60
61                $theinput = new inputField("priority",$therecord["priority"],NULL,false,"integer",8,8);
62                $theform->addField($theinput);
63
64                $theinput = new inputField("name",$therecord["name"],NULL,true,NULL,28,64);
65                $theinput->setAttribute("class","important");
66                $theform->addField($theinput);
67
68                $theinput = new inputCheckbox("onlineprocess",$therecord["onlineprocess"],"online process");
69                $theinput->setAttribute("onchange","checkScript(this);");
70                $theform->addField($theinput);
71
72                $thetable->getCustomFieldInfo();
73                $theform->prepCustomFields($db, $thetable->customFieldsQueryResult, $therecord);
74                $theform->jsMerge();
75                //==============================================================
76                //End Form Elements
77
78        include("header.php");
79?>
80        <div class="bodyline">
81        <?php $theform->startForm($pageTitle)?>
82
83        <fieldset id="fsAttributes">
84                <legend>attributes</legend>
85
86                <p><br /><?php $theform->showField("inactive")?></p>
87
88                <p><?php $theform->showField("priority")?></p>
89
90                <p class="notes">
91                        Lower priority numbered items are displayed first.
92                </p>
93        </fieldset>
94
95        <div id="nameDiv">
96                <fieldset >
97                        <legend>name / type</legend>
98                                <p class="big"><?php $theform->showField("name") ?></p>
99                                <p>
100                                        <label for="type">type</label><br />
101                                        <select id="type" name="type">
102                                                <option value="" <?PHP if($therecord["type"]=="") echo "selected=\"selected\""; ?>>&lt;None&gt;</option>
103                                                <option value="draft" <?PHP if($therecord["type"]=="draft") echo "selected=\"selected\""; ?>>Draft</option>
104                                                <option value="charge"<?PHP if($therecord["type"]=="charge") echo "selected=\"selected\""; ?>>Charge</option>
105                                                <option value="receivable"<?PHP if($therecord["type"]=="receivable") echo "selected=\"selected\""; ?>>Receivable</option>
106                                        </select>
107                                </p>
108                                <p class="notes">Type determines which fields are shown on the invoice creation
109                                  screen. For example, if a payment method of Business Check is selected with
110                                  a type of draft then the check number, routing number and account number
111                                  fields will be shown. However, if VISA is selected with a type of charge
112                                  then the credit card number and expiration date fields will be shown.
113                                </p>
114                </fieldset>
115                <fieldset >
116                        <legend>processing</legend>
117                        <p>
118                                <?php $theform->showField("onlineprocess") ?>
119                        </p>
120                        <p id="pProcessscript" <?php if($therecord["onlineprocess"]==0) echo "style=\"display:none\" "?>>
121                                <label for="processscript">process script</label><br />
122                                <input id="processscript" name="processscript" type="text" value="<?php echo htmlQuotes($therecord["processscript"])?>" size="64" maxlength="128"/>
123                        </p>
124                </fieldset>
125
126                <?php $theform->showCustomFields($db, $thetable->customFieldsQueryResult) ?>
127
128        </div>
129        <?php
130                $theform->showGeneralInfo($phpbms,$therecord);
131                $theform->endForm();
132        ?>
133</div>
134<?php include("footer.php");?>
Note: See TracBrowser for help on using the browser.
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.