Ejemplo n.º 1
0
<?php

session_start();
require '../../../../Slim/Slim.php';
\Slim\Slim::registerAutoloader();
$db = new modules\admin\category\model\DBCategory();
$fn = new \libs\functions();
if ($db->insertCategory($fn->prepareArrayDoublePointer($_POST, false))) {
    print true;
}
Ejemplo n.º 2
0
<?php

$action = new \libs\functions();
$endereco = $action->BPath();
var_dump($endereco);
?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
    <meta charset="utf-8">
    <!-- This file has been downloaded from Bootsnipp.com. Enjoy! -->
    <title>DOM - Admin</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!--link global-->
    <link href="<?php 
echo $endereco;
?>
includes/css/bootstrap.min.css" rel="stylesheet">
    <link href="<?php 
echo $endereco;
?>
includes/bootflat/css/bootflat.min.css" rel="stylesheet">
    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<!--    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.min.css">-->
<!--    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.print.css">-->


    <!-- link especifico -->
    <link href="<?php 
echo $endereco;
?>
Ejemplo n.º 3
0
<?php

require '../../../../Slim/Slim.php';
\Slim\Slim::registerAutoloader();
$db = new \modules\admin\user\models\DBUser();
$fn = new \libs\functions();
var_dump($_POST);
$db->insertUser($fn->prepareArrayDoublePointer($_POST, false));
Ejemplo n.º 4
0
$app = new \Slim\Slim(array('templates.path' => 'modules')); // retorna a instancia
$app->config(array('debug'=>'true'));



//--------------------------------------
//teste
\libs\autoUpdate::on();

//--------------------------------------


// instanciações de libs
$signIn = new \libs\login;
$user = new \libs\user;
$action = new \libs\functions;

// dados que é enviado comummente para todos as paginas renderizadas
$data = array('actions' => $action, 'file'=>new \libs\file, "user" => $user);



// funções anonymas para as rotas:.

$authentication = function(\Slim\Route $route) use ($data, $action){
    $app = \Slim\Slim::getInstance();

    if(isset($route->getParams()['page']))
        if($action->filterRoutes($route->getParams()['page'])){
            //iniciaizando a session para false
            if(!isset($_SESSION["auth"]))
Ejemplo n.º 5
0
<?php

include 'modules/site/widgets/header.php';
$artigo = new modules\admin\artigos\model\DBArtigos();
$fn = new libs\functions();
?>
    <style type="text/css">
        .fb_hidden{ position:absolute;
            top:-10000px;
            z-index:10001
        }
        .cp-post-content{

        }
    </style>

    <body>
<?php 
include 'modules/site/widgets/menu.php';
?>

    <!-- Main Featured Slider -->

    <div class="cp-featured-news-slider owl-slider-principal">
        <?php 
foreach ($artigo->getLast('all', 4) as $slArt) {
    ?>
            <div class="item">
                <div class="cp-post-content">
                    <div class="catname"><a class="btn btn-lorange waves-effect waves-button" href="<?php 
    echo $site;
Ejemplo n.º 6
0
<?php

$action = new \libs\functions();
$endereco = $action->urlPath();
?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
    <meta charset="utf-8">
    <!-- This file has been downloaded from Bootsnipp.com. Enjoy! -->
    <title>Portal Livre</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <script src="<?php 
echo $endereco;
?>
includes/js/jquery-1.11.2.min.js"></script>
    <script src="<?php 
echo $endereco;
?>
admin/includes/js/material.min.js"></script>
    <script src="<?php 
echo $endereco;
?>
includes/js/extends.jquery.js"></script>
    <script src="<?php 
echo $endereco;
?>
includes/js/requests.ajax.js"></script>
    <script src="<?php 
echo $endereco;
Ejemplo n.º 7
0
<?php

/*
 * 1 = imagem do slider inicial do site
 *
 * */
session_start();
require '../../../../Slim/Slim.php';
\Slim\Slim::registerAutoloader();
$db = new \modules\admin\colunista\model\DBColunista();
$fn = new \libs\functions();
$_POST['id_user'] = $_SESSION['user']['id_user'];
//caso de tudo certo ele fala lá que ta ok!!
if ($db->insertColunista($fn->prepareArrayDoublePointer($_POST, false))) {
    print true;
}
Ejemplo n.º 8
0
<?php

$action = new \libs\functions();
$endereco = $action->BPath();
$site = $action->urlSite();
?>
<!DOCTYPE html>
<!-- saved from url=(0040)http://html.crunchpress.com/materialmag/ -->
<html lang="pt-br"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Este é um portal de noticias da paraiba feito por alunos da UFPB - Universidade Federal da Paraiba, Joerverson é show ;)">
    <link rel="shortcut icon" href="<?php 
echo $endereco;
?>
includes/img/favicon.ico" type="image/x-icon">
    <title>Portal Livre</title>
    <!--link global-->
    <link href="<?php 
echo $endereco;
?>
includes/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
    <!-- Font Awesome CSS -->

    <!-- CSS especifico -->
    <link href="<?php 
echo $endereco;
?>
includes/css/custom.css" rel="stylesheet">
Ejemplo n.º 9
0
<?php

session_start();
require '../../../../Slim/Slim.php';
\Slim\Slim::registerAutoloader();
$db = new modules\admin\artigos\model\DBArtigos();
$fn = new \libs\functions();
if ($_POST['edit'] != "false") {
    if (!empty($_FILES['img']['name'])) {
        if (move_uploaded_file($_FILES['img']['tmp_name'], '../../../includes/img/projects/' . time() . '_' . $_FILES['img']['name'])) {
            $_POST['img'] = time() . '_' . $_FILES['img']['name'];
        }
    }
    unset($_POST['edit']);
    $id = $_POST['id'];
    unset($_POST['id']);
    if ($_POST['cat_artigo'] == -1) {
        $_POST['cat_artigo'] = $_POST['old_cat'];
        unset($_POST['old_cat']);
    } else {
        unset($_POST['old_cat']);
    }
    if ($db->updateArticle($fn->generateQuerySqlUpdatePDO("artigos", $_POST, $id, "id_artigo")) != '00000') {
        unlink('../../../includes/img/projects/' . time() . '_' . $_FILES['img']['name']);
    }
    exit;
}
//removendo coisas desnecessarias que vinheram no post.. por causa do edit.......
unset($_POST['edit']);
unset($_POST['id']);
unset($_POST['old_cat']);