Last_Modified
session_start();
if(!isset($_SESSION['random_code']))
$_SESSION['random_code'] = mt_rand(100000,1000000);
?>
<?header("Last-Modified: " . date("r", time()-432000));?>
<?header("Expires: " . date("r", time()+432000));?>
<?
$Last_Modified = @date ( 'D, d M Y H:i:00' , time () - 432000 );
$Expires = @date ( 'D, d M Y H:i:00' , time () + 432000 );
Смена пароля Drupal
<?php
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
require_once DRUPAL_ROOT . '/includes/password.inc';
if (isset($_GET['pass']) && !empty($_GET['pass'])) {
$newhash = user_hash_password($_GET['pass']);
}
else {
die('Retry with ?pass=PASSWORD set in the URL');
}
$updatepass = db_update('users')
->fields(array(
'pass' => $newhash,
// Uncomment the following lines to reset the administrative username and/or email address, if necessary.