Help
RSS
API
Feed
Maltego
Contact
Domain > www.kucharka.antechnet.sk
×
More information on this domain is in
AlienVault OTX
Is this malicious?
Yes
No
DNS Resolutions
Date
IP Address
2024-08-17
185.242.56.3
(
ClassC
)
Port 80
HTTP/1.1 200 OKDate: Sat, 17 Aug 2024 08:16:42 GMTServer: Apache/2.4.25 (Debian)Expires: Thu, 19 Nov 1981 08:52:00 GMTCache-Control: no-store, no-cache, must-revalidatePragma: no-cacheSet-Cookie: PHPSESSIDi15ldq5gh9jj921lmqj6oivae5; path/Vary: Accept-EncodingTransfer-Encoding: chunkedContent-Type: text/html;charsetwindows-1250 ?class Mail { //possible values: html, plain var $type html; var $to; var $from; var $charset; var $cc; var $bcc; var $subject; var $plainMessage; var $htmlMessage; var $attachments; var $boundary; var $bnext; var $bend; var $headers; function Mail($type html) { $this->type $type; $this->to array(); $this->cc array(); $this->bcc array(); $this->attachements array(); $this->boundary md5(uniqid(time())); $this->bnext --.$this->boundary.\n; $this->bend --.$this->boundary.--.\n; } function setType($type html) { $this->type $type; } function getType() { return $this->type; } function addTo($address, $name) { if (!empty($name)) { $add .$name. .$address.>; if (!in_array($add,$this->to)) $this->to $add; } else { if (!in_array($address,$this->to)) $this->to $address; } } function setTo($to) { $this->to $to; } function getTo() { return $this->to; } function setFrom($address, $name ) { if (!empty($name)) { $this->from .$name. .$address.>; } else $this->from $address; } function getFrom() { return $this->from; } function setCharset($charset) { $this->charset $charset; } function getCharset() { return $this->charset; } function addCc($address, $name) { if (!empty($name)) { $add .$name. .$address.>; if (!in_array($add,$this->cc)) $this->cc $add; } else { if (!in_array($address,$this->cc)) $this->cc $address; } } function setCc($cc) { $this->cc $cc; } function getCc() { return $this->cc; } function addBcc($address, $name ) { if (!empty($name)) { $add .$name. .$address.>; if (!in_array($add,$this->bcc)) $this->bcc $add; } else { if (!in_array($address,$this->bcc)) $this->bcc $address; } } function setBcc($bcc) { $this->bcc bcc; } function getBcc() { return $this->bcc; } function setSubject($subject) { $this->subject $subject; } function getSubject() { return $this->subject; } function setMessage($message) { $this->plainMessage $message; } function getMessage() { return $this->plainMessage; } function addHTMLMessage($message) { $this->htmlMessage.$message; } function getHTMLMessage() { return $this->htmlMessage; } function fileAdd($filename) { $filedata implode(file($filename), ); return chunk_split(base64_encode($filedata)); } function addImg($filename, $typegif,$alt) { $this->headers.$this->bnext; switch ($type) { case gif:$tp image/gif; break; case jpg:$tp image/jpeg; break; case png:$tp image/png; break; case bmp:$tp image/bmp; break; } //$this->headers . Content-Type: $tp; name\$filename\\n; $this->headers . Content-Type: application/zip; name\$filename\\n; $this->headers . Content-Transfer-Encoding: base64\n; $cid md5(uniqid(time())); $this->headers . Content-ID: $cid>\n; $this->headers . Content-Disposition: inline; filename\$filename\\n\n; $this->headers . $this->fileAdd($filename); $this->htmlMessage . img alt.$alt. srccid:.$cid.>; } function attach($filename) { $this->headers.$this->bnext; $this->headers.Content-Type: application/zip; name:\$filename\\n; $this->headers.Content-Transfer-Encoding: base64\n; $this->headers.Content-Disposition: attachment; filename\$filename\\n\n; $this->headers.$this->fileAdd($filename); } function preHeaders() { if ($this->type html) {/* $this->headers Reply-To: jaroslav.resovsky@gmail.com\n Return-Path: Jaroslav Resovsky jaroslav.resovsky@gmail.com>\n Message-ID: .time().-.$this->from.>\n X-Mailer: PHP v.phpversion().\n .$this->headers;*/ $this->headers Content-Type: multipart/mixed; boundary\$this->boundary\\n.$this->headers; $this->headers MIME-Version: 1.0\n.$this->headers; } if (!empty($this->bcc)) $this->headers Bcc: .implode(,,$this->bcc).\n.$this->headers; if (!empty($this->cc)) $this->headers Cc: .implode(,,$this->cc).\n.$this->headers; $this->headers From: .$this->from.\n. Message-ID: .time().-recepty@kucharka.antechnet.sk>\n. X-Mailer: PHP v5.2.0\n .$this->headers; } function send() { $this->preHeaders(); echo(textarea rows10 cols80>.$this->headers./textarea>); if ($this->type plain) { return mail(implode(,,$this->to),$this->subject,$this->plainMessage,$this->headers); } elseif ($this->type html) { $headers Content-Type: text/html; if ($this->charset) { $headers.; charset.$this->charset.\n; } else { $headers.\n; } $headers . Content-Transfer-Encoding: 7bit\n; $headers . Content-Disposition: inline\n\n; $this->htmlMessage $this->bnext.$headers.$this->htmlMessage.\n.$this->bend; $this->headers.$this->htmlMessage; ini_set(sendmail_from, recepty@kucharka.antechnet.sk); $x mail(implode(,,$this->to),$this->subject,,$this->headers); return $x; } else return false; }}?>?function html2text($string){// $string ereg_replace(a href^>*>, , $string);// $string ereg_replace(/a>, , $string); $string ereg_replace((^)(*_/)(^>), \\1\\2\\3, $string);// $string ereg_replace(b>, *, $string); // $string ereg_replace(/b>, *, $string);// $string ereg_replace(u>, _, $string);// $string ereg_replace(/u>, _, $string);// $string ereg_replace(i>, /, $string);// $string ereg_replace(/i>, /, $string); $string ereg_replace(br>, , $string); $string ereg_replace(br />, , $string);// $string ereg_replace(p>, , $string);// $string ereg_replace(/p>, , $string); return $string;}function text2html($string){ $domain ((a-zA-Z0-9-)+\.)+(a-zA-Z0-9)+; $path ^\t \r\n>+^\t \r\n,.:;\\)>!; $substitutes array( /*array( in > \\\\(.), out > \\1, contains > 0 ),*/ /*array( in > ((a-zA-Z0-9_.-)+@$domain), out > a href\mailto:\\1\>\\1/a>, contains > 0 ),*/ /*array( in > ((http|ftp|https|gopher|news|telnet|wais)://$domain(:0-9*)?/?($path)?), out > a target\_blank\ href\\\1\>\\1/a>, contains > 0 ),*//* array( in > \*(^**^*\)\*, out > b>\\1/b>, contains > 1 ), array( in > _(^_*^_\)_, out > u>\\1/u>, contains > 1 ), array( in > /(^/*^/\)/, out > i>\\1/i>, contains > 1 )*/ ); while (strlen($string)) { $changed false; reset($substitutes); while (list(, $subst) each($substitutes)) { if (ereg(^ . $substin, $string, $match)) { $string substr($string, strlen($match0)); $done ereg_replace(^ . $substin, $substout, $match0); if ($substcontains) { $done text2html($done); } $string2 . $done; $changed true; break; } } if (!$changed) { $string2 . $string0; $string substr($string, 1); } } $string2 nl2br($string2); return $string2;}?>? $_SESSIONdb mysql_connect(localhost,resovsky,6rparthx);// $_SESSIONdb mysql_connect(localhost,root,il64752); mysql_select_db(kucharka,$_SESSIONdb); mysql_query(SET NAMES cp1250); function addRecipe($txtName,$txtDesc,$txtIngr,$txtHowto,$txtRtime,$book,$narocnost,$rec) { if ($rec on) { $recom 1; } else $recom 0; $strSQL INSERT INTO recipe(name,description,ingr,howto,rtime,user_fk,book_fk,narocnost,recommended) VALUES (\.$txtName.\,\.$txtDesc.\, \.$txtIngr.\,\.$txtHowto.\,\.$txtRtime.\,\.$_SESSIONlogged_id.\, \.$book.\,\.$narocnost.\,\.$recom.\);; mysql_query($strSQL,$_SESSIONdb); } function alterRecipe($id,$txtName,$txtDesc,$txtIngr,$txtHowto,$txtRtime,$book,$narocnost,$rec) { if ($rec on) { $recom 1; } else $recom 0; $strSQL UPDATE kucharka.recipe SET name\.$txtName.\, description\.$txtDesc.\, ingr\.$txtIngr.\,howto\.$txtHowto.\,rtime\.$txtRtime.\, user_fk\.$_SESSIONlogged_id.\,book_fk\.$book.\,narocnost\.$narocnost.\,recommended\.$recom.\ WHERE id.$id; mysql_query($strSQL,$_SESSIONdb); } function removeAttribs($id) { $strSQL DELETE FROM attr_recipe WHERE recipe_fk.$id; mysql_query($strSQL,$_SESSIONdb); } function getLastId() { $strSQL SELECT id FROM recipe ORDER BY id DESC LIMIT 1; $res mysql_query($strSQL, $_SESSIONdb); $data mysql_fetch_object($res); $lid $data->id; return $lid; } function addAttribs($polia,$id) { foreach ($polia as $pole) { $strSQL INSERT INTO attr_recipe(recipe_fk,attribute_fk) values (.$id.,.$pole.);; mysql_query($strSQL,$_SESSIONdb); } } function getAllAttributes() { $strSQL SELECT * FROM attribute ORDER BY id; $res mysql_query($strSQL,$_SESSIONdb); $result array(); $datadata; while ($data) { $data mysql_fetch_object($res); if ($data) { $result$data->id $data->name; } } return $result; } function getAllRecipes($bookid) { $strSQL SELECT * FROM recipe WHERE book_fk.$bookid. .$_SESSIONsort; $res mysql_query($strSQL,$_SESSIONdb); return $res; } function getAllRecipesInBooks($id) { $strSQL SELECT * FROM recipe WHERE book_fk IN (SELECT DISTINCT books.id FROM books,user_book WHERE books.owner_fk.$id. OR (user_book.user_fk.$id. AND user_book.book_fkbooks.id)) OR book_fk0 .$_SESSIONsort; return mysql_query($strSQL,$_SESSIONdb); } function getRecId($id) { $strSQL SELECT * FROM recipe WHERE id.$id; return mysql_query($strSQL,$_SESSIONdb); } function getRecAttr($id) { $strSQL SELECT DISTINCT * FROM attr_recipe WHERE recipe_fk.$id; return mysql_query($strSQL,$_SESSIONdb); } function getAttrName($id) { $strSQL SELECT name FROM attribute WHERE id.$id; $res mysql_query($strSQL,$_SESSIONdb); $data mysql_fetch_object($res); return $data->name; } function validateUser($Login,$Password) { $strSQL SELECT id,pwd,defbook FROM user WHERE login\.$Login.\; $res mysql_query($strSQL,$_SESSIONdb); $data mysql_fetch_object($res); if (md5($Password) $data->pwd) { $_SESSIONlogged_id $data->id; $_SESSIONdefbook $data->defbook; $_SESSIONcurrentbook $data->defbook; return true; } else { return false; } } function setDefaultBook($id) { $strSQL UPDATE user SET defbook.$id. WHERE id.$_SESSIONlogged_id; mysql_query($strSQL,$_SESSIONdb); $_SESSIONdefbook $id; } function getAllBooks($id) { $strSQL SELECT DISTINCT books.id,books.name,books.description,books.owner_fk FROM books,user_book WHERE books.owner_fk.$id. OR (user_book.user_fk.$id. AND user_book.book_fkbooks.id) ORDER BY books.name COLLATE cp1250_general_ci; return mysql_query($strSQL,$_SESSIONdb); } function getUser($id) { $strSQL SELECT name FROM user WHERE id.$id; $res mysql_query($strSQL,$_SESSIONdb); $data mysql_fetch_object($res); return $data->name; } function getUsr($id) { $strSQL SELECT * FROM user WHERE id.$id; $res mysql_query($strSQL,$_SESSIONdb); $data mysql_fetch_object($res); return $data; } function getBook($id) { $strSQL SELECT * from books WHERE id.$id; $res mysql_query($strSQL, $_SESSIONdb); return mysql_fetch_object($res); } function getBookName($id) { $data getBook($id); return $data->name; } function alterBook($Nazov,$Popis,$id) { $strSQL UPDATE books SET name\.$Nazov.\, description\.$Popis.\ WHERE id.$id; mysql_query($strSQL,$_SESSIONdb); } function addBook($Nazov,$Popis) { $strSQL INSERT INTO books(name,description,owner_fk) VALUES(\.$Nazov.\,\.$Popis.\,.$_SESSIONlogged_id.); mysql_query($strSQL,$_SESSIONdb); } function getAllCategory() { $strSQL SELECT * FROM attribute ORDER BY name; return mysql_query($strSQL,$_SESSIONdb); } function getCat($id) { $strSQL SELECT * from attribute WHERE id.$id; $res mysql_query($strSQL, $_SESSIONdb); return mysql_fetch_object($res); } function alterCat($Nazov,$id) { $strSQL UPDATE attribute SET name\.$Nazov.\ WHERE id.$id; mysql_query($strSQL,$_SESSIONdb); } function addCat($Nazov) { $strSQL INSERT INTO attribute(name) VALUES (\.$Nazov.\); mysql_query($strSQL,$_SESSIONdb); } function getAllUsers() { $strSQL SELECT * FROM user ORDER BY name; $res mysql_query($strSQL,$_SESSIONdb); return $res; } function checkOwnership($id,$setid) { $strSQL SELECT owner_fk FROM books WHERE id.$setid; $res mysql_query($strSQL,$_SESSIONdb); $data mysql_fetch_object($res); if ($data->owner_fk $id) { return true; } else return false; } function checkRights($id,$setid) { $strSQL SELECT user_fk FROM user_book WHERE book_fk.$setid; $res mysql_query($strSQL, $_SESSIONdb); if (mysql_numrows($res)0) return false; $data data; while ($data) { $data mysql_fetch_object($res); if ($data) { if ($data->user_fk $id) return true; } } return false; } function grant($usrid,$bookid) { $strSQL INSERT INTO user_book (user_fk,book_fk) VALUES (.$usrid.,.$bookid.); mysql_query($strSQL,$_SESSIONdb); } function revoke($usrid,$bookid) { $strSQL DELETE FROM user_book WHERE user_fk.$usrid. AND book_fk.$bookid; mysql_query($strSQL,$_SESSIONdb); } function isFavorite($id,$did) { $strSQL SELECT * FROM favorites WHERE user_fk.$id. AND recipe_fk.$did; $res mysql_query($strSQL,$_SESSIONdb); if (mysql_numrows($res) > 0) { return true; } else return false; } function removeFavorite($showid,$id) { $strSQL DELETE FROM favorites WHERE user_fk.$id. AND recipe_fk.$showid; mysql_query($strSQL,$_SESSIONdb); } function addFavorite($showid,$id) { $strSQL INSERT INTO favorites (user_fk,recipe_fk) VALUES (.$id.,.$showid.); mysql_query($strSQL,$_SESSIONdb); } function removeRecommended($showid) { $strSQL UPDATE recipe SET recommended0 WHERE id.$showid; mysql_query($strSQL,$_SESSIONdb); } function addRecommended($showid) { $strSQL UPDATE recipe SET recommended1 WHERE id.$showid; mysql_query($strSQL,$_SESSIONdb); } function sendRecipe($Adresa,$id,$showid) { $recepty getRecId($showid); $recept mysql_fetch_object($recepty); $mail new Mail(); $mail->setCharset(windows-1250); $mail->addTo($Adresa); $mail->setFrom(Recepty z Kuchárkyjaroslav.resovsky@antechnet.sk>);// $mail->setSubject($recept->name); $mail->setSubject(Dostali ste recept z Kuchárky); $mail->addHTMLMessage(html>head>title>Recept .$recept->name./title>/head>body>); $mail->addHTMLMessage(h3>b>center>.$recept->name./center>/b>/h3>br>br>); if (!empty($recept->description)) { $mail->addHTMLMessage(h3>); $mail->addImg(images/popis.gif,gif,Popis); $mail->addHTMLMessage( Popis receptu/h3>p>.$recept->description./p>); } if (!empty($recept->ingr)) { $mail->addHTMLMessage(h3>); $mail->addImg(images/prisady.gif,gif,Prisady); $mail->addHTMLMessage( Potrebné prísady/h3>p>.$recept->ingr./p>); } if (!empty($recept->howto)) { $mail->addHTMLMessage(h3>); $mail->addImg(images/postup.gif,gif,Postup); $mail->addHTMLMessage( Postup/h3>p>.$recept->howto./p>); } if (!empty($recept->rtime)) { $mail->addImg(images/time.gif,gif,Čas prípravy); $mail->addHTMLMessage( Čas prípravy .$recept->rtime. minútbr>); } if (!empty($recept->narocnost)) { $mail->addImg(images/narocnost.gif,gif,Náročnosť); $mail->addHTMLMessage( Náročnosť: ); for ($i0;$i$recept->narocnost;$i++) { $mail->addImg(images/nar.gif,gif,Stupeň náročnosti); } $mail->addHTMLMessage(i>); switch ($recept->narocnost) { case 1:$mail->addHTMLMessage( Jednoduchý recept);break; case 2:$mail->addHTMLMessage( Stredne náročný recept);break; case 3:$mail->addHTMLMessage( Zložitý recept);break; } $mail->addHTMLMessage(/i>br>); } $printed false; if (!empty($recept->recommended)) { if ($recept->recommended 1) { $mail->addHTMLMessage(br>hr>); $printed true; $mail->addImg(images/star.gif,gif,Odporučený recept); $mail->addHTMLMessage( Tento recept je medzi odporučenými receptamibr>); } } if (isFavorite($_SESSIONlogged_id,$recept->id)) { if (!$printed) { $mail->addHTMLMessage(br>hr>); $printed true; } $mail->addImg(images/favorite.gif,gif,Môj obľúbený recept); $mail->addHTMLMessage( Tento recept je medzi mojimi obľúbenými receptami); } $mail->addHTMLMessage(/body>/html>); return $mail->send(); } function getAllComments($id) { $strSQL SELECT * FROM notes WHERE recipe_fk.$id. ORDER BY datum DESC; return mysql_query($strSQL,$_SESSIONdb); } function addComment($id,$showid,$Note) { $strSQL INSERT INTO notes (user_fk,recipe_fk,note) VALUES (.$id.,.$showid.,\.$Note.\);; mysql_query($strSQL,$_SESSIONdb); } function getVoteCas($id,$showid) { $strSQL SELECT vote FROM votes_c WHERE user_fk.$id. AND recipe_fk.$showid; $res mysql_query($strSQL,$_SESSIONdb); if (mysql_numrows($res) > 0) { $d mysql_fetch_object($res); return $d->vote; } else return 0; } function getVoteNarocnost($id,$showid) { $strSQL SELECT vote FROM votes_n WHERE user_fk.$id. AND recipe_fk.$showid; $res mysql_query($strSQL,$_SESSIONdb); if (mysql_numrows($res) > 0) { $d mysql_fetch_object($res); return $d->vote; } else return 0; } function getVoteChut($id,$showid) { $strSQL SELECT vote FROM votes_t WHERE user_fk.$id. AND recipe_fk.$showid; $res mysql_query($strSQL,$_SESSIONdb); if (mysql_numrows($res) > 0) { $d mysql_fetch_object($res); return $d->vote; } else return 0; } function removeVoteI($id,$showid) { $strSQL DELETE FROM votes_c WHERE user_fk.$id. AND recipe_fk.$showid; mysql_query($strSQL,$_SESSIONdb); } function addVoteI($id,$showid,$vote) { $strSQL INSERT INTO votes_c(user_fk,recipe_fk,vote) VALUES (.$id.,.$showid.,.$vote.); mysql_query($strSQL,$_SESSIONdb); } function removeVoteN($id,$showid) { $strSQL DELETE FROM votes_n WHERE user_fk.$id. AND recipe_fk.$showid; mysql_query($strSQL,$_SESSIONdb); } function addVoteN($id,$showid,$vote) { $strSQL INSERT INTO votes_n(user_fk,recipe_fk,vote) VALUES (.$id.,.$showid.,.$vote.); mysql_query($strSQL,$_SESSIONdb); } function removeVoteC($id,$showid) { $strSQL DELETE FROM votes_t WHERE user_fk.$id. AND recipe_fk.$showid; mysql_query($strSQL,$_SESSIONdb); } function addVoteC($id,$showid,$vote) { $strSQL INSERT INTO votes_t(user_fk,recipe_fk,vote) VALUES (.$id.,.$showid.,.$vote.); mysql_query($strSQL,$_SESSIONdb); } function getAverageI($showid) { $strSQL SELECT * FROM votes_c WHERE recipe_fk.$showid; $res mysql_query($strSQL,$_SESSIONdb); $hlasy hlasy; $pocet 0; $suma 0; if (mysql_numrows($res) > 0) { while ($hlasy) { $hlasy mysql_fetch_object($res); if ($hlasy) { $pocet++; $suma+$hlasy->vote; } } $moznasuma 10 * $pocet; $perc ($suma / $moznasuma)*100; return $perc; } else return 0; } function getAverageN($showid) { $strSQL SELECT * FROM votes_n WHERE recipe_fk.$showid; $res mysql_query($strSQL,$_SESSIONdb); $hlasy hlasy; $pocet 0; $suma 0; if (mysql_numrows($res) > 0) { while ($hlasy) { $hlasy mysql_fetch_object($res); if ($hlasy) { $pocet++; $suma+$hlasy->vote; } } $moznasuma 10 * $pocet; $perc ($suma / $moznasuma)*100; return $perc; } else return 0; } function getAverageC($showid) { $strSQL SELECT * FROM votes_t WHERE recipe_fk.$showid; $res mysql_query($strSQL,$_SESSIONdb); $hlasy hlasy; $pocet 0; $suma 0; if (mysql_numrows($res) > 0) { while ($hlasy) { $hlasy mysql_fetch_object($res); if ($hlasy) { $pocet++; $suma+$hlasy->vote; } } $moznasuma 10 * $pocet; $perc ($suma / $moznasuma)*100; return $perc; } else return 0; } function changeUserLogin($id,$txtLogUS) { $strSQL SELECT * FROM user WHERE login\.$txtLogUS.\ AND id ! .$id.;; $res mysql_query($strSQL,$_SESSIONdb); if (mysql_numrows($res)>0) return false; $strSQL UPDATE user SET login\.$txtLogUS.\ WHERE id.$id; mysql_query($strSQL,$_SESSIONdb); return true; } function changeUserName($id,$txtMenUS) { $strSQL UPDATE user SET name\.$txtMenUS.\ WHERE id.$id; mysql_query($strSQL,$_SESSIONdb); } function changeUserEmail($id,$txtEmaUS) { $strSQL UPDATE user SET email\.$txtEmaUS.\ WHERE id.$id; mysql_query($strSQL,$_SESSIONdb); } function changeUserPassword($id,$txtPwdUS) { $strSQL UPDATE user SET pwd\.md5($txtPwdUS).\ WHERE id.$id; mysql_query($strSQL,$_SESSIONdb); } function changeUserRecEmails($id,$txtRecMails) { if ($txtRecMails on) { $val 1; } else $val 0; $strSQL UPDATE user SET rec_mails\.$val.\ WHERE id.$id; mysql_query($strSQL,$_SESSIONdb); } function changeUserNewEmails($id,$txtNewMails) { if ($txtNewMails on) { $val 1; } else $val 0; $strSQL UPDATE user SET new_recipes\.$val.\ WHERE id.$id; mysql_query($strSQL,$_SESSIONdb); } function getRecommendedRecipes($book) { $strSQL SELECT * FROM recipe WHERE book_fk.$book. AND recommended1 .$_SESSIONsort; return mysql_query($strSQL,$_SESSIONdb); } function getAllRecommendedRecipes($id) { $strSQL SELECT * FROM recipe WHERE recommended1 AND book_fk IN (SELECT DISTINCT books.id FROM books,user_book WHERE books.owner_fk.$id. OR (user_book.user_fk.$id. AND user_book.book_fkbooks.id)) .$_SESSIONsort; return mysql_query($strSQL,$_SESSIONdb); } function getFavoriteRecipes($id,$book) { $strSQL SELECT * FROM recipe WHERE recipe.id IN (SELECT DISTINCT recipe_fk FROM favorites WHERE user_fk.$id. AND book_fk.$book.) .$_SESSIONsort; return mysql_query($strSQL,$_SESSIONdb); } function getAllFavoriteRecipes($id) { $strSQL SELECT * FROM recipe WHERE recipe.id IN (SELECT DISTINCT recipe_fk FROM favorites WHERE user_fk.$id. AND book_fk IN (SELECT DISTINCT books.id FROM books,user_book WHERE books.owner_fk.$id. OR (user_book.user_fk.$id. AND user_book.book_fkbooks.id)) ) .$_SESSIONsort; return mysql_query($strSQL,$_SESSIONdb); } function saveHodnotenie($id,$val) { $strSQL UPDATE recipe SET hodnotenie.$val. WHERE id.$id; mysql_query($strSQL, $_SESSIONdb); } ?>!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>html xmlnshttp://www.w3.org/1999/xhtml>head>title>Kuchárka 1.0 ©Jerry 2008/title>meta namekeywords content />meta namedescription content />link hrefdefault.css relstylesheet typetext/css />/head>body>? if (!empty($_POSTtxtLogin)&&!empty($_POSTtxtPassword)) { if (validateUser($_POSTtxtLogin,$_POSTtxtPassword)) { $_SESSIONlogged true; } else $_SESSIONlogged false; } $_SESSIONselectedMenu uvod; $INCLUDE_SCRIPT welcome.php; if (isset($_GETac)) { switch ($_GETac) { case br: $INCLUDE_SCRIPTbrowse.php; $_SESSIONselectedMenu recepty; break; case vk: $INCLUDE_SCRIPTkk.php; $_SESSIONselectedMenu knihy; break; case kt: $INCLUDE_SCRIPTkt.php; $_SESSIONselectedMenu kategorie; break; case us: $INCLUDE_SCRIPTus.php; $_SESSIONselectedMenu nastavenia; break; case lo: unset($_SESSIONlogged); unset($_SESSIONlogged_id); $_SESSIONselectedMenu logout; echo(script typetext/javascript>document.location.href\?xrel\/script>); break; case wl: $INCLUDE_SCRIPTwelcome.php; $_SESSIONselectedMenu uvod; break; } } if (!$_SESSIONlogged) { $INCLUDE_SCRIPTlogin.php; } define(INCLUDE_SCRIPT,$INCLUDE_SCRIPT);?>div idheader> h1>a href>Kuchárka 1.0/a>/h1> h2>a href>©Jerry 2008 /a>/h2>/div>div idcontent>?include(menu.php);?>br />!-- table width100%>colgroup>col width24% />col width1% />col width75% />/colgroup>tr>td valigntop> h2>Menu/h2> ul> li>a href?acwl>Úvod/a>/li> li>a href?acvk>Kuchárske knihy/a>/li> li>a href?acbr>Recepty/a>/li> li>a href?ackt>Kategórie/a>/li> li>a href?acus>Moje nastavenia/a>/li> br />br /> /ul>br />img classban srcimages/default.gif altHome> /td> td> /td> td valigntop>--> div idcolOne> ? include(INCLUDE_SCRIPT); ?> /div>!-- /td>/tr>/table>--> div styleclear: both;> /div>/div>div idfooter> p>©a hrefmailto:jerrysnv@post.sk?SubjectKucharka%201.0%20Feedback>Jerry/a> 2008, Template credits to: Copyright © 2006 Pomodoro. Designed by a hrefhttp://freecsstemplates.org target_blank>strong>Free CSS Templates/strong>/a>/p>/div>/body>/html>
Port 443
HTTP/1.1 200 OKDate: Sat, 17 Aug 2024 08:16:43 GMTServer: Apache/2.4.25 (Debian)Expires: Thu, 19 Nov 1981 08:52:00 GMTCache-Control: no-store, no-cache, must-revalidatePragma: no-cacheSet-Cookie: PHPSESSIDe2ccif0ef2ccqgbva1te6dhno1; path/Vary: Accept-EncodingTransfer-Encoding: chunkedContent-Type: text/html;charsetwindows-1250 ?class Mail { //possible values: html, plain var $type html; var $to; var $from; var $charset; var $cc; var $bcc; var $subject; var $plainMessage; var $htmlMessage; var $attachments; var $boundary; var $bnext; var $bend; var $headers; function Mail($type html) { $this->type $type; $this->to array(); $this->cc array(); $this->bcc array(); $this->attachements array(); $this->boundary md5(uniqid(time())); $this->bnext --.$this->boundary.\n; $this->bend --.$this->boundary.--.\n; } function setType($type html) { $this->type $type; } function getType() { return $this->type; } function addTo($address, $name) { if (!empty($name)) { $add .$name. .$address.>; if (!in_array($add,$this->to)) $this->to $add; } else { if (!in_array($address,$this->to)) $this->to $address; } } function setTo($to) { $this->to $to; } function getTo() { return $this->to; } function setFrom($address, $name ) { if (!empty($name)) { $this->from .$name. .$address.>; } else $this->from $address; } function getFrom() { return $this->from; } function setCharset($charset) { $this->charset $charset; } function getCharset() { return $this->charset; } function addCc($address, $name) { if (!empty($name)) { $add .$name. .$address.>; if (!in_array($add,$this->cc)) $this->cc $add; } else { if (!in_array($address,$this->cc)) $this->cc $address; } } function setCc($cc) { $this->cc $cc; } function getCc() { return $this->cc; } function addBcc($address, $name ) { if (!empty($name)) { $add .$name. .$address.>; if (!in_array($add,$this->bcc)) $this->bcc $add; } else { if (!in_array($address,$this->bcc)) $this->bcc $address; } } function setBcc($bcc) { $this->bcc bcc; } function getBcc() { return $this->bcc; } function setSubject($subject) { $this->subject $subject; } function getSubject() { return $this->subject; } function setMessage($message) { $this->plainMessage $message; } function getMessage() { return $this->plainMessage; } function addHTMLMessage($message) { $this->htmlMessage.$message; } function getHTMLMessage() { return $this->htmlMessage; } function fileAdd($filename) { $filedata implode(file($filename), ); return chunk_split(base64_encode($filedata)); } function addImg($filename, $typegif,$alt) { $this->headers.$this->bnext; switch ($type) { case gif:$tp image/gif; break; case jpg:$tp image/jpeg; break; case png:$tp image/png; break; case bmp:$tp image/bmp; break; } //$this->headers . Content-Type: $tp; name\$filename\\n; $this->headers . Content-Type: application/zip; name\$filename\\n; $this->headers . Content-Transfer-Encoding: base64\n; $cid md5(uniqid(time())); $this->headers . Content-ID: $cid>\n; $this->headers . Content-Disposition: inline; filename\$filename\\n\n; $this->headers . $this->fileAdd($filename); $this->htmlMessage . img alt.$alt. srccid:.$cid.>; } function attach($filename) { $this->headers.$this->bnext; $this->headers.Content-Type: application/zip; name:\$filename\\n; $this->headers.Content-Transfer-Encoding: base64\n; $this->headers.Content-Disposition: attachment; filename\$filename\\n\n; $this->headers.$this->fileAdd($filename); } function preHeaders() { if ($this->type html) {/* $this->headers Reply-To: jaroslav.resovsky@gmail.com\n Return-Path: Jaroslav Resovsky jaroslav.resovsky@gmail.com>\n Message-ID: .time().-.$this->from.>\n X-Mailer: PHP v.phpversion().\n .$this->headers;*/ $this->headers Content-Type: multipart/mixed; boundary\$this->boundary\\n.$this->headers; $this->headers MIME-Version: 1.0\n.$this->headers; } if (!empty($this->bcc)) $this->headers Bcc: .implode(,,$this->bcc).\n.$this->headers; if (!empty($this->cc)) $this->headers Cc: .implode(,,$this->cc).\n.$this->headers; $this->headers From: .$this->from.\n. Message-ID: .time().-recepty@kucharka.antechnet.sk>\n. X-Mailer: PHP v5.2.0\n .$this->headers; } function send() { $this->preHeaders(); echo(textarea rows10 cols80>.$this->headers./textarea>); if ($this->type plain) { return mail(implode(,,$this->to),$this->subject,$this->plainMessage,$this->headers); } elseif ($this->type html) { $headers Content-Type: text/html; if ($this->charset) { $headers.; charset.$this->charset.\n; } else { $headers.\n; } $headers . Content-Transfer-Encoding: 7bit\n; $headers . Content-Disposition: inline\n\n; $this->htmlMessage $this->bnext.$headers.$this->htmlMessage.\n.$this->bend; $this->headers.$this->htmlMessage; ini_set(sendmail_from, recepty@kucharka.antechnet.sk); $x mail(implode(,,$this->to),$this->subject,,$this->headers); return $x; } else return false; }}?>?function html2text($string){// $string ereg_replace(a href^>*>, , $string);// $string ereg_replace(/a>, , $string); $string ereg_replace((^)(*_/)(^>), \\1\\2\\3, $string);// $string ereg_replace(b>, *, $string); // $string ereg_replace(/b>, *, $string);// $string ereg_replace(u>, _, $string);// $string ereg_replace(/u>, _, $string);// $string ereg_replace(i>, /, $string);// $string ereg_replace(/i>, /, $string); $string ereg_replace(br>, , $string); $string ereg_replace(br />, , $string);// $string ereg_replace(p>, , $string);// $string ereg_replace(/p>, , $string); return $string;}function text2html($string){ $domain ((a-zA-Z0-9-)+\.)+(a-zA-Z0-9)+; $path ^\t \r\n>+^\t \r\n,.:;\\)>!; $substitutes array( /*array( in > \\\\(.), out > \\1, contains > 0 ),*/ /*array( in > ((a-zA-Z0-9_.-)+@$domain), out > a href\mailto:\\1\>\\1/a>, contains > 0 ),*/ /*array( in > ((http|ftp|https|gopher|news|telnet|wais)://$domain(:0-9*)?/?($path)?), out > a target\_blank\ href\\\1\>\\1/a>, contains > 0 ),*//* array( in > \*(^**^*\)\*, out > b>\\1/b>, contains > 1 ), array( in > _(^_*^_\)_, out > u>\\1/u>, contains > 1 ), array( in > /(^/*^/\)/, out > i>\\1/i>, contains > 1 )*/ ); while (strlen($string)) { $changed false; reset($substitutes); while (list(, $subst) each($substitutes)) { if (ereg(^ . $substin, $string, $match)) { $string substr($string, strlen($match0)); $done ereg_replace(^ . $substin, $substout, $match0); if ($substcontains) { $done text2html($done); } $string2 . $done; $changed true; break; } } if (!$changed) { $string2 . $string0; $string substr($string, 1); } } $string2 nl2br($string2); return $string2;}?>? $_SESSIONdb mysql_connect(localhost,resovsky,6rparthx);// $_SESSIONdb mysql_connect(localhost,root,il64752); mysql_select_db(kucharka,$_SESSIONdb); mysql_query(SET NAMES cp1250); function addRecipe($txtName,$txtDesc,$txtIngr,$txtHowto,$txtRtime,$book,$narocnost,$rec) { if ($rec on) { $recom 1; } else $recom 0; $strSQL INSERT INTO recipe(name,description,ingr,howto,rtime,user_fk,book_fk,narocnost,recommended) VALUES (\.$txtName.\,\.$txtDesc.\, \.$txtIngr.\,\.$txtHowto.\,\.$txtRtime.\,\.$_SESSIONlogged_id.\, \.$book.\,\.$narocnost.\,\.$recom.\);; mysql_query($strSQL,$_SESSIONdb); } function alterRecipe($id,$txtName,$txtDesc,$txtIngr,$txtHowto,$txtRtime,$book,$narocnost,$rec) { if ($rec on) { $recom 1; } else $recom 0; $strSQL UPDATE kucharka.recipe SET name\.$txtName.\, description\.$txtDesc.\, ingr\.$txtIngr.\,howto\.$txtHowto.\,rtime\.$txtRtime.\, user_fk\.$_SESSIONlogged_id.\,book_fk\.$book.\,narocnost\.$narocnost.\,recommended\.$recom.\ WHERE id.$id; mysql_query($strSQL,$_SESSIONdb); } function removeAttribs($id) { $strSQL DELETE FROM attr_recipe WHERE recipe_fk.$id; mysql_query($strSQL,$_SESSIONdb); } function getLastId() { $strSQL SELECT id FROM recipe ORDER BY id DESC LIMIT 1; $res mysql_query($strSQL, $_SESSIONdb); $data mysql_fetch_object($res); $lid $data->id; return $lid; } function addAttribs($polia,$id) { foreach ($polia as $pole) { $strSQL INSERT INTO attr_recipe(recipe_fk,attribute_fk) values (.$id.,.$pole.);; mysql_query($strSQL,$_SESSIONdb); } } function getAllAttributes() { $strSQL SELECT * FROM attribute ORDER BY id; $res mysql_query($strSQL,$_SESSIONdb); $result array(); $datadata; while ($data) { $data mysql_fetch_object($res); if ($data) { $result$data->id $data->name; } } return $result; } function getAllRecipes($bookid) { $strSQL SELECT * FROM recipe WHERE book_fk.$bookid. .$_SESSIONsort; $res mysql_query($strSQL,$_SESSIONdb); return $res; } function getAllRecipesInBooks($id) { $strSQL SELECT * FROM recipe WHERE book_fk IN (SELECT DISTINCT books.id FROM books,user_book WHERE books.owner_fk.$id. OR (user_book.user_fk.$id. AND user_book.book_fkbooks.id)) OR book_fk0 .$_SESSIONsort; return mysql_query($strSQL,$_SESSIONdb); } function getRecId($id) { $strSQL SELECT * FROM recipe WHERE id.$id; return mysql_query($strSQL,$_SESSIONdb); } function getRecAttr($id) { $strSQL SELECT DISTINCT * FROM attr_recipe WHERE recipe_fk.$id; return mysql_query($strSQL,$_SESSIONdb); } function getAttrName($id) { $strSQL SELECT name FROM attribute WHERE id.$id; $res mysql_query($strSQL,$_SESSIONdb); $data mysql_fetch_object($res); return $data->name; } function validateUser($Login,$Password) { $strSQL SELECT id,pwd,defbook FROM user WHERE login\.$Login.\; $res mysql_query($strSQL,$_SESSIONdb); $data mysql_fetch_object($res); if (md5($Password) $data->pwd) { $_SESSIONlogged_id $data->id; $_SESSIONdefbook $data->defbook; $_SESSIONcurrentbook $data->defbook; return true; } else { return false; } } function setDefaultBook($id) { $strSQL UPDATE user SET defbook.$id. WHERE id.$_SESSIONlogged_id; mysql_query($strSQL,$_SESSIONdb); $_SESSIONdefbook $id; } function getAllBooks($id) { $strSQL SELECT DISTINCT books.id,books.name,books.description,books.owner_fk FROM books,user_book WHERE books.owner_fk.$id. OR (user_book.user_fk.$id. AND user_book.book_fkbooks.id) ORDER BY books.name COLLATE cp1250_general_ci; return mysql_query($strSQL,$_SESSIONdb); } function getUser($id) { $strSQL SELECT name FROM user WHERE id.$id; $res mysql_query($strSQL,$_SESSIONdb); $data mysql_fetch_object($res); return $data->name; } function getUsr($id) { $strSQL SELECT * FROM user WHERE id.$id; $res mysql_query($strSQL,$_SESSIONdb); $data mysql_fetch_object($res); return $data; } function getBook($id) { $strSQL SELECT * from books WHERE id.$id; $res mysql_query($strSQL, $_SESSIONdb); return mysql_fetch_object($res); } function getBookName($id) { $data getBook($id); return $data->name; } function alterBook($Nazov,$Popis,$id) { $strSQL UPDATE books SET name\.$Nazov.\, description\.$Popis.\ WHERE id.$id; mysql_query($strSQL,$_SESSIONdb); } function addBook($Nazov,$Popis) { $strSQL INSERT INTO books(name,description,owner_fk) VALUES(\.$Nazov.\,\.$Popis.\,.$_SESSIONlogged_id.); mysql_query($strSQL,$_SESSIONdb); } function getAllCategory() { $strSQL SELECT * FROM attribute ORDER BY name; return mysql_query($strSQL,$_SESSIONdb); } function getCat($id) { $strSQL SELECT * from attribute WHERE id.$id; $res mysql_query($strSQL, $_SESSIONdb); return mysql_fetch_object($res); } function alterCat($Nazov,$id) { $strSQL UPDATE attribute SET name\.$Nazov.\ WHERE id.$id; mysql_query($strSQL,$_SESSIONdb); } function addCat($Nazov) { $strSQL INSERT INTO attribute(name) VALUES (\.$Nazov.\); mysql_query($strSQL,$_SESSIONdb); } function getAllUsers() { $strSQL SELECT * FROM user ORDER BY name; $res mysql_query($strSQL,$_SESSIONdb); return $res; } function checkOwnership($id,$setid) { $strSQL SELECT owner_fk FROM books WHERE id.$setid; $res mysql_query($strSQL,$_SESSIONdb); $data mysql_fetch_object($res); if ($data->owner_fk $id) { return true; } else return false; } function checkRights($id,$setid) { $strSQL SELECT user_fk FROM user_book WHERE book_fk.$setid; $res mysql_query($strSQL, $_SESSIONdb); if (mysql_numrows($res)0) return false; $data data; while ($data) { $data mysql_fetch_object($res); if ($data) { if ($data->user_fk $id) return true; } } return false; } function grant($usrid,$bookid) { $strSQL INSERT INTO user_book (user_fk,book_fk) VALUES (.$usrid.,.$bookid.); mysql_query($strSQL,$_SESSIONdb); } function revoke($usrid,$bookid) { $strSQL DELETE FROM user_book WHERE user_fk.$usrid. AND book_fk.$bookid; mysql_query($strSQL,$_SESSIONdb); } function isFavorite($id,$did) { $strSQL SELECT * FROM favorites WHERE user_fk.$id. AND recipe_fk.$did; $res mysql_query($strSQL,$_SESSIONdb); if (mysql_numrows($res) > 0) { return true; } else return false; } function removeFavorite($showid,$id) { $strSQL DELETE FROM favorites WHERE user_fk.$id. AND recipe_fk.$showid; mysql_query($strSQL,$_SESSIONdb); } function addFavorite($showid,$id) { $strSQL INSERT INTO favorites (user_fk,recipe_fk) VALUES (.$id.,.$showid.); mysql_query($strSQL,$_SESSIONdb); } function removeRecommended($showid) { $strSQL UPDATE recipe SET recommended0 WHERE id.$showid; mysql_query($strSQL,$_SESSIONdb); } function addRecommended($showid) { $strSQL UPDATE recipe SET recommended1 WHERE id.$showid; mysql_query($strSQL,$_SESSIONdb); } function sendRecipe($Adresa,$id,$showid) { $recepty getRecId($showid); $recept mysql_fetch_object($recepty); $mail new Mail(); $mail->setCharset(windows-1250); $mail->addTo($Adresa); $mail->setFrom(Recepty z Kuchárkyjaroslav.resovsky@antechnet.sk>);// $mail->setSubject($recept->name); $mail->setSubject(Dostali ste recept z Kuchárky); $mail->addHTMLMessage(html>head>title>Recept .$recept->name./title>/head>body>); $mail->addHTMLMessage(h3>b>center>.$recept->name./center>/b>/h3>br>br>); if (!empty($recept->description)) { $mail->addHTMLMessage(h3>); $mail->addImg(images/popis.gif,gif,Popis); $mail->addHTMLMessage( Popis receptu/h3>p>.$recept->description./p>); } if (!empty($recept->ingr)) { $mail->addHTMLMessage(h3>); $mail->addImg(images/prisady.gif,gif,Prisady); $mail->addHTMLMessage( Potrebné prísady/h3>p>.$recept->ingr./p>); } if (!empty($recept->howto)) { $mail->addHTMLMessage(h3>); $mail->addImg(images/postup.gif,gif,Postup); $mail->addHTMLMessage( Postup/h3>p>.$recept->howto./p>); } if (!empty($recept->rtime)) { $mail->addImg(images/time.gif,gif,Čas prípravy); $mail->addHTMLMessage( Čas prípravy .$recept->rtime. minútbr>); } if (!empty($recept->narocnost)) { $mail->addImg(images/narocnost.gif,gif,Náročnosť); $mail->addHTMLMessage( Náročnosť: ); for ($i0;$i$recept->narocnost;$i++) { $mail->addImg(images/nar.gif,gif,Stupeň náročnosti); } $mail->addHTMLMessage(i>); switch ($recept->narocnost) { case 1:$mail->addHTMLMessage( Jednoduchý recept);break; case 2:$mail->addHTMLMessage( Stredne náročný recept);break; case 3:$mail->addHTMLMessage( Zložitý recept);break; } $mail->addHTMLMessage(/i>br>); } $printed false; if (!empty($recept->recommended)) { if ($recept->recommended 1) { $mail->addHTMLMessage(br>hr>); $printed true; $mail->addImg(images/star.gif,gif,Odporučený recept); $mail->addHTMLMessage( Tento recept je medzi odporučenými receptamibr>); } } if (isFavorite($_SESSIONlogged_id,$recept->id)) { if (!$printed) { $mail->addHTMLMessage(br>hr>); $printed true; } $mail->addImg(images/favorite.gif,gif,Môj obľúbený recept); $mail->addHTMLMessage( Tento recept je medzi mojimi obľúbenými receptami); } $mail->addHTMLMessage(/body>/html>); return $mail->send(); } function getAllComments($id) { $strSQL SELECT * FROM notes WHERE recipe_fk.$id. ORDER BY datum DESC; return mysql_query($strSQL,$_SESSIONdb); } function addComment($id,$showid,$Note) { $strSQL INSERT INTO notes (user_fk,recipe_fk,note) VALUES (.$id.,.$showid.,\.$Note.\);; mysql_query($strSQL,$_SESSIONdb); } function getVoteCas($id,$showid) { $strSQL SELECT vote FROM votes_c WHERE user_fk.$id. AND recipe_fk.$showid; $res mysql_query($strSQL,$_SESSIONdb); if (mysql_numrows($res) > 0) { $d mysql_fetch_object($res); return $d->vote; } else return 0; } function getVoteNarocnost($id,$showid) { $strSQL SELECT vote FROM votes_n WHERE user_fk.$id. AND recipe_fk.$showid; $res mysql_query($strSQL,$_SESSIONdb); if (mysql_numrows($res) > 0) { $d mysql_fetch_object($res); return $d->vote; } else return 0; } function getVoteChut($id,$showid) { $strSQL SELECT vote FROM votes_t WHERE user_fk.$id. AND recipe_fk.$showid; $res mysql_query($strSQL,$_SESSIONdb); if (mysql_numrows($res) > 0) { $d mysql_fetch_object($res); return $d->vote; } else return 0; } function removeVoteI($id,$showid) { $strSQL DELETE FROM votes_c WHERE user_fk.$id. AND recipe_fk.$showid; mysql_query($strSQL,$_SESSIONdb); } function addVoteI($id,$showid,$vote) { $strSQL INSERT INTO votes_c(user_fk,recipe_fk,vote) VALUES (.$id.,.$showid.,.$vote.); mysql_query($strSQL,$_SESSIONdb); } function removeVoteN($id,$showid) { $strSQL DELETE FROM votes_n WHERE user_fk.$id. AND recipe_fk.$showid; mysql_query($strSQL,$_SESSIONdb); } function addVoteN($id,$showid,$vote) { $strSQL INSERT INTO votes_n(user_fk,recipe_fk,vote) VALUES (.$id.,.$showid.,.$vote.); mysql_query($strSQL,$_SESSIONdb); } function removeVoteC($id,$showid) { $strSQL DELETE FROM votes_t WHERE user_fk.$id. AND recipe_fk.$showid; mysql_query($strSQL,$_SESSIONdb); } function addVoteC($id,$showid,$vote) { $strSQL INSERT INTO votes_t(user_fk,recipe_fk,vote) VALUES (.$id.,.$showid.,.$vote.); mysql_query($strSQL,$_SESSIONdb); } function getAverageI($showid) { $strSQL SELECT * FROM votes_c WHERE recipe_fk.$showid; $res mysql_query($strSQL,$_SESSIONdb); $hlasy hlasy; $pocet 0; $suma 0; if (mysql_numrows($res) > 0) { while ($hlasy) { $hlasy mysql_fetch_object($res); if ($hlasy) { $pocet++; $suma+$hlasy->vote; } } $moznasuma 10 * $pocet; $perc ($suma / $moznasuma)*100; return $perc; } else return 0; } function getAverageN($showid) { $strSQL SELECT * FROM votes_n WHERE recipe_fk.$showid; $res mysql_query($strSQL,$_SESSIONdb); $hlasy hlasy; $pocet 0; $suma 0; if (mysql_numrows($res) > 0) { while ($hlasy) { $hlasy mysql_fetch_object($res); if ($hlasy) { $pocet++; $suma+$hlasy->vote; } } $moznasuma 10 * $pocet; $perc ($suma / $moznasuma)*100; return $perc; } else return 0; } function getAverageC($showid) { $strSQL SELECT * FROM votes_t WHERE recipe_fk.$showid; $res mysql_query($strSQL,$_SESSIONdb); $hlasy hlasy; $pocet 0; $suma 0; if (mysql_numrows($res) > 0) { while ($hlasy) { $hlasy mysql_fetch_object($res); if ($hlasy) { $pocet++; $suma+$hlasy->vote; } } $moznasuma 10 * $pocet; $perc ($suma / $moznasuma)*100; return $perc; } else return 0; } function changeUserLogin($id,$txtLogUS) { $strSQL SELECT * FROM user WHERE login\.$txtLogUS.\ AND id ! .$id.;; $res mysql_query($strSQL,$_SESSIONdb); if (mysql_numrows($res)>0) return false; $strSQL UPDATE user SET login\.$txtLogUS.\ WHERE id.$id; mysql_query($strSQL,$_SESSIONdb); return true; } function changeUserName($id,$txtMenUS) { $strSQL UPDATE user SET name\.$txtMenUS.\ WHERE id.$id; mysql_query($strSQL,$_SESSIONdb); } function changeUserEmail($id,$txtEmaUS) { $strSQL UPDATE user SET email\.$txtEmaUS.\ WHERE id.$id; mysql_query($strSQL,$_SESSIONdb); } function changeUserPassword($id,$txtPwdUS) { $strSQL UPDATE user SET pwd\.md5($txtPwdUS).\ WHERE id.$id; mysql_query($strSQL,$_SESSIONdb); } function changeUserRecEmails($id,$txtRecMails) { if ($txtRecMails on) { $val 1; } else $val 0; $strSQL UPDATE user SET rec_mails\.$val.\ WHERE id.$id; mysql_query($strSQL,$_SESSIONdb); } function changeUserNewEmails($id,$txtNewMails) { if ($txtNewMails on) { $val 1; } else $val 0; $strSQL UPDATE user SET new_recipes\.$val.\ WHERE id.$id; mysql_query($strSQL,$_SESSIONdb); } function getRecommendedRecipes($book) { $strSQL SELECT * FROM recipe WHERE book_fk.$book. AND recommended1 .$_SESSIONsort; return mysql_query($strSQL,$_SESSIONdb); } function getAllRecommendedRecipes($id) { $strSQL SELECT * FROM recipe WHERE recommended1 AND book_fk IN (SELECT DISTINCT books.id FROM books,user_book WHERE books.owner_fk.$id. OR (user_book.user_fk.$id. AND user_book.book_fkbooks.id)) .$_SESSIONsort; return mysql_query($strSQL,$_SESSIONdb); } function getFavoriteRecipes($id,$book) { $strSQL SELECT * FROM recipe WHERE recipe.id IN (SELECT DISTINCT recipe_fk FROM favorites WHERE user_fk.$id. AND book_fk.$book.) .$_SESSIONsort; return mysql_query($strSQL,$_SESSIONdb); } function getAllFavoriteRecipes($id) { $strSQL SELECT * FROM recipe WHERE recipe.id IN (SELECT DISTINCT recipe_fk FROM favorites WHERE user_fk.$id. AND book_fk IN (SELECT DISTINCT books.id FROM books,user_book WHERE books.owner_fk.$id. OR (user_book.user_fk.$id. AND user_book.book_fkbooks.id)) ) .$_SESSIONsort; return mysql_query($strSQL,$_SESSIONdb); } function saveHodnotenie($id,$val) { $strSQL UPDATE recipe SET hodnotenie.$val. WHERE id.$id; mysql_query($strSQL, $_SESSIONdb); } ?>!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>html xmlnshttp://www.w3.org/1999/xhtml>head>title>Kuchárka 1.0 ©Jerry 2008/title>meta namekeywords content />meta namedescription content />link hrefdefault.css relstylesheet typetext/css />/head>body>? if (!empty($_POSTtxtLogin)&&!empty($_POSTtxtPassword)) { if (validateUser($_POSTtxtLogin,$_POSTtxtPassword)) { $_SESSIONlogged true; } else $_SESSIONlogged false; } $_SESSIONselectedMenu uvod; $INCLUDE_SCRIPT welcome.php; if (isset($_GETac)) { switch ($_GETac) { case br: $INCLUDE_SCRIPTbrowse.php; $_SESSIONselectedMenu recepty; break; case vk: $INCLUDE_SCRIPTkk.php; $_SESSIONselectedMenu knihy; break; case kt: $INCLUDE_SCRIPTkt.php; $_SESSIONselectedMenu kategorie; break; case us: $INCLUDE_SCRIPTus.php; $_SESSIONselectedMenu nastavenia; break; case lo: unset($_SESSIONlogged); unset($_SESSIONlogged_id); $_SESSIONselectedMenu logout; echo(script typetext/javascript>document.location.href\?xrel\/script>); break; case wl: $INCLUDE_SCRIPTwelcome.php; $_SESSIONselectedMenu uvod; break; } } if (!$_SESSIONlogged) { $INCLUDE_SCRIPTlogin.php; } define(INCLUDE_SCRIPT,$INCLUDE_SCRIPT);?>div idheader> h1>a href>Kuchárka 1.0/a>/h1> h2>a href>©Jerry 2008 /a>/h2>/div>div idcontent>?include(menu.php);?>br />!-- table width100%>colgroup>col width24% />col width1% />col width75% />/colgroup>tr>td valigntop> h2>Menu/h2> ul> li>a href?acwl>Úvod/a>/li> li>a href?acvk>Kuchárske knihy/a>/li> li>a href?acbr>Recepty/a>/li> li>a href?ackt>Kategórie/a>/li> li>a href?acus>Moje nastavenia/a>/li> br />br /> /ul>br />img classban srcimages/default.gif altHome> /td> td> /td> td valigntop>--> div idcolOne> ? include(INCLUDE_SCRIPT); ?> /div>!-- /td>/tr>/table>--> div styleclear: both;> /div>/div>div idfooter> p>©a hrefmailto:jerrysnv@post.sk?SubjectKucharka%201.0%20Feedback>Jerry/a> 2008, Template credits to: Copyright © 2006 Pomodoro. Designed by a hrefhttp://freecsstemplates.org target_blank>strong>Free CSS Templates/strong>/a>/p>/div>/body>/html>
View on OTX
|
View on ThreatMiner
Please enable JavaScript to view the
comments powered by Disqus.
Data with thanks to
AlienVault OTX
,
VirusTotal
,
Malwr
and
others
. [
Sitemap
]