Ada yang tau kenapa??

Discussion in 'Desain Web dan Programming' started by IqbalMoch48, 21 Aug 2013.

Thread Status:
Not open for further replies.
  1. IqbalMoch48

    IqbalMoch48 New Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    PHP:
    <?php
    //$login         = isset($_POST['Submit']) ? $_POST['login'] : '';
    //$kategori     = isset($_POST['kategori']) ? $_POST['kategori'] : '';
    //$divre         = isset($_POST['divre']) ? $_POST['divre'] : '';
    //$msisdn     = isset($_POST['msisdn']) ? $_POST['msisdn'] : '';

    include "koneksi.php";
    //include "function.php";
    ?>
    <form name="f116" action="<?=$_SERVER['PHP_SELF']?>" method="post">
    <table class="imagetable">
    <table width="40%" align="center" valign="middle" border="1" cellpadding="3" cellspacing="1" class="imagetable" style="border-color:#000000">
    <tr>
        <th colspan="4" align="center" valign="middle"><font size="3">REPORT REKAP DATA CALL AGENT CC FBCC BANDUNG</th>
    </tr>
    <!--<tr>
    <td colspan="4"></td>
    </tr>-->
        <tr>
          <td><b>Tanggal Awal</b></td>
        <th>
            <span>
            <input type="text" name="tanggal" size="10" class="gensmall" id="tanggal" value="<?'.=$tanggal;.'?>">
            </span>
            <img src="images/ew_calendar.gif" id="btanggal" alt="Pilih Tanggal" style="position:relative;cursor:pointer;cursor:hand;top:3px;">
            <script type="text/javascript">
            Calendar.setup(
            {
            inputField : "tanggal", // ID of the input field
            ifFormat : "%Y-%m-%d", // the date format
            button : "btanggal" // ID of the button
            }
            );
            </script>       
        </th>
    <td><b>Tanggal Akhir</b></td>
        <th>
            <span>
            <input type="text" name="tanggal2" size="10" class="gensmall" id="tanggal2" value="<?'.=$tanggal2;.'?>">
            </span>
            <img src="images/ew_calendar.gif" id="btanggal2" alt="Pilih Tanggal" style="position:relative;cursor:pointer;cursor:hand;top:3px;">
            <script type="text/javascript">
            Calendar.setup(
            {
            inputField : "tanggal2", // ID of the input field
            ifFormat : "%Y-%m-%d", // the date format
            button : "btanggal2" // ID of the button
            }
            );
            </script>
        </th>
    </tr>
    <!--<tr>
    <td colspan="4"></td>
    </tr>-->
    <tr>
        <td colspan="4" align="center">
            <input type="submit" name="Submit" value="Cari Data">
            <input type="reset" value="Batal" />     
        </td>
    </tr>
    </table>
    </form>
    <? 
    if(isset($_POST['Submit']))
    {
        
    $tanggal_awal    $_POST['tanggal'];
        
    $tanggal_akhir    $_POST['tanggal2'];
        
    $login=$_POST['login'];
        
    $nama=$_POST['nama'];
        
    $param     .= "&tanggal=$tanggal_awal&tanggal2=$tanggal_akhir";
        
        if((
    $tanggal_awal<>"") and ($tanggal_akhir<>"")){
        
    ?>
        <!--<div>
        <table border="0" width="40%">
        <tr>
            <td width="50px"><b>Export:</b> </td><td>
                <a href="./excel/export_excel.php?'.$param.'"><img src="images/excel.jpg" border="0"></a>
                </td>
        </tr>
        </table>
        </div>-->
        <table width="100%" cellpadding="3" cellspacing="1" class="imagetable">
        <tr>
            <!--<td width="100%" bordercolor="#FFFFFF">-->
        <table width="100%" border="1" cellpadding="3" cellspacing="1" class="imagetable" style="border-color:#000000"    >
        <br>
        <br>
            <tr> 
                <th width="3%" class="thCornerL" bgcolor="#F47FE0" align="center" rowspan="2">
                    <font color="#000000" size="2"><b>
                        No
                    </b></font>
                </th>
                <th align="center" valign="middle" width="5%" class="thTop" bgcolor="#F47FE0" rowspan="2">
                    <font color="#000000" size="2"><b>
                        Login ID
                    </b></font>
                </th>
                <th align="center" valign="middle" width="10%" class="thTop" bgcolor="#F47FE0" rowspan="2">
                    <font color="#000000" size="2"><b>
                        Nama
                    </b></font>
                </th>
                <th align="center" valign="middle" width="5%" class="thTop" bgcolor="#F47FE0" rowspan="2">
                    <font color="#000000" size="2"><b>
                        Tersambung 
                    </b></font>
                </th>
                         <th align="center" valign="middle" width="5%" class="thTop" bgcolor="#F47FE0" rowspan="2">
                    <font color="#000000" size="2"><b>
                        Lunas 
                    </b></font>
                </th>

                
                 <!--<td align="center" valign="middle" width="5%" class="thTop" bgcolor="#E97ABE">
                    <font color="#000000" size="2"><b>
                        Email 
                    </b></font>
                </td> -->
                <th align="center" valign="middle" width="5%" class="thTop" bgcolor="#F47FE0" rowspan="2">
                    <font color="#000000" size="2"><b>
                        Total Gagal
                    </b></font>
                </th>
                <tr>
                <th align="center" valign="middle" width="5%" class="thTop" bgcolor="#EDE9CF">
                    <font color="#000000" size="2"><b>
                        Busy
                    </b></font>
                </th>
                <th align="center" valign="middle" width="5%" class="thTop" bgcolor="#EDE9CF">
                    <font color="#000000" size="2"><b>
                        Call Rejected
                    </b></font>
                </th>
                <th align="center" valign="middle" width="7%" class="thTop" bgcolor="#EDE9CF">
                    <font color="#000000" size="2"><b>
                        Data Tdk Lengkap
                    </b></font>
                </th>
                <th align="center" valign="middle" width="5%" class="thTop" bgcolor="#EDE9CF">
                    <font color="#000000" size="2"><b>
                        Fax
                    </b></font>
                </th>
                <th align="center" valign="middle" width="5%" class="thTop" bgcolor="#EDE9CF">
                    <font color="#000000" size="2"><b>
                        Mailbox
                    </b></font>
                </th>
                <th align="center" valign="middle" width="5%" class="thTop" bgcolor="#EDE9CF">
                    <font color="#000000" size="2"><b>
                    RNA
                    </b></font>
                </th>
            </tr>
            </tr>
        <?
            
    //$query=mysql_query("SELECT a.login,b.nama
            //        FROM login AS a ,data_fbcc_bdg AS b
            //        WHERE
            //            b.tgl between '$tanggal_awal 00:00:00' and '$tanggal_akhir 23:59:59' and
            //            a.login = b.login and
            //            a.nama = b.nama and 
            //        GROUP BY
            //            a.login,b.nama");
            //$no=1;
            //while($result_query=mysql_fetch_array($query)){
            // membaca semua data login
        
    $query "SELECT * FROM data_fbcc_bdg";
        
    $hasil mysql_query($query);
        
    $no=1;
        while (
    $data mysql_fetch_array($hasil))
    {
            
    $jbusy =0;
            
    $jrej =0;
            
    $jdtl =0;
            
    $jfax =0;
            
    $jmlb =0;
            
    $jrna =0;
            
    $jlns =0;
            
    $jsmb=0;
            
    $jlns=0;
            
            
    // baca login id
    $login $data['login'];
     
    // baca nama agent
    $nama $data['nama'];

    // cari jumlah total call tiap agent
    $query2 "SELECT count(*) as jum FROM data_fbcc_bdg WHERE login = '$login'";
    $hasil2 mysql_query($query2);
    $data2 mysql_fetch_array($hasil2);
    $jumlah $data2['jum'];
     
    // menjumlahkan total call
    // untuk menghitung total seluruh karyawan
    $totalsemua += $jumlah;

                
    $qdata="select status as Status,count(status) as jml from data_fbcc_bdg where tanggal between '$tanggal_awal 00:00:00' and '$tanggal_akhir 23:59:59' and login = '$login' group by status";
                
    $rdata mysql_query($qdata) or die ("Query gagal!");
                
    //echo $qdata;
                
    while($hdata mysql_fetch_array($rdata)) {
                    
                    if (
    $hdata[Status]=="Nada Sibuk/Busy"){$jbusy=$hdata[jml];}
                    else if (
    $hdata[Status]=="Call Rejected"){$jrej=$hdata[jml];}
                    else if (
    $hdata[Status]=="Data Tidak Lengkap"){$jdtl=$hdata[jml];}
                    else if (
    $hdata[Status]=="Modem/Fax"){$jfax=$hdata[jml];}
                    else if (
    $hdata[Status]=="Mailbox"){$jmlb=$hdata[jml];}
                    else if (
    $hdata[Status]=="RNA"){$jrna=$hdata[jml];}
                    else if (
    $hdata[Status]=="Lunas"){$jlns=$hdata[jml];}
                    else if (
    $hdata[Status]=="Tersambung"){$jsmb=$jsmb+$hdata[jml];}
                    else if (
    $hdata[Status]=="Tersambung-Tidak Ada Kendala Layanan"){$jsmb=$jsmb+$hdata[jml];}
                    else if (
    $hdata[Status]=="Tersambung-Ada Kendala Layanan"){$jsmb=$jsmb+$hdata[jml];}
                    else if (
    $hdata[Status]=="Tersambung-Janji Bayar"){$jsmb=$jsmb+$hdata[jml];}
                    else if (
    $hdata[Status]=="Tersambung-Janji Call"){$jsmb=$jsmb+$hdata[jml];}
                    else {
    $joth=$hdata[jml];}
                    
                }
                
                
    $jts=($jbusy $jrej $jdtl $jfax $jmlb $jrna $jlns); //rumus total gagal
                //$qemail=mysql_query("SELECT count(LoginWinb) AS jml 
                        //FROM Data_fbcc AS a 
                        //WHERE
                            //Tgl between '$tgl1' and '$tgl2'    and 
                            //LoginID like '%".$result_query[LoginID]."%'
                        //AND `LoginWinb` like '%@%'");
                        
                
    $remail=mysql_fetch_row($qemail);
                
                
    //if ($no%2 == 0) {
                    //    $bgcolor = "#FDD7FE";
                    //}else{
                    //    $bgcolor = "#FFFFFF";
                    //}
                
    ?>
                 <!--<tr bgcolor="<?php echo $bgcolor ?>">-->
                <tr>             
                    <td align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $no?></font></td>
                    <td align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $login ?></font></td>
                    <td align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $nama ?></font></td>
                    <td align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $jsmb ?></font></td>
                    <!--<td align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php //echo $remail[0] ?></font></td>-->
                    <td align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $jlns ?></font></td>
                    <td align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $jts ?></font></td>
                    <td align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $jbusy ?></font></td>
                    <td align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $jrej ?></font></td>
                    <td align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $jdtl ?></font></td>
                    <td align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $jfax ?></font></td>
                    <td align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $jmlb ?></font></td>
                    <td align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $jrna ?></font></td>
                    <!--<td align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php //secho $jrna ?></font></td>--> 
                </tr>
                <?
                
                $jts
    =0;
                
    $jbusy=0;
                
    $jrej =0;
                
    $jdtl =0;
                
    $jfax =0;
                
    $jmlb =0;
                
    $jsmb =0;
                
    $jlns =0;
                
    $no++;
            }
            
            
    ?>
        </td>
        </tr>
    </table>
    </table>
            <?
        
    }
    }
    ?>
     
  2. aksicepat

    aksicepat New Member

    Messages:
    7
    Likes Received:
    1
    Trophy Points:
    3
    apanya knapa? pesan errornya apaan om?
     
  3. IqbalMoch48

    IqbalMoch48 New Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    bentar, ko gk bisa upload gambar sih.. -_-"
     
  4. ric86

    ric86 New Member

    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Errornya seperti apa?
    Ditunggu gambarnya.
     
Loading...
Thread Status:
Not open for further replies.

Share This Page

Loading...