Avatar billede iceicepepsi Nybegynder
28. maj 2012 - 18:51 Der er 9 kommentarer og
1 løsning

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/a7182265/public_html/report.php on line 223

Har prøvet at rode med det, men der kommer en fejl sidst i sætningen:

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/a7182265/public_html/report.php on line 223

kode

<?php
/**
* The report.php is the error reporting and loggin page
*
* PHP version 5
*
* @category  Application
* @package  UserProfile
* @author    Sakthivel Ganesan <sg@capjo.com>
* @author    Sasikumar Periyasamy <sasi@capjo.com>
* @copyright 2011 Team Capjo
* @license  http://codecanyon.net/wiki/support/legal-terms/licensing-terms/ code canyon license
* @version  SVN: <1.0>
* @link      http://www.capjo.com
*/

// Images are from Crystal clear icons
// Website: http://www.everaldo.com

$addedStyle='';
$notifymsg='';

if ($_GET['ec']=='nocookie') {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="Your cookie functionality is disabled";
} else if ($_GET['ec']=='ntok') {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="Admin is configuring the system, We will be back in short";
} else if ($_GET['ec']=='nosrv') {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="Not able to connect to Database server. Check Config.php.";
} else if ($_GET['ec']=='nodb') {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="Not able to connect to Database. Check if DB exists.";
} else if ($_GET['ec']=='bip') {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="Your IP has been temporarily gray listed";
} else if ($_GET['ec']=='noip') {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="Your request is in a different format";
} else if ($_GET['ec']=='forbid') {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="You need to upgrade your account to do this operation";
} else if ($_GET['ec']=='new') {
    $newuser='';
    if (isset ($_COOKIE['newuser'])) {
        $newuser=$_COOKIE['newuser'];
        setcookie('newuser',  time()-3600);
    }
    $addedStyle="background-color: #298A08;";
    $notifymsg="Welcome <b>$newuser</b>,
    Please proceed with
    <a style=\"font-family:arial;font-size:11px;text-decoration:none;color:#e4e4e4;\"
    href=\"index.php\">log in</a>";
    // Sakthi Changes - Oct 9 2011 - Starts
    // One of the features that were asked for
    // Admin should approve users who are all signed up
} else if ($_GET['ec']=='newwithapproval') {
    $newuser='';
    if (isset ($_COOKIE['newuser'])) {
        $newuser=$_COOKIE['newuser'];
        setcookie('newuser',  time()-3600);
    }
    $addedStyle="background-color: #298A08;";
    $notifymsg="Welcome <b>$newuser</b>, Admin will approve your access.";
} else if ($_GET['ec']=='signouterror') {
    $addedStyle="background-color: #298A08;";
    $notifymsg="You have been signed out successfully!";
} else if ($_GET['ec']=='emailerror') {
    $addedStyle="background-color: #298A08;";
    $notifymsg="Oops, Something went wrong while we tried sending email";
} else if ($_GET['ec']=='emailsent') {
    $newuser='';
    if (isset ($_COOKIE['newuser'])) {
        $newuser=$_COOKIE['newuser'];
        setcookie('newuser',  time()-3600);
    }

    // Demo code
    $validateurl='';   
    // Demo code
    $addedStyle="background-color: #298A08;";
    $notifymsg="Welcome <b>$newuser</b>,
    An email has been sent to you.";

    // Demo code
    if (isset($_COOKIE['validateurl'])) {
        $validateurl=$_COOKIE['validateurl'];
        setcookie('validateurl', time()-3600);
        $notifymsg="Welcome <b>$newuser</b>,
        An email has been sent to you.<br/><br/>
        Activation link that was sent to your email is below:
        <br/><a href=\".$validateurl.\">Click to activate user</a>";
    }
    // Demo code

    // Sakthi Changes - Oct 9 2011 - Ends
} else if ($_GET['ec']=='uemailerror') {
    $addedStyle="background-color: #298A08;";
    $notifymsg="Email server is not configured properly.";
} else {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="Your request is in an invalid format";
}
echo
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"
  \"http://www.w3.org/TR/html4/loose.dtd\">
<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">
<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">
<META HTTP-EQUIV=\"Expires\" CONTENT=\"-1\">
  <html>
<head>
<style type=\"text/css\">
       
#msg{
    position: relative;
    left:0px;
    top:5px;
}



