当前位置: 首页>>代码示例>>PHP>>正文


PHP output_errors函数代码示例

本文整理汇总了PHP中output_errors函数的典型用法代码示例。如果您正苦于以下问题:PHP output_errors函数的具体用法?PHP output_errors怎么用?PHP output_errors使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了output_errors函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: login

        } else {
            $login = login($username, $password);
            if ($login == false) {
                $errors[] = 'Either the username or the password entered is wrong.';
            } else {
                $_SESSION['user_id'] = $login;
                header('Location:home.php');
                exit;
            }
        }
    }
} else {
    $errors[] = 'Please enter your username and password';
}
if (empty($errors) === false) {
    $arr = output_errors($errors);
    echo "<br/>";
    echo "<font color=#fed136>" . $arr . "</font>";
}
?>
</p>
		<form action=" " method="post" enctype="multipart/form-data">
	

               <input type="text" name="username" placeholder="Username" >
      
         
               <input type="password" name="password" placeholder="Password" >
       
            <input type="submit" class="btn btn-success" value="Login" >
          </form>
开发者ID:raull240,项目名称:mini-Craigslist,代码行数:31,代码来源:index.php

示例2: md5

$uname = $_REQUEST['uname'];
$pass = $_REQUEST['pass'];
$hid = $_REQUEST['hid'];
$pass = md5($pass);
if (!empty($_POST)) {
    if (empty($uname) || empty($pass)) {
        $errors[] = 'You need to enter a user name and a password!<br />';
    } else {
        if (!user_exists($uname)) {
            $errors[] = 'Sorry user not found!<br />';
        } else {
            if (!user_active($uname)) {
                $errors[] = 'Have you activated your Account?<br />Account Not Active!';
            } else {
                $login = login($uname, $pass);
                if (!$login) {
                    $errors[] = 'That username/password combination is incorrect<br />';
                } else {
                    $_SESSION['serial'] = $login;
                    header("Location: index.php");
                    exit;
                }
            }
        }
    }
    echo "<div class='user_entry'>";
    $errors = output_errors($errors);
    echo "Could not log in because {$errors}";
    echo "</div>";
}
include 'includes/overall/overallfoot.php';
开发者ID:arealdeadone,项目名称:Treasurehunt,代码行数:31,代码来源:validate.php

示例3: escape

?>
" placeholder="San Francisco, CA">
					    </label>
					    <label for="description"><h5>Description <span class="required">*</span></h5>
					    	<textarea name="description" rows="8"><?php 
echo escape($user->data()->description);
?>
</textarea>
					    </label>
					    <input type="hidden" name="token" value="<?php 
echo Token::generate();
?>
">
					    <input type="submit" class="button" value="Submit">
					    <a class="button alert" href="dashboard.php">Back</a>
					</form>
					<?php 
if (isset($validation) && !$validation->passed() && !empty($validation->errors())) {
    output_errors($validation->errors());
}
?>
				</div>
			</div>
		</div>
	</div>

<?php 
include 'includes/footer.php';
?>

开发者ID:lamwin,项目名称:bloggr,代码行数:29,代码来源:settings.php

示例4: nl2br

?>

<?php 
/*if (isset($_GET['success']) && empty($_GET['success'])) {
	echo nl2br("You\'ve been registered successfully!\n\nAn activation link has been sent to your registered e-mail.");
	echo "<script type='text/javascript'>alert('You\'ve been registered successfully!\n\nAn activation link has been sent to your registered e-mail.');</script>";
} else */
if (empty($_POST) === false && empty($errors) === true) {
    $register_data = array('username' => $_POST['username'], 'password' => $_POST['password'], 'name' => $_POST['name'], 'mobile' => $_POST['mobile'], 'email' => $_POST['email']);
    register_user($register_data);
    header('Location: login.php');
    exit;
} else {
    if (empty($errors) === false) {
        /*echo output_errors($errors);*/
        $error_all = output_errors($errors);
        echo "<script type='text/javascript'>alert('{$error_all}');</script>";
    }
}
?>

<!-- <form action="" method="post">
	<ul>
		<li>
			Username*:<br>
			<input type="text" name="username">
		</li>
		<li>
			Password*:<br>
			<input type="password" name="password">
		</li>
开发者ID:sushant-s,项目名称:tollbooth-management-system,代码行数:31,代码来源:register.php

示例5: redirect_to

                $errors['login'] = "No database match";
            }
        }
    }
} else {
    redirect_to("signup.php");
}
require_once '../includes/layouts/header_default.php';
?>

<div class="container">
    <h1>Sign Up</h1>
    <?php 
if (isset($errors) && !empty($errors)) {
    echo "<div class=\"alert alert-danger\">\n              <button class=\"close fui-cross\" data-dismiss=\"alert\"></button>\n              <h4>Oops!</h4>";
    output_errors();
    echo "</div>";
    clear_errors();
}
?>
    <div class="container text-center">
        <div class="address-headline"><h4>Enter your address</h4></div>
        <form class="address-form form-horizontal" role="form" action="address.php" method="post">
            <div class="form-group form-group-hg">
                <div class="col-sm-8 col-sm-offset-2">
                    <input type="text" class="form-control" name="addresslineone"
                        <?php 
echo "value='" . repeat_input_POST("addresslineone") . "'";
?>
                           id="addresslineone" placeholder="Address Line 1">
                </div>
开发者ID:marcogreselin,项目名称:auctionbay,代码行数:31,代码来源:address.php

示例6: output_errors

            }
        } else {
            $notice[] = 'Please fill all required details';
        }
    }
    ?>
		<div id="sysadmin">
			<?php 
    if (empty($_POST) === false) {
        ?>
										<center>
										    <div>
										        <h4>
										        	<span  class="label label-danger">
														<?php 
        output_errors($notice);
        ?>
										            </span>
										        </h4>
										    </div>
										</center>
 		<?php 
    }
    ?>
			
			<h4><i>Personal Details</i></h4><br>
			<form  action="scheduler.php?ntfy=sched" method="POST">
				<div class="form-group" id="innerModule">
					<label for="createEmail">Email</label>
					<input type="email" class="form-control" id="createEmail" placeholder="Email" name="email">
				</div>
开发者ID:kentmarionvg,项目名称:iicss,代码行数:31,代码来源:scheduler.php

示例7: contact_me

        if (empty($_POST['captcha_results']) === true) {
            $errors[] = 'Please enter captcha.';
        } else {
            if ($_POST['captcha_results'] != $_POST['num1'] + $_POST['num2']) {
                $errors[] = "Incorrect captcha.";
            }
        }
    }
    if (empty($_POST) === false && empty($errors) === true) {
        contact_me($_POST['contact_subject'], $_POST['body']);
        // header('Location: recom.php?success');
        // exit();
        echo "<div id='contact_errors'>Your message has been successfully sent.</div>";
    } else {
        if (empty($errors) === false) {
            echo "<div id='contact_errors'>" . output_errors($errors) . "</div>";
        }
    }
    ?>
					<h1 id="contact">Contact me</h1>
					<p>Got any suggestions for improving the website? Have you spotted a bug that you want to report? Do you have a business inquiry?<br/> Great! Fill in the below form and I'll contact you as soon as I can !</p>
					<form action="" method="post" id="contact_form">
						<input type="text" name="contact_name" placeholder="name... *" id="name" maxlength="30">
						<input type="text" name="email" placeholder="email... *" id="email" maxlength="30">
						<input type="text" name="contact_subject" placeholder="subject... *" id="contact_subject">
						<textarea name="body" placeholder="your message... *" id="textarea" maxlength="3220"></textarea><br/>
						<div id="contact_captcha"><?php 
    create_captcha();
    ?>
</div>
						<input type="submit" class="button" value="send!" id="submit">
开发者ID:vpandichi,项目名称:worldtour_proiect,代码行数:31,代码来源:recom.php

