Advertisement
Guest User

syntax error, unexpected ';', expecting

a guest
Sep 24th, 2012
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.88 KB | None | 0 0
  1. <?php
  2. require('config.php');
  3. if(!($con=@mysql_connect(G_SERVIDOR,G_USUARIO,G_CLAVE))){
  4.     echo"<h2>Error al conectar a la base de datos</h2><p>Verifique el archivo <code>/config.php</code></p>";   
  5.     exit();
  6. }
  7. if (!@mysql_select_db(G_BASEDATOS)){
  8.     echo "<h2>Error al seleccionar la base de datos</h2><p>Verifique el archivo <code>/config.php</code></p>";  
  9.     exit();
  10. }
  11. function tabla_existe($nombre_tb) {
  12. $tablas = mysql_query("SHOW TABLES") ;
  13. while (list($tabla) = mysql_fetch_array($tablas)) {
  14. if ($nombre_tb == $tabla){
  15. return true;
  16. break;
  17. }
  18. }
  19. return false;
  20.  
  21. }
  22. if (!tabla_existe("opciones",G_BASEDATOS)) {
  23.     header('Location: admin/install.php');
  24.     exit();
  25. }else {
  26.     //definicion de variables globales que se usaran en todo el gestor
  27.     if ( !defined('ABSPATH') )
  28.         define('ABSPATH', dirname(__FILE__) . '/');
  29.    
  30.     //llamar a clase con las opciones basica del sitio
  31.     require(ABSPATH."script/class/rm_opciones.class.php");
  32.    
  33.     //enlaces amigables
  34.     define('G_ENL_AMIG', $objOpcion->obtener_valor(1,'enlaceamigable'));
  35.    
  36.     //nombre del servidor http
  37.     define('G_SERVER', $objOpcion->obtener_valor(1,'direccion_url'));
  38.    
  39.     //tema usado o guardado en cookies
  40.     if(isset($_COOKIE['_ribosoma_style'])){
  41.         define('G_ESTILO', $_COOKIE['_ribosoma_style']);
  42.     }else{
  43.         define('G_ESTILO', $objOpcion->obtener_valor(1,'tema'));
  44.     }
  45.    
  46.     //valores titulo y descripcion
  47.     define('G_TITULO', $objOpcion->obtener_valor(1,'nombresitio'));
  48.     define('G_SUBTITULO', $objOpcion->obtener_valor(1,'descripcion'));
  49.    
  50.     //informacion sobre meta tags
  51.     define('G_METAKEYWORDS', $objOpcion->obtener_valor(1,'meta_keywords'));
  52.     define('G_METADESCRIPTION', $objOpcion->obtener_valor(1,'meta_description'));
  53.    
  54.     //variable global para sesion activa
  55.     session_name('_ribapp');
  56.     session_start();
  57.    
  58.     if(isset($_SESSION['usr']) and isset($_SESSION['pwd'])) define('G_ACCESOUSUARIO',1);
  59.     else define('G_ACCESOUSUARIO',0);
  60.  
  61. }
  62. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement