xml_output = $xml_output; $this->tag_name = NULL; $this->page_title = NULL; $this->content = NULL; $this->content_title = NULL; $this->page_name = NULL; $this->language = NULL; $this->offers = NULL; $this->novelties = NULL; $this->novelties_title = "novedades"; $this->extra_element1 = NULL; $this->extra_element2 = NULL; $this->extra_element3 = NULL; $this->extra_element4 = NULL; $this->path_prefix = NULL; } /* ************************************************************************************** // Método para dibujar la página, recibe un array con los nombres // de archivo XML que debe abrir para procesar si el atributo $xml_output // es true, en otro caso no usa el atributo ************************************************************************************** */ function draw ( $arr_xml_files, $content = NULL ) { include_once( INCLUDE_PATH . "xml_parser.inc.php" ); $xml_data = get_xml_contents( $arr_xml_files ); $this->page_name = $xml_data["page_name"]; $this->content = $xml_data["content"]; $this->content_title = $xml_data["content_title"]; $this->language = $xml_data["language"]; $this->offers = $xml_data["offers"]; $this->novelties = $xml_data["novelties"]; $this->extra_element1 = $xml_data["extra_element1"]; $this->extra_element2 = $xml_data["extra_element2"]; $this->extra_element3 = $xml_data["extra_element3"]; $this->extra_element4 = $xml_data["extra_element4"]; $this->path_prefix = HTTP_HOST; // Ejecuta el método de clase que dibuja la página // usando los atributos de clase respectivas $this->draw_page( $content ); } /* ************************************************************************************** // Método que dibuja propiamente la página // Usa el atributo de clase $xml_output para determinar si se usa // o no XML para generar contenidos // Usa directamente los atributos de clase: // $page_title; // Variable para mantener el título de la página // $content; // Variable para mantener el contenido // $content_title; // Variable para mantener el título del contenido // $page_name; // Variable para mantener el nombre del archivo de la página // $language; // Variable para mantener el lenguaje que se desea usar para los contenidos // $offers; // Variable para mantener los contenidos de ofertas // $novelties; // Variable para mantener los contenidos de novedades // $novelties_title; // Variable para mantener el título de novedades // $extra_element1; // Variable para mantener extra contenidos // $extra_element2; // Variable para mantener extra contenidos // $extra_element3; // Variable para mantener extra contenidos // $extra_element4; // Variable para mantener extra contenidos // para dibujar contenidos dinámicos... ************************************************************************************** */ function draw_page ( $content ) { // Se setea el atributo de clase page_title a su valor por defecto // Se puede variar el título por ejemplo en función del lenguage $this->page_title = "EERSA :: Internet a su servicio"; // Se imprimen y setean las variables con los contenidos de los layers de la página include_once( DOCUMENT_ROOT . "/include/class_sessions.inc.php" ); $access = new class_sessions(); print ( $this->html_head() ); new class_layer( "header", "1", "0", "0", "765", "101", $this->header_layer() ); include_once ( INCLUDE_PATH . "/class_mysql.inc.php" ); $mysql = new class_mysql(); $str_sql = "SELECT description FROM m_gnrl_novelties ORDER BY id DESC LIMIT 0, 3"; $novelties = $mysql->query( $str_sql ); $num_regs = mysql_num_rows( $novelties ); if ( $num_regs > 0 ) { $this->novelties = ""; $count = 1; while ( $novelty = mysql_fetch_object( $novelties ) ) { $this->novelties .= $novelty->description; if ( $count < $num_regs ) $this->novelties .= "
"; $count++; } } if ( isset( $access->vars["sess_access_level"] ) ) { $this->novelties = $this->admin_layer( $access->vars["sess_usr_depts"] ); $this->novelties_title = "administración"; } new class_layer( "content", "6", "0", "101", "765", "275", $this->content_layer( $content ) ); // Se dibuja el layer de la fecha $date = new class_dater( "457", "82", "" ); $date->spanish(); print ( $this->html_foot() ); // Retorna true por convensión return true; } /* ************************************************************************************** // INICIO Métodos para dibujar las partes de las páginas ************************************************************************************** */ function html_head() { $retval = "" . "\n"; $retval .= "" . "\n"; $retval .= "" . "\n"; $retval .= "" . $this->page_title . "" . "\n"; $retval .= "" . "\n"; $retval .= "" . "\n"; /* inicio script de navidad $retval .= "" . "\n"; /* fin script de navidad */ $retval .= "" . "\n"; $retval .= "path_prefix . "/stylesheets/eersastyle.css\" rel=\"stylesheet\" type=\"text/css\">" . "\n"; $retval .= "" . "\n"; $retval .= "" . "\n"; // $retval .= "" . "\n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; return $retval; } // // // function providers_layer() { $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; return $retval; } // // // function informative_layer() { $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; return $retval; } // // // function contacts_layer() { $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; return $retval; } // // // function content_layer( $content ) { if ( $content != NULL ) { $this->content_title = $content[0]; $this->content = $content[1]; } $retval .= "
\n"; $retval .= "
\n"; /// Banner de imágenes /* guirnalda */ $retval .= " \n"; /* */ /// // $retval .= "
\n"; // $retval .= "
\n"; return $retval; } // // // function header_layer() { $retval = "
\n"; $retval .= " path_prefix . "/eersa.php?page=admin/admin\"> \n"; $retval .= " \n"; $retval .= "
\n"; $retval .= " \n"; /// Layer del chimborazo $retval .= "
\n"; $retval .= "
\n"; //// $retval .= "
\n"; $retval .= "
\n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= "
\n"; return $retval; } // // // function services_layer() { $retval .= "
 servicios
  path_prefix . "/admin/billing.php\">Consulta Facturación
  ATENCION RECLAMOS
  path_prefix . "/cortes2009/index.php\">ENERGIA NOVIEMBRE 09
  path_prefix . "/services/rates_sheet.php\">Pliego Tarifario
  path_prefix . "/eersa.php?page=informative/requierements\">Requisitos \n"; $retval .= "
 proveedores
  path_prefix . "/providers/suscriptions.php?int_option=1\">suscripción
  path_prefix . "/providers/competitions.php\">concursos y adquisiciones
 informativo
  path_prefix . "/eersa.php\">inicio
  path_prefix . "/charts/shareholders.php\">accionistas
  path_prefix . "/eersa.php?page=informative/directory\">el directorio \n"; $retval .= "
  path_prefix . "/eersa.php?page=informative/agencies\">centros de recaudación \n"; $retval .= "
  path_prefix . "/stats.php\">estadísticas
  path_prefix . "/eersa.php?page=informative/requierements\">requisitos
  path_prefix . "/eersa.php?page=informative/history\">historia
  path_prefix . "/eersa.php?page=informative/flowchart\">organigrama
  path_prefix . "/admin/projects_admin.php\">proyectos
  path_prefix . "/eersa.php?page=informative/aboutus\">acerca de \n"; $retval .= " la EERSA
 contactos
  path_prefix . "/eersa.php?page=contacts/emailform\">contactos
  path_prefix . "/contacts/comments.php?int_option=1\">comentarios
  path_prefix . "/eersa.php?page=contacts/complaints\">quejas / denuncias
  path_prefix . "/eersa.php?page=contacts/links\">otros links
\n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= "
 
\n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $arr_wide_pages = array( "stats.php", "shareholders.php", "stats_admin.php" ); $script_name = basename( $_SERVER["PHP_SELF"] ); if ( !in_array( $script_name, $arr_wide_pages ) ) { $retval .= " \n"; } $retval .= " \n"; $retval .= "
\n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= "
\n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= "
\n"; $retval .= " \n"; $retval .= " \n"; $retval .= $this->services_layer(); $retval .= $this->informative_layer(); $retval .= $this->providers_layer(); $retval .= $this->contacts_layer(); $retval .= " \n"; $retval .= "
\n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= "
\n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= "
\n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= "
" . $this->content . "
Larrea 2260 y Primera \n"; $retval .= " Constituyente
\n"; $retval .= " Riobamba - Ecuador
\n"; $retval .= " 593 3 2 960 283
\n"; $retval .= " e-mail@eersa.com.ec
\n"; $retval .= $this->billing_layer(); $retval .= $this->novelties_layer(); $retval .= "
\n"; $retval .= "
 
\n"; $retval .= "
\n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= "
\n"; $retval .= " \n"; $retval .= " \"Experiencia\n"; $retval .= "
\n"; $retval .= "
\n"; return $retval; } // // // function admin_layer( $arr_usr_depts ) { $admin_data = NULL; // Para Root if ( in_array( "-1", $arr_usr_depts ) ) { $admin_data .= "Usuarios
"; $admin_data .= "Departamentos
"; $admin_data .= "Estadísticas
"; $admin_data .= "Proyectos
"; $admin_data .= "Cometarios
"; $admin_data .= "Denuncias
"; $admin_data .= "Novedades
"; $admin_data .= "Suspensiones
"; $admin_data .= "Concursos
"; $admin_data .= "Suscripciones
"; $arr_usr_depts = false; $arr_usr_depts[0] = -1; } foreach( $arr_usr_depts as $dept ) { switch( $dept ) { case 1: // Stats admin $admin_data .= "estadísticas
"; break; case 2: // Projects admin $admin_data .= "proyectos
"; break; case 3: // Comments admin $admin_data .= "cometarios
"; break; case 4: // Complaints admin $admin_data .= "denuncias
"; break; case 5: // Novelties admin $admin_data .= "novedades
"; break; case 6: // Suspensions admin $admin_data .= "suspensiones
"; break; case 7: // Concursos admin $admin_data .= "concursos
"; break; case 8: // Suscripciones admin $admin_data .= "suscripciones
"; break; } } $admin_data .= "
Salir
"; return $admin_data; } // // // function billing_layer() { /* $retval = " \n"; */ $retval = " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= "
\n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= "
  \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= "
cuenta:
\n"; $retval .= " \n"; $retval .= "
su \n"; $retval .= " número de cuenta es el que aparece \n"; $retval .= " en "CÓDIGO DE CLIENTE" \n"; $retval .= " en su factura de consumo, o el mismo número \n"; $retval .= " con el que normalmente cancela su planilla \n"; $retval .= " en ventanilla.
 
\n"; return $retval; } // // // function novelties_layer() { $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= "
\n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= "
  \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= "
" . $this->novelties . "
\n"; $retval .= "
 
\n"; return $retval; } // // // function html_foot() { $retval = " \n"; $retval .= " \n"; $retval .= " \n"; $retval .= "" . "\n"; $bill_pages = array( "billing.php" ); $script_name = basename( $_SERVER["PHP_SELF"] ); if ( in_array( $script_name, $bill_pages ) ) { $retval .= "\n"; $retval .= "\n"; $retval .= "\n"; $retval .= "\n"; } $retval .= "" . "\n"; return $retval; } /* ************************************************************************************** // FIN Métodos para dibujar las partes de las páginas ************************************************************************************** */ function item_class( $page_name ) { $resp = $page_name; return $resp; } } // closes class_page definition ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // FIN DE LA DEFINICIÖN DE CLASE cPage ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// class class_layer { var $lay_id; var $lay_z_index; var $lay_left; var $lay_top; var $lay_width; var $lay_height; var $lay_content; var $lay_visibility; var $lay_bgcolor; /* ************************************************************************************** // Constructor // Setea los atributos de clase a los valores por defecto o enviados como // parámetros ************************************************************************************** */ function class_layer( $id = "Layer", $z_index = "1", $left = "10", $top = "10", $width = "200", $height = "100", $content = NULL, $visibility = NULL, $bgcolor = NULL ) { $this->lay_id = $id; $this->lay_z_index = $z_index; $this->lay_left = $left; $this->lay_top = $top; $this->lay_width = $width; $this->lay_height = $height; $this->lay_content = $content; $this->visibility = $visibility; $this->lay_bgcolor = $bgcolor; // Dibuja el layer $this->draw_layer(); } /* ************************************************************************************** // Método para Dibujar un layer en pantalla // Retorna el contenido del archivo XML pasado como argumento en $file ************************************************************************************** */ function draw_layer() { // Se setean las propiedades y contenido del layer $layer = "\n"; $layer .= "\n"; $layer .= "
lay_z_index . "; "; $layer .= "left: " . $this->lay_left . "; "; $layer .= "top: " . $this->lay_top . "; "; $layer .= "width:" . $this->lay_width . "px; "; $layer .= "height:" . $this->lay_height . "px; "; if ( $this->visibility != NULL ) $layer .= "visibility:" . $this->visibility . "; "; if ( $this->lay_bgcolor != NULL ) $layer .= "background: #" . $this->lay_bgcolor . "; "; $layer .= "'>\n"; if ( $this->lay_content != NULL ) $layer .= $this->lay_content; else $layer .= "¡Aviso! Este layer se ha dibujado sin contenidos"; $layer .= "\n
\n"; $layer .= "\n\n"; // Dibuja el layer echo $layer; // Retorna true por convensión return true; } } // closes the cLayer class definition /////////////////////////////////////////////////////////////////////////////////////////// // // cDater.inc.php - Class for writing the current date // /////////////////////////////////////////////////////////////////////////////////////////// // // This module writes the current date.inc.php including the day of week and month in text // using a Layer for positioning it in the page // // Author: // Paul F. Bernal B. // // Last modification on marck/06/2003 // // Copyright (c) 2002 EasyTeck www.easyteck.com // /////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////// // // Class for writing the current date in spanish and english // /////////////////////////////////////////////////////////////////////////////////////////// // // This submodule gets the current date and transforms it to a spanish format // // Functions: // constructor dater() // string spanish() // string english() // // Observations: // - The class works only if the function "date()" is used to request // the day and month values with "D" and "F" corresponding argumensts // which gets the day and month in text format // /////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////// // // cDater.inc.php - Class for writing the current date // /////////////////////////////////////////////////////////////////////////////////////////// // // This module writes the current date.inc.php including the day of week and month in text // using a Layer for positioning it in the page // // Author: // Paul F. Bernal B. // // Last modification on marck/06/2003 // // Copyright (c) 2002 EasyTeck www.easyteck.com // /////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////// // // Class for writing the current date in spanish and english // /////////////////////////////////////////////////////////////////////////////////////////// // // This submodule gets the current date and transforms it to a spanish format // // Functions: // constructor dater() // string spanish() // string english() // // Observations: // - The class works only if the function "date()" is used to request // the day and month values with "D" and "F" corresponding argumensts // which gets the day and month in text format // /////////////////////////////////////////////////////////////////////////////////////////// class class_dater { var $layer_bgcolor; var $layer_width; var $layer_height; var $layer_top; var $layer_left; /////////////////////////////////////////////////////////////////////////////////////////// // // constructor dater () // /////////////////////////////////////////////////////////////////////////////////////////// // // constructor for the dater object sets the class properties default values // /////////////////////////////////////////////////////////////////////////////////////////// // // Params: // $left - layer's left margin value // $top - layer's top margin value // $bgcolor - layer's background color value // $width - layer's width value for the // $height - layer's height value for the date // /////////////////////////////////////////////////////////////////////////////////////////// // // Return value: // none // /////////////////////////////////////////////////////////////////////////////////////////// // // Global references: // none // /////////////////////////////////////////////////////////////////////////////////////////// function class_dater( $left = "7", $top = "7", $bgcolor = "CCDDFF", $width = "300", $height = "15" ) { $this->layer_left = $left; $this->layer_top = $top; $this->layer_bgcolor = $bgcolor; $this->layer_width = $width; $this->layer_height = $height; } /////////////////////////////////////////////////////////////////////////////////////////// // // string spanish () // /////////////////////////////////////////////////////////////////////////////////////////// // // Writes the complete current date in spanish format // /////////////////////////////////////////////////////////////////////////////////////////// // // Params: // none // /////////////////////////////////////////////////////////////////////////////////////////// // // Return value: // string containing the complete current date in a layer // /////////////////////////////////////////////////////////////////////////////////////////// // // Global references: // none // /////////////////////////////////////////////////////////////////////////////////////////// function spanish () { // Inicialize the $resp variable used to return the spanish date string $resp = ""; // Request the current day and month $day = date("D"); $month = date("F"); // Assigns the spanish description for the day of week switch ($day) { case "Mon": $day = "Lunes"; break; case "Tue": $day = "Martes"; break; case "Wed": $day = "Miércoles"; break; case "Thu": $day = "Jueves"; break; case "Fri": $day = "Viernes"; break; case "Sat": $day = "Sábado"; break; case "Sun": $day = "Domingo"; break; } // Begins creating the returned spanish string with the day of week and the day number // Assigns the spanish description for the month of year switch ($month) { case "January": $month = "Enero"; break; case "February": $month = "Febrero"; break; case "March": $month = "Marzo"; break; case "April": $month = "Abril"; break; case "May": $month = "Mayo"; break; case "June": $month = "Junio"; break; case "July": $month = "Julio"; break; case "August": $month = "Agosto"; break; case "September": $month = "Sept."; break; case "October": $month = "Octubre"; break; case "November": $month = "Noviembre"; break; case "December": $month = "Diciembre"; break; } // Assigns the rest of the date string with month name and numeric year $date = "Riobamba, " . $day . " " . date ("d") . " de " . $month . " de " . date ("Y"); // Creates the Layer containing the date string $resp = "\n"; $resp .= "\n"; $resp .= "-->\n"; $resp .= "
" . "\n"; $resp .= "

" . $date . "

\n"; $resp .= "
" . "\n"; $resp .= "\n\n"; // Drwas the date layer echo $resp; // Returns true return true; } /////////////////////////////////////////////////////////////////////////////////////////// // // string english () // /////////////////////////////////////////////////////////////////////////////////////////// // // Writes the complete current date in english format // /////////////////////////////////////////////////////////////////////////////////////////// // // Params: // none // /////////////////////////////////////////////////////////////////////////////////////////// // // Return value: // string containing the complete current date in a layer // /////////////////////////////////////////////////////////////////////////////////////////// // // Global references: // none // /////////////////////////////////////////////////////////////////////////////////////////// function english () { // Inicialize the $resp variable used to return the spanish date string $resp = ""; // Request the current day and month $day = date("l"); $month = date("F"); // Creates the returned english string with the complete current date $date = $day . ", " . $month . " " . date ("d") . " " . date ("Y"); $resp = "\n"; $resp .= "\n"; $resp .= "-->\n"; $resp .= "
" . "\n"; $resp .= "

" . $date . "

\n"; $resp .= "
" . "\n"; $resp .= "\n\n"; // Drwas the date layer echo $resp; // Returns true return true; } }// closes the cDater class definition ?>