Subversion Repositories wimsdev

Rev

Rev 16435 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1.  
  2. !set week_min=3
  3. !set month_min=20
  4. !set year_min=200
  5. !set title_2=$name_Requests
  6. !set title_3=$name_Sessions
  7. !set title_4=$name_Visitors
  8. !read adm/date.phtml date,$year1,$month1,$day1
  9. !set date1=$c_date_out
  10. !read adm/date.phtml date,$year2,$month2,$day2
  11. !set date2=$c_date_out
  12. $name_number_visits $name_from $date1 $name_to $date2
  13. ($name_sum).
  14. !set wims_print_precision=4
  15. $table_header
  16.   $table_hdtr<th>$name_cnt</th><th>$name_total</th><th>$name_avgday</th>
  17.     !if $laps>$week_min
  18.       <th>$name_avgweek</th>
  19.       !if $laps>$month_min
  20.         <th>$name_avgmonth</th>
  21.         !if $laps>$year_min
  22.           <th>$name_avgyear</th>
  23.         !endif
  24.       !endif
  25.     !endif
  26.     <th>$name_avgsite</th>
  27.   </tr>
  28.   $table_tr<th style="background-color:$table_bgcolor;">$name_Requests</th>
  29.     <td>
  30.       !htmlmath $[$total_click]
  31.     </td><td>
  32.       !htmlmath $[rint($total_click/$laps)]
  33.     </td>
  34.     !if $laps>$week_min
  35.       <td>
  36.         !htmlmath $[rint($total_click*7/$laps)]
  37.       </td>
  38.       !if $laps>$month_min
  39.         <td>
  40.           !htmlmath $[rint($total_click*30.4/$laps)]
  41.         </td>
  42.         !if $laps>$year_min
  43.           <td>
  44.             !htmlmath $[rint($total_click*365.25/$laps)]
  45.           </td>
  46.         !endif
  47.       !endif
  48.     !endif
  49.     <td>
  50.       !htmlmath $[$total_click/$total_site]
  51.     </td>
  52.   </tr>
  53.   $table_tr<th style="background-color:$table_bgcolor;">$name_Sessions</th>
  54.     <td>
  55.       !htmlmath $[$total_session]
  56.     </td><td>
  57.       !htmlmath $[rint($total_session/$laps)]
  58.     </td>
  59.     !if $laps>$week_min
  60.       <td>
  61.         !htmlmath $[rint($total_session*7/$laps)]
  62.       </td>
  63.       !if $laps>$month_min
  64.         <td>
  65.           !htmlmath $[rint($total_session*30.4/$laps)]
  66.         </td>
  67.         !if $laps>$year_min
  68.           <td>
  69.             !htmlmath $[rint($total_session*365.25/$laps)]
  70.           </td>
  71.         !endif
  72.       !endif
  73.     !endif
  74.     <td>
  75.       !htmlmath $[$total_session/$total_site]
  76.     </td>
  77.   </tr>
  78.   $table_tr<th style="background-color:$table_bgcolor;">sites</th>
  79.     <td>
  80.       !htmlmath $[$total_site]
  81.     </td><td>
  82.       !htmlmath $[rint($total_site/$laps)]
  83.     </td>
  84.     !if $laps>$week_min
  85.       <td>
  86.         !htmlmath $[rint($total_site*7/$laps)]
  87.       </td>
  88.       !if $laps>$month_min
  89.         <td>
  90.           !htmlmath $[rint($total_site*30.4/$laps)]
  91.         </td>
  92.         !if $laps>$year_min
  93.           <td>
  94.             !htmlmath $[rint($total_site*365.25/$laps)]
  95.           </td>
  96.         !endif
  97.       !endif
  98.     !endif
  99.     <td>1</td>
  100.   </tr>
  101. $table_end
  102.  
  103. $wims_name_Explanations. $name_explanations
  104.  
  105. !if $laps >= 3
  106.   <p class="wimscenter">
  107.     <span class="wims_warning">$(title_$plot_type) $name_byday</span> <br>
  108.     !insplot "insplot_data" using 1:2 smooth csplines notitle with lines
  109.   </p>
  110. !endif
  111.  
  112. !if $modules=yes and $modulecnt>0
  113.   !set langcnt=!wordcnt $wims_site_languages
  114.   !distribute item 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 into tot,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16
  115.   !set table_id=TABLE_statsmodules
  116.   !set table_class=sortable
  117.   $table_header
  118.     <caption>$wims_name_statdetail
  119.     ($name_from $day1/$month1/$year1 $name_to $day2/$month2/$year2)</caption>
  120.     <thead>
  121.     $table_hdtr<th>$wims_name_name</th>
  122.       <th>
  123.         !item $module_type of $name_prompt
  124.       </th>
  125.       !if $module_type!=2
  126.         !for i=1 to $langcnt
  127.           !set l=!word $i of $wims_site_languages
  128.           <th><img src="gifs/$l.gif" alt="$(Lang_name_$l)"></th>
  129.         !next i
  130.         <th>$name_installed</th>
  131.         <th>$name_avghebdo</th>
  132.       !endif
  133.     </tr>
  134.     </thead>
  135.     <tbody>
  136.       !for i=1 to $modulecnt
  137.         !set l=!line $i+1 of $stat_out
  138.         !set c=!word 1 of $l
  139.         !ifval $c=0
  140.           !goto contdeux
  141.         !endif
  142.         !set t=$[$t+$c]
  143.         $table_tr
  144.         <td>
  145.           !set n=!word 3 of $l
  146.           !set n=!char -40 to -1 of $n
  147.           !set n=!translate @ to / in $n
  148.           !href module=$n $n
  149.         </td>
  150.         <td class="nowrap">
  151.           !if $module_type=2
  152.             $[$c/100]
  153.             </td>
  154.             !goto cont
  155.           !endif
  156.           !htmlmath $[$c]
  157.         </td>
  158.         !for j=1 to $langcnt
  159.           <td class="nowrap">
  160.             !set tt=!word $j+3 of $l
  161.             !set t$j=$[$(t$j)+$tt]
  162.             !htmlmath $[$tt]
  163.           </td>
  164.         !next j
  165.         <td>
  166.           !set d=!word 2 of $l
  167.           !set dy=!char 1,2,3,4 of $d
  168.           !set dm=!char 5,6 of $d
  169.           !set dd=!char 7,8 of $d
  170.           !read adm/date.phtml date,$dy,$dm,$dd
  171.           $c_date_out
  172.           !if $d<=$date1
  173.             !set lps=$laps
  174.           !else
  175.             !set d_d=!date -d $d '+%j'
  176.             !set lps=!eval ($year2-$dy)*365+$date_2-$d_d+1
  177.             !ifval floor($dy/4)<floor($year2/4) and floor($dy/100)=floor($year2/100)
  178.               !set lps=!eval $lps+1
  179.             !endif
  180.           !endif
  181.         </td><td>$[rint($c*7/$lps)]</td>
  182.         :cont
  183.         </tr>
  184.       :contdeux
  185.       !next i
  186.     </tbody>
  187.     <tfoot>
  188.       !if $module_type!=2
  189.         $table_tr<th>$name_subtotal</th>
  190.           <td class="nowrap">
  191.             !htmlmath $t
  192.           </td>
  193.           !for i=1 to $langcnt
  194.             <td class="nowrap">
  195.               !htmlmath $(t$i)
  196.             </td>
  197.           !next i
  198.           <td>-</td><td>-</td>
  199.         </tr>
  200.       !endif
  201.     </tfoot>
  202.   $table_end
  203.   !read tablesort.phtml
  204. !else
  205.   !set wims_menu_items=!append line statdetail,1,cmd=reply&modules=yes\
  206.  to $wims_menu_items
  207. !endif modules=yes
  208.