Need Upgrade 4 Pm 2 All

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Need Upgrade 4 Pm 2 All

    this in core.php
    Code:
    function mass($text){
    $offline = 300;
    $sql = @mysql_query("SELECT * from `lib3rtymrc_users` WHERE lastact>'".intval(time()-$offline)."'");
    while ($id = @mysql_fetch_array($sql)){
    @mysql_query("INSERT INTO lib3rtymrc_private SET byuid = '1', touid = '".$id[0]."', text = '[b]Pm to all conected users:[/b][br/]".$text."', timesent = '".time()."'");
    }
    }
    what i need 2 put 2 show the name of who send the pm not only the id 1 ..? hmm
    Hate romains that take codes from here and tell to all that they had made that

    #2
    but how U insert text to msg???
    and why u not send inbox only members active at last 24hours???
    ;)
    if like my post click:

    http://coding-talk.com/images/totall...ost_thanks.gif

    Comment


      #3
      thi is the rest of the code
      Code:
      else if ($action=="mass"){
      
      echo &#39;<card id="main" title="Send 2 all online!!!">
      
      &#39;;
      
      echo "Text:
      
      <input type=\"text\" name=\"msg\"/>
      
      <anchor>send";
      echo "<go href=\"sef.php?action=mass2&amp;sid=$sid\" method=\"post\">";
      echo "<postfield name=\"msg\" value=\"$(msg)\"/>";
      echo "</go></anchor>";
      echo "
      <a href=\"index.php?action=proprietar&amp;sid=$sid\">Panou Proprietar</a>
      "; 
      
      echo "
      
      <a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>Acasa</a>";
      echo "</p></card>";
      
      }
      
      /////////pm tuturor
      else if ($action=="mass2"){
      echo &#39;<card id="main" title="PM sent to online members!!!">
      
      &#39;;
      $msg = $_POST[&#39;msg&#39;];
      mass($msg);
      echo "Pm sent 2 all $numesite online members !
      ";
      echo "
      
      <a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>Acasa</a>";
      echo "
      <a href=\"index.php?action=proprietar&amp;sid=$sid\">Panou Proprietar</a>
      "; 
      
      echo "</p></card>";
      
      }
      because that is what i need :P:P .. ideas ? :D
      Hate romains that take codes from here and tell to all that they had made that

      Comment


        #4
        Change to this:

        <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>function mass($text,$uid){
        $offline = 300;
        $sql = @mysql_query("SELECT * from `lib3rtymrc_users` WHERE lastact>&#39;".intval(time()-$offline)."&#39;");
        while ($id = @mysql_fetch_array($sql)){
        @mysql_query("INSERT INTO lib3rtymrc_private SET byuid = &#39;$uid&#39;, touid = &#39;".$id[0]."&#39;, text = &#39;Pm to all conected users:[br/]".$text."&#39;, timesent = &#39;".time()."&#39;");
        }
        }</div>

        <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>/////////pm tuturor
        else if ($action=="mass2"){
        $uid = getuid_sid($sid);
        echo &#39;<card id="main" title="PM sent to online members!!!">

        &#39;;
        $msg = $_POST[&#39;msg&#39;];
        mass($msg,$uid);
        echo "Pm sent 2 all $numesite online members !
        ";
        echo "

        <a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>Acasa</a>";
        echo "
        <a href=\"index.php?action=proprietar&amp;sid=$sid\"> Panou Proprietar</a>
        ";
        echo "</p></card>";
        }</div>

        ...untested

        Comment


          #5
          thx bru respect to work completly the cod must look like this :
          Code:
          /////////pm 2 all
          else if ($action=="mass2"){
          echo &#39;<card id="main" title="PM sent to online members!!!">
          
          &#39;;
          $msg = $_POST[&#39;msg&#39;];
          $uid = getuid_sid($sid);
          mass($msg,$uid);
          echo "Pm sent 2 all $sitename online members !
          ";
          echo "
          
          <a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a>";
          echo "
          <a href=\"index.php?action=propcp&amp;sid=$sid\">Prop Cp</a>
          "; 
          echo "</p></card>";
          }
          $uid = getuid_sid($sid);
          app but if i want to send inbox only members active at last 24h what code i need?:D
          Hate romains that take codes from here and tell to all that they had made that

          Comment


            #6
            $offline = 24 * 60 * 60;

            Comment


              #7
              but why not use xhtml code???
              if like my post click:

              http://coding-talk.com/images/totall...ost_thanks.gif

              Comment


                #8
                dont like xhtml =)) :P
                Hate romains that take codes from here and tell to all that they had made that

                Comment

                Working...
                X