mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-25 23:05:30 +02:00
Merge branch '1678-Qr-de-vista-de-agente-que-redireccione-a-vista-escritorio-en-modo-escritorio-del-navegador-movil' into 'develop'
Redirect to desktop version pandora when scan agent view QR with a mobilephone… See merge request artica/pandorafms!1165
This commit is contained in:
commit
0da39d386b
@ -11,7 +11,6 @@
|
|||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
include_once("../include/functions_users.php");
|
include_once("../include/functions_users.php");
|
||||||
|
|
||||||
class Agent {
|
class Agent {
|
||||||
@ -24,6 +23,28 @@ class Agent {
|
|||||||
|
|
||||||
$this->id = $system->getRequest('id', 0);
|
$this->id = $system->getRequest('id', 0);
|
||||||
|
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
echo "<script>
|
||||||
|
var ismobile = / mobile/i.test(navigator.userAgent);
|
||||||
|
var iswindows = /Windows/i.test(navigator.userAgent);
|
||||||
|
var ismac = /Macintosh/i.test(navigator.userAgent);
|
||||||
|
var isubuntu = /Ubuntu/i.test(navigator.userAgent);
|
||||||
|
var isfedora = /Fedora/i.test(navigator.userAgent);
|
||||||
|
var isredhat = /Red Hat/i.test(navigator.userAgent);
|
||||||
|
var isdebian = /Debian/i.test(navigator.userAgent);
|
||||||
|
var isgentoo = /Gentoo/i.test(navigator.userAgent);
|
||||||
|
var iscentos = /CentOS/i.test(navigator.userAgent);
|
||||||
|
var issuse = /SUSE/i.test(navigator.userAgent);
|
||||||
|
|
||||||
|
if(!(ismobile) && !(iswindows) && !(ismac) && !(isubuntu) && !(isfedora) && !(isredhat) && !(isdebian) && !(isgentoo) && !(iscentos)
|
||||||
|
&& !(issuse)){
|
||||||
|
window.location.href = '".$config['homeurl']."index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$this->id."';
|
||||||
|
";
|
||||||
|
echo "
|
||||||
|
}
|
||||||
|
</script>";
|
||||||
|
|
||||||
if (!$system->getConfig('metaconsole')) {
|
if (!$system->getConfig('metaconsole')) {
|
||||||
$this->agent = agents_get_agents(array(
|
$this->agent = agents_get_agents(array(
|
||||||
'disabled' => 0,
|
'disabled' => 0,
|
||||||
@ -95,6 +116,9 @@ class Agent {
|
|||||||
$ui = Ui::getInstance();
|
$ui = Ui::getInstance();
|
||||||
$system = System::getInstance();
|
$system = System::getInstance();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$ui->createPage();
|
$ui->createPage();
|
||||||
|
|
||||||
if ($this->id != 0) {
|
if ($this->id != 0) {
|
||||||
@ -361,4 +385,9 @@ class Agent {
|
|||||||
$ui->endContent();
|
$ui->endContent();
|
||||||
$ui->showPage();
|
$ui->showPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
Loading…
x
Reference in New Issue
Block a user