deprecated php methods

This commit is contained in:
Tony Landis 2009-03-25 22:10:40 -06:00
parent d1547673dc
commit c2dfaaf4e0
12 changed files with 22 additions and 22 deletions

View File

@ -233,9 +233,9 @@ class pdf_invoice_overview extends pdf_invoice_base
# Draw attributes if they are present
if (strlen($line['attr'])) {
$atrs = split("\r\n", str_replace('\r\n',"\r\n",$line['attr']));
$atrs = preg_split("/\r\n/", str_replace('\r\n',"\r\n",$line['attr']));
foreach ($atrs as $a) {
$parts = split("==", $a);
$parts = preg_split("/==/", $a);
switch ($parts[0]) {
default:
if(strlen($parts[0]))

View File

@ -276,9 +276,9 @@ class pdf_invoice_overview extends pdf_invoice_base
$val = $line['name'];
if (strlen($line['attr'])) {
$val = "";
$atrs = split("\r\n", str_replace('\r\n',"\r\n",$line['attr']));
$atrs = preg_split("/\r\n/", str_replace('\r\n',"\r\n",$line['attr']));
foreach ($atrs as $a) {
$parts = split("==", $a);
$parts = preg_split("/==/", $a);
switch ($parts[0]) {
case "Destination":
$this->SetX(69);

View File

@ -204,9 +204,9 @@ class pdf_invoice_overview extends pdf_invoice_base
$val = $line['name'];
if (strlen($line['attr'])) {
$val = "";
$atrs = split("\r\n", str_replace('\r\n',"\r\n",$line['attr']));
$atrs = preg_split("/\r\n/", str_replace('\r\n',"\r\n",$line['attr']));
foreach ($atrs as $a) {
$parts = split("==", $a);
$parts = preg_split("/==/", $a);
switch ($parts[0]) {
case "Destination":
$this->SetX(75);
@ -229,9 +229,9 @@ class pdf_invoice_overview extends pdf_invoice_base
case "parent_service_id":
$sql = sqlSelect($db,"service","prod_attr","id=::".$parts[1]."::");
$rstmp = $db->Execute($sql);
$atrs2 = split("\r\n", $rstmp->fields['prod_attr']);
$atrs2 = preg_split("/\r\n/", $rstmp->fields['prod_attr']);
foreach ($atrs2 as $a2) {
$parts2 = split("==", $a2);
$parts2 = preg_split("/==/", $a2);
switch ($parts2[0]) {
case "station":
case "ported":

View File

@ -158,7 +158,7 @@ class install_db
if(ereg('[(]',$t_s))
{
$ts = split('[(]',$t_s);
$ts = preg_split('/[(]/',$t_s);
$type = $ts[0];
$size = ereg_replace('[)]', '', $ts[1]);
$flds[] = Array($field, $type, $size);
@ -423,7 +423,7 @@ class install_db
if(ereg('[(]',$t_s))
{
$ts = split('[(]',$t_s);
$ts = preg_split('/[(]/',$t_s);
$type = $ts[0];
$size = ereg_replace('[)]', '', $ts[1]);
$flds[] = Array($field, $type, $size);

View File

@ -212,7 +212,7 @@ class account
####################################################################
$type = 'add';
$this->method["$type"] = split(",", $this->method["$type"]);
$this->method["$type"] = preg_split("/,/", $this->method["$type"]);
$arr = $this->method["$type"];
include_once(PATH_CORE . 'validate.inc.php');
$validate = new CORE_validate;
@ -644,7 +644,7 @@ class account
### Retrieve the record:
$type = "view";
$this->method["$type"] = split(",", $this->method["$type"]);
$this->method["$type"] = explode(",", $this->method["$type"]);
$db = new CORE_database;
$db->view($VAR, $this, $type);
@ -843,7 +843,7 @@ class account
### Update the record
$this->account_construct();
$type = "update";
$this->method["$type"] = split(",", $this->method["$type"]);
$this->method["$type"] = explode(",", $this->method["$type"]);
$db = new CORE_database;
$db->update($VAR, $this, $type);

View File

@ -45,7 +45,7 @@ function CORE_database_view($VAR, &$construct, $type)
if(isset($VAR["id"]))
{
$id = split(',',$VAR["id"]);
$id = explode(',',$VAR["id"]);
for($i=0; $i<count($id); $i++)
{
if($id[$i] != '')

View File

@ -187,14 +187,14 @@ class CORE_session
$server = getallheaders();
$domain = $server['Host'];
}
$domain = '.'.eregi_replace('^www.', '', $domain);
$domain = '.'.preg_replace('/^www./', '', $domain);
}
if(COOKIE_EXPIRE == 0 )
$cookie_expire = (time() + 86400*365);
else
$cookie_expire = (time() + (COOKIE_EXPIRE*60));
if(empty($domain) || eregi('localhost', $domain))
if(empty($domain) || preg_match('/localhost/', $domain))
setcookie(COOKIE_NAME,$this->id,$cookie_expire,'/');
else
setcookie(COOKIE_NAME,$this->id,$cookie_expire,'/', $domain);

View File

@ -40,12 +40,12 @@ class CORE_trigger
function run_triggers($trigger)
{
global $C_method;
$triggers = split(',', $trigger);
$triggers = explode(',', $trigger);
for($i=0; $i<count($triggers); $i++)
{
if(isset($triggers[$i]))
{
$triggerss = split(':',$triggers[$i]);
$triggerss = explode(':',$triggers[$i]);
# added to remove php error: Undefined offset
if(isset($triggerss) && count($triggerss) > 1)
{

View File

@ -65,7 +65,7 @@ class CORE_xml
// new XML to Array for PHP5 and SimpleXML
function SimpleXML2Array($xml) {
if (get_class($xml) == 'SimpleXMLElement') {
if (is_object($xml) && get_class($xml) == 'SimpleXMLElement') {
$attributes = $xml->attributes();
foreach($attributes as $k=>$v) {
if ($v) $a[$k] = (string) $v;

View File

@ -75,7 +75,7 @@ class setup
function view($VAR)
{
$type = "view";
$this->method["$type"] = split(",", $this->method["$type"]);
$this->method["$type"] = explode(",", $this->method["$type"]);
$db = new CORE_database;
$db->view($VAR, $this, $type);
}

View File

@ -95,7 +95,7 @@
</session_ip_match>
<error_reporting>
<type>C(16)</type>
<default>0</default>
<default>1</default>
</error_reporting>
<site_name>
<type>X</type>

View File

@ -27,7 +27,7 @@
<date_format><![CDATA[a:4:{i:0;s:1:"m";i:1;s:1:"d";i:2;s:1:"Y";i:3;s:1:"-";}]]></date_format>
<date_time_format><![CDATA[a:1:{i:0;s:0:"";}]]></date_time_format>
<decimal_place>2</decimal_place>
<debug>0</debug>
<debug>1</debug>
<login_attempt_try>10</login_attempt_try>
<login_attempt_time>60</login_attempt_time>
<login_attempt_lock>60</login_attempt_lock>