Beispiel #1
0
<?php

define("IN_PHP", true);
require_once 'includes/config.php';
require_once 'includes/classes/Mysql.php';
require_once 'includes/classes/DBTreeManager.php';
$db = new MySQL($dbHost, $dbUsername, $dbPassword, $dbName);
$treeManager = new DBTreeManager($db);
if (isset($_POST['id']) && is_numeric($_POST['id'])) {
    $out = $treeManager->showTooltip($_POST['id']);
    echo $out;
}
Beispiel #2
0
<?php

define("IN_PHP", true);
require_once 'includes/config.php';
require_once 'includes/classes/Mysql.php';
require_once 'includes/classes/DBTreeManager.php';
$db = new MySQL($dbHost, $dbUsername, $dbPassword, $dbName);
$treeManager = new DBTreeManager($db);
if (isset($_POST['id']) && is_numeric($_POST['id'])) {
    $out = $treeManager->setDefault($_POST['id']);
    if ($out) {
        echo $_POST['id'];
    }
}
Beispiel #3
0
<?php

define("IN_PHP", true);
require_once 'includes/config.php';
require_once 'includes/classes/Mysql.php';
require_once 'includes/classes/DBTreeManager.php';
$db = new MySQL($dbHost, $dbUsername, $dbPassword, $dbName);
$treeManager = new DBTreeManager($db);
$out = '';
if (isset($_POST['id'])) {
    $action = 'UPDATE';
    foreach ($_POST as $k => $v) {
        if ($k == 'id') {
            if (!is_numeric($v)) {
                $action = 'INSERT';
            }
            continue;
        }
        $out = $treeManager->setNews($_POST['id'], $k, $v, $action);
    }
    echo $out;
}
 * junto com este programa, se não, acesse o Portal do Software Público Brasileiro no endereço
 * www.softwarepublico.gov.br ou escreva para a Fundação do Software Livre(FSF)
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA
 * */
include "../../administrador/conexao.php";
include "../../classes/Connection.php";
include "../../administrador/class.phpmailer.php";
include "../../classes/Session.php";
include "../../classes/Base.php";
include "../../classes/BasePDOException.php";
include "../../classes/Usuario.php";
include "../../classes/Unidade.php";
include "../../classes/Documento.php";
include "../../classes/LogError.php";
include "includes/classes/DBTreeManager.php";
$treeManager = new DBTreeManager();
function checkVariable($string)
{
    return str_replace(array('&', '"', "'", '<', '>'), array('&amp;', '&quot;', '&apos;', '&lt;', '&gt;'), $string);
}
if (isset($_REQUEST['action']) && !empty($_REQUEST['action'])) {
    $action = $_REQUEST['action'];
} else {
    die(FAILED);
}
$out = NULL;
switch ($action) {
    case "insertElement":
        /**
         * insert new element
         */
Beispiel #5
0
<?php

define("IN_PHP", true);
require_once 'includes/config.php';
require_once 'includes/classes/Mysql.php';
require_once 'includes/classes/DBTreeManager.php';
$db = new MySQL($dbHost, $dbUsername, $dbPassword, $dbName);
$treeManager = new DBTreeManager($db);
if (isset($_POST['id']) && is_numeric($_POST['id'])) {
    $out = $treeManager->deleteImage($_POST['id']);
    echo $out;
}
Beispiel #6
0
<?php

define("IN_PHP", true);
require_once 'includes/config.php';
require_once 'includes/classes/Mysql.php';
require_once 'includes/classes/DBTreeManager.php';
$db = new MySQL($dbHost, $dbUsername, $dbPassword, $dbName);
$treeManager = new DBTreeManager($db);
if (isset($_POST['id']) && is_numeric($_POST['id'])) {
    $id = $_POST['id'];
    $action = $_POST['action'];
    $visible = $action == "hide" ? 0 : 1;
    $out = $treeManager->imageShowHide($id, $visible);
    echo $out;
}
Beispiel #7
0
<?php

define("IN_PHP", true);
require_once 'includes/config.php';
require_once 'includes/classes/Mysql.php';
require_once 'includes/classes/DBTreeManager.php';
$db = new MySQL($dbHost, $dbUsername, $dbPassword, $dbName);
$treeManager = new DBTreeManager($db);
$html = '';
if (isset($_POST['id']) && is_numeric($_POST['id'])) {
    $result = $treeManager->getArticle($_POST['id']);
    if (mysql_num_rows($result) === 1) {
        $row = mysql_fetch_assoc($result);
        $article = array('id' => $row['id'], 'title' => $row['title'], 'path' => $row['path']);
        $filename = '../articles/' . $article['path'] . '.html';
        $html = file_get_contents($filename);
    }
}
echo $html;