|
From: Florin C B. <ory...@us...> - 2011-03-29 02:39:31
|
Update of /cvsroot/mxbb/mx_counter
In directory vz-cvs-4.sog:/tmp/cvs-serv15390
Modified Files:
mx_counter.php
Log Message:
counter module
Index: mx_counter.php
===================================================================
RCS file: /cvsroot/mxbb/mx_counter/mx_counter.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** mx_counter.php 29 Mar 2011 01:53:45 -0000 1.5
--- mx_counter.php 29 Mar 2011 02:39:29 -0000 1.6
***************
*** 60,64 ****
//read old counter data
! $imagedirectory = PORTAL_URL . 'modules/mx_counter/numbers/' . $digitpath . '/';
$sql2 = "SELECT *
--- 60,64 ----
//read old counter data
! $imagedirectory = IMAGEDIRECTORY . $digitpath . '/';
$sql2 = "SELECT *
***************
*** 89,128 ****
}
- $numdigits = strlen($newcount);
-
- //set each digit to default 0
- for ($a=0;$a<$digits;$a++)
- {
- $img[$a] = "$imagedirectory";
- $img[$a] .= "0.gif";
- }
-
- //change each digit
- $actdigits = strlen($newcount);
- for ($a=0;$a<$actdigits;$a++)
- {
- $showdig = substr($newcount, $a, 1);
- $img[$digits - $actdigits + $a] = "$imagedirectory";
- $img[$digits - $actdigits + $a] .= "$showdig.gif";
- }
-
- //check if we have an overflow
- if($numdigits > $digits)
- {
- $bOver=true;
- for ($a=0;$a<$digits;$a++)
- {
- $img[$a] = "$imagedirectory";
- $img[$a] .= "9.gif";
- }
- }
-
- //this is what we are ouputing
- $displayblock = "";
- for ($a=0;$a<$digits;$a++)
- {
- $displayblock .= "<img src=$img[$a]>";
- }
-
//if we incremented, write this value
if($bInc)
--- 89,92 ----
***************
*** 130,144 ****
update_count($newcount);
}
- /*
- else
- {
- $newcount = '3600';
- update_count($newcount);
- }
- */
-
- //$counter_data is the variable that holds the stuff to output
- $counter_data .= $displayblock;
- if($bOver == true) $counter_data .= '+';
//
--- 94,97 ----
***************
*** 150,156 ****
$template->assign_vars(array(
! 'BLOCK_SIZE' => ( !empty($block_size) ? $block_size : '100%' ),
! 'L_TITLE' => ( !empty($lang[$title]) ? $lang[$title] : $title ),
! 'L_PORTAL_COUNTER' => ( !empty($lang['portal_counter']) ? $lang['portal_counter'] : '' ),
'COUNTER_DATA' => counter_data($newcount),
'U_URL' => mx_append_sid(PORTAL_URL . 'index.' . $phpEx . '?block_id=' . $block_id),
--- 103,109 ----
$template->assign_vars(array(
! 'BLOCK_SIZE' => (!empty($block_size) ? $block_size : '100%'),
! 'L_TITLE' => (!empty($lang[$title]) ? $lang[$title] : $title),
! 'L_PORTAL_COUNTER' => (!empty($lang['portal_counter']) ? $lang['portal_counter'] : ''),
'COUNTER_DATA' => counter_data($newcount),
'U_URL' => mx_append_sid(PORTAL_URL . 'index.' . $phpEx . '?block_id=' . $block_id),
|