แจ้งซ่อมงานอาคารและสถานที่

 
 

 


 

[insert_php]

(String) $strName = $_POST[‘search’];
(String) $strWord = “bumt610″.$strName;
$strCon = strlen($strWord);
//echo $strWord.”
“;
//echo $strCon.”
“;

//Input
$strWord1 = substr($strWord,0,7);
$strWord3 = substr($strWord,7,4);

//Check 14 digit
if($strCon != 11){
$strWord2 = ‘0’;

} else {
$strWord2 = ‘1’;
}
//echo $strWord2.”
“;

$noConnect = ‘

‘.’กรุณาตรวจสอบการเชื่อมต่อของท่านอีกครั้ง’.’

‘;

//Get Data from url target
$targeturl = ‘https://docs.google.com/spreadsheets/d/e/2PACX-1vQWLz-VaEG_IAuHpHE1z2cNDINQszaKNZDWAewtSm5tEvfZJWpzDZhVJLs-B0qdFbM5gN5XpB_J4sm4/pubhtml’;

@$homepage = file_get_contents($targeturl);
if (!@file_get_contents($targeturl)) {
echo $noConnect.”
“.”
“;
}

//Test New Code V 1.0
//ID Following
//Point 1 is Following number
$point1 = strpos($homepage,$strWord);
(String) $cutFnumber = substr($homepage, $point1 +7, 4);
//echo $cutFnumber.”
“;

//Need Person
//Point 2 is Need Person
$strPoint2 = “kprumsneed81”.$strWord3;
$point2 = strpos($homepage,$strPoint2);
(String) $cutNperson = substr($homepage, $point2 +16, 150);
$arrayNperson = explode(“kprumsneed91″,$cutNperson);
//echo $arrayNperson[0].”
“;

//Category
//Point 3 is Category point
$strPoint3 = “kprumsct81”.$strWord3;
$point3 = strpos($homepage,$strPoint3);
(String) $cutCT = substr($homepage, $point3 +14, 100);
$arrayCT = explode(“kprumsct91″,$cutCT);
//echo $arrayCT[0].”
“;

//Person in charge
//Point 4 is Person in charge point
$strPoint4 = “kprumspeic81”.$strWord3;
$point4 = strpos($homepage,$strPoint4);
(String) $cutPeIC = substr($homepage, $point4 +16, 100);
$arraypeic = explode(“kprumspeic91″,$cutPeIC);
//echo $arraypeic[0].”
“;

//Inspector
//Point 5 is Inspector point
$strPoint5 = “kprumsrece81”.$strWord3;
$point5 = strpos($homepage,$strPoint5);
(String) $cutRece = substr($homepage, $point5 +16, 100);
$arrayrece = explode(“kprumsrece91″,$cutRece);
//echo $arrayrece[0].”
“;

//Status Worker
//Point 6 is Status Worker
$strPoint6 = “kprumskey81″.$strWord3;
$point6 = strpos($homepage,$strPoint6);
(String) $cutSAbook = substr($homepage, $point6 +15, 4);
//echo $cutSAbook.”
“;

//Style String
$Color1 = “blue”;
$Color2 = “green”;
$Color3 = “red”;
$Color4 = “white”;
$Color5 = “black”;
$fontSize = “20px”;
$fontSizeSM = “12px”;

$receive = “wl01”;
$spread = “wl02”;
$working = “wl03”;
$checkwork = “wl04”;
$solve = “wl05”;
$complete = “wl06”;

$styleString = “
“.’‘.’ใบแจ้งซ่อมหมายเลข ‘.’
.’‘.$cutFnumber.’‘.”
“.”
“.”
“.”
“.”

.’‘.’ผู้ขอรับบริการ ‘.’
.’‘.$arrayNperson[0].”…”.’‘.”
“.”
“.”
“.”
“.”

.’‘.’ประเภทงาน ‘.’
.’‘.$arrayCT[0].’‘.”
“.”
“.”
“.”
“.”

