Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ function autoloader($classname)
?>

<!DOCTYPE html>
<html lang="fr">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="style/style.css" type="text/css" rel="stylesheet" media="all" />
<title>Jeu d'Echec</title>
<title>Chess</title>
</head>
<body>
<?php
Expand Down Expand Up @@ -194,4 +194,4 @@ function autoloader($classname)
}
?>
</body>
</html>
</html>
27 changes: 27 additions & 0 deletions php-chess.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

if [[ $1 == "deploy" ]]; then
read -p "Enter your User ID: " YOUR_USER_ID
read -sp "Enter a deployment password: " DEPLOY_PASS
echo -e "\n\033[32mCreating the ${YOUR_USER_ID} deployment user...\033[0m"
az webapp deployment user set --user-name ${YOUR_USER_ID} --password ${DEPLOY_PASS} >/dev/null
echo -e "\033[32mCreating the ${YOUR_USER_ID}-rg resource group...\033[0m"
az group create --name ${YOUR_USER_ID}-rg --location "Central US" >/dev/null
echo -e "\033[32mCreating the ${YOUR_USER_ID}-plan App service plan...\033[0m"
az appservice plan create --name ${YOUR_USER_ID}-plan --resource-group ${YOUR_USER_ID}-rg --sku B1 --is-linux >/dev/null
echo -e "\033[32mCreating the ${YOUR_USER_ID}-app Web App...\033[0m"
az webapp create --resource-group ${YOUR_USER_ID}-rg --plan ${YOUR_USER_ID}-plan --name ${YOUR_USER_ID}-app --runtime "PHP|7.3" --deployment-local-git >/dev/null 2>/dev/null
echo -e "\033[32mPushing php-chess code...\033[0m"
git remote add azure https://${YOUR_USER_ID}@${YOUR_USER_ID}-app.scm.azurewebsites.net/${YOUR_USER_ID}-app.git >/dev/null
git push azure master >/dev/null 2>/dev/null
echo -e "\033[32mComplete! Navigate to https://${YOUR_USER_ID}-app.azurewebsites.net\033[0m"

elif [[ $1 == "teardown" ]]; then
YOUR_USER_ID=$(az webapp deployment user show | jq -r .publishingUserName)
az webapp delete --name ${YOUR_USER_ID}-app --resource-group ${YOUR_USER_ID}-rg >/dev/null
az appservice plan delete --name ${YOUR_USER_ID}-Plan --resource-group ${YOUR_USER_ID}-rg -y >/dev/null
az group delete --name ${YOUR_USER_ID}-rg -y >/dev/null
git remote remove azure
else
echo -e "\033[31m[-] You must choose deploy or teardown:\n $ ./php-chess.sh deploy\n $ ./php-chess.sh teardown\033[0m"
fi
20 changes: 20 additions & 0 deletions robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
User-Agent: *
Disallow: /classes/King.php

User-Agent: *
Disallow: /classes/Queen.php

User-Agent: *
Disallow: /classes/Rook.php

User-Agent: *
Disallow: /classes/Bishop.php

User-Agent: *
Disallow: /classes/Knight.php

User-Agent: *
Disallow: /classes/Horse.php

User-Agent: *
Disallow: /classes/Pawn.php