{"id":259,"date":"2008-06-14T03:29:49","date_gmt":"2008-06-14T00:29:49","guid":{"rendered":"http:\/\/www.youreka.gr\/?page_id=259"},"modified":"2017-08-22T00:21:10","modified_gmt":"2017-08-21T21:21:10","slug":"%cf%80%ce%af%ce%bd%ce%b1%ce%ba%ce%b1%cf%82-%ce%bb%cf%8d%cf%83%ce%b5%cf%89%ce%bd-%cf%87%cf%81%ce%ae%cf%83%cf%84%ce%b7","status":"publish","type":"page","link":"https:\/\/youreka.myaddr.io\/?page_id=259","title":{"rendered":"\u0394\u03b7\u03bc\u03cc\u03c3\u03b9\u03bf \u03a0\u03c1\u03bf\u03c6\u03af\u03bb \u03a7\u03c1\u03ae\u03c3\u03c4\u03b7"},"content":{"rendered":"<p><?php\nif (isset($_GET[\"UID\"]))\n{\n  $UserID = $_GET[\"UID\"];\n  \n  require \"\/home\/youreka\/public_html\/yadmin\/solman_config.php\";\n  require \"\/home\/youreka\/public_html\/yadmin\/solman_backend.php\";\n  \n  $sqlconnection = @mysql_connect($sqlhost, $sqluser, $sqlpass) or die(\"Error connecting to database\");\n  mysql_set_charset('utf8',$sqlconnection);\n  mysql_select_db($sqldb, $sqlconnection);\n  \n  $query = \"SELECT UserName, WebSite, Date FROM solman_users WHERE ID=\" . $UserID;\n  $results = mysql_query($query, $sqlconnection);\n  $countres = mysql_num_rows($results);\n  \n  if ($countres < 1)\n  {\n    echo \"\u0393\u03b9\u03b1 \u03c4\u03b7\u03bd \u03c0\u03b1\u03c1\u03bf\u03c5\u03c3\u03af\u03b1\u03c3\u03b7 \u03c4\u03bf\u03c5 \u03b4\u03b7\u03bc\u03cc\u03c3\u03b9\u03bf\u03c5 \u03c0\u03c1\u03bf\u03c6\u03af\u03bb \u03b5\u03bd\u03cc\u03c2 \u03c7\u03c1\u03ae\u03c3\u03c4\u03b7 \u03b1\u03c5\u03c4\u03ae \u03b7 \u03c3\u03b5\u03bb\u03af\u03b4\u03b1 \u03c0\u03c1\u03ad\u03c0\u03b5\u03b9 \u03bd\u03b1 \u03ba\u03bb\u03b7\u03b8\u03b5\u03af \u03bc\u03b1\u03b6\u03af \u03bc\u03b5 \u03ad\u03bd\u03b1 <b>\u03ad\u03b3\u03ba\u03c5\u03c1\u03bf<\/b> ID \u03c7\u03c1\u03ae\u03c3\u03c4\u03b7.&#8221;;<br \/>\n  }<br \/>\n  else if ($countres > 1)<br \/>\n  {<br \/>\n    echo &#8220;\u03a5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9 \u03c3\u03b7\u03bc\u03b1\u03bd\u03c4\u03b9\u03ba\u03cc \u03c0\u03c1\u03cc\u03b2\u03bb\u03b7\u03bc\u03b1 \u03c3\u03c4\u03b7\u03bd \u03b2\u03ac\u03c3\u03b7 \u03bb\u03cd\u03c3\u03b5\u03c9\u03bd \u03cc\u03c3\u03bf\u03bd \u03b1\u03c6\u03bf\u03c1\u03ac \u03c4\u03bf\u03bd \u03c3\u03c5\u03b3\u03ba\u03b5\u03ba\u03c1\u03b9\u03bc\u03ad\u03bd\u03bf \u03c7\u03c1\u03ae\u03c3\u03c4\u03b7. \u03a0\u03b1\u03c1\u03b1\u03ba\u03b1\u03bb\u03ce \u03b1\u03bd\u03b1\u03c6\u03ad\u03c1\u03b5\u03c4\u03b5 <b>\u0391\u039c\u0395\u03a3\u0391<\/b> \u03c4\u03bf \u03c0\u03c1\u03cc\u03b2\u03bb\u03b7\u03bc\u03b1 \u03c3\u03c4\u03bf\u03c5\u03c2 \u03b4\u03b9\u03b1\u03c7\u03b5\u03b9\u03c1\u03b9\u03c3\u03c4\u03ad\u03c2.&#8221;;<br \/>\n  }<br \/>\n  else<br \/>\n  {<br \/>\n    $UserName = mysql_result($results, 0, &#8220;UserName&#8221;);<br \/>\n    $WebSite = mysql_result($results, 0, &#8220;WebSite&#8221;);<br \/>\n    $WebSite = &#8216;<a href=\"' . $WebSite . '\" target=\"_blank\">&#8216; . $WebSite . &#8216;<\/a>&#8216;;<br \/>\n    $Date = date(&#8220;j-M-y&#8221;, mysql_result($results, 0, &#8220;Date&#8221;) + $servertimeoffset * 3600);<\/p>\n<p>    $query = &#8220;SELECT PID, Date FROM solman_solutions_queue WHERE UID=&#8221; . $UserID . &#8221; AND State = 1 ORDER BY Date DESC&#8221;;<br \/>\n    $PuzzlesHeSolved = mysql_query($query, $sqlconnection);<br \/>\n    $resquant = mysql_num_rows($PuzzlesHeSolved);<br \/>\n\t   $Score = 0;<br \/>\n      for ($i = 0; $i < $resquant; $i++)\n      {\n        $PuzID = mysql_result($PuzzlesHeSolved, $i, \"PID\");\n        $query = \"SELECT UID, Date FROM solman_solutions_queue WHERE PID=\" . $PuzID . \" AND State = 1 ORDER BY Date ASC\";\n\t\t      $isHeTheFirst = mysql_query($query, $sqlconnection);\n\t\tif (mysql_result($isHeTheFirst, 0, \"UID\") == $UserID)\n        {\n          $DateSolved = mysql_result($PuzzlesHeSolved, $i, \"Date\") + $servertimeoffset * 3600;\n          $query = \"SELECT post_title, post_date FROM wp_posts WHERE ID=\" . $PuzID;\n          $results = mysql_query($query, $sqlconnection);\n          $PuzTitle = mysql_result($results, 0, \"post_title\");\n          $PuzTitle = '<a href=\"\/?p=' . $PuzID . '\">&#8216; . $PuzTitle . &#8216;<\/a>&#8216;;<br \/>\n          $DatePosted = strtotime(mysql_result($results, 0, &#8220;post_date&#8221;));<br \/>\n          $Interval = intval(($DateSolved &#8211; $DatePosted) \/ 86400);<br \/>\n          $DateSolvedArray[] = $DateSolved;<br \/>\n          $PuzTitleArray[] = $PuzTitle;<br \/>\n          $IntervalArray[] = $Interval;<br \/>\n\t\t        $Score++;<br \/>\n        }<br \/>\n      }<br \/>\n     $query = &#8216;SELECT Points FROM solman_users WHERE ID=&#8217; . $UserID;<br \/>\n    \t$results = mysql_query($query, $sqlconnection);<br \/>\n\t    $Points = (mysql_result($results, 0, &#8220;Points&#8221;)) \/ 100;<br \/>\n?><br \/>\n<br \/><\/br><\/p>\n<table bgcolor=\"#bbbbbb\" border=\"0\" width=\"98%\" cellspacing=\"1\" cellpadding=\"1\">\n<tr valign=\"center\" bgcolor=\"<?php echo $tcolorb ?>&#8220;><\/p>\n<td width=\"170\" bgcolor=\"#cccccc\"><font face=\"arial\" size=\"2\"><b>\u03a8\u03b5\u03c5\u03b4\u03ce\u03bd\u03c5\u03bc\u03bf<\/b><\/font><\/td>\n<td bgcolor=\"#f1f1f1\"><font face=\"arial\" size=\"2\"><?php echo $UserName ?><\/font><\/td>\n<\/tr>\n<tr valign=\"center\" bgcolor=\"<?php echo $tcolorb ?>&#8220;><\/p>\n<td bgcolor=\"#cccccc\"><font face=\"arial\" size=\"2\"><b>WebSite<\/b><\/font><\/td>\n<td bgcolor=\"#f1f1f1\"><font face=\"arial\" size=\"2\"><?php echo $WebSite ?><\/font><\/td>\n<\/tr>\n<tr valign=\"center\" bgcolor=\"<?php echo $tcolorb ?>&#8220;><\/p>\n<td bgcolor=\"#cccccc\"><font face=\"arial\" size=\"2\"><b>\u0395\u03b3\u03b3\u03c1\u03b1\u03c6\u03ae<\/b><\/font><\/td>\n<td bgcolor=\"#f1f1f1\"><font face=\"arial\" size=\"2\"><?php echo $Date ?><\/font><\/td>\n<\/tr>\n<tr valign=\"center\" bgcolor=\"<?php echo $tcolorb ?>&#8220;><\/p>\n<td bgcolor=\"#cccccc\"><font face=\"arial\" size=\"2\"><b>\u03a0\u03bb\u03ae\u03b8\u03bf\u03c2 \u03bb\u03c5\u03bc\u03ad\u03bd\u03c9\u03bd \u03b3\u03c1\u03af\u03c6\u03c9\u03bd<\/b><\/font><\/td>\n<td bgcolor=\"#f1f1f1\"><font face=\"arial\" size=\"2\"><?php echo $Score ?><\/font><\/td>\n<\/tr>\n<tr valign=\"center\" bgcolor=\"<?php echo $tcolorb ?>&#8220;><\/p>\n<td bgcolor=\"#cccccc\"><font face=\"arial\" size=\"2\"><b>\u03a3\u03ba\u03bf\u03c1<\/b><\/font><\/td>\n<td bgcolor=\"#f1f1f1\"><font face=\"arial\" size=\"2\"><?php echo $Points ?><\/font><\/td>\n<\/tr>\n<\/table>\n<p><\/br><br \/>\n<?php \n    if ($Score < 1)\n    {\n      echo \"\u039f \u03c7\u03c1\u03ae\u03c3\u03c4\u03b7\u03c2 \u03b4\u03b5\u03bd \u03ad\u03c7\u03b5\u03b9 \u03bb\u03cd\u03c3\u03b5\u03b9 \u03b1\u03ba\u03cc\u03bc\u03b1 \u03ba\u03b1\u03bd\u03ad\u03bd\u03b1 \u03b3\u03c1\u03af\u03c6\u03bf\";\n    }\n    else\n    {  \n?><\/p>\n<h2 class=\"posttitle\">\u039b\u03c5\u03bc\u03ad\u03bd\u03bf\u03b9 \u0393\u03c1\u03af\u03c6\u03bf\u03b9<\/h2>\n<p><\/br><\/p>\n<table bgcolor=\"#bbbbbb\" border=\"0\" width=\"98%\" cellspacing=\"1\" cellpadding=\"1\">\n<tr valign=\"center\" bgcolor=\"#cccccc\">\n<td width=\"25\"><font face=\"arial\" size=\"2\"><b>#<\/b><\/font><\/td>\n<td><font face=\"arial\" size=\"2\"><b>\u03a4\u03af\u03c4\u03bb\u03bf\u03c2<\/b><\/font><\/td>\n<td width=\"250\"><font face=\"arial\" size=\"2\"><b>\u0397\u03bc\u03b5\u03c1\u03bf\u03bc\u03b7\u03bd\u03af\u03b1 \u03bb\u03cd\u03c3\u03b7\u03c2<\/b><\/font><\/td>\n<td width=\"100\"><font face=\"arial\" size=\"2\"><b>\u0391\u03be\u03af\u03b1 \u03bb\u03cd\u03c3\u03b7\u03c2<\/b><\/font><\/td>\n<\/tr>\n<p><?php\n      $aa = $Score;\n      for ($i = 0; $i < $Score; $i++)\n      {\n        if ($IntervalArray[$i] == 0)\n        {\n          $IntervalString = \" (\u03a4\u03b7\u03bd \u03c0\u03c1\u03ce\u03c4\u03b7 \u03ba\u03b9\u03cc\u03bb\u03b1\u03c2 \u03bc\u03ad\u03c1\u03b1 \u03b4\u03b7\u03bc\u03bf\u03c3\u03af\u03b5\u03c5\u03c3\u03b7\u03c2 \u03c4\u03bf\u03c5 \u03b3\u03c1\u03af\u03c6\u03bf\u03c5)\";\n        }\n        elseif ($IntervalArray[$i] == 1)\n        {\n          $IntervalString = \" (\u039c\u03b9\u03b1 \u03bc\u03ad\u03c1\u03b1 \u03bc\u03b5\u03c4\u03ac \u03c4\u03b7\u03bd \u03b4\u03b7\u03bc\u03bf\u03c3\u03af\u03b5\u03c5\u03c3\u03b7 \u03c4\u03bf\u03c5 \u03b3\u03c1\u03af\u03c6\u03bf\u03c5)\";\n        }\n        else\n        {\n          $IntervalString = \" (\" . $IntervalArray[$i] . \" \u03bc\u03ad\u03c1\u03b5\u03c2 \u03bc\u03b5\u03c4\u03ac \u03c4\u03b7\u03bd \u03b4\u03b7\u03bc\u03bf\u03c3\u03af\u03b5\u03c5\u03c3\u03b7 \u03c4\u03bf\u03c5 \u03b3\u03c1\u03af\u03c6\u03bf\u03c5)\";\n        }\n        echo '\n\n<tr valign=\"center\" bgcolor=\"#f1f1f1\">\n<td><font face=\"arial\" size=\"2\">&#8216; . $aa . &#8216;<\/font><\/td>\n<td><font face=\"arial\" size=\"2\">&#8216; . $PuzTitleArray[$i] . &#8216;<\/font><\/td>\n<td>\n                  <font face=\"arial\" size=\"1\">&#8216; . date(&#8220;j-M-y&#8221;, $DateSolvedArray[$i]) . &#8216;<br \/>&#8216; . $IntervalString . &#8216;<\/font>\n                <\/td>\n<td><font face=\"arial\" size=\"2\">&#8216; . ((intval(sqrt($IntervalArray[$i] + 1) * 100)) \/ 100) . &#8216;<\/td>\n<\/tr>\n<p>&#8216;;<br \/>\n        $aa = $aa &#8211; 1;<br \/>\n      }<br \/>\n?><br \/>\n<\/table>\n<p><?php\n    }    \n  }  \n}\nelse\n{\n  echo \"\u0393\u03b9\u03b1 \u03c4\u03b7\u03bd \u03c0\u03b1\u03c1\u03bf\u03c5\u03c3\u03af\u03b1\u03c3\u03b7 \u03c4\u03bf\u03c5 \u03b4\u03b7\u03bc\u03cc\u03c3\u03b9\u03bf\u03c5 \u03c0\u03c1\u03bf\u03c6\u03af\u03bb \u03b5\u03bd\u03cc\u03c2 \u03c7\u03c1\u03ae\u03c3\u03c4\u03b7 \u03b1\u03c5\u03c4\u03ae \u03b7 \u03c3\u03b5\u03bb\u03af\u03b4\u03b1 \u03c0\u03c1\u03ad\u03c0\u03b5\u03b9 \u03bd\u03b1 \u03ba\u03bb\u03b7\u03b8\u03b5\u03af \u03bc\u03b1\u03b6\u03af \u03bc\u03b5 \u03c4\u03bf ID \u03c4\u03bf\u03c5 \u03c3\u03c5\u03b3\u03ba\u03b5\u03ba\u03c1\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5 \u03c7\u03c1\u03ae\u03c3\u03c4\u03b7.\";\n}\n?><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;> \u03a8\u03b5\u03c5\u03b4\u03ce\u03bd\u03c5\u03bc\u03bf<\/p>\n","protected":false},"author":5,"featured_media":0,"parent":15,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-259","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/youreka.myaddr.io\/index.php?rest_route=\/wp\/v2\/pages\/259","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/youreka.myaddr.io\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/youreka.myaddr.io\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/youreka.myaddr.io\/index.php?rest_route=\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/youreka.myaddr.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=259"}],"version-history":[{"count":16,"href":"https:\/\/youreka.myaddr.io\/index.php?rest_route=\/wp\/v2\/pages\/259\/revisions"}],"predecessor-version":[{"id":595,"href":"https:\/\/youreka.myaddr.io\/index.php?rest_route=\/wp\/v2\/pages\/259\/revisions\/595"}],"up":[{"embeddable":true,"href":"https:\/\/youreka.myaddr.io\/index.php?rest_route=\/wp\/v2\/pages\/15"}],"wp:attachment":[{"href":"https:\/\/youreka.myaddr.io\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}