|
@ -1,7 +1,7 @@ |
|
|
<?php |
|
|
<?php |
|
|
require_once("../../config.php"); |
|
|
require_once("../../config.php"); |
|
|
require_once("./searchform.php"); |
|
|
require_once("./searchform.php"); |
|
|
include('httpful.phar'); |
|
|
//include('httpful.phar'); |
|
|
|
|
|
|
|
|
// Check if user is logged and not guest |
|
|
// Check if user is logged and not guest |
|
|
require_login(); |
|
|
require_login(); |
|
@ -9,26 +9,17 @@ if (isguestuser()) { |
|
|
die(); |
|
|
die(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
global $DB; |
|
|
|
|
|
|
|
|
|
|
|
// Prepare page |
|
|
// Prepare page |
|
|
$context = context_system::instance(); |
|
|
$context = context_system::instance(); |
|
|
$PAGE->set_pagelayout('standard'); |
|
|
$PAGE->set_pagelayout('standard'); |
|
|
$PAGE->set_url('/blocks/fale_conosco/index.php'); |
|
|
$PAGE->set_url('/blocks/fale_conosco/index.php'); |
|
|
|
|
|
$PAGE->requires->css(new moodle_url('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css')); |
|
|
$PAGE->requires->css(new moodle_url('https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css')); |
|
|
$PAGE->requires->css(new moodle_url('https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css')); |
|
|
$PAGE->requires->css(new moodle_url('https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css')); |
|
|
$PAGE->requires->css(new moodle_url('https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css')); |
|
|
$PAGE->requires->css(new moodle_url('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css')); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//$PAGE->requires->js('/blocks/fale_conosco/datatable.js', true); |
|
|
|
|
|
/* |
|
|
|
|
|
$PAGE->requires->js(new moodle_url('https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js'),true); |
|
|
|
|
|
$PAGE->requires->js(new moodle_url('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js'),true); |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
$PAGE->set_context($context); |
|
|
$PAGE->set_context($context); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Get data |
|
|
// Get data |
|
|
$strtitle = get_string('fale_conosco', 'block_fale_conosco'); |
|
|
$strtitle = get_string('fale_conosco', 'block_fale_conosco'); |
|
|
$user = $USER; |
|
|
$user = $USER; |
|
@ -63,7 +54,6 @@ echo $OUTPUT->header(); |
|
|
echo $OUTPUT->box_start('generalbox boxaligncenter'); |
|
|
echo $OUTPUT->box_start('generalbox boxaligncenter'); |
|
|
echo $OUTPUT->heading(get_string('fale_conosco', 'block_fale_conosco')); |
|
|
echo $OUTPUT->heading(get_string('fale_conosco', 'block_fale_conosco')); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Instantiate simplehtml_form |
|
|
//Instantiate simplehtml_form |
|
|
$mform = new searchform(); |
|
|
$mform = new searchform(); |
|
|
|
|
|
|
|
@ -159,7 +149,7 @@ if ($mform->is_cancelled()) { |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<?php |
|
|
<?php |
|
|
$PAGE->requires->js_call_amd('block_fale_conosco/config', 'init'); |
|
|
$PAGE->requires->js_call_amd('block_fale_conosco/config', 'init'); |
|
|
//$PAGE->requires->js_call_amd('block_fale_conosco/config', 'getTableContacts'); |
|
|
//$PAGE->requires->js_call_amd('block_fale_conosco/config', 'getTableContacts'); |
|
|
?> |
|
|
?> |
|
|
|
|
|
|
|
|