.’‘.’ผู้รับผิดชอบ ‘.’
.’‘.$arraypeic[0].’‘.”
“.”
“.”
“.”
“.”

.’‘.’ผู้ตรวจงาน ‘.’
.’‘.$arrayrece[0].’‘.”
“;

$styleStats = ‘

‘.’สถานะการดำเนินการ ‘.’

‘.”
“;

$noFindBook = ‘

‘.’ไม่มีหมายเลขใบแจ้งซ่อมที่ค้นหาครับ’.’

‘;

$workload1 = ‘


.’เจ้าหน้าที่รับเรื่องแจ้งซ่อมแล้ว’.’

‘;
$workload2 = ‘


.’ดำเนินการกระจายให้ผู้รับผิดชอบ’.’

‘;
$workload3 = ‘


.’อยู่ระหว่างดำเนินการเข้าซ่อมบำรุง’.’

‘;
$workload4 = ‘


.’อยู่ระหว่างการตรวจสอบความเรียบร้อยของงานซ่อมบำรุง’.’

‘;
$workload5 = ‘


.’ดำเนินการแก้ไขงานซ่อมบำรุง’.’

‘;
$workload6 = ‘


.’ดำเนินการซ่อมบำรุงเสร็จสิ้น’.’

‘;

$wl1 = “kprumskey81”.$strWord3.”wl01″;
$wl2 = “kprumskey81”.$strWord3.”wl02″;
$wl3 = “kprumskey81”.$strWord3.”wl03″;
$wl4 = “kprumskey81”.$strWord3.”wl04″;
$wl5 = “kprumskey81”.$strWord3.”wl05″;
$wl6 = “kprumskey81”.$strWord3.”wl06″;

$pointwl1 = strpos($homepage, $wl1);
$pointwl2 = strpos($homepage, $wl2);
$pointwl3 = strpos($homepage, $wl3);
$pointwl4 = strpos($homepage, $wl4);
$pointwl5 = strpos($homepage, $wl5);
$pointwl6 = strpos($homepage, $wl6);

if($strWord2 == ‘0’){
echo ‘

‘.’กรุณาใส่เลขอีกครั้งครับ’.’

‘;
} else if($strWord2 == ‘1’){

if($pointwl6 !== false){
$workload = “1”;
echo $styleString.$styleStats.$workload6;
} else if($pointwl5 !== false){
$workload = “1”;
echo $styleString.$styleStats.$workload5;
} else if($pointwl4 !== false){
$workload = “1”;
echo $styleString.$styleStats.$workload4;
} else if($pointwl3 !== false){
$workload = “1”;
echo $styleString.$styleStats.$workload3;
} else if($pointwl2 !== false){
$workload = “1”;
echo $styleString.$styleStats.$workload2;
} else if($pointwl1 !== false){
$workload = “1”;
echo $styleString.$styleStats.$workload1;
} else {
$workload = “0”;
echo $noFindBook;
}

}

/*if($strWord2 == ‘0’){
echo ‘

‘.’กรุณาใส่เลขอีกครั้งครับ’.’

‘;
} else if($strWord2 == ‘1’){
//echo ‘1 loop’;
if($cutSAbook==$receive){
echo $styleString.$styleStats.$workload1;
}
else if($cutSAbook==$spread){
echo $styleString.$styleStats.$workload2;
}
else if($cutSAbook==$working){
echo $styleString.$styleStats.$workload3;
}
else if($cutSAbook==$checkwork){
echo $styleString.$styleStats.$workload4;
}
else if($cutSAbook==$solve){
echo $styleString.$styleStats.$workload5;
}
else if($cutSAbook==$complete){
echo $styleString.$styleStats.$workload6;
} else {
echo $noFindBook;
}
} else {
echo $noFindBook;
}*/
//echo $cutstr;

[/insert_php]

 
 
 

 


เปิดรับสมัครนักศึกษาภาคปกติประจำปีการศึกษา 2563 แล้ววันนี้!!