body {
    background : black;
    font-family : arial,sans-serif;
    font-size : 100%;
    margin-top : 10px;
    margin-right : 20px;
    margin-bottom : 10px;
    margin-right : 20px;
    padding : 0;
}
h1 {font-size:100%;margin-top:10px;margin-left:10px;}
#banner h1 {
    margin : 0;
    margin-bottom : 10px;
    color : #000;
    background : #858593;
    font-size : 24px;
  line-height:100%;
    border : 1px solid black;
    padding-top : 5px;
    padding-bottom : 5px;
    padding-left : 10px;
}
#leftcol {
    margin-top : 0;
    width : 170px;
    float : left;
    background : #858593;
    border : 1px solid black;
    height : 100px;
}
#indhold {
    margin-top : 5px;
    margin-bottom : 10px;
    margin-left : 180px;
    margin-right : 310px;
    border : 1px solid black;
    background : #858593;
    height : 395px;
}
#rightcol {
    position:absolute;
    right : 20px;
    top : 56px;
    width : 300px;
    height : 240px;
    border : 1px solid black;
    background : #858593;
}
#footer {
    text-align : left;
}
#footer h1 {
    color : #C5010A;
    background : #858593;
    border : 1px solid black;
    padding : 5px 0px 5px 10px;
    margin : 10px 0;
}
/*
#rightcol {
    position : absolute;
    right : 20px;
    top : 10px;
    width : 140px;
    height : 350px;
    border : 1px solid black;
    background : #858593;
}


#leftcol {
    margin-top : 0;
    width : 170px;
    float : left;
    background-color : #ddd;
    border : 1px solid black;
    height : 350px;
}
#indhold {
    margin-top : 5px;
    margin-bottom : 10px;
    margin-left : 180px;
  margin-right:160px;
    border : 1px solid black;
    background : #060606;
    height : 350px;
}

         
h1 {
margin-top:20px;
margin-right:auto;
margin-bottom:auto;
margin-left:20px;
}
</style>
</head>

<body>
<div id="banner">
<h1>Banner</h1>
</div>
<div id="leftcol">
</div>
<div id="content">
</div>
<div id="indhold">
  <h1>Indhold</h1>
</div>
<div id="rightcol">
<h1></h1>
</div>
<div id="footer">
<h1>&copy; <?PHP echo date("Y"); ?> - wingisites.com</h1> 
</div>








</body>
</html>
Avatar billede olebole Juniormester
28. maj 2012 - 19:17 #1
<ole>

Ret fra BODY og ned til dette:

<body>
<div id=\"banner\">
<h1>Banner</h1>
</div>
<div id=\"leftcol\">
</div>
<div id=\"content\">
</div>
<div id=\"indhold\">
  <h1>Indhold</h1>
</div>
<div id=\"rightcol\">
<h1></h1>
</div>
<div id=\"footer\">
<h1>&copy;".date("Y")." - wingisites.com</h1> 
</div>

</body>
</html>";
?>

/mvh
</bole>
Avatar billede olebole Juniormester
28. maj 2012 - 19:23 #2
- men da du ikke bruger echo af HTML'en til noget, kan du ligeså godt skrive:

<?php
/**
* The report.php is the error reporting and loggin page
*
* PHP version 5
*
* @category  Application
* @package  UserProfile
* @author    Sakthivel Ganesan <sg@capjo.com>
* @author    Sasikumar Periyasamy <sasi@capjo.com>
* @copyright 2011 Team Capjo
* @license  http://codecanyon.net/ (...) code canyon license
* @version  SVN: <1.0>
* @link      http://www.capjo.com
*/

// Images are from Crystal clear icons
// Website: http://www.everaldo.com

$addedStyle='';
$notifymsg='';

if ($_GET['ec']=='nocookie') {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="Your cookie functionality is disabled";
} else if ($_GET['ec']=='ntok') {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="Admin is configuring the system, We will be back in short";
} else if ($_GET['ec']=='nosrv') {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="Not able to connect to Database server. Check Config.php.";
} else if ($_GET['ec']=='nodb') {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="Not able to connect to Database. Check if DB exists.";
} else if ($_GET['ec']=='bip') {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="Your IP has been temporarily gray listed";
} else if ($_GET['ec']=='noip') {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="Your request is in a different format";
} else if ($_GET['ec']=='forbid') {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="You need to upgrade your account to do this operation";
} else if ($_GET['ec']=='new') {
    $newuser='';
    if (isset ($_COOKIE['newuser'])) {
        $newuser=$_COOKIE['newuser'];
        setcookie('newuser',  time()-3600);
    }
    $addedStyle="background-color: #298A08;";
    $notifymsg="Welcome <b>$newuser</b>,
    Please proceed with
    <a style=\"font-family:arial;font-size:11px;text-decoration:none;color:#e4e4e4;\"
    href=\"index.php\">log in</a>";
    // Sakthi Changes - Oct 9 2011 - Starts
    // One of the features that were asked for
    // Admin should approve users who are all signed up
} else if ($_GET['ec']=='newwithapproval') {
    $newuser='';
    if (isset ($_COOKIE['newuser'])) {
        $newuser=$_COOKIE['newuser'];
        setcookie('newuser',  time()-3600);
    }
    $addedStyle="background-color: #298A08;";
    $notifymsg="Welcome <b>$newuser</b>, Admin will approve your access.";
} else if ($_GET['ec']=='signouterror') {
    $addedStyle="background-color: #298A08;";
    $notifymsg="You have been signed out successfully!";
} else if ($_GET['ec']=='emailerror') {
    $addedStyle="background-color: #298A08;";
    $notifymsg="Oops, Something went wrong while we tried sending email";
} else if ($_GET['ec']=='emailsent') {
    $newuser='';
    if (isset ($_COOKIE['newuser'])) {
        $newuser=$_COOKIE['newuser'];
        setcookie('newuser',  time()-3600);
    }

    // Demo code
    $validateurl='';   
    // Demo code
    $addedStyle="background-color: #298A08;";
    $notifymsg="Welcome <b>$newuser</b>,
    An email has been sent to you.";

    // Demo code
    if (isset($_COOKIE['validateurl'])) {
        $validateurl=$_COOKIE['validateurl'];
        setcookie('validateurl', time()-3600);
        $notifymsg="Welcome <b>$newuser</b>,
        An email has been sent to you.<br/><br/>
        Activation link that was sent to your email is below:
        <br/><a href=\".$validateurl.\">Click to activate user</a>";
    }
    // Demo code

    // Sakthi Changes - Oct 9 2011 - Ends
} else if ($_GET['ec']=='uemailerror') {
    $addedStyle="background-color: #298A08;";
    $notifymsg="Email server is not configured properly.";
} else {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="Your request is in an invalid format";
}
?>
<!DOCTYPE HTML PUBLIC "[img]-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd[/img]">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
  <html>
<head>
<style type="text/css">
       
#msg{
    position: relative;
    left:0px;
    top:5px;
}



body {
    background : black;
    font-family : arial,sans-serif;
    font-size : 100%;
    margin-top : 10px;
    margin-right : 20px;
    margin-bottom : 10px;
    margin-right : 20px;
    padding : 0;
}
h1 {font-size:100%;margin-top:10px;margin-left:10px;}
#banner h1 {
    margin : 0;
    margin-bottom : 10px;
    color : #000;
    background : #858593;
    font-size : 24px;
  line-height:100%;
    border : 1px solid black;
    padding-top : 5px;
    padding-bottom : 5px;
    padding-left : 10px;
}
#leftcol {
    margin-top : 0;
    width : 170px;
    float : left;
    background : #858593;
    border : 1px solid black;
    height : 100px;
}
#indhold {
    margin-top : 5px;
    margin-bottom : 10px;
    margin-left : 180px;
    margin-right : 310px;
    border : 1px solid black;
    background : #858593;
    height : 395px;
}
#rightcol {
    position:absolute;
    right : 20px;
    top : 56px;
    width : 300px;
    height : 240px;
    border : 1px solid black;
    background : #858593;
}
#footer {
    text-align : left;
}
#footer h1 {
    color : #C5010A;
    background : #858593;
    border : 1px solid black;
    padding : 5px 0px 5px 10px;
    margin : 10px 0;
}
#rightcol {
    position : absolute;
    right : 20px;
    top : 10px;
    width : 140px;
    height : 350px;
    border : 1px solid black;
    background : #858593;
}


#leftcol {
    margin-top : 0;
    width : 170px;
    float : left;
    background-color : #ddd;
    border : 1px solid black;
    height : 350px;
}
#indhold {
    margin-top : 5px;
    margin-bottom : 10px;
    margin-left : 180px;
  margin-right:160px;
    border : 1px solid black;
    background : #060606;
    height : 350px;
}

         
h1 {
margin-top:20px;
margin-right:auto;
margin-bottom:auto;
margin-left:20px;
}
</style>
</head>

<body>
<div id="banner">
<h1>Banner</h1>
</div>
<div id="leftcol">
</div>
<div id="content">
</div>
<div id="indhold">
  <h1>Indhold</h1>
