Merge branch 'master' of git@github.com:tony-landis/agilebill

This commit is contained in:
neen
2009-04-02 23:37:14 -07:00
104 changed files with 1073 additions and 644 deletions

View File

@@ -163,7 +163,7 @@ class CORE_RSA
}
function rsa_decrypt($c, $d, $n) {
$decryptarray = split(" ", $c);
$decryptarray = explode(" ", $c);
for ($u=0; $u<count ($decryptarray); $u++) {
if ($decryptarray[$u] == "") {
array_splice($decryptarray, $u, 1);
@@ -183,7 +183,7 @@ class CORE_RSA
function CORE_encrypt($data) {
if(LICENSE_KEY == '') return false;
if(LICENSE_KEY == '') return $data; // provide a license key in the setup area to enable encryption
$rsa = new CORE_RSA;
$keys = explode('-', LICENSE_KEY);
$rsa_data = $rsa->rsa_encrypt($data, $keys[1], $keys[0]);
@@ -194,7 +194,7 @@ function CORE_encrypt($data) {
function CORE_decrypt($data) {
if(LICENSE_KEY == '') return false;
if(LICENSE_KEY == '') return $data; // provide a license key in the setup area to enable encryption
$rc4_key = do_rc4(LICENSE_KEY, 'en', false);
$rc4_data = do_rc4($data, 'de', $rc4_key);
$rsa = new CORE_RSA;

View File

@@ -87,7 +87,7 @@ class CORE_database
* @return array
*/
function ignore_fields($ignore_fields,$construct_fields) {
if(!is_array($construct_fields)) $fields = split(",", $construct_fields); else $fields = $construct_fields;
if(!is_array($construct_fields)) $fields = explode(",", $construct_fields); else $fields = $construct_fields;
foreach($fields as $id=>$fld) {
if(in_array($fld,$ignore_fields)) {
unset($fields[$id]);

View File

@@ -30,11 +30,11 @@ function CORE_database_mass_delete($VAR, &$construct, $type)
if(isset($VAR["delete_id"]))
{
$id = split(',',$VAR["delete_id"]);
$id = explode(',',$VAR["delete_id"]);
}
elseif (isset($VAR["id"]))
{
$id = split(',',$VAR["id"]);
$id = explode(',',$VAR["id"]);
}
for($i=0; $i<count($id); $i++)

View File

@@ -401,11 +401,11 @@ function search_excel($VAR, $construct, $type)
$pdf->AddPage();
# Determine the number of columns and width for each one...
$SetWidths = split(",",$width_list);
$SetWidths = explode(",",$width_list);
$pdf->SetWidths($SetWidths);
# Define the table heading
$TableHeading = split(",",$heading_list);
$TableHeading = explode(",",$heading_list);
# Define the Properties for the table heading cells:
# set the font:
@@ -573,7 +573,7 @@ function search_excel($VAR, $construct, $type)
}
$i++;
}
$ThisRow = split("::",$CurrRow);
$ThisRow = explode("::",$CurrRow);
# set the colors & fonts
if($BackAlt)

View File

@@ -342,7 +342,7 @@ class CORE_list
$auth = Array('product:top', 'account_admin:top', 'affiliate:top', 'invoice:compare');
for($i=0; $i<count($auth); $i++) {
if($auth[$i] == $VAR['graph']) {
$m = split(':', $VAR['graph']);
$m = explode(':', $VAR['graph']);
$C_method->exe_noauth($m[0], $m[1]);
exit;
}

View File

@@ -254,14 +254,14 @@ class CORE_search
$ii=0;
if(ereg(" AND ", $sql))
{
$sql = split(" AND ",$sql);
$sql = explode(" AND ",$sql);
$this_fields = count($sql);
# loop
for($count=0; $count < $this_fields; $count++)
{
# do each field
$sqls = split("==",$sql[$count]);
$sqls = explode("==",$sql[$count]);
$field[$count][name] = $sqls[0];
$field[$count][value] = ereg_replace("'","",$sqls[1]);
$field[$count][value] = ereg_replace("=","",$field[$count][value]);
@@ -293,7 +293,7 @@ class CORE_search
$this_fields = 1;
# do this one field
$sqls = split("==",$sql);
$sqls = explode("==",$sql);
$field[name] = $sqls[0];
$field[value] = ereg_replace("'","",$sqls[1]);
$field[value] = ereg_replace("=","",$field[value]);
@@ -492,14 +492,14 @@ class CORE_search
$ii=0;
if(ereg(" AND ", $sql))
{
$sql = split(" AND ",$sql);
$sql = explode(" AND ",$sql);
$this_fields = count($sql);
# loop
for($count=0; $count < $this_fields; $count++)
{
# do each field
$sqls = split("==",$sql[$count]);
$sqls = explode("==",$sql[$count]);
$field[$count][name] = $sqls[0];
$field[$count][value] = ereg_replace("'","",$sqls[1]);
$field[$count][value] = ereg_replace("=","",$field[$count][value]);
@@ -530,7 +530,7 @@ class CORE_search
$this_fields = 1;
# do this one field
$sqls = split("==",$sql);
$sqls = explode("==",$sql);
$field[name] = $sqls[0];
$field[value] = ereg_replace("'","",$sqls[1]);
$field[value] = ereg_replace("=","",$field[value]);

View File

@@ -79,8 +79,8 @@ class CORE_validate
if($date == '0' || $date == '')
return '';
$Arr_format = split(DEFAULT_DATE_DIVIDER, UNIX_DATE_FORMAT);
$Arr_date = split(DEFAULT_DATE_DIVIDER, $date);
$Arr_format = explode(DEFAULT_DATE_DIVIDER, UNIX_DATE_FORMAT);
$Arr_date = explode(DEFAULT_DATE_DIVIDER, $date);
for($i=0; $i<3; $i++)
{
@@ -104,8 +104,8 @@ class CORE_validate
if($date == '0' || $date == '')
return '';
$Arr_format = split(DEFAULT_DATE_DIVIDER, UNIX_DATE_FORMAT);
$Arr_date = split(DEFAULT_DATE_DIVIDER, $date);
$Arr_format = explode(DEFAULT_DATE_DIVIDER, UNIX_DATE_FORMAT);
$Arr_date = explode(DEFAULT_DATE_DIVIDER, $date);
for($i=0; $i<3; $i++) {
if($Arr_format[$i] == 'd') if(!empty($Arr_date[$i])) $day = $Arr_date[$i];
@@ -357,8 +357,8 @@ class CORE_validate
return false;
}
$Arr_format = split(DEFAULT_DATE_DIVIDER, UNIX_DATE_FORMAT);
$Arr_date = split(DEFAULT_DATE_DIVIDER, $data);
$Arr_format = explode(DEFAULT_DATE_DIVIDER, UNIX_DATE_FORMAT);
$Arr_date = explode(DEFAULT_DATE_DIVIDER, $data);
if(!gettype($Arr_date) == 'array' || count($Arr_date) != 3)
{
@@ -589,7 +589,7 @@ class CORE_validate
}
else if ($card_type == "mc" || !$card_type) {
// MC
if ( ereg("^5[1-5][0-9]{14}$", $ccNum) ) {
if ( preg_match("/^5[1-5][0-9]{14}$/", $ccNum) ) {
$v_ccNum = true;
$c_type = 'mc';
}
@@ -737,8 +737,8 @@ class CORE_validate
function DateToEpoch($format,$date)
{
$Arr_format = split(DEFAULT_DATE_DIVIDER, UNIX_DATE_FORMAT);
$Arr_date = split(DEFAULT_DATE_DIVIDER, $date);
$Arr_format = explode(DEFAULT_DATE_DIVIDER, UNIX_DATE_FORMAT);
$Arr_date = explode(DEFAULT_DATE_DIVIDER, $date);
for($i=0; $i<3; $i++)
{
if($Arr_format[$i] == 'd') $day = $Arr_date[$i];

View File

@@ -45,7 +45,7 @@ class CORE_weblog
}
else
{
@$pagearr = split(':', $VAR['_page']);
@$pagearr = explode(':', $VAR['_page']);
@$page = $pagearr["1"];
}