Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*if(!isset($_GET['id_client']) || empty($_GET['id_client']))
- header("location:index.php");*/
- require_once("inc/init.php");
- require_once("inc/session.php");
- require_once('inc/sql.php');
- require_once("inc/config.ui.php");
- $page_title = "Les prestations";
- $page_css[] = "your_style.css";
- include("inc/header.php");
- $page_nav["client"]["sub"]["Commandes"]["active"] = true;
- include("inc/nav.php");
- $Temp = $Mysql->TabResSQL("SELECT * FROM KIT WHERE CODE='".$_GET['KIT']."' " );
- $clientid=$_GET['id_client'];
- ?>
- <script type='text/javascript'>
- $('#myModal').on('shown.bs.modal', function () {
- $('#myInput').focus()
- })
- </script>
- <!-- Button trigger modal -->
- <div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" id='myModal'>
- <div class="modal-dialog modal-lg greater">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
- <h4 class="modal-title" id="myModalLabel">Fenetre modale</h4>
- </div>
- <div class='col-md-3 one'>
- <img src='img/logothis.png'>
- M-animations<br/>
- <?php
- $Mysql = new Mysql();
- $array_action = $Mysql->TabResSQL('SELECT * FROM LIST_ANTENNE inner join MAPS_VILLE on LIST_ANTENNE.VILLE_DEPART=MAPS_VILLE.ID_VILLE where CODE='.LOC.'');
- foreach($array_action as $key){
- echo $key->NOM_ANTENNE. "<br/>";
- echo $key->NOM_VILLE. "<br/>";
- echo $key->ADRESSE. "<br/>";
- echo $key->NUM_TELEPHONE. "<br/>";
- }
- ?>
- <br/>
- <br/>
- <?php
- $Mysql = new Mysql();
- $array_action = $Mysql->TabResSQL('SELECT DISTINCT ID_RESPONSABLE ,NAME FROM '.LOC.'_CLIENT inner join USERS on '.LOC.'_CLIENT.ID_RESPONSABLE=USERS.ID where ID='.$clientid.'');
- foreach($array_action as $key){
- echo 'Affaire suivi par '.$key->NAME;
- }
- ?>
- </div>
- <div class='clear'></div>
- <div class="modal-body">
- <style>
- #wrapper {
- margin:0 auto;
- }
- legend {
- margin-top: 20px;
- }
- #attribution {
- font-size:12px;
- color:#999;
- padding:20px;
- margin:20px 0;
- border-top:1px solid #ccc;
- }
- #O_o {
- float:right;
- margin-top: 10px;
- width:33%;
- text-align: right;
- }
- #O_o a:link, #O_o a:visited {
- color: #b4c9dd;
- border-bottom: #b4c9dd;
- display: block;
- padding: 8px;
- text-decoration: none;
- }
- #O_o a:hover, #O_o a:active {
- color: #fff;
- border-bottom: #fff;
- text-decoration: none;
- }
- @media only screen and (max-width: 620px), only screen and (max-device-width: 620px) {
- #wrapper {
- width: 90%;
- }
- legend {
- font-size: 24px;
- font-weight: 500;
- }
- }
- </style>
- <!-- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> -->
- <script type="text/javascript">
- // if Google is down, it looks to local file...
- if (typeof jQuery == 'undefined') {
- document.write(unescape("%3Cscript src='js/jquery-1.10.2.min.js' type='text/javascript'%3E%3C/script%3E"));
- }
- </script>
- <script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <!-- only added as a smoke test for js conflicts -->
- <script type="text/javascript" src="js/clone-form-td.js"></script>
- <div id="O_o"></div>
- <div class='clear'></div>
- <div id="wrapper" class='wrap_modal'>
- <form action="calculate.php" method="post" id="sign-up_area" role="form" class="form-inline">
- <div class='col-xs-4 block_box' style='float:right;margin-top: -163px;text-align: right;'>
- <?php
- $client_id=$_GET['id_client'];
- $Mysql = new Mysql();
- $array_action = $Mysql->TabResSQL('SELECT * FROM 59_CLIENT inner join MAPS_VILLE ON 59_CLIENT.ID_COMMUNE=MAPS_VILLE.ID_VILLE WHERE ID_CLIENT='.$client_id.' ');
- foreach($array_action as $key){
- ?>
- Client: <input type='text' value='<?php echo $key->DENOMINATION_SOCIAL ;?>' name='denomination' class='form-control'><br/>
- Adresse: <input type='text' value='<?php echo $key-> ADRESSE_CLIENT ;?>' name='addrs' class='form-control'><br/>
- CP Ville: <input type='text' value='<?php echo $key-> CODE_VILLE ;?>' name='code' class='form-control'><br/>
- Ville: <input type='text' value='<?php echo $key-> NOM_VILLE ;?>' name='nomville' class='form-control'><br/>
- <?php } ?>
- </div>
- <div class='col-xs-2' style="margin-top: -41px;position: absolute;width: 100%;text-align: center;">
- Date: <input type='text' name='fordate' id='fordate' class='form-control' value='<?php $date=new DateTime();echo $date->format('d-m-Y') ;?>' readonly>
- <select class="select_periode form-control" name="periode" id="periode" required>
- <option disabled>Période</option>
- <?php
- $Mysql = new Mysql();
- $array_action = $Mysql->TabResSQL('SELECT * FROM TYPE_PERIODE_ACCUEIL');
- foreach($array_action as $key){
- echo '<option value='.$key->ID_PERIODE.'>'.$key->PERIODE.'</option>';
- }
- ?>
- </select>
- </div>
- <div id="entry1" class="clonedInput">
- <h2 id="reference" name="reference" class="heading-reference"></h2>
- <fieldset>
- <!-- Select Basic -->
- <?php
- $Mysql = new Mysql();
- //affiche le select avec la liste des kits
- $NombreDeKits = $Mysql->TabResSQL("SELECT * FROM KIT
- LEFT OUTER JOIN LISTE_ANIMATION ON LISTE_ANIMATION.ID_LISTE_ANIMATION=KIT.ID_LISTE_ANIMATION WHERE DATE_CREATION >= '2014-01-01'
- ORDER BY CODE ASC");
- $listekit = "";
- /*
- </optgroup>
- */
- $temp = "";
- foreach($NombreDeKits as $key){
- $finlistekit = "";
- if ($temp <> $key->ID_LISTE_ANIMATION){
- $listekit .= '<optgroup label="'.$key->NOM_ANIMATION.'">';
- $temp = $key->ID_LISTE_ANIMATION;
- }
- $selected="";
- if($_GET['KIT'] == $key->CODE)
- $selected="selected='selected'";
- $listekit .= '<option '.$selected.' value="'.$key->CODE.'">'.$key->CODE.'</option>';
- $listekit .= $finlistekit;
- }
- ?>
- <div class="form-inline col-xs-2 smaller" >
- <label>Choix du kit:</label>
- <?php
- echo '<select class="select_ttl form-control required" name="kit[]" id="kit" >
- <option value="0">choisissez un kit !</option>
- '.$listekit.'
- </select>';
- ?>
- </div>
- <!-- Text input-->
- <div class="form-group col-xs-2 smalleranim">
- <label>L'animation:</label>
- <input id="animation" name="animation[]" type="text" placeholder="nom animation" class="input_animation form-control required" value='' readonly />
- <input id="anim" name="anim[]" type="hidden" placeholder="anim" class="input_anim form-control" value='' />
- <input id="clientid" name="clientid" type="hidden" class="input_clientid form-control" value='<?php echo $_GET['id_client'];?>' />
- </div>
- <!-- Text input-->
- <div class="form-group col-xs-2 smallerpuht">
- <label>PU HT:</label>
- <input id="prix" name="prix[]" type="number" placeholder="PU_HT" class="input_prix form-control required" value='' min='1'>
- <input name="single_pdv[]" type="hidden" class="single_pdv">
- </div>
- <!-- Text input-->
- <div class="form-group col-xs-2 smallerrem">
- <label>Qtité:</label>
- <input value="1.00" id="quantity" name="quantity[]" type="number" placeholder="qtité" class="input_qtite form-control required" min="1.00" max='99.00'>
- </div>
- <div class="form-group col-xs-2 smallerrem">
- <label>TVA:</label>
- <input id="tva" name="tva[]" value="" type="text" placeholder="TVA" class="input_tva form-control " disabled >
- <input id="tva" name="tva[]" value="" type="hidden" placeholder="TVA" class="input_tva form-control " >
- </div>
- <div class="form-group col-xs-2 smallerrem">
- <label>REM:</label>
- <input id="rem" name="rem[]" value="0" type="number" placeholder="REM" class="input_rem form-control " max='99' min='0'>
- </div>
- <div class="form-group col-xs-2 smaller">
- <label>Total TTC:</label>
- <input id="totaltt" name="totaltt[]" type="number" placeholder="Total TT" class="input_totaltt form-control" readonly>
- <input id="totaltt_tva" name='totaltt_tva[]' type="hidden" class="input_totaltt_tva form-control">
- </div>
- <!-- Multiple Checkboxes (inline) -->
- <!-- Multiple Radios -->
- </div><!-- end #entry1 -->
- <!-- Button (Double) -->
- <!-- Textarea -->
- <br/>
- <p class='move'>
- <button type="button" id="btnAdd" name="btnAdd" class="btn btn-info">Ajouter une ligne</button>
- <button type="button" id="btnDel" name="btnDel" class="btn btn-danger">supprimer ligne</button>
- </p>
- <div class="form-group col-xs-2 fraiskilom" style="width:100%;">
- <br/>
- <br/>
- <label style='float: left;margin-top: -24px;'>frais kilometrique:</label>
- <input id="kilom" name="kilom" type="number" placeholder="Frais kilometrique" class="input_kilom form-control" value='0.00' step='0.01' style='float:left;' required />
- <input id="kilomtot" name="kilomtot" type="hidden" class="input_kilomtot form-control" value='' style='float:left;' />
- <div class="righter" style='float:left;'> <a href='http://fr.mappy.com/' target='_blank'>calculer</a></div><br/><br/><br/><br/>
- </div>
- <div class='clear'></div>
- <div class="form-group col-xs-2 peage" style="width:100%;">
- <label style='float: left;margin-top: -24px;'>Péage:</label>
- <input id="peage" name="peage" type="number" placeholder="Péage" class="input_peage form-control" value='0.00' style='float:left;' required />
- </div>
- <div class="form-group col-xs-2 go_left " >
- <br/>
- </div>
- <br/><br/><br/>
- <!-- Multiple Checkboxes (inline) -->
- <!-- Button -->
- <div class='clear'></div><br/>
- <textarea id="notes" name="notes" placeholder='Commentaire' class="form-control"></textarea>
- </fieldset>
- <div id="O_o">
- <label>Total:</label>
- <input name='totalwith' id='totalwith' type='text' class='totalwith form-control' readonly> € <br/>
- <label>TVA:</label>
- <input name='tvatotal' id='tvatotal' type='text' class='tvatotal form-control' readonly> € <br/>
- <label>Total TTC:</label>
- <input name='alltotal' id='alltotal' type='text' class='allTotal form-control' readonly> € <br/>
- <p>
- <input type='submit' id="submit_button" value='Valider' name="submit_button" class="btn btn-primary"></button>
- </p>
- </div>
- </form>
- </div> <!-- end wrapper -->
- </div>
- <div class="modal-footer">
- <!--<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>-->
- <!-- <button type="button" class="btn btn-primary">Save changes</button>-->
- </div>
- </div>
- </div>
- </div>
- <div class="jarviswidget jarviswidget-color-darken" data-widget-editbutton="false">
- <button type='button' class='btn btn-primary btn-lg btn-mine' data-toggle='modal' data-target='#myModal'>
- Passer une nouvelle commande
- </button>
- <header>
- <span class="widget-icon"> <i class="fa fa-table"></i> </span>
- </header>
- <div>
- <div class="jarviswidget-editbox">
- </div>
- <div class="widget-body no-padding" style="overflow-x:scroll; overflow-y:scroll; float: right; width: 83%;" >
- <table id="dt_basic" class="table table-striped table-bordered table-hover" width="100%">
- <thead>
- <tr>
- <th data-hide="phone">Id fact</th>
- <th data-hide="phone">Id client</th>
- <th data-class="expand">Type</th>
- <th data-class="expand">Id user</th>
- <th data-class="expand">Date</th>
- <th data-class="expand">Id anims</th>
- <th data-class="expand">Prix</th>
- <th data-class="expand">Tva</th>
- <th data-class="expand">Quantite</th>
- <th data-class="expand">Remise</th>
- <th data-class="expand">Remise tot</th>
- <th data-class="expand">Texte</th>
- <th data-class="expand">Adresse</th>
- <th data-class="expand">Date proformat</th>
- <th data-class="expand">Date passage fact</th>
- <th data-class="expand">Date payement</th>
- <th data-class="expand">Date relance 1</th>
- <th data-class="expand">Date relance 2</th>
- <th data-class="expand">Date contentieux</th>
- </tr>
- </thead>
- <tbody>
- <?php
- $id_client = $_GET['id_client'];
- $Mysql = new Mysql();
- $array_action = $Mysql->TabResSQL('SELECT * FROM '.LOC.'_FACT
- WHERE ID_CLIENT = '.$id_client.'
- ');
- foreach($array_action as $key){
- ?>
- <tr>
- <td><a href="/<?php echo $key->CHEMIN; ?>" target="_blank"><?php echo $key->ID_FACT; ?></a></td>
- <td><?php echo $key->ID_CLIENT; ?></a></td>
- <td><?php echo $key->TYPE; ?></a></td>
- <td><?php echo $key->ID_USERS; ?></a></td>
- <td><?php echo $key->DATE; ?></a></td>
- <td><?php echo $key->ID_ANIMS; ?></a></td>
- <td><?php echo $key->PRIX; ?></a></td>
- <td><?php echo $key->TVA; ?></a></td>
- <td><?php echo $key->QUANTITE; ?></a></td>
- <td><?php echo $key->REMISE; ?></a></td>
- <td><?php echo $key->REMISE_TOT; ?></a></td>
- <td><?php echo $key->TEXTE; ?></a></td>
- <td><?php echo $key->ADRESSE; ?></a></td>
- <td><?php echo $key->DATE_PROFORMAT; ?></a></td>
- <td><?php echo $key->DATE_PASSAGE_FACT; ?></a></td>
- <td><?php echo $key->DATE_PAYEMENT; ?></a></td>
- <td><?php echo $key->DATE_RELANCE1; ?></a></td>
- <td><?php echo $key->DATE_RELANCE2; ?></a></td>
- <td><?php echo $key->DATE_CONTENTIEUX; ?></a></td>
- </tr>
- <?php
- }
- ?>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- <style type=''>
- input[type='text'], textarea, select {
- border: solid 1px #999;
- }
- input[type='text'].focus, textarea.focus, select.focus {
- border-color: #000 !important;
- }
- input[type='text'].invalid, textarea.invalid, select.invalid {
- border-color: red;
- }
- input[type='text'].inactive, textarea.inactive, select.inactive, option.inactive {
- color: #999;
- font-style: italic;
- }
- input[type='text'].required, textarea.required {
- background: url(required-input.png) right 5px no-repeat;
- }
- input[type='number'], textarea, select {
- border: solid 1px #999;
- }
- input[type='number'].focus, textarea.focus, select.focus {
- border-color: #000 !important;
- }
- input[type='number'].invalid, textarea.invalid, select.invalid {
- border-color: red;
- }
- input[type='number'].inactive, textarea.inactive, select.inactive, option.inactive {
- color: #999;
- font-style: italic;
- }
- input[type='number'].required, textarea.required {
- background: url(required-input.png) right 5px no-repeat;
- }
- </style>
- <script type="text/javascript">
- $(document).ready(function() {
- $("#sign-up_area").validVal();
- });
- function calculateTva() {
- var totalPDV = 0;
- $('.clonedInput').each(function(i,e){
- var pdv = $(e).find('#tva').val();
- var total = $(e).find('#totaltt_tva').val()
- var singlePDV = (total*pdv)/100;
- totalPDV += singlePDV;
- });
- $('#tvatotal').val(totalPDV);
- }
- var totaltva=0;
- function calculateSingle(referentniSelect) {
- console.log('here');
- var quantity = parseFloat(referentniSelect.parents('fieldset').find('input[name="quantity[]"]').val());
- var price = parseFloat(referentniSelect.parents('fieldset').find('input[name="prix[]"]').val());
- var reduction =parseFloat( referentniSelect.parents('fieldset').find('input[name="rem[]"]').val());
- var pdv = parseFloat(referentniSelect.parents('fieldset').find('input[name="tva[]"]').val());
- var kilom= $('.input_kilom').val();
- if($('.input_kilom').val()==""){
- kilom=0;
- }
- sumkilom=kilom*0.4;
- // console.log(quantity,price,reduction,pdv);
- if (reduction !=0){
- reduction = reduction/100;
- }
- sum = parseFloat(((price - ((reduction)*price)) * quantity )+(price*pdv)/100);
- sum=sum.toFixed(2);
- return sum;
- }
- $('body').on('keyup','.input_prix , .input_qtite , .input_tva , .input_rem , .input_kilom ', function(){
- referentniSelect = $(this).parents('fieldset').find('select');
- referentniSelect.parents('fieldset').find('.input_totaltt').val(calculateSingle(referentniSelect));
- calculateTotal();
- });
- $('body').on('change','.select_ttl',function(e){
- var kit=$(this).val();
- var referentniSelect=$(this);
- //console.log(" this : " +kit);
- $.getJSON('/getanimation.php?kit=' + kit, null,
- function(data)
- {
- console.log('here');
- console.log(data.animation);
- // console.log("data : " +data.prix);
- // $("#kit").this(data.kit);
- // console.log(" this : " +$(this));
- //select.parent().next().find('input').first().val(data.kit);
- referentniSelect.parents('fieldset').find('input[name="animation[]"]').val(data.animation);
- referentniSelect.parents('fieldset').find('input[name="prix[]"]').val(data.prix);
- referentniSelect.parents('fieldset').find('input[name="anim[]"]').val(data.anim);
- referentniSelect.parents('fieldset').find('input[name="tva[]"]').val(data.tva);
- referentniSelect.parents('fieldset').find('input[name="totaltt_tva[]"]').val(data.prix);
- console.log(data.anim);
- //price_all = price_all += price;
- // $("#prix").this(data.prix);
- // console.log(referentniSelect);
- referentniSelect.parents('fieldset').find('.input_totaltt').val(calculateSingle(referentniSelect));
- console.log(referentniSelect.parents('fieldset').find('.input_totaltt'),'total');
- console.log('calculate single' +calculateSingle(referentniSelect));
- calculateTva();
- calculateTotal();
- });
- });
- </script>
- <script type="text/javascript">
- function calculateTotal() {
- total = 0;
- $('.input_totaltt_tva').each(function(i,e){
- tempTotal=0;
- if($(e).val() != "") {
- tempTotal = $(e).val();
- }
- total += parseFloat(tempTotal);
- });
- /* if($('.input_kilom').val().length==0){
- total=total;
- }else{
- total=total+(0.4*parseFloat($('.input_kilom').val()));
- }*/
- fin=0;
- vazi=0;
- vazi=$('#tvatotal').val();
- fin+= total + vazi;
- console.log(fin);
- $('.totalwith').val((total).toFixed(2));
- // $('.tvatotal').val((tvatotal).toFixed(2));
- $('.allTotal').val((fin).toFixed(2));
- /* kmh=0;
- kmh=parseFloat(0.4*($('.input_kilom').val()));
- $('.input_kilomtot').val((kmh).toFixed(2));*/
- }
- </script>
- <?php // include page footer
- include ("inc/footer.php");
- ?>
- <!-- END PAGE FOOTER -->
- <script type="text/javascript">
- // DO NOT REMOVE : GLOBAL FUNCTIONS!
- $(document).ready(function() {
- /* // DOM Position key index //
- l - Length changing (dropdown)
- f - Filtering input (search)
- t - The Table! (datatable)
- i - Information (records)
- p - Pagination (paging)
- r - pRocessing
- < and > - div elements
- <"#id" and > - div with an id
- <"class" and > - div with a class
- <"#id.class" and > - div with an id and class
- Also see: http://legacy.datatables.net/usage/features
- */
- /* BASIC ;*/
- var responsiveHelper_dt_basic = undefined;
- var responsiveHelper_datatable_fixed_column = undefined;
- var responsiveHelper_datatable_col_reorder = undefined;
- var responsiveHelper_datatable_tabletools = undefined;
- var breakpointDefinition = {
- tablet : 1024,
- phone : 480
- };
- $('#dt_basic').dataTable({
- "sDom": "<'dt-toolbar'<'col-xs-12 col-sm-6'f><'col-sm-6 col-xs-12 hidden-xs'l>r>"+
- "t"+
- "<'dt-toolbar-footer'<'col-sm-6 col-xs-12 hidden-xs'i><'col-xs-12 col-sm-6'p>>",
- "autoWidth" : true,
- "preDrawCallback" : function() {
- // Initialize the responsive datatables helper once.
- if (!responsiveHelper_dt_basic) {
- responsiveHelper_dt_basic = new ResponsiveDatatablesHelper($('#dt_basic'), breakpointDefinition);
- }
- },
- "rowCallback" : function(nRow) {
- responsiveHelper_dt_basic.createExpandIcon(nRow);
- },
- "drawCallback" : function(oSettings) {
- responsiveHelper_dt_basic.respond();
- }
- });
- /* END BASIC */
- /* COLUMN FILTER */
- var otable = $('#datatable_fixed_column').DataTable({
- //"bFilter": false,
- //"bInfo": false,
- //"bLengthChange": false
- //"bAutoWidth": false,
- //"bPaginate": false,
- //"bStateSave": true // saves sort state using localStorage
- "sDom": "<'dt-toolbar'<'col-xs-12 col-sm-6 hidden-xs'f><'col-sm-6 col-xs-12 hidden-xs'<'toolbar'>>r>"+
- "t"+
- "<'dt-toolbar-footer'<'col-sm-6 col-xs-12 hidden-xs'i><'col-xs-12 col-sm-6'p>>",
- "autoWidth" : true,
- "preDrawCallback" : function() {
- // Initialize the responsive datatables helper once.
- if (!responsiveHelper_datatable_fixed_column) {
- responsiveHelper_datatable_fixed_column = new ResponsiveDatatablesHelper($('#datatable_fixed_column'), breakpointDefinition);
- }
- },
- "rowCallback" : function(nRow) {
- responsiveHelper_datatable_fixed_column.createExpandIcon(nRow);
- },
- "drawCallback" : function(oSettings) {
- responsiveHelper_datatable_fixed_column.respond();
- }
- });
- // custom toolbar
- $("div.toolbar").html('<div class="text-right"><img src="img/logo.png" alt="SmartAdmin" style="width: 111px; margin-top: 3px; margin-right: 10px;"></div>');
- // Apply the filter
- $("#datatable_fixed_column thead th input[type=text]").on( 'keyup change', function () {
- otable
- .column( $(this).parent().index()+':visible' )
- .search( this.value )
- .draw();
- } );
- /* END COLUMN FILTER */
- /* COLUMN SHOW - HIDE */
- $('#datatable_col_reorder').dataTable({
- "sDom": "<'dt-toolbar'<'col-xs-12 col-sm-6'f><'col-sm-6 col-xs-6 hidden-xs'C>r>"+
- "t"+
- "<'dt-toolbar-footer'<'col-sm-6 col-xs-12 hidden-xs'i><'col-sm-6 col-xs-12'p>>",
- "autoWidth" : true,
- "preDrawCallback" : function() {
- // Initialize the responsive datatables helper once.
- if (!responsiveHelper_datatable_col_reorder) {
- responsiveHelper_datatable_col_reorder = new ResponsiveDatatablesHelper($('#datatable_col_reorder'), breakpointDefinition);
- }
- },
- "rowCallback" : function(nRow) {
- responsiveHelper_datatable_col_reorder.createExpandIcon(nRow);
- },
- "drawCallback" : function(oSettings) {
- responsiveHelper_datatable_col_reorder.respond();
- }
- });
- /* END COLUMN SHOW - HIDE */
- /* TABLETOOLS */
- $('#datatable_tabletools').dataTable({
- // Tabletools options:
- // https://datatables.net/extensions/tabletools/button_options
- "sDom": "<'dt-toolbar'<'col-xs-12 col-sm-6'f><'col-sm-6 col-xs-6 hidden-xs'T>r>"+
- "t"+
- "<'dt-toolbar-footer'<'col-sm-6 col-xs-12 hidden-xs'i><'col-sm-6 col-xs-12'p>>",
- "oTableTools": {
- "aButtons": [
- "copy",
- "csv",
- "xls",
- {
- "sExtends": "pdf",
- "sTitle": "SmartAdmin_PDF",
- "sPdfMessage": "SmartAdmin PDF Export",
- "sPdfSize": "letter"
- },
- {
- "sExtends": "print",
- "sMessage": "Generated by SmartAdmin <i>(press Esc to close)</i>"
- }
- ],
- "sSwfPath": "js/plugin/datatables/swf/copy_csv_xls_pdf.swf"
- },
- "autoWidth" : true,
- "preDrawCallback" : function() {
- // Initialize the responsive datatables helper once.
- if (!responsiveHelper_datatable_tabletools) {
- responsiveHelper_datatable_tabletools = new ResponsiveDatatablesHelper($('#datatable_tabletools'), breakpointDefinition);
- }
- },
- "rowCallback" : function(nRow) {
- responsiveHelper_datatable_tabletools.createExpandIcon(nRow);
- },
- "drawCallback" : function(oSettings) {
- responsiveHelper_datatable_tabletools.respond();
- }
- });
- /* END TABLETOOLS */
- })
- </script>
- <?php
- include("inc/script1.php");
- ?>
- <!-- PAGE RELATED PLUGIN(S) -->
- <script src="<?php echo ASSETS_URL; ?>/js/plugin/datatables/jquery.dataTables.min.js"></script>
- <script src="<?php echo ASSETS_URL; ?>/js/plugin/datatables/dataTables.colVis.min.js"></script>
- <script src="<?php echo ASSETS_URL; ?>/js/plugin/datatables/dataTables.tableTools.min.js"></script>
- <script src="<?php echo ASSETS_URL; ?>/js/plugin/datatables/dataTables.bootstrap.min.js"></script>
- <script src="<?php echo ASSETS_URL; ?>/js/plugin/datatable-responsive/datatables.responsive.min.js"></script>
- <?php
- //include footer
- include ("inc/google-analytics.php");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement