Staredit Network > Forums > Technology & Computers > Topic: Lookin for a PAssword Script
Lookin for a PAssword Script
Dec 19 2008, 9:10 pm
By: Riney  

Dec 19 2008, 9:10 pm Riney Post #1

Thigh high affectionado

SImply put, I want to write a code to allow a link to be displayed only if you're an admin on a forum, which will change an Iframe to a different shoutbox (For admins only).

Im aware of the security risks (I mean the link to the shoutbox is gonna be in the source) but Im doing this just for fun. Anybody mind helping? Heres my current work, also It needs to use the OnCLick property or something similar

Code
<TABLE BORDER="1" style="border: 1 solid #0415FB" ><TR style="border: 1 solid #0415FB" ><TD WIDTH="200" style="border: 1 solid #0415FB" ><MARQUEE bgcolor="BLACK" loop="-1" scrollamount="2" width="100%"><FONT COLOR="CYAN">Teh Shoutbox :D</FONT></MARQUEE><TD style="border: 1 solid #0415FB"  BGCOLOR="BLACK"><A HREF="http://40705.shoutbox.us/" TARGET="Shoutbox"><FONT COLOR="LIME">Normal Chat</FONT></A></TD><TD style="border: 1 solid #0415FB"  BGCOLOR="BLACK"><A HREF="http://tinyurl.com/leetcrewtrade" TARGET="Shoutbox"><FONT COLOR="PINK">Trade Chat</FONT></A></TD><TD style="border: 1 solid #0415FB"  BGCOLOR="BLACK"><A HREF="http://drift.ijji.com" TARGET="Shoutbox"><FONT COLOR="ORANGE">IJJI</FONT></A></TD>
</TR></TABLE>
<iframe name="Shoutbox" src="http://40705.shoutbox.us/" width="85%" height="200" frameborder="0" style="border: 1 solid #0415FB" allowTransparency="true"></iframe>


Post has been edited 4 time(s), last time on Dec 19 2008, 10:08 pm by Dark_Marine.



.riney on Discord.
Riney on Steam (Steam)
@RineyCat on Twitter

Sure I didn't pop off on SCBW like I wanted to, but I won VRChat. Map maker for life.

Dec 19 2008, 10:06 pm Devourer Post #2

Hello

The code you listed is kinda useless (for me)
I would to it like this:

create a table [mysql-table] and put there a column "admin-flags" standart->no make em to 1 whoever will be the admin
then check if you are the admin via if-script [seassions requires (recommented to make a login-script)

so... if ($_SESSION['admin-flags'] = yes) { LOLOL DISPLAY LINK! } else { LOLOL DON'T DISPLAY LINK }

hope that kinda helped you ;)



Please report errors in the Staredit.Network forum.

Dec 19 2008, 10:10 pm Riney Post #3

Thigh high affectionado

Just visit this http://tinyurl.com/LeetCrew and look at it, I need to figure out how to make a integrated onclick function make a box pop up where you can type in a password and itll change the IFrame if it is accepted, else it says "EFF YOU" and does nothing.



.riney on Discord.
Riney on Steam (Steam)
@RineyCat on Twitter

Sure I didn't pop off on SCBW like I wanted to, but I won VRChat. Map maker for life.

Dec 19 2008, 10:13 pm Devourer Post #4

Hello

Quote from name:Dark_Marine
Just visit this http://tinyurl.com/LeetCrew and look at it, I need to figure out how to make a integrated onclick function make a box pop up where you can type in a password and itll change the IFrame if it is accepted, else it says "EFF YOU" and does nothing.

so... you know what javascripts are?
I think you can make it via javascript... button onclick=admin()
etc. visit: http://www.w3schools.com to learn it ;)

EDIT: here is a script [i made by myself ages ago]
this sohuld be in the head section:


<script type="text/javascript">
function AdminFormular ()
{
if (document.Formular.Admin.value != "test") {
alert("Wrong Password");
document.Formular.Admin.focus();
return False; }
else { location.href = "1a2sadhi2hsdajsaodsajosadnoasd.php"; }
}


</script>



and this where the button should be:
<input type="password" size="20" name="Admin"> <input type="button" value="Login" onclick="AdminFormular()">


this just has an input field at the site... but there is a way to make a pop-up box with an input field, too

Post has been edited 1 time(s), last time on Dec 19 2008, 10:19 pm by DeVouReR.



Please report errors in the Staredit.Network forum.

Dec 19 2008, 10:41 pm Riney Post #5

Thigh high affectionado

Now what is the password for the login button?



.riney on Discord.
Riney on Steam (Steam)
@RineyCat on Twitter

Sure I didn't pop off on SCBW like I wanted to, but I won VRChat. Map maker for life.

Dec 19 2008, 10:48 pm Devourer Post #6

Hello

Quote from name:Dark_Marine
Now what is the password for the login button?

here is a (updated) code:

<html>
<head>
<script type="text/javascript">
function disp_prompt()
{
var password=prompt("Enter the Password","");
if (password!=PASSWORD)
{
alert("Wrong Password");
document.Formular.Admin.focus();
return False; }
else { location.href = "1a2sadhi2hsdajsaodsajosadnoasd.php"; }
}

</script>
</head>
<body>

<input type="button" onclick="disp_prompt()" value="Login as an admin lol" />

</body>
</html>


that should work...^^
the password here is "PASSWORD"

Post has been edited 1 time(s), last time on Dec 19 2008, 10:54 pm by DeVouReR.



Please report errors in the Staredit.Network forum.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:42 am]
RIVE -- Hellooooo, Nurse
[2026-6-03. : 4:19 pm]
NudeRaider -- Hello World!
[2026-6-01. : 4:03 pm]
IskatuMesk -- no Hello World? No Hello . jpeg? Not even ddosing some government website? smh my head
[2026-5-31. : 10:02 pm]
Symmetry -- I was really just figuring out how to compile
[2026-5-31. : 10:02 pm]
Symmetry -- I didn't make it do anything
[2026-5-31. : 9:17 pm]
Ultraviolet -- hell yeah. did you have trouble making the button functional, or just haven't gotten there yet?
[2026-5-31. : 8:29 pm]
Symmetry -- I made the marine shoot lasers and gave the medic a nonfunctional button
[2026-5-31. : 8:07 pm]
Ultraviolet -- Symmetry
Symmetry shouted: I did my first EUD thing today. Feels like me finding arsenal at age 8 again
haha for sure. in some ways it's even more exciting because you can play EUD maps on regular battle.net, don't need to convince someone to download your mod to play with you. what did you do?
[2026-5-31. : 6:47 pm]
Symmetry -- I did my first EUD thing today. Feels like me finding arsenal at age 8 again
[2026-5-31. : 3:20 pm]
l)ark_ssj9kevin -- le reddit
Please log in to shout.


Members Online: UndeadStar, NudeRaider