Calling PHP Coders

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DirkPitt
    Confirmed User
    • Sep 2002
    • 357

    #1

    Calling PHP Coders

    I have a matching/dating site that sends these "Virtual Kisses" to the member?s personal email. I want to change it so the "Virtual Kiss" just goes to the member?s internal inbox not to their personal email. Can anyone tell me how to change this script to do this? Thanks


    if($profile_id hahahaha "")
    {
    include "templates/index.ihtml";
    return;
    }

    $f_profile = f(q("SELECT id, name, status FROM dt_profile WHERE member_id='$fMember[id]'"));
    $f_target_profile = f(q("SELECT member_id FROM dt_profile WHERE id='$profile_id'"));
    $f_target_member = f(q("SELECT email FROM dt_members WHERE id='$f_target_profile[member_id]'"));

    if($f_profile[ status ] != 1)
    {
    include "templates/vkiss_failed.ihtml";
    }
    else
    {
    $profile_name = $f_profile[ name ];
    $profile_link = $root_host."index.php?page=view_profile&id=$f_prof ile[id]";
    $profile_free_text = "";

    $gm = f(q("select id from dt_members where member_id='$fMember[id]' and system_status='1' and system_status_end>='".strtotime(date("d M Y H:i:s"))."'"));
    if($gm != "")
    {
    $profile_free_text = "You can contact this user for free!";
    }

    mailSend($user_info["email"], "virtual_kiss");
    include "templates/vkiss_success.ihtml";
    }
    ?>
    Thanks,
    Kit
  • AvanteGuard
    Confirmed User
    • Jan 2004
    • 451

    #2
    To not send an email to the private account, comment out this line:

    // mailSend($user_info["email"], "virtual_kiss");

    To send it to the internal account (if it doesn't already, you need to tie it into the system, depending on what system it is). Contact me on ICQ#314942262 if you need any more help!

    Looking for Fast Professional Programming? http://www.imadigan.com
    ICQ: 314-942-262 | MSN/Email: [email protected]

    Comment

    • DirkPitt
      Confirmed User
      • Sep 2002
      • 357

      #3
      Which part of this script tells it to send a message to an internal inbox?

      <?

      if($action hahahaha send)
      {
      $fBlocked = f(q("SELECT id FROM dt_blocked WHERE member_id = '$rid' and blocked_id = '$fMember[id]'"));
      if ($fBlocked[id] != "")
      {
      $errors_num++;
      $errors_string .= "$errors_num. You have been blocked by this user!<br>\n";
      }
      if ($rid hahahaha"")
      {
      $errors_num++;
      $errors_string .= "$errors_num. Please enter a recepient.<br>\n";
      }
      if ($subject hahahaha"")
      {
      $errors_num++;
      $errors_string .= "$errors_num. Please enter a subject.<br>\n";
      }
      if ($message hahahaha"")
      {
      $errors_num++;
      $errors_string .= "$errors_num. Please enter a message.<br>\n";
      }
      if ($errors_num)
      {
      $r_records = q("SELECT * FROM dt_address_book WHERE member_id='$fMember[id]'");
      include "templates/send_message.ihtml";
      }
      else
      {
      q("INSERT INTO dt_messages (sid, rid, subject, message, timesent) VALUES (".$fMember[id].", $rid, '$subject', '$message', ".(strtotime(date("d M Y H:i:s"))).")");
      include "templates/message_sent.ihtml";

      $query = "select * from dt_members where id = '$rid'";
      $user_info = f(q($query));
      $login = $user_info["login"];
      $generated_link = $root_host."index.php?page=sign_in";

      }

      }
      else
      {
      if(($reply hahahaha "") && (! $valid))
      {
      include "templates/cannot_contact.ihtml";
      return;
      }
      if ($reply != "")
      {
      $r_records = q("SELECT * FROM dt_messages WHERE id=$reply");
      }
      elseif ($mid != "")
      {
      $f_record = f(q("SELECT * FROM dt_address_book WHERE (member_id='$fMember[id]' AND contact_profile_id = '$mid')"));
      }
      elseif ($pid != "")
      {
      $f_record = f(q("SELECT * FROM dt_address_book WHERE (member_id='$fMember[id]' AND contact_profile_id = '$pid')"));
      }
      else
      {
      $r_records = q("SELECT * FROM dt_address_book WHERE member_id='$fMember[id]'");
      }

      include "templates/send_message.ihtml";
      }
      ?>
      Thanks,
      Kit

      Comment

      • gornyhuy
        Chafed.
        • May 2002
        • 18041

        #4
        looks like this section does:
        q("INSERT INTO dt_messages (sid, rid, subject, message, timesent) VALUES (".$fMember[id].", $rid, '$subject', '$message', ".(strtotime(date("d M Y H:i:s"))).")");
        include "templates/message_sent.ihtml";

        its the only thing that actually inserts anything in the DB, not sure how much of the surrounding code is specifically needed by the internal message though.

        icq:159548293

        Comment

        • fuzebox
          making it rain
          • Oct 2003
          • 22353

          #5
          Now this is interesting...

          Comment

          • BradM
            Confirmed User
            • Dec 2003
            • 3397

            #6
            LOL I was thinking the same thing Rob.

            Comment

            • fuzebox
              making it rain
              • Oct 2003
              • 22353

              #7
              Looks like the mailSend() function takes an argument to decide what to do next... "virtual_kiss" seems to be it, so you need to look at that code to find out what exactly is inserted into the database.

              Comment

              • fuzebox
                making it rain
                • Oct 2003
                • 22353

                #8
                Originally posted by BradM
                LOL I was thinking the same thing Rob.
                I think this is the most code I've seen in one sitting on GFY

                Comment

                Working...