Jump to content

Recommended Posts

Hallo

 

We have  a table that saws calling numbers report

 

 

The <td>  <td nowrap >{anum}</td> saws the number that our clients number  has dial how can i make this td  everytime hide the last 4 digits

 

Thanks!!

 

<calls_list>
<table class="callsListTable" cellpadding="10">
<tr class="title">
<td width="40"></td>
<td width="20%">{word:date}</td>
<td width="20%">{word:country}</td>
<td width="20%">{word:to_number}</td>  
<td width="20%">{word:from_number}</td>
<td width="20%">{word:cost}</td>
<td width="20%">{word:time}</td>
<td width="20%">{word:price}</td>
</tr>
<call>
<tr class="line{class}">
<td><img src="/templates/g/images/{cdir}.gif"></td>
<td>{calldate}</td>
<td>{rdest}</td>
<td nowrap>{bnum}</td>
<td nowrap >{anum}</td>
<td>{mcost}</td>
<td>{billsec}</td>
<td>{ccost} {curr}</td>
</tr></call>
<tr>
<td colspan="5"></td>
<td colspan="3" align="right"><b>{word:total_calls_cost}: {total_calls_cost} Eur</b></td>
</tr>
</table></calls_list>

Link to comment
https://forums.phpfreaks.com/topic/257011-how-to-hide-digits/
Share on other sites

the anum  is the called number  and we get it from a external xml gateway that hold all details

 

A friend gave me this

 

<script>

var a = '31sd232fsd12ddf143';

var b = a.substring(0, (a.length-4)) + '****';

alert(b);

</script>

 

but i am not so relative with js  :(

Link to comment
https://forums.phpfreaks.com/topic/257011-how-to-hide-digits/#findComment-1317520
Share on other sites

Where do you substitute "{anum}" for the value in the server-side code? Even if it's a feed, you still need parse the template at some point. I'm guessing the last four digits are sensitive for some reason - otherwise why would you need to hide them? Using JavaScript would mean you're still sending the original, desensitised data to the client (so it would still be visible in the source). There might also be a delay in replacing the text, so the user sees the last four digits for a short amount of time. Also any user with JS disabled would always see the original data.

 

As I said, you need to use server-side code to properly sensitise data like this.

Link to comment
https://forums.phpfreaks.com/topic/257011-how-to-hide-digits/#findComment-1317527
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.