mirror of
				https://gitea.augustin64.fr/piair/MsRewards-Reborn.git
				synced 2025-11-04 07:33:53 +01:00 
			
		
		
		
	bruh ?
This commit is contained in:
		
							
								
								
									
										167
									
								
								Flask/templates/accounts.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										167
									
								
								Flask/templates/accounts.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,167 @@
 | 
			
		||||
{% extends "base.html" %}
 | 
			
		||||
{% block left_pannel %}
 | 
			
		||||
<table>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/override';">override</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="selected" onclick="location.href = '/accounts';">accounts</button>
 | 
			
		||||
        </td>  
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/discord';">discord</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/database';">database</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/proxy';">proxy</button>
 | 
			
		||||
        </td>  
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/settings';">settings</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
</table>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
{%if not current_user.is_authenticated %}
 | 
			
		||||
    <button class="unselected" onclick="location.href = '/login';">login</button>
 | 
			
		||||
{% else %}
 | 
			
		||||
<form method="post" action="/accounts/">
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    <table>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td style="width: 10%;">config : </td>
 | 
			
		||||
            <td style="width: 40%;">
 | 
			
		||||
                <select onchange="changecat(this.value)" name="config">
 | 
			
		||||
                    <option id="config" value="{{len}}">New config</option>
 | 
			
		||||
                    {% for i in configs %}
 | 
			
		||||
                    <option id="{{configs[i]['name']}}" value="{{i}}">{{configs[i]['name']}}</option>
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
                </select>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td style="width: 10%;">name : </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input type="text" id="name" name="name" value = "">
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td style="width: 10%;">Proxy : </td>
 | 
			
		||||
            <td style="width: 40%;">
 | 
			
		||||
                <select id="proxy" name="proxy">
 | 
			
		||||
                    <option id="" value="-1">No proxy</option>
 | 
			
		||||
                    {% for i in proxys %}
 | 
			
		||||
                    <option id="{{proxys[i]['name']}}" value="{{i}}">{{proxys[i]['name']}}</option>
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
                </select>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td style="width: 10%;">Discord : </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select id="discord" name="discord">
 | 
			
		||||
                    <option id="no discord" value="-1">No discord (not sure about the support)</option>
 | 
			
		||||
                    {% for i in discords %}
 | 
			
		||||
                    <option id="{{discords[i]['name']}}" value="{{i}}">{{discords[i]['name']}}</option>
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
                </select>
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
    </table>
 | 
			
		||||
    <br><br>
 | 
			
		||||
    <table>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>Mail</td>
 | 
			
		||||
            <td>Password</td>
 | 
			
		||||
            <td>2FA</td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td><input type="text" id="mail1" name="mail1" value=""></td>
 | 
			
		||||
            <td><input type="text" id="pwd1"  name="pwd1"  value=""></td>
 | 
			
		||||
            <td><input type="text" id="2fa1"  name="2fa1"  value=""></td>
 | 
			
		||||
            <td class="left-button"><button class="ban" name="ban" value="">ban</button></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td><input type="text" id="mail2" name="mail2" value=""></td>
 | 
			
		||||
            <td><input type="text" id="pwd2"  name="pwd2"  value=""></td>
 | 
			
		||||
            <td><input type="text" id="2fa2"  name="2fa2"  value=""></td>
 | 
			
		||||
            <td class="left-button"><button class="ban" name="ban" value="">ban</button></td>
 | 
			
		||||
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td><input type="text" id="mail3" name="mail3" value=""></td>
 | 
			
		||||
            <td><input type="text" id="pwd3"  name="pwd3"  value="" ></td>
 | 
			
		||||
            <td><input type="text" id="2fa3"  name="2fa3"  value=""></td>
 | 
			
		||||
            <td class="left-button"><button class="ban" name="ban" value="">ban</button></td>
 | 
			
		||||
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td><input type="text" id="mail4" name="mail4" value=""></td>
 | 
			
		||||
            <td><input type="text" id="pwd4"  name="pwd4"  value="" ></td>
 | 
			
		||||
            <td><input type="text" id="2fa4"  name="2fa4"  value=""></td>
 | 
			
		||||
            <td class="left-button"><button class="ban" name="ban" value="">ban</button></td>
 | 
			
		||||
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td><input type="text" id="mail5" name="mail5" value=""></td>
 | 
			
		||||
            <td><input type="text" id="pwd5"  name="pwd5"  value=""></td>
 | 
			
		||||
            <td><input type="text" id="2fa5"  name="2fa5"  value=""></td>
 | 
			
		||||
            <td class="left-button"><button class="ban" name="ban" value="">ban</button></td>
 | 
			
		||||
 | 
			
		||||
        </tr>
 | 
			
		||||
    </table>
 | 
			
		||||
    <input type="submit" class="confirm" name="data" id="submit" value="Update !" class="button"/>
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
</form>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
    function changecat(value) {
 | 
			
		||||
        data = JSON.parse('{{data|tojson}}'); //convertit le dictionnaire data en JSON
 | 
			
		||||
        console.log(this.value)
 | 
			
		||||
        if (value == "{{len}}"){
 | 
			
		||||
            document.getElementById("submit").value = "Create !";
 | 
			
		||||
            document.getElementById("discord").value = "-1";
 | 
			
		||||
            document.getElementById("proxy").value = "-1";
 | 
			
		||||
            document.getElementById("name").value = "";
 | 
			
		||||
            for (let i = 1; i < 6; i++) {
 | 
			
		||||
                document.getElementById("mail"+ i).value = "";
 | 
			
		||||
                document.getElementById("pwd"+  i).value = "" ;
 | 
			
		||||
                document.getElementById("2fa"+  i).value = "" ;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            document.getElementById("submit").value = "Update !";
 | 
			
		||||
            document.getElementById("discord").value = data[parseInt(value)]["discord"];
 | 
			
		||||
            document.getElementById("proxy").value = data[parseInt(value)]["proxy"];
 | 
			
		||||
            document.getElementById("name").value = data[parseInt(value)]["name"];
 | 
			
		||||
            for (let i = 1; i < 6; i++) {
 | 
			
		||||
                document.getElementById("mail"+ i).value = data[parseInt(value)]['accounts'][i]["mail"] ;
 | 
			
		||||
                document.getElementById("pwd"+  i).value = data[parseInt(value)]['accounts'][i]["pwd"] ;
 | 
			
		||||
                document.getElementById("2fa"+  i).value = data[parseInt(value)]['accounts'][i]["2fa"] ;
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{% endif %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										25
									
								
								Flask/templates/base.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								Flask/templates/base.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html>
 | 
			
		||||
    <head>
 | 
			
		||||
        <meta name="robots" content="noindex, nofollow">
 | 
			
		||||
        <meta charset="utf-8">
 | 
			
		||||
        <link rel="icon" type="image/png" href="{{ url_for('static', filename='favicon.ico') }}">
 | 
			
		||||
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
 | 
			
		||||
        <meta name="viewport" content="width=device-width, initial-scale=1">
 | 
			
		||||
        <title>MS Rewards</title>
 | 
			
		||||
        <link rel="stylesheet" href="{{ url_for('static', filename='css/flask.css') }}" />
 | 
			
		||||
    </head>
 | 
			
		||||
    <body>
 | 
			
		||||
        <div class="container">
 | 
			
		||||
            <div class="left-pannel">
 | 
			
		||||
                {% block left_pannel %}
 | 
			
		||||
                {% endblock %}
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="content">
 | 
			
		||||
                {% block content %}
 | 
			
		||||
                {% endblock %}
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
    </body>
 | 
			
		||||
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										94
									
								
								Flask/templates/database.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										94
									
								
								Flask/templates/database.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,94 @@
 | 
			
		||||
{% extends "base.html" %}
 | 
			
		||||
{% block left_pannel %}
 | 
			
		||||
 | 
			
		||||
<table>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/override';">override</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/accounts';">accounts</button>
 | 
			
		||||
        </td>  
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/discord';">discord</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="selected" onclick="location.href = '/database';">database</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/proxy';">proxy</button>
 | 
			
		||||
        </td>  
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/settings';">settings</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
</table>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
 | 
			
		||||
{%if not current_user.is_authenticated %}
 | 
			
		||||
    <button class="unselected" onclick="location.href = '/login';">login</button>
 | 
			
		||||
{% else %}
 | 
			
		||||
<form method="post" action="/database/">
 | 
			
		||||
    
 | 
			
		||||
    <table>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td class="comlumn-name"></td>
 | 
			
		||||
            <td><input type="checkbox" id="switch" name="switch" {{data['checked']}}  /><label for="switch">Toggle</label></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td class="comlumn-name">address : </td>
 | 
			
		||||
            <td><input type="text" name="address" value="{{ data['host']}}"></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td class="comlumn-name">table : </td>
 | 
			
		||||
            <td><input type="text" name="table" value="{{ data['table']}}"></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td class="comlumn-name">user : </td>
 | 
			
		||||
            <td><input type="text" name="user" value="{{ data['usr']}}"></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td class="comlumn-name">password : </td>
 | 
			
		||||
            <td><input type="text" name="password" value="{{ data['pwd']}}"></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td></td>
 | 
			
		||||
            <td><input type="submit"  name="data" value="Update !" class="button"/></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
    </table>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
</form>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
function changecat(value) {
 | 
			
		||||
    if (value == "new"){
 | 
			
		||||
        document.getElementById("address").value = value;
 | 
			
		||||
        document.getElementById("port").value = value;
 | 
			
		||||
        document.getElementById("name").value = value;
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
        document.getElementById("address").value = value;
 | 
			
		||||
        document.getElementById("port").value = value;
 | 
			
		||||
        document.getElementById("name").value = value;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
{% endif %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										97
									
								
								Flask/templates/dev.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										97
									
								
								Flask/templates/dev.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,97 @@
 | 
			
		||||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block left_pannel %}
 | 
			
		||||
 | 
			
		||||
<table>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = 'override';">override</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = 'accounts';">accounts</button>
 | 
			
		||||
        </td>  
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = 'discord';">discord</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = 'database';">database</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = 'proxy';">proxy</button>
 | 
			
		||||
        </td>  
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = 'settings';">settings</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
</table>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
{%if not current_user.is_authenticated %}
 | 
			
		||||
    <button class="unselected" onclick="location.href = '/login';">login</button>
 | 
			
		||||
{% else %}
 | 
			
		||||
<form method="post" action="/">
 | 
			
		||||
    
 | 
			
		||||
    <table>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select name="select" onchange="changecat(this.value)">
 | 
			
		||||
                    <option>AAAAA</option>
 | 
			
		||||
                    <option>BBBBB</option>
 | 
			
		||||
                </select>
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td class="comlumn-name">name : </td>
 | 
			
		||||
            <td><input type="text" id="name" name="name" value="default-data"></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td class="comlumn-name">address : </td>
 | 
			
		||||
            <td><input type="text" name="address" id="address" value="default-data"></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td class="comlumn-name">port : </td>
 | 
			
		||||
            <td><input type="text" id="port" name="port" value="default-data"></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td></td>
 | 
			
		||||
            <td><input type="submit"  name="data" value="Update !" class="button"/></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
    </table>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
</form>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
    function changecat(value) {
 | 
			
		||||
        if (value == "new"){
 | 
			
		||||
            document.getElementById("address").value = value;
 | 
			
		||||
            document.getElementById("port").value = value;
 | 
			
		||||
            document.getElementById("name").value = value;
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            document.getElementById("address").value = value;
 | 
			
		||||
            document.getElementById("port").value = value;
 | 
			
		||||
            document.getElementById("name").value = value;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
{% endif %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										109
									
								
								Flask/templates/discord.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										109
									
								
								Flask/templates/discord.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,109 @@
 | 
			
		||||
{% extends "base.html" %}
 | 
			
		||||
{% block left_pannel %}
 | 
			
		||||
 | 
			
		||||
<table>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/override';">override</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/accounts';">accounts</button>
 | 
			
		||||
        </td>  
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="selected" onclick="location.href = '/discord';">discord</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/database';">database</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/proxy';">proxy</button>
 | 
			
		||||
        </td>  
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/settings';">settings</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
</table>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
{% block content %}
 | 
			
		||||
 | 
			
		||||
{%if not current_user.is_authenticated %}
 | 
			
		||||
    <button class="unselected" onclick="location.href = '/login';">login</button>
 | 
			
		||||
{% else %}
 | 
			
		||||
<form method="post" action="/discord/">
 | 
			
		||||
    <table>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td></td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select name="select" onchange="changecat(this.value)">
 | 
			
		||||
                    <option selected id="new" value="{{ len }}">Create new Discord config</option>
 | 
			
		||||
                    {% for i in data %}
 | 
			
		||||
                    <option id="{{data[i]['name']}}" value="{{i}}">{{data[i]['name']}}</option>
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
                </select>
 | 
			
		||||
            </td>
 | 
			
		||||
            
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td class="comlumn-name">name</td>
 | 
			
		||||
            <td><input type="text" id="name" name="name" value=""></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td class="comlumn-name">Send errors</td>
 | 
			
		||||
            <td><input type="checkbox" id="errorsT" name="errorsT" /><label for="errorsT">Toggle</label></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td class="comlumn-name">Send success</td>
 | 
			
		||||
            <td><input type="checkbox" id="successT" name="successT" /><label for="successT">Toggle</label></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td class="comlumn-name">Success link</td>
 | 
			
		||||
            <td><input type="text" id="successL" name="successL" value=""></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td class="comlumn-name">Failure Link</td>
 | 
			
		||||
            <td><input type="text" id="errorsL" name="errorsL" value=""></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td></td>
 | 
			
		||||
            <td><input type="submit"  name="DISCORD" id="submit" value="Create !" class="button"/></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
    </table>
 | 
			
		||||
    
 | 
			
		||||
</form>
 | 
			
		||||
<script>
 | 
			
		||||
    function changecat(value) {
 | 
			
		||||
        data = JSON.parse('{{data|tojson}}'); //convertit le dictionnaire data en JSON
 | 
			
		||||
        
 | 
			
		||||
        if (value == "{{len}}"){
 | 
			
		||||
            document.getElementById("name").value = "";
 | 
			
		||||
            document.getElementById("submit").value = "Create !";
 | 
			
		||||
            document.getElementById("successT").checked = false;
 | 
			
		||||
            document.getElementById("errorsT").checked = false;
 | 
			
		||||
            document.getElementById("successL").value = "";
 | 
			
		||||
            document.getElementById("errorsL").value = "";
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            console.log(data[parseInt(value)]["successL"]);
 | 
			
		||||
            document.getElementById("submit").value = "Update";
 | 
			
		||||
            document.getElementById("successT").checked = data[parseInt(value)]["successT"] == "True";
 | 
			
		||||
            document.getElementById("errorsT").checked = data[parseInt(value)]["errorsT"] == "True";
 | 
			
		||||
            document.getElementById("successL").value = data[parseInt(value)]["successL"];
 | 
			
		||||
            document.getElementById("errorsL").value = data[parseInt(value)]["errorsL"];
 | 
			
		||||
            document.getElementById("name").value = data[parseInt(value)]["name"];
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
{% endif %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										57
									
								
								Flask/templates/login.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								Flask/templates/login.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,57 @@
 | 
			
		||||
{% extends "base.html" %}
 | 
			
		||||
{% block left_pannel %}
 | 
			
		||||
 | 
			
		||||
<table>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/override';">override</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/accounts';">accounts</button>
 | 
			
		||||
        </td>  
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/discord';">discord</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/database';">database</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/proxy';">proxy</button>
 | 
			
		||||
        </td>  
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/settings';">settings</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
</table>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
{% block content %}
 | 
			
		||||
 | 
			
		||||
{%if not current_user.is_authenticated %}
 | 
			
		||||
<form method="post" action="/login/">
 | 
			
		||||
    <table>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td class="comlumn-name">password</td>
 | 
			
		||||
            <td><input type="text" name="password"></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td></td>
 | 
			
		||||
            <td><input type="submit"  name="DISCORD" value="send" class="button"/></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
    </table>
 | 
			
		||||
    
 | 
			
		||||
</form>
 | 
			
		||||
 | 
			
		||||
{% else %}
 | 
			
		||||
    <h1>Already logged in</h1>
 | 
			
		||||
{% endif %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										53
									
								
								Flask/templates/override.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								Flask/templates/override.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,53 @@
 | 
			
		||||
{% extends "base.html" %}
 | 
			
		||||
{% block left_pannel %}
 | 
			
		||||
 | 
			
		||||
<table>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="selected" onclick="location.href = '/override';">override</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/accounts';">accounts</button>
 | 
			
		||||
        </td>  
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/discord';">discord</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/database';">database</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/proxy';">proxy</button>
 | 
			
		||||
        </td>  
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/settings';">settings</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
</table>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
 | 
			
		||||
{%if not current_user.is_authenticated %}
 | 
			
		||||
    <button class="unselected" onclick="location.href = '/login';">login</button>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    {% else %}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    <h1>Not Implemented, watch terminal</h1>
 | 
			
		||||
<form method="post" action="/override/">
 | 
			
		||||
    <input type="submit"  name="data" value="Run bot" class="button"/>
 | 
			
		||||
</form>
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
{%endblock %}
 | 
			
		||||
							
								
								
									
										104
									
								
								Flask/templates/proxy.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										104
									
								
								Flask/templates/proxy.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,104 @@
 | 
			
		||||
{% extends "base.html" %}
 | 
			
		||||
{% block left_pannel %}
 | 
			
		||||
 | 
			
		||||
<table>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/override';">override</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/accounts';">accounts</button>
 | 
			
		||||
        </td>  
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/discord';">discord</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/database';">database</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="selected" onclick="location.href = '/proxy';">proxy</button>
 | 
			
		||||
        </td>  
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/settings';">settings</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
</table>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
 | 
			
		||||
{%if not current_user.is_authenticated %}
 | 
			
		||||
    <button class="unselected" onclick="location.href = '/login';">login</button>
 | 
			
		||||
{% else %}
 | 
			
		||||
<form method="post" action="/proxy/">
 | 
			
		||||
    
 | 
			
		||||
    <table>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td class="comlumn-name"></td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select name="select" onchange="changecat(this.value)">
 | 
			
		||||
                    <option selected id="new" value="{{ len }}">Create new proxy</option>
 | 
			
		||||
                    {% for i in data %}
 | 
			
		||||
                    <option id="{{data[i]['name']}}" value="{{i}}">{{data[i]['name']}}</option>
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
                </select>
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td class="comlumn-name">name : </td>
 | 
			
		||||
            <td><input type="text" name="name" value="" id="name"></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td class="comlumn-name">address : </td>
 | 
			
		||||
            <td><input type="text" name="address" value="" id="address"></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td class="comlumn-name">port : </td>
 | 
			
		||||
            <td><input type="text" name="port" value="" id="port"></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td></td>
 | 
			
		||||
            <td><input type="submit"  name="data" id="submit" value="Create" class="button"/></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
    </table>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
</form>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
    function changecat(value) {
 | 
			
		||||
        data = JSON.parse('{{data|tojson}}'); //convertit le dictionnaire data en JSON
 | 
			
		||||
        if (value == "{{len}}"){
 | 
			
		||||
            document.getElementById("submit").value = "Create";
 | 
			
		||||
            document.getElementById("address").value = "";
 | 
			
		||||
            document.getElementById("port").value = "";
 | 
			
		||||
            document.getElementById("name").value = "";
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            document.getElementById("submit").value = "Update";
 | 
			
		||||
            document.getElementById("address").value = data[parseInt(value)]["address"];
 | 
			
		||||
            document.getElementById("port").value = data[parseInt(value)]["port"];
 | 
			
		||||
            document.getElementById("name").value = data[parseInt(value)]["name"];
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
{% endif %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										58
									
								
								Flask/templates/settings.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								Flask/templates/settings.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,58 @@
 | 
			
		||||
{% extends "base.html" %}
 | 
			
		||||
{% block left_pannel %}
 | 
			
		||||
 | 
			
		||||
<table>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/override';">override</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/accounts';">accounts</button>
 | 
			
		||||
        </td>  
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/discord';">discord</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/database';">database</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="unselected" onclick="location.href = '/proxy';">proxy</button>
 | 
			
		||||
        </td>  
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <button class="selected" onclick="location.href = '/settings';">settings</button>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
</table>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
{%if not current_user.is_authenticated %}
 | 
			
		||||
    <button class="unselected" onclick="location.href = '/login';">login</button>
 | 
			
		||||
{% else %}
 | 
			
		||||
<form method="post" action="/settings/">
 | 
			
		||||
    <table>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td class="comlumn-name">avatar url :</td>
 | 
			
		||||
            <td><input type="text" name="avatarlink" value="{{data['avatarlink']}}"></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td></td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input type="submit"  name="settings" id="submit" value="update" class="button"/>
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
    </table>
 | 
			
		||||
</form>
 | 
			
		||||
{% endif %}
 | 
			
		||||
{%endblock %}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user