Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
retypos-webclient
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eterfund
retypos-webclient
Commits
8cd8dda5
You need to sign in or sign up before continuing.
Commit
8cd8dda5
authored
May 24, 2013
by
Vladislav Bolshakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
barbass: исправление ошибок
parent
43e2d7da
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
76 deletions
+13
-76
etersoft_typos.js
etersoft_typos.js
+8
-8
functions.php
functions.php
+2
-2
server.php
server.php
+3
-2
typos.css
typos.css
+0
-64
No files found.
etersoft_typos.js
View file @
8cd8dda5
...
@@ -20,7 +20,7 @@ ETYPOS.prototype = {
...
@@ -20,7 +20,7 @@ ETYPOS.prototype = {
'text'
:
''
,
'text'
:
''
,
'comment'
:
''
,
'comment'
:
''
,
'language'
:
'ru'
,
'language'
:
'ru'
,
'oldbrowser'
:
0
,
'old
_
browser'
:
0
,
},
},
init
:
function
(
options
)
{
init
:
function
(
options
)
{
...
@@ -32,7 +32,7 @@ ETYPOS.prototype = {
...
@@ -32,7 +32,7 @@ ETYPOS.prototype = {
this
.
request
=
new
(
window
.
XDomainRequest
||
window
.
XMLHttpRequest
);
this
.
request
=
new
(
window
.
XDomainRequest
||
window
.
XMLHttpRequest
);
this
.
userdata
[
'old
browser'
]
=
0
;
//
(this.request.withCredentials == undefined) ? 1 : 0;
this
.
userdata
[
'old
_browser'
]
=
(
this
.
request
.
withCredentials
==
undefined
)
?
1
:
0
;
},
},
...
@@ -125,7 +125,7 @@ ETYPOS.prototype = {
...
@@ -125,7 +125,7 @@ ETYPOS.prototype = {
}
}
//Если не поддерживаются кроссдоменные запросы
//Если не поддерживаются кроссдоменные запросы
if
(
this
.
userdata
[
'oldbrowser'
])
{
if
(
this
.
userdata
[
'old
_
browser'
])
{
this
.
ajaxQueryOldBrowser
();
this
.
ajaxQueryOldBrowser
();
}
else
{
}
else
{
this
.
ajaxQuery
();
this
.
ajaxQuery
();
...
@@ -148,13 +148,13 @@ ETYPOS.prototype = {
...
@@ -148,13 +148,13 @@ ETYPOS.prototype = {
/*Отправка данных на старых броузерах*/
/*Отправка данных на старых броузерах*/
ajaxQueryOldBrowser
:
function
()
{
ajaxQueryOldBrowser
:
function
()
{
window
.
open
(
this
.
server_url
+
'?oldbrowser='
+
encodeURIComponent
(
this
.
userdata
[
'oldbrowser'
])
+
'&url='
+
encodeURI
(
this
.
userdata
[
'url'
])
+
'&comment='
+
encodeURIComponent
(
this
.
userdata
[
'comment'
])
+
'&text='
+
encodeURIComponent
(
this
.
userdata
[
'text'
]
+
'&language='
+
encodeURIComponent
(
this
.
userdata
[
'language'
])),
'_blank'
);
var
this_object
=
this
;
window
.
open
(
this
.
server_url
+
'?old_browser='
+
encodeURIComponent
(
this
.
userdata
[
'old_browser'
])
+
'&url='
+
encodeURI
(
this
.
userdata
[
'url'
])
+
'&comment='
+
encodeURIComponent
(
this
.
userdata
[
'comment'
])
+
'&text='
+
encodeURIComponent
(
this
.
userdata
[
'text'
]
+
'&language='
+
encodeURIComponent
(
this
.
userdata
[
'language'
])),
'_blank'
);
window
.
parent
.
focus
();
window
.
parent
.
focus
();
this
.
printMessage
(
"success"
,
"Спасибо за ваше внимание"
);
this
.
printMessage
(
"success"
,
"Спасибо за ваше внимание"
);
//Ошибка закрытия окна!
var
this_object
=
this
;
window
.
setTimeout
(
function
()
{
this_object
.
closeWindow
();},
4000
);
window
.
setTimeout
(
'this.closeWindow()'
,
2000
);
return
true
;
return
true
;
},
},
...
@@ -219,7 +219,7 @@ ETYPOS.prototype = {
...
@@ -219,7 +219,7 @@ ETYPOS.prototype = {
},
},
/*Проверяем время, прошедшее с последнего отправления данных*/
/*Проверяем время, прошедшее с последнего отправления данных*/
checkTime
:
function
()
{
return
true
;
checkTime
:
function
()
{
var
prev_time
=
(
parseInt
(
this
.
getStorage
(
"etersoft_typos/"
+
window
.
location
.
hostname
)))
?
parseInt
(
this
.
getStorage
(
"etersoft_typos/"
+
window
.
location
.
hostname
))
:
parseInt
(
this
.
last_query_time
);
var
prev_time
=
(
parseInt
(
this
.
getStorage
(
"etersoft_typos/"
+
window
.
location
.
hostname
)))
?
parseInt
(
this
.
getStorage
(
"etersoft_typos/"
+
window
.
location
.
hostname
))
:
parseInt
(
this
.
last_query_time
);
if
(
isNaN
(
prev_time
))
{
if
(
isNaN
(
prev_time
))
{
return
true
;
return
true
;
...
...
functions.php
View file @
8cd8dda5
...
@@ -72,9 +72,9 @@ function getIp() {
...
@@ -72,9 +72,9 @@ function getIp() {
/*Выводим массив в json-формате*/
/*Выводим массив в json-формате*/
function
echoJsonData
(
$data
)
{
function
echoJsonData
(
$data
)
{
global
$
oldbrowser
;
global
$
userdata
;
if
(
$
oldbrowser
==
1
)
{
if
(
$
userdata
[
'old_browser'
]
==
1
)
{
echo
" <script type='text/javascript'>window.close();</script>"
;
echo
" <script type='text/javascript'>window.close();</script>"
;
}
else
{
}
else
{
echo
json_encode
(
$data
);
echo
json_encode
(
$data
);
...
...
server.php
View file @
8cd8dda5
...
@@ -31,8 +31,8 @@ if (in_array(getRequest('language', 'ru'), $LANGUAGES)) {
...
@@ -31,8 +31,8 @@ if (in_array(getRequest('language', 'ru'), $LANGUAGES)) {
}
}
/*Если часто отправляет (более 1 раза в минуту)*/
/*Если часто отправляет (более 1 раза в минуту)*/
setSession
(
'last_activity'
,
time
());
$last_time_activity
=
getSession
(
'last_activity'
);
$last_time_activity
=
getSession
(
'last_activity'
);
setSession
(
'last_activity'
,
time
());
if
(
$last_time_activity
)
{
if
(
$last_time_activity
)
{
if
((
time
()
-
$last_time_activity
)
<=
MIN_TIME
)
{
if
((
time
()
-
$last_time_activity
)
<=
MIN_TIME
)
{
...
@@ -54,7 +54,8 @@ if (!validate()) {
...
@@ -54,7 +54,8 @@ if (!validate()) {
return
false
;
return
false
;
}
}
$userdata
[
'oldbrowser'
]
=
getRequest
(
'oldbrowser'
,
0
);
//TODO - работу со старыми бразуерами будем подерживать или нет? Если будем, то надо доработать работу на стороне сервера (закрытие окна)
$userdata
[
'old_browser'
]
=
getRequest
(
'old_browser'
,
0
);
$userdata
[
'comment'
]
=
htmlspecialchars
(
rawurldecode
(
getRequest
(
'comment'
,
''
)));
$userdata
[
'comment'
]
=
htmlspecialchars
(
rawurldecode
(
getRequest
(
'comment'
,
''
)));
$userdata
[
'url'
]
=
getFormatingUrl
(
rawurldecode
(
getRequest
(
'url'
,
''
)));
$userdata
[
'url'
]
=
getFormatingUrl
(
rawurldecode
(
getRequest
(
'url'
,
''
)));
$userdata
[
'text'
]
=
htmlspecialchars
(
rawurldecode
(
getRequest
(
'text'
,
''
)));
$userdata
[
'text'
]
=
htmlspecialchars
(
rawurldecode
(
getRequest
(
'text'
,
''
)));
...
...
typos.css
deleted
100644 → 0
View file @
43e2d7da
#e_typos_div
{
display
:
none
;
z-index
:
10000
;
position
:
absolute
;
font-family
:
Arial
,
Sans-Serif
;
font-size
:
15px
;
background-color
:
white
;
padding
:
0px
2px
2px
2px
;
width
:
350px
;
border-radius
:
0
0
10
10
;
box-shadow
:
0px
0px
10px
rgba
(
0
,
0
,
0
,
0.5
);
text-align
:
center
;
}
#e_typos_title
{
text-align
:
left
;
padding
:
0.5em
0.5em
0.5em
1em
;
border-radius
:
0
0
10
10
;
background
:
#4169e1
;
color
:
white
;
margin-top
:
1px
;
}
#e_typos_close
{
cursor
:
pointer
;
opacity
:
0.5
;
margin-left
:
190px
;
}
#e_typos_close
:hover
{
opacity
:
1
;
}
#e_typos_desc
{
font-size
:
13px
;
}
#e_typos_div
input
{
font-family
:
Arial
,
Sans-Serif
;
font-size
:
13px
;
margin-bottom
:
5px
;
padding
:
3px
;
}
#e_typos_error
{
display
:
none
;
}
.e_typos_button
{
border-radius
:
10px
;
border
:
1px
solid
#d0d0d0
;
background-image
:
-webkit-linear-gradient
(
top
,
rgba
(
255
,
255
,
255
,
0
),
rgba
(
0
,
0
,
0
,
0.2
));
background-image
:
-moz-linear-gradient
(
top
,
rgba
(
255
,
255
,
255
,
0
),
rgba
(
0
,
0
,
0
,
0.2
));
background-image
:
-o-linear-gradient
(
top
,
rgba
(
255
,
255
,
255
,
0
),
rgba
(
0
,
0
,
0
,
0.2
));
background-image
:
-ms-linear-gradient
(
top
,
rgba
(
255
,
255
,
255
,
0
),
rgba
(
0
,
0
,
0
,
0.2
));
background-image
:
linear-gradient
(
top
,
rgba
(
255
,
255
,
255
,
0
),
rgba
(
0
,
0
,
0
,
0.2
));
background-color
:
#FFFFFF
!important
;
}
.e_typos_button
:hover
{
border
:
1px
solid
#d0d0d0
;
background-color
:
#DDDDDD
!important
;
border-radius
:
10px
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment