Commit d99a8f8b authored by Dominik Hebeler's avatar Dominik Hebeler

Merge branch '66-es-werden-noch-keinerleid-logs-geschrieben' into 'master'

Resolve "Es werden noch keinerleid Logs geschrieben"

Closes #66

See merge request !77
parents 248ed39a 32c57481
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Redis;
class LogController extends Controller
{
function clicklog(Request $request)
{
$redis = Redis::connection('redisLogs');
if( $redis )
{
$logEntry = "";
$logEntry .= "[" . date(DATE_RFC822, mktime(date("H"),date("i"), date("s"), date("m"), date("d"), date("Y"))) . "]";
$logEntry .= " " . $request->input('i');
$logEntry .= " " . $request->input('s');
$logEntry .= " " . $request->input('q');
$logEntry .= " " . $request->input('p');
$logEntry .= " " . $request->input('url');
$redis->rpush('logs.clicks', $logEntry);
}
return '';
}
}
\ No newline at end of file
......@@ -98,6 +98,7 @@
Route::get('meta/meta.ger3', 'MetaGerSearch@search');
Route::get('meta/picture', 'Pictureproxy@get');
Route::get('clickstats', 'LogController@clicklog');
Route::get('qt', 'MetaGerSearch@quicktips');
Route::get('tips', 'MetaGerSearch@tips');
......
......@@ -61,9 +61,9 @@ function theme(){
}
function clickLog(){
$(".result .link a, .result .title a").off();
$(".result .link a, .result .title a").click(function(){
$.get("/meta/clickstats.pl", {i:$("meta[name=p]").attr("content"), s:$(this).attr("data-hoster"), q:$("meta[name=q]").attr("content"), p:$(this).attr("data-count"), url:$(this).attr("href")});
$(".result a.title, .result div.link-link a").off();
$(".result a.title, .result div.link-link a").click(function(){
$.get("/clickstats", {i:$("meta[name=p]").attr("content"), s:$(this).attr("data-hoster"), q:$("meta[name=q]").attr("content"), p:$(this).attr("data-count"), url:$(this).attr("href")});
});
}
......
......@@ -10,14 +10,14 @@
@endif
<div class="resultInformation col-xs-10 col-sm-10">
<p class="title">
<a class="title" href="{{ $result->link }}" target="{{ $metager->getTab() }}" data-hoster="{{ $result->gefVon }}" data-count="{{ $result->number }}">
<a class="title" href="{{ $result->link }}" target="{{ $metager->getTab() }}" data-hoster="{{ strip_tags($result->gefVon) }}" data-count="{{ $result->number }}">
{{ $result->titel }}
</a>
</p>
<div class="link">
<div>
<div class="link-link">
<a href="{{ $result->link }}" target="{{ $metager->getTab() }}" data-hoster="{{ $result->gefVon }}" data-count="{{ $result->number }}">
<a href="{{ $result->link }}" target="{{ $metager->getTab() }}" data-hoster="{{ strip_tags($result->gefVon) }}" data-count="{{ $result->number }}">
{{ $result->anzeigeLink }}
</a>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment