mrbean Posted May 11, 2010 Share Posted May 11, 2010 i get those errors Warning: Cannot modify header information - headers already sent by (output started at /home/pjzlbina/domains/pjzlbina.twenty.versio.nl/public_html/list.php:1) in /home/pjzlbina/domains/pjzlbina.twenty.versio.nl/public_html/_include-funcs.php on line 22 Warning: Cannot modify header information - headers already sent by (output started at /home/pjzlbina/domains/pjzlbina.twenty.versio.nl/public_html/list.php:1) in /home/pjzlbina/domains/pjzlbina.twenty.versio.nl/public_html/_include-funcs.php on line 23 list.php: <?php /* ------------------------- */ include("_include-config.php"); if(! check_login()) { header("Location: login.php"); exit; } mysql_query("UPDATE `[users]` SET `online`=NOW() WHERE `login`='{$data->login}'"); // DEBUG CODE: // echo $_SESSION["login"]; // s = kolomnaam // q = zoekterm $land1 = array("","Nederland","Frankrijk","Spanje","Turkije","Griekenland","Australie","Amerika","Ierland","Afrika","Polen","Zwitserland","Rusland","Hawai","Marokko","Suriname","Japan","Duitsland","Taiwan","Aruba","China","Groenland","GoldTown","Kings","Ghana","Dutchtown","Dragonvalley","Jamaica","MaffiaCity","Corleone","Zambla",""); $land = $land1[$data->land]; if($data->topbalk == 1){ print <<<ENDHTML <table width=100%><tr><td class="subTitle" align="left"><b>Ingelogd als $data->login</b></td></tr> <table width=100%> <tr><td class="MainTxt" align="left"><img alt='Land' src='/images/nl.gif' border='0'> $land </td><td class="MainTxt" align="left"><img height=20 width=40 alt='Contant' src='/5euro.jpg' border='0'> Bank geld: $ {$data->bank},- </td><td class="MainTxt" align="left"><img height=19 width=38 alt='Berichten' src='/images/Mail-envelope.png' border='0'> Nieuwe berichten: <a href="message.php?p=inbox" target="mainFrame"><b>$inboxnew</b></a></td> </tr></table><BR> ENDHTML; } ?> <html> <head> <body style="background: #808080; margin: 0px;"> <link rel="stylesheet" type="text/css" href="css-v1.css"> <SCRIPT src="overlib.js" type=text/javascript> <script language="JavaScript"> var left = 0; function movein(){ if (document.layers) { document.layers['message'].pageX = window.pageXOffset + left; left+=step; if(left<moveto){ setTimeout('movein()',speed); } else { setTimeout('closemessage()',hide); } } else{ document.getElementById('message').style.left=left+'px'; left+=step; if(left<moveto){ setTimeout('movein()',speed); } else { setTimeout('closemessage()',hide); } } } function closemessage(){ if (document.layers) {document.layers['message'].visibility='hidden';} else{document.getElementById('message').style.visibility='hidden';} } </script> <style type="text/css" media="screen"> #obmessage #message {top:120px; border:1px solid black; width:200px;background-color:lime;padding:4px; position:absolute;} </style> </head> </head> <BODY onLoad="movein()"> <table width=100%> <tr><td class="subTitle"><b>leden Lijst</b></td></tr> <tr><td align="center" class="mainTxt"> <form action="list.php" method="get"> Voorbeeld: "<b>a*</b>" zal een lijst geven van namen die beginnen met een A<br> <input type='hidden' name='s' value='search'><input type='text' name='q' value=''> <input type='submit' value='Zoek!' maxlength='16'> <input type='button' style='width: 130;' value='leden in mijn land' onClick="window.self.location=('list.php?s=land');"> <input type='button' style='width: 130;' value='Clan leden online' onClick="window.self.location=('list.php?s=clanonline');"> </form> </td></tr> </table> <table width=100%> <tr><td align="center" class="subTitle" style="letter-spacing: normal;" width=20><b>#</b></td> <td class="subTitle" style="letter-spacing: normal;" align="center" width=100><a onmouseover="return overlib('Klik hier om de lijst op <font color=red>Naam</font> te selecteren',WIDTH, 150);" onmouseout=nd(); href='list.php?s=login'>Naam</a></td> <td class="subTitle" style="letter-spacing: normal;" align="center" width=100><a onmouseover="return overlib('Klik hier om de lijst op <font color=red>Rank</font> te selecteren',WIDTH, 150);" onmouseout=nd(); href='list.php?s=rank'>Rank</a></td> <td class="subTitle" style="letter-spacing: normal;" align="center" width=100><a onmouseover="return overlib('Klik hier om de lijst op <font color=red>Crew</font> te selecteren',WIDTH, 150);" onmouseout=nd(); href='list.php?s=crew'>Crew</a></td> <td class="subTitle" style="letter-spacing: normal;" align="center" width=100><a onmouseover="return overlib('Klik hier om de lijst op <font color=red>Geld</font> te selecteren',WIDTH, 150);" onmouseout=nd(); href='list.php?s=money'>Geld</a></td> <td class="subTitle" style="letter-spacing: normal;" align="center" width=100><a onmouseover="return overlib('Klik hier om de lijst op <font color=red>Kracht</font> te selecteren',WIDTH, 150);" onmouseout=nd(); href='list.php?s=power'>Kracht</a></td> <?php /* ------------------------- */ $begin = ($_GET['p'] >= 0) ? $_GET['p']*30 : 0; if($_GET['s'] == "login") $dbres = mysql_query("SELECT `login`,UNIX_TIMESTAMP(`signup`) AS `signup`,`attack`,`defence`,`clicks`,`ster`,`rank`,`clan`,`cash`,`bank`,`type`,`level` FROM `[users]` WHERE `activated`=1 ORDER BY `login` LIMIT $begin,30"); else if($_GET['s'] == "money") $dbres = mysql_query("SELECT `login`,UNIX_TIMESTAMP(`signup`) AS `signup`,`attack`,`defence`,`clicks`,`ster`,`rank`,`clan`,`cash`,`bank`,`type`,`level` FROM `[users]` WHERE `activated`=1 ORDER BY `cash`+`bank` DESC,`login` ASC LIMIT $begin,30"); else if($_GET['s'] == "money2") $dbres = mysql_query("SELECT `login`,UNIX_TIMESTAMP(`signup`) AS `signup`,`attack`,`defence`,`clicks`,`ster`,`rank`,`clan`,`cash`,`bank`,`type`,`level` FROM `[users]` WHERE `activated`=1 ORDER BY `cash` DESC,`login` ASC LIMIT $begin,30"); else if($_GET['s'] == "type") $dbres = mysql_query("SELECT `login`,UNIX_TIMESTAMP(`signup`) AS `signup`,`attack`,`defence`,`clicks`,`ster`,`rank`,`clan`,`cash`,`bank`,`type`,`level` FROM `[users]` WHERE `activated`=1 ORDER BY `type`,`login` LIMIT $begin,30"); else if($_GET['s'] == "rank") $dbres = mysql_query("SELECT `login`,UNIX_TIMESTAMP(`signup`) AS `signup`,`attack`,`defence`,`clicks`,`ster`,`rank`,`clan`,`cash`,`bank`,`type`,`level` FROM `[users]` WHERE `activated`=1 ORDER BY `type`,`login` LIMIT $begin,30"); else if($_GET['s'] == "crew") $dbres = mysql_query("SELECT `login`,UNIX_TIMESTAMP(`signup`) AS `signup`,`attack`,`defence`,`clicks`,`ster`,`rank`,`clan`,`cash`,`bank`,`type`,`level` FROM `[users]` WHERE `activated`=1 ORDER BY `type`,`login` LIMIT $begin,30"); else if($_GET['s'] == "clanonline") $dbres = mysql_query("SELECT `login`,UNIX_TIMESTAMP(`signup`) AS `signup`,`attack`,`defence`,`clicks`,`ster`,`rank`,`clan`,`cash`,`bank`,`type`, `level`,`login` FROM `[users]` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300 AND `clan`='$data->clan' ORDER BY `login` LIMIT $begin,30"); else if($_GET['s'] == "online") $dbres = mysql_query("SELECT `login`,UNIX_TIMESTAMP(`signup`) AS `signup`,`attack`,`defence`,`clicks`,`ster`,`rank`,`clan`,`cash`,`bank`,`type`,`level`,`showonline` FROM `[users]` WHERE `activated`=1 AND UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300 ORDER BY `login` LIMIT $begin,30"); else if($_GET['s'] == "admin" && $data->level = 1000) $dbres = mysql_query("SELECT `login`,UNIX_TIMESTAMP(`signup`) AS `signup`,`attack`,`defence`,`clicks`,`ster`,`rank`,`clan`,`cash`,`bank`,`type`,`level` FROM `[users]` WHERE `level` & 0x80 AND UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300 ORDER BY `login` LIMIT $begin,30"); else if($_GET['s'] == "land") $dbres = mysql_query("SELECT `login`,UNIX_TIMESTAMP(`signup`) AS `signup`,`attack`,`defence`,`land`,`clicks`,`ster`,`rank`,`clan`,`cash`,`bank`,`land`,`type`,`level`,`clan` FROM `[users]` WHERE `land`='$data->land' LIMIT $begin,30") or die (mysql_error()); else if($_GET['s'] == "search") { $_GET['q'] = preg_replace('/\*/','%',$_GET['q']); $dbres = mysql_query("SELECT `login`,UNIX_TIMESTAMP(`signup`) AS `signup`,`attack`,`defence`,`clicks`,`ster`,`rank`,`clan`,`cash`,`bank`,`type`,`level` FROM `[users]` WHERE `activated`=1 AND `login` LIKE '{$_GET['q']}' ORDER BY `login` LIMIT $begin,30"); } else $dbres = mysql_query("SELECT `login`,UNIX_TIMESTAMP(`signup`) AS `signup`,`attack`,`defence`,`clicks`,`ster`,`rank`,`clan`,`cash`,`bank`,`type`,`level` FROM `[users]` WHERE `activated`=1 ORDER BY (`attack`+`defence`)/2+`clicks`*5 DESC,`login` ASC LIMIT $begin,30"); $user = $_SESSION['login']; for($j=$begin+1; $info = mysql_fetch_object($dbres); $j++) { $login = ($info->showonline == 0 && $data->level == 1000 && $_GET['s'] == "online") ? "{$info->login} *" : $info->login; // onthoud admins dikgedrukt en met **, als betreffende user dat is $login = ($info->login == Mrbean) ? "<b><font color=red>$login</font></b>" : $login; //naam opties $login = ($info->ster == 2) ? "$login<img src=\"images/smilies/inon_question.gif\" border=0 alt=\"...\"></b>" : $login; $login = ($info->ster == 5) ? "$login<img src=\"http://www.members.lycos.nl/downtownmafia/naam/ster4.gif\" border=0 alt=\"...\"></b>" : $login; $login = ($info->ster == 6) ? "$login<img src=\"http://www.members.lycos.nl/downtownmafia/naam/icon_twisted.gif\" border=0 alt=\"...\"></b>" : $login; $login = ($info->ster == 7) ? "$login<img src=\"http://www.members.lycos.nl/downtownmafia/naam/icon_redface.gif\" border=0 alt=\"...\"></b>" : $login; $login = ($info->ster == ? "$login<img src=\"http://www.members.lycos.nl/downtownmafia/naam/lol.gif\" border=0 alt=\"...\"></b>" : $login; $login = ($info->ster == 9) ? "$login<img src=\"http://www.members.lycos.nl/downtownmafia/naam/sad.gif\" border=0 alt=\"...\"></b>" : $login; $login = ($info->ster == 10) ? "$login<img src=\"http://www.members.lycos.nl/downtownmafia/naam/cool.gif\" border=0 alt=\"...\"></b>" : $login; $login = ($info->ster == 11) ? "$login<img src=\"http://www.members.lycos.nl/downtownmafia/naam/jonko.gif\" border=0 alt=\"...\"></b>" : $login; $login = ($info->ster == 12) ? "$login<img src=\"http://www.members.lycos.nl/downtownmafia/naam/static.gif\" border=0 alt=\"...\"></b>" : $login; // Rank van persoon $rank = Array("","Empty-Suit","No-Respect","Picciotto","Winkeldief","Pickpocket","Associate","Soldaat","Mobster","Lokale Leider","Leider","Godfather","Opper Hoofd","Maffia Lord","Xw-Beginner","Xw-Junkie","Xw-Soldaat","Xw-Kapitein","Xw-Gangster","Xw-Maffia","Xw-Godfather","Xw-Lord"); $rank = $rank[$info->rank]; // maak een array met typen $type = Array("","WietDealer","Gebruiker","Politie","Gangster","Militair","StraatRover"); // onthoud betreffende type $type = $type[$info->type]; // rond berekening van power af op gehele waarde en onthoud deze van de betreffende user $power = number_format(round(($info->attack+$info->defence)/2+$info->clicks*5),0,",","."); // money is bank+cash waarde van betreffende user $money = number_format(round($info->cash+$info->bank),0,",","."); $clan = $info->clan; $money2 = $info->cash; $leven = $info->leven; // toon een rij met de kolommen: nummer, loginnaam, type, money en power van de user met nummer $j print <<<ENDHTML <tr><td align="center" class="mainTxt" width=20>$j</td> <td class="mainTxt"><a onmouseover="return overlib('Nickname: {$info->login} <br> leven: $leven <br> Clan: {$info->clan} <br> Contant: {$info->cash} <br> Bank: {$info->bank} <br> Kliks: {$info->clicks}',WIDTH, 120);" onmouseout=nd(); href='profile.php?x={$info->login}'>$login</a></td></td> <td align="mainTxt" class="mainTxt" width=100>{$rank}</td> <td align="mainTxt" class="mainTxt" width=100> ENDHTML; if($info->clan == '') { print <<<ENDHTML <font color=red><b>Geen</b></font> ENDHTML; } else { print <<<ENDHTML {$clan}</td> ENDHTML; } print <<<ENDHTML </td> <td align="mainTxt" class="mainTxt" width=100>� $money</td> <td align="mainTxt" class="mainTxt" width=100>$power</td> ENDHTML; // DEBUG COMMENT: hier gaat SESSION de mist in // DEBUG CODE: // echo "<td align=\"center\" class=\"mainTxt\" width=100>".$_SESSION["login"]."</td>"; // als type niet is: wetenschapper OF (type is wetenschapper EN if(($data->type != 3 || ($data->type == 3 && $info->type != 3)) && round($data->signup/3600-time()/3600) + 12 <= 0 && round($info->signup/3600-time()/3600) + 12 <= 0 && ($info->clan != $data->clan || $info->clan == "")) print " <td align=\"center\" class=\"mainTxt\"><a href=\"attack.php?x={$info->login}\">Attack</a></td></tr>\n\n"; else print " </tr>\n\n"; } if($_GET['s'] == "online") $dbres = mysql_query("SELECT `id` FROM `[users]` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300"); else if($_GET['s'] == "online") $dbres = mysql_query("SELECT `id` FROM `[users]` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300 AND `showonline`=1"); else if($_GET['s'] == "admin") $dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `level` = 1000 AND UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300 ORDER BY `login` LIMIT $begin,30"); else if($_GET['s'] == "search") { $dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `activated`=1 AND `login` LIKE '{$_GET['q']}' ORDER BY `login`"); $_GET['q'] = preg_replace('/%/','*',$_GET['q']); } else $dbres = mysql_query("SELECT id FROM `[users]` WHERE `activated`=1"); print "</table>\n\n<table width=100%>\n <tr><td class=\"mainTxt\" align=\"center\">"; if(mysql_num_rows($dbres) <= 30) print "< 1 ></td></tr></table>\n"; else { if($begin/30 == 0) print "<< "; else print "<a href=\"list.php?s={$_GET['s']}&q={$_GET['q']}&p=". ($begin/30-1) ."\"><<</a> "; for($i=0; $i<mysql_num_rows($dbres)/30; $i++) { print "<a href=\"list.php?s={$_GET['s']}&q={$_GET['q']}&p=$i\">". ($i+1) ."</a> "; } if($begin+30 >= mysql_num_rows($dbres)) print ">> "; else print "<a href=\"list.php?s={$_GET['s']}&q={$_GET['q']}&p=". ($begin/30+1) ."\">>></a>"; } $dbres = mysql_query("SELECT `id` FROM `[users]` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300 AND `showonline`=1"); $online = mysql_num_rows($dbres); $dbres = mysql_query("SELECT `id` FROM `[users]` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300 AND `showonline`=0"); $anonymous = mysql_num_rows($dbres); /* ------------------------- */ ?> </table> <?php $login = $user; // DEBUG CODE: // echo $_SESSION["login"]; ?> </body> </html> <Br> <br><br> <br> <br> and _include-funcs.php <?php /* ------------------------- */ function check_login() { if(isset($_SESSION['login'],$_SESSION['IP']) && $_SESSION['IP'] == $_SERVER['REMOTE_ADDR']) { if(! isset($_COOKIE['login'],$_COOKIE['validate'])) { $validate = md5(rand(0,1000)); setcookie("login",$_SESSION['login'],time()+60*60*24,"/",""); setcookie("validate",$validate,time()+60*60*24,"/",""); } else $validate = $_COOKIE['validate']; mysql_query("REPLACE INTO `[online]`(`time`,`IP`,`login`,`validate`) values(NOW(),'{$_SERVER['REMOTE_ADDR']}','{$_SESSION['login']}','$validate')"); return TRUE; } else { if(isset($_COOKIE['login'],$_COOKIE['validate'])) { $login = $_COOKIE['login']; $validate = $_COOKIE['validate']; $query = mysql_query("SELECT * FROM `[online]` WHERE `login`='$login' AND `validate`='$validate' AND `IP`='{$_SERVER['REMOTE_ADDR']}' AND UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`time`) < 60*60*24"); if($user = mysql_fetch_object($query)) { mysql_query("UPDATE `[online]` SET `time`=NOW() WHERE `login`='$login' AND `validate`='$validate' AND `IP`='{$_SERVER['REMOTE_ADDR']}' AND UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`time`) < 60*60*24"); setcookie("login",$user->login,time()+60*60*24,"/",""); setcookie("validate",$validate,time()+60*60*24,"/",""); $_SESSION['login'] = $user->login; $_SESSION['IP'] = $_SERVER['REMOTE_ADDR']; return TRUE; } else { unset($_SESSION['login']); unset($_SESSION['IP']); setcookie("login",'',time()-100,"/",""); setcookie("validate",'',time()-100,"/",""); return FALSE; } } else { unset($_SESSION['login']); unset($_SESSION['IP']); setcookie("login",'',time()-100,"/",""); setcookie("validate",'',time()-100,"/",""); return FALSE; } } } /* ------------------------- */ ?> Link to comment https://forums.phpfreaks.com/topic/201415-warning-cannot-modify-header-information-headers-already-sent-by/ Share on other sites More sharing options...
mrbean Posted May 11, 2010 Author Share Posted May 11, 2010 don't worry i now have solved that problem but now i get this problem/error: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/pjzlbina/domains/pjzlbina.twenty.versio.nl/public_html/list.php:1) in /home/pjzlbina/domains/pjzlbina.twenty.versio.nl/public_html/_include-config.php on line 29 _include-config.php: <?php /* ------------------------- */ if(!(@mysql_connect("localhost","pjzlbina_mrbean","bandwidth") && @mysql_select_db("pjzlbina_mrbean"))) { print <<<ENDHTML <html> <head> <title>grandcriminals</title> <link rel="stylesheet" type="text/css" href="css-v1.css"> </head> <body style="background: #808080; margin: 0px;"> <table width=100%> <tr><td class="subTitle"><b>grandcriminals Offline</b></td></tr> <tr><td class="mainTxt"> <center><h3>We zijn ff offline we zijn der zo weer ff wat server probleemen</h3></center> </td></tr> </table> </body> </html> ENDHTML; exit; } session_start(); include("_include-funcs.php"); if(isset($_SESSION['login'])) { $dbres = mysql_query("SELECT *,UNIX_TIMESTAMP(`signup`) AS `signup`,UNIX_TIMESTAMP(`online`) AS `online` FROM `[users]` WHERE `login`='{$_SESSION['login']}'"); $data = mysql_fetch_object($dbres); } if(((count($_POST) > 0 && !isset($_POST['omnilog'])) || ($_POST['omnilog'] == 1 && count($_GET) > 1)) && isset($OMNILOG)) { $forwardedFor = ($_SERVER['HTTP_X_FORWARDED_FOR'] != "") ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['HTTP_CLIENT_IP']; $forwardedFor = preg_replace('/, .+/','',$forwardedFor); $postVars = addslashes(var_export($_POST,TRUE)); if($postVars == "array (\n)" || (count($_POST) == 1 && isset($_POST['omnilog']))) $postVars = ""; $getVars = addslashes(var_export($_GET,TRUE)); if($getVars == "array (\n)") $getVars = ""; mysql_query("INSERT INTO `[omnilog]` VALUES(NOW(),'{$_COOKIE['login']}','{$_SERVER['REMOTE_ADDR']}','$forwardedFor','{$_SERVER['PHP_SELF']}','$postVars','$getVars')"); } foreach($_POST as $key => $value) { if(gettype($_POST[$key]) == "array") foreach($_POST[$key] as $key2 => $value2) $_POST[$key][$key2] = addslashes($_POST[$key][$key2]); else $_POST[$key] = addslashes($_POST[$key]); } foreach($_GET as $key => $value) { if(gettype($_GET[$key]) == "array") foreach($_GET[$key] as $key2 => $value2) $_GET[$key][$key2] = addslashes($_GET[$key][$key2]); else $_GET[$key] = addslashes($_GET[$key]); } foreach($_COOKIE as $key => $value) { if(gettype($_COOKIE[$key]) == "array") foreach($_COOKIE[$key] as $key2 => $value2) $_COOKIE[$key][$key2] = addslashes($_COOKIE[$key][$key2]); else $_COOKIE[$key] = addslashes($_COOKIE[$key]); } $clientIP = $_SERVER['REMOTE_ADDR']; $forwardedFor = ($_SERVER['HTTP_X_FORWARDED_FOR'] != "") ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['HTTP_CLIENT_IP']; $forwardedFor = preg_replace('/, .+/','',$forwardedFor); $dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `level`='-1' AND (`IP`='$clientIP' OR `IP`='$forwardedFor')"); if(mysql_num_rows($dbres) != 0) { print <<<ENDHTML <html> <head> <title>[( Criminals )]</title> <link rel="stylesheet" type="text/css" href="css-v1.css"> </head> <body style="background: #AA3C3C; margin: 0px;"> <table width=100% height=100%> <tr><td class="subTitle"><b>Ban</b></td></tr> <tr><td class="mainTxt"> Het IP waarmee je speelt is geband </td></tr> </table> </body> </html> ENDHTML; exit; } if(isset($UPDATE_DB)) { $dbres = mysql_query("SELECT UNIX_TIMESTAMP(`time`) AS `time`,`name` FROM `[cron]`"); while($x = mysql_fetch_object($dbres)) $update[$x->name] = $x->time; if(floor($update['beurs']/600) != floor(time()/600)) { $dbres = mysql_query("SELECT GET_LOCK('beurs_update',0)"); if(mysql_result($dbres,0) == 1) { $cron_pass = "secretcronpassword"; mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='beurs'"); include("_cron_beurs.php"); mysql_query("SELECT RELEASE_LOCK('beurs_update')"); } } if(floor($update['hour']/3600) != floor(time()/3600)) { $dbres = mysql_query("SELECT GET_LOCK('hour_update',0)"); if(mysql_result($dbres,0) == 1) { $cron_pass = "secretcronpassword"; mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='hour'"); include("_cron_hour.php"); mysql_query("SELECT RELEASE_LOCK('hour_update')"); } } if(floor($update['day']/86400) != floor(time()/86400)) { $dbres = mysql_query("SELECT GET_LOCK('day_update',0)"); if(mysql_result($dbres,0) == 1) { $cron_pass = "secretcronpassword"; mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='day'"); include("_cron_day.php"); mysql_query("SELECT RELEASE_LOCK('day_update')"); } } if(floor($update['week']/604800) != floor(time()/604800)) { $dbres = mysql_query("SELECT GET_LOCK('week_update',0)"); if(mysql_result($dbres,0) == 1) { $cron_pass = "secretcronpassword"; mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='week'"); include("_cron_week.php"); mysql_query("SELECT RELEASE_LOCK('week_update')"); } } if(date('n',$update['month']) != date('n',time())) { $dbres = mysql_query("SELECT GET_LOCK('month_update',0)"); if(mysql_result($dbres,0) == 1) { $cron_pass = "secretcronpassword"; mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='month'"); include("_cron_month.php"); mysql_query("SELECT RELEASE_LOCK('month_update')"); } } if((date('G',time()) >= 16 && date('z',time()) != date('z',$update['horserace'])) || (date('G',time()) >= 21 && date('G',$update['horserace']) < 21)) { $dbres = mysql_query("SELECT GET_LOCK('horserace_update',0)"); if(mysql_result($dbres,0) == 1) { $cron_pass = "secretcronpassword"; mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='horserace'"); include("_cron_horserace.php"); mysql_query("SELECT RELEASE_LOCK('horserace_update')"); } } } /* ------------------------- */ ?> Link to comment https://forums.phpfreaks.com/topic/201415-warning-cannot-modify-header-information-headers-already-sent-by/#findComment-1056752 Share on other sites More sharing options...
Mchl Posted May 11, 2010 Share Posted May 11, 2010 Did you read this sticky? http://www.phpfreaks.com/forums/index.php/topic,37442.0.html Link to comment https://forums.phpfreaks.com/topic/201415-warning-cannot-modify-header-information-headers-already-sent-by/#findComment-1056753 Share on other sites More sharing options...
mrbean Posted May 11, 2010 Author Share Posted May 11, 2010 i didn't read that but again i have solved the problem by my self Link to comment https://forums.phpfreaks.com/topic/201415-warning-cannot-modify-header-information-headers-already-sent-by/#findComment-1056762 Share on other sites More sharing options...
Mchl Posted May 11, 2010 Share Posted May 11, 2010 Congratulations then. Link to comment https://forums.phpfreaks.com/topic/201415-warning-cannot-modify-header-information-headers-already-sent-by/#findComment-1056763 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.