Code Search for Developers
 
 
  

export_csv.php from freePBX at Krugle


Show export_csv.php syntax highlighted

<?php
include_once(dirname(__FILE__) . "/lib/defines.php");
include_once(dirname(__FILE__) . "/lib/Class.Table.php");
include_once(dirname(__FILE__) . "/lib/iam_csvdump.php");

session_start();


  #  Set the parameters: SQL Query, hostname, databasename, dbuser and password                                       #
  #####################################################################################################################
  $dumpfile = new iam_csvdump;

  #  Call the CSV Dumping function and THAT'S IT!!!!  A file named dump.csv is sent to the user for download          #
  #####################################################################################################################

if (strlen($_SESSION["pr_sql_export"])<10){
		echo "ERROR CSV EXPORT";
}else{
		//echo $_SESSION["pr_sql_export"];
		  $dumpfile->dump($_SESSION["pr_sql_export"], "Report_cdr_". date("Y-m-d"), "csv", DBNAME, USER, PASS, HOST, DB_TYPE );
		  //$dumpfile->dump($_SESSION["pr_sql_export"], "", "csv", DBNAME, USER, PASS, HOST );
}

?>




See more files for this project here

freePBX

FreePBX is the most powerful GUI (Web Based) configuration tool for Asterisk. It provides everything that a standard legacy phone system can, plus a huge amount of new features. All documentation and information is avalable from http://www.freepbx.org

Project homepage: http://sourceforge.net/projects/amportal
Programming language(s): PHP,Shell Script,SQL
License: other

  css/
    images/
      corner-bl.png
      corner-br.png
      corner-tl.png
      corner-tr.png
    content.css
    docbook.css
    layout.css
  images/
    asterisk.gif
    btn_top_12x12.gif
    button-search.gif
    call-compare.png
    call-logs.png
    excel.png
    fleche-d.gif
    fleche-g.gif
    header-download.png
    header-faq.png
    header-projects.png
    header-search.png
    icon_down_12x12.GIF
    icon_up_12x12.GIF
    jukebox_ti60.gif
    pdf.png
    print.css
    printable.png
    sidenav-selected.gif
    spacer.gif
    th_call-compare.png
    th_call-logs.png
  jpgraph_lib/
    imgdata_balls.inc
    imgdata_bevels.inc
    imgdata_diamonds.inc
    imgdata_pushpins.inc
    imgdata_squares.inc
    imgdata_stars.inc
    jpg-config.inc
    jpgraph.php
    jpgraph_antispam-digits.php
    jpgraph_antispam.php
    jpgraph_bar.php
    jpgraph_canvas.php
    jpgraph_canvtools.php
    jpgraph_error.php
    jpgraph_flags.php
    jpgraph_gantt.php
    jpgraph_gb2312.php
    jpgraph_gradient.php
    jpgraph_iconplot.php
    jpgraph_imgtrans.php
    jpgraph_line.php
    jpgraph_log.php
    jpgraph_pie.php
    jpgraph_pie3d.php
    jpgraph_plotband.php
    jpgraph_plotmark.inc
    jpgraph_polar.php
    jpgraph_radar.php
    jpgraph_regstat.php
    jpgraph_scatter.php
    jpgraph_stock.php
  lib/
    DB-modules/
      ciaosql.php
      phplib_mssql.php
      phplib_mysql.php
      phplib_oci8.php
      phplib_odbc.php
      phplib_oracle.php
      phplib_postgres.php
      phplib_sybase.php
    font/
      makefont/
      courier.php
      helvetica.php
      helveticab.php
      helveticabi.php
      helveticai.php
      symbol.php
      times.php
      timesb.php
      timesbi.php
      timesi.php
      zapfdingbats.php
    Class.Table.php
    defines.php
    fpdf.php
    iam_csvdump.php
  CHANGELOG.txt
  about.php
  call-comp.php
  call-daily-load.php
  call-last-month.php
  call-log.php
  cdr.php
  counter.txt
  encrypt.js
  export_csv.php
  export_pdf.php
  graph_hourdetail.php
  graph_pie.php
  graph_stat.php
  graph_statbar.php
  info.txt