Ir para conteúdo
  • Cadastre-se

Posts Recomendados

fyy60.gif

 

wbqo81.gif

 

Informações

  • Add change log (Precisa de Admin acess)
  • Delete change log (Precisa de Admin acess)
  • View change log (ID, Type, Where, Date, Description)

Tutorial

  1. Em htdocs, crie uma pasta chamada changelog
  2. Baixe o arquivo: changelog.rar - Scan: VirusTotal
  3. Coloque as imagens baixadas na pasta que você criou.
  4. Adicione isso na sua database:
  5. CREATE TABLE IF NOT EXISTS `z_changelog` (
      `id` int(11) NOT NULL auto_increment,
      `type` varchar(255) NOT NULL default '',
      `where` varchar(255) NOT NULL default '',
      `date` int(11) NOT NULL default '0',
      `description` varchar(255) NOT NULL,
      PRIMARY KEY  (`id`)
    ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ;
  6. Agora vamos criar o arquivo changelog.php:
  7. <?PHP
    $page = $_REQUEST['page'];
    $action = $_REQUEST['action'];
    $id = $_REQUEST['id'];
    $limit = 30;
    $offset = $page * $limit;
    $change_data = $SQL->query('SELECT * FROM z_changelog ORDER BY id DESC LIMIT '.$limit.' OFFSET '.$offset.'');
    $change_data1 = $SQL->query('SELECT * FROM z_changelog');
    $change = 0;
    $change1 = 0;
    if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) {
            $description = trim($_POST['description']);
            $where = trim($_POST['where']);
            $type = trim($_POST['type']);
            if (!empty($action) AND !empty($id)) {
        $select = $SQL->query('SELECT * FROM z_changelog WHERE date = '.$id.'')->fetch();
    $main_content .= '<div class="TableContainer" >  <table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" >        <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>        <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>        <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>        <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>        <div class="Text" >Change log removed</div>        <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>        <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>        <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>        <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>      </div>    </div>    <tr>      <td>        <div class="InnerTableContainer" >          <table style="width:100%;" ><table border=0 cellspacing=1 cellpadding=4 width=100%><tr bgcolor="#505050"><td width="1%"><font class=white>ID</font></td><td width="21"><font class=white>Type</font></td><td width="21"><font class=white>Where</font></td><td width="50"><font class=white>Date</font></td><td><font class=white>Description</font></td></tr>
                    
                    <tr bgcolor="#F1E0C6"><td align="center">'.$select['id'].'.</td><td align="center"><img src="changelog/'.$select['type'].'.png" title="added"/></td><td align="center"><img src="changelog/'.$select['where'].'.png" title="ots"/><td>'.date("j.m.Y",$select['date']).'</td><td>'.$select['description'].'</td></tr>
                    ';
                    $main_content .= '</td></tr>          </table>        </div>  </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="index.php?subtopic=changelog" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
                    $SQL->query('DELETE FROM z_changelog WHERE date = '.$id.'');
    }
            if(empty($description) AND empty($where) AND empty($type)) {
                $main_content .= '<form action="index.php?subtopic=changelog" method="post" ><div class="TableContainer" ><table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" ><div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Add Changelog</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div>    </div>    <tr>      <td>        <div class="InnerTableContainer" >          <table style="width:100%;" >
                <tr>
            <td class="LabelV" ><span >Type:</span></td>
            <td style="width:90%;" >
            <SELECT NAME=type>
                <OPTION>Add</OPTION>
                <OPTION>Remove</OPTION>
            </SELECT>
            </td>
            </tr>
                        <tr>
            <td class="LabelV" ><span >Where:</span></td>
            <td style="width:90%;" >
            <SELECT NAME=where>
                <OPTION>Server</OPTION>
                <OPTION>Website</OPTION>
            </SELECT>
            </td>
            </tr>
                                <tr>
            <td class="LabelV" ><span >Description:</span></td>
            <td style="width:90%;" >
            <textarea type="text" name="description" size="50" maxlength="150" rows="5" cols="60"></textarea>
            </td>
            </tr>
                </table>        </div>  </table></div></td></tr><br/><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="index.php?subtopic=changelog" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
            } else {
            if(empty($description)){
                    $show_msgs[] = "Description field is empty!.";
                }
                if(!empty($show_msgs)){
                    //show errors
                    $main_content .= '<div class="SmallBox" >  <div class="MessageContainer" >    <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>    <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="ErrorMessage" >      <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>      <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>      <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>';
                    foreach($show_msgs as $show_msg) {
                        $main_content .= '<li>'.$show_msg;
                    }
                    $main_content .= '</div>    <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>    <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>  </div></div><br/>';
                    //show form
                    $main_content .= '<form action="index.php?subtopic=changelog" method="post" ><div class="TableContainer" ><table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" ><div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Add Changelog</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div>    </div>    <tr>      <td>        <div class="InnerTableContainer" >          <table style="width:100%;" >
                <tr>
            <td class="LabelV" ><span >Type:</span></td>
            <td style="width:90%;" >
            <SELECT NAME=type>
                <OPTION>Add</OPTION>
                <OPTION>Remove</OPTION>
            </SELECT>
            </td>
            </tr>
                        <tr>
            <td class="LabelV" ><span >Where:</span></td>
            <td style="width:90%;" >
            <SELECT NAME=where>
                <OPTION>Server</OPTION>
                <OPTION>Website</OPTION>
            </SELECT>
            </td>
            </tr>
                                <tr>
            <td class="LabelV" ><span >Description:</span></td>
            <td style="width:90%;" >
            <textarea type="text" name="description" size="50" maxlength="150" rows="10" cols="60"></textarea>
            </td>
            </tr>
                </table>        </div>  </table></div></td></tr><br/><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="index.php?subtopic=changelog" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
                }
                else
                {
                    $SQL->query('INSERT INTO `z_changelog` (`id`,`type`, `where`,`date`, `description`) VALUES (NULL, "'.$type.'", "'.$where.'", '.time().', "'.$description.'");');
                    $id = $SQL->query('SELECT * FROM z_changelog WHERE `description` = "'.$description.'";')->fetch();
                    $main_content .= '<div class="TableContainer" >  <table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" >        <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>        <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>        <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>        <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>        <div class="Text" >Change log added</div>        <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>        <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>        <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>        <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>      </div>    </div>    <tr>      <td>        <div class="InnerTableContainer" >          <table style="width:100%;" ><table border=0 cellspacing=1 cellpadding=4 width=100%><tr bgcolor="#505050"><td width="1%"><font class=white>ID</font></td><td width="21"><font class=white>Type</font></td><td width="21"><font class=white>Where</font></td><td width="50"><font class=white>Date</font></td><td><font class=white>Description</font></td></tr>
                    
                    <tr bgcolor="#F1E0C6"><td align="center">'.$id['id'].'.</td><td align="center"><img src="changelog/'.$type.'.png" title="added"/></td><td align="center"><img src="changelog/'.$where.'.png" title="ots"/><td>'.date("j.m.Y",$id['date']).'</td><td>'.$description.'</td></tr>
                    ';
                    $main_content .= '</td></tr>          </table>        </div>  </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="index.php?subtopic=changelog" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
                }
            }
            }
    foreach($change_data1 as $log) {
    $change1++;
    }
    foreach($change_data as $log) {
    $change++;
        if(is_int($change / 2))
            $bgcolor = $config['site']['darkborder'];
        else
            $bgcolor = $config['site']['lightborder'];
        $change_rows .= '                
                    <tr bgcolor="'.$bgcolor.'"><td align="center">'.$log['id'].'.</td><td align="center"><img src="changelog/'.$log['type'].'.png" title="added"/></td><td align="center"><img src="changelog/'.$log['where'].'.png" title="ots"/><td>'.date("j.m.Y",$log['date']).'</td><td>'.$log['description'].'';
                    if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) {
    $change_rows .= '<a href="index.php?subtopic=changelog&action=delete&id='.$log['date'].'"><img src="'.$layout_name.'/images/news/delete.png" border="0"></a>';
    }
                    
                    $change_rows .= '</td></tr>';
    if ($change < $limit) {
    } else
    $show_link_to_next_page = TRUE;
    }
    if($change == 0) {
        $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><B>Server Status</B></TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1><TR><TD>There is no change logs for the moment.</TD></TR></TABLE></TD></TR></TABLE><BR>';
    } else
    {
        $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><B>Change logs</B></TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1><TR><TD>Currently '.$change1.' change logs in total.</TD></TR></TABLE></TD></TR></TABLE><BR>';
    
        $main_content .= '<table border=0 cellspacing=1 cellpadding=4 width=100%><tr bgcolor="#505050"><td width="1%"><font class=white>ID</font></td><td width="21"><font class=white>Type</font></td><td width="21"><font class=white>Where</font></td><td width="50"><font class=white>Date</font></td><td><font class=white>Description</font></td></tr>'.$change_rows.'</table>';
        if($page > 0) {
    $main_content .= '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="index.php?subtopic=changelog&page='.($page - 1).'" CLASS="size_xxs">Previous Page</A></TD></TR>';
    }
    if($show_link_to_next_page) {
    $main_content .= ' | <TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="index.php?subtopic=changelog&page='.($page + 1).'" CLASS="size_xxs">Next Page</A></TD></TR>';
    }
    }
    ?>
  8. Agora em index.php, adicione:
  9.     case "changelog";
            $topic = "Changelogs";
            $subtopic = "changelog";
            include("changelog.php");
        break;

