Parola la cos de gunoi!
Pagina 1 din 3 • Distribuiţi
Pagina 1 din 3 • 1, 2, 3
Parola la cos de gunoi!
Buna ziua,spunetimi va rog,cum sa pun la cosul de gunoi o parola,care sa nu poata fi ghicita si nici vizibila din inspecteaza sursa??
Re: Parola la cos de gunoi!
Up cineva?
Vizitator- Vizitator
Re: Parola la cos de gunoi!
Nu imi pare o solutie prea buna!
Re: Parola la cos de gunoi!
Nimeni?
Re: Parola la cos de gunoi!
Nu merge!Am adugat in descrierea forumului
Apoi in css
- Cod:
<div id="protect">
<input value="" maxlength="10" name="staffonly" type="password" /><input value="Go" name="onclick" type="submit" />
</div>
Apoi in css
- Cod:
span.info.succes {
margin-top: 2px;
color: #5CAD57;
padding-top: 2px;
position: relative;
top: 5px;
}
span.info.error {
margin-top: 2px;
color: #EF206C;
padding-top: 2px;
position: relative;
top: 5px;
}
- Cod:
var config = {members:[1, 2], url:"http://alfacraft.forumz.ro/f2-cos-de-gunoi", cat:"/f2-", passwd:"enter", error:"Typed incorrect password ! Try again.", succes:"Entered password is correct !"};
function passCheck() {
var a = config.parola;
if ($('input[type="password"][name="staffonly"]').val() == a) {
return $('input[type="password"][name="staffonly"]').val(""), $("#protect").append('<br /><span class="info succes">Corerct password <br /> ' + config.succes + "</span>"), setTimeout(function() {
window.location = "http://" + window.location.host + config.url;
}, 3E3), !0;
}
$("#protect").append('<br /><span class="info error">Corerct password <br /> ' + config.error + "</span>");
setTimeout(function() {
$(".info, br:eq(0)", $("#protect")).remove();
}, 1500);
$('input[type="password"][name="staffonly"]').val("");
return !1;
}
function onlyPass() {
if (!isNaN(_userdata.user_id) && "undefined" != typeof _userdata.user_id) {
for (i = 0;i < config.members.length;i++) {
if (config.members[i] == _userdata.user_id) {
return $("#protect").show(), console.log("Member id to show: " + _userdata.user_id), !1;
}
$("#protect").remove();
}
}
}
function protectPage() {
if (config.url == window.location.pathname || config.cat == window.location.pathname) {
for (i = 0;i < config.members.length;i++) {
if (config.members[i] == _userdata.user_id) {
return !1;
}
window.location = "http://" + window.location.host;
}
}
}
$(function() {
onlyPass();
protectPage();
$('input[name="onclick"]').on("click", function(a) {
var b = $('input[name="staffonly"]').val();
passCheck(b);
a.preventDefault();
});
});
Re: Parola la cos de gunoi!
Nu merge!Iata ce am pus:
Daca pun acest cod,celelate coduri javascript nu mai merg!
- Cod:
(function(j) {
"use strict";
("Copyright (c) 2015 MyScripts.ml, forum codes. All right reserved");
var i, b;
/* Setari pentru protejare */
var settings = {
users: [1], //
forums: ['http://alfacraft.forumz.ro/f2-cos-de-gunoi'],
parola: 'changeme'
};
window.set = settings;
function testUser(user_id) {
for(i = 0; i < set.users.length; i++) if(user_id == set.users[i]) return true;
};
function testCat(a) {
for(i = 0; i < set.forums.length; i++) {
b = set.forums[i]; a = b;
}
return a;
};
j(function($) {
if(typeof(_userdata) == "undefined") return;
var u = _userdata, c = document.getElementById('btn'), storage = window.localStorage;
if(u.session_logged_in == 1) {
storage.loggedCat = 0;
/* Verificare categorie, testate parametri */
if(/\/f(\d+)-/.test(window.location.pathname) && set.forums[0] == window.location.pathname && testUser(u.user_id) !== true) {window.location = "http://" + window.location.host; }
if(storage && set.forums[0] == window.location.pathname && storage.loggedCat == "0" && testUser(u.user_id) == true) {
var x = prompt('Pentru a vedea sau scrie in aceasta categorie trebuie sa te loghezi', '');
if(storage.loggedCat == "0" && testUser(u.user_id) == true) {
if(x == set.pddws) {
console.log('succes');
storage.loggedCat = 0;
} else {
window.location = "http://" + window.location.host;
}
} else {
window.location = "http://" + window.location.host;
}
}
} else {
if(storage && /\/f(\d+)-/.test(window.location.pathname) && set.forums[0] == window.location.pathname && testUser(u.user_id) !== true) {window.location = "http://" + window.location.host; }
}
var test = storage.loggedCat;
/* if(test) {
storage.storageSetup = JSON.stringify({"init": 0, "noShow": 0});
var getInstall = JSON.parse(storage.storageSetup);
if(!getInstall.init && !getInstall.noShow) {
alert("Codul sa creat cu succes, acum este functionabil 100%.\nMultumesc ca folosesti acest cod creat de mine !");
storage.storageSetup = JSON.stringify({"init": 1, "noShow": 1});
}
} */
});
}(jQuery));
Daca pun acest cod,celelate coduri javascript nu mai merg!
Re: Parola la cos de gunoi!
Nu trebuie sa adaugi și URL la forum, pui doar ce se afla după URL /f2-nume-forum
Re: Parola la cos de gunoi!
Nu merge,dar daca cineva intra in cosul de gunoi il teleporteaza la portal!
Pagina 1 din 3 • 1, 2, 3
Subiecte similare
» cos de gunoi
» din: Parola la cos de gunoi!
» Parola la cos de gunoi toti o afla!
» cos de gunoi
» cos de gunoi
» din: Parola la cos de gunoi!
» Parola la cos de gunoi toti o afla!
» cos de gunoi
» cos de gunoi
Pagina 1 din 3
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum