• » webSPELL.org - Free Content Management System
  • Language switch: English German
  • login



    » lost password?   » register now
  • About webSPELL

    webSPELL is a free Content Management System which was especially developed for the needs of esport related communities. Since a short while we are also offering an optimized and enhanced webSPELL version for the special requirements of non-profit organisations. The purpose of both systems is to offer a professional and free opportunity to create and administrate your own website in an easy and optimized way.

    » Learn more about webSPELL     » Download webSPELL now!
  • Advertisement

    Follow us

  • Sort:     printview
    Author
    Message
    webSPELL newbie
    37 Posts
    20.09.2011, 22:13 offline quote 

    Ok das stimmt natürlich lächeln aber korrigieren könnte man es ja mal der Richtigkeit wegen zunge raus
    webSPELL user
    270 Posts
    20.09.2011, 21:27 email offline quote 

    ja daher auch das Kommentar 'doppelt gemoppelt, aber egal' ^^

    Ist dennoch kein Fehler ;-)

    This signature is under construction...
    webSPELL newbie
    37 Posts
    20.09.2011, 20:31 offline quote 

    Hm ne soweit ich das sehe ist es doch nicht in Ordnung, weil wenn du keinen $_GET['site'] Wert übergibst wird $site = '' gesetzt und dann ergibt isset() im cotent doch keinen Sinn mehr ?!
    webSPELL user
    270 Posts
    20.09.2011, 20:15 email offline quote 

    hm, ist doch in Ordnung. Wenn $_GET['site'] nicht gesetzt ist dass wird die Variable auf '' also leer gesetzt.

    danach wird dann eben nochmal gekuckt ob $site gesetzt ist (doppelt gemoppelt, aber egal...)

    Code:
    1.
    if (empty($site)) $site = 'news;


    wäre da sinnvoller.

    Probleme hat man hier nur, wenn die Datei news.php nicht vorhanden ist.

    Code:
    1.
    if($site == null) $site="news";


    würde hier im übrigen nichts bringen, da $site nie null ist (außer sie wäre nicht gesetzt, was aber der Fall ist wenn man _functions.php richtig einbindet). Daher würde deine Abfrage nichts bringen, wenn dann wie oben schon erwähnt empty($site) verwenden.
    Nur so als Anmerkung, sinnvoll wäre hier sowas ähnliches wie:

    Code:
    1.
    2.
    3.
    4.
    5.
    6.
    if (!file_exists($site.".php")) $site = 'news';
    if (!file_exists('news.php')){
         echo ("News-Page not found.");
         exit();
    }
    else include ($site.".php");

    This signature is under construction...
    webSPELL newbie
    37 Posts
    20.09.2011, 20:00 offline quote 

    Ich habe in webSPELL einen kleinen Fehler gefunden:

    _functions.php:

    Code:
    1.
    2.
    if(isset($_GET['site'])) $site = $_GET['site'];
    else $site = '';


    index.php:

    Code:
    1.
    2.
    3.
    4.
    5.
    6.
    7.
    <?php
    if(!isset($site)) $site="news";
    $invalide = array('\\','/','/\/',':','.');
    $site = str_replace($invalide,' ',$site);
    if(!file_exists($site.".php")) $site = "news";
    include($site.".php");
    ?>


    Ich denke jeder sieht hier den Fehler, dass die isset Abfrage beim Einbinden Schwachsinn ist und zu einem file_exists = false führt. Sowas in dierser Richtung sollte klappen:

    Code:
    1.
    if($site == null) $site="news";
    Sort:     printview


    To start or to reply to a topic you have to be registered and logged in!

    register now
    login
  • » Support

    » Topics
    21.05.2013 - 13:18 - 7 Replies
    » [Biete] Template Designs
    [Biete] Template Designs
    Last post: Marceld
    Board: DE - Biete
    21.05.2013 - 13:18
    21.05.2013 - 12:33 - 4 Replies
    » forum anzeige erweitern
    forum anzeige erweitern
    Last post: [Fabian]
    Board: DE - Allgemeiner Support
    21.05.2013 - 12:33
    21.05.2013 - 10:21 - 8 Replies
    » login startseite
    login startseite
    Last post: zwantE
    Board: DE - Technischer Support
    21.05.2013 - 10:21
    21.05.2013 - 05:54 - 0 Replies
    » When the update?
    When the update?
    Last post: kola60
    Board: EN - General
    21.05.2013 - 05:54
    21.05.2013 - 05:15 - 0 Replies
    » Need Designer for Logo/Te...
    Need Designer for Logo/Template
    Last post: Kody
    Board: EN - General
    21.05.2013 - 05:15
    21.05.2013 - 05:13 - 0 Replies
    » Looking for Designers/Cod...
    Looking for Designers/Coders (paid)
    Last post: Kody
    Board: EN - Requests
    21.05.2013 - 05:13
    20.05.2013 - 21:11 - 12 Replies
    » High Quality Website
    High Quality Website
    Last post: Dansjostedt
    Board: EN - Offers
    20.05.2013 - 21:11
    20.05.2013 - 18:27 - 4 Replies
    » [S] Tester für neuen Foru...
    [S] Tester für neuen ForumMod
    Last post: Argu
    Board: DE - Anfragen
    20.05.2013 - 18:27
    20.05.2013 - 11:47 - 5 Replies
    » Suche Designer GGL:Geld
    Suche Designer GGL:Geld
    Last post: Dynamic-Webmedia
    Board: DE - Suche
    20.05.2013 - 11:47
    20.05.2013 - 00:07 - 0 Replies
    » [S] Suche Programmierer
    [S] Suche Programmierer
    Last post: phoenix762
    Board: DE - Suche
    20.05.2013 - 00:07
    19.05.2013 - 03:55 - 8 Replies
    » Mein Forum
    Mein Forum
    Last post: Lordy4007
    Board: DE - Fragen zur Seite
    19.05.2013 - 03:55
    18.05.2013 - 19:58 - 36 Replies
    » Exklusiv Webseite zur Mie...
    Exklusiv Webseite zur Miete
    Last post: liQweb
    Board: DE - Biete
    18.05.2013 - 19:58
    18.05.2013 - 12:21 - 1 Replies
    » Query failed
    Query failed
    Last post: LoRd
    Board: DE - Allgemeiner Support
    18.05.2013 - 12:21
    18.05.2013 - 09:36 - 3 Replies
    » benötige hilfe bei paar k...
    benötige hilfe bei paar kleinigkeiten
    Last post: immostar
    Board: DE - Technischer Support
    18.05.2013 - 09:36
    18.05.2013 - 03:33 - 4 Replies
    » [SELL] Gaming Website
    [SELL] Gaming Website
    Last post: hornyst
    Board: EN - Offers
    18.05.2013 - 03:33
    18.05.2013 - 00:32 - 6 Replies
    » Hide BBCODE Echo
    Hide BBCODE Echo
    Last post: dado2106
    Board: EN - Technical support
    18.05.2013 - 00:32
    17.05.2013 - 21:42 - 0 Replies
    » website help
    website help
    Last post: envy0024
    Board: EN - Technical support
    17.05.2013 - 21:42
    17.05.2013 - 21:03 - 1 Replies
    » Need Coder!
    Need Coder!
    Last post: iG.ShAdOw
    Board: EN - Requests
    17.05.2013 - 21:03
    17.05.2013 - 20:44 - 9 Replies
    » Query failed!
    Query failed!
    Last post: LoRd
    Board: DE - Allgemeiner Support
    17.05.2013 - 20:44
    17.05.2013 - 18:08 - 0 Replies
    » [4 SALE] Layouts (Gaming,...
    [4 SALE] Layouts (Gaming, Portfolio and more)
    Last post: Freestyler92
    Board: EN - Offers
    17.05.2013 - 18:08
    » Partners
    Bilderkiste.org Image Hosting
    k3rmit.org
    PascalMh.de


    » Blog
    28.03.2013 - derchris
    » Those damn spammers