Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var app = new Vue({
- el: '#app',
- data: {
- loading: false
- },
- methods: {
- grade: function(pass, pegi) {
- this.loading = true;
- axios.post("{{ route('mod-interview-grade', $exam) }}", {
- pass: pass,
- pegi: pegi,
- if (pass)
- {
- var mysql = require('mysql');
- var con = mysql.createConnection({
- host: 'localhost',
- user: 'root',
- password: '52365236',
- database : 'intranet',
- con.connect(function(err) {
- if (err) throw err;
- con.query(`SELECT steamid FROM users WHERE steamid=${steam}`).then(function(err, result, fields) {
- if (err) throw err;
- return result;
- }).then(function(steamid) {
- var con2 = mysql.createConnection({
- host: 'localhost',
- user: 'root',
- password: '52365236',
- database : 'altislife',
- con2.connect(function(err) {
- if (err) throw err;
- con2.query(`INSERT INTO whitelist (pid, whitelist) VALUES ('${steamid}', 1)`).then(function(err, result, fields) {
- if (err) throw err;
- console.log(result);
- });
- });
- });
- });
- });
- });
- }).then(function() {
- window.location.replace("{{ route('mod-user', $exam->user) }}");
- }).catch(function() {
- window.location.replace("{{ route('mod-user', $exam->user) }}");
- });
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement