window.location = "/login.html"; '; echo ''; return; } else { } */ if(isset($_GET["url"])) $url = strtolower($_GET["url"]); else { $lang = substr($lang, 0, 2); if($lang == 'it' || $lang == 'es' || $lang == 'pt' || $lang == 'fr' || $lang == 'de' || $lang == 'zh' || $lang == 'ja' || $lang == 'ru' || $lang == 'ar' || $lang == 'ko') header("Location: /$lang/login.html"); else header( "Location: /login.html" ); //redirect } $externalAccess = "games"; } $db_table = "application"; $stmt = $dbh->prepare("SELECT IdApp, type, langType, prod, url, score, impression, title, descr, link, foto, width, height, zoom, marginTop, marginLeft, widthContainer, heightContainer FROM $db_name.$db_table WHERE $db_table.url = :url"); $stmt->bindParam(':url', $url, PDO::PARAM_STR); $stmSuccess = $stmt->execute(); if($stmSuccess == false) { $arr = $stmt->errorInfo(); $logger->error(__FILE__, __LINE__, $arr[2]); } if($stmt->rowCount() != 0) { $row = $stmt->fetch(); $IdApp = $row["IdApp"]; $impression = $row["impression"] + 1; //Aggiorno il numero di impression $stmtUpdate = $dbh->prepare("UPDATE $db_name.$db_table SET impression = :impression WHERE IdApp= :IdApp"); $stmtUpdate->bindParam(':impression', $impression, PDO::PARAM_INT); $stmtUpdate->bindParam(':IdApp', $IdApp, PDO::PARAM_INT); $stmSuccess = $stmtUpdate->execute(); if($stmSuccess == false) { $arr = $stmtUpdate->errorInfo(); $logger->error(__FILE__, __LINE__, $arr[2]); } //FINE + Aggiorno il numero di impression $description = ""; $description = str_replace("\n"," ",$row["descr"]); $description = str_replace("\"","'",$description); //verifico se esiste Description e faccio la substring $pos = -1; $pos = strrpos($description, "Description:"); if($pos != null && $pos != -1) $description = substr($description, $pos + 13); //END + verifico se esiste Description e faccio la substring $description = substr($description, 0, 500); ?> <?php echo ucfirst(str_replace("-"," ",$url)); ?> - <?php echo $webSiteName; ?> " /> ?> ?>
" type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' wmode='transparent' width="100%" height="100%" SCALE="default">


" class="contact "> */ ?>



$order = array("\r\n", "\n", "\r"); $replace = "\n "; // Processes \r\n's first so they aren't converted twice. $descr = str_replace($order, $replace, $descr); //replace \n with
$arrayDescr = preg_split('/ /', $descr, -1); //-1 no limit /* if(count($arrayDescr) > 1) { echo $arrayDescr[0]; echo $arrayDescr[1]; } */ $length = 40; mb_internal_encoding("utf-8"); for($j = 0; $j < count($arrayDescr); $j++) { if(mb_strlen($arrayDescr[$j]) > $length) { while (mb_strlen($arrayDescr[$j]) > 0) { if(mb_strlen($arrayDescr[$j]) > $length) { $txt = mb_substr($arrayDescr[$j], 0, $length); $arrayDescr[$j] = mb_substr($arrayDescr[$j], $length, mb_strlen($arrayDescr[$j])); } else { $txt = $arrayDescr[$j]; $arrayDescr[$j] = ""; } /* else { txt = document.createTextNode(arrayDescr[j]); arrayDescr[j] = ""; } */ //echo ""; echo str_to_html($txt) . " "; //echo ""; } } else { //echo ""; echo str_to_html($arrayDescr[$j]) . " "; //echo ""; } //if(arrayDescr[j].indexOf("\n") != -1) //vado a capo se l'ultimo carattere è "\n" //$(element).append($("
")); } ?>