Alguns Scripts Muito Uteis para vcs ai...
Esse código bloqueia IPs, e é bem fácil de usar.
Para isso, copie o seguinte código e o cole entre as tags HEAD e /HEAD.
Código:
<script type="text/javascript">
// Block IP address script- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// This notice must stay intact for use.
//Enter list of banned ips, each separated with a comma:
var bannedips=["23.23.23.23", "11.11.11.11"]
var ip = '<!--#echo var="REMOTE_ADDR"-->'
var handleips=bannedips.join("|")
handleips=new RegExp(handleips, "i")
if (ip.search(handleips)!=-1){
alert("Seu IP foi banido deste site! Redirecionando...")
window.location.replace("http://www.google.com")
}
</script>
Depois encontre a seguinte linha:
var bannedips=["23.23.23.23", "11.11.11.11"]
E substitua pelo(s) IP(s) que você deseja bloquear. Se quiser adicionar mais IPs, é só separá-los por vírgulas.
Bloqueando Botão Direito no site:
Código:
<script language="JavaScript">
<!--
var message="Desculpe, você não pode usar o botão direito do mouse neste site";
function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// -->
</script>
Mensagem ao abrir o site:
Código:
<?php
echo "<script>alert('Sua mensagem aqui !');</script>";
?>
Add Video no site:
Código:
<embed
style="width:400px; height:326px;"
id="VideoPlayback"
type="application/x-shockwave-flash"
src="http://linkdovideo.wmv">
</embed>
Codigo para redirecionar:
Código:
<META HTTP-EQUIV="REFRESH" CONTENT="segundos;
URL=site onde sera redirecionado">
Abrir uma pop up ao abrir uma pagina:
Código:
<html>
<head>
<title></title>
<script languague="javascript">
function popup(){
window.open('nomedapagina.html','popup','width=200,height=100,scrolling=auto,top=0,left=0')
}
</script>
</head>
<body onload=popup()>
</body>
</html>
Mostrar tempo de vip que ainda resta na conta(colocar este script na pagina principal do painel do usuario vip)
Código:
<?
$tempo_query=mssql_query("Select creditos from memb_info where memb___id='$login' and memb__pwd='$senha'");
$tempo=mssql_fetch_row($tempo_query);
?>
<? echo "Seu Vip acaba em $tempo[0] dia(s)"; ?>
Iframe, abrir uma pagina dentro da msm pagina:
Código:
<iframe src="http://seusite.php" width="970" marginwidth="0" height="875" marginheight="0" scrolling="No" frameborder="0"></iframe>
Mudar a Cor da barra de rolagem:
Código:
<STYLE type="text/css">
<!--
BODY {
scrollbar-face-color:#FF80C0;
scrollbar-highlight-color:#FFC4E1;
scrollbar-3dlight-color:#FFECF5;
scrollbar-darkshadow-color:#FFFFFF;
scrollbar-shadow-color:#FFCAE4;
scrollbar-arrow-color:#FFFFFF;
scrollbar-track-color:#FFECF5;
}
-->
</STYLE>
Ali tu ponha as cores q quizer PS: eh pelo coodigo das cores axo q vcs sabem oq eh isso neh ^^'
Você pode ter todsa as noticias que quiser em apenas 1 linha no seu site, ela vai mudando e ao clicar nela vc vai para o site da noticia:
Código:
<meta http-equiv=refresh content=600;URL=index.php>
<script language="JavaScript" type="text/javascript"><!--
var news = new Array(
[ "aqui noticia" , "aqui link" ] ,
[ "aqui noticia2" , "aqui link2" ] ,
[ "aqui noticia3" , "aqui link3" ] ,
[ "aqui noticia4" , "aqui link4" ] ,
[ "aqui noticia5" , "aqui link5" ] ,
[]
);
var ticker_layer = false;
var step_time = 25;
var freeze_time = 2000;
var news_index = 0;
var title_index = 0;
var end_title = "_";
var title_max_size = 50;
for (var i=0;i<news.length-1;i++){
t=news[0].replace(/\"/gi,'"');
if (t.length>title_max_size){
t = t.substring( 0 , title_max_size );
t=t.substring(0,t.lastIndexOf(' '));
t+='...';
}
news[i][0]=t;
}
function begin_roll_ticker(){
window.setTimeout( "roll_ticker()" , step_time );
}
function roll_ticker(){
var title;
if ( title_index == 0 ){
while ( document.getElementById('ticker').lastChild != null ){
child = document.getElementById('ticker').lastChild;
document.getElementById('ticker').removeChild( child );
}
}
if ( news.length > news_index + 1 && news[news_index][0].length >= title_index ){
title = news[ news_index ];
document.getElementById('ticker_anchor').setAttribute( "href" , title[1] );
s_text = title[0].substring( title_index , title_index + 1 );
title_index++;
if ( document.getElementById('ticker').lastChild != null ){
if ( document.getElementById('ticker').lastChild.nodeValue == "_" ){
child = document.getElementById('ticker').lastChild;
document.getElementById('ticker').removeChild( child );
}
}
txt = document.createTextNode( s_text );
document.getElementById('ticker').appendChild( txt );
if ( title[0].length > title_index ) {
if ( title_index % 10 != 0 ){
txt = document.createTextNode( "_" );
document.getElementById('ticker').appendChild( txt );
}
}
window.setTimeout( "roll_ticker()" , step_time );
}
else{
news.length == news_index + 2 ? news_index = 0 : news_index++;
title_index = 0;
window.setTimeout( "roll_ticker()" , freeze_time );
}
}
//--></script>
</head>
<style>
A:LINK {color : #009999;}
A:VISITED {color : #009999;}
A:ACTIVE {color : gray;}
A:HOVER {color : gray;}
A {text-decoration: none}
V {text-decoration: none}
</style>
<body onLoad="begin_roll_ticker()" link="#ffcc66" vlink="#ffcc66" alink="#ffcc66">
<font face="Verdana" color="#ffcc66" size="2"><b>
<a href="#" id="ticker_anchor" target="_top" name="ticker_anchor">
<div style="position: absolute; width: 355px; height: 25px; z-index: 3; left:73px; top:19px" id="ticker">
</div>
</a></b></font>
<table border="0" width="450" id="table1" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td bgcolor="#FFFFFF"> </td>
</tr>
</table>
Taew, espero ter ajudado!
Tenho esses spcripts a algum tempo, nao lembro de onde peguei, No Caso...
Credito: By leo Piovezan
===================
edit by chris05: CRÉDITOS ERRADOS - Se você pegou em algum lugar e não lembra onde e de quem são os créditos, eles então não são seus...