Changeset 485 for trunk/phpbms/modules/bms/clients_addedit.php
- Timestamp:
- 04/07/09 11:44:18 (3 years ago)
- Files:
-
- 1 modified
-
trunk/phpbms/modules/bms/clients_addedit.php (modified) (21 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpbms/modules/bms/clients_addedit.php
r419 r485 1 <?php 1 <?php 2 2 /* 3 3 $Rev$ | $LastChangedBy$ … … 37 37 +-------------------------------------------------------------------------+ 38 38 */ 39 39 40 include("../../include/session.php"); 40 41 include("include/tables.php"); … … 44 45 include("include/clients.php"); 45 46 46 if(!isset($_GET["backurl"])) 47 $backurl = NULL; 48 else{ 47 if(!isset($_GET["backurl"])) 48 $backurl = NULL; 49 else{ 49 50 $backurl = $_GET["backurl"]; 50 51 if(isset($_GET["refid"])) … … 54 55 $thetable = new clients($db,2,$backurl); 55 56 $therecord = $thetable->processAddEditPage(); 56 57 57 58 if(isset($therecord["phpbmsStatus"])) 58 59 $statusmessage = $therecord["phpbmsStatus"]; 59 60 60 61 $pageTitle=ucwords($therecord["type"]); 61 62 62 63 if($therecord["inactive"]) 63 64 $pageTitle="Inactive ".$pageTitle; 64 65 65 66 66 67 $phpbms->cssIncludes[] = "pages/client.css"; 67 68 $phpbms->jsIncludes[] = "modules/bms/javascript/client.js"; … … 70 71 //============================================================== 71 72 $theform = new phpbmsForm(); 72 73 73 74 $phpbms->bottomJS[] = 'var thefirstname=getObjectFromID("firstname");thefirstname.focus();'; 74 75 75 76 $theinput = new inputCheckbox("inactive",$therecord["inactive"]); 76 77 $theform->addField($theinput); 77 78 78 79 $theinput = new inputBasicList("type",$therecord["type"],array("prospect"=>"prospect","client"=>"client"), "type"); 79 80 $theinput->setAttribute("class","important"); … … 86 87 }//endif 87 88 $theform->addField($theinput); 88 89 89 90 $theinput = new inputChoiceList($db, "category",$therecord["category"],"clientcategories"); 90 91 $theform->addField($theinput); … … 92 93 $theinput = new inputSmartSearch($db, "salesmanagerid", "Pick Active User", $therecord["salesmanagerid"], "sales person"); 93 94 $theform->addField($theinput); 94 95 95 96 $theinput = new inputChoiceList($db, "leadsource",$therecord["leadsource"],"leadsource", "lead source"); 96 97 $theinput->setAttribute("class","small"); 97 98 $theform->addField($theinput); 98 99 99 100 $theinput = new inputDataTableList($db, "paymentmethodid",$therecord["paymentmethodid"],"paymentmethods","id","name", 100 101 "inactive=0", "priority,name", true, "payment method"); … … 104 105 "inactive=0", "priority,name", true, "shipping method"); 105 106 $theform->addField($theinput); 106 107 107 108 $theinput = new inputDataTableList($db, "discountid",$therecord["discountid"],"discounts","id","name", 108 109 "inactive=0", "name", true, "discount"); … … 112 113 "inactive=0", "name", true, "tax area"); 113 114 $theform->addField($theinput); 114 115 115 116 $theinput = new inputField("workphone",$therecord["workphone"],"work phone",false,"phone",25,32); 116 117 $theform->addField($theinput); … … 133 134 $theinput = new inputField("webaddress",$therecord["webaddress"],"web address",false,"www",68,128); 134 135 $theform->addField($theinput); 135 136 136 137 $theinput = new inputField("taxid", $therecord["taxid"], "tax id", false, "", 25, 32); 137 138 $theform->addField($theinput); … … 140 141 //============================================================== 141 142 //End Form Elements 142 143 include("header.php"); 143 144 include("header.php"); 144 145 145 146 $action = htmlQuotes($_SERVER["REQUEST_URI"]); … … 155 156 156 157 <h1 id="h1Title"><span><?php echo $pageTitle ?></span></h1> 157 158 158 159 <div id="rightSideDiv"> 159 160 <?php if(isset($_GET["invoiceid"])){?> … … 161 162 <input name="gotoinvoice" id="gotoinvoice" type="button" value="return to order" onclick="location.href='<?php echo getAddEditFile($db,3) ?>?id=<?php echo $_GET["invoiceid"] ?>'" class="Buttons" /> 162 163 </p> 163 <?php } ?> 164 <?php } ?> 164 165 <fieldset> 165 166 <legend>attributes</legend> … … 170 171 <input type="hidden" id="creditlimit" name="creditlimit" value="<?php echo $therecord["creditlimit"]?>"/> 171 172 </p> 172 173 173 174 <p><?php $theform->showField("type");?></p> 174 175 175 176 <p><?php $theform->showField("inactive")?></p> 176 177 177 178 <p id="becameclientDiv" <?php if($therecord["type"]=="prospect") echo "style=\"display:none;\"" ?>> 178 179 <label for="becameclient">became a client</label><br /> 179 180 <input type="text" id="becameclient" name="becameclient" readonly="readonly" class="uneditable" value="<?php echo formatFromSQLDate($therecord["becameclient"])?>" size="8" /> 180 181 </p> 181 182 182 183 <p><?php $theform->showField("category")?></p> 183 184 </fieldset> 185 184 185 </fieldset> 186 186 187 <fieldset> 187 188 <legend>sales</legend> 188 189 <div class="fauxP"><?php $theform->showField("salesmanagerid")?></div> 189 190 190 191 <p><?php $theform->showField("leadsource")?></p> 191 192 </fieldset> 192 193 193 194 <fieldset> 194 195 <legend>order defaults</legend> … … 220 221 </fieldset> 221 222 </div> 222 223 <div id="leftSideDiv"> 223 224 <div id="leftSideDiv"> 224 225 <fieldset> 225 226 <legend>name / company</legend> … … 230 231 <p> 231 232 <label for="lastname" class="important">last name</label><br /> 232 <input id="lastname" name="lastname" type="text" value="<?php echo htmlQuotes($therecord["lastname"])?>" size="32" maxlength="65" class="important" /> 233 <input id="lastname" name="lastname" type="text" value="<?php echo htmlQuotes($therecord["lastname"])?>" size="32" maxlength="65" class="important" /> 233 234 </p> 234 235 <p> … … 236 237 <input name="company" type="text" id="company" value="<?php echo htmlQuotes($therecord["company"])?>" size="71" maxlength="128" class="important"/> 237 238 </p> 238 </fieldset> 239 240 <fieldset> 239 </fieldset> 240 241 <fieldset> 241 242 <legend>contact</legend> 242 243 243 244 <p class="phonelefts"><?php $theform->showField("workphone")?></p> 244 245 245 246 <p><?php $theform->showField("homephone")?></p> 246 247 247 248 <p class="phonelefts"><?php $theform->showField("mobilephone")?></p> 248 249 249 250 <p><?php $theform->showField("fax")?></p> 250 251 251 252 <p><?php $theform->showField("otherphone")?></p> 252 253 253 254 <p><?php $theform->showField("email")?></p> 254 255 255 256 <p><?php $theform->showField("webaddress")?></p> 256 257 257 258 <p><?php $theform->showField("taxid")?></p> 258 259 </fieldset> 259 260 260 261 <fieldset> 261 262 <legend> … … 263 264 <button type="button" class="graphicButtons buttonMap" id="buttonMap" title="show map"><span>map</span></button> 264 265 </legend> 265 266 266 267 <p> 267 268 <input type="hidden" id="addressid" name="addressid" value="<?php echo $therecord["addressid"]?>"/> … … 281 282 <p> 282 283 <label for="postalcode">zip/postal code</label><br /> 283 <input name="postalcode" type="text" id="postalcode" value="<?php echo htmlQuotes($therecord["postalcode"])?>" size="12" maxlength="15" /> 284 <input name="postalcode" type="text" id="postalcode" value="<?php echo htmlQuotes($therecord["postalcode"])?>" size="12" maxlength="15" /> 284 285 </p> 285 286 <p> … … 287 288 <input id="country" name="country" type="text" value="<?php echo htmlQuotes($therecord["country"])?>" size="44" maxlength="128" /> 288 289 </p> 289 290 </fieldset> 291 292 290 291 </fieldset> 292 293 293 294 <fieldset> 294 295 <legend><label for="comments">memo</label></legend> … … 297 298 </p> 298 299 </fieldset> 299 300 300 301 </div><?php $theform->showCreateModify($phpbms,$therecord);?> 301 302 </div>