<?php
if (isset($_SESSION['id'])) {
if (isset($_POST['passwordEnter'])) {
$id1 = $_SESSION['id'];
if (isset($_POST['password']) && !preg_match('/^(?=.*\d)(?=.*[A-Z])(?=.*[a-z])[0-9A-Za-z_]{8,}$/', $_POST['password'])) {
echo "<script>if(!confirm('Not secure enough, The password must be minimum 8 characters and must contain lower case letter, upper case letter and number')){
window.location.reload();
}</script>";
} elseif (htmlspecialchars($_POST['newPassword']) == htmlspecialchars($_POST['retypePassword'])) {
$firebase->set(DEFAULT_PATH . "/ARCusers/$id1/password", htmlspecialchars($_POST['newPassword']));
} else {
echo "<script>alert('Passwords do not match')</script>";
}
}
} else {
header("Location:email_form");
}
?>
$service = new Google_Service_Webmasters($client);
$filters = new Google_Service_Webmasters_SearchAnalyticsQueryRequest();
$filters->setStartDate($dtStart);
$filters->setEndDate($dtEnd);
$filters->dimensions = ['query', 'device'];
$filter = new Google_Service_Webmasters_ApiDimensionFilter();
$filter->setDimension('query');
$filter->setOperator('equals');
$filter->setExpression($query);
$filterGroup = new Google_Service_Webmasters_ApiDimensionFilterGroup();
$filterGroup->setFilters([$filter]);
$filters->setDimensionFilterGroups([$filterGroup]);
$response = $service->searchanalytics->query($host, $filters);
function createDirectory($path)
{
$diskClient = new DiskClient(ACCESS_TOKEN);
$diskClient->setServiceScheme(DiskClient::HTTPS_SCHEME);
try {
$dirContent = $diskClient->createDirectory($path);
if ($dirContent) {
return 'Создана новая директория "' . $path;
}
} catch (\Yandex\Disk\Exception\DiskRequestException $e) {
return "Директория {$path} уже существует";
}
}
echo createDirectory('тест55');