Beispiel #1
0
 <fieldset><legend>Arquivos</legend>
 
 
  <? 
  
  $sql =" SELECT * from c_upload where id_chamado =  $id;  ";
  @$tabela = mysql_query ( $sql , $conexao);
  @$rows = mysql_num_rows ( $tabela );
  
  
  for ($x=0;$x<$rows;$x++)
	{
	 $id_upload = mysql_result($tabela,$x,'id_upload');
	 $data    = mysql_result($tabela,$x,'data');
	 $nome    = mysql_result($tabela,$x,'nome');
	 
	 $exp = explode (".",$nome);

	   
  ?>
	<A href="arquivos/<? echo $id?>_<? echo $nome; ?>" target="_new" ><IMG height=16 src="img/<? echo $exp[count($exp)-1]; ?>.gif" width=16 border=0></A>
	&nbsp;<A href="arquivos/<? echo $id?>_<? echo $nome; ?>" target="_new" ><? echo $nome; ?></A> 
      (<? echo tamanho_arquivo("arquivos/".$id."_".$nome); ?>) <SPAN class=italic><? echo FormatarDataTime($data);  ?></SPAN> [<A class=small 
      href="?acao=4&id=<? echo $id; ?>&nome=<? echo $nome; ?>">Deletar</A>]  <br>
	  
	<? } ?>   
 
 
 </fieldset>

Beispiel #2
0
$diretorio=dir($path);

echo "Lista de Arquivos:<br><br>";

while ($arquivo = $diretorio->read())
{
    if ($arquivo != "." && $arquivo !="..")		
	{
	
		 $exp = explode (".",$arquivo);

	   
  ?>
	<A href="upload/<? echo $arquivo; ?>" target="_new" ><IMG height=16 src="../Chamados/img/<? echo $exp[count($exp)-1]; ?>.gif" width=16 border=0></A>
	&nbsp;<A href="upload/<? echo $arquivo; ?>" target="_new" ><? echo $arquivo; ?></A> 
      (<? echo tamanho_arquivo("upload/".$arquivo); ?>) <SPAN class=italic></SPAN> [<A class=small 
      href="?acao=deletar&arquivo=<? echo $arquivo; ?>">Deletar</A>]  <br>
	
	
	<?	
		
		
	}	
	
}
$diretorio->close();
?> &nbsp;</td>
  </tr>
  <tr>
    <td colspan="2">&nbsp;</td>
  </tr>
Beispiel #3
0
         <A href="arquivos/<? echo $id?>_<? echo $nome; ?>" target="_new" ><img height="80" src="arquivos/<? echo $id?>_<? echo $nome; ?>" border=0></A>
	&nbsp;<A href="arquivos/<? echo $id?>_<? echo $nome; ?>" target="_new" ><? echo $nome; ?></A> 
      (<? echo tamanho_arquivo("arquivos/".$id."_".$nome); ?>) <SPAN class=italic><? echo FormatarDataTime($data);  ?></SPAN> [ <A class="small"  href="?acao=4&id=<? echo $id; ?>&nome=<? echo $nome; ?>">Deletar</A> ] <? if ( $exp[count($exp)-1] == "jpg" or  $exp[count($exp)-1] == "png" ) { ?> |  [ <A class="small"  href="correcao.php?id=<? echo $id?>&foto=<? echo $id?>_<? echo $nome; ?>">Corrigir</A> ] <? } ?> <br> 
		 
		 
		 <?
		 
		 }
		 
		 else{

	   
  ?>
	<A href="arquivos/<? echo $id?>_<? echo $nome; ?>" target="_new" ><IMG height=16 src="img/<? echo $exp[count($exp)-1]; ?>.gif" width=16 border=0></A>
	&nbsp;<A href="arquivos/<? echo $id?>_<? echo $nome; ?>" target="_new" ><? echo $nome; ?></A> 
      (<? echo tamanho_arquivo("arquivos/".$id."_".$nome); ?>) <SPAN class=italic><? echo FormatarDataTime($data);  ?></SPAN> [ <A class="small"  href="?acao=4&id=<? echo $id; ?>&nome=<? echo $nome; ?>">Deletar</A> ] <? if ( $exp[count($exp)-1] == "jpg" or  $exp[count($exp)-1] == "png" ) { ?> |  [ <A class="small"  href="correcao.php?id=<? echo $id?>&foto=<? echo $id?>_<? echo $nome; ?>">Corrigir</A> ] <? } ?> <br>
	  
	<? 
	
		 }
	
	} ?>   </TD>
  </TR><!-- Buttons -->
  <TR align=middle>
    <TD colspan="3" align=middle valign="top">
    <?
    //echo  VerificarCargo($conexao,$sslogado,20);
	 if ( (VerificarCargo($conexao,$sslogado,21) )  or $sslogado == 1   ) {
	  
	  ?>
    <fieldset>
Beispiel #4
0
	 {
		 ?>
            <a href="arquivos/<? echo $id?>_<? echo $nome; ?>" target="_new" ><img height="80" src="arquivos/<? echo $id?>_<? echo $nome; ?>" border=0></a> &nbsp;<a href="arquivos/<? echo $id?>_<? echo $nome; ?>" target="_new" ><? echo $nome; ?></a> (<? echo tamanho_arquivo("arquivos/".$id."_".$nome); ?>) <span class=italic><? echo FormatarDataTime($data);  ?></span> [ <a class="small"  href="?acao=4&id=<? echo $id; ?>&nome=<? echo $nome; ?>">Deletar</a> ]
            <? if ( $exp[count($exp)-1] == "jpg" or  $exp[count($exp)-1] == "png" ) { ?>
            |  [ <a class="small"  href="correcao.php?id=<? echo $id?>&foto=<? echo $id?>_<? echo $nome; ?>">Corrigir</a> ]
            <? } ?>
            <br>
            <?
		 
		 }
		 
		 else{

	   
  ?>
            <a href="arquivos/<? echo $id?>_<? echo $nome; ?>" target="_new" ><img height=16 src="img/<? echo $exp[count($exp)-1]; ?>.gif" width=16 border=0></a> &nbsp;<a href="arquivos/<? echo $id?>_<? echo $nome; ?>" target="_new" ><? echo $nome; ?></a> (<? echo tamanho_arquivo("arquivos/".$id."_".$nome); ?>) <span class=italic><? echo FormatarDataTime($data);  ?></span> [ <a class="small"  href="?acao=4&id=<? echo $id; ?>&nome=<? echo $nome; ?>">Deletar</a> ]
            <? if ( $exp[count($exp)-1] == "jpg" or  $exp[count($exp)-1] == "png" ) { ?>
            |  [ <a class="small"  href="correcao.php?id=<? echo $id?>&foto=<? echo $id?>_<? echo $nome; ?>">Corrigir</a> ]
            <? } ?>
            <br>
            <? 
	
		 }
	
	} ?></td>
          </tr>
        <!-- Buttons -->
        <?
  
  if ( (VerificarCargo($conexao,$sslogado,21) )  or $sslogado == 1   ) 
  {
Beispiel #5
0
  @$rows = mysql_num_rows ( $tabela );
  
  
  for ($x=0;$x<$rows;$x++)
	{
	 $id_upload = mysql_result($tabela,$x,'id_upload');
	 $data    = mysql_result($tabela,$x,'data');
	 $nome    = mysql_result($tabela,$x,'nome');
	 
	 $exp = explode (".",$nome);

	   
  ?>
	<A href="../Chamados/arquivos/<? echo $id?>_<? echo $nome; ?>" target="_new" ><IMG height=16 src="../Chamados/img/<? echo $exp[count($exp)-1]; ?>.gif" width=16 border=0></A>
	&nbsp;<A href="../Chamados/arquivos/<? echo $id?>_<? echo $nome; ?>" target="_new" ><? echo $nome; ?></A> 
      (<? echo tamanho_arquivo("../Chamados/arquivos/".$id."_".$nome); ?>) <SPAN class=italic><? echo FormatarDataTime($data);  ?></SPAN><br>
	  
	<? } ?>   </TD>
  </TR><!-- Buttons -->
  <TR align=middle>
    <TD align=middle colSpan=6>&nbsp;</TD></TR></TBODY></TABLE>
<BR>
<DIV id=relationships_open></DIV>
<DIV id=relationships_closed style="DISPLAY: none">
<TABLE class=width100 cellSpacing=1>
  <TBODY>
  <TR>
    <TD class=form-title><A 
      onclick="ToggleDiv( 'relationships', g_div_relationships ); return false;" 
      href="http://chamados.la.foxconn.com/"><IMG alt=+ 
      src="View_files/plus.png" border=0></A>&nbsp;Relationships 
Beispiel #6
0
function download()
{
    global $db, $TPLV, $geral, $usuario;
    $TPLV->assignGlobal("classe_botao_acao", 'salvar_conta');
    $TPLV->newBlock('edita_registros-prod-download');
    if ($_REQUEST['ok']) {
        $TPLV->newBlock('registro_salvo-prod-download');
    }
    $sql = "SELECT produto_id, nome FROM produtos WHERE produto_id = '" . $_REQUEST['produto_id'] . "'";
    $rs = $db->db_query($sql);
    $TPLV->assignGlobal("produto_id", $rs[0]['produto_id']);
    $TPLV->assignGlobal("nome", $rs[0]['nome']);
    ### arquivos para download já enviados
    $sqlf = 'SELECT id, name, file, num_downs, size, status FROM down_files WHERE product=\'' . $_REQUEST['produto_id'] . '\' ';
    $files = $db->db_query($sqlf);
    foreach ($files as $i => $f) {
        $f['arquivo'] = LOCAL_PATH_SITE . "upload/produtos/download/" . $_REQUEST['produto_id'] . "/" . $f['file'];
        $f['tamanho'] = tamanho_arquivo($f['size']);
        $explode_file = explode('.', $f['file']);
        $f['nome_arquivo'] = $f['name'] . '-' . ($i + 1) . '.' . $explode_file[1];
        $f['st'] = $f['status'] == 'A' ? "Ativo" : "Inativo";
        $TPLV->newBlock('produto-download-lista-files');
        $TPLV->assign($f);
    }
    $TPLV->printToScreen();
}