$link = db_connect();
$getSubMenu = function($parent) use ($link)
## -- Выборка из БД наименование страниц и возврат результата.
{
$result = "SELECT *
FROM m_pages
WHERE m_pages.parent='$parent'
ORDER BY m_pages.id";
$result = $link->query($result);
$result->setFetchMode(PDO::FETCH_ASSOC);
return $result;
};
$getSubMenu($parent);
$('#checkbox').change(function() {
if($(this).prop('checked')) {
$.ajax({
///
///
data: {
prop: $(this).data('propertyName')
}
//
//
});
}
});
function Human(name) {
Human.country = 'USA';
this.name = name;
console.log('Имя: '+this.name);
console.log('Страна: '+Human.country);
}
let vasya = new Human('Вася');
let maria = new Human('Маша');
let list = $('.list');
let url = list.data('url');
let lang = list.data('lang');
list.typeahead({
onSelect: function(item) {
console.log(item)
},
ajax: {
url,
data: {lang},
method: "post",
triggerLength: 1,
preDispatch: function(query){
return {name:query};
},
}
});
function f(){};
if (f) {
alert(typeof(f));
}
const session = require('express-session');
const sessionStore = require('express-mysql-session');
let corsOptions = {
origin: 'http://front.xxx.ru',
optionsSuccessStatus: 200,
credentials: true
};
app.use(cors(corsOptions));
$httpProvider.defaults.withCredentials = true;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.open('POST', 'http://xxx.ru', true)
$.ajax({
///
crossDomain: true,
///
});
async getAllMembers(id) {
try {
return await model.query('select * from `group_members` where `group_id` = ?', [id]);
} catch(e) {
return e;
}
}