".$_SESSION["stranek"]." navstev

"; if(isset($_SESSION["ppl"]) && strlen($_SESSION["ppl"])>5) { $ID2=$_SESSION["ppl"]; }; if(!isset($_SESSION["ppl"]) && $ID2!="") $_SESSION["ppl"]=$ID2; $ID2=$ID2; session_register("user_data"); function doplnu($qil) { $cena_ey=explode(".",$qil); $cena_ey[1]=str_pad($cena_ey[1], 1, "0", STR_PAD_RIGHT); $qil=implode(".",$cena_ey); return $qil; }; function kontrola($qil) { $qil=stripslashes($qil); $qil=htmlspecialchars($qil, ENT_QUOTES); $qil=str_replace("'","",$qil); $qil=str_replace("\"","",$qil); $qil=str_replace("\r\n","",$qil); $qil=str_replace("\n","",$qil); $qil=str_replace("\r","",$qil); $qil=str_replace(";","",$qil); $qil=substr( $qil,0,50); return $qil; }; function zao($qil) { $weo=ceil($qil); if ($weo==$qil) $qil=$weo; return $qil; }; $zaznam=""; $ID=kontrola($ID); $ID2=kontrola($ID2); $ID2=strip_tags($ID2); //$ID2=substr($ID2,0,26); if (file_exists("eshop/php/".$ID.".php")) $str="php/".$ID.".php"; elseif (file_exists("eshop/files/".$ID) && $ID!="") $str="files/".$ID; else {$str="php/0.php"; $ID=0;}; if ($ID=="pokladna" || $ID=="kosik" || $ID=="stavobj") { header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // datum v minulosti header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // vdy upraven header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header ("Pragma: no-cache"); // HTTP/1.0 }; Header("Content-Type: text/html; charset=windows-1250"); $goald="qwert"; @include("eshop/admin/goald.php"); $krize=0; // +++ MySQL +++ if ($rdb!="" && $ddb!="") { $spojeni = @MySQL_Connect($rdb,$udb,$pdb); mysql_query("SET CHARACTER SET cp1250"); $databaze = $ddb; if(!$spojeni) { print "

Lituji - nepodailo se pipojit k databzi

Podrobnosti na tel: 773 681 095 Alex-Elektro.cz"; die; }; } else { print "

Lituji - databze nen sprvn nastavena

