All datas with this checkbox unchecked will be shown, and could be exporter in a .txt file.And user can filter search with argument "checkbox unchecked"I have absolutely no idea how to do that !My code :WHERE SQLHeader Recherche avec nom: diocèse: annonce faite:         Nom Diocèse Pastorale Baptême Mariage Séminaire Annonce Rome Body > {nom} {etadiocese} {radio0} {radio1} {radio2} {radio4} {check5} {edit_record} Footer window.addEvent('domready', function() { var limit_select = $('limit').options; if ( !limit_select ) return; for ( var i = 0; i {pagination} "> Export data in .txt - Forums

Forums

Export data in .txt

Jayne 02 Mar, 2010
Hello🙂

(sorry for my english)

Advertisement : this forms is for a roleplaying game, not for a religious issue !

My website :
http://www.archeveche-narbonne.org
The form
It works perfectly.
I want to make a .txt file to export some datas. The condition : a checkbox (label "checkbox5") is unchecked. --> All datas with this checkbox unchecked will be shown, and could be exporter in a .txt file.
And user can filter search with argument "checkbox unchecked"

I have absolutely no idea how to do that !

My code :

WHERE SQL
<?php
$search_array = array('nom', 'etadiocese', 'check5');
$where = array();
foreach ( $search_array as $search ) {
  $value = JRequest::getVar($search, '' , 'post');
  if ( $value ) {
    $where[] = " $search LIKE '$value%' ";
  }
}
if ( !empty($where) ) {
  echo " WHERE ".implode(' AND ', $where);
}?>



Header
  <div style="float:left">
    Recherche avec  <b>nom</b>: <input type="text" name="nom">
    <b>diocèse</b>: <input type="text" name="etadiocese">
    <b>annonce faite</b>: <input type="text" name="check5">
    <input type="submit" value="Rechercher" name="undefined" style='width:80px; color:#cccccc; background-color:#222222; cursor:pointer;' /></div>
<br />
<br />
<table width="1128" height="698" border="0" cellpadding="0" cellspacing="0" background="images/stories/tableau-registre.jpg">
  <tr>
    <th width="163" height="123" scope="col"> </th>
    <th width="796" scope="col"> </th>
    <th width="169" scope="col"> </th>
  </tr>
  <tr>
    <td align="center" valign="top"> </td>
    <td align="center" valign="top">
    <table width="796" border="0" cellpadding="0" cellspacing="0" bgcolor="#EBEBEB">
      <tr>
        <th width="30%" scope="col">Nom</th>
        <th width="10%" scope="col">Diocèse</th>
        <th width="12%" scope="col">Pastorale</th>
        <th width="13%" scope="col">Baptême</th>
        <th width="10%" scope="col">Mariage</th>
        <th width="10%" scope="col">Séminaire</th>
        <th width="10%" scope="col">Annonce Rome</th>
        <th width="5%" scope="col"></th>
      </tr>
    </table>



Body
<table width="796" border="0" cellspacing="0" cellpadding="0" bgcolor="#EBEBEB">
      <tbody>
      <tr align="center" <?php if ($i % 2) echo ' style="background-color: #EBEBEB;"';?>>
        <td width="30%"><a href="index.php?option=com_chronoconnectivity&connectionname=registrerecherche + &record_selector={cf_id}">{nom}</a></td>
        <td width="15%">{etadiocese}</td>
        <td width="12%">{radio0}</td>
        <td width="13%">{radio1}</td>
        <td width="10%">{radio2}</td>
        <td width="10%">{radio4}</td>
        <td width="10%">{check5}</td>
        <td width="7%">{edit_record}</td>
      </tr>
          </tbody>
   <?php $i++ ?>



Footer
    </table>
</td>
  </tr>
</table>
    <div class="clr" style="border-bottom: 3px solid #222; padding: 3px; margin-bottom: 10px;"></div>
        <script type="text/javascript">
        window.addEvent('domready', function() {
           var limit_select = $('limit').options;
           if ( !limit_select ) return;
           for ( var i = 0; i < limit_select.length; i++ ) {
                if ( limit_select[i].value == 0 ) {
                   limit_select[i].value = 250;
                   limit_select[i].innerHTML = '250';
                }
           }
        });
        </script>
    <div align="center">{pagination}</div>
    <br />
GreyHead 02 Mar, 2010
Hi Jayne,

There's no obvious way to do this from ChronoConenctivity.

I'd probably do it by setting up a custom form with just the search boxes from the header. The write the code in the OnSubmit box to write the output to a text file and show a link to it. This is not difficult but needs some basic PHP skills to open a file and write the content into it.

I've done something similar a few time to export data to custom Excel files and it works well.

Bob
Jayne 02 Mar, 2010
Ok, let's fight with php !!😀

Thanks🙂
This topic is locked and no more replies can be posted.