MLT

[gentoo.org source code] pagina.php

MLT
Apr 17th, 2014
331
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 12.10 KB | None | 0 0
  1. <?
  2.  
  3.   $get_vars=$GLOBALS[HTTP_GET_VARS];
  4.   $post_vars=$GLOBALS[HTTP_POST_VARS];
  5.  
  6.   function GetWord($linha,$num)
  7.   {
  8.     $tmp=explode(" ",$linha);
  9.     return $tmp[$num-1];
  10.   }
  11.  
  12.   function MontaParam()
  13.   {
  14.     global $get_vars;
  15.     $param="";
  16.     if (count($get_vars)>0)
  17.     {
  18.       $param="?";
  19.       foreach($get_vars as $n => $v)
  20.         $param .= $n."=".$v."&";
  21.     }
  22.     return $param;
  23.   }
  24.  
  25.   require_once "acesso_sql.php";
  26.   require_once "autenticacao.php";
  27.   require_once "email.php";
  28.   $bib_caminho_pagina="www.las.ic.unicamp.br/";
  29.   $bib_pagina="http://".$bib_caminho_pagina;
  30.  
  31.   function Cabecalho()
  32.   {
  33.     global $bib_pagina,$bib_caminho_pagina,$bib_usuario;
  34. ?>
  35. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  36. <html>
  37. <head>
  38.   <title>LAS - Laborat&oacute;rio de Administra&ccedil;&atilde;o e Seguran&ccedil;a de Sistemas</title>
  39.  
  40.   <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" />
  41.   <meta HTTP-EQUIV="EXPIRES" CONTENT="0">
  42.   <meta NAME="RESOURCE-TYPE" CONTENT="DOCUMENT">
  43.   <meta NAME="DISTRIBUTION" CONTENT="GLOBAL">
  44.   <meta NAME="DESCRIPTION" CONTENT="">
  45.   <meta NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
  46.   <meta NAME="REVISIT-AFTER" CONTENT="1 DAYS">
  47.   <meta NAME="RATING" CONTENT="GENERAL">
  48.  
  49.   <link REL="StyleSheet" HREF="las.css" TYPE="text/css">
  50. </head>
  51.  
  52. <body bgcolor="#ffffff" text="#000000" link="#363636" vlink="#363636" alink="#d5ae83">
  53.   <center>
  54.     <table width=760px cellpadding=0 cellspacing=0 border=0><tr><td>
  55. <!-- Fim das definições preliminares -->
  56. <!-- Inicio do Cabeçalho -->
  57. <table cellpadding=0 cellspacing=0 border=0 width=100%>
  58.   <tr>
  59.     <td rowspan=4 width=150px bgcolor=#55698a><? echo "<img src=".$bib_pagina."/imagens/logotipo.jpg border=0>"; ?></td>
  60.     <td width=20px bgcolor=#55698a>&nbsp;</td>
  61.     <td width=590px bgcolor=#55698a>
  62.       <table cellpadding=0 cellspacing=0 border=0 width=100%>
  63.         <tr>
  64.           <td><? echo "<img src=".$bib_pagina."/imagens/cab_nome.jpg border=0>"; ?></td>
  65.           <td align=right>
  66.             <table bgcolor=black cellpadding=1 cellspacing=1 border=1>
  67.               <tr><td bgcolor=#55698a align=center><? echo (EAdmin() ? "<font color=#ffff80>" : "<font color=#eff5ff>"); ?><b>&nbsp;Membros do LAS&nbsp;</b></font></td></tr>
  68.               <tr><td bgcolor=#eff5ff align=center><?
  69.                 if (!EstaLogado())
  70.                 {
  71.                   echo("<a href=https://".$bib_caminho_pagina."/login.php".MontaParam().">Login</a>");
  72.                 }
  73.                 else
  74.                 {
  75.                   $nome=explode(" ",$bib_usuario[nome]);
  76.                   echo("Olá, ".$nome[0]."<br><a href=logout.php".MontaParam().">Logout</a>");
  77.                 }
  78.               ?></td></tr>
  79.             </table>
  80.           </td>
  81.           <td>&nbsp;</td>
  82.         </tr>
  83.       </table>
  84.     </td>
  85.   </tr>
  86.   <tr>
  87.     <td width=20px bgcolor=#55698a rowspan=3><? echo "<img src=".$bib_pagina."/imagens/cab_canto.jpg border=0>"; ?></td>
  88.     <td width=590px height=3><? echo "<img src=".$bib_pagina."/imagens/cab_sup.jpg border=0 height=3 width=590>"; ?></td>
  89.   </tr>
  90.   <tr>
  91.     <td width=590px bgcolor=#c9c2c9 align=right><? echo Unixtime2Data(time(),'E') ?>&nbsp;</td>
  92.   </tr>
  93.   <tr>
  94.     <td bgcolor=#55698a height=3><? echo "<img src=".$bib_pagina."/imagens/cab_inf.jpg border=0 height=3 width=590>"; ?></td>
  95.   </tr>
  96. </table>
  97. <!-- Fim do Cabeçalho -->
  98. <!-- Inicio da Parte central -->
  99. <table cellpadding=0 cellspacing=0 border=0 width=760px bgcolor=#eff5ff>
  100.   <tr><td colspan=2>&nbsp;</td></tr>
  101.   <tr>
  102.     <td width=150px valign=top>
  103. <!-- Inicio do Menu esquerdo -->
  104. <?
  105.   }
  106.  
  107.   function InicializaMenu()
  108.   {
  109. ?>
  110.       <table width="100%" border="0" bgcolor="#999999" bordercolor="#FFFFFF" cellspacing="2" cellpadding="2">
  111. <?
  112.   }
  113.  
  114.   function AdicionaOpcaoMenu($link,$nome,$destaque)
  115.   {
  116. ?>
  117.         <tr>
  118.           <td bgcolor="#444444">&nbsp;&nbsp;&nbsp;&nbsp;<? echo "<a href=".$link."><font class=menu".($destaque=="S" ? "destaque" : "").">".$nome."</font></a>"; ?></td>
  119.         </tr>
  120. <?
  121.   }
  122.  
  123.   function FinalizaMenu()
  124.   {
  125. ?>
  126.       </table>
  127.  
  128. <!-- Fim do Menu esquerdo -->
  129.     </td>
  130.     <td valign=top>
  131. <!-- Inicio do Conteudo -->
  132.       <center><table width=98% cellpadding=1 cellspacing=1 border=1 bgcolor=black><tr><td bgcolor=#deeaff>
  133. <?
  134.   }
  135.  
  136.   function Rodape()
  137.   {
  138. ?>
  139.       </td></tr></table></center><br>
  140. <!-- Fim do Conteudo -->
  141.     </td>
  142.   </tr>
  143.   <tr><td colspan=2>&nbsp;</td></tr>
  144. </table>
  145. <!-- Fim da Parte central -->
  146.  
  147. <!-- Inicio do Rodapé -->
  148. <center>P&aacute;gina do LAS. Para entrar em contato com os WebMasters, escreva para <? echo ConverteEmail("[email protected]"); ?></center>
  149. <center>&copy; Copyright 2003 - Todos os direitos reservados</center>
  150. <!-- Fim do Rodapé -->
  151.  
  152. <!-- Início das definições de encerramento da página -->
  153.     </td></tr></table>
  154.   </center>
  155. </body>
  156. </html>
  157. <?
  158.   }
  159.  
  160.   function InicializaPagina()
  161.   {
  162.     global $get_vars,$bib_enviar_email,$pagina_login,$pagina_admin;
  163.     Cabecalho();
  164.     InicializaMenu();
  165.  
  166.     $res=ListaModulos();
  167.  
  168.     foreach ($res as $cod=>$linha)
  169.     {
  170.       // Mexi aqui pra página do Paulo...
  171.       if ($linha[link]!="")
  172.         if ($linha[link_show]=="")
  173.           AdicionaOpcaoMenu($linha[link],$linha[nome],($linha[diretorio]==$get_vars[mname] ? "S" : "N"));
  174.         else
  175.           AdicionaOpcaoMenu("index.php?mname=".$linha[diretorio]."&mlink=".$linha[link],$linha[nome],($linha[diretorio]==$get_vars[mname] ? "S" : "N"));
  176.       else
  177.         AdicionaOpcaoMenu("index.php?mname=".$linha[diretorio],$linha[nome],($linha[diretorio]==$get_vars[mname] ? "S" : "N"));
  178. //      if ($linha[diretorio]!="paulo")
  179. //        AdicionaOpcaoMenu("index.php?mname=".$linha[diretorio],$linha[nome],($linha[diretorio]==$get_vars[mname] ? "S" : "N"));
  180. //      else
  181. //        AdicionaOpcaoMenu("http://www.las.ic.unicamp.br/paulo/",$linha[nome],($linha[diretorio]==$get_vars[mname] ? "S" : "N"));
  182.       if ($linha[diretorio]==$get_vars[mname])
  183.         $nome_modulo=$linha[nome];
  184.  
  185.     }
  186.     if (EAdmin())
  187.       AdicionaOpcaoMenu("administracao.php","Administração","N");
  188.     FinalizaMenu();
  189.  
  190.     if ($nome_modulo=="" && !isset($bib_enviar_email) && !isset($pagina_login) && !isset($pagina_admin))
  191.     {
  192.       echo "<center><font class=error_msg>Página não encontrada</font></center>";
  193.       FinalizaPagina();
  194.       exit();
  195.     }
  196.     if (!isset($bib_enviar_email) && !isset($pagina_login))
  197.       echo "<center><font class=titulo>".$nome_modulo."</font></center><br>";
  198.   }
  199.  
  200.   function FinalizaPagina()
  201.   {
  202.     Rodape();
  203.   }
  204.  
  205.   function AbrirBloco($titulo="")
  206.   {
  207. ?>
  208. <center><table width=98% cellpadding=1 cellspacing=1 border=1 bgcolor=black><tr><td bgcolor=#eff5ff><? if ($titulo!="") echo "<font class=subtitulo>".$titulo."</font><br><br>"; ?>
  209.  
  210. <?
  211.   }
  212.  
  213.   function fecharBloco()
  214.   {
  215. ?>
  216. </td></tr></table></center><br>
  217. <?
  218.   }
  219.  
  220.   function HRefLink($nome,$arquivo,$param="",$onclick="")
  221.   {
  222.     global $get_vars;
  223.     $param="mname=".$get_vars[mname]."&marq=".$arquivo.($param!="" ? "&".$param : "");
  224.     if ($onclick!="")
  225.       $onclick=" onclick=\"".$onclick."\"";
  226.     return "<a href=index.php?".$param.$onclick.">".$nome."</a>";
  227.   }
  228.  
  229.   function FormLink($nome,$arquivo,$param="",$onsubmit="")
  230.   {
  231.     global $get_vars;
  232.     $param="mname=".$get_vars[mname]."&marq=".$arquivo.($param!="" ? "&".$param : "");
  233.     if ($onsubmit!="")
  234.       $onsubmit=" onsubmit=\"".$onsubmit."\"";
  235.     return "<form name=".$nome." action=index.php?".$param." method=post".$onsubmit.">\n";
  236.   }
  237.  
  238.   function FileFormLink($nome,$arquivo,$param="",$onsubmit="")
  239.   {
  240.     global $get_vars;
  241.     $param="mname=".$get_vars[mname]."&marq=".$arquivo.($param!="" ? "&".$param : "");
  242.     if ($onsubmit!="")
  243.       $onsubmit=" onsubmit=\"".$onsubmit."\"";
  244.     return "<form name=".$nome." action=index.php?".$param." enctype=\"multipart/form-data\" method=post".$onsubmit.">\n";
  245.   }
  246.  
  247.   function MakeForm($nome,$arquivo,$tabela,$campos,$botoes=NULL,$param="",$onsubmit="")
  248.   {
  249.     global $info_modulo;
  250.     if (isset($tabela))
  251.       $tabela=$info_modulo[tabelas][$tabela];
  252.     if (!is_array($campos))
  253.       $campos=array($campos);
  254.     $hasfile=false;
  255.  
  256.     foreach($campos as $campo => $conteudo)
  257.       if ($tabela[$campo][type]!="file")
  258.         $hasfile=true;
  259.     if (!$hasfile)
  260.       echo "\n".FormLink($nome,$arquivo,$param,$onsubmit)."\n";
  261.     else
  262.       echo "\n".FileFormLink($nome,$arquivo,$param,$onsubmit)."\n";
  263.  
  264.     foreach($campos as $campo => $conteudo)
  265.     {
  266.       if (eregi("free_text",$campo))
  267.         echo $conteudo."<br><br>";
  268.       else if (isset($tabela[$campo]))
  269.       {
  270.         if ($tabela[$campo][type]!="hidden" && $tabela[$campo][type]!="checkbox")
  271.         {
  272.           ShowRotulo($tabela[$campo]);
  273.         }
  274.  
  275.         ShowConteudo($campo,$tabela[$campo],$conteudo);
  276.       }
  277.     }
  278.     if (count($botoes)>0)
  279.     {
  280.       echo "<br>";
  281.       foreach ($botoes as $nome => $acao)
  282.       {
  283.         if ($acao=="submit")
  284.           echo "<input type=submit value='".$nome."'>";
  285.         else
  286.           echo "<input type=button value='".$nome."' onclick='".$acao."'>";
  287.         echo "&nbsp;&nbsp;";
  288.       }
  289.     }
  290.     else
  291.     {
  292.       echo "<br><input type=submit value='Concluir' ".($onsubmit!="" ? "onsubmit='".$onsubmit."'" : "").">&nbsp;&nbsp;";
  293.       echo "<input type=button value='Cancelar' onclick=history.go(-1);>\n";
  294.     }
  295.     echo "</form>\n";
  296.   }
  297.  
  298.  
  299.   function ShowRotulo($dados_campo)
  300.   {
  301.     ?><b><? echo $dados_campo[rotulo]; ?>:</b><br><?
  302.   }
  303.  
  304.   function ShowConteudo($campo,$dados_campo,$conteudo)
  305.   {
  306.     echo $dados_campos[type];
  307.     if ($dados_campo[type]=="textarea")
  308.     {
  309.       echo "<textarea name=".$campo." ".$dados_campo[extraparam]." cols=80 rows=5>".$conteudo."</textarea><br>\n";
  310.     }
  311.     else if ($dados_campo[type]=="checkbox")
  312.     {
  313.       $valores=explode("/",$dados_campo[values]);
  314.       if ($conteudo==$valores[1])
  315.         $checked="checked";
  316.       echo "<input type=".$dados_campo[type]." name=".$campo." ".$checked." ".$dados_campo[extraparam]." ".$size." value='".$valores[1]."'> <b>".$dados_campo[rotulo]."</b><br>\n";
  317.     }
  318.     else if ($dados_campo[type]=="radio")
  319.     {
  320.       foreach ($dados_campo[options] as $valor=>$rotulo)
  321.       {
  322.         $checked="";
  323.         if ($conteudo==$valor)
  324.           $checked="checked";
  325.         echo "<input type=".$dados_campo[type]." name=".$campo." ".$checked." ".$dados_campo[extraparam]." ".$size." value='".$valor."'> <b>".$rotulo."</b><br>\n";
  326.       }
  327.     }
  328.     else if ($dados_campo[type]=="selection")
  329.     {
  330.       echo "<select name=".$campo." ".$dados_campo[extraparam].">";
  331.       foreach ($dados_campo[options] as $valor=>$rotulo)
  332.       {
  333.         $checked="";
  334.         if ($conteudo==$valor)
  335.           $checked="selected";
  336.         echo "<option ".$checked." value='".$valor."'>".$rotulo."</option>\n";
  337.       }
  338.       echo "</select><br>\n";
  339.     }
  340.     else
  341.     {
  342.       if (!eregi("size",$dados_campo[extraparam]))
  343.       {
  344.         if ($dados_campo[tipo]=='D') $size=" size=10"; else $size="size=80";
  345.         if ($dados_campo[type]=='file') $size=" size=20";
  346.       }
  347.        
  348.       echo "<input type=".$dados_campo[type]." name=".$campo." ".$dados_campo[extraparam]." ".$size." value='".$conteudo."'>\n";
  349.       if ($dados_campo[type]!='hidden')
  350.         echo "<br>";
  351.     }
  352.   }
  353.  
  354.   // $estrutura =array (Inicio, Cabecalho, Conteudo, Fim)
  355.   function MakeTable($estrutura,$consulta)
  356.   {
  357.     if (isset($estrutura[Inicio]))
  358.       echo $estrutura[Inicio];
  359.     if (isset($estrutura[Cabecalho]))
  360.       echo $estrutura[Cabecalho];
  361.     if ($consulta[NumLinhas]>0)
  362.     {
  363.       $i=0;
  364.       while ($linha=RetornaProxLinha($consulta))
  365.       {
  366.        
  367.         if (is_array($estrutura[Conteudo]))
  368.           $conteudo=$estrutura[Conteudo][(($i++)%count($estrutura[Conteudo]))];
  369.         else  
  370.           $conteudo=$estrutura[Conteudo];
  371.         foreach ($linha as $campo => $dado)
  372.           $conteudo=eregi_replace("%".$campo."%",$dado,$conteudo);
  373.         echo $conteudo;
  374.       }
  375.     }
  376.     else
  377.       echo $estrutura[Vazio];
  378.  
  379.  
  380.     if (isset($estrutura[Fim]))
  381.       echo $estrutura[Fim];
  382.   }
  383. ?>
Advertisement
Comments
  • Cuiznxcn
    163 days
    # text 0.19 KB | 0 0
    1. Best t33n active cpx link daily updates!
    2.  
    3. Copy and paste the link in a new browser tab and then hit enter!
    4.  
    5. https://crazyporn.xxx/members/157354/?asgtbndr=1&play=true&spon=adworld&zone=400
    6.  
Add Comment
Please, Sign In to add comment