本文整理汇总了PHP中displayErrors函数的典型用法代码示例。如果您正苦于以下问题:PHP displayErrors函数的具体用法?PHP displayErrors怎么用?PHP displayErrors使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了displayErrors函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getProduct
function getProduct($productID, $db_handle)
{
try {
$statement_handle = $db_handle->prepare("SELECT * FROM products WHERE productID=(:productID)");
if (ALL_PRODUCTS == $productID) {
$statement_handle->bindParam(':productID', ALL_PRODUCTS);
} else {
$statement_handle->bindParam(':productID', $productID);
}
$statement_handle->execute();
} catch (PDOException $e) {
clearAndInitErrors();
addError($e->getMessage());
}
$db_handle = null;
return $statement_handle->fetchAll();
displayErrors();
}
示例2: displayErrors
?>
">
<label for="password">Password</label>
<input type="password" name="password" id="password" />
<?php
echo displayErrors($validationErrors, 'password');
?>
</div>
<div class="<?php
echo getFieldClass($validationErrors, 'confirm_password');
?>
">
<label for="password">Confirm Password</label>
<input type="password" name="confirm_password" id="confirm_password" />
<?php
echo displayErrors($validationErrors, 'confirm_password');
?>
</div>
<div>
<input type="submit" id="submit-btn"/>
</div>
</form>
</div>
<?php
if (empty($errors)) {
?>
<p>Your username is <?php
echo $username . ' and your password is ' . md5($password);
?>
</p>
<?php
示例3: doStage2
function doStage2()
{
if (doSystemChecks()) {
displayWarnings();
if (checkFields()) {
if (checkConfigFiles()) {
if (doInstall()) {
return true;
}
}
}
displayErrors();
displayFields();
} else {
displayErrors();
}
return false;
}
示例4: getFieldClass
<meta charset="UTF-8">
<title>Task 04</title>
<link href="libraries/bootstrap-3.3.6-dist/css/bootstrap.min.css" rel="stylesheet" />
</head>
<body>
<div class="container" style="width: 30%">
<form action="" method="post" role="form">
<div class="form-group"> </div>
<div class="form-group <?php
echo getFieldClass($validationErrors, 'number');
?>
">
<label for="number" class="control-label">Number</label>
<input type="number" id="number" name="number" class="form-control"/>
<?php
echo displayErrors($validationErrors, 'number', 'control-label');
?>
</div>
<div class="form-group">
<label for="number-counter" class="control-label">Remaining numbers <?php
echo $numberCounter;
?>
</label>
<textarea name="number-counter" id="number-counter" class="form-control hidden"><?php
echo $numberCounter;
?>
</textarea>
</div>
<div class="form-group">
<input type="submit" class="btn btn-primary" value="Send number"/>
</div>
示例5: displayDeleteSubmit
/**
* displayDeleteSubmit
*
* @return void
*/
function displayDeleteSubmit()
{
$aid = $_GET['delete'];
$cat = $_GET['cat'];
$validator = new FormValidator();
if ($this->fcmsUser->access >= 2) {
$this->displayHeader();
echo '
<p class="error-alert">' . T_('You do not have permission to perform this task.') . '</p>';
$this->fcmsBook->displayAddressList($cat);
$this->displayFooter();
return;
}
$errors = $validator->validate($_GET, $this->fcmsBook->getProfile('delete'));
if ($errors !== true) {
$this->displayHeader();
displayErrors($errors);
$this->fcmsBook->displayAddressList($cat);
$this->displayFooter();
return;
}
$sql = "SELECT a.`user`, u.`phpass`\n FROM `fcms_address` AS a, `fcms_users` AS u\n WHERE a.`id` = ?\n AND a.`user` = u.`id`";
$r = $this->fcmsDatabase->getRow($sql, $aid);
if ($r === false) {
$this->displayHeader();
$this->fcmsError->displayError();
$this->displayFooter();
return;
}
$user = $r['user'];
$pass = $r['phpass'];
if ($r['phpass'] !== 'NONMEMBER' && $r['phpass'] !== 'PRIVATE') {
$this->displayHeader();
echo '
<p class="error-alert">' . T_('You cannot delete the address of a member.') . '</p>';
$this->fcmsBook->displayAddressList($cat);
$this->displayFooter();
return;
}
$sql = "DELETE FROM `fcms_users` \n WHERE `id` = ?";
if (!$this->fcmsDatabase->delete($sql, $user)) {
$this->displayHeader();
$this->fcmsDatabase->displayError();
$this->displayFooter();
return;
}
$sql = "DELETE FROM fcms_address \n WHERE id = ?";
if (!$this->fcmsDatabase->delete($sql, $aid)) {
$this->displayHeader();
$this->fcmsError->displayError();
$this->displayFooter();
return;
}
$this->displayAddressList();
displayOkMessage(T_('Address Deleted Successfully.'));
$this->displayFooter();
}
示例6: array
// Note: we don't check the existance of the database or its tables yet, since
// the installer can install the database if needed. Here, we just check if PHP
// was compiled with the correct database support.
$dbs = array("mysqli" => "mysqli_connect", "oci8" => "OCILogon", "oci9" => "OCILogin", "pgsql" => "pg_connect");
$dbconfig = atkconfig("db");
if (!function_exists($dbs[$dbconfig["default"]["driver"]])) {
$errors[] = "Your PHP installation seems to be compiled without <b>" . $dbconfig["default"]["driver"] . "</b>\n database support.\n <br>Please recompile PHP with support for " . $dbconfig["default"]["driver"] . ", or, if you\n installed from rpm, install the php rpm for this database.\n <br>Alternatively, select a different database in the config.inc.php file (<b>\$config_database</b>).";
}
// If there are any errors when we reach this point, it's no use continuing because
// we don't have a correct database setup, so we can't continue setup.
if (count($errors) > 0) {
displayErrors($errors);
exit;
}
// Create node
$obj =& atkGetNode("setup.setup");
if ($ATK_VARS["atkaction"] == "") {
$ATK_VARS["atkaction"] = "intro";
}
if (is_object($obj)) {
$obj->dispatch($ATK_VARS);
} else {
$errors[] = "Achievo will not run for a (yet) unkown reason. The install-script will dump\n some information below.\n <br>Please e-mail this entire page to bugs@achievo.org for analysis, so we might\n be able to help you, or fix Achievo to work with your setup.\n <br><br>PHP version: " . phpversion() . "\n <br><br>Please mention which operating system, which webserver, and\n which database you are using.\n <br>If possible, include their version numbers as well.";
// Something went wrong, but it is uncertain what it is. To investigate these
// kinds of issues, we force $config_debug to 'on' and ask the user politely
// to mail us the debugoutput.
displayErrors($errors, false);
$config_debug = 1;
}
$output =& atkOutput::getInstance();
$output->outputFlush();
示例7: processActions
if (checkReferer() == 1) {
// Process any FTP actions
processActions();
// Display content when logged in
if ($_SESSION["loggedin"] == 1) {
if ($ajaxRequest == 0) {
displayFormStart();
displayFtpActions();
displayAjaxDivOpen();
}
// Display FTP folder history
displayFtpHistory();
// Display folder/file listing
displayFiles();
// Load error window
displayErrors();
if ($ajaxRequest == 0) {
displayAjaxDivClose();
displayAjaxIframe();
displayUploadProgress();
displayAjaxFooter();
loadJsLangVars();
loadAjax();
writeHiddenDivs();
displayFormEnd();
//displayAjaxIframe();
loadEditableExts();
}
}
if ($ajaxRequest == 0) {
// Include the footer
示例8: displayErrors
<div id="content">
<h2 id="excerpt"><strong>Whoops!</strong> An error occured that prevented you from being able to install Tweet Nest until it is fixed.</h2>
<?php
echo displayErrors($e);
?>
</div>
<?php
} else {
?>
<form id="content" action="" method="post">
<?php
if ($e && $post) {
?>
<h2 id="excerpt"><strong>Whoops!</strong> An error occured that prevented you from being able to install Tweet Nest until it is fixed.</h2>
<?php
echo displayErrors($e);
?>
<!--
INSTALL LOG: <?php
var_dump($log);
?>
-->
<?php
} else {
?>
<h2 id="excerpt">To <strong>install</strong> Tweet Nest on this server and <strong>customize</strong> it to your likings, please fill in the below <strong>one-page</strong> setup configuration. If you want to change any of these values, you can edit the file <code>config.php</code> at any time to do so.</h2>
<?php
}
?>
<h2>Basic settings</h2>
<div id="greennotice"><span></span>Green color means the value is <strong>required</strong></div>
示例9: number_format
ago.
</p>
<strong>Based on <?php
echo number_format($total);
?>
users.</strong>
<br />
<?php
// If filters are applied, offer to remove them
if (isset($_GET['item']) && isset($_GET['member']) || isset($_GET['interval'])) {
echo "<br /><a href=\"index.php?page=main\">Remove filter</a>";
}
// If we have errors to show, do so
echo displayErrors($err);
?>
<div style="width:75em">
<div style="float:left; display:inline;">
<h2>Mumble version/snapshot</h2>
<?php
echo mkTbl($snapshot, $multiplier, $builds);
?>
<h2>Operating System</h2>
<?php
echo mkTbl($os, $multiplier, $builds, "osver");
?>
<h2>Platform</h2>
<?php
示例10: displayErrors
?>
>
<label for="password1">Password:</label>
<input type="password" id="password1" name="password1"/>
<?php
echo displayErrors(getValue($errors, 'password1', []));
?>
</div>
<div <?php
echo getErrorClass(getValue($errors, 'password2', []));
?>
>
<label for="password2">Retype Password:</label>
<input type="password" id="password2" name="password2"/>
<?php
echo displayErrors(getValue($errors, 'password2', []));
?>
</div>
<div>
<input type="submit" />
</div>
</form>
<div id="result">
<?php
echo "<p>Username: {$username}</p>";
?>
<?php
echo "<p>Encrypted password: {$password}</p>";
?>
</div>
</body>
示例11: getFieldClass
?>
</div>
<div class="<?php
echo getFieldClass($validationErrors, 'operation');
?>
">
<label for="operation">Select Operation</label>
<select name="operation" id="operation">
<option value="">----Select----</option>
<option value="+">addition</option>
<option value="-">subtraction</option>
<option value="*">multiplication</option>
<option value="/">division</option>
</select>
<?php
echo displayErrors($validationErrors, 'operation');
?>
</div>
<div>
<input type="submit" value="Calculate"/>
</div>
</form>
</div>
<?php
if (!empty($_POST) && empty($validationErrors)) {
?>
<p>
<?php
echo $firstInput . ' ' . $operation . ' ' . $secondInput . ' = ' . $result;
?>
</p>
示例12: displayErrors
</select>
<?php
echo displayErrors($validationErrors, 'DOBDay');
?>
<select name="DOBYear" class="<?php
echo getFieldClass($validationErrors, 'DOBYear');
?>
">
<option value=""> - Year - </option>
<?php
echo options($years, $year);
?>
</select>
<?php
echo displayErrors($validationErrors, 'DOBYear');
?>
</div>
<div>
<input type="submit">
</div>
<div name="result">
<?php
foreach ($result as $label => $value) {
?>
<p><?php
echo $label;
?>
: <?php
示例13: displayErrors
echo displayErrors($validationErrors, 'secondNumber', 'control-label');
?>
</div>
<div class="form-group <?php
echo getFieldClass($validationErrors, 'chooseAction');
?>
">
<label for="choose-action" class="control-label">Choose Action</label>
<select name="choose-action" id="choose-action" class="form-control">
<option value="">--choose-action--</option>
<?php
echo options([CHOOSE_ACTION_COLLECT => 'collect', CHOOSE_ACTION_SUBTRACT => 'subtract', CHOOSE_ACTION_DIVIDE => 'divide', CHOOSE_ACTION_MULTIPLY => 'multiply'], $chooseAction);
?>
</select>
<?php
echo displayErrors($validationErrors, 'chooseAction', 'control-label');
?>
</div>
<!--<div class="clearfix"></div>-->
<div class="form-group">
<input type="submit" class="btn btn-primary" value="Calculate"/>
<!--<input type="reset" class="btn btn-success" value="Clear Form"/>-->
</div>
<div class="form-group">
<label for="result" class="control-label">Result</label>
<textarea name="result" id="result" class="form-control" cols="1" rows="1">
<?php
echo $result;
?>
</textarea>
</div>
示例14: displayErrors
?>
">
<?php
echo displayErrors($validationErrors, 'secondNumber');
?>
</span>
<span class="<?php
echo getFieldClass($validationErrors, 'mathSing');
?>
">
<label for="sing">Select sing</label><select id="sing" name="mathSing">
<option value="">Select</option>
<option value="1">+</option>
<option value="2">-</option>
<option value="3">/</option>
<option value="4">*</option>
</select>
<?php
echo displayErrors($validationErrors, 'mathSing');
?>
</span>
<span><button type="submit">Calc</button> </span>
</form>
<p><?php
echo $print;
?>
</p>
</body>
</html>
示例15: displayErrors
?>
" method="post">
<div id="form_wrap" class="container">
<nav class="navbar-default navbar-fixed-top navbar">
<div class="navbar-header">
<div class="navbar-collapse collapse"><ul class="nav navbar-nav">
<li><a href="home.php" >Home</a></li>
<li><a href="logout.php" >Logout</a> </li>
<li><a href="#">Refresh</a> </li>
<li><a href="#">Link</a> </li>
</ul></div></div>
</nav>
<div id="form">
<div class="row">
<?php
displayErrors($error_msg);
if ($success) {
echo '<p class="app-success">Appointment added successfully</p>';
}
?>
</div>
<div class="row">
<div class="label">Patient name:</div>
<!-- end .label -->
<div class="input">
<input type="text" id="fullname" class="detail" name="patient_name"
value="<?php
displayValue('patient_name');
?>
"/>