Créditos: Pitufo

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por Qwizer
      MercadoPago Checkout Transparente (CC)
       
      Abaixo Segue código PHP de pagamento via cartão de credito pelo mercado pago com retorno automático para quem quiser adaptar em seus sites ter uma direção de onde ir 
      testado em Znote e MyAcc.
       

       
       
      https://mega.nz/folder/m4QkWBLS#PIvJ_scVm7w8-5FLlStTHg  
    • Por Argona2509
      Boa tarde venho por aqui pedir ajuda estou com um problema no gesior para criar conta nao aparece vocacao e o nome Nadega Sample
       
       
    • Por Magato
      Galera, boa tarde a todos.
       
      Estou iniciando um servidor com o mapa Pbot e estou com dificuldades em encontrar um website para ele.
       
      Procurei na internet toda e não achei um link que me levasse ao download do Gesior Onix para pbot exclusivo (o link estava quebrado)
       
      Tentei utilizar o Gesior 2012 mas o layout do site e todas as funcionalidades estão bugadas.
       
      Gostaria que alguém pudesse me ajudar e postasse aqui algum link de gesior para PBOT. A versão do meu servidor é 8.60.
       
      Agradeço a quem puder.
       
       
    • Por BonasxD
      Bom galera primeiramente não sei se estou na area correta ou se nao estou, se nao por favor mover para area certa, grato!
      Estou com esse erro ao tenta instalar o gesior usando a tfs 0.4 não passa dessa parte ja tentei de tudo e nao sei oque fazer ;(
       
      Testei o mesmo procedimento no meu Windows e Funcionou corretamente agora no meu VM(Ubuntu22) não passa desse erro. 
       
      Ja pesquisei por tudo e não sei oque fazer

    • Por Jordanl42ss
      Quando eu vou hospedar o site do meu poketibia ele da erro faldo q a classe do não foi encontrada 
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo