mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 22:33:55 -07:00
Упрощение sitemap
This commit is contained in:
parent
07e33e5423
commit
d7cbf67054
1 changed files with 4 additions and 31 deletions
|
@ -7,38 +7,11 @@ if (!empty($setmodules))
|
||||||
}
|
}
|
||||||
require('./pagestart.php');
|
require('./pagestart.php');
|
||||||
|
|
||||||
require(INC_DIR .'functions_selects.php');
|
if(request_var('submit', '')) {
|
||||||
|
if(bb_update_config(array('static_sitemap' => request_var('static_sitemap', '')))) {
|
||||||
$sql = "SELECT * FROM " . BB_CONFIG;
|
CACHE('bb_config')->rm();
|
||||||
|
|
||||||
if (!$result = DB()->sql_query($sql))
|
|
||||||
{
|
|
||||||
bb_die('Could not query config information in admin_sitemap');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$new_params = array();
|
|
||||||
|
|
||||||
while ($row = DB()->sql_fetchrow($result))
|
|
||||||
{
|
|
||||||
$config_name = $row['config_name'];
|
|
||||||
$config_value = $row['config_value'];
|
|
||||||
$default_config[$config_name] = $config_value;
|
|
||||||
$new[$config_name] = isset($_POST[$config_name]) ? $_POST[$config_name] : $default_config[$config_name];
|
|
||||||
|
|
||||||
if (isset($_POST['submit']) && $row['config_value'] != $new[$config_name])
|
|
||||||
{
|
|
||||||
$new_params[$config_name] = $new[$config_name];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_POST['submit']))
|
|
||||||
{
|
|
||||||
if (!empty($new_params))
|
|
||||||
{
|
|
||||||
bb_update_config($new_params);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
bb_die('<a href="admin_sitemap.php">'. $lang['GO_BACK'] .'</a>');
|
||||||
}
|
}
|
||||||
|
|
||||||
$s_mess = $lang['SITEMAP_CREATED'].': <b>'.bb_date($new['sitemap_time'], $bb_cfg['post_date_format']).'</b> '.$lang['SITEMAP_AVAILABLE'].': <a href="'.make_url('sitemap.xml').'" target="_blank">'.make_url('sitemap.xml').'</a>';
|
$s_mess = $lang['SITEMAP_CREATED'].': <b>'.bb_date($new['sitemap_time'], $bb_cfg['post_date_format']).'</b> '.$lang['SITEMAP_AVAILABLE'].': <a href="'.make_url('sitemap.xml').'" target="_blank">'.make_url('sitemap.xml').'</a>';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue