heee, wieso gibt er string doppelt aus ???

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

  • heee, wieso gibt er string doppelt aus ???

    ich habe ein interal message system geprogt. nun aber ein problem was ich mir nicht so recht erklären kann.

    wenn ich in der betreff zeile 'wer bist du?' eingebe, gibt das mail read skipt die zeile 'wer bist du?' doppelt aus. lasse ich jetzt das fragezeichen weg, ist alles normal. gibt den satz nur einmal aus. also musses ja am fragezeichen liegen.

    muss ich das umwandeln? wenn ja wie?

    fehler sieht so aus:

    falsch: wer bist du?...wer bist du?

  • #2
    poste mal ein bisschen Sourcecode

    Comment


    • #3
      escape vielleicht das Fragezeichen mal.

      Comment


      • #4
        PHP Code:
        <?php
        // db abfrage

           
        $sql "select MESSAGE_ID,
                          MESSAGE_USER_ID,
                          MESSAGE_TOUSER_ID,
                          MESSAGE_BETREFF,
                          MESSAGE_STATUS,
                          MESSAGE_DATUM,
                          MESSAGE_VNAME
                     from message 
                    where MESSAGE_USER_ID = '"
        .$_SESSION['UID']."'
                 order by MESSAGE_DATUM
                     desc"
        ;

           
        $db->query($sql);

        // ausgabe

        while($db->fields())
           {

              list(
        $datum$zeit) = explode(" "$db->field['MESSAGE_DATUM']);
              list(
        $year,$mon,$day) = explode("-"$datum);
              list(
        $hour,$min,$sec) = explode(":"$zeit);

              
        $von $db->field['VON_USER'];
              
        $betreff $db->field['MESSAGE_BETREFF'];
              
        $status $db->field['MESSAGE_STATUS'];
              
        $mid =  $db->field['MESSAGE_ID'];

              
        ?> <tr><td height="10"> <?
              include ("skins/$user_skin/email_loop.html");
              ?> </td></tr> <?

           }
        }

        // email ausgabe
        <table width="450" height="15" border="0" align="left" cellpadding="0" cellspacing="0">
          <tr>
            <td width="5%" height="1"><div align="center">
                  <input type="checkbox" name="cbox[]" value="<?=$mid;?>">
              </div></td>
            <td width="25" height="15" bgcolor="">
              <? if($sub == "outbox") { ?>
              <div align="center"><strong><img src="skins/<?=$user_skin;?>/gfx/mail/<?=$email_status[$status];?>" alt="neu" width="38" height="23" border="0"></strong></div>
              <? } elseif($sub == "inbox" && $status == "1") { ?>
              <div align="center"><strong><font color="#FF0000"> <img src="skins/<?=$user_skin;?>/gfx/mail/p_new.gif" alt="neu" width="38" height="23" border="0">
                </font> </strong>
                <?   } ?>
              </div></td>
            <td width="40%" height="15"><a href="index.php?PHPSESSID=<?=$sid;?>&amp;section=mailbox&amp;sub=<? if($sub == "inbox") { echo "inbox"; } elseif($sub == "outbox") { echo "outbox"; } ?>&amp;action=read&amp;mid=<?=$mid;?><? if($sub == "outbox") { ?>&amp;sig=1<?}?>"><b>

            <? $num = strlen($betreff);
               if($num >= 12) {
                  echo htmlspecialchars(substr($betreff,0,12) . '...');
                  }
               if($num < 15) {
                  echo htmlspecialchars($betreff);
                  } ?>

            </b></a></td>

            <td width="100" height="15"><div align="center"><font color="#000000">
                <? if($sub == "inbox") { ?>
                <a href="index.php?PHPSESSID=<?=$sid;?>&amp;section=showprofil&amp&amp;uid=<?=$uid;?>">
                <? echo "<b>von ".$von; } elseif($sub == "outbox") {  } else { echo "<b>von ".$von; }?>
                </font></b></div></td>
            <td width="250" height="15"><div align="center">am
                <b><?=$day.".".$mon."</b> um <b>".$min.":".$hour."</b>";?>
              </div></td>
          </tr>
        </table>

        Comment


        • #5
          habe fehler gefunden, danke für support

          Comment


          • #6
            Original geschrieben von nignag
            habe fehler gefunden, danke für support
            sagst du uns noch kurz, was es war ...?
            I don't believe in rebirth. Actually, I never did in my whole lives.

            Comment


            • #7
              das wars

              PHP Code:
              if($num >= 12) {
                        echo 
              htmlspecialchars(substr($betreff,0,12) . '...');
                        }
                     if(
              $num 15) {
                        echo 
              htmlspecialchars($betreff);
                        } 
              ?> 
              ich hab
              PHP Code:
               num >= 15 
              gesetzt, jetzt gehts

              Comment

              Working...
              X