";
@@ -1259,7 +1259,7 @@ function format_datetime($dt) {
return format_date($dt)." ".i18n("at")." ".format_time($dt);
}
else {
- list($d,$t)=split(" ",$dt);
+ list($d,$t)=explode(" ",$dt);
return format_date($d)." ".i18n("at")." ".format_time($t);
}
}
diff --git a/config/dates.php b/config/dates.php
index 78ffd19..6934205 100644
--- a/config/dates.php
+++ b/config/dates.php
@@ -86,7 +86,7 @@ $dates = array('fairdate' => array() ,
$v = $r->date;
/* See if $v is something resembling a valid date */
- if(!ereg("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", $v, $d)) {
+ if(!preg_match("/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})/", $v, $d)) {
$error_ids[$r->id] = i18n("Invalid date format");
} else if($d[3]==0 || $d[2]==0 || $d[1]==0) {
$error_ids[$r->id] = i18n("Invalid date");
@@ -101,8 +101,8 @@ function chkafter($d1, $d2)
$id2 = $dates[$d2]['id'];
/* Parse both dates 1, 2, 3, 4, 5, 6 */
- ereg("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})",$dates[$d1]['date'], $p1);
- ereg("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})",$dates[$d2]['date'], $p2);
+ preg_match("/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})/",$dates[$d1]['date'], $p1);
+ preg_match("/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})/",$dates[$d2]['date'], $p2);
// int mktime ( [int hour [, int minute [, int second [, int month [, int day [, int year [, int is_dst]]]]]]] )
$u1 = mktime($p1[4], $p1[5], $p1[6], $p1[2], $p1[3], $p1[1]);
@@ -138,7 +138,7 @@ foreach($dates as $dn=>$d) {
if($error_ids[$d['id']]) {
$e = "* ".$error_ids[$d['id']]."";
}
- list($_d,$_t)=split(" ",$d['date']);
+ list($_d,$_t)=explode(" ",$d['date']);
echo "
".i18n($d['description'])."
";
echo "
";
diff --git a/config_editor.inc.php b/config_editor.inc.php
index b10e7ee..e6a3058 100644
--- a/config_editor.inc.php
+++ b/config_editor.inc.php
@@ -228,7 +228,7 @@ function config_editor($category, $year, $array_name, $self)
print("");
break;
case "enum":
- $val = split(',', $val);
+ $val = explode(',', $val);
$values = $var[$k]['type_values'];
/* Split values */
/* The PERL regex here matches any string of the form
@@ -268,7 +268,7 @@ function config_editor($category, $year, $array_name, $self)
break;
case 'multisel':
/* same PERL parse statements as above */
- $val = split(',', $val);
+ $val = explode(',', $val);
$values = $var[$k]['type_values'];
preg_match_all("/([^\|=]+)(?:=([^\|]+))?\|?/", $values, $regs);
/* Decide which way to show this list */
diff --git a/confirmed_participants.php b/confirmed_participants.php
index 80b0c18..5909a26 100644
--- a/confirmed_participants.php
+++ b/confirmed_participants.php
@@ -31,7 +31,7 @@
$r=mysql_fetch_object($q);
if($r->test!=1)
{
- list($d,$t)=split(" ",$config['dates']['postparticipants']);
+ list($d,$t)=explode(" ",$config['dates']['postparticipants']);
echo i18n("Confirmed participants (that signature forms have been received for) will be posted here on %1 at %2. Please do not contact the fair to inquire about receipt of your signature form until after this date (and only if you are not listed here after this date).",array($d,$t));
}
else
diff --git a/contact.php b/contact.php
index 68663fb..3fbdfef 100644
--- a/contact.php
+++ b/contact.php
@@ -26,14 +26,14 @@
function cleanify($in) {
$in=ereg_replace("\r","\n",$in);
- $lines=split("\n",$in);
+ $lines=explode("\n",$in);
return trim($lines[0]);
}
if($_POST['action']=="send") {
if($_POST['to'] && $_POST['subject'] && $_POST['message'] && $_POST['from'] && $_POST['fromemail']) {
if(isEmailAddress($_POST['fromemail'])) {
- list($id,$md5email)=split(":",$_POST['to']);
+ list($id,$md5email)=explode(":",$_POST['to']);
$q=mysql_query("SELECT * FROM users WHERE uid='$id' ORDER BY year DESC LIMIT 1");
$r=mysql_fetch_object($q);
//if a valid selection is made from the list, then this will always match.
diff --git a/fair_additional_materials.inc.php b/fair_additional_materials.inc.php
index 5b3fa74..5c21631 100644
--- a/fair_additional_materials.inc.php
+++ b/fair_additional_materials.inc.php
@@ -90,7 +90,7 @@ function fair_additional_materials($fair, $award, $year)
$rep->nextLine();
$rep->addTextX("Grade: _____________ Date of birth: _____________", $x);
$rep->addTextX("{$s['grade']}", $x+0.75);
- list($y,$m,$d) = split('-',$s['dateofbirth']);
+ list($y,$m,$d) = explode('-',$s['dateofbirth']);
$dob = date('M j, Y', mktime(0,0,0,$m,$d,$y));
$rep->addTextX("$dob", $x+3);
$rep->nextLine();
diff --git a/fair_stats.php b/fair_stats.php
index 3971390..425e2ac 100644
--- a/fair_stats.php
+++ b/fair_stats.php
@@ -112,7 +112,7 @@ $q = mysql_query("SELECT * FROM fairs WHERE id='{$u['fairs_id']}'");
echo mysql_error();
$fair = mysql_fetch_assoc($q);
-$s = split(',', $fair['gather_stats']);
+$s = explode(',', $fair['gather_stats']);
foreach($s as $k) {
if(trim($k) == '') continue;
$server_config[$k] = true;
diff --git a/register_participants_isefforms.php b/register_participants_isefforms.php
index de721ba..1133f81 100644
--- a/register_participants_isefforms.php
+++ b/register_participants_isefforms.php
@@ -120,7 +120,7 @@ echo mysql_error();
move_uploaded_file($_FILES['form']['tmp_name'][$k],$TCFORMSLOCATION."/".$CURRENT_FAIRYEAR."/$r->id/$k.pdf");
$pdfinfo=exec("pdfinfo ".$TCFORMSLOCATION."/".$CURRENT_FAIRYEAR."/$r->id/$k.pdf |grep \"Pages\"");
- list($pgtext,$pgs)=split(":",$pdfinfo);
+ list($pgtext,$pgs)=explode(":",$pdfinfo);
$pgs=trim($pgs);
if($pgs) $p="'$pgs'";
else $p="null";
@@ -160,7 +160,7 @@ echo mysql_error();
//now figur out some other info about the PDF
$pdfinfo=exec("pdfinfo ".$TCFORMSLOCATION."/".$CURRENT_FAIRYEAR."/$r->id.pdf |grep \"Pages\"");
- list($pgtext,$pgs)=split(":",$pdfinfo);
+ list($pgtext,$pgs)=explode(":",$pdfinfo);
$pgs=trim($pgs);
if($pgs) $pgquery=", ReportPages='$pgs'";
mysql_query("UPDATE TC_Projects SET ReportFile='".$r->id.".pdf' $pgquery WHERE id='".$r->id."'");
diff --git a/remote.php b/remote.php
index 8463183..db64143 100644
--- a/remote.php
+++ b/remote.php
@@ -34,7 +34,7 @@ function handle_getstats(&$u, $fair,&$data, &$response)
$year = $data['getstats']['year'];
/* Send back the stats we'd like to collect */
- $response['statconfig'] = split(',', $fair['gather_stats']);
+ $response['statconfig'] = explode(',', $fair['gather_stats']);
/* Send back the stats we currently have */
$q = mysql_query("SELECT * FROM fairs_stats WHERE fairs_id='{$u['fairs_id']}'
diff --git a/tableeditor.class.php b/tableeditor.class.php
index e7157e3..a872831 100644
--- a/tableeditor.class.php
+++ b/tableeditor.class.php
@@ -426,7 +426,7 @@ class TableEditor
//so rip out the options right now and add them
$inputtype="select";
$enums=substr(ereg_replace("'","",$r->Type),5,-1);
- $toks=split(",",$enums);
+ $toks=explode(",",$enums);
foreach($toks as $tok)
{
$this->fieldOptions[$f][]=$tok;
@@ -863,7 +863,7 @@ class TableEditor
case "date":
case "datetime":
- $a = split('[- :]',$editdata[$f]);
+ $a = preg_split('/[- :]/',$editdata[$f]);
if($inputtype == 'date') {
list($yy,$mm,$dd)=$a;
$w = 10;
@@ -891,7 +891,7 @@ class TableEditor
case "time":
if($inputtype == 'time') {
- list($hh,$mi,$ss)=split(":",$editdata[$f]);
+ list($hh,$mi,$ss)=explode(":",$editdata[$f]);
echo "
";
echo i18n("Winners of the %1 %2 will be posted here on %3 at %4",array($config['FAIRYEAR'],$config['fairname'],format_date($d),format_time($t)));
echo " \n";
@@ -283,7 +283,7 @@ else
}
else
{
- list($d,$t)=split(" ",$config['dates']['postwinners']);
+ list($d,$t)=explode(" ",$config['dates']['postwinners']);
echo "
".i18n("%1 Winners",array($config['FAIRYEAR']))."
";
echo i18n("Winners of the %1 %2 will be posted here on %3 at %4",array($config['FAIRYEAR'],$config['fairname'],format_date($d),format_time($t)));
}