</div>
<div id="rightcol">
<h1></h1>
</div>
<div id="footer">
<h1>&copy; <?PHP echo date("Y"); ?> - wingisites.com</h1> 
</div>








</body>
</html>
Avatar billede iceicepepsi Nybegynder
28. maj 2012 - 21:11 #3
hej ole rettet fra body som du sagde men den visser ikke indholdet rigtig

kode

<?php
/**
* The report.php is the error reporting and loggin page
*
* PHP version 5
*
* @category  Application
* @package  UserProfile
* @author    Sakthivel Ganesan <sg@capjo.com>
* @author    Sasikumar Periyasamy <sasi@capjo.com>
* @copyright 2011 Team Capjo
* @license  http://codecanyon.net/ (...) code canyon license
* @version  SVN: <1.0>
* @link      http://www.capjo.com
*/

// Images are from Crystal clear icons
// Website: http://www.everaldo.com

$addedStyle='';
$notifymsg='';

if ($_GET['ec']=='nocookie') {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="Your cookie functionality is disabled";
} else if ($_GET['ec']=='ntok') {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="Admin is configuring the system, We will be back in short";
} else if ($_GET['ec']=='nosrv') {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="Not able to connect to Database server. Check Config.php.";
} else if ($_GET['ec']=='nodb') {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="Not able to connect to Database. Check if DB exists.";
} else if ($_GET['ec']=='bip') {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="Your IP has been temporarily gray listed";
} else if ($_GET['ec']=='noip') {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="Your request is in a different format";
} else if ($_GET['ec']=='forbid') {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="You need to upgrade your account to do this operation";
} else if ($_GET['ec']=='new') {
    $newuser='';
    if (isset ($_COOKIE['newuser'])) {
        $newuser=$_COOKIE['newuser'];
        setcookie('newuser',  time()-3600);
    }
    $addedStyle="background-color: #298A08;";
    $notifymsg="Welcome <b>$newuser</b>,
    Please proceed with
    <a style=\"font-family:arial;font-size:11px;text-decoration:none;color:#e4e4e4;\"
    href=\"index.php\">log in</a>";
    // Sakthi Changes - Oct 9 2011 - Starts
    // One of the features that were asked for
    // Admin should approve users who are all signed up
} else if ($_GET['ec']=='newwithapproval') {
    $newuser='';
    if (isset ($_COOKIE['newuser'])) {
        $newuser=$_COOKIE['newuser'];
        setcookie('newuser',  time()-3600);
    }
    $addedStyle="background-color: #298A08;";
    $notifymsg="Welcome <b>$newuser</b>, Admin will approve your access.";
} else if ($_GET['ec']=='signouterror') {
    $addedStyle="background-color: #298A08;";
    $notifymsg="You have been signed out successfully!";
} else if ($_GET['ec']=='emailerror') {
    $addedStyle="background-color: #298A08;";
    $notifymsg="Oops, Something went wrong while we tried sending email";
} else if ($_GET['ec']=='emailsent') {
    $newuser='';
    if (isset ($_COOKIE['newuser'])) {
        $newuser=$_COOKIE['newuser'];
        setcookie('newuser',  time()-3600);
    }

    // Demo code
    $validateurl=''; 
    // Demo code
    $addedStyle="background-color: #298A08;";
    $notifymsg="Welcome <b>$newuser</b>,
    An email has been sent to you.";

    // Demo code
    if (isset($_COOKIE['validateurl'])) {
        $validateurl=$_COOKIE['validateurl'];
        setcookie('validateurl', time()-3600);
        $notifymsg="Welcome <b>$newuser</b>,
        An email has been sent to you.<br/><br/>
        Activation link that was sent to your email is below:
        <br/><a href=\".$validateurl.\">Click to activate user</a>";
    }
    // Demo code

    // Sakthi Changes - Oct 9 2011 - Ends
} else if ($_GET['ec']=='uemailerror') {
    $addedStyle="background-color: #298A08;";
    $notifymsg="Email server is not configured properly.";
} else {
    $addedStyle="background-color: #dd8888;";
    $notifymsg="Your request is in an invalid format";
}
?>
<!DOCTYPE HTML PUBLIC "[img]-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/ (...)
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
  <html>
<head>
    <title>CSS-layout af websider, demoside 5</title>
