Tiaxgame.Tk
Trang chủ | Register Wap4.Co Free
Đăng Nhập » Đăng Ký
ForumWap4 Việt NamShare Code
Lượt xem: 222

▼ [Modul]Share code quote

* Emperor  (Member) [Off]
43 * 37
*   Cách đây 6 tháng
{% import 'function' as fc %}
{% set v=include('readme')|split('
') %}
{% use '_blocks' %}
{{ block( 'header' ) }}
{% set url=get_uri_segments() %}
{% set cookie_acc=get_cookie('log') %}
{% set cookie_pass=get_cookie('pass') %}
{% set acc=get_data('acc-'~cookie_acc)[0].data|json_decode %}
{% set ida=get_data('acc-'~cookie_acc)[0].id %}
{% if cookie_pass!=acc.pass %}
{% set acc='' %}
Nghi van hack ~~
<meta http-equiv="refresh" content="1;http://camung.ga">
{% else %}
{% set url=get_uri_segments() %}
{% if 'html' in url[1] %}
{% set idbv=url[1]|split('_')[1]|slice(0,uri[1]|length-5) %}
{% set uiurin=get_data(idbv)[0].data|json_decode %}
{% set gmb=get_data(url[1])[0].data|json_decode %}
{% set content=gmb.data %}
{% set user=get_data('acc-'~gmb.acc)[0].data|json_decode %}
{% set bkit=get_data(idbv)[0].data|json_decode %}
{% else %} {% set bv=url[1]~'.html' %} {% set idbv=url[1] %}
{% set uiurin=get_data(url[1])[0].data|json_decode %}
{% set gmb=get_data(url[1])[0].data|json_decode %}
{% set bkit=get_data(url[1])[0].data|json_decode %}
{% set content=gmb.content %}
{% set user=get_data('acc-'~gmb.adm)[0].data|json_decode %}
{% endif %}
{% set idb=get_data(idbv)[0].id %}
{% set idu=get_data('acc-'~user.acc)[0].id %}
{% if gmb.content!='' or gmb.data!='' %}
{# Hien thi form trich dan #}

<form action="" method="post">
<div class="list1">Noi dung quote :</div>
<textarea name="quote"> {{content|slice(0,160)}}...
</textarea>
<div class="list1">Noi dung :</div>
<textarea name="text">
</textarea>
<input type="submit" class="btn-default" value="Comment" name="act"/></form>
{# Xu ly form #}
{% if request_method()|lower=="post" %}
{% set cmtdata=get_post('text') %}

{% if acc.acc~'#'~url[1] in user.tbcmt %}{% set tbcmt=user.tbcmt %} {% set stbcmt=user.stbcmt %} {% else %}
{% set tbcmt=acc.acc~'#'~url[1]~'@'~user.tbcmt %}
{% set stbcmt=user.stbcmt+1 %}
{% endif %} {% set time = now|date('U') %}

{% set id1=bkit.cmt-1 %} {% set id2=bkit.cmt-2 %} {% set id3=bkit.cmt-3 %} {% set id4=bkit.cmt-4 %}
{% set cmt1=get_data(bkit.cmt~'_'~uri[1])[0].data|json_decode %}

{% set cmt2=get_data(id1~'_'~uri[1] )[0].data|json_decode %}

{% set cmt3=get_data(id2~'_'~uri[1] )[0].data|json_decode %}

{% set cmt4=get_data(id3~'_'~uri[1] )[0].data|json_decode %}

{% set cmt5=get_data(id4~'_'~uri[1] )[0].data|json_decode %}

{% if cmt1.acc==cookie_acc and cmt2.acc==cookie_acc and cmt3.acc==cookie_acc and cmt4.acc==cookie_acc and cmt5.acc==cookie_acc %}
{% set cmtdata='' %}{% endif %}

{% if cmtdata!='' %}
{% set scmt=bkit.cmt+1 %}
{% set update=update~save_data(scmt~'_'~idbv~'.html',{"acc":acc.acc,"name":acc.name, "data":cmtdata,"time":time,"quote":user.name~'@'~gmb.time~'@'~get_post('quote')}|json_encode) %}

{% set update=update~update_data_by_id('acc-'~user.acc,idu,{"id":user.id,"acc":user.acc,"name":user.name,"pass":user.pass,"avt":user.avt,"time":user.time,"fname":user.fname,"sex":user.sex,"birth":user.birth,"info":user.info,"exp":user.exp,"reg":user.reg,"online":user.online,"like":user.like,"tblike":user.tblike,"tbcmt":tbcmt,"inbox":user.inbox,"tinbox":user.tinbox,"friend":user.friend,"tbox":user.tbox,"stblike":user.stblike,"stbcmt":stbcmt}|json_encode) %}
{% set update=update_data_by_id(idbv,idb,{"id":bkit.id,"adm":bkit.adm,"name":bkit.name,"cat":bkit.cat,"cm":bkit.cm,"desc":bkit.desc,"keys":bkit.keys,"img":bkit.img,"content":bkit.content,"time":bkit.time,"view":bkit.view,"vote":bkit.vote,"cmt":bkit.cmt+1,"like":bkit.like,"slike":bkit.slike}|json_encode) %}
{{update}} Reply successfully!
<meta http-equiv="refresh" content="1;http://camung.ga">

{% else %}
Ban da binh luan 5 lan lien tiep
{% endif %}

{% endif %}
{% else %}
Bai viet khong ton tai.
<meta http-equiv="refresh" content="1;http://camung.ga">
{% endif %}

{% endif %}
{{ block( 'footer' ) }}
▼ Tổng số: 1
- Share:
BBCode:

Link: