Example #1
0
<?php

if (isset($_POST['do'])) {
    require "../include/my_func.inc.php";
    require "../include/db_info.inc.php";
    for ($i = $_POST['user_id']; $i <= $_POST['fin_user_id']; $i++) {
        $user_id = "team" . $i;
        $length = $_POST['length'];
        $passwd = $passwd_bak = create_password($length);
        if (get_magic_quotes_gpc()) {
            $user_id = stripslashes($user_id);
            $passwd = stripslashes($passwd);
        }
        $user_id = mysql_real_escape_string($user_id);
        $passwd = pwGen($passwd);
        $sql = "update `users` set `password`='{$passwd}' where `user_id`='{$user_id}'  and user_id not in( select user_id from privilege where rightstr='administrator') ";
        mysql_query($sql);
        $data[$i][0] = $user_id;
        $data[$i][1] = $passwd_bak;
        $data[$i][2] = $_POST['addin'];
    }
    $title = array('报名号', '密码', '注释');
    exportexcel($data, $title, $_POST['xls_name']);
}
Example #2
0
<?php

//$_POST["date_jour"]=date("Y-m-d",time()-86400);
$_POST["date_jour"] = date("d-mY", time() - 86400);
$_POST["date_jour"] = "27-08-2014";
//on recherche la liste de véhicule auquel a droit l'utilisateur
$sql = getsqllistvehicule();
$link_list_vehicule = query($sql);
while ($tbl_list_vehicule = fetch($link_list_vehicule)) {
    $_POST["vehicule"] = $tbl_list_vehicule["phantom_device_id"];
    $tabresult = exportexcel("mensuel", implodeargskey($_POST), array("Date", "Début", "Fin", "Ampl.", "Conduite", "Arrêt", "Distance", "Vit.max."), array("date", "debut", "fin", "datediff", "conduite", "arret", "km", "vitessemax"));
    $html = "Ci joint le rapport conducteur du mois " . date2month($_POST["date_jour"]) . " pour le véhicule " . $tbl_list_vehicule["nomvehicule"];
    sendmailmister('', '', 'Rapport conducteur du mois ' . date2month($_POST["date_jour"]), $html, $_SESSION["email"], '', $tabresult);
}
//mise a jour de la date dans rapport
/*
$sql="update ".__racinebd__."rapport set date_envoi='".$_POST["date_debut"]."' where rapport_id=10";
query($sql);
*/
Example #3
0
<?php

//$_POST["date_jour"]=date("Y-m-d",time()-86400);
//$_POST["date_jour"]=date("d-m-Y",time()-86400);
$_POST["date_jour"] = date("d-m-Y", time() - 86400);
//$_POST["date_jour"]="27-08-2014";
$tabresult = exportexcel("flotte", implodeargskey($_POST), array("Nom", "Début", "Fin", "Ampl.", "Conduite", "Arrêt", "Distance", "Vit.max.", "Conso."), array("nomvehicule", "mintime", "maxtime", "amplitude", "datediff", "arret", "km", "vitesse", "conso"));
$html = "Ci joint le rapport de la flotte du " . $_POST["date_jour"];
sendmailmister('', '', 'Rapport flotte journalier ' . $_POST["date_jour"], $html, $_SESSION["email"], '', $tabresult);
//mise a jour de la date dans rapport
/*
$sql="update ".__racinebd__."rapport set date_envoi='".$_POST["date_jour"]."' where rapport_id=5";
query($sql);
*/
Example #4
0
<?php

//$_POST["date_jour"]=date("Y-m-d",time()-86400);
$_POST["date_jour"] = date("d-m-Y", time() - 86400);
//$_POST["date_jour"]="27-08-2014";
//on recherche la liste de véhicule auquel a droit l'utilisateur
$sql = getsqllistvehicule();
$link_list_vehicule = query($sql);
while ($tbl_list_vehicule = fetch($link_list_vehicule)) {
    $_POST["vehicule"] = $tbl_list_vehicule["phantom_device_id"];
    $tabresult = exportexcel("vehicule", implodeargskey($_POST), array("Départ", "Arrivée", "Durée", "Distance", "Vit.moy.", "Vit.max."), array("debuttxt", "fintxt", "datediff", "km", "moy", "max"));
    $html = "Ci joint le rapport conducteur du " . $_POST["date_jour"] . " pour le véhicule " . $tbl_list_vehicule["nomvehicule"];
    sendmailmister('', '', 'Rapport conducteur du ' . $_POST["date_jour"], $html, $_SESSION["email"], '', $tabresult);
}
//mise a jour de la date dans rapport
/*
$sql="update ".__racinebd__."rapport set date_envoi='".$_POST["date_debut"]."' where rapport_id=8";
query($sql);
*/
 public function withdrawalsexcel()
 {
     $searchwithdrawals = session('searchwithdrawals');
     //echo '<pre>'; print_r($searchwithdrawals);
     $title = array('用户账户', '提现金额', '提现方式', '提现帐号', '提现时间', '状态');
     foreach ($searchwithdrawals as $k => $v) {
         if ($v['status'] == 0) {
             $searchwithdrawals[$k]['status'] = '未处理';
         } else {
             $searchwithdrawals[$k]['status'] = '已处理';
         }
         if ($v['type'] == 0) {
             $searchwithdrawals[$k]['type'] = '银联';
         } else {
             $searchwithdrawals[$k]['type'] = '支付宝';
         }
         $list[$k][0] = $searchwithdrawals[$k]['tel'];
         $list[$k][1] = $searchwithdrawals[$k]['point'];
         $list[$k][2] = $searchwithdrawals[$k]['type'];
         $list[$k][3] = $searchwithdrawals[$k]['payaccount'];
         $list[$k][4] = $searchwithdrawals[$k]['ctime'];
         $list[$k][5] = $searchwithdrawals[$k]['status'];
     }
     exportexcel($list, $title, 'withdrawals');
 }
Example #6
0
<?php

//$_POST["date_debut"]=date("Y-m-d",time()-86400);
$_POST["date_debut"] = date("d-m-Y", time() - 86400);
$_POST["heure_debut"] = "00:00:01";
$_POST["date_fin"] = $_POST["date_debut"];
$_POST["heure_fin"] = "23:59:59";
$_POST["agence"] = "";
//$tabresult=exportexcel("kilometrique",implodeargskey($_POST),array("Véhicule","Distance","Durée","Conso. Théorique","Conso. Carburant"),array("nomvehicule","km","datediff","consotheorique","conso"));
$tabresult = exportexcel("kilometrique", implodeargskey($_POST), array("Véhicule", "Distance (km)", "Durée (min)", "Conso. Théorique (L/100km)", "Conso. Carburant (L)"), array("nomvehicule", "km", "datediff", "consotheorique", "conso"));
$html = "Ci joint le rapport kilométrique du " . $_POST["date_debut"];
//print_r($tabresult);
print "ici rapport kilometrique";
sendmailmister('', '', 'Rapport kilométrique' . $_POST["date_debut"], $html, $_SESSION["email"], '', $tabresult);
//mise a jour de la date dans rapport
/*
$sql="update ".__racinebd__."rapport set date_envoi='".$_POST["date_debut"]."' where rapport_id=4";
query($sql);
*/
Example #7
0
<?php

require "../../admin/require/function.php";
require "../../conf_front.php";
if ($_SESSION["compte_id"] != "") {
    $filename = exportexcel($_GET["template"], $_GET["args"], $_GET["menu"], $_GET["champs"]);
    //lancement du téléchargement du fichier
    header("Pragma: public");
    // required
    header("Expires: 0");
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Cache-Control: private", false);
    // required for certain browsers
    header("Content-Type: application/force-download");
    // change, added quotes to allow spaces in filenames, by Rajkumar Singh
    header("Content-Disposition: attachment; filename=\"" . $filename[1] . "\";");
    header("Content-Transfer-Encoding: binary");
    header("Content-Length: " . filesize($filename[0]));
    readfile($filename[0]);
}