Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Let's debug our code and start buffering
- error_reporting(E_ALL);
- ob_start();
- // Check the principal directory, if it exists, run the start and connect core
- if (!is_dir("pg-core/"))
- die ('<center><b>No existe el directorio pg-core/ y es requerido</b></center>');
- include('pg-core/start-core.php');
- include('pg-core/connect-core.php');
- // Call start core and connect core
- $start = new Start();
- $conn = new Connect();
- // Check directories, import config
- $start->check_dir(array('pg-required', 'install'));
- $conn->Import('pg-required/config.php');
- // Now, check the installation
- $start->check_install();
- // Let's get the post and autor ID
- $pid = (isset($_GET['post'])) ? $_GET['post'] : false;
- $aid = (isset($_GET['usu'])) ? $_GET['usu'] : false;
- // Reg per page
- $rpp = $conn->reg_pp();
- //If is set a page and is not number value, send error
- if ($start->check_pag('pag')) {
- if (!$start->is_num('pag')) {
- include('includes/themes/'.$conn->theme_dir().'error.php');
- }else{
- $pag = $_GET['pag'];
- $from = ($pag - 1) * $rpp;
- }
- }else{
- $pag = 1;
- $from = 0;
- }
- // Let's destroy objects and send the buffer
- unset($start);
- unset($conn);
- ob_end_flush();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement