?>
Warning: Cannot modify header information - headers already sent by (output started at /home/w61299/public_html/blog/wp-content/themes/dailyedition2/includes/theme-functions.php:360) in /home/w61299/public_html/blog/wp-includes/feed-rss2.php on line 8
Na verdade não chega a ser um passo a passo é só baixar e configurar já esta tudo pronto.
Passo 1:
Configurar a pagina de conexao com o banco de dados:
Passo 2:
Configurar a pagina cadastro de fotos:
<!-- #sidebar { margin: 0px; width: 300px ; float:left; } #allfiles { float:right; margin:20px; width:420px; } #loader { display:none; padding:0 0 0 20px; } #allfiles ul { margin:0; padding:0; list-style:none; border-bottom:1px solid #ccc; border-right:1px solid #ccc; border-left:1px solid #eee; } #allfiles ul li {padding:8px 5px;border-top:1px solid #eee;} .odd {background:#f9f9f9;} .uploadifyQueue { margin:30px; } .uploadifyQueueItem { font-size: 11px; color:#333; padding:20px 5px; width:240px; background:#ECF3F6; } .uploadifyError { margin:0px; color: #cc0000 !important; } .uploadifyError .uploadifyProgressBar { margin:0px; background-color: #cc0000 !important; } #sidebar .cancel {float:right;} #sidebar .cancel a:link, #sidebar .cancel a:visited, #sidebar .cancel a:hover { padding:0 !important; margin:0 4px 0 0 !important; width:11px !important; background: transaparent !important; } .uploadifyProgress { margin:0px; background-color: #FFF; margin-top: 8px; width: 97%; } .uploadifyProgressBar { margin:0px; background-color: #A3C7D8; width: 1px; height: 5px; } -->
<!-- upload imgs -->
<script src="slideshow/jquery-1.3.2.min.js" type="text/javascript"><!--mce:0--></script>
<script src="slideshow/uploadify/swfobject.js" type="text/javascript"><!--mce:1--></script>
<script src="slideshow/uploadify/jquery.uploadify.v2.1.0.min.js" type="text/javascript"><!--mce:2--></script>
<!-- fim do upload imgs -->
<script type="text/javascript"><!--mce:3--></script>
<div id="sidebar">
<!-- form to be replaced by uploadify -->
<form id="mainftp" action="upload.php" enctype="multipart/form-data" method="post">
<input id="file" name="file" type="file" />
<input name="submit" type="submit" value="Upload" />
</form></div>
<!-- sidebar -->
require("../inc/conecta_mysql.php");
if (!empty($_FILES)) {
$tempFile = $_FILES['Filedata']['tmp_name'];
$targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';
$targetFile = str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];
$img = $_FILES['Filedata']['name'];
// $fileTypes = str_replace('*.','',$_REQUEST['fileext']);
// $fileTypes = str_replace(';','|',$fileTypes);
// $typesArray = split('\|',$fileTypes);
// $fileParts = pathinfo($_FILES['Filedata']['name']);
// if (in_array($fileParts['extension'],$typesArray)) {
// Uncomment the following line if you want to make the directory if it doesn't exist
// mkdir(str_replace('//','/',$targetPath), 0755, true);
$img = md5(uniqid(time())) . "." .jpg;//renome o nome da imagem
mysql_query("INSERT INTO slideshow (`id` ,`file`)VALUES (NULL , '$img')");
move_uploaded_file($tempFile,$img);
echo "1";
// } else {
// echo 'Invalid file type.';
// }
}
?>
abraços a todos e espero q este post ajude muito vocês.
Baixar Arquivos: Baixar
]]>
Crete data base paginacao; Use DB paginação;
CREATE TABLE `produtos` ( `ID` int(11) NOT NULL auto_increment, `PRODUTO` varchar(255) default '', `DESCRICAO` varchar(255) default '', PRIMARY KEY (`ID`) ) ENGINE=MyISAM ;
INSERT INTO `produtos` (`ID`, `PRODUTO`, `DESCRICAO`) VALUES (1, 'Mesa de Cozinha', 'Mesa com 4 cadeiras'), (2, 'Chuveiro Elétrico', 'chuveiro com 2 opções de temperatura'), (3, 'Cadeira pra PC', 'Cadeira de rodinha acochoada'), (4, 'PC News', 'pc trial core 8GB de Memória '), (5, 'Monitor 55polegadas para PC', 'Monitor de Tela preto e Branco');
= $plimit) { $end_count = $start + $plimit; } ?> <div id="box"> <!-- Exibição dos Registros --> <table border="0" width="100%"> <tbody> <tr> <td style="background: #000099; color: #fff; font-size: 18px; font-weight: bold;" width="30%">Produto</td> <td style="background: #000099; color: #fff; font-size: 18px; font-weight: bold;" width="70%">Descrição</td> </tr> <tr> <td style="background: #F4F4F4;"></td> <td style="background: #EEE;"></td> </tr> </tbody> </table> </div> <!-- fim do box --> $plimit) { $var2 = $plimit; } elseif ($totalrows - $end_count <= $plimit) { $var2 = $totalrows - $end_count; } ?> <div class="digg"> 1) { ?> <a href="<?php echo ">«</a> <a href="<?php echo ">"></a> <span class="current"> </span> <a class="next" href="<?php echo ">»</a></div> <!-- fim da class digg -->
/* CSS Document */ /*Digg*/ #box{ width: 50%; margin: 0 auto; border:1px solid #F8F8F8; background:#F8F8F8; } ul, li{ list-style:none; } div.digg { text-align:center; padding: 3px; margin: 3px; text-decoration: none; /* no underline */ } div.digg a { padding: 2px 5px 2px 5px; margin: 2px; border: 1px solid #AAAADD; text-decoration: none; /* no underline */ color: #000099; } div.digg a:hover, div.digg a:active { border: 1px solid #000099; color: #000; } div.digg span.current { padding: 2px 5px 2px 5px; margin: 2px; border: 1px solid #000099; font-weight: bold; background-color: #000099; color: #FFF; } div.digg span.disabled { padding: 2px 5px 2px 5px; margin: 2px; border: 1px solid #EEE; color: #DDD; }
Bom pessoal é só isso e espero que isso ajudem vocês.
Baixar: PAGINAÇÃO
]]>