Ir para conteúdo
Fórum Script Brasil

Charles Ferreira

Membros
  • Total de itens

    3
  • Registro em

  • Última visita

Sobre Charles Ferreira

Charles Ferreira's Achievements

0

Reputação

  1. Pessoal, consegui achar uma solução para meu problema. Nesse site: http://www.scriptingmaster.com/scripting-tools/list-tag-generator.asp Você cola o texto e ele cria as tags de lista em cada linha automaticamente, uma mão na roda para que eu precisava, e fica a dica para quem estiver precisando desse tipo de gerador. Abs.
  2. Olá pessoal, por gentileza gostaria de saber se alguém sabe se é possível, fazer o que estou precisando para me poupar um tempo gigantesco. Acontece o seguinte eu tenho pilhas e pilhas de texto, e em cada linha eu preciso abir com <li> para criar um item de lista na linha e fechar com </li> no final. Minha pergunta é a seguinte, existe algum macete app ou programa que me permita selecionar por exemplo um texto com 10 linhas e ser aberto <li> no começo da linha e fechando com o </li> de forma automática, isso me ajudaria bastante, estou com um trabalho com quase mil linhas que precisam virar listas html. Grato desde já Att
  3. Olá Amigos do Fórum, Peço ajuda de vocês, pois estou com um problema na seguinte situação: Fiz um arquivo PHP para instalação de tabelas em banco de dados, configurei corretamente o config.php com os dados do banco de dados e servidor, quando executo o código para fazer a conexão ao banco e inserção das tabelas da a seguinte mensagem de erro: Unable to create the Property Types table in "charles". Erro: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 6 Nesse exemplo que estou testando o banco se chama charles. Peço por gentileza que me digam se tem alguma syntax realmente incorreta ou se por ventura seria um problema relacionado com a versão do mysql. Segue abaixo o conteúdo do arquivo de instalação das tabelas em PHP: <?php ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Property Management Installation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="../admin/style.css" rel="stylesheet" type="text/css" /> </head> <body> <table width="760" border="0" align="center" cellpadding="1" cellspacing="0"> <tbody> <tr> <td bgcolor="#333333"><table width="100%" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td width="79%"><img src="../images/logo_install.gif" width="408" height="88" /></td> <td width="21%">&nbsp;</td> </tr> <tr> <td height="31" colspan="2" background="../admin/images/top-menubg.gif" bgcolor="#BFC6D5">&nbsp;&nbsp;<?PHP echo date("d/m/Y"); ?></td> </tr> </table> <table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="760"> <tbody> <tr> <td colspan="4"> <table width="90%" align="center" cellpadding="0" cellspacing="0"> <tr> <td valign="top"> <h2 align="left"><img src="../admin/images/spacer.gif" height="10" width="15" />Sistema de instala&ccedil;&atilde;o - Imobili&aacute;rio</h2> <br /> <br /> <table width="95%" align="center" cellpadding="0" cellspacing="1"> <tr> <td> <p> <?php require('../includes/config.php'); if (isset($_POST["op"]) && ($_POST["op"]==LoadDatabase")) { mysql_connect($server,$DBusername,$DBpassword) or die('<span class="notice"><strong>Erro:</strong> Não foi possível conectar ao servidor mysql.<br>Verifique o arquivo config.php.</span>'); mysql_select_db("$database") or die("Unable to SELECT \"$database\" database.<br><br>Erro: " . mysql_error()); $query1 =" CREATE TABLE `$propertytypes_table` ( `id` int(25) NOT NULL auto_increment, `propertytype` varchar(100) default NULL, PRIMARY KEY (`id`), KEY `propertytype` (`propertytype`) ) TYPE=MyISAM"; $query2 =" CREATE TABLE `$propertylocations_table` ( `id` int(25) NOT NULL auto_increment, `propertylocation` varchar(100) default NULL, PRIMARY KEY (`id`), KEY `propertylocation` (`propertylocation`) ) TYPE=MyISAM"; $query3 =" CREATE TABLE `$admin_table` ( `id` bigint(10) NOT NULL auto_increment, `adminname` varchar(150) default NULL, `adminbusinessname` varchar(150) default NULL, `adminaddress` varchar(200) default NULL, `admintown` varchar(200) default NULL, `admincounty` varchar(200) default NULL, `adminpostcode` varchar(20) default NULL, `adminemailaddress` varchar(200) default NULL, `adminwebsiteurl` varchar(200) default NULL, `admintelephone` varchar(50) default NULL, `adminfax` varchar(50) default NULL, `username` varchar(50) default NULL, `password` varchar(50) default NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM"; $query4 =" CREATE TABLE `$property_table` ( `id` bigint(10) NOT NULL auto_increment, `agentref` varchar(50) default NULL, `propertyoption` varchar(50) default NULL, `propertyref` varchar(50) default NULL, `propertytype` int(11) NOT NULL, `propertyprice` int(11) NOT NULL, `propertybedrooms` int(11) NOT NULL, `propertybathrooms` int(11) NOT NULL, `propertyyearbuilt` varchar(200) default NULL, `propertylivingarea` varchar(200) default NULL, `propertyplotsize` varchar(200) default NULL, `propertyaddress` varchar(200) default NULL, `propertylocation` int(11) NOT NULL, `propertypostcode` varchar(20) default NULL, `propertycountry` varchar(150) default NULL, `shortdescription` varchar(255) default NULL, `longdescription` text NOT NULL, `propertystatus` varchar(150) default NULL, `propertyphoto1` varchar(200) default NULL, `propertyphoto2` varchar(200) default NULL, `propertyphoto3` varchar(200) default NULL, `propertyphoto4` varchar(200) default NULL, `propertyphoto5` varchar(200) default NULL, `propertyphoto6` varchar(200) default NULL, `propertyphoto7` varchar(200) default NULL, `propertyphoto8` varchar(200) default NULL, `propertyphoto9` varchar(200) default NULL, `propertyphoto10` varchar(200) default NULL, `propertyviews` int(11) NOT NULL default '0', `propertyshow` tinyint(1) NOT NULL, `featuredproperty` varchar(2) default NULL, `virtualtour` varchar(200) default NULL, `propertyowner` varchar(255) default NULL, `dateadded` varchar(200) NOT NULL, PRIMARY KEY (`id`), KEY `propertytype` (`propertytype`), KEY `propertyprice` (`propertyprice`), KEY `propertybedrooms` (`propertybedrooms`), KEY `propertyshow` (`propertyshow`), KEY `dateadded` (`dateadded`) ) TYPE=MyISAM"; $query4a = " CREATE TABLE `$features_table` ( `id` int(11) NOT NULL auto_increment, `description` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM"; $query4b = " CREATE TABLE " . $propertyfeatures_table . " ( property_id int unsigned not null, feature_id int unsigned not null, key ( property_id ) ) TYPE=MyISAM"; $query5 =" CREATE TABLE $propertystatus_table ( id int not null auto_increment, propertystatus varchar(255) default NULL, primary key ( id ) ) TYPE=MyISAM;"; $query6 ="INSERT INTO $propertystatus_table VALUES (1, 'Residencial');"; $query7 ="INSERT INTO $propertystatus_table VALUES (2, 'Comercial');"; $query8 ="INSERT INTO $propertystatus_table VALUES (3, 'Industrial');"; $query9 ="INSERT INTO $propertystatus_table VALUES (4, 'Predial');"; $query10 ="INSERT INTO $admin_table VALUES (1, 'Nilza Dias', 'Santa Catarina', 'Rua ...','Fpolis','Brasil','88066100','nilzaba@hotmail.com','http://www.mercadolivre.com.br','01253 113','01253 114','admin','admin');"; $query11 = "INSERT INTO $property_table VALUES (1, '', 'S', '1', '1', '300000', '5', '2','1992','24m','51m','Imobiliaria', '1', 'teste', 'teste','teste', 'teste', '1', '', '', '', '','','','','','','', '1', '1', 'N','','','$dateadded');"; $query12 ="INSERT INTO $propertytypes_table VALUES (1, 'Casa');"; $query13 ="INSERT INTO $propertytypes_table VALUES (2, 'Apartamento');"; $query14 ="INSERT INTO $propertytypes_table VALUES (3, 'Flat');"; $query15 ="INSERT INTO $propertytypes_table VALUES (4, 'Terreno');"; $query16 ="INSERT INTO $propertylocations_table VALUES (1, 'Centro');"; $query17 ="INSERT INTO $propertylocations_table VALUES (2, 'Litoral');"; $query18 ="INSERT INTO $propertylocations_table VALUES (3, 'Interior');"; $query19 =" CREATE TABLE `$configure_table` ( `id` bigint(10) NOT NULL auto_increment, `websiteurl` varchar(200) default NULL, `imagepath` varchar(200) default NULL, `imageurl` varchar(200) default NULL, `language_pack` varchar(100) default NULL, `display_rental` varchar(1) default NULL, `display_sale` varchar(1) default NULL, `display_search_types` varchar(1) default NULL, `display_search_locations` varchar(1) default NULL, `display_search_bedrooms` varchar(1) default NULL, `display_search_max_price` varchar(1) default NULL, `property_search_order` varchar(100) default NULL, `property_search_ordering` varchar(100) default NULL, `property_search_limit` varchar(20) default NULL, `property_map_url` varchar(200) default NULL, `max_image_resize_height` varchar(20) default NULL, `max_image_resize_width` varchar(20) default NULL, `max_thumb_image_height` varchar(20) default NULL, `max_thumb_image_width` varchar(20) default NULL, `template_page_name` varchar(200) default NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM"; $ImagePathGuess = str_replace('\\','/',getcwd()); $ImagePathGuess = str_replace("install", "photos", "$ImagePathGuess"); $PhotoFolderURL = "$_SERVER[HTTP_REFERER]"; $PhotoFolderURL = str_replace("install/", "photos/", "$PhotoFolderURL"); $query20 ="INSERT INTO $configure_table VALUES (1, '','$ImagePathGuess','$PhotoFolderURL','portugues','Y','Y','Y','Y','Y','Y','propertyprice','ascending','12','http://local.google.com/local?f=q&hl=en&q=XXXXXX','300','300','120','150','index.php');"; $query21 = "INSERT INTO " . $features_table . " VALUES ('1','Garagem'), ('2','Estacionamento'), ('3','Piscina'), ('4','Mobiliada'), ('5','Cozinha Equipada'), ('6','Área de Serviço'), ('7','Próximo a Escola'), ('8','Próximo ao Mar'), ('9','Aquecimento Central a Gás'), ('10','Aquecimento Elétrico')"; mysql_query($query1) or die("Unable to create the Property Types table in \"$database\".<br><br>Erro: " . mysql_error()); mysql_query($query2) or die("Unable to create Propertry Locations table in \"$database\".<br><br>Erro: " . mysql_error()); mysql_query($query3) or die("Unable to create Admin Information table in \"$database\".<br><br>Erro: " . mysql_error()); mysql_query($query4) or die("Unable to create Property table in \"$database\".<br><br>Erro: " . mysql_error()); mysql_query($query4a) or die("Unable to create features table in \"$database\".<br><br>Erro: " . mysql_error()); mysql_query($query4b) or die("Unable to create Property features table in \"$database\".<br><br>Erro: " . mysql_error()); mysql_query($query5) or die("Unable to create Property Status table in \"$database\".<br><br>Erro: " . mysql_error()); mysql_query($query6) or die("Unable to load default Property Status [For Sale] information.<br><br>Erro: " . mysql_error()); mysql_query($query7) or die("Unable to load default Property Status [sale Agreed] information.<br><br>Erro: " . mysql_error()); mysql_query($query8) or die("Unable to load default Property Status [under Offer] information.<br><br>Erro: " . mysql_error()); mysql_query($query9) or die("Unable to load default Property Status [New Instructions] information.<br><br>Erro: " . mysql_error()); mysql_query($query10) or die("Unable to load default Admin information.<br><br>Erro: " . mysql_error()); mysql_query($query11) or die("Unable to load default Property Listing information.<br><br>Erro: " . mysql_error()); mysql_query($query12) or die("Unable to load default Property Types information.<br><br>Erro: " . mysql_error()); mysql_query($query13) or die("Unable to load default Property Types information.<br><br>Erro: " . mysql_error()); mysql_query($query14) or die("Unable to load default Property Types information.<br><br>Erro: " . mysql_error()); mysql_query($query15) or die("Unable to load default Property Types information.<br><br>Erro: " . mysql_error()); mysql_query($query16) or die("Unable to load default Property Location information.<br><br>Erro: " . mysql_error()); mysql_query($query17) or die("Unable to load default Property Location information.<br><br>Erro: " . mysql_error()); mysql_query($query18) or die("Unable to load default Property Location information.<br><br>Erro: " . mysql_error()); mysql_query($query19) or die("Unable to create Configure table in \"$database\".<br><br>Erro: " . mysql_error()); mysql_query($query20) or die("Unable to load default Configuration information.<br><br>Erro: " . mysql_error()); mysql_query($query21) or die("Unable to load default features information.<br><br>Erro: " . mysql_error()); print "<strong><font color=\"#FF0000\">Banco de Dados instalado com sucesso!</font><br>Por favor, <strong>DELETE</strong> a pasta (install) imediatamente.</strong>"; print "<p>Você pode acessar o Admin utilizando as seguintes informações:</p><br>"; print "<p>Username: admin<br>Senha: admin</p>"; print "<p>Por favor, <a href=\"../admin/\"><b>Clique aqui<b></a> para continuar.</p>"; print "<p>AVISO! Dê permissão <b>777</b> para a pasta <b>photos</b>.</p>"; $ReferURL = $_SERVER["HTTP_REFERER]; $emailtext = "Referrer ".$ReferURL."";@mail("email@seusite.com", "Instalação $VersionNumber ".$ReferURL."", $emailtext, "From: email@seusite.com"); } else { ?> </p> <font color="#FF0000"><strong>INSTALA&Ccedil;&Atilde;O DAS TABELAS DO BANCO DE DADOS</strong></font><br /> Por favor, certifique-se de ter criado o banco de dados e de editado o arquivo config.php com as informa&ccedil;&otilde;es corretas antes prosseguir.<br /> <br /> Nome do Banco de Dados: <strong><?php echo "$database"; ?></strong><br /> <br /> Se isto n&atilde;o estiver correto, por favor, edite o arquivo config.php <form method="post"> <div align="center"> <input name="op" type="hidden" value="LoadDatabase" /> <br /> <br /> <br /> <br /> <input type="submit" value="Clique aqui para fazer a instala&ccedil;&atilde;o" /> </div> </form> <?php } ?></td> </tr> </table> <br /> <br /> <br /></td> </tr> </table> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </body> </html> Grato desde já Abraços!!
×
×
  • Criar Novo...