forked from science-ation/science-ation
Fix encoding with //TRANSLIT
Add school separate students names with , instead of \n
This commit is contained in:
parent
aa1ad291ac
commit
2d2546d46e
@ -60,17 +60,21 @@
|
||||
|
||||
$regid=$r['reg_id'];
|
||||
|
||||
$q2=mysql_query("SELECT firstname,lastname FROM students WHERE registrations_id='$regid' ORDER BY lastname");
|
||||
$q2=mysql_query("SELECT firstname,lastname,schools.school FROM students JOIN schools ON students.schools_id=schools.id WHERE registrations_id='$regid' ORDER BY lastname");
|
||||
$students="";
|
||||
while($stud=mysql_fetch_object($q2)) {
|
||||
$students.=$stud->firstname." ".$stud->lastname."\n";
|
||||
$students.=trim($stud->firstname)." ".trim($stud->lastname).", ";
|
||||
//we just use the last school, it should match
|
||||
$school=$stud->school;
|
||||
}
|
||||
$students=substr($students,0,-2);
|
||||
|
||||
$ret=array();
|
||||
foreach($r AS $k=>$v) {
|
||||
$ret[$k]=iconv("ISO-8859-1","UTF-8",trim($v));
|
||||
$ret[$k]=iconv("ISO-8859-1","UTF-8//TRANSLIT",trim($v));
|
||||
}
|
||||
$ret['students']=iconv("ISO-8859-1","UTF-8",trim($students));
|
||||
$ret['students']=iconv("ISO-8859-1","UTF-8//TRANSLIT",trim($students));
|
||||
$ret['school']=iconv("ISO-8859-1","UTF-8//TRANSLIT",trim($school));
|
||||
$ret['photo']="";
|
||||
}
|
||||
//simulate slow loading
|
||||
|
@ -28,7 +28,6 @@
|
||||
$r=mysql_fetch_object($q);
|
||||
$ret=array();
|
||||
|
||||
|
||||
if($r->test) {
|
||||
$ret['status']="ok";
|
||||
|
||||
@ -76,7 +75,7 @@
|
||||
|
||||
$projects["[".$r->projectcategories_id."] ".$r->category." - ".$r->division][]=array(
|
||||
"n"=>$r->projectnumber,
|
||||
"t"=>iconv("ISO-8859-1","UTF-8",trim($t)),
|
||||
"t"=>iconv("ISO-8859-1","UTF-8//TRANSLIT",trim($t)),
|
||||
"p"=>$photo);
|
||||
}
|
||||
$ret['projects']=$projects;
|
||||
|
Loading…
Reference in New Issue
Block a user