Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
addcpm-json
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Александр Чаплыгин
addcpm-json
Commits
4e1a42e8
Commit
4e1a42e8
authored
Jul 01, 2020
by
Александр Чаплыгин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Завел значение времени для кампаний
parent
38bef421
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
13 deletions
+24
-13
styles-amsystem.css
src/public/css/styles-amsystem.css
+5
-0
CabinetAmSystem.php
src/src/App/Action/User/CabinetAmSystem.php
+8
-3
campaign_item.phtml
src/templates/app/user/amsystem/campaign_item.phtml
+11
-10
No files found.
src/public/css/styles-amsystem.css
View file @
4e1a42e8
...
@@ -457,6 +457,11 @@ input.group-title {
...
@@ -457,6 +457,11 @@ input.group-title {
width
:
110px
;
width
:
110px
;
}
}
.form-control.date-value.datetime
{
width
:
150px
;
}
.form-control.price
,
.form-control.price
,
.form-control.order-sum
.form-control.order-sum
{
{
...
...
src/src/App/Action/User/CabinetAmSystem.php
View file @
4e1a42e8
...
@@ -206,6 +206,10 @@ class CabinetAmSystem extends Common
...
@@ -206,6 +206,10 @@ class CabinetAmSystem extends Common
$date_end_common
=
null
;
$date_end_common
=
null
;
}
}
}
}
$date_begin
=
date
(
"Y-m-d"
,
strtotime
(
$date_begin
));
$date_end
=
date
(
"Y-m-d"
,
strtotime
(
$date_end
));
if
(
$date_end_common
)
{
if
(
$date_end_common
)
{
$date_end_common
=
$date_end
;
$date_end_common
=
$date_end
;
}
}
...
@@ -352,9 +356,9 @@ class CabinetAmSystem extends Common
...
@@ -352,9 +356,9 @@ class CabinetAmSystem extends Common
}
}
}
}
$date_begin
=
$campaign
->
getDateBegin
(
);
$date_begin
=
date
(
"Y-m-d"
,
strtotime
(
$campaign
->
getDateBegin
())
);
$date_end_common
=
$campaign
->
getDateEnd
()
?
:
null
;
$date_end_common
=
$campaign
->
getDateEnd
()
?
(
date
(
"Y-m-d"
,
strtotime
(
$campaign
->
getDateEnd
())))
:
null
;
$date_end
=
$campaign
->
getDateEnd
()
?
:
date
(
"Y-m-d"
);
$date_end
=
$campaign
->
getDateEnd
()
?
date
(
"Y-m-d"
,
strtotime
(
$campaign
->
getDateEnd
()))
:
date
(
"Y-m-d"
);
$dates_common
=
[
$date_begin
,
$date_end_common
];
$dates_common
=
[
$date_begin
,
$date_end_common
];
$dates
=
[
$date_begin
,
$date_end
];
$dates
=
[
$date_begin
,
$date_end
];
$campaign_stat
=
$stats
->
getCampaignsStat
(
'campaign'
,
[(
int
)
$campaign_id
],
$campaign
->
getTargetAction
(),
$dates_common
,
true
);
$campaign_stat
=
$stats
->
getCampaignsStat
(
'campaign'
,
[(
int
)
$campaign_id
],
$campaign
->
getTargetAction
(),
$dates_common
,
true
);
...
@@ -412,6 +416,7 @@ class CabinetAmSystem extends Common
...
@@ -412,6 +416,7 @@ class CabinetAmSystem extends Common
$data
[
'code_regions'
]
=
$this
->
getCodeRegions
();
$data
[
'code_regions'
]
=
$this
->
getCodeRegions
();
$data
[
'code_cities'
]
=
$this
->
getCodeCities
();
$data
[
'code_cities'
]
=
$this
->
getCodeCities
();
$data
[
'img_domain'
]
=
(
getenv
(
'DEVELOPMENT'
))
?
self
::
IMG_DOMAIN_DEV
:
self
::
IMG_DOMAIN_PROD
;
$data
[
'img_domain'
]
=
(
getenv
(
'DEVELOPMENT'
))
?
self
::
IMG_DOMAIN_DEV
:
self
::
IMG_DOMAIN_PROD
;
$data
[
'dates_common'
]
=
$dates_common
;
}
else
{
}
else
{
$data
[
'error'
]
=
_t
(
'Извините, данная кампания закреплена за другим пользователем'
);
$data
[
'error'
]
=
_t
(
'Извините, данная кампания закреплена за другим пользователем'
);
...
...
src/templates/app/user/amsystem/campaign_item.phtml
View file @
4e1a42e8
...
@@ -60,8 +60,9 @@ if (!$error) {
...
@@ -60,8 +60,9 @@ if (!$error) {
$campaign_id
=
$campaign
->
getId
();
$campaign_id
=
$campaign
->
getId
();
$campaign_title
=
$campaign
->
getTitle
();
$campaign_title
=
$campaign
->
getTitle
();
$campaign_url
=
$campaign
->
getUrl
();
$campaign_url
=
$campaign
->
getUrl
();
$campaign_date_begin
=
$campaign
->
getDateBegin
();
$campaign_date_begin
=
date
(
'Y-m-d H:i'
,
strtotime
(
$campaign
->
getDateBegin
()));
$campaign_date_end
=
$campaign
->
getDateEnd
();
$campaign_date_end
=
date
(
'Y-m-d H:i'
,
strtotime
(
$campaign
->
getDateEnd
()));
$dates_common
=
$this
->
dates_common
;
$campaign_buy_type
=
$group
->
getBuyType
();
$campaign_buy_type
=
$group
->
getBuyType
();
$campaign_target_action
=
$group
->
getTargetAction
();
$campaign_target_action
=
$group
->
getTargetAction
();
$campaign_price
=
(
$campaign
->
getPrice
())
?
$campaign
->
getPrice
()
/
10
:
null
;
$campaign_price
=
(
$campaign
->
getPrice
())
?
$campaign
->
getPrice
()
/
10
:
null
;
...
@@ -172,9 +173,9 @@ if (!$error) {
...
@@ -172,9 +173,9 @@ if (!$error) {
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"title-field"
>
<?=
_t
(
'Даты проведения'
)
?>
</label>
<label
class=
"title-field"
>
<?=
_t
(
'Даты проведения'
)
?>
</label>
c:
c:
<input
type=
'text'
id=
"campaign-date-begin"
class=
"form-control date-value"
name=
"date_begin"
value=
"
<?=
$campaign_date_begin
?>
"
autocomplete=
"off"
/>
<input
type=
'text'
id=
"campaign-date-begin"
class=
"form-control date-value
datetime
"
name=
"date_begin"
value=
"
<?=
$campaign_date_begin
?>
"
autocomplete=
"off"
/>
по:
по:
<input
type=
'text'
id=
"campaign-date-end"
class=
"form-control date-value"
name=
"date_end"
value=
"
<?=
$campaign_date_end
?>
"
autocomplete=
"off"
/>
<input
type=
'text'
id=
"campaign-date-end"
class=
"form-control date-value
datetime
"
name=
"date_end"
value=
"
<?=
$campaign_date_end
?>
"
autocomplete=
"off"
/>
</div>
</div>
<!-- Ссылка -->
<!-- Ссылка -->
...
@@ -620,9 +621,9 @@ if (!$error) {
...
@@ -620,9 +621,9 @@ if (!$error) {
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
for=
"campaign-date-begin"
>
<?=
_t
(
'Дата'
)
?>
</label>
<label
for=
"campaign-date-begin"
>
<?=
_t
(
'Дата'
)
?>
</label>
c:
c:
<input
type=
'text'
id=
"campaign-date-begin-common"
class=
"campaign-date-begin form-control date-value"
name=
"date_begin"
value=
"
<?=
$
campaign_date_begin
?>
"
autocomplete=
"off"
/>
<input
type=
'text'
id=
"campaign-date-begin-common"
class=
"campaign-date-begin form-control date-value"
name=
"date_begin"
value=
"
<?=
$
dates_common
[
0
]
?>
"
autocomplete=
"off"
/>
по:
по:
<input
type=
'text'
id=
"campaign-date-end-common"
class=
"campaign-date-end form-control date-value"
name=
"date_end"
value=
"
<?=
$
campaign_date_end
?>
"
autocomplete=
"off"
/>
<input
type=
'text'
id=
"campaign-date-end-common"
class=
"campaign-date-end form-control date-value"
name=
"date_end"
value=
"
<?=
$
dates_common
[
1
]
?>
"
autocomplete=
"off"
/>
</div>
</div>
<div
class=
"chart-graph-stat-info"
>
<div
class=
"chart-graph-stat-info"
>
...
@@ -669,9 +670,9 @@ if (!$error) {
...
@@ -669,9 +670,9 @@ if (!$error) {
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
for=
"campaign-date-begin"
>
<?=
_t
(
'Дата'
)
?>
</label>
<label
for=
"campaign-date-begin"
>
<?=
_t
(
'Дата'
)
?>
</label>
c:
c:
<input
type=
'text'
id=
"campaign-date-begin-sites"
class=
"campaign-date-begin form-control date-value"
name=
"date_begin"
value=
"
<?=
$
campaign_date_begin
?>
"
autocomplete=
"off"
/>
<input
type=
'text'
id=
"campaign-date-begin-sites"
class=
"campaign-date-begin form-control date-value"
name=
"date_begin"
value=
"
<?=
$
dates_common
[
0
]
?>
"
autocomplete=
"off"
/>
по:
по:
<input
type=
'text'
id=
"campaign-date-end-sites"
class=
"campaign-date-end form-control date-value"
name=
"date_end"
value=
"
<?=
$
campaign_date_end
?>
"
autocomplete=
"off"
/>
<input
type=
'text'
id=
"campaign-date-end-sites"
class=
"campaign-date-end form-control date-value"
name=
"date_end"
value=
"
<?=
$
dates_common
[
1
]
?>
"
autocomplete=
"off"
/>
</div>
</div>
<div
class=
"sites-stats"
>
<div
class=
"sites-stats"
>
...
@@ -716,9 +717,9 @@ if (!$error) {
...
@@ -716,9 +717,9 @@ if (!$error) {
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
for=
"campaign-date-begin"
>
<?=
_t
(
'Дата'
)
?>
</label>
<label
for=
"campaign-date-begin"
>
<?=
_t
(
'Дата'
)
?>
</label>
c:
c:
<input
type=
'text'
id=
"campaign-date-begin-regions"
class=
"campaign-date-begin form-control date-value"
name=
"date_begin"
value=
"
<?=
$
campaign_date_begin
?>
"
autocomplete=
"off"
/>
<input
type=
'text'
id=
"campaign-date-begin-regions"
class=
"campaign-date-begin form-control date-value"
name=
"date_begin"
value=
"
<?=
$
dates_common
[
0
]
?>
"
autocomplete=
"off"
/>
по:
по:
<input
type=
'text'
id=
"campaign-date-end-regions"
class=
"campaign-date-end form-control date-value"
name=
"date_end"
value=
"
<?=
$
campaign_date_end
?>
"
autocomplete=
"off"
/>
<input
type=
'text'
id=
"campaign-date-end-regions"
class=
"campaign-date-end form-control date-value"
name=
"date_end"
value=
"
<?=
$
dates_common
[
1
]
?>
"
autocomplete=
"off"
/>
</div>
</div>
<div
class=
"regions-stats"
>
<div
class=
"regions-stats"
>
...
...
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