Example #1
0
<?php

require '../../../../Slim/Slim.php';
\Slim\Slim::registerAutoloader();
$db = new modules\admin\artigos\model\DBArtigos();
$fn = new \libs\functions();
if ($db->deleteArticle($_POST['id']) == "00000") {
    print json_encode(array("status" => "ok"), JSON_FORCE_OBJECT);
}
Example #2
0
<?php

session_start();
require '../../../../Slim/Slim.php';
\Slim\Slim::registerAutoloader();
$db = new modules\admin\artigos\model\DBArtigos();
$fn = new \libs\functions();
if (isset($_POST['itens'])) {
    print json_encode($db->getLast($_POST['cat'], $_POST['itens']), JSON_FORCE_OBJECT);
} else {
    print json_encode($db->getLast($_POST['cat'], 3), JSON_FORCE_OBJECT);
}
Example #3
0
<?php

require '../../../../Slim/Slim.php';
\Slim\Slim::registerAutoloader();
$db = new \modules\admin\artigos\model\DBArtigos();
$fn = new \libs\functions();
print json_encode($db->findArtigos($_POST['search']), JSON_FORCE_OBJECT);
Example #4
0
<?php

session_start();
require '../../../../Slim/Slim.php';
\Slim\Slim::registerAutoloader();
$db = new modules\admin\artigos\model\DBArtigos();
$fn = new \libs\functions();
print json_encode($db->getArtigoById($_POST['id']), JSON_FORCE_OBJECT);
Example #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;
Example #6
0
<?php

include "modules/admin/widgets/header.php";
include "modules/admin/widgets/sidebar.php";
$db = new modules\admin\artigos\model\DBArtigos();
?>

<!-- Square card -->
<style>
    .demo-card-square.mdl-card {
        width: 320px;
        height: 320px;
    }
    .demo-card-square > .mdl-card__title {
        color: #fff;
        background:url('<?php 
echo $endereco;
?>
includes/img/lendo.jpg') bottom right 15% no-repeat #46B6AC;
    }
    .demo-card-wide.mdl-card {
        width: 512px;
    }
    .demo-card-wide > .mdl-card__title {
        color: #fff;
        height: 176px;

    }

    .mdl-card__title input, .mdl-card__title textarea{
        color: #1c1c1c;
Example #7
0
<?php

include 'modules/site/widgets/header.php';
$artigo = new modules\admin\artigos\model\DBArtigos();
$fn = new libs\functions();
$art = $artigo->getArtigoById($id);
?>
<style type="text/css">
    body{ overflow-x: hidden;
    }
    .img-header{
        overflow-y: hidden;
        height:300px;
    }
    .content-text{
        padding: 0 100px 100px;
    }
    </style>

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

<!-- Main Featured Slider -->


<!-- Main Featured End -->
<div class="row">
    <div class="col-md-12">
        <div class="img-header" style="background: url(<?php 
Example #8
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']);