Not sure how to finish this zap statement/conditional...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ClassicNancy
    New Member
    • Jun 2007
    • 8

    Not sure how to finish this zap statement/conditional...

    I am trying to make this statement say to delete the deleted folder if you click that zap...or the inbox if it is that zap or the sent box if it is that zap. I started a new one for each and it didn't work so either I missed something in the others or I need to make this one refer to them all in some way. Do I need an or somewher ebetween them or in this code?? How do you do that if so?

    [code=php]
    else if ($HTTP_GET_VARS["zap"])
    zap_deleted_ite ms($HTTP_GET_VA RS);
    [/code]

    [Please use CODE tags when posting source code. Thanks! --pbmods]
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Changed thread title to better match contents.

    Originally posted by ClassicNancy
    I started a new one for each and it didn't work so either I missed something in the others or I need to make this one refer to them all in some way. Do I need an or somewher ebetween them or in this code??
    What is your code doing?
    What is it supposed to do?

    Comment

    • ClassicNancy
      New Member
      • Jun 2007
      • 8

      #3
      Thank you. I'm so PHP stupid I wasn't even sure how to name it.

      The code is to allow me to be able to permanenly delete all the messages in teh dleted folder. I want to make it also delete all the messages in the Inbox and Sent folder instead of having to move them to the delted folder to do so. If I change the delted_items to inbox it workd for that but I need to know how I make it work for all three folders.

      Comment

      • ClassicNancy
        New Member
        • Jun 2007
        • 8

        #4
        Here is the other code that goes with it.

        Code PHP:

        [PHP]if (key($folders) == 102) // if deleted items
        $folder_list1 = substr($folder_ list1, 0, strlen($folder_ list1) - 5) .
        sprintf(' &nbsp; <A HREF="pm.php?za p=1&ref=%s">.:% s:.</A><BR>' . "\n",
        $vars["folder_id"], lg("pm_zap"));[/PHP]

        I made one of these for each folder. Then this is the actual function code.

        [PHP]function zap_deleted_ite ms($vars)
        // Permanently deletes the contents of the deleted items folder
        {
        pm_zap_deleted_ items(USER_ID);
        $folder_id = $vars["ref"];
        redirect("/pm.php?folder_i d=$folder_id");[/PHP]

        Comment

        Working...