post.sched.php
11.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<?php
wp_nonce_field('b2s_security_nonce', 'b2s_security_nonce');
/* Data */
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Post/Filter.php');
require_once (B2S_PLUGIN_DIR . 'includes/Util.php');
require_once B2S_PLUGIN_DIR . 'includes/B2S/Settings/Item.php';
$b2sShowByDate = isset($_GET['b2sShowByDate']) ? (preg_match("#^[0-9\-.\]]+$#", trim($_GET['b2sShowByDate'])) ? trim($_GET['b2sShowByDate']) : "") : ""; //YYYY-mm-dd
$b2sUserAuthId = isset($_GET['b2sUserAuthId']) ? (int) $_GET['b2sUserAuthId'] : 0;
$b2sPostBlogId = isset($_GET['b2sPostBlogId']) ? (int) $_GET['b2sPostBlogId'] : 0;
$b2sShowByNetwork = isset($_GET['b2sShowByNetwork']) ? (int) $_GET['b2sShowByNetwork'] : 0;
$options = new B2S_Options(B2S_PLUGIN_BLOG_USER_ID);
$optionUserTimeZone = $options->_getOption('user_time_zone');
$userTimeZone = ($optionUserTimeZone !== false) ? $optionUserTimeZone : get_option('timezone_string');
$userTimeZoneOffset = (empty($userTimeZone)) ? get_option('gmt_offset') : B2S_Util::getOffsetToUtcByTimeZone($userTimeZone);
$metaSettings = get_option('B2S_PLUGIN_GENERAL_OPTIONS');
?>
<div class="b2s-container">
<div class="b2s-inbox">
<div class="col-md-12 del-padding-left">
<div class="col-md-9 del-padding-left del-padding-right">
<!--Header|Start - Include-->
<?php require_once (B2S_PLUGIN_DIR . 'views/b2s/html/header.php'); ?>
<!--Header|End-->
<div class="clearfix"></div>
<!--Content|Start-->
<div class="panel panel-default">
<div class="panel-body">
<!--Posts from Wordpress Start-->
<!--Filter Start-->
<div class="b2s-post">
<div class="grid-body">
<div class="pull-right"><code id="b2s-user-time"><?php echo B2S_Util::getLocalDate($userTimeZoneOffset, substr(B2S_LANGUAGE, 0, 2)); ?> <?php echo ((substr(B2S_LANGUAGE, 0, 2) == 'de') ? esc_html__('Uhr', 'blog2social') : '') ?></code></div>
<?php require_once (B2S_PLUGIN_DIR . 'views/b2s/html/post.navbar.php'); ?>
<!-- Filter Post Start-->
<form class="b2sSortForm form-inline pull-left" action="#">
<input id="b2sType" type="hidden" value="sched" name="b2sType">
<input id="b2sShowByDate" type="hidden" value="<?php echo esc_attr($b2sShowByDate); ?>" name="b2sShowByDate">
<input id="b2sUserAuthId" type="hidden" value="<?php echo esc_attr($b2sUserAuthId); ?>" name="b2sUserAuthId">
<input id="b2sPostBlogId" type="hidden" value="<?php echo esc_attr($b2sPostBlogId); ?>" name="b2sPostBlogId">
<input id="b2sShowByNetwork" type="hidden" value="<?php echo esc_attr($b2sShowByNetwork); ?>" name="b2sShowByNetwork">
<input id="b2sPagination" type="hidden" value="1" name="b2sPagination">
<?php
$postFilter = new B2S_Post_Filter('sched');
echo $postFilter->getItemHtml('blog2social-sched');
?>
</form>
<!-- Filter Post Ende-->
<br/>
</div>
</div>
<div class="clearfix"></div>
<!--Filter End-->
<div class="b2s-sort-area">
<div class="b2s-loading-area" style="display:none">
<br>
<div class="b2s-loader-impulse b2s-loader-impulse-md"></div>
<div class="clearfix"></div>
<div class="text-center b2s-loader-text"><?php esc_html_e("Loading...", "blog2social"); ?></div>
</div>
<div class="row b2s-sort-result-area">
<div class="col-md-12">
<ul class="list-group b2s-sort-result-item-area"></ul>
<br>
<nav class="b2s-sort-pagination-area text-center"></nav>
<?php require_once (B2S_PLUGIN_DIR . 'views/b2s/html/footer.php'); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php require_once (B2S_PLUGIN_DIR . 'views/b2s/html/sidebar.php'); ?>
</div>
</div>
</div>
<div class="modal fade b2s-delete-sched-modal" tabindex="-1" role="dialog" aria-labelledby="b2s-delete-sched-modal" aria-hidden="true" data-backdrop="false">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="b2s-modal-close close" data-modal-name=".b2s-delete-sched-modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title"><?php esc_html_e('Delete entries form the scheduling', 'blog2social') ?></h4>
</div>
<div class="modal-body">
<b><?php esc_html_e('You are sure, you want to delete entries from the scheduling?', 'blog2social') ?> </b>
<br>
(<?php esc_html_e('Number of entries', 'blog2social') ?>: <span id="b2s-delete-confirm-post-count"></span>)
<input type="hidden" value="" id="b2s-delete-confirm-post-id">
</div>
<div class="modal-footer">
<button class="btn btn-default" data-dismiss="modal"><?php esc_html_e('NO', 'blog2social') ?></button>
<button class="btn btn-danger b2s-sched-delete-confirm-btn"><?php esc_html_e('YES, delete', 'blog2social') ?></button>
</div>
</div>
</div>
</div>
<div id="b2s-network-select-image" class="modal fade" role="dialog" aria-labelledby="b2s-network-select-image" aria-hidden="true" style="z-index: 1070">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="b2s-modal-close close" data-modal-name="#b2s-network-select-image">×</button>
<h4 class="modal-title"><?php esc_html_e('Select image for', 'blog2social') ?> <span class="b2s-selected-network-for-image-info"></span></h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-xs-12">
<div class="b2s-network-select-image-content"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="b2s-post-ship-item-post-format-modal" class="modal fade" role="dialog" aria-labelledby="b2s-post-ship-item-post-format-modal" aria-hidden="true" data-backdrop="false" style="z-index: 1070">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="b2s-modal-close close" data-modal-name="#b2s-post-ship-item-post-format-modal">×</button>
<h4 class="modal-title"><?php esc_html_e('Choose your', 'blog2social') ?> <span id="b2s-post-ship-item-post-format-network-title"></span> <?php esc_html_e('Post Format', 'blog2social') ?>
<?php if (B2S_PLUGIN_USER_VERSION >= 2) { ?>
<?php esc_html_e('for:', 'blog2social') ?> <span id="b2s-post-ship-item-post-format-network-display-name"></span>
<?php } ?>
</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-xs-12">
<?php
$settingsItem = new B2S_Settings_Item();
echo $settingsItem->setNetworkSettingsHtml();
echo $settingsItem->getNetworkSettingsHtml();
?>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="text-center">
<br>
<div class="b2s-post-format-settings-info" data-network-id="1" style="display:none;">
<b><?php esc_html_e('Define the default settings for the custom post format for all of your Facebook accounts in the Blog2Social settings.', 'blog2social'); ?></b>
</div>
<div class="b2s-post-format-settings-info" data-network-id="2" style="display:none;">
<b><?php esc_html_e('Define the default settings for the custom post format for all of your Twitter accounts in the Blog2Social settings.', 'blog2social'); ?></b>
</div>
<div class="b2s-post-format-settings-info" data-network-id="3" style="display:none;">
<b><?php esc_html_e('Define the default settings for the custom post format for all of your LinkedIn accounts in the Blog2Social settings.', 'blog2social'); ?></b>
</div>
<div class="b2s-post-format-settings-info" data-network-id="12" style="display:none;">
<b><?php esc_html_e('Define the default settings for the custom post format for all of your Instagram accounts in the Blog2Social settings.', 'blog2social'); ?></b>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<input type="hidden" id="b2sLang" value="<?php echo substr(B2S_LANGUAGE, 0, 2); ?>">
<input type="hidden" id="b2sJSTextAddPost" value="<?php echo esc_html_e("add post", "blog2social"); ?>">
<input type="hidden" id="b2sUserLang" value="<?php echo strtolower(substr(get_locale(), 0, 2)); ?>">
<input type='hidden' id="user_timezone" name="user_timezone" value="<?php echo $userTimeZoneOffset; ?>">
<input type="hidden" id="user_version" name="user_version" value="<?php echo B2S_PLUGIN_USER_VERSION; ?>">
<input type="hidden" id="b2sDefaultNoImage" value="<?php echo plugins_url('/assets/images/no-image.png', B2S_PLUGIN_FILE); ?>">
<input type="hidden" id="b2sPostId" value="">
<input type="hidden" id="b2sInsertImageType" value="0">
<input type="hidden" id="isOgMetaChecked" value="<?php echo (isset($metaSettings['og_active']) ? (int) $metaSettings['og_active'] : 0); ?>">
<input type="hidden" id="isCardMetaChecked" value="<?php echo (isset($metaSettings['card_active']) ? (int) $metaSettings['card_active'] : 0); ?>">
<input type="hidden" id="b2sNotAllowGif" value="<?php echo implode(";", json_decode(B2S_PLUGIN_NETWORK_NOT_ALLOW_GIF, true)); ?>">
<input type="hidden" id="b2sAnimateGif" value='<?php echo B2S_PLUGIN_NETWORK_ANIMATE_GIF; ?>'>
<input type="hidden" id="ogMetaNetworks" value="<?php echo implode(';', json_decode(B2S_PLUGIN_NETWORK_META_TAGS, true)['og']); ?>">
<input type="hidden" id="b2sEmojiTranslation" value='<?php echo json_encode(B2S_Tools::getEmojiTranslationList()); ?>'>
<script>
var b2s_has_premium = <?= B2S_PLUGIN_USER_VERSION > 0 ? "true" : "false"; ?>;
var b2s_plugin_url = '<?= B2S_PLUGIN_URL; ?>';
var b2s_post_formats = <?= json_encode(array('post' => array(esc_html__('Link Post', 'blog2social'), esc_html__('Image Post', 'blog2social')), 'image' => array(esc_html__('Image with frame', 'blog2social'), esc_html__('Image cut out','blog2social')))); ?>;
var b2s_is_calendar = true;
</script>