Iemand met mysql en php ervaring

Gestart doorTimvz4 reacties32 weergaven

5 berichten · pagina 1 van 1

Timvz

Lid · Topicstarter

Berichten
1.803
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hallo,

zou iemand mij kunnen helpen..?
iemand die een beetje verstand heeft van php en mysql is dit denk ik niet heel moeilijk.
Je krijgt er een vergoeding van 2 punten voor als je de oplossing bied!
Wanneer je een account aanmaakt op http://www.linkenplaats.nl/ en je inlogt en je gaat vervolgens naar instellingen of statastieken geeft de een notice. Kan iemand mij uitleggen hoe ik dit weg krijg? vergoeding is 2 punten!

toevoeging op 20 november 2012, 11:32:44:
Notice van de instellingen pagina: || Notice: Use of undefined constant mysql_num_rows - assumed mysql_num_rows in /home/timvz/domains/linkenplaats.nl/public_html/init.php on line 105

Warning van de statistieken pagina: || Warning: Creating default object from empty value in /home/timvz/domains/linkenplaats.nl/public_html/paginas/statistieken.php on line 2

Instellingen.php

[COLOR= #0000BB]<?php[/COLOR] logincheck[COLOR= #007700]();[/COLOR] 
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]zend[/COLOR][COLOR= #007700]])){[/COLOR]
    [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE leden
    SET naam = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]"
    WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
    
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass_oud[/COLOR][COLOR= #007700]])){[/COLOR]
        [COLOR= #0000BB]$uFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_object"]mysql_fetch_object[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM leden WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]));[/COLOR]
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uFetch[/COLOR][COLOR= #007700]->[/COLOR]wachtwoord [COLOR= #007700]==[/COLOR] [URL="http://www.php.net/sha1"]sha1[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass_old[/COLOR][COLOR= #007700]])){[/COLOR]
            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass_new1[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass_new2[/COLOR][COLOR= #007700]]){[/COLOR]
                [URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass_new1[/COLOR][COLOR= #007700]])){[/COLOR]
                    [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE leden SET wachtwoord = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/sha1"]sha1[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass_new1[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]" WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="succes">Uw wachtwoord is veranderd!</div>[/COLOR][COLOR= #007700];
                }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="error">Uw nieuwe wachtwoord kan niet leeg zijn!</div>[/COLOR][COLOR= #007700];
                }
            }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="error">Uw twee wachtwoorden komen niet overeen!</div>[/COLOR][COLOR= #007700];
            }
        }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="error">Het oude wachtwoord is verkeerd!</div>[/COLOR][COLOR= #007700];
        }
    }[/COLOR]
    
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]open[/COLOR][COLOR= #007700]])[/COLOR] AND [COLOR= #007700]![/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]open[/COLOR][COLOR= #007700]])){[/COLOR]
        [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE websites SET aan = 1 WHERE uid = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);
    }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE websites SET aan = 0 WHERE uid = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);
    }[/COLOR]

    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gb_open[/COLOR][COLOR= #007700]])[/COLOR] AND [COLOR= #007700]![/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gb_open[/COLOR][COLOR= #007700]])){[/COLOR]
        [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE websites SET gb_open = 1 WHERE uid = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);
    }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE websites SET gb_open = 0 WHERE uid = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);
    }[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gb_controle[/COLOR][COLOR= #007700]])[/COLOR] AND [COLOR= #007700]![/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gb_controle[/COLOR][COLOR= #007700]])){[/COLOR]
        [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE websites SET gb_controle = 1 WHERE uid = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);
    }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE websites SET gb_controle = 0 WHERE uid = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);
    }[/COLOR]
    
    [COLOR= #0000BB]$webs[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_object"]mysql_fetch_object[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM websites WHERE uid = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]));
}[/COLOR]
[COLOR= #0000BB]$webs[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_object"]mysql_fetch_object[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM websites WHERE uid = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]));[/COLOR]
?>
<form method="post" action="">
<fieldset class="page">
    <legend><img src="img/icons/user_edit.png" /> Account instellingen</legend>

    <fieldset>
        <legend><img src="img/icons/vcard_edit.png" /> Websitenaam</legend>
        <input type="text" name="naam"  value="<?= $lid->naam ?>"/>
        Opgelet, hiermee word ook de naam waarmee je inlogd veranderd!<br />
        Je vorige naam zal terug beschikbaar worden voor andere leden.<br />
        Alle bezoekers die deze url kennen zullen nu op iemand anders website terechtkomen. <br />
        <b>Denk hier heel goed over na!</b>
    </fieldset>
    <fieldset>
        <legend><img src="img/icons/link_edit.png" /> Wachtwoord</legend>
        Oud wachtwoord<br />
        <input type="password" name="pass_oud" value="" /> <b>Laat leeg om niet te veranderen!</b><br />
        Nieuw wachtwoord<br />
        <input type="password" name="pass_new1"/><br />
        Herhaal nieuw wachtwoord <small>Iedereen maakt wel eens typfouten...</small><br />
        <input type="password" name="pass_new2"/><br />
        Met dit wachtwoord log je in. Laat deze velden leeg om niets aan te passen.
    </fieldset>
</fieldset>
<fieldset class="page">
    <legend><img src="img/icons/world_edit.png" /> Website instellingen</legend>
    <fieldset>
        <legend><img src="img/icons/door_open.png" /> Open</legend>
        <input type="checkbox" name="open" value="ja" [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$webs[/COLOR][COLOR= #007700]->[/COLOR]aan [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]){[/COLOR][URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"checked"[/COLOR][COLOR= #007700];}[/COLOR] ?> /> Open mijn website voor het grote publiek.<br />
        Je kan je website altijd even terug sluiten voor grote werken, enkel jij kan je website bezoeken als deze gesloten is.
    </fieldset>
    <fieldset>
        <legend><img src="img/icons/image.png" /> Logo</legend>
        Wilt u een logo in plaats van een titel? <a href="?p=logo">Verander uw logo</a>
    </fieldset>
</fieldset>
<fieldset class="page">
    <legend><img src="img/icons/comment.png" /> Gastenboek instellingen</legend>
    <fieldset>
        <legend><img src="img/icons/book_open.png" /> Aan</legend>
        <input type="checkbox" name="gb_open" value="ja" [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$webs[/COLOR][COLOR= #007700]->[/COLOR]gb_open [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]){[/COLOR][URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"checked"[/COLOR][COLOR= #007700];}[/COLOR] ?> /> Maak het gastenboek zichtbaar voor uw bezoekers.<br />
        Je kan je gastenboek altijd openen en sluiten zonder dat er berichten verloren gaan. Berichten verwijderen kan je op <a href="?p=onderdelen/gastenboek">de Gastenboek pagina</a>.
    </fieldset>
    <fieldset>
        <legend><img src="img/icons/bug_error.png" /> Controleren</legend>
        <input type="checkbox" name="gb_controle" value="ja" [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$webs[/COLOR][COLOR= #007700]->[/COLOR]gb_controle [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]){[/COLOR][URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"checked"[/COLOR][COLOR= #007700];}[/COLOR] ?> /> Wilt u de berichten eerst controleren voordat deze gepubliceerd worden? Berichten goed- en afkeuren kan op <a href="?p=onderdelen/gastenboek">de Gastenboek pagina</a>.
    </fieldset>
</fieldset>
<fieldset class="page"> 
    <legend><img src="img/icons/disk.png" /> Opslaan</legend>
    <div id="loading" style="display: none; float: left; padding-right: 10px;"><img src="load.gif" /></div> <div id="form" style="float: left;"><input type="submit" name="zend" value="Opslaan!" onclick="$(#loading).toggle(slow);" /></div>
</fieldset>
</form>


Statistieken.php

<?if(isset($_SESSION[id])){
$page->submenu = 
<fieldset class="menu">
    <legend>Andere data</legend>
    <b>Jaar:</b>  . date("Y") . <br />
    <b>Maand:</b>
    <form method="get" action="">
    <input type="hidden" name="p" value="statistieken" />
    <select name="m" onchange="this.form.submit()">
        <option value="1">Januari</option>
        <option value="2">Februai</option>
        <option value="3">Maart</option>
        <option value="4">April</option>
        <option value="5">Mei</option>
        <option value="6">Juni</option>
        <option value="7">Juli</option>
        <option value="8">Augustus</option>
        <option value="9">September</option>
        <option value="10">Oktober</option>
        <option value="11">November</option>
        <option value="12">December</option>
    </select>
    </form>
</fieldset>
;
?>
<fieldset class="page">
    <legend><img src="img/icons/chart_line.png" /> Statistieken</legend>
    Hieronder vind je een tabel van alle statistieken van deze maand. Hiernaast kan je een andere maand kiezen.<br />
    Dit zijn pageviews.
    <head>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">
    google.load("visualization", "1", {packages:["corechart"]});
    google.setOnLoadCallback(drawChart);
    function drawChart() {
    var data = new google.visualization.DataTable();
    data.addColumn(string, Datum);
    data.addColumn(number, Views);
    data.addRows([
      [COLOR= #0000BB]<?php[/COLOR]
      [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]m[/COLOR][COLOR= #007700]])){[/COLOR][COLOR= #0000BB]$maand[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]m[/COLOR][COLOR= #007700]]);}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR][COLOR= #0000BB]$maand[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"n"[/COLOR][COLOR= #007700]);}[/COLOR]
      [COLOR= #0000BB]$dQuery[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM stats_simple WHERE MONTH(date) = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$maand[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]" AND uid = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]" ORDER BY date;"[/COLOR][COLOR= #007700]);[/COLOR]
      [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$dFetch[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/mysql_fetch_object"]mysql_fetch_object[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$dQuery[/COLOR][COLOR= #007700])){[/COLOR]
          [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"["[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$dFetch[/COLOR][COLOR= #007700]->[/COLOR][URL="http://www.php.net/date"]date[/URL] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]", "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$dFetch[/COLOR][COLOR= #007700]->[/COLOR]views [COLOR= #007700].[/COLOR] [COLOR= #DD0000]"],"[/COLOR][COLOR= #007700];
      }[/COLOR]
      ?>
    ]);
    
    var options = {
      width: 990, height: 480,
      title: [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]m[/COLOR][COLOR= #007700]])){[/COLOR][URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Maand "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]m[/COLOR][COLOR= #007700]];}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR][URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Deze maand"[/COLOR][COLOR= #007700];}[/COLOR] ?>
    };
    
    var chart = new google.visualization.LineChart(document.getElementById(chart_div));
    chart.draw(data, options);
    }
    </script>
    </head>
    <body>
    <div id="chart_div"></div>
    </body>

</fieldset>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Bij statistieken.php zegt hij dat $page niet eens bestond, en hij het nu als object beschouwt.

En geef je wel de goede instellingen.php?
Ik zie daar nergens mysql_num_rows staan
0
Timvz

Lid · Topicstarter

Berichten
1.803
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Oke, wat zou ik hier aan kunnen veranderen. Ben zelf niet zon held hier in.
Verder is er maar een instellingen.php te vinden.. zal even iets dieper zoeken.
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Waar gebruik je $page nog meer?

In de eerste foutmelding staat het bestand init,php, ik denk dat je die nodig hebt in plaats van instellingen.php
0
Timvz

Lid · Topicstarter

Berichten
1.803
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Oke zal deze er even bij pakken.

toevoeging op 20 november 2012, 17:44:13:
init.php

[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]/////////////////////////////////////////////////////
//       INSTELLINGEN AANPASSEN IN CONFIG.PHP      //
//  NIETS AANPASSEN ALS JE NIET WEET WAT JE DOET!  //
/////////////////////////////////////////////////////

//////////////////////
////// CONFIG ///////
//////////////////////[/COLOR]
[URL="http://www.php.net/include_once"]include_once[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]config.php[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #FF8000]///////////////////////
////// FUNCTIES ///////
///////////////////////[/COLOR]
[URL="http://www.php.net/require_once"]require_once[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]includes/adscaptchalib.php[/COLOR][COLOR= #007700]);
function[/COLOR] get_chart[COLOR= #007700]([/COLOR][COLOR= #0000BB]$procent[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$width[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]180px[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$height[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]20px[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$bckno[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]#CCC[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$bckyes[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]#666[/COLOR][COLOR= #007700]){[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]
    <div style="width:[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$width[/COLOR] [COLOR= #007700].[/COLOR][COLOR= #DD0000]; height:[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$height[/COLOR] [COLOR= #007700].[/COLOR][COLOR= #DD0000]; background-color:[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$bckno[/COLOR] [COLOR= #007700].[/COLOR][COLOR= #DD0000];">
        <div style="width:[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$procent[/COLOR] [COLOR= #007700].[/COLOR][COLOR= #DD0000]%; height:100%; background-color:[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$bckyes[/COLOR] [COLOR= #007700].[/COLOR][COLOR= #DD0000]; border-right:1px #FFF solid; text-align: center; color: white;">
            [/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$procent[/COLOR] [COLOR= #007700].[/COLOR][COLOR= #DD0000]%
        </div>
    </div>
    [/COLOR][COLOR= #007700];
}
function[/COLOR] send_mail[COLOR= #007700]([/COLOR][COLOR= #0000BB]$subject[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$to[/COLOR][COLOR= #007700]){[/COLOR]
    [COLOR= #0000BB]$message[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <style>
    a:link {
        color:#046380;
        text-decoration:underline;
    }
    a:visited {
        color:#A7A37E;
        text-decoration:none;
    }
    a:hover {
        color:#002F2F;
        text-decoration:underline;
    }
    a:active {
        color:#046380;
        text-decoration:none;
    }
    </style>
    </head>
    <body>
    <table align="center" width="600" cellpadding="2" cellspacing="2">
      <tr>
        <td bgcolor="#FFFFFF"><font face="Arial, Helvetica, sans-serif" size="1" color="#999999">Zie je deze mail niet goed? Voeg dit emailadres dan toe aan je Veilige afzenders.</font></td>
      </tr>
    </table>
    <table align="center" width="600" style="border: #666666 1px solid;" cellpadding="0" cellspacing="0">
      <tr>
        <td bgcolor="#efefef" style="border-bottom: #666666 1px solid;" ><br>
          <TABLE border="0" align="center">
            <TR>
              <TD><img src="[/COLOR] [COLOR= #007700].[/COLOR] MAIL_SITE [COLOR= #007700].[/COLOR] [COLOR= #DD0000]images/generic_header.gif" alt="" border="0"></TD>
            </TR>
          </TABLE>
          <br>
        </td>
      </tr>
      <tr>
        <td><TABLE width="510" border="0" cellpadding="0" cellspacing="0" align="center">
            <TR>
              <TD>
                <p style="font-family: arial,  helvetica, sans-serif;font-size: 25px;color: #666666;"><br>
                      [/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$subject[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]
                </p>
                    <p style="font-family: arial,  helvetica, sans-serif;font-size: 12px;color: #666666;">
                [/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]
                </p>
                    <br>
                    <font face="Verdana, Arial, Helvetica, sans-serif" color="#666666" size="1">SPS<br />StartPaginaScript<br /><a href="[/COLOR] [COLOR= #007700].[/COLOR] MAIL_SITE [COLOR= #007700].[/COLOR] [COLOR= #DD0000]">[/COLOR] [COLOR= #007700].[/COLOR] MAIL_SITE [COLOR= #007700].[/COLOR] [COLOR= #DD0000]</a></font><br><br>
          </TD>
            </TR>
          </TABLE>
    </table>
    </body>
    </html>
    
    [/COLOR][COLOR= #007700];[/COLOR]
    [COLOR= #0000BB]$headers[/COLOR]  [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]MIME-Version: 1.0[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
    [COLOR= #0000BB]$headers[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]Content-type: text/html; charset=iso-8859-1[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
    [COLOR= #0000BB]$headers[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]To: [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$to[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000][/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
    [COLOR= #0000BB]$headers[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]From: [/COLOR][COLOR= #007700].[/COLOR] MAIL_NAME [COLOR= #007700].[/COLOR][COLOR= #DD0000] <[/COLOR][COLOR= #007700].[/COLOR] MAIL_ADRES [COLOR= #007700].[/COLOR][COLOR= #DD0000]>[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
    
    [URL="http://www.php.net/mail"]mail[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$to[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$subject[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$message[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$headers[/COLOR][COLOR= #007700]);
}
function[/COLOR] haspart[COLOR= #007700]([/COLOR][COLOR= #0000BB]$onderdeel[/COLOR][COLOR= #007700]){[/COLOR]
    [COLOR= #0000BB]$aantal[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM onderdelen WHERE uid = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]" AND onderdeel = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$onderdeel[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]));[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aantal[/COLOR] [COLOR= #007700]!=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
        [URL="http://www.php.net/return"]return[/URL] true[COLOR= #007700];
    }[/COLOR][URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/return"]return[/URL] false[COLOR= #007700];
    }
}
function[/COLOR] logincheck[COLOR= #007700](){[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]])){[/COLOR]
        [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Je moet ingelogd zijn!"[/COLOR][COLOR= #007700]);
    }[/COLOR]
    [COLOR= #0000BB]$sQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM websites WHERE uid = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]){[/COLOR]
        [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO websites (uid) VALUES ( "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]");"[/COLOR][COLOR= #007700])[/COLOR]or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());
    }
}[/COLOR]

[COLOR= #FF8000]///////////////////////
////// DATABASE ///////
///////////////////////
// Make a MySQL Connection[/COLOR]
[URL="http://www.php.net/mysql_connect"]mysql_connect[/URL][COLOR= #007700]([/COLOR]DB_HOST[COLOR= #007700],[/COLOR] DB_USER[COLOR= #007700],[/COLOR] DB_PASSWORD[COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[URL="http://www.php.net/mysql_select_db"]mysql_select_db[/URL][COLOR= #007700]([/COLOR]DB_DATABASE[COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]])){[/COLOR]
    [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE leden SET laatst_gezien = CURRENT_TIMESTAMP WHERE id="[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
    [COLOR= #0000BB]$lid[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_object"]mysql_fetch_object[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM leden WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]));
}[/COLOR]
?>


toevoeging op 21 november 2012, 20:33:39:
BUMP

toevoeging op 25 november 2012, 21:31:22:
BUMP
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