[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); |
---|
[2852] | 23 | $core->adminurl->redirect("admin.home"); |
---|
[0] | 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 | } |
---|
[2852] | 38 | $core->adminurl->redirect("admin.auth"); |
---|
[0] | 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 | |
---|
[2229] | 76 | $favs = $core->favs->getUserFavorites(); |
---|
| 77 | $core->favs->appendDashboardIcons($__dashboard_icons); |
---|
[0] | 78 | |
---|
[2174] | 79 | # Check plugins and themes update from repository |
---|
[2216] | 80 | function dc_check_store_update($mod, $url, $img, $icon) |
---|
[2174] | 81 | { |
---|
[2216] | 82 | $repo = new dcStore($mod, $url); |
---|
[2174] | 83 | $upd = $repo->get(true); |
---|
| 84 | if (!empty($upd)) { |
---|
| 85 | $icon[0] .= '<br />'.sprintf(__('An update is available', '%s updates are available.', count($upd)),count($upd)); |
---|
| 86 | $icon[1] .= '#update'; |
---|
| 87 | $icon[2] = 'images/menu/'.$img.'-b-update.png'; |
---|
| 88 | } |
---|
| 89 | } |
---|
| 90 | if (isset($__dashboard_icons['plugins'])) { |
---|
[2216] | 91 | dc_check_store_update($core->plugins, $core->blog->settings->system->store_plugin_url, 'plugins', $__dashboard_icons['plugins']); |
---|
[2174] | 92 | } |
---|
| 93 | if (isset($__dashboard_icons['blog_theme'])) { |
---|
| 94 | $themes = new dcThemes($core); |
---|
| 95 | $themes->loadModules($core->blog->themes_path, null); |
---|
[2216] | 96 | dc_check_store_update($themes, $core->blog->settings->system->store_theme_url, 'blog-theme', $__dashboard_icons['blog_theme']); |
---|
[2174] | 97 | } |
---|
| 98 | |
---|
[0] | 99 | # Latest news for dashboard |
---|
[2229] | 100 | $__dashboard_items = new ArrayObject(array(new ArrayObject(),new ArrayObject())); |
---|
[0] | 101 | |
---|
[13] | 102 | $dashboardItem = 0; |
---|
[0] | 103 | |
---|
[13] | 104 | if ($core->auth->user_prefs->dashboard->dcnews) { |
---|
| 105 | try |
---|
| 106 | { |
---|
| 107 | if (empty($__resources['rss_news'])) { |
---|
| 108 | throw new Exception(); |
---|
| 109 | } |
---|
[2566] | 110 | |
---|
[13] | 111 | $feed_reader = new feedReader; |
---|
| 112 | $feed_reader->setCacheDir(DC_TPL_CACHE); |
---|
| 113 | $feed_reader->setTimeout(2); |
---|
| 114 | $feed_reader->setUserAgent('Dotclear - http://www.dotclear.org/'); |
---|
| 115 | $feed = $feed_reader->parse($__resources['rss_news']); |
---|
| 116 | if ($feed) |
---|
| 117 | { |
---|
[2085] | 118 | $latest_news = '<div class="box medium dc-box"><h3>'.__('Dotclear news').'</h3><dl id="news">'; |
---|
[13] | 119 | $i = 1; |
---|
| 120 | foreach ($feed->items as $item) |
---|
| 121 | { |
---|
[2225] | 122 | $dt = isset($item->link) ? '<a href="'.$item->link.'" class="outgoing" title="'.$item->title.'">'. |
---|
[1728] | 123 | $item->title.' <img src="images/outgoing-blue.png" alt="" /></a>' : $item->title; |
---|
[2566] | 124 | |
---|
[13] | 125 | if ($i < 3) { |
---|
| 126 | $latest_news .= |
---|
| 127 | '<dt>'.$dt.'</dt>'. |
---|
[1000] | 128 | '<dd><p><strong>'.dt::dt2str(__('%d %B %Y:'),$item->pubdate,'Europe/Paris').'</strong> '. |
---|
[13] | 129 | '<em>'.text::cutString(html::clean($item->content),120).'...</em></p></dd>'; |
---|
| 130 | } else { |
---|
| 131 | $latest_news .= |
---|
| 132 | '<dt>'.$dt.'</dt>'. |
---|
[1000] | 133 | '<dd>'.dt::dt2str(__('%d %B %Y:'),$item->pubdate,'Europe/Paris').'</dd>'; |
---|
[13] | 134 | } |
---|
| 135 | $i++; |
---|
[1788] | 136 | if ($i > 2) { break; } |
---|
[13] | 137 | } |
---|
[2085] | 138 | $latest_news .= '</dl></div>'; |
---|
[13] | 139 | $__dashboard_items[$dashboardItem][] = $latest_news; |
---|
| 140 | $dashboardItem++; |
---|
| 141 | } |
---|
[0] | 142 | } |
---|
[13] | 143 | catch (Exception $e) {} |
---|
[0] | 144 | } |
---|
| 145 | |
---|
[1378] | 146 | # Documentation links |
---|
| 147 | if ($core->auth->user_prefs->dashboard->doclinks) { |
---|
| 148 | if (!empty($__resources['doc'])) |
---|
| 149 | { |
---|
[2085] | 150 | $doc_links = '<div class="box small dc-box"><h3>'.__('Documentation and support').'</h3><ul>'; |
---|
[2566] | 151 | |
---|
[1378] | 152 | foreach ($__resources['doc'] as $k => $v) { |
---|
[2225] | 153 | $doc_links .= '<li><a class="outgoing" href="'.$v.'" title="'.$k.'">'.$k. |
---|
[1728] | 154 | ' <img src="images/outgoing-blue.png" alt="" /></a></li>'; |
---|
[1378] | 155 | } |
---|
[2566] | 156 | |
---|
[2085] | 157 | $doc_links .= '</ul></div>'; |
---|
[1378] | 158 | $__dashboard_items[$dashboardItem][] = $doc_links; |
---|
| 159 | $dashboardItem++; |
---|
| 160 | } |
---|
| 161 | } |
---|
| 162 | |
---|
[0] | 163 | $core->callBehavior('adminDashboardItems', $core, $__dashboard_items); |
---|
| 164 | |
---|
[480] | 165 | # Dashboard content |
---|
| 166 | $dashboardContents = ''; |
---|
| 167 | $__dashboard_contents = new ArrayObject(array(new ArrayObject,new ArrayObject)); |
---|
| 168 | $core->callBehavior('adminDashboardContents', $core, $__dashboard_contents); |
---|
| 169 | |
---|
[2842] | 170 | # Editor stuff |
---|
| 171 | $admin_post_behavior = ''; |
---|
| 172 | if ($core->auth->user_prefs->dashboard->quickentry) { |
---|
| 173 | if ($core->auth->check('usage,contentadmin',$core->blog->id)) |
---|
| 174 | { |
---|
| 175 | $post_format = $core->auth->getOption('post_format'); |
---|
| 176 | $post_editor = $core->auth->getOption('editor'); |
---|
| 177 | if ($post_editor && !empty($post_editor[$post_format])) { |
---|
[2854] | 178 | // context is not post because of tags not available |
---|
[3024] | 179 | $admin_post_behavior = $core->callBehavior('adminPostEditor', $post_editor[$post_format], 'quickentry', array('#post_content'),$post_format); |
---|
[2842] | 180 | } |
---|
| 181 | } |
---|
| 182 | } |
---|
| 183 | |
---|
[0] | 184 | /* DISPLAY |
---|
| 185 | -------------------------------------------------------- */ |
---|
| 186 | dcPage::open(__('Dashboard'), |
---|
| 187 | dcPage::jsLoad('js/_index.js'). |
---|
[2842] | 188 | $admin_post_behavior. |
---|
[0] | 189 | # --BEHAVIOR-- adminDashboardHeaders |
---|
[1358] | 190 | $core->callBehavior('adminDashboardHeaders'), |
---|
| 191 | dcPage::breadcrumb( |
---|
| 192 | array( |
---|
[2166] | 193 | __('Dashboard').' : '.html::escapeHTML($core->blog->name) => '' |
---|
[1358] | 194 | ), |
---|
[2166] | 195 | array('home_link' =>false) |
---|
| 196 | ) |
---|
[0] | 197 | ); |
---|
| 198 | |
---|
[1422] | 199 | # Dotclear updates notifications |
---|
| 200 | if ($core->auth->isSuperAdmin() && is_readable(DC_DIGESTS)) |
---|
| 201 | { |
---|
| 202 | $updater = new dcUpdate(DC_UPDATE_URL,'dotclear',DC_UPDATE_VERSION,DC_TPL_CACHE.'/versions'); |
---|
| 203 | $new_v = $updater->check(DC_VERSION); |
---|
| 204 | $version_info = $new_v ? $updater->getInfoURL() : ''; |
---|
| 205 | |
---|
| 206 | if ($updater->getNotify() && $new_v) { |
---|
[1697] | 207 | echo |
---|
[1698] | 208 | '<div class="dc-update"><h3>'.sprintf(__('Dotclear %s is available!'),$new_v).'</h3> '. |
---|
[2720] | 209 | '<p><a class="button submit" href="'.$core->adminurl->get("admin.update").'">'.sprintf(__('Upgrade now'),$new_v).'</a> '. |
---|
| 210 | '<a class="button" href="'.$core->adminurl->get("admin.update", array('hide_msg' => 1)).'">'.__('Remind me later').'</a>'. |
---|
[1697] | 211 | ($version_info ? ' </p>'. |
---|
[1811] | 212 | '<p class="updt-info"><a href="'.$version_info.'">'.__('Information about this version').'</a>' : '').'</p>'. |
---|
[1697] | 213 | '</div>'; |
---|
[1422] | 214 | } |
---|
| 215 | } |
---|
[0] | 216 | |
---|
[2159] | 217 | if ($core->auth->getInfo('user_default_blog') != $core->blog->id && $core->auth->getBlogCount() > 1) { |
---|
[0] | 218 | echo |
---|
[2720] | 219 | '<p><a href="'.$core->adminurl->get("admin.home",array('default_blog' => 1)).'" class="button">'.__('Make this blog my default blog').'</a></p>'; |
---|
[0] | 220 | } |
---|
| 221 | |
---|
| 222 | if ($core->blog->status == 0) { |
---|
[1558] | 223 | echo '<p class="static-msg">'.__('This blog is offline').'.</p>'; |
---|
[0] | 224 | } elseif ($core->blog->status == -1) { |
---|
[1558] | 225 | echo '<p class="static-msg">'.__('This blog is removed').'.</p>'; |
---|
[0] | 226 | } |
---|
| 227 | |
---|
[374] | 228 | if (!defined('DC_ADMIN_URL') || !DC_ADMIN_URL) { |
---|
[0] | 229 | echo |
---|
| 230 | '<p class="static-msg">'. |
---|
[1077] | 231 | sprintf(__('%s is not defined, you should edit your configuration file.'),'DC_ADMIN_URL'). |
---|
| 232 | ' '.__('See <a href="http://dotclear.org/documentation/2.0/admin/config">documentation</a> for more information.'). |
---|
[373] | 233 | '</p>'; |
---|
| 234 | } |
---|
| 235 | |
---|
[374] | 236 | if (!defined('DC_ADMIN_MAILFROM') || !DC_ADMIN_MAILFROM) { |
---|
[373] | 237 | echo |
---|
| 238 | '<p class="static-msg">'. |
---|
[1077] | 239 | sprintf(__('%s is not defined, you should edit your configuration file.'),'DC_ADMIN_MAILFROM'). |
---|
| 240 | ' '.__('See <a href="http://dotclear.org/documentation/2.0/admin/config">documentation</a> for more information.'). |
---|
[0] | 241 | '</p>'; |
---|
| 242 | } |
---|
| 243 | |
---|
[1535] | 244 | $err = array(); |
---|
| 245 | |
---|
| 246 | # Check cache directory |
---|
[1705] | 247 | if ( $core->auth->isSuperAdmin() ) { |
---|
| 248 | if (!is_dir(DC_TPL_CACHE) || !is_writable(DC_TPL_CACHE)) { |
---|
[1708] | 249 | $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] | 250 | } |
---|
| 251 | } else { |
---|
| 252 | if (!is_dir(DC_TPL_CACHE) || !is_writable(DC_TPL_CACHE)) { |
---|
[1708] | 253 | $err[] = '<p>'.__("The cache directory does not exist or is not writable. You should contact your administrator.").'</p>'; |
---|
[1705] | 254 | } |
---|
[1535] | 255 | } |
---|
| 256 | |
---|
| 257 | # Check public directory |
---|
[1705] | 258 | if ( $core->auth->isSuperAdmin() ) { |
---|
| 259 | if (!is_dir($core->blog->public_path) || !is_writable($core->blog->public_path)) { |
---|
[1708] | 260 | $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] | 261 | } |
---|
| 262 | } else { |
---|
| 263 | if (!is_dir($core->blog->public_path) || !is_writable($core->blog->public_path)) { |
---|
[1708] | 264 | $err[] = '<p>'.__("There is no writable root directory for the media manager. You should contact your administrator.").'</p>'; |
---|
[1705] | 265 | } |
---|
[1535] | 266 | } |
---|
| 267 | |
---|
| 268 | # Error list |
---|
| 269 | if (count($err) > 0) { |
---|
[2515] | 270 | echo '<div class="error"><p><strong>'.__('Error:').'</strong></p>'. |
---|
[1535] | 271 | '<ul><li>'.implode("</li><li>",$err).'</li></ul></div>'; |
---|
| 272 | } |
---|
| 273 | |
---|
[0] | 274 | # Plugins install messages |
---|
| 275 | if (!empty($plugins_install['success'])) |
---|
| 276 | { |
---|
[2116] | 277 | echo '<div class="success">'.__('Following plugins have been installed:').'<ul>'; |
---|
[0] | 278 | foreach ($plugins_install['success'] as $k => $v) { |
---|
| 279 | echo '<li>'.$k.'</li>'; |
---|
| 280 | } |
---|
| 281 | echo '</ul></div>'; |
---|
| 282 | } |
---|
| 283 | if (!empty($plugins_install['failure'])) |
---|
| 284 | { |
---|
| 285 | echo '<div class="error">'.__('Following plugins have not been installed:').'<ul>'; |
---|
| 286 | foreach ($plugins_install['failure'] as $k => $v) { |
---|
| 287 | echo '<li>'.$k.' ('.$v.')</li>'; |
---|
| 288 | } |
---|
| 289 | echo '</ul></div>'; |
---|
| 290 | } |
---|
[112] | 291 | # Errors modules notifications |
---|
| 292 | if ($core->auth->isSuperAdmin()) |
---|
| 293 | { |
---|
[2239] | 294 | $list = $core->plugins->getErrors(); |
---|
| 295 | if (!empty($list)) { |
---|
[2566] | 296 | echo |
---|
[2239] | 297 | '<div class="error" id="module-errors" class="error"><p>'.__('Errors have occured with following plugins:').'</p> '. |
---|
| 298 | '<ul><li>'.implode("</li>\n<li>", $list).'</li></ul></div>'; |
---|
[112] | 299 | } |
---|
| 300 | } |
---|
| 301 | |
---|
[1729] | 302 | # Dashboard columns (processed first, as we need to know the result before displaying the icons.) |
---|
| 303 | $dashboardItems = ''; |
---|
| 304 | |
---|
[112] | 305 | foreach ($__dashboard_items as $i) |
---|
[2566] | 306 | { |
---|
[112] | 307 | if ($i->count() > 0) |
---|
| 308 | { |
---|
[2085] | 309 | $dashboardItems .= ''; |
---|
[112] | 310 | foreach ($i as $v) { |
---|
| 311 | $dashboardItems .= $v; |
---|
| 312 | } |
---|
[2085] | 313 | $dashboardItems .= ''; |
---|
[112] | 314 | } |
---|
| 315 | } |
---|
| 316 | |
---|
[2116] | 317 | # Dashboard elements |
---|
| 318 | echo '<div id="dashboard-main">'; |
---|
| 319 | |
---|
[0] | 320 | # Dashboard icons |
---|
[2116] | 321 | echo '<div id="icons">'; |
---|
[0] | 322 | foreach ($__dashboard_icons as $i) |
---|
| 323 | { |
---|
| 324 | echo |
---|
[691] | 325 | '<p><a href="'.$i[1].'"><img src="'.dc_admin_icon_url($i[2]).'" alt="" />'. |
---|
[471] | 326 | '<br /><span>'.$i[0].'</span></a></p>'; |
---|
[0] | 327 | } |
---|
| 328 | echo '</div>'; |
---|
| 329 | |
---|
[13] | 330 | if ($core->auth->user_prefs->dashboard->quickentry) { |
---|
| 331 | if ($core->auth->check('usage,contentadmin',$core->blog->id)) |
---|
| 332 | { |
---|
[1391] | 333 | # Getting categories |
---|
[1719] | 334 | $categories_combo = dcAdminCombos::getCategoriesCombo( |
---|
| 335 | $core->blog->getCategories(array('post_type'=>'post')) |
---|
| 336 | ); |
---|
[2566] | 337 | |
---|
[13] | 338 | echo |
---|
| 339 | '<div id="quick">'. |
---|
[2929] | 340 | '<h3>'.__('Quick entry').sprintf(' › %s',$core->auth->getOption('post_format')).'</h3>'. |
---|
[2708] | 341 | '<form id="quick-entry" action="'.$core->adminurl->get('admin.post').'" method="post" class="fieldset">'. |
---|
[1499] | 342 | '<h4>'.__('New entry').'</h4>'. |
---|
[1399] | 343 | '<p class="col"><label for="post_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label>'. |
---|
[454] | 344 | form::field('post_title',20,255,'','maximal'). |
---|
[1399] | 345 | '</p>'. |
---|
[45] | 346 | '<p class="area"><label class="required" '. |
---|
| 347 | 'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '. |
---|
[2358] | 348 | form::textarea('post_content',50,10). |
---|
[13] | 349 | '</p>'. |
---|
[1521] | 350 | '<p><label for="cat_id" class="classic">'.__('Category:').'</label> '. |
---|
| 351 | form::combo('cat_id',$categories_combo).'</p>'. |
---|
[1418] | 352 | ($core->auth->check('categories', $core->blog->id) |
---|
| 353 | ? '<div>'. |
---|
[1521] | 354 | '<p id="new_cat" class="q-cat">'.__('Add a new category').'</p>'. |
---|
| 355 | '<p class="q-cat"><label for="new_cat_title">'.__('Title:').'</label> '. |
---|
| 356 | form::field('new_cat_title',30,255,'','').'</p>'. |
---|
| 357 | '<p class="q-cat"><label for="new_cat_parent">'.__('Parent:').'</label> '. |
---|
| 358 | form::combo('new_cat_parent',$categories_combo,'',''). |
---|
| 359 | '</p>'. |
---|
[1488] | 360 | '<p class="form-note info clear">'.__('This category will be created when you will save your post.').'</p>'. |
---|
[1418] | 361 | '</div>' |
---|
| 362 | : ''). |
---|
[454] | 363 | '<p><input type="submit" value="'.__('Save').'" name="save" /> '. |
---|
[13] | 364 | ($core->auth->check('publish',$core->blog->id) |
---|
[536] | 365 | ? '<input type="hidden" value="'.__('Save and publish').'" name="save-publish" />' |
---|
[13] | 366 | : ''). |
---|
| 367 | $core->formNonce(). |
---|
| 368 | form::hidden('post_status',-2). |
---|
| 369 | form::hidden('post_format',$core->auth->getOption('post_format')). |
---|
| 370 | form::hidden('post_excerpt',''). |
---|
| 371 | form::hidden('post_lang',$core->auth->getInfo('user_lang')). |
---|
| 372 | form::hidden('post_notes',''). |
---|
| 373 | '</p>'. |
---|
| 374 | '</form>'. |
---|
| 375 | '</div>'; |
---|
| 376 | } |
---|
[0] | 377 | } |
---|
| 378 | |
---|
[480] | 379 | foreach ($__dashboard_contents as $i) |
---|
[2566] | 380 | { |
---|
[480] | 381 | if ($i->count() > 0) |
---|
| 382 | { |
---|
[2085] | 383 | $dashboardContents .= ''; |
---|
[480] | 384 | foreach ($i as $v) { |
---|
| 385 | $dashboardContents .= $v; |
---|
| 386 | } |
---|
[2085] | 387 | $dashboardContents .= ''; |
---|
[480] | 388 | } |
---|
| 389 | } |
---|
[1728] | 390 | |
---|
| 391 | if ($dashboardContents != '' || $dashboardItems != '') { |
---|
[2566] | 392 | echo |
---|
[2116] | 393 | '<div id="dashboard-boxes">'. |
---|
| 394 | '<div class="db-items">'.$dashboardItems.$dashboardContents.'</div>'. |
---|
[2566] | 395 | '</div>'; |
---|
[1728] | 396 | } |
---|
[480] | 397 | |
---|
[2116] | 398 | echo '</div>'; #end dashboard-main |
---|
[2314] | 399 | dcPage::helpBlock('core_dashboard'); |
---|
[0] | 400 | dcPage::close(); |
---|