<?php require_once "Memo.php"; require_once "security.php"; HTML("action_header"); $e2del = explode(",", $IDS); foreach ($e2del as $k => $v) { if (!empty($v)) { $o = newobject("data_object", $v); $death_name = $o->nombre; if (checkSecurity($o)) { if ($o->delete()) { echo _("{$o->nombre} : elemento borrado ") . $o->WARNING; } else { echo _("{$o->nombre} : elemento no borrado") . $o->ERROR; } frameReload("fbody"); } else { echo _("No tiene premisos para esta acción."); } } } HTML("action_footer");
$data = file_get_contents("php://input"); // Decode data from js $decoded = json_decode($data); // Si la seguridad está activa if ($jwt_enabled) { // Carga el jwt_helper // if (file_exists('../../../jwt_helper.php')) { // require_once '../../../jwt_helper.php'; // } else { // require_once 'jwt_helper.php'; // } // Las funciones en el if no necesitan usuario logged if ($decoded == null && ($_GET["function"] != null && ($_GET["function"] == 'getPosts' || $_GET["function"] == 'getTemas'))) { $token = ''; } else { checkSecurity(); } } if ($decoded != null) { if ($decoded->function == 'createPost') { createPost($decoded->post); } else { if ($decoded->function == 'createTema') { createTema($decoded->tema); } else { if ($decoded->function == 'updatePost') { updatePost($decoded->post); } else { if ($decoded->function == 'updateTema') { updateTema($decoded->tema); } else {
$guids = $gauth->listAll("groupname"); $external_data = array("gid" => $guids, "uid" => $uuids); $p = newObject("data_object", $ID); $p->inode = $inode; if (empty($p->uid)) { $p->uid = BILO_uid(); } if (empty($type)) { $type = $p->type; } else { $p->type = $type; } if (!BILO_isAdmin()) { $p->security_option = disabled; } if (checkSecurity($p)) { formAction("action_save.php", "footer", "editForm"); $p->boton0 = gfxBotonAction("Guardar", "getElementById('editForm').submit()", True); debug("type of edit element: {$type} ", "red"); if ($type == "archive") { plantHTML($p, "add_form", $external_data); } else { if ($type == "folder") { plantHTML($p, "add_folder", $external_data); } } formClose(); } else { frameWrite("footer", _("Insufficient privileges.")); require 'list.php'; }
protected function __construct($class, $fnc) { try { if ($this->permisssions[$class][$fnc] > -1) { checkSecurity(); validateRol($this->permisssions[$class][$fnc]); } } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; } if (!isset($this->db)) { $this->db = new MysqliDb('192.185.4.175', 'arielces_ac', 'aT9?aVvnZgAM', 'arielces_ac'); // $this->db = new MysqliDb ('127.0.0.1', 'root', 'concentrador', 'arielces_bayres'); } }
HTML("action_header"); $e2del = explode(",", $IDS); echo "Copiando..."; if ($_SESSION["memo"]["clipboard"]["action"] == "copy") { foreach ($_SESSION["memo"]["clipboard"]["ID"] as $k => $v) { $orig = newObject("data_object", $v); if (checkReadSecurity($v)) { echo " {$orig->nombre}"; $new = newObject("data_object", 1); if (!$new->save_copy($orig, $inode)) { echo " <strong>" . $new->ERROR . "</strong> "; } } else { echo "Denegado"; } } } else { if ($_SESSION["memo"]["clipboard"]["action"] == "cut") { foreach ($_SESSION["memo"]["clipboard"]["ID"] as $k => $v) { if (checkSecurity($v)) { $orig = newObject("data_object", $v); $orig->inode = $inode; $orig->save(); echo $orig->ERROR; } } } } unset($_SESSION["memo"]["clipboard"]); frameReload("fbody"); HTML("action_footer");