本文整理汇总了PHP中print_errors函数的典型用法代码示例。如果您正苦于以下问题:PHP print_errors函数的具体用法?PHP print_errors怎么用?PHP print_errors使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_errors函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: print_html_body_begin
function print_html_body_begin($parameters=null){
global $config, $sess, $auth, $errors, $message;
if (!$parameters) $parameters=null;
// call user defined function at html body begin
if (isset($parameters['run_at_html_body_begin']) and function_exists($parameters['run_at_html_body_begin']))
$parameters['run_at_html_body_begin']($parameters);
//virtual(multidomain_get_file($config->html_prolog));
if (isset($parameters['title']) and $parameters['title']) echo $parameters['title'];
//virtual(multidomain_get_file($config->html_separator));
?>
<?if (isset($parameters['tab_collection']) and $parameters['tab_collection']) {
print_tabs($parameters['tab_collection'],
isset($parameters['path_to_pages'])?$parameters['path_to_pages']:null,
isset($parameters['selected_tab'])?$parameters['selected_tab']:null);
//count tabs
$num_of_tabs=0;
foreach($parameters['tab_collection'] as $tab)
if ($tab->enabled) $num_of_tabs++;
?>
<div id="swContent">
<!-- contenet of div must be sufficient wide in order to tabs displays in one line -->
<div style="height:1px; width:<?echo ($num_of_tabs*100)- 50;?>px;"> </div>
<?}?>
<?
print_errors($errors); // Display error
print_message($message);
if ($errors or $message) echo "<br />";
} //end function print_html_body_begin
示例2: hasFilesModified
/**
* Loop thru all the patch files that will be overwitten or altered,
* to find out if they are modified by user. If it's modified, warn user.
* @access private
* @return true if there are files being modified
* false if no file is modified
* @author Cindy Qi Li
*/
function hasFilesModified()
{
$overwrite_modified_files = $alter_modified_files = $has_not_exist_files = false;
$files = $this->patch_array[files];
$separator = '<br />';
// no file action is defined, return nothing is modified (false)
if (!is_array($files)) {
return false;
}
foreach ($files as $row_num => $patch_file) {
$fileName = $patch_file['name'];
$fileLocation = $patch_file['location'];
$file = $fileLocation . $fileName;
$action = $patch_file['action'];
if ($action == 'alter' || $action == 'overwrite') {
if (!file_exists($file)) {
// If the same message exists then skip it
if (strpos($not_exist_files, $file) !== false) {
continue;
}
$not_exist_files .= $file . $separator;
$has_not_exist_files = true;
} else {
if ($this->isFileModified($fileLocation, $fileName)) {
$fileRealPath = realpath($file);
if ($action == 'overwrite') {
// If the same message exists then skip it
if (strpos($overwrite_files, $fileRealPath) !== false) {
continue;
}
$overwrite_files .= $fileRealPath . $separator;
$overwrite_modified_files = true;
} else {
if ($action == 'alter') {
// If the same message exists then skip it
if (strpos($alter_files, $fileRealPath) !== false) {
continue;
}
$alter_files .= $fileRealPath . $separator;
$alter_modified_files = true;
}
}
}
}
}
}
if ($has_not_exist_files) {
$this->errors[] = _AT('patch_local_file_not_exist') . $not_exist_files;
}
if ($overwrite_modified_files) {
$this->errors[] = _AT('patcher_overwrite_modified_files') . $overwrite_files;
}
if ($alter_modified_files) {
$this->errors[] = _AT('patcher_alter_modified_files') . $alter_files;
}
if (count($this->errors) > 0) {
if ($has_not_exist_files) {
$notes = '';
} else {
$notes = '
<form action="' . $_SERVER['PHP_SELF'] . '?id=' . $_POST['id'] . '&who=' . $_POST['who'] . '" method="post" name="skip_files_modified">
<div class="row buttons">
<input type="submit" name="yes" value="' . _AT('yes') . '" accesskey="y" />
<input type="submit" name="no" value="' . _AT('no') . '" />
<input type="hidden" name="install" value="' . $_POST['install'] . '" />
<input type="hidden" name="install_upload" value="' . $_POST['install_upload'] . '" />
<input type="hidden" name="ignore_version" value="' . $_POST['ignore_version'] . '" />
</div>
</form>';
}
print_errors($this->errors, $notes);
unset($this->errors);
return true;
}
return false;
}
示例3: tzs_front_end_distance_calculator_handler
function tzs_front_end_distance_calculator_handler($atts)
{
ob_start();
$errors = array();
$city = null;
$map = false;
$form = true;
if ($_SERVER['REQUEST_METHOD'] == 'GET' && isset($_GET['calc'])) {
if (!isset($_GET['city']) || !is_array($_GET['city']) || count($_GET['city']) < 2) {
array_push($errors, 'Недостаточно данных для расчета расстояния');
} else {
$city = array_filter(array_map('trim', $_GET['city']));
if (count($city) < 2) {
array_push($errors, 'Недостаточно данных для расчета расстояния');
} elseif (count($city) > 10) {
array_push($errors, 'Слишком много точек для расчета расстояния');
} else {
//$res = tzs_calculate_distance($city);
$res = array();
/*$errors = array_merge($errors, $res['errors']);
print_errors($errors);*/
$errors = null;
/* if ($res['results'] > 0) {
?>
<div id="calc_result">
<div id="distance_result">
Расстояние по маршруту <?php echo tzs_cities_to_str($city);?> <?php echo tzs_convert_distance_to_str($res['distance'], true);?>,
</div>
<div id="duration_result">
примерное время в пути <?php echo tzs_convert_time_to_str($res['time']);?>
</div>
</div>
<?php
} */
$map = true;
$form = false;
print_distance_calculator_form($errors, $city, $map, $form);
}
}
print_errors($errors);
} else {
print_distance_calculator_form($errors, $city, $map, $form);
}
$output = ob_get_contents();
ob_end_clean();
return $output;
}
示例4: tzs_front_end_following_handler
function tzs_front_end_following_handler($atts)
{
ob_start();
$sp = tzs_validate_search_parameters();
$s_sql = tzs_search_parameters_to_sql($sp, 'sh');
$s_title = tzs_search_parameters_to_str($sp);
$errors = $sp['errors'];
$show_table = true;
if (strlen($s_title) == 0 && count($errors) == 0) {
$show_table = false;
//$errors = array("Укажите параметры поиска");
}
if (count($errors) > 0) {
print_errors($errors);
}
?>
<a href="javascript:showSearchDialog();" id="edit_search">Изменить параметры поиска</a>
<?php
if (count($errors) == 0 && $show_table) {
if (strlen($s_title) > 0) {
?>
<div id="search_info">Попутные грузы <?php
echo $s_title;
?>
</div>
<?php
} else {
?>
<div id="search_info">Параметры поиска не заданы</div>
<?php
}
$page = current_page_number();
?>
<a tag="page" id="realod_btn" href="<?php
echo build_page_url($page);
?>
">Обновить</a>
<?php
global $wpdb;
$url = current_page_url();
$pp = TZS_RECORDS_PER_PAGE;
$sql = "SELECT COUNT(*) as cnt FROM " . TZS_SHIPMENT_TABLE . " WHERE active=1 {$s_sql};";
$res = $wpdb->get_row($sql);
if (count($res) == 0 && $wpdb->last_error != null) {
print_error('Не удалось отобразить список грузов. Свяжитесь, пожалуйста, с администрацией сайта');
} else {
$records = $res->cnt;
$pages = ceil($records / $pp);
if ($pages == 0) {
$pages = 1;
}
if ($page > $pages) {
$page = $pages;
}
$from = ($page - 1) * $pp;
$sql = "SELECT * FROM " . TZS_SHIPMENT_TABLE . " WHERE active=1 {$s_sql} ORDER BY time DESC LIMIT {$from},{$pp};";
$res = $wpdb->get_results($sql);
if (count($res) == 0 && $wpdb->last_error != null) {
print_error('Не удалось отобразить список грузов. Свяжитесь, пожалуйста, с администрацией сайта');
} else {
if (count($res) == 0) {
?>
<div id="info">По Вашему запросу ничего не найдено.</div>
<?php
} else {
?>
<script src="/wp-content/plugins/tzs/assets/js/distance.js"></script>
<table id="tbl_shipments">
<tr>
<th id="numb">Номер заявки</th>
<th id="adds">Дата размещения</th>
<th id="date-load">Дата погрузки<br>Дата выгрузки</th>
<th id="numb-unload" nonclickable="true">Пункт погрузки<br>Пункт выгрузки</th>
<th id="desc">Описание груза</th>
<th id="wight">Вес</th>
<th id="vol">Объем</th>
<th id="type">Тип транспорта</th>
<th id="cost">Цена</th>
<th id="comm">Комментарии</th>
</tr>
<?php
foreach ($res as $row) {
$type = isset($GLOBALS['tzs_tr_types'][$row->trans_type]) ? $GLOBALS['tzs_tr_types'][$row->trans_type] : "";
?>
<tr rid="<?php
echo $row->id;
?>
">
<td><?php
echo $row->id;
?>
</td>
<td><b><?php
echo convert_date_no_year($row->time);
?>
</b><br/><?php
echo convert_time_only($row->time);
?>
</td>
<td><?php
//.........这里部分代码省略.........
示例5: handle_shutdown
/**
* Handle shutdown
*/
function handle_shutdown()
{
global $C;
echo "<!-- end of document -->";
print_errors();
}
示例6: print_errors
}
?>
</table>
<!--</div>-->
<?php
} else {
// If not logged in
?>
<div id="title">Meetup</div>
<?php
print_errors($error, $success);
?>
<table cellspacing="0">
<tr>
<th class="table_header">Welcome to Meetup!</th>
</tr>
<tr>
<th class="table_header">New here? <a href="register.php">Register</a> an account now!</th>
</tr>
<tr>
<th class="table_header">Returning user? <a href="login.php">Login</a>!</th>
</tr>
示例7: tzs_front_end_tables_reload
function tzs_front_end_tables_reload()
{
// Возвращаемые переменные
$output_info = '';
$output_error = '';
$output_tbody = '';
$output_pnav = '';
$lastrecid = 0;
$form_type = get_param_def('form_type', '');
$type_id = get_param_def('type_id', '0');
$rootcategory = get_param_def('rootcategory', '0');
$cur_type_id = get_param_def('cur_type_id', '0');
$cur_post_name = get_param_def('cur_post_name', '');
$p_title = get_param_def('p_title', '');
$page = get_param_def('page', '1');
$records_per_page = get_param_def('records_per_page', '' . TZS_RECORDS_PER_PAGE);
$record_pickup_time = get_option('t3s_setting_record_pickup_time', '30');
//$p_id = get_the_ID();
//$p_title = the_title('', '', false);
// Если указан параметр rootcategory, то выводим все товары раздела
// Иначе - товары категории
if ($rootcategory === '1' && $type_id === '0') {
$sql1 = ' AND type_id IN (' . tzs_build_product_types_id_str($cur_type_id) . ')';
$p_name = '';
} else {
//$sql1 = ' AND type_id='.$type_id;
$sql1 = '';
$p_name = get_post_field('post_name', $type_id);
}
if ($form_type === 'products') {
$sp = tzs_validate_pr_search_parameters();
} else {
$sp = tzs_validate_search_parameters();
}
$errors = $sp['errors'];
switch ($form_type) {
case 'products':
$pr_type_array = tzs_get_children_pages(TZS_PR_ROOT_CATEGORY_PAGE_ID);
$table_name = TZS_PRODUCTS_TABLE;
$table_error_msg = 'товаров';
$table_order_by = 'created';
$order_table_prefix = 'PR';
break;
case 'trucks':
$table_name = TZS_TRUCK_TABLE;
$table_error_msg = 'транспорта';
$table_order_by = 'time';
$table_prefix = 'tr';
$order_table_prefix = 'TR';
break;
case 'shipments':
$table_name = TZS_SHIPMENT_TABLE;
$table_error_msg = 'грузов';
$table_order_by = 'time';
$table_prefix = 'sh';
$order_table_prefix = 'SH';
break;
default:
array_push($errors, "Неверно указан тип формы");
}
if (count($errors) > 0) {
$output_error = print_errors($errors);
}
if (count($errors) == 0) {
if ($form_type === 'products') {
$s_sql = tzs_search_pr_parameters_to_sql($sp, '');
$s_title = tzs_search_pr_parameters_to_str($sp);
} else {
$s_sql = tzs_search_parameters_to_sql($sp, $table_prefix);
$s_title = tzs_search_parameters_to_str($sp);
}
$output_info = $p_title;
if (strlen($s_title) > 0) {
$output_info .= ' * ' . $s_title;
}
//$page = current_page_number();
global $wpdb;
//$url = current_page_url();
$pp = floatval($records_per_page);
$sql = "SELECT COUNT(*) as cnt FROM " . $table_name . " a WHERE active=1 {$sql1} {$s_sql};";
$res = $wpdb->get_row($sql);
if (count($res) == 0 && $wpdb->last_error != null) {
$output_error .= '<div>Не удалось отобразить список ' . $table_error_msg . '. Свяжитесь, пожалуйста, с администрацией сайта.<br>' . $sql . '<br>' . $wpdb->last_error . '</div>';
} else {
$records = $res->cnt;
$pages = ceil($records / $pp);
if ($pages == 0) {
$pages = 1;
}
if ($page > $pages) {
$page = $pages;
}
$from = ($page - 1) * $pp;
//$sql = "SELECT * FROM ".$table_name." WHERE active=1 $sql1 $s_sql ORDER BY ".$table_order_by." DESC LIMIT $from,$pp;";
// Хитрый запрос для отбора ТОП
$sql = "SELECT a.*,";
$sql .= " b.number AS order_number,";
$sql .= " b.status AS order_status,";
$sql .= " b.dt_pay AS order_dt_pay,";
$sql .= " b.dt_expired AS order_dt_expired,";
//.........这里部分代码省略.........
示例8: print_errors
echo '<p>' . $lang['i_problems'] . '</p>';
print_errors();
print_retry();
} elseif (!check_configs()) {
echo '<p>' . $lang['i_modified'] . '</p>';
print_errors();
} elseif (check_data($_REQUEST['d'])) {
// check_data has sanitized all input parameters
if (!store_data($_REQUEST['d'])) {
echo '<p>' . $lang['i_failure'] . '</p>';
print_errors();
} else {
echo '<p>' . $lang['i_success'] . '</p>';
}
} else {
print_errors();
print_form($_REQUEST['d']);
}
?>
</div>
<div style="clear: both">
<a href="http://dokuwiki.org/"><img src="lib/tpl/default/images/button-dw.png" alt="driven by DokuWiki" /></a>
<a href="http://www.php.net"><img src="lib/tpl/default/images/button-php.gif" alt="powered by PHP" /></a>
</div>
</body>
</html>
<?php
/**
* Print the input form
示例9: generate_timestamp
<?php
$endpoint = 'sandbox';
require_once './mturk.php';
// Calculate the request authentication parameters
$operation = "CreateHIT";
$title = "How's the weather?";
$description = 'Write a paragraph about the weather in your area.';
$keywords = "weather, fun, writing, vtcs5774";
$url = 'http://contextslices.kurtluther.com/weather.php';
$frame_height = 400;
// height of window, in pixels
$timestamp = generate_timestamp(time());
$signature = generate_signature($SERVICE_NAME, $operation, $timestamp, $AWS_SECRET_ACCESS_KEY);
// Construct the request
$url2 = $SERVICE_ENDPOINT . "?Service=" . urlencode($SERVICE_NAME) . "&Operation=" . urlencode($operation) . "&Title=" . urlencode($title) . "&Description=" . urlencode($description) . "&Keywords=" . urlencode($keywords) . "&Reward.1.Amount=0.25" . "&Reward.1.CurrencyCode=USD" . "&Question=" . urlencode(constructQuestion($url, $frame_height)) . "&AssignmentDurationInSeconds=3600" . "&LifetimeInSeconds=3600" . "&AutoApprovalDelayInSeconds=86400" . "&MaxAssignments=10" . "&Version=" . urlencode($SERVICE_VERSION) . "&Timestamp=" . urlencode($timestamp) . "&AWSAccessKeyId=" . urlencode($AWS_ACCESS_KEY_ID) . "&ResponseGroup.0=Minimal" . "&ResponseGroup.1=HITDetail" . "&QualificationRequirement.1.QualificationTypeId=00000000000000000071" . "&QualificationRequirement.1.Comparator=EqualTo" . "&QualificationRequirement.1.LocaleValue.Country=US" . "&QualificationRequirement.2.QualificationTypeId=000000000000000000L0" . "&QualificationRequirement.2.Comparator=GreaterThan" . "&QualificationRequirement.2.IntegerValue=90" . "&QualificationRequirement.3.QualificationTypeId=00000000000000000040" . "&QualificationRequirement.3.Comparator=GreaterThan" . "&QualificationRequirement.3.IntegerValue=50" . "&Signature=" . urlencode($signature);
// Make the request
$xml = simplexml_load_file($url2);
// Print any errors
if ($xml->OperationRequest->Errors) {
print_errors($xml->OperationRequest->Errors->Error);
}
$hitID = strval($xml->HIT->HITId);
if ($hitID != '') {
print "Created HIT " . $hitID . " on Amazon Mechanical Turk (" . $endpoint . ")...<br/>\n";
}
print "====================<br/>\n";
示例10: send_blast_email
function send_blast_email($binding, $req_info)
{
$delivery = create_delivery($req_info);
$handler = array();
$handler['mode'] = "insert";
$params = array("deliveries" => $delivery, "handler" => $handler);
try {
$res = $binding->writeDeliveries($params);
$res = normalize_result($res);
if (count($res) != 1) {
echo "Expecting only one result for writeDeliveries(), since we sent only one delivery.";
}
$res = $res[0];
if ($res->success) {
return true;
} else {
print_errors($res->errors);
return false;
}
} catch (SoapFault $ex) {
print_exception($binding, $ex);
return false;
}
}
示例11: print_errors
<div class="custom-error" id="input-txtfield-error">
<?php
print_errors('input-txtfield-error');
?>
</div>
<div class="form-group">
<label for="input-textarea">Textarea</label>
<textarea name="input-textarea" placeholder="Textarea" class="form-control" id="input-textarea"><?php
echo set_value('input-textarea') ? set_value('input-textarea') : "";
?>
</textarea>
</div>
<div class="custom-error" id="input-textarea-error">
<?php
print_errors('input-textarea-error');
?>
</div>
<div class="form-group">
<label>Radio button</label>
<br/>
<label>
<input type="radio" name="input-radio" value="1" <?php
echo set_radio('input-radio', 1);
?>
>R1
</label>
<label>
<input type="radio" name="input-radio" value="2" <?php
示例12: tzs_print_edit_image_form
function tzs_print_edit_image_form($errors)
{
$php_max_file_uploads = (int) ini_get('max_file_uploads');
if ($php_max_file_uploads > TZS_PR_MAX_IMAGES) {
$php_max_file_uploads = TZS_PR_MAX_IMAGES;
}
if (isset($_POST['image_id_lists']) && $_POST['image_id_lists'] !== '') {
$img_names = explode(';', $_POST['image_id_lists']);
} else {
$img_names = array();
}
$form_type = get_param('form_type');
$form_type_info = array('product' => array('product', TZS_PRODUCTS_TABLE, 'Товар/услуга', 'товаре/услуге', 'товар/услугу', 'товара/услуги'), 'auction' => array('auction', TZS_AUCTIONS_TABLE, 'Тендер', 'тендере', 'тендер', 'тендера'));
echo '<div style="clear: both;"></div>';
print_errors($errors);
?>
<div style="clear: both;"></div>
<div id="images_edit" style="width: 100%;">
<form enctype="multipart/form-data" method="post" id="fpost" class="pr_edit_form post-form" action="">
<div id="">
<!--h3>Изменение прикрепленных изображений</h3>
<hr/-->
<p>Наименование <?php
echo $_POST['form_type'] == 'product' ? 'товара/услуги' : 'тендера';
?>
: <strong>"<?php
echo $_POST['title'];
?>
"</strong> (Id=<?php
echo $_POST['id'];
?>
)</p>
<p>Допустимое кол-во изображений: <strong><?php
echo $php_max_file_uploads;
?>
</strong></p>
<p>Допустимый размер одного изображения: <strong>2 Мб</strong></p>
</div>
<div id="">
<table id="tbl_products" border='0'>
<tr>
<th id="wight">Номер изображения</th>
<th>Прикрепленное изображение</th>
<th id="wight">Удалить изображение</th>
<th>Новое изображение</th>
<th>Главное изображение</th>
</tr>
<?php
for ($i = 0; $i < $php_max_file_uploads; $i++) {
?>
<tr>
<td><?php
echo $i + 1;
?>
</td>
<?php
if (count($img_names) > 0 && $img_names[$i] !== null && $img_names[$i] !== '') {
$main_image_disabled = '';
$img_info = wp_get_attachment_image_src($img_names[$i], 'thumbnail');
?>
<td><img src="<?php
echo $img_info[0];
?>
" name="image_<?php
echo $i;
?>
" alt="Изображение №<?php
echo $i + 1;
?>
"></td>
<td><input type="checkbox" id="" name="del_image_<?php
echo $i;
?>
" <?php
if (isset($_POST["del_image_{$i}"])) {
echo 'checked="checked"';
}
?>
></td>
<td><input type="file" id="chg_image" name="chg_image_<?php
echo $i;
?>
" multiple="false" accept="image/*"></td>
<?php
} else {
$main_image_disabled = 'disabled="disabled"';
?>
<td><input type="file" id="add_image" name="add_image_<?php
echo $i;
?>
" multiple="false" accept="image/*"></td>
<td> </td>
<td> </td>
<?php
}
?>
<td>
<input type="radio" <?php
echo $main_image_disabled;
//.........这里部分代码省略.........
示例13: finished_content
function finished_content($params)
{
list($changed_prefs, $new_prefs, $errors) = $params;
// Give user some feedback; maybe something went down
$html = print_errors($errors);
if (empty($changed_prefs) && empty($new_prefs)) {
$html .= '<span class="label">There are no changes</span>';
} else {
$html .= print_changes('Change settings:', $changed_prefs);
$html .= print_changes('New settings:', $new_prefs);
}
return $html;
}
示例14: hasFilesModified
/**
* Loop thru all the patch files that will be overwitten or altered,
* to find out if they are modified by user. If it's modified, warn user.
* @access private
* @return true if there are files being modified
* false if no file is modified
* @author Cindy Qi Li
*/
function hasFilesModified()
{
$overwrite_modified_files = false;
$alter_modified_files = false;
$has_not_exist_files = false;
// no file action is defined, return nothing is modified (false)
if (!is_array($this->patch_array[files])) {
return false;
}
foreach ($this->patch_array[files] as $row_num => $patch_file) {
if ($patch_file["action"] == 'alter' || $patch_file["action"] == 'overwrite') {
if (!file_exists($patch_file['location'] . $patch_file['name'])) {
$not_exist_files .= $patch_file['location'] . $patch_file['name'] . '<br />';
$has_not_exist_files = true;
} else {
if ($this->isFileModified($patch_file['location'], $patch_file['name'])) {
if ($patch_file['action'] == 'overwrite') {
$overwrite_files .= realpath($patch_file['location'] . $patch_file['name']) . '<br />';
$overwrite_modified_files = true;
}
if ($patch_file['action'] == 'alter') {
$alter_files .= realpath($patch_file['location'] . $patch_file['name']) . '<br />';
$alter_modified_files = true;
}
}
}
}
}
if ($has_not_exist_files) {
$this->errors[] = _AC('update_local_file_not_exist') . $not_exist_files;
}
if ($overwrite_modified_files) {
$this->errors[] = _AC('updater_overwrite_modified_files') . $overwrite_files;
}
if ($alter_modified_files) {
$this->errors[] = _AC('updater_alter_modified_files') . $alter_files;
}
if (count($this->errors) > 0) {
if ($has_not_exist_files) {
$notes = '';
} else {
$notes = '
<form action="' . $_SERVER['PHP_SELF'] . '?id=' . $_POST['id'] . '&who=' . $_POST['who'] . '" method="post" name="skip_files_modified">
<div class="row buttons">
<input type="submit" name="yes" value="' . _AC('yes') . '" accesskey="y" />
<input type="submit" name="no" value="' . _AC('no') . '" />
<input type="hidden" name="install" value="' . $_POST['install'] . '" />
<input type="hidden" name="install_upload" value="' . $_POST['install_upload'] . '" />
<input type="hidden" name="ignore_version" value="' . $_POST['ignore_version'] . '" />
</div>
</form>';
}
print_errors($this->errors, $notes);
unset($this->errors);
return true;
}
return false;
}
示例15: print_errors
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="images/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="images/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="images/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="images/ico/apple-touch-icon-57-precomposed.png">
</head><!--/head-->
<body>
<?php
include_once 'header.php';
?>
<section id="form"><!--form-->
<div class="container">
<div class="row">
<?php
echo print_errors();
?>
<div class="col-sm-4 col-sm-offset-1">
<div class="login-form"><!--login form-->
<h2>Login to your account</h2>
<form action="login-validation" method="post">
<input name="email" type="email" placeholder="Email Address" />
<input name="password" type="password" placeholder="Password" />
<span>
<input type="checkbox" class="checkbox">
Keep me signed in
</span>
<button name="signin" type="submit" class="btn btn-default">Login</button>
</form>
</div><!--/login form-->