Changeset 12334

Show
Ignore:
Timestamp:
07/29/11 09:46:45 (2 years ago)
Author:
mickecarlsson
Message:

cdr, added localization

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.10/cdr/functions.inc.php

    r12332 r12334  
    6868function cdr_formatUniqueID($uniqueid) { 
    6969        $system = explode('-', $uniqueid, 2); 
    70         echo "<td><a href=\"#\" class=\"info\">".$system[0]."<span>UniqueID: ".$uniqueid."</span></a></td>"; 
     70        echo "<td><a href=\"#\" class=\"info\">".$system[0]."<span>"._("UniqueID").": ".$uniqueid."</span></a></td>"; 
    7171} 
    7272 
    7373function cdr_formatChannel($channel) { 
    7474        $chan_type = explode('/', $channel, 2); 
    75         echo "<td><a href=\"#\" class=\"info\">".$chan_type[0]."<span>Channel: ".$channel."</span></a></td>"; 
     75        echo "<td><a href=\"#\" class=\"info\">".$chan_type[0]."<span>"._("Channel").": ".$channel."</span></a></td>"; 
    7676} 
    7777 
     
    8181        } else { 
    8282                $clid = htmlspecialchars($clid); 
    83                 echo "<td><a href=\"#\" class=\"info\">".$src."<span>Caller*ID: ".$clid."</span></a></td>"; 
     83                echo "<td><a href=\"#\" class=\"info\">".$src."<span>"._("CallerID").": ".$clid."</span></a></td>"; 
    8484        } 
    8585} 
    8686 
    8787function cdr_formatApp($app, $lastdata) { 
    88         echo "<td><a href=\"#\" class=\"info\">".$app."<span>Application: ".$app."(".$lastdata.")</span></a></td>"; 
     88        echo "<td><a href=\"#\" class=\"info\">".$app."<span>"._("Application").": ".$app."(".$lastdata.")</span></a></td>"; 
    8989} 
    9090 
     
    9696//                echo "<td><a href=\"#\" class=\"info\">"<span>Destination Context: $dcontext\"><a href=\"$rev\" target=\"reverse\">$dst</a></abbr></td>"; 
    9797        } else { 
    98         echo "<td><a href=\"#\" class=\"info\">".$dst."<span>Destination Context: ".$dcontext."</span></a></td>"; 
     98        echo "<td><a href=\"#\" class=\"info\">".$dst."<span>"._("Destination Context").": ".$dcontext."</span></a></td>"; 
    9999        } 
    100100} 
     
    115115                        $amaflags = 'DEFAULT'; 
    116116        } 
    117         echo "<td><a href=\"#\" class=\"info\">".$disposition."<span>AMA Flag: ".$amaflags."</span></a></td>"; 
     117        echo "<td><a href=\"#\" class=\"info\">".$disposition."<span>"._("AMA Flag").": ".$amaflags."</span></a></td>"; 
    118118} 
    119119 
     
    121121        $duration = sprintf('%02d', intval($duration/60)).':'.sprintf('%02d', intval($duration%60)); 
    122122        $billduration = sprintf('%02d', intval($billsec/60)).':'.sprintf('%02d', intval($billsec%60)); 
    123         echo "<td><a href=\"#\" class=\"info\">".$duration."<span>Billing Duration: ".$billduration."</span></a></td>"; 
     123        echo "<td><a href=\"#\" class=\"info\">".$duration."<span>"._("Billing Duration").": ".$billduration."</span></a></td>"; 
    124124} 
    125125 
  • modules/branches/2.10/cdr/module.xml

    r12333 r12334  
    44  <description>Call Data Record report tools for vieweing reports of your calls</description> 
    55  <name>CDR Viewer</name> 
    6   <version>2.10.0.alpha4</version> 
    7   <publisher>Mikael Carlsson/Igor Okunev</publisher> 
     6  <version>2.10.0.alpha5</version> 
     7  <publisher>Mikael Carlsson</publisher> 
    88  <license>GPLv2+</license> 
    99  <type>tool</type> 
     
    1313  </menuitems> 
    1414  <changelog> 
     15    *2.10.0.alpha5* Added localization 
    1516    *2.10.0.alpha4* Added csv export 
    1617    *2.10.0.alpha3* First public release 
     
    2223    <module>core ge 2.6.0</module> 
    2324  </depends> 
    24   <location>release/2.10/cdr-2.10.0.alpha4.tgz</location> 
    25   <md5sum>af88bab5c736de65fa1ee37234ad946e</md5sum> 
     25  <location></location> 
     26  <md5sum></md5sum> 
    2627</module> 
  • modules/branches/2.10/cdr/page.cdr.php

    r12332 r12334  
    11<?php 
     2 
     3 
    24//This file is part of FreePBX. 
    35// 
     
    4951    <form method="post" enctype="application/x-www-form-urlencoded"> 
    5052    <fieldset> 
    51     <legend class="title">Call Detail Record Search</legend> 
     53    <legend class="title"><?php echo _("Call Detail Record Search")?></legend> 
    5254      <table width="100%"> 
    5355      <tr> 
    54         <th>Order By</th> 
    55         <th>Search conditions</th> 
     56        <th><?php echo _("Order By")?></th> 
     57        <th><?php echo _("Search conditions")?></th> 
    5658        <th>&nbsp;</th> 
    5759      </tr> 
    5860      <tr> 
    59         <td><input <?php if (empty($_POST['order']) || $_POST['order'] == 'calldate') { echo 'checked="checked"'; } ?> type="radio" name="order" value="calldate" />&nbsp;Call Date:</td> 
    60         <td>From
     61        <td><input <?php if (empty($_POST['order']) || $_POST['order'] == 'calldate') { echo 'checked="checked"'; } ?> type="radio" name="order" value="calldate" />&nbsp;<?php echo _("Call Date")?>:</td> 
     62        <td><?php echo _("From")?>
    6163        <input type="text" name="startday" id="startday" size="2" maxlength="2" value="<?php if (isset($_POST['startday'])) { echo $_POST['startday']; } else { echo '01'; } ?>" /> 
    6264        <select name="startmonth" id="startmonth"> 
    6365<?php 
    64   $months = array('01' => 'January', '02' => 'February', '03' => 'March', '04' => 'April', '05' => 'May', '06' => 'June', '07' => 'July', '08' => 'August', '09' => 'September', '10' => 'October', '11' => 'November', '12' => 'December'); 
    65   foreach ($months as $i => $month) { 
    66     if ((empty($_POST['startmonth']) && date('m') == $i) || (isset($_POST['startmonth']) && $_POST['startmonth'] == $i)) { 
    67       echo "        <option value=\"$i\" selected=\"selected\">$month</option>\n"; 
    68     } else { 
    69       echo "        <option value=\"$i\">$month</option>\n"; 
    70    
    71  
     66       $months = array('01' => _('January'), '02' => _('February'), '03' => _('March'), '04' => _('April'), '05' => _('May'), '06' => _('June'), '07' => _('July'), '08' => _('August'), '09' => _('September'), '10' => _('October'), '11' => _('November'), '12' => _('December')); 
     67       foreach ($months as $i => $month) { 
     68         if ((empty($_POST['startmonth']) && date('m') == $i) || (isset($_POST['startmonth']) && $_POST['startmonth'] == $i)) { 
     69           echo "<option value=\"$i\" selected=\"selected\">$month</option>\n"; 
     70         } else { 
     71           echo "<option value=\"$i\">$month</option>\n"; 
     72         
     73       
    7274?> 
    7375        </select> 
    7476        <select name="startyear" id="startyear"> 
    7577<?php 
    76   for ( $i = 2000; $i <= date('Y'); $i++) { 
    77     if ((empty($_POST['startyear']) && date('Y') == $i) || (isset($_POST['startyear']) && $_POST['startyear'] == $i)) { 
    78       echo "        <option value=\"$i\" selected=\"selected\">$i</option>\n"; 
    79     } else { 
    80       echo "        <option value=\"$i\">$i</option>\n"; 
    81    
    82 
     78       for ( $i = 2000; $i <= date('Y'); $i++) { 
     79         if ((empty($_POST['startyear']) && date('Y') == $i) || (isset($_POST['startyear']) && $_POST['startyear'] == $i)) { 
     80           echo "<option value=\"$i\" selected=\"selected\">$i</option>\n"; 
     81         } else { 
     82           echo "<option value=\"$i\">$i</option>\n"; 
     83         
     84       
    8385?> 
    84       </select> 
    85 <input type="text" name="starthour" id="starthour" size="2" maxlength="2" value="<?php if (isset($_POST['starthour'])) { echo $_POST['starthour']; } else { echo '00'; } ?>" /> 
    86 
    87 <input type="text" name="startmin" id="startmin" size="2" maxlength="2" value="<?php if (isset($_POST['startmin'])) { echo $_POST['startmin']; } else { echo '00'; } ?>" /> 
    88 To: 
    89 <input type="text" name="endday" id="endday" size="2" maxlength="2" value="<?php if (isset($_POST['endday'])) { echo $_POST['endday']; } else { echo '31'; } ?>" /> 
    90 <select name="endmonth" id="endmonth"> 
     86        </select> 
     87        <input type="text" name="starthour" id="starthour" size="2" maxlength="2" value="<?php if (isset($_POST['starthour'])) { echo $_POST['starthour']; } else { echo '00'; } ?>" />: 
     88        <input type="text" name="startmin" id="startmin" size="2" maxlength="2" value="<?php if (isset($_POST['startmin'])) { echo $_POST['startmin']; } else { echo '00'; } ?>" /><?php echo _("To")?>: 
     89        <input type="text" name="endday" id="endday" size="2" maxlength="2" value="<?php if (isset($_POST['endday'])) { echo $_POST['endday']; } else { echo '31'; } ?>" /> 
     90        <select name="endmonth" id="endmonth"> 
    9191<?php 
    92 foreach ($months as $i => $month) { 
    93         if ((empty($_POST['endmonth']) && date('m') == $i) || (isset($_POST['endmonth']) && $_POST['endmonth'] == $i)) { 
    94                 echo "        <option value=\"$i\" selected=\"selected\">$month</option>\n"; 
    95         } else { 
    96                 echo "        <option value=\"$i\">$month</option>\n"; 
    97        
    98 
     92       foreach ($months as $i => $month) { 
     93       if ((empty($_POST['endmonth']) && date('m') == $i) || (isset($_POST['endmonth']) && $_POST['endmonth'] == $i)) { 
     94                 echo "<option value=\"$i\" selected=\"selected\">$month</option>\n"; 
     95         } else { 
     96                   echo "<option value=\"$i\">$month</option>\n"; 
     97             
     98       
    9999?> 
    100100</select> 
     
    110110?> 
    111111</select> 
    112 <input type="text" name="endhour" id="endhour" size="2" maxlength="2" value="<?php if (isset($_POST['endhour'])) { echo $_POST['endhour']; } else { echo '23'; } ?>" /> 
    113 
    114 <input type="text" name="endmin" id="endmin" size="2" maxlength="2" value="<?php if (isset($_POST['endmin'])) { echo $_POST['endmin']; } else { echo '59'; } ?>" /> 
    115 </td> 
     112  <input type="text" name="endhour" id="endhour" size="2" maxlength="2" value="<?php if (isset($_POST['endhour'])) { echo $_POST['endhour']; } else { echo '23'; } ?>" />: 
     113  <input type="text" name="endmin" id="endmin" size="2" maxlength="2" value="<?php if (isset($_POST['endmin'])) { echo $_POST['endmin']; } else { echo '59'; } ?>" /> 
     114  </td> 
    116115<td rowspan="10" valign='top' align='right'> 
    117116<fieldset> 
    118 <legend class="title">Extra options</legend> 
     117<legend class="title"><?php echo _("Extra options")?></legend> 
    119118<table> 
    120119<tr> 
    121 <td>Report type : </td> 
     120<td><?php echo _("Report type")?> : </td> 
    122121<td> 
    123 <input <?php if ( (empty($_POST['need_html']) && empty($_POST['need_chart']) && empty($_POST['need_chart_cc']) && empty($_POST['need_csv'])) || ( ! empty($_POST['need_html']) &&  $_POST['need_html'] == 'true' ) ) { echo 'checked="checked"'; } ?> type="checkbox" name="need_html" value="true" /> : CDR search<br /> 
    124 <input <?php if ( ! empty($_POST['need_csv']) && $_POST['need_csv'] == 'true' ) { echo 'checked="checked"'; } ?> type="checkbox" name="need_csv" value="true" /> : CSV file<br/> 
    125 <input <?php if ( ! empty($_POST['need_chart']) && $_POST['need_chart'] == 'true' ) { echo 'checked="checked"'; } ?> type="checkbox" name="need_chart" value="true" /> : Call Graph<br /> 
    126 <input <?php if ( ! empty($_POST['need_chart_cc']) && $_POST['need_chart_cc'] == 'true' ) { echo 'checked="checked"'; } ?> type="checkbox" name="need_chart_cc" value="true" /> : Concurent Calls<br /> 
    127 </td> 
    128 </tr> 
    129 <tr> 
    130 <td><label for="Result limit">Result limit : </label></td> 
     122<input <?php if ( (empty($_POST['need_html']) && empty($_POST['need_chart']) && empty($_POST['need_chart_cc']) && empty($_POST['need_csv'])) || ( ! empty($_POST['need_html']) &&  $_POST['need_html'] == 'true' ) ) { echo 'checked="checked"'; } ?> type="checkbox" name="need_html" value="true" /> : <?php echo _("CDR search")?><br /> 
     123<input <?php if ( ! empty($_POST['need_csv']) && $_POST['need_csv'] == 'true' ) { echo 'checked="checked"'; } ?> type="checkbox" name="need_csv" value="true" /> : <?php echo _("CSV file")?><br/> 
     124<input <?php if ( ! empty($_POST['need_chart']) && $_POST['need_chart'] == 'true' ) { echo 'checked="checked"'; } ?> type="checkbox" name="need_chart" value="true" /> : <?php echo _("Call Graph")?><br /> 
     125<input <?php if ( ! empty($_POST['need_chart_cc']) && $_POST['need_chart_cc'] == 'true' ) { echo 'checked="checked"'; } ?> type="checkbox" name="need_chart_cc" value="true" /> : <?php echo _("Concurrent Calls")?><br /> 
     126</td> 
     127</tr> 
     128<tr> 
     129<td><label for="Result limit"><?php echo _("Result limit")?> : </label></td> 
    131130<td> 
    132131<input value="<?php 
     
    143142</tr> 
    144143<tr> 
    145 <td><input <?php if (isset($_POST['order']) && $_POST['order'] == 'channel') { echo 'checked="checked"'; } ?> type="radio" name="order" value="channel" />&nbsp;<label for="channel">Src channel:</label></td> 
     144<td><input <?php if (isset($_POST['order']) && $_POST['order'] == 'channel') { echo 'checked="checked"'; } ?> type="radio" name="order" value="channel" />&nbsp;<label for="channel"><?php echo _("Src Channel")?>:</label></td> 
    146145<td><input type="text" name="channel" id="channel" value="<?php if (isset($_POST['channel'])) { echo $_POST['channel']; } ?>" /> 
    147 Not:<input <?php if ( isset($_POST['channel_neg'] ) && $_POST['channel_neg'] == 'true' ) { echo 'checked="checked"'; } ?> type="checkbox" name="channel_neg" value="true" /> 
    148 Begins With:<input <?php if (empty($_POST['channel_mod']) || $_POST['channel_mod'] == 'begins_with') { echo 'checked="checked"'; } ?> type="radio" name="channel_mod" value="begins_with" /> 
    149 Contains:<input <?php if (isset($_POST['channel_mod']) && $_POST['channel_mod'] == 'contains') { echo 'checked="checked"'; } ?> type="radio" name="channel_mod" value="contains" /> 
    150 Ends With:<input <?php if (isset($_POST['channel_mod']) && $_POST['channel_mod'] == 'ends_with') { echo 'checked="checked"'; } ?> type="radio" name="channel_mod" value="ends_with" /> 
    151 Exactly:<input <?php if (isset($_POST['channel_mod']) && $_POST['channel_mod'] == 'exact') { echo 'checked="checked"'; } ?> type="radio" name="channel_mod" value="exact" /> 
    152 </td> 
    153 </tr> 
    154 <tr> 
    155 <td><input <?php if (isset($_POST['order']) && $_POST['order'] == 'src') { echo 'checked="checked"'; } ?> type="radio" name="order" value="src" />&nbsp;<label for="src">Source:</label></td> 
     146<?php echo _("Not")?>:<input <?php if ( isset($_POST['channel_neg'] ) && $_POST['channel_neg'] == 'true' ) { echo 'checked="checked"'; } ?> type="checkbox" name="channel_neg" value="true" /> 
     147<?php echo _("Begins With")?>:<input <?php if (empty($_POST['channel_mod']) || $_POST['channel_mod'] == 'begins_with') { echo 'checked="checked"'; } ?> type="radio" name="channel_mod" value="begins_with" /> 
     148<?php echo _("Contains")?>:<input <?php if (isset($_POST['channel_mod']) && $_POST['channel_mod'] == 'contains') { echo 'checked="checked"'; } ?> type="radio" name="channel_mod" value="contains" /> 
     149<?php echo _("Ends With")?>:<input <?php if (isset($_POST['channel_mod']) && $_POST['channel_mod'] == 'ends_with') { echo 'checked="checked"'; } ?> type="radio" name="channel_mod" value="ends_with" /> 
     150<?php echo _("Exactly")?>:<input <?php if (isset($_POST['channel_mod']) && $_POST['channel_mod'] == 'exact') { echo 'checked="checked"'; } ?> type="radio" name="channel_mod" value="exact" /> 
     151</td> 
     152</tr> 
     153<tr> 
     154<td><input <?php if (isset($_POST['order']) && $_POST['order'] == 'src') { echo 'checked="checked"'; } ?> type="radio" name="order" value="src" />&nbsp;<label for="src"><?php echo _("Source")?>:</label></td> 
    156155<td><input type="text" name="src" id="src" value="<?php if (isset($_POST['src'])) { echo $_POST['src']; } ?>" /> 
    157 Not:<input <?php if ( isset($_POST['src_neg'] ) && $_POST['src_neg'] == 'true' ) { echo 'checked="checked"'; } ?> type="checkbox" name="src_neg" value="true" /> 
    158 Begins With:<input <?php if (empty($_POST['src_mod']) || $_POST['src_mod'] == 'begins_with') { echo 'checked="checked"'; } ?> type="radio" name="src_mod" value="begins_with" /> 
    159 Contains:<input <?php if (isset($_POST['src_mod']) && $_POST['src_mod'] == 'contains') { echo 'checked="checked"'; } ?> type="radio" name="src_mod" value="contains" /> 
    160 Ends With:<input <?php if (isset($_POST['src_mod']) && $_POST['src_mod'] == 'ends_with') { echo 'checked="checked"'; } ?> type="radio" name="src_mod" value="ends_with" /> 
    161 Exactly:<input <?php if (isset($_POST['src_mod']) && $_POST['src_mod'] == 'exact') { echo 'checked="checked"'; } ?> type="radio" name="src_mod" value="exact" /> 
    162 </td> 
    163 </tr> 
    164 <tr> 
    165 <td><input <?php if (isset($_POST['order']) && $_POST['order'] == 'clid') { echo 'checked="checked"'; } ?> type="radio" name="order" value="clid" />&nbsp;<label for="clid">Caller*ID</label></td> 
     156<?php echo _("Not")?>:<input <?php if ( isset($_POST['src_neg'] ) && $_POST['src_neg'] == 'true' ) { echo 'checked="checked"'; } ?> type="checkbox" name="src_neg" value="true" /> 
     157<?php echo _("Begins With")?>:<input <?php if (empty($_POST['src_mod']) || $_POST['src_mod'] == 'begins_with') { echo 'checked="checked"'; } ?> type="radio" name="src_mod" value="begins_with" /> 
     158<?php echo _("Contains")?>:<input <?php if (isset($_POST['src_mod']) && $_POST['src_mod'] == 'contains') { echo 'checked="checked"'; } ?> type="radio" name="src_mod" value="contains" /> 
     159<?php echo _("Ends With")?>:<input <?php if (isset($_POST['src_mod']) && $_POST['src_mod'] == 'ends_with') { echo 'checked="checked"'; } ?> type="radio" name="src_mod" value="ends_with" /> 
     160<?php echo _("Exactly")?>:<input <?php if (isset($_POST['src_mod']) && $_POST['src_mod'] == 'exact') { echo 'checked="checked"'; } ?> type="radio" name="src_mod" value="exact" /> 
     161</td> 
     162</tr> 
     163<tr> 
     164<td><input <?php if (isset($_POST['order']) && $_POST['order'] == 'clid') { echo 'checked="checked"'; } ?> type="radio" name="order" value="clid" />&nbsp;<label for="clid"><?php echo _("CallerID")?></label></td> 
    166165<td><input type="text" name="clid" id="clid" value="<?php if (isset($_POST['clid'])) { echo $_POST['clid']; } ?>" /> 
    167 Not:<input <?php if ( isset($_POST['clid_neg'] ) && $_POST['clid_neg'] == 'true' ) { echo 'checked="checked"'; } ?> type="checkbox" name="clid_neg" value="true" /> 
    168 Begins With:<input <?php if (empty($_POST['clid_mod']) || $_POST['clid_mod'] == 'begins_with') { echo 'checked="checked"'; } ?> type="radio" name="clid_mod" value="begins_with" /> 
    169 Contains:<input <?php if (isset($_POST['clid_mod']) && $_POST['clid_mod'] == 'contains') { echo 'checked="checked"'; } ?> type="radio" name="clid_mod" value="contains" /> 
    170 Ends With:<input <?php if (isset($_POST['clid_mod']) && $_POST['clid_mod'] == 'ends_with') { echo 'checked="checked"'; } ?> type="radio" name="clid_mod" value="ends_with" /> 
    171 Exactly:<input <?php if (isset($_POST['clid_mod']) && $_POST['clid_mod'] == 'exact') { echo 'checked="checked"'; } ?> type="radio" name="clid_mod" value="exact" /> 
    172 </td> 
    173 </tr> 
    174 <tr> 
    175 <td><input <?php if (isset($_POST['order']) && $_POST['order'] == 'dstchannel') { echo 'checked="checked"'; } ?> type="radio" name="order" value="dstchannel" />&nbsp;<label for="dstchannel">Dst channel:</label></td> 
     166<?php echo _("Not")?>:<input <?php if ( isset($_POST['clid_neg'] ) && $_POST['clid_neg'] == 'true' ) { echo 'checked="checked"'; } ?> type="checkbox" name="clid_neg" value="true" /> 
     167<?php echo _("Begins With")?>:<input <?php if (empty($_POST['clid_mod']) || $_POST['clid_mod'] == 'begins_with') { echo 'checked="checked"'; } ?> type="radio" name="clid_mod" value="begins_with" /> 
     168<?php echo _("Contains")?>:<input <?php if (isset($_POST['clid_mod']) && $_POST['clid_mod'] == 'contains') { echo 'checked="checked"'; } ?> type="radio" name="clid_mod" value="contains" /> 
     169<?php echo _("Ends With")?>:<input <?php if (isset($_POST['clid_mod']) && $_POST['clid_mod'] == 'ends_with') { echo 'checked="checked"'; } ?> type="radio" name="clid_mod" value="ends_with" /> 
     170<?php echo _("Exactly")?>:<input <?php if (isset($_POST['clid_mod']) && $_POST['clid_mod'] == 'exact') { echo 'checked="checked"'; } ?> type="radio" name="clid_mod" value="exact" /> 
     171</td> 
     172</tr> 
     173<tr> 
     174<td><input <?php if (isset($_POST['order']) && $_POST['order'] == 'dstchannel') { echo 'checked="checked"'; } ?> type="radio" name="order" value="dstchannel" />&nbsp;<label for="dstchannel"><?php echo _("Dst Channel")?>:</label></td> 
    176175<td><input type="text" name="dstchannel" id="dstchannel" value="<?php if (isset($_POST['dstchannel'])) { echo $_POST['dstchannel']; } ?>" /> 
    177 Not:<input <?php if ( isset($_POST['dstchannel_neg'] ) && $_POST['dstchannel_neg'] == 'true' ) { echo 'checked="checked"'; } ?> type="checkbox" name="dstchannel_neg" value="true" /> 
    178 Begins With:<input <?php if (empty($_POST['dstchannel_mod']) || $_POST['dstchannel_mod'] == 'begins_with') { echo 'checked="checked"'; } ?> type="radio" name="dstchannel_mod" value="begins_with" /> 
    179 Contains:<input <?php if (isset($_POST['dstchannel_mod']) && $_POST['dstchannel_mod'] == 'contains') { echo 'checked="checked"'; } ?> type="radio" name="dstchannel_mod" value="contains" /> 
    180 Ends With:<input <?php if (isset($_POST['dstchannel_mod']) && $_POST['dstchannel_mod'] == 'ends_with') { echo 'checked="checked"'; } ?> type="radio" name="dstchannel_mod" value="ends_with" /> 
    181 Exactly:<input <?php if (isset($_POST['dstchannel_mod']) && $_POST['dstchannel_mod'] == 'exact') { echo 'checked="checked"'; } ?> type="radio" name="dstchannel_mod" value="exact" /> 
    182 </td> 
    183 </tr> 
    184 <tr> 
    185 <td><input <?php if (isset($_POST['order']) && $_POST['order'] == 'dst') { echo 'checked="checked"'; } ?> type="radio" name="order" value="dst" />&nbsp;<label for="dst">Destination:</label></td> 
     176<?php echo _("Not")?>:<input <?php if ( isset($_POST['dstchannel_neg'] ) && $_POST['dstchannel_neg'] == 'true' ) { echo 'checked="checked"'; } ?> type="checkbox" name="dstchannel_neg" value="true" /> 
     177<?php echo _("Begins With")?>:<input <?php if (empty($_POST['dstchannel_mod']) || $_POST['dstchannel_mod'] == 'begins_with') { echo 'checked="checked"'; } ?> type="radio" name="dstchannel_mod" value="begins_with" /> 
     178<?php echo _("Contains")?>:<input <?php if (isset($_POST['dstchannel_mod']) && $_POST['dstchannel_mod'] == 'contains') { echo 'checked="checked"'; } ?> type="radio" name="dstchannel_mod" value="contains" /> 
     179<?php echo _("Ends With")?>:<input <?php if (isset($_POST['dstchannel_mod']) && $_POST['dstchannel_mod'] == 'ends_with') { echo 'checked="checked"'; } ?> type="radio" name="dstchannel_mod" value="ends_with" /> 
     180<?php echo _("Exactly")?>:<input <?php if (isset($_POST['dstchannel_mod']) && $_POST['dstchannel_mod'] == 'exact') { echo 'checked="checked"'; } ?> type="radio" name="dstchannel_mod" value="exact" /> 
     181</td> 
     182</tr> 
     183<tr> 
     184<td><input <?php if (isset($_POST['order']) && $_POST['order'] == 'dst') { echo 'checked="checked"'; } ?> type="radio" name="order" value="dst" />&nbsp;<label for="dst"><?php echo _("Destination")?>:</label></td> 
    186185<td><input type="text" name="dst" id="dst" value="<?php if (isset($_POST['dst'])) { echo $_POST['dst']; } ?>" /> 
    187 Not:<input <?php if ( isset($_POST['dst_neg'] ) &&  $_POST['dst_neg'] == 'true' ) { echo 'checked="checked"'; } ?> type="checkbox" name="dst_neg" value="true" /> 
    188 Begins With:<input <?php if (empty($_POST['dst_mod']) || $_POST['dst_mod'] == 'begins_with') { echo 'checked="checked"'; } ?> type="radio" name="dst_mod" value="begins_with" /> 
    189 Contains:<input <?php if (isset($_POST['dst_mod']) && $_POST['dst_mod'] == 'contains') { echo 'checked="checked"'; } ?> type="radio" name="dst_mod" value="contains" /> 
    190 Ends With:<input <?php if (isset($_POST['dst_mod']) && $_POST['dst_mod'] == 'ends_with') { echo 'checked="checked"'; } ?> type="radio" name="dst_mod" value="ends_with" /> 
    191 Exactly:<input <?php if (isset($_POST['dst_mod']) && $_POST['dst_mod'] == 'exact') { echo 'checked="checked"'; } ?> type="radio" name="dst_mod" value="exact" /> 
    192 </td> 
    193 </tr> 
    194 <tr> 
    195 <td><input <?php if (isset($_POST['order']) && $_POST['order'] == 'userfield') { echo 'checked="checked"'; } ?> type="radio" name="order" value="userfield" />&nbsp;<label for="userfield">Userfield:</label></td> 
     186<?php echo _("Not")?>:<input <?php if ( isset($_POST['dst_neg'] ) &&  $_POST['dst_neg'] == 'true' ) { echo 'checked="checked"'; } ?> type="checkbox" name="dst_neg" value="true" /> 
     187<?php echo _("Begins With")?>:<input <?php if (empty($_POST['dst_mod']) || $_POST['dst_mod'] == 'begins_with') { echo 'checked="checked"'; } ?> type="radio" name="dst_mod" value="begins_with" /> 
     188<?php echo _("Contains")?>:<input <?php if (isset($_POST['dst_mod']) && $_POST['dst_mod'] == 'contains') { echo 'checked="checked"'; } ?> type="radio" name="dst_mod" value="contains" /> 
     189<?php echo _("Ends With")?>:<input <?php if (isset($_POST['dst_mod']) && $_POST['dst_mod'] == 'ends_with') { echo 'checked="checked"'; } ?> type="radio" name="dst_mod" value="ends_with" /> 
     190<?php echo _("Exactly")?>:<input <?php if (isset($_POST['dst_mod']) && $_POST['dst_mod'] == 'exact') { echo 'checked="checked"'; } ?> type="radio" name="dst_mod" value="exact" /> 
     191</td> 
     192</tr> 
     193<tr> 
     194<td><input <?php if (isset($_POST['order']) && $_POST['order'] == 'userfield') { echo 'checked="checked"'; } ?> type="radio" name="order" value="userfield" />&nbsp;<label for="userfield"><?php echo _("Userfield")?>:</label></td> 
    196195<td><input type="text" name="userfield" id="userfield" value="<?php if (isset($_POST['userfield'])) { echo $_POST['userfield']; } ?>" /> 
    197 Not:<input <?php if (  isset($_POST['userfield_neg'] ) && $_POST['userfield_neg'] == 'true' ) { echo 'checked="checked"'; } ?> type="checkbox" name="userfield_neg" value="true" /> 
    198 Begins With:<input <?php if (empty($_POST['userfield_mod']) || $_POST['userfield_mod'] == 'begins_with') { echo 'checked="checked"'; } ?> type="radio" name="userfield_mod" value="begins_with" /> 
    199 Contains:<input <?php if (isset($_POST['userfield_mod']) && $_POST['userfield_mod'] == 'contains') { echo 'checked="checked"'; } ?> type="radio" name="userfield_mod" value="contains" /> 
    200 Ends With:<input <?php if (isset($_POST['userfield_mod']) && $_POST['userfield_mod'] == 'ends_with') { echo 'checked="checked"'; } ?> type="radio" name="userfield_mod" value="ends_with" /> 
    201 Exactly:<input <?php if (isset($_POST['userfield_mod']) && $_POST['userfield_mod'] == 'exact') { echo 'checked="checked"'; } ?> type="radio" name="userfield_mod" value="exact" /> 
    202 </td> 
    203 </tr> 
    204 <tr> 
    205 <td><input <?php if (isset($_POST['order']) && $_POST['order'] == 'accountcode') { echo 'checked="checked"'; } ?> type="radio" name="order" value="accountcode" />&nbsp;<label for="userfield">Account Code:</label></td> 
     196<?php echo _("Not")?>:<input <?php if (  isset($_POST['userfield_neg'] ) && $_POST['userfield_neg'] == 'true' ) { echo 'checked="checked"'; } ?> type="checkbox" name="userfield_neg" value="true" /> 
     197<?php echo _("Begins With")?>:<input <?php if (empty($_POST['userfield_mod']) || $_POST['userfield_mod'] == 'begins_with') { echo 'checked="checked"'; } ?> type="radio" name="userfield_mod" value="begins_with" /> 
     198<?php echo _("Contains")?>:<input <?php if (isset($_POST['userfield_mod']) && $_POST['userfield_mod'] == 'contains') { echo 'checked="checked"'; } ?> type="radio" name="userfield_mod" value="contains" /> 
     199<?php echo _("Ends With")?>:<input <?php if (isset($_POST['userfield_mod']) && $_POST['userfield_mod'] == 'ends_with') { echo 'checked="checked"'; } ?> type="radio" name="userfield_mod" value="ends_with" /> 
     200<?php echo _("Exactly")?>:<input <?php if (isset($_POST['userfield_mod']) && $_POST['userfield_mod'] == 'exact') { echo 'checked="checked"'; } ?> type="radio" name="userfield_mod" value="exact" /> 
     201</td> 
     202</tr> 
     203<tr> 
     204<td><input <?php if (isset($_POST['order']) && $_POST['order'] == 'accountcode') { echo 'checked="checked"'; } ?> type="radio" name="order" value="accountcode" />&nbsp;<label for="userfield"><?php echo _("Account Code")?>:</label></td> 
    206205<td><input type="text" name="accountcode" id="accountcode" value="<?php if (isset($_POST['accountcode'])) { echo $_POST['accountcode']; } ?>" /> 
    207 Not:<input <?php if ( isset($_POST['accountcode_neg'] ) &&  $_POST['accountcode_neg'] == 'true' ) { echo 'checked="checked"'; } ?> type="checkbox" name="accountcode_neg" value="true" /> 
    208 Begins With:<input <?php if (empty($_POST['accountcode_mod']) || $_POST['accountcode_mod'] == 'begins_with') { echo 'checked="checked"'; } ?> type="radio" name="accountcode_mod" value="begins_with" /> 
    209 Contains:<input <?php if (isset($_POST['accountcode_mod']) && $_POST['accountcode_mod'] == 'contains') { echo 'checked="checked"'; } ?> type="radio" name="accountcode_mod" value="contains" /> 
    210 Ends With:<input <?php if (isset($_POST['accountcode_mod']) && $_POST['accountcode_mod'] == 'ends_with') { echo 'checked="checked"'; } ?> type="radio" name="accountcode_mod" value="ends_with" /> 
    211 Exactly:<input <?php if (isset($_POST['accountcode_mod']) && $_POST['accountcode_mod'] == 'exact') { echo 'checked="checked"'; } ?> type="radio" name="accountcode_mod" value="exact" /> 
    212 </td> 
    213 </tr> 
    214 <tr> 
    215 <td><input <?php if (isset($_POST['order']) && $_POST['order'] == 'duration') { echo 'checked="checked"'; } ?> type="radio" name="order" value="duration" />&nbsp;<label>Duration:</label></td> 
    216 <td>Between
     206<?php echo _("Not")?>:<input <?php if ( isset($_POST['accountcode_neg'] ) &&  $_POST['accountcode_neg'] == 'true' ) { echo 'checked="checked"'; } ?> type="checkbox" name="accountcode_neg" value="true" /> 
     207<?php echo _("Begins With")?>:<input <?php if (empty($_POST['accountcode_mod']) || $_POST['accountcode_mod'] == 'begins_with') { echo 'checked="checked"'; } ?> type="radio" name="accountcode_mod" value="begins_with" /> 
     208<?php echo _("Contains")?>:<input <?php if (isset($_POST['accountcode_mod']) && $_POST['accountcode_mod'] == 'contains') { echo 'checked="checked"'; } ?> type="radio" name="accountcode_mod" value="contains" /> 
     209<?php echo _("Ends With")?>:<input <?php if (isset($_POST['accountcode_mod']) && $_POST['accountcode_mod'] == 'ends_with') { echo 'checked="checked"'; } ?> type="radio" name="accountcode_mod" value="ends_with" /> 
     210<?php echo _("Exactly")?>:<input <?php if (isset($_POST['accountcode_mod']) && $_POST['accountcode_mod'] == 'exact') { echo 'checked="checked"'; } ?> type="radio" name="accountcode_mod" value="exact" /> 
     211</td> 
     212</tr> 
     213<tr> 
     214<td><input <?php if (isset($_POST['order']) && $_POST['order'] == 'duration') { echo 'checked="checked"'; } ?> type="radio" name="order" value="duration" />&nbsp;<label><?php echo _("Duration")?>:</label></td> 
     215<td><?php echo _("Between")?>
    217216<input type="text" name="dur_min" value="<?php if (isset($_POST['dur_min'])) { echo $_POST['dur_min']; } ?>" size="3" maxlength="5" /> 
    218 And
     217<?php echo _("And")?>
    219218<input type="text" name="dur_max" value="<?php if (isset($_POST['dur_max'])) { echo $_POST['dur_max']; } ?>" size="3" maxlength="5" /> 
    220 Seconds 
    221 </td> 
    222 </tr> 
    223 <tr> 
    224 <td><input <?php if (isset($_POST['order']) && $_POST['order'] == 'disposition') { echo 'checked="checked"'; } ?> type="radio" name="order" value="disposition" />&nbsp;<label for="disposition">Disposition:</label></td> 
     219<?php echo _("Seconds")?>: 
     220</td> 
     221</tr> 
     222<tr> 
     223<td><input <?php if (isset($_POST['order']) && $_POST['order'] == 'disposition') { echo 'checked="checked"'; } ?> type="radio" name="order" value="disposition" />&nbsp;<label for="disposition"><?php echo _("Disposition")?>:</label></td> 
    225224<td> 
    226 Not:<input <?php if ( isset($_POST['dispositio_neg'] ) && $_POST['disposition_neg'] == 'true' ) { echo 'checked="checked"'; } ?> type="checkbox" name="disposition_neg" value="true" /> 
     225<?php echo _("Not")?>:<input <?php if ( isset($_POST['dispositio_neg'] ) && $_POST['disposition_neg'] == 'true' ) { echo 'checked="checked"'; } ?> type="checkbox" name="disposition_neg" value="true" /> 
    227226<select name="disposition" id="disposition"> 
    228 <option <?php if (empty($_POST['disposition']) || $_POST['disposition'] == 'all') { echo 'selected="selected"'; } ?> value="all">All Dispositions</option> 
    229 <option <?php if (isset($_POST['disposition']) && $_POST['disposition'] == 'ANSWERED') { echo 'selected="selected"'; } ?> value="ANSWERED">Answered</option> 
    230 <option <?php if (isset($_POST['disposition']) && $_POST['disposition'] == 'BUSY') { echo 'selected="selected"'; } ?> value="BUSY">Busy</option> 
    231 <option <?php if (isset($_POST['disposition']) && $_POST['disposition'] == 'FAILED') { echo 'selected="selected"'; } ?> value="FAILED">Failed</option> 
    232 <option <?php if (isset($_POST['disposition']) && $_POST['disposition'] == 'NO ANSWER') { echo 'selected="selected"'; } ?> value="NO ANSWER">No Answer</option> 
     227<option <?php if (empty($_POST['disposition']) || $_POST['disposition'] == 'all') { echo 'selected="selected"'; } ?> value="all"><?php echo _("All Dispositions")?></option> 
     228<option <?php if (isset($_POST['disposition']) && $_POST['disposition'] == 'ANSWERED') { echo 'selected="selected"'; } ?> value="ANSWERED"><?php echo _("Answered")?></option> 
     229<option <?php if (isset($_POST['disposition']) && $_POST['disposition'] == 'BUSY') { echo 'selected="selected"'; } ?> value="BUSY"><?php echo _("Busy")?></option> 
     230<option <?php if (isset($_POST['disposition']) && $_POST['disposition'] == 'FAILED') { echo 'selected="selected"'; } ?> value="FAILED"><?php echo _("Failed")?></option> 
     231<option <?php if (isset($_POST['disposition']) && $_POST['disposition'] == 'NO ANSWER') { echo 'selected="selected"'; } ?> value="NO ANSWER"><?php echo _("No Answer")?></option> 
    233232</select> 
    234233</td> 
     
    237236<td> 
    238237<select name="sort" id="sort"> 
    239 <option <?php if (isset($_POST['sort']) && $_POST['sort'] == 'ASC') { echo 'selected="selected"'; } ?> value="ASC">Ascending</option> 
    240 <option <?php if (empty($_POST['sort']) || $_POST['sort'] == 'DESC') { echo 'selected="selected"'; } ?> value="DESC">Descending</option> 
     238<option <?php if (isset($_POST['sort']) && $_POST['sort'] == 'ASC') { echo 'selected="selected"'; } ?> value="ASC"><?php echo _("Ascending")?></option> 
     239<option <?php if (empty($_POST['sort']) || $_POST['sort'] == 'DESC') { echo 'selected="selected"'; } ?> value="DESC"><?php echo _("Descending")?></option> 
    241240</select> 
    242241</td> 
    243242<td><table width="100%"><tr><td> 
    244 <label for="group">Group By:</label> 
     243<label for="group"><?php echo _("Group By")?>:</label> 
    245244<select name="group" id="group"> 
    246245<optgroup label="Account Information"> 
    247 <option <?php if (isset($_POST['group']) && $_POST['group'] == 'accountcode') { echo 'selected="selected"'; } ?> value="accountcode">Account Code</option> 
    248 <option <?php if (isset($_POST['group']) && $_POST['group'] == 'userfield') { echo 'selected="selected"'; } ?> value="userfield">User Field</option> 
     246<option <?php if (isset($_POST['group']) && $_POST['group'] == 'accountcode') { echo 'selected="selected"'; } ?> value="accountcode"><?php echo _("Account Code")?></option> 
     247<option <?php if (isset($_POST['group']) && $_POST['group'] == 'userfield') { echo 'selected="selected"'; } ?> value="userfield"><?php echo _("User Field")?></option> 
    249248</optgroup> 
    250249<optgroup label="Date/Time"> 
    251 <option <?php if (isset($_POST['group']) && $_POST['group'] == 'minutes1') { echo 'selected="selected"'; } ?> value="minutes1">Minute</option> 
    252 <option <?php if (isset($_POST['group']) && $_POST['group'] == 'minutes10') { echo 'selected="selected"'; } ?> value="minutes10">10 Minutes</option> 
    253 <option <?php if (isset($_POST['group']) && $_POST['group'] == 'hour') { echo 'selected="selected"'; } ?> value="hour">Hour</option> 
    254 <option <?php if (isset($_POST['group']) && $_POST['group'] == 'hour_of_day') { echo 'selected="selected"'; } ?> value="hour_of_day">Hour of day</option> 
    255 <option <?php if (isset($_POST['group']) && $_POST['group'] == 'day_of_week') { echo 'selected="selected"'; } ?> value="day_of_week">Day of week</option> 
    256 <option <?php if (empty($_POST['group']) || $_POST['group'] == 'day') { echo 'selected="selected"'; } ?> value="day">Day</option> 
    257 <option <?php if (isset($_POST['group']) && $_POST['group'] == 'week') { echo 'selected="selected"'; } ?> value="week">Week ( Sun-Sat )</option> 
    258 <option <?php if (isset($_POST['group']) && $_POST['group'] == 'month') { echo 'selected="selected"'; } ?> value="month">Month</option> 
     250<option <?php if (isset($_POST['group']) && $_POST['group'] == 'minutes1') { echo 'selected="selected"'; } ?> value="minutes1"><?php echo _("Minute")?></option> 
     251<option <?php if (isset($_POST['group']) && $_POST['group'] == 'minutes10') { echo 'selected="selected"'; } ?> value="minutes10"><?php echo _("10 Minutes")?></option> 
     252<option <?php if (isset($_POST['group']) && $_POST['group'] == 'hour') { echo 'selected="selected"'; } ?> value="hour"><?php echo _("Hour")?></option> 
     253<option <?php if (isset($_POST['group']) && $_POST['group'] == 'hour_of_day') { echo 'selected="selected"'; } ?> value="hour_of_day"><?php echo _("Hour of day")?></option> 
     254<option <?php if (isset($_POST['group']) && $_POST['group'] == 'day_of_week') { echo 'selected="selected"'; } ?> value="day_of_week"><?php echo _("Day of week")?></option> 
     255<option <?php if (empty($_POST['group']) || $_POST['group'] == 'day') { echo 'selected="selected"'; } ?> value="day"><?php echo _("Day")?></option> 
     256<option <?php if (isset($_POST['group']) && $_POST['group'] == 'week') { echo 'selected="selected"'; } ?> value="week"><?php echo _("Week ( Sun-Sat )")?></option> 
     257<option <?php if (isset($_POST['group']) && $_POST['group'] == 'month') { echo 'selected="selected"'; } ?> value="month"><?php echo _("Month")?></option> 
    259258</optgroup> 
    260259<optgroup label="Telephone Number"> 
    261 <option <?php if (isset($_POST['group']) && $_POST['group'] == 'src') { echo 'selected="selected"'; } ?> value="src">Source Number</option> 
    262 <option <?php if (isset($_POST['group']) && $_POST['group'] == 'dst') { echo 'selected="selected"'; } ?> value="dst">Destination Number</option> 
     260<option <?php if (isset($_POST['group']) && $_POST['group'] == 'src') { echo 'selected="selected"'; } ?> value="src"><?php echo _("Source Number")?></option> 
     261<option <?php if (isset($_POST['group']) && $_POST['group'] == 'dst') { echo 'selected="selected"'; } ?> value="dst"><?php echo _("Destination Number")?></option> 
    263262</optgroup> 
    264263</select></td><td align="left" width="40%"> 
     
    421420    ?> 
    422421      <tr> 
    423       <th class="record_col">Call Date</th> 
    424       <th class="record_col">File</th> 
    425       <th class="record_col">System</th> 
    426       <th class="record_col">Src Channel</th> 
    427       <th class="record_col">Source</th> 
    428       <th class="record_col">Application</th> 
    429       <th class="record_col">Destination</th> 
    430       <th class="record_col">Dst Channel</th> 
    431       <th class="record_col">Disposition</th> 
    432       <th class="record_col">Duration</th> 
    433       <th class="record_col">Userfield</th> 
    434       <th class="record_col">Account</th> 
     422      <th class="record_col"><?php echo _("Call Date")?></th> 
     423      <th class="record_col"><?php echo _("File")?></th> 
     424      <th class="record_col"><?php echo _("System")?></th> 
     425      <th class="record_col"><?php echo _("Src Channel")?></th> 
     426      <th class="record_col"><?php echo _("Source")?></th> 
     427      <th class="record_col"><?php echo _("Application")?></th> 
     428      <th class="record_col"><?php echo _("Destination")?></th> 
     429      <th class="record_col"><?php echo _("Dst Channel")?></th> 
     430      <th class="record_col"><?php echo _("Disposition")?></th> 
     431      <th class="record_col"><?php echo _("Duration")?></th> 
     432      <th class="record_col"><?php echo _("Userfield")?></th> 
     433      <th class="record_col"><?php echo _("Account")?></th> 
    435434      <th class="img_col"><a href="#CDR" title="Go to the top of the CDR table"><img src="images/scrollup.gif" alt="CDR Table" /></a></th> 
    436435      <th class="img_col"><a href="#Graph" title="Go to the top of the CDR graph"><img src="images/scrolldown.gif" alt="CDR Graph" /></a></th> 
     
    679678<div id="footercdr"> 
    680679<p><small> 
    681         <a href="http://code.google.com/p/asterisk-cdr-viewer/" target="_blank">FreePBX CDR viewer, based Asterisk CDR Viewer</a> 
     680        <a href="http://code.google.com/p/asterisk-cdr-viewer/" target="_blank">FreePBX CDR viewer, based on Asterisk CDR Viewer</a> 
    682681    <!-- by Igor Okunev ( igor.okunev [at] gmail.com ) --> 
    683682</small></p>