<style type=\"text/css\">
  body {
    background : gray;
    font-family : arial,sans-serif;
    font-size : 100%;
    margin-top : 10px;
    margin-right : 20px;
    margin-bottom : 10px;
    margin-right : 20px;
    padding : 0;
}
h1 {font-size:150%;margin-top:10px;margin-left:10px;}
#banner h1 {
    margin : 0;
    margin-bottom : 10px;
    color : #000;
    background : #ddd;
    font-size : 24px;
  line-height:100%;
    border : 1px solid black;
    padding-top : 5px;
    padding-bottom : 5px;
    padding-left : 10px;
}
#leftcol {
    margin-top : 0;
    width : 170px;
    float : left;
    background : #ddd;
    border : 1px solid black;
    height : 100px;
}
#indhold {
    margin-top : 5px;
    margin-bottom : 10px;
    margin-left : 180px;
    margin-right : 150px;
    border : 1px solid black;
    background : #ddd;
    height : 395px;
}
#rightcol {
    position:absolute;
    right : 20px;
    top : 56px;
    width : 140px;
    height : 100px;
    border : 1px solid black;
    background : #ddd;
}
#footer {
    text-align : left;
}
#footer h1 {
    color : #000;
    background : #ddd;
    border : 1px solid black;
    padding : 5px 0px 5px 10px;
    margin : 10px 0;
}

#rightcol {
    position : absolute;
    right : 20px;
    top : 10px;
    width : 140px;
    height : 350px;
    border : 1px solid black;
    background : #ddd;
}


#leftcol {
    margin-top : 0;
    width : 170px;
    float : left;
    background-color : #ddd;
    border : 1px solid black;
    height : 350px;
}
#indhold {
    margin-top : 5px;
    margin-bottom : 10px;
    margin-left : 180px;
  margin-right:160px;
    border : 1px solid black;
    background : #ddd;
    height : 350px;
}

h1 {
margin-top:20px;
margin-right:auto;
margin-bottom:auto;
margin-left:20px;

</style>
</head>

<body>
<div id=\"banner\">
<div id=\"leftcol\">
<div id=\"content\">
<div id=\"indhold\">
<div id=\"rightcol\">
<div id=\"footer\">

</div>

</body>
</html>"
?>
Avatar billede olebole Juniormester
28. maj 2012 - 21:22 #4
Jeg kan jo hverken vide, hvordan det ser ud - eller hvordan det skulle have set ud  =)

Du mangler en del HTML-kode. Du lukker kun ét DIV
Avatar billede iceicepepsi Nybegynder
28. maj 2012 - 21:32 #5
det skal se sådan ud http://wingisites.com/index.php?&checkcookie=true

men siden her http://wingisites.com/report.php ser ikke sådan ud som den anden der den ikke viser indholdet rigtig og det skal den
kan du ikke hjælpe er ikke særlig god til koder
Avatar billede olebole Juniormester
28. maj 2012 - 21:45 #6
Tjek dine links
Avatar billede iceicepepsi Nybegynder
28. maj 2012 - 21:55 #7
mine links virker fint men du lyder som en der ikke gider at hjælpe
Avatar billede olebole Juniormester
28. maj 2012 - 22:25 #8
Ja, nu har du fået rettet HTML-koden, så dine links virker - men hvad skulle jeg dog have imod at hjælpe?  =)

Forskellene i visning skyldes forskelle i CSS-koderne. F.eks. skyldes den store footer tekst i det ene dokument, at du skriver:

h1 {
    font-size: 150%;
    margin-left: 10px;
    margin-top: 10px;
}

- og dette i det andet dokument:

h1 {
    font-size: 100%;
    margin-left: 10px;
    margin-top: 10px;
}

Årsagen til forskellene i tekstfarven ligger her:

#footer h1 {
    background: none repeat scroll 0 0 #DDDDDD;
    border: 1px solid black;
    color: #000000;
    margin: 10px 0;
    padding: 5px 0 5px 10px;
}

- og:

#footer h1 {
    background: none repeat scroll 0 0 #858593;
    border: 1px solid black;
    color: #C5010A;
    margin: 10px 0;
    padding: 5px 0 5px 10px;
}

Gå selv den øvrige CSS-kode igennem og find resten af forskellene
Avatar billede olsensweb.dk Ekspert
29. maj 2012 - 17:40 #9
appropos checke link, er der her en du skal checke, og rette de fejl den påpeger
du kan ikke stole 100% på din CSS før din side er valid
Avatar billede iceicepepsi Nybegynder
16. december 2012 - 21:55 #10
.
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester