function stats_formulaire_admin($flux) { if (isset($flux['args']['contexte']['objet']) and $objet = $flux['args']['contexte']['objet'] and isset($flux['args']['contexte']['id_objet']) and $id_objet = $flux['args']['contexte']['id_objet']) { if ($l = admin_stats($objet, $id_objet, defined('_VAR_PREVIEW') ? _VAR_PREVIEW : '')) { $btn = recuperer_fond('prive/bouton/statistiques', array('visites' => $l[0], 'popularite' => $l[1], 'statistiques' => $l[2])); $flux['data'] = preg_replace('%(<!--extra-->)%is', $btn . '$1', $flux['data']); } } return $flux; }
echo $error; ?> </p> <script language="JavaScript"> setTimeout(function(){ location.href='/admin.php<?php echo $return; ?> '; }, 2000); </script> <?php return; } // VIEW modules if (isset($_REQUEST['stats'])) { admin_log("stats"); admin_stats(); } else { if (isset($_REQUEST['buildservice_stats'])) { admin_log("buildservice stats"); admin_bsstats(); } else { if (isset($_REQUEST['user'])) { $user = str_replace("../", "", $_REQUEST['user']); if (isset($_REQUEST['path'])) { $path = $_REQUEST['path']; admin_log("user {$user}, path {$path}"); } else { $path = ""; admin_log("user {$user}"); } $backlink = "";
function admin_objet() { include_spip('inc/urls'); $env = array(); foreach (array('mot','auteur','rubrique','breve','article','syndic'=>'site') as $id => $obj) { if (is_int($id)) $id = $obj; $_id_type = id_table_objet($id); if (isset($GLOBALS['contexte'][$_id_type]) AND $id_type = $GLOBALS['contexte'][$_id_type]) { $id_type = sql_getfetsel($_id_type, table_objet_sql($id), "$_id_type=".intval($id_type)); if ($id_type) { $env[$_id_type] = $id_type; $env['objet'] = $id; $env['id_objet'] = $id_type; $g = 'generer_url_ecrire_'.$obj; $env['voir_'.$obj] = str_replace('&', '&', $g($id_type, '','', 'prop')); if ($id == 'article' OR $id == 'breve') { unset($env['id_rubrique']); unset($env['voir_rubrique']); if ($l = admin_stats($id, $id_type, $var_preview)) { $env['visites'] = $l[0]; $env['popularite'] = $l[1]; $env['statistiques'] = $l[2]; } if (admin_preview($id, $id_type)) $env['preview']=parametre_url(self(),'var_mode','preview','&'); } } } } return $env; }