function add($item) { $id = is_object($item) ? $item->ID : $item; $ghost = new GhostPage(); $ghost->setField('ParentID', $id); $ghost->setField('LinkedPageID', $this->ownerObj->ID); $ghost->setField('URLSegment', $this->ownerObj->URLSegment); $ghost->write(); }
require "../helper/class.paginate.php"; require "../helper/class.Bcrypt.php"; require "../helper/nocsrf.php"; require "../helper/secure_validation.php"; //get page $url = $_GET['page']; // vars start $pag = NULL; $janela = ""; $la = ""; $content[0] = ""; $content[1] = ""; //Start crud $crud = new crud(); //views load $page = new GhostPage(); $page->templatefile = "../view/AuthAdmin.html"; $page->varnamelist = "titulo,conteudo"; // item per pagination limit $items = 22; session_start(); // load auth match condition include "../helper/auth_match.php"; //load file functions include "../helper/file_ops.php"; //load func validate include "../helper/validate_ops.php"; switch ($url) { case "auth": $form = new form(); $values = array('Login:text' => 'user: nick name', 'Senha:password' => 'pass:4321');