navigation  interaction  search

 other resources

Changeset 415

Show
Ignore:
Timestamp:
06/19/08 11:17:37
Author:
nate
Message:
  • Changed display format and information to one similar to the default format/info on client's search page.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/phpbms/modules/bms/snapshot.php

    r414 r415  
    5050                        clients.id, 
    5151                        clients.type, 
    52                         addresses.city, 
    53                         addresses.state
    54                         addresses.postalcode
    55                         clients.firstname, 
    56                         clients.lastname, 
    57                         clients.company 
     52                        CONCAT('[b]',IF(clients.company != '', CONCAT(clients.company,IF(clients.lastname != '' OR clients.firstname != '', CONCAT(' (',if(clients.lastname != '', clients.lastname, '{blank}'),', ',if(clients.firstname != '', clients.firstname, '{blank}'),')'), '')), IF(clients.lastname != '' OR clients.firstname != '', CONCAT(if(clients.lastname != '', clients.lastname, '{blank}'),', ',if(clients.firstname != '', clients.firstname, '{blank}')), '')),'[/b][br][space]', IF(addresses.city != '' OR addresses.state !='' OR addresses.postalcode != '', CONCAT(IF(addresses.city != '',addresses.city,''),', ',IF(addresses.state != '', addresses.state, ''),' ',IF(addresses.postalcode != '', addresses.postalcode, '')),'(no location)')) 
     53                        AS info
     54                        clients.email
     55                        IF(clients.workphone != '' OR clients.homephone != '' OR clients.mobilephone != '' OR clients.otherphone != '',IF(clients.workphone != '', concat(clients.workphone, ' (w)'), IF(clients.homephone != '', concat(clients.homephone, ' (h)'), IF(clients.mobilephone != '', concat(clients.mobilephone, ' (m)'), IF(clients.otherphone != '', concat(clients.otherphone, ' (o)'), '')))) ,'') 
     56                        AS phone, 
     57                        clients.creationdate 
    5858                FROM  
    5959                        (clients INNER JOIN addresstorecord ON clients.id = addresstorecord.recordid AND addresstorecord.tabledefid=2 AND addresstorecord.primary=1) 
     
    6969                ?><table border="0" cellpadding="0" cellspacing="0" class="querytable"> 
    7070                        <tr> 
    71                                 <th align="left">ID</th> 
    72                                 <th align="left">Type</th> 
    73                                 <th align="left" width="100%">Name</th> 
    74                                 <th nowrap="nowrap" align="right">Location</th> 
     71                                <th align="left">type</th> 
     72                                <th align="left" width="100%">name / location</th> 
     73                                <th align="left">e-mail</th> 
     74                                <th align="left">phone</th> 
     75                                <th nowrap="nowrap" align="right">date created</th> 
    7576                        </tr> 
    7677                <?php  
     
    7980                 
    8081                        $i = ($i==1) ? 2: 1; 
    81  
    82                         $clientDisplay = $therecord["company"]; 
    8382                         
    84                         $name = $therecord["lastname"].", ".$therecord["firstname"]; 
    85                         if($name == ", ") 
    86                                 $name = ""; 
    87                                  
    88                         if(!$clientDisplay) 
    89                                 $clientDisplay .= $name; 
    90                         else 
    91                                 if($name) 
    92                                         $clientDisplay .=  " (".$name.")"; 
    93                                                  
    94                         $displayCSZ = $therecord["city"].", ".$therecord["state"]." ".$therecord["postalcode"]; 
    95                         if($displayCSZ == ",  ") 
    96                                 $displayCSZ = "(unspecified location)"; 
    97                          
    98                         if($displayCSZ==",  ") $displayCSZ="&nbsp;"; 
    9983                ?><tr onclick="document.location='<?php echo getAddEditFile($db,2)."?id=".$therecord["id"] ?>&amp;backurl='+encodeURIComponent('<?php echo APP_PATH."modules/base/snapshot.php"?>')" class="qr<?php echo $i?>"> 
    100                         <td align="left" nowrap="nowrap"><?php echo $therecord["id"]?></td> 
    101                         <td align="left" nowrap="nowrap"><?php echo $therecord["type"]?></td> 
    102                         <td><?php echo htmlQuotes($clientDisplay)?></td> 
    103                         <td align="right" nowrap="nowrap"><?php echo $displayCSZ?></td> 
    104                 </tr><?php }?> 
     84                        <td align="left" nowrap="nowrap"><?php echo formatVariable($therecord["type"])?></td> 
     85                        <td align="left"><?php echo formatVariable($therecord["info"], "bbcode")?></td> 
     86                        <td align="left" nowrap="nowrap"><?php echo formatVariable($therecord["email"]) ?></td> 
     87                        <td align="left" nowrap="nowrap"><?php echo formatVariable($therecord["phone"]) ?></td> 
     88                        <td align="right" nowrap="nowrap"><?php echo formatVariable($therecord["creationdate"], "date"); ?></td> 
     89                </tr> 
     90                 
     91                <?php }//end while --queryresult--?> 
     92                 
    10593                <tr class="queryfooter"> 
     94                        <td>&nbsp;</td> 
    10695                        <td>&nbsp;</td> 
    10796                        <td>&nbsp;</td> 
     
    11099                </tr> 
    111100                </table><?php 
    112         } else {?><div class="small disabledtext">no clients/prospects entered in last day</div><?php 
    113         } 
    114 
     101                 
     102        } else { 
     103                 
     104                ?><div class="small disabledtext">no clients/prospects entered in last day</div><?php 
     105                 
     106        }//end if --queryresult-- 
     107         
     108}//end function --showTodaysClients 
    115109 
    116110class invoiceList{ 
Copyright © 2006-2007 Kreotek, LLC. All Rights reserved.