Ir para conteúdo
Fórum Script Brasil

Jeffer Menezes

Membros
  • Total de itens

    19
  • Registro em

  • Última visita

Sobre Jeffer Menezes

Jeffer Menezes's Achievements

0

Reputação

  1. Eu corrigi dois arquivos css do meu Worpress pela ferramenta para desenvolvimento do Internet Explorer 8, salvei os dois arquivos e os subi para o servidor, como sempre fiz com a mesma ferramenta do Firefox e sempre funcionou perfeitamente. O problema é que os dois css não estão funcionando... Alguém pode me ajudar a entender porque eles não funcionam? Os css são esses: @import url( src/menu.css ); @import url( src/contact.css ); HTML { HEIGHT: 100% } * { PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px } IMG { BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; BORDER-TOP: 0px; BORDER-RIGHT: 0px } P { LINE-HEIGHT: 1.6em; MARGIN: 0px 0px 0.7em } DL { MARGIN: 1em 0px } DT { FONT-WEIGHT: bold } DD { PADDING-BOTTOM: 0px; MARGIN: 0.5em; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px } IMG.right { MARGIN: 10px 0px 0px 10px; FLOAT: right } IMG.alignright { MARGIN: 10px 0px 0px 10px; FLOAT: right } .entry .alignright { MARGIN: 10px 0px 0px 10px; FLOAT: right } IMG.left { MARGIN: 0px 10px 10px 0px; FLOAT: left } IMG.alignleft { MARGIN: 0px 10px 10px 0px; FLOAT: left } .entry .alignleft { MARGIN: 0px 10px 10px 0px; FLOAT: left } HR { DISPLAY: none } BODY { TEXT-ALIGN: center; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; FONT: 14px arial, verdana, tahoma, sans-serif; PADDING-TOP: 0px } A { TEXT-DECORATION: none } A:link { COLOR: #666 } A:visited { COLOR: #666 } A:hover { } A:active { } H1 { FONT-FAMILY: Helvetica, Arial, Verdana, Serif } H2 { FONT-FAMILY: Helvetica, Arial, Verdana, Serif } H3 { FONT-FAMILY: Helvetica, Arial, Verdana, Serif } H4 { FONT-FAMILY: Helvetica, Arial, Verdana, Serif } H5 { FONT-FAMILY: Helvetica, Arial, Verdana, Serif } H6 { FONT-FAMILY: Helvetica, Arial, Verdana, Serif } BR.clear { CLEAR: both } #page { TEXT-ALIGN: left; MARGIN: 0px auto; WIDTH: 970px } #sub-page { PADDING-BOTTOM: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 20px } #content-wrap { WIDTH: 100%; FLOAT: left } #content { MARGIN: 0px 320px 0px 0px } #sidebar { WIDTH: 300px; FLOAT: left; MARGIN-LEFT: -300px } .side1 { WIDTH: 180px; FLOAT: left } .side2 { WIDTH: 120px; FLOAT: left } #footer-all { MARGIN-TOP: 20px; BACKGROUND: #efefef; BORDER-TOP: #ccc 2px dotted } #footer { POSITION: relative; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; MARGIN: 0px auto; PADDING-LEFT: 10px; WIDTH: 970px; PADDING-RIGHT: 10px; PADDING-TOP: 10px } #footer P { FONT-SIZE: 120% } #footer P.right { POSITION: absolute; TEXT-ALIGN: right; TOP: 10px; RIGHT: 0px } #footer .rss { PADDING-LEFT: 20px; BACKGROUND: url(images/ico/rss.png) no-repeat 0px 2px } #top { BACKGROUND: #333 } #pager { HEIGHT: 90px } #headr { POSITION: relative; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; MARGIN: 10px 0px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; HEIGHT: 90px; PADDING-TOP: 0px } #navr { POSITION: relative; TEXT-ALIGN: left; MARGIN: 0px auto; WIDTH: 970px; HEIGHT: 40px; FONT-SIZE: 110% } #navr UL { LIST-STYLE-TYPE: none; LIST-STYLE-IMAGE: none; PADDING-TOP: 10px } #navr UL LI.current_page_item A { BACKGROUND: #ffccff; COLOR: #000 } #navr UL LI { DISPLAY: inline } #navr UL LI A { PADDING-BOTTOM: 2px; PADDING-LEFT: 10px; PADDING-RIGHT: 10px; COLOR: #efefef; PADDING-TOP: 2px } #navr UL LI A:hover { PADDING-BOTTOM: 2px; PADDING-LEFT: 10px; PADDING-RIGHT: 10px; BACKGROUND: #666; COLOR: #fff; PADDING-TOP: 2px } .search #s:hover { } .search { POSITION: absolute; TOP: 8px; RIGHT: 0px } #headr H1 { FONT-SIZE: 300%; PADDING-TOP: 20px } .search #s:focus { } .search #s { BORDER-BOTTOM: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; PADDING-BOTTOM: 4px; PADDING-LEFT: 20px; WIDTH: 200px; PADDING-RIGHT: 4px; BACKGROUND: url(images/ico/search.png) #666 no-repeat 3px 3px; COLOR: #ccc; BORDER-TOP: #ccc 1px solid; BORDER-RIGHT: #ccc 1px solid; PADDING-TOP: 4px } #headr H1 A { COLOR: #b30300 } .catcat { BACKGROUND: #666 } .pix { BACKGROUND: #666 } .description { DISPLAY: none } #ads-468 { POSITION: absolute; BOTTOM: 20px; RIGHT: 0px } .lastlast { Z-INDEX: 1; POSITION: relative; PADDING-BOTTOM: 50px; PADDING-LEFT: 20px; PADDING-RIGHT: 20px; BACKGROUND: url(images/bg/last.jpg) #222 no-repeat 0px 0px; COLOR: #ccc; PADDING-TOP: 20px } .lastlast A { Z-INDEX: 100 } .lastlast H2 { Z-INDEX: 100 } .superdate { MARGIN-BOTTOM: 10px } .lastlast .metameta { POSITION: absolute; BOTTOM: 20px; RIGHT: 20px } .superlast { Z-INDEX: 3; WIDTH: 300px; FLOAT: left } .post { MARGIN-BOTTOM: 20px } .post H2 { FONT-FAMILY: Helvetica, Arial, Verdana, sans-serif; MARGIN-BOTTOM: 10px; LETTER-SPACING: -1pt; FONT-SIZE: 220% } .post H2 A:link { COLOR: #b30300 } .post H2 A:visited { COLOR: #b30300 } .posties H2 { MARGIN-BOTTOM: 5px } .double H2 A:link { COLOR: #b30300 } .double H2 A:visited { COLOR: #b30300 } .posties H2 A:link { COLOR: #b30300 } .superflow { BORDER-TOP: #999 2px dotted; PADDING-TOP: 20px } .posties { POSITION: relative; MARGIN-BOTTOM: 20px; HEIGHT: 180px } .posties H2 A:visited { COLOR: #339900 } .double .entry { MARGIN-TOP: 5px } .posties .entry { MARGIN-TOP: 5px } .leftside { BORDER-BOTTOM: #999 1px dotted; PADDING-BOTTOM: 10px; PADDING-LEFT: 0px; WIDTH: 315px; PADDING-RIGHT: 0px; FLOAT: left; PADDING-TOP: 0px } .rightside { BORDER-BOTTOM: #999 1px dotted; PADDING-BOTTOM: 10px; PADDING-LEFT: 0px; WIDTH: 315px; PADDING-RIGHT: 0px; FLOAT: right; PADDING-TOP: 0px } .posties .metameta { POSITION: absolute; WIDTH: 315px; BOTTOM: 5px; LEFT: 0px } .posties .metameta .commr { POSITION: absolute; BOTTOM: 0px; RIGHT: 0px } .double .metameta .commr { POSITION: absolute; TEXT-ALIGN: right; BOTTOM: 10px; RIGHT: 0px } .tages { POSITION: absolute; BOTTOM: 10px; LEFT: 0px } .double { MIN-HEIGHT: 140px; WIDTH: 650px } .featured { MARGIN-TOP: 20px } .double { BORDER-BOTTOM: #999 1px dotted; POSITION: relative; PADDING-BOTTOM: 10px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; MARGIN-BOTTOM: 20px; PADDING-TOP: 0px } .featured-post { BORDER-BOTTOM: #999 1px dotted; POSITION: relative; PADDING-BOTTOM: 10px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; MARGIN-BOTTOM: 20px; PADDING-TOP: 0px } .double { PADDING-BOTTOM: 30px } .featured A:link { COLOR: #b30300 } .featured A:hover { COLOR: #b30300 } .featured H3 A:visited { COLOR: #ccc } .featured H3 A:link { COLOR: #ccc } .featured H3.title { PADDING-BOTTOM: 4px; PADDING-LEFT: 4px; PADDING-RIGHT: 4px; MARGIN-BOTTOM: 10px; BACKGROUND: #000; PADDING-TOP: 4px } .post-content { WIDTH: 480px; FLOAT: left } .post-image { FLOAT: right } .navigation A { COLOR: #b30300 } .postin { WIDTH: 495px } .featured .tumbr { } .navigation { MIN-HEIGHT: 20px; MARGIN-BOTTOM: 20px } .navigation .alignleft { WIDTH: 50%; FLOAT: left } .navigation .alignright { TEXT-ALIGN: right; WIDTH: 50%; FLOAT: right } .entry UL { LINE-HEIGHT: 1.6em; MARGIN: 0px 0px 0.7em 30px } .entry OL { LINE-HEIGHT: 1.6em; MARGIN: 0px 0px 0.7em 30px } .entry A:link { COLOR: #004199; TEXT-DECORATION: none } .entry A:visited { COLOR: #004199; TEXT-DECORATION: none } .entry A:hover { COLOR: #000; TEXT-DECORATION: underline } .lastlast A:link { COLOR: #fff } .lastlast A:visited { COLOR: #fff } .lastlast H2 A:link { COLOR: #fff } .lastlast H2 A:visited { COLOR: #fff } BLOCKQUOTE { FONT-STYLE: italic; FONT-FAMILY: Georgia, serif; MARGIN-LEFT: 30px; FONT-SIZE: 110% } PRE { MARGIN: 0px 0px 1.2em } CODE { MARGIN: 0px 0px 1.2em } .pagetitle { MARGIN-BOTTOM: 20px } .inn { BORDER-BOTTOM: #ccc 1px dotted; PADDING-BOTTOM: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 5px } .archives UL { MARGIN-LEFT: 30px } .singlelis { MARGIN-BOTTOM: 20px } .singlelis H3 { BORDER-BOTTOM: #ccc 1px solid } #sidebar A { COLOR: #333 } #sidebar A:hover { TEXT-DECORATION: underline } .side1 UL { LIST-STYLE-TYPE: none; LIST-STYLE-IMAGE: none } .side2 UL { LIST-STYLE-TYPE: none; LIST-STYLE-IMAGE: none } .side1 H3 { BORDER-BOTTOM: #999 1px dotted; PADDING-BOTTOM: 4px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; MARGIN-BOTTOM: 5px; FONT-SIZE: 16px; BORDER-TOP: #999 1px dotted; PADDING-TOP: 4px } .side2 H3 { BORDER-BOTTOM: #999 1px dotted; PADDING-BOTTOM: 4px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; MARGIN-BOTTOM: 5px; FONT-SIZE: 16px; BORDER-TOP: #999 1px dotted; PADDING-TOP: 4px } .side1 H2 { BORDER-BOTTOM: #999 1px dotted; PADDING-BOTTOM: 4px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; MARGIN-BOTTOM: 5px; FONT-SIZE: 16px; BORDER-TOP: #999 1px dotted; PADDING-TOP: 4px } .side2 H2 { BORDER-BOTTOM: #999 1px dotted; PADDING-BOTTOM: 4px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; MARGIN-BOTTOM: 5px; FONT-SIZE: 16px; BORDER-TOP: #999 1px dotted; PADDING-TOP: 4px } .boxr { MARGIN-BOTTOM: 20px } #sidebar .categories { MARGIN-BOTTOM: 20px } #sidebar .linkcat { MARGIN-BOTTOM: 20px } #sidebar .widget { MARGIN-BOTTOM: 20px } .side1 .gapy { MARGIN-RIGHT: 10px } .boxtop { BORDER-BOTTOM: #666 1px dotted; BORDER-LEFT: #666 1px dotted; PADDING-BOTTOM: 8px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; MARGIN-BOTTOM: 20px; BACKGROUND: #efefef; BORDER-TOP: #666 1px dotted; BORDER-RIGHT: #666 1px dotted; PADDING-TOP: 15px } .box-ad { TEXT-ALIGN: center; PADDING-BOTTOM: 0px; LIST-STYLE-TYPE: none; MARGIN: 0px; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-SIZE: 0.9em; OVERFLOW: hidden; LIST-STYLE-IMAGE: none; PADDING-TOP: 0px } .box-ad LI { PADDING-BOTTOM: 0px; MARGIN: 0px 0px 10px 17px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; DISPLAY: inline; FLOAT: left; PADDING-TOP: 0px } .clearfix:after { DISPLAY: block; HEIGHT: 0px; VISIBILITY: hidden; CLEAR: both; CONTENT: "." } .clearfix { DISPLAY: inline-block } * HTML .clearfix { HEIGHT: 1% } .clearfix { DISPLAY: block } #ayu { MARGIN-BOTTOM: 20px } .stats { BORDER-BOTTOM: #ccc 1px dotted; FONT-SIZE: 90%; BORDER-TOP: #ccc 1px dotted } .archiv LI { PADDING-LEFT: 16px; BACKGROUND: url(images/ico/10-dates.png) no-repeat 0px 3px } .linkcat LI { PADDING-LEFT: 16px; BACKGROUND: url(images/ico/10-link.png) no-repeat 0px 3px } .meta LI { PADDING-LEFT: 16px; BACKGROUND: url(images/ico/10-star.png) no-repeat 0px 3px } H3#trackbacks { MARGIN-BOTTOM: 10px } H3#comments { MARGIN-BOTTOM: 10px } H3#respond { MARGIN-BOTTOM: 10px } OL.commentlist { LIST-STYLE-TYPE: none; MARGIN-BOTTOM: 20px; LIST-STYLE-IMAGE: none } OL.trackbacklist { LIST-STYLE-TYPE: none; MARGIN-BOTTOM: 20px; LIST-STYLE-IMAGE: none } .commentlist UL { LIST-STYLE-TYPE: none; LIST-STYLE-IMAGE: none } .track { PADDING-BOTTOM: 10px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 10px } .comment { POSITION: relative; PADDING-BOTTOM: 10px; PADDING-LEFT: 5px; PADDING-RIGHT: 5px; PADDING-TOP: 10px } .comment A { COLOR: #004199 } .alt { BACKGROUND: #58c6f4 } .alt A { COLOR: #132a34 } .commentlist .children { MARGIN-LEFT: 30px } .formin INPUT { BORDER-BOTTOM: #aacfe4 1px solid; BORDER-LEFT: #aacfe4 1px solid; PADDING-BOTTOM: 4px; PADDING-LEFT: 2px; PADDING-RIGHT: 2px; BORDER-TOP: #aacfe4 1px solid; BORDER-RIGHT: #aacfe4 1px solid; PADDING-TOP: 4px } TEXTAREA { BORDER-BOTTOM: #aacfe4 1px solid; BORDER-LEFT: #aacfe4 1px solid; PADDING-BOTTOM: 4px; PADDING-LEFT: 2px; WIDTH: 100%; PADDING-RIGHT: 2px; BORDER-TOP: #aacfe4 1px solid; BORDER-RIGHT: #aacfe4 1px solid; PADDING-TOP: 4px } .formin #submit { BORDER-BOTTOM: medium none; TEXT-ALIGN: center; BORDER-LEFT: medium none; WIDTH: 125px; BACKGROUND: url(images/submit.png) #666666 no-repeat; HEIGHT: 31px; COLOR: #ffffff; CLEAR: both; FONT-SIZE: 11px; BORDER-TOP: medium none; FONT-WEIGHT: bold; BORDER-RIGHT: medium none } .leftarea { WIDTH: 170px; FLOAT: left } .leftarea IMG { PADDING-BOTTOM: 4px; PADDING-LEFT: 4px; PADDING-RIGHT: 4px; MARGIN-BOTTOM: 10px; BACKGROUND: #b8e7fa; PADDING-TOP: 4px } .alt .leftarea IMG { PADDING-BOTTOM: 4px; PADDING-LEFT: 4px; PADDING-RIGHT: 4px; BACKGROUND: #fff; PADDING-TOP: 4px } .rightarea { MARGIN-LEFT: 170px; MARGIN-RIGHT: 50px } .commentmetadata { POSITION: absolute; BOTTOM: 10px } .numero { POSITION: absolute; FONT-SIZE: 200%; TOP: 10px; RIGHT: 10px } .alt .numero A { COLOR: #fff } .tool-tip { Z-INDEX: 13000; WIDTH: 250px; COLOR: #444444 } .tool-title { BORDER-BOTTOM: medium none; TEXT-ALIGN: left; BORDER-LEFT: #999 1px dotted; PADDING-BOTTOM: 5px; MARGIN: 0px; PADDING-LEFT: 8px; PADDING-RIGHT: 8px; FONT-FAMILY: Georgia, "Times New Roman", Times, serif; BACKGROUND: url(images/tips-trans.png) left top; COLOR: #343434; FONT-SIZE: 16px; BORDER-TOP: #999 1px dotted; FONT-WEIGHT: normal; BORDER-RIGHT: #999 1px dotted; PADDING-TOP: 8px } .tool-text { BORDER-BOTTOM: #999 1px dotted; TEXT-ALIGN: left; BORDER-LEFT: #999 1px dotted; PADDING-BOTTOM: 8px; PADDING-LEFT: 8px; PADDING-RIGHT: 8px; BACKGROUND: url(images/tips-trans.png) right bottom; FONT-SIZE: 12px; BORDER-TOP: medium none; BORDER-RIGHT: #999 1px dotted; PADDING-TOP: 0px } IMG.wp-smiley { VERTICAL-ALIGN: -25% } P IMG { PADDING-BOTTOM: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; MAX-WIDTH: 100%; PADDING-TOP: 0px } IMG.centered { DISPLAY: block; MARGIN-LEFT: auto; MARGIN-RIGHT: auto } IMG.alignright { PADDING-BOTTOM: 4px; MARGIN: 0px 0px 2px 7px; PADDING-LEFT: 4px; PADDING-RIGHT: 4px; DISPLAY: inline; PADDING-TOP: 4px } IMG.alignleft { PADDING-BOTTOM: 4px; MARGIN: 0px 7px 2px 0px; PADDING-LEFT: 4px; PADDING-RIGHT: 4px; DISPLAY: inline; PADDING-TOP: 4px } .alignright { FLOAT: right } .wp-caption { BORDER-BOTTOM: #ddd 1px solid; TEXT-ALIGN: center; BORDER-LEFT: #ddd 1px solid; BACKGROUND-COLOR: #f3f3f3; MARGIN: 10px; BORDER-TOP: #ddd 1px solid; BORDER-RIGHT: #ddd 1px solid; PADDING-TOP: 4px; -moz-border-radius: 3px; -khtml-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px } .alignleft { FLOAT: left } .aligncenter { DISPLAY: block; MARGIN-LEFT: auto; MARGIN-RIGHT: auto } DIV.aligncenter { DISPLAY: block; MARGIN-LEFT: auto; MARGIN-RIGHT: auto } .wp-caption IMG { BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; BORDER-TOP: 0px; BORDER-RIGHT: 0px; PADDING-TOP: 0px } .wp-caption P.wp-caption-text { PADDING-BOTTOM: 5px; LINE-HEIGHT: 17px; MARGIN: 0px; PADDING-LEFT: 4px; PADDING-RIGHT: 4px; FONT-SIZE: 11px; PADDING-TOP: 0px } .reply { TEXT-ALIGN: right } ul#dropnav { margin: 0; padding: 0; list-style: none; color: #444; font-weight:bold; background:#ddd; height:100%; text-transform: uppercase; } #dropnav li { display: block; float: left; margin:0; height:24px; } #dropnav li a { display: block; color: #555; text-decoration: none; padding: 4px 17px 5px 17px; margin:0; border-bottom: 0; } #dropnav li a:hover { color: #fff; background:#333; } #dropnav li ul li a { display: block; color: #555; text-decoration: none; margin:0; line-height:18px; overflow:hidden; border-bottom: 0; } #dropnav li ul li a:hover { color: #333; background:none; } /* SON OF SUCKERFISH DROPDOWNS See http://www.htmldog.com/articles/suckerfish/dropdowns/ --------------------- */ /* 2nd and 3rd level menus */ #dropnav li ul { position: absolute; z-index: 99; left: -999em; width:150px; overflow:hidden; margin: 0px 0 0 -1px; padding: 0; height: auto; border: solid #C7C7C7; border-width: 1px 1px 0; background: #ddd; font-weight:normal; } /* 3rd level menus only */ #dropnav ul ul { margin: -2em 0 0 150px; } /* 2nd and 3rd level menus */ #dropnav li li { width: 150px; clear:both; overflow:hidden; border-bottom: 1px solid #fff; } #dropnav li li a { padding:5px 5px 0 5px; margin:0; } /* 2nd and 3rd level menus */ #dropnav ul a { border-right: 0; } #dropnav li:hover ul ul, #dropnav li:hover ul ul ul, #dropnav li.sfhover ul ul, #dropnav li.sfhover ul ul ul { left: -999em; overflow:hidden; } /* This "unhides" the sub-menus (left: -999em is what hides them) */ #dropnav li:hover ul, #dropnav li li:hover ul, #dropnav li li li:hover ul, #dropnav li.sfhover ul, #dropnav li li.sfhover ul, #dropnav li li li.sfhover ul { left: auto; } #dropnav li:hover, #dropnav li.sfhover { background: #ECECEC; color:#4aaeee; } /* 2nd and 3rd level menus */ #dropnav ul li:hover, #dropnav ul ul li:hover, #dropnav ul li.sfhover, #dropnav ul ul li.sfhover { background: #e8e8e8; } /* 2nd and 3rd level menus */ #dropnav ul li a, #dropnav ul ul li a { background: none; } /* 2nd level menus only */ #dropnav a.sub { background: url(../images/arrow-right.gif) right no-repeat; background-position:190px 12px; }
  2. Boa noite. Eu preciso de uma ajudinha simples. Quero saber como colocar no tema padrão de WP o efeito das thumbs que vemos nesse tema: http://www.wp-themes.der-prinz.com/magazine/ Essa bordinha charmosa... Grato desde já, Jefferson.
  3. Problema resolvido! Fica abaixo o link de um ótimo código para quem estiver passando pelo mesmo problema: http://www.codigofonte.com.br/codigo/js-dh...s-em-javascript
  4. Bom dia, Coloquei em meu site os seguintes scripts em php para ver a data atual: O formato deveria ser o seguinte: segunda-feira, 17 de novembro. (por exemplo) Porém, nenhum dos dois atualiza o dia no mesmo momento. Eu percebo que os dois scripts atualizam o dia com quase 18 horas (ou mais), de atraso em relação a data atual. O que fazer? Problema no servidor?
  5. Jeffer Menezes

    Chamar script

    Para resumir e poupar o nosso tempo, o que eu preciso é encaixar este script ou chamá-lo (a página dele se chama "index.php"), em uma página html. Só isso. Você pode me ajudar? Você pode montar uma página html simples com o script encaixado em uma tabela dela? O resto, eu passo para a minha página html. É só isso.
  6. Eis a solução para o problema (está em inglês): http://forums.digitalpoint.com/showthread.php?t=476522 Espero que ajude outros passando pelo mesmo problema.
  7. Eu não entendo porque, quando eu tiro o sublinhado dos links de uma página htm, eles somem no IE (7), mas continuam aparecendo no Firefox e no Chrome. O que fazer?
  8. Jeffer Menezes

    Acentos

    Onde eu altero isso? Três arquivos têm referências a codificações no minishowcase: INDEX.PHP <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <?php /* * minishowcase : the super-easy gallery * by victor zambrano <minishowcase@frwrd.net> * * minishowcase is a small and simple php/javascript online photo gallery, * powered by AJAX that lets you put easily your images in an online gallery, * without having to configure databases or changing and customising code * (though you may do it if you feel so inclined) allowing you to have an * up-and-running gallery in a few minutes. * * * DISCLAIMER: THIS SOFTWARE IS GIVEN 'AS IS' IN THE HOPE THAT IT WILL * BE USEFUL, BUT WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE; * * * LICENSE: This work is licensed under the * #### Creative Commons Attribution-Share Alike 2.5 License. #### * You should have received a copy of the license with this software. * To view a copy of this license, visit * http://creativecommons.org/licenses/by-sa/2.5/ or send a letter to * Creative Commons, 543 Howard Street, 5th Floor, * San Francisco, California, 94105, USA. * * * For more information on minishowcase, please visit: * http://minishowcase.frwrd.net * */ ## error reporting ## error_reporting(E_ALL); ## setting: debug flag ## //$debug_main_flag = true; // NOT IN USE ## setting: include header/footer ## ## set to TRUE to embed the add_header.php and/or add_footer.php files $include_header = false; $include_footer = false; #### DO NOT CHANGE FROM HERE #################################### #### UNLESS YOU KNOW WHAT YOU'RE DOING, OF COURSE ############### ## import init file require_once("libraries/general.bootstrap.php"); ## DO NOT REMOVE THIS CODE, PLEASE :) ## include("config/version.php"); print("<!-- \n\tminishowcase $version\n\tby victor zambrano\n\thttp://minishowcase.frwrd.net/\n -->\n"); ?> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $locale_string?>" lang="<?php echo $locale_string?>"> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <title><?php echo $settings['gallery_title']?></title> <!-- START CPAINT:JSRS ( http://cpaint.sourceforge.net/ ) --> &lt;script type="text/javascript" src="libraries/cpaint2.inc.compressed.js"></script> <!-- END CPAINT:JSRS --> <!-- START AJAX SCRIPTS --> &lt;script src="libraries/script.loader.php?load=init" type="text/javascript"></script> &lt;script src="libraries/ajax.functions.js" type="text/javascript"></script> <!-- END AJAX SCRIPTS --> <?php if($settings['preview_mode'] == 1 && file_exists("extensions/slimbox/" )) { ?> <!-- START SLIMBOX --> &lt;script type="text/javascript" src="extensions/slimbox/js/mootools.r83.js"></script> &lt;script type="text/javascript" src="extensions/slimbox/js/slimbox.js"></script> <link rel="stylesheet" href="extensions/slimbox/css/slimbox.css" type="text/css" media="screen" /> <!-- END SLIMBOX --> <?php } else if($settings['preview_mode'] == 2 && file_exists("extensions/thickbox_2/" )) { ?> <!-- START THICKBOX_2 --> &lt;script type="text/javascript" src="extensions/thickbox_2/jquery.js"></script> &lt;script type="text/javascript" src="extensions/thickbox_2/thickbox.js"></script> <link rel="stylesheet" href="extensions/thickbox_2/thickbox.css" type="text/css" media="screen" /> <!-- END THICKBOX_2 --> <?php } ?> <!-- START GALLERY CSS --> <link rel="stylesheet" href="libraries/script.loader.php?load=gallery" type="text/css" media="screen" /> <!-- END GALLERY CSS --> <?php if ($include_header | $include_footer) { ?> <!-- START HEADER/FOOTER CSS --> <link rel="stylesheet" href="styles/includes.css" type="text/css" media="screen" /> <!-- END HEADER/FOOTER CSS --> <?php } ?> <!-- START SCRIPTS/STYLESHEETS FOR IE PC --> <!--[if IE]> <link href="styles/gallery_ie.css" rel="stylesheet" type="text/css" media="screen" /> <!--[if gte IE 5.5]> <!--[if lt IE 7]> <style type="text/css"> div#msc_image { /* IE5.5+/Win - this is more specific than the IE 5.0 version */ left: expression( ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) + 'px' ); top: expression( ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) + 'px' ); right: auto; bottom: auto; } </style> <![endif]--> <![endif]--> <![endif]--> <!-- END SCRIPTS/STYLESHEETS FOR IE PC --> </head> <body> <a id="hash" name="null"></a> <?php if ($include_header && file_exists("add_header.php")) { include("add_header.php"); } ?> <div id="global_container"> <div id="debug"><p>[DEBUG] <span id="debug_content"><?php echo $_SERVER["HTTP_USER_AGENT"];?></span></p></div> <!-- tooltip --> <div id="tooltip"></div> <!-- alert container --> <div id="alert"> <span id="msg"><!-- Alert goes here --></span> <p><a id="dismiss" href="java script:;" onclick="hideDiv('alert');"><?php echo $lang['alert_dismiss']?>...</a></p> </div> <!-- alert container --> <div id="msc_container"> <!-- menu div --> <div id="msc_menu"> <h1><?php echo $lang['menu_title']?></h1> <!-- menu items div --> <div id="galleries_menu"></div> </div> <!-- menu div --> <!-- thumbs div --> <div id="msc_thumbs"> <!-- top menu --> <div id="top_menu" class="<?php echo ($settings['use_select_menu'])?'menu_bg':'';?>"> <!-- galleries menu --> <div id="galleries_select"> </div> <!-- tools menu --> <div id="tools_menu">tools: <span id="tools_slideshow"></span> <span id="tools_permalink"></span> </div> </div> <!-- gallery info div --> <div id="gallery_data"> <div id="gallery_title"></div> </div> <!-- gallery description div --> <div id="gallery_description"> <?php if (file_exists("galleries/".$settings['info_file'])) { echo get_include_contents("galleries/".$settings['info_file']); } ?></div> <!-- thumbs wrapper --> <div id ="thumbs_div"> <!-- gallery block nav div --> <div id="gallery_nav"> <div id="gallery_block"></div> </div> <!-- thumbs loader data --> <div id="thumbs_load"></div> <!-- thumbs container --> <div id="thumbs_cont"></div> <div id="gallery_nav2"> <div id="gallery_block2"></div> </div> </div> <!-- footer div --> <div id="msc_foot"> <span id="footer_cont"><?php echo $settings['gallery_footer']?></span> </div> </div> <!-- thumbs div --> </div> <!-- msc_container div --> <!-- image container --> <div id="msc_image"> <div id="image_url"></div> <!-- image div --> <div id="image_div"> <div id="image_container"> <div id="image_menu"> <span id="close_win"> <a href="java script:;" onclick="closeImageWin();">« <?php echo $lang['lightbox_back']?></a> </span> <div id="nav_container"> <div id="prev"> <a id="a_prev" href="java script:;" onclick="prevImage()"><img src="./themes/<?php echo $selected_theme?>/<?php echo $theme_image_prev?>" alt="" /></a> </div> <div id="next"> <a id="a_next" href="java script:;" onclick="nextImage()"><img src="./themes/<?php echo $selected_theme?>/<?php echo $theme_image_next?>" alt="" /></a> </div> <div id="nav_thumbs"></div> </div> </div> <div id="image_header"> <div id="timer"><span id="time">[ <?php echo $settings['slideshow_seconds']?>]</span> | <span><a id="toggle_show" href="java script:;" onclick="startSlideshow()"><?php echo $lang['slideshow_pause']?> <?php echo $lang['slideshow_name']?></a></span></div> <div id="image_title"></div> <div id="mainimg_desc" class="imagen_desc"></div> </div> <div id="img"> <img id="mainimg" class="imagen" src="images/spacer.gif" alt="" /> </div> </div> </div> <!-- image div --> <!-- image bg --> <div id="image_bg"></div> </div> <!-- image container --> </div> <?php if ($include_footer && file_exists("add_footer.php")) { include("add_footer.php"); } ?> <?php /**** DEBUG INFO ****/ if ($settings['gallery_debug']) { echo ('<div id="debug_information">'); phpinfo(INFO_CONFIGURATION); phpinfo(INFO_CONFIGURATION); phpinfo(INFO_ENVIRONMENT); phpinfo(INFO_VARIABLES); echo ('</div>'); } ?> </body> </html> CPAINT2.INC.PHP <?php /** * CPAINT - Cross-Platform Asynchronous INterface Toolkit * * http://cpaint.sourceforge.net * * released under the terms of the LGPL * see http://www.fsf.org/licensing/licenses/lgpl.txt for details * * $Id$ * $Log$ * Revision 1.25 2005/08/17 17:48:00 wiley14 * Changed comment about version number. * * Revision 1.24 2005/08/17 15:52:53 saloon12yrd * cleaner approach to ?api_query * * Revision 1.20 2005/08/08 15:20:18 wiley14 * Added replacement character for greater than sign in cpaint_transformer * * Revision 1.9 2005/07/17 18:02:15 wiley14 * Fixed problem in get_name function (diff to see changes) * * Revision 1.8 2005/07/17 17:31:23 wiley14 * Fixed problem in set_name function (diff to see changes) * * Revision 1.7 2005/07/14 17:14:21 saloon12yrd * added support for arbitrary XML attributes * * Revision 1.3 2005/07/10 22:18:03 wiley14 * Added id setter function for compatibility with ASP * * Revision 1.2 2005/07/10 00:49:30 wiley14 * no message * * @package CPAINT * @author Paul Sullivan <wiley14@gmail.com> * @author Dominique Stender <dstender@st-webdevelopment.de> * @copyright Copyright (c) 2005 Paul Sullivan, Dominique Stender - http://cpaint.sourceforge.net */ /** * cpaint base class. * * @package CPAINT * @access public * @author Paul Sullivan <wiley14@gmail.com> * @author Dominique Stender <dstender@st-webdevelopment.de> * @copyright Copyright (c) 2005 Paul Sullivan, Dominique Stender - http://cpaint.sourceforge.net * @version 2.0.0 */ class cpaint { /** * version number * * @access private * @var string $version */ var $version = '2.0.0'; /** * response type. * * @access protected * @var string $response_type */ var $response_type; /** * the basenode ajaxResponse. * * @access protected * @var object $basenode */ var $basenode; /** * list of registered methods available through the CPAINT API * * @access protected * @var array $api_functions */ var $api_functions; /** * PHP4 constructor. * * @access public * @return void */ function cpaint() { $this->__construct(); } /** * PHP 5 constructor. * * @access public * @return void */ function __construct() { // initialize properties $this->basenode = new cpaint_node(); $this->basenode->set_name('ajaxResponse'); $this->basenode->set_attribute('id', ''); $this->basenode->set_encoding('UTF-8'); $this->response_type = 'TEXT'; $this->api_functions = array(); // open output buffer so no output is sent back to the client ob_start(); // determine response type if (isset($_GET['cpaint_response_type'])) { $this->response_type = (string) $_GET['cpaint_response_type']; } elseif (isset($_POST['cpaint_response_type'])) { $this->response_type = (string) $_POST['cpaint_response_type']; } } /** * calls the user function responsible for this specific call. * * @access public * @param string $input_encoding input data character encoding, default is UTF-8 * @return void */ function start($input_encoding = 'UTF-8') { $user_function = ''; $arguments = array(); // work only if there is no API version request if (!isset($_GET['api_query']) && !isset($_POST['api_query'])) { $this->basenode->set_encoding($input_encoding); if ($_GET['cpaint_function'] != '') { $user_function = $_GET['cpaint_function']; $arguments = $_GET['cpaint_argument']; } elseif ($_POST['cpaint_function'] != '') { $user_function = $_POST['cpaint_function']; $arguments = $_POST['cpaint_argument']; } // perform character conversion on every argument $arguments = cpaint_transformer::decode_array($arguments, $this->basenode->get_encoding()); if (function_exists($user_function) && is_array($this->api_functions[$user_function])) { // a valid API function is to be called call_user_func_array($this->api_functions[$user_function]['call'], $arguments); } else { // desired function is not registered as API function // @todo -o"Dominique Stender" -ccpaint implement a better debugging $this->basenode->set_data('A function name was passed that is not allowed to execute on this server.'); } } // end: if } /** * generates and prints the response based on response type supplied by the frontend. * * @access public * @return void */ function return_data() { // delete output buffer ob_end_clean(); // send appropriate headers to avoid caching header ('Expires: Fri, 14 Mar 1980 20:53:00 GMT'); header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header ('Cache-Control: no-cache, must-revalidate'); header ('Pragma: no-cache'); // work only if there is no API version request if (!isset($_GET['api_query']) && !isset($_POST['api_query'])) { // trigger generation of response switch (trim(strtoupper($this->response_type))) { case 'TEXT': header('Content-type: text/plain; charset=' . cpaint_transformer::find_output_charset($this->basenode->get_encoding())); echo cpaint_transformer::toString($this->basenode); break; case 'OBJECT': case 'XML': header('Content-type: text/xml; charset=' . cpaint_transformer::find_output_charset($this->basenode->get_encoding())); echo '<?xml version="1.0" encoding="' . cpaint_transformer::find_output_charset($this->basenode->get_encoding()) . '"?>' . cpaint_transformer::toXML($this->basenode); break; default: echo 'ERROR: invalid response type \'' . $this->response_type . '\''; } // end: switch } else { // API version request header('Content-type: text/html; charset=ISO-8859-1'); echo 'CPAINT v' . $this->version . '/PHP v' . phpversion(); } // end: if } /** * registers a new function or method as part of the CPAINT API * * @access public * @param mixed $func function name or array(&$object, 'function_name') * @param array $input function input parameters (not yet used by CPAINT and subject to change) * @param array $output function output format (not yed used by CPAINT and subject to change) * @return boolean */ function register($func, $input = array(), $output = array()) { $return_value = false; $input = (array) $input; $output = (array) $output; if (is_array($func) && is_object($func[0]) && is_string($func[1]) && method_exists($func[0], $func[1])) { // calling a method of an object $this->api_functions[$func[1]] = array( 'call' => $func, 'input' => $input, 'output' => $output, ); $return_value = true; } elseif (is_string($func)) { // calling a standalone function $this->api_functions[$func] = array( 'call' => $func, 'input' => $input, 'output' => $output, ); $return_value = true; } // end: if return $return_value; } /** * adds a new subnode to the basenode. * * will return a reference to it for further processing. * * @access public * @param string $nodename name of the new node * @param string $id id of the new node * @return object */ function &add_node($nodename, $id = '') { return $this->basenode->add_node($nodename, $id); } /** * assigns textual data to the basenode. * * @access public * @param string $data data to assign to this node * @return void */ function set_data($data) { $this->basenode->set_data($data); } /** * returns the data assigned to the basenode. * * @access public * @return string */ function get_data() { return $this->basenode->get_data(); } /** * sets the id property of the basenode. * * @deprecated deprecated since version 2.0.0 * @access public * @param string $id the id * @return void */ function set_id($id) { $this->basenode->set_attribute('id', $id); } /** * gets the id property of the basenode. * * @deprecated deprecated since version 2.0.0 * @access public * @return string */ function get_id() { return $this->basenode->get_attribute('id'); } /** * adds a new attribute to the basenode. * * @access public * @param string $name attribute name * @param mixed $value attribute value * @return void */ function set_attribute($name, $value) { $this->basenode->set_attribute($name, $value); } /** * retrieves an attribute of the basenode by name. * * @access public * @param string $name attribute name * @return string */ function get_attribute($name) { return $this->basenode->get_attributes($name); } /** * set name property of the basenode. * * @access public * @param string $name the name * @return void */ function set_name($name) { $this->basenode->set_name($name); } /** * get name property of the basenode. * * @access public * @return string */ function get_name() { return $this->basenode->get_name(); } } /** * a cpaint data node. Data nodes are used to build up the response. * * @package CPAINT * @access public * @author Dominique Stender <dstender@st-webdevelopment.de> * @copyright 2005 (Dominique Stender); All rights reserved * @version 2.0.0 */ class cpaint_node { /** * array of subnodes. * * @access public * @var array $composites */ var $composites; /** * node attributes. * * @access public * @var array $attributes */ var $attributes; /** * name of this node. * * @access public * @var string $nodename */ var $nodename; /** * textual data of this node. * * @access public * @var string $data */ var $data; /** * character encoding for input data * * @access private * @var $input_encoding */ var $input_encoding; /** * PHP4 constructor. * * @package CPAINT * @access public * @return void */ function cpaint_node() { $this->__construct(); } /** * PHP 5 constructor. * * @access public * @return void */ function __construct() { // initialize properties $this->composites = array(); $this->attributes = array(); $this->data = ''; $this->set_encoding('UTF-8'); $this->set_name(''); $this->set_attribute('id', ''); } /** * adds a new subnode to this node. * * will return a reference to it for further processing. * * @access public * @param string $nodename name of the new node * @param string $id id of the new node * @return object */ function &add_node($nodename, $id = '') { $composites = count($this->composites); // create new node $this->composites[$composites] =& new cpaint_node(); $this->composites[$composites]->set_name($nodename); $this->composites[$composites]->set_attribute('id', $id); $this->composites[$composites]->set_encoding($this->input_encoding); return $this->composites[$composites]; } /** * assigns textual data to this node. * * @access public * @param string $data data to assign to this node * @return void */ function set_data($data) { $this->data = (string) $data; } /** * returns the textual data assigned to this node. * * @access public * @return string */ function get_data() { return $this->data; } /** * sets the id property of this node. * * @deprecated deprecated since version 2.0.0 * @access public * @param string id the id * @return void */ function set_id($id) { if ($id != '') { $this->set_attribute('id', $id); } // end: if } /** * returns the id property if this node. * * @deprecated deprecated since version 2.0.0 * @access public * @return string */ function get_id() { return $this->get_attribute('id'); } /** * adds a new attribute to this node. * * @access public * @param string $name attribute name * @param mixed $value attribute value * @return void */ function set_attribute($name, $value) { $this->attributes[$name] = (string) $value; } /** * retrieves an attribute by name. * * @access public * @param string $name attribute name * @return string */ function get_attribute($name) { return $this->attributes[$name]; } /** * set name property. * * @access public * @param string $name the name * @return void */ function set_name($name) { $this->nodename = (string) $name; } /** * get name property. * * @access public * @return string */ function get_name() { return $this->nodename; } /** * sets the character encoding for this node * * @access public * @param string $encoding character encoding * @return void */ function set_encoding($encoding) { $this->input_encoding = strtoupper((string) $encoding); } /** * returns the character encoding for this node * * @access public * @return string */ function get_encoding() { return $this->input_encoding; } } /** * static class of output transformers. * * @package CPAINT * @access public * @author Dominique Stender <dstender@st-webdevelopment.de> * @copyright 2002-2005 (Dominique Stender); All rights reserved * @version 2.0.0 */ class cpaint_transformer { /** * toString method, used to generate response of type TEXT. * will perform character transformation according to parameters. * * @access public * @param object $node a cpaint_node object * @return string */ function toString(&$node) { $return_value = ''; foreach ($node->composites as $composite) { $return_value .= cpaint_transformer::toString($composite); } $return_value .= cpaint_transformer::encode($node->get_data(), $node->get_encoding()); return $return_value; } /** * XML response generator. * will perform character transformation according to parameters. * * @access public * @param object $node a cpaint_node object * @return string */ function toXML(&$node) { $return_value = '<' . cpaint_transformer::encode($node->get_name(), $node->get_encoding()); // handle attributes foreach ($node->attributes as $name => $value) { if ($value != '') { $return_value .= ' ' . cpaint_transformer::encode($name, $node->get_encoding()) . '="' . cpaint_transformer::encode($node->get_attribute($name), $node->get_encoding()) . '"'; } } // end: foreach $return_value .= '>'; foreach ($node->composites as $composite) { $return_value .= cpaint_transformer::toXML($composite); } $return_value .= cpaint_transformer::encode($node->get_data(), $node->get_encoding()) . '</' . cpaint_transformer::encode($node->get_name(), $node->get_encoding()) . '>'; return $return_value; } /** * performs conversion to JavaScript-safe UTF-8 characters * * @access public * @param string $data data to convert * @param string $encoding character encoding * @return string */ function encode($data, $encoding) { // convert string if (function_exists('iconv')) { // iconv is by far the most flexible approach, try this first $return_value = iconv($encoding, 'UTF-8', $data); } elseif ($encoding == 'ISO-8859-1') { // for ISO-8859-1 we can use utf8-encode() $return_value = utf8_encode($data); } else { // give up. if UTF-8 data was supplied everything is fine! $return_value = $data; } /* end: if */ // now encode non-printable characters for ($i = 0; $i < 32; $i++) { $return_value = str_replace(chr($i), '\u00' . sprintf('%02x', $i), $return_value); } // end: for // encode <, >, and & respectively for XML sanity $return_value = str_replace(chr(0x26), '\u0026', $return_value); $return_value = str_replace(chr(0x3c), '\u003c', $return_value); $return_value = str_replace(chr(0x3e), '\u003e', $return_value); return $return_value; } /** * performs conversion from JavaScript encodeURIComponent() string (UTF-8) to * the charset in use. * * @access public * @param string $data data to convert * @param string $encoding character encoding * @return string */ function decode($data, $encoding) { // convert string if (function_exists('iconv')) { // iconv is by far the most flexible approach, try this first $return_value = iconv('UTF-8', $encoding, $data); } elseif ($encoding == 'ISO-8859-1') { // for ISO-8859-1 we can use utf8-decode() $return_value = utf8_decode($data); } else { // give up. if data was supplied in the correct format everything is fine! $return_value = $data; } /* end: if */ return $return_value; } /** * decodes a (nested) array of data from UTF-8 into the configured character set * * @access public * @param array $data data to convert * @param string $encoding character encoding * @return array */ function decode_array($data, $encoding) { $return_value = array(); foreach ($data as $key => $value) { if (!is_array($value)) { $return_value[$key] = cpaint_transformer::decode($value, $encoding); } else { $return_value[$key] = cpaint_transformer::decode_array($value, $encoding); } } return $return_value; } /** * determines the output character set * based on input character set * * @access public * @param string $encoding character encoding * @return string */ function find_output_charset($encoding) { $return_value = 'UTF-8'; if (function_exists('iconv') || $encoding == 'UTF-8' || $encoding == 'ISO-8859-1') { $return_value = 'UTF-8'; } else { $return_value = $encoding; } /* end: if */ return $return_value; } } ?> GENERAL.FUNCTIONS.PHP <?php /** * FUNCTIONS */ //// finally let's look for subgalleries! //// DOES NOT WORK YET //// function check_subgalleries($filepath) { $subgalleries_array = scandir_directories($filepath); return $subgalleries_array; } /// let's see if there's a password file in the gallery function password_exists($base, $id, $file) { $password = (file_exists("$base/galleries/$id/".$file.".php")) ? file_get_contents("$base/galleries/$id/".$file.".php") : ""; return strip_tags($password); } //// encode source for proper javascript interpreting function enc($source) { return rawurlencode(htmlentities($source,ENT_NOQUOTES,"UTF-8")); } //// retrieve query parameters function printQueryParameters($flag) { if ($flag) { $query_string = isset($_SERVER["QUERY_STRING"]) ? $_SERVER["QUERY_STRING"] : false; //if ($query_string) { $query = defineQueryParameters($query_string); /*echo ("&lt;script> //// query parameters passed back (permalinks) var query_parameters = new Array();\n");*/ if ($query && count($query)>0) { foreach ($query as $key=>$val) { echo "\t\tquery_parameters['".$key."'] = '".$query[$key]."'\n"; } } /*echo ("\t</script>\n");*/ } } function defineQueryParameters($query) { if ($query) { $query_divider = "&"; $query = split($query_divider,$query); foreach ($query as $val) { $val_split = split("=",$val); $query_parameters[$val_split[0]] = $val_split[1]; } return $query_parameters; } else return false; } //// force a boolean value function printValue($value) { $return = ""; if ($value === '') { $return = "undefined"; } else if (($value === true) || ($value === "true") || ($value === "TRUE") || ($value === "y") || ($value === "Y") || ($value === "yes") || ($value === "YES") || ($value === "OK")) { $return = "true"; } else if (($value === false) || ($value === "false") || ($value === "FALSE") || ($value === "n") || ($value === "N") || ($value === "no") || ($value === "NO") || ($value === "NO")) { $return = "false"; } else if (is_int($value) || is_float($value) || is_numeric($value) || ($value===0)) { $return = $value; } else { $return = "'$value'"; } print($return); } //// sort files function sortGalleries($galleries, $sort) { $sort_flag = true; switch($sort) { case 1: $sort_flag = natsort($galleries); break; case 2: $sort_flag = natcasesort($galleries); break; case 3: $sort_flag = rsort($galleries); break; case 4: $sort_flag = natsort($galleries); if ($sort_flag) $sort_flag = rsort($galleries); break; case 5: $sort_flag = natcasesort($galleries); if ($sort_flag) $sort_flag = rsort($galleries); break; default: $sort_flag = sort($galleries); } if ($sort_flag) return $galleries; else return 'null'; } //// sort files function sortFiles($files, $sort, $path) { $sort_flag = true; switch($sort) { case 1: $sort_flag = natsort($files); break; case 2: $sort_flag = natcasesort($files); break; case 3: $sort_flag = rsort($files); break; case 4: $sort_flag = natsort($files); if ($sort_flag) $sort_flag = rsort($files); break; case 5: $sort_flag = natcasesort($files); if ($sort_flag) $sort_flag = rsort($files); break; case 6: case 7: // if PHP was not compiled with EXIF support // or exif_read_data() is not defined if (!function_exists('exif_read_data')) { $files = sortFiles($files, '0', $path); // if PHP was compiled with EXIF support } else { $files = sortFilesEXIFData($files, $sort, $path); } $sort_flag = (!$files) ? false : true; break; default: sort($files); } if ($sort_flag) return $files; else return 'null'; } function sortFilesEXIFData($files, $sort, $path) { $sort_flag = false; $exif_date = array(); $exif_file = array(); $files_sorted = array(); foreach ($files as $key => $file) { $exif = exif_read_data($path.$file,0,true); if (!$exif) return false; $exif_file[$key] = $file; $exif_date[$key] = date("YmdHis",$exif['FILE']['FileDateTime']); } if ($sort == 6) { $sort_flag = array_multisort($exif_date, SORT_ASC, $exif_file, SORT_ASC, $files); } else { $sort_flag = array_multisort($exif_date, SORT_DESC, $exif_file, SORT_DESC, $files); } if ($sort_flag) return $files; else return false; } function scanDirImages($path) { global $settings; if (!is_dir($path)) return 0; $list=array(); $directory = @opendir($path); while ($file = @readdir($directory)) { if (($file <> ".") && ($file <> "..")) { $f = $path."/".$file; //replace double slashes $f = preg_replace('/(\/){2,}/','/',$f); $pinfo = pathinfo($f); if(is_file($f) && (strpos($file,".") !== 0) && (strpos($file,"_") !== 0) && (!in_array($file, $settings['hidden_files'])) && (in_array(strToLower($pinfo["extension"]),$settings['allowed_extensions'])) ) { $list[] = $f; } } } @closedir($directory); return $list; } function scanDirFirstImage($path) { global $settings; if (!is_dir($path)) return 0; $list=""; $directory = @opendir($path); while ($file = @readdir($directory)) { if (($file <> ".") && ($file <> "..")) { $f = $path."/".$file; //replace double slashes $f = preg_replace('/(\/){2,}/','/',$f); $pinfo = pathinfo($f); if(is_file($f) && (strpos($file,".") !== 0) && (strpos($file,"_") !== 0) && (!in_array($file, $settings['hidden_files'])) && (in_array(strToLower($pinfo["extension"]),$settings['allowed_extensions'])) ) { $list = $pinfo['basename'];//$f; break; } } } @closedir($directory); return $list; } function scandir_recursive($path) { if (!is_dir($path)) return 0; $list = array(); $directory = @opendir($path); while ($file = @readdir($directory)) { if (($file <> ".") && ($file <> "..")) { $f = $path."/".$file; //replace double slashes $f = preg_replace('/(\/){2,}/','/',$f); if(is_file($f)) $list[] = $f; //RECURSIVE CALL if(is_dir($f)) $list = array_merge($list ,scandir_recursive($f)); } } @closedir($directory); return $list; } function build_select_menu($options) { $out = ""; for ($i=0; $i<count($options); $i++) { $out .= '<option value="' .$options[$i].'">'.$options[$i] .' </option>\n\t'; } print $out; } function push_elements($str,$alert_message) { $out = ""; if (count($alert_message)>0) { for ($i=0; $i<count($alert_message); $i++) { $out .= "$str.push('".$alert_message[$i]."');\n\t"; } } print $out; } function get_include_contents($file) { extract($GLOBALS); if (is_file($file)) { ob_start(); include $file; $contents = ob_get_contents(); ob_end_clean(); return $contents; } return false; } ///// URL ENCODE + UTF-8 function Url_encode($content) { return rawurlencode( utf8_encode( $content ) ); } ///// URL DECODE + UTF-8 function Url_decode($content) { return utf8_decode( rawurldecode( $content ) ); } //// alternate mime_content_type() function if (!function_exists('mime_content_type')) { function mime_content_type ( $f ) { return trim(exec('file -bi '.escapeshellarg($f))); } } //// debug print array function echo_r($var) { print("<pre>"); print_r($var); print("</pre>"); } ?>
  9. Jeffer Menezes

    Acentos

    Instalei recentemente o minishowcase em meu site e estaria funcionando perfeitamente, se não fosse o problema de não aparecer acentos nas descrições das galerías. Como eu resolvo isso? Eu já coloquei a galería no idioma português (tradução), mas os acentos não aparecem. Já tentei o seguinte esquema que li em um site: ...e não deu certo. O minishowcase exibe a descrição da galería ao chamar um arquivo txt, que você escreve e põe no mesmo diretório das fotos. Eu já coloquei códigos html de charset (charset=iso-8859-1) e idioma português (lang="pt-br"), no cabeçalho desses arquivos texto (header), mas também não deu certo. O que eu posso fazer para escrever com acentos? Obrigado desde já.
  10. Desculpem aborrecê-los, mas como eu adiciono mais 4 campos ao envia.php?
  11. O script do formulário do meu site é este (com o meu e-mail): <?php $myemail = " meu_email@meusite.com "; $thankyou = " Obrigado, Entraremos em contato o mais rapido possivel "; if(!$_POST) die('Please don\'t access this file directly.'); $myemail = str_replace(" ",'',$myemail); $thankyou = str_replace(" ",'',$thankyou); $thankyoupage = str_replace(" ",'',$thankyoupage); while(list($key,$val) = each($_POST)) { if(stristr($key,'REQUIRED')){ $key = str_replace('REQUIRED','',$key); $fields[$key] = $val; if($val == ''){ $missing[] = '<b>'.$key.'</b>'; } } else { $fields[$key] = $val; } } if($fields[myemail]) $myemail = $fields[myemail]; if($fields[name]){ $name = $fields[name]; } else { $name = "Rondnelly"; } if($fields[email]){ $email = $fields[email]; } else { $email = $myemail; } if($fields[subject]){ $subject = $fields[subject]; } else { $subject = "Web Form"; } $message = "The following form was sent to you from your website!\n"; $message .= "-----------------------------------------------------------\n"; $message .= "Ip: $REMOTE_ADDR\n"; $message .= "Host: ".@gethostbyaddr($REMOTE_ADDR)."\n"; $message .= "Browser: $HTTP_USER_AGENT\n"; $message .= "Referrer: $HTTP_REFERER\n\n"; foreach($fields as $k=>$v) { if($v && !stristr($k,'REQUIRED')) if(is_array($v)) $message .= ucfirst($k).": ".implode(', ', $v)."\n\n"; else $message .= ucfirst($k).": $v\n\n"; } $message .= "-----------------------------------------------------------\n"; $message .= "Powered by so-Scripts/Anexed"; $message = stripslashes($message); $mail_boundary = "x".md5(time())."x"; $header = "From: $name <$email>\r\n"; $header .= "MIME-Version: 1.0\r\n"; $header .= "Content-type: multipart/mixed; boundary=\"{$mail_boundary}\"\r\n"; $header .= "X-Priority: 3\r\n"; $header .= "X-MSMail-Priority: Normal\r\n"; $header .= "X-Mailer:rond \r\n"; $header .= "This is a multi-part message in MIME format.\r\n\r\n"; $header .= "--{$mail_boundary}\r\n"; $header .= "Content-type: text/plain; charset=\"iso-8859-1\"\r\n"; $header .= "Date: ".date®."\r\n"; $header .= "Content-Transfer-Encoding:7bit\r\n\r\n"; $header .= $message."\r\n\r\n"; if($_FILES){ if (get_magic_quotes_runtime() == 1){ set_magic_quotes_runtime(0); } foreach($_FILES as $key=>$value){ foreach($value as $key2 => $value2){ $$key2 = $value2; } if (is_uploaded_file($tmp_name)) { $fp = fopen($tmp_name,'rb'); $read = fread($fp,$size); fclose($fp); $file = base64_encode($read); $file = chunk_split($file); $header .= "--$mail_boundary\r\n"; $header .= "Content-type: $type; name=\"$name\"\r\n"; $header .= "Content-Transfer-Encoding:base64\r\n"; $header .= "Content-Disposition: attachment1; filename=\"$name\"\r\n\r\n"; $header .= "Content-Disposition: attachment2; filename=\"$name\"\r\n\r\n"; $header .= "Content-Disposition: attachment3; filename=\"$name\"\r\n\r\n"; $header .= "Content-Disposition: attachment4; filename=\"$name\"\r\n\r\n"; $header .= "Content-Disposition: attachment5; filename=\"$name\"\r\n\r\n"; $header .= $file."\r\n\r\n"; } } } $valid_email = eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $email); if(!$missing && $valid_email) { mail($myemail,$subject,'',$header); } elseif(!$valid_email){ $thankyou = "Your email address doesnt seem to be valid - please doublecheck it."; } else { if(count($missing)>1){ $last = array_pop($missing); $themissing = implode(', ',$missing).' and '.$last; $plu = 's'; } else { $themissing = $missing[0]; } $thankyou = "Sorry, but you do not seem to have filled out the field$plu ".$themissing.". Please go back and fill out all the required fields!"; } $ref = getenv("HTTP_REFERER"); if (stristr($ref,'?')) $sep = "&"; else $sep = "?"; $thankyou .= ' <small>Powered by Rondnelly</a>.</small>'; $thankyou = urlencode($thankyou); header("Location: $ref${sep}message=$thankyou"); ?> [/codebox] O formulário é o seguinte: [code]<td align="center"> <form enctype='multipart/form-data' action='enviar_arquivo2.php' method='post' name='form2'> <input type='hidden' name='MAX_FILE_SIZE' value='200'> <table border="0" style="border-collapse: collapse" bordercolor="#000066" width="95%" cellpadding="0"> <tr> <td height="30" width="189" bgcolor="#000000" bordercolor="#FFFFFF"> <font face="Verdana" size="1" color="#FFFFFF">Nome:</td> <td height="30" width="469" bgcolor="#000000" bordercolor="#FFFFFF" align="left"> <font face="Verdana"><font size="1" color="#FFFFFF"><input type=text name="nome" size=30> (Requerido)</font></td></tr><tr> <td height="30" width="189" bgcolor="#000000" bordercolor="#FFFFFF"> <font face="Verdana" size="1" color="#FFFFFF">E-mail:</td> <td height="30" width="469" bgcolor="#000000" bordercolor="#FFFFFF" align="left"> <font face="Verdana"><font size="1" color="#FFFFFF"> <input type=text name="email" size=30> (Requerido)</font></td></tr><tr> <td height="30" width="189" bgcolor="#000000" bordercolor="#FFFFFF"> <font face="Verdana" size="1" color="#FFFFFF">Idade:</td> <td height="30" width="469" bgcolor="#000000" bordercolor="#FFFFFF" align="left"> <font face="Verdana"><font size="1" color="#FFFFFF"> <input type=text name="idade" size=30> (Requerido)</font></td></tr><tr> <td height="30" width="189" bgcolor="#000000" bordercolor="#FFFFFF"> <font face="Verdana" size="1" color="#FFFFFF">RG:</td> <td height="30" width="469" bgcolor="#000000" bordercolor="#FFFFFF" align="left"> <font face="Verdana"><font size="1" color="#FFFFFF"><input type=text name="rg" size=30> (Requerido)</font></td></tr><tr> <td height="30" width="189" bgcolor="#000000" bordercolor="#FFFFFF"> <font face="Verdana" size="1" color="#FFFFFF">Telefone:</td> <td height="30" width="469" bgcolor="#000000" bordercolor="#FFFFFF" align="left"> <font face="Verdana"><font size="1" color="#FFFFFF"> <input type=text name="telefone" size=30> (Requerido)</font></td></tr><tr> <td height="30" width="189" bgcolor="#000000" bordercolor="#FFFFFF"> <font face="Verdana" size="1" color="#FFFFFF">Cidade:</td> <td height="30" width="469" bgcolor="#000000" bordercolor="#FFFFFF" align="left"> <font face="Verdana"><font size="1" color="#FFFFFF"> <input type=text name="cidade" size=30> (Requerido)</font></td></tr><tr> <td height="30" width="189" bgcolor="#000000" bordercolor="#FFFFFF"> <font face="Verdana" size="1" color="#FFFFFF">Descrição:</td> <td height="30" width="469" bgcolor="#000000" bordercolor="#FFFFFF" align="left"> <font face="Verdana"><font size="1" face="Verdana" color="#FFFFFF"> <textarea name="mensagem" rows=2 cols=28></textarea></font></td></tr><tr> <td height="30" width="189" bgcolor="#000000" bordercolor="#FFFFFF"> <font face="Verdana" size="1" color="#FFFFFF">Foto</td> <td height="30" width="469" bgcolor="#000000" bordercolor="#FFFFFF" align="left"> <font face="Verdana"><font size="1" face="Verdana" color="#FFFFFF"><input type='hidden' name='MAX_FILE_SIZE' value='200'> </font><font size="1" color="#FFFFFF"> <input type='file' name="attachment1"> (Requerido)</font></td></tr><tr> <td height="30" width="189" bgcolor="#000000" bordercolor="#FFFFFF"> <font face="Verdana" size="1" color="#FFFFFF">Foto</td> <td height="30" width="469" bgcolor="#000000" bordercolor="#FFFFFF" align="left"> <font face="Verdana"><font size="1" face="Verdana" color="#FFFFFF"><input type='hidden' name='MAX_FILE_SIZE' value='200'> </font><font size="1" face="Verdana" color="#FFFFFF"> <input type='file' name="attachment2"></font></td></tr><tr> <td height="30" width="189" bgcolor="#000000" bordercolor="#FFFFFF"> <font face="Verdana" size="1" color="#FFFFFF">Foto</td> <td height="30" width="469" bgcolor="#000000" bordercolor="#FFFFFF" align="left"> <font face="Verdana"><font size="1" face="Verdana" color="#FFFFFF"><input type='hidden' name='MAX_FILE_SIZE' value='200'> </font><font size="1" face="Verdana" color="#FFFFFF"> <input type='file' name="attachment3"></font></td></tr><tr> <td height="30" width="189" bgcolor="#000000" bordercolor="#FFFFFF"> <font face="Verdana" size="1" color="#FFFFFF">Foto</td> <td height="30" width="469" bgcolor="#000000" bordercolor="#FFFFFF" align="left"> <font face="Verdana"><font size="1" face="Verdana" color="#FFFFFF"><input type='hidden' name='MAX_FILE_SIZE' value='200'> </font><font size="1" face="Verdana" color="#FFFFFF"> <input type='file' name="attachment4"></font></td></tr><tr> <td height="30" width="189" bgcolor="#000000" bordercolor="#FFFFFF"> <font face="Verdana" size="1" color="#FFFFFF">Foto</td> <td height="30" width="469" bgcolor="#000000" bordercolor="#FFFFFF" align="left"> <font face="Verdana"><font size="1" face="Verdana" color="#FFFFFF"><input type='hidden' name='MAX_FILE_SIZE' value='200'> </font><font size="1" face="Verdana" color="#FFFFFF"> <input type='file' name="attachment5"></font></td></tr><tr> <td colspan="2" bgcolor="#000000" height="25" width="737"><p align="center"> <font size="1" color="#FFFFFF" face="Verdana"><font face="Verdana"> <input type=submit value='Enviar anúncio' style="color: #FFFFFF; border: 1px solid #FFFFFF; background-color: #CC0099"></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="Verdana"> <input type=reset value='Limpar formulário' style="color: #FFFFFF; border: 1px solid #FFFFFF; background-color: #CC0099"></font></font></td></tr> </table></form> </td>[/code] Há algo errado? O problema é que, as mensagens, chegam, junto com as imagems em anexo, mas as imagens ou qualquer arquivo anexado vem totalmente corrompido (não abre). O servidor tem suporte ao envio direto de mensagens com imagens (eu já testei). Alguém pode me dar uma força?
×
×
  • Criar Novo...