-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUCS2Azure.svelte
More file actions
23 lines (22 loc) · 955 Bytes
/
UCS2Azure.svelte
File metadata and controls
23 lines (22 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<script>
import Hashids from "hashids";
import {slugify} from './helfer'
const mysql = R("mysql");
export let knexConfig, privat
let regel;
if (!privat.paedml_salt) throw "Kein Salt";
const hashids = new Hashids( privat.paedml_salt, 8, "abcdefghkmnpqrstuvwxyz23456789");
knexConfig.connection.database="schild_kbk"
const mysql_connection = mysql.createConnection(knexConfig.connection);
mysql_connection.connect();
const query = `SELECT ID, Name, Vorname, Klasse
FROM schueler
WHERE Status = 2 AND Geloescht = "-" AND Gesperrt = "-"
ORDER BY Klasse, Name ASC`
mysql_connection.query(query, (e,res)=> e ? console.log(e, "reg"): (regel=res))
</script>
{#if regel}
<pre>
{#each regel as s}python2 connect_existing_users.py -p {slugify(s.Vorname).toLowerCase()}.{slugify(s.Name).toLowerCase()}@fvb-berufskolleg.de -u b{s.ID} -a -m<br>{/each}
</pre>
{/if}