Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ob_start();
- /* Let's debug our code */
- error_reporting(E_ALL);
- /* Variables de los directorios a usar */
- $def_path = 'default/';
- $req_path = 'required/';
- $adm_path = 'admin/';
- $inc_path = 'includes/';
- /* Checar si existen los directorios y algunos archivos
- para proceder*/
- if (!is_dir($def_path)) {
- die('<center><b>No existe el directorio '.$def_path.' y es requerido</b></center>');
- }
- if (!is_dir($req_path)) {
- die('<center><b>No existe el directorio '.$req_path.' y es requerido</b></center>');
- }
- if (!is_dir($adm_path)) {
- die('<center><b>No existe el directorio '.$adm_path.' y es requerido</b></center>');
- }
- if (!is_dir($inc_path)) {
- die('<center><b>No existe el directorio '.$inc_path.' y es requerido</b></center>');
- }
- if (!file_exists($req_path.'func_prin.php')) {
- die('<center><b>No existe el archivo "'.$req_path.'func_prin.php" y es requerido</b></center>');
- }
- /* Si no existe la instalacion... */
- if (!file_exists($req_path.'config.php')) {
- header('Location: '.$def_path.'instalar/index.php');
- }else{
- $reg_x_pag = 10;
- $post_id = (isset($_GET['post'])) ? $_GET['post'] : false;
- $autor_id = (isset($_GET['usu'])) ? $_GET['usu'] : false;
- if (isset($_GET['pag'])) {
- if (!is_numeric($_GET['pag'])) {
- include('includes/themes/'.theme_dir().'error.php');
- }else{
- $pag = $_GET['pag'];
- $desde = ($pag - 1) * $reg_x_pag;
- }
- }else{
- $pag = 1;
- $desde = 0;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement