zedias Posted February 4, 2016 at 02:40 PM Report Share #593132 Posted February 4, 2016 at 02:40 PM (edited) Caso deseje ter Acesso a ESSA pessoa PEDIR Permissão e se NÃO Conseguir ter Acesso PODE escrever Uma diligencia. Alguém PODE me Ajudar? Acess.utentes.php <?php function pedidosAcessoUtentes(){ include_once('DataAccess.php'); $da = new DataAccess(); $res = $da->pedidosAcessoUtentes(); echo "<div class='ink-grid'> <br/> <h1> <font color='#1A9018'>Pedidos de Acesso Utente </font></h1> </div>"; $conta = 0; while($row = mysql_fetch_assoc($res)){ $conta++; echo " <div class='ink-grid'> <nav class='ink-navigation space'> <ul class ='menu horizontal rounded shadowed grey'> <li><b> Nome do Utente:</b> ".$row['nome']."<br/><b> Nome do Tecnico:</b> ".$row['Nome de Tecnico']."<br/><b> Assunto:</b>".$row['assunto']; echo "<br/> "; echo $row['pedidosAcessoUtentes']; echo "<br/></li></ul></nav></div>"; echo "<div class='ink-grid'> <nav class='ink-navigation space'> <a href='http://www.hotmail.com/' target='_blank'> <input type='button' class='ink-button blue' value='Responder via Hotmail'> </a> <a href='http://www.gmail.com/' target='_blank'> <input type='button' class='ink-button blue' value='Responder via Gmail'> </a> <input type='button' class='ink-button red' onclick='confirmacaoEliminacao(".$row['id'].")' value='Eliminar'/></nav></div>"; } if ($conta == 0){ echo "<div class='ink-grid'> <br/> <h4>Não tem mensagens novas.</h4> </div>"; } } if(isset($_SESSION['id'])){ verMensagens(); }else{ formularioEnviarMensagem(); } namespace Codecourse/User; use Illuminate/DataBase/Eloquent/Model as Eloquent; class UserPermission extends Eloquent { protect $table = 'users_permissions'; protected $fillable = { 'id_admin ' }; public static $defaults = { 'is_admin => false }; } ?> <div> <input type='submit' value='Sim' class='ink-button green'> <input type='submit' value='não' class='ink-button red'> </div> Vi Este vídeo mas não compreendi Muito Bem. https://www.youtube.com/embed/LJJXCni8mNc?feature=oembed User.php <?php namespace CodeCourse/user; use Illuminate/Database/Eloquent/model as Eloquent class User extends Eloquent { protected $table = "users"; protected $fillable = [ 'email' 'username' 'password' 'active' 'remember_identifier'; 'remember_token'; ]; } public function getFullName() { if (!$this=>first_name || !$this=>last_name){ return null; } return "{$this->first_name} {$this->last_name}"; } public function permissions() { return $this->hasOne('CodeCourse/User/UserPermission','user_id'); } } $user->permissions()->create(UserPermission::$defaults); Edited February 12, 2016 at 09:33 PM by thoga31 Link to comment Share on other sites More sharing options...
cristianoaredes Posted February 4, 2016 at 02:57 PM Report Share #593138 Posted February 4, 2016 at 02:57 PM Boa tarde zedias, Qual a dúvida? Está dando algum erro? Qual? Atenciosamente, Link to comment Share on other sites More sharing options...
zedias Posted February 5, 2016 at 01:33 PM Author Report Share #593200 Posted February 5, 2016 at 01:33 PM (edited) A minha Duvida amiga e que não sei como posso avançar neste projecto acho que e preciso uma function mas não sei como começar poderia -me dar uma ajuda ? não encontro nada na net que me ajude , o utilizador do outro frontoffice possa ver as informações de utilizador de outro frontoffice .se administrador do site quiser . Edited February 5, 2016 at 01:39 PM by zedias Link to comment Share on other sites More sharing options...
cristianoaredes Posted February 6, 2016 at 01:58 AM Report Share #593210 Posted February 6, 2016 at 01:58 AM zedias, não pude perceber o que estás tentando fazer. Caso ainda não tenha solucionado ainda, chame no skype que tentarei ajudar-lhe. Skype: cristiano.aredes Atenciosamente, Link to comment Share on other sites More sharing options...
HappyHippyHippo Posted February 6, 2016 at 10:56 AM Report Share #593221 Posted February 6, 2016 at 10:56 AM como foi dito, a apresentação do problema tem de ser de forma clara e concisa. caso contrário, ninguém irá ser capaz de perceber qual o problema e o que fazer para o corrigir. 2 Report IRC : sim, é algo que ainda existe >> #p@p Portugol Plus Link to comment Share on other sites More sharing options...
zedias Posted February 11, 2016 at 11:37 AM Author Report Share #593340 Posted February 11, 2016 at 11:37 AM (edited) <?php namespace CodeCourse/user; use Illuminate/Database/Eloquent/model as Eloquent class User extends Eloquent { protected $table = "users"; protected $fillable = [ 'email' 'username' 'password' 'active' 'remember_identifier'; 'remember_token'; ]; } public function getFullName() { if (!$this=>first_name || !$this=>last_name){ return null; } return "{$this->first_name} {$this->last_name}"; } } public function hasPermissions($permissions) { return (bool) $this->permissions->{$permissions} } public function isAdmin() { return $this->hasPermissions('is_admin'); } public function permissions() { return $this->hasOne('CodeCourse/User/UserPermission','user_id'); } só consegui fazer isto através de tutorial Gostaria que me ajudassem eu tenho que criar uma pagina em que Que o administrador consiga ver as mensagens de apelo de um utilizador de outro frontofice (empresa ) para decidir se deixa ver informação do outro utilizador(utente) que não pertença ao seu frontofice. Aguardo Ansiosamente por ajuda Estou com muitas dificuldades em fazer esta pagina se alguém poder ajudar . Cumprimentos :Ze Dias Edited February 12, 2016 at 09:32 PM by thoga31 GeSHi Link to comment Share on other sites More sharing options...
GrandSir Posted February 12, 2016 at 03:15 PM Report Share #593413 Posted February 12, 2016 at 03:15 PM Qual é o problema exatamente ? Erro ? Como deve imaginar ninguêm irá escrever-lhe a aplicação, estamos aqui para ajudar e tentar resolver problemas e não fazer o trabalho por si. Obrigado, Vlad. Link to comment Share on other sites More sharing options...
zedias Posted February 15, 2016 at 09:07 AM Author Report Share #593522 Posted February 15, 2016 at 09:07 AM (edited) Da seguinte o erro Parse error: syntax error, unexpected '}' in /home/gpsipt/public_html/REBM/backupFV/AcessoUtentes.php on line 44. <?php function pedidosAcessoUtentes(){ include_once('DataAccess.php'); $da = new DataAccess(); $res = $da->pedidosAcessoUtentes(); echo "<div class='ink-grid'> <br/> <h1> <font color='#1A9018'>Pedidos de Acesso Utente </font></h1> </div>"; $conta = 0; while($row = mysql_fetch_assoc($res)){ $conta++; echo " <div class='ink-grid'> <nav class='ink-navigation space'> <ul class ='menu horizontal rounded shadowed grey'> <li><b> Nome do Utente:</b> ".$row['nome']."<br/><b> Nome do Tecnico:</b> ".$row['Nome de Tecnico']."<br/><b> Assunto:</b>".$row['assunto']; echo "<br/> "; echo $row['pedidosAcessoUtentes']; echo "<br/></li></ul></nav></div>"; echo "<div class='ink-grid'> <nav class='ink-navigation space'> <input type='button' class='ink-button blue' value='Sim'> <input type='button' class='ink-button blue' value='nao'> </a> <input type='button' class='ink-button red' onclick='confirmacaoEliminacao(".$row['id'].")' value='Eliminar'/></nav></div>"; } if ($conta == 0){ echo "<div class='ink-grid'> <br/> <h4>Não tem mensagens novas.</h4> </div>"; } } if(isset($_SESSION['id'])){ verMensagens(); }else{ formularioEnviarMensagem() } Edited February 15, 2016 at 09:26 AM by zedias Link to comment Share on other sites More sharing options...
tiago.f Posted February 15, 2016 at 10:16 AM Report Share #593526 Posted February 15, 2016 at 10:16 AM Falta ponto e vírgula no fim formularioEnviarMensagem(); Link to comment Share on other sites More sharing options...
zedias Posted February 15, 2016 at 02:10 PM Author Report Share #593537 Posted February 15, 2016 at 02:10 PM Da erro a mesma amigo Citação Fatal error: Call to undefined function formularioEnviarMensagem() in /home/gpsipt/public_html/REBM/backupFV/AcessoUtentes.php on line 43 <?php function pedidosAcessoUtentes(){ include_once('DataAccess.php'); $da = new DataAccess(); $res = $da->pedidosAcessoUtentes(); echo "<div class='ink-grid'> <br/> <h1> <font color='#1A9018'>Pedidos de Acesso Utente </font></h1> </div>"; $conta = 0; while($row = mysql_fetch_assoc($res)){ $conta++; echo " <div class='ink-grid'> <nav class='ink-navigation space'> <ul class ='menu horizontal rounded shadowed grey'> <li><b> Nome do Utente:</b> ".$row['nome']."<br/><b> Nome do Tecnico:</b> ".$row['Nome de Tecnico']."<br/><b> Assunto:</b>".$row['assunto']; echo "<br/> "; echo $row['pedidosAcessoUtentes']; echo "<br/></li></ul></nav></div>"; echo "<div class='ink-grid'> <nav class='ink-navigation space'> <input type='button' class='ink-button blue' value='Sim'> <input type='button' class='ink-button blue' value='nao'> </a> <input type='button' class='ink-button red' onclick='confirmacaoEliminacao(".$row['id'].")' value='Eliminar'/></nav></div>"; } if ($conta == 0){ echo "<div class='ink-grid'> <br/> <h4>Não tem mensagens novas.</h4> </div>"; } } if(isset($_SESSION['id'])){ verMensagens(); }else{ formularioEnviarMensagem(); } Poderia-me ajudar ? Link to comment Share on other sites More sharing options...
tiago.f Posted February 15, 2016 at 04:11 PM Report Share #593543 Posted February 15, 2016 at 04:11 PM Mas dá outro erro amigo: Fatal error: Call to undefined function formularioEnviarMensagem() Parece que te falta esta função.. Link to comment Share on other sites More sharing options...
zedias Posted February 16, 2016 at 09:09 AM Author Report Share #593562 Posted February 16, 2016 at 09:09 AM (edited) <?php function pedidosAcessoUtentes(){ include_once('DataAccess.php'); $da = new DataAccess(); $res = $da->pedidosAcessoUtentes(); echo "<div class='ink-grid'> <br/> <h1> <font color='#1A9018'>Pedidos de Acesso Utente </font></h1> </div>"; $conta = 0; while($row = mysql_fetch_assoc($res)){ $conta++; echo " <div class='ink-grid'> <nav class='ink-navigation space'> <ul class ='menu horizontal rounded shadowed grey'> <li><b> Nome do Utente:</b> ".$row['nome']."<br/><b> Nome do Tecnico:</b> ".$row['Nome de Tecnico']."<br/><b> Assunto:</b>".$row['assunto']; echo "<br/> "; echo $row['pedidosAcessoUtentes']; echo "<br/></li></ul></nav></div>"; echo "<div class='ink-grid'> <nav class='ink-navigation space'> <input type='button' class='ink-button blue' value='Sim'> <input type='button' class='ink-button blue' value='nao'> </a> <input type='button' class='ink-button red' onclick='confirmacaoEliminacao(".$row['id'].")' value='Eliminar'/></nav></div>"; } if ($conta == 0){ echo "<div class='ink-grid'> <br/> <h4>Não tem mensagens novas.</h4> </div>"; } } function formularioEnviarMensagem() if(isset($_SESSION['id'])){ verMensagens(); }else{ formularioEnviarMensagem(); Agora da-me seguinte erro Parse error: syntax error, unexpected 'if' (T_IF), expecting '{' in /home/gpsipt/public_html/REBM/backupFV/AcessoUtentes.php on line 40 Edited February 16, 2016 at 10:06 AM by zedias Link to comment Share on other sites More sharing options...
tiago.f Posted February 16, 2016 at 09:26 AM Report Share #593563 Posted February 16, 2016 at 09:26 AM Eu sou da opinião que devemos ajudar tanto quanto podemos, mas honestamente acho que estás a ir além dos limites. Este forúm não é um debugger. Se na realidade não consegues resolver o erro que o parser está a apontar, então sugiro que pares o que estás a fazer e aprendas a programar - lógica de programação - antes de te dedicares a uma linguagem específica. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now