Author Topic: rem.php variables?  (Read 2572 times)

idealizm

  • Posts: 13
    • View Profile
rem.php variables?
« on: August 15, 2007, 02:44:27 am »
Okay, you've stumped me.  What do the variables mean for the new rem.php file?  I can't figure out what $c=5 is supposed to do...   ;)

And $x?

And how does it pass the notes on WHICH lists to remove from when dealing with a multiple-list unsubscribe setup for !remove?  Is that stored internally for all usage of that global code?  Or can I pass a value to remove them from multiple lists by assigning a variable ($c?) the lists to do so (along with the $u=uid, of course)?

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
rem.php variables?
« Reply #1 on: August 15, 2007, 01:09:11 pm »
Take a look at the Remove Link "link style" section on the message code editing page:
Quote
rem.php?u=1a2b3c4
rem.php?c=5&u=1a2b3c4
rem.php?u=5,1a2b3c4
rem.php?x=5&l=2&e=email@addr.com
rem.php?x=5,2,email@addr.com

The 5 in the example is the message code ID, which is used to determine the link options.  

This section grabs the lists from $c
Code: [Select]
if($c){
  // echo "checking \$c: ";
  $drow = mysql_query("select data3,data4 from $dtable where id = '".addslashes($c)."';");
  if(@mysql_num_rows($drow)>0){
   list($data3,$data4)=mysql_fetch_row($drow);
   if($data3=='1') $delete = 1;
   if($data4){
    // multi list
    if(strpos(' '.$data4,'*')>0){
     // put all lists in array
     $rows = mysql_query("select listnum from $ltable where 1 order by listnum");
     while(list($ln)=mysql_fetch_row($rows)){
      if($ln<>$list) $lists[] = $ln;
     }
    } else {
     // get lists from string
     $lists = explode(',',$data4);
    }
   }
  }

Regards ;)
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

idealizm

  • Posts: 13
    • View Profile
rem.php variables?
« Reply #2 on: August 15, 2007, 02:12:19 pm »
Yeah, I saw all that code, but couldn't figure out what it was doing.  ;)  What is data3,data4 and where's it stored?

And, in the link style section (where I also visited), it didn't describe what these things do either...

Anyway, I sent a test blast to myself via list=2, but it came up as $c=5 when i set it to be formatted to use this remove link format: "rem.php?c=5&u=1a2b3c4".  Why would this be?  What is 5 in this real-world usage of this format?

Is the 5 in $c=5 pointing to a "set" of lists to unsubscribe them from?

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
rem.php variables?
« Reply #3 on: August 15, 2007, 02:20:41 pm »
The lm_codes table should have data1 thru data5 where options are stored.  The "5" matches up to the lm_codes auto incremented "id" field, which we use to retrieve the value of data4 which contains the list(s) to unsubscribe from separated by commas.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

idealizm

  • Posts: 13
    • View Profile
rem.php variables?
« Reply #4 on: August 15, 2007, 03:10:14 pm »
I understand finally!!  haha thank you...  ;)