[0] | 1 | <?php |
---|
| 2 | # -- BEGIN LICENSE BLOCK --------------------------------------- |
---|
| 3 | # |
---|
| 4 | # This file is part of Dotclear 2. |
---|
| 5 | # |
---|
[1179] | 6 | # Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear |
---|
[0] | 7 | # Licensed under the GPL version 2.0 license. |
---|
| 8 | # See LICENSE file or |
---|
| 9 | # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
---|
| 10 | # |
---|
| 11 | # -- END LICENSE BLOCK ----------------------------------------- |
---|
| 12 | |
---|
| 13 | if (!empty($_GET['pf'])) { |
---|
| 14 | require dirname(__FILE__).'/../inc/load_plugin_file.php'; |
---|
| 15 | exit; |
---|
| 16 | } |
---|
| 17 | |
---|
| 18 | require dirname(__FILE__).'/../inc/admin/prepend.php'; |
---|
| 19 | |
---|
| 20 | if (!empty($_GET['default_blog'])) { |
---|
| 21 | try { |
---|
| 22 | $core->setUserDefaultBlog($core->auth->userID(),$core->blog->id); |
---|
| 23 | http::redirect('index.php'); |
---|
| 24 | } catch (Exception $e) { |
---|
| 25 | $core->error->add($e->getMessage()); |
---|
| 26 | } |
---|
| 27 | } |
---|
| 28 | |
---|
| 29 | dcPage::check('usage,contentadmin'); |
---|
| 30 | |
---|
| 31 | # Logout |
---|
| 32 | if (!empty($_GET['logout'])) { |
---|
| 33 | $core->session->destroy(); |
---|
| 34 | if (isset($_COOKIE['dc_admin'])) { |
---|
| 35 | unset($_COOKIE['dc_admin']); |
---|
| 36 | setcookie('dc_admin',false,-600,'','',DC_ADMIN_SSL); |
---|
| 37 | } |
---|
| 38 | http::redirect('auth.php'); |
---|
| 39 | exit; |
---|
| 40 | } |
---|
| 41 | |
---|
| 42 | # Plugin install |
---|
| 43 | $plugins_install = $core->plugins->installModules(); |
---|
| 44 | |
---|
[13] | 45 | # Check dashboard module prefs |
---|
[157] | 46 | $ws = $core->auth->user_prefs->addWorkspace('dashboard'); |
---|
[13] | 47 | if (!$core->auth->user_prefs->dashboard->prefExists('doclinks')) { |
---|
| 48 | if (!$core->auth->user_prefs->dashboard->prefExists('doclinks',true)) { |
---|
| 49 | $core->auth->user_prefs->dashboard->put('doclinks',true,'boolean','',null,true); |
---|
| 50 | } |
---|
| 51 | $core->auth->user_prefs->dashboard->put('doclinks',true,'boolean'); |
---|
| 52 | } |
---|
| 53 | if (!$core->auth->user_prefs->dashboard->prefExists('dcnews')) { |
---|
| 54 | if (!$core->auth->user_prefs->dashboard->prefExists('dcnews',true)) { |
---|
| 55 | $core->auth->user_prefs->dashboard->put('dcnews',true,'boolean','',null,true); |
---|
| 56 | } |
---|
| 57 | $core->auth->user_prefs->dashboard->put('dcnews',true,'boolean'); |
---|
| 58 | } |
---|
| 59 | if (!$core->auth->user_prefs->dashboard->prefExists('quickentry')) { |
---|
| 60 | if (!$core->auth->user_prefs->dashboard->prefExists('quickentry',true)) { |
---|
[1247] | 61 | $core->auth->user_prefs->dashboard->put('quickentry',false,'boolean','',null,true); |
---|
[13] | 62 | } |
---|
[1247] | 63 | $core->auth->user_prefs->dashboard->put('quickentry',false,'boolean'); |
---|
[13] | 64 | } |
---|
| 65 | |
---|
[1699] | 66 | // Handle folded/unfolded sections in admin from user preferences |
---|
| 67 | $ws = $core->auth->user_prefs->addWorkspace('toggles'); |
---|
| 68 | if (!$core->auth->user_prefs->toggles->prefExists('unfolded_sections')) { |
---|
| 69 | $core->auth->user_prefs->toggles->put('unfolded_sections','','string','Folded sections in admin',null,true); |
---|
| 70 | } |
---|
| 71 | |
---|
| 72 | |
---|
[0] | 73 | # Dashboard icons |
---|
| 74 | $__dashboard_icons = new ArrayObject(); |
---|
| 75 | |
---|
[3] | 76 | # Dashboard favorites |
---|
[0] | 77 | $post_count = $core->blog->getPosts(array(),true)->f(0); |
---|
| 78 | $str_entries = ($post_count > 1) ? __('%d entries') : __('%d entry'); |
---|
| 79 | |
---|
| 80 | $comment_count = $core->blog->getComments(array(),true)->f(0); |
---|
| 81 | $str_comments = ($comment_count > 1) ? __('%d comments') : __('%d comment'); |
---|
| 82 | |
---|
[3] | 83 | $ws = $core->auth->user_prefs->addWorkspace('favorites'); |
---|
| 84 | $count = 0; |
---|
| 85 | foreach ($ws->dumpPrefs() as $k => $v) { |
---|
| 86 | // User favorites only |
---|
| 87 | if (!$v['global']) { |
---|
| 88 | $fav = unserialize($v['value']); |
---|
| 89 | if (($fav['permissions'] == '*') || $core->auth->check($fav['permissions'],$core->blog->id)) { |
---|
[896] | 90 | if (dc_valid_fav($fav['url'])) { |
---|
| 91 | $count++; |
---|
| 92 | $title = ($fav['name'] == 'posts' ? sprintf($str_entries,$post_count) : |
---|
| 93 | ($fav['name'] == 'comments' ? sprintf($str_comments,$comment_count) : $fav['title'])); |
---|
| 94 | $__dashboard_icons[$fav['name']] = new ArrayObject(array(__($title),$fav['url'],$fav['large-icon'])); |
---|
[130] | 95 | |
---|
[896] | 96 | # Let plugins set their own title for favorite on dashboard |
---|
| 97 | $core->callBehavior('adminDashboardFavsIcon',$core,$fav['name'],$__dashboard_icons[$fav['name']]); |
---|
| 98 | } |
---|
[3] | 99 | } |
---|
| 100 | } |
---|
| 101 | } |
---|
| 102 | if (!$count) { |
---|
| 103 | // Global favorites if any |
---|
| 104 | foreach ($ws->dumpPrefs() as $k => $v) { |
---|
| 105 | $fav = unserialize($v['value']); |
---|
| 106 | if (($fav['permissions'] == '*') || $core->auth->check($fav['permissions'],$core->blog->id)) { |
---|
[896] | 107 | if (dc_valid_fav($fav['url'])) { |
---|
| 108 | $count++; |
---|
| 109 | $title = ($fav['name'] == 'posts' ? sprintf($str_entries,$post_count) : |
---|
| 110 | ($fav['name'] == 'comments' ? sprintf($str_comments,$comment_count) : $fav['title'])); |
---|
| 111 | $__dashboard_icons[$fav['name']] = new ArrayObject(array(__($title),$fav['url'],$fav['large-icon'])); |
---|
[130] | 112 | |
---|
[896] | 113 | # Let plugins set their own title for favorite on dashboard |
---|
| 114 | $core->callBehavior('adminDashboardFavsIcon',$core,$fav['name'],$__dashboard_icons[$fav['name']]); |
---|
| 115 | } |
---|
[3] | 116 | } |
---|
| 117 | } |
---|
[0] | 118 | } |
---|
[3] | 119 | if (!$count) { |
---|
| 120 | // No user or global favorites, add "user pref" and "new entry" fav |
---|
| 121 | if ($core->auth->check('usage,contentadmin',$core->blog->id)) { |
---|
| 122 | $__dashboard_icons['new_post'] = new ArrayObject(array(__('New entry'),'post.php','images/menu/edit-b.png')); |
---|
| 123 | } |
---|
| 124 | $__dashboard_icons['prefs'] = new ArrayObject(array(__('My preferences'),'preferences.php','images/menu/user-pref-b.png')); |
---|
| 125 | } |
---|
[0] | 126 | |
---|
| 127 | # Latest news for dashboard |
---|
| 128 | $__dashboard_items = new ArrayObject(array(new ArrayObject,new ArrayObject)); |
---|
| 129 | |
---|
[13] | 130 | $dashboardItem = 0; |
---|
[0] | 131 | |
---|
[13] | 132 | if ($core->auth->user_prefs->dashboard->dcnews) { |
---|
| 133 | try |
---|
| 134 | { |
---|
| 135 | if (empty($__resources['rss_news'])) { |
---|
| 136 | throw new Exception(); |
---|
| 137 | } |
---|
| 138 | |
---|
| 139 | $feed_reader = new feedReader; |
---|
| 140 | $feed_reader->setCacheDir(DC_TPL_CACHE); |
---|
| 141 | $feed_reader->setTimeout(2); |
---|
| 142 | $feed_reader->setUserAgent('Dotclear - http://www.dotclear.org/'); |
---|
| 143 | $feed = $feed_reader->parse($__resources['rss_news']); |
---|
| 144 | if ($feed) |
---|
| 145 | { |
---|
[1728] | 146 | $latest_news = '<h3>'.__('Dotclear news').'</h3><dl id="news">'; |
---|
[13] | 147 | $i = 1; |
---|
| 148 | foreach ($feed->items as $item) |
---|
| 149 | { |
---|
[1728] | 150 | $dt = isset($item->link) ? '<a href="'.$item->link.'" title="'.$item->title.' ('.__('new window').')">'. |
---|
| 151 | $item->title.' <img src="images/outgoing-blue.png" alt="" /></a>' : $item->title; |
---|
[13] | 152 | |
---|
| 153 | if ($i < 3) { |
---|
| 154 | $latest_news .= |
---|
| 155 | '<dt>'.$dt.'</dt>'. |
---|
[1000] | 156 | '<dd><p><strong>'.dt::dt2str(__('%d %B %Y:'),$item->pubdate,'Europe/Paris').'</strong> '. |
---|
[13] | 157 | '<em>'.text::cutString(html::clean($item->content),120).'...</em></p></dd>'; |
---|
| 158 | } else { |
---|
| 159 | $latest_news .= |
---|
| 160 | '<dt>'.$dt.'</dt>'. |
---|
[1000] | 161 | '<dd>'.dt::dt2str(__('%d %B %Y:'),$item->pubdate,'Europe/Paris').'</dd>'; |
---|
[13] | 162 | } |
---|
| 163 | $i++; |
---|
[1788] | 164 | if ($i > 2) { break; } |
---|
[13] | 165 | } |
---|
| 166 | $latest_news .= '</dl>'; |
---|
| 167 | $__dashboard_items[$dashboardItem][] = $latest_news; |
---|
| 168 | $dashboardItem++; |
---|
| 169 | } |
---|
[0] | 170 | } |
---|
[13] | 171 | catch (Exception $e) {} |
---|
[0] | 172 | } |
---|
| 173 | |
---|
[1378] | 174 | # Documentation links |
---|
| 175 | if ($core->auth->user_prefs->dashboard->doclinks) { |
---|
| 176 | if (!empty($__resources['doc'])) |
---|
| 177 | { |
---|
| 178 | $doc_links = '<h3>'.__('Documentation and support').'</h3><ul>'; |
---|
| 179 | |
---|
| 180 | foreach ($__resources['doc'] as $k => $v) { |
---|
[1728] | 181 | $doc_links .= '<li><a href="'.$v.'" title="'.$k.' ('.__('new window').')">'.$k. |
---|
| 182 | ' <img src="images/outgoing-blue.png" alt="" /></a></li>'; |
---|
[1378] | 183 | } |
---|
| 184 | |
---|
| 185 | $doc_links .= '</ul>'; |
---|
| 186 | $__dashboard_items[$dashboardItem][] = $doc_links; |
---|
| 187 | $dashboardItem++; |
---|
| 188 | } |
---|
| 189 | } |
---|
| 190 | |
---|
[0] | 191 | $core->callBehavior('adminDashboardItems', $core, $__dashboard_items); |
---|
| 192 | |
---|
[480] | 193 | # Dashboard content |
---|
| 194 | $dashboardContents = ''; |
---|
| 195 | $__dashboard_contents = new ArrayObject(array(new ArrayObject,new ArrayObject)); |
---|
| 196 | $core->callBehavior('adminDashboardContents', $core, $__dashboard_contents); |
---|
| 197 | |
---|
[0] | 198 | /* DISPLAY |
---|
| 199 | -------------------------------------------------------- */ |
---|
| 200 | dcPage::open(__('Dashboard'), |
---|
| 201 | dcPage::jsToolBar(). |
---|
| 202 | dcPage::jsLoad('js/_index.js'). |
---|
| 203 | # --BEHAVIOR-- adminDashboardHeaders |
---|
[1358] | 204 | $core->callBehavior('adminDashboardHeaders'), |
---|
| 205 | dcPage::breadcrumb( |
---|
| 206 | array( |
---|
| 207 | '<span class="page-title">'.__('Dashboard').' : '.html::escapeHTML($core->blog->name).'</span>' => '' |
---|
| 208 | ), |
---|
| 209 | false) |
---|
[0] | 210 | ); |
---|
| 211 | |
---|
[1422] | 212 | # Dotclear updates notifications |
---|
| 213 | if ($core->auth->isSuperAdmin() && is_readable(DC_DIGESTS)) |
---|
| 214 | { |
---|
| 215 | $updater = new dcUpdate(DC_UPDATE_URL,'dotclear',DC_UPDATE_VERSION,DC_TPL_CACHE.'/versions'); |
---|
| 216 | $new_v = $updater->check(DC_VERSION); |
---|
| 217 | $version_info = $new_v ? $updater->getInfoURL() : ''; |
---|
| 218 | |
---|
| 219 | if ($updater->getNotify() && $new_v) { |
---|
[1697] | 220 | echo |
---|
[1698] | 221 | '<div class="dc-update"><h3>'.sprintf(__('Dotclear %s is available!'),$new_v).'</h3> '. |
---|
[1697] | 222 | '<p><a class="button submit" href="update.php">'.sprintf(__('Upgrade now'),$new_v).'</a> '. |
---|
| 223 | '<a href="update.php?hide_msg=1">'.__('Remind me later').'</a>'. |
---|
| 224 | ($version_info ? ' </p>'. |
---|
[1770] | 225 | '<p><a href="'.$version_info.'" class="updt-info">'.__('Information about this version').'</a>' : '').'</p>'. |
---|
[1697] | 226 | '</div>'; |
---|
[1422] | 227 | } |
---|
| 228 | } |
---|
[0] | 229 | |
---|
| 230 | if ($core->auth->getInfo('user_default_blog') != $core->blog->id && $core->auth->blog_count > 1) { |
---|
| 231 | echo |
---|
[510] | 232 | '<p><a href="index.php?default_blog=1" class="button">'.__('Make this blog my default blog').'</a></p>'; |
---|
[0] | 233 | } |
---|
| 234 | |
---|
| 235 | if ($core->blog->status == 0) { |
---|
[1558] | 236 | echo '<p class="static-msg">'.__('This blog is offline').'.</p>'; |
---|
[0] | 237 | } elseif ($core->blog->status == -1) { |
---|
[1558] | 238 | echo '<p class="static-msg">'.__('This blog is removed').'.</p>'; |
---|
[0] | 239 | } |
---|
| 240 | |
---|
[374] | 241 | if (!defined('DC_ADMIN_URL') || !DC_ADMIN_URL) { |
---|
[0] | 242 | echo |
---|
| 243 | '<p class="static-msg">'. |
---|
[1077] | 244 | sprintf(__('%s is not defined, you should edit your configuration file.'),'DC_ADMIN_URL'). |
---|
| 245 | ' '.__('See <a href="http://dotclear.org/documentation/2.0/admin/config">documentation</a> for more information.'). |
---|
[373] | 246 | '</p>'; |
---|
| 247 | } |
---|
| 248 | |
---|
[374] | 249 | if (!defined('DC_ADMIN_MAILFROM') || !DC_ADMIN_MAILFROM) { |
---|
[373] | 250 | echo |
---|
| 251 | '<p class="static-msg">'. |
---|
[1077] | 252 | sprintf(__('%s is not defined, you should edit your configuration file.'),'DC_ADMIN_MAILFROM'). |
---|
| 253 | ' '.__('See <a href="http://dotclear.org/documentation/2.0/admin/config">documentation</a> for more information.'). |
---|
[0] | 254 | '</p>'; |
---|
| 255 | } |
---|
| 256 | |
---|
[1535] | 257 | $err = array(); |
---|
| 258 | |
---|
| 259 | # Check cache directory |
---|
[1705] | 260 | if ( $core->auth->isSuperAdmin() ) { |
---|
| 261 | if (!is_dir(DC_TPL_CACHE) || !is_writable(DC_TPL_CACHE)) { |
---|
[1708] | 262 | $err[] = '<p>'.__("The cache directory does not exist or is not writable. You must create this directory with sufficient rights and affect this location to \"DC_TPL_CACHE\" in inc/config.php file.").'</p>'; |
---|
[1705] | 263 | } |
---|
| 264 | } else { |
---|
| 265 | if (!is_dir(DC_TPL_CACHE) || !is_writable(DC_TPL_CACHE)) { |
---|
[1708] | 266 | $err[] = '<p>'.__("The cache directory does not exist or is not writable. You should contact your administrator.").'</p>'; |
---|
[1705] | 267 | } |
---|
[1535] | 268 | } |
---|
| 269 | |
---|
| 270 | # Check public directory |
---|
[1705] | 271 | if ( $core->auth->isSuperAdmin() ) { |
---|
| 272 | if (!is_dir($core->blog->public_path) || !is_writable($core->blog->public_path)) { |
---|
[1708] | 273 | $err[] = '<p>'.__("There is no writable directory /public/ at the location set in about:config \"public_path\". You must create this directory with sufficient rights (or change this setting).").'</p>'; |
---|
[1705] | 274 | } |
---|
| 275 | } else { |
---|
| 276 | if (!is_dir($core->blog->public_path) || !is_writable($core->blog->public_path)) { |
---|
[1708] | 277 | $err[] = '<p>'.__("There is no writable root directory for the media manager. You should contact your administrator.").'</p>'; |
---|
[1705] | 278 | } |
---|
[1535] | 279 | } |
---|
| 280 | |
---|
| 281 | # Error list |
---|
| 282 | if (count($err) > 0) { |
---|
| 283 | echo '<div class="error"><p><strong>Erreur :</strong></p>'. |
---|
| 284 | '<ul><li>'.implode("</li><li>",$err).'</li></ul></div>'; |
---|
| 285 | } |
---|
| 286 | |
---|
[0] | 287 | # Plugins install messages |
---|
| 288 | if (!empty($plugins_install['success'])) |
---|
| 289 | { |
---|
| 290 | echo '<div class="static-msg">'.__('Following plugins have been installed:').'<ul>'; |
---|
| 291 | foreach ($plugins_install['success'] as $k => $v) { |
---|
| 292 | echo '<li>'.$k.'</li>'; |
---|
| 293 | } |
---|
| 294 | echo '</ul></div>'; |
---|
| 295 | } |
---|
| 296 | if (!empty($plugins_install['failure'])) |
---|
| 297 | { |
---|
| 298 | echo '<div class="error">'.__('Following plugins have not been installed:').'<ul>'; |
---|
| 299 | foreach ($plugins_install['failure'] as $k => $v) { |
---|
| 300 | echo '<li>'.$k.' ('.$v.')</li>'; |
---|
| 301 | } |
---|
| 302 | echo '</ul></div>'; |
---|
| 303 | } |
---|
[112] | 304 | # Errors modules notifications |
---|
| 305 | if ($core->auth->isSuperAdmin()) |
---|
| 306 | { |
---|
| 307 | $list = array(); |
---|
| 308 | foreach ($core->plugins->getErrors() as $k => $error) { |
---|
| 309 | $list[] = '<li>'.$error.'</li>'; |
---|
| 310 | } |
---|
| 311 | |
---|
| 312 | if (count($list) > 0) { |
---|
[1729] | 313 | echo |
---|
| 314 | '<div class="error" id="module-errors" class="error"><p>'.__('Some plugins are installed twice:').'</p> '. |
---|
[112] | 315 | '<ul>'.implode("\n",$list).'</ul></div>'; |
---|
| 316 | } |
---|
| 317 | } |
---|
| 318 | |
---|
[1729] | 319 | # Dashboard columns (processed first, as we need to know the result before displaying the icons.) |
---|
| 320 | $dashboardItems = ''; |
---|
| 321 | |
---|
[112] | 322 | foreach ($__dashboard_items as $i) |
---|
| 323 | { |
---|
| 324 | if ($i->count() > 0) |
---|
| 325 | { |
---|
[1788] | 326 | $dashboardItems .= '<div class="box dc-box">'; |
---|
[112] | 327 | foreach ($i as $v) { |
---|
| 328 | $dashboardItems .= $v; |
---|
| 329 | } |
---|
| 330 | $dashboardItems .= '</div>'; |
---|
| 331 | } |
---|
| 332 | } |
---|
| 333 | |
---|
[0] | 334 | # Dashboard icons |
---|
[1728] | 335 | echo '<div id="dashboard-main"><div id="icons">'; |
---|
[0] | 336 | foreach ($__dashboard_icons as $i) |
---|
| 337 | { |
---|
| 338 | echo |
---|
[691] | 339 | '<p><a href="'.$i[1].'"><img src="'.dc_admin_icon_url($i[2]).'" alt="" />'. |
---|
[471] | 340 | '<br /><span>'.$i[0].'</span></a></p>'; |
---|
[0] | 341 | } |
---|
| 342 | echo '</div>'; |
---|
| 343 | |
---|
[13] | 344 | if ($core->auth->user_prefs->dashboard->quickentry) { |
---|
| 345 | if ($core->auth->check('usage,contentadmin',$core->blog->id)) |
---|
| 346 | { |
---|
[1391] | 347 | # Getting categories |
---|
[1719] | 348 | $categories_combo = dcAdminCombos::getCategoriesCombo( |
---|
| 349 | $core->blog->getCategories(array('post_type'=>'post')) |
---|
| 350 | ); |
---|
[1247] | 351 | |
---|
[13] | 352 | echo |
---|
| 353 | '<div id="quick">'. |
---|
| 354 | '<h3>'.__('Quick entry').'</h3>'. |
---|
[1499] | 355 | '<form id="quick-entry" action="post.php" method="post" class="fieldset">'. |
---|
| 356 | '<h4>'.__('New entry').'</h4>'. |
---|
[1399] | 357 | '<p class="col"><label for="post_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label>'. |
---|
[454] | 358 | form::field('post_title',20,255,'','maximal'). |
---|
[1399] | 359 | '</p>'. |
---|
[45] | 360 | '<p class="area"><label class="required" '. |
---|
| 361 | 'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '. |
---|
[454] | 362 | form::textarea('post_content',50,7). |
---|
[13] | 363 | '</p>'. |
---|
[1521] | 364 | '<p><label for="cat_id" class="classic">'.__('Category:').'</label> '. |
---|
| 365 | form::combo('cat_id',$categories_combo).'</p>'. |
---|
[1418] | 366 | ($core->auth->check('categories', $core->blog->id) |
---|
| 367 | ? '<div>'. |
---|
[1521] | 368 | '<p id="new_cat" class="q-cat">'.__('Add a new category').'</p>'. |
---|
| 369 | '<p class="q-cat"><label for="new_cat_title">'.__('Title:').'</label> '. |
---|
| 370 | form::field('new_cat_title',30,255,'','').'</p>'. |
---|
| 371 | '<p class="q-cat"><label for="new_cat_parent">'.__('Parent:').'</label> '. |
---|
| 372 | form::combo('new_cat_parent',$categories_combo,'',''). |
---|
| 373 | '</p>'. |
---|
[1488] | 374 | '<p class="form-note info clear">'.__('This category will be created when you will save your post.').'</p>'. |
---|
[1418] | 375 | '</div>' |
---|
| 376 | : ''). |
---|
[454] | 377 | '<p><input type="submit" value="'.__('Save').'" name="save" /> '. |
---|
[13] | 378 | ($core->auth->check('publish',$core->blog->id) |
---|
[536] | 379 | ? '<input type="hidden" value="'.__('Save and publish').'" name="save-publish" />' |
---|
[13] | 380 | : ''). |
---|
| 381 | $core->formNonce(). |
---|
| 382 | form::hidden('post_status',-2). |
---|
| 383 | form::hidden('post_format',$core->auth->getOption('post_format')). |
---|
| 384 | form::hidden('post_excerpt',''). |
---|
| 385 | form::hidden('post_lang',$core->auth->getInfo('user_lang')). |
---|
| 386 | form::hidden('post_notes',''). |
---|
| 387 | '</p>'. |
---|
| 388 | '</form>'. |
---|
| 389 | '</div>'; |
---|
| 390 | } |
---|
[0] | 391 | } |
---|
| 392 | |
---|
[480] | 393 | foreach ($__dashboard_contents as $i) |
---|
| 394 | { |
---|
| 395 | if ($i->count() > 0) |
---|
| 396 | { |
---|
[1741] | 397 | $dashboardContents .= '<div class="box">'; |
---|
[480] | 398 | foreach ($i as $v) { |
---|
| 399 | $dashboardContents .= $v; |
---|
| 400 | } |
---|
| 401 | $dashboardContents .= '</div>'; |
---|
| 402 | } |
---|
| 403 | } |
---|
[1728] | 404 | |
---|
[1788] | 405 | //$class = ' '.(($dashboardItems != '') && ($dashboardContents != '') ? 'two-boxes' : 'one-box'); |
---|
[1728] | 406 | |
---|
| 407 | if ($dashboardContents != '' || $dashboardItems != '') { |
---|
| 408 | echo |
---|
[1788] | 409 | //'<hr />'. |
---|
[1741] | 410 | '<div id="dashboard-boxes">'; |
---|
[1788] | 411 | echo |
---|
| 412 | '<div class="db-items">'. |
---|
| 413 | $dashboardItems.$dashboardContents. |
---|
| 414 | '</div>'; |
---|
| 415 | //echo ($dashboardContents ? '<div class="db-contents'.$class.'">'.$dashboardContents.'</div>' : ''); |
---|
| 416 | //echo ($dashboardItems ? '<div class="db-items'.$class.'">'.$dashboardItems.'</div>' : ''); |
---|
[1728] | 417 | echo |
---|
| 418 | '</div>'; |
---|
| 419 | } |
---|
[480] | 420 | |
---|
[0] | 421 | echo '</div>'; |
---|
| 422 | |
---|
| 423 | dcPage::close(); |
---|
[1329] | 424 | ?> |
---|