ПРОБЛЕМА Ошибка: Notice: Undefined variable:

Stas799

Местный
Привет всем. С недавнего времени получил вот такую ошибку на скрипте:

Notice: Undefined variable: referersz2 in /home/c23658/bux.bravesite.ru/www/podkl/titulos.php on line 6

Notice
: Undefined variable: referersz2 in /home/c23658/bux.bravesite.ru/www/podkl/titulos.php on line 7

Кто знает как исправить. Помогите пожалуйста.

Код:
<?

$nowbday=date('Y')-$duser['bday'];
if($duser['referer']==''){$referersz1='1';}
if($duser['referer']!=''){$referersz2='2';}
if($dynpokaz=='1'){$adsvip = mysql_query("SELECT * FROM tb_ads where vip='1' and '1' < plan and play = '0' and status = '0' and serf_reyt<=$duser[visits] and task_reyt<=$duser[task] and (my_referer='0' or my_referer='$duser[referer]') and (referer='0' or referer='$referersz1' or (referer='$referersz2' and user='$duser[referer]')) and (rod='0' or rod='$duser[rod]') and (family='0' or family='$duser[family]') and (pol='0' or pol='$duser[pol]') and (bday1<='$nowbday' and bday2>='$nowbday' or (bday2='0' or bday2='0')) and (country1='$duser[country]' or country2='$duser[country]' or country3='$duser[country]' or country4='$duser[country]' or country5='$duser[country]' or country6='$duser[country]' or country7='$duser[country]' or country8='$duser[country]' or country9='$duser[country]' or country10='$duser[country]' or country11='$duser[country]' or country12='$duser[country]' or country13='$duser[country]' or country14='$duser[country]' or country15='$duser[country]' or country16='$duser[country]') ORDER BY mini asc, id desc");$wel++;}
if($dynpokaz=='2'){$adsvip = mysql_query("SELECT * FROM tb_ads where vip='0' and '1' < plan and play = '0' and status = '0' and serf_reyt<=$duser[visits] and task_reyt<=$duser[task] and (my_referer='0' or my_referer='$duser[referer]') and (referer='0' or referer='$referersz1' or (referer='$referersz2' and user='$duser[referer]')) and (rod='0' or rod='$duser[rod]') and (family='0' or family='$duser[family]') and (pol='0' or pol='$duser[pol]') and (bday1<='$nowbday' and bday2>='$nowbday' or (bday2='0' or bday2='0')) and (country1='$duser[country]' or country2='$duser[country]' or country3='$duser[country]' or country4='$duser[country]' or country5='$duser[country]' or country6='$duser[country]' or country7='$duser[country]' or country8='$duser[country]' or country9='$duser[country]' or country10='$duser[country]' or country11='$duser[country]' or country12='$duser[country]' or country13='$duser[country]' or country14='$duser[country]' or country15='$duser[country]' or country16='$duser[country]') ORDER BY mini asc, id desc");$wel++;}
while ($adsv = mysql_fetch_assoc($adsvip))
{
  $idh=$adsv['id'];
  $description=$adsv['description'];
  $description2=$adsv['description2'];
  $highlight=$adsv['highlight'];
  $plan=$adsv['plan'];
  $members=$adsv['members'];
  $ost=$plan-$members;
  $total=$members;
  $timer=$adsv['timer'];
  $urldyn=$adsv['url'];
  $all_zh=$adsv['all_zh'];
  $idmd5=$idh;
 
  $crok2=mysql_result(mysql_query("SELECT visitime FROM tb_ads_visit WHERE ident='$idh' and user='$duser[username]'"),0);

  $crok1 = time();
  $crok2=$crok2+86400;
  $crok3=$crok2+86400;


   if($crok1 >= $crok2){
   if($crok1 >= $crok2){

   $symbolsdesc=strlen($description);
   if($symbolsdesc>25)
   {
   $sdesc=$symbolsdesc-5;
   $startbut=rand(5,$sdesc);
   }else{
   $sdesc=$symbolsdesc-3;
   $startbut=rand(0,$sdesc);
   }
   }

  $newdesc=substr($description,0,$startbut);
  $newdesc.="<span name='wrapper' id='$idmd5' onClick='javascript:LoginClick$idmd5(); return false;' class='serfgo'>";
  $endbut=$startbut+3;
  $frees=substr($description,$startbut,3);
  $other=substr($description,$endbut);
  require($_SERVER['DOCUMENT_ROOT']."/setup/nek_conf.conf.php");

    if($securtip=='1'){ $newdesc.="$frees</span><span id='logbtn$idmd5'>$other</span>";
    }else{
    $newdesc='<a onclick="javascript:goserf(this);" href="view.php?ad='.$idh.'" target="_blank" style="color:<?=$highlight?>;">'.$description.'</a>';
    }
    }else{
    $newdesc="<del>$description</del>";
    }
 
    if($highlight==1){$highlight="#C80000";}else{$highlight="";}
    if($total<=5) { $new='| (new)'; } else { $new='';}
    $crok1 = date(time());
    $crok2 = date($iden[$idh] + (24 * 60 * 60));

    $domen=$adsv["url"];
    $domen = str_replace("//","/",$domen);
    $domen = str_replace("www.","",$domen);
    $domen = explode("/", $domen);
    $domen=$domen[1];
    if (strlen($domen) > 20) { $domen=substr($domen,0,20)."..."; }
    if($crok1 >= $crok3){
    ?>

<table class='work-serf' width='100%' border='0' cellpadding='0' cellspacing='0'>
<tr>
<td class='normal' width='40' valign='top'>
<? if($adsv['act']==1) { ?><span class="serfimghighact"></span><? }else{ ?><span class="serfimghigh"></span><? } ?></td>
<td class='normal' valign='top' style='font-size:12px;padding-top:10px;'>
<div style='color:<?=$highlight?>;'><?=$newdesc ?><br />
<span class='desctext'><?=$description2;?> | Таймер: <?=$timer?> сек. <?=$new?><? if($dynpokaz=='1'){ ?> | <span class="clickprice">VIP</span><? } ?></span>
</div>
</td>

<td class='normal' nowrap='nowrap' valign='top' style='width: 105px; text-align: right; padding-right: 10px;'>
<span class='smoolgray' title='Осталось визитов'>(<?=$plan;?>) </span>
<span class='clickprice' title='Стоимость просмотра'><?=round($adsv['klik'],4)?> руб.</span><br />
<a class='workcompn' onclick='hideserfcompblock("addcomp<?=$idh ?>");'  title='Пожаловаться на рекламу'></a>
<a class='workevents' target='_blank' title='Рекламодатель' href='wall.php?user=<?=$adsv['user'];?>'></a>
<a class='workvirs' href='http://online.us.drweb.com/result/?url=<?=$urldyn;?>' title='Проверить ссылку на вирусы' target='_blank'></a>
</td>
</tr>

<tr id="addcomp<?=$idh ?>" style="display: none;">
<td align="center" colspan="3">
<div class="addcomplaintblock">
<form method="post" target="_blank" action="abuse.php">
<input name="id" type="hidden" value="<?=$idh ?>">
<input name="vid" type="hidden" value="1">
Что не так в этой ссылке? Вирусы? Порнография? Разрушение таймера?<br>
<input type="text" class="addcinput" name="text" maxlength="80" value="">
<input name="hash" value="<?=myHashData2($iduser);?>" type="hidden">
<input type="submit" class="complaintbutton" value="Отправить">
</form>
</div>
</td>
</tr>

</table>
<? }} ?>
 
Верх