mirror of
https://github.com/Mibew/i18n.git
synced 2025-01-22 21:40:28 +03:00
move generate_button -> getcode.php
This commit is contained in:
parent
52666eb7c7
commit
f3d38642c6
@ -173,22 +173,6 @@ function append_query($link,$pv) {
|
||||
return "$link$infix$pv";
|
||||
}
|
||||
|
||||
function generate_button($title,$locale,$style,$group,$inner,$showhost,$forcesecure,$modsecurity) {
|
||||
$link = get_app_location($showhost,$forcesecure)."/client.php";
|
||||
if($locale)
|
||||
$link = append_query($link, "locale=$locale");
|
||||
if($style)
|
||||
$link = append_query($link, "style=$style");
|
||||
if($group)
|
||||
$link = append_query($link, "group=$group");
|
||||
|
||||
$modsecfix = $modsecurity ? ".replace('http://','').replace('https://','')" : "";
|
||||
$jslink = append_query("'".$link,"url='+escape(document.location.href$modsecfix)+'&referrer='+escape(document.referrer$modsecfix)");
|
||||
$temp = get_popup($link, "$jslink",
|
||||
$inner, $title, "webim", "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=640,height=480,resizable=1" );
|
||||
return "<!-- webim button -->".$temp."<!-- / webim button -->";
|
||||
}
|
||||
|
||||
function check_login($redirect=true) {
|
||||
global $webimroot;
|
||||
if( !isset( $_SESSION['operator'] ) ) {
|
||||
|
@ -23,6 +23,22 @@ require_once('../libs/common.php');
|
||||
require_once('../libs/operator.php');
|
||||
require_once('../libs/groups.php');
|
||||
|
||||
function generate_button($title,$locale,$style,$group,$inner,$showhost,$forcesecure,$modsecurity) {
|
||||
$link = get_app_location($showhost,$forcesecure)."/client.php";
|
||||
if($locale)
|
||||
$link = append_query($link, "locale=$locale");
|
||||
if($style)
|
||||
$link = append_query($link, "style=$style");
|
||||
if($group)
|
||||
$link = append_query($link, "group=$group");
|
||||
|
||||
$modsecfix = $modsecurity ? ".replace('http://','').replace('https://','')" : "";
|
||||
$jslink = append_query("'".$link,"url='+escape(document.location.href$modsecfix)+'&referrer='+escape(document.referrer$modsecfix)");
|
||||
$temp = get_popup($link, "$jslink",
|
||||
$inner, $title, "webim", "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=640,height=480,resizable=1" );
|
||||
return "<!-- webim button -->".$temp."<!-- / webim button -->";
|
||||
}
|
||||
|
||||
$operator = check_login();
|
||||
loadsettings();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user