示例8: output_errors

    }
}
$message = '';
if (isset($_GET['success'])) {
    $message = '<h2>You have successfully changed your password.<h2>';
} else {
    if (isset($_GET['force']) && empty($_GET['force'])) {
        $message = '<h2>Your password was reset.  Please change your password.<h2>';
    }
}
include 'includes/overall/overall_header.php';
?>

<h1>Change Password</h1><br>
<?php 
echo !empty($errors) ? output_errors($errors) : '';
echo !empty($message) ? $message : '';
?>
<form action="" method="post">
	<ul>
		<li>
			<label for="current_password">Current Password*:</label><br >
			<input type="password" name="current_password">
		</li>
		<li>
			<label for="password">New Password*:</label><br >
			<input type="password" name="password">
		</li>
		<li>
			<label for="password_again">Confirm New Password*:</label><br >
			<input type="password" name="password_again">
开发者ID:skinnerdev,项目名称:ballin-batman,代码行数:31,代码来源:change_password.php

示例9: unset

                
                <div class="auth_form" style="width:630px">                                      
                    <?php 
if (isset($_GET['success']) === true && empty($_GET['success']) === true) {
    //echo '<p>Thanks, we have activate your account, you can login now </p><br><br>';
    if (!empty($_SESSION['activation_email'])) {
        echo '<p>Thanks, we have activate your account for ' . $_SESSION['activation_email'] . ', you can login now </p><br><br>';
        unset($_SESSION['activation_email']);
        // unset session
    } else {
        //header('Location: '.PROTECT_PAGE); //exit();
        echo 'Oops, Session Expire';
    }
} else {
    if (empty($errors) === false) {
        echo '<p>' . output_errors($errors) . '</p>';
        //display errors
    }
}
?>
           
                    
                    <br>
                    <p>
                    <a href="<?php 
echo AUTH_PAGE . '?type=Login';
?>
"> Sign in </a></p>
                    <!--ap/recover.php?mode=username --ap/recover.php?mode=password -->
                
                </div><!--End login_form--> 
开发者ID:rrabbi,项目名称:servethepeoplebd,代码行数:30,代码来源:activate.php

示例10: output_errors

        }
        ?>

	<div class="register-card">
		<h3>Recover</h3>
		<div class="row">
			<div class="large-12 columns">
				<form action="" method="POST">
					<label><h5>Please enter your email address: <span class="required">*</span></h5>
						<input type="text" name="email">
					</label>
					<input type="submit" class="button" value="Recover">
				</form>
				<?php 
        if (!$recover->passed() && !empty($recover->errors())) {
            output_errors($recover->errors());
        }
        ?>
			</div>
		</div>
	</div>

	<?php 
    } else {
        Redirect::to('login.php');
    }
}
?>

<?php 
include 'includes/footer.php';
开发者ID:lamwin,项目名称:bloggr,代码行数:31,代码来源:recover.php

示例11: trim

        if (isset($_REQUEST['email'], $_REQUEST['email_code'])) {
            $email = trim($_REQUEST['email']);
            $email_code = trim($_REQUEST['email_code']);
            if (!email_exists) {
                $errors[] = 'Oops, something went wrong and we couldn\'t find that email address!.';
            } else {
                if (!activate($email, $email_code)) {
                    $errors[] = 'Activation Failed!!<br />We could not activate your account as we are facing problems.';
                }
            }
            if (!empty($errors)) {
                ?>
				<div class="user_entry">
				<h2>Oops..</h2>
				<?php 
                echo output_errors();
            } else {
                header("Location: activate.php?success");
                exit;
            }
            ?>
				</div>
			<?php 
        } else {
            header("Location: index.php");
        }
    }
    include 'includes/countdown.php';
}
?>
				
开发者ID:arealdeadone,项目名称:Treasurehunt,代码行数:30,代码来源:activate.php

