Poner checkboxes y radiobuttons en horizontal.

git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_FormulariosCalidad/trunk@14 e2c41b2c-0c6f-0149-8b81-50b1a9191bb3
This commit is contained in:
David Arranz 2011-03-21 14:33:48 +00:00
parent 635411b52b
commit e7bfe401f2
7 changed files with 247 additions and 200 deletions

View File

@ -254,8 +254,8 @@ Tipo de campo
<select class="select full" id="element_type" autocomplete="off" tabindex="12" onchange="set_properties(JJ(this).val(), 'type')">
<option value="text">Línea de texto</option>
<option value="textarea">Párrafo de texto</option>
<option value="radio">Selección múltiple</option>
<option value="checkbox">Cajas de selección</option>
<option value="radio">Botón de opciones</option>
<option value="checkbox">Casillas de selección</option>
<option value="select">Lista desplegable</option>
<option value="number">Número</option>
<option value="simple_name">Nombre</option>

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 787 B

After

Width:  |  Height:  |  Size: 807 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 783 B

After

Width:  |  Height:  |  Size: 751 B

View File

@ -483,13 +483,8 @@ EOT;
$guidelines = "<p class=\"guidelines\" id=\"guide_{$element->id}\"><small>{$element->guidelines}</small></p>";
}
$option_markup = '';
if($element->constraint == 'random'){
$temp = $element->options;
shuffle($temp);
$element->options = $temp;
}
$option_markup .= '<table width="582px" border="0">';
$cell_col = 1;
foreach ($element->options as $option){
@ -502,15 +497,34 @@ EOT;
//check for populated values
if(!empty($element->populated_value['element_'.$element->id]['default_value'])){
$checked = '';
if($element->populated_value['element_'.$element->id]['default_value'] == $option->id){
if($element->populated_value['element_'.$element->id]['default_value']
== $option->id){
$checked = 'checked="checked"';
}
}
$option_markup .= "<input id=\"element_{$element->id}_{$option->id}\" name=\"element_{$element->id}\" class=\"element radio\" type=\"radio\" value=\"{$option->id}\" {$checked} />\n";
$option_markup .= "<label class=\"choice\" for=\"element_{$element->id}_{$option->id}\">{$option->option}</label>\n";
$option_input = "<input id=\"element_{$element->id}_{$option->id}\"
name=\"element_{$element->id}\" class=\"element radio\"
type=\"radio\" value=\"{$option->id}\" {$checked} />";
$option_label = "<label class=\"choice\" for=\"element_{$element->id}_{$option->id}\">
{$option->option}</label>";
if ($cell_col == 1) {
$option_markup .= '<tr>';
}
$option_markup .= '<td width="20%">' . $option_input . ' ' . $option_label . '</td>';
if ($cell_col == 5) {
$option_markup .= '</tr>';
$cell_col = 0;
}
$cell_col++;
}
$option_markup .= "</table>";
$element_markup = <<<EOT
<li id="li_{$element->id}" {$error_class}>
<label class="description">{$element->title} {$span_required}</label>
@ -558,6 +572,9 @@ EOT;
$option_markup = '';
$option_markup .= '<table width="580px" border="0" cellpadding="0">';
$cell_col = 1;
foreach ($element->options as $option){
if(!$is_populated){
if($option->is_default){
@ -567,19 +584,37 @@ EOT;
}
}else{
if(!empty($element->populated_value['element_'.$element->id.'_'.$option->id]['default_value'])){
if(!empty($element->populated_value['element_'.$element->id.'_'
.$option->id]['default_value'])){
$checked = 'checked="checked"';
}else{
$checked = '';
}
}
$option_input = "<input id=\"element_{$element->id}_{$option->id}\"
name=\"element_{$element->id}_{$option->id}\"
class=\"element checkbox\" type=\"checkbox\" value=\"1\" {$checked} />";
$option_label = "<label class=\"choice\" for=\"element_{$element->id}_{$option->id}\">
{$option->option}</label>";
if ($cell_col == 1) {
$option_markup .= '<tr>';
}
$option_markup .= '<td width="35%">' . $option_input . ' ' . $option_label . '</td>';
if ($cell_col == 3) {
$option_markup .= '</tr>';
$cell_col = 0;
}
$cell_col++;
$option_markup .= "<input id=\"element_{$element->id}_{$option->id}\" name=\"element_{$element->id}_{$option->id}\" class=\"element checkbox\" type=\"checkbox\" value=\"1\" {$checked} />\n";
$option_markup .= "<label class=\"choice\" for=\"element_{$element->id}_{$option->id}\">{$option->option}</label>\n";
}
$option_markup .= '</table>';
$element_markup = <<<EOT
<li id="li_{$element->id}" {$error_class}>
<label class="description">{$element->title} {$span_required}</label>

View File

@ -3202,10 +3202,10 @@ data_source.prototype = {
title = "Lista desplegable";
break;
case "radio":
title = "Selección múltiple";
title = "Botón de opciones";
break;
case "checkbox":
title = "Cajas de selección";
title = "Casillas de selección";
break;
case "name":
title = "Nombre";
@ -3266,19 +3266,31 @@ data_source.prototype = {
default_value: "",
constraint: "",
options: [{
option: "Primera opción",
option: "Primera",
is_default: 0,
is_db_live: "0",
id: "0"
},
{
option: "Segunda opción",
option: "Segunda",
is_default: 0,
is_db_live: "0",
id: "0"
},
{
option: "Tercera opción",
option: "Tercera",
is_default: 0,
is_db_live: "0",
id: "0"
},
{
option: "Cuarta",
is_default: 0,
is_db_live: "0",
id: "0"
},
{
option: "Quinta",
is_default: 0,
is_db_live: "0",
id: "0"

View File

@ -1,14 +1,14 @@
<?php
/******************************************************************************
MachForm
Copyright 2007 Appnitro Software. This code cannot be redistributed without
permission from http://www.appnitro.com/
More info at: http://www.appnitro.com/
******************************************************************************/
session_start();
require('config.php');
require('includes/check-session.php');
require('includes/db-core.php');
@ -16,21 +16,21 @@
require('includes/helper-functions.php');
connect_db();
$rows_per_page = 10;
//check for id parameter, if exist, populate the pageno automatically
if(!empty($_GET['id'])){
$form_id = (int) trim($_GET['id']);
$query = "select form_id from `ap_forms` order by form_id asc";
$result = do_query($query);
while($row = do_fetch_result($result)){
$form_id_lookup[] = (int) $row['form_id'];
}
$form_id_chunks = array_chunk($form_id_lookup,$rows_per_page);
foreach ($form_id_chunks as $key=>$value){
$index_key = array_search($form_id,$value,true);
if($index_key !== false){
@ -39,29 +39,29 @@
}
}
}
//check for form delete parameter
if(!empty($_GET['delete'])){
$deleted_form_id = (int) trim($_GET['delete']);
delete_form($deleted_form_id);
}
//check for form duplicate parameter
if(!empty($_GET['duplicate'])){
$target_form_id = (int) trim($_GET['duplicate']);
$result_form_id = duplicate_form($target_form_id);
if(!empty($result_form_id)){
$_SESSION['AP_SUCCESS']['title'] = 'Completado';
$_SESSION['AP_SUCCESS']['desc'] = 'Formulario duplicado.';
header("Location: manage_form.php?id={$result_form_id}");
exit;
}
}
/****Pagination *************/
//get page number for pagination
if(!empty($pageno_auto)){
@ -71,36 +71,36 @@
}else{
$pageno = 1;
}
//identify how many database rows are available
$query = "select count(*) total_row from `ap_forms`";
$result = do_query($query);
$row = do_fetch_result($result);
$numrows = $row['total_row'];
$lastpage = ceil($numrows/$rows_per_page);
//ensure that $pageno is within range
//this code checks that the value of $pageno is an integer between 1 and $lastpage
$pageno = (int)$pageno;
if ($pageno < 1) {
if ($pageno < 1) {
$pageno = 1;
}
elseif ($pageno > $lastpage){
$pageno = $lastpage;
}
//construct the LIMIT clause for the sql SELECT statement
if(!empty($numrows)){
$limit = 'LIMIT ' .($pageno - 1) * $rows_per_page .',' .$rows_per_page;
}
/*****End Pagination code *******/
/*****End Pagination code *******/
//get form list
$query = "select form_id,form_name,form_active,form_email from `ap_forms` order by form_id asc $limit";
$result = do_query($query);
@ -109,16 +109,16 @@
while($row = do_fetch_result($result)){
$form_list[$i]['form_id'] = $row['form_id'];
$form_list[$i]['form_name'] = $row['form_name'];
$form_list[$i]['form_active'] = $row['form_active'];
$form_list[$i]['form_active'] = $row['form_active'];
if(!empty($row['form_email'])){
$form_list[$i]['form_email'] = $row['form_email'];
$form_list[$i]['form_email'] = $row['form_email'];
}else{
$form_list[$i]['form_email'] = 'nadie';
$form_list[$i]['form_email'] = 'nadie';
}
$form_id_array[] = $row['form_id'];
$i++;
}
//get total entries for each form
foreach ($form_id_array as $form_id){
//get all time entries
@ -126,20 +126,20 @@
$result = do_query($query);
$row = do_fetch_result($result);
$entries[$form_id]['total'] = $row['total_entry'];
//get todays entries
$query = "select count(*) today_entry from `ap_form_{$form_id}` where date_created >= date_format(curdate(),'%Y-%m-%d 00:00:00') ";
$result = do_query($query);
$row = do_fetch_result($result);
$entries[$form_id]['today'] = $row['today_entry'];
//get latest entry timing
$query = "select date_created from `ap_form_{$form_id}` order by id desc limit 1";
$result = do_query($query);
$row = do_fetch_result($result);
$entries[$form_id]['latest_entry'] = relative_date($row['date_created']);
}
$header_data =<<<EOT
<script type="text/javascript" src="js/base.js"></script>
<script type="text/javascript" src="js/rico.js"></script>
@ -158,98 +158,98 @@
}
</style>
<script language="javascript" type="text/javascript">
function disable_form(form_id){
var progress_image = $('progress_image_' + form_id);
progress_image.style.visibility = "visible";
$('activation_link_' + form_id).innerHTML = 'Procesando...';
$('activation_link_' + form_id).href = '#';
var url = 'ajax_form_activation.php';
var pars = 'form_id=' + form_id + '&operation=disable';
var myAjax = new Ajax.Request( url, { method: 'post', parameters: pars, onComplete: showResponseDisabled });
}
function showResponseDisabled(originalRequest){
var response = originalRequest.responseText;
$('form_status_' + response).innerHTML = 'Desactivado';
$('image_status_' + response).src = 'images/icons/disabled.gif';
$('activation_link_' + response).innerHTML = 'Activar este formulario';
$('activation_link_' + response).href = 'javascript: enable_form(' + response + ')';
var progress_image = $('progress_image_' + response);
progress_image.style.visibility = "hidden";
new Effect.Highlight('form_status_' + response,{duration:1});
}
function enable_form(form_id){
var progress_image = $('progress_image_' + form_id);
progress_image.style.visibility = "visible";
$('activation_link_' + form_id).innerHTML = 'Procesando...';
$('activation_link_' + form_id).href = '#';
var url = 'ajax_form_activation.php';
var pars = 'form_id=' + form_id + '&operation=enable';
var myAjax = new Ajax.Request( url, { method: 'post', parameters: pars, onComplete: showResponseEnabled });
}
function showResponseEnabled(originalRequest){
var response = originalRequest.responseText;
$('form_status_' + response).innerHTML = 'Activado';
$('image_status_' + response).src = 'images/icons/checkbox.gif';
$('activation_link_' + response).innerHTML = 'Desactivar este formulario';
$('activation_link_' + response).href = 'javascript: disable_form(' + response + ')';
var progress_image = $('progress_image_' + response);
progress_image.style.visibility = "hidden";
new Effect.Highlight('form_status_' + response,{duration:1});
}
</script>
new Effect.Highlight('form_status_' + response,{duration:1});
}
</script>
EOT;
//delete a form, definition, entries and uploaded files
function delete_form($form_id){
//remove from ap_forms
//remove from ap_forms
$query = "delete from `ap_forms` where form_id='$form_id'";
do_query($query);
//remove from ap_form_elements
$query = "delete from `ap_form_elements` where form_id='$form_id'";
do_query($query);
//remove from ap_element_options
$query = "delete from `ap_element_options` where form_id='$form_id'";
do_query($query);
//remove from ap_column_preferences
$query = "delete from `ap_column_preferences` where form_id='$form_id'";
do_query($query);
//remove review table
$query = "drop table if exists `ap_form_{$form_id}_review`";
do_query($query);
//remove the actual table
$query = "drop table if exists `ap_form_{$form_id}`";
do_query($query);
//remove form folder
//remove form folder
@full_rmdir(UPLOAD_DIR."/form_{$form_id}");
if(DATA_DIR != UPLOAD_DIR){
@full_rmdir(DATA_DIR."/form_{$form_id}");
@ -259,7 +259,7 @@ EOT;
//duplicate a form
function duplicate_form($form_id){
//set the new name
$query = "select form_name,form_review from `ap_forms` where form_id='$form_id'";
$result = do_query($query);
@ -267,137 +267,137 @@ EOT;
$form_review = $row['form_review'];
$form_name = trim($row['form_name']);
$form_name .= " Copy";
//get new form_id
$query = "select max(form_id)+1 new_form_id from `ap_forms`";
$result = do_query($query);
$row = do_fetch_result($result);
$new_form_id = trim($row['new_form_id']);
//insert into ap_forms table
$query = "select * from `ap_forms` where form_id='{$form_id}'";
$result = do_query($query);
$i = 0;
$columns = array();
$fields_num = mysql_num_fields($result);
while($i < $fields_num){
$meta = mysql_fetch_field($result, $i);
if(($meta->name != 'form_id') && ($meta->name != 'form_name')){
$columns[] = $meta->name;
}
$i++;
}
//build the query string
$columns_joined = implode(",",$columns);
$form_name = mysql_real_escape_string($form_name);
$form_name = mysql_real_escape_string($form_name);
//insert to ap_forms
$query = "insert into
`ap_forms`(form_id,form_name,{$columns_joined})
select
{$new_form_id},'{$form_name}',{$columns_joined}
from
`ap_forms`
where
$query = "insert into
`ap_forms`(form_id,form_name,{$columns_joined})
select
{$new_form_id},'{$form_name}',{$columns_joined}
from
`ap_forms`
where
form_id='$form_id'";
do_query($query);
//create the new table
do_query("create table `ap_form_{$new_form_id}` like `ap_form_{$form_id}`");
//copy ap_form_elements table
$query = "select * from `ap_form_elements` limit 1";
$result = do_query($query);
$i = 0;
$columns = array();
$fields_num = mysql_num_fields($result);
while($i < $fields_num){
$meta = mysql_fetch_field($result, $i);
if($meta->name != 'form_id'){
$columns[] = $meta->name;
}
$i++;
}
$columns_joined = implode("`,`",$columns);
$query = "insert into
`ap_form_elements`(form_id,`{$columns_joined}`)
select
{$new_form_id},`{$columns_joined}`
from
`ap_form_elements`
where
$query = "insert into
`ap_form_elements`(form_id,`{$columns_joined}`)
select
{$new_form_id},`{$columns_joined}`
from
`ap_form_elements`
where
form_id='$form_id'";
do_query($query);
//copy ap_element_options table
$query = "select * from `ap_element_options` limit 1";
$result = do_query($query);
$i = 0;
$columns = array();
$fields_num = mysql_num_fields($result);
while($i < $fields_num){
$meta = mysql_fetch_field($result, $i);
if(($meta->name != 'form_id') && ($meta->name != 'aeo_id')){
$columns[] = $meta->name;
}
$i++;
}
$columns_joined = implode("`,`",$columns);
$query = "insert into
`ap_element_options`(form_id,`{$columns_joined}`)
select
{$new_form_id},`{$columns_joined}`
from
`ap_element_options`
where
$query = "insert into
`ap_element_options`(form_id,`{$columns_joined}`)
select
{$new_form_id},`{$columns_joined}`
from
`ap_element_options`
where
form_id='$form_id'";
do_query($query);
//copy ap_column_preferences table
$query = "select * from `ap_column_preferences` limit 1";
$result = do_query($query);
$i = 0;
$columns = array();
$fields_num = mysql_num_fields($result);
while($i < $fields_num){
$meta = mysql_fetch_field($result, $i);
if(($meta->name != 'form_id') && ($meta->name != 'acp_id')){
$columns[] = $meta->name;
}
$i++;
}
$columns_joined = implode("`,`",$columns);
$query = "insert into
`ap_column_preferences`(form_id,`{$columns_joined}`)
select
{$new_form_id},`{$columns_joined}`
from
`ap_column_preferences`
where
$query = "insert into
`ap_column_preferences`(form_id,`{$columns_joined}`)
select
{$new_form_id},`{$columns_joined}`
from
`ap_column_preferences`
where
form_id='$form_id'";
do_query($query);
//copy ap_form_xx_review table if exists
if(!empty($form_review)){
do_query("CREATE TABLE `ap_form_{$new_form_id}_review` like `ap_form_{$form_id}_review`");
}
//create form folder
$old_mask = umask(0);
mkdir(DATA_DIR."/form_{$new_form_id}",0777);
@ -407,13 +407,13 @@ EOT;
}
mkdir(UPLOAD_DIR."/form_{$new_form_id}/files",0777);
umask($old_mask);
//copy css file
//copy css file
copy(DATA_DIR."/form_{$form_id}/css/view.css",DATA_DIR."/form_{$new_form_id}/css/view.css");
return $new_form_id;
}
?>
<?php require('includes/header.php'); ?>
@ -431,29 +431,29 @@ EOT;
<?php
<?php
$i=($pageno -1) * $rows_per_page + 1;
$first_row_number = $i;
if(!empty($form_list)){
echo '<div id="accordionDiv">';
foreach ($form_list as $data){
if(!empty($data['form_active'])){
$form_status = 'Activado';
echo '<div id="accordionDiv">';
foreach ($form_list as $data){
if(!empty($data['form_active'])){
$form_status = 'Activado';
$image_status = 'checkbox.gif';
$activation_text = 'Desactivar este formulario';
$activation_link = 'disable_form';
}else{
$form_status = 'Desactivado';
}else{
$form_status = 'Desactivado';
$image_status = 'disabled.gif';
$activation_text = 'Activar este formulario';
$activation_link = 'enable_form';
};
?>
};
?>
<div id="overviewPanel">
<div id="overviewHeader" class="accordionTabTitle">
<h3><?php echo "$i.&nbsp; {$data['form_name']}" ?></h3>
@ -465,7 +465,7 @@ EOT;
<td width="9%"><a href="<?php echo "edit_form.php?id={$data['form_id']}"; ?>"><img src="images/icons/edit_form_32.gif" /></a></td>
<td width="9%"><a href="<?php echo "edit_css.php?id={$data['form_id']}"; ?>"><img src="images/icons/colorize_32.gif" /></a></td>
<td width="9%"><a href="<?php echo "email_settings.php?id={$data['form_id']}"; ?>"><img src="images/icons/mail_forward_32.gif" /></a></td>
<?php /*<td width="9%"><a href=" < ? p h p echo "embed_code.php?id={$data['form_id']}"; ? > "><img src="images/icons/embed_code_32.gif" /></a></td>*/ ?>
<td width="9%"><a href="<?php echo "embed_code.php?id={$data['form_id']}"; ?>"><img src="images/icons/embed_code_32.gif" /></a></td>
<td width="9%">&nbsp;</td>
<td width="9%"><a href="view.php?id=<?php echo $data['form_id']; ?>" target="_blank"><img src="images/icons/view_form_32.gif" /></a></td>
<td width="21%">&nbsp;</td>
@ -477,54 +477,54 @@ EOT;
<td><a href="<?php echo "edit_form.php?id={$data['form_id']}"; ?>">Editar form.</a></td>
<td nowrap><a href="<?php echo "edit_css.php?id={$data['form_id']}"; ?>">Editar estilo</a></td>
<td nowrap><a href="<?php echo "email_settings.php?id={$data['form_id']}"; ?>">Emails</a></td>
<?php /*<td nowrap><a href=" < ? p h p echo "embed_code.php?id={$data['form_id']}"; ? > ">Código</a></td> */ ?>
<td nowrap><a href="<?php echo "embed_code.php?id={$data['form_id']}"; ?>">Código</a></td>
<td>&nbsp;</td>
<td><a href="view.php?id=<?php echo $data['form_id']; ?>" target="_blank">Ver formulario</a></td>
<td>&nbsp;</td>
<td><a href="<?php echo "manage_form.php?duplicate={$data['form_id']}"; ?>">Duplicar</a></td>
<td><a href="manage_form.php?pageno=<?php echo $pageno; ?>&delete=<?php echo $data['form_id']; ?>" onclick="javascript: return confirm('Este formulario y sus respuestas se eliminarán. ¿Desea continuar?');">Borrar</a></td>
</tr>
</table>
</table>
<div style="clear:both; padding-left: 10px; padding-top: 10px">
Respuestas de hoy: <strong><?php echo $entries[$data['form_id']]['today']; ?></strong><br>
Total de respuestas: <strong><?php echo $entries[$data['form_id']]['total']; ?></strong><br><br>
Última respuesta: <strong><?php echo $entries[$data['form_id']]['latest_entry']; ?></strong><br>
<div id="edit_form_email_text_<?php echo $data['form_id']; ?>" style="margin-top: 15px;display:block">
Las notificaciones se enviarán a: <strong><span id="form_email_name_box_<?php echo $data['form_id']; ?>"><?php echo $data['form_email']; ?></span></strong>
</div>
Estado del formulario:
Estado del formulario:
<strong><span id="form_status_<?php echo $data['form_id']; ?>"><?php echo $form_status; ?></span></strong>&nbsp;&nbsp;<img id="image_status_<?php echo $data['form_id']; ?>" align="absmiddle" src="images/icons/<?php echo $image_status; ?>" />&nbsp;&nbsp;&nbsp;<a id="activation_link_<?php echo $data['form_id']; ?>" href="javascript: <?php echo $activation_link; ?>(<?php echo $data['form_id']; ?>)" style="text-decoration: none; border-bottom: 1px dotted #000"><?php echo $activation_text; ?></a>
&nbsp;&nbsp;<img id="progress_image_<?php echo $data['form_id']; ?>" align="absmiddle" src="images/loader-red.gif" style="visibility: hidden"/>
</div>
</div>
</div>
<?php
<?php
$i++;
}
}
$last_row_number = --$i;
if(!empty($active_tab_auto)){
$active_tab = $active_tab_auto;
}else{
$active_tab = 0;
}
echo '</div>';
echo '<script type="text/javascript">';
echo 'new Rico.Accordion( $(\'accordionDiv\'), {panelHeight:200,expandedBg: \'#4B75B3\',collapsedBg: \'#4B75B3\',hoverBg: \'#3661A1\', onLoadShowTab: '.$active_tab.'} );';
echo '</script>';
echo '</script>';
}else{
echo "<div style=\"height: 200px; text-align: center;padding-top: 70px\"><h2>No hay formularios.</h2></div>";
}
?>
?>
@ -532,22 +532,22 @@ EOT;
<!-- start paging div -->
<div id="paging" >
<br>
<?php
<?php
if(!empty($lastpage))
{
if ($pageno != 1)
if ($pageno != 1)
{
if($lastpage > 19){
if($lastpage > 19){
echo " <a href='{$_SERVER['PHP_SELF']}?pageno=1'>&lt;&lt;First</a> ";
}
$prevpage = $pageno-1;
}
}
//middle navigation
if($pageno == 1){
$i=1;
@ -564,7 +564,7 @@ EOT;
echo ' ... ';
}
}elseif ($pageno == $lastpage){
if(($lastpage - 19) > 1){
echo ' ... ';
$i=1;
@ -591,18 +591,18 @@ EOT;
$i++;
}
}
}else{
$next_pages = false;
$prev_pages = false;
if(($lastpage - ($pageno + 9)) >= 1){
$next_pages = true;
}
if(($pageno - 9) > 1){
$prev_pages = true;
}
if($prev_pages){ //if there are previous pages
echo ' ... ';
if($next_pages){ //if there are next pages
@ -620,7 +620,7 @@ EOT;
}
echo ' ... ';
}else{
$i=1;
$j=$pageno - 9;
while(($i<=19) && ($j <= $lastpage)){
@ -633,9 +633,9 @@ EOT;
$i++;
$j++;
}
}
}
}else{ //if there aren't previous pages
$i=1;
while(($i<=19) && ($i <= $lastpage)){
if($i != $pageno){
@ -645,26 +645,26 @@ EOT;
}
echo " <a href='{$_SERVER['PHP_SELF']}?pageno=$i' $active_style>$i</a> ";
$i++;
}
if($next_pages){
echo ' ... ';
}
}
}
if ($pageno != $lastpage)
if ($pageno != $lastpage)
{
$nextpage = $pageno+1;
if($lastpage > 19){
echo " <a href='{$_SERVER['PHP_SELF']}?pageno=$lastpage'>Last&gt;&gt;</a> ";
}
}
//next we inform the user of his current position in the sequence of available pages
?>
<div class="footer">