Jump to content

SamDOD

Members
  • Posts

    35
  • Joined

  • Last visited

    Never

Everything posted by SamDOD

  1. http://www.onlinepictureproof.com/angeladuncanphotography/albums I am wanting to find something that does this. Where i can display photos by folders and have them locked by a single password and display the word proof on each one automatically... Does anyone know of a script set out there like this site? Thank you or your time.
  2. All of this is great. the information given seems great. Is there a tutorial or an example of this that i can play with? I am not well versed in PHP or MySQL. have done work in both but not extensively. I mean i understand exactly what you are saying about how it should and can work just not exactly how to get it done just yet. I do appreciate all the help and information given. Thank you all.
  3. I definitely appreciated what you have posted. I wish it was as simple to me as it seem to be for you. The hard part seems to be in the fact that i dont want to start the time until they decide and/or are able to join a certain group. What i mean is when I add them to a members only group is when i want the time to start not when they join the forum. Though i don't know how to do that or do to what you have stated above either. will keep trying. Any help and/or resources would be extremely appreciated. Thank you.
  4. i dont suppose there are easy ways to make them work. I have never used one and i don't do allot of coding myself.
  5. I have access to my server. Can the cron job effect the PHPBB forum? as in change someone out of a group after a time?
  6. can the cron job run with PHPBB or does it need to be a separate site? Do you have or know where i can find example of how to do this?
  7. i want to login, me only. enter a user name their password and press activate. activate would set a timer for a year. a week before a year is up i want it to send an automated email to me and that person saying that their time is almost done. eventually i would like it to get the names from my database and further automate this. Am using PHPBB but it does not have a built in expiration for users in a group. Is any of this possible? Thank you for your time.
  8. thank you for all your help. I really appreciate it!
  9. Here is the login page. <?php session_start(); $_SESSION['logged'] = 0; $_SESSION['isadmin'] = 0; if (isset($_POST['submit'])) { //connect $connect = mysql_connect("localhost", "user", "pass") or die ("no DB connection"); //select DB mysql_select_db("database1"); //select data $select = "SELECT * FROM User " . "WHERE UserName = '" . $_POST['username'] . "'"; $results = mysql_query($select) or die(mysql_error()); while ($row = mysql_fetch_assoc($results)) { foreach ($row as $val1) { $jobarray[] = $val1; }} if ($_POST['username'] == $jobarray[1] && $_POST['password'] == $jobarray[2]) { $_SESSION['logged'] = 1; header ("Refresh: 5; URL=\"adminswitch.php");?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Administrative Login - MedPointSearch</title> <link href="medpoint.css" rel="stylesheet" type="text/css" /> </head> <body> <table width="400" border="0" cellpadding="5" class="callout" align = "center"> <tr> <td><table width="400" border="0" cellpadding="3" align = "center"> <tr> <th align="center"><div align="center"><img src="images/joblist_logo.png" width="404" height="68" /></div></th> </tr> <tr> <td><div align="left"><br /> <table align="center"><tr><td></td> <span class = "formcopy">You are being redirected to the administrative switchboard<br /> (If your browser doesn't support automatic redirection, <a href="adminswitch.php">click here</a>)</span></tr> <br /><br /> <tr></tr> <td> <?php if ($jobarray[3] == 1) { $_SESSION['isadmin'] = 1; } } else { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script> <!-- function setFocus() { document.login.username.focus(); } // --></script> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Administrative Login - MedPointSearch</title> <body onLoad="setFocus()"> <table width="400" border="0" cellpadding="5" class="callout" align = "center"> <tr> <td><table width="400" border="0" cellpadding="3" align = "center"> <tr> <th align="center"><div align="center"><img src="images/joblist_logo.png" width="404" height="68" /></div></th> </tr> <tr> <td><div align="left"><br /> <table align="center"> <tr> <th bgcolor="#FFFFFF"><span class = "formcopy">Invalid Username and/or Password.</span><br /> <br /></th> </tr><tr> <td bgcolor="#FFFFFF"><? if (isset($_GET['redirect'])) { $redirect = $_GET['redirect']; } else { $redirect = "index.php"; } ?><span class="formcopy"> <form action="login.php" method="post" name="login"> <input type="hidden" name="redirect" value="<?php echo $_GET['redirect']; ?>"> Username: <input type="text" name="username"><br><br> Password: <input type="password" name="password"><br><br> <input type="submit" name="submit" value="Login"> </form></span></td></tr> </table> <br><br> </p> <?php } } else { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script> <!-- function setFocus() { document.login.username.focus(); } // --></script> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Administrative Login - MedPointSearch</title> <link href="styles/typography.css" rel="stylesheet" type="text/css" /> <link href="styles/framework.css" rel="stylesheet" type="text/css" /> <body onLoad="setFocus()"> <table width="400" border="0" cellpadding="5" class="callout" align = "center"> <tr> <td><table width="400" border="0" cellpadding="3" align = "center"> <tr> <th align="center"><div align="center"><img src="images/joblist_logo.png" width="404" height="68" /></div></th> </tr> <tr> <td><div align="left"><br /> <table align="center"> <tr> <th bgcolor="#FFFFFF"><span class = "formcopy">You are not logged in.</span><br /> <br /></th> </tr><tr> <td bgcolor="#FFFFFF"><? if (isset($_GET['redirect'])) { $redirect = $_GET['redirect']; } else { $redirect = "index.php"; } ?><span class="formcopy"> <form action="login.php" method="post" name="login"> <input type="hidden" name="redirect" value="<?php echo $_GET['redirect']; ?>"> Username: <input type="text" name="username"><br><br> Password: <input type="password" name="password"><br><br> <input type="submit" name="submit" value="Login"> </form></span></td></tr> </table> <br><br> </p> <?php } ?> </body> </html>
  10. I am sort of new to MySQL and PHP... i know how to do certain things and understand others. How would i know if it is MD5 and if it is... how do i update it. I can post the login.php file if that will help. I am just wanting to find some php code or somthing that i can run that will either replace or update the admin so that he can login to that admin section of his site.
  11. How do i replace it? or can i create a new admin as well?
  12. i am trying to help a friend of mine who's webmaster has disappeared. He has an administrator area on his site but does not know the user name and password. I have gotten the database name, location, user name, and password. is there a way to write a php mysql qyaertyscript that can pull the username and password for the admin user? thank you for your time.
  13. Where do i subtract it. I know that is probubly a dumb question but i am sort of new to all of this. Thank you for your help.
  14. <?php function checkTime(){ $db=new mysql_dialog(); $db->connect($this->dbhost, $this->dbuser, $this->dbpass, $this->dbase); //$SQL="SELECT CURTIME(".$this->tblLastLog.") as lastLog FROM ".$this->tbl; $SQL="SELECT UNIX_TIMESTAMP(".$this->tblLastLog.") as lastLog FROM ".$this->tbl; $SQL.=" WHERE ".$this->tblID."=".$_SESSION['userID']." AND ".$this->tblSessionID."='".$_SESSION['sessionID']."'"; $db->speak($SQL); $data=$db->listen(); $nowtime=time(); $inactiveSec=$nowtime-$data['lastLog']; if ($inactiveSec/60>$this->inactiveMin) { $this->errorMsg=$this->errorDelay; $this->makeErrorHtml(); } else { $SQ="UPDATE ".$this->tbl." SET "; $SQ.=$this->tblLastLog."= now() "; $SQ.="WHERE ".$this->tblID."='".$_SESSION['userID']."'"; $db->speak($SQ); $this->checkAdmin(); } } ?> Where is says "$SQ.=$this->tblLastLog."= now() "; is where it gets the time, I am assuming. The server i am using is in a differant time zone so i need to ajust the time by minus an hour. How do i do that? Thank you for your help.
  15. Thank you, it works now
  16. this is in the included file: function logLogin(){ $Susername2 = $this->dbuser; $Spassword2 = $this->dbpass; $Shostname2 = $this->dbhost; $Sdatabase2 = $this->dbase; $dbhandle2 = mysql_connect($Shostname2, $Susername2, $Spassword2) or die("Unable to connect to MySQL"); $selected2 = mysql_select_db($Sdatabase2,$dbhandle2) or die("Could not select Database"); $SQL3="INSERT INTO userlog4(userName, lastLog, ip) "; $SQL3.="(SELECT userName, lastLog, ip "; $SQL3.="FROM myuser WHERE ".$this->tblID."='".$_SESSION['userID']."')"; $Send=mysql_query($SQL3) or die("INSERT ERROR: ".mysql_error()); mysql_close($dbhandle2); } this is at the top of the main page. <?php include("adminpro_config.php"); include("adminpro_class.php"); include("adminuser_config.php"); logLogin(); ?>
  17. i have the includes for the documents and the function works when i call it on the file it is on.. but i need it called on the main page when i set it there all i get is blank page. the site does not continue. any thoughts?
  18. I am using PHP scripts that use multiple files. I am wanting to call a function on the main page that is located in an include page. I want this function to run above the HTML tags. i have code up there now and they run fine but i don't know the syntax for calling a function from another file. any help will be greatly appreciated.
  19. It works, thank you i knew it was something stupid on my part that i was totally overlooking. Thank you very much!
  20. sorry had not uploaded the changed doc so i was getting nothing till i ran it again then got that error.
  21. INSERT ERROR: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' lastLog, ip, logtimeout) FROM myuser WHERE ID='1')' at line 1
  22. Same thing happed. Nothing happens if i have two or more col but if i have one col it works.
  23. using this code i am connecting to my data base and inserting login information from one table to another. function Log3(){ $Susername = $this->dbuser; $Spassword = $this->dbpass; $Shostname = $this->dbhost; $Sdatabase = $this->dbase; $dbhandle = mysql_connect($Shostname, $Susername, $Spassword) or die("Unable to connect to MySQL"); $selected = mysql_select_db($Sdatabase,$dbhandle) or die("Could not select Database"); $SQL2="INSERT INTO userlog4(userName, lastLog, ip, logtimeout)"; $SQL2.="SELECT (userName, lastLog, ip, logtimeout) "; $SQL2.="FROM myuser WHERE ".$this->tblID."='".$_SESSION['userID']."'"; $Send=mysql_query($SQL2); mysql_close($dbhandle); } It works fine, but.... i cant seem to do more than one col. If instead of (userName, lastLog, ip, logtimeout) i only put userName, or ip, by itself in both places it transfers fine but when i add another one it does not work. What am i doing wrong? Thank you for your time.
  24. I am wanting to add each users IP address into the database along side each users name. I have this code so far that gets the IP address and adds it into the database. I am not sure how to tell it to add the IP address for each user that is loged in. <?php include("adminpro_config.php"); include("adminpro_class.php"); include("adminuser_config.php"); $servername=$globalConfig['dbhost']; $dbusername=$globalConfig['dbuser']; $dbpassword=$globalConfig['dbpass']; $dbname=$globalConfig['dbase']; connecttodb($servername,$dbname,$dbusername,$dbpassword); function connecttodb($servername,$dbname,$dbuser,$dbpassword) { global $link; $link=mysql_connect ("$servername","$dbuser","$dbpassword"); if(!$link){die("Could not connect to MySQL");} mysql_select_db("$dbname",$link) or die ("could not open db".mysql_error()); } $ip=@$REMOTE_ADDR; $strSQL= "INSERT INTO myuser(ip) VALUES ('$ip')"; $test=mysql_query($strSQL); $prot=new protect("1","1"); if ($prot->showPage) { $db=new mysql_dialog("1"); $db->connect($globalConfig['dbhost'],$globalConfig['dbuser'], $globalConfig['dbpass'], $globalConfig['dbase']); $SQL="SELECT ".$globalConfig['tblUserName']." as userName, "; $SQL.=$globalConfig['tblIsAdmin']." as isAdmin"; $SQL.=" FROM ".$globalConfig['tbl']; $db->speak($SQL); $option=""; //for the select tag normal users $optionad=""; //for the select tag admins $action=""; //main navigation $editName=""; $userName=""; $allusers=0; //count all normal users $alladmins=0; //count all admins while ($data=$db->listen()){ $option.="<option value=\"".$data['userName']."\">".$data['userName']; if ($data['isAdmin']==1){ $alladmins++; } else{ $allusers++; } } extract($_POST); ?> the first connection at the top is the one i am concered with. The econd works as it should. I know it there is a way to tell it to insert the IP addres into the user who is loged in but how. Please Help thank you!
  25. Is there a way to have an online form, what when you submit it turns the information into an attachment that is sent to am email? I am trying, ultimately, to have a form that once submitted sends its information to a fax machine. The only was i could see to do it was with a service online but they use formatted attachments in an email to fax can anyone help with either issue. Thank you for your time!
×
×
  • 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.