"; die; }; if ($log==2) { $sql="DELETE FROM aktiv WHERE kod='$ID2';"; @MySQL_DB_Query($databaze,$sql,$spojeni); unset($_SESSION['ppl']); session_destroy(); }; // logica +++++++++++++++++++++ if (!$ID2 || strlen($ID2)<25) { $ID2=substr(md5 (uniqid ("")),0,25); $sql = "INSERT INTO aktiv (time,kod) VALUES ( '$time', '$ID2');"; @MySQL_DB_Query($databaze, $sql, $spojeni); $sql="DELETE FROM aktiv WHERE time<$time-10800;"; // +++ 3 hodiny @MySQL_DB_Query($databaze,$sql,$spojeni); unset($_SESSION['ppl']); }; //print $ID2." - "; if ($log==1 && $user!="") { $sql = "SELECT ID,user FROM shop_user WHERE user='$user' AND pass='$pass' LIMIT 1;"; $vysledek = MySQL_DB_Query($databaze,$sql,$spojeni); $zaznam = @mysql_fetch_array ($vysledek); $ID2=""; if ($zaznam[0]!="") { $sql="DELETE FROM aktiv WHERE ID='$zaznam[0]';"; // +++ 0.5 hodiny @MySQL_DB_Query($databaze,$sql,$spojeni); if (strlen($ID2)>24) { $ID2=$ID2; $sql="UPDATE shop_user SET time='$time' WHERE ID='$zaznam[0]';"; @MySQL_DB_Query($databaze,$sql,$spojeni); $sql="UPDATE aktiv SET ID='$zaznam[0]',user='$zaznam[1]' WHERE kod='$ID2';"; @MySQL_DB_Query($databaze,$sql,$spojeni); } else { $ID2=substr(md5 (uniqid ("")),0,25).""; $sql = "INSERT INTO aktiv (ID,time,kod,user) VALUES ( '$zaznam[0]', '$time', '$ID2', '$zaznam[1]');"; @MySQL_DB_Query($databaze, $sql, $spojeni); $sql="UPDATE shop_user SET time='$time' WHERE ID='$zaznam[0]';"; @MySQL_DB_Query($databaze,$sql,$spojeni); // @ini_set('session.name',"aha"); // session_start(); // session_register("ppl"); //print $ID2."*******
"; $_SESSION["ppl"]=$ID2; }; } else $logalert="
patn jmno nebo heslo!!
"; }; if (strlen($ID2)>=25) { $det=$time-1800; $sql="DELETE FROM aktiv WHERE time<$det;"; // +++ 0.5 hodiny @MySQL_DB_Query($databaze,$sql,$spojeni); $sql="UPDATE aktiv SET time='$time' WHERE kod='$ID2';"; @MySQL_DB_Query($databaze,$sql,$spojeni); $sql = "SELECT ID,user,kod FROM aktiv WHERE kod='$ID2' LIMIT 1;"; $algema = MySQL_DB_Query($databaze,$sql,$spojeni); $zaga = @mysql_fetch_array ($algema); $protonam=$zaga[0]/1; $uzivatel=$zaga[1]; if ($protonam>0) { $sql = "SELECT COUNT(ID) FROM shop_vzkazy WHERE komu='$protonam' AND stav=0;"; $vxc = MySQL_DB_Query($databaze,$sql,$spojeni); $zce = mysql_fetch_array ($vxc); if ($zce[0]>0) { $mesixu="onload=\"alert('Messenger System : Mte novou zprvu !!');\""; $sql="UPDATE shop_vzkazy SET stav=1 WHERE komu='$protonam' AND stav=0;"; @MySQL_DB_Query($databaze,$sql,$spojeni); }; }; $sqlv = "SELECT priorita2 FROM shop_slevy WHERE ID=$protonam AND ID>0 LIMIT 1;"; $vysledekvv = MySQL_DB_Query($databaze,$sqlv,$spojeni); $zaznamvv = mysql_fetch_array ($vysledekvv); if ($zaznamvv[0]==1) $papir=1; else $papir=0; if ($zaga[2]=="") { $ID2=""; unset($_SESSION['ppl']); @session_destroy(); }; if ($deleno!=1) @setcookie ("ID3", $ID2, $time+1800); }; // +++++++ pluginy +++++ $sql = "SELECT hodnota,ID FROM globnast WHERE ID='pluginy' LIMIT 1;"; $vysledek = MySQL_DB_Query($databaze,$sql,$spojeni); $zaznam = @mysql_fetch_array ($vysledek); $modul=@explode(",",$zaznam[0]); if (count($modul>9)) { $m_anketa=$modul[0]/1; $m_reklama=$modul[1]/1; $m_kniha=$modul[2]/1; $m_nazory=$modul[3]/1; $m_info=$modul[4]/1; $m_top=$modul[5]/1; $m_tip=$modul[6]/1; $m_maillist=$modul[7]/1; $m_spoluprace=$modul[8]/1; $m_user=$modul[9]/1; $m_forum=$modul[10]/1; $m_download=$modul[11]/1; $m_clanky=$modul[12]/1; $m_faq=$modul[13]/1; $m_[anketa]=$modul[0]/1; $m_[reklama]=$modul[1]/1; $m_[kniha]=$modul[2]/1; $m_[nazory]=$modul[3]/1; $m_[info]=$modul[4]/1; $m_[top]=$modul[5]/1; $m_[tip]=$modul[6]/1; $m_[maillist]=$modul[7]/1; $m_[spoluprace]=$modul[8]/1; $m_[user]=$modul[9]/1; $m_[vyhledavani]=1; $m_[kategorie]=1; $m_[zbozi]=1; }; if ($openit[0]/1==1 || $protonam>0) { // +++ MySQL konec +++ $sql = "SELECT hodnota FROM globnast WHERE ID='typ_obchodu' LIMIT 1;"; $vysledek = @MySQL_DB_Query($databaze,$sql,$spojeni); $zaznam = @mysql_fetch_array ($vysledek); $typ_obchodu=$zaznam[0]; if($deleno==1) $index="index.php"; else $index="eshop.php"; @include("eshop/php/masky.php"); //include("eshop/php/stavkosikufill.php"); include("eshop/php/index".$zaznam[0].".php"); include("xmlgenerator.php"); } else { // ---- obchod je vypnuty ---- @include("eshop/data/close.html"); }; ?>