phpBMS

Show
Ignore:
Timestamp:
04/07/09 11:44:18 (3 years ago)
Author:
nate
Message:
  • Merged Nathan branch back into trunk.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/modules/bms/clients_addedit.php

    r419 r485  
    1 <?php  
     1<?php 
    22/* 
    33 $Rev$ | $LastChangedBy$ 
     
    3737 +-------------------------------------------------------------------------+ 
    3838*/ 
     39 
    3940        include("../../include/session.php"); 
    4041        include("include/tables.php"); 
     
    4445        include("include/clients.php"); 
    4546 
    46         if(!isset($_GET["backurl"]))  
    47                 $backurl = NULL;  
    48         else{  
     47        if(!isset($_GET["backurl"])) 
     48                $backurl = NULL; 
     49        else{ 
    4950                $backurl = $_GET["backurl"]; 
    5051                if(isset($_GET["refid"])) 
     
    5455        $thetable = new clients($db,2,$backurl); 
    5556        $therecord = $thetable->processAddEditPage(); 
    56          
     57 
    5758        if(isset($therecord["phpbmsStatus"])) 
    5859                $statusmessage = $therecord["phpbmsStatus"]; 
    59          
     60 
    6061        $pageTitle=ucwords($therecord["type"]); 
    6162 
    6263        if($therecord["inactive"]) 
    6364                $pageTitle="Inactive ".$pageTitle; 
    64                  
    65                  
     65 
     66 
    6667        $phpbms->cssIncludes[] = "pages/client.css"; 
    6768        $phpbms->jsIncludes[] = "modules/bms/javascript/client.js"; 
     
    7071                //============================================================== 
    7172                $theform = new phpbmsForm(); 
    72                  
     73 
    7374                $phpbms->bottomJS[] = 'var thefirstname=getObjectFromID("firstname");thefirstname.focus();'; 
    74                  
     75 
    7576                $theinput = new inputCheckbox("inactive",$therecord["inactive"]); 
    7677                $theform->addField($theinput); 
    77                  
     78 
    7879                $theinput = new inputBasicList("type",$therecord["type"],array("prospect"=>"prospect","client"=>"client"), "type"); 
    7980                $theinput->setAttribute("class","important"); 
     
    8687                }//endif 
    8788                $theform->addField($theinput); 
    88                  
     89 
    8990                $theinput = new inputChoiceList($db, "category",$therecord["category"],"clientcategories"); 
    9091                $theform->addField($theinput); 
     
    9293                $theinput = new inputSmartSearch($db, "salesmanagerid", "Pick Active User", $therecord["salesmanagerid"], "sales person"); 
    9394                $theform->addField($theinput); 
    94                  
     95 
    9596                $theinput = new inputChoiceList($db, "leadsource",$therecord["leadsource"],"leadsource", "lead source"); 
    9697                $theinput->setAttribute("class","small"); 
    9798                $theform->addField($theinput); 
    98                  
     99 
    99100                $theinput = new inputDataTableList($db, "paymentmethodid",$therecord["paymentmethodid"],"paymentmethods","id","name", 
    100101                                                                "inactive=0", "priority,name", true, "payment method"); 
     
    104105                                                                "inactive=0", "priority,name", true, "shipping method"); 
    105106                $theform->addField($theinput); 
    106                  
     107 
    107108                $theinput = new inputDataTableList($db, "discountid",$therecord["discountid"],"discounts","id","name", 
    108109                                                                "inactive=0", "name", true, "discount"); 
     
    112113                                                                "inactive=0", "name", true, "tax area"); 
    113114                $theform->addField($theinput); 
    114                  
     115 
    115116                $theinput = new inputField("workphone",$therecord["workphone"],"work phone",false,"phone",25,32); 
    116117                $theform->addField($theinput); 
     
    133134                $theinput = new inputField("webaddress",$therecord["webaddress"],"web address",false,"www",68,128); 
    134135                $theform->addField($theinput); 
    135                  
     136 
    136137                $theinput = new inputField("taxid", $therecord["taxid"], "tax id", false, "", 25, 32); 
    137138                $theform->addField($theinput); 
     
    140141                //============================================================== 
    141142                //End Form Elements 
    142           
    143         include("header.php");   
     143 
     144        include("header.php"); 
    144145 
    145146        $action = htmlQuotes($_SERVER["REQUEST_URI"]); 
     
    155156 
    156157        <h1 id="h1Title"><span><?php echo $pageTitle ?></span></h1> 
    157          
     158 
    158159        <div id="rightSideDiv"> 
    159160                <?php if(isset($_GET["invoiceid"])){?> 
     
    161162                        <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" /> 
    162163                </p> 
    163                 <?php } ?>                       
     164                <?php } ?> 
    164165                <fieldset> 
    165166                        <legend>attributes</legend> 
     
    170171                                <input type="hidden" id="creditlimit" name="creditlimit" value="<?php echo $therecord["creditlimit"]?>"/> 
    171172                        </p> 
    172                                  
     173 
    173174                        <p><?php $theform->showField("type");?></p> 
    174                          
     175 
    175176                        <p><?php $theform->showField("inactive")?></p> 
    176                          
     177 
    177178                        <p id="becameclientDiv" <?php if($therecord["type"]=="prospect") echo "style=\"display:none;\"" ?>> 
    178179                                <label for="becameclient">became a client</label><br /> 
    179180                                <input type="text" id="becameclient" name="becameclient" readonly="readonly" class="uneditable" value="<?php echo formatFromSQLDate($therecord["becameclient"])?>" size="8" /> 
    180181                        </p> 
    181                          
     182 
    182183                        <p><?php $theform->showField("category")?></p> 
    183                          
    184                 </fieldset> 
    185          
     184 
     185                </fieldset> 
     186 
    186187                <fieldset> 
    187188                        <legend>sales</legend> 
    188189                        <div class="fauxP"><?php $theform->showField("salesmanagerid")?></div> 
    189                          
     190 
    190191                        <p><?php $theform->showField("leadsource")?></p> 
    191192                </fieldset> 
    192                                  
     193 
    193194                <fieldset> 
    194195                        <legend>order defaults</legend> 
     
    220221                </fieldset> 
    221222        </div> 
    222                  
    223         <div id="leftSideDiv">           
     223 
     224        <div id="leftSideDiv"> 
    224225                <fieldset> 
    225226                        <legend>name / company</legend> 
     
    230231                        <p> 
    231232                                <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" /> 
    233234                        </p> 
    234235                        <p> 
     
    236237                                <input name="company" type="text" id="company" value="<?php echo htmlQuotes($therecord["company"])?>" size="71" maxlength="128" class="important"/> 
    237238                        </p> 
    238                 </fieldset>      
    239                                                          
    240                 <fieldset>                                       
     239                </fieldset> 
     240 
     241                <fieldset> 
    241242                        <legend>contact</legend> 
    242243 
    243244                        <p class="phonelefts"><?php $theform->showField("workphone")?></p> 
    244                          
     245 
    245246                        <p><?php $theform->showField("homephone")?></p> 
    246                          
     247 
    247248                        <p class="phonelefts"><?php $theform->showField("mobilephone")?></p> 
    248249 
    249250                        <p><?php $theform->showField("fax")?></p> 
    250                          
     251 
    251252                        <p><?php $theform->showField("otherphone")?></p> 
    252                          
     253 
    253254                        <p><?php $theform->showField("email")?></p> 
    254                          
     255 
    255256                        <p><?php $theform->showField("webaddress")?></p> 
    256                          
     257 
    257258                        <p><?php $theform->showField("taxid")?></p> 
    258259                </fieldset> 
    259                  
     260 
    260261                <fieldset> 
    261262                        <legend> 
     
    263264                                <button type="button" class="graphicButtons buttonMap" id="buttonMap" title="show map"><span>map</span></button> 
    264265                        </legend> 
    265                          
     266 
    266267                        <p> 
    267268                                <input type="hidden" id="addressid" name="addressid" value="<?php echo $therecord["addressid"]?>"/> 
     
    281282                        <p> 
    282283                                <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" /> 
    284285                        </p> 
    285286                        <p> 
     
    287288                                <input id="country" name="country" type="text" value="<?php echo htmlQuotes($therecord["country"])?>" size="44" maxlength="128" /> 
    288289                        </p> 
    289                          
    290                 </fieldset> 
    291                  
    292                  
     290 
     291                </fieldset> 
     292 
     293 
    293294                <fieldset> 
    294295                        <legend><label for="comments">memo</label></legend> 
     
    297298                        </p> 
    298299                </fieldset> 
    299                  
     300 
    300301        </div><?php $theform->showCreateModify($phpbms,$therecord);?> 
    301302        </div> 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.