示例12: unset

													Thank you for contact us, we will be in touch soon.
												</li></ul>
									</div></div></div>';
        unset($_SESSION['contact_form_email']);
        // unset session
    } else {
        //echo '<div class="error_message_area"><img src="'.ERROR_ICON.'" /><ul><li> Oops, Session Expire! </li></ul></div>';
        echo '<div class="row"><div class="col-md-12"><div class="alert alert-warning">
											<img style="width:23px; float:left; margin-right:15px" src="' . WARNING_ICON . '" /><ul><li style="list-style:none;"> Oops, Session Expire! </li></ul>
									</div></div></div>';
    }
} else {
    require_once 'ap/form/contact_form.php';
    if (empty($errors) === false) {
        echo '<br><div class="row"><div class="col-md-12"><div class="alert alert-danger">
											<img style="width:23px; float:left; margin-right:15px" src="' . ERROR_ICON . '" />' . output_errors($errors) . '
									</div></div></div>';
        //display errors
    }
}
?>
                    </div>                    
                </div>
                            	
            </div><!--End col-md-6-->
        
            <div class="col-md-6">
            	<div class="row">
                	<div class="col-md-10 col-md-offset-1">
                    	
                        
开发者ID:rrabbi,项目名称:servethepeoplebd,代码行数:29,代码来源:contact+-+Copy.php

示例13: trim

} else {
    if (isset($_GET['email']) && isset($_GET['email_code'])) {
        echo $email = trim($_GET['email']);
        echo $email_code = trim($_GET['email_code']);
        if (email_exists($email) === false) {
            $error[] = 'You have entered a wrong email address';
        } else {
            if (activate($email, $email_code) === false) {
                $error[] = 'Oops somthing went wrong please try again';
            }
        }
        ?>

<?php 
        if (empty($error) === false) {
            echo '<td>oops <br>' . output_errors($error) . '</td>';
        } else {
            //echo 'ok';
            header('location:activation.php?success');
            exit(0);
        }
    }
}
?>
 
<?php 
include 'includes/aside.php';
include 'includes/overall/footer.php';
?>

开发者ID:trailblazerakash,项目名称:content-sharing-system,代码行数:29,代码来源:activation.php

示例14: output_errors

			<div class="row">
				<div class="large-6 columns">
					<?php 
if (!empty($user->data()->image)) {
    echo '<img style="width: 150px;" src="' . $user->data()->image . '" alt="Profile Image" >';
}
?>
					<form action="" method="POST" enctype="multipart/form-data">
						<input type="file" name="profile_image">
					    <input type="hidden" name="token" value="<?php 
echo Token::generate();
?>
">
					    <input type="submit" class="button" value="Submit">
					    <a class="button alert" href="dashboard.php">Back</a>
					</form>
					<?php 
if (!empty($errors)) {
    output_errors($errors);
}
if (isset($img) && !$img->passed() && !empty($img->errors())) {
    output_errors($img->errors());
}
?>
				</div>
			</div>
		</div>
	</div>

<?php 
include 'includes/footer.php';
开发者ID:lamwin,项目名称:bloggr,代码行数:31,代码来源:changeprofilepic.php

示例15: output_errors

				<dt>
					<label for="email">Email</label>
					' . output_errors($errors_email) . '
				</dt>
				<dd>
					<input class="unchanged" type="text" id="email" name="email" value="' . (isset($newemail) ? $newemail : $users->client->info['email']) . '" />
					
					<input type="checkbox" id="email-show" name="email-show"' . ($showemail ? ' checked' : '') . ' />
					<label class="inline" for="email-show">Public</label>
				</dd>
			</dl>
			
			<dl class="form big">
				<dt>
					<label for="password">New password</label>
					' . output_errors($errors_password) . '
				</dt>
				<dd>
					<input type="password" id="password" name="password" value="" /> <span class="subtitle">(leave blank to keep same)</span>
				</dd>
			</dl>
			
			<input type="submit" name="submit" value="Save" disabled />
		</form>';
            break;
    }
} else {
    $page->setTitle('Error');
    $page->setType('error');
    ?>
<div class="imgtitle imgtitle-32">
开发者ID:8dx,项目名称:bugspray,代码行数:31,代码来源:account.php


注:本文中的output_errors函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。