Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

phpexcel e smarty

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Portuguese
View previous topic :: View next topic  
Author Message
pauloedu
Smarty Rookie


Joined: 28 Aug 2008
Posts: 6

PostPosted: Thu Aug 28, 2008 4:56 pm    Post subject: phpexcel e smarty Reply with quote

aguem sabe como trabalharem juntos o phpexcel e o smarty tem algum exemplo

Last edited by pauloedu on Wed May 05, 2010 10:45 pm; edited 1 time in total
Back to top
View user's profile Send private message
migas
Smarty Regular


Joined: 07 Apr 2004
Posts: 73
Location: Porto, Portugal

PostPosted: Fri Aug 29, 2008 8:49 am    Post subject: Pear SpreadSheet Reply with quote

Boas podes fazer de duas maneiras ou crias um template usando o CSV
(Comma Separated Values) ou seja,

Code:

'valor';'valor2'\n
'valor';'valor2'\n


Dica: http://pt2.php.net/manual/en/function.fgetcsv.php

Ou então usas esta class do pear que faz bem mais que mostrar valores em excel.


http://www.sitepoint.com/article/pear-spreadsheet_excel_writer
Back to top
View user's profile Send private message
pauloedu
Smarty Rookie


Joined: 28 Aug 2008
Posts: 6

PostPosted: Wed Oct 22, 2008 12:03 am    Post subject: Reply with quote

valeu a ajuda

Last edited by pauloedu on Wed May 05, 2010 10:45 pm; edited 1 time in total
Back to top
View user's profile Send private message
pauloedu
Smarty Rookie


Joined: 28 Aug 2008
Posts: 6

PostPosted: Wed Oct 22, 2008 12:08 am    Post subject: Reply with quote

gostaria de uma ajuda, sou realmente novo em smarty e tenho o seguinte problema

tenho um scrip em php :
<?php
session_start();

/*****************************************/
require('includes/config.inc.php');
require('includes/class.dbconnector.php');
require('Smarty/libs/Smarty.class.php');
/*****************************************/

/* Verifica se o usuario esta logado */
if (!session_is_registered('logedUser_login')) {
$_SESSION['erro'] = 'Acesso restrito';
header("Location: index.php");
}


$db = new DbConnector(C_DB_HOSTNAME,C_DB_USERNAME,C_DB_PASSWORD,C_DB_DBNAME);

/* Otimizando as tabelas do banco de dados */

//Seleciona as tabelas
$tables = array();
$result = $db->query("SHOW TABLES");
while($rs = $db->fetchArray($result)){
if(substr($rs[0],0,4) != "chat"){
array_push($tables,$rs[0]);
}
}
$tables = implode(',',$tables);
//Otimiza as tabelas selecionadas
$result = $db->query("OPTIMIZE TABLE $tables");
$saida = '';
while($rs = $db->fetchArray($result)){
$saida .= $rs['Table'] . ': ' . $rs['Msg_text'] . '<br>';
}

/* Inicio do codigo */
$smarty = new Smarty();
$smarty->debugging = _SMARTY_DEBUG_;
$smarty->compile_check = _SMARTY_COMPILE_CHECK_;
$smarty->assign('nome',$_SESSION['logedUser_name']);
$smarty->assign('email',$_SESSION['logedUser_email']);
$smarty->display('home.htm');

?>

eu peguei o arquivo home.htm fiz alguma alterações e enviei o arquivo php e o htm via ftp e mudei o cmod porem ao rodar o php não me aparece o htm é não me dá nenhum erro, pode me ajudar por favor Crying or Very sad
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Portuguese All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP