Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!file_exists($pasta)){
- mkdir("$pasta", 0777);
- }
- $diretorio = "img/";
- foreach ($registro as $Id => $estado) {
- $url = $diretorio . $_FILES['Imagem']['name'][$Id];
- $nome_arquivo = $_FILES['Imagem']['name'][$Id];
- // salva as imagens na pasta
- move_uploaded_file($_FILES['Imagem']['tmp_name'][$Id], $url);
- $pasta = "/var/www/html/wordpress/wp-content/themes/busiprof/img";
- if (!file_exists($pasta)){
- mkdir("$pasta", 0777);
- }
- $diretorio = "/var/www/html/wordpress/wp-content/themes/busiprof/img/";
- foreach ($registro as $Id => $estado) {
- $url = $diretorio . $_FILES['Imagem']['name'][$Id];
- $nome_arquivo = $_FILES['Imagem']['name'][$Id];
- // salva as imagens na pasta
- move_uploaded_file($_FILES['Imagem']['tmp_name'][$Id], $url);
- $result_cursos = "SELECT
- Funcionario,
- Imagem
- FROM centrodb.RegistoManutencao LEFT OUTER JOIN centrodb.InfoLuvas
- ON centrodb.InfoLuvas.Id = centrodb.RegistoManutencao.Colaborador
- WHERE Estado IS NULL OR Estado <> 'Concluído';";
- $resultado_cursos = mysqli_query($conn, $result_cursos);
- $tabela1 .= '<div style="float: center" table align="center">';
- $tabela1 .= '<table border="5">';
- $tabela1 .= '<tr>';
- $tabela1 .='<thead>';
- $tabela1 .= '<tr>';
- $tabela1 .= '<th>Colaborador</th>';
- $tabela1 .= '<th>Imagem</th>';
- $tabela1 .= '</tr>';
- $tabela1 .='</thead>';
- $tabela1 .='<tbody>';
- while($rows_cursos = mysqli_fetch_array($resultado_cursos)) {
- $tabela1 .= '<tr>';
- $tabela1 .= '<td>'.$rows_cursos['Funcionario'].'</td>';
- $tabela1 .= '<td><img src="/var/www/html/wordpress/wp-content/themes/busiprof/img/' .$rows_cursos['Imagem']. '" /></td>';
- $tabela1 .= '</tr>';
- }}
- $tabela1 .= '</tr>';
- $tabela1 .='</tbody>';
- $tabela1 .= '</table>';
- $tabela1 .= '</div>';
- echo $tabela1;
Add Comment
Please, Sign In to add comment