mirror of
				https://gitea.augustin64.fr/piair/MsRewards-Reborn.git
				synced 2025-11-03 23:23:53 +01:00 
			
		
		
		
	ca avance
This commit is contained in:
		@@ -371,11 +371,14 @@ def stats():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
@app.route("/override/", methods=["POST"])
 | 
					@app.route("/override/", methods=["POST"])
 | 
				
			||||||
def override_post():
 | 
					def override_post():
 | 
				
			||||||
 | 
					    print(request.form)
 | 
				
			||||||
    return(render_template("vnc_post.html"))
 | 
					    return(render_template("vnc_post.html"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@app.route("/override/", methods=["GET"])
 | 
					@app.route("/override/", methods=["GET"])
 | 
				
			||||||
def override_get():
 | 
					def override_get():
 | 
				
			||||||
    return(render_template("vnc_get.html"))
 | 
					    with open("/app/MsRewards-Reborn/user_data/configs.json", "r") as inFile:
 | 
				
			||||||
 | 
					        configs = json.load(inFile)
 | 
				
			||||||
 | 
					    return(render_template("vnc_get.html", configs=configs))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@app.route('/download/<path:filename>', methods=['GET', 'POST'])
 | 
					@app.route('/download/<path:filename>', methods=['GET', 'POST'])
 | 
				
			||||||
@login_required
 | 
					@login_required
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -241,7 +241,7 @@ body {
 | 
				
			|||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
input[type=checkbox]{
 | 
					input.toogle[type=checkbox]{
 | 
				
			||||||
    height: 0;
 | 
					    height: 0;
 | 
				
			||||||
    width: 0;
 | 
					    width: 0;
 | 
				
			||||||
    visibility: hidden;
 | 
					    visibility: hidden;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -25,11 +25,11 @@
 | 
				
			|||||||
        </tr>
 | 
					        </tr>
 | 
				
			||||||
        <tr>
 | 
					        <tr>
 | 
				
			||||||
            <td class="comlumn-name">Send errors</td>
 | 
					            <td class="comlumn-name">Send errors</td>
 | 
				
			||||||
            <td><input type="checkbox" id="errorsT" name="errorsT" /><label for="errorsT">Toggle</label></td>
 | 
					            <td><input type="checkbox" id="errorsT" name="errorsT" class="toogle"/><label for="errorsT">Toggle</label></td>
 | 
				
			||||||
        </tr>
 | 
					        </tr>
 | 
				
			||||||
        <tr>
 | 
					        <tr>
 | 
				
			||||||
            <td class="comlumn-name">Send success</td>
 | 
					            <td class="comlumn-name">Send success</td>
 | 
				
			||||||
            <td><input type="checkbox" id="successT" name="successT" /><label for="successT">Toggle</label></td>
 | 
					            <td><input type="checkbox" id="successT" name="successT" class="toogle"/><label for="successT">Toggle</label></td>
 | 
				
			||||||
        </tr>
 | 
					        </tr>
 | 
				
			||||||
        <tr>
 | 
					        <tr>
 | 
				
			||||||
            <td class="comlumn-name">Success link</td>
 | 
					            <td class="comlumn-name">Success link</td>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,7 +16,7 @@
 | 
				
			|||||||
                <input type="time" id="{{i}}" name="time{{i}}" value="{{data[i]['time']}}" required>
 | 
					                <input type="time" id="{{i}}" name="time{{i}}" value="{{data[i]['time']}}" required>
 | 
				
			||||||
            </td>
 | 
					            </td>
 | 
				
			||||||
            <td>
 | 
					            <td>
 | 
				
			||||||
                <input type="checkbox" id="switch{{i}}" name="switch{{i}}" {{ "checked" if data[i]['enabled'] == True else "" }} />
 | 
					                <input type="checkbox" class="toogle" id="switch{{i}}" name="switch{{i}}" {{ "checked" if data[i]['enabled'] == True else "" }} />
 | 
				
			||||||
                <label for="switch{{i}}">
 | 
					                <label for="switch{{i}}">
 | 
				
			||||||
                    Toggle
 | 
					                    Toggle
 | 
				
			||||||
                </label>
 | 
					                </label>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,47 +7,45 @@
 | 
				
			|||||||
{%if not current_user.is_authenticated %}
 | 
					{%if not current_user.is_authenticated %}
 | 
				
			||||||
    <button class="unselected" onclick="location.href = '/login';">login</button>
 | 
					    <button class="unselected" onclick="location.href = '/login';">login</button>
 | 
				
			||||||
{% else %}
 | 
					{% else %}
 | 
				
			||||||
 | 
					<script>data = JSON.parse('{{configs|tojson}}'); </script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<form method="post" action="/config/">
 | 
					<script>
 | 
				
			||||||
    <table>
 | 
					
 | 
				
			||||||
 | 
					function change_override(value, data) {
 | 
				
			||||||
 | 
					    for (let i = 1; i < 6; i++) {
 | 
				
			||||||
 | 
					        document.getElementById("compte_"+ i).innerHTML = data[parseInt(value)]['accounts'][i]["mail"];
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					<form method="post" action="/override/" height="90%">
 | 
				
			||||||
 | 
					    <select onchange="change_override(this.value, data)" name="config">
 | 
				
			||||||
 | 
					        {% for i in configs %}
 | 
				
			||||||
 | 
					        <option id="{{configs[i]['name']}}" value="{{i}}">{{configs[i]['name']}}</option>
 | 
				
			||||||
 | 
					        {% endfor %}
 | 
				
			||||||
 | 
					    </select>
 | 
				
			||||||
 | 
					    <table height="90%" class="lines">
 | 
				
			||||||
        <tr>
 | 
					        <tr>
 | 
				
			||||||
            <td style="width: 10%;">config : </td>
 | 
					            <td width="30%">name</td>
 | 
				
			||||||
            <td style="width: 40%;">
 | 
					            <td width="14%">Unban</td>
 | 
				
			||||||
                <select onchange="change_config(this.value, data2, '{{len}}')" name="config">
 | 
					            <td width="14%">tout</td>
 | 
				
			||||||
                    <option id="config" value="{{len}}">New config</option>
 | 
					            <td width="14%">pc</td>
 | 
				
			||||||
                    {% for i in configs %}
 | 
					            <td width="14%">mobile</td>
 | 
				
			||||||
                    <option id="{{configs[i]['name']}}" value="{{i}}">{{configs[i]['name']}}</option>
 | 
					            <td width="14%">log points</td>
 | 
				
			||||||
                    {% endfor %}
 | 
					 | 
				
			||||||
                </select>
 | 
					 | 
				
			||||||
            </td>
 | 
					 | 
				
			||||||
            <td style="width: 10%;">name : </td>
 | 
					 | 
				
			||||||
            <td>
 | 
					 | 
				
			||||||
                <input type="text" id="name" name="name" value = "">
 | 
					 | 
				
			||||||
            </td>
 | 
					 | 
				
			||||||
        </tr>
 | 
					        </tr>
 | 
				
			||||||
        <tr>
 | 
					        {% for i in range(1,6) %}
 | 
				
			||||||
            <td style="width: 10%;">Proxy : </td>
 | 
					        <tr heigh="15%">
 | 
				
			||||||
            <td style="width: 40%;">
 | 
					            <td id="compte_{{i}}"></td>
 | 
				
			||||||
                <select id="proxy" name="proxy">
 | 
					            <td><input type="checkbox" id="compte_{{i}}" value="unban"></td>
 | 
				
			||||||
                    <option id="" value="-1">No proxy</option>
 | 
					            <td><input type="checkbox" id="compte_{{i}}" value="tout"></td>
 | 
				
			||||||
                    {% for i in proxys %}
 | 
					            <td><input type="checkbox" id="compte_{{i}}" value="pc"></td>
 | 
				
			||||||
                    <option id="{{proxys[i]['name']}}" value="{{i}}">{{proxys[i]['name']}}</option>
 | 
					            <td><input type="checkbox" id="compte_{{i}}" value="mobile"></td>
 | 
				
			||||||
                    {% endfor %}
 | 
					            <td><input type="checkbox" id="compte_{{i}}" value="log_points"></td>
 | 
				
			||||||
                </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>
 | 
					        </tr>
 | 
				
			||||||
 | 
					        {% endfor %}
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
    </table>
 | 
					    </table>
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    <input type="submit" name="VNC" id="submit" value="Start" class="confirm" style="width:60%;"/>
 | 
				
			||||||
 | 
					</form>
 | 
				
			||||||
{% endif %}
 | 
					{% endif %}
 | 
				
			||||||
{%endblock %}
 | 
					{%endblock %}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user