Jump to content

What Is The Problem About This Code?


Mrbagino

Recommended Posts

Dear all,

 

Can somebody tell me what the problem is from this results!

 

 

 

<?

 

if(isset($_COOKIE['popup']) && $_COOKIE['popup'] == "Infobox")

{

$boxscript = "";

}

else

{

$boxscript = "

 

<script type=\"text/javascript\">

 

var agreewin=dhtmlmodal.open(\"agreebox\", \"iframe\", \".....\", \" .... \", \"width=650px,height=470px,center=1,resize=1,scrolling=0\", \"recal\")

agreewin.onclose=function(){

self.opener.location = url;

 

}

</script>

 

";

setcookie("popup", "Infobox");

}

 

 

 

include("config.inc.php");

include("core.class.php");

 

// Check if install DIR still exists, if yes, ask to remove the DIR

if(is_dir('install')) {

// Check if database is installed

$table_installed = true;

$db_tables = array('....._adv_abo', '......_adv_categorie', '....._adv_gegevens', '....._adv_setting', '....._nieuwsbrief', '......_setting', '......._user');

foreach ($db_tables as $k=>$v) {

if(table_exists($v)) {

}

else {

$table_installed = false;

}

}

if(!$table_installed) header("Location: install/index.php");

// End check database

}

// End check install DIR

 

if (!ini_get('register_globals')) {

$types_to_register = array('GET','POST','COOKIE','SESSION','SERVER');

foreach ($types_to_register as $type) {

if (@count(${'HTTP_' . $type . '_VARS'}) > 0) {

extract(${'HTTP_' . $type . '_VARS'}, EXTR_OVERWRITE);

}}}

 

 

 

?>

 

<html><head>

 

<?

if($_GET['d']=="advertentie"){

$getaa=mysql_query("SELECT * FROM ....._adv_gegevens WHERE id='".$id."'");

$geta=mysql_fetch_array($getaa);

?>

<title><? echo $website_titel ?> - <? echo $geta['titel'] ?> - <? echo $geta['kat'] ?></title>

<?}else{?>

<title><? echo $website_titel ?> - <? echo $website_sub_titel ?></title>

<?}?>

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; iso-8859-1">

<META NAME="ROBOTS" CONTENT="<? echo $META_NAME_ROBOTS ?>">

<META HTTP-EQUIV="Content-Language" CONTENT="<? echo $META_NAME_LANG ?>">

<?

 

if($_GET['d']=="advertentie"){

$getaa=mysql_query("SELECT * FROM _adv_gegevens WHERE id='".$id."'");

$geta=mysql_fetch_array($getaa);

?>

<META NAME="description" CONTENT="<? echo $META_NAME_DESCRIPTION ?> - <? echo $geta['titel'] ?>, <? echo $geta['kat'] ?>">

<META NAME="keywords" CONTENT="<? echo $geta['titel'] ?>, <? echo $geta['kat'] ?>, <? echo $geta['keyword'] ?>">

<? }else{ ?>

<META NAME="description" CONTENT="<? echo $META_NAME_DESCRIPTION ?>">

<META NAME="keywords" CONTENT="<? echo $META_NAME_KEYWORDS ?>, <? $result_meta = mysql_query("SELECT titel FROM escort_adv_gegevens LIMIT 6"); while ($row_meta = mysql_fetch_array($result_meta)) { echo $row_meta['titel']?>, <? }?>">

<? } ?>

<META NAME="audience" CONTENT="<? echo $META_NAME_AUDIENCE ?>">

<META NAME="page-type" CONTENT="<? echo $META_NAME_PAGETYPE ?>">

<META NAME="page-topic" CONTENT="<? echo $META_NAME_PAGETOPIC ?>">

<META NAME="revisit-after" CONTENT="<? echo $META_NAME_VISIT ?>">

<link rel=stylesheet href=style.css type=text/css>

 

<script language="javascript" type="text/javascript">

<!-- //

function videolaunch(myUrl) {

myTarget = 'teilnahme';

myArgs = 'width=400,height=300,location=0,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=1,toolbar=0,hotkeys=0,screenx=0,screeny=0,left=0,top=0,dependent=yes';

window.open( myUrl, myTarget, myArgs );

}

// -->

</script>

 

<script type=text/javascript src=core.js.php></script>

<script type=text/javascript src=jquery.js></script>

<script type=text/javascript src=jquery.lightbox.js></script>

<link rel="stylesheet" href="jquery.lightbox.css" type="text/css" media="screen" />

 

<script language="Javascript">

<!-- Begin

function submitForm(s) {

s.value = "Een ogenblikje...";

 

document.getElementById("ladebalken").style.display = "block";

 

return true;

}

// End -->

</script>

 

 

<script type="text/javascript" src="script/dhtmlwindow.js"></script>

<script type="text/javascript" src="script/modal.js"></script>

 

<script language="Javascript">

function isEmail(string) {

if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)

return true;

else

return false;

}

