eramge11;11039767 wrote:Got code?
First off I am going to say thank you for not just giving me a simple "smart" answer because I am trying to solve a problem. I appreciate your help! Now, I added the code you gave and defined .active_warrant in my CSS. For whatever reason it was not changing the color of anything and only placing the etc... text in my search results.
This is what the search page looks like: See attachment 1[ATTACH]5073[/ATTACH] (I added myself into the database to show you an example)
The search result would look for anyone with the last name of "Ramge" and display the results. See attachment 2 [ATTACH]5075[/ATTACH]
I then changed the code that you gave me to show as below: I made the code you provided red, and also set the search string to look for the last name of Ramge. (towards the bottom of the code)
<?php include(INC_HTML_TAG); ?>
<?php $hm->Title( FILE, RSTR_APP_TITLE, RSTR_MPD_DATA, RSTR_SEARCH ); ?>
<?php echo $hm->SectEnd(); ?>
<!-- [END] Search Criteria-->
<!-- [BEGIN] Search Result -->
<?php if ( $hm->Zb("def:display?") ) { ?>
<?php echo $hm->SectBegin( RSTR_SEARCH_RESULT ); ?>
<div style='overflow:auto;'>
<table class='data_table'>
<tr class='data_table_caption'>
<th nowrap='true'><?php echo $hm->Zb('ob:rs:def:mpd_data_id'); ?>
<?php echo RSTR_MPD_DATA_ID; ?></th>
<th><?php include(INC_SR_SELREC_HEADER); ?></th>
<th><?php include(INC_SR_EDIT_BTN_HEADER); ?></th>
<th><?php echo RSTR_ACTIVE; ?></th>
<th nowrap='true'><?php echo $hm->Zb('ob:rs:def:first_name'); ?> <?php echo RSTR_FIRST_NAME; ?></th>
<th nowrap='true'><?php echo $hm->Zb('ob:rs:def:last_name'); ?> <?php echo RSTR_LAST_NAME; ?></th>
<th nowrap='true'><?php echo $hm->Zb('ob:rs:def:ssn'); ?> <?php echo RSTR_SSN; ?></th>
<th nowrap='true'><?php echo $hm->Zb('ob:rs:def:license_number'); ?> <?php echo RSTR_LICENSE_NUMBER; ?></th>
<th nowrap='true'><?php echo $hm->Zb('ob:rs:def:phone_number'); ?> <?php echo RSTR_PHONE_NUMBER; ?></th>
<th nowrap='true'><?php echo $hm->Zb('ob:rs:def:license_plate'); ?> <?php echo RSTR_LICENSE_PLATE; ?></th>
<th nowrap='true'><?php echo $hm->Zb('ob:rs:def:warning_number'); ?> <?php echo RSTR_WARNING_NUMBER; ?></th>
<th nowrap='true'><?php echo $hm->Zb('ob:rs:def:citation_number'); ?> <?php echo RSTR_CITATION_NUMBER; ?></th>
<th nowrap='true'><?php echo $hm->Zb('ob:rs:def:reporting_officer'); ?> <?php echo RSTR_REPORTING_OFFICER; ?></th>
<th nowrap='true'><?php echo $hm->Zb('ob:rs:def:date_of_birth'); ?> <?php echo RSTR_DATE_OF_BIRTH; ?></th>
<th nowrap='true'><?php echo $hm->Zb('ob:rs:def:call_type'); ?> <?php echo RSTR_CALL_TYPE; ?></th>
<th nowrap='true'><?php echo $hm->Zb('ob:rs:def:call_nature'); ?> <?php echo RSTR_CALL_NATURE; ?></th>
<th nowrap='true'><?php echo $hm->Zb('ob:rs:def:vehicle_vin_'); ?> <?php echo RSTR_VEHICLE_VIN_; ?></th>
<th nowrap='true'><?php echo $hm->Zb('ob:rs:def:home_street'); ?> <?php echo RSTR_HOME_STREET; ?></th>
<th nowrap='true'><?php echo $hm->Zb('ob:rs:def:p_o_box_apt_'); ?> <?php echo RSTR_P_O_BOX_APT_; ?></th>
<th nowrap='true'><?php echo $hm->Zb('ob:rs:def:home_city'); ?> <?php echo RSTR_HOME_CITY; ?></th>
<th nowrap='true'><?php echo $hm->Zb('ob:rs:def:home_state'); ?> <?php echo RSTR_HOME_STATE; ?></th>
<th nowrap='true'><?php echo $hm->Zb('ob:rs:def:home_zip_code'); ?> <?php echo RSTR_HOME_ZIP_CODE; ?></th>
<th nowrap='true'><?php echo $hm->Zb('ob:rs:def:report_number'); ?> <?php echo RSTR_REPORT_NUMBER; ?></th>
<th nowrap='true'><?php echo $hm->Zb('ob:rs:def:date_added'); ?> <?php echo RSTR_DATE_ADDED; ?></th>
<th nowrap='true'><?php echo $hm->Zb('ob:rs:def:mpd_paper_service'); ?> <?php echo RSTR_MPD_PAPER_SERVICE; ?></th>
</tr>
<?php while( $hm->zb('@rs:def:begin_table') ) { ?>
<tr>
<tr><td<?php
if($hm->Zb('rs:def:last_name') == 'Ramge') {
echo ' class="active_warrant"';
}
?>><td>etc....</td></tr>
<td style='text-align:right;'><?php echo $hm->Zb('rs:def:mpd_data_id'); ?></td>
<?php include(INC_SR_ID_PARAM); ?>
<?php include(INC_SR_SELREC); ?>
<?php include(INC_SR_EDIT_BTN); ?>
<td style='text-align:center;'><?php echo $hm->Zb('rs:def:active'); ?></td>
<td style='text-align:left;'><?php echo $hm->Zb('rs:def:first_name'); ?></td>
<td style='text-align:left;'><?php echo $hm->Zb('rs:def:last_name'); ?></td>
<td style='text-align:left;'><?php echo $hm->Zb('rs:def:ssn'); ?></td>
<td style='text-align:left;'><?php echo $hm->Zb('rs:def:license_number'); ?></td>
<td style='text-align:left;'><?php echo $hm->Zb('rs:def:phone_number'); ?></td>
<td style='text-align:left;'><?php echo $hm->Zb('rs:def:license_plate'); ?></td>
<td style='text-align:left;'><?php echo $hm->Zb('rs:def:warning_number'); ?></td>
<td style='text-align:left;'><?php echo $hm->Zb('rs:def:citation_number'); ?></td>
<td style='text-align:left;'><?php echo $hm->Zb('rs:def:reporting_officer'); ?></td>
<td style='text-align:left;'><?php echo $hm->Zb('rs:def:date_of_birth'); ?></td>
<td style='text-align:left;'><?php echo $hm->Zb('rs:def:call_type'); ?></td>
<td style='text-align:left;'><?php echo $hm->Zb('rs:def:call_nature'); ?></td>
<td style='text-align:left;'><?php echo $hm->Zb('rs:def:vehicle_vin'); ?></td>
<td style='text-align:left;'><?php echo $hm->Zb('rs:def:home_street'); ?></td>
<td style='text-align:left;'><?php echo $hm->Zb('rs:def:p_o_box_apt'); ?></td>
<td style='text-align:left;'><?php echo $hm->Zb('rs:def:home_city'); ?></td>
<td style='text-align:left;'><?php echo $hm->Zb('rs:def:home_state'); ?></td>
<td style='text-align:left;'><?php echo $hm->Zb('rs:def:home_zip_code'); ?></td>
<td style='text-align:left;'><?php echo $hm->Zb('rs:def:report_number'); ?></td>
<td style='text-align:left;'><?php echo $hm->Zb('rs:def:date_added'); ?></td>
<td style='text-align:left;'><?php echo $hm->Zb('rs:def:mpd_paper_service'); ?></td>
</tr>
<?php } ?>
</table>
</div>
<?php include(INC_SR_BOTTOM_BAR); ?>
<?php echo $hm->SectEnd(); ?>
<?php } ?>
<!-- [END] Search Result -->
<?php echo $hm->SectEndMarker(); ?>
<?php include(INC_FORM_END); ?>
</div>
<!-- [END] Main Form -->
<?php include(INC_BODY_FOOTER); ?>
</div>
<!-- [END] Container -->
</body>
</html>
<?php include(INC_HTML_END); ?>
When this code is entered once I search the last name of Ramge this is what I am given as a result:
View attachment 3- [ATTACH]5077[/ATTACH]
Attachment 1.png
Attachment 2.png
Attachment 3.png