Jump to content

[SOLVED] HELP


Recommended Posts

Hey,

 

Do you know how I can make

 

<script type="text/javascript">

function ageprompt(){
agewindow=dhtmlmodal.open('agebox', 'div', 'modalalertdiv', 'Age Check', 'width=350px,height=150px,left=150px,top=100px,resize=0,scrolling=0')
}

//Function to run when buttons within modal window is clicked on. Directly embedded inside hidden DIV, bypassing "onclose" event:
function process_age(whichbutton){
if (whichbutton=="yes")
	alert("Thanks")
agewindow.hide()
}

</script>

<br/><p>
<ul>
<li>Add Yourself to this list</li></ul><ul>
<li><a href="#" onClick="ageprompt(); return false">Stuff here</a></li>
<li >Stuff Here</li>
<li>Stuff here</li>
<li>Stuff here</li>
<li>Stuff here</li>
<li>Stuff here</li>
<li>Stuff here</li>
<li>Stuff here</li>
<li>Stuff here</li>
<li>Stuff here</li>
<li>Stuff here</li>
<li>Stuff here</li>
<li>Stuff here</li>
<li>Stuff here</li>
<li>Stuff here</li>
<li>Stuff here</li>
</ul></p></div><div id="modalalertdiv" style="display:none;">

<div style="background: #F3F3F3; height: 100%; padding: 5px">
<b>more here</b>
<p>MOre stuff here</p>
<form id="agecheck">
<input type="button" value="Confirm" style="margin-right: 20px" onClick="process_age('yes')" /> <input id="denybutton" type="button" value="Deny" onClick="process_age('no')" />
</form>
</div>

 

Show Only When you are logged in? (Instead of some of the stuff underneath?)

 

<?
/**
* User has already logged in, so display relavent links, including
* a link to the admin center if the user is an administrator.
*/
if($session->logged_in){
   echo "<h2>Logged In</h2>";
   echo "Welcome <b>$session->username</b>, you are logged in. <br><br>"
       ."  "
       ."[<a href=\"useredit.php\">Edit Account</a>]   ";
   if($session->isAdmin()){
      echo "[<a href=\"admin/admin.php\">Admin Center</a>]   ";
   }
   echo "[<a href=\"process.php\">Logout</a>]";
}
else{
?>

<h2>Login</h2>
<?
/**
* User not logged in, display the login form.
* If user has already tried to login, but errors were
* found, display the total number of errors.
* If errors occurred, they will be displayed.
*/
if($form->num_errors > 0){
   echo "<font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font>";
}
?>
<form action="process.php" method="post">
<p>
Username:<br/><input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"/><? echo $form->error("user"); ?>
<br/>Password:<br/><input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"/><? echo $form->error("pass"); ?><br/>
<input type="checkbox" name="remember" <? if($form->value("remember") != ""){ echo "checked"; } ?>/>
Remember me next time     
<br/><input type="hidden" name="sublogin" value="1"/>
<input type="submit" value="Login"/><br/>
<br/><a href="forgotpass.php">Forgot Password?</a>
<br/>Not registered? <a href="register.php">Sign-Up!</a></p>
</form>

<?
}
?>

 

I'll be really happy if someone can answer my qestion :)

Link to comment
https://forums.phpfreaks.com/topic/61712-solved-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.