<commit_before><form class="pure-form-aligned">
    <div class="pure-control-group">
        <label for="ram">Select Template:</label>
        <select id="template" name="template">
            <option value="0">--- Choose One ---</option>
            {%if isset|TemplateList == true}
                {%foreach template in TemplateList}
                    <option value="{%?template[id]}">{%?template[name]}</option>
                {%/foreach}
            {%/if}
            {%if isset|TemplateList == false}
                <option>No templates for this server, please add one. (Settings => Template Manager)</option>
            {%/if}
        </select>
    </div>

    <div class="pure-control-group">
        <label for="ram">RAM (MB):</label>
        <input id="ram" type="text" name="ram" value="256">
    </div>

    <div class="pure-control-group">
        <label for="swap">SWAP (MB):</label>
        <input id="swap" type="text" name="swap" value="256">
    </div>
    
    <div class="pure-control-group">
        <label for="disk">Disk (GB):</label>
        <input id="disk" type="text" name="disk" value="10">
    </div>
    
    <div class="pure-control-group">
        <label for="cpuunits">CPU Units (1000 Default):</label>
        <input id="cpuunits" type="text" name="cpuunits" value="1000">
    </div>
    
    <div class="pure-control-group">
        <label for="cpulimit">CPU Limit (100 per Core)</label>
        <input id="cpulimit" type="text" name="cpulimit" value="100">
    </div>
    
    <div class="pure-control-group">
        <label for="bandwidthlimit">Bandwidth Limit (GB):</label>
        <input id="bandwidthlimit" type="text" name="bandwidthlimit" value="1024"">
    </div>
    
    <div class="pure-control-group">
        <label for="inodes">Inodes:</label>
        <input id="inodes" type="text" name="inodes" value="200000">
    </div>
    
    <div class="pure-control-group">
        <label for="numproc">Max Processes:</label>
        <input id="numproc" type="text" name="numproc" value="128">
    </div>
    
    <div class="pure-control-group">
        <label for="numiptent">Max Connections:</label>
        <input id="numiptent" type="text" name="numiptent" value="80">
    </div>
    
    <div class="pure-control-group">
        <label for="ipaddresses">IP Addresses:</label>
        <select name="ipaddresses" id="ipaddresses">
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="5">5</option>
            <option value="6">6</option>
            <option value="7">7</option>
            <option value="8">8</option>
            <option value="9">9</option>
            <option value="10">10</option>
        </select>
    </div>
    
    <div class="pure-control-group">
        <label for="ipv6allowed">IPv6 Allowed:</label>
        <select name="ipv6allowed" id="ipv6allowed">
            <option value="0">No</option>
            <option value="1">Yes</option>
        </select>
    </div>
    
    <div class="pure-control-group">
            <label for="hostname">Hostname (optional):</label>
            <input id="hostname" type="text" name="hostname" value="server.example.com">
    </div>
    
    <div class="pure-control-group">
            <label for="nameserver">Nameserver (optional)</label>
            <input id="nameserver" type="text" name="nameserver" value="8.8.8.8">
    </div>
    
    <div class="pure-control-group">
            <label for="password">Root Password (optional):</label>
            <input id="password" type="password" name="password" value="">
    </div>

    <div class="pure-controls">
        <input id="Create" type="button" value="Create VPS" class="pure-button pure-button-primary button-green"/>
    </div>
    
</form>

<div id="update"></div>

