Changeset 45233

Show
Ignore:
Timestamp:
05/11/08 11:41:44 (2 months ago)
Author:
ZenDreams
Message:

New version with new features

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • zdstats/tags/1.1/lang/zd_stats-fr_FR.po

    r45175 r45233  
    44"Report-Msgid-Bugs-To: \n" 
    55"POT-Creation-Date: 2008-05-02 14:06+0200\n" 
    6 "PO-Revision-Date: 2008-05-10 15:21+0100\n" 
     6"PO-Revision-Date: 2008-05-11 13:34+0100\n" 
    77"Last-Translator: Anthony PETITBOIS <anthony@zen-dreams.com>\n" 
    88"Language-Team: \n" 
     
    205205msgstr "Détails non trouvés, nous sommes désolé de ce contre-temps" 
    206206 
     207msgid "Delete marked entries" 
     208msgstr "Supprime les entrées cochées" 
     209 
     210msgid "Mark" 
     211msgstr "Cocher" 
     212 
     213msgid "Delete all pageviews for this IP" 
     214msgstr "Supprime toutes les visites de cette IP" 
     215 
     216msgid "*: Note this is an irreversible operation" 
     217msgstr "*: Veuillez noter que cette opération est irréversible" 
     218 
  • zdstats/tags/1.1/lang/zdstats.pot

    r45175 r45233  
    262262msgid "Details not found, sorry for the inconvenience" 
    263263msgstr "" 
     264 
     265#: 
     266msgid "Delete marked entries" 
     267msgstr "" 
     268 
     269#: 
     270msgid "Mark" 
     271msgstr "" 
     272 
     273#: 
     274msgid "Delete all pageviews for this IP" 
     275msgstr "" 
     276 
     277#: 
     278msgid "*: Note this is an irreversible operation" 
     279msgstr "" 
  • zdstats/tags/1.1/readme.txt

    r45220 r45233  
    55Requires at least: 2.5.0 
    66Tested up to: 2.5.1 
    7 Stable tag: 1.0 
     7Stable tag: 1.1 
    88 
    99ZdStats is a flexible statistics plugin for wordpress 
  • zdstats/tags/1.1/zd_stats.php

    r45174 r45233  
    184184      global $wpdb; 
    185185      $table_name = $wpdb->prefix.'zd_stats_entry'; 
     186 
     187      if ($_POST) { 
     188            $EntryList=$_POST['mark']; 
     189            if ($EntryList) { 
     190                  foreach ($EntryList as $ID => $EntryID) { 
     191                        $Entries.=$EntryID.', '; 
     192                  } 
     193                  $Entries=substr($Entries, 0, -2); 
     194                  $query="DELETE FROM $table_name where EntryID in ($Entries)"; 
     195                  $wpdb->query($query); 
     196            } 
     197            $_GET['hour']=$_POST['hour']; 
     198            $_GET['nb_days']=$_POST['nb_days']; 
     199            $_GET['start_date']=$_POST['start_date']; 
     200            $_GET['view_all']=$_POST['view_all']; 
     201      }      
     202 
    186203      $Nb_Days=$_GET['nb_days']; 
    187204      $Start_Date=($_GET['start_date']) ? $_GET['start_date'] : 0; 
     
    200217            $row=$wpdb->get_results($query, ARRAY_A); 
    201218            if ($row) { 
     219                  echo '<form action="'.$_SERVER['PHP_SELF'].'?page='.plugin_basename (__FILE__).'" method="post">'; 
     220                  echo '<input type="hidden" name="ftc" value="pageviews" />'; 
     221                  echo '<input type="hidden" name="hour" value="'.$_GET['hour'].'" />'; 
     222                  echo '<input type="hidden" name="nb_days" value="'.$_GET['nb_days'].'" />'; 
     223                  echo '<input type="hidden" name="start_date" value="'.$_GET['start_date'].'" />'; 
     224                  echo '<input type="hidden" name="view_all" value="'.$_GET['view_all'].'" />'; 
    202225                  echo '<table class="widefat">'; 
    203                   echo '<tr><td colspan="4"><h2>'.sprintf(__('Pageviews for %s at %s','zd_stats'),date_i18n(get_option('date_format'),strtotime($LastWeek)), $Hour."h").'</h2></td></tr>'; 
     226                  echo '<tr><td colspan="3"><h2>'.sprintf(__('Pageviews for %s at %s','zd_stats'),date_i18n(get_option('date_format'),strtotime($LastWeek)), $Hour."h").'</h2></td>'; 
     227                  echo '<td colspan="2"><input type="submit" value="'.__('Delete marked entries','zd_stats').' *" /></td>'; 
     228                  echo '</tr>'; 
    204229                  echo '<tr>'; 
    205230                        echo '<td >'.__('Date & Time','zd_stats').'</td>'; 
     
    207232                        echo '<td >'.__('IP Adress','zd_stats').'</td>'; 
    208233                        echo '<td >'.__('Referer','zd_stats').'</td>'; 
     234                        echo '<td >'.__('Mark','zd_stats').'</td>'; 
    209235                  echo '</tr>'; 
    210236                  foreach ($row as $Index => $Values) { 
     
    216242                              echo '<td style="padding: 0px;"><a href="'.$Values['Referer'].'" title="'.$Values['Referer'].'">'.zd_stats_ExtractSiteName($Values['Referer']).'</a></td>'; 
    217243                        else echo '<td style="padding: 0px;"> - </td>'; 
     244                        echo '<td style="padding: 0px; text-align: right;"><input type="checkbox" name="mark[]" value="'.$Values['EntryID'].'" /></td>'; 
    218245                        echo '</tr>'; 
    219246                  } 
    220247                  echo '</table>'; 
     248                  echo '<br /><em>'.__('*: Note this is an irreversible operation','zd_stats').'</em>'; 
     249                  echo '</form>'; 
    221250            } 
    222251      } else if ($_GET['detail']) { 
     
    967996      global $wpdb; 
    968997      $table_name = $wpdb->prefix.'zd_stats_entry'; 
     998       
     999       
     1000      if ($_POST['option']=="delete") { 
     1001            $IP=base64_decode($_POST['IP']); 
     1002            $_GET['NbDays']=$_POST['NbDays']; 
     1003            $_GET['start_date']=$_POST['start_date']; 
     1004            $_GET['view_all']=$_POST['view_all']; 
     1005            $_GET['IP']=$_POST['IP']; 
     1006            $query="DELETE FROM $table_name where IP='$IP';"; 
     1007            $wpdb->query($query); 
     1008      } 
     1009       
     1010       
    9691011      $BaseURL=$_SERVER['PHP_SELF'].'?page='.plugin_basename (__FILE__); 
    9701012      $NbDays=$_GET['NbDays']; 
     
    9811023            $query="SELECT * FROM $table_name WHERE IP='$IPAdress' AND `DateTime`<'$Today' AND `DateTime`>'$LastWeek' order by DateTime"; 
    9821024            $result=$wpdb->get_results($query, ARRAY_A); 
     1025            echo '<form action="'.$_SERVER['PHP_SELF'].'?page='.plugin_basename (__FILE__).'" method="post" style="text-align: right;">'; 
     1026            echo '<input type="hidden" name="fct" value="navsum" />'; 
     1027            echo '<input type="hidden" name="option" value="delete" />'; 
     1028            echo '<input type="hidden" name="IP" value="'.$_GET['IP'].'" />'; 
     1029            echo '<input type="hidden" name="NbDays" value="'.$_GET['NbDays'].'" />'; 
     1030            echo '<input type="hidden" name="start_date" value="'.$_GET['start_date'].'" />'; 
     1031            echo '<input type="hidden" name="view_all" value="'.$_GET['view_all'].'" />'; 
     1032            echo '<input type="submit" value="'.__('Delete all pageviews for this IP','zd_stats').' *" />'; 
     1033            echo '<br /><em>'.__('*: Note this is an irreversible operation','zd_stats').'</em>'; 
     1034            echo '</form>'; 
    9831035      } 
    9841036       
     
    10131065            geoip_close($gi);        
    10141066 
    1015             echo '<tr><td style="width: 25%; background: #E4F2FD;">'.__('Geolocalization','zd_stats').'</td><td><img src="../'.PLUGINDIR . '/' . dirname(plugin_basename (__FILE__)) .'/flags/'.strtolower($CodePays).'.png">&nbsp;'.$Pays.', '.$CityName.'</td></tr>'; 
     1067            echo '<tr><td style="width: 25%; background: #E4F2FD;">'.__('Geolocalization','zd_stats').'</td><td><img src="../'.PLUGINDIR . '/' . dirname(plugin_basename (__FILE__)) .'/flags/'.strtolower($CodePays).'.png">&nbsp;<a href="http://maps.google.com/maps?f=q&amp;q='.$Pays.', '.$CityName.'"/>'.$Pays.', '.$CityName.'</a></td></tr>';             
    10161068            echo '</table>'; 
    10171069            echo '<table class="widefat">'; 
  • zdstats/trunk/lang/zd_stats-fr_FR.po

    r45175 r45233  
    44"Report-Msgid-Bugs-To: \n" 
    55"POT-Creation-Date: 2008-05-02 14:06+0200\n" 
    6 "PO-Revision-Date: 2008-05-10 15:21+0100\n" 
     6"PO-Revision-Date: 2008-05-11 13:34+0100\n" 
    77"Last-Translator: Anthony PETITBOIS <anthony@zen-dreams.com>\n" 
    88"Language-Team: \n" 
     
    205205msgstr "Détails non trouvés, nous sommes désolé de ce contre-temps" 
    206206 
     207msgid "Delete marked entries" 
     208msgstr "Supprime les entrées cochées" 
     209 
     210msgid "Mark" 
     211msgstr "Cocher" 
     212 
     213msgid "Delete all pageviews for this IP" 
     214msgstr "Supprime toutes les visites de cette IP" 
     215 
     216msgid "*: Note this is an irreversible operation" 
     217msgstr "*: Veuillez noter que cette opération est irréversible" 
     218 
  • zdstats/trunk/lang/zdstats.pot

    r45175 r45233  
    262262msgid "Details not found, sorry for the inconvenience" 
    263263msgstr "" 
     264 
     265#: 
     266msgid "Delete marked entries" 
     267msgstr "" 
     268 
     269#: 
     270msgid "Mark" 
     271msgstr "" 
     272 
     273#: 
     274msgid "Delete all pageviews for this IP" 
     275msgstr "" 
     276 
     277#: 
     278msgid "*: Note this is an irreversible operation" 
     279msgstr "" 
  • zdstats/trunk/readme.txt

    r45220 r45233  
    55Requires at least: 2.5.0 
    66Tested up to: 2.5.1 
    7 Stable tag: 1.0 
     7Stable tag: 1.1 
    88 
    99ZdStats is a flexible statistics plugin for wordpress 
  • zdstats/trunk/zd_stats.php

    r45174 r45233  
    184184      global $wpdb; 
    185185      $table_name = $wpdb->prefix.'zd_stats_entry'; 
     186 
     187      if ($_POST) { 
     188            $EntryList=$_POST['mark']; 
     189            if ($EntryList) { 
     190                  foreach ($EntryList as $ID => $EntryID) { 
     191                        $Entries.=$EntryID.', '; 
     192                  } 
     193                  $Entries=substr($Entries, 0, -2); 
     194                  $query="DELETE FROM $table_name where EntryID in ($Entries)"; 
     195                  $wpdb->query($query); 
     196            } 
     197            $_GET['hour']=$_POST['hour']; 
     198            $_GET['nb_days']=$_POST['nb_days']; 
     199            $_GET['start_date']=$_POST['start_date']; 
     200            $_GET['view_all']=$_POST['view_all']; 
     201      }      
     202 
    186203      $Nb_Days=$_GET['nb_days']; 
    187204      $Start_Date=($_GET['start_date']) ? $_GET['start_date'] : 0; 
     
    200217            $row=$wpdb->get_results($query, ARRAY_A); 
    201218            if ($row) { 
     219                  echo '<form action="'.$_SERVER['PHP_SELF'].'?page='.plugin_basename (__FILE__).'" method="post">'; 
     220                  echo '<input type="hidden" name="ftc" value="pageviews" />'; 
     221                  echo '<input type="hidden" name="hour" value="'.$_GET['hour'].'" />'; 
     222                  echo '<input type="hidden" name="nb_days" value="'.$_GET['nb_days'].'" />'; 
     223                  echo '<input type="hidden" name="start_date" value="'.$_GET['start_date'].'" />'; 
     224                  echo '<input type="hidden" name="view_all" value="'.$_GET['view_all'].'" />'; 
    202225                  echo '<table class="widefat">'; 
    203                   echo '<tr><td colspan="4"><h2>'.sprintf(__('Pageviews for %s at %s','zd_stats'),date_i18n(get_option('date_format'),strtotime($LastWeek)), $Hour."h").'</h2></td></tr>'; 
     226                  echo '<tr><td colspan="3"><h2>'.sprintf(__('Pageviews for %s at %s','zd_stats'),date_i18n(get_option('date_format'),strtotime($LastWeek)), $Hour."h").'</h2></td>'; 
     227                  echo '<td colspan="2"><input type="submit" value="'.__('Delete marked entries','zd_stats').' *" /></td>'; 
     228                  echo '</tr>'; 
    204229                  echo '<tr>'; 
    205230                        echo '<td >'.__('Date & Time','zd_stats').'</td>'; 
     
    207232                        echo '<td >'.__('IP Adress','zd_stats').'</td>'; 
    208233                        echo '<td >'.__('Referer','zd_stats').'</td>'; 
     234                        echo '<td >'.__('Mark','zd_stats').'</td>'; 
    209235                  echo '</tr>'; 
    210236                  foreach ($row as $Index => $Values) { 
     
    216242                              echo '<td style="padding: 0px;"><a href="'.$Values['Referer'].'" title="'.$Values['Referer'].'">'.zd_stats_ExtractSiteName($Values['Referer']).'</a></td>'; 
    217243                        else echo '<td style="padding: 0px;"> - </td>'; 
     244                        echo '<td style="padding: 0px; text-align: right;"><input type="checkbox" name="mark[]" value="'.$Values['EntryID'].'" /></td>'; 
    218245                        echo '</tr>'; 
    219246                  } 
    220247                  echo '</table>'; 
     248                  echo '<br /><em>'.__('*: Note this is an irreversible operation','zd_stats').'</em>'; 
     249                  echo '</form>'; 
    221250            } 
    222251      } else if ($_GET['detail']) { 
     
    967996      global $wpdb; 
    968997      $table_name = $wpdb->prefix.'zd_stats_entry'; 
     998       
     999       
     1000      if ($_POST['option']=="delete") { 
     1001            $IP=base64_decode($_POST['IP']); 
     1002            $_GET['NbDays']=$_POST['NbDays']; 
     1003            $_GET['start_date']=$_POST['start_date']; 
     1004            $_GET['view_all']=$_POST['view_all']; 
     1005            $_GET['IP']=$_POST['IP']; 
     1006            $query="DELETE FROM $table_name where IP='$IP';"; 
     1007            $wpdb->query($query); 
     1008      } 
     1009       
     1010       
    9691011      $BaseURL=$_SERVER['PHP_SELF'].'?page='.plugin_basename (__FILE__); 
    9701012      $NbDays=$_GET['NbDays']; 
     
    9811023            $query="SELECT * FROM $table_name WHERE IP='$IPAdress' AND `DateTime`<'$Today' AND `DateTime`>'$LastWeek' order by DateTime"; 
    9821024            $result=$wpdb->get_results($query, ARRAY_A); 
     1025            echo '<form action="'.$_SERVER['PHP_SELF'].'?page='.plugin_basename (__FILE__).'" method="post" style="text-align: right;">'; 
     1026            echo '<input type="hidden" name="fct" value="navsum" />'; 
     1027            echo '<input type="hidden" name="option" value="delete" />'; 
     1028            echo '<input type="hidden" name="IP" value="'.$_GET['IP'].'" />'; 
     1029            echo '<input type="hidden" name="NbDays" value="'.$_GET['NbDays'].'" />'; 
     1030            echo '<input type="hidden" name="start_date" value="'.$_GET['start_date'].'" />'; 
     1031            echo '<input type="hidden" name="view_all" value="'.$_GET['view_all'].'" />'; 
     1032            echo '<input type="submit" value="'.__('Delete all pageviews for this IP','zd_stats').' *" />'; 
     1033            echo '<br /><em>'.__('*: Note this is an irreversible operation','zd_stats').'</em>'; 
     1034            echo '</form>'; 
    9831035      } 
    9841036       
     
    10131065            geoip_close($gi);        
    10141066 
    1015             echo '<tr><td style="width: 25%; background: #E4F2FD;">'.__('Geolocalization','zd_stats').'</td><td><img src="../'.PLUGINDIR . '/' . dirname(plugin_basename (__FILE__)) .'/flags/'.strtolower($CodePays).'.png">&nbsp;'.$Pays.', '.$CityName.'</td></tr>'; 
     1067            echo '<tr><td style="width: 25%; background: #E4F2FD;">'.__('Geolocalization','zd_stats').'</td><td><img src="../'.PLUGINDIR . '/' . dirname(plugin_basename (__FILE__)) .'/flags/'.strtolower($CodePays).'.png">&nbsp;<a href="http://maps.google.com/maps?f=q&amp;q='.$Pays.', '.$CityName.'"/>'.$Pays.', '.$CityName.'</a></td></tr>';             
    10161068            echo '</table>'; 
    10171069            echo '<table class="widefat">';