Create mobileswitcher.php
This commit is contained in:
parent
53ac08b647
commit
75963a89e7
23
route/mobileswitcher.php
Normal file
23
route/mobileswitcher.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
loadHelper("mobiletool");
|
||||
|
||||
$from = get_requested_value("from");
|
||||
$redirect_url = get_requested_value("redirect_url");
|
||||
$dm = detect_mobile();
|
||||
|
||||
if($from == "pc") {
|
||||
$dm = 1;
|
||||
} elseif($from == "mobile") {
|
||||
$dm = 0;
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"from" => $from,
|
||||
"dm" => $dm,
|
||||
"redirect_url" => get_final_link($redirect_url, array(
|
||||
"action" => "mobileswitcher",
|
||||
"dm" => $dm,
|
||||
)),
|
||||
);
|
||||
|
||||
renderView("view_mobileswitcher", $data);
|
Loading…
Reference in New Issue
Block a user