Forum Moderators: coopster

Message Too Old, No Replies

unexpected T IF in?

         

hewal02

9:33 pm on Apr 17, 2011 (gmt 0)

10+ Year Member



I get it here problem.kan not you help me?

<?php
set_time_limit(0);
if(!defined('guvenlik'))
{
die('<script>alert("Eyvah hacklendik. ")</script>');
}
$sayfa = empty($_GET['sayfa'])?1:$_GET['sayfa'];
$skat = $_REQUEST['skat'];
$bkat = $_REQUEST['bkat'];

?><title> if(!strstr($embed,'affiliates')):</title>
<form action='index.php?i=botlar&s=filmdiziseyret' method="post">
Karsi Site : <select name="skat">
<option value="category/yabanci-film">Yabanci Filmler</option>
<option value="category/yerli-filmler">Yerli Filmler</option>
</select>
Bizim Site : <select name="bkat"> <?php eklerkenkat(0,0,'-',$bkat); ?> </select>
<input type="submit" id="i3" value="Gönder">
</form>

<?php

if(!empty($skat))
{
if($sayfa!=1)
{
$site = baglan('http://www.filmdiziseyret.com/'.$skat.'/page/'.$sayfa);
}
else
{
$site = baglan('http://www.filmdiziseyret.com/'.$skat);
}
}


$desen = "'<div class=\"filmImg2\"><a href=\"(.*?)\" title=\"(.*?)\"><img class=\"news-img\" src=\"(.*?)\".*?></a></div>'";
preg_match_all($desen,$site,$veri);
preg_match('|<span class=\'pages\'>Page.+of(.+)</span>|siU',$site,$sayfasay);
$say = count($veri[1]);
echo '<br/><br/> ';
$sayfasay = trim($sayfasay[1]);
if(!empty($sayfasay))
{
adsayfala($sayfasay, 'botlar', '&s=filmdiziseyret&skat='.$skat.'&bkat='.$bkat, '',$sayfasay);
}
echo '<br/><br/><form id="botform">
<input type="checkbox" id="chkAll" onclick="sec(this,\'bunu\',\'ekle\')" /> Tüm Içerikleri Seç<br/><br/>
<div id="bunu" style="display:none;"><input type="checkbox" id="chkAll" onclick="sec(this,\'\',\'resim\')" /> Tüm Resimleri de Hosta At<br/><br/> </div>
<input type="button" onclick="botyolla('.$say.');" value="Seçilileri Ekle" id="i3"> <br/><br/>
<div id="botsonucx"></div><br/><br/><br/>
<div id="div">
';
for($t=0;$t<$say;$t++)
{
$title = $veri[2][$t];
$resim = $veri[3][$t];
$link = $veri[1][$t];
$video = baglan($link,'cookie.txt');
$icerik = '|<div id="kendisi".+>(.+)<span id="more-.+">|siU';
preg_match($icerik,$video,$aciklama);
$aciklama = htmlspecialchars(str_replace('= \'\';','',preg_replace('|var(.+)errorMessage|siU', '',strip_tags($aciklama[1],'<br>'))));
preg_match_all('|https://www.4shared.com/flash/player\.swf\?file=(.+).mp4|siU',$video,$face);
$fsay = count($face[1]);
for($ff=0;$ff<$fsay;$ff++)
{
$flvleri = $face[1][$ff].'.mp4';
}
if($fsay==0)
{
preg_match('|var flashvars.+"(.+)".+|siU',$video,$xml);
$bxml = baglan($xml[1]);
preg_match_all('|<videoPath value="(.+)"/>|siU',$bxml,$mp4ler);
$msay = count($mp4ler[1]);
for($mm=0;$mm<$msay;$mm++)
{
$flvleri = $mp4ler[1][$mm];
}
}
?>
<img src="<?=$resim?>" width="100" height="100"/> <br/>
Baslik: <div style="float:right;"><input type="text" name="baslik<?=$t?>" value="<?=$title?>" class="ilyasinput" style="width:500px"/></div><div style="clear:both;"></div> <br/>
Etiketler: <div style="float:right;"><input type="text" name="etiketler<?=$t?>" value="" class="ilyasinput" style="width:500px"/></div><div style="clear:both;"></div> <br/>
Kategori:<div style="float:right;"><select name="kategori<?=$t?>" class="ilyasinput" style="width:505px"><?php eklerkenkat(0,0,'-',$bkat); ?></select></div><div style="clear:both;"></div> <br/>
Açiklama:<div style="float:right;"><input type="text" name="aciklama<?=$t?>" value="<?=trim($aciklama)?>" class="ilyasinput" style="width:500px"/></div><div style="clear:both;"></div> <br/>
Not:<div style="float:right;"><input type="text" name="not<?=$t?>" value="" class="ilyasinput" style="width:500px"/></div><div style="clear:both;"></div> <br/>
Içerik Durumu: <div style="float:right;"><input type="radio" name="durum<?=$t?>" value="1" id="radio" checked="checked"/>Yayinlanmis <input type="radio" name="durum<?=$t?>" value="2" id="radio"/>Taslak</div><div style="clear:both;"></div> <br/>
Ekle Bunu ? <div style="float:right;margin-right:400px;"><input type="checkbox" name="ekle<?=$t?>" id="ekle"></div><div style="clear:both;"></div><br/>
Resim Hosta Insin ? <div style="float:right;margin-right:400px;"><input type="checkbox" name="resimi<?=$t?>" id="resim"></div><div style="clear:both;"></div><br/>
<?php
foreach($flvleri as $embed)(
if(!strstr($embed,'affiliates')):
?>
<input type="hidden" name="part<?=$t?>[]" value="<?=htmlspecialchars($embed)?>" />
<?php
}
}
?>
<input type="hidden" name="resim<?=$t?>" value="<?=$resim?>" />
<hr/><hr/>
<?php
unset($flvleri);



echo '
<input type="checkbox" id="chkAll" onclick="sec(this,\'bunux\',\'ekle\')" /> Tüm Içerikleri Seç<br/><br/>
<div id="bunux" style="display:none;"><input type="checkbox" id="chkAll" onclick="sec(this,\'\',\'resim\')" /> Tüm Resimleri de Hosta At<br/><br/> </div>
<input type="button" onclick="botyolla('.$say.');" value="Seçilileri Ekle" id="i3">
</form>
<div id="botsonuc"></div><br/><br/><br/>';
if(!empty($sayfasay))
{
adsayfala($sayfasay, 'botlar', '&s=filmdiziseyret&skat='.$skat.'&bkat='.$bkat, '',$sayfasay);
}

?>

Matthew1980

7:45 am on Apr 18, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi there hewal02,

Welcome to the forums,

Your going to have to elaborate on this a little more; a line number perhaps to give us a clue on which if statement is giving the error - I don't really want to sift through your code to try and find the error.

Cheers,
MRb

rocknbil

5:26 pm on Apr 18, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Unexpected T_IF means it's encountering an "if" condition where it shouldn't. The only thing obvious I saw was this, and it's not going to cause that error (at least, I don't think it will.)

if(!strstr($embed,'affiliates')):

Should be

if(!strstr($embed,'affiliates')) {
// etc.

You use a colon for case switches, not if's.

StoutFiles

5:55 pm on Apr 18, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



$desen = "'<div class=\"filmImg2\"><a href=\"(.*?)\" title=\"(.*?)\"><img class=\"news-img\" src=\"(.*?)\".*?></a></div>'";

You have a ?> before your </a>. Bad!

Get a color editor so you can see mistakes.

[pspad.com...]

Matthew1980

5:59 pm on Apr 18, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>>if(!strstr($embed,'affiliates')):

I have seen if's structured like this before; I actually thought exactly the same as you Rocknbil, but I hadn't had my morning coffee when I saw this thread pop up. I can't for the life of me remember what this type of structuring is called, though here is the link explaining this type of syntax [php.net] correctly.

I just read this and it's not too dissimlar to how if/end if's are usied in VB.net /c#

Again though I can't see anything obvious really; but personally I would go about tidying up your code to make it more readable to others first.

[EDIT]Nice one StoutFiles! You have a ?> before your </a>. Bad! that will certainly do something as it is in the preg_match patterns, but whether is solves this particular issue, we shall have to wait and see :)

Cheers,
MRb