| 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:fa8a0ddc-87d3-a9e9-60b0-1bab374b2993"); |
|---|
| 44 | $therecord = $thetable->processAddEditPage(); |
|---|
| 45 | |
|---|
| 46 | if(isset($therecord["phpbmsStatus"])) |
|---|
| 47 | $statusmessage = $therecord["phpbmsStatus"]; |
|---|
| 48 | |
|---|
| 49 | $pageTitle="Shipping Method"; |
|---|
| 50 | |
|---|
| 51 | $phpbms->cssIncludes[] = "pages/shippingmethods.css"; |
|---|
| 52 | $phpbms->jsIncludes[] = "modules/bms/javascript/shippingmethods.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,32,128); |
|---|
| 65 | $theinput->setAttribute("class","important"); |
|---|
| 66 | $theform->addField($theinput); |
|---|
| 67 | |
|---|
| 68 | $theinput = new inputCheckbox("canestimate",$therecord["canestimate"],"estimate shipping"); |
|---|
| 69 | $theinput->setAttribute("onchange","checkScript(this);"); |
|---|
| 70 | $theform->addField($theinput); |
|---|
| 71 | |
|---|
| 72 | $theform->jsMerge(); |
|---|
| 73 | //============================================================== |
|---|
| 74 | //End Form Elements |
|---|
| 75 | |
|---|
| 76 | include("header.php"); |
|---|
| 77 | ?><div class="bodyline"> |
|---|
| 78 | <?php $theform->startForm($pageTitle);?> |
|---|
| 79 | |
|---|
| 80 | <fieldset id="fsAttributes"> |
|---|
| 81 | <legend>attributes</legend> |
|---|
| 82 | <p><br/><?php $theform->showField("inactive")?></p> |
|---|
| 83 | |
|---|
| 84 | <p><?php $theform->showField("priority")?></p> |
|---|
| 85 | <p class="notes"> |
|---|
| 86 | Lower priority numbered items are displayed first. |
|---|
| 87 | </p> |
|---|
| 88 | </fieldset> |
|---|
| 89 | |
|---|
| 90 | <div id="nameDiv"> |
|---|
| 91 | <fieldset > |
|---|
| 92 | <legend>name</legend> |
|---|
| 93 | <p class="big"><?php $theform->showField("name");?></p> |
|---|
| 94 | </fieldset> |
|---|
| 95 | <fieldset> |
|---|
| 96 | <legend>estimate charges</legend> |
|---|
| 97 | <p><br /> |
|---|
| 98 | <?php $theform->showField("canestimate")?> |
|---|
| 99 | </p> |
|---|
| 100 | <p id="pEstimationscript" <?php if($therecord["canestimate"]) echo "style=\"display:block\" "?>> |
|---|
| 101 | <label for="estimationscript">estimation script</label><br /> |
|---|
| 102 | <input id="estimationscript" name="estimationscript" type="text" value="<?php echo htmlQuotes($therecord["estimationscript"])?>" size="64" maxlength="128"/> |
|---|
| 103 | </p> |
|---|
| 104 | </fieldset> |
|---|
| 105 | |
|---|
| 106 | <?php $theform->showCustomFields($db, $thetable->customFieldsQueryResult) ?> |
|---|
| 107 | |
|---|
| 108 | </div> |
|---|
| 109 | |
|---|
| 110 | <?php |
|---|
| 111 | $theform->showGeneralInfo($phpbms,$therecord); |
|---|
| 112 | $theform->endForm(); |
|---|
| 113 | ?> |
|---|
| 114 | </div> |
|---|
| 115 | <?php include("footer.php");?> |
|---|