PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
twinjet
New Member
New Member


Joined: Jan 17, 2005
Posts: 22

PostPosted: Mon Jan 24, 2005 3:11 am Reply with quote Back to top

I almost dont know anything so i dont know if its secure or anything but can you please tell me:

1.- How can only registered users open this module and if they are not registered to give them the same message that comes out when trying to post in forums and you are not registered?
2.- Secure a little my code.

Join Module

index.php
Code:

<?php
if (!eregi("modules.php", $_SERVER['PHP_SELF']))
{
die ("You can't access this file directly...");
}

if(!IsSet($mainfile)) { include ("mainfile.php"); }
$index=0;
$theme="fiblack";

$go_to_address=rawurldecode($go_to_address1);
include("header.php");
OpenTable();
echo "<iframe SRC=\"http://www.mysite.com/modules/Join/join.php".$go_to_address."\" width=\"100%\" height=\"550\" framespacing=0 frameborder=no border=0 scrolling=auto></iframe>"; 
CloseTable();
include("footer.php");
die;
?>


join.php
Code:

<?php
echo '<html>
<link rel="STYLESHEET" type="text/css" href="style/style.css">
<form action="http://mysite.com/v-cgi/forms.cgi"
      enctype="application/x-www-form-urlencoded"
      method="post">
<table>  <tr>
    <th></th>
  <tr>
    <th align="right" class="storytitle">
     How they called you in the real world?&nbsp;
    </th>
    <td>
      <input type="text" name="real_name"  size="60" />
    </td>
  </tr>
      <td>
      <th align="center">
     <input type="submit" name="Form_Submit" value="Submit Form" />
    </td>
  </tr>
</table>
<input type="hidden" name="_vDeckformid" value="358" />
</p>
</form>
</body>
</html>';
?>


After they submit the form the formmail takes them to a specified page in this case:

thx.php
Code:

<?php
echo '<html>
<body bgcolor="#303030" text="#D2A900">
<b>Your submited form was succesfully received!<br></b>
<br>
We will contact you ASAP.
<br>
<br>
<br>
</body>
</html>';
?>
View user's profile Send private message
sixonetonoffun
Spouse Contemplates Divorce


Joined: Jan 02, 2003
Posts: 2499

PostPosted: Mon Jan 24, 2005 8:45 am Reply with quote Back to top

You should be able to set the view of the module when you are in the modules admin area by clicking on the edit link for the module. You could add something directly in the page too. Put something like this just below the include mainfile line. I would change that line to the standard require_once("mainfile.php"); it will do the same thing the like you have now does.
Code:

if(!is_user($user)) {
echo "<META HTTP-EQUIV=\"refresh\" content=\"2;URL=modules.php?name=Your_Account\">";
$pagetitle = "Registered Users Only";
include("header.php");
echo "message you want to send here";
include("footer.php");
}
View user's profile Send private message
twinjet
New Member
New Member


Joined: Jan 17, 2005
Posts: 22

PostPosted: Mon Jan 24, 2005 12:26 pm Reply with quote Back to top

What a noob i am, thx a lot sixonetonoffun, i forgot you could set that up in the modules section.
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum