Uilenvleugel

Gestart doorShahiem16 reacties24 weergaven

17 berichten · pagina 1 van 2

Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hi,

Ik heb een priveberichten script maar als ik 2 berichten met dezelfde naam heb dan weergeeft het bericht van het 1e bericht en niet van die moet zijn.

Dus bijvoorbeeld dit:

Test - Test12
Test - Testdd

Dan weergeef hij bij allebij de berichten dezelfde bericht?
Hoe kan dit?

Code

$uilQuery = $core->mysql->query("SELECT
                                                    l.naam,
                                                    l.color,
                                                    l.afdeling,
                                                    l.signature,
                                                    (
                                                        SELECT
                                                            COUNT(1)
                                                        FROM
                                                            forum_posts
                                                        WHERE
                                                            lid_id = l.id
                                                    ) AS aantal_leden_posts,
                                                    u.id,
                                                    u.inhoud,
                                                    u.datum,
                                                    u.onderwerp,
                                                    u.ontvanger_id,
                                                    u.verwijderd
                                                FROM
                                                    leden l,
                                                    uilenvleugel u
                                                WHERE
                                                    l.id = u.verstuurder_id
                                                AND
                                                    u.onderwerp = ".$core->entities($core->link_replace($param[2], 2))."");
                if($core->mysql->num_rows($uilQuery) != 1)
                {
                    
                    $uilFetch = $core->mysql->fetch($uilQuery);
                    
                    if($uilFetch[ontvanger_id] == $core->leden->ledeninfo[eigen][id] || $core->isLevel(alle_uilen))
                    {
                        
                        if($uilFetch[verwijderd] == 1 && !$core->isLevel(alle_uilen))
                        {
                            
                            echo VERWIJDERD;
                        
                        }
                        else
                        {
                            $core->mysql->query("UPDATE
                                                    uilenvleugel
                                                SET
                                                    gelezen = 1
                                                WHERE
                                                    id = ".$uilFetch[id]."");
                            
                            ?>
                            <h1>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]entities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$uilFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]onderwerp[/COLOR][COLOR= #007700]]);[/COLOR] ?></h1>
                            <div id="contentgedeelte">
                            <table>
                                <tr>
                                    <td style="width: 140px;" class="donker">
                                        [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$uilFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datum[/COLOR][COLOR= #007700]];[/COLOR] ?>
                                    </td>
                                    <td class="donker" style="width: 340px;">
                                        <div style="width: 16px; height: 16px; background: url([COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] ROOT[COLOR= #007700];[/COLOR] ?>img/report.png) no-repeat; float: left;"><a href="#" style="width: 16px; height: 16px; display: block;"></a></div>
                                        <div style="width: 16px; height: 16px; background: url([COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] ROOT[COLOR= #007700];[/COLOR] ?>img/verwijder.png) no-repeat; float: left; margin-left: 5px;"><a href="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] ROOT[COLOR= #007700];[/COLOR] ?>uilenvleugel/verwijder/[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]entities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$param[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]2[/COLOR][COLOR= #007700]]);[/COLOR] ?>" style="width: 16px; height: 16px; display: block;"></a></div>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="donker" style="width: 110px; border-right: 1px solid #fff; text-align: center;">
                                        <a href="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] ROOT[COLOR= #007700];[/COLOR] ?>profiel/[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]entities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$uilFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]]);[/COLOR] ?>">[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/ucfirst"]ucfirst[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]entities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$uilFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]]));[/COLOR] ?></a><br /><br />
                                        <img src="http://www.one2xs.com/img/avatars/[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]entities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$uilFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]]);[/COLOR] ?>" /><br /><br />
                                        
                                        Posts: [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/number_format"]number_format[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uilFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]aantal_leden_posts[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000],[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000].[/COLOR][COLOR= #007700]);[/COLOR] ?>
                                    </td>
                                    <td class="donker" style="width: 340px;">
                                        [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/nl2br"]nl2br[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]entities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$uilFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]inhoud[/COLOR][COLOR= #007700]]));[/COLOR] ?>
                                    </td>
                                </tr>
                                [COLOR= #0000BB]<?php[/COLOR]
                                [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uilFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]signature[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700])
                                {[/COLOR]
                                    
                                    ?>
                                    <tr>
                                        <td class="licht" style="width: 110px; border-top: 1px solid #fff; text-align: center; ">
                                            [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]advertentie[COLOR= #007700]->[/COLOR]weergeef[COLOR= #007700]([/COLOR][COLOR= #DD0000]100x100[/COLOR][COLOR= #007700]);[/COLOR] ?>
                                        </td>
                                        <td class="licht" style="width: 340px;">
                                            [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/nl2br"]nl2br[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]entities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$uilFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]signature[/COLOR][COLOR= #007700]]));[/COLOR] ?>
                                        </td>
                                    </tr>
                                    [COLOR= #0000BB]<?php[/COLOR]
                                
                                [COLOR= #007700]}[/COLOR]
                                ?>
                            </table><br /><br />
                            </div>
                            <div id="contentbot"></div>
                            [COLOR= #0000BB]<?php[/COLOR]
                        
                        [COLOR= #007700]}
                    
                    }[/COLOR]
                    [URL="http://www.php.net/else"]else[/URL]
                    [COLOR= #007700]{[/COLOR]
                        
                        [URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Location: ../../uilenvleugel[/COLOR][COLOR= #007700]);
                    
                    }
                
                }[/COLOR]
                [URL="http://www.php.net/else"]else[/URL]
                [COLOR= #007700]{[/COLOR]
                    
                    [URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Location: ../../uilenvleugel[/COLOR][COLOR= #007700]);
                
                }[/COLOR]
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Je gebruikt geen while? emo
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Je snapt me volgensmij niet.
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Zat weer eens half te slapen emoKun je niet beter met id werken om te verwijderen dan? Dan zit je niet met dit gedoe
0
Berichten
457
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Oftewel. Geef het bericht niet alleen een naam maar ook een nummer. De bestanden moeten worden opgeslagen als hun nummerike naam en niet als het onderwerp van het bericht. Dit nummer hoeven hun niet te zien.
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Spyrose dat doe ik ook yummie
0
Erik

Lid

Berichten
7.109
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Of je doet zo links: /uilenvleugel/verwijder/1-prive-bericht-naam ?
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Het gaat niet om verwijderen maar om een uil te bekeijken yummie
0
Erik

Lid

Berichten
7.109
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Kan je toch ook doen /lees/1-prive-bericht-naam ?
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ja kan ook , PS: Ik zit met nog een probleem.

Ik heb een tas script maar ik wil dat als je iets heb van dezelfde naam(id) dat ie maar 1 keer de product weergeeft en dat er dan achter komt te staan Hoeveel producten je van die hebt.

Code

$mijnTasQuery = $core->mysql->query("SELECT
                                            id,
                                            artikel_id
                                        FROM
                                            gekochte_spullen
                                        WHERE
                                            lid_id = ".$core->leden->ledeninfo[eigen][id]."
                                        ");
                                            
        while($mijnTasFetch = $core->mysql->fetch($mijnTasQuery))
        {
                $artikelQuery = $core->mysql->query("SELECT
                                            naam
                                        FROM
                                            winkels_artikelen
                                            
                                        WHERE
                                            id = ".$mijnTasFetch[artikel_id]."
                                        ");
                                            
                $artikelFetch = $core->mysql->fetch($artikelQuery);
    
                echo $artikelFetch[naam].<br />.number_format($core->mysql->num_rows($mijnTasFetch), 0, ,, .).;
            }
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
In de query $mijnTasQuery moet je er GROUP BY artikel_id in zetten denk ik
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dat werkt, alleen hij telt ze nog niet op.smile
0
Miel

Lid

Berichten
4.462
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
count(id) AS aantal
Zou moeten werken dan denk ikyummie
0
Berichten
457
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Je moet ze gewoon noemen:
1.txt
En als inhoud:
$name = "Hey Shahiem";

Hey Shahiem,
Blablabla.....

Gr SpyRose

2.txt
En als inhoud:
$name = "Apenkool";

Hey Fred,
Blablabla.....

Gr SpyRose

Je moet ze dan neit aanroepen via $name, maar via het nummer voor de txt. dus 2 ofzo. Dan kun je er ook nooit 2 hebben.
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ze willen geen aparte bestandjes aanmaken, het staat namelijk in een MySQL database yummie
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren