brutalzinn brutalzinn  • 21.09.17 12:15

「helpHB」Brain CMS Painel para Arcturus  Empty 「helpHB」Brain CMS Painel para Arcturus 21.09.17 12:15

    Pedir ajuda
    Olá Convidado, estou com um problema. Me ajude?
    O meu problema é o seguinte: Olá galera, precisei trocar de emulador e decidi fazer uma mudança crítica: ir para um emulador mais estável que o plus, então escolhi justamente o arcturus que possui a maioria das coisas fixadas. Enfim, porém, ele é todo diferente, os duckets e os diamantes ficam salvos em uma tabela chamdaa users_currency e isso já causa uma dificuldade enorme de conseguir fazer o editor da cms funcionar.

    este é o código do editor da cms:

    <?php

    require_once('sanitize.php');

    if(!defined('BRAIN_CMS'))
    {
    die('Sorry but you cannot access this file!');
    }
    /*
    Functions list Class Admin.
    ---------------
    error();
    gelukt();
    CheckRank();
    staffpin();
    staffCheck();
    UpdateUser();
    UpdateUserOfTheWeek();
    UpdateNews();
    searchUser();
    searchUserOfTheWeek();
    EditUser();
    EditUserOfTheWeek();
    EditNews();
    LookSollie();
    DeleteNews();
    DeleteSollie();
    DeleteBans();
    PostNews();
    */
    Class Admin
    {
    public static function error($errorName)
    {
    echo "<div class=\"alert alert-block alert-danger \"><strong>" . $errorName . "</div>";
    }
    public static function gelukt($errorName)
    {
    echo "<div class=\"alert alert-block alert-success \"><strong>" . $errorName . "</div>";
    }
    public static function CheckRank($rank)
    {
    global $config;
    {
    if (User::userData('rank') <= $rank)
    {
    header('Location: '.$config['hotelUrl'].'/index');
    exit();
    }
    }
    }
    public static function UpdateUser()
    {
    global $dbh;
    if (isset($_POST['update']))
    {
    $upateUser = $dbh->prepare("UPDATE users SET
    motto=:motto,
    username=:name,
    mail=:mail,
    credits=:credits,
    vip_points=:vip_points,
    activity_points=:activity_points,
    teamrank=:teamrank,
    rank=:rank
    WHERE username = :name");
    $upateUser->bindParam(':motto', $_POST['motto']);
    $upateUser->bindParam(':name', $_POST['naam']);
    $upateUser->bindParam(':mail', $_POST['mail']);
    $upateUser->bindParam(':credits', $_POST['credits']);
    $upateUser->bindParam(':vip_points', $_POST['vip_points']);
    $upateUser->bindParam(':activity_points', $_POST['activity_points']);
    $upateUser->bindParam(':teamrank', $_POST['teamrank']);
    $upateUser->bindParam(':rank', $_POST['rank']);
    $upateUser->execute();
    Admin::gelukt("De gebruiker is opgeslagen!");
    }
    }
    public static function UpdateUserOfTheWeek()
    {
    global $dbh;
    if (isset($_POST['update']))
    {
    $getUserData = $dbh->prepare("SELECT id,username FROM users WHERE username = :name");
    $getUserData->bindParam(':name', $_POST['naam']);
    $getUserData->execute();
    $upateUser2 = $getUserData->fetch();
    if ($upateUser = $dbh->prepare("UPDATE uotw SET userid=:userdata,text=:txt"))
    {
    $upateUser->bindParam(':userdata', $upateUser2['id']);
    $upateUser->bindParam(':txt', $_POST['uftwtext']);
    $upateUser->execute();
    Admin::gelukt("De gebruiker heeft nu UOTW");
    }
    else
    {
    Admin::error("Niet gelukt!");
    }
    }
    }
    public static function UpdateNews()
    {
    global $dbh;
    if (isset($_POST['update']))
    {
    $editNews = $dbh->prepare("UPDATE cms_news SET
    id=:id,
    title=:title,
    shortstory=:shortstory,
    longstory=:longstory,
    image=:topstory
    WHERE id = :id");
    $editNews->bindParam(':title', $_POST['title']);
    $editNews->bindParam(':shortstory', $_POST['shortstory']);
    $editNews->bindParam(':topstory', $_POST['topstory']);
    $editNews->bindParam(':longstory', $_POST['longstory']);
    $editNews->bindParam(':id', $_POST['id']);
    $editNews->execute();
    Admin::gelukt("Nieuws bericht aangepast!");
    }
    }
    public static function searchUser()
    {
    global $dbh,$config;
    if(isset($_POST['zoek'])) {
    $searchUser = $dbh->prepare("SELECT * FROM users WHERE username = :user");
    $searchUser->bindParam(':user', $_POST['user']);
    $searchUser->execute();
    if ($searchUser->RowCount() == 1)
    {
    Admin::gelukt('Gebruiker '.$_POST['user'].' gevonden! Klik <a href ="'.$config['hotelUrl'].'/adminpan/gebruiker/'.$_POST['user'].'">hier</a> om naar zijn account te gaan.');
    }
    else
    {
    Admin::error("Gebruiker ".$_POST['user']." niet gevonden!");
    }
    }
    }
    public static function searchUserOfTheWeek()
    {
    global $dbh,$config;
    if(isset($_POST['zoek'])) {
    $searchUser = $dbh->prepare("SELECT * FROM users WHERE username = :user");
    $searchUser->bindParam(':user', $_POST['user']);
    $searchUser->execute();
    if ($searchUser->RowCount() == 1)
    {
    Admin::gelukt(''.$_POST['user'].' gevonden! Klik <a href ="'.$config['hotelUrl'].'/adminpan/giveuseroftheweek/'.$_POST['user'].'">hier</a> om deze gebruiker Brain van de week te geven!');
    }
    else
    {
    Admin::error("Gebruiker ".$_POST['user']." niet gevonden!");
    }
    }
    }
    public static function EditUser($variable)
    {
    global $dbh;
    if (isset($_GET['user'])) {
    $getUser = $dbh->prepare("SELECT * FROM users WHERE username=:username LIMIT 1");
    $getUser->bindParam(':username', $_GET['user']);
    $getUser->execute();
    if ($getUser->RowCount() == 1)
    {
    $user = $getUser->fetch();
    return filter($user[$variable]);
    }
    else
    {
    Admin::error("Gebruiker niet gevonden!"); exit;
    }
    }
    }
    public static function EditUserOfTheWeek($variable)
    {
    global $dbh;
    if (isset($_GET['user'])) {
    $getUser = $dbh->prepare("SELECT * FROM users WHERE username=:username LIMIT 1");
    $getUser->bindParam(':username', $_GET['user']);
    $getUser->execute();
    if ($getUser->RowCount() == 1)
    {
    $user = $getUser->fetch();
    return filter($user[$variable]);
    }
    else
    {
    Admin::error("Gebruiker niet gevonden!"); exit;
    }
    }
    }
    public static function EditNews($variable)
    {
    $_GET = Sanitize::filter($_GET);
    $_POST = Sanitize::filter($_POST);
    global $dbh;
    if (isset($_GET['news']))
    {
    $getNews = $dbh->prepare("SELECT * FROM cms_news WHERE id=:newsid LIMIT 1");
    $getNews->bindParam(':newsid', $_GET['news']);
    $getNews->execute();
    if ($getNews->RowCount() == 1)
    {
    $news = $getNews->fetch();
    return $news[$variable];
    }
    else
    {
    Admin::error("Geen nieuws gevonden!"); exit;
    }
    }
    }
    public static function LookSollie($variable)
    {
    Global $dbh,$config;
    if (isset($_GET['look']))
    {
    $getSollie = $dbh->prepare("SELECT * FROM staffApplication WHERE id=:look LIMIT 1");
    $getSollie->bindParam(':look', $_GET['look']);
    $getSollie->execute();
    if ($getSollie->RowCount() == 1)
    {
    $data = $getSollie->fetch();
    $datenow = date('d-m-Y', $data['date']);
    return filter($data[$variable]);
    }
    else
    {
    header('Location: '.$config['hotelUrl'].'/adminpan/sollie');
    }
    }
    }
    public static function DeleteNews()
    {
    Global $dbh;
    if(isset($_GET['delete']))
    {
    $deleteNews = $dbh->prepare("DELETE FROM cms_news WHERE id=:newsid");
    $deleteNews->bindParam(':newsid', $_GET['delete']);
    $deleteNews->execute();
    Admin::gelukt('Het nieuws bericht is verwijderd');
    }
    }
    public static function DeleteSollie()
    {
    Global $config, $dbh;
    if(isset($_GET['delete']))
    {
    $deleteSollie = $dbh->prepare("DELETE FROM staffApplication WHERE id=:newsid");
    $deleteSollie->bindParam(':newsid', $_GET['delete']);
    $deleteSollie->execute();
    Admin::gelukt('Sollicitatie verwijderd');
    header('Location: '.$config['hotelUrl'].'/adminpan/sollie');
    }
    }
    public static function DeleteBans()
    {
    Global $dbh;
    if(isset($_GET['delete']))
    {
    $deleteBan = $dbh->prepare("DELETE FROM bans WHERE id=:newsid");
    $deleteBan->bindParam(':newsid', $_GET['delete']);
    $deleteBan->execute();
    Admin::gelukt('Sollicitatie verwijderd');
    }
    }
    public static function PostNews()
    {
    global $dbh;
    if (isset($_POST['postnews']))
    {
    $_SESSION['title'] = $_POST['title'];
    $_SESSION['news'] = $_POST['news'];
    if (!empty($_POST['title']))
    {
    if (!empty($_POST['news']))
    {
    $postNews = $dbh->prepare("
    INSERT INTO cms_news(title,image,shortstory,longstory,author,date,type,roomid,updated)
    VALUES
    (
    :title,
    :topstory,
    :slogan,
    :news,
    :id,
    '" . time() . "',
    '1',
    '1',
    '1'
    )");
    $postNews->bindParam(':title', $_POST['title']);
    $postNews->bindParam(':slogan', $_POST['slogan']);
    $postNews->bindParam(':topstory', $_POST['topstory']);
    $postNews->bindParam(':news', $_POST['news']);
    $postNews->bindParam(':id', $_SESSION['id']);
    $postNews->execute();
    $_SESSION['title'] = '';
    $_SESSION['kort'] = '';
    $_SESSION['news'] ='';
    Admin::gelukt("Nieuws bericht geplaatst!");
    }
    else
    {
    Admin::error("Nieuws bericht is leeg!");
    return;
    }
    }
    else
    {
    Admin::error("Er is geen titel!");
    return;
    }
    }
    else
    {
    }
    }
    }
    ?>
    Será que é fácil resolver este erro?
    Veja minhas configurações, poderá ajudar!
    Meu emulador é o Arcturus
    Minha CMS é a BrainCMS
    Meu hotel está no Vertrigo
    Como sei que uma imagem vale mais que mil palavras, olhe o print: http://http://ap.imagensbrasil.org/image/8MTr4r
    Desde já obrigado. Aguardarei respostas!

brutalzinn brutalzinn  • 21.09.17 12:16

「helpHB」Brain CMS Painel para Arcturus  Empty Re: 「helpHB」Brain CMS Painel para Arcturus 21.09.17 12:16

O que eu quero, é tirar esse erro do editor da cms, ele aparece pois ela não reconhece essas lacunas na tabela users

pedxz pedxz  • 21.09.17 13:01

Super administradorMembro da Equipa

「helpHB」Brain CMS Painel para Arcturus  Empty Re: 「helpHB」Brain CMS Painel para Arcturus 21.09.17 13:01

MODERAÇÃO
Usuário: brutalzinn
Quantidade: +1
Motivo: Dual Post

1hbeliashb1 1hbeliashb1  • 23.09.17 10:26

「helpHB」Brain CMS Painel para Arcturus  Empty Re: 「helpHB」Brain CMS Painel para Arcturus 23.09.17 10:26

Se eu fosse tu colocava a database da plus emulador talvez ela reconheça, pois usar a database do core sem o emulador nem tem graça se quiser pegar totem e talz so salvar no export e depois colocar na database do Plus Emulador ou da Arcturus. Tenta ae.

Alan Walker Alan Walker  • 23.09.17 15:45

「helpHB」Brain CMS Painel para Arcturus  Empty Re: 「helpHB」Brain CMS Painel para Arcturus 23.09.17 15:45

[aviso= ATENÇÃO]
O autor do tópico possui 24 horas para informar se a questão foi resolvida!
[/aviso]

Gasparzinho Gasparzinho  • 24.09.17 19:29

「helpHB」Brain CMS Painel para Arcturus  Empty Re: 「helpHB」Brain CMS Painel para Arcturus 24.09.17 19:29

[info=Moderação]
Tópico fechado e movido para tópicos encerrados.
Motivo: Prazo encerrado.
[/info]

Conteúdo patrocinado  • 

「helpHB」Brain CMS Painel para Arcturus  Empty Re: 「helpHB」Brain CMS Painel para Arcturus

Permissões neste sub-fórum
Não podes responder a tópicos

BH Servers

Recomendamos a BH Servers com proteção DDOS gratuita em Cloud Server de alta performance. Entrega imediata.