Ankündigung

Einklappen
Keine Ankündigung bisher.

I-Rater Script

Einklappen

Neue Werbung 2019

Einklappen
X
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • I-Rater Script

    Hallo,

    ich möchte gerne das I-Rater (Fotobewertung) Script ausführen lassen. Es funktioniert auch alles wunderbar, nur das Anmelden neuer Benutzer nicht.

    Wenn man bei der Anmeldung auf "Absenden" klickt, kommt einfach die gleiche Seite nochmal, obwohl es eigentlich eine Zusammenfassung anzeigen sollte.

    Was kann ich da machen?

    Konfigurationsdatei:

    Code:
    <?php
    include("./admin/config.php");
    include("$include_path/common.php");
    include("$include_path/$table_file");
    include("./admin/options.php");
    
    global $HTTP_POST_VARS,$HTTP_GET_VARS,$HTTP_SESSION_VARS;
    global $_SESSION;
    
    if ($HTTP_POST_VARS!="")
        $_POST=$HTTP_POST_VARS;
    
    if ($HTTP_GET_VARS!="")
        $_GET=$HTTP_GET_VARS;
    
    if ($HTTP_SESSION_VARS!="")
        $_SESSION=$HTTP_SESSION_VARS;
    
    
    
    
    $sql="select * from signup";
    $res=mysql_query($sql);
    $num=mysql_num_rows($res);
    if($num > 0)  {
    while($rs=mysql_fetch_array($res))
    {
       if($rs[s_enable] == "y")  {
          switch($rs[s_fields])
          {
    	  case 'username': 
    		$cusername=1;
     		break;
           	  case 'password':
                    $cpassword=1;
    		break;
              case 'hint':
    		$chint=1;
                    break;
    	  case 'realname':
    		$crealname=1;
    		break;
    	  case 'description':
    		$cdescription=1;
    		break;
    	  case 'age':
    		$cage=1;
    		break;
    	  case 'user_type':
    		$cuser_type=1;
    		break;
    	  case 'state':
    		$cstate=1;
    		break;
    	  case 'country':
    		$ccountry=1;
    		break;
    	  case 'email':
    		$cemail=1;
    		break;
    	  case 'url':
    		$curl=1;
    		break;
    	  case 'quote':
    		$cquote=1;
    		break;
          }
       }
    }
    }
    
    
    $now = date("YmdHis", mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")));
    
    $keep_me_logged_in_yes = " checked";
    $keep_me_logged_in_no = "";
    
    if(!isset($PW1_html)) $PW1_html = "";
    if(!isset($PW2_html)) $PW2_html = "";
    if(!isset($realname_html)) $realname_html = "";
    if(!isset($age_html)) $age_html = "";
    if(!isset($email_html)) $email_html = "";
    if(!isset($signup_user_type_html)) $signup_user_type_html = "";
    
    if(!isset($country)) $country = "United_States.gif";
    $flags_list = getFlagList($base_path . "/images/flags", $country);
    
    $signup_username = isset($_POST['signup_username']) ? $_POST['signup_username'] : "";
    if(!strlen($signup_username)){
    	$signup_username = isset($_GET['signup_username']) ? $_GET['signup_username'] : "";
    }
    
    $username_html = isset($_POST['username_html']) ? $_POST['username_html'] : "";
    $PW1 = isset($_POST['PW1']) ? $_POST['PW1'] : "";
    $PW2 = isset($_POST['PW2']) ? $_POST['PW2'] : "";
    $signup_hint = isset($_POST['signup_hint']) ? $_POST['signup_hint'] : "";
    
    $signup_realname = isset($_POST['signup_realname']) ? $_POST['signup_realname'] : "";
    if(!strlen($signup_realname)){
    	$signup_realname = isset($_GET['signup_realname']) ? $_GET['signup_realname'] : "";
    }
    
    $signup_description = isset($_POST['signup_description']) ? $_POST['signup_description'] : "";
    
    $signup_age = isset($_POST['signup_age']) ? $_POST['signup_age'] : "";
    if(!strlen($signup_age)){
    	$signup_age = isset($_GET['signup_age']) ? $_GET['signup_age'] : "";
    }
    
    $signup_user_type = isset($_POST['signup_user_type']) ? $_POST['signup_user_type'] : "";
    
    $signup_state = isset($_POST['signup_state']) ? $_POST['signup_state'] : "";
    if(!strlen($signup_state)){
    	$signup_state = isset($_GET['signup_state']) ? $_GET['signup_state'] : "";
    }
    $states_list = get_states_list($signup_state);
    
    $signup_email = isset($_POST['signup_email']) ? $_POST['signup_email'] : "";
    if(!strlen($signup_email)){
    	$signup_email = isset($_GET['signup_email']) ? $_GET['signup_email'] : "";
    }
    
    $signup_url = isset($_POST['signup_url']) ? $_POST['signup_url'] : "http://";
    $signup_quote = isset($_POST['signup_quote']) ? $_POST['signup_quote'] : "";
    
    $signup_country = isset($_POST['signup_country']) ? $_POST['signup_country'] : "";
    if(!strlen($signup_country)){
    	$signup_country = isset($_GET['signup_country']) ? $_GET['signup_country'] : "";
    }
    
    $user_types = get_user_types($signup_user_type);
    $wrapped_return_message = "";
    
    if(isset($_POST['submit_signup'])){
    
    	if($_POST['keep_me_logged_in'] == "Y"){
    		$keep_me_logged_in_yes = " checked";
    		$keep_me_logged_in_no = "";
    		$_SESSION['sl'] = false;
    	} else {
    		unset($_SESSION['rc']);
    		$keep_me_logged_in_yes = "";
    		$keep_me_logged_in_no = " checked";
    		$_SESSION['sl'] = true;
    	}
    
    	if(strlen($signup_realname)<4){
    		$signup_error = 1;
    		$realname_html = "
    Your Name must be at least 4 chars";
    	}
    
    	if(strlen($signup_realname)>48){
    		$signup_error = 1;
    		$realname_html = "
    Your Name must be less than 48 chars";
    	}
    
    	if(strlen($signup_username)<4){
    		$signup_error = 1;
    		$username_html = "
    Your Username must be at least 4 chars";
    	}
    
    	if(strlen($signup_username)>16){
    		$signup_error = 1;
    		$username_html = "
    Your Username must be less than 16 chars";
    	}
    
    	if(check_username($signup_username)){
    		$signup_error = 1;
    		$username_html = "
    The username &quot;" . $signup_username . "&quot; already exists, please choose a different one.";
    	}
    
    	if(strlen($PW1) < 4){
    		$signup_error = 1;
    		$PW1_html = "
    Your Password must be at least 4 chars";
    	}
    
    	if(strlen($PW1) > 16){
    		$signup_error = 1;
    		$PW1_html = "
    Your Password must be less than 16 chars";
    	}
    
    	if(!strlen($signup_user_type)){
    		$signup_error = 1;
    		$signup_user_type_html = "
    You must select a user type";
    	}
    
    	if($PW1 != $PW2){
    		$signup_error = 1;
    		$PW2_html = "
    Your Passwords must match";
    	} else $PW = $_POST['PW1'];
    
    	if($signup_age < 18){
    		$signup_error = 1;
    		$age_html = "
    You must be at least 18 years of age to signup";
    	}
    
    	if(!eregi("^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+(\.[a-zA-Z0-9_-])+", $signup_email)){
    		$signup_error = 1;
    		$email_html = "
    Your Email address must be valid";
    	}
    
    	if(eregi("^([a-zA-Z0-9_.-])+@webtv.net+", $signup_email)){
    		$signup_error = 1;
    		$email_html = "
    No WebTV users..  sorry";
    	}
    
    	if(check_user_email($signup_email)){
    		$signup_error = 1;
    		$email_html = "
    That email address already exists, please use a different one if you want to signup again.";
    	}
    
    	if(!isset($signup_error)){
    
    		$_SESSION['username'] = $signup_username;
    	//	$signup_description = addslashes($signup_description);
    	//	$signup_quote = addslashes($signup_quote);
    	//	$signup_hint = addslashes($signup_hint);
    
    		$su_sql = "
    			insert into $tb_users (
    				id,
    				username,
    				password,
    				hint,
    				realname,
    				description,
    				state,
    				country,
    				url,
    				quote,
    				age,
    				user_type,
    				email,
    				total_ratings,
    				total_points,
    				average_rating,
    				signup,
    				last_logged,
    				image_url,
    				md5key
    			) values (
    				'',
    				'$signup_username',
    				password('$PW1'),
    				'$signup_hint',
    				'$signup_realname',
    				'$signup_description',
    				'$signup_state',
    				'$signup_country',
    				'$signup_url',
    				'$signup_quote',
    				'$signup_age',
    				'$signup_user_type',
    				'$signup_email',
    				'1',
    				'10',
    				'10',
    				'$now',
    				now(),
    				'',
    				md5('$signup_username')
    			)
    		";
    		$su_query = mysql_query($su_sql) or die(mysql_error());
    
    		$mid = mysql_insert_id();
                   
                    signup_fields_updation($mid,'a',$_POST);
                    
    		$_SESSION['userid'] = $mid;
    
    		if($_POST['keep_me_logged_in'] == "Y"){
    			$md5 = md5(time());
    			$sql = "
    				insert into $tb_cookies (
    					userid,
    					cookie
    				) values (
    					'$mid',
    					'$md5'
    				)
    			";
    			$query = mysql_query($sql) or die(mysql_error());
    			setcookie("keep_me_logged_in", $md5, time() + 31536000);
    		}
    
    		$rating_ins = "
    			insert into $tb_ratings (
    				id,
    				user_id,
    				rating,
    				rater_id,
    				rater_ip
    			) values (
    				'',
    				'$_SESSION[userid]',
    				'10',
    				'0',
    				'127.0.0.1'
    			)
    		";
    		$rating_ins_query = mysql_query($rating_ins) or die(mysql_error());
    		
    		$recipient = $signup_realname . " <" . $signup_email . ">";
    		
    		$subject = "Thanks for signing up...";
    		
    		$signup_realname_array = explode(" " , $signup_realname);
    		$srn = $signup_realname_array[0];
    
    		$email_content = "Dear " . $srn . ",\r\n\r\n";
    		$email_content .= "Thanks for signing up!  Here is what you submitted:\r\n\r\n";
    		$email_content .= "Username: " . $signup_username . "\r\n";
    		$email_content .= "Password: " . $PW . "\r\n\r\n";
    		$email_content .= "You will need your Username and Password to login to the site, so be sure and save this email somewhere safe.\r\n\r\n";
    		$email_content .= "We take security and privacy very seriously.  Your password is encrypted using one-way encryption, therfore we can not send it to you on request.  If you forget your password, we can only provide you with your chosen password hint.\r\n\r\n";
    		$email_content .= "Your password hint is: " . $signup_hint . "\r\n\r\n";
    		$email_content .= "You may now proceed to " . $base_url . " and update your picture and other details in your profile.\r\n\r\n";
    		$email_content .= "Thanks,\r\n";
    		$email_content .= $owner_name . "\r\n";
    		$email_content .= $owner_email . "\r\n";
    
    		$headers = "From: " . $owner_name . "<" . $owner_email . ">\n";
    		$headers .= "X-Sender: <" . $owner_email . ">\n";
    		$headers .= "Return-Path: <" . $owner_email . ">\n";
    		$headers .= "Error-To: <" . $owner_email . ">\n";
    		$headers .= "X-Mailer: " . $_SERVER['SERVER_NAME'] . "\n";
    
    		mail($recipient, $subject, $email_content, $headers);
    
    include_once("./admin/options.php");
    if ($payment_enabled == 1)
    {
    $qry = "update $tb_users set is_approved='0' where id='$mid'";
    $s_qry = mysql_query($qry) or die(mysql_error());
    
    $message = "<table border=0><tr><td>";
    $message .= <<<EOF
    <FORM action="https://www.paypal.com/cgi-bin/webscr" method="post">
      <DIV align="center"> 
        <INPUT type="hidden" name="cmd" value="_xclick">
        <INPUT type="hidden" name="business" value="$My_PayPal_Email">
        <INPUT type="hidden" name="item_name" value="Tunerorloser Member Subscription">
        <input type="hidden" name="item_number" value="$mid">
        <INPUT type="hidden" name="currency_code" value="USD">
        <INPUT type="hidden" name="return" value="$base_url/paypal_return.php?id=$mid">
        <INPUT type="hidden" name="cancel_return" value="$base_url/paypal_return.php?id=$mid">
        <INPUT type="hidden" name="notify_url" value="$base_url/processPayPalIPN.php">
        <INPUT type="hidden" name="amount" value="$amount">
        <INPUT type="hidden" name="undefined_quantity" value="0">
        <INPUT type="hidden" name="no_shipping" value="1">
        <INPUT type="hidden" name="no_note" value="0">
        <INPUT type="image" name="submit" src="http://images.paypal.com/images/x-click-but6.gif" border="0" alt="Make payments with PayPal, it's fast, free, and secure!">
      </DIV>
    </FORM>
    EOF;
    
    /*$order_id = time();
    $rand = rand(1,100);
    $order_id = intval($order_id/$rand);
    $order_id = "CC$order_id";*/
    
    $message .= "</td><td>";
    $message .= <<<EOF
    <FORM action="https://www.2checkout.com/cgi-bin/sbuyers/cartpurchase.2c" method="post">
      <DIV align="center"> 
        <INPUT type="hidden" name="total" value="$amount">
        <INPUT type="hidden" name="sid" value="$My_2checkout_id">
        <INPUT type="hidden" name="cart_order_id" value="$mid">
        <INPUT type="submit" name="submit" value="2Checkout">
      </DIV>
    </FORM>
    EOF;
    $message .= "</td></tr></table>";
    $mytitle = "Pay \$$amount Via Paypal or 2Checkout to activate your account";
    }
    else
    {
    $_SESSION['userid'] = $mid;
    $mytitle = "signup";
    $message = <<<EOF
    
    
    
    Signup complete, please click here to upload your picture.
    
    
    
    EOF;
    }
    
    $form_return_message = <<<EOF
    <table cellpadding="2" cellspacing="0" border="0" width="100%">
    <tr>
    </tr>
    </table>
    
    <table cellpadding="5" cellspacing="1" border="0" width="100%">
    <tr>
    <td align="center" class="regular">
    $message
    
    </td>
    </tr>
    </table>
    
    EOF;
    	
    	$wrapped_return_message = table($mytitle, $form_return_message);
    
    	}
    }
    
    include("$include_path/doc_head.php");
    include("$include_path/styles.php");
    
    $final_output .= <<<FO
    </head>
    <body bgcolor="$page_bg_color">
    <table border="0" cellpadding="0" cellspacing="0" width="$total_width" align="center">
    <tr>
    	<td colspan="3" width="100%" valign="bottom">
    	<table border="0" cellpadding="0" cellspacing="0" width="100%">
    	<tr>
    		<td align="right" valign="bottom">
    FO;
    
    
    $final_output .= <<<FO
    		</td>
    	</tr>
    	</table>
    	</td>
    </tr>
    <tr>
    <td width="$left_col_width" valign="top">
    FO;
    
    include("$include_path/left.php");
    
    $final_output .= <<<FO
    </td>
    <td width="$main_col_width" valign="top">
    <table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
    <tr>
    <td align="left" valign="top">$wrapped_return_message
    FO;
    
    if(!isset($_POST['submit_signup']) || isset($signup_error)){
    
    $form_content = <<<EOF
    <table cellpadding="2" cellspacing="0" border="0" width="100%">
    <tr>
    	<td class="bold">$site_title >> Signup</td>
    </tr>
    </table>
    
    <table cellpadding="5" cellspacing="1" border="0" width="100%">
    <tr>
    	<td class="regular" colspan="2" align="center">
    $site_title is an amateur image rating site.  If you sign up you
    are fully expected to upload a picture of yourself on the next screen.  If
    you do not intend on uploading a picture, please do not signup, thanks.
    
    
    EOF;
    
    $age_options = get_age_options($low_age_limit);
    $user_types_count = get_user_types_count();
    
    $form_content .= <<<EOF
    <form method="post" action="$base_url/signup.php" name="the_form"></td>
    </tr>
    EOF;
    
    if($cusername)  {
    $form_content .= <<<EOF
    <tr>
    	<td class="regular" align="right"><span class="bold">Username:</span>
    4-16 characters required, you will use this
    with your password to login to the site.</td>
    	<td valign="top"><input class="input" type="text" name="signup_username" value="$signup_username" size="16"><span class="error">$username_html</span></td>
    </tr>
    EOF;
    }
    
    $form_content .= <<<EOF
    <tr>
    	<td align="right" class="regular" valign="top"><span class="bold">Keep me logged in:</span>
    (store a login cookie)</td>
    	<td valign="top" class="regular"><input type="radio" name="keep_me_logged_in" value="Y"$keep_me_logged_in_yes> Yes <input type="radio" name="keep_me_logged_in" value="N"$keep_me_logged_in_no> No</td>
    </tr>
    EOF;
    
    if($cemail)  {
    $form_content .= <<<EOF
    <tr>
    	<td align="right" class="regular" width="50%"><span class="bold">Email Address:</span>
    valid email required</td>
    	<td class="regular" width="50%"><input class="input" type="text" name="signup_email" value="$signup_email" size="24"><span class="error">$email_html</span></td>
    </tr>
    EOF;
    }
    if($cpassword)  {
    $form_content .= <<<EOF
    <tr>
    	<td class="regular" align="right"><span class="bold">Password:</span>
    4-16 characters required</td>
    	<td valign="top"><input class="input" type="password" name="PW1" value="$PW1" size="16"><span class="error">$PW1_html</span></td>
    </tr>
    <tr>
    	<td class="regular" align="right"><span class="bold">Password Again:</span>
    4-16 characters required</td>
    	<td valign="top"><input class="input" type="password" name="PW2" value="$PW2" size="16"><span class="error">$PW2_html</span></td>
    </tr>
    EOF;
    }
    if($chint)  {
    $form_content .= <<<EOF
    <tr>
    	<td class="regular" align="right"><span class="bold">Password Hint:</span>
    in case you forget your password</td>
    	<td valign="top"><input class="input" type="text" name="signup_hint" value="$signup_hint" size="16"></td>
    </tr>
    EOF;
    }
    if($crealname)  {
    $form_content .= <<<EOF
    <tr>
    	<td class="regular" align="right"><span class="bold">Name:</span>
    4-48 characters required.</td>
    	<td valign="top"><input class="input" type="text" name="signup_realname" value="$signup_realname" size="16"><span class="error">$realname_html</span></td>
    </tr>
    EOF;
    }
    if($cage)  {
    $form_content .= <<<EOF
    <tr>
    	<td class="regular" align="right"><span class="bold">Age:</span>
    must be at least 18 years old</td>
    	<td valign="top"><select class="input" name="signup_age">$age_options</select><span class="error">$age_html</span></td>
    </tr>
    EOF;
    }
    if($cuser_type)  {
    $form_content .= <<<EOF
    <tr>
    	<td class="bold" align="right">User Type:</td>
    	<td valign="top"><select class="input" name="signup_user_type" size="$user_types_count">$user_types</select><span class="error">$signup_user_type_html</span></td>
    </tr>
    EOF;
    }
    if($cdescription)  {
    $form_content .= <<<EOF
    <tr>
    	<td class="bold" align="right">Description:
    </td>
    	<td valign="top"><textarea class="input" name="signup_description" rows="6" cols="40">$signup_description</textarea></td>
    </tr>
    EOF;
    }
    if($cstate)  {
    $form_content .= <<<EOF
    <tr>
    	<td class="bold" align="right">State or Province:</td>
    	<td valign="top"><select class="input" name="signup_state"><option value="">Please Select:</option><option value="">None/Other</option>$states_list</select></td>
    </tr>
    EOF;
    }
    if($ccountry)  {
    $form_content .= <<<EOF
    <tr>
    	<td class="bold" align="right">Country:</td>
    	<td class="regular"><select class="input" name="signup_country"><option value="None.gif">Please Select:</option>$flags_list</select></td>
    </tr>
    EOF;
    }
    if($curl)  {
    $form_content .= <<<EOF
    <tr>
    	<td class="bold" align="right">URL:</td>
    	<td valign="top"><input class="input" type="text" name="signup_url" value="$signup_url" size="24"></td>
    </tr>
    EOF;
    }
    if($cquote)  {
    $form_content .= <<<EOF
    <tr>
    	<td class="bold" align="right">Favorite Quote:</td>
    	<td valign="top"><input class="input" type="text" name="signup_quote" value="$signup_quote" size="24"></td>
    </tr>
    EOF;
    }
    
    $uid=0;
    $form_content .= additional_signup_fields($uid);
    
    $form_content .= <<<EOF
    <tr>
    	<td class="regular" align="center" colspan="2"><input class="button" type="submit" name="submit_signup" value=" Sign me up -> "></td>
    </tr></form>
    </table>
    
    
    EOF;
    
    $final_output .= table("Signup Now!", $form_content);
    
    }
    
    $final_output .= <<<FO
    </td>
    </tr>
    </table>
    FO;
    
    include("$include_path/copyright.php");
    $final_output .= $content;
    
    $final_output .= <<<FO
    </td>
    <td width="$right_col_width" valign="top">
    FO;
    
    include("$include_path/right.php");
    
    $final_output .= <<<FO
    </td>
    </tr>
    </table>
    </body>
    </html>
    FO;
    
    $final_output = final_output($final_output);
    
    echo $final_output;
    
    ?>

  • #2
    error_reporting(E_ALL); ini_set('display_errors', true);
    an den Anfang des Skripts setzen, damit Fehler im Browser angezeigt werden.

    Welche PHP Version wird benutzt?

    Kommentar

    Lädt...
    X