Loading...
PHP, MySQL | dcms
Здравствуйте!!!
Подскажите пожалуйста,как убрать тех.работы в скрипте (Соц сеть Livebook — Dcms Social)?
Так-то технические работы в файле functions.php или function.php, бывает в файле core.php. Просто-то комментарий сделай этого кода //. И будет работать.
Ramzesoff , вот что в function.php
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

if (!function_exists('trigger_deprecation')) {
/**
* Triggers a silenced deprecation notice.
*
* @param string $package The name of the Composer package that is triggering the deprecation
* @param string $version The version of the package that introduced the deprecation
* @param string $message The message of the deprecation
* @param mixed ...$args Values to insert in the message using printf() formatting
*
* @author Nicolas Grekas <p@tchwork.com>
*/
function trigger_deprecation(string $package, string $version, string $message, ...$args): void
{
@trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED);
}
}

А это в functions.php
<?php

/**
* This file is part of the ramsey/uuid library
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @copyright Copyright (c) Ben Ramsey <ben@benramsey.com>
* @license http://opensource.org/licenses/MIT MIT
* phpcs:disable Squiz.Functions.GlobalFunction
*/

declare(strict_types=1);

namespace Ramsey\Uuid;

use Ramsey\Uuid\Type\Hexadecimal;
use Ramsey\Uuid\Type\Integer as IntegerObject;

/**
* Returns a version 1 (time-based) UUID from a host ID, sequence number,
* and the current time
*
* @param Hexadecimal|int|string|null $node A 48-bit number representing the
* hardware address; this number may be represented as an integer or a
* hexadecimal string
* @param int $clockSeq A 14-bit number used to help avoid duplicates that
* could arise when the clock is set backwards in time or if the node ID
* changes
*
* @return non-empty-string Version 1 UUID as a string
*/
function v1($node = null, ?int $clockSeq = null): string
{
return Uuid::uuid1($node, $clockSeq)->toString();
}

/**
* Returns a version 2 (DCE Security) UUID from a local domain, local
* identifier, host ID, clock sequence, and the current time
*
* @param int $localDomain The local domain to use when generating bytes,
* according to DCE Security
* @param IntegerObject|null $localIdentifier The local identifier for the
* given domain; this may be a UID or GID on POSIX systems, if the local
* domain is person or group, or it may be a site-defined identifier
* if the local domain is org
* @param Hexadecimal|null $node A 48-bit number representing the hardware
* address
* @param int|null $clockSeq A 14-bit number used to help avoid duplicates
* that could arise when the clock is set backwards in time or if the
* node ID changes
*
* @return non-empty-string Version 2 UUID as a string
*/
function v2(
int $localDomain,
?IntegerObject $localIdentifier = null,
?Hexadecimal $node = null,
?int $clockSeq = null
): string {
return Uuid::uuid2($localDomain, $localIdentifier, $node, $clockSeq)->toString();
}

/**
* Returns a version 3 (name-based) UUID based on the MD5 hash of a
* namespace ID and a name
*
* @param string|UuidInterface $ns The namespace (must be a valid UUID)
*
* @return non-empty-string Version 3 UUID as a string
*
* @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants,
* but under constant factory setups, this method operates in functionally pure manners
*/
function v3($ns, string $name): string
{
return Uuid::uuid3($ns, $name)->toString();
}

/**
* Returns a version 4 (random) UUID
*
* @return non-empty-string Version 4 UUID as a string
*/
function v4(): string
{
return Uuid::uuid4()->toString();
}

/**
* Returns a version 5 (name-based) UUID based on the SHA-1 hash of a
* namespace ID and a name
*
* @param string|UuidInterface $ns The namespace (must be a valid UUID)
*
* @return non-empty-string Version 5 UUID as a string
*
* @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants,
* but under constant factory setups, this method operates in functionally pure manners
*/
function v5($ns, string $name): string
{
return Uuid::uuid5($ns, $name)->toString();
}

/**
* Returns a version 6 (ordered-time) UUID from a host ID, sequence number,
* and the current time
*
* @param Hexadecimal|null $node A 48-bit number representing the hardware
* address
* @param int $clockSeq A 14-bit number used to help avoid duplicates that
* could arise when the clock is set backwards in time or if the node ID
* changes
*
* @return non-empty-string Version 6 UUID as a string
*/
function v6(?Hexadecimal $node = null, ?int $clockSeq = null): string
{
return Uuid::uuid6($node, $clockSeq)->toString();
}
Ramzesoff , в
<?php
// авторизация на сервере базы
if(!($db = @mysql_connect($set['mysql_host'], $set['mysql_user'], $set['mysql_pass'])))
{
//echo $set['mysql_host'], $set['mysql_user'],$set['mysql_pass'];
echo "Тех. работы";
exit;
}

// подключение к базе
if (!@mysql_select_db($set['mysql_db_name'],$db))
{
echo 'База даных не найдена<br />*проверьте, существует ли данная база как wmzo.ru';
exit;
}

$query_number = 0;
$tpassed = 0;

// Псевдоним mysql_query
function query($query)
{
global $query_number;
global $tpassed;
$query_number++;
$mtime = microtime();
$mtime = explode(" ", $mtime);
$mtime = $mtime[1] + $mtime[0];
$tstart = $mtime;
$query = mysql_query($query);
$mtime = microtime();
$mtime = explode(" ", $mtime);
$mtime = $mtime[1] + $mtime[0];
$tend = $mtime;
$tpassed += ($tend - $tstart);
return $query;
}


query('set charset utf8',$db);
query('SET names utf8',$db);
query('set character_set_client="utf8"',$db);
query('set character_set_connection="utf8"',$db);
query('set character_set_result="utf8"',$db);


// оптимизация всех таблиц
function db_optimize()
{
time_limit(20);// Ставим ограничение на 20 секунд
$tab = query('SHOW TABLES');
while ($tables = mysql_fetch_array($tab))
{
query("OPTIMIZE TABLE `$tables[0]`");
}
}
?>
Lovecs , sys/inc/thead.php
php
   if (empty(setget('job',1)))   {        if (isset($user) and $user['level']>=5)         echo "<div style='color:red' class='err'>ВНИМАНИЕ! Сайт выключен в  <a href='/adm_panel/settings_sys.php?'>админке</a>. Пользователи видят сообщение о том, что ведуться технические работы</div>";    }   
Вот код технические работы сайта
adm-panel/settings_sys.php
php
   echo "Работа сайта:<br />\n  <select name='job'>   <option ".(setget('job',1)==1? " selected ":null)." value='1'>Включено</option>   <option ".(setget('job',1)==0? " selected ":null)." value='0'>Выключено</option> </select> <br />\n";   
Ещё помощь нужна? Пиши в л.с ссылку на сайт
Онлайн: 5
Время:
Gen. 0.0853
(c) Bym.Guru 2010-2026