<!--

function formCheck(formobj){

// bericht

var alertMsg = "De volgende handeling moet uitgevoerd worden:\n\n";

var l_Msg = alertMsg.length;

var obj = formobj.elements['Email'];

if (!isEmail(obj.value)){

alertMsg += " - Gelieve een geldig e-mail adres in te vullen\n";

}

if (alertMsg.length == l_Msg){

return true;

}else{

alert(alertMsg);

return false;

}

}

// -->

</script>

 

</head>

 

<? if(empty($d)){ ?>

<body onload="start();">

<?}else{?>

<body onload="start();">

<?}?>

 

<? echo $boxscript; ?>

 

<center><div style=width:850px;text-align:left;margin-top:15px;margin-bottom:0px;background: #ffffff;text-align:center>

<a href=http://<?php echo $website_link; ?> target=_top><img src=images/logo.gif border=0></a>

 

</div>

 

<?php

 

include("menubalk.class.php");

 

?>

 

<?php

 

if(file_exists($d.".inc.php")==1) include($d.".inc.php");

else include("home.inc.php");

 

 

 

?>

 

</div><center>

 

<tr><td align=center><div style=width:850;height:1px;background-color:red><img src=images/space.gif width=1 height=1></div></td></tr>

 

<style type="text/css">

A:link { TEXT-DECORATION: none }

A:visited { TEXT-DECORATION: none }

a:hover { color : red; font-width : bold; text-decoration : none; }

a { font-size : 12px; line-height : 12pt; font-family : Arial; font-weight : bold; text-decoration : none; color : #000000; }

.text { font-size : 12px; line-height : 12pt; font-family : Arial; font-weight : normal; text-decoration : none; color : #000000; }

</style>

 

 

<span class=textyellow><script language="javascript" src="online.php"></script><b> bezoekers online</b>   |   <a href=<?php echo genURL($modrw,'index.html','index.php?d=index'); ?> class=textyellow>Home</a>   |  <span class=textyellow><a href=<?php echo genURL($modrw,'lijst1.html','index.php?d=lijst1'); ?> class=textyellow>Alle advertenties</a>  |  <span class=textyellow><a href=<?php echo genURL($modrw,'nieuwsbrief.html','index.php?d=nieuwsbrief'); ?> <span class=textyellow>Nieuwsbrief</a></span>  |   <a href=<?php echo genURL($modrw,'overons.html','index.php?d=overons'); ?> class=textyellow>Over ons</a>   |   <a href=voorwaarden.htm target="detail" onclick="javascript:window.open('','detail','width=750, height=500, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')" class=textyellow><span>Algemene voorwaarden</a>   |   <span class=textyellow><a href="contact.inc.php" target="detail" onclick="javascript:window.open('','detail','width=750, height=600, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')"><span class=textyellow><b>Contact</b></a>   |   <a href=<?php echo genURL($modrw,'zoeken.html','index.php?d=zoeken'); ?> class=textyellow>Uitgebreid zoeken</a>   |   <a href=<?php echo genURL($modrw,'aanmelden.html','index.php?d=aanmelden'); ?> class=textyellow>Aanmelden</a><br>

 

<br>

<span class=textyellow>Copyright 2010 © <?php echo $website_titel; ?></span></center><br><br>

 

</body></html>

 

 

 

 

 

 

And my result if i want it load in my browser: Just look here!!

 

 

 

post-133874-0-65098200-1353692210_thumb.gif

 

 

Maby is it a stupid ask but i sitting on this moment stuck..

Thanks!

Link to comment
Share on other sites

Php is a SERVER-side scripting language. It requires a web server to invoke php to parse/tokenize/interpret the php code. You cannot browse directly to the .php file through your browser/operating system and get it to work.

 

You must use a URL in your browser, something like http://localhost/your_file.php

Link to comment
Share on other sites

Also if you don't have asp tags turned on in the php config then using <? ?> won't work. You have to use <?php ?> if your asp tags are disabled. I always use <?php ?> just in case I write some code that goes on a server that has the asp tags turned off.

 

You will need to install a local server (google wamp) or upload the code to a host (google knows where lots of free hosts are) and point your browser at which ever server you chose to go with.

 

If you go the route of wamp, copy your script(s) to C:\wamp\www, assuming you use all the defaults for wamp installation, and point your browser to http://localhost/your_file.php, as PFMaBiSmAd said, changing your_file.php for the actual name of your script.

 

If you choose an online host they typically have an FAQ with the specific instructions for uploading to their server and how to reach the page once you upload it (IE. the url of your new file(s)).

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.