forked from science-ation/science-ation
PHP 5.3 DEPRECATED split() so, convert all split()'s to explode()'s
This commit is contained in:
parent
517563a97a
commit
70d359c15b
@ -654,7 +654,7 @@ function draw_contact_form($sponsor_id, $contact = null){
|
|||||||
}else{
|
}else{
|
||||||
$id = "new";
|
$id = "new";
|
||||||
if($sponsor->donortype=="individual") {
|
if($sponsor->donortype=="individual") {
|
||||||
list($firstname,$lastname)=split(" ",$sponsor->organization,2);
|
list($firstname,$lastname)=explode(" ",$sponsor->organization,2);
|
||||||
$contact['firstname']=$firstname;
|
$contact['firstname']=$firstname;
|
||||||
$contact['lastname']=$lastname;
|
$contact['lastname']=$lastname;
|
||||||
$contact['email']=$sponsor->email;
|
$contact['email']=$sponsor->email;
|
||||||
|
@ -92,7 +92,7 @@ function stats_save()
|
|||||||
<input type="hidden" name="fairs_id" value="<?=$f['id']?>" />
|
<input type="hidden" name="fairs_id" value="<?=$f['id']?>" />
|
||||||
<table class="editor">
|
<table class="editor">
|
||||||
<?
|
<?
|
||||||
$selected_stats = split(',', $f['gather_stats']);
|
$selected_stats = explode(',', $f['gather_stats']);
|
||||||
foreach($stats as $s=>$d) {
|
foreach($stats as $s=>$d) {
|
||||||
$ch = in_array($s, $selected_stats) ? 'checked="checked"' : '';
|
$ch = in_array($s, $selected_stats) ? 'checked="checked"' : '';
|
||||||
echo "<tr><td class=\"left\"><input type=\"checkbox\" id=\"stats_$s\" name=\"stats[]\" value=\"$s\" $ch /></td>";
|
echo "<tr><td class=\"left\"><input type=\"checkbox\" id=\"stats_$s\" name=\"stats[]\" value=\"$s\" $ch /></td>";
|
||||||
|
@ -439,7 +439,7 @@ switch($_GET['action']){
|
|||||||
echo "<input type=\"button\" onclick=\"return opensendemaildialog($campaign_id,$email->id)\" value=\"".i18n("Send as email")."\" />";
|
echo "<input type=\"button\" onclick=\"return opensendemaildialog($campaign_id,$email->id)\" value=\"".i18n("Send as email")."\" />";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
if($email->lastsent) {
|
if($email->lastsent) {
|
||||||
list($date,$time)=split(" ",$email->lastsent);
|
list($date,$time)=explode(" ",$email->lastsent);
|
||||||
echo i18n("Last Sent");
|
echo i18n("Last Sent");
|
||||||
echo "<br />".format_date($date);
|
echo "<br />".format_date($date);
|
||||||
echo "<br />".format_time($time);
|
echo "<br />".format_time($time);
|
||||||
|
@ -175,7 +175,7 @@
|
|||||||
echo $config['FISCALYEAR'];
|
echo $config['FISCALYEAR'];
|
||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
echo "<tr><td>".i18n("Fiscal Year End")."</td><td>";
|
echo "<tr><td>".i18n("Fiscal Year End")."</td><td>";
|
||||||
list($month,$day)=split("-",$config['fiscal_yearend']);
|
list($month,$day)=explode("-",$config['fiscal_yearend']);
|
||||||
emit_month_selector("fiscalendmonth",$month);
|
emit_month_selector("fiscalendmonth",$month);
|
||||||
emit_day_selector("fiscalendday",$day);
|
emit_day_selector("fiscalendday",$day);
|
||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
|
@ -173,8 +173,8 @@
|
|||||||
DATE_ADD('$date $hr:$min:00', INTERVAL $tt MINUTE) AS startnext ");
|
DATE_ADD('$date $hr:$min:00', INTERVAL $tt MINUTE) AS startnext ");
|
||||||
echo mysql_error();
|
echo mysql_error();
|
||||||
$r=mysql_fetch_object($q);
|
$r=mysql_fetch_object($q);
|
||||||
list($ed,$et)=split(" ",$r->endtime);
|
list($ed,$et)=explode(" ",$r->endtime);
|
||||||
list($nd,$nt)=split(" ",$r->startnext);
|
list($nd,$nt)=explode(" ",$r->startnext);
|
||||||
|
|
||||||
$starttime = sprintf("%02d:%02d:00", $hr, $min);
|
$starttime = sprintf("%02d:%02d:00", $hr, $min);
|
||||||
|
|
||||||
@ -184,8 +184,8 @@
|
|||||||
'{$config['FAIRYEAR']}')");
|
'{$config['FAIRYEAR']}')");
|
||||||
echo mysql_error();
|
echo mysql_error();
|
||||||
$date=$nd;
|
$date=$nd;
|
||||||
list($s_h,$s_m,$s_s)=split(":",$nt);
|
list($s_h,$s_m,$s_s)=explode(":",$nt);
|
||||||
list($e_h,$e_m,$e_s)=split(":",$et);
|
list($e_h,$e_m,$e_s)=explode(":",$et);
|
||||||
message_push(happy(i18n("Adding timeslot: %1",array("$date $hr:$min - $e_h:$e_m"))));
|
message_push(happy(i18n("Adding timeslot: %1",array("$date $hr:$min - $e_h:$e_m"))));
|
||||||
$hr=$s_h;
|
$hr=$s_h;
|
||||||
$min=$s_m;
|
$min=$s_m;
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
$principal_update = '';
|
$principal_update = '';
|
||||||
$sciencehead_update = '';
|
$sciencehead_update = '';
|
||||||
list($first, $last) = split(' ', $_POST['principal'], 2);
|
list($first, $last) = explode(' ', $_POST['principal'], 2);
|
||||||
/* Load existing entry if it exists, else make an entry if
|
/* Load existing entry if it exists, else make an entry if
|
||||||
* there is data, else, do nothing */
|
* there is data, else, do nothing */
|
||||||
if($i['principal_uid'] > 0)
|
if($i['principal_uid'] > 0)
|
||||||
@ -78,7 +78,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/* Get info about science head */
|
/* Get info about science head */
|
||||||
list($first, $last) = split(' ', $_POST['sciencehead'], 2);
|
list($first, $last) = explode(' ', $_POST['sciencehead'], 2);
|
||||||
$em = $_POST['scienceheademail'];
|
$em = $_POST['scienceheademail'];
|
||||||
if($em == '' && ($first != '' || $last != '')) $em = "*$first$last".user_generate_password();
|
if($em == '' && ($first != '' || $last != '')) $em = "*$first$last".user_generate_password();
|
||||||
/* Load existing record, or create new if there's something
|
/* Load existing record, or create new if there's something
|
||||||
|
@ -199,7 +199,7 @@
|
|||||||
echo "$r->firstname $r->lastname</td>\n";
|
echo "$r->firstname $r->lastname</td>\n";
|
||||||
echo " <td>";
|
echo " <td>";
|
||||||
if($r->email) {
|
if($r->email) {
|
||||||
list($eb,$ea)=split("@",$r->email);
|
list($eb,$ea)=explode("@",$r->email);
|
||||||
echo "<script language=\"javascript\" type=\"text/javascript\">em('$eb','$ea')</script>";
|
echo "<script language=\"javascript\" type=\"text/javascript\">em('$eb','$ea')</script>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -269,7 +269,7 @@ function students_load()
|
|||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td>".i18n("Date of Birth")."</td><td>\n";
|
echo " <td>".i18n("Date of Birth")."</td><td>\n";
|
||||||
list($year,$month,$day)=split("-",$studentinfo->dateofbirth);
|
list($year,$month,$day)=explode("-",$studentinfo->dateofbirth);
|
||||||
echo "<table><tr><td>";
|
echo "<table><tr><td>";
|
||||||
emit_day_selector("day[$x]",$day);
|
emit_day_selector("day[$x]",$day);
|
||||||
echo "</td><td>\n";
|
echo "</td><td>\n";
|
||||||
|
@ -53,7 +53,7 @@ if($_POST['action']=="save") {
|
|||||||
echo happy(i18n("Translation(s) deleted"));
|
echo happy(i18n("Translation(s) deleted"));
|
||||||
}
|
}
|
||||||
if($_POST['changedFields']) {
|
if($_POST['changedFields']) {
|
||||||
$changed=split(",",$_POST['changedFields']);
|
$changed=explode(",",$_POST['changedFields']);
|
||||||
foreach($changed AS $ch) {
|
foreach($changed AS $ch) {
|
||||||
mysql_query("UPDATE translations SET val='".mysql_escape_string(stripslashes($_POST['val'][$ch]))."' WHERE strmd5='".mysql_real_escape_string($ch)."' AND lang='".mysql_real_escape_string($_SESSION['translang'])."'");
|
mysql_query("UPDATE translations SET val='".mysql_escape_string(stripslashes($_POST['val'][$ch]))."' WHERE strmd5='".mysql_real_escape_string($ch)."' AND lang='".mysql_real_escape_string($_SESSION['translang'])."'");
|
||||||
}
|
}
|
||||||
|
@ -57,13 +57,13 @@
|
|||||||
|
|
||||||
//make sure we do emailprivate before email so we dont match the wrong thing
|
//make sure we do emailprivate before email so we dont match the wrong thing
|
||||||
if($u['emailprivate'] && $u['displayemail']=='yes') {
|
if($u['emailprivate'] && $u['displayemail']=='yes') {
|
||||||
list($b,$a)=split("@",$u['emailprivate']);
|
list($b,$a)=explode("@",$u['emailprivate']);
|
||||||
$output=str_replace("emailprivate","<script language=\"javascript\" type=\"text/javascript\">em('$b','$a')</script>",$output);
|
$output=str_replace("emailprivate","<script language=\"javascript\" type=\"text/javascript\">em('$b','$a')</script>",$output);
|
||||||
} else
|
} else
|
||||||
$output=str_replace("emailprivate","",$output);
|
$output=str_replace("emailprivate","",$output);
|
||||||
|
|
||||||
if($u['email'] && $u['displayemail']=='yes') {
|
if($u['email'] && $u['displayemail']=='yes') {
|
||||||
list($b,$a)=split("@",$u['email']);
|
list($b,$a)=explode("@",$u['email']);
|
||||||
$output=str_replace("email","<script language=\"javascript\" type=\"text/javascript\">em('$b','$a')</script>",$output);
|
$output=str_replace("email","<script language=\"javascript\" type=\"text/javascript\">em('$b','$a')</script>",$output);
|
||||||
} else
|
} else
|
||||||
$output=str_replace("email","",$output);
|
$output=str_replace("email","",$output);
|
||||||
@ -86,7 +86,7 @@
|
|||||||
if($r2->email)
|
if($r2->email)
|
||||||
{
|
{
|
||||||
echo " ";
|
echo " ";
|
||||||
list($b,$a)=split("@",$r2->email);
|
list($b,$a)=explode("@",$r2->email);
|
||||||
echo "<script language=javascript>em('$b','$a')</script>";
|
echo "<script language=javascript>em('$b','$a')</script>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -175,7 +175,7 @@ function emit_year_selector($name,$selected="",$min=0,$max=0) {
|
|||||||
|
|
||||||
function emit_date_selector($name,$selected="") {
|
function emit_date_selector($name,$selected="") {
|
||||||
if($selected) {
|
if($selected) {
|
||||||
list($year,$month,$day)=split("-",$selected);
|
list($year,$month,$day)=explode("-",$selected);
|
||||||
}
|
}
|
||||||
echo "<table cellpadding=0>";
|
echo "<table cellpadding=0>";
|
||||||
echo "<tr><td>";
|
echo "<tr><td>";
|
||||||
@ -220,7 +220,7 @@ function emit_minute_selector($name,$selected="",$extra="",$interval=5) {
|
|||||||
|
|
||||||
function emit_time_selector($name,$selected="") {
|
function emit_time_selector($name,$selected="") {
|
||||||
if($selected) {
|
if($selected) {
|
||||||
list($hour,$minute,$second)=split(":",$selected);
|
list($hour,$minute,$second)=explode(":",$selected);
|
||||||
}
|
}
|
||||||
echo "<table cellpadding=0>";
|
echo "<table cellpadding=0>";
|
||||||
echo "<tr><td>";
|
echo "<tr><td>";
|
||||||
@ -593,7 +593,7 @@ function format_datetime($dt) {
|
|||||||
return format_date($dt)." ".i18n("at")." ".format_time($dt);
|
return format_date($dt)." ".i18n("at")." ".format_time($dt);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
list($d,$t)=split(" ",$dt);
|
list($d,$t)=explode(" ",$dt);
|
||||||
return format_date($d)." ".i18n("at")." ".format_time($t);
|
return format_date($d)." ".i18n("at")." ".format_time($t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,7 @@ foreach($dates as $dn=>$d) {
|
|||||||
if($error_ids[$d['id']]) {
|
if($error_ids[$d['id']]) {
|
||||||
$e = "<span style=\"color: red;\">*</span> ".$error_ids[$d['id']]."</font>";
|
$e = "<span style=\"color: red;\">*</span> ".$error_ids[$d['id']]."</font>";
|
||||||
}
|
}
|
||||||
list($_d,$_t)=split(" ",$d['date']);
|
list($_d,$_t)=explode(" ",$d['date']);
|
||||||
|
|
||||||
echo "<tr><td>".i18n($d['description'])."</td>";
|
echo "<tr><td>".i18n($d['description'])."</td>";
|
||||||
echo "<td><input size=\"10\" class=\"date\" type=\"text\" name=\"savedates[{$d['id']}]\" value=\"{$_d}\" />";
|
echo "<td><input size=\"10\" class=\"date\" type=\"text\" name=\"savedates[{$d['id']}]\" value=\"{$_d}\" />";
|
||||||
|
@ -251,7 +251,7 @@ function config_editor($category, $conference_id, $array_name, $self)
|
|||||||
print("</select>");
|
print("</select>");
|
||||||
break;
|
break;
|
||||||
case "enum":
|
case "enum":
|
||||||
$val = split(',', $val);
|
$val = explode(',', $val);
|
||||||
$values = $var[$k]['type_values'];
|
$values = $var[$k]['type_values'];
|
||||||
/* Split values */
|
/* Split values */
|
||||||
/* The PERL regex here matches any string of the form
|
/* The PERL regex here matches any string of the form
|
||||||
@ -291,7 +291,7 @@ function config_editor($category, $conference_id, $array_name, $self)
|
|||||||
break;
|
break;
|
||||||
case 'multisel':
|
case 'multisel':
|
||||||
/* same PERL parse statements as above */
|
/* same PERL parse statements as above */
|
||||||
$val = split(',', $val);
|
$val = explode(',', $val);
|
||||||
$values = $var[$k]['type_values'];
|
$values = $var[$k]['type_values'];
|
||||||
preg_match_all("/([^\|=]+)(?:=([^\|]+))?\|?/", $values, $regs);
|
preg_match_all("/([^\|=]+)(?:=([^\|]+))?\|?/", $values, $regs);
|
||||||
/* Decide which way to show this list */
|
/* Decide which way to show this list */
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
$r=mysql_fetch_object($q);
|
$r=mysql_fetch_object($q);
|
||||||
if($r->test!=1)
|
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));
|
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
|
else
|
||||||
|
@ -26,14 +26,14 @@
|
|||||||
|
|
||||||
function cleanify($in) {
|
function cleanify($in) {
|
||||||
$in=ereg_replace("\r","\n",$in);
|
$in=ereg_replace("\r","\n",$in);
|
||||||
$lines=split("\n",$in);
|
$lines=explode("\n",$in);
|
||||||
return trim($lines[0]);
|
return trim($lines[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_POST['action']=="send") {
|
if($_POST['action']=="send") {
|
||||||
if($_POST['to'] && $_POST['subject'] && $_POST['message'] && $_POST['from'] && $_POST['fromemail']) {
|
if($_POST['to'] && $_POST['subject'] && $_POST['message'] && $_POST['from'] && $_POST['fromemail']) {
|
||||||
if(isEmailAddress($_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");
|
$q=mysql_query("SELECT * FROM users WHERE uid='$id' ORDER BY year DESC LIMIT 1");
|
||||||
$r=mysql_fetch_object($q);
|
$r=mysql_fetch_object($q);
|
||||||
//if a valid selection is made from the list, then this will always match.
|
//if a valid selection is made from the list, then this will always match.
|
||||||
|
@ -727,7 +727,7 @@ function db129_user_personal_fields($type)
|
|||||||
$ret = array('firstname','lastname','email');
|
$ret = array('firstname','lastname','email');
|
||||||
$fields = $config["{$type}_personal_fields"];
|
$fields = $config["{$type}_personal_fields"];
|
||||||
if($fields != '') {
|
if($fields != '') {
|
||||||
$fields = split(',', $fields);
|
$fields = explode(',', $fields);
|
||||||
foreach($fields as $f) {
|
foreach($fields as $f) {
|
||||||
$ret = array_merge($ret, $user_personal_fields_map[$f]);
|
$ret = array_merge($ret, $user_personal_fields_map[$f]);
|
||||||
}
|
}
|
||||||
@ -741,7 +741,7 @@ function db129_user_personal_required_fields($type)
|
|||||||
$ret = array('firstname','lastname','email');
|
$ret = array('firstname','lastname','email');
|
||||||
$required = $config["{$type}_personal_required"];
|
$required = $config["{$type}_personal_required"];
|
||||||
if($required != '') {
|
if($required != '') {
|
||||||
$fields = split(',', $required);
|
$fields = explode(',', $required);
|
||||||
foreach($fields as $f) {
|
foreach($fields as $f) {
|
||||||
$ret = array_merge($ret, $user_personal_fields_map[$f]);
|
$ret = array_merge($ret, $user_personal_fields_map[$f]);
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ function db_update_146_pre()
|
|||||||
function db_update_146_handle($name, $email, $phone, $type)
|
function db_update_146_handle($name, $email, $phone, $type)
|
||||||
{
|
{
|
||||||
$un = $email;
|
$un = $email;
|
||||||
list($first, $last) = split(' ', $name, 2);
|
list($first, $last) = explode(' ', $name, 2);
|
||||||
|
|
||||||
/* Find the user */
|
/* Find the user */
|
||||||
if($email != '') {
|
if($email != '') {
|
||||||
|
@ -851,7 +851,7 @@ function db146_user_personal_fields($type)
|
|||||||
$ret = array('firstname','lastname','email');
|
$ret = array('firstname','lastname','email');
|
||||||
$fields = $config["{$type}_personal_fields"];
|
$fields = $config["{$type}_personal_fields"];
|
||||||
if($fields != '') {
|
if($fields != '') {
|
||||||
$fields = split(',', $fields);
|
$fields = explode(',', $fields);
|
||||||
foreach($fields as $f) {
|
foreach($fields as $f) {
|
||||||
$ret = array_merge($ret, $user_personal_fields_map[$f]);
|
$ret = array_merge($ret, $user_personal_fields_map[$f]);
|
||||||
}
|
}
|
||||||
@ -865,7 +865,7 @@ function db146_user_personal_required_fields($type)
|
|||||||
$ret = array('firstname','lastname','email');
|
$ret = array('firstname','lastname','email');
|
||||||
$required = $config["{$type}_personal_required"];
|
$required = $config["{$type}_personal_required"];
|
||||||
if($required != '') {
|
if($required != '') {
|
||||||
$fields = split(',', $required);
|
$fields = explode(',', $required);
|
||||||
foreach($fields as $f) {
|
foreach($fields as $f) {
|
||||||
$ret = array_merge($ret, $user_personal_fields_map[$f]);
|
$ret = array_merge($ret, $user_personal_fields_map[$f]);
|
||||||
}
|
}
|
||||||
|
@ -851,7 +851,7 @@ function db149_user_personal_fields($type)
|
|||||||
$ret = array('firstname','lastname','email');
|
$ret = array('firstname','lastname','email');
|
||||||
$fields = $config["{$type}_personal_fields"];
|
$fields = $config["{$type}_personal_fields"];
|
||||||
if($fields != '') {
|
if($fields != '') {
|
||||||
$fields = split(',', $fields);
|
$fields = explode(',', $fields);
|
||||||
foreach($fields as $f) {
|
foreach($fields as $f) {
|
||||||
$ret = array_merge($ret, $user_personal_fields_map[$f]);
|
$ret = array_merge($ret, $user_personal_fields_map[$f]);
|
||||||
}
|
}
|
||||||
@ -865,7 +865,7 @@ function db149_user_personal_required_fields($type)
|
|||||||
$ret = array('firstname','lastname','email');
|
$ret = array('firstname','lastname','email');
|
||||||
$required = $config["{$type}_personal_required"];
|
$required = $config["{$type}_personal_required"];
|
||||||
if($required != '') {
|
if($required != '') {
|
||||||
$fields = split(',', $required);
|
$fields = explode(',', $required);
|
||||||
foreach($fields as $f) {
|
foreach($fields as $f) {
|
||||||
$ret = array_merge($ret, $user_personal_fields_map[$f]);
|
$ret = array_merge($ret, $user_personal_fields_map[$f]);
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ function db_update_62_post()
|
|||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
foreach($update_62_committee as $c) {
|
foreach($update_62_committee as $c) {
|
||||||
list($fn, $ln) = split(' ', $c['name'], 2);
|
list($fn, $ln) = explode(' ', $c['name'], 2);
|
||||||
$username = $c['email'];
|
$username = $c['email'];
|
||||||
$fn = mysql_escape_string($fn);
|
$fn = mysql_escape_string($fn);
|
||||||
$ln = mysql_escape_string($ln);
|
$ln = mysql_escape_string($ln);
|
||||||
|
@ -90,7 +90,7 @@ function fair_additional_materials($fair, $award, $year)
|
|||||||
$rep->nextLine();
|
$rep->nextLine();
|
||||||
$rep->addTextX("Grade: _____________ Date of birth: _____________", $x);
|
$rep->addTextX("Grade: _____________ Date of birth: _____________", $x);
|
||||||
$rep->addTextX("{$s['grade']}", $x+0.75);
|
$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));
|
$dob = date('M j, Y', mktime(0,0,0,$m,$d,$y));
|
||||||
$rep->addTextX("$dob", $x+3);
|
$rep->addTextX("$dob", $x+3);
|
||||||
$rep->nextLine();
|
$rep->nextLine();
|
||||||
|
@ -112,7 +112,7 @@ $q = mysql_query("SELECT * FROM fairs WHERE id='{$u['fairs_id']}'");
|
|||||||
echo mysql_error();
|
echo mysql_error();
|
||||||
$fair = mysql_fetch_assoc($q);
|
$fair = mysql_fetch_assoc($q);
|
||||||
|
|
||||||
$s = split(',', $fair['gather_stats']);
|
$s = explode(',', $fair['gather_stats']);
|
||||||
foreach($s as $k) {
|
foreach($s as $k) {
|
||||||
if(trim($k) == '') continue;
|
if(trim($k) == '') continue;
|
||||||
$server_config[$k] = true;
|
$server_config[$k] = true;
|
||||||
|
@ -120,7 +120,7 @@ echo mysql_error();
|
|||||||
move_uploaded_file($_FILES['form']['tmp_name'][$k],$TCFORMSLOCATION."/".$CURRENT_FAIRYEAR."/$r->id/$k.pdf");
|
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\"");
|
$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);
|
$pgs=trim($pgs);
|
||||||
if($pgs) $p="'$pgs'";
|
if($pgs) $p="'$pgs'";
|
||||||
else $p="null";
|
else $p="null";
|
||||||
@ -160,7 +160,7 @@ echo mysql_error();
|
|||||||
|
|
||||||
//now figur out some other info about the PDF
|
//now figur out some other info about the PDF
|
||||||
$pdfinfo=exec("pdfinfo ".$TCFORMSLOCATION."/".$CURRENT_FAIRYEAR."/$r->id.pdf |grep \"Pages\"");
|
$pdfinfo=exec("pdfinfo ".$TCFORMSLOCATION."/".$CURRENT_FAIRYEAR."/$r->id.pdf |grep \"Pages\"");
|
||||||
list($pgtext,$pgs)=split(":",$pdfinfo);
|
list($pgtext,$pgs)=explode(":",$pdfinfo);
|
||||||
$pgs=trim($pgs);
|
$pgs=trim($pgs);
|
||||||
if($pgs) $pgquery=", ReportPages='$pgs'";
|
if($pgs) $pgquery=", ReportPages='$pgs'";
|
||||||
mysql_query("UPDATE TC_Projects SET ReportFile='".$r->id.".pdf' $pgquery WHERE id='".$r->id."'");
|
mysql_query("UPDATE TC_Projects SET ReportFile='".$r->id.".pdf' $pgquery WHERE id='".$r->id."'");
|
||||||
|
@ -343,7 +343,7 @@ if($config['participant_student_personal']=="yes")
|
|||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td>".i18n("Date of Birth")."</td><td>\n";
|
echo " <td>".i18n("Date of Birth")."</td><td>\n";
|
||||||
list($year,$month,$day)=split("-",$studentinfo->dateofbirth);
|
list($year,$month,$day)=explode("-",$studentinfo->dateofbirth);
|
||||||
echo "<table><tr><td>";
|
echo "<table><tr><td>";
|
||||||
emit_day_selector("day[$x]",$day);
|
emit_day_selector("day[$x]",$day);
|
||||||
echo "</td><td>\n";
|
echo "</td><td>\n";
|
||||||
|
@ -34,7 +34,7 @@ function handle_getstats(&$u, $fair,&$data, &$response)
|
|||||||
$year = $data['getstats']['year'];
|
$year = $data['getstats']['year'];
|
||||||
|
|
||||||
/* Send back the stats we'd like to collect */
|
/* 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 */
|
/* Send back the stats we currently have */
|
||||||
$q = mysql_query("SELECT * FROM fairs_stats WHERE fairs_id='{$u['fairs_id']}'
|
$q = mysql_query("SELECT * FROM fairs_stats WHERE fairs_id='{$u['fairs_id']}'
|
||||||
|
@ -22,7 +22,7 @@ if($_SESSION['schoolid'] && $_SESSION['schoolaccesscode'])
|
|||||||
if($_POST['action']=="save") {
|
if($_POST['action']=="save") {
|
||||||
/* Get info about science head */
|
/* Get info about science head */
|
||||||
$sciencehead_update = '';
|
$sciencehead_update = '';
|
||||||
list($first, $last) = split(' ', $_POST['sciencehead'], 2);
|
list($first, $last) = explode(' ', $_POST['sciencehead'], 2);
|
||||||
$em = $_POST['scienceheademail'];
|
$em = $_POST['scienceheademail'];
|
||||||
if($em == '' && ($first != '' || $last != '')) $em = "*$first$last".user_generate_password();
|
if($em == '' && ($first != '' || $last != '')) $em = "*$first$last".user_generate_password();
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ else if($_POST['action']=="restore") {
|
|||||||
|
|
||||||
for($x=0;$x<4;$x++) {
|
for($x=0;$x<4;$x++) {
|
||||||
$line=fgets($fp,1024);
|
$line=fgets($fp,1024);
|
||||||
$hdr[$x]=split(":",trim($line),2);
|
$hdr[$x]=explode(":",trim($line),2);
|
||||||
}
|
}
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
{
|
{
|
||||||
foreach($packs AS $p)
|
foreach($packs AS $p)
|
||||||
{
|
{
|
||||||
list($langpack,$filename,$lastupdate)=split("\t",trim($p));
|
list($langpack,$filename,$lastupdate)=explode("\t",trim($p));
|
||||||
$ret[$langpack]=array("lang"=>$langpack,"filename"=>$filename,"lastupdate"=>$lastupdate);
|
$ret[$langpack]=array("lang"=>$langpack,"filename"=>$filename,"lastupdate"=>$lastupdate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
$ret=array();
|
$ret=array();
|
||||||
if($v=file("http://www.sfiab.ca/version.txt"))
|
if($v=file("http://www.sfiab.ca/version.txt"))
|
||||||
{
|
{
|
||||||
list($version,$date)=split("\t",trim($v[0]));
|
list($version,$date)=explode("\t",trim($v[0]));
|
||||||
$ret['version']=$version;
|
$ret['version']=$version;
|
||||||
$ret['date']=$date;
|
$ret['date']=$date;
|
||||||
}
|
}
|
||||||
|
@ -426,7 +426,7 @@ class TableEditor
|
|||||||
//so rip out the options right now and add them
|
//so rip out the options right now and add them
|
||||||
$inputtype="select";
|
$inputtype="select";
|
||||||
$enums=substr(ereg_replace("'","",$r->Type),5,-1);
|
$enums=substr(ereg_replace("'","",$r->Type),5,-1);
|
||||||
$toks=split(",",$enums);
|
$toks=explode(",",$enums);
|
||||||
foreach($toks as $tok) {
|
foreach($toks as $tok) {
|
||||||
$keyfound=false;
|
$keyfound=false;
|
||||||
if(count($this->fieldOptions[$f])) {
|
if(count($this->fieldOptions[$f])) {
|
||||||
@ -871,7 +871,7 @@ class TableEditor
|
|||||||
|
|
||||||
case "date":
|
case "date":
|
||||||
case "datetime":
|
case "datetime":
|
||||||
$a = split('[- :]',$editdata[$f]);
|
$a = explode('[- :]',$editdata[$f]);
|
||||||
if($inputtype == 'date') {
|
if($inputtype == 'date') {
|
||||||
list($yy,$mm,$dd)=$a;
|
list($yy,$mm,$dd)=$a;
|
||||||
$w = 10;
|
$w = 10;
|
||||||
@ -899,7 +899,7 @@ class TableEditor
|
|||||||
|
|
||||||
case "time":
|
case "time":
|
||||||
if($inputtype == 'time') {
|
if($inputtype == 'time') {
|
||||||
list($hh,$mi,$ss)=split(":",$editdata[$f]);
|
list($hh,$mi,$ss)=explode(":",$editdata[$f]);
|
||||||
|
|
||||||
echo "<table width=\"10\" cellspacing=0 cellpadding=0>";
|
echo "<table width=\"10\" cellspacing=0 cellpadding=0>";
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
@ -1374,7 +1374,7 @@ class TableEditor
|
|||||||
function format_date($d)
|
function format_date($d)
|
||||||
{
|
{
|
||||||
if(!$d) return;
|
if(!$d) return;
|
||||||
list($y,$m,$d)=split("-",$d);
|
list($y,$m,$d)=explode("-",$d);
|
||||||
$t=mktime(0,0,0,$m,$d,$y);
|
$t=mktime(0,0,0,$m,$d,$y);
|
||||||
return date($this->dateformat,$t);
|
return date($this->dateformat,$t);
|
||||||
}
|
}
|
||||||
@ -1384,7 +1384,7 @@ class TableEditor
|
|||||||
if(!$t) return;
|
if(!$t) return;
|
||||||
if($this->timeformat=="12hrs")
|
if($this->timeformat=="12hrs")
|
||||||
{
|
{
|
||||||
list($hh,$mm,$ss)=split(":",$t);
|
list($hh,$mm,$ss)=explode(":",$t);
|
||||||
//hack to get rid of leading "0" and turn it into a number
|
//hack to get rid of leading "0" and turn it into a number
|
||||||
$hh++;
|
$hh++;
|
||||||
$hh--;
|
$hh--;
|
||||||
@ -1406,7 +1406,7 @@ class TableEditor
|
|||||||
}
|
}
|
||||||
function format_datetime($d)
|
function format_datetime($d)
|
||||||
{
|
{
|
||||||
list($d,$t)=split(' ', $d);
|
list($d,$t)=explode(' ', $d);
|
||||||
$ret = $this->format_date($d).' '.$this->format_time($t);
|
$ret = $this->format_date($d).' '.$this->format_time($t);
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
@ -663,7 +663,7 @@ function user_fields_enabled($role)
|
|||||||
$ret = array('firstname','lastname');
|
$ret = array('firstname','lastname');
|
||||||
$fields = $config["{$role}_personal_fields"];
|
$fields = $config["{$role}_personal_fields"];
|
||||||
if($fields != '') {
|
if($fields != '') {
|
||||||
$fields = split(',', $fields);
|
$fields = explode(',', $fields);
|
||||||
foreach($fields as $f) {
|
foreach($fields as $f) {
|
||||||
$ret = array_merge($ret, $user_fields_map[$f]);
|
$ret = array_merge($ret, $user_fields_map[$f]);
|
||||||
}
|
}
|
||||||
@ -681,7 +681,7 @@ function user_fields_required($role)
|
|||||||
$ret = array('firstname','lastname','username');
|
$ret = array('firstname','lastname','username');
|
||||||
$required = $config["{$role}_personal_required"];
|
$required = $config["{$role}_personal_required"];
|
||||||
if($required != '') {
|
if($required != '') {
|
||||||
$fields = split(',', $required);
|
$fields = explode(',', $required);
|
||||||
foreach($fields as $f) {
|
foreach($fields as $f) {
|
||||||
$ret = array_merge($ret, $user_fields_map[$f]);
|
$ret = array_merge($ret, $user_fields_map[$f]);
|
||||||
}
|
}
|
||||||
|
@ -124,7 +124,7 @@
|
|||||||
if(mysql_num_rows($q) > 0) {
|
if(mysql_num_rows($q) > 0) {
|
||||||
/* It already exists, make sure they're not already in this role */
|
/* It already exists, make sure they're not already in this role */
|
||||||
$r = mysql_fetch_object($q);
|
$r = mysql_fetch_object($q);
|
||||||
$types = split(',', $r->types);
|
$types = explode(',', $r->types);
|
||||||
|
|
||||||
if($r->year==$config['FAIRYEAR'] && $r->deleted=='yes') {
|
if($r->year==$config['FAIRYEAR'] && $r->deleted=='yes') {
|
||||||
mysql_query("UPDATE users SET deleted='no' WHERE id='$r->id'");
|
mysql_query("UPDATE users SET deleted='no' WHERE id='$r->id'");
|
||||||
|
@ -245,7 +245,7 @@ else
|
|||||||
if(mysql_num_rows($q)) {
|
if(mysql_num_rows($q)) {
|
||||||
while($r=mysql_fetch_object($q)) {
|
while($r=mysql_fetch_object($q)) {
|
||||||
if($first && $r->year != $config['FAIRYEAR']) {
|
if($first && $r->year != $config['FAIRYEAR']) {
|
||||||
list($d,$t)=split(" ",$config['dates']['postwinners']);
|
list($d,$t)=explode(" ",$config['dates']['postwinners']);
|
||||||
echo "<h2>".i18n("%1 Winners",array($config['FAIRYEAR']))."</h2>";
|
echo "<h2>".i18n("%1 Winners",array($config['FAIRYEAR']))."</h2>";
|
||||||
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 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 "<br />\n";
|
echo "<br />\n";
|
||||||
@ -281,7 +281,7 @@ else
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
list($d,$t)=split(" ",$config['dates']['postwinners']);
|
list($d,$t)=explode(" ",$config['dates']['postwinners']);
|
||||||
echo "<h2>".i18n("%1 Winners",array($config['FAIRYEAR']))."</h2>";
|
echo "<h2>".i18n("%1 Winners",array($config['FAIRYEAR']))."</h2>";
|
||||||
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 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)));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user