<script type="text/javascript">
	$(document).ready(function() {
		$("#Create").click(function() {
			$("#Create").css({visibility: "hidden"});
			loading(1);
			var user = $('#user').val();
			var server = $('#ServerSelection').val();
			var template = $('#template').val();
			var ram = $('#ram').val();
			var swap = $('#swap').val();
			var disk = $('#disk').val();
			var cpuunits = $('#cpuunits').val();
			var cpulimit = $('#cpulimit').val();
			var bandwidthlimit = $('#bandwidthlimit').val();
			var inodes = $('#inodes').val();
			var numproc = $('#numproc').val();
			var numiptent = $('#numiptent').val();
			var ipaddresses = $('#ipaddresses').val();
			var hostname = $('#hostname').val();
			var nameserver = $('#nameserver').val();
			var password = $('#password').val();
			var ipv6allowed = $('#ipv6allowed').val();
			var beginbuild = $.ajax({
				type: "POST",
				url: "admin.php?view=createvps&action=create",
				data: "password=" + password + "&user=" + user + "&server=" + server + "&template=" + template + "&ram=" + ram + "&swap=" + swap + "&disk=" + disk + "&cpuunits=" + cpuunits + "&cpulimit=" + cpulimit + "&bandwidthlimit=" + bandwidthlimit + "&inodes=" + inodes + "&numproc=" + numproc + "&numiptent=" + numiptent + "&ipaddresses=" + ipaddresses + "&hostname=" + hostname + "&nameserver=" + nameserver + "&password=" + password + "&ipv6allowed=" + ipv6allowed,
				success: function(data){
                    loading(0);
					var result = $.parseJSON(data);
					$('#update').html('<div class="alert ' + result.type + 'box">' + result.result + '</div>');
					if(result.reload == 1){
						window.location = "view.php?id=" + result.vps;
					} else {
						$("#Create").css({visibility: "visible"});
					}
				}
			});
		});
	});
</script><commit_msg><NAME> - Porting patches up from develop.<commit_after><div class="st-form-line">	
	<span class="st-labeltext">Select Template:</span>	
	<select id="template" name="template" style="width:520px;">
		<option value="0">--- Choose One ---</option>
		{%if isset|TemplateList == true}
			{%foreach template in TemplateList}
				<option value="{%?template[id]}">{%?template[name]}</option>
			{%/foreach}
		{%/if}
		{%if isset|TemplateList == false}
			<option>No templates for this server, please add one. (Settings => Template Manager)</option>
		{%/if}
	</select>
	<div class="clear"></div>
</div>
<div class="st-form-line">	
	<span class="st-labeltext">RAM (MB):</span>	
	<input id="ram" type="text" name="ram" value="256" style="width:500px;">
	<div class="clear"></div>
</div>
<div class="st-form-line">	
	<span class="st-labeltext">SWAP (MB):</span>	
	<input id="swap" type="text" name="swap" value="256" style="width:500px;">
	<div class="clear"></div>
</div>
<div class="st-form-line">	
	<span class="st-labeltext">Disk (GB):</span>	
	<input id="disk" type="text" name="disk" value="10" style="width:500px;">
	<div class="clear"></div>
</div>
<div class="st-form-line">	
	<span class="st-labeltext">CPU Units (1000 Default):</span>	
	<input id="cpuunits" type="text" name="cpuunits" value="1000" style="width:500px;">
	<div class="clear"></div>
</div>
<div class="st-form-line">	
	<span class="st-labeltext">CPU Limit (100 per Core):</span>	
	<input id="cpulimit" type="text" name="cpulimit" value="100" style="width:500px;">
	<div class="clear"></div>
</div>
<div class="st-form-line">	
	<span class="st-labeltext">Bandwidth Limit (GB):</span>	
	<input id="bandwidthlimit" type="text" name="bandwidthlimit" value="1024" style="width:500px;">
	<div class="clear"></div>
</div>
<div class="st-form-line">	
	<span class="st-labeltext">Inodes:</span>	
	<input id="inodes" type="text" name="inodes" value="200000" style="width:500px;">
	<div class="clear"></div>
</div>
<div class="st-form-line">	
	<span class="st-labeltext">Max Processes:</span>	
	<input id="numproc" type="text" name="numproc" value="128" style="width:500px;">
	<div class="clear"></div>
</div>
<div class="st-form-line">	
	<span class="st-labeltext">Max Connections:</span>	
	<input id="numiptent" type="text" name="numiptent" value="80" style="width:500px;">
	<div class="clear"></div>
</div>
<div class="st-form-line">	
	<span class="st-labeltext">IP Addresses:</span>	
	<select name="ipaddresses" id="ipaddresses" style="width:520px;">
		<option value="1">1</option>
		<option value="2">2</option>
		<option value="3">3</option>
		<option value="4">4</option>
		<option value="5">5</option>
		<option value="6">6</option>
		<option value="7">7</option>
		<option value="8">8</option>
		<option value="9">9</option>
		<option value="10">10</option>
	</select>
	<div class="clear"></div>
</div>
<div class="st-form-line">	
	<span class="st-labeltext">Hostname (optional):</span>	
	<input id="hostname" type="text" name="hostname" value="server.example.com" style="width:500px;">
	<div class="clear"></div>
</div>
<div class="st-form-line">	
	<span class="st-labeltext">Nameserver (optional):</span>	
	<input id="nameserver" type="text" name="nameserver" value="8.8.8.8" style="width:500px;">
	<div class="clear"></div>
</div>
<div class="st-form-line">	
	<span class="st-labeltext">Root Password (optional):</span>	
	<input id="password" type="password" name="password" value="" style="width:500px;">
	<div class="clear"></div>
</div>
<div class="st-form-line" align="center">
	<input id="Create" type="button" value="Create" class="small blue"/>
	<br><br>
	<div id="update"></div>
</div>
<script type="text/javascript">
	$(document).ready(function() {
		$("#Create").click(function() {
			$("#Create").css({visibility: "hidden"});
			$('#update').html('<img src="templates/default/img/loading/9.gif" style="padding:0px;margin:0px;" id="LoadingImage">');
			var user = $('#user').attr('value');
			var server = $('#ServerSelection').attr('value');
			var template = $('#template').attr('value');
			var ram = $('#ram').attr('value');
			var swap = $('#swap').attr('value');
			var disk = $('#disk').attr('value');
			var cpuunits = $('#cpuunits').attr('value');
			var cpulimit = $('#cpulimit').attr('value');
			var bandwidthlimit = $('#bandwidthlimit').attr('value');
			var inodes = $('#inodes').attr('value');
			var numproc = $('#numproc').attr('value');
			var numiptent = $('#numiptent').attr('value');
			var ipaddresses = $('#ipaddresses').attr('value');
			var hostname = $('#hostname').attr('value');
			var nameserver = $('#nameserver').attr('value');
			var password = $('#password').attr('value');
			var beginbuild = $.ajax({
				type: "POST",
				url: "admin.php?view=createvps&action=create",
				data: "user=" + user + "&server=" + server + "&template=" + template + "&ram=" + ram + "&swap=" + swap + "&disk=" + disk + "&cpuunits=" + cpuunits + "&cpulimit=" + cpulimit + "&bandwidthlimit=" + bandwidthlimit + "&inodes=" + inodes + "&numproc=" + numproc + "&numiptent=" + numiptent + "&ipaddresses=" + ipaddresses + "&hostname=" + hostname + "&nameserver=" + nameserver + "&password=" + password,
				success: function(data){
					var result = $.parseJSON(data);
					$('#update').html('<div style="z-index: 670;width:60%;height:25px;" class="albox small-' + result.type + '"><div id="Status" style="padding:4px;padding-left:5px;width:95%;">' + result.result + '</div><div style="float:right;"><a href="#" onClick="return false;" style="margin:-3px;padding:0px;" class="small-close CloseToggle">x</a></div></div>');
					if(result.reload == 1){
						window.location = "view.php?id=" + result.vps;
					} else {
						$("#Create").css({visibility: "visible"});
					}
				}
			});
		});
	});
</script>
{'fraction_non_alphanumeric': 0.226158275892156, 'fraction_numerical': 0.017450484250937964, 'mean_word_length': 3.852667231160034, 'pattern_counts': {'":': 0, '<': 267, '<?xml version=': 0, '>': 269, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3150', 'n_tokens_mistral': 4141, 'n_tokens_neox': 3782, 'n_words': 760}