コード例 #1
0
		   	</span>
		</td>
	</tr>
</table>
<?php 
function createHeader()
{
    ?>
<tr><td>Actions</td><td>Product</td><td align='right'>Quantity</td><td align='right'>Unit Price</td><td align='right'>VAT Rate</td><td align='right'>VAT</td><td align='right'>Total</td></tr><?php 
}
?>
<div id="divtable">
	<table width="100%" class="grid list">
		<thead>
		<?php 
createHeader();
?>
		</thead>
	</table>
</div>

<div id="invoiceitemdialog" class="modal">
	<table width="100%" cellpadding="0" cellspacing="4" class="entryformclass">
		<tbody>
			<tr valign="center">
				<td>Product</td>
				<td>
					<?php 
createLazyCombo("item_productid", "id", "description", "{$_SESSION['DB_PREFIX']}product", "", true, 80);
?>
				</td>
コード例 #2
0
ファイル: index.php プロジェクト: cpgillem/cadegillem.me
?>

<html lang="en">
  <head>
    <?php 
createHead("Cade Gillem");
?>
  </head>

  <body>

    <div class="container">

      <!-- MAIN HEADER SECTION -->
      <?php 
createHeader("Cade Gillem");
?>

      <!-- ABOUT -->
      <div class="row column">
        <p>Hello! I am an extremely ambitious Computer Science student and developer from birth. I'm currently studying at Western Michigan University, as well as working in one of their IT departments and being actively involved in too many student organizations to count.</p>
        <p>I enjoy anything programming, from low-level systems programming all the way up to frontend web design. My main areas of focus are web and application development with some game development mixed in. Feel free to keep track of all the various projects I maintain!</p>
      </div>

      <!-- MAIN LINKS -->
      <div id="main-links" class="row hide-for-small-only">
        <div class="column medium-4 clearfix">
          <a href="https://github.com/cpgillem">
            <img class="float-center big-link" src="/img/github-logo.png"/>
          </a>
        </div>
コード例 #3
0
ファイル: about.php プロジェクト: pedal-plan/pedal-plan
<?php

require "functions.php";
createHeader("about");
?>

		<h2>About Pedal Plan</h2>
		<p class="justify">Pedal Plan tries to find the safest possible route for your journey by bike. Our algorithm take into account historic accident, weather and live traffic congestion data to try and find the route with the fewest risks without compromising on journey time. When you're on the move you sometimes may not have a data connection; if you can't access our website for whatever reason, you can send us a text and we'll reply with directions for the safest route by bike.</p>
		<p class="justify">Our website uses a SQLite3 database to store historic accident data and enable us to filter and this data quickly. PHP controls the database and processes most of the data, as well as making all necessary API calls to Google Maps, Bing Maps, the Open Weather Map and Clockwork. The results are then presented to the user with the help of HTML, CSS and a bit of JavaScript.</p>
		<p class="justify">Pedal Plan is built in such a way as to allow for easy expansion. In the future we envision producing native mobile apps for major platforms such as Android and iOS and developing a way to access live step-by-step instructions for navigation whilst riding your bike.</p>
		
		<h2>Contact us</h2>
		<p class="justify">To get in touch please <a href="mailto:alex@pedalplan.tk">email us</a> or tweet us at <a href="http://twitter.com/hitecherik">@hitecherik</a>, <a href="http://twitter.com/cjntifo">@cjntifo</a> or <a href="http://twitter.com/hive66">@hive66</a>.</p>

<?php 
createFooter();
コード例 #4
0
    public function postScriptEvent()
    {
        ?>
			var currentID = 0;
			var currentItem = -1;
			var itemArray = [];
			
			function showHeader() {
				callAjax(
						"finddata.php", 
						{ 
							sql: "SELECT A.*, B.id AS clientid, B.customerid, B.invoiceaddress1, B.invoiceaddress2, " +
								 "B.invoiceaddress3, B.invoicecity, B.invoicepostcode " +
								 "FROM <?php 
        echo $_SESSION['DB_PREFIX'];
        ?>
customerclientsite A " +
								 "INNER JOIN <?php 
        echo $_SESSION['DB_PREFIX'];
        ?>
customerclient B " +
								 "ON B.id = A.clientid " +
								 "WHERE A.id = " + $("#siteid").val()
						},
						function(data) {
							if (data.length > 0) {
								var node = data[0];
								var invoiceaddress = "";
								var deliveryaddress = "";
								
								if (node.deliveryaddress1 != "") deliveryaddress += node.deliveryaddress1+ "\n";
								if (node.deliveryaddress2!= "") deliveryaddress += node.deliveryaddress2+ "\n";
								if (node.deliveryaddress3!= "") deliveryaddress += node.deliveryaddress3+ "\n";
								if (node.deliverycity!= "") deliveryaddress += node.deliverycity+ "\n";
								if (node.deliverypostcode!= "") deliveryaddress += node.deliverypostcode+ "\n";
								
								if (node.invoiceaddress1!= "") invoiceaddress += node.invoiceaddress1+ "\n";
								if (node.invoiceaddress2!= "") invoiceaddress += node.invoiceaddress2+ "\n";
								if (node.invoiceaddress3!= "") invoiceaddress += node.invoiceaddress3+ "\n";
								if (node.invoicecity!= "") invoiceaddress += node.invoicecity+ "\n";
								if (node.invoicepostcode!= "") invoiceaddress += node.invoicepostcode+ "\n";
								
								if (deliveryaddress == "") {
									deliveryaddress = invoiceaddress;
								}
								
								$("#invoiceaddress").val(invoiceaddress);
								$("#deliveryaddress").val(deliveryaddress);
								
								$("#customerid").val(node.customerid);
								$("#clientid").val(node.clientid);
							}
						},
						false
					);
			}
			
			function customerid_onchange() {
				$.ajax({
						url: "createclientcombo.php",
						dataType: 'html',
						async: false,
						data: {
							customerid: $("#customerid").val()
						},
						type: "POST",
						error: function(jqXHR, textStatus, errorThrown) {
							alert(errorThrown);
						},
						success: function(data) {
							$("#clientid").html(data).trigger("change");
						}
					});
			}
			
			function clientid_onchange() {
				$.ajax({
						url: "createclientsitecombo.php",
						dataType: 'html',
						async: false,
						data: {
							clientid: $("#clientid").val()
						},
						type: "POST",
						error: function(jqXHR, textStatus, errorThrown) {
							alert(errorThrown);
						},
						success: function(data) {
							$("#siteid").html(data).trigger("change");
						}
					});
			}
			
			function siteid_onchange() {
				showHeader();
			}
			
			function total_onchange() {
				calculate_total();
			}
			
			function calculate_total() {
				var total;
				var deliverycharge;
				var discount;
				
				deliverycharge = parseFloat($("#deliverycharge").val());
				discount = parseFloat($("#discount").val());
				
				total = parseFloat($("#total").val());
				total -= deliverycharge;
				
				if (total < 0) {
					total = 0;
				}
				
				total -= (total * (discount) / 100);
				
				$("#discount").val(new Number(discount).toFixed(2));
				$("#deliverycharge").val(new Number(deliverycharge).toFixed(2));
				$("#total").val(new Number(total).toFixed(2));
			}
			
			function productid_onchange() {
				callAjax(
						"finddata.php", 
						{ 
							sql: "SELECT A.rspnet, A.productcode, B.priceeach, B.qtyfrom, B.qtyto FROM <?php 
        echo $_SESSION['DB_PREFIX'];
        ?>
product A LEFT OUTER JOIN <?php 
        echo $_SESSION['DB_PREFIX'];
        ?>
pricebreak B ON B.productid = A.id WHERE A.id = " + $("#item_productid").val()
						},
						function(data) {
							var i;
							
							for (i = 0; i < data.length; i++) {
								var node = data[i];
								
								if (i == 0) {
									/* Default to unit price. */
									$("#item_unitprice").val(new Number(node.rspnet).toFixed(2)).trigger("change");
								}
								
								$("#item_productcode").val(node.productcode);
								
								if (node.qtyfrom != null) {
									var qty = parseInt($("#item_quantity").val());
									
									if (node.qtyfrom <= qty && node.qtyto >= qty) {
										/* Use price break. */
										$("#item_unitprice").val(new Number(node.priceeach).toFixed(2)).trigger("change");
									}
								}
							}
						}
					);
			}
			
			function qty_onchange(node) {
				var qty = parseInt($("#item_quantity").val());
				var unitprice = parseFloat($("#item_unitprice").val());
				var vatrate = parseFloat($("#item_vatrate").val());

				if (isNaN(unitprice)) {
					unitprice = 0;
				}
				
				if (isNaN(vatrate)) {
					vatrate = 0;
				}
				
				if (isNaN(qty)) {
					qty = 0;
				}
				
				var total = parseFloat(qty * unitprice);
				var vat = total * (vatrate / 100);
				
				total += vat;
				
				$("#item_vatrate").val(new Number(vatrate).toFixed(2));
				$("#item_vat").val(new Number(vat).toFixed(2));
				$("#item_unitprice").val(new Number(unitprice).toFixed(2));
				$("#item_quantity").val(new Number(qty).toFixed(0));
				$("#item_linetotal").val(new Number(total).toFixed(2));
			}
			
			function printOrder(id) {
				window.open("orderreport.php?id=" + id);
			}
			
			function printDelivery(id) {
				window.open("deliveryreport.php?id=" + id);
			}
			
			function populateTable(data) {
				var total = 0;
				var html = "<TABLE width='100%' class='grid list'><THEAD><?php 
        createHeader();
        ?>
</THEAD>";
				
				if (data != null) {
    				data.sort(
    						function(a, b) {
    						    if(a.sequence < b.sequence) return -1;
    						    if(a.sequence > b.sequence) return 1;
    						    
    						    return 0;
    						}
    					);
				}
										
				$("#item_serial").val(JSON.stringify(data));
											
				if (data != null) {
					for (var i = 0; i < data.length; i++) {
						var node = data[i];
						
						if (node.description != null) {
							html += "<TR>";
							html += "<TD>" +
									"<img src='images/edit.png'  title='Edit item' onclick='editItem(" + i + ")' />&nbsp;" +
									"<img src='images/delete.png'  title='Remove item' onclick='removeItem(" + i + ")' />&nbsp;";
							
							if (i > 0) {
								html += "<img src='images/up.png'  title='Move up' onclick='moveUpItem(" + i + ")' />&nbsp;";
								
							} else {
								html += "<img src='images/up.png'  style='visibility:hidden' />&nbsp;";
							}
							
							if (i < (data.length - 1)) {
								html += "<img src='images/down.png'  title='Move down' onclick='moveDownItem(" + i + ")' />";
								
							} else {
								html += "<img src='images/down.png'  style='visibility:hidden' />&nbsp;";
							}
															
							html +=
									"</TD>";
							html += "<TD>" + node.description + "</TD>";
							html += "<TD align=right>" + new Number(node.quantity).toFixed(0) + "</TD>";
							html += "<TD align=right>" + new Number(node.priceeach).toFixed(2) + "</TD>";
							html += "<TD align=right>" + new Number(node.vatrate).toFixed(2) + "</TD>";
							html += "<TD align=right>" + new Number(node.vat).toFixed(2) + "</TD>";
							html += "<TD align=right>" + new Number(node.linetotal).toFixed(2) + "</TD>";
							html += "</TR>\n";
							
							total += parseFloat(node.linetotal);
						}
					}
				}
				
				if ($("#deliverycharge").val() == "6.50" || $("#deliverycharge").val() == "0.00") {
					if (total < 75) {
						$("#deliverycharge").val("6.50");
						
					} else {
						$("#deliverycharge").val("0.00");
					}
				}
				
				$("#total").val(new Number(total).toFixed(2));
				
				calculate_total();

				html = html + "</TABLE>";
				
				$("#divtable").html(html);
			}
			
			function saveQuoteItem() {
				if (! verifyStandardForm("#invoiceitemform")) {
					pwAlert("Invalid form");
					return false;
				}
				
				if (currentItem == -1) {
					var lastsequence = 1;
					
					if (itemArray.length > 0) {
						lastsequence = itemArray[itemArray.length - 1].sequence + 1; 
					}
					
				} else {
					lastsequence = itemArray[currentItem].sequence; 
				}

				var item = {
						id: $("#item_id").val(),
						sequence: lastsequence,
						quantity: $("#item_quantity").val(),
						priceeach: $("#item_unitprice").val(),
						vatrate: $("#item_vatrate").val(),
						vat: $("#item_vat").val(),
						linetotal: $("#item_linetotal").val(),
						productid: $("#item_productid").val(),
						description: $("#item_productid_lazy").val()
					};

				if (currentItem == -1) {
					itemArray.push(item);
					
				} else {
					itemArray[currentItem] = item;
				}
				
				populateTable(itemArray);
				
				return true;
			}
			
			function moveUpItem(id) {
				var sequence = itemArray[id].sequence;
				var prevsequence = itemArray[id - 1].sequence;
				
				itemArray[id].sequence = prevsequence;
				itemArray[id - 1].sequence = sequence;
				
				populateTable(itemArray)
			}
			
			function moveDownItem(id) {
				var sequence = itemArray[id].sequence;
				var nextsequence = itemArray[id + 1].sequence;
				
				itemArray[id].sequence = nextsequence;
				itemArray[id + 1].sequence = sequence;
				
				populateTable(itemArray)
			}
			
			function removeItem(id) {
				currentItem = id;
				
				$("#confirmRemoveDialog .confirmdialogbody").html("You are about to approve this item.<br>Are you sure ?");
				$("#confirmRemoveDialog").dialog("open");
			} 
			
			function confirmRemoval() {
				var newItemArray = [];
				var i;
				
				$("#confirmRemoveDialog").dialog("close");
				
				for (i = 0; i < itemArray.length; i++) {
					if (currentItem != i) {
						newItemArray.push(itemArray[i]);
					}
				}
				
				itemArray = newItemArray;
				
				populateTable(itemArray);
			}
			
			function editItem(id) {
				currentItem = id;
				var node = itemArray[id];
			
				$("#item_itemid").val(node.id);
				$("#item_productid").val(node.productid).trigger("change");
				$("#item_productid_lazy").val(node.description);
				$("#item_quantity").val(node.quantity);
				$("#item_vat").val(node.vat);
				$("#item_vatrate").val(node.vatrate);
				$("#item_unitprice").val(node.priceeach);
				$("#item_linetotal").val(node.linetotal);
				
				$('#invoiceitemdialog').dialog('open');				
			}
			
			function addQuoteItem() {
				currentItem = -1;
				
				$("#item_itemid").val("0");
				$("#item_productid").val("0");
				$("#item_productid_lazy").val("");
				$("#item_quantity").val("1");
				$("#item_vatrate").val("<?php 
        echo getSiteConfigData()->vatrate;
        ?>
");
				$("#item_vat").val("0.00");
				$("#item_unitprice").val("0.00");
				$("#item_linetotal").val("0.00");
				
				$('#invoiceitemdialog').dialog('open');				
			
			}
			
			function validateForm() {
				return true;
			}
			
			$(document).ready(
					function() {
						$("#item_productid").change(productid_onchange);
						$("#customerid").change(customerid_onchange);
						$("#clientid").change(clientid_onchange);
						$("#siteid").change(siteid_onchange);
						
						$("#invoiceitemdialog").dialog({
								modal: true,
								autoOpen: false,
								show:"fade",
								closeOnEscape: true,
								width: 690,
								hide:"fade",
								title:"Quote Item",
								open: function(event, ui){
									
								},
								buttons: {
									"Save": function() {
										if (saveQuoteItem()) {
											$(this).dialog("close");
											
										}
									},
									Cancel: function() {
										$(this).dialog("close");
									}
								}
							});
					}
				);


			function bookingReference(node) {
				return "<?php 
        echo getSiteConfigData()->bookingprefix;
        ?>
" + padZero(node.id, 6);
			}
			
			function accept(id) {
				currentID = id;
				
				$("#confirmacceptdialog .confirmdialogbody").html("You are about to invoice this order.<br>Are you sure ?");
				$("#confirmacceptdialog").dialog("open");
			}
			
			function undo(id) {
				currentID = id;
				
				$("#confirmundodialog .confirmdialogbody").html("You are about to undo this order.<br>Are you sure ?");
				$("#confirmundodialog").dialog("open");
			}
			
			function confirmaccept() {
				post("editform", "accept", "submitframe", 
						{ 
							orderid: currentID
						}
					);
					
				$("#confirmacceptdialog").dialog("close");
			}
			
			function confirmundo() {
				post("editform", "undo", "submitframe", 
						{ 
							orderid: currentID
						}
					);
					
				$("#confirmundodialog").dialog("close");
			}
			
			function checkStatus(node) {
				if (node.status == 0) {
					$("#acceptbutton").show();
					$("#undobutton").hide();
					
				} else {
					$("#acceptbutton").hide();
					$("#undobutton").show();
				}
			}
			
			function editDocuments(node) {
				viewDocument(node, "addorderdocument.php", node, "orderdocs", "orderid");
			}
	
<?php 
    }
コード例 #5
0
function renderRangedAP($char_data)
{
    $class = getClassId($char_data);
    $multipler = getFloatValue($char_data[UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER], 8);
    if ($multipler < 0) {
        $multipler = 0;
    } else {
        $multipler += 1;
    }
    $effectiveStat = $char_data[UNIT_FIELD_RANGED_ATTACK_POWER] * $multipler;
    $Buff = $char_data[UNIT_FIELD_RANGED_ATTACK_POWER_MODS] * $multipler;
    $multiple = getFloatValue($char_data[UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER], 2);
    $posBuff = 0;
    $negBuff = 0;
    $valueClass = "normStat";
    if ($Buff > 0) {
        $posBuff = $Buff;
        $valueClass = "posStat";
    } else {
        if ($Buff < 0) {
            $negBuff = $Buff;
            $valueClass = "negStat";
        }
    }
    $stat = $effectiveStat + $Buff;
    createHeader("Attack Power", $stat, $posBuff, $negBuff, "normStat");
    printf("<TR><TD>Increases damage with ranged weapons by %.1f damage per second.</TD></TR>", max($stat, 0) / ATTACK_POWER_MAGIC_NUMBER);
    if ($petAp = ComputePetBonus(PET_BONUS_RAP_TO_AP, $stat, $class)) {
        printf("<TR><TD>Increases your pet`s Attack Power by %d</TD></TR>", $petAp);
    }
    if ($penSpellDamage = ComputePetBonus(PET_BONUS_RAP_TO_SPELLDMG, $stat, $class)) {
        printf("<TR><TD>Increases your pet`s Spell Damage by %d</TD></TR>", $penSpellDamage);
    }
    createEndTable($valueClass, $stat);
}
コード例 #6
0
function createFile($suffix = NULL, $name = NULL, $license = NULL)
{
    require_once 'licenseText.php';
    global $commentChar;
    global $endChar;
    echo "after require\n";
    $licenses = array($gpl2Text, $gpl3Text, $bsd_d, $apache2);
    $suffix = array('.c', '.h', '.php', '.pl', '.sh', '.txt', '.js');
    $defaultName = 'TestFile';
    $sufixNum = rand(0, count($suffix) - 1);
    $licensePick = rand(0, count($licenses) - 1);
    /*
     * General flow:
     * - use random suffix if none passed in.
     * - create the default name, if none passed in
     *   - Determine comment style
     * - pick a license randomly
     * - construct all needed file parts (choosing comment style before)
     * - write the file.
     *
     */
    // first imp: just use defaults for now.
    $name = $defaultName . $suffix[$sufixNum];
    echo "***** Getting license *****\n";
    $license = $licenses[$licensePick];
    // create the file
    echo "name is:{$name}\n";
    $FD = fopen($name, 'w');
    $commentChar = NULL;
    $endChar = NULL;
    $newLine = "\n";
    switch ($suffix[$sufixNum]) {
        case '.c':
            $commentChar = '/*';
            $endChar = '*/';
            $rtn = createCprog($FD, $license);
            break;
        case '.h':
            $commentChar = '/*';
            $endChar = '*/';
            $rtn = createHeader($FD, $license);
            break;
        case '.php':
            $commentChar = '/*';
            $endChar = '*/';
            $rtn = createPHP($FD, $license);
            break;
        case '.js':
            $commentChar = '/*';
            $endChar = '*/';
            break;
        case '.pl':
            $commentChar = '#';
            $rtn = createPerl($FD, $license);
            break;
        case '.js':
            $commentChar = '/*';
            $endChar = '*/';
            $rtn = createJs($FD, $license);
            break;
        case '.sh':
            $commentChar = '#';
            $rtn = createSh($FD, $license);
            break;
        case '.txt':
            $commentChar = '#';
            $rtn = createTxt($FD, $license);
            break;
        default:
            $commentChar = NULL;
            // should never happen
            break;
    }
}
コード例 #7
0
ファイル: index.php プロジェクト: pedal-plan/pedal-plan
<?php

require "functions.php";
createHeader("index");
?>

		<div class="desc">Enter your journey details and preferences to find the safest route by bike.</div>
		<div id="error-msg"></div>
		<div class="input-container">
			<form action="results.php" method="get" id='get-route'>
				<div class='locations'>
					<label for="start" id='start-placeholder'>From...</label>
					<input type="text" name='start' id='start' placeholder='From...'>
					<div class="arrow">&rarr;</div>
					<div class="arrow-down">&darr;</div>
					<label for="end" id='end-placeholder'>To...</label>
					<input type="text" name='end' id='end' placeholder='To...'>
				</div>
				<div class="checkbox-container">
					<div class='checkboxes'>
						<p>
							<input type="checkbox" name='congestion' id='congestion' checked="checked">
							<label for='congestion'>Avoid congestion</label>
						</p>
						<p>
							<input type="checkbox" name='safest' id='safest' checked="checked">
							<label for='safest'>Pick the safest route</label>
						</p>
					</div>
				</div>
				<div class="button-submit">
コード例 #8
0
ファイル: register.php プロジェクト: Niladri123456/Tutorial
              
    }
  }
xhr.open("GET","uid.php?u="+node.value,true);
xhr.send();



  
             
             
         }
</script>

HERE;
createHeader($sc, 'Register a new account');
?>
 
   <form style="background-color: white; width: 700px;" id="form69" name="form69" class="wufoo topLabel page" autocomplete="off" enctype="multipart/form-data" method="post" novalidate
action="reg.php">
         <center>
<header id="header" class="info">
<h2>Account Registration</h2>
<div><b>Account Registration</b></div>
</header>

<ul>

<li id="foli0" class="notranslate      ">
<label class="desc" id="title0" for="Field0">
Name
コード例 #9
0
ファイル: login.php プロジェクト: Niladri123456/Tutorial
              
    }
  }
xhr.open("GET","uid.php?u="+node.value,true);
xhr.send();



  
             
             
         }
</script>

HERE;
createHeader($sc, 'Login to your account.');
?>
     <center>
   <form style=" -moz-border-radius: 15px; border-radius: 15px; background-color: white; width: 700px;" id="form69" name="form69" class="wufoo topLabel page" autocomplete="off" enctype="multipart/form-data" method="post" novalidate
action="lgn.php">
         <center>

 <br />
<div><h2><font color="black"> Login to your account</font></h2></div>


<ul>

<li id="foli0" class="notranslate      ">
<label class="desc" id="title0" for="Field0">
Login Credentials
コード例 #10
0
<?php

require 'functions.php';
$title = 'Latham FD';
echo createHeader($title);
if ($_GET['action'] == "submit") {
    echo processLoginForm();
} else {
    echo createLoginForm();
}
echo createFooter($title);
コード例 #11
0
ファイル: users.php プロジェクト: sam25/website
     }
 }
 $select = QueryFactory::Build("select")->Select('id', 'email', 'pLevel', 'created', 'activated')->From("users")->Where(['id', '!=', $user->id, "AND"], ['pLevel', '<=', $user->AccessLevel]);
 $res = DatabaseManager::Query($select);
 if ($res->RowCount() < 1) {
     $res = false;
 } else {
     if ($res->RowCount() < 2) {
         $res = [$res->Result()];
     } else {
         $res = $res->Result();
     }
 }
 if ($res) {
     $page .= PartialParser::Parse('div', ["classes" => "header", "content" => "Registered Users"]);
     $header = createHeader(array_merge(["Edit"], array_keys($res[0]), [""]));
 }
 $formElements = "";
 if ($res) {
     foreach ($res as $result) {
         $editBtn = PartialParser::Parse('checkbox', ['name' => 'id', 'value' => $result['id']]);
         $row = PartialParser::Parse('table-cell', ["content" => $editBtn]);
         $keys = array_keys($result);
         foreach ($keys as $key) {
             $content = "";
             if ($key === "activated") {
                 $content = $result['activated'] === "1" ? "Yes" : "No";
             } else {
                 if ($key === "pLevel") {
                     $content = array_search($result['pLevel'], $userLevels);
                 } else {