From: Vincent Vanwaelscappel
Date: Thu, 2 Nov 2023 10:00:30 +0000 (+0100)
Subject: wip #6447 @0.75
X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=05fbc7216e044aa91ebd5c9475f2ce8082152072;p=michelcastel.git
wip #6447 @0.75
---
05fbc7216e044aa91ebd5c9475f2ce8082152072
diff --git a/.htaccess b/.htaccess
new file mode 100644
index 0000000..d25d354
--- /dev/null
+++ b/.htaccess
@@ -0,0 +1,2 @@
+
+AddType x-mapp-php5 .php
\ No newline at end of file
diff --git a/CHANGELOG b/CHANGELOG
new file mode 100644
index 0000000..66fe1a2
--- /dev/null
+++ b/CHANGELOG
@@ -0,0 +1,250 @@
+Dotclear 2.1.6 - 2009-10-01
+===========================================================
+* Install procedure fixes
+* Admin: Page managers can now create pages
+* Admin: several typos corrected.
+* Admin: Widgets now work in IE8.
+* Admin: Password protected posts can now be previewed.
+* Templates: tpl:Meta* are now tpl:Tags*.
+* Templates: now display all posts.
+* new behavior: adminPageHTMLHead
+* DB schema: new blog_id field in log table
+* Media manager: Pubic folder can now be set on a different host.
+* WordPress import fixes
+* Dailymotion insertion fix
+* Upgrade procedure: CRLF removed in files that were bugging the upgrade.
+* JQuery updated to 1.3
+* IE7-js update
+* security: Full Path Disclosure protection. Thx to Karim Ayad for pointing it out.
+* and way too many bugfixes to be listed.
+
+Dotclear 2.1.5 - 2009-02-05
+===========================================================
+* Security release
+* Youtube insertion update
+
+Dotclear 2.1.4 - 2008-12-21
+===========================================================
+* Security flaw fix
+* WordPress import refining
+* XML-RPC improvements
+
+Dotclear 2.1.3 - 2008-11-19
+===========================================================
+* Admin: New upgrade procedure
+* Admin: Fixed video insertion bug
+* Template: New attributes
+ * url on EntryIf
+ * only_category on Blogroll
+ * no_context on Pagination
+* Template: New tag
+ * BlogID
+* Admin: escaped blog_id on authentication page
+
+Dotclear 2.1.1 - 2008-11-07
+===========================================================
+* Admin: Automatic Update bug fixes
+* Admin: Disable Automatic Update if no digests file
+* Admin: Javascript fixes in authentication page
+* Admin: Fixed errors with categories select boxes
+* Template: Added level attribute in tpl:Categories
+* Media: Added H.264/MPEG-4 AVC for mp4 files
+
+Dotclear 2.1 - 2008-11-01
+===========================================================
+* Subcategories
+* Admin: Automatic Update
+* Admin: Flash 10 support for uploader
+* Admin: mailto link in comment details
+* Admin: Embedded video size selection
+* Admin: Restrict session cookie path to admin
+* Media: H.264/MPEG-4 AVC (HD) support with m4v files
+* Inherited themes
+* WordPress XML-RPC methods support
+* True unicode URLs
+* Plugin: Widgets as template tags
+* Plugin: Filters in entries widgets and Blogroll
+* Plugin: Added vimeo.com in external media
+* Template: New tags
+ * LoopPosition
+ * CommentAuthorDomain
+ * CommentAuthorMD5
+ * EntryFirstImage
+ * EntryCategoryShortURL
+ * CategoryIf
+ * CategoryFirstChildren
+ * CategoryParents
+ * EntryCategoriesBreadcrum
+ * MediaURL
+
+Dotclear 2.0.2 - 2008-09-05
+===========================================================
+* New installation procedure
+* Plugin: WordPress import fixes
+* Plugin: Plain text export as downloadable files
+* Plugin: Message about URLs in Dotclear 1.2 import
+* Public: Display a message if search returns no result
+* Admin: Fixed some CSS bugs
+* Admin: Batch select/unselect entries
+* Admin: In a media item, find entries containing it
+
+Dotclear 2.0.1 - 2008-08-16
+===========================================================
+* Plugin: Fixed a bug with Dotclear 1.2 URLs import.
+* Plugin: Fixed a l10n bug in Pages
+* Admin: Enhanced plugins resources loading and cache
+
+Dotclear 2.0 - 2008-08-01
+===========================================================
+* Public: Atom becomes the default feed format. RSS 2 is always available.
+* Admin: design enhancements and new Dotclear logo
+* Admin: entries preview in blog context
+* L10N: New language manager with zip files support
+* Plugin: Import/Export plugin version 2.0 with import from Dotclear 1.2 and WordPress
+* Plugin: Pages enhancements (preview, sorting)
+* Plugin: support for jamendo and deezer in External Media
+* JSMin on JavaScript files instead of JS packing
+* SQLite 3 only support (PDO based)
+* Many bug fixes and major performances improvements
+
+Dotclear 2.0 RC2 - 2008-06-21
+===========================================================
+* FairTrackback spam filter
+* Language pack infrastructure
+* Bug fix on comment search with author "0"
+* Javascript fixes
+* dcAuth::sessionExists and dcAuth::checkSession new methods
+* Right management in dcAuth::sudo
+* Media File sorting options in media manager
+* CandyUpload, new uploader tool based on SWFUpload
+* New search engine robots options
+* New image options
+* L10N: Japanese and Portugues (Brazil) language packs
+* Many bug fixes and enhancements
+
+Dotclear 2.0 RC1 - 2008-05-01
+===========================================================
+* New: Pages plugin
+* New: Theme editor plugin
+* Entries: Text and WYSIWYG enhancements
+* Entries: Markup validator
+* Entries: Insertion of links to other entries from toolbar
+* Entries: External media insertion (dailymotion, youtube, google video)
+* Tags: Same list for new and existing entries
+* Tags: Tags can be removed on all associated entries
+* Tags: Tags can be removed on a post selection
+* Admin: Ask password for user management tasks, theme upload and plugin upload
+* Admin: New contextual help viewer
+* Media manager: Recreate thumbnails option
+* Media manager: Custom medium thumbnail size (per blog)
+* Media manager: Zip files extract support
+* Media manager: Zip file download of directory
+* Media manager: File exclusion pattern option
+* Themes and plugins: Zip as new package format
+* Themes and plugins: Upload
+* Themes and plugins: Upgrade within administration interface
+* Themes and plugins: Deletion
+* Public: New default theme: Blowup (fully customizable)
+* Public: Changed the way commenter cookie is handled
+* Themes: Template files moved to tpl/ directory
+* L10N: Polish, Catalan and Spanish translations
+* Misc: jQuery upgraded to 1.2.3
+* Misc: Crushed png files
+* Fixed many bugs
+
+Dotclear 2.0 beta 7 - 2007-07-12
+===========================================================
+* New way to display comments and trackbacks on entries in backend
+* Dashboard visual improvements
+* Default cache dir created by installation process
+* Option to limit posts and comments in feeds
+* Introduced UDBS for installation and upgrade
+* Changed handling of XML-RPC URLs
+* New option to force HTTPS redirect if wanted
+* Enforced cookies security (directory and ssl support)
+* Added Plugin auto-install and auto-upgrade support
+* Added trackbacks ttl and moderation preferences
+* Added an Internal search engine
+* FLV support in backend with Neolao player
+* Added nice messages if database is broken or Dotclear not installed
+* upgrade jQuery to 1.1.3
+* Fixed many bugs
+* Fixed security issues in backend
+
+Dotclear 2.0 beta 6 - 2007-02-19
+===========================================================
+* New antispam plugin, with a set of filters (rbl, ipblacklist, spamwords, akismet)
+* New admin dashboard page
+* Fixed unwanted logout bug
+* Added settings to disable template caching and allow PHP code
+* Blog preferences panel bug fix
+* New XML-RPC Client and Server
+* Comment posting permissions bug fix
+
+Dotclear 2.0 beta 5.4 - 2007-01-19
+===========================================================
+* Minor change on spam display in comments.php
+* Command line upgrade script and fix in load_plugin_file.php
+* Make akismet configurable only by superadmin with DC_AKISMET_SUPER
+* SQL optimisations
+* New comments view in post
+
+Dotclear 2.0 beta 5.2 - 2007-01-11
+===========================================================
+* Fixed a bug with imageMeta::getMeta
+* Enhanced dynamic file uploader
+* Move clearbricks files to their own repository
+* Fixed a bug with auto_br in wikiSimpleComment
+* Support for language restriction in feeds
+* Default theme structure changes
+* Fixed a PHP 5.0 compatibility issue
+* Installation Wizard
+
+Dotclear 2.0 beta 4 - 2006-12-26
+===========================================================
+* Performances enhancements.
+* Administration UI enhancements.
+* More user-friendly Widgets (version 1.5).
+* Switch to jQuery .
+* Added jQuery in default theme.
+* Major changes in HTTP client and Feed Parser based on a
+ generic socket handler.
+* PHP 5.2 compatibility.
+* Code documentation (all core and most of clearbricks).
+* Many bug fixes.
+
+Dotclear 2.0 beta 3 - 2006-11-05
+===========================================================
+* Disallow special wrappers for fopen like functions.
+* XML/RPC improvements.
+* Read IPTC and EXIF metadata in uploaded pictures.
+* MySQL 4.1 support only.
+* Metadata import from Dotclear 1.2.x.
+* Akismet plugin.
+* Pings plugin.
+* Added a priority setting for plugins.
+* Many bug fixes.
+
+Dotclear 2.0 beta 2 - 2006-08-09
+===========================================================
+* DC_PLUGIN_ROOT can handle more than one path.
+* OPML/XBEL import in blogroll plugin.
+* Fixed a security issue in html::absoluteURLs().
+* Fixed issues with timezone on scheduled entries.
+* Multiple categories selection in tpl:Entries.
+* Improved dbLayer.
+* Changed category feed URL.
+* Feeds for tags (entries and comments).
+* Added attachments count on backend and frontend.
+* New settings code design. Can now handle wide system settings.
+* Memory usage improvements with autoloader.
+* Some code cleanup.
+* Feed parser improvements.
+* Themes can be configured if needed.
+* XMP support on JPEG files.
+* Media manager improvements.
+* Spamplemousse now uses DNSBL (and the guy who left the bug was fired).
+* Javascript editor and toolbar improvements.
+* RDS support (XML/RPC API discovery).
+* Added a theme with user stylesheet.
+* Plugins manager
\ No newline at end of file
diff --git a/admin/auth.php b/admin/auth.php
new file mode 100644
index 0000000..e0cae49
--- /dev/null
+++ b/admin/auth.php
@@ -0,0 +1,288 @@
+auth->allowPassChange() && !empty($_REQUEST['recover']);
+$akey = $core->auth->allowPassChange() && !empty($_GET['akey']) ? $_GET['akey'] : null;
+$user_id = $user_pwd = $user_key = $user_email = null;
+$err = $msg = null;
+
+# Auto upgrade
+if (empty($_GET) && empty($_POST)) {
+ require dirname(__FILE__).'/../inc/dbschema/upgrade.php';
+ try {
+ if (($changes = dotclearUpgrade($core)) !== false) {
+ $msg = __('Dotclear has been upgraded.').'';
+ }
+ } catch (Exception $e) {
+ $err = $e->getMessage();
+ }
+}
+
+# If we have POST login informations, go throug auth process
+if (!empty($_POST['user_id']) && !empty($_POST['user_pwd']))
+{
+ $user_id = !empty($_POST['user_id']) ? $_POST['user_id'] : null;
+ $user_pwd = !empty($_POST['user_pwd']) ? $_POST['user_pwd'] : null;
+}
+# If we have POST login informations, go throug auth process
+elseif (isset($_COOKIE['dc_admin']) && strlen($_COOKIE['dc_admin']) == 104)
+{
+ # If we have a remember cookie, go through auth process with user_key
+ $user_id = substr($_COOKIE['dc_admin'],40);
+ $user_id = @unpack('a32',@pack('H*',$user_id));
+ if (is_array($user_id))
+ {
+ $user_id = $user_id[1];
+ $user_key = substr($_COOKIE['dc_admin'],0,40);
+ $user_pwd = null;
+ }
+ else
+ {
+ $user_id = null;
+ }
+}
+
+# Recover password
+if ($recover && !empty($_POST['user_id']) && !empty($_POST['user_email']))
+{
+ $user_id = !empty($_POST['user_id']) ? $_POST['user_id'] : null;
+ $user_email = !empty($_POST['user_email']) ? $_POST['user_email'] : '';
+ try
+ {
+ $recover_key = $core->auth->setRecoverKey($user_id,$user_email);
+
+ $subject = mail::B64Header('DotClear '.__('Password reset'));
+ $message =
+ __('Someone has requested to reset the password for the following site and username.')."\n\n".
+ $page_url."\n".__('Username:').' '.$user_id."\n\n".
+ __('To reset your password visit the following address, otherwise just ignore this email and nothing will happen.')."\n".
+ $page_url.'?akey='.$recover_key;
+
+ $headers[] = 'From: dotclear@'.$_SERVER['HTTP_HOST'];
+ $headers[] = 'Content-Type: text/plain; charset=UTF-8;';
+
+ mail::sendMail($user_email,$subject,$message,$headers);
+ $msg = sprintf(__('The e-mail was sent successfully to %s.'),$user_email);
+ }
+ catch (Exception $e)
+ {
+ $err = $e->getMessage();
+ }
+}
+# Send new password
+elseif ($akey)
+{
+ try
+ {
+ $recover_res = $core->auth->recoverUserPassword($akey);
+
+ $subject = mb_encode_mimeheader('DotClear '.__('Your new password'),'UTF-8','B');
+ $message =
+ __('Username:').' '.$recover_res['user_id']."\n".
+ __('Password:').' '.$recover_res['new_pass']."\n\n".
+ preg_replace('/\?(.*)$/','',$page_url);
+
+ $headers[] = 'From: dotclear@'.$_SERVER['HTTP_HOST'];
+ $headers[] = 'Content-Type: text/plain; charset=UTF-8;';
+
+ mail::sendMail($recover_res['user_email'],$subject,$message,$headers);
+ $msg = __('Your new password is in your mailbox.');
+ }
+ catch (Exception $e)
+ {
+ $err = $e->getMessage();
+ }
+}
+# Try to log
+elseif ($user_id !== null && ($user_pwd !== null || $user_key !== null))
+{
+ # We check the user
+ if ($core->auth->checkUser($user_id,$user_pwd,$user_key) === true)
+ {
+ $core->session->start();
+ $_SESSION['sess_user_id'] = $user_id;
+ $_SESSION['sess_browser_uid'] = http::browserUID(DC_MASTER_KEY);
+
+ if (!empty($_POST['blog'])) {
+ $_SESSION['sess_blog_id'] = $_POST['blog'];
+ }
+
+ if (!empty($_POST['user_remember']))
+ {
+ $cookie_admin =
+ http::browserUID(DC_MASTER_KEY.$user_id.crypt::hmac(DC_MASTER_KEY,$user_pwd)).
+ bin2hex(pack('a32',$user_id));
+
+ setcookie('dc_admin',$cookie_admin,strtotime('+15 days'),'','',DC_ADMIN_SSL);
+ }
+
+ http::redirect('index.php');
+ }
+ else
+ {
+ if (isset($_COOKIE['dc_admin'])) {
+ unset($_COOKIE['dc_admin']);
+ setcookie('dc_admin',false,-600,'','',DC_ADMIN_SSL);
+ }
+ $err = __('Wrong username or password');
+ }
+}
+
+if (isset($_GET['user'])) {
+ $user_id = $_GET['user'];
+}
+
+header('Content-Type: text/html; charset=UTF-8');
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ callBehavior('loginPageHTMLHead');
+ ?>
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/admin/blog.php b/admin/blog.php
new file mode 100644
index 0000000..dab788e
--- /dev/null
+++ b/admin/blog.php
@@ -0,0 +1,98 @@
+con->openCursor($core->prefix.'blog');
+ $blog_id = $cur->blog_id = $_POST['blog_id'];
+ $blog_url = $cur->blog_url = $_POST['blog_url'];
+ $blog_name = $cur->blog_name = $_POST['blog_name'];
+ $blog_desc = $cur->blog_desc = $_POST['blog_desc'];
+
+ try
+ {
+ # --BEHAVIOR-- adminBeforeBlogCreate
+ $core->callBehavior('adminBeforeBlogCreate',$cur,$blog_id);
+
+ $core->addBlog($cur);
+
+ # Default settings and override some
+ $core->blogDefaults($cur->blog_id);
+ $blog_settings = new dcSettings($core,$cur->blog_id);
+ $blog_settings->setNameSpace('system');
+ $blog_settings->put('lang',$core->auth->getInfo('user_lang'));
+ $blog_settings->put('blog_timezone',$core->auth->getInfo('user_tz'));
+
+ if (substr($blog_url,-1) == '?') {
+ $blog_settings->put('url_scan','query_string');
+ } else {
+ $blog_settings->put('url_scan','path_info');
+ }
+
+ # --BEHAVIOR-- adminAfterBlogCreate
+ $core->callBehavior('adminAfterBlogCreate',$cur,$blog_id,$blog_settings);
+
+ http::redirect('blog.php?id='.$cur->blog_id.'&add=1');
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ }
+}
+
+if (!empty($_REQUEST['id']))
+{
+ $edit_blog_mode = true;
+ include dirname(__FILE__).'/blog_pref.php';
+}
+else
+{
+ dcPage::open(__('New blog'),dcPage::jsConfirmClose('blog-form'));
+
+ echo
+ ''.
+
+ '';
+
+ dcPage::close();
+}
+?>
\ No newline at end of file
diff --git a/admin/blog_del.php b/admin/blog_del.php
new file mode 100644
index 0000000..756d32b
--- /dev/null
+++ b/admin/blog_del.php
@@ -0,0 +1,71 @@
+getBlog($_POST['blog_id']);
+ } catch (Exception $e) {
+ $core->error->add($e->getMessage());
+ }
+
+ if ($rs->isEmpty()) {
+ $core->error->add(__('No such blog ID'));
+ } else {
+ $blog_id = $rs->blog_id;
+ }
+}
+
+# Delete the blog
+if (!$core->error->flag() && $blog_id && !empty($_POST['del']))
+{
+ if (!$core->auth->checkPassword(crypt::hmac(DC_MASTER_KEY,$_POST['pwd']))) {
+ $core->error->add(__('Password verification failed'));
+ } else {
+ try {
+ $core->delBlog($blog_id);
+ http::redirect('blogs.php?del=1');
+ } catch (Exception $e) {
+ $core->error->add($e->getMessage());
+ }
+ }
+}
+
+dcPage::open('Delete a blog');
+
+if (!$core->error->flag())
+{
+ echo
+ ''.__('Delete a blog').' '.
+ ''.__('Warning').'
'.
+ ''.sprintf(__('You are about to delete the blog %s. Every entry, comment and category will be deleted.'),
+ ''.$blog_id.' ').'
'.
+ ''.__('Please give your password to confirm the blog deletion.').'
';
+
+ echo
+ '';
+}
+
+dcPage::close();
+?>
\ No newline at end of file
diff --git a/admin/blog_pref.php b/admin/blog_pref.php
new file mode 100644
index 0000000..e28b107
--- /dev/null
+++ b/admin/blog_pref.php
@@ -0,0 +1,528 @@
+blog->id;
+ $blog_url = $core->blog->url;
+ $blog_status = $core->blog->status;
+ $blog_name = $core->blog->name;
+ $blog_desc = $core->blog->desc;
+ $blog_settings = $core->blog->settings;
+
+ $action = 'blog_pref.php';
+ $redir = 'blog_pref.php?upd=1';
+}
+else
+{
+ dcPage::checkSuper();
+ try
+ {
+ if (empty($_REQUEST['id'])) {
+ throw new Exception(__('No given blog id.'));
+ }
+ $rs = $core->getBlog($_REQUEST['id']);
+
+ if (!$rs) {
+ throw new Exception(__('No such blog.'));
+ }
+
+ $blog_id = $rs->blog_id;
+ $blog_url = $rs->blog_url;
+ $blog_status = $rs->blog_status;
+ $blog_name = $rs->blog_name;
+ $blog_desc = $rs->blog_desc;
+ $blog_settings = new dcSettings($core,$blog_id);
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ }
+
+ $action = 'blog.php';
+ $redir = 'blog.php?id=%s&upd=1';
+}
+
+# Language codes
+$langs = l10n::getISOcodes(1,1);
+foreach ($langs as $k => $v) {
+ $lang_avail = $v == 'en' || is_dir(DC_L10N_ROOT.'/'.$v);
+ $lang_combo[] = new formSelectOption($k,$v,$lang_avail ? 'avail10n' : '');
+}
+
+# Status combo
+foreach ($core->getAllBlogStatus() as $k => $v) {
+ $status_combo[$v] = (string) $k;
+}
+
+# URL scan modes
+$url_scan_combo = array(
+ 'PATH_INFO' => 'path_info',
+ 'QUERY_STRING' => 'query_string'
+);
+
+# Post URL combo
+$post_url_combo = array(
+ __('year/month/day/title') => '{y}/{m}/{d}/{t}',
+ __('year/month/title') => '{y}/{m}/{t}',
+ __('year/title') => '{y}/{t}',
+ __('title') => '{t}'
+);
+if (!in_array($blog_settings->post_url_format,$post_url_combo)) {
+ $post_url_combo[html::escapeHTML($blog_settings->post_url_format)] = html::escapeHTML($blog_settings->post_url_format);
+}
+
+# Image title combo
+$img_title_combo = array(
+ __('Title') => 'Title ;; separator(, )',
+ __('Title, Date') => 'Title ;; Date(%b %Y) ;; separator(, )',
+ __('Title, Country, Date') => 'Title ;; Country ;; Date(%b %Y) ;; separator(, )',
+ __('Title, City, Country, Date') => 'Title ;; City ;; Country ;; Date(%b %Y) ;; separator(, )',
+);
+if (!in_array($blog_settings->media_img_title_pattern,$img_title_combo)) {
+ $img_title_combo[html::escapeHTML($blog_settings->media_img_title_pattern)] = html::escapeHTML($blog_settings->media_img_title_pattern);
+}
+
+# Robots policy options
+$robots_policy_options = array(
+ 'INDEX,FOLLOW' => __("I would like search engines and archivers to index and archive my blog's content."),
+ 'INDEX,FOLLOW,NOARCHIVE' => __("I would like search engines and archivers to index but not archive my blog's content."),
+ 'NOINDEX,NOFOLLOW,NOARCHIVE' => __("I would like to prevent search engines and archivers from indexing or archiving my blog's content."),
+);
+
+# Update a blog
+if ($blog_id && !empty($_POST) && $core->auth->check('admin',$blog_id))
+{
+ $cur = $core->con->openCursor($core->prefix.'blog');
+ if ($core->auth->isSuperAdmin()) {
+ $cur->blog_id = $_POST['blog_id'];
+ $cur->blog_url = $_POST['blog_url'];
+ if (in_array($_POST['blog_status'],$status_combo)) {
+ $cur->blog_status = (integer) $_POST['blog_status'];
+ }
+ }
+ $cur->blog_name = $_POST['blog_name'];
+ $cur->blog_desc = $_POST['blog_desc'];
+
+ $media_img_t_size = abs((integer) $_POST['media_img_t_size']);
+ if ($media_img_t_size < 0) { $media_img_t_size = 100; }
+
+ $media_img_s_size = abs((integer) $_POST['media_img_s_size']);
+ if ($media_img_s_size < 0) { $media_img_s_size = 240; }
+
+ $media_img_m_size = abs((integer) $_POST['media_img_m_size']);
+ if ($media_img_m_size < 0) { $media_img_m_size = 448; }
+
+ $nb_post_per_page = abs((integer) $_POST['nb_post_per_page']);
+ if ($nb_post_per_page <= 1) { $nb_post_per_page = 1; }
+
+ $nb_post_per_feed = abs((integer) $_POST['nb_post_per_feed']);
+ if ($nb_post_per_feed <= 1) { $nb_post_per_feed = 1; }
+
+ $nb_comment_per_feed = abs((integer) $_POST['nb_comment_per_feed']);
+ if ($nb_comment_per_feed <= 1) { $nb_comment_per_feed = 1; }
+
+ try
+ {
+ # --BEHAVIOR-- adminBeforeBlogUpdate
+ $core->callBehavior('adminBeforeBlogUpdate',$cur,$blog_id);
+
+ if (!preg_match('/^[a-z]{2}(-[a-z]{2})?$/',$_POST['lang'])) {
+ throw new Exception(__('Invalid language code'));
+ }
+
+ $core->updBlog($blog_id,$cur);
+
+ # --BEHAVIOR-- adminAfterBlogUpdate
+ $core->callBehavior('adminAfterBlogUpdate',$cur,$blog_id);
+
+ if ($blog_id == $core->blog->id && $cur->blog_id != null && $cur->blog_id != $blog_id) {
+ $blog_id = $cur->blog_id;
+ $core->setBlog($cur->blog_id);
+ $_SESSION['sess_blog_id'] = $cur->blog_id;
+ $blog_settings = $core->blog->settings;
+ }
+
+
+ $blog_settings->setNameSpace('system');
+
+ $blog_settings->put('editor',$_POST['editor']);
+ $blog_settings->put('copyright_notice',$_POST['copyright_notice']);
+ $blog_settings->put('post_url_format',$_POST['post_url_format']);
+ $blog_settings->put('lang',$_POST['lang']);
+ $blog_settings->put('blog_timezone',$_POST['blog_timezone']);
+ $blog_settings->put('date_format',$_POST['date_format']);
+ $blog_settings->put('time_format',$_POST['time_format']);
+ $blog_settings->put('comments_ttl',abs((integer) $_POST['comments_ttl']));
+ $blog_settings->put('trackbacks_ttl',abs((integer) $_POST['trackbacks_ttl']));
+ $blog_settings->put('allow_comments',!empty($_POST['allow_comments']));
+ $blog_settings->put('allow_trackbacks',!empty($_POST['allow_trackbacks']));
+ $blog_settings->put('comments_pub',empty($_POST['comments_pub']));
+ $blog_settings->put('trackbacks_pub',empty($_POST['trackbacks_pub']));
+ $blog_settings->put('comments_nofollow',!empty($_POST['comments_nofollow']));
+ $blog_settings->put('wiki_comments',!empty($_POST['wiki_comments']));
+ $blog_settings->put('enable_xmlrpc',!empty($_POST['enable_xmlrpc']));
+
+ $blog_settings->put('nb_post_per_page',$nb_post_per_page);
+ $blog_settings->put('use_smilies',!empty($_POST['use_smilies']));
+ $blog_settings->put('media_img_t_size',$media_img_t_size);
+ $blog_settings->put('media_img_s_size',$media_img_s_size);
+ $blog_settings->put('media_img_m_size',$media_img_m_size);
+ $blog_settings->put('media_img_title_pattern',$_POST['media_img_title_pattern']);
+ $blog_settings->put('nb_post_per_feed',$nb_post_per_feed);
+ $blog_settings->put('nb_comment_per_feed',$nb_comment_per_feed);
+ $blog_settings->put('short_feed_items',!empty($_POST['short_feed_items']));
+
+ if (isset($_POST['robots_policy'])) {
+ $blog_settings->put('robots_policy',$_POST['robots_policy']);
+ }
+
+ # --BEHAVIOR-- adminBeforeBlogSettingsUpdate
+ $core->callBehavior('adminBeforeBlogSettingsUpdate',$blog_settings);
+
+ if ($core->auth->isSuperAdmin() && in_array($_POST['url_scan'],$url_scan_combo)) {
+ $blog_settings->put('url_scan',$_POST['url_scan']);
+ }
+
+ http::redirect(sprintf($redir,$blog_id));
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ }
+}
+
+dcPage::open(__('Blog settings'),
+ dcPage::jsConfirmClose('blog-form').
+
+ # --BEHAVIOR-- adminBlogPreferencesHeaders
+ $core->callBehavior('adminBlogPreferencesHeaders').
+
+ dcPage::jsPageTabs()
+);
+
+if ($blog_id)
+{
+ echo ''.(!$standalone ? ''.__('Blogs').' › ' : '').
+ html::escapeHTML($blog_name).' › '.
+ __('Blog settings').' ';
+
+ if (!empty($_GET['add'])) {
+ echo ''.__('Blog has been successfully created.').'
';
+ }
+
+ if (!empty($_GET['upd'])) {
+ echo ''.__('Blog has been successfully updated.').'
';
+ }
+
+ echo
+ ''.
+ '
'.__('Parameters').' '.
+ '
';
+
+ if ($core->auth->isSuperAdmin() && $blog_id != $core->blog->id)
+ {
+ echo
+ '
';
+ }
+
+ # XML/RPC information
+ echo '
'.__('XML/RPC interface').' ';
+
+ echo '
'.__('XML/RPC interface allows you to edit your blog with an external client.').'
';
+
+ if (!$blog_settings->enable_xmlrpc)
+ {
+ echo '
'.__('XML/RPC interface is not active. Change settings to enable it.').'
';
+ }
+ else
+ {
+ echo
+ '
'.__('XML/RPC interface is active. You should set the following parameters on your XML/RPC client:').'
'.
+ '
'.
+ ''.__('Server URL:').' '.
+ sprintf(DC_XMLRPC_URL,$core->blog->url,$core->blog->id).
+ ' '.
+ ''.__('Blogging system:').' Movable Type '.
+ ''.__('User name:').' '.$core->auth->userID().' '.
+ ''.__('Password:').' '.__('your password').' '.
+ ''.__('Blog ID:').' 1 '.
+ ' ';
+ }
+
+ echo '
';
+
+ #
+ # Users on the blog (with permissions)
+
+ $blog_users = $core->getBlogPermissions($blog_id,$core->auth->isSuperAdmin());
+ $perm_types = $core->auth->getPermissionsTypes();
+
+ echo
+ ''.
+ '
'.__('Users on this blog').' ';
+
+ if (empty($blog_users))
+ {
+ echo '
'.__('No users').'
';
+ }
+ else
+ {
+ if ($core->auth->isSuperAdmin()) {
+ $user_url_p = '
%1$s ';
+ } else {
+ $user_url_p = '%1$s';
+ }
+
+ foreach ($blog_users as $k => $v)
+ {
+ if (count($v['p']) > 0)
+ {
+ echo
+ '
'.sprintf($user_url_p,html::escapeHTML($k)).
+ ' ('.html::escapeHTML(dcUtils::getUserCN(
+ $k, $v['name'], $v['firstname'], $v['displayname']
+ )).')';
+
+ if (!$v['super'] && $core->auth->isSuperAdmin()) {
+ echo
+ ' - '
+ .__('change permissions').' ';
+ }
+
+ echo ' ';
+
+ echo '
';
+ if ($v['super']) {
+ echo ''.__('Super administrator').' ';
+ } else {
+ foreach ($v['p'] as $p => $V) {
+ echo ''.__($perm_types[$p]).' ';
+ }
+ }
+ echo ' ';
+ }
+ }
+ }
+
+ echo '
';
+}
+
+dcPage::helpBlock('core_blog_pref');
+dcPage::close();
+?>
\ No newline at end of file
diff --git a/admin/blog_theme.php b/admin/blog_theme.php
new file mode 100644
index 0000000..62e821f
--- /dev/null
+++ b/admin/blog_theme.php
@@ -0,0 +1,352 @@
+themes = new dcThemes($core);
+$core->themes->loadModules($core->blog->themes_path,null);
+
+# Theme screenshot
+if (!empty($_GET['shot']) && $core->themes->moduleExists($_GET['shot']))
+{
+ if (empty($_GET['src'])) {
+ $f = $core->blog->themes_path.'/'.$_GET['shot'].'/screenshot.jpg';
+ } else {
+ $f = $core->blog->themes_path.'/'.$_GET['shot'].'/'.path::clean($_GET['src']);
+ }
+
+ $f = path::real($f);
+
+ if (!file_exists($f)) {
+ $f = dirname(__FILE__).'/images/noscreenshot.png';
+ }
+
+ http::cache(array_merge(array($f),get_included_files()));
+
+ header('Content-Type: '.files::getMimeType($f));
+ header('Content-Length: '.filesize($f));
+ readfile($f);
+
+ exit;
+}
+
+$can_install = $core->auth->isSuperAdmin();
+$is_writable = is_dir($core->blog->themes_path) && is_writable($core->blog->themes_path);
+$default_tab = 'themes-list';
+
+# Selecting theme
+if (!empty($_POST['theme']) && !empty($_POST['select']) && empty($_REQUEST['conf']))
+{
+ $core->blog->settings->setNameSpace('system');
+ $core->blog->settings->put('theme',$_POST['theme']);
+ $core->blog->triggerBlog();
+ http::redirect('blog_theme.php?upd=1');
+}
+
+if ($can_install && !empty($_POST['theme']) && !empty($_POST['remove']) && empty($_REQUEST['conf']))
+{
+ try
+ {
+ if ($_POST['theme'] == 'default') {
+ throw new Exception(__('You can\'t remove default theme.'));
+ }
+
+ if (!$core->themes->moduleExists($_POST['theme'])) {
+ throw new Exception(__('Theme does not exist.'));
+ }
+
+ $theme = $core->themes->getModules($_POST['theme']);
+
+ # --BEHAVIOR-- themeBeforeDelete
+ $core->callBehavior('themeBeforeDelete',$theme);
+
+ $core->themes->deleteModule($_POST['theme']);
+
+ # --BEHAVIOR-- themeAfterDelete
+ $core->callBehavior('themeAfterDelete',$theme);
+
+ http::redirect('blog_theme.php?del=1');
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ }
+}
+
+# Theme upload
+if ($can_install && $is_writable && ((!empty($_POST['upload_pkg']) && !empty($_FILES['pkg_file'])) ||
+ (!empty($_POST['fetch_pkg']) && !empty($_POST['pkg_url']))))
+{
+ try
+ {
+ if (empty($_POST['your_pwd']) || !$core->auth->checkPassword(crypt::hmac(DC_MASTER_KEY,$_POST['your_pwd']))) {
+ throw new Exception(__('Password verification failed'));
+ }
+
+ if (!empty($_POST['upload_pkg']))
+ {
+ files::uploadStatus($_FILES['pkg_file']);
+
+ $dest = $core->blog->themes_path.'/'.$_FILES['pkg_file']['name'];
+ if (!move_uploaded_file($_FILES['pkg_file']['tmp_name'],$dest)) {
+ throw new Exception(__('Unable to move uploaded file.'));
+ }
+ }
+ else
+ {
+ $url = urldecode($_POST['pkg_url']);
+ $dest = $core->blog->themes_path.'/'.basename($url);
+
+ try
+ {
+ $client = netHttp::initClient($url,$path);
+ $client->setUserAgent('Dotclear - http://www.dotclear.org/');
+ $client->useGzip(false);
+ $client->setPersistReferers(false);
+ $client->setOutput($dest);
+ $client->get($path);
+ }
+ catch( Exception $e)
+ {
+ throw new Exception(__('An error occurred while downloading the file.'));
+ }
+
+ unset($client);
+ }
+
+ $ret_code = dcModules::installPackage($dest,$core->themes);
+ http::redirect('blog_theme.php?added='.$ret_code);
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ $default_tab = 'add-theme';
+ }
+}
+
+$theme_conf_mode = false;
+if (!empty($_REQUEST['conf']))
+{
+ $theme_conf_file = path::real($core->blog->themes_path.'/'.$core->blog->settings->theme).'/_config.php';
+ if (file_exists($theme_conf_file)) {
+ $theme_conf_mode = true;
+ }
+}
+
+function display_theme_details($id,$details,$current)
+{
+ global $core;
+
+ $screenshot = 'images/noscreenshot.png';
+ if (file_exists($core->blog->themes_path.'/'.$id.'/screenshot.jpg')) {
+ $screenshot = 'blog_theme.php?shot='.rawurlencode($id);
+ }
+
+ $radio_id = 'theme_'.html::escapeHTML($id);
+ $theme_url = http::concatURL($core->blog->url,$core->blog->settings->themes_url.'/'.$id);
+ $has_conf = file_exists(path::real($core->blog->themes_path.'/'.$id).'/_config.php');
+ $has_css = file_exists(path::real($core->blog->themes_path.'/'.$id).'/style.css');
+ $parent = $core->themes->moduleInfo($id,'parent');
+ $has_parent = (boolean)$parent;
+ if ($has_parent) {
+ $is_parent_present = $core->themes->moduleExists($parent);
+ }
+
+ $res =
+ ''.
+ '
'.
+ '
'.
+ '
'.form::radio(array('theme',$radio_id),html::escapeHTML($id),$current,'','',($has_parent && !$is_parent_present)).' '.
+ ''.
+ html::escapeHTML($details['name']).' '.
+ '
'.html::escapeHTML($details['desc']).' '.
+ ''.sprintf(__('by %s'),html::escapeHTML($details['author'])).' '.
+ ''.sprintf(__('version %s'),html::escapeHTML($details['version'])).' ';
+ if ($has_parent) {
+ if ($is_parent_present) {
+ $res .= ''.sprintf(__('(built on "%s")'),html::escapeHTML($parent)).' ';
+ } else {
+ $res .= ''.sprintf(__('(requires "%s")'),html::escapeHTML($parent)).' ';
+ }
+ }
+ if ($has_css) {
+ $res .= ''.__('Stylesheet').' ';
+ }
+ $res .= '
';
+ $res .=
+ '
'.
+ '
';
+ if ($current && $has_conf) {
+ $res .= '
'.__('Theme configuration').'
';
+ }
+ if ($current) {
+ # --BEHAVIOR-- adminCurrentThemeDetails
+ $res .= $core->callBehavior('adminCurrentThemeDetails',$core,$id,$details);
+ }
+ $res .=
+ '
'.
+ '
';
+
+ return $res;
+}
+
+dcPage::open(__('Blog themes'),
+ dcPage::jsLoad('js/_blog_theme.js').
+ dcPage::jsPageTabs($default_tab).
+ dcPage::jsColorPicker()
+);
+
+if (!$theme_conf_mode)
+{
+ echo
+ ''.html::escapeHTML($core->blog->name).' › '.__('Blog aspect').' ';
+
+ if (!empty($_GET['upd'])) {
+ echo ''.__('Theme has been successfully changed.').'
';
+ }
+
+ if (!empty($_GET['added'])) {
+ echo ''.
+ ($_GET['added'] == 2 ? __('Theme has been successfully upgraded') : __('Theme has been successfully installed.')).
+ '
';
+ }
+
+ if (!empty($_GET['del'])) {
+ echo ''.__('Theme has been successfully deleted.').'
';
+ }
+
+ if ($can_install) {
+ echo
+ ''.sprintf(__('You can find additional themes for your blog on %s.'),
+ 'Dotaddict ').' '.
+ __('To install or upgrade a theme you generally just need to upload it '.
+ 'in "Install or upgrade a theme" section.').'
';
+ }
+
+ # Themes list
+ echo '';
+
+ $themes = $core->themes->getModules();
+ if (isset($themes[$core->blog->settings->theme])) {
+ echo '
'.sprintf(__('You are currently using "%s"'),$themes[$core->blog->settings->theme]['name']).' ';
+ }
+
+ echo
+ '
'.
+ '
';
+
+ # Add a new theme
+ if ($can_install)
+ {
+ echo
+ '';
+
+ if ($is_writable)
+ {
+ echo '
'.__('You can install themes by uploading or downloading zip files.').'
';
+
+ # 'Upload theme' form
+ echo
+ '
';
+
+ # 'Fetch theme' form
+ echo
+ '
';
+ }
+ else
+ {
+ echo
+ '
'.
+ __('To enable this function, please give write access to your themes directory.').
+ '
';
+ }
+ echo '
';
+ }
+}
+else
+{
+ $theme_name = $core->themes->moduleInfo($core->blog->settings->theme,'name');
+ echo
+ ''.html::escapeHTML($core->blog->name).
+ ' › '.__('Blog aspect').' › '.__('Theme configuration').' '.
+ ''.__('back').'
';
+
+ try
+ {
+ echo '';
+ }
+ catch (Exception $e)
+ {
+ echo '';
+ }
+}
+
+dcPage::close();
+?>
\ No newline at end of file
diff --git a/admin/blogs.php b/admin/blogs.php
new file mode 100644
index 0000000..de6440f
--- /dev/null
+++ b/admin/blogs.php
@@ -0,0 +1,183 @@
+ 'blog_upddt',
+__('Blog name') => 'UPPER(blog_name)',
+__('Blog ID') => 'B.blog_id'
+);
+
+$order_combo = array(
+__('Descending') => 'desc',
+__('Ascending') => 'asc'
+);
+
+$q = !empty($_GET['q']) ? $_GET['q'] : '';
+$sortby = !empty($_GET['sortby']) ? $_GET['sortby'] : 'blog_upddt';
+$order = !empty($_GET['order']) ? $_GET['order'] : 'desc';
+
+$page = !empty($_GET['page']) ? $_GET['page'] : 1;
+$nb_per_page = 30;
+
+if (!empty($_GET['nb']) && (integer) $_GET['nb'] > 0) {
+ $nb_per_page = $_GET['nb'];
+}
+
+$show_filters = false;
+
+# - Search filter
+if ($q) {
+ $params['q'] = $q;
+ $show_filters = true;
+}
+
+# - Sortby and order filter
+if ($sortby !== '' && in_array($sortby,$sortby_combo)) {
+ if ($order !== '' && in_array($order,$order_combo)) {
+ $params['order'] = $sortby.' '.$order;
+ }
+
+ if ($sortby != 'blog_upddt' || $order != 'desc') {
+ $show_filters = true;
+ }
+}
+
+$params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page);
+
+try {
+ $counter = $core->getBlogs($params,1);
+ $rs = $core->getBlogs($params);
+ $nb_blog = $counter->f(0);
+} catch (Exception $e) {
+ $core->error->add($e->getMessage());
+}
+
+/* DISPLAY
+-------------------------------------------------------- */
+$starting_script = '';
+if (!$show_filters) {
+ $starting_script .= dcPage::jsLoad('js/filter-controls.js');
+}
+dcPage::open(__('List of blogs'),$starting_script);
+
+if (!empty($_GET['del'])) {
+ echo ''.__('Blog has been successfully deleted.').'
';
+}
+
+echo ''.__('List of blogs').' ';
+
+if (!$core->error->flag())
+{
+ if ($core->auth->isSuperAdmin()) {
+ echo ''.__('Create a new blog').'
';
+ }
+
+ if (!$show_filters) {
+ echo ''.__('Filters').'
';
+ }
+
+ echo
+ '';
+
+ # Show blogs
+ if ($nb_blog == 0)
+ {
+ echo ''.__('No blog').'
';
+ }
+ else
+ {
+ $pager = new pager($page,$nb_blog,$nb_per_page,10);
+ $pager->var_page = 'page';
+
+ echo ''.__('Page(s)').' : '.$pager->getLinks().'
';
+
+ echo
+ ''.
+ ''.__('Blog name').' '.
+ ''.__('Last update').' '.
+ ''.__('Entries').' '.
+ ''.__('Blog ID').' '.
+ ' '.
+ ''.__('Status').' '.
+ ' ';
+
+ while ($rs->fetch()) {
+ echo blogLine($rs);
+ }
+
+ echo '
';
+
+ echo ''.__('Page(s)').' : '.$pager->getLinks().'
';
+ }
+}
+
+dcPage::close();
+
+function blogLine(&$rs)
+{
+ global $core;
+
+ $blog_id = html::escapeHTML($rs->blog_id);
+ $edit_link = '';
+
+ if ($GLOBALS['core']->auth->isSuperAdmin()) {
+ $edit_link =
+ ''.
+ __('edit').' ';
+ }
+
+ $img_status = $rs->blog_status == 1 ? 'check-on' : 'check-off';
+ $txt_status = $GLOBALS['core']->getBlogStatus($rs->blog_status);
+ $img_status = sprintf(' ',$img_status,$txt_status);
+
+ return
+ ''.
+ 'blog_id).'">'.
+ html::escapeHTML($rs->blog_name).' '.
+ ''.dt::dt2str(__('%Y-%m-%d %H:%M'),$rs->blog_upddt).' '.
+ ''.$core->countBlogPosts($rs->blog_id).' '.
+ ''.$blog_id.' '.
+ ''.$edit_link.' '.
+ ''.$img_status.' '.
+ ' ';
+}
+?>
\ No newline at end of file
diff --git a/admin/categories.php b/admin/categories.php
new file mode 100644
index 0000000..b832269
--- /dev/null
+++ b/admin/categories.php
@@ -0,0 +1,188 @@
+blog->getCategory((integer) $_POST['del_cat']);
+ if ($c->isEmpty()) {
+ throw new Exception(__('This category does not exist.'));
+ }
+ unset($c);
+ $core->blog->delCategory($_POST['del_cat']);
+ http::redirect('categories.php?del=1');
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ }
+}
+
+# Reset order
+if (!empty($_POST['reset']))
+{
+ try
+ {
+ $core->blog->resetCategoriesOrder();
+ http::redirect('categories.php?reord=1');
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ }
+}
+
+/* Display
+-------------------------------------------------------- */
+dcPage::open(__('Categories'),
+ dcPage::jsToolMan()."\n".
+ dcPage::jsLoad('js/_categories.js')
+);
+
+if (!empty($_GET['add'])) {
+ echo ''.__('The category has been successfully created.').'
';
+}
+if (!empty($_GET['del'])) {
+ echo ''.__('The category has been successfully removed.').'
';
+}
+if (!empty($_GET['reord'])) {
+ echo ''.__('Categories have been successfully reordered.').'
';
+}
+if (!empty($_GET['moved'])) {
+ echo ''.__('The category has been successfully moved.').'
';
+}
+
+echo ''.html::escapeHTML($core->blog->name).' › '.__('Categories').' ';
+
+$rs = $core->blog->getCategories(array('post_type'=>'post'));
+
+echo
+''.
+'
';
+if ($rs->isEmpty())
+{
+ echo '
'.__('No category yet.').'
';
+}
+else
+{
+ echo
+ '
'.__('Categories list').' '.
+ '
';
+
+ $ref_level = $level = $rs->level-1;
+ while ($rs->fetch())
+ {
+ $attr = 'id="cat'.$rs->cat_id.'"';
+ if ($rs->nb_total == 0) {
+ $attr .= ' class="deletable"';
+ }
+
+ if ($rs->level > $level) {
+ echo str_repeat('
',$rs->level - $level);
+ } elseif ($rs->level < $level) {
+ echo str_repeat(' ',-($rs->level - $level));
+ }
+
+ if ($rs->level <= $level) {
+ echo '
';
+ }
+
+ echo
+ ''.html::escapeHTML($rs->cat_title).' '.
+ ' ('.
+ sprintf(($rs->nb_post > 1 ? __('%d entries') : __('%d entry') ),$rs->nb_post).' '.
+ ', '.__('total:').' '.$rs->nb_total.')
'.
+ ''.__('URL:').' '.html::escapeHTML($rs->cat_url).'
';
+
+ $level = $rs->level;
+ }
+
+ if ($ref_level - $level < 0) {
+ echo str_repeat(' ',-($ref_level - $level));
+ }
+ echo '
';
+}
+echo '
';
+
+echo '
'.
+
+'
';
+
+if (!$rs->isEmpty())
+{
+ $deletable = array();
+ $l = $rs->level;
+ $full_name = array($rs->cat_title);
+ while ($rs->fetch())
+ {
+ if ($rs->level < $l) {
+ $full_name = array();
+ } elseif ($rs->level == $l) {
+ array_pop($full_name);
+ }
+ $full_name[] = html::escapeHTML($rs->cat_title);
+ if ($rs->nb_post == 0) {
+ $deletable[implode(' / ',$full_name)] = $rs->cat_id;
+ }
+ $l = $rs->level;
+ }
+
+ if (count($deletable) > 0)
+ {
+ echo
+ '
';
+ }
+
+ echo
+ '
';
+}
+echo '
';
+echo '
';
+
+dcPage::helpBlock('core_categories');
+dcPage::close();
+?>
\ No newline at end of file
diff --git a/admin/category.php b/admin/category.php
new file mode 100644
index 0000000..76a26bf
--- /dev/null
+++ b/admin/category.php
@@ -0,0 +1,260 @@
+blog->getCategory($_REQUEST['id']);
+ } catch (Exception $e) {
+ $core->error->add($e->getMessage());
+ }
+
+ if (!$core->error->flag() && !$rs->isEmpty())
+ {
+ $cat_id = (integer) $rs->cat_id;
+ $cat_title = $rs->cat_title;
+ $cat_url = $rs->cat_url;
+ $cat_desc = $rs->cat_desc;
+ }
+ unset($rs);
+
+ # Getting hierarchy information
+ $parents = $core->blog->getCategoryParents($cat_id);
+ $rs = $core->blog->getCategoryParent($cat_id);
+ $cat_parent = $rs->isEmpty() ? 0 : (integer) $rs->cat_id;
+ unset($rs);
+
+ # Allowed parents list
+ $children = $core->blog->getCategories(array('post_type'=>'post','start'=>$cat_id));
+ $allowed_parents = array(__('Top level')=>0);
+
+ $p = array();
+ while ($children->fetch()) {
+ $p[$children->cat_id] = 1;
+ }
+
+ $rs = $core->blog->getCategories(array('post_type'=>'post'));
+ while ($rs->fetch()) {
+ if (!isset($p[$rs->cat_id])) {
+ $allowed_parents[] = new formSelectOption(
+ str_repeat(' ',$rs->level-1).'• '.html::escapeHTML($rs->cat_title),
+ $rs->cat_id
+ );
+ }
+ }
+ unset($rs);
+
+ # Allowed siblings list
+ $siblings = array();
+ $rs = $core->blog->getCategoryFirstChildren($cat_parent);
+ while ($rs->fetch()) {
+ if ($rs->cat_id != $cat_id) {
+ $siblings[html::escapeHTML($rs->cat_title)] = $rs->cat_id;
+ }
+ }
+ unset($rs);
+}
+
+# Changing parent
+if ($cat_id && isset($_POST['cat_parent']))
+{
+ $new_parent = (integer) $_POST['cat_parent'];
+ if ($cat_parent != $new_parent)
+ {
+ try {
+ $core->blog->setCategoryParent($cat_id,$new_parent);
+ http::redirect('categories.php?moved=1');
+ } catch (Exception $e) {
+ $core->error->add($e->getMessage());
+ }
+ }
+}
+
+# Changing sibling
+if ($cat_id && isset($_POST['cat_sibling']))
+{
+ try {
+ $core->blog->setCategoryPosition($cat_id,(integer) $_POST['cat_sibling'],$_POST['cat_move']);
+ http::redirect('categories.php?moved=1');
+ } catch (Exception $e) {
+ $core->error->add($e->getMessage());
+ }
+}
+
+# Create or update a category
+if (isset($_POST['cat_title']))
+{
+ $cur = $core->con->openCursor($core->prefix.'category');
+
+ $cur->cat_title = $cat_title = $_POST['cat_title'];
+
+ if (isset($_POST['cat_desc'])) {
+ $cur->cat_desc = $cat_desc = $_POST['cat_desc'];
+ }
+
+ if (isset($_POST['cat_url'])) {
+ $cur->cat_url = $cat_url = $_POST['cat_url'];
+ } else {
+ $cur->cat_url = $cat_url;
+ }
+
+ try
+ {
+ # Update category
+ if ($cat_id)
+ {
+ # --BEHAVIOR-- adminBeforeCategoryUpdate
+ $core->callBehavior('adminBeforeCategoryUpdate',$cur,$cat_id);
+
+ $core->blog->updCategory($_POST['id'],$cur);
+
+ # --BEHAVIOR-- adminAfterCategoryUpdate
+ $core->callBehavior('adminAfterCategoryUpdate',$cur,$cat_id);
+
+ http::redirect('category.php?id='.$_POST['id'].'&upd=1');
+ }
+ # Create category
+ else
+ {
+ # --BEHAVIOR-- adminBeforeCategoryCreate
+ $core->callBehavior('adminBeforeCategoryCreate',$cur);
+
+ $id = $core->blog->addCategory($cur,(integer) $_POST['new_cat_parent']);
+
+ # --BEHAVIOR-- adminAfterCategoryCreate
+ $core->callBehavior('adminAfterCategoryCreate',$cur,$id);
+
+ http::redirect('categories.php?add=1');
+ }
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ }
+}
+
+
+$title = $cat_id ? html::escapeHTML($cat_title) : __('New category');
+
+dcPage::open($title,
+ dcPage::jsConfirmClose('category-form').
+ dcPage::jsToolBar().
+ dcPage::jsLoad('js/_category.js')
+);
+
+if (!empty($_GET['upd'])) {
+ echo ''.__('Category has been successfully updated.').'
';
+}
+
+echo
+''.html::escapeHTML($core->blog->name).' › '.
+__('Categories').' › ';
+
+if ($cat_id)
+{
+ while($parents->fetch()) {
+ echo ''.html::escapeHTML($parents->cat_title).' ';
+ echo " › ";
+ }
+}
+
+echo $title.' ';
+
+echo
+'';
+
+if ($cat_id)
+{
+ echo
+ ''.__('Move this category').' '.
+ ''.
+ '
';
+
+ if (count($siblings) > 0) {
+ echo
+ '
';
+ }
+
+ echo '
';
+}
+
+dcPage::helpBlock('core_categories');
+dcPage::close();
+?>
\ No newline at end of file
diff --git a/admin/comment.php b/admin/comment.php
new file mode 100644
index 0000000..bdb7776
--- /dev/null
+++ b/admin/comment.php
@@ -0,0 +1,232 @@
+blog->getAllCommentStatus() as $k => $v) {
+ $status_combo[$v] = (string) $k;
+}
+
+# Adding comment
+if (!empty($_POST['add']) && !empty($_POST['post_id']))
+{
+ try
+ {
+ $rs = $core->blog->getPosts(array('post_id' => $_POST['post_id'], 'post_type' => ''));
+
+ if ($rs->isEmpty()) {
+ throw new Exception(__('Entry does not exist.'));
+ }
+
+ $cur = $core->con->openCursor($core->prefix.'comment');
+
+ $cur->comment_author = $_POST['comment_author'];
+ $cur->comment_email = html::clean($_POST['comment_email']);
+ $cur->comment_site = html::clean($_POST['comment_site']);
+ $cur->comment_content = $core->HTMLfilter($_POST['comment_content']);
+ $cur->post_id = (integer) $_POST['post_id'];
+
+ # --BEHAVIOR-- adminBeforeCommentCreate
+ $core->callBehavior('adminBeforeCommentCreate',$cur);
+
+ $comment_id = $core->blog->addComment($cur);
+
+ # --BEHAVIOR-- adminAfterCommentCreate
+ $core->callBehavior('adminAfterCommentCreate',$cur,$comment_id);
+
+ http::redirect($core->getPostAdminURL($rs->post_type,$rs->post_id,false).'&co=1&creaco=1');
+ } catch (Exception $e) {
+ $core->error->add($e->getMessage());
+ }
+}
+
+if (!empty($_REQUEST['id']))
+{
+ $params['comment_id'] = $_REQUEST['id'];
+
+ try {
+ $rs = $core->blog->getComments($params);
+ if (!$rs->isEmpty()) {
+ $comment_id = $rs->comment_id;
+ $post_id = $rs->post_id;
+ $post_type = $rs->post_type;
+ $post_title = $rs->post_title;
+ $comment_dt = $rs->comment_dt;
+ $comment_author = $rs->comment_author;
+ $comment_email = $rs->comment_email;
+ $comment_site = $rs->comment_site;
+ $comment_content = $rs->comment_content;
+ $comment_ip = $rs->comment_ip;
+ $comment_status = $rs->comment_status;
+ $comment_trackback = (boolean) $rs->comment_trackback;
+ $comment_spam_status = $rs->comment_spam_status;
+ }
+ } catch (Exception $e) {
+ $core->error->add($e->getMessage());
+ }
+}
+
+if (!$comment_id && !$core->error->flag()) {
+ $core->error->add(__('No comment'));
+}
+
+if (!$core->error->flag() && isset($rs))
+{
+ $can_edit = $can_delete = $can_publish = $core->auth->check('contentadmin',$core->blog->id);
+
+ if (!$core->auth->check('contentadmin',$core->blog->id) && $core->auth->userID() == $rs->user_id) {
+ $can_edit = true;
+ if ($core->auth->check('delete',$core->blog->id)) {
+ $can_delete = true;
+ }
+ if ($core->auth->check('publish',$core->blog->id)) {
+ $can_publish = true;
+ }
+ }
+
+ # update comment
+ if (!empty($_POST['update']) && $can_edit)
+ {
+ $cur = $core->con->openCursor($core->prefix.'comment');
+
+ $cur->comment_author = $_POST['comment_author'];
+ $cur->comment_email = html::clean($_POST['comment_email']);
+ $cur->comment_site = html::clean($_POST['comment_site']);
+ $cur->comment_content = $core->HTMLfilter($_POST['comment_content']);
+
+ if (isset($_POST['comment_status'])) {
+ $cur->comment_status = (integer) $_POST['comment_status'];
+ }
+
+ try
+ {
+ # --BEHAVIOR-- adminBeforeCommentUpdate
+ $core->callBehavior('adminBeforeCommentUpdate',$cur,$comment_id);
+
+ $core->blog->updComment($comment_id,$cur);
+
+ # --BEHAVIOR-- adminAfterCommentUpdate
+ $core->callBehavior('adminAfterCommentUpdate',$cur,$comment_id);
+
+ http::redirect('comment.php?id='.$comment_id.'&upd=1');
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ }
+ }
+
+ if (!empty($_POST['delete']) && $can_delete)
+ {
+ try {
+ $core->blog->delComment($comment_id);
+ http::redirect($core->getPostAdminURL($rs->post_type,$rs->post_id).'&co=1#c'.$comment_id,false);
+ } catch (Exception $e) {
+ $core->error->add($e->getMessage());
+ }
+ }
+
+ if (!$can_edit) {
+ $core->error->add(__("You can't edit this comment."));
+ }
+}
+
+/* DISPLAY
+-------------------------------------------------------- */
+dcPage::open(__('Edit comment'),
+ dcPage::jsConfirmClose('comment-form').
+ dcPage::jsToolBar().
+ dcPage::jsLoad('js/_comment.js')
+);
+
+if ($comment_id)
+{
+ if (!empty($_GET['upd'])) {
+ echo ''.__('Comment has been successfully updated.').'
';
+ }
+
+ $comment_mailto = '';
+ if ($comment_email)
+ {
+ $comment_mailto = 'getPostURL()))
+ .'">'.__('Send an e-mail').' ';
+ }
+
+ echo ''.html::escapeHTML($core->blog->name).' › '.__('Edit comment').' ';
+
+ echo ' '.
+ sprintf(__('Back to "%s"'),$post_title).'
';
+
+ echo
+ '';
+}
+
+dcPage::helpBlock('core_comments');
+dcPage::close();
+?>
\ No newline at end of file
diff --git a/admin/comments.php b/admin/comments.php
new file mode 100644
index 0000000..cbcc32f
--- /dev/null
+++ b/admin/comments.php
@@ -0,0 +1,233 @@
+ ''
+);
+foreach ($core->blog->getAllCommentStatus() as $k => $v) {
+ $status_combo[$v] = (string) $k;
+}
+
+$type_combo = array(
+'-' => '',
+__('comment') => 'co',
+__('trackback') => 'tb'
+);
+
+$sortby_combo = array(
+__('Date') => 'comment_dt',
+__('Entry title') => 'post_title',
+__('Author') => 'comment_author',
+__('Status') => 'comment_status'
+);
+
+$order_combo = array(
+__('Descending') => 'desc',
+__('Ascending') => 'asc'
+);
+
+
+/* Get comments
+-------------------------------------------------------- */
+$author = isset($_GET['author']) ? $_GET['author'] : '';
+$status = isset($_GET['status']) ? $_GET['status'] : '';
+$type = !empty($_GET['type']) ? $_GET['type'] : '';
+$sortby = !empty($_GET['sortby']) ? $_GET['sortby'] : 'comment_dt';
+$order = !empty($_GET['order']) ? $_GET['order'] : 'desc';
+$ip = !empty($_GET['ip']) ? $_GET['ip'] : '';
+
+$with_spam = $author || $status || $type || $sortby != 'comment_dt' || $order != 'desc' || $ip;
+
+$show_filters = false;
+
+$page = !empty($_GET['page']) ? (integer) $_GET['page'] : 1;
+$nb_per_page = 30;
+
+if (!empty($_GET['nb']) && (integer) $_GET['nb'] > 0) {
+ if ($nb_per_page != $_GET['nb']) {
+ $show_filters = true;
+ }
+ $nb_per_page = (integer) $_GET['nb'];
+}
+
+$params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page);
+$params['no_content'] = true;
+
+# Author filter
+if ($author !== '') {
+ $params['q_author'] = $author;
+ $show_filters = true;
+}
+
+# - Type filter
+if ($type == 'tb' || $type == 'co') {
+ $params['comment_trackback'] = ($type == 'tb');
+ $show_filters = true;
+}
+
+# - Status filter
+if ($status !== '' && in_array($status,$status_combo)) {
+ $params['comment_status'] = $status;
+ $show_filters = true;
+} elseif (!$with_spam) {
+ $params['comment_status_not'] = -2;
+}
+
+# - IP filter
+if ($ip) {
+ $params['comment_ip'] = $ip;
+ $show_filters = true;
+}
+
+# Sortby and order filter
+if ($sortby !== '' && in_array($sortby,$sortby_combo)) {
+ if ($order !== '' && in_array($order,$order_combo)) {
+ $params['order'] = $sortby.' '.$order;
+ }
+
+ if ($sortby != 'comment_dt' || $order != 'desc') {
+ $show_filters = true;
+ }
+}
+
+# Actions combo box
+$combo_action = array();
+if ($core->auth->check('publish,contentadmin',$core->blog->id))
+{
+ $combo_action[__('publish')] = 'publish';
+ $combo_action[__('unpublish')] = 'unpublish';
+ $combo_action[__('mark as pending')] = 'pending';
+ $combo_action[__('mark as junk')] = 'junk';
+}
+if ($core->auth->check('delete,contentadmin',$core->blog->id))
+{
+ $combo_action[__('delete')] = 'delete';
+}
+
+
+/* Get comments
+-------------------------------------------------------- */
+try {
+ $comments = $core->blog->getComments($params);
+ $counter = $core->blog->getComments($params,true);
+ $comment_list = new adminCommentList($core,$comments,$counter->f(0));
+} catch (Exception $e) {
+ $core->error->add($e->getMessage());
+}
+
+/* DISPLAY
+-------------------------------------------------------- */
+$starting_script = dcPage::jsLoad('js/_comments.js');
+if (!$show_filters) {
+ $starting_script .= dcPage::jsLoad('js/filter-controls.js');
+}
+# --BEHAVIOR-- adminCommentsHeaders
+$starting_script .= $core->callBehavior('adminCommentsHeaders');
+
+dcPage::open(__('Comments'),$starting_script);
+
+echo ''.html::escapeHTML($core->blog->name).' › '.__('Comments').' ';
+
+if (!$core->error->flag())
+{
+ # Filters
+ if (!$show_filters) {
+ echo ''.
+ __('Filters').'
';
+ }
+
+ echo
+ '';
+
+ if (!$with_spam) {
+ $spam_count = $core->blog->getComments(array('comment_status'=>-2),true)->f(0);
+ if ($spam_count == 1) {
+ echo ''.sprintf(__('You have one spam comments.'),''.$spam_count.' ').' '.
+ ''.__('Show it.').'
';
+ } elseif ($spam_count > 1) {
+ echo ''.sprintf(__('You have %s spam comments.'),''.$spam_count.' ').' '.
+ ''.__('Show them.').'
';
+ }
+ }
+
+ # Show comments
+ $comment_list->display($page,$nb_per_page,
+ ''
+ );
+}
+
+dcPage::helpBlock('core_comments');
+dcPage::close();
+?>
\ No newline at end of file
diff --git a/admin/comments_actions.php b/admin/comments_actions.php
new file mode 100644
index 0000000..650ec15
--- /dev/null
+++ b/admin/comments_actions.php
@@ -0,0 +1,97 @@
+ $v) {
+ $comments[$k] = (integer) $v;
+ }
+
+ $params['sql'] = 'AND C.comment_id IN('.implode(',',$comments).') ';
+ $params['no_content'] = true;
+
+ $co = $core->blog->getComments($params);
+
+ if (preg_match('/^(publish|unpublish|pending|junk)$/',$action))
+ {
+ switch ($action) {
+ case 'unpublish' : $status = 0; break;
+ case 'pending' : $status = -1; break;
+ case 'junk' : $status = -2; break;
+ default : $status = 1; break;
+ }
+
+ while ($co->fetch())
+ {
+ try {
+ $core->blog->updCommentStatus($co->comment_id,$status);
+ } catch (Exception $e) {
+ $core->error->add($e->getMessage());
+ }
+ }
+
+ if (!$core->error->flag()) {
+ http::redirect($redir);
+ }
+ }
+ elseif ($action == 'delete')
+ {
+ while ($co->fetch())
+ {
+ try {
+ $core->blog->delComment($co->comment_id);
+ } catch (Exception $e) {
+ $core->error->add($e->getMessage());
+ }
+ }
+
+ if (!$core->error->flag()) {
+ http::redirect($redir);
+ }
+ }
+}
+
+/* DISPLAY
+-------------------------------------------------------- */
+dcPage::open(__('Comments'));
+
+echo ''.__('back').'
';
+
+dcPage::close();
+?>
\ No newline at end of file
diff --git a/admin/dispatcher.php b/admin/dispatcher.php
new file mode 100644
index 0000000..22754e5
--- /dev/null
+++ b/admin/dispatcher.php
@@ -0,0 +1,34 @@
+What the hell are you doing here?
';
+exit;
+?>
\ No newline at end of file
diff --git a/admin/images/attach.png b/admin/images/attach.png
new file mode 100644
index 0000000..f87bc77
Binary files /dev/null and b/admin/images/attach.png differ
diff --git a/admin/images/check-off.png b/admin/images/check-off.png
new file mode 100644
index 0000000..fc5f661
Binary files /dev/null and b/admin/images/check-off.png differ
diff --git a/admin/images/check-on.png b/admin/images/check-on.png
new file mode 100644
index 0000000..c36f26c
Binary files /dev/null and b/admin/images/check-on.png differ
diff --git a/admin/images/check-wrn.png b/admin/images/check-wrn.png
new file mode 100644
index 0000000..fa327f0
Binary files /dev/null and b/admin/images/check-wrn.png differ
diff --git a/admin/images/date-picker.png b/admin/images/date-picker.png
new file mode 100644
index 0000000..e35e932
Binary files /dev/null and b/admin/images/date-picker.png differ
diff --git a/admin/images/dotclear_pw.png b/admin/images/dotclear_pw.png
new file mode 100644
index 0000000..593a913
Binary files /dev/null and b/admin/images/dotclear_pw.png differ
diff --git a/admin/images/edit-mini.png b/admin/images/edit-mini.png
new file mode 100644
index 0000000..890bae6
Binary files /dev/null and b/admin/images/edit-mini.png differ
diff --git a/admin/images/help.png b/admin/images/help.png
new file mode 100644
index 0000000..57c87c2
Binary files /dev/null and b/admin/images/help.png differ
diff --git a/admin/images/junk.png b/admin/images/junk.png
new file mode 100644
index 0000000..7f4b667
Binary files /dev/null and b/admin/images/junk.png differ
diff --git a/admin/images/locker.png b/admin/images/locker.png
new file mode 100644
index 0000000..cec3260
Binary files /dev/null and b/admin/images/locker.png differ
diff --git a/admin/images/media/audio.png b/admin/images/media/audio.png
new file mode 100644
index 0000000..fec7e22
Binary files /dev/null and b/admin/images/media/audio.png differ
diff --git a/admin/images/media/blank.png b/admin/images/media/blank.png
new file mode 100644
index 0000000..0f0c2b9
Binary files /dev/null and b/admin/images/media/blank.png differ
diff --git a/admin/images/media/document.png b/admin/images/media/document.png
new file mode 100644
index 0000000..5af28a8
Binary files /dev/null and b/admin/images/media/document.png differ
diff --git a/admin/images/media/executable.png b/admin/images/media/executable.png
new file mode 100644
index 0000000..bb830b8
Binary files /dev/null and b/admin/images/media/executable.png differ
diff --git a/admin/images/media/folder.png b/admin/images/media/folder.png
new file mode 100644
index 0000000..055a9bb
Binary files /dev/null and b/admin/images/media/folder.png differ
diff --git a/admin/images/media/html.png b/admin/images/media/html.png
new file mode 100644
index 0000000..eed6e04
Binary files /dev/null and b/admin/images/media/html.png differ
diff --git a/admin/images/media/image.png b/admin/images/media/image.png
new file mode 100644
index 0000000..811e0ed
Binary files /dev/null and b/admin/images/media/image.png differ
diff --git a/admin/images/media/package.png b/admin/images/media/package.png
new file mode 100644
index 0000000..82f5cdf
Binary files /dev/null and b/admin/images/media/package.png differ
diff --git a/admin/images/media/presentation.png b/admin/images/media/presentation.png
new file mode 100644
index 0000000..282d350
Binary files /dev/null and b/admin/images/media/presentation.png differ
diff --git a/admin/images/media/spreadsheet.png b/admin/images/media/spreadsheet.png
new file mode 100644
index 0000000..8427509
Binary files /dev/null and b/admin/images/media/spreadsheet.png differ
diff --git a/admin/images/media/text.png b/admin/images/media/text.png
new file mode 100644
index 0000000..1e91806
Binary files /dev/null and b/admin/images/media/text.png differ
diff --git a/admin/images/media/video.png b/admin/images/media/video.png
new file mode 100644
index 0000000..a0ed12c
Binary files /dev/null and b/admin/images/media/video.png differ
diff --git a/admin/images/menu/blog-pref-b.png b/admin/images/menu/blog-pref-b.png
new file mode 100644
index 0000000..ad1e18a
Binary files /dev/null and b/admin/images/menu/blog-pref-b.png differ
diff --git a/admin/images/menu/blog-theme-b.png b/admin/images/menu/blog-theme-b.png
new file mode 100644
index 0000000..5284cb8
Binary files /dev/null and b/admin/images/menu/blog-theme-b.png differ
diff --git a/admin/images/menu/blogs.png b/admin/images/menu/blogs.png
new file mode 100644
index 0000000..7cbc1f3
Binary files /dev/null and b/admin/images/menu/blogs.png differ
diff --git a/admin/images/menu/categories.png b/admin/images/menu/categories.png
new file mode 100644
index 0000000..9503b6b
Binary files /dev/null and b/admin/images/menu/categories.png differ
diff --git a/admin/images/menu/comments-b.png b/admin/images/menu/comments-b.png
new file mode 100644
index 0000000..09c9adf
Binary files /dev/null and b/admin/images/menu/comments-b.png differ
diff --git a/admin/images/menu/comments.png b/admin/images/menu/comments.png
new file mode 100644
index 0000000..b2c7568
Binary files /dev/null and b/admin/images/menu/comments.png differ
diff --git a/admin/images/menu/dashboard.png b/admin/images/menu/dashboard.png
new file mode 100644
index 0000000..73e5a9c
Binary files /dev/null and b/admin/images/menu/dashboard.png differ
diff --git a/admin/images/menu/edit-b.png b/admin/images/menu/edit-b.png
new file mode 100644
index 0000000..d0bfbd5
Binary files /dev/null and b/admin/images/menu/edit-b.png differ
diff --git a/admin/images/menu/edit.png b/admin/images/menu/edit.png
new file mode 100644
index 0000000..ca59d5f
Binary files /dev/null and b/admin/images/menu/edit.png differ
diff --git a/admin/images/menu/entries-b.png b/admin/images/menu/entries-b.png
new file mode 100644
index 0000000..35d652a
Binary files /dev/null and b/admin/images/menu/entries-b.png differ
diff --git a/admin/images/menu/entries.png b/admin/images/menu/entries.png
new file mode 100644
index 0000000..304e35f
Binary files /dev/null and b/admin/images/menu/entries.png differ
diff --git a/admin/images/menu/langs.png b/admin/images/menu/langs.png
new file mode 100644
index 0000000..71c4b50
Binary files /dev/null and b/admin/images/menu/langs.png differ
diff --git a/admin/images/menu/media.png b/admin/images/menu/media.png
new file mode 100644
index 0000000..a85894c
Binary files /dev/null and b/admin/images/menu/media.png differ
diff --git a/admin/images/menu/plugins.png b/admin/images/menu/plugins.png
new file mode 100644
index 0000000..21c3dd1
Binary files /dev/null and b/admin/images/menu/plugins.png differ
diff --git a/admin/images/menu/search.png b/admin/images/menu/search.png
new file mode 100644
index 0000000..1ba1941
Binary files /dev/null and b/admin/images/menu/search.png differ
diff --git a/admin/images/menu/update.png b/admin/images/menu/update.png
new file mode 100644
index 0000000..dad1429
Binary files /dev/null and b/admin/images/menu/update.png differ
diff --git a/admin/images/menu/user-pref-b.png b/admin/images/menu/user-pref-b.png
new file mode 100644
index 0000000..ed66544
Binary files /dev/null and b/admin/images/menu/user-pref-b.png differ
diff --git a/admin/images/menu/users.png b/admin/images/menu/users.png
new file mode 100644
index 0000000..c6d9b2c
Binary files /dev/null and b/admin/images/menu/users.png differ
diff --git a/admin/images/menu_off.png b/admin/images/menu_off.png
new file mode 100644
index 0000000..7bb6523
Binary files /dev/null and b/admin/images/menu_off.png differ
diff --git a/admin/images/menu_on.png b/admin/images/menu_on.png
new file mode 100644
index 0000000..9b3ccdf
Binary files /dev/null and b/admin/images/menu_on.png differ
diff --git a/admin/images/minus.png b/admin/images/minus.png
new file mode 100644
index 0000000..5baa0f3
Binary files /dev/null and b/admin/images/minus.png differ
diff --git a/admin/images/noscreenshot.png b/admin/images/noscreenshot.png
new file mode 100644
index 0000000..e9ba66d
Binary files /dev/null and b/admin/images/noscreenshot.png differ
diff --git a/admin/images/picker.png b/admin/images/picker.png
new file mode 100644
index 0000000..d70e6b2
Binary files /dev/null and b/admin/images/picker.png differ
diff --git a/admin/images/plus.png b/admin/images/plus.png
new file mode 100644
index 0000000..77229ad
Binary files /dev/null and b/admin/images/plus.png differ
diff --git a/admin/images/scheduled.png b/admin/images/scheduled.png
new file mode 100644
index 0000000..f6e2e9c
Binary files /dev/null and b/admin/images/scheduled.png differ
diff --git a/admin/images/selected.png b/admin/images/selected.png
new file mode 100644
index 0000000..b25834b
Binary files /dev/null and b/admin/images/selected.png differ
diff --git a/admin/images/trash.png b/admin/images/trash.png
new file mode 100644
index 0000000..3991899
Binary files /dev/null and b/admin/images/trash.png differ
diff --git a/admin/index.php b/admin/index.php
new file mode 100644
index 0000000..2142eb6
--- /dev/null
+++ b/admin/index.php
@@ -0,0 +1,257 @@
+setUserDefaultBlog($core->auth->userID(),$core->blog->id);
+ http::redirect('index.php');
+ } catch (Exception $e) {
+ $core->error->add($e->getMessage());
+ }
+}
+
+dcPage::check('usage,contentadmin');
+
+# Logout
+if (!empty($_GET['logout'])) {
+ $core->session->destroy();
+ if (isset($_COOKIE['dc_admin'])) {
+ unset($_COOKIE['dc_admin']);
+ setcookie('dc_admin',false,-600,'','',DC_ADMIN_SSL);
+ }
+ http::redirect('auth.php');
+ exit;
+}
+
+# Plugin install
+$plugins_install = $core->plugins->installModules();
+
+# Dashboard icons
+$__dashboard_icons = new ArrayObject();
+
+$post_count = $core->blog->getPosts(array(),true)->f(0);
+$str_entries = ($post_count > 1) ? __('%d entries') : __('%d entry');
+
+$comment_count = $core->blog->getComments(array(),true)->f(0);
+$str_comments = ($comment_count > 1) ? __('%d comments') : __('%d comment');
+
+$__dashboard_icons['new_post'] = new ArrayObject(array(__('New entry'),'post.php','images/menu/edit-b.png'));
+$__dashboard_icons['posts'] = new ArrayObject(array(sprintf($str_entries,$post_count),'posts.php','images/menu/entries-b.png'));
+$__dashboard_icons['comments'] = new ArrayObject(array(sprintf($str_comments,$comment_count),'comments.php','images/menu/comments-b.png'));
+$__dashboard_icons['prefs'] = new ArrayObject(array(__('User preferences'),'preferences.php','images/menu/user-pref-b.png'));
+
+if ($core->auth->check('admin',$core->blog->id))
+{
+ $__dashboard_icons['blog_pref'] = new ArrayObject(array(__('Blog settings'),'blog_pref.php','images/menu/blog-pref-b.png'));
+ $__dashboard_icons['blog_theme'] = new ArrayObject(array(__('Blog aspect'),'blog_theme.php','images/menu/blog-theme-b.png'));
+}
+
+$core->callBehavior('adminDashboardIcons', $core, $__dashboard_icons);
+
+
+# Latest news for dashboard
+$__dashboard_items = new ArrayObject(array(new ArrayObject,new ArrayObject));
+
+# Documentation links
+if (!empty($__resources['doc']))
+{
+ $doc_links = ''.__('Documentation').' ';
+
+ foreach ($__resources['doc'] as $k => $v) {
+ $doc_links .= ''.$k.' ';
+ }
+
+ $doc_links .= ' ';
+ $__dashboard_items[0][] = $doc_links;
+}
+
+try
+{
+ if (empty($__resources['rss_news'])) {
+ throw new Exception();
+ }
+
+ $feed_reader = new feedReader;
+ $feed_reader->setCacheDir(DC_TPL_CACHE);
+ $feed_reader->setTimeout(2);
+ $feed_reader->setUserAgent('Dotclear - http://www.dotclear.org/');
+ $feed = $feed_reader->parse($__resources['rss_news']);
+ if ($feed)
+ {
+ $latest_news = ''.__('Latest news').' ';
+ $i = 1;
+ foreach ($feed->items as $item)
+ {
+ $dt = isset($item->link) ? ''.$item->title.' ' : $item->title;
+
+ if ($i < 3) {
+ $latest_news .=
+ ''.$dt.' '.
+ ''.dt::dt2str('%d %B %Y',$item->pubdate,'Europe/Paris').' : '.
+ ''.text::cutString(html::clean($item->content),120).'...
';
+ } else {
+ $latest_news .=
+ ''.$dt.' '.
+ ''.dt::dt2str('%d %B %Y',$item->pubdate,'Europe/Paris').' ';
+ }
+ $i++;
+ if ($i > 7) { break; }
+ }
+ $latest_news .= ' ';
+ $__dashboard_items[1][] = $latest_news;
+ }
+}
+catch (Exception $e) {}
+
+$core->callBehavior('adminDashboardItems', $core, $__dashboard_items);
+
+/* DISPLAY
+-------------------------------------------------------- */
+dcPage::open(__('Dashboard'),
+ dcPage::jsToolBar().
+ dcPage::jsLoad('js/_index.js').
+ # --BEHAVIOR-- adminDashboardHeaders
+ $core->callBehavior('adminDashboardHeaders')
+);
+
+echo ''.html::escapeHTML($core->blog->name).' › '.__('Dashboard');
+
+if ($core->auth->getInfo('user_default_blog') != $core->blog->id && $core->auth->blog_count > 1) {
+ echo
+ ' - '.__('Make this blog my default blog').' ';
+}
+
+echo ' ';
+
+if ($core->blog->status == 0) {
+ echo ''.__('This blog is offline').'
';
+} elseif ($core->blog->status == -1) {
+ echo ''.__('This blog is removed').'
';
+}
+
+if (!DC_ADMIN_URL) {
+ echo
+ ''.
+ __('DC_ADMIN_URL is not defined, you should edit your configuration file.').
+ '
';
+}
+
+# Plugins install messages
+if (!empty($plugins_install['success']))
+{
+ echo ''.__('Following plugins have been installed:').'
';
+ foreach ($plugins_install['success'] as $k => $v) {
+ echo ''.$k.' ';
+ }
+ echo ' ';
+}
+if (!empty($plugins_install['failure']))
+{
+ echo ''.__('Following plugins have not been installed:').'
';
+ foreach ($plugins_install['failure'] as $k => $v) {
+ echo ''.$k.' ('.$v.') ';
+ }
+ echo ' ';
+}
+
+# Dashboard icons
+echo '';
+foreach ($__dashboard_icons as $i)
+{
+ echo
+ '
'.
+ ''.$i[0].'
';
+}
+echo '
';
+
+if ($core->auth->check('usage,contentadmin',$core->blog->id))
+{
+ $categories_combo = array(' ' => '');
+ try {
+ $categories = $core->blog->getCategories(array('post_type'=>'post'));
+ while ($categories->fetch()) {
+ $categories_combo[] = new formSelectOption(
+ str_repeat(' ',$categories->level-1).'• '.html::escapeHTML($categories->cat_title),
+ $categories->cat_id
+ );
+ }
+ } catch (Exception $e) { }
+
+ echo
+ '
'.
+ '
'.__('Quick entry').' '.
+ '
'.
+ '
';
+}
+
+echo '
';
+
+# Dashboard columns
+echo '';
+
+# Dotclear updates notifications
+if ($core->auth->isSuperAdmin() && is_readable(DC_DIGESTS))
+{
+ $updater = new dcUpdate(DC_UPDATE_URL,'dotclear',DC_UPDATE_VERSION,DC_TPL_CACHE.'/versions');
+ $new_v = $updater->check(DC_VERSION);
+
+ if ($updater->getNotify() && $new_v) {
+ echo
+ '
'.sprintf(__('Dotclear %s is available!'),$new_v).'
'.
+ '
';
+ }
+}
+
+foreach ($__dashboard_items as $i)
+{
+ echo '
';
+ foreach ($i as $v) {
+ echo $v;
+ }
+ echo '
';
+}
+echo '
';
+
+dcPage::close();
+?>
\ No newline at end of file
diff --git a/admin/install/check.php b/admin/install/check.php
new file mode 100644
index 0000000..16edaff
--- /dev/null
+++ b/admin/install/check.php
@@ -0,0 +1,83 @@
+driver() == 'mysql')
+ {
+ if (version_compare($con->version(),'4.1','<'))
+ {
+ $err[] = sprintf(__('MySQL version is %s (4.1 or earlier needed).'),$con->version());
+ }
+ else
+ {
+ $rs = $con->select('SHOW ENGINES');
+ $innodb = false;
+ while ($rs->fetch()) {
+ if (strtolower($rs->f(0)) == 'innodb' && strtolower($rs->f(1)) != 'disabled' && strtolower($rs->f(1)) != 'no') {
+ $innodb = true;
+ break;
+ }
+ }
+
+ if (!$innodb) {
+ $err[] = __('MySQL InnoDB engine is not available.');
+ }
+ }
+ }
+ elseif ($con->driver() == 'pgsql')
+ {
+ if (version_compare($con->version(),'8.0','<'))
+ {
+ $err[] = sprintf(__('PostgreSQL version is %s (8.0 or earlier needed).'),$con->version());
+ }
+ }
+
+ return count($err) == 0;
+}
+?>
\ No newline at end of file
diff --git a/admin/install/index.php b/admin/install/index.php
new file mode 100644
index 0000000..091a21b
--- /dev/null
+++ b/admin/install/index.php
@@ -0,0 +1,313 @@
+wizard.','wizard.php');
+ $code = 0;
+ include dirname(__FILE__).'/../../inc/core_error.php';
+ exit;
+}
+
+require dirname(__FILE__).'/../../inc/prepend.php';
+require dirname(__FILE__).'/check.php';
+
+$can_install = true;
+$err = '';
+
+# Loading locales for detected language
+$dlang = http::getAcceptLanguage();
+if ($dlang != 'en')
+{
+ l10n::init();
+ l10n::set(dirname(__FILE__).'/../../locales/'.$dlang.'/main');
+}
+
+if (!defined('DC_MASTER_KEY') || DC_MASTER_KEY == '') {
+ $can_install = false;
+ $err = ''.__('Please set a master key (DC_MASTER_KEY) in configuration file.').'
';
+}
+
+# Check if dotclear is already installed
+$schema = dbSchema::init($core->con);
+if (in_array($core->prefix.'post',$schema->getTables())) {
+ $can_install = false;
+ $err = ''.__('Dotclear is already installed.').'
';
+}
+
+# Check system capabilites
+if (!dcSystemCheck($core->con,$_e)) {
+ $can_install = false;
+ $err = ''.__('Dotclear cannot be installed.').'
';
+}
+
+# Get information and perform install
+$u_email = $u_firstname = $u_name = $u_login = $u_pwd = '';
+$mail_sent = false;
+if ($can_install && !empty($_POST))
+{
+ $u_email = !empty($_POST['u_email']) ? $_POST['u_email'] : null;
+ $u_firstname = !empty($_POST['u_firstname']) ? $_POST['u_firstname'] : null;
+ $u_name = !empty($_POST['u_name']) ? $_POST['u_name'] : null;
+ $u_login = !empty($_POST['u_login']) ? $_POST['u_login'] : null;
+ $u_pwd = !empty($_POST['u_pwd']) ? $_POST['u_pwd'] : null;
+ $u_pwd2 = !empty($_POST['u_pwd2']) ? $_POST['u_pwd2'] : null;
+
+ try
+ {
+ # Check user information
+ if (empty($u_login)) {
+ throw new Exception(__('No user ID given'));
+ }
+ if (!preg_match('/^[A-Za-z0-9@._-]{2,}$/',$u_login)) {
+ throw new Exception(__('User ID must contain at least 2 characters using letters, numbers or symbols.'));
+ }
+ if ($u_email && !text::isEmail($u_email)) {
+ throw new Exception(__('Invalid email address'));
+ }
+
+ if (empty($u_pwd)) {
+ throw new Exception(__('No password given'));
+ }
+ if ($u_pwd != $u_pwd2) {
+ throw new Exception(__("Passwords don't match"));
+ }
+ if (strlen($u_pwd) < 6) {
+ throw new Exception(__('Password must contain at least 6 characters.'));
+ }
+
+ # Try to guess timezone
+ $default_tz = 'Europe/London';
+ if (!empty($_POST['u_date']) && function_exists('timezone_open'))
+ {
+ if (preg_match('/\((.+)\)$/',$_POST['u_date'],$_tz)) {
+ $_tz = $_tz[1];
+ $_tz = @timezone_open($_tz);
+ if ($_tz instanceof DateTimeZone) {
+ $_tz = @timezone_name_get($_tz);
+ if ($_tz) {
+ $default_tz = $_tz;
+ }
+ }
+ unset($_tz);
+ }
+ }
+
+ # Create schema
+ $_s = new dbStruct($core->con,$core->prefix);
+ require dirname(__FILE__).'/../../inc/dbschema/db-schema.php';
+
+ $si = new dbStruct($core->con,$core->prefix);
+ $changes = $si->synchronize($_s);
+
+ # Create user
+ $cur = $core->con->openCursor($core->prefix.'user');
+ $cur->user_id = $u_login;
+ $cur->user_super = 1;
+ $cur->user_pwd = crypt::hmac(DC_MASTER_KEY,$u_pwd);
+ $cur->user_name = (string) $u_name;
+ $cur->user_firstname = (string) $u_firstname;
+ $cur->user_email = (string) $u_email;
+ $cur->user_lang = $dlang;
+ $cur->user_tz = $default_tz;
+ $cur->user_creadt = array('NOW()');
+ $cur->user_upddt = array('NOW()');
+ $cur->user_options = serialize($core->userDefaults());
+ $cur->insert();
+
+ $core->auth->checkUser($u_login);
+
+ $admin_url = preg_replace('%install/index.php$%','',$_SERVER['REQUEST_URI']);
+ $root_url = preg_replace('%/admin/install/index.php$%','',$_SERVER['REQUEST_URI']);
+
+ # Create blog
+ $cur = $core->con->openCursor($core->prefix.'blog');
+ $cur->blog_id = 'default';
+ $cur->blog_url = http::getHost().$root_url.'/index.php?';
+ $cur->blog_name = __('My first blog');
+ $core->addBlog($cur);
+ $core->blogDefaults($cur->blog_id);
+
+ $blog_settings = new dcSettings($core,'default');
+ $blog_settings->setNameSpace('system');
+ $blog_settings->put('blog_timezone',$default_tz);
+ $blog_settings->put('lang',$dlang);
+ $blog_settings->put('public_url',$root_url.'/public');
+ $blog_settings->put('themes_url',$root_url.'/themes');
+
+ # Add Dotclear version
+ $cur = $core->con->openCursor($core->prefix.'version');
+ $cur->module = 'core';
+ $cur->version = (string) DC_VERSION;
+ $cur->insert();
+
+ # Create first post
+ $core->setBlog('default');
+
+ $cur = $core->con->openCursor($core->prefix.'post');
+ $cur->user_id = $u_login;
+ $cur->post_format = 'xhtml';
+ $cur->post_lang = $dlang;
+ $cur->post_title = __('Welcome to Dotclear!');
+ $cur->post_content = ''.__('This is your first entry. When you\'re ready '.
+ 'to blog, log in to edit or delete it.').'
';
+ $cur->post_content_xhtml = $cur->post_content;
+ $cur->post_status = 1;
+ $cur->post_open_comment = 1;
+ $cur->post_open_tb = 0;
+ $post_id = $core->blog->addPost($cur);
+
+ # Add a comment to it
+ $cur = $core->con->openCursor($core->prefix.'comment');
+ $cur->post_id = $post_id;
+ $cur->comment_tz = $default_tz;
+ $cur->comment_author = __('Dotclear Team');
+ $cur->comment_email = 'contact@dotclear.net';
+ $cur->comment_site = 'http://www.dotclear.org/';
+ $cur->comment_content = __("This is a comment.
\nTo delete it, log in and ".
+ "view your blog's comments. Then you might remove or edit it.
");
+ $core->blog->addComment($cur);
+
+ $step = 1;
+ }
+ catch (Exception $e)
+ {
+ $err = $e->getMessage();
+ }
+}
+
+if (!isset($step)) {
+ $step = 0;
+}
+header('Content-Type: text/html; charset=UTF-8');
+?>
+
+
+
+
+
+
+
+
+
+
+ Dotclear Install
+
+
+
+
+
+
+
+
+'.__('Dotclear installation').'';
+
+if (!is_writable(DC_TPL_CACHE)) {
+ echo '
'.sprintf(__('Cache directory %s is not writable.'),DC_TPL_CACHE).'
';
+}
+
+if (!empty($err)) {
+ echo '
'.__('Errors:').'
'.$err.'
';
+}
+
+if (!empty($_GET['wiz'])) {
+ echo '
'.__('Configuration file has been successfully created.').'
';
+}
+
+if ($can_install && $step == 0)
+{
+ echo
+ '
'.__('User information').' '.
+
+ '
'.__('Please provide the following information needed to create the first user.').'
'.
+
+ '
';
+}
+elseif ($can_install && $step == 1)
+{
+ echo
+ '
'.__('All done!').' '.
+
+ '
'.__('Dotclear has been successfully installed. Here is some useful information you should keep.').'
'.
+
+ '
'.__('Your account').' '.
+ '
'.
+ ''.__('Username:').' '.html::escapeHTML($u_login).' '.
+ ''.__('Password:').' '.html::escapeHTML($u_pwd).' '.
+ ' '.
+
+ '
'.__('Your blog').' '.
+ '
'.
+ ''.__('Blog address:').' '.html::escapeHTML(http::getHost().$root_url).'/index.php? '.
+ ''.__('Administration interface:').' '.html::escapeHTML(http::getHost().$admin_url).' '.
+ ' '.
+
+ '
';
+}
+?>
+
+
+
\ No newline at end of file
diff --git a/admin/install/wizard.php b/admin/install/wizard.php
new file mode 100644
index 0000000..73ab1d5
--- /dev/null
+++ b/admin/install/wizard.php
@@ -0,0 +1,182 @@
+%s already exists. If you need to reset any of the configuration items in this file, please delete it first or you may continue to install .'),
+ basename(DC_RC_PATH),'index.php'));
+}
+
+$DBDRIVER = !empty($_POST['DBDRIVER']) ? $_POST['DBDRIVER'] : 'mysql';
+$DBHOST = !empty($_POST['DBHOST']) ? $_POST['DBHOST'] : '';
+$DBNAME = !empty($_POST['DBNAME']) ? $_POST['DBNAME'] : '';
+$DBUSER = !empty($_POST['DBUSER']) ? $_POST['DBUSER'] : '';
+$DBPASSWORD = !empty($_POST['DBPASSWORD']) ? $_POST['DBPASSWORD'] : '';
+$DBPREFIX = !empty($_POST['DBPREFIX']) ? $_POST['DBPREFIX'] : 'dc_';
+
+if (!empty($_POST))
+{
+ try
+ {
+ # Tries to connect to database
+ try {
+ $con = dbLayer::init($DBDRIVER,$DBHOST,$DBNAME,$DBUSER,$DBPASSWORD);
+ } catch (Exception $e) {
+ throw new Exception('' . __($e->getMessage()) . '
');
+ }
+
+ # Checks system capabilites
+ require dirname(__FILE__).'/check.php';
+ if (!dcSystemCheck($con,$_e)) {
+ $can_install = false;
+ throw new Exception(''.__('Dotclear cannot be installed.').'
');
+ }
+
+ # Check if dotclear is already installed
+ $schema = dbSchema::init($con);
+ if (in_array($DBPREFIX.'version',$schema->getTables())) {
+ throw new Exception(__('Dotclear is already installed.'));
+ }
+
+ # Does config.php.in exist?
+ $config_in = dirname(__FILE__).'/../../inc/config.php.in';
+ if (!is_file($config_in)) {
+ throw new Exception(sprintf(__('File %s does not exist.'),$config_in));
+ }
+
+ # Can we write config.php
+ if (!is_writable(dirname(DC_RC_PATH))) {
+ throw new Exception(sprintf(__('Cannot write %s file.'),DC_RC_PATH));
+ }
+
+ # Creates config.php file
+ $full_conf = file_get_contents($config_in);
+
+ writeConfigValue('DC_DBDRIVER',$DBDRIVER,$full_conf);
+ writeConfigValue('DC_DBHOST',$DBHOST,$full_conf);
+ writeConfigValue('DC_DBUSER',$DBUSER,$full_conf);
+ writeConfigValue('DC_DBPASSWORD',$DBPASSWORD,$full_conf);
+ writeConfigValue('DC_DBNAME',$DBNAME,$full_conf);
+ writeConfigValue('DC_DBPREFIX',$DBPREFIX,$full_conf);
+
+ $admin_url = preg_replace('%install/wizard.php$%','',$_SERVER['REQUEST_URI']);
+ writeConfigValue('DC_ADMIN_URL',http::getHost().$admin_url,$full_conf);
+ writeConfigValue('DC_MASTER_KEY',md5(uniqid()),$full_conf);
+
+ $fp = @fopen(DC_RC_PATH,'wb');
+ if ($fp === false) {
+ throw new Exception(sprintf(__('Cannot write %s file.'),DC_RC_PATH));
+ }
+ fwrite($fp,$full_conf);
+ fclose($fp);
+ chmod(DC_RC_PATH, 0666);
+
+ $con->close();
+ http::redirect('index.php?wiz=1');
+ }
+ catch (Exception $e)
+ {
+ $err = $e->getMessage();
+ }
+}
+
+function writeConfigValue($name,$val,&$str)
+{
+ $val = str_replace("'","\'",$val);
+ $str = preg_replace('/(\''.$name.'\')(.*?)$/ms','$1,\''.$val.'\');',$str);
+}
+
+header('Content-Type: text/html; charset=UTF-8');
+?>
+
+
+
+
+
+
+
+
+
+
+ Dotclear Install Wizard
+
+
+
+
+
+
+'.__('Dotclear installation wizard').'';
+
+if (!empty($err)) {
+ echo '
'.__('Errors:').'
'.$err.'
';
+}
+
+echo
+'
'.__('System information').' '.
+
+'
'.__('Please provide the following information needed to create your configuration file.').'
'.
+
+'
';
+?>
+
+
+
\ No newline at end of file
diff --git a/admin/js/_blog_theme.js b/admin/js/_blog_theme.js
new file mode 100644
index 0000000..325a193
--- /dev/null
+++ b/admin/js/_blog_theme.js
@@ -0,0 +1,6 @@
+
+$(function(){$('#themes-actions').hide();var submit_s=$('#themes-actions input[name=select]');var submit_r=$('#themes-actions input[name=remove]');var details=$('#themes div.theme-details');$('div.theme-actions',details).hide();$('input:radio',details).hide();$('div.theme-info span, div.theme-info a',details).hide();details.removeClass('theme-details').addClass('theme-details-js');var themes_wrapper=$('
');var theme_box=$('');$('#themes').wrap(themes_wrapper).before(theme_box);details.each(function(){var box=this;var a=$(document.createElement('a'));a.attr('href','#');a.attr('title',$('>div h3>label',this).text());$(box).wrap(a);$(box).parent().click(function(event){update_box(box);event.preventDefault();return false;});});function update_box(e){theme_box.empty();var img=$('div.theme-shot',e).clone();var info=$('div.theme-info',e).clone();if($(e).hasClass('current-theme')){var actions=$('div.theme-actions',e).clone();actions.show();}else{var actions=$('
');if(submit_s.length>0&&!$('input:radio',info).attr('disabled')){var select=$('
'+dotclear.msg.use_this_theme+' ');select.css('font-weight','bold').click(function(){submit_s.click();return false;});actions.append(select).append(' ');}
+if(submit_r.length>0&&$('input:radio',info).attr('id')!='theme_default'){var remove=$('
'+dotclear.msg.remove_this_theme+' ');remove.click(function(){var t_name=$(this).parents('#theme-box').find('div.theme-info h3:first').text();t_name=$.trim(t_name);if(window.confirm(dotclear.msg.confirm_delete_theme.replace('%s',t_name))){submit_r.click();}
+return false;});actions.append(remove);}}
+$('input:radio',info).remove();$('span, a',info).show();theme_box.append(img).append(info).append(actions);details.removeClass('theme-selected');$(e).addClass('theme-selected');$('input:radio',e).attr('checked','checked');}
+update_box(details[0]);});
\ No newline at end of file
diff --git a/admin/js/_categories.js b/admin/js/_categories.js
new file mode 100644
index 0000000..8e6929e
--- /dev/null
+++ b/admin/js/_categories.js
@@ -0,0 +1,2 @@
+
+$(function(){$('form#delete-category').submit(function(){var c_id=$('#del_cat').val();var c_name=$('#del_cat option[value='+c_id+']').text();return window.confirm(dotclear.msg.confirm_delete_category.replace('%s',c_name));});});$(function(){$('form#reset-order').submit(function(){return window.confirm(dotclear.msg.confirm_reorder_categories);});});
\ No newline at end of file
diff --git a/admin/js/_category.js b/admin/js/_category.js
new file mode 100644
index 0000000..496a4c4
--- /dev/null
+++ b/admin/js/_category.js
@@ -0,0 +1,2 @@
+
+$(function(){dotclear.hideLockable();var tbCategory=new jsToolBar(document.getElementById('cat_desc'));tbCategory.draw('xhtml');});
\ No newline at end of file
diff --git a/admin/js/_comment.js b/admin/js/_comment.js
new file mode 100644
index 0000000..a46fa52
--- /dev/null
+++ b/admin/js/_comment.js
@@ -0,0 +1,3 @@
+
+$(function(){if(!document.getElementById){return;}
+var tbComment=new jsToolBar(document.getElementById('comment_content'));tbComment.draw('xhtml');$('#comment-form input[name="delete"]').click(function(){return window.confirm(dotclear.msg.confirm_delete_comment);});});
\ No newline at end of file
diff --git a/admin/js/_comments.js b/admin/js/_comments.js
new file mode 100644
index 0000000..01b7483
--- /dev/null
+++ b/admin/js/_comments.js
@@ -0,0 +1,6 @@
+
+dotclear.commentExpander=function(line){var td=line.firstChild;var img=document.createElement('img');img.src=dotclear.img_plus_src;img.alt=dotclear.img_plus_alt;img.className='expand';$(img).css('cursor','pointer');img.line=line;img.onclick=function(){dotclear.viewCommentContent(this,this.line);};td.insertBefore(img,td.firstChild);};dotclear.viewCommentContent=function(img,line){var commentId=line.id.substr(1);var tr=document.getElementById('ce'+commentId);if(!tr){tr=document.createElement('tr');tr.id='ce'+commentId;var td=document.createElement('td');td.colSpan=6;td.className='expand';tr.appendChild(td);img.src=dotclear.img_minus_src;img.alt=dotclear.img_minus_alt;$.get('services.php',{f:'getCommentById',id:commentId},function(data){var rsp=$(data).children('rsp')[0];if(rsp.attributes[0].value=='ok'){var comment=$(rsp).find('comment_display_content').text();if(comment){$(td).append(comment);var comment_email=$(rsp).find('comment_email').text();var comment_site=$(rsp).find('comment_site').text();var comment_ip=$(rsp).find('comment_ip').text();var comment_spam_disp=$(rsp).find('comment_spam_disp').text();$(td).append('
'+dotclear.msg.website+' '+comment_site+' '+''+dotclear.msg.email+' '+comment_email+' '+''+dotclear.msg.ip_address+' '+comment_ip+' '+' '+comment_spam_disp+'
');}}else{alert($(rsp).find('message').text());}});$(line).toggleClass('expand');line.parentNode.insertBefore(tr,line.nextSibling);}
+else if(tr.style.display=='none')
+{$(tr).toggle();$(line).toggleClass('expand');img.src=dotclear.img_minus_src;img.alt=dotclear.img_minus_alt;}
+else
+{$(tr).toggle();$(line).toggleClass('expand');img.src=dotclear.img_plus_src;img.alt=dotclear.img_plus_alt;}};$(function(){$('#form-comments tr.line').each(function(){dotclear.commentExpander(this);});$('.checkboxes-helpers').each(function(){dotclear.checkboxesHelpers(this);});dotclear.commentsActionsHelper();});
\ No newline at end of file
diff --git a/admin/js/_index.js b/admin/js/_index.js
new file mode 100644
index 0000000..405c4d1
--- /dev/null
+++ b/admin/js/_index.js
@@ -0,0 +1,9 @@
+
+$(function(){var f=$('#quick-entry');if(f.length>0){var contentTb=new jsToolBar($('#post_content',f)[0]);contentTb.switchMode($('#post_format',f).val());$('input[name=save]',f).click(function(){quickPost(f,-2);return false;});if($('input[name=save-publish]',f).length>0){var btn=$('
');$('input[name=save-publish]',f).remove();$('input[name=save]',f).after(btn).after(' ');btn.click(function(){quickPost(f,1);return false;});}
+function quickPost(f,status){if(contentTb.getMode()=='wysiwyg'){contentTb.syncContents('iframe');}
+var params={f:'quickPost',xd_check:dotclear.nonce,post_title:$('#post_title',f).val(),post_content:$('#post_content',f).val(),cat_id:$('#cat_id',f).val(),post_status:status,post_format:$('#post_format',f).val(),post_lang:$('#post_lang',f).val()}
+$('p.qinfo',f).remove();$.post('services.php',params,function(data){if($('rsp[status=failed]',data).length>0){var msg='
'+dotclear.msg.error+' '+$('rsp',data).text()+'
';}else{var msg='
'+dotclear.msg.entry_created+' - '+
+dotclear.msg.edit_entry+' ';if($('rsp>post',data).attr('post_status')==1){msg+=' - '+
+dotclear.msg.view_entry+' ';}
+msg+='
';$('#post_title',f).val('');$('#post_content',f).val('');if(contentTb.getMode()=='wysiwyg'){contentTb.syncContents('textarea');}}
+$('fieldset',f).prepend(msg);});}}});
\ No newline at end of file
diff --git a/admin/js/_langs.js b/admin/js/_langs.js
new file mode 100644
index 0000000..8824cff
--- /dev/null
+++ b/admin/js/_langs.js
@@ -0,0 +1,2 @@
+
+$(function(){$('table.plugins form input[type=submit][name=delete]').click(function(){var l_name=$(this).parents('tr.line').find('td:first').text();return window.confirm(dotclear.msg.confirm_delete_lang.replace('%s',l_name));});});
\ No newline at end of file
diff --git a/admin/js/_media.js b/admin/js/_media.js
new file mode 100644
index 0000000..01e486d
--- /dev/null
+++ b/admin/js/_media.js
@@ -0,0 +1,7 @@
+
+$(function(){fileRemoveAct();function fileRemoveAct(){$('a.media-remove').click(function(){var m_name=$(this).parents('ul').find('li:first>a').text();if(window.confirm(dotclear.msg.confirm_delete_media.replace('%s',m_name))){var f=$('#media-remove-hide').get(0);f.elements['remove'].value=this.href.replace(/^(.*)&remove=(.*?)(&|$)/,'$2');this.href='';f.submit();}
+return false;});}
+if(!$.browser.opera){var upldr=$('
'+dotclear.msg.activate_enhanced_uploader+' ').click(function(){candyUploadInit();return false;});$('#media-upload>fieldset').append($('
').append(upldr));if($.cookie('dc_candy_upl')==1){candyUploadInit();}}
+function candyUploadInit()
+{var candy_upload_success=false;var candy_upload_form_url=$('#media-upload').attr('action')+'&file_sort=date-desc&d='+$('#media-upload input[name=d]').val();var candy_upload_limit=$('#media-upload input[name=MAX_FILE_SIZE]').val();$('#media-upload').candyUpload({upload_url:dotclear.candyUpload.base_url+'/media.php',flash_movie:dotclear.candyUpload.movie_url,file_size_limit:candy_upload_limit+'b',params:'swfupload=1&'+dotclear.candyUpload.params,callbacks:{createControls:function(){var _this=this;var l=$('
'+dotclear.msg.disable_enhanced_uploader+' ').click(function(){_this.upldr.destroy();_this.ctrl.block.empty().remove();$('#media-upload').show();delete _this;$.cookie('dc_candy_upl','',{expires:-1});return false;});this.ctrl.disable=$('
').append(l).appendTo(this.ctrl.block);},flashReady:function(){this.ctrl.btn_browse.addClass('button');this.ctrl.block.append(this.ctrl.disable);},uploadSuccess:function(o,data){if(data=='ok'){candy_upload_success=true;this.fileMsg(o.id,this.locales.file_uploaded);}else{this.fileErrorMsg(o.id,data);}
+if(candy_upload_success&&$('div.cu-file:has(span.cu-filecancel a)',this.ctrl.files).length==0){$.cookie('dc_candy_upl','1',{expires:30});$.get(candy_upload_form_url,function(data){var media=$('div.media-list');media.after($('div.media-list',data)).remove();fileRemoveAct();});}}}});}});
\ No newline at end of file
diff --git a/admin/js/_media_item.js b/admin/js/_media_item.js
new file mode 100644
index 0000000..c9a2eeb
--- /dev/null
+++ b/admin/js/_media_item.js
@@ -0,0 +1,4 @@
+
+$(function(){$('#media-details-tab').onetabload(function(){var media_dt=document.getElementById('media_dt');if(media_dt==undefined){return;}
+var post_dtPick=new datePicker(media_dt);post_dtPick.img_top='1.5em';post_dtPick.draw();});$('#file-unzip').each(function(){var a=document.createElement('a');var mediaId=$(this).find('input[name=id]').val();var self=$(this);a.href='#';$(a).text(dotclear.msg.zip_file_content);self.before(a);$(a).wrap('
');$(a).click(function(){$.get('services.php',{f:'getZipMediaContent',id:mediaId},function(data){var rsp=$(data).children('rsp')[0];if(rsp.attributes[0].value=='ok'){var div=document.createElement('div');var list=document.createElement('ul');var expanded=false;$(div).css({overflow:'auto',border:'1px solid #ccc',margin:'1em 0',padding:'1px 0.5em'});$(div).append(list);self.before(div);$(a).hide();$(div).before('
'+dotclear.msg.zip_file_content+' ');$(rsp).find('file').each(function(){$(list).append('
'+$(this).text()+' ');if($(div).height()>200&&!expanded){$(div).css({height:'200px'});expanded=true;}});}else{alert($(rsp).find('message').text());}});return false;});});$('#file-unzip').submit(function(){if($(this).find('#inflate_mode').val()=='current'){return window.confirm(dotclear.msg.confirm_extract_current);}
+return true;});});
\ No newline at end of file
diff --git a/admin/js/_permissions.js b/admin/js/_permissions.js
new file mode 100644
index 0000000..1547911
--- /dev/null
+++ b/admin/js/_permissions.js
@@ -0,0 +1,6 @@
+
+jQuery.fn.updatePermissionsForm=function(){return this.each(function(){var perms={};var re=/^perm\[(.+?)\]\[(.+?)\]$/;var e,prop;for(var i=0;i
'+dotclear.msg.website+' '+comment_site+' '+''+dotclear.msg.email+' '+
+comment_email+' '+comment_spam_disp+'');}}else{alert($(rsp).find('message').text());}});$(line).toggleClass('expand');line.parentNode.insertBefore(tr,line.nextSibling);}
+else if(tr.style.display=='none')
+{$(tr).toggle();$(line).toggleClass('expand');img.src=dotclear.img_minus_src;img.alt=dotclear.img_minus_alt;}
+else
+{$(tr).toggle();$(line).toggleClass('expand');img.src=dotclear.img_plus_src;img.alt=dotclear.img_plus_alt;}};$(function(){if(!document.getElementById){return;}
+if(document.getElementById('edit-entry'))
+{var formatField=$('#post_format').get(0);$(formatField).change(function(){excerptTb.switchMode(this.value);contentTb.switchMode(this.value);});var excerptTb=new jsToolBar(document.getElementById('post_excerpt'));var contentTb=new jsToolBar(document.getElementById('post_content'));excerptTb.context=contentTb.context='post';}
+if(document.getElementById('comment_content')){var commentTb=new jsToolBar(document.getElementById('comment_content'));}
+$('#post-preview').modalWeb($(window).width()-40,$(window).height()-40);$('#edit-entry').onetabload(function(){dotclear.hideLockable();var post_dtPick=new datePicker($('#post_dt').get(0));post_dtPick.img_top='1.5em';post_dtPick.draw();$('input[name="delete"]').click(function(){return window.confirm(dotclear.msg.confirm_delete_post);});$('#notes-area label').toggleWithLegend($('#notes-area').children().not('label'),{cookie:'dcx_post_notes',hide:$('#post_notes').val()==''});$('#post_lang').parent().toggleWithLegend($('#post_lang'),{cookie:'dcx_post_lang'});$('#post_password').parent().toggleWithLegend($('#post_password'),{cookie:'dcx_post_password',hide:$('#post_password').val()==''});$('#excerpt-area label').toggleWithLegend($('#excerpt-area').children().not('label'),{fn:function(){excerptTb.switchMode(formatField.value);},cookie:'dcx_post_excerpt',hide:$('#post_excerpt').val()==''});contentTb.switchMode(formatField.value);$('a.attachment-remove').click(function(){this.href='';var m_name=$(this).parents('ul').find('li:first>a').attr('title');if(window.confirm(dotclear.msg.confirm_remove_attachment.replace('%s',m_name))){var f=$('#attachment-remove-hide').get(0);f.elements['media_id'].value=this.id.substring(11);f.submit();}
+return false;});var h=document.createElement('h4');var a=document.createElement('a');a.href='#';$(a).click(function(){var params={xd_check:dotclear.nonce,f:'validatePostMarkup',excerpt:$('#post_excerpt').text(),content:$('#post_content').text(),format:$('#post_format').get(0).value,lang:$('#post_lang').get(0).value};$.post('services.php',params,function(data){if($(data).find('rsp').attr('status')!='ok'){alert($(data).find('rsp message').text());return false;}
+if($(data).find('valid').text()==1){var p=document.createElement('p');p.id='markup-validator';if($('#markup-validator').length>0){$('#markup-validator').remove();}
+$(p).addClass('message');$(p).text(dotclear.msg.xhtml_valid);$(p).insertAfter(h);$(p).backgroundFade({sColor:'#666666',eColor:'#ffcc00',steps:50},function(){$(this).backgroundFade({sColor:'#ffcc00',eColor:'#666666'});});}else{var div=document.createElement('div');div.id='markup-validator';if($('#markup-validator').length>0){$('#markup-validator').remove();}
+$(div).addClass('error');$(div).html(''+dotclear.msg.xhtml_not_valid+'
'+$(data).find('errors').text());$(div).insertAfter(h);$(div).backgroundFade({sColor:'#ffffff',eColor:'#ff9999',steps:50},function(){$(this).backgroundFade({sColor:'#ff9999',eColor:'#ffffff'});});}
+return false;});return false;});a.appendChild(document.createTextNode(dotclear.msg.xhtml_validator));h.appendChild(a);$(h).appendTo('#entry-content');});$('#comments').onetabload(function(){$('.comments-list tr.line').each(function(){dotclear.commentExpander(this);});$('.checkboxes-helpers').each(function(){dotclear.checkboxesHelpers(this);});dotclear.commentsActionsHelper();});$('#add-comment').onetabload(function(){commentTb.draw('xhtml');});});
\ No newline at end of file
diff --git a/admin/js/_posts_list.js b/admin/js/_posts_list.js
new file mode 100644
index 0000000..f4ca648
--- /dev/null
+++ b/admin/js/_posts_list.js
@@ -0,0 +1,7 @@
+
+dotclear.postExpander=function(line){var td=line.firstChild;var img=document.createElement('img');img.src=dotclear.img_plus_src;img.alt=dotclear.img_plus_alt;img.className='expand';$(img).css('cursor','pointer');img.line=line;img.onclick=function(){dotclear.viewPostContent(this,this.line);};td.insertBefore(img,td.firstChild);};dotclear.viewPostContent=function(img,line){var postId=line.id.substr(1);var tr=document.getElementById('pe'+postId);if(!tr){tr=document.createElement('tr');tr.id='pe'+postId;var td=document.createElement('td');td.colSpan=8;td.className='expand';tr.appendChild(td);img.src=dotclear.img_minus_src;img.alt=dotclear.img_minus_alt;$.get('services.php',{f:'getPostById',id:postId,post_type:''},function(data){var rsp=$(data).children('rsp')[0];if(rsp.attributes[0].value=='ok'){var post=$(rsp).find('post_display_content').text();var post_excerpt=$(rsp).find('post_display_excerpt').text();var res='';if(post){if(post_excerpt){res+=post_excerpt+' ';}
+res+=post;$(td).append(res);}}else{alert($(rsp).find('message').text());}});$(line).toggleClass('expand');line.parentNode.insertBefore(tr,line.nextSibling);}
+else if(tr.style.display=='none')
+{$(tr).toggle();$(line).toggleClass('expand');img.src=dotclear.img_minus_src;img.alt=dotclear.img_minus_alt;}
+else
+{$(tr).toggle();$(line).toggleClass('expand');img.src=dotclear.img_plus_src;img.alt=dotclear.img_plus_alt;}};$(function(){$('#form-entries tr.line').each(function(){dotclear.postExpander(this);});$('.checkboxes-helpers').each(function(){dotclear.checkboxesHelpers(this);});dotclear.postsActionsHelper();});
\ No newline at end of file
diff --git a/admin/js/_preferences.js b/admin/js/_preferences.js
new file mode 100644
index 0000000..d47d010
--- /dev/null
+++ b/admin/js/_preferences.js
@@ -0,0 +1,5 @@
+
+$(function(){if($('#new_pwd').length==0){return;}
+var user_email=$('#user_email').val();$('#user-form').submit(function(){var e=this.elements['cur_pwd'];if(e.value!=''){return true;}
+if($('#user_email').val()!=user_email||$('#new_pwd').val()!=''){e.focus();$(e).backgroundFade({sColor:'#ffffff',eColor:'#ff9999',steps:50},function(){$(this).backgroundFade({sColor:'#ff9999',eColor:'#ffffff'});});return false;}
+return true;});});
\ No newline at end of file
diff --git a/admin/js/_trackbacks.js b/admin/js/_trackbacks.js
new file mode 100644
index 0000000..b3842d7
--- /dev/null
+++ b/admin/js/_trackbacks.js
@@ -0,0 +1,2 @@
+
+$(function(){$('#tb_excerpt').keypress(function(){if(this.value.length>255){this.value=this.value.substring(0,255);}});});
\ No newline at end of file
diff --git a/admin/js/_users.js b/admin/js/_users.js
new file mode 100644
index 0000000..fec32c1
--- /dev/null
+++ b/admin/js/_users.js
@@ -0,0 +1,7 @@
+
+$(function(){$('.checkboxes-helpers').each(function(){dotclear.checkboxesHelpers(this);});$('#form-users').submit(function(){var action=$(this).find('select[name="dispatch_action"]').val();var user_ids=new Array();var nb_posts=new Array();var i;var msg_cannot_delete=false;$(this).find('input[name="user_id[]"]').each(function(){user_ids.push(this);});$(this).find('input[name="nb_post[]"]').each(function(){nb_posts.push(this.value);});if(action=='deleteuser'){for(i=0;i0){user_ids[i].checked=false;msg_cannot_delete=true;}}
+if(msg_cannot_delete==true){alert(dotclear.msg.cannot_delete_users);}}
+var selectfields=0;for(i=0;iThis.height()){This.css('height',$('body').height()+'px');}};var textToggler=function(o){var i=$(' ');o.css('cursor','pointer');var hide=true;o.prepend(' ').prepend(i);o.click(function(){$(this).nextAll().each(function(){if($(this).is('h3')){return false;}
+$(this).toggle();sizeBox();return true;});hide=!hide;var img=$(this).find('img');if(!hide){img.attr('src',p.img_off_src);}else{img.attr('src',p.img_on_src);}});};this.addClass('help-box');this.find('>hr').remove();this.find('h3').each(function(){textToggler($(this));});this.find('h3:first').nextAll('*:not(h3)').hide();sizeBox();var img=$(' ');var select=$();img.click(function(){return toggle();});$('#content').append(img);return this;};var dotclear={msg:{},hideLockable:function(){$('div.lockable').each(function(){var current_lockable_div=this;$(this).find('p.form-note').hide();$(this).find('input').each(function(){this.disabled=true;$(this).width(($(this).width()-14)+'px');var imgE=document.createElement('img');imgE.src='images/locker.png';imgE.style.position='absolute';imgE.style.top='1.7em';imgE.style.left=($(this).width()+4)+'px';$(imgE).css('cursor','pointer');$(imgE).click(function(){$(this).hide();$(this).prev('input').each(function(){this.disabled=false;$(this).width(($(this).width()+14)+'px');});$(current_lockable_div).find('p.form-note').show();});$(this).parent().css('position','relative');$(this).after(imgE);});});},checkboxesHelpers:function(e){var a=document.createElement('a');a.href='#';$(a).append(document.createTextNode(dotclear.msg.select_all));a.onclick=function(){$(this).parents('form').find('input[type="checkbox"]').check();return false;};$(e).append(a);$(e).append(document.createTextNode(' - '));a=document.createElement('a');a.href='#';$(a).append(document.createTextNode(dotclear.msg.invert_sel));a.onclick=function(){$(this).parents('form').find('input[type="checkbox"]').toggleCheck();return false;};$(e).append(a);},postsActionsHelper:function(){$('#form-entries').submit(function(){var action=$(this).find('select[name="action"]').val();var checked=false;$(this).find('input[name="entries[]"]').each(function(){if(this.checked){checked=true;}});if(!checked){return false;}
+if(action=='delete'){return window.confirm(dotclear.msg.confirm_delete_posts);}
+return true;});},commentsActionsHelper:function(){$('#form-comments').submit(function(){var action=$(this).find('select[name="action"]').val();var checked=false;$(this).find('input[name="comments[]"]').each(function(){if(this.checked){checked=true;}});if(!checked){return false;}
+if(action=='delete'){return window.confirm(dotclear.msg.confirm_delete_comments);}
+return true;});}};$(function(){$('#switchblog').change(function(){this.form.submit();});var menu_settings={img_on_src:dotclear.img_menu_off,img_off_src:dotclear.img_menu_on,legend_click:true,speed:100}
+$('#blog-menu h3:first').toggleWithLegend($('#blog-menu ul:first'),$.extend({cookie:'dc_blog_menu',hide:false,reverse_cookie:true},menu_settings));$('#system-menu h3:first').toggleWithLegend($('#system-menu ul:first'),$.extend({cookie:'dc_system_menu'},menu_settings));$('#plugins-menu h3:first').toggleWithLegend($('#plugins-menu ul:first'),$.extend({cookie:'dc_plugins_menu'},menu_settings));$('#help').helpViewer();$('.message').backgroundFade({sColor:'#cccccc',eColor:'#666666',steps:20});$('.error').backgroundFade({sColor:'#f5e5e5',eColor:'#e5bfbf',steps:20});$('form:has(input[type=password][name=your_pwd])').submit(function(){var e=this.elements['your_pwd'];if(e.value==''){e.focus();$(e).backgroundFade({sColor:'#ffffff',eColor:'#ff9999',steps:50},function(){$(this).backgroundFade({sColor:'#ff9999',eColor:'#ffffff'});});return false;}
+return true;});});
\ No newline at end of file
diff --git a/admin/js/confirm-close.js b/admin/js/confirm-close.js
new file mode 100644
index 0000000..41489c9
--- /dev/null
+++ b/admin/js/confirm-close.js
@@ -0,0 +1,12 @@
+
+function confirmClose(){if(arguments.length>0){for(var i=0;i0){var res=new Array();var f;for(var i=0;i23){h=0;}
+if(h<10){h='0'+h;}
+this.hour=h*1;this.oHour.value=h;},setMinute:function(m){if(m<0){m=59;}
+if(m>59){m=0;}
+if(m<10){m='0'+m;}
+this.minute=m*1;this.oMinute.value=m;},changeMonth:function(dir){var y=this.year;var m=this.month;m=m+dir;if(m>12){this.month=1;this.year++;}
+else if(m<1){this.month=12;this.year--;}
+else{this.month=m;}
+this.setDate();},changeYear:function(dir){this.year=this.year+dir;this.setDate();},changeHour:function(dir){this.setHour(this.hour*1+dir);},changeMinute:function(dir){this.setMinute(this.minute*1+dir);},sendDate:function(d){var m=this.month;var hour=this.oHour.value*1;var minute=this.oMinute.value*1;if(hour<0||hour>23||isNaN(hour)){hour=0;}
+if(minute<0||minute>59||isNaN(minute)){minute=0;}
+if(m<10){m='0'+m;}
+if(d<10){d='0'+d;}
+if(hour<10){hour='0'+hour;}
+if(minute<10){minute='0'+minute;}
+this.target.value=this.year+'-'+m+'-'+d+' '+hour+':'+minute;this.close();},sendNow:function(){var dt=new Date();var y=dt.getFullYear();var m=dt.getMonth()+1;var d=dt.getDate();var h=dt.getHours();var i=dt.getMinutes();if(m<10){m='0'+m;}
+if(d<10){d='0'+d;}
+if(h<10){h='0'+h;}
+if(i<10){i='0'+i;}
+this.target.value=y+'-'+m+'-'+d+' '+h+':'+i;this.close();},close:function(){document.body.removeChild(this.oTable);},numberOfDays:function(){var res=31;if(this.month==4||this.month==6||this.month==9||this.month==11){res=30;}else if(this.month==2){res=28;if(this.year%4==0&&(this.year%100!=0||this.year%400==0)){res=29;}}
+return res;},firstDay:function(){var dt=new Date(this.year,this.month-1,1);var res=dt.getDay();if(res==0){res=7;}
+return res;},show:function(){var re=/(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2})/;var match=re.exec(this.target.value);if(match){this.year=match[1]*1;this.month=match[2]*1;this.day=match[3]*1;this.hour=match[4]*1;this.minute=match[5]*1;}else{var dt=new Date();this.year=dt.getFullYear();this.month=dt.getMonth()+1;this.day=dt.getDate();this.hour=dt.getHours();this.minute=dt.getMinutes();}
+this.oTable.appendChild(this.oBody);this.setDate();this.setPosition();document.body.appendChild(this.oTable);this.oHour.focus();},setPosition:function(){var t_x=this.findPosX(this.target);var t_y=this.findPosY(this.target);var o_h=this.oTable.offsetHeight;var o_w=this.oTable.offsetWidth;this.oTable.style.position='absolute';this.oTable.style.zIndex='100';this.oTable.style.top=t_y+'px';this.oTable.style.left=t_x+'px';},findPosX:function(obj){var curleft=0;if(obj.offsetParent){while(1){curleft+=obj.offsetLeft;if(!obj.offsetParent){break;}
+obj=obj.offsetParent;}}else if(obj.x){curleft+=obj.x;}
+return curleft;},findPosY:function(obj){var curtop=0;if(obj.offsetParent){while(1){curtop+=obj.offsetTop;if(!obj.offsetParent){break;}
+obj=obj.offsetParent;}}else if(obj.y){curtop+=obj.y;}
+return curtop;},draw:function(){var imgE=document.createElement('img');imgE.src=this.img_src;imgE.style.position='absolute';imgE.style.top=this.img_top;imgE.style.left=(this.target.clientWidth+4)+'px';imgE.obj=this;imgE.fn=this.show;imgE.onclick=function(){this.fn.apply(this.obj);};this.target.parentNode.style.position='relative';this.target.parentNode.insertBefore(imgE,this.target.nextSibling);}};
\ No newline at end of file
diff --git a/admin/js/dragsort-tablerows.js b/admin/js/dragsort-tablerows.js
new file mode 100644
index 0000000..164b5ec
--- /dev/null
+++ b/admin/js/dragsort-tablerows.js
@@ -0,0 +1,2 @@
+
+ToolMan._dragsortFactory.makeTableSortable=function(table){if(table==null)return;var helpers=ToolMan.helpers();var coordinates=ToolMan.coordinates();var items=table.getElementsByTagName("tr");helpers.map(items,function(item){var dragGroup=dragsort.makeSortable(item);dragGroup.setThreshold(4);var min,max;dragGroup.addTransform(function(coordinate,dragEvent){return coordinate.constrainTo(min,max);});dragGroup.register('dragstart',function(){var items=table.getElementsByTagName("tr");min=max=coordinates.topLeftOffset(items[0]);for(var i=1,n=items.length;i":"","\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\/":"","@(namespace|import)[^;\\n]+[;\\n]":"","'(\\\\.|[^'\\\\])*'":bJ,'"(\\\\.|[^"\\\\])*"':bJ,"\\s+":" "});function cB(a){return cA.exec(a)};function bI(c){return c.replace(cw,function(a,b){return bp[b-1]})};function bJ(c){return"\x01"+bp.push(c.replace(cz,function(a,b){return eval("'\\u"+"0000".slice(b.length)+b+"'")}).slice(1,-1).replace(cx,"\\'"))};function cC(a){return cy.test(a)?bp[a.slice(1)-1]:a};var cD=new D({Width:"Height",width:"height",Left:"Top",left:"top",Right:"Bottom",right:"bottom",onX:"onY"});function A(a){return cD.exec(a)};var bK=[];function bq(a){cF(a);w(window,"onresize",a)};function w(a,b,c){a.attachEvent(b,c);bK.push(arguments)};function cE(a,b,c){try{a.detachEvent(b,c)}catch(ignore){}};w(window,"onunload",function(){var a;while(a=bK.pop()){cE(a[0],a[1],a[2])}});function R(a,b,c){if(!a.elements)a.elements={};if(c)a.elements[b.uniqueID]=b;else delete a.elements[b.uniqueID];return c};w(window,"onbeforeprint",function(){if(!IE7.CSS.print)new bw("print");IE7.CSS.print.recalc()});var bL=/^\d+(px)?$/i;var J=/^\d+%$/;var E=function(a,b){if(bL.test(b))return parseInt(b);var c=a.style.left;var d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=b||0;b=a.style.pixelLeft;a.style.left=c;a.runtimeStyle.left=d;return b};var br="ie7-";var bM=z.extend({constructor:function(){this.fixes=[];this.recalcs=[]},init:Q});var bs=[];function cF(a){bs.push(a)};IE7.recalc=function(){IE7.HTML.recalc();IE7.CSS.recalc();for(var a=0;a1?2:0;var h=T.exec(f[g])||"if(0){";if(o){h+=i("if(e%1.nodeName!='!'){",m)}var p=S>1?bV:"";h+=i(p+bW,m);h+=Array(I(h,/\{/g).length+1).join("}");d+=h}eval(i(bX,F)+T.unescape(d)+"return s?null:r}");be[a]=_h}return be[a](b||document,c)};var bd=k<6;var bO=/^(href|src)$/;var bu={"class":"className","for":"htmlFor"};IE7._5=1;IE7._e=function(a,b){var c=a.all[b]||null;if(!c||c.id==b)return c;for(var d=0;d+~,]|[^(]\+|^)([#.:\[])/g,cH=/(^|,)([^\s>+~])/g,cI=/\s*([\s>+~(),]|^|$)\s*/g,bQ=/\s\*\s/g;var bR=D.extend({constructor:function(a){this.base(a);this.sorter=new D;this.sorter.add(/:not\([^)]*\)/,D.IGNORE);this.sorter.add(/([ >](\*|[\w-]+))([^: >+~]*)(:\w+-child(\([^)]+\))?)([^: >+~]*)/,"$1$3$6$4")},ignoreCase:true,escape:function(a){return this.optimise(this.format(a))},format:function(a){return a.replace(cI,"$1").replace(cH,"$1 $2").replace(cG,"$1*$2")},optimise:function(a){return this.sorter.exec(a.replace(bQ,">* "))},unescape:function(a){return bI(a)}});var bS={"":"%1!=null","=":"%1=='%2'","~=":/(^| )%1( |$)/,"|=":/^%1(-|$)/,"^=":/^%1/,"$=":/%1$/,"*=":/%1/};var bT={"first-child":"!IE7._b(e%1)","link":"e%1.currentStyle['ie7-link']=='link'","visited":"e%1.currentStyle['ie7-link']=='visited'"};var bv="var p%2=0,i%2,e%2,n%2=e%1.";var bU="e%1.sourceIndex";var bV="var g="+bU+";if(!p[g]){p[g]=1;";var bW="r[r.length]=e%1;if(s)return e%1;";var bX="var _h=function(e0,s){IE7._5++;var r=[],p={},reg=[%1],d=document;";var F;var m;var o;var x;var S;var be={};var T=new bR({" (\\*|[\\w-]+)#([\\w-]+)":function(a,b,c){o=false;var d="var e%2=IE7._e(d,'%4');if(e%2&&";if(b!="*")d+="e%2.nodeName=='%3'&&";d+="(e%1==d||e%1.contains(e%2))){";if(x)d+=i("i%1=n%1.length;",x);return i(d,m++,m,b.toUpperCase(),c)}," (\\*|[\\w-]+)":function(a,b){S++;o=b=="*";var c=bv;c+=(o&&bd)?"all":"getElementsByTagName('%3')";c+=";for(i%2=0;(e%2=n%2[i%2]);i%2++){";return i(c,m++,x=m,b.toUpperCase())},">(\\*|[\\w-]+)":function(a,b){var c=x;o=b=="*";var d=bv;d+=c?"children":"childNodes";if(!o&&c)d+=".tags('%3')";d+=";for(i%2=0;(e%2=n%2[i%2]);i%2++){";if(o){d+="if(e%2.nodeType==1){";o=bd}else{if(!c)d+="if(e%2.nodeName=='%3'){"}return i(d,m++,x=m,b.toUpperCase())},"\\+(\\*|[\\w-]+)":function(a,b){var c="";if(o)c+="if(e%1.nodeName!='!'){";o=false;c+="e%1=IE7._a(e%1);if(e%1";if(b!="*")c+="&&e%1.nodeName=='%2'";c+="){";return i(c,m,b.toUpperCase())},"~(\\*|[\\w-]+)":function(a,b){var c="";if(o)c+="if(e%1.nodeName!='!'){";o=false;S=2;c+="while(e%1=e%1.nextSibling){if(e%1.ie7_adjacent==IE7._5)break;if(";if(b=="*"){c+="e%1.nodeType==1";if(bd)c+="&&e%1.nodeName!='!'"}else c+="e%1.nodeName=='%2'";c+="){e%1.ie7_adjacent=IE7._5;";return i(c,m,b.toUpperCase())},"#([\\w-]+)":function(a,b){o=false;var c="if(e%1.id=='%2'){";if(x)c+=i("i%1=n%1.length;",x);return i(c,m,b)},"\\.([\\w-]+)":function(a,b){o=false;F.push(new RegExp("(^|\\s)"+bb(b)+"(\\s|$)"));return i("if(e%1.className&®[%2].test(e%1.className)){",m,F.length-1)},"\\[([\\w-]+)\\s*([^=]?=)?\\s*([^\\]]*)\\]":function(a,b,c,d){var f=bu[b]||b;if(c){var g="e%1.getAttribute('%2',2)";if(!bO.test(b)){g="e%1.%3||"+g}b=i("("+g+")",m,b,f)}else{b=i("IE7._f(e%1,'%2')",m,b)}var h=bS[c||""]||"0";if(h&&h.source){F.push(new RegExp(i(h.source,bb(T.unescape(d)))));h="reg[%2].test(%1)";d=F.length-1}return"if("+i(h,b,d)+"){"},":+([\\w-]+)(\\(([^)]+)\\))?":function(a,b,c,d){b=bT[b];return"if("+(b?i(b,m,d||""):"0")+"){"}});var bY=/a(#[\w-]+)?(\.[\w-]+)?:(hover|active)/i;var bZ=/\s*\{\s*/,ca=/\s*\}\s*/,cb=/\s*\,\s*/;var cc=/(.*)(:first-(line|letter))/;var y=document.styleSheets;IE7.CSS=new(bM.extend({parser:new bH,screen:"",print:"",styles:[],rules:[],pseudoClasses:k<7?"first\\-child":"",dynamicPseudoClasses:{toString:function(){var a=[];for(var b in this)a.push(b);return a.join("|")}},init:function(){var a="^\x01$";var b="\\[class=?[^\\]]*\\]";var c=[];if(this.pseudoClasses)c.push(this.pseudoClasses);var d=this.dynamicPseudoClasses.toString();if(d)c.push(d);c=c.join("|");var f=k<7?["[>+~[(]|([:.])\\w+\\1"]:[b];if(c)f.push(":("+c+")");this.UNKNOWN=new RegExp(f.join("|")||a,"i");var g=k<7?["\\[[^\\]]+\\]|[^\\s(\\[]+\\s*[+~]"]:[b];var h=g.concat();if(c)h.push(":("+c+")");n.COMPLEX=new RegExp(h.join("|")||a,"ig");if(this.pseudoClasses)g.push(":("+this.pseudoClasses+")");L.COMPLEX=new RegExp(g.join("|")||a,"i");L.MATCH=new RegExp(d?"(.*):("+d+")(.*)":a,"i");this.createStyleSheet();this.refresh()},addEventHandler:function(){w.apply(null,arguments)},addFix:function(a,b){this.parser.add(a,b)},addRecalc:function(c,d,f,g){d=new RegExp("([{;\\s])"+c+"\\s*:\\s*"+d+"[^;}]*");var h=this.recalcs.length;if(g)g=c+":"+g;this.addFix(d,function(a,b){return(g?b+g:a)+";ie7-"+a.slice(1)+";ie7_recalc"+h+":1"});this.recalcs.push(arguments);return h},apply:function(){this.getInlineStyles();new bw("screen");this.trash()},createStyleSheet:function(){this.styleSheet=document.createStyleSheet();this.styleSheet.ie7=true;this.styleSheet.owningElement.ie7=true;this.styleSheet.cssText=G},getInlineStyles:function(){var a=document.getElementsByTagName("style"),b;for(var c=a.length-1;(b=a[c]);c--){if(!b.disabled&&!b.ie7){this.styles.push(b.innerHTML)}}},getText:function(a,b){try{var c=a.cssText}catch(e){c=""}if(H)c=cl(a.href,b)||c;return c},recalc:function(){this.screen.recalc();var a=/ie7_recalc\d+/g;var b=G.match(/[{,]/g).length;var c=b+(this.screen.cssText.match(/\{/g)||"").length;var d=this.styleSheet.rules,f;var g,h,p,t,q,j,u,l;for(q=b;q0&&n.CLASS.test(b)){b=b.replace(n.CLASS,"");d--}while(c>0&&n.TAG.test(b)){b=b.replace(n.TAG,"$1*");c--}b+="."+this.className;d=Math.min(d,2);c=Math.min(c,2);var f=-10*d-c;if(f>0){b=b+","+n.MAP[f]+" "+b}return b},remove:function(a){a.className=a.className.replace(this.MATCH,"$1")},toString:function(){return i("%1 {%2}",this.selectorText,this.cssText)}},{CHILD:/>/g,CLASS:/\.[\w-]+/,CLASSES:/[.:\[]/g,MULTI:/(\.[\w-]+)+/g,PREFIX:"ie7_class",TAG:/^\w+|([\s>+~])\w+/,TAGS:/^\w|[\s>+~]\w/g,MAP:{1:"html",2:"html body",10:".ie7_html",11:"html.ie7_html",12:"html.ie7_html body",20:".ie7_html .ie7_body",21:"html.ie7_html .ie7_body",22:"html.ie7_html body.ie7_body"}});var L=n.extend({constructor:function(a,b,c,d,f){this.attach=b||"*";this.dynamicPseudoClass=IE7.CSS.dynamicPseudoClasses[c];this.target=d;this.base(a,f)},recalc:function(){var a=B(this.attach),b;for(var c=0;b=a[c];c++){var d=this.target?B(this.target,b):[b];if(d.length)this.dynamicPseudoClass.apply(b,d,this)}}});var cd=z.extend({constructor:function(a,b){this.name=a;this.apply=b;this.instances={};IE7.CSS.dynamicPseudoClasses[a]=this},register:function(a){var b=a[2];a.id=b.id+a[0].uniqueID;if(!this.instances[a.id]){var c=a[1],d;for(d=0;d*:"+(b=="marginTop"?"first":"last")+"-child",a,true);if(d&&d.currentStyle.styleFloat=="none"&&IE7.hasLayout(d)){collapseMargin(d,b);margin=_9(a,a.currentStyle[b]);childMargin=_9(d,d.currentStyle[b]);if(margin<0||childMargin<0){a.runtimeStyle[b]=margin+childMargin}else{a.runtimeStyle[b]=Math.max(childMargin,margin)}d.runtimeStyle[b]="0px"}}};function _9(a,b){return b=="auto"?0:E(a,b)};var UNIT=/^[.\d][\w%]*$/,AUTO=/^(auto|0cm)$/;var applyWidth,applyHeight;IE7.Layout.borderBox=function(a){applyWidth(a);applyHeight(a)};var fixWidth=function(g){applyWidth=function(a){if(!J.test(a.currentStyle.width))h(a);collapseMargins(a)};function h(a,b){if(!a.runtimeStyle.fixedWidth){if(!b)b=a.currentStyle.width;a.runtimeStyle.fixedWidth=(UNIT.test(b))?Math.max(0,q(a,b)):b;K(a,"width",a.runtimeStyle.fixedWidth)}};function p(a){if(!bc(a)){var b=a.offsetParent;while(b&&!IE7.hasLayout(b))b=b.offsetParent}return(b||s).clientWidth};function t(a,b){if(J.test(b))return parseInt(parseFloat(b)/100*p(a));return E(a,b)};var q=function(a,b){var c=a.currentStyle["box-sizing"]=="border-box";var d=0;if(C&&!c)d+=j(a)+u(a,"padding");else if(!C&&c)d-=j(a)+u(a,"padding");return t(a,b)+d};function j(a){return a.offsetWidth-a.clientWidth};function u(a,b){return t(a,a.currentStyle[b+"Left"])+t(a,a.currentStyle[b+"Right"])};G+="*{minWidth:none;maxWidth:none;min-width:none;max-width:none}";layout.minWidth=function(a){if(a.currentStyle["min-width"]!=null){a.style.minWidth=a.currentStyle["min-width"]}if(R(arguments.callee,a,a.currentStyle.minWidth!="none")){layout.boxSizing(a);h(a);l(a)}};eval("IE7.Layout.maxWidth="+String(layout.minWidth).replace(/min/g,"max"));function l(a){var b=a.getBoundingClientRect();var c=b.right-b.left;if(a.currentStyle.minWidth!="none"&&c<=q(a,a.currentStyle.minWidth)){a.runtimeStyle.width=a.currentStyle.minWidth}else if(a.currentStyle.maxWidth!="none"&&c>=q(a,a.currentStyle.maxWidth)){a.runtimeStyle.width=a.currentStyle.maxWidth}else{a.runtimeStyle.width=a.runtimeStyle.fixedWidth}};function r(a){if(R(r,a,/^(fixed|absolute)$/.test(a.currentStyle.position)&&bt(a,"left")!="auto"&&bt(a,"right")!="auto"&&AUTO.test(bt(a,"width")))){N(a);IE7.Layout.boxSizing(a)}};IE7.Layout.fixRight=r;function N(a){var b=t(a,a.runtimeStyle._c||a.currentStyle.left);var c=p(a)-t(a,a.currentStyle.right)-b-u(a,"margin");if(parseInt(a.runtimeStyle.width)==c)return;a.runtimeStyle.width="";if(bc(a)||g||a.offsetWidth=5.5&&k<7){IE7.CSS.addFix(/background(-image)?\s*:\s*([^};]*)?url\(([^\)]+)\)([^;}]*)?/,function(a,b,c,d,f){d=cC(d);return bi.test(d)?"filter:"+i(bx,d,"crop")+";zoom:1;background"+(b||"")+":"+(c||"")+"none"+(f||""):a});IE7.HTML.addRecalc("img,input",function(a){if(a.tagName=="INPUT"&&a.type!="image")return;by(a);w(a,"onpropertychange",function(){if(!bj&&event.propertyName=="src"&&a.src.indexOf(bg)==-1)by(a)})});var bj=false;w(window,"onbeforeprint",function(){bj=true;for(var a=0;a=7)return;IE7.CSS.addRecalc("position","fixed",_6,"absolute");IE7.CSS.addRecalc("background(-attachment)?","[^};]*fixed",_2);var $viewport=C?"body":"documentElement";function _3(){if(v.currentStyle.backgroundAttachment!="fixed"){if(v.currentStyle.backgroundImage=="none"){v.runtimeStyle.backgroundRepeat="no-repeat";v.runtimeStyle.backgroundImage="url("+bg+")"}v.runtimeStyle.backgroundAttachment="fixed"}_3=Q};var _0=bN("img");function _1(a){return a?bc(a)||_1(a.parentElement):false};function _d(a,b,c){setTimeout("document.all."+a.uniqueID+".runtimeStyle.setExpression('"+b+"','"+c+"')",0)};function _2(a){if(R(_2,a,a.currentStyle.backgroundAttachment=="fixed"&&!a.contains(v))){_3();bgLeft(a);bgTop(a);_8(a)}};function _8(a){_0.src=a.currentStyle.backgroundImage.slice(5,-2);var b=a.canHaveChildren?a:a.parentElement;b.appendChild(_0);setOffsetLeft(a);setOffsetTop(a);b.removeChild(_0)};function bgLeft(a){a.style.backgroundPositionX=a.currentStyle.backgroundPositionX;if(!_1(a)){_d(a,"backgroundPositionX","(parseInt(runtimeStyle.offsetLeft)+document."+$viewport+".scrollLeft)||0")}};eval(A(bgLeft));function setOffsetLeft(a){var b=_1(a)?"backgroundPositionX":"offsetLeft";a.runtimeStyle[b]=getOffsetLeft(a,a.style.backgroundPositionX)-a.getBoundingClientRect().left-a.clientLeft+2};eval(A(setOffsetLeft));function getOffsetLeft(a,b){switch(b){case"left":case"top":return 0;case"right":case"bottom":return s.clientWidth-_0.offsetWidth;case"center":return(s.clientWidth-_0.offsetWidth)/2;default:if(J.test(b)){return parseInt((s.clientWidth-_0.offsetWidth)*parseFloat(b)/100)}_0.style.left=b;return _0.offsetLeft}};eval(A(getOffsetLeft));function _6(a){if(R(_6,a,bc(a))){K(a,"position","absolute");K(a,"left",a.currentStyle.left);K(a,"top",a.currentStyle.top);_3();IE7.Layout.fixRight(a);_4(a)}};function _4(a,b){positionTop(a,b);positionLeft(a,b,true);if(!a.runtimeStyle.autoLeft&&a.currentStyle.marginLeft=="auto"&&a.currentStyle.right!="auto"){var c=s.clientWidth-getPixelWidth(a,a.currentStyle.right)-getPixelWidth(a,a.runtimeStyle._c)-a.clientWidth;if(a.currentStyle.marginRight=="auto")c=parseInt(c/2);if(_1(a.offsetParent))a.runtimeStyle.pixelLeft+=c;else a.runtimeStyle.shiftLeft=c}clipWidth(a);clipHeight(a)};function clipWidth(a){var b=a.runtimeStyle.fixWidth;a.runtimeStyle.borderRightWidth="";a.runtimeStyle.width=b?getPixelWidth(a,b):"";if(a.currentStyle.width!="auto"){var c=a.getBoundingClientRect();var d=a.offsetWidth-s.clientWidth+c.left-2;if(d>=0){a.runtimeStyle.borderRightWidth="0px";d=Math.max(E(a,a.currentStyle.width)-d,0);K(a,"width",d);return d}}};eval(A(clipWidth));function positionLeft(a,b){if(!b&&J.test(a.currentStyle.width)){a.runtimeStyle.fixWidth=a.currentStyle.width}if(a.runtimeStyle.fixWidth){a.runtimeStyle.width=getPixelWidth(a,a.runtimeStyle.fixWidth)}a.runtimeStyle.shiftLeft=0;a.runtimeStyle._c=a.currentStyle.left;a.runtimeStyle.autoLeft=a.currentStyle.right!="auto"&&a.currentStyle.left=="auto";a.runtimeStyle.left="";a.runtimeStyle.screenLeft=getScreenLeft(a);a.runtimeStyle.pixelLeft=a.runtimeStyle.screenLeft;if(!b&&!_1(a.offsetParent)){_d(a,"pixelLeft","runtimeStyle.screenLeft+runtimeStyle.shiftLeft+document."+$viewport+".scrollLeft")}};eval(A(positionLeft));function getScreenLeft(a){var b=a.offsetLeft,c=1;if(a.runtimeStyle.autoLeft){b=s.clientWidth-a.offsetWidth-getPixelWidth(a,a.currentStyle.right)}if(a.currentStyle.marginLeft!="auto"){b-=getPixelWidth(a,a.currentStyle.marginLeft)}while(a=a.offsetParent){if(a.currentStyle.position!="static")c=-1;b+=a.offsetLeft*c}return b};eval(A(getScreenLeft));function getPixelWidth(a,b){return J.test(b)?parseInt(parseFloat(b)/100*s.clientWidth):E(a,b)};eval(A(getPixelWidth));function _g(){var a=_2.elements;for(var b in a)_8(a[b]);a=_6.elements;for(b in a){_4(a[b],true);_4(a[b],true)}_7=0};var _7;bq(function(){if(!_7)_7=setTimeout(_g,0)})};var bk={backgroundColor:"transparent",backgroundImage:"none",backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderTopStyle:"none",borderRightStyle:"none",borderBottomStyle:"none",borderLeftWidth:0,height:null,marginTop:0,marginBottom:0,marginRight:0,marginLeft:0,width:"100%"};IE7.CSS.addRecalc("overflow","visible",function(a){if(a.parentNode.ie7_wrapped)return;if(IE7.Layout&&a.currentStyle["max-height"]!="auto"){IE7.Layout.maxHeight(a)}if(a.currentStyle.marginLeft=="auto")a.style.marginLeft=0;if(a.currentStyle.marginRight=="auto")a.style.marginRight=0;var b=document.createElement(bA);b.ie7_wrapped=a;for(var c in bk){b.style[c]=a.currentStyle[c];if(bk[c]!=null){a.runtimeStyle[c]=bk[c]}}b.style.display="block";b.style.position="relative";a.runtimeStyle.position="absolute";a.parentNode.insertBefore(b,a);b.appendChild(a)});function cf(){var f="xx-small,x-small,small,medium,large,x-large,xx-large".split(",");for(var g=0;g":"","\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\/":"","@(namespace|import)[^;\\n]+[;\\n]":"","'(\\\\.|[^'\\\\])*'":bW,'"(\\\\.|[^"\\\\])*"':bW,"\\s+":" "});function cS(a){return bV.exec(a)};function bg(c){return c.replace(cO,function(a,b){return bA[b-1]})};function bW(c){return"\x01"+bA.push(c.replace(cR,function(a,b){return eval("'\\u"+"0000".slice(b.length)+b+"'")}).slice(1,-1).replace(cP,"\\'"))};function bB(a){return cQ.test(a)?bA[a.slice(1)-1]:a};var cT=new H({Width:"Height",width:"height",Left:"Top",left:"top",Right:"Bottom",right:"bottom",onX:"onY"});function C(a){return cT.exec(a)};var bX=[];function bC(a){cV(a);v(window,"onresize",a)};function v(a,b,c){a.attachEvent(b,c);bX.push(arguments)};function cU(a,b,c){try{a.detachEvent(b,c)}catch(ignore){}};v(window,"onunload",function(){var a;while(a=bX.pop()){cU(a[0],a[1],a[2])}});function X(a,b,c){if(!a.elements)a.elements={};if(c)a.elements[b.uniqueID]=b;else delete a.elements[b.uniqueID];return c};v(window,"onbeforeprint",function(){if(!IE7.CSS.print)new bJ("print");IE7.CSS.print.recalc()});var bY=/^\d+(px)?$/i;var M=/^\d+%$/;var D=function(a,b){if(bY.test(b))return parseInt(b);var c=a.style.left;var d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=b||0;b=a.style.pixelLeft;a.style.left=c;a.runtimeStyle.left=d;return b};var bD="ie7-";var bZ=B.extend({constructor:function(){this.fixes=[];this.recalcs=[]},init:U});var bE=[];function cV(a){bE.push(a)};IE7.recalc=function(){IE7.HTML.recalc();IE7.CSS.recalc();for(var a=0;a1?2:0;var h=E.exec(f[g])||"if(0){";if(p){h+=i("if(e%1.nodeName!='!'){",l)}var j=Y>1?ch:"";h+=i(j+ci,l);h+=Array(L(h,/\{/g).length+1).join("}");d+=h}eval(i(cj,I)+E.unescape(d)+"return s?null:r}");bj[a]=_k}return bj[a](b||document,c)};var bi=m<6;var cb=/^(href|src)$/;var bG={"class":"className","for":"htmlFor"};IE7._1=1;IE7._e=function(a,b){var c=a.all[b]||null;if(!c||c.id==b)return c;for(var d=0;d+~,]|[^(]\+|^)([#.:\[])/g,cX=/(^|,)([^\s>+~])/g,cY=/\s*([\s>+~(),]|^|$)\s*/g,cd=/\s\*\s/g;var ce=H.extend({constructor:function(a){this.base(a);this.sorter=new H;this.sorter.add(/:not\([^)]*\)/,H.IGNORE);this.sorter.add(/([ >](\*|[\w-]+))([^: >+~]*)(:\w+-child(\([^)]+\))?)([^: >+~]*)/,"$1$3$6$4")},ignoreCase:true,escape:function(a){return this.optimise(this.format(a))},format:function(a){return a.replace(cY,"$1").replace(cX,"$1 $2").replace(cW,"$1*$2")},optimise:function(a){return this.sorter.exec(a.replace(cd,">* "))},unescape:function(a){return bg(a)}});var cf={"":"%1!=null","=":"%1=='%2'","~=":/(^| )%1( |$)/,"|=":/^%1(-|$)/,"^=":/^%1/,"$=":/%1$/,"*=":/%1/};var bH={"first-child":"!IE7._4(e%1)","link":"e%1.currentStyle['ie7-link']=='link'","visited":"e%1.currentStyle['ie7-link']=='visited'"};var bI="var p%2=0,i%2,e%2,n%2=e%1.";var cg="e%1.sourceIndex";var ch="var g="+cg+";if(!p[g]){p[g]=1;";var ci="r[r.length]=e%1;if(s)return e%1;";var cj="var _k=function(e0,s){IE7._1++;var r=[],p={},reg=[%1],d=document;";var I;var l;var p;var y;var Y;var bj={};var E=new ce({" (\\*|[\\w-]+)#([\\w-]+)":function(a,b,c){p=false;var d="var e%2=IE7._e(d,'%4');if(e%2&&";if(b!="*")d+="e%2.nodeName=='%3'&&";d+="(e%1==d||e%1.contains(e%2))){";if(y)d+=i("i%1=n%1.length;",y);return i(d,l++,l,b.toUpperCase(),c)}," (\\*|[\\w-]+)":function(a,b){Y++;p=b=="*";var c=bI;c+=(p&&bi)?"all":"getElementsByTagName('%3')";c+=";for(i%2=0;(e%2=n%2[i%2]);i%2++){";return i(c,l++,y=l,b.toUpperCase())},">(\\*|[\\w-]+)":function(a,b){var c=y;p=b=="*";var d=bI;d+=c?"children":"childNodes";if(!p&&c)d+=".tags('%3')";d+=";for(i%2=0;(e%2=n%2[i%2]);i%2++){";if(p){d+="if(e%2.nodeType==1){";p=bi}else{if(!c)d+="if(e%2.nodeName=='%3'){"}return i(d,l++,y=l,b.toUpperCase())},"\\+(\\*|[\\w-]+)":function(a,b){var c="";if(p)c+="if(e%1.nodeName!='!'){";p=false;c+="e%1=IE7._3(e%1);if(e%1";if(b!="*")c+="&&e%1.nodeName=='%2'";c+="){";return i(c,l,b.toUpperCase())},"~(\\*|[\\w-]+)":function(a,b){var c="";if(p)c+="if(e%1.nodeName!='!'){";p=false;Y=2;c+="while(e%1=e%1.nextSibling){if(e%1.ie7_adjacent==IE7._1)break;if(";if(b=="*"){c+="e%1.nodeType==1";if(bi)c+="&&e%1.nodeName!='!'"}else c+="e%1.nodeName=='%2'";c+="){e%1.ie7_adjacent=IE7._1;";return i(c,l,b.toUpperCase())},"#([\\w-]+)":function(a,b){p=false;var c="if(e%1.id=='%2'){";if(y)c+=i("i%1=n%1.length;",y);return i(c,l,b)},"\\.([\\w-]+)":function(a,b){p=false;I.push(new RegExp("(^|\\s)"+W(b)+"(\\s|$)"));return i("if(e%1.className&®[%2].test(e%1.className)){",l,I.length-1)},"\\[([\\w-]+)\\s*([^=]?=)?\\s*([^\\]]*)\\]":function(a,b,c,d){var f=bG[b]||b;if(c){var g="e%1.getAttribute('%2',2)";if(!cb.test(b)){g="e%1.%3||"+g}b=i("("+g+")",l,b,f)}else{b=i("IE7._f(e%1,'%2')",l,b)}var h=cf[c||""]||"0";if(h&&h.source){I.push(new RegExp(i(h.source,W(E.unescape(d)))));h="reg[%2].test(%1)";d=I.length-1}return"if("+i(h,b,d)+"){"},":+([\\w-]+)(\\(([^)]+)\\))?":function(a,b,c,d){b=bH[b];return"if("+(b?i(b,l,d||""):"0")+"){"}});var ck=/a(#[\w-]+)?(\.[\w-]+)?:(hover|active)/i;var cl=/\s*\{\s*/,cm=/\s*\}\s*/,cn=/\s*\,\s*/;var co=/(.*)(:first-(line|letter))/;var z=document.styleSheets;IE7.CSS=new(bZ.extend({parser:new bU,screen:"",print:"",styles:[],rules:[],pseudoClasses:m<7?"first\\-child":"",dynamicPseudoClasses:{toString:function(){var a=[];for(var b in this)a.push(b);return a.join("|")}},init:function(){var a="^\x01$";var b="\\[class=?[^\\]]*\\]";var c=[];if(this.pseudoClasses)c.push(this.pseudoClasses);var d=this.dynamicPseudoClasses.toString();if(d)c.push(d);c=c.join("|");var f=m<7?["[>+~[(]|([:.])\\w+\\1"]:[b];if(c)f.push(":("+c+")");this.UNKNOWN=new RegExp(f.join("|")||a,"i");var g=m<7?["\\[[^\\]]+\\]|[^\\s(\\[]+\\s*[+~]"]:[b];var h=g.concat();if(c)h.push(":("+c+")");o.COMPLEX=new RegExp(h.join("|")||a,"ig");if(this.pseudoClasses)g.push(":("+this.pseudoClasses+")");O.COMPLEX=new RegExp(g.join("|")||a,"i");O.MATCH=new RegExp(d?"(.*):("+d+")(.*)":a,"i");this.createStyleSheet();this.refresh()},addEventHandler:function(){v.apply(null,arguments)},addFix:function(a,b){this.parser.add(a,b)},addRecalc:function(c,d,f,g){d=new RegExp("([{;\\s])"+c+"\\s*:\\s*"+d+"[^;}]*");var h=this.recalcs.length;if(g)g=c+":"+g;this.addFix(d,function(a,b){return(g?b+g:a)+";ie7-"+a.slice(1)+";ie7_recalc"+h+":1"});this.recalcs.push(arguments);return h},apply:function(){this.getInlineStyles();new bJ("screen");this.trash()},createStyleSheet:function(){this.styleSheet=document.createStyleSheet();this.styleSheet.ie7=true;this.styleSheet.owningElement.ie7=true;this.styleSheet.cssText=J},getInlineStyles:function(){var a=document.getElementsByTagName("style"),b;for(var c=a.length-1;(b=a[c]);c--){if(!b.disabled&&!b.ie7){this.styles.push(b.innerHTML)}}},getText:function(a,b){try{var c=a.cssText}catch(e){c=""}if(K)c=cD(a.href,b)||c;return c},recalc:function(){this.screen.recalc();var a=/ie7_recalc\d+/g;var b=J.match(/[{,]/g).length;var c=b+(this.screen.cssText.match(/\{/g)||"").length;var d=this.styleSheet.rules,f;var g,h,j,q,r,k,u,n;for(r=b;r0&&o.CLASS.test(b)){b=b.replace(o.CLASS,"");d--}while(c>0&&o.TAG.test(b)){b=b.replace(o.TAG,"$1*");c--}b+="."+this.className;d=Math.min(d,2);c=Math.min(c,2);var f=-10*d-c;if(f>0){b=b+","+o.MAP[f]+" "+b}return b},remove:function(a){a.className=a.className.replace(this.MATCH,"$1")},toString:function(){return i("%1 {%2}",this.selectorText,this.cssText)}},{CHILD:/>/g,CLASS:/\.[\w-]+/,CLASSES:/[.:\[]/g,MULTI:/(\.[\w-]+)+/g,PREFIX:"ie7_class",TAG:/^\w+|([\s>+~])\w+/,TAGS:/^\w|[\s>+~]\w/g,MAP:{1:"html",2:"html body",10:".ie7_html",11:"html.ie7_html",12:"html.ie7_html body",20:".ie7_html .ie7_body",21:"html.ie7_html .ie7_body",22:"html.ie7_html body.ie7_body"}});var O=o.extend({constructor:function(a,b,c,d,f){this.attach=b||"*";this.dynamicPseudoClass=IE7.CSS.dynamicPseudoClasses[c];this.target=d;this.base(a,f)},recalc:function(){var a=x(this.attach),b;for(var c=0;b=a[c];c++){var d=this.target?x(this.target,b):[b];if(d.length)this.dynamicPseudoClass.apply(b,d,this)}}});var A=B.extend({constructor:function(a,b){this.name=a;this.apply=b;this.instances={};IE7.CSS.dynamicPseudoClasses[a]=this},register:function(a){var b=a[2];a.id=b.id+a[0].uniqueID;if(!this.instances[a.id]){var c=a[1],d;for(d=0;d*:"+(b=="marginTop"?"first":"last")+"-child",a,true);if(d&&d.currentStyle.styleFloat=="none"&&IE7.hasLayout(d)){collapseMargin(d,b);margin=_b(a,a.currentStyle[b]);childMargin=_b(d,d.currentStyle[b]);if(margin<0||childMargin<0){a.runtimeStyle[b]=margin+childMargin}else{a.runtimeStyle[b]=Math.max(childMargin,margin)}d.runtimeStyle[b]="0px"}}};function _b(a,b){return b=="auto"?0:D(a,b)};var UNIT=/^[.\d][\w%]*$/,AUTO=/^(auto|0cm)$/;var applyWidth,applyHeight;IE7.Layout.borderBox=function(a){applyWidth(a);applyHeight(a)};var fixWidth=function(g){applyWidth=function(a){if(!M.test(a.currentStyle.width))h(a);collapseMargins(a)};function h(a,b){if(!a.runtimeStyle.fixedWidth){if(!b)b=a.currentStyle.width;a.runtimeStyle.fixedWidth=(UNIT.test(b))?Math.max(0,r(a,b)):b;N(a,"width",a.runtimeStyle.fixedWidth)}};function j(a){if(!bh(a)){var b=a.offsetParent;while(b&&!IE7.hasLayout(b))b=b.offsetParent}return(b||t).clientWidth};function q(a,b){if(M.test(b))return parseInt(parseFloat(b)/100*j(a));return D(a,b)};var r=function(a,b){var c=a.currentStyle["box-sizing"]=="border-box";var d=0;if(G&&!c)d+=k(a)+u(a,"padding");else if(!G&&c)d-=k(a)+u(a,"padding");return q(a,b)+d};function k(a){return a.offsetWidth-a.clientWidth};function u(a,b){return q(a,a.currentStyle[b+"Left"])+q(a,a.currentStyle[b+"Right"])};J+="*{minWidth:none;maxWidth:none;min-width:none;max-width:none}";layout.minWidth=function(a){if(a.currentStyle["min-width"]!=null){a.style.minWidth=a.currentStyle["min-width"]}if(X(arguments.callee,a,a.currentStyle.minWidth!="none")){layout.boxSizing(a);h(a);n(a)}};eval("IE7.Layout.maxWidth="+String(layout.minWidth).replace(/min/g,"max"));function n(a){var b=a.getBoundingClientRect();var c=b.right-b.left;if(a.currentStyle.minWidth!="none"&&c<=r(a,a.currentStyle.minWidth)){a.runtimeStyle.width=a.currentStyle.minWidth}else if(a.currentStyle.maxWidth!="none"&&c>=r(a,a.currentStyle.maxWidth)){a.runtimeStyle.width=a.currentStyle.maxWidth}else{a.runtimeStyle.width=a.runtimeStyle.fixedWidth}};function s(a){if(X(s,a,/^(fixed|absolute)$/.test(a.currentStyle.position)&&bF(a,"left")!="auto"&&bF(a,"right")!="auto"&&AUTO.test(bF(a,"width")))){R(a);IE7.Layout.boxSizing(a)}};IE7.Layout.fixRight=s;function R(a){var b=q(a,a.runtimeStyle._c||a.currentStyle.left);var c=j(a)-q(a,a.currentStyle.right)-b-u(a,"margin");if(parseInt(a.runtimeStyle.width)==c)return;a.runtimeStyle.width="";if(bh(a)||g||a.offsetWidth=5.5&&m<7){IE7.CSS.addFix(/background(-image)?\s*:\s*([^};]*)?url\(([^\)]+)\)([^;}]*)?/,function(a,b,c,d,f){d=bB(d);return bm.test(d)?"filter:"+i(bK,d,"crop")+";zoom:1;background"+(b||"")+":"+(c||"")+"none"+(f||""):a});IE7.HTML.addRecalc("img,input",function(a){if(a.tagName=="INPUT"&&a.type!="image")return;bL(a);v(a,"onpropertychange",function(){if(!bn&&event.propertyName=="src"&&a.src.indexOf(bk)==-1)bL(a)})});var bn=false;v(window,"onbeforeprint",function(){bn=true;for(var a=0;a=7)return;IE7.CSS.addRecalc("position","fixed",_8,"absolute");IE7.CSS.addRecalc("background(-attachment)?","[^};]*fixed",_5);var $viewport=G?"body":"documentElement";function _6(){if(w.currentStyle.backgroundAttachment!="fixed"){if(w.currentStyle.backgroundImage=="none"){w.runtimeStyle.backgroundRepeat="no-repeat";w.runtimeStyle.backgroundImage="url("+bk+")"}w.runtimeStyle.backgroundAttachment="fixed"}_6=U};var _0=ca("img");function _2(a){return a?bh(a)||_2(a.parentElement):false};function _d(a,b,c){setTimeout("document.all."+a.uniqueID+".runtimeStyle.setExpression('"+b+"','"+c+"')",0)};function _5(a){if(X(_5,a,a.currentStyle.backgroundAttachment=="fixed"&&!a.contains(w))){_6();bgLeft(a);bgTop(a);_a(a)}};function _a(a){_0.src=a.currentStyle.backgroundImage.slice(5,-2);var b=a.canHaveChildren?a:a.parentElement;b.appendChild(_0);setOffsetLeft(a);setOffsetTop(a);b.removeChild(_0)};function bgLeft(a){a.style.backgroundPositionX=a.currentStyle.backgroundPositionX;if(!_2(a)){_d(a,"backgroundPositionX","(parseInt(runtimeStyle.offsetLeft)+document."+$viewport+".scrollLeft)||0")}};eval(C(bgLeft));function setOffsetLeft(a){var b=_2(a)?"backgroundPositionX":"offsetLeft";a.runtimeStyle[b]=getOffsetLeft(a,a.style.backgroundPositionX)-a.getBoundingClientRect().left-a.clientLeft+2};eval(C(setOffsetLeft));function getOffsetLeft(a,b){switch(b){case"left":case"top":return 0;case"right":case"bottom":return t.clientWidth-_0.offsetWidth;case"center":return(t.clientWidth-_0.offsetWidth)/2;default:if(M.test(b)){return parseInt((t.clientWidth-_0.offsetWidth)*parseFloat(b)/100)}_0.style.left=b;return _0.offsetLeft}};eval(C(getOffsetLeft));function _8(a){if(X(_8,a,bh(a))){N(a,"position","absolute");N(a,"left",a.currentStyle.left);N(a,"top",a.currentStyle.top);_6();IE7.Layout.fixRight(a);_7(a)}};function _7(a,b){positionTop(a,b);positionLeft(a,b,true);if(!a.runtimeStyle.autoLeft&&a.currentStyle.marginLeft=="auto"&&a.currentStyle.right!="auto"){var c=t.clientWidth-getPixelWidth(a,a.currentStyle.right)-getPixelWidth(a,a.runtimeStyle._c)-a.clientWidth;if(a.currentStyle.marginRight=="auto")c=parseInt(c/2);if(_2(a.offsetParent))a.runtimeStyle.pixelLeft+=c;else a.runtimeStyle.shiftLeft=c}clipWidth(a);clipHeight(a)};function clipWidth(a){var b=a.runtimeStyle.fixWidth;a.runtimeStyle.borderRightWidth="";a.runtimeStyle.width=b?getPixelWidth(a,b):"";if(a.currentStyle.width!="auto"){var c=a.getBoundingClientRect();var d=a.offsetWidth-t.clientWidth+c.left-2;if(d>=0){a.runtimeStyle.borderRightWidth="0px";d=Math.max(D(a,a.currentStyle.width)-d,0);N(a,"width",d);return d}}};eval(C(clipWidth));function positionLeft(a,b){if(!b&&M.test(a.currentStyle.width)){a.runtimeStyle.fixWidth=a.currentStyle.width}if(a.runtimeStyle.fixWidth){a.runtimeStyle.width=getPixelWidth(a,a.runtimeStyle.fixWidth)}a.runtimeStyle.shiftLeft=0;a.runtimeStyle._c=a.currentStyle.left;a.runtimeStyle.autoLeft=a.currentStyle.right!="auto"&&a.currentStyle.left=="auto";a.runtimeStyle.left="";a.runtimeStyle.screenLeft=getScreenLeft(a);a.runtimeStyle.pixelLeft=a.runtimeStyle.screenLeft;if(!b&&!_2(a.offsetParent)){_d(a,"pixelLeft","runtimeStyle.screenLeft+runtimeStyle.shiftLeft+document."+$viewport+".scrollLeft")}};eval(C(positionLeft));function getScreenLeft(a){var b=a.offsetLeft,c=1;if(a.runtimeStyle.autoLeft){b=t.clientWidth-a.offsetWidth-getPixelWidth(a,a.currentStyle.right)}if(a.currentStyle.marginLeft!="auto"){b-=getPixelWidth(a,a.currentStyle.marginLeft)}while(a=a.offsetParent){if(a.currentStyle.position!="static")c=-1;b+=a.offsetLeft*c}return b};eval(C(getScreenLeft));function getPixelWidth(a,b){return M.test(b)?parseInt(parseFloat(b)/100*t.clientWidth):D(a,b)};eval(C(getPixelWidth));function _j(){var a=_5.elements;for(var b in a)_a(a[b]);a=_8.elements;for(b in a){_7(a[b],true);_7(a[b],true)}_9=0};var _9;bC(function(){if(!_9)_9=setTimeout(_j,0)})};var bp={backgroundColor:"transparent",backgroundImage:"none",backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderTopStyle:"none",borderRightStyle:"none",borderBottomStyle:"none",borderLeftWidth:0,height:null,marginTop:0,marginBottom:0,marginRight:0,marginLeft:0,width:"100%"};IE7.CSS.addRecalc("overflow","visible",function(a){if(a.parentNode.ie7_wrapped)return;if(IE7.Layout&&a.currentStyle["max-height"]!="auto"){IE7.Layout.maxHeight(a)}if(a.currentStyle.marginLeft=="auto")a.style.marginLeft=0;if(a.currentStyle.marginRight=="auto")a.style.marginRight=0;var b=document.createElement(bN);b.ie7_wrapped=a;for(var c in bp){b.style[c]=a.currentStyle[c];if(bp[c]!=null){a.runtimeStyle[c]=bp[c]}}b.style.display="block";b.style.position="relative";a.runtimeStyle.position="absolute";a.parentNode.insertBefore(b,a);b.appendChild(a)});function cq(){var f="xx-small,x-small,small,medium,large,x-large,xx-large".split(",");for(var g=0;g=%2",f,g,c,d,"&&","%","==");if(h)j="!("+j+")";return j};bH={"link":"e%1.currentStyle['ie7-link']=='link'","visited":"e%1.currentStyle['ie7-link']=='visited'","checked":"e%1.checked","contains":"e%1.innerText.indexOf('%2')!=-1","disabled":"e%1.isDisabled","empty":"IE7._g(e%1)","enabled":"e%1.disabled===false","first-child":"!IE7._4(e%1)","lang":"IE7._h(e%1,'%2')","last-child":"!IE7._3(e%1)","only-child":"!IE7._4(e%1)&&!IE7._3(e%1)","target":"e%1.id==location.hash.slice(1)","indeterminate":"e%1.indeterminate"};IE7._i=function(a){if(a.rows){a.ie7_length=a.rows.length;a.ie7_lookup="rowIndex"}else if(a.cells){a.ie7_length=a.cells.length;a.ie7_lookup="cellIndex"}else if(a.ie7_indexed!=IE7._1){var b=0;var c=a.firstChild;while(c){if(c.nodeType==1&&c.nodeName!="!"){c.ie7_index=++b}c=c.nextSibling}a.ie7_length=b;a.ie7_lookup="ie7_index"}a.ie7_indexed=IE7._1;return a};var ba=E[V];var cs=ba[ba.length-1];ba.length--;E.merge({":not\\((\\*|[\\w-]+)?([^)]*)\\)":function(a,b,c){var d=(b&&b!="*")?i("if(e%1.nodeName=='%2'){",l,b.toUpperCase()):"";d+=E.exec(c);return"if(!"+d.slice(2,-1).replace(/\)\{if\(/g,"&&")+"){"},":nth(-last)?-child\\(([^)]+)\\)":function(a,b,c){p=false;b=i("e%1.parentNode.ie7_length",l);var d="if(p%1!==e%1.parentNode)p%1=IE7._i(e%1.parentNode);";d+="var i=e%1[p%1.ie7_lookup];if(p%1.ie7_lookup!='ie7_index')i++;if(";return i(d,l)+cr(a,c,"i",b)+"){"}});ba.push(cs);var bM="\\([^)]*\\)";if(IE7.CSS.pseudoClasses)IE7.CSS.pseudoClasses+="|";IE7.CSS.pseudoClasses+="before|after|last\\-child|only\\-child|empty|root|"+"not|nth\\-child|nth\\-last\\-child|contains|lang".split("|").join(bM+"|")+bM;bV.add(/::/,":");var bb=new A("focus",function(a){var b=arguments;IE7.CSS.addEventHandler(a,"onfocus",function(){bb.unregister(b);bb.register(b)});IE7.CSS.addEventHandler(a,"onblur",function(){bb.unregister(b)});if(a==document.activeElement){bb.register(b)}});var bq=new A("active",function(a){var b=arguments;IE7.CSS.addEventHandler(a,"onmousedown",function(){bq.register(b)})});v(document,"onmouseup",function(){var a=bq.instances;for(var b in a)bq.unregister(a[b])});var br=new A("checked",function(a){if(typeof a.checked!="boolean")return;var b=arguments;IE7.CSS.addEventHandler(a,"onpropertychange",function(){if(event.propertyName=="checked"){if(a.checked)br.register(b);else br.unregister(b)}});if(a.checked)br.register(b)});var bs=new A("enabled",function(a){if(typeof a.disabled!="boolean")return;var b=arguments;IE7.CSS.addEventHandler(a,"onpropertychange",function(){if(event.propertyName=="disabled"){if(!a.isDisabled)bs.register(b);else bs.unregister(b)}});if(!a.isDisabled)bs.register(b)});var bt=new A("disabled",function(a){if(typeof a.disabled!="boolean")return;var b=arguments;IE7.CSS.addEventHandler(a,"onpropertychange",function(){if(event.propertyName=="disabled"){if(a.isDisabled)bt.register(b);else bt.unregister(b)}});if(a.isDisabled)bt.register(b)});var bu=new A("indeterminate",function(a){if(typeof a.indeterminate!="boolean")return;var b=arguments;IE7.CSS.addEventHandler(a,"onpropertychange",function(){if(event.propertyName=="indeterminate"){if(a.indeterminate)bu.register(b);else bu.unregister(b)}});IE7.CSS.addEventHandler(a,"onclick",function(){bu.unregister(b)})});var bv=new A("target",function(a){var b=arguments;if(!a.tabIndex)a.tabIndex=0;IE7.CSS.addEventHandler(document,"onpropertychange",function(){if(event.propertyName=="activeElement"){if(a.id&&a.id==location.hash.slice(1))bv.register(b);else bv.unregister(b)}});if(a.id&&a.id==location.hash.slice(1))bv.register(b)});var ct=/^attr/;var cu=/^url\s*\(\s*([^)]*)\)$/;var cv={before0:"beforeBegin",before1:"afterBegin",after0:"afterEnd",after1:"beforeEnd"};var F=IE7.PseudoElement=o.extend({constructor:function(a,b,c){this.position=b;var d=c.match(F.CONTENT),f,g;if(d){d=d[1];f=d.split(/\s+/);for(var h=0;(g=f[h]);h++){f[h]=ct.test(g)?{attr:g.slice(5,-1)}:(g.charAt(0)=="'")?bB(g):bg(g)}d=f}this.content=d;this.base(a,bg(c))},init:function(){this.match=x(this.selector);for(var a=0;a%4",MATCH:/(.*):(before|after).*/,count:0});var cw=/^(submit|reset|button)$/;IE7.HTML.addRecalc("button,input",function(a){if(a.tagName=="BUTTON"){var b=a.outerHTML.match(/ value="([^"]*)"/i);a.runtimeStyle.value=(b)?b[1]:""}if(a.type=="submit"){v(a,"onclick",function(){a.runtimeStyle.clicked=true;setTimeout("document.all."+a.uniqueID+".runtimeStyle.clicked=false",1)})}});IE7.HTML.addRecalc("form",function(c){v(c,"onsubmit",function(){for(var a,b=0;a=c[b];b++){if(cw.test(a.type)&&!a.disabled&&!a.runtimeStyle.clicked){a.disabled=true;setTimeout("document.all."+a.uniqueID+".disabled=false",1)}else if(a.tagName=="BUTTON"&&a.type=="submit"){setTimeout("document.all."+a.uniqueID+".value='"+a.value+"'",1);a.value=a.runtimeStyle.value}}})});IE7.HTML.addRecalc("img",function(a){if(a.alt&&!a.title)a.title=""});IE7.CSS.addRecalc("border-spacing",P,function(a){if(a.currentStyle.borderCollapse!="collapse"){a.cellSpacing=D(a,a.currentStyle["border-spacing"])}});IE7.CSS.addRecalc("box-sizing","content-box",IE7.Layout.boxSizing);IE7.CSS.addRecalc("box-sizing","border-box",IE7.Layout.borderBox);IE7.CSS.addFix(/opacity\s*:\s*([\d.]+)/,function(a,b){return"zoom:1;filter:Alpha(opacity="+((b*100)||1)+")"});var cx=/^image/i;IE7.HTML.addRecalc("object",function(a){if(cx.test(a.type)){a.body.style.cssText="margin:0;padding:0;border:none;overflow:hidden";return a}});IE7.loaded=true;(function(){try{bx.doScroll("left")}catch(e){setTimeout(arguments.callee,1);return}try{eval(bO.innerHTML)}catch(e){}bm=new RegExp(W(typeof IE7_PNG_SUFFIX=="string"?IE7_PNG_SUFFIX:"-trans.png")+"$","i");w=document.body;t=G?w:bx;w.className+=" ie7_body";bx.className+=" ie7_html";if(G)cq();IE7.CSS.init();IE7.HTML.init();IE7.HTML.apply();IE7.CSS.apply();IE7.recalc()})()})();
\ No newline at end of file
diff --git a/admin/js/ie7/blank.gif b/admin/js/ie7/blank.gif
new file mode 100644
index 0000000..a4fe2e6
Binary files /dev/null and b/admin/js/ie7/blank.gif differ
diff --git a/admin/js/ie7/ie7-recalc.js b/admin/js/ie7/ie7-recalc.js
new file mode 100644
index 0000000..f07c5a6
--- /dev/null
+++ b/admin/js/ie7/ie7-recalc.js
@@ -0,0 +1,2 @@
+/* IE7/IE8.js - copyright 2004-2008, Dean Edwards */
+(function(){if(!IE7.loaded)return;CLASSES=/\sie7_class\d+/g;IE7.CSS.extend({elements:{},handlers:[],reset:function(){this.removeEventHandlers();var a=this.elements;for(var b in a)a[b].runtimeStyle.cssText="";this.elements={};var a=IE7.Rule.elements;for(var b in a){with(a[b])className=className.replace(CLASSES,"")}IE7.Rule.elements={}},reload:function(){this.rules=[];this.getInlineStyles();this.screen.load();if(this.print)this.print.load();this.refresh();this.trash()},addRecalc:function(b,c,d,e){this.base(b,c,function(a){d(a);IE7.CSS.elements[a.uniqueID]=a},e)},recalc:function(){this.reset();this.base()},addEventHandler:function(a,b,c){a.attachEvent(b,c);this.handlers.push(arguments)},removeEventHandlers:function(){var a;while(a=this.handlers.pop()){a[0].detachEvent(a[1],a[2])}},getInlineStyles:function(){var a=document.getElementsByTagName("style"),b;for(var c=a.length-1;(b=a[c]);c--){if(!b.disabled&&!b.ie7){var d=b.cssText||b.innerHTML;this.styles.push(d);b.cssText=d}}},trash:function(){var a=document.styleSheets,b,c;for(c=0;c= 6) IE7.CSS.addRecalc("float", "(left|right)", function(element) {
+ IE7.Layout.boxSizing(element.parentElement); // assing "hasLayout" to parent element
+ // "doubled margin" bug
+ element.style.display = "inline";
+ });
+
+ // "unscrollable content" bug
+ // http://www.positioniseverything.net/explorer/unscrollable.html
+ IE7.CSS.addRecalc("position", "absolute|fixed", function(element) {
+ if (element.offsetParent && element.offsetParent.currentStyle.position == "relative")
+ IE7.Layout.boxSizing(element.offsetParent); // assing "hasLayout"
+ });
+}
+
+//# // get rid of Microsoft's pesky image toolbar
+//# document.write(' ');
diff --git a/admin/js/jquery/jquery.bgFade.js b/admin/js/jquery/jquery.bgFade.js
new file mode 100644
index 0000000..cdf201a
--- /dev/null
+++ b/admin/js/jquery/jquery.bgFade.js
@@ -0,0 +1,7 @@
+
+jQuery.fn.backgroundFade=function(s,callback){var defaults={sColor:[255,0,0],eColor:[255,255,255],fColor:null,steps:200,intervals:5,powr:4},params=jQuery.extend(defaults,s);return this.each(function(){this.bgFade_sColor=jQuery.backgroundFade.parseHexColor(params.sColor);this.bgFade_eColor=jQuery.backgroundFade.parseHexColor(params.eColor);this.bgFade_fColor=params.fColor?params.fColor:jQuery(this).css('backgroundColor');this.bgFade_steps=params.steps;this.bgFade_intervals=params.intervals;this.bgFade_powr=params.powr;this.bgFade_fn=callback;jQuery.backgroundFade.doFade(this);});};jQuery.backgroundFade={parseHexColor:function(c){if(c.constructor==String&&c.substr(0,1)=='#'){return[parseInt(c.substr(1,2),16),parseInt(c.substr(3,2),16),parseInt(c.substr(5,2),16)];}
+return c;},easeInOut:function(minValue,maxValue,totalSteps,actualStep,powr){var delta=maxValue-minValue;var stepp=minValue+(Math.pow(((1/totalSteps)*actualStep),powr)*delta);return Math.ceil(stepp);},doFade:function(e){if(e.bgFadeInt)window.clearInterval(e.bgFadeInt);var act_step=0;e.bgFadeInt=window.setInterval(function(){e.style.backgroundColor="rgb("+
+jQuery.backgroundFade.easeInOut(e.bgFade_sColor[0],e.bgFade_eColor[0],e.bgFade_steps,act_step,e.bgFade_powr)+","+
+jQuery.backgroundFade.easeInOut(e.bgFade_sColor[1],e.bgFade_eColor[1],e.bgFade_steps,act_step,e.bgFade_powr)+","+
+jQuery.backgroundFade.easeInOut(e.bgFade_sColor[2],e.bgFade_eColor[2],e.bgFade_steps,act_step,e.bgFade_powr)+")";act_step++;if(act_step>e.bgFade_steps){window.clearInterval(e.bgFadeInt);e.bgFade_sColor=undefined;e.bgFade_eColor=undefined;e.bgFade_fColor=undefined;e.bgFade_steps=undefined;e.bgFade_intervals=undefined;e.bgFade_powr=undefined;if(typeof(e.bgFade_fn)=='function'){e.bgFade_fn.call(e);}
+e.style.backgroundColor=e.bgFade_fColor;}},e.bgFade_intervals);}};
\ No newline at end of file
diff --git a/admin/js/jquery/jquery.biscuit.js b/admin/js/jquery/jquery.biscuit.js
new file mode 100644
index 0000000..8b74194
--- /dev/null
+++ b/admin/js/jquery/jquery.biscuit.js
@@ -0,0 +1,5 @@
+
+jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toGMTString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
+expires='; expires='+date.toGMTString();}
+var path=options.path?'; path='+options.path:'';var domain=options.domain?'; domain='+options.domain:'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');return null;}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i'+' '+' '+' '+' '+' '+'';this.container=$(' ');if(this.params.target_element==null){this.container.css({display:'block',position:'absolute',left:$(document).scrollLeft()+'px',top:$(document).scrollTop()+'px',width:'30px',height:'30px',background:'#f00'});$('body').append(this.container);}else{$(this.params.target_element).append(this.container);this.container.css({display:'block',position:'absolute',top:0,left:0,zIndex:1});}
+this.container[0].innerHTML=flash;this.movie=document.getElementById(this.params.movie_name);return this;},addFlashVar:function(fv,n,v){if(v!=null){fv.push(n+'='+encodeURIComponent(v));}},flashBind:function(){_this=this;var events={flashReady:function(){if(window[_this.params.movie_name]==undefined){window[_this.params.movie_name]=_this.movie;}
+_this.flashBindEvent('flashReady',arguments);},fileDialogComplete:function(){_this.flashBindEvent('fileDialogComplete',arguments);},fileDialogStart:function(){_this.flashBindEvent('fileDialogStart',arguments);},fileQueued:function(file_object){_this.flashBindEvent('fileQueued',arguments);},fileQueueError:function(file_object,error_code,error_msg){_this.flashBindEvent('fileQueueError',arguments);},uploadStart:function(){_this.flashBindEvent('uploadStart',arguments);},uploadProgress:function(){_this.flashBindEvent('uploadProgress',arguments);},uploadError:function(){_this.flashBindEvent('uploadError',arguments);},uploadSuccess:function(){_this.flashBindEvent('uploadSuccess',arguments);},uploadComplete:function(){_this.flashBindEvent('uploadComplete',arguments);},debug:function(){_this.flashBindEvent('debug',arguments);}};window.SWFUpload.instances[this.params.movie_name]=events;window.SWFUpload.movieCount++;},flashEventQueue:[],flashBindEvent:function(evt,a){a=a||new Array();var _this=this;if($.isFunction(this.callbacks[evt])){this.flashEventQueue.push(function(){this.callbacks[evt].apply(this,a);});setTimeout(function(){_this.flashExecuteNextEvent();},0);}else if(this.callbacks[evt]!==null){throw'Event handler '+evt+' is unknown or is not a function';}},flashExecuteNextEvent:function(){var f=this.flashEventQueue?this.flashEventQueue.shift():null;if($.isFunction(f)){f.apply(this);}},destroy:function(){try{this.StopUpload();$(this.movie).remove();SWFUpload.instances[this.params.movie_name]=null;SWFUpload.movieCount--;delete SWFUpload.instances[this.movieName];delete window[this.movieName];return true;}catch(e){return false;}},StartUpload:function(file_id){return this.movie.StartUpload(file_id);},ReturnUploadStart:function(value){return this.movie.ReturnUploadStart(value);},StopUpload:function(){return this.movie.StopUpload();},CancelUpload:function(file_id){return this.movie.CancelUpload(file_id);},GetStats:function(){return this.movie.GetStats();},SetStats:function(stats){return this.movie.SetStats(stats);},GetFile:function(file_id){return this.movie.GetFile(file_id);},GetFileByIndex:function(file_index){return this.movie.GetFileByIndex(file_index);},getFileSizeLimit:function(size){var value=0;var unit='kb';size=$.trim(size.toLowerCase());var values=size.match(/^\d+/);if(values!=null&&values.length>0){value=parseInt(values[0]);}
+var units=size.match(/(b|kb|mb|gb)/);if(units!=null&&units.length>0){unit=units[0];}
+var multiplier=1024;if(unit==="b"){multiplier=1;}else if(unit==="mb"){multiplier=1048576;}else if(unit==="gb"){multiplier=1073741824;}
+return value*multiplier;}};})(jQuery);(function($){$.fn.candyUpload=function(settings,callbacks){new $._candyUpload(this,settings,callbacks);return this;};$._candyUpload=function(target,settings,callbacks){var defaults={debug:false,upload_url:'',params:null,flash_movie:'',file_types:'*.*',file_types_description:'All files',file_size_limit:0,file_upload_limit:0,file_queue_limit:-1,callbacks:{}};this.params=$.extend(defaults,settings);this.params.movie_name='SWFU-'+(window.SWFUpload.instances.length+1);this.target=target;this.createControls();this.target.hide().after(this.ctrl.block).hide();this.params.target_element=this.ctrl.btn_browse.parent().get(0);var _this=this;this.upldr=$.uploader(this.params,{debug:function(msg){$('body').append(''+msg+' ');_this.bindEvent('debug',arguments);},flashReady:function(){_this.initControls(this);_this.bindEvent('flashReady',arguments);this.movie.style.width=_this.ctrl.btn_browse.width()+'px';this.movie.style.height=_this.ctrl.btn_browse.height()+'px';},fileDialogComplete:function(num_ref_files,num_queue_files){_this.bindEvent('fileDialogComplete',arguments);},fileDialogStart:function(){_this.bindEvent('fileQueued',arguments);},fileQueued:function(o){_this.appendFile(this,o);_this.refreshControls(this);_this.bindEvent('fileQueued',arguments);},fileQueueError:function(o,code,msg){var codes=window.SWFUpload.QUEUE_ERROR;switch(code){case codes.QUEUE_LIMIT_EXCEEDED:_this.queueErrorMsg(_this.locales.limit_exceeded);break;case codes.FILE_EXCEEDS_SIZE_LIMIT:_this.queueErrorMsg(_this.locales.size_limit_exceeded);break;case codes.ZERO_BYTE_FILE:case codes.INVALID_FILETYPE:_this.queueErrorMsg(msg);break;}
+_this.bindEvent('fileQueueError',arguments);},uploadStart:function(){this.ReturnUploadStart(true);_this.bindEvent('uploadStart',arguments);},uploadProgress:function(o,bytes,total){_this.fileProgressBar(o.id,bytes,total);_this.bindEvent('uploadProgress',arguments);},uploadError:function(o,code,msg){var codes=window.SWFUpload.UPLOAD_ERROR;switch(code){case codes.FILE_CANCELLED:_this.fileErrorMsg(o.id,_this.locales.canceled);break;case codes.HTTP_ERROR:_this.fileErrorMsg(o.id,_this.locales.http_error+' '+msg);break;case codes.MISSING_UPLOAD_URL:case codes.IO_ERROR:case codes.SECURITY_ERROR:case codes.UPLOAD_LIMIT_EXCEEDED:case codes.UPLOAD_FAILED:case codes.SPECIFIED_FILE_ID_NOT_FOUND:case codes.FILE_VALIDATION_FAILED:case codes.FILE_CANCELLED:case codes.UPLOAD_STOPPED:_this.fileErrorMsg(o.id,_this.locales.error+' '+msg);break;}
+_this.refreshControls(this);_this.removeFileCancel(o);_this.bindEvent('uploadError',arguments);},uploadSuccess:function(o,data){_this.fileProgressBar(o.id,1,1);_this.refreshControls(this);_this.removeFileCancel(o);_this.bindEvent('uploadSuccess',arguments);},uploadComplete:function(o){this.StartUpload();_this.refreshControls(this);_this.bindEvent('uploadComplete',arguments);}});};$._candyUpload.prototype={locales:{max_file_size:'Maximum file size allowed:',limit_exceeded:'Limit exceeded.',size_limit_exceeded:'File size exceeds allowed limit.',canceled:'Canceled.',http_error:'HTTP Error:',error:'Error:',choose_file:'Choose file',choose_files:'Choose files',cancel:'Cancel',clean:'Clean',upload:'Upload',no_file_in_queue:'No file in queue.',file_in_queue:'1 file in queue.',files_in_queue:'%d files in queue.',queue_error:'Queue error:'},ctrl:{block:$('
'),files:null},createControls:function(){this.ctrl.btn_browse=$(' ').click(function(){return false;});this.ctrl.btn_cancel=$(''+this.locales.cancel+' ').click(function(){return false;});this.ctrl.btn_clean=$(''+this.locales.clean+' ').click(function(){return false;});this.ctrl.btn_upload=$(''+this.locales.upload+' ').click(function(){return false;});this.ctrl.msg=$(''+this.locales.no_file_in_queue+'
').appendTo(this.ctrl.block);var btn=$('
').appendTo(this.ctrl.block);var brw=$(' ').append(this.ctrl.btn_browse).appendTo(btn);$(' ').append(this.ctrl.btn_upload).appendTo(btn).hide();$(' ').append(this.ctrl.btn_cancel).appendTo(btn).hide();$(' ').append(this.ctrl.btn_clean).appendTo(btn).hide();this.bindEvent('createControls');},initControls:function(upldr){if(this.params.file_queue_limit==1){this.ctrl.btn_browse.text(this.locales.choose_file);}else{this.ctrl.btn_browse.text(this.locales.choose_files);}
+var _this=this;this.ctrl.btn_cancel.click(function(){_this.cancelQueue(upldr);return false;});this.ctrl.btn_clean.click(function(){_this.cleanQueue(upldr);return false;});this.ctrl.btn_upload.click(function(){_this.uploadQueue(upldr);return false;});var size=this.formatSize(upldr.params.file_size_limit);$(''+this.locales.max_file_size+' '+size+'
').appendTo(this.ctrl.block);},refreshControls:function(upldr){if(!this.ctrl.files||this.ctrl.files.length==0){return;}
+var stats=upldr.GetStats();if(stats.files_queued>0){this.ctrl.btn_cancel.parent().show();this.ctrl.btn_upload.parent().show();if(this.params.file_queue_limit>0&&this.params.file_queue_limit==stats.files_queued){this.ctrl.btn_browse.hide();}else{this.ctrl.btn_browse.show();}
+if(stats.files_queued>1){var msg=this.locales.files_in_queue.replace(/%d/,stats.files_queued);}else{var msg=this.locales.file_in_queue;}}else{this.ctrl.btn_browse.show();this.ctrl.btn_cancel.parent().hide();this.ctrl.btn_upload.parent().hide();var msg=this.locales.no_file_in_queue;}
+this.ctrl.msg.removeClass('cu-error').text(msg);if(stats.successful_uploads>0||stats.upload_errors>0||stats.upload_cancelled>0){this.ctrl.btn_clean.parent().show();}else{this.ctrl.btn_clean.parent().hide();}},removeFileCancel:function(o){$('#'+o.id+' span.cu-filecancel',this.ctrl.files).remove();},appendFile:function(upldr,o){if(!this.ctrl.files){this.ctrl.files=$('
');this.ctrl.msg.after(this.ctrl.files);}
+var fileblock=$(''+'
'+o.name+' '+'
('+this.formatSize(o.size)+') '+'
cancel '+'
'+'
');$('span.cu-filecancel a',fileblock).click(function(){upldr.CancelUpload(o.id);return false;});this.ctrl.files.append(fileblock);},fileProgressBar:function(file_id,bytes,total){var bar=$('#'+file_id+' div.cu-progress>div',this.ctrl.files);if(bar.length==0){$('#'+file_id,this.ctrl.files).append('
');bar=$('#'+file_id+' div.cu-progress>div',this.ctrl.files);}
+var percent=Math.round((bytes*100)/total);bar.css('width',percent+'%').text(percent+'%');},fileMsg:function(file_id,msg,error){error=error||false;var span=$('#'+file_id+' span.cu-filemsg',this.ctrl.files).attr('class','cu-filemsg');if(error){span.addClass('cu-error');}
+span.text(msg);},fileErrorMsg:function(file_id,msg){this.fileMsg(file_id,msg,true);},cancelQueue:function(upldr){if(!this.ctrl.files||this.ctrl.files.length==0){return;}
+this.ctrl.files.children('div').each(function(){upldr.CancelUpload(this.id);});},uploadQueue:function(upldr){if(!this.ctrl.files||this.ctrl.files.length==0){return;}
+upldr.StartUpload();},cleanQueue:function(upldr){var _this=this;var e=$('div.cu-file',this.ctrl.files).not(':has(span.cu-filecancel a)');e.filter(':last').slideUp(200,function(){$(this).remove();if(e.length==1){upldr.SetStats({successful_uploads:0,upload_errors:0,upload_cancelled:0});_this.refreshControls(upldr);}else if(e.length>1){_this.cleanQueue(upldr);}});},queueErrorMsg:function(msg){this.ctrl.msg.addClass('cu-error').text(this.locales.queue_error+' '+msg);},formatSize:function(s){var a_size=Array('B','KB','MB','GB','TB');var i_index=0;while(s>1024){i_index++;s/=1024;}
+return(Math.round(s*100)/100)+' '+a_size[i_index];},bindEvent:function(evt,a){if(this.params.callbacks[evt]!=undefined&&$.isFunction(this.params.callbacks[evt])){a=a||new Array();this.params.callbacks[evt].apply(this,a);}}};})(jQuery);
\ No newline at end of file
diff --git a/admin/js/jquery/jquery.farbtastic.js b/admin/js/jquery/jquery.farbtastic.js
new file mode 100644
index 0000000..a758344
--- /dev/null
+++ b/admin/js/jquery/jquery.farbtastic.js
@@ -0,0 +1,22 @@
+
+jQuery.fn.farbtastic=function(callback){$.farbtastic(this,callback);return this;};jQuery.farbtastic=function(container,callback){var container=$(container).get(0);return container.farbtastic||(container.farbtastic=new jQuery._farbtastic(container,callback));};jQuery._farbtastic=function(container,callback){var fb=this;$(container).html('
');var e=$('.farbtastic',container);fb.wheel=$('.wheel',container).get(0);fb.radius=84;fb.square=100;fb.width=194;if(navigator.appVersion.match(/MSIE [0-6]\./)){$('*',e).each(function(){if(this.currentStyle.backgroundImage!='none'){var image=this.currentStyle.backgroundImage;image=this.currentStyle.backgroundImage.substring(5,image.length-2);$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"});}});}
+fb.linkTo=function(callback){if(typeof fb.callback=='object'){$(fb.callback).unbind('keyup',fb.updateValue);}
+fb.color=null;if(typeof callback=='function'){fb.callback=callback;}
+else if(typeof callback=='object'||typeof callback=='string'){fb.callback=$(callback);fb.callback.bind('keyup',fb.updateValue);if(fb.callback.get(0).value){fb.setColor(fb.callback.get(0).value);}}
+return this;};fb.updateValue=function(event){if(this.value&&this.value!=fb.color){fb.setColor(this.value);}};fb.setColor=function(color){var unpack=fb.unpack(color);if(fb.color!=color&&unpack){fb.color=color;fb.rgb=unpack;fb.hsl=fb.RGBToHSL(fb.rgb);fb.updateDisplay();}
+return this;};fb.setHSL=function(hsl){fb.hsl=hsl;fb.rgb=fb.HSLToRGB(hsl);fb.color=fb.pack(fb.rgb);fb.updateDisplay();return this;};fb.widgetCoords=function(event){var x,y;var el=event.target||event.srcElement;var reference=fb.wheel;if(typeof event.offsetX!='undefined'){var pos={x:event.offsetX,y:event.offsetY};var e=el;while(e){e.mouseX=pos.x;e.mouseY=pos.y;pos.x+=e.offsetLeft;pos.y+=e.offsetTop;e=e.offsetParent;}
+var e=reference;var offset={x:0,y:0};while(e){if(typeof e.mouseX!='undefined'){x=e.mouseX-offset.x;y=e.mouseY-offset.y;break;}
+offset.x+=e.offsetLeft;offset.y+=e.offsetTop;e=e.offsetParent;}
+e=el;while(e){e.mouseX=undefined;e.mouseY=undefined;e=e.offsetParent;}}
+else{var pos=fb.absolutePosition(reference);x=(event.pageX||0*(event.clientX+$('html').get(0).scrollLeft))-pos.x;y=(event.pageY||0*(event.clientY+$('html').get(0).scrollTop))-pos.y;}
+return{x:x-fb.width/2,y:y-fb.width/2};};fb.mousedown=function(event){if(!document.dragging){$(document).bind('mousemove',fb.mousemove).bind('mouseup',fb.mouseup);document.dragging=true;}
+var pos=fb.widgetCoords(event);fb.circleDrag=Math.max(Math.abs(pos.x),Math.abs(pos.y))*2>fb.square;fb.mousemove(event);return false;};fb.mousemove=function(event){var pos=fb.widgetCoords(event);if(fb.circleDrag){var hue=Math.atan2(pos.x,-pos.y)/6.28;if(hue<0)hue+=1;fb.setHSL([hue,fb.hsl[1],fb.hsl[2]]);}
+else{var sat=Math.max(0,Math.min(1,-(pos.x/fb.square)+.5));var lum=Math.max(0,Math.min(1,-(pos.y/fb.square)+.5));fb.setHSL([fb.hsl[0],sat,lum]);}
+return false;};fb.mouseup=function(){$(document).unbind('mousemove',fb.mousemove);$(document).unbind('mouseup',fb.mouseup);document.dragging=false;};fb.updateDisplay=function(){var angle=fb.hsl[0]*6.28;$('.h-marker',e).css({left:Math.round(Math.sin(angle)*fb.radius+fb.width/2)+'px',top:Math.round(-Math.cos(angle)*fb.radius+fb.width/2)+'px'});$('.sl-marker',e).css({left:Math.round(fb.square*(.5-fb.hsl[1])+fb.width/2)+'px',top:Math.round(fb.square*(.5-fb.hsl[2])+fb.width/2)+'px'});$('.color',e).css('backgroundColor',fb.pack(fb.HSLToRGB([fb.hsl[0],1,0.5])));if(typeof fb.callback=='object'){$(fb.callback).css({backgroundColor:fb.color,color:fb.hsl[2]>0.5?'#000':'#fff'});$(fb.callback).each(function(){if(this.value!=fb.color){this.value=fb.color;}});}
+else if(typeof fb.callback=='function'){fb.callback.call(fb,fb.color);}};fb.absolutePosition=function(el){var r={x:el.offsetLeft,y:el.offsetTop};if(el.offsetParent){var tmp=fb.absolutePosition(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y;}
+return r;};fb.pack=function(rgb){var r=Math.round(rgb[0]*255);var g=Math.round(rgb[1]*255);var b=Math.round(rgb[2]*255);return'#'+(r<16?'0':'')+r.toString(16)+
+(g<16?'0':'')+g.toString(16)+
+(b<16?'0':'')+b.toString(16);};fb.unpack=function(color){if(color.length==7){return[parseInt('0x'+color.substring(1,3))/255,parseInt('0x'+color.substring(3,5))/255,parseInt('0x'+color.substring(5,7))/255];}
+else if(color.length==4){return[parseInt('0x'+color.substring(1,2))/15,parseInt('0x'+color.substring(2,3))/15,parseInt('0x'+color.substring(3,4))/15];}};fb.HSLToRGB=function(hsl){var m1,m2,r,g,b;var h=hsl[0],s=hsl[1],l=hsl[2];m2=(l<=0.5)?l*(s+1):l+s-l*s;m1=l*2-m2;return[this.hueToRGB(m1,m2,h+0.33333),this.hueToRGB(m1,m2,h),this.hueToRGB(m1,m2,h-0.33333)];};fb.hueToRGB=function(m1,m2,h){h=(h<0)?h+1:((h>1)?h-1:h);if(h*6<1)return m1+(m2-m1)*h*6;if(h*2<1)return m2;if(h*3<2)return m1+(m2-m1)*(0.66666-h)*6;return m1;};fb.RGBToHSL=function(rgb){var min,max,delta,h,s,l;var r=rgb[0],g=rgb[1],b=rgb[2];min=Math.min(r,Math.min(g,b));max=Math.max(r,Math.max(g,b));delta=max-min;l=(min+max)/2;s=0;if(l>0&&l<1){s=delta/(l<0.5?(2*l):(2-2*l));}
+h=0;if(delta>0){if(max==r&&max!=g)h+=(g-b)/delta;if(max==g&&max!=b)h+=(2+(b-r)/delta);if(max==b&&max!=r)h+=(4+(r-g)/delta);h/=6;}
+return[h,s,l];};$('*',e).mousedown(fb.mousedown);fb.setColor('#000000');if(callback){fb.linkTo(callback);}};
\ No newline at end of file
diff --git a/admin/js/jquery/jquery.js b/admin/js/jquery/jquery.js
new file mode 100644
index 0000000..4071503
--- /dev/null
+++ b/admin/js/jquery/jquery.js
@@ -0,0 +1,432 @@
+
+(function(){var
+window=this,undefined,_jQuery=window.jQuery,_$=window.$,jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);},quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;this.context=selector;return this;}
+if(typeof selector==="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])
+selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem&&elem.id!=match[3])
+return jQuery().find(selector);var ret=jQuery(elem||[]);ret.context=document;ret.selector=selector;return ret;}}else
+return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))
+return jQuery(document).ready(selector);if(selector.selector&&selector.context){this.selector=selector.selector;this.context=selector.context;}
+return this.setArray(jQuery.isArray(selector)?selector:jQuery.makeArray(selector));},selector:"",jquery:"1.3.2",size:function(){return this.length;},get:function(num){return num===undefined?Array.prototype.slice.call(this):this[num];},pushStack:function(elems,name,selector){var ret=jQuery(elems);ret.prevObject=this;ret.context=this.context;if(name==="find")
+ret.selector=this.selector+(this.selector?" ":"")+selector;else if(name)
+ret.selector=this.selector+"."+name+"("+selector+")";return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(typeof name==="string")
+if(value===undefined)
+return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}
+return this.each(function(i){for(name in options)
+jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)
+value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!=="object"&&text!=null)
+return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)
+ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).clone();if(this[0].parentNode)
+wrap.insertBefore(this[0]);wrap.map(function(){var elem=this;while(elem.firstChild)
+elem=elem.firstChild;return elem;}).append(this);}
+return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1)
+this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1)
+this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},push:[].push,sort:[].sort,splice:[].splice,find:function(selector){if(this.length===1){var ret=this.pushStack([],"find",selector);ret.length=0;jQuery.find(selector,this[0],ret);return ret;}else{return this.pushStack(jQuery.unique(jQuery.map(this,function(elem){return jQuery.find(selector,elem);})),"find",selector);}},clone:function(events){var ret=this.map(function(){if(!jQuery.support.noCloneEvent&&!jQuery.isXMLDoc(this)){var html=this.outerHTML;if(!html){var div=this.ownerDocument.createElement("div");div.appendChild(this.cloneNode(true));html=div.innerHTML;}
+return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0];}else
+return this.cloneNode(true);});if(events===true){var orig=this.find("*").andSelf(),i=0;ret.find("*").andSelf().each(function(){if(this.nodeName!==orig[i].nodeName)
+return;var events=jQuery.data(orig[i],"events");for(var type in events){for(var handler in events[type]){jQuery.event.add(this,type,events[type][handler],events[type][handler].data);}}
+i++;});}
+return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,jQuery.grep(this,function(elem){return elem.nodeType===1;})),"filter",selector);},closest:function(selector){var pos=jQuery.expr.match.POS.test(selector)?jQuery(selector):null,closer=0;return this.map(function(){var cur=this;while(cur&&cur.ownerDocument){if(pos?pos.index(cur)>-1:jQuery(cur).is(selector)){jQuery.data(cur,"closest",closer);return cur;}
+cur=cur.parentNode;closer++;}});},not:function(selector){if(typeof selector==="string")
+if(isSimple.test(selector))
+return this.pushStack(jQuery.multiFilter(selector,this,true),"not",selector);else
+selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector==="string"?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return!!selector&&this.is("."+selector);},val:function(value){if(value===undefined){var elem=this[0];if(elem){if(jQuery.nodeName(elem,'option'))
+return(elem.attributes.value||{}).specified?elem.value:elem.text;if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)
+return null;for(var i=one?index:0,max=one?index+1:options.length;i
=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)
+this.selectedIndex=-1;}else
+this.value=value;});},html:function(value){return value===undefined?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,+i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},domManip:function(args,table,callback){if(this[0]){var fragment=(this[0].ownerDocument||this[0]).createDocumentFragment(),scripts=jQuery.clean(args,(this[0].ownerDocument||this[0]),fragment),first=fragment.firstChild;if(first)
+for(var i=0,l=this.length;i1||i>0?fragment.cloneNode(true):fragment);if(scripts)
+jQuery.each(scripts,evalScript);}
+return this;function root(elem,cur){return table&&jQuery.nodeName(elem,"table")&&jQuery.nodeName(cur,"tr")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem;}}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)
+jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
+jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)
+elem.parentNode.removeChild(elem);}
+function now(){return+new Date;}
+jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2;}
+if(typeof target!=="object"&&!jQuery.isFunction(target))
+target={};if(length==i){target=this;--i;}
+for(;i-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}
+callback.call(elem);for(var name in options)
+elem.style[name]=old[name];},css:function(elem,name,force,extra){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;if(extra==="border")
+return;jQuery.each(which,function(){if(!extra)
+val-=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;if(extra==="margin")
+val+=parseFloat(jQuery.curCSS(elem,"margin"+this,true))||0;else
+val-=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});}
+if(elem.offsetWidth!==0)
+getWH();else
+jQuery.swap(elem,props,getWH);return Math.max(0,Math.round(val));}
+return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;if(name=="opacity"&&!jQuery.support.opacity){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}
+if(name.match(/float/i))
+name=styleFloat;if(!force&&style&&style[name])
+ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))
+name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle)
+ret=computedStyle.getPropertyValue(name);if(name=="opacity"&&ret=="")
+ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}
+return ret;},clean:function(elems,context,fragment){context=context||document;if(typeof context.createElement==="undefined")
+context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;if(!fragment&&elems.length===1&&typeof elems[0]==="string"){var match=/^<(\w+)\s*\/?>$/.exec(elems[0]);if(match)
+return[context.createElement(match[1])];}
+var ret=[],scripts=[],div=context.createElement("div");jQuery.each(elems,function(i,elem){if(typeof elem==="number")
+elem+='';if(!elem)
+return;if(typeof elem==="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+">"+tag+">";});var tags=elem.replace(/^\s+/,"").substring(0,10).toLowerCase();var wrap=!tags.indexOf("",""]||!tags.indexOf("",""]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,""]||!tags.indexOf(""," "]||(!tags.indexOf(""," "]||!tags.indexOf(""," "]||!jQuery.support.htmlSerialize&&[1,"div","
"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)
+div=div.lastChild;if(!jQuery.support.tbody){var hasBody=/"&&!hasBody?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)
+if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)
+tbody[j].parentNode.removeChild(tbody[j]);}
+if(!jQuery.support.leadingWhitespace&&/^\s/.test(elem))
+div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);elem=jQuery.makeArray(div.childNodes);}
+if(elem.nodeType)
+ret.push(elem);else
+ret=jQuery.merge(ret,elem);});if(fragment){for(var i=0;ret[i];i++){if(jQuery.nodeName(ret[i],"script")&&(!ret[i].type||ret[i].type.toLowerCase()==="text/javascript")){scripts.push(ret[i].parentNode?ret[i].parentNode.removeChild(ret[i]):ret[i]);}else{if(ret[i].nodeType===1)
+ret.splice.apply(ret,[i+1,0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))));fragment.appendChild(ret[i]);}}
+return scripts;}
+return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)
+return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&elem.parentNode)
+elem.parentNode.selectedIndex;if(name in elem&¬xml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)
+throw"type property can't be changed";elem[name]=value;}
+if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))
+return elem.getAttributeNode(name).nodeValue;if(name=="tabIndex"){var attributeNode=elem.getAttributeNode("tabIndex");return attributeNode&&attributeNode.specified?attributeNode.value:elem.nodeName.match(/(button|input|object|select|textarea)/i)?0:elem.nodeName.match(/^(a|area)$/i)&&elem.href?0:undefined;}
+return elem[name];}
+if(!jQuery.support.style&¬xml&&name=="style")
+return jQuery.attr(elem.style,"cssText",value);if(set)
+elem.setAttribute(name,""+value);var attr=!jQuery.support.hrefNormalized&¬xml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}
+if(!jQuery.support.opacity&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+
+(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}
+return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}
+name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)
+elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||typeof array==="string"||jQuery.isFunction(array)||array.setInterval)
+ret[0]=array;else
+while(i)
+ret[--i]=array[i];}
+return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i0?this.clone(true):this).get();jQuery.fn[original].apply(jQuery(insert[i]),elems);ret=ret.concat(elems);}
+return this.pushStack(ret,name,selector);};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)
+this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames,state){if(typeof state!=="boolean")
+state=!jQuery.className.has(this,classNames);jQuery.className[state?"add":"remove"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).length){jQuery("*",this).add([this]).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)
+this.parentNode.removeChild(this);}},empty:function(){jQuery(this).children().remove();while(this.firstChild)
+this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}
+var expando="jQuery"+now(),uuid=0,windowData={};jQuery.extend({cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)
+id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])
+jQuery.cache[id]={};if(data!==undefined)
+jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])
+break;if(!name)
+jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)
+elem.removeAttribute(expando);}
+delete jQuery.cache[id];}},queue:function(elem,type,data){if(elem){type=(type||"fx")+"queue";var q=jQuery.data(elem,type);if(!q||jQuery.isArray(data))
+q=jQuery.data(elem,type,jQuery.makeArray(data));else if(data)
+q.push(data);}
+return q;},dequeue:function(elem,type){var queue=jQuery.queue(elem,type),fn=queue.shift();if(!type||type==="fx")
+fn=queue[0];if(fn!==undefined)
+fn.call(elem);}});jQuery.fn.extend({data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)
+data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else
+return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},queue:function(type,data){if(typeof type!=="string"){data=type;type="fx";}
+if(data===undefined)
+return jQuery.queue(this[0],type);return this.each(function(){var queue=jQuery.queue(this,type,data);if(type=="fx"&&queue.length==1)
+queue[0].call(this);});},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type);});}});(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,done=0,toString=Object.prototype.toString;var Sizzle=function(selector,context,results,seed){results=results||[];context=context||document;if(context.nodeType!==1&&context.nodeType!==9)
+return[];if(!selector||typeof selector!=="string"){return results;}
+var parts=[],m,set,checkSet,check,mode,extra,prune=true;chunker.lastIndex=0;while((m=chunker.exec(selector))!==null){parts.push(m[1]);if(m[2]){extra=RegExp.rightContext;break;}}
+if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context);}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector])
+selector+=parts.shift();set=posProcess(selector,set);}}}else{var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&context.parentNode?context.parentNode:context,isXML(context));set=Sizzle.filter(ret.expr,ret.set);if(parts.length>0){checkSet=makeArray(set);}else{prune=false;}
+while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur="";}else{pop=parts.pop();}
+if(pop==null){pop=context;}
+Expr.relative[cur](checkSet,pop,isXML(context));}}
+if(!checkSet){checkSet=set;}
+if(!checkSet){throw"Syntax error, unrecognized expression: "+(cur||selector);}
+if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet);}else if(context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i]);}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i]);}}}}else{makeArray(checkSet,results);}
+if(extra){Sizzle(extra,context,results,seed);if(sortOrder){hasDuplicate=false;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i":function(checkSet,part,isXML){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=isXML?part:part.toUpperCase();for(var i=0,l=checkSet.length;i=0)){if(!inplace)
+result.push(elem);}else if(inplace){curLoop[i]=false;}}}
+return false;},ID:function(match){return match[1].replace(/\\/g,"");},TAG:function(match,curLoop){for(var i=0;curLoop[i]===false;i++){}
+return curLoop[i]&&isXML(curLoop[i])?match[1]:match[1].toUpperCase();},CHILD:function(match){if(match[1]=="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]=="even"&&"2n"||match[2]=="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0;}
+match[0]=done++;return match;},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name];}
+if(match[2]==="~="){match[4]=" "+match[4]+" ";}
+return match;},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if(match[3].match(chunker).length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop);}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret);}
+return false;}}else if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true;}
+return match;},POS:function(match){match.unshift(true);return match;}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden";},disabled:function(elem){return elem.disabled===true;},checked:function(elem){return elem.checked===true;},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true;},parent:function(elem){return!!elem.firstChild;},empty:function(elem){return!elem.firstChild;},has:function(elem,i,match){return!!Sizzle(match[3],elem).length;},header:function(elem){return/h\d/i.test(elem.nodeName);},text:function(elem){return"text"===elem.type;},radio:function(elem){return"radio"===elem.type;},checkbox:function(elem){return"checkbox"===elem.type;},file:function(elem){return"file"===elem.type;},password:function(elem){return"password"===elem.type;},submit:function(elem){return"submit"===elem.type;},image:function(elem){return"image"===elem.type;},reset:function(elem){return"reset"===elem.type;},button:function(elem){return"button"===elem.type||elem.nodeName.toUpperCase()==="BUTTON";},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName);}},setFilters:{first:function(elem,i){return i===0;},last:function(elem,i,match,array){return i===array.length-1;},even:function(elem,i){return i%2===0;},odd:function(elem,i){return i%2===1;},lt:function(elem,i,match){return imatch[3]-0;},nth:function(elem,i,match){return match[3]-0==i;},eq:function(elem,i,match){return match[3]-0==i;}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array);}else if(name==="contains"){return(elem.textContent||elem.innerText||"").indexOf(match[3])>=0;}else if(name==="not"){var not=match[3];for(var i=0,l=not.length;i=0);}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match;},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName===match;},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1;},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!=check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false;},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array);}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source);}
+var makeArray=function(array,results){array=Array.prototype.slice.call(array);if(results){results.push.apply(results,array);return results;}
+return array;};try{Array.prototype.slice.call(document.documentElement.childNodes);}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array);}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i ";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(!!document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[];}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match;};}
+root.removeChild(form);})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i]);}}
+results=tmp;}
+return results;};}
+div.innerHTML=" ";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2);};}})();if(document.querySelectorAll)(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="
";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return;}
+Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra);}catch(e){}}
+return oldSizzle(query,context,extra,seed);};Sizzle.find=oldSizzle.find;Sizzle.filter=oldSizzle.filter;Sizzle.selectors=oldSizzle.selectors;Sizzle.matches=oldSizzle.matches;})();if(document.getElementsByClassName&&document.documentElement.getElementsByClassName)(function(){var div=document.createElement("div");div.innerHTML="
";if(div.getElementsByClassName("e").length===0)
+return;div.lastChild.className="e";if(div.getElementsByClassName("e").length===1)
+return;Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1]);}};})();function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i0){match=elem;break;}}
+elem=elem[dir];}
+checkSet[i]=match;}}}
+var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16;}:function(a,b){return a!==b&&(a.contains?a.contains(b):true);};var isXML=function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&isXML(elem.ownerDocument);};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"");}
+selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i0||elem.offsetHeight>0;};Sizzle.selectors.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem;}).length;};jQuery.multiFilter=function(expr,elems,not){if(not){expr=":not("+expr+")";}
+return Sizzle.matches(expr,elems);};jQuery.dir=function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)
+matched.push(cur);cur=cur[dir];}
+return matched;};jQuery.nth=function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])
+if(cur.nodeType==1&&++num==result)
+break;return cur;};jQuery.sibling=function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)
+r.push(n);}
+return r;};return;window.Sizzle=Sizzle;})();jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)
+return;if(elem.setInterval&&elem!=window)
+elem=window;if(!handler.guid)
+handler.guid=this.guid++;if(data!==undefined){var fn=handler;handler=this.proxy(fn);handler.data=data;}
+var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){return typeof jQuery!=="undefined"&&!jQuery.event.triggered?jQuery.event.handle.apply(arguments.callee.elem,arguments):undefined;});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();handler.type=namespaces.slice().sort().join(".");var handlers=events[type];if(jQuery.event.specialAll[type])
+jQuery.event.specialAll[type].setup.call(elem,data,namespaces);if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem,data,namespaces)===false){if(elem.addEventListener)
+elem.addEventListener(type,handle,false);else if(elem.attachEvent)
+elem.attachEvent("on"+type,handle);}}
+handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)
+return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types===undefined||(typeof types==="string"&&types.charAt(0)=="."))
+for(var type in events)
+this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}
+jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");if(events[type]){if(handler)
+delete events[type][handler.guid];else
+for(var handle in events[type])
+if(namespace.test(events[type][handle].type))
+delete events[type][handle];if(jQuery.event.specialAll[type])
+jQuery.event.specialAll[type].teardown.call(elem,namespaces);for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem,namespaces)===false){if(elem.removeEventListener)
+elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)
+elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}
+ret=null;delete events[type];}}});}
+for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(event,data,elem,bubbling){var type=event.type||event;if(!bubbling){event=typeof event==="object"?event[expando]?event:jQuery.extend(jQuery.Event(type),event):jQuery.Event(type);if(type.indexOf("!")>=0){event.type=type=type.slice(0,-1);event.exclusive=true;}
+if(!elem){event.stopPropagation();if(this.global[type])
+jQuery.each(jQuery.cache,function(){if(this.events&&this.events[type])
+jQuery.event.trigger(event,data,this.handle.elem);});}
+if(!elem||elem.nodeType==3||elem.nodeType==8)
+return undefined;event.result=undefined;event.target=elem;data=jQuery.makeArray(data);data.unshift(event);}
+event.currentTarget=elem;var handle=jQuery.data(elem,"handle");if(handle)
+handle.apply(elem,data);if((!elem[type]||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)
+event.result=false;if(!bubbling&&elem[type]&&!event.isDefaultPrevented()&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}
+this.triggered=false;if(!event.isPropagationStopped()){var parent=elem.parentNode||elem.ownerDocument;if(parent)
+jQuery.event.trigger(event,data,parent,true);}},handle:function(event){var all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);event.currentTarget=this;var namespaces=event.type.split(".");event.type=namespaces.shift();all=!namespaces.length&&!event.exclusive;var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||namespace.test(handler.type)){event.handler=handler;event.data=handler.data;var ret=handler.apply(this,arguments);if(ret!==undefined){event.result=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}
+if(event.isImmediatePropagationStopped())
+break;}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(event){if(event[expando])
+return event;var originalEvent=event;event=jQuery.Event(originalEvent);for(var i=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop];}
+if(!event.target)
+event.target=event.srcElement||document;if(event.target.nodeType==3)
+event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)
+event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}
+if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))
+event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)
+event.metaKey=event.ctrlKey;if(!event.which&&event.button)
+event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy=proxy||function(){return fn.apply(this,arguments);};proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:bindReady,teardown:function(){}}},specialAll:{live:{setup:function(selector,namespaces){jQuery.event.add(this,namespaces[0],liveHandler);},teardown:function(namespaces){if(namespaces.length){var remove=0,name=RegExp("(^|\\.)"+namespaces[0]+"(\\.|$)");jQuery.each((jQuery.data(this,"events").live||{}),function(){if(name.test(this.type))
+remove++;});if(remove<1)
+jQuery.event.remove(this,namespaces[0],liveHandler);}}}}};jQuery.Event=function(src){if(!this.preventDefault)
+return new jQuery.Event(src);if(src&&src.type){this.originalEvent=src;this.type=src.type;}else
+this.type=src;this.timeStamp=now();this[expando]=true;};function returnFalse(){return false;}
+function returnTrue(){return true;}
+jQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e)
+return;if(e.preventDefault)
+e.preventDefault();e.returnValue=false;},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;if(!e)
+return;if(e.stopPropagation)
+e.stopPropagation();e.cancelBubble=true;},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation();},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};var withinElement=function(event){var parent=event.relatedTarget;while(parent&&parent!=this)
+try{parent=parent.parentNode;}
+catch(e){parent=this;}
+if(parent!=this){event.type=event.data;jQuery.event.handle.apply(this,arguments);}};jQuery.each({mouseover:'mouseenter',mouseout:'mouseleave'},function(orig,fix){jQuery.event.special[fix]={setup:function(){jQuery.event.add(this,orig,withinElement,fix);},teardown:function(){jQuery.event.remove(this,orig,withinElement);}};});jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this);});},triggerHandler:function(type,data){if(this[0]){var event=jQuery.Event(type);event.preventDefault();event.stopPropagation();jQuery.event.trigger(event,data,this[0]);return event.result;}},toggle:function(fn){var args=arguments,i=1;while(ia text ';var all=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0];if(!all||!all.length||!a){return;}
+jQuery.support={leadingWhitespace:div.firstChild.nodeType==3,tbody:!div.getElementsByTagName("tbody").length,objectAll:!!div.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:a.style.opacity==="0.5",cssFloat:!!a.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};script.type="text/javascript";try{script.appendChild(document.createTextNode("window."+id+"=1;"));}catch(e){}
+root.insertBefore(script,root.firstChild);if(window[id]){jQuery.support.scriptEval=true;delete window[id];}
+root.removeChild(script);if(div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function(){jQuery.support.noCloneEvent=false;div.detachEvent("onclick",arguments.callee);});div.cloneNode(true).fireEvent("onclick");}
+jQuery(function(){var div=document.createElement("div");div.style.width=div.style.paddingLeft="1px";document.body.appendChild(div);jQuery.boxModel=jQuery.support.boxModel=div.offsetWidth===2;document.body.removeChild(div).style.display='none';});})();var styleFloat=jQuery.support.cssFloat?"cssFloat":"styleFloat";jQuery.props={"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!=="string")
+return this._load(url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}
+var type="GET";if(params)
+if(jQuery.isFunction(params)){callback=params;params=null;}else if(typeof params==="object"){params=jQuery.param(params);type="POST";}
+var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")
+self.html(selector?jQuery("
").append(res.responseText.replace(/)|ms',$m[1],$ms)) {
+ foreach ($ms[1] as $v) {
+ $p_head .= $v."\n";
+ }
+ }
+
+ if (preg_match_all('|(.*?)|ms',$m[1],$ms)) {
+ foreach ($ms[1] as $v) {
+ $p_head .= $v."\n";
+ }
+ }
+
+ if (preg_match_all('|( )|ms',$m[1],$ms)) {
+ foreach ($ms[1] as $v) {
+ $p_head .= $v."\n";
+ }
+ }
+ }
+
+ if (preg_match('|(.+)
+
+tpl->getData('_top.html'); } catch (Exception $e) {} ?>
+
+
+
+
+
+
+
+
- meta->meta_id,0,0,0,0,0,'TagID'); ?>
+
+
meta->meta_id)."/atom",0,0,0,0,0,'TagFeedURL'); ?>"
+ title="" class="feed">
+
+ blog->settings->allow_comments || $core->blog->settings->allow_trackbacks) : ?>
+ - meta->meta_id)."/atom",0,0,0,0,0,'TagFeedURL'); ?>/comments"
+ title="" class="feed">
+
+
+
+
+ exists("meta")) { @$params['from'] .= ', '.$core->prefix.'meta META ';
+@$params['sql'] .= 'AND META.post_id = P.post_id ';
+$params['sql'] .= "AND META.meta_type = 'tag' ";
+$params['sql'] .= "AND META.meta_id = '".$core->con->escape($_ctx->meta->meta_id)."' ";
+} ?>
+nb_entry_per_page;
+$params['limit'] = array((($_page_number-1)*$params['limit']),$params['limit']);
+if ($_ctx->exists("users")) { $params['user_id'] = $_ctx->users->user_id; }
+if ($_ctx->exists("categories")) { $params['cat_id'] = $_ctx->categories->cat_id; }
+if ($_ctx->exists("archives")) { $params['post_year'] = $_ctx->archives->year(); $params['post_month'] = $_ctx->archives->month(); unset($params['limit']); }
+if ($_ctx->exists("langs")) { $params['post_lang'] = $_ctx->langs->post_lang; }
+if (isset($_search)) { $params['search'] = $_search; }
+$params['order'] = 'post_dt desc';
+$_ctx->post_params = $params;
+$_ctx->posts = $core->blog->getPosts($params); unset($params);
+?>
+posts->fetch()) : ?>
+
+
+ posts->firstPostOfDay()) : ?>
posts->getDate(''),0,0,0,0,0,'EntryDate'); ?>
+
+
+
+
posts->getAuthorLink(),0,0,0,0,0,'EntryAuthorLink'); ?>
+ posts->getDate(''),0,0,0,0,0,'EntryDate'); ?>, posts->getTime(''),0,0,0,0,0,'EntryTime'); ?>
+ posts->cat_id) : ?>
+ - posts->cat_title,1,0,0,0,0,'EntryCategory'); ?>
+
+
+
+ meta = $objMeta->getMetaRecordset($_ctx->posts->post_meta,'tag'); $_ctx->meta->sort('meta_id_lower','asc'); ?>meta->fetch()) : ?>
+ meta->isStart()) : ?>
+ meta->meta_id),0,0,0,0,0,'TagURL'); ?>">meta->meta_id,0,0,0,0,0,'TagID'); ?>
+ meta->isEnd()) : ?>
+ meta = null; unset($objMeta); ?>
+
+ hasBehavior('publicEntryBeforeContent')) { $core->callBehavior('publicEntryBeforeContent',$core,$_ctx);} ?>
+
+ posts->isExtended()) : ?>
+
posts->getExcerpt(0),0,0,0,0,0,'EntryExcerpt'); ?>
+
...
+
+
+ posts->isExtended()) : ?>
+
posts->getContent(0),0,0,0,0,0,'EntryContent'); ?>
+
+
+ hasBehavior('publicEntryAfterContent')) { $core->callBehavior('publicEntryAfterContent',$core,$_ctx);} ?>
+
+ posts->countMedia() || ($_ctx->posts->hasComments() || $_ctx->posts->commentsActive()) || ($_ctx->posts->hasTrackbacks() || $_ctx->posts->trackbacksActive())) : ?>
+
+
+ posts->hasComments() || $_ctx->posts->commentsActive())) : ?>
+
+
+ posts->hasTrackbacks() || $_ctx->posts->trackbacksActive())) : ?>
+ posts->nb_trackback == 0) {
+ printf(__('no trackback'),(integer) $_ctx->posts->nb_trackback);
+} elseif ($_ctx->posts->nb_trackback == 1) {
+ printf(__('one trackback'),(integer) $_ctx->posts->nb_trackback);
+} else {
+ printf(__('%d trackbacks'),(integer) $_ctx->posts->nb_trackback);
+} ?>
+ posts->countMedia()) : ?>
+ posts->countMedia() == 0) {
+ printf(__('no attachment'),(integer) $_ctx->posts->countMedia());
+} elseif ($_ctx->posts->countMedia() == 1) {
+ printf(__('one attachment'),(integer) $_ctx->posts->countMedia());
+} else {
+ printf(__('%d attachments'),(integer) $_ctx->posts->countMedia());
+} ?>
+ posts->countMedia() || ($_ctx->posts->hasComments() || $_ctx->posts->commentsActive()) || ($_ctx->posts->hasTrackbacks() || $_ctx->posts->trackbacksActive())) : ?>
+
+
+
+
+ posts->isEnd()) : ?>
+ post_params;
+$_ctx->pagination = $core->blog->getPosts($params,true); unset($params);
+?>
+pagination->f(0) > $_ctx->posts->count()) : ?>
+
+
+
+ posts = null; $_ctx->post_params = null; ?>
+
+
+
+
+
+
+
+tpl->getData('_footer.html'); } catch (Exception $e) {} ?>
+
+|ms',$res,$m)) {
+ $p_content = $m[1];
+ }
+
+ call_user_func($open_f,$p_title,$p_head);
+ echo $p_content;
+ call_user_func($close_f);
+}
+else
+{
+ call_user_func($open_f,__('Plugin not found'));
+
+ echo '
'.__('Plugin not found').' ';
+
+ echo '
'.__('The plugin you reached does not exist or does not have an admin page.').'
';
+
+ call_user_func($close_f);
+}
+?>
\ No newline at end of file
diff --git a/admin/plugins.php b/admin/plugins.php
new file mode 100644
index 0000000..f93a378
--- /dev/null
+++ b/admin/plugins.php
@@ -0,0 +1,364 @@
+plugins->moduleExists($plugin_id)) {
+ throw new Exception(__('No such plugin.'));
+ }
+
+ $plugin = $core->plugins->getModules($plugin_id);
+ $plugin['id'] = $plugin_id;
+
+ if (!preg_match('!^'.$p_path_pat.'!', $plugin['root'])) {
+ throw new Exception(__('You don\'t have permissions to delete this plugin.'));
+ }
+
+ # --BEHAVIOR-- pluginBeforeDelete
+ $core->callBehavior('pluginsBeforeDelete', $plugin);
+
+ $core->plugins->deleteModule($plugin_id);
+
+ # --BEHAVIOR-- pluginAfterDelete
+ $core->callBehavior('pluginsAfterDelete', $plugin);
+ }
+ else
+ {
+ $core->plugins->deleteModule($plugin_id,true);
+ }
+
+ http::redirect('plugins.php?removed=1');
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ }
+ }
+ # Deactivate plugin
+ elseif ($plugin_id && !empty($_POST['deactivate']))
+ {
+ try
+ {
+ if (!$core->plugins->moduleExists($plugin_id)) {
+ throw new Exception(__('No such plugin.'));
+ }
+
+ $plugin = $core->plugins->getModules($plugin_id);
+ $plugin['id'] = $plugin_id;
+
+ if (!$plugin['root_writable']) {
+ throw new Exception(__('You don\'t have permissions to deactivate this plugin.'));
+ }
+
+ $core->plugins->deactivateModule($plugin_id);
+ http::redirect('plugins.php');
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ }
+ }
+ # Activate plugin
+ elseif ($plugin_id && !empty($_POST['activate']))
+ {
+ try
+ {
+ $p = $core->plugins->getDisabledModules();
+ if (!isset($p[$plugin_id])) {
+ throw new Exception(__('No such plugin.'));
+ }
+ $core->plugins->activateModule($plugin_id);
+ http::redirect('plugins.php');
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ }
+ }
+ # Plugin upload
+ elseif ((!empty($_POST['upload_pkg']) && !empty($_FILES['pkg_file'])) ||
+ (!empty($_POST['fetch_pkg']) && !empty($_POST['pkg_url'])))
+ {
+ try
+ {
+ if (empty($_POST['your_pwd']) || !$core->auth->checkPassword(crypt::hmac(DC_MASTER_KEY,$_POST['your_pwd']))) {
+ throw new Exception(__('Password verification failed'));
+ }
+
+ if (!empty($_POST['upload_pkg']))
+ {
+ files::uploadStatus($_FILES['pkg_file']);
+
+ $dest = $p_path.'/'.$_FILES['pkg_file']['name'];
+ if (!move_uploaded_file($_FILES['pkg_file']['tmp_name'],$dest)) {
+ throw new Exception(__('Unable to move uploaded file.'));
+ }
+ }
+ else
+ {
+ $url = urldecode($_POST['pkg_url']);
+ $dest = $p_path.'/'.basename($url);
+
+ try
+ {
+ $client = netHttp::initClient($url,$path);
+ $client->setUserAgent('Dotclear - http://www.dotclear.org/');
+ $client->useGzip(false);
+ $client->setPersistReferers(false);
+ $client->setOutput($dest);
+ $client->get($path);
+ }
+ catch( Exception $e)
+ {
+ throw new Exception(__('An error occurred while downloading the file.'));
+ }
+
+ unset($client);
+ }
+
+ $ret_code = $core->plugins->installPackage($dest,$core->plugins);
+ http::redirect('plugins.php?added='.$ret_code);
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ $default_tab = 'addplugin';
+ }
+ }
+}
+
+# Plugin install
+$plugins_install = $core->plugins->installModules();
+
+/* DISPLAY Main page
+-------------------------------------------------------- */
+dcPage::open(__('Plugins management'),
+ dcPage::jsLoad('js/_plugins.js').
+ dcPage::jsPageTabs($default_tab)
+);
+
+echo
+'
'.__('Plugins management').' ';
+
+if (!empty($_GET['removed'])) {
+ echo
+ '
'.__('Plugin has been successfully deleted.').'
';
+}
+if (!empty($_GET['added'])) {
+ echo '
'.
+ ($_GET['added'] == 2 ? __('Plugin has been successfully upgraded') : __('Plugin has been successfully installed.')).
+ '
';
+}
+
+# Plugins install messages
+if (!empty($plugins_install['success']))
+{
+ echo '
'.__('Following plugins have been installed:').'
';
+ foreach ($plugins_install['success'] as $k => $v) {
+ echo ''.$k.' ';
+ }
+ echo ' ';
+}
+if (!empty($plugins_install['failure']))
+{
+ echo '
'.__('Following plugins have not been installed:').'
';
+ foreach ($plugins_install['failure'] as $k => $v) {
+ echo ''.$k.' ('.$v.') ';
+ }
+ echo ' ';
+}
+
+# List all active plugins
+echo '
'.__('Plugins add new functionalities to Dotclear. '.
+'Here you can activate or deactivate installed plugins.').'
';
+
+echo '
'.sprintf(__('You can find additional plugins for your blog on %s.'),
+'Dotaddict ').' ';
+
+if ($is_writable) {
+ echo __('To install or upgrade a plugin you generally just need to upload it '.
+ 'in "Install or upgrade a plugin" section.');
+} else {
+ echo __('To install or upgrade a plugin you just need to extract it in your plugins directory.');
+}
+echo '
';
+
+echo
+'
';
+
+$p_available = $core->plugins->getModules();
+uasort($p_available,create_function('$a,$b','return strcasecmp($a["name"],$b["name"]);'));
+if (!empty($p_available))
+{
+ echo
+ '
'.__('Activated plugins').' '.
+ '
'.
+ ''.__('Plugin').' '.
+ ''.__('Version').' '.
+ ''.__('Details').' '.
+ ''.__('Action').' '.
+ ' ';
+
+ foreach ($p_available as $k => $v)
+ {
+ $is_deletable = $is_writable && preg_match('!^'.$p_path_pat.'!',$v['root']);
+ $is_deactivable = $v['root_writable'];
+
+ echo
+ ''.
+ ''.html::escapeHTML($k).' '.
+ ''.html::escapeHTML($v['version']).' '.
+ ''.html::escapeHTML($v['name']).' '.
+ ' '.html::escapeHTML($v['desc']).' '.
+ '';
+
+ if ($is_deletable || $is_deactivable)
+ {
+ echo
+ '';
+ }
+
+ echo
+ ' '.
+ ' ';
+ }
+ echo
+ '
';
+}
+
+$p_disabled = $core->plugins->getDisabledModules();
+uksort($p_disabled,create_function('$a,$b','return strcasecmp($a,$b);'));
+if (!empty($p_disabled))
+{
+ echo
+ '
'.__('Deactivated plugins').' '.
+ '
'.
+ ''.__('Plugin').' '.
+ ''.__('Action').' '.
+ ' ';
+
+ foreach ($p_disabled as $k => $v)
+ {
+ $is_deletable = $is_writable && preg_match('!^'.$p_path_pat.'!',$v['root']);
+ $is_activable = $v['root_writable'];
+
+ echo
+ ''.
+ ''.html::escapeHTML($k).' '.
+ '';
+
+ if ($is_deletable || $is_activable)
+ {
+ echo
+ '';
+ }
+
+ echo
+ ' '.
+ ' ';
+ }
+ echo
+ '
';
+}
+
+echo '
';
+
+# Add a new plugin
+echo
+'
';
+
+if ($is_writable)
+{
+ echo '
'.__('You can install plugins by uploading or downloading zip files.').'
';
+
+ # 'Upload plugin' form
+ echo
+ '
';
+
+ # 'Fetch plugin' form
+ echo
+ '
';
+}
+else
+{
+ echo
+ '
'.
+ __('To enable this function, please give write access to your plugins directory.').
+ '
';
+}
+echo '
';
+
+# --BEHAVIOR-- pluginsToolsTabs
+$core->callBehavior('pluginsToolsTabs',$core);
+
+dcPage::close();
+?>
\ No newline at end of file
diff --git a/admin/popup_link.php b/admin/popup_link.php
new file mode 100644
index 0000000..a75d496
--- /dev/null
+++ b/admin/popup_link.php
@@ -0,0 +1,58 @@
+'.__('Add a link').'';
+
+# Languages combo
+$rs = $core->blog->getLangs(array('order'=>'asc'));
+$all_langs = l10n::getISOcodes(0,1);
+$lang_combo = array('' => '', __('Most used') => array(), __('Available') => l10n::getISOcodes(1,1));
+while ($rs->fetch()) {
+ if (isset($all_langs[$rs->post_lang])) {
+ $lang_combo[__('Most used')][$all_langs[$rs->post_lang]] = $rs->post_lang;
+ unset($lang_combo[__('Available')][$all_langs[$rs->post_lang]]);
+ } else {
+ $lang_combo[__('Most used')][$rs->post_lang] = $rs->post_lang;
+ }
+}
+unset($all_langs);
+unset($rs);
+
+echo
+'
'.
+
+'
'.__('cancel').' - '.
+''.__('insert').'
'."\n".
+
+''."\n";
+
+dcPage::closePopup();
+?>
\ No newline at end of file
diff --git a/admin/popup_posts.php b/admin/popup_posts.php
new file mode 100644
index 0000000..9b771a6
--- /dev/null
+++ b/admin/popup_posts.php
@@ -0,0 +1,57 @@
+'.__('Add a link to an entry').'';
+
+echo '
';
+
+try {
+ $posts = $core->blog->getPosts($params);
+ $counter = $core->blog->getPosts($params,true);
+ $post_list = new adminPostMiniList($core,$posts,$counter->f(0));
+} catch (Exception $e) {
+ $core->error->add($e->getMessage());
+}
+
+echo '
'; # I know it's not a form but we just need the ID
+$post_list->display($page,$nb_per_page);
+echo '
';
+
+echo '
'.__('cancel').'
';
+
+dcPage::closePopup();
+?>
\ No newline at end of file
diff --git a/admin/post.php b/admin/post.php
new file mode 100644
index 0000000..796ddc6
--- /dev/null
+++ b/admin/post.php
@@ -0,0 +1,657 @@
+auth->getOption('post_format');
+$post_password = '';
+$post_url = '';
+$post_lang = $core->auth->getInfo('user_lang');
+$post_title = '';
+$post_excerpt = '';
+$post_excerpt_xhtml = '';
+$post_content = '';
+$post_content_xhtml = '';
+$post_notes = '';
+$post_status = $core->auth->getInfo('user_post_status');
+$post_selected = false;
+$post_open_comment = $core->blog->settings->allow_comments;
+$post_open_tb = $core->blog->settings->allow_trackbacks;
+
+$post_media = array();
+
+$page_title = __('New entry');
+
+$can_view_page = true;
+$can_edit_post = $core->auth->check('usage,contentadmin',$core->blog->id);
+$can_publish = $core->auth->check('publish,contentadmin',$core->blog->id);
+$can_delete = false;
+
+$post_headlink = ' ';
+$post_link = '%s ';
+
+$next_link = $prev_link = $next_headlink = $prev_headlink = null;
+
+# If user can't publish
+if (!$can_publish) {
+ $post_status = -2;
+}
+
+# Getting categories
+$categories_combo = array(' ' => '');
+try {
+ $categories = $core->blog->getCategories(array('post_type'=>'post'));
+ while ($categories->fetch()) {
+ $categories_combo[] = new formSelectOption(
+ str_repeat(' ',$categories->level-1).'• '.html::escapeHTML($categories->cat_title),
+ $categories->cat_id
+ );
+ }
+} catch (Exception $e) { }
+
+# Status combo
+foreach ($core->blog->getAllPostStatus() as $k => $v) {
+ $status_combo[$v] = (string) $k;
+}
+
+# Formaters combo
+foreach ($core->getFormaters() as $v) {
+ $formaters_combo[$v] = $v;
+}
+
+# Languages combo
+$rs = $core->blog->getLangs(array('order'=>'asc'));
+$all_langs = l10n::getISOcodes(0,1);
+$lang_combo = array('' => '', __('Most used') => array(), __('Available') => l10n::getISOcodes(1,1));
+while ($rs->fetch()) {
+ if (isset($all_langs[$rs->post_lang])) {
+ $lang_combo[__('Most used')][$all_langs[$rs->post_lang]] = $rs->post_lang;
+ unset($lang_combo[__('Available')][$all_langs[$rs->post_lang]]);
+ } else {
+ $lang_combo[__('Most used')][$rs->post_lang] = $rs->post_lang;
+ }
+}
+unset($all_langs);
+unset($rs);
+
+
+# Get entry informations
+if (!empty($_REQUEST['id']))
+{
+ $params['post_id'] = $_REQUEST['id'];
+
+ $post = $core->blog->getPosts($params);
+
+ if ($post->isEmpty())
+ {
+ $core->error->add(__('This entry does not exist.'));
+ $can_view_page = false;
+ }
+ else
+ {
+ $post_id = $post->post_id;
+ $cat_id = $post->cat_id;
+ $post_dt = date('Y-m-d H:i',strtotime($post->post_dt));
+ $post_format = $post->post_format;
+ $post_password = $post->post_password;
+ $post_url = $post->post_url;
+ $post_lang = $post->post_lang;
+ $post_title = $post->post_title;
+ $post_excerpt = $post->post_excerpt;
+ $post_excerpt_xhtml = $post->post_excerpt_xhtml;
+ $post_content = $post->post_content;
+ $post_content_xhtml = $post->post_content_xhtml;
+ $post_notes = $post->post_notes;
+ $post_status = $post->post_status;
+ $post_selected = (boolean) $post->post_selected;
+ $post_open_comment = (boolean) $post->post_open_comment;
+ $post_open_tb = (boolean) $post->post_open_tb;
+
+ $page_title = __('Edit entry');
+
+ $can_edit_post = $post->isEditable();
+ $can_delete= $post->isDeletable();
+
+ $next_rs = $core->blog->getNextPost($post,1);
+ $prev_rs = $core->blog->getNextPost($post,-1);
+
+ if ($next_rs !== null) {
+ $next_link = sprintf($post_link,$next_rs->post_id,
+ html::escapeHTML($next_rs->post_title),__('next entry').' »');
+ $next_headlink = sprintf($post_headlink,'next',
+ html::escapeHTML($next_rs->post_title),$next_rs->post_id);
+ }
+
+ if ($prev_rs !== null) {
+ $prev_link = sprintf($post_link,$prev_rs->post_id,
+ html::escapeHTML($prev_rs->post_title),'« '.__('previous entry'));
+ $prev_headlink = sprintf($post_headlink,'previous',
+ html::escapeHTML($prev_rs->post_title),$prev_rs->post_id);
+ }
+
+ try {
+ $core->media = new dcMedia($core);
+ $post_media = $core->media->getPostMedia($post_id);
+ } catch (Exception $e) {}
+ }
+}
+
+# Format excerpt and content
+if (!empty($_POST) && $can_edit_post)
+{
+ $post_format = $_POST['post_format'];
+ $post_excerpt = $_POST['post_excerpt'];
+ $post_content = $_POST['post_content'];
+
+ $post_title = $_POST['post_title'];
+
+ $cat_id = (integer) $_POST['cat_id'];
+
+ if (isset($_POST['post_status'])) {
+ $post_status = (integer) $_POST['post_status'];
+ }
+
+ if (empty($_POST['post_dt'])) {
+ $post_dt = '';
+ } else {
+ $post_dt = strtotime($_POST['post_dt']);
+ $post_dt = date('Y-m-d H:i',$post_dt);
+ }
+
+ $post_open_comment = !empty($_POST['post_open_comment']);
+ $post_open_tb = !empty($_POST['post_open_tb']);
+ $post_selected = !empty($_POST['post_selected']);
+ $post_lang = $_POST['post_lang'];
+ $post_password = !empty($_POST['post_password']) ? $_POST['post_password'] : null;
+
+ $post_notes = $_POST['post_notes'];
+
+ if (isset($_POST['post_url'])) {
+ $post_url = $_POST['post_url'];
+ }
+
+ $core->blog->setPostContent(
+ $post_id,$post_format,$post_lang,
+ $post_excerpt,$post_excerpt_xhtml,$post_content,$post_content_xhtml
+ );
+}
+
+# Create or update post
+if (!empty($_POST) && !empty($_POST['save']) && $can_edit_post)
+{
+ $cur = $core->con->openCursor($core->prefix.'post');
+
+ $cur->post_title = $post_title;
+ $cur->cat_id = ($cat_id ? $cat_id : null);
+ $cur->post_dt = $post_dt ? date('Y-m-d H:i:00',strtotime($post_dt)) : '';
+ $cur->post_format = $post_format;
+ $cur->post_password = $post_password;
+ $cur->post_lang = $post_lang;
+ $cur->post_title = $post_title;
+ $cur->post_excerpt = $post_excerpt;
+ $cur->post_excerpt_xhtml = $post_excerpt_xhtml;
+ $cur->post_content = $post_content;
+ $cur->post_content_xhtml = $post_content_xhtml;
+ $cur->post_notes = $post_notes;
+ $cur->post_status = $post_status;
+ $cur->post_selected = (integer) $post_selected;
+ $cur->post_open_comment = (integer) $post_open_comment;
+ $cur->post_open_tb = (integer) $post_open_tb;
+
+ if (isset($_POST['post_url'])) {
+ $cur->post_url = $post_url;
+ }
+
+ # Update post
+ if ($post_id)
+ {
+ try
+ {
+ # --BEHAVIOR-- adminBeforePostUpdate
+ $core->callBehavior('adminBeforePostUpdate',$cur,$post_id);
+
+ $core->blog->updPost($post_id,$cur);
+
+ # --BEHAVIOR-- adminAfterPostUpdate
+ $core->callBehavior('adminAfterPostUpdate',$cur,$post_id);
+
+ http::redirect('post.php?id='.$post_id.'&upd=1');
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ }
+ }
+ else
+ {
+ $cur->user_id = $core->auth->userID();
+
+ try
+ {
+ # --BEHAVIOR-- adminBeforePostCreate
+ $core->callBehavior('adminBeforePostCreate',$cur);
+
+ $return_id = $core->blog->addPost($cur);
+
+ # --BEHAVIOR-- adminAfterPostCreate
+ $core->callBehavior('adminAfterPostCreate',$cur,$return_id);
+
+ http::redirect('post.php?id='.$return_id.'&crea=1');
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ }
+ }
+}
+
+if (!empty($_POST['delete']) && $can_delete)
+{
+ try {
+ # --BEHAVIOR-- adminBeforePostDelete
+ $core->callBehavior('adminBeforePostDelete',$post_id);
+ $core->blog->delPost($post_id);
+ http::redirect('posts.php');
+ } catch (Exception $e) {
+ $core->error->add($e->getMessage());
+ }
+}
+
+/* DISPLAY
+-------------------------------------------------------- */
+$default_tab = 'edit-entry';
+if (!$can_edit_post) {
+ $default_tab = '';
+}
+if (!empty($_GET['co'])) {
+ $default_tab = 'comments';
+}
+
+dcPage::open($page_title,
+ dcPage::jsDatePicker().
+ dcPage::jsToolBar().
+ dcPage::jsModal().
+ dcPage::jsLoad('js/_post.js').
+ dcPage::jsConfirmClose('entry-form','comment-form').
+ # --BEHAVIOR-- adminPostHeaders
+ $core->callBehavior('adminPostHeaders').
+ dcPage::jsPageTabs($default_tab).
+ $next_headlink."\n".$prev_headlink
+);
+
+if (!empty($_GET['upd'])) {
+ echo '
'.__('Entry has been successfully updated.').'
';
+}
+elseif (!empty($_GET['crea'])) {
+ echo '
'.__('Entry has been successfully created.').'
';
+}
+elseif (!empty($_GET['attached'])) {
+ echo '
'.__('File has been successfully attached.').'
';
+}
+elseif (!empty($_GET['rmattach'])) {
+ echo '
'.__('Attachment has been successfully removed.').'
';
+}
+
+if (!empty($_GET['creaco'])) {
+ echo '
'.__('Comment has been successfully created.').'
';
+ }
+
+# XHTML conversion
+if (!empty($_GET['xconv']))
+{
+ $post_excerpt = $post_excerpt_xhtml;
+ $post_content = $post_content_xhtml;
+ $post_format = 'xhtml';
+
+ echo '
'.__('Don\'t forget to validate your XHTML conversion by saving your post.').'
';
+}
+
+echo '
'.html::escapeHTML($core->blog->name).' › '.$page_title;
+
+if ($post_id && $post->post_status == 1) {
+ echo ' - '.__('View entry').' ';
+} elseif ($post_id) {
+ $preview_url =
+ $core->blog->url.$core->url->getBase('preview').'/'.
+ $core->auth->userID().'/'.
+ http::browserUID(DC_MASTER_KEY.$core->auth->userID().$core->auth->getInfo('user_pwd')).
+ '/'.$post->post_url;
+ echo ' - '.__('Preview entry').' ';
+}
+
+echo ' ';
+
+if ($post_id)
+{
+ echo '
';
+ if ($prev_link) { echo $prev_link; }
+ if ($next_link && $prev_link) { echo ' - '; }
+ if ($next_link) { echo $next_link; }
+
+ # --BEHAVIOR-- adminPostNavLinks
+ $core->callBehavior('adminPostNavLinks',isset($post) ? $post : null);
+
+ echo '
';
+}
+
+# Exit if we cannot view page
+if (!$can_view_page) {
+ dcPage::helpBlock('core_post');
+ dcPage::close();
+ exit;
+}
+
+/* Post form if we can edit post
+-------------------------------------------------------- */
+if ($can_edit_post)
+{
+ echo '
';
+
+ if ($post_id && $post->post_status == 1) {
+ echo '
'.
+ __('Ping blogs').'
';
+ }
+
+ if ($post_id && !empty($post_media))
+ {
+ echo
+ '
';
+ }
+}
+
+
+/* Comments and trackbacks
+-------------------------------------------------------- */
+if ($post_id)
+{
+ $params = array('post_id' => $post_id, 'order' => 'comment_dt ASC');
+
+ $comments = $core->blog->getComments(array_merge($params,array('comment_trackback'=>0)));
+ $trackbacks = $core->blog->getComments(array_merge($params,array('comment_trackback'=>1)));
+
+ # Actions combo box
+ $combo_action = array();
+ if ($can_edit_post && $core->auth->check('publish,contentadmin',$core->blog->id))
+ {
+ $combo_action[__('publish')] = 'publish';
+ $combo_action[__('unpublish')] = 'unpublish';
+ $combo_action[__('mark as pending')] = 'pending';
+ $combo_action[__('mark as junk')] = 'junk';
+ }
+
+ if ($can_edit_post && $core->auth->check('delete,contentadmin',$core->blog->id))
+ {
+ $combo_action[__('delete')] = 'delete';
+ }
+
+ $has_action = !empty($combo_action) && (!$trackbacks->isEmpty() || !$comments->isEmpty());
+
+ echo
+ '
';
+}
+
+/* Add a comment
+-------------------------------------------------------- */
+if ($post_id)
+{
+ echo
+ '
';
+}
+
+
+# Show comments or trackbacks
+function showComments(&$rs,$has_action)
+{
+ echo
+ '
';
+}
+
+dcPage::helpBlock('core_post','core_wiki');
+dcPage::close();
+?>
diff --git a/admin/post_media.php b/admin/post_media.php
new file mode 100644
index 0000000..1360dd4
--- /dev/null
+++ b/admin/post_media.php
@@ -0,0 +1,79 @@
+blog->getPosts(array('post_id' => $post_id,'post_type'=>''));
+if ($rs->isEmpty()) {
+ exit;
+}
+
+if ($post_id && $media_id && !empty($_POST['attach']))
+{
+ $core->media = new dcMedia($core);
+ $core->media->addPostMedia($post_id,$media_id);
+ http::redirect($core->getPostAdminURL($rs->post_type,$post_id,false));
+}
+
+try {
+ $core->media = new dcMedia($core);
+ $f = $core->media->getPostMedia($post_id,$media_id);
+ if (empty($f)) {
+ $post_id = $media_id = null;
+ throw new Exception(__('This attachment does not exist'));
+ }
+ $f = $f[0];
+} catch (Exception $e) {
+ $core->error->add($e->getMessage());
+}
+
+# Remove a media from en
+if (($post_id && $media_id) || $core->error->flag())
+{
+ if (!empty($_POST['remove']))
+ {
+ $core->media->removePostMedia($post_id,$media_id);
+ http::redirect($core->getPostAdminURL($rs->post_type,$post_id,false).'&rmattach=1');
+ }
+ elseif (isset($_POST['post_id'])) {
+ http::redirect($core->getPostAdminURL($rs->post_type,$post_id,false));
+ }
+
+ if (!empty($_GET['remove']))
+ {
+ dcPage::open(__('Remove attachment'));
+
+ echo '
'.__('Attachment').' › '.__('confirm removal').' ';
+
+ echo
+ '
';
+
+ dcPage::close();
+ exit;
+ }
+}
+?>
\ No newline at end of file
diff --git a/admin/posts.php b/admin/posts.php
new file mode 100644
index 0000000..c575a9c
--- /dev/null
+++ b/admin/posts.php
@@ -0,0 +1,298 @@
+blog->getCategories(array('post_type'=>'post'));
+} catch (Exception $e) {
+ $core->error->add($e->getMessage());
+}
+
+# Getting authors
+try {
+ $users = $core->blog->getPostsUsers();
+} catch (Exception $e) {
+ $core->error->add($e->getMessage());
+}
+
+# Getting dates
+try {
+ $dates = $core->blog->getDates(array('type'=>'month'));
+} catch (Exception $e) {
+ $core->error->add($e->getMessage());
+}
+
+# Getting langs
+try {
+ $langs = $core->blog->getLangs();
+} catch (Exception $e) {
+ $core->error->add($e->getMessage());
+}
+
+# Creating filter combo boxes
+if (!$core->error->flag())
+{
+ # Filter form we'll put in html_block
+ $users_combo = $categories_combo = array();
+ $users_combo['-'] = $categories_combo['-'] = '';
+ while ($users->fetch())
+ {
+ $user_cn = dcUtils::getUserCN($users->user_id,$users->user_name,
+ $users->user_firstname,$users->user_displayname);
+
+ if ($user_cn != $users->user_id) {
+ $user_cn .= ' ('.$users->user_id.')';
+ }
+
+ $users_combo[$user_cn] = $users->user_id;
+ }
+
+ while ($categories->fetch()) {
+ $categories_combo[str_repeat(' ',$categories->level-1).'• '.
+ html::escapeHTML($categories->cat_title).
+ ' ('.$categories->nb_post.')'] = $categories->cat_id;
+ }
+
+ $status_combo = array(
+ '-' => ''
+ );
+ foreach ($core->blog->getAllPostStatus() as $k => $v) {
+ $status_combo[$v] = (string) $k;
+ }
+
+ $selected_combo = array(
+ '-' => '',
+ __('selected') => '1',
+ __('not selected') => '0'
+ );
+
+ # Months array
+ $dt_m_combo['-'] = '';
+ while ($dates->fetch()) {
+ $dt_m_combo[dt::str('%B %Y',$dates->ts())] = $dates->year().$dates->month();
+ }
+
+ $lang_combo['-'] = '';
+ while ($langs->fetch()) {
+ $lang_combo[$langs->post_lang] = $langs->post_lang;
+ }
+
+ $sortby_combo = array(
+ __('Date') => 'post_dt',
+ __('Title') => 'post_title',
+ __('Category') => 'cat_title',
+ __('Author') => 'user_id',
+ __('Status') => 'post_status',
+ __('Selected') => 'post_selected'
+ );
+
+ $order_combo = array(
+ __('Descending') => 'desc',
+ __('Ascending') => 'asc'
+ );
+}
+
+# Actions combo box
+$combo_action = array();
+if ($core->auth->check('publish,contentadmin',$core->blog->id))
+{
+ $combo_action[__('publish')] = 'publish';
+ $combo_action[__('unpublish')] = 'unpublish';
+ $combo_action[__('schedule')] = 'schedule';
+ $combo_action[__('mark as pending')] = 'pending';
+}
+$combo_action[__('mark as selected')] = 'selected';
+$combo_action[__('mark as unselected')] = 'unselected';
+$combo_action[__('change category')] = 'category';
+if ($core->auth->check('admin',$core->blog->id)) {
+ $combo_action[__('change author')] = 'author';
+}
+if ($core->auth->check('delete,contentadmin',$core->blog->id))
+{
+ $combo_action[__('delete')] = 'delete';
+}
+
+# --BEHAVIOR-- adminPostsActionsCombo
+$core->callBehavior('adminPostsActionsCombo',array(&$combo_action));
+
+/* Get posts
+-------------------------------------------------------- */
+$user_id = !empty($_GET['user_id']) ? $_GET['user_id'] : '';
+$cat_id = !empty($_GET['cat_id']) ? $_GET['cat_id'] : '';
+$status = isset($_GET['status']) ? $_GET['status'] : '';
+$selected = isset($_GET['selected']) ? $_GET['selected'] : '';
+$month = !empty($_GET['month']) ? $_GET['month'] : '';
+$lang = !empty($_GET['lang']) ? $_GET['lang'] : '';
+$sortby = !empty($_GET['sortby']) ? $_GET['sortby'] : 'post_dt';
+$order = !empty($_GET['order']) ? $_GET['order'] : 'desc';
+
+$show_filters = false;
+
+$page = !empty($_GET['page']) ? (integer) $_GET['page'] : 1;
+$nb_per_page = 30;
+
+if (!empty($_GET['nb']) && (integer) $_GET['nb'] > 0) {
+ if ($nb_per_page != $_GET['nb']) {
+ $show_filters = true;
+ }
+ $nb_per_page = (integer) $_GET['nb'];
+}
+
+$params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page);
+$params['no_content'] = true;
+
+# - User filter
+if ($user_id !== '' && in_array($user_id,$users_combo)) {
+ $params['user_id'] = $user_id;
+ $show_filters = true;
+}
+
+# - Categories filter
+if ($cat_id !== '' && in_array($cat_id,$categories_combo)) {
+ $params['cat_id'] = $cat_id;
+ $show_filters = true;
+}
+
+# - Status filter
+if ($status !== '' && in_array($status,$status_combo)) {
+ $params['post_status'] = $status;
+ $show_filters = true;
+}
+
+# - Selected filter
+if ($selected !== '' && in_array($selected,$selected_combo)) {
+ $params['post_selected'] = $selected;
+ $show_filters = true;
+}
+
+# - Month filter
+if ($month !== '' && in_array($month,$dt_m_combo)) {
+ $params['post_month'] = substr($month,4,2);
+ $params['post_year'] = substr($month,0,4);
+ $show_filters = true;
+}
+
+# - Lang filter
+if ($lang !== '' && in_array($lang,$lang_combo)) {
+ $params['post_lang'] = $lang;
+ $show_filters = true;
+}
+
+# - Sortby and order filter
+if ($sortby !== '' && in_array($sortby,$sortby_combo)) {
+ if ($order !== '' && in_array($order,$order_combo)) {
+ $params['order'] = $sortby.' '.$order;
+ }
+
+ if ($sortby != 'post_dt' || $order != 'desc') {
+ $show_filters = true;
+ }
+}
+
+# Get posts
+try {
+ $posts = $core->blog->getPosts($params);
+ $counter = $core->blog->getPosts($params,true);
+ $post_list = new adminPostList($core,$posts,$counter->f(0));
+} catch (Exception $e) {
+ $core->error->add($e->getMessage());
+}
+
+/* DISPLAY
+-------------------------------------------------------- */
+$starting_script = dcPage::jsLoad('js/_posts_list.js');
+if (!$show_filters) {
+ $starting_script .= dcPage::jsLoad('js/filter-controls.js');
+}
+
+dcPage::open(__('Entries'),$starting_script);
+
+if (!$core->error->flag())
+{
+ echo '
'.html::escapeHTML($core->blog->name).' › '.__('Entries').' ';
+
+ if (!$show_filters) {
+ echo '
'.
+ __('Filters').'
';
+ }
+
+ echo
+ '
';
+
+ # Show posts
+ $post_list->display($page,$nb_per_page,
+ '
'
+ );
+}
+
+dcPage::helpBlock('core_posts','core_wiki');
+dcPage::close();
+?>
\ No newline at end of file
diff --git a/admin/posts_actions.php b/admin/posts_actions.php
new file mode 100644
index 0000000..21594b0
--- /dev/null
+++ b/admin/posts_actions.php
@@ -0,0 +1,250 @@
+ $v) {
+ $entries[$k] = (integer) $v;
+ }
+
+ $params['sql'] = 'AND P.post_id IN('.implode(',',$entries).') ';
+ $params['no_content'] = true;
+
+ if (isset($_POST['post_type'])) {
+ $params['post_type'] = $_POST['post_type'];
+ }
+
+ $posts = $core->blog->getPosts($params);
+
+ # --BEHAVIOR-- adminPostsActions
+ $core->callBehavior('adminPostsActions',$core,$posts,$action,$redir);
+
+ if (preg_match('/^(publish|unpublish|schedule|pending)$/',$action))
+ {
+ switch ($action) {
+ case 'unpublish' : $status = 0; break;
+ case 'schedule' : $status = -1; break;
+ case 'pending' : $status = -2; break;
+ default : $status = 1; break;
+ }
+
+ try
+ {
+ while ($posts->fetch()) {
+ $core->blog->updPostStatus($posts->post_id,$status);
+ }
+
+ http::redirect($redir);
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ }
+ }
+ elseif ($action == 'selected' || $action == 'unselected')
+ {
+ try
+ {
+ while ($posts->fetch()) {
+ $core->blog->updPostSelected($posts->post_id,$action == 'selected');
+ }
+
+ http::redirect($redir);
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ }
+ }
+ elseif ($action == 'delete')
+ {
+ try
+ {
+ while ($posts->fetch()) {
+ # --BEHAVIOR-- adminBeforePostDelete
+ $core->callBehavior('adminBeforePostDelete',$posts->post_id);
+ $core->blog->delPost($posts->post_id);
+ }
+
+ http::redirect($redir);
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ }
+
+ }
+ elseif ($action == 'category' && isset($_POST['new_cat_id']))
+ {
+ try
+ {
+ while ($posts->fetch())
+ {
+ $new_cat_id = (integer) $_POST['new_cat_id'];
+ $core->blog->updPostCategory($posts->post_id,$new_cat_id);
+ }
+ http::redirect($redir);
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ }
+ }
+ elseif ($action == 'author' && isset($_POST['new_auth_id'])
+ && $core->auth->check('admin',$core->blog->id))
+ {
+ $new_user_id = $_POST['new_auth_id'];
+
+ try
+ {
+ if ($core->getUser($new_user_id)->isEmpty()) {
+ throw new Exception(__('This user does not exist'));
+ }
+
+ while ($posts->fetch())
+ {
+ $cur = $core->con->openCursor($core->prefix.'post');
+ $cur->user_id = $new_user_id;
+ $cur->update('WHERE post_id = '.(integer) $posts->post_id);
+ }
+
+ http::redirect($redir);
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ }
+ }
+}
+
+/* DISPLAY
+-------------------------------------------------------- */
+dcPage::open(__('Entries'));
+
+if (!isset($action)) {
+ dcPage::close();
+ exit;
+}
+
+$hidden_fields = '';
+while ($posts->fetch()) {
+ $hidden_fields .= form::hidden(array('entries[]'),$posts->post_id);
+}
+
+if (isset($_POST['redir']) && strpos($_POST['redir'],'://') === false)
+{
+ $hidden_fields .= form::hidden(array('redir'),html::escapeURL($_POST['redir']));
+}
+else
+{
+ $hidden_fields .=
+ form::hidden(array('user_id'),$_POST['user_id']).
+ form::hidden(array('cat_id'),$_POST['cat_id']).
+ form::hidden(array('status'),$_POST['status']).
+ form::hidden(array('selected'),$_POST['selected']).
+ form::hidden(array('month'),$_POST['month']).
+ form::hidden(array('lang'),$_POST['lang']).
+ form::hidden(array('sortby'),$_POST['sortby']).
+ form::hidden(array('order'),$_POST['order']).
+ form::hidden(array('page'),$_POST['page']).
+ form::hidden(array('nb'),$_POST['nb']);
+}
+
+if (isset($_POST['post_type'])) {
+ $hidden_fields .= form::hidden(array('post_type'),$_POST['post_type']);
+}
+
+# --BEHAVIOR-- adminPostsActionsContent
+$core->callBehavior('adminPostsActionsContent',$core,$action,$hidden_fields);
+
+if ($action == 'category')
+{
+ echo '
'.__('Change category for entries').' ';
+
+ # categories list
+ # Getting categories
+ $categories_combo = array(' ' => '');
+ try {
+ $categories = $core->blog->getCategories(array('post_type'=>'post'));
+ while ($categories->fetch()) {
+ $categories_combo[] = new formSelectOption(
+ str_repeat(' ',$categories->level-1).'• '.html::escapeHTML($categories->cat_title),
+ $categories->cat_id
+ );
+ }
+ } catch (Exception $e) { }
+
+ echo
+ '
';
+}
+elseif ($action == 'author' && $core->auth->check('admin',$core->blog->id))
+{
+ echo '
'.__('Change author for entries').' ';
+
+ echo
+ '
';
+}
+
+echo '
'.__('back').'
';
+
+dcPage::close();
+?>
\ No newline at end of file
diff --git a/admin/preferences.php b/admin/preferences.php
new file mode 100644
index 0000000..13e018a
--- /dev/null
+++ b/admin/preferences.php
@@ -0,0 +1,202 @@
+auth->getInfo('user_name');
+$user_firstname = $core->auth->getInfo('user_firstname');
+$user_displayname = $core->auth->getInfo('user_displayname');
+$user_email = $core->auth->getInfo('user_email');
+$user_url = $core->auth->getInfo('user_url');
+$user_lang = $core->auth->getInfo('user_lang');
+$user_tz = $core->auth->getInfo('user_tz');
+$user_post_status = $core->auth->getInfo('user_post_status');
+
+$user_options = $core->auth->getOptions();
+
+foreach ($core->getFormaters() as $v) {
+ $formaters_combo[$v] = $v;
+}
+
+foreach ($core->blog->getAllPostStatus() as $k => $v) {
+ $status_combo[$v] = $k;
+}
+
+# Language codes
+$langs = l10n::getISOcodes(1,1);
+foreach ($langs as $k => $v) {
+ $lang_avail = $v == 'en' || is_dir(DC_L10N_ROOT.'/'.$v);
+ $lang_combo[] = new formSelectOption($k,$v,$lang_avail ? 'avail10n' : '');
+}
+
+# Add or update user
+if (isset($_POST['user_name']))
+{
+ try
+ {
+ $pwd_check = !empty($_POST['cur_pwd']) && $core->auth->checkPassword(crypt::hmac(DC_MASTER_KEY,$_POST['cur_pwd']));
+
+ if ($core->auth->allowPassChange() && !$pwd_check && $user_email != $_POST['user_email']) {
+ throw new Exception(__('If you want to change your email or password you must provide your current password.'));
+ }
+
+ $cur = $core->con->openCursor($core->prefix.'user');
+
+ $cur->user_name = $user_name = $_POST['user_name'];
+ $cur->user_firstname = $user_firstname = $_POST['user_firstname'];
+ $cur->user_displayname = $user_displayname = $_POST['user_displayname'];
+ $cur->user_email = $user_email = $_POST['user_email'];
+ $cur->user_url = $user_url = $_POST['user_url'];
+ $cur->user_lang = $user_lang = $_POST['user_lang'];
+ $cur->user_tz = $user_tz = $_POST['user_tz'];
+ $cur->user_post_status = $user_post_status = $_POST['user_post_status'];
+
+ $user_options['edit_size'] = (integer) $_POST['user_edit_size'];
+ if ($user_options['edit_size'] < 1) {
+ $user_options['edit_size'] = 10;
+ }
+ $user_options['post_format'] = $_POST['user_post_format'];
+ $user_options['enable_wysiwyg'] = !empty($_POST['user_wysiwyg']);
+
+ $cur->user_options = new ArrayObject($user_options);
+
+ if ($core->auth->allowPassChange() && !empty($_POST['new_pwd']))
+ {
+ if (!$pwd_check) {
+ throw new Exception(__('If you want to change your email or password you must provide your current password.'));
+ }
+
+ if ($_POST['new_pwd'] != $_POST['new_pwd_c']) {
+ throw new Exception(__("Passwords don't match"));
+ }
+
+ $cur->user_pwd = $_POST['new_pwd'];
+ }
+
+ # --BEHAVIOR-- adminBeforeUserUpdate
+ $core->callBehavior('adminBeforeUserUpdate',$cur,$core->auth->userID());
+
+ # Udate user
+ $core->updUser($core->auth->userID(),$cur);
+
+ # --BEHAVIOR-- adminAfterUserUpdate
+ $core->callBehavior('adminAfterUserUpdate',$cur,$core->auth->userID());
+
+ http::redirect('preferences.php?upd=1');
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ }
+}
+
+
+/* DISPLAY
+-------------------------------------------------------- */
+dcPage::open($page_title,
+ dcPage::jsLoad('js/_preferences.js').
+ dcPage::jsConfirmClose('user-form').
+
+ # --BEHAVIOR-- adminPreferencesHeaders
+ $core->callBehavior('adminPreferencesHeaders')
+);
+
+if (!empty($_GET['upd'])) {
+ echo '
'.__('Personal information has been successfully updated.').'
';
+}
+
+echo '
'.$page_title.' ';
+
+
+echo
+'
';
+
+dcPage::helpBlock('core_user_pref');
+dcPage::close();
+?>
\ No newline at end of file
diff --git a/admin/search.php b/admin/search.php
new file mode 100644
index 0000000..fd7d899
--- /dev/null
+++ b/admin/search.php
@@ -0,0 +1,180 @@
+blog->getPosts($params);
+ $counter = $core->blog->getPosts($params,true);
+ $post_list = new adminPostList($core,$posts,$counter->f(0));
+ } catch (Exception $e) {
+ $core->error->add($e->getMessage());
+ }
+ }
+ # Get comments
+ elseif ($qtype == 'c')
+ {
+ $starting_scripts .= dcPage::jsLoad('js/_comments.js');
+
+ $params['search'] = $q;
+ $params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page);
+ $params['no_content'] = true;
+ $params['order'] = 'comment_dt DESC';
+
+ try {
+ $comments = $core->blog->getComments($params);
+ $counter = $core->blog->getComments($params,true);
+ $comment_list = new adminCommentList($core,$comments,$counter->f(0));
+ } catch (Exception $e) {
+ $core->error->add($e->getMessage());
+ }
+ }
+}
+
+
+dcPage::open(__('Search'),$starting_scripts);
+
+echo
+'
'.html::escapeHTML($core->blog->name).' › '.__('Search').' '.
+'
';
+
+if ($q && !$core->error->flag())
+{
+ $redir = html::escapeHTML($_SERVER['REQUEST_URI']);
+
+ # Show posts
+ if ($qtype == 'p')
+ {
+ # Actions combo box
+ $combo_action = array();
+ if ($core->auth->check('publish,contentadmin',$core->blog->id))
+ {
+ $combo_action[__('publish')] = 'publish';
+ $combo_action[__('unpublish')] = 'unpublish';
+ $combo_action[__('schedule')] = 'schedule';
+ $combo_action[__('mark as pending')] = 'pending';
+ }
+ $combo_action[__('change category')] = 'category';
+ if ($core->auth->check('admin',$core->blog->id)) {
+ $combo_action[__('change author')] = 'author';
+ }
+ if ($core->auth->check('delete,contentadmin',$core->blog->id))
+ {
+ $combo_action[__('delete')] = 'delete';
+ }
+
+ # --BEHAVIOR-- adminPostsActionsCombo
+ $core->callBehavior('adminPostsActionsCombo',array(&$combo_action));
+
+ if ($counter->f(0) > 0) {
+ printf('
'.
+ ($counter->f(0) == 1 ? __('%d entry found') : __('%d entries found')).
+ ' ',$counter->f(0));
+ }
+
+ $post_list->display($page,$nb_per_page,
+ '
'
+ );
+ }
+ # Show posts
+ elseif ($qtype == 'c')
+ {
+ # Actions combo box
+ $combo_action = array();
+ if ($core->auth->check('publish,contentadmin',$core->blog->id))
+ {
+ $combo_action[__('publish')] = 'publish';
+ $combo_action[__('unpublish')] = 'unpublish';
+ $combo_action[__('mark as pending')] = 'pending';
+ $combo_action[__('mark as junk')] = 'junk';
+ }
+ if ($core->auth->check('delete,contentadmin',$core->blog->id))
+ {
+ $combo_action[__('delete')] = 'delete';
+ }
+
+ if ($counter->f(0) > 0) {
+ printf('
'.
+ ($counter->f(0) == 1 ? __('%d comment found') : __('%d comments found')).
+ ' ',$counter->f(0));
+ }
+
+ $comment_list->display($page,$nb_per_page,
+ '
'
+ );
+ }
+}
+
+
+dcPage::close();
+?>
\ No newline at end of file
diff --git a/admin/services.php b/admin/services.php
new file mode 100644
index 0000000..f19146c
--- /dev/null
+++ b/admin/services.php
@@ -0,0 +1,236 @@
+rest->addFunction('getPostById',array('dcRestMethods','getPostById'));
+$core->rest->addFunction('getCommentById',array('dcRestMethods','getCommentById'));
+$core->rest->addFunction('quickPost',array('dcRestMethods','quickPost'));
+$core->rest->addFunction('validatePostMarkup',array('dcRestMethods','validatePostMarkup'));
+$core->rest->addFunction('getZipMediaContent',array('dcRestMethods','getZipMediaContent'));
+
+$core->rest->serve();
+
+/* Common REST methods */
+class dcRestMethods
+{
+ public static function getPostById(&$core,$get)
+ {
+ if (empty($get['id'])) {
+ throw new Exception('No post ID');
+ }
+
+ $params = array('post_id' => (integer) $get['id']);
+
+ if (isset($get['post_type'])) {
+ $params['post_type'] = $get['post_type'];
+ }
+
+ $rs = $core->blog->getPosts($params);
+
+ if ($rs->isEmpty()) {
+ throw new Exception('No post for this ID');
+ }
+
+ $rsp = new xmlTag('post');
+ $rsp->id = $rs->post_id;
+
+ $rsp->blog_id($rs->blog_id);
+ $rsp->user_id($rs->user_id);
+ $rsp->cat_id($rs->cat_id);
+ $rsp->post_dt($rs->post_dt);
+ $rsp->post_creadt($rs->post_creadt);
+ $rsp->post_upddt($rs->post_upddt);
+ $rsp->post_format($rs->post_format);
+ $rsp->post_url($rs->post_url);
+ $rsp->post_lang($rs->post_lang);
+ $rsp->post_title($rs->post_title);
+ $rsp->post_excerpt($rs->post_excerpt);
+ $rsp->post_excerpt_xhtml($rs->post_excerpt_xhtml);
+ $rsp->post_content($rs->post_content);
+ $rsp->post_content_xhtml($rs->post_content_xhtml);
+ $rsp->post_notes($rs->post_notes);
+ $rsp->post_status($rs->post_status);
+ $rsp->post_selected($rs->post_selected);
+ $rsp->post_open_comment($rs->post_open_comment);
+ $rsp->post_open_tb($rs->post_open_tb);
+ $rsp->nb_comment($rs->nb_comment);
+ $rsp->nb_trackback($rs->nb_trackback);
+ $rsp->user_name($rs->user_name);
+ $rsp->user_firstname($rs->user_firstname);
+ $rsp->user_displayname($rs->user_displayname);
+ $rsp->user_email($rs->user_email);
+ $rsp->user_url($rs->user_url);
+ $rsp->cat_title($rs->cat_title);
+ $rsp->cat_url($rs->cat_url);
+
+ $rsp->post_display_content($rs->getContent(true));
+ $rsp->post_display_excerpt($rs->getExcerpt(true));
+
+ $metaTag = new xmlTag('meta');
+ if (($meta = @unserialize($rs->post_meta)) !== false)
+ {
+ foreach ($meta as $K => $V)
+ {
+ foreach ($V as $v) {
+ $metaTag->$K($v);
+ }
+ }
+ }
+ $rsp->post_meta($metaTag);
+
+ return $rsp;
+ }
+
+ public static function getCommentById(&$core,$get)
+ {
+ if (empty($get['id'])) {
+ throw new Exception('No comment ID');
+ }
+
+ $rs = $core->blog->getComments(array('comment_id' => (integer) $get['id']));
+
+ if ($rs->isEmpty()) {
+ throw new Exception('No comment for this ID');
+ }
+
+ $rsp = new xmlTag('post');
+ $rsp->id = $rs->comment_id;
+
+ $rsp->comment_dt($rs->comment_dt);
+ $rsp->comment_upddt($rs->comment_upddt);
+ $rsp->comment_author($rs->comment_author);
+ $rsp->comment_site($rs->comment_site);
+ $rsp->comment_content($rs->comment_content);
+ $rsp->comment_trackback($rs->comment_trackback);
+ $rsp->comment_status($rs->comment_status);
+ $rsp->post_title($rs->post_title);
+ $rsp->post_url($rs->post_url);
+ $rsp->post_id($rs->post_id);
+ $rsp->post_dt($rs->post_dt);
+ $rsp->user_id($rs->user_id);
+
+ $rsp->comment_display_content($rs->getContent(true));
+
+ if ($core->auth->userID()) {
+ $rsp->comment_ip($rs->comment_ip);
+ $rsp->comment_email($rs->comment_email);
+ # --BEHAVIOR-- adminAfterCommentDesc
+ $rsp->comment_spam_disp($core->callBehavior('adminAfterCommentDesc', $rs));
+ }
+
+ return $rsp;
+ }
+
+ public static function quickPost(&$core,$get,$post)
+ {
+ $cur = $core->con->openCursor($core->prefix.'post');
+
+ $cur->post_title = !empty($post['post_title']) ? $post['post_title'] : '';
+ $cur->user_id = $core->auth->userID();
+ $cur->post_content = !empty($post['post_content']) ? $post['post_content'] : '';
+ $cur->cat_id = !empty($post['cat_id']) ? (integer) $post['cat_id'] : null;
+ $cur->post_format = !empty($post['post_format']) ? $post['post_format'] : 'xhtml';
+ $cur->post_lang = !empty($post['post_lang']) ? $post['post_lang'] : '';
+ $cur->post_status = !empty($post['post_status']) ? (integer) $post['post_status'] : 0;
+ $cur->post_open_comment = (integer) $core->blog->settings->allow_comments;
+ $cur->post_open_tb = (integer) $core->blog->settings->allow_trackbacks;
+
+ # --BEHAVIOR-- adminBeforePostCreate
+ $core->callBehavior('adminBeforePostCreate',$cur);
+
+ $return_id = $core->blog->addPost($cur);
+
+ # --BEHAVIOR-- adminAfterPostCreate
+ $core->callBehavior('adminAfterPostCreate',$cur,$return_id);
+
+ $rsp = new xmlTag('post');
+ $rsp->id = $return_id;
+
+ $post = $core->blog->getPosts(array('post_id' => $return_id));
+
+ $rsp->post_status = $post->post_status;
+ $rsp->post_url = $post->getURL();
+ return $rsp;
+ }
+
+ public static function validatePostMarkup(&$core,$get,$post)
+ {
+ if (!isset($post['excerpt'])) {
+ throw new Exception('No entry excerpt');
+ }
+
+ if (!isset($post['content'])) {
+ throw new Exception('No entry content');
+ }
+
+ if (empty($post['format'])) {
+ throw new Exception('No entry format');
+ }
+
+ if (!isset($post['lang'])) {
+ throw new Exception('No entry lang');
+ }
+
+ $excerpt = $post['excerpt'];
+ $excerpt_xhtml = '';
+ $content = $post['content'];
+ $content_xhtml = '';
+ $format = $post['format'];
+ $lang = $post['lang'];
+
+ $core->blog->setPostContent(0,$format,$lang,$excerpt,$excerpt_xhtml,$content,$content_xhtml);
+
+ $rsp = new xmlTag('result');
+
+ $v = htmlValidator::validate($excerpt_xhtml.$content_xhtml);
+
+ $rsp->valid($v['valid']);
+ $rsp->errors($v['errors']);
+
+ return $rsp;
+ }
+
+ public static function getZipMediaContent(&$core,$get,$post)
+ {
+ if (empty($get['id'])) {
+ throw new Exception('No media ID');
+ }
+
+ $id = (integer) $get['id'];
+
+ if (!$core->auth->check('media,media_admin',$core->blog)) {
+ throw new Exception('Permission denied');
+ }
+
+ $core->media = new dcMedia($core);
+ $file = $core->media->getFile($id);
+
+ if ($file === null || $file->type != 'application/zip' || !$file->editable) {
+ throw new Exception('Not a valid file');
+ }
+
+ $rsp = new xmlTag('result');
+ $content = $core->media->getZipContent($file);
+
+ foreach ($content as $k => $v) {
+ $rsp->file($k);
+ }
+
+ return $rsp;
+ }
+}
+?>
\ No newline at end of file
diff --git a/admin/style/candyUpload/cancel.png b/admin/style/candyUpload/cancel.png
new file mode 100644
index 0000000..b1a5947
Binary files /dev/null and b/admin/style/candyUpload/cancel.png differ
diff --git a/admin/style/candyUpload/loader.png b/admin/style/candyUpload/loader.png
new file mode 100644
index 0000000..267f541
Binary files /dev/null and b/admin/style/candyUpload/loader.png differ
diff --git a/admin/style/candyUpload/style.css b/admin/style/candyUpload/style.css
new file mode 100644
index 0000000..7e2fc91
--- /dev/null
+++ b/admin/style/candyUpload/style.css
@@ -0,0 +1,120 @@
+
+div.cu-ctrl {
+ background: #fbfbfb;
+ padding: 5px 0 0 0;
+ margin: 0 0 1em 0;
+ overflow: hidden;
+ border-color: #ccc;
+ border-width: 1px 0;
+ border-style: solid;
+}
+div.cu-ctrl a {
+ border: none;
+}
+
+div.cu-msg {
+ padding: 0 0.5em;
+ font-weight: bold;
+}
+div.cu-msg.cu-error {
+ color: #c00;
+}
+
+div.cu-files {
+ padding: 0 0.5em;
+ margin: 10px 0;
+}
+div.cu-file {
+ margin: 0 0 8px 0;
+ position: relative;
+}
+div.cu-fileinfo {
+ margin-left: 16px;
+}
+div.cu-fileinfo span.cu-filecancel {
+ display: block;
+ position: absolute;
+ top: 2px;
+ left: 0px !important;
+ left: -16px;
+}
+div.cu-files span.cu-filecancel a {
+ display: block;
+ width: 12px;
+ height: 12px;
+ background: transparent url(cancel.png) no-repeat top left;
+ border: none;
+ text-indent: -5000px;
+ outline: none;
+}
+div.cu-files span.cu-filemsg {
+ font-weight: bold;
+ color: green;
+}
+div.cu-files span.cu-filemsg.cu-error {
+ color: #c00;
+}
+
+div.cu-progress {
+ margin-left: 16px;
+}
+div.cu-progress div {
+ height: 10px;
+ width: 0;
+ font-size: 0.8em;
+ line-height: 1em;
+ height: 1em;
+ padding: 2px 0;
+ text-align: right;
+ background: green url(loader.png) repeat-x top left;
+ color: white;
+ font-weight: bold;
+ -moz-border-radius: 2px;
+}
+
+div.cu-btn {
+ padding: 0 0.5em;
+ line-height: 1em;
+ height: 1.6em;
+ margin-top: 1em;
+ position: relative;
+}
+div.cu-btn span {
+ display: block;
+ margin: 0 0 0 5px;
+ float: right;
+}
+div.cu-btn span a {
+ display: block;
+ padding: 2px;
+ line-height: 127%;
+ background: #e2dfca;
+ color: #333;
+ text-decoration: none;
+ border: 1px solid #e2dfca !important;
+ outline: none;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+}
+div.cu-btn span a:hover, div.cu-btn span a:focus {
+ border-color: #ccc;
+ color: #06c;
+}
+div.cu-btn span.cu-btn-browse {
+ float: none;
+ position: absolute;
+ left: 0.5em;
+ margin: 0;
+}
+div.cu-btn span.cu-btn-upload {
+ font-weight: bold;
+}
+
+div.cu-maxsize {
+ clear: both;
+ margin: 3px 0 0 0.5em;
+}
+
+div.cu-disable {
+ padding: 0 0 0.5em 0.5em;
+}
\ No newline at end of file
diff --git a/admin/style/cat-bg.png b/admin/style/cat-bg.png
new file mode 100644
index 0000000..5a8b0c2
Binary files /dev/null and b/admin/style/cat-bg.png differ
diff --git a/admin/style/date-picker.css b/admin/style/date-picker.css
new file mode 100644
index 0000000..8cb66c7
--- /dev/null
+++ b/admin/style/date-picker.css
@@ -0,0 +1,35 @@
+.date-picker {
+ border-collapse : collapse;
+ background : #fff;
+ color : #fff;
+ border: 1px solid #666;
+ border-width : 1px 2px 2px 1px;
+}
+.date-picker th {
+ border : none;
+ color : #000;
+ text-align : center;
+}
+.date-picker td {
+ border : 1px solid #666;
+ text-align : center;
+ padding : 4px 6px;
+}
+th.date-picker-month {
+ text-align : left;
+}
+th.date-picker-year {
+ text-align : right;
+}
+.date-picker-control, th.date-picker-control {
+ color : #06c;
+ cursor : pointer;
+}
+.date-picker-day, .date-picker-today {
+ color : #000;
+ background : #eee;
+ cursor : pointer;
+}
+.date-picker-today {
+ background : #ccc;
+}
\ No newline at end of file
diff --git a/admin/style/default-rtl.css b/admin/style/default-rtl.css
new file mode 100644
index 0000000..f1217c4
--- /dev/null
+++ b/admin/style/default-rtl.css
@@ -0,0 +1,11 @@
+body {
+ direction: rtl;
+}
+
+.right {
+ text-align: left;
+}
+
+th {
+ text-align: left;
+}
\ No newline at end of file
diff --git a/admin/style/default.css b/admin/style/default.css
new file mode 100644
index 0000000..7d5714a
--- /dev/null
+++ b/admin/style/default.css
@@ -0,0 +1,1074 @@
+/*
+# -- BEGIN LICENSE BLOCK ----------------------------------
+#
+# This file is part of Dotclear 2.
+#
+# Copyright (c) 2003-2009 Olivier Meunier and contributors
+# Licensed under the GPL version 2.0 license.
+# See LICENSE file or
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+#
+# -- END LICENSE BLOCK ------------------------------------
+*/
+body {
+ font: 62.5%/1.5em "DejaVu Sans","Lucida Grande","Lucida Sans Unicode",Arial,sans-serif;
+ color : #000;
+ background : #fff;
+ margin : 0;
+ padding : 0;
+}
+body.auth {
+ background-image: none;
+}
+body.install {
+ background: transparent url(page-bg.png) repeat-y top left;
+}
+body.install #content {
+ margin-top: 1em;
+ font-size: 1.1em;
+}
+
+a img,:link img,:visited img { border:none }
+
+a, a:link, a:visited {
+ color : #06c;
+ text-decoration : none;
+ border-bottom : 1px dotted #f90;
+}
+a:hover, a:active, a:focus {
+
+}
+
+h1, h2, h3, h4, h5, h6, p {
+ margin-top : 0;
+ margin-bottom: 0.6em;
+}
+
+h2 {
+ font-family : Arial,Helvetica,sans-serif;
+ color : #069;
+ font-size : 1.4em;
+ padding: 4px 0;
+}
+
+h3 {
+ font-family : Arial,Helvetica,sans-serif;
+ color : #333;
+ font-size : 1.2em;
+}
+
+p, div.p {
+ margin : 0 0 1em 0;
+}
+
+hr {
+ height : 1px;
+ border-width : 1px 0 0 0;
+ border-color : #999;
+ border-style : solid;
+}
+
+pre, code {
+ font: 100% "Andale Mono","Courier New",monospace;
+}
+pre {
+ white-space: pre;
+ white-space: -moz-pre-wrap;
+ white-space: -hp-pre-wrap;
+ white-space: -o-pre-wrap;
+ white-space: -pre-wrap;
+ white-space: pre-wrap;
+ white-space: pre-line;
+ word-wrap: break-word;
+}
+
+
+/* LAYOUT
+-------------------------------------------------------- */
+/* General font-size */
+#top, #info-box, #main, #main-menu, #footer {
+ font-size: 1.1em;
+}
+
+#top {
+ margin : 0;
+ padding : 0;
+ background : transparent url(head-bg.png) repeat-x;
+}
+#top h1 {
+ padding : 0;
+ margin : 0;
+ height : 58px;
+ text-indent : -1000px;
+ background : transparent url(head-logo.png) no-repeat 0 0;
+}
+#top h1 a {
+ position: absolute;
+ top: 3px;
+ left: 0;
+ width: 130px;
+ height: 35px;
+ border: none;
+ outline: none;
+}
+
+#info-box {
+ position : absolute;
+ right : 10px;
+ top : 3px;
+ margin : 0;
+ padding : 3px 3px 4px 15px;
+ color: #fff;
+}
+#info-box div {
+ margin: 0; padding: 0;
+}
+#info-box div div {
+ display: inline;
+}
+#info-box>form>div {
+ line-height: 18px;
+}
+#info-box select {
+ width : 160px;
+}
+#info-box a.logout {
+ font-weight : bold;
+ color: #fff;
+}
+
+#wrapper {
+ background: transparent url(page-bg.png) repeat-y top left;
+ width: 100%;
+}
+#main {
+ width : 100%;
+ float : right;
+ margin-left : -155px;
+ margin-top : 0;
+}
+
+#content {
+ margin-left : 155px;
+ margin-bottom : 10px;
+ padding-top : 1px;
+ margin-right : 15px;
+}
+
+#main-menu {
+ width : 135px;
+ float : left;
+ margin-top : 0;
+ margin-bottom : 10px;
+}
+#main-menu h3 {
+ margin : 0 0 0.5em 0;
+ padding : 0 0 0 5px;
+ text-transform: uppercase;
+ color: #7e7d77;
+}
+#main-menu ul {
+ margin : 0 0 1em 4px;
+ padding : 0;
+ list-style : none;
+}
+#main-menu li {
+ display : block;
+ margin : 0.5em 0 0 5px;
+ padding : 2px 0 1px 20px;
+ background-repeat: no-repeat;
+ background-position: 0 0;
+}
+#main-menu a {
+ font-weight : bold;
+}
+#main-menu .active a {
+ border-bottom-style: solid;
+}
+#main-menu #dashboard-menu li {
+ margin-left: 0;
+}
+#main-menu #menu-new-post a {
+ padding : 2px;
+ background: #7e7d77;
+ color: #fff;
+ border: 1px solid #7e7d77;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+}
+#main-menu #menu-new-post a:hover, #main-menu #menu-new-post a:focus {
+ background: #666;
+}
+
+#footer {
+ clear : both;
+ margin: 0;
+ padding: 40px 0 0 0;
+ background: #fff url(footer-bg.png) no-repeat top left;
+}
+#footer p * {
+ vertical-align: bottom;
+}
+#footer p {
+ margin: 0 15px 0 155px;;
+ padding: 3px 0 20px 0;
+ border-top: 1px solid #dedcd1;
+ color: #93928a;
+ text-align: right;
+ font-size: 1.1em;
+}
+
+#debug {
+ position: absolute;
+ top: 0;
+ width: 100%;
+ height: 4px;
+ background: #d99;
+}
+#debug div {
+ display: none;
+ padding: 3px 0.5em 2px;
+}
+#debug p {
+ margin : 0.5em 0;
+}
+#debug:hover {
+ height: auto;
+}
+#debug:hover div {
+ display: block;
+}
+
+/* DASHBOARD */
+#dashboard-main {
+ float: left;
+ overflow: hidden;
+ padding-bottom: 1em;
+ width: 66%;
+}
+#dashboard-main #icons {
+ overflow: hidden;
+ padding-bottom: 1em;
+}
+#dashboard-main #icons p {
+ float: left;
+ width: 32%;
+ text-align: center;
+ margin: 2em 0 0 0;
+}
+#dashboard-main #icons span {
+ display: block;
+}
+#dashboard-main #icons a {
+ border-bottom-width: 0;
+}
+#dashboard-main #icons span a {
+ border-bottom-width: 1px;
+}
+
+#dashboard-main #quick {
+ clear: left;
+ margin-top: 2em;
+}
+#dashboard-main #quick h3 {
+ margin-bottom: 0.2em;
+ font-size: 1.4em;
+}
+#dashboard-main #quick p.qinfo {
+ margin: -1em -1em 1em;
+ padding: 1em;
+ background: #ebeadd;
+}
+
+#dashboard-items {
+ float: left;
+ width: 31%;
+ overflow: hidden;
+ margin-left: 2%;
+ padding-bottom: 1em;
+ font-size: 1.2em;
+}
+#dashboard-items p img {
+ vertical-align: middle;
+}
+#dashboard-items ul {
+ display: block;
+ padding-left: 1.5em;
+ list-style: square;
+}
+#dashboard-items li {
+ margin: 0.25em 0 0 0;
+ color: #666;
+}
+#dashboard-items #news dt {
+ font-weight: bold;
+ margin: 0 0 0.4em 0;
+}
+#dashboard-items #news dd {
+ font-size: 0.9em;
+ margin: 0 0 1em 0;
+}
+#dashboard-items #news dd p {
+ margin: 0.2em 0 0 0;
+}
+#upg-notify {
+ font-size: 0.9em;
+}
+#upg-notify ul {
+ padding-left: 15px;
+}
+#upg-notify li {
+ color: #fff;
+}
+
+/* POST */
+#entry-sidebar {
+ width : 200px;
+ float : right;
+}
+#entry-content {
+ margin-right : 220px;
+}
+#comments {
+ clear : both;
+}
+
+/* CATEGORIES */
+#categories {
+ margin: 1em 0 2em;
+}
+#categories ul {
+ list-style: none;
+ margin: 0 0 0 0;
+ padding: 0 0 0 0;
+}
+#categories ul li {
+ margin: 1em 0 0 0;
+ padding: 5px 10px 1em 30px;
+ border: 1px solid #ccc;
+ background: transparent url(cat-bg.png) repeat-y top left;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+}
+#categories ul li h4 {
+ margin: 0;
+}
+#categories ul li h4 span {
+ font-weight: normal;
+}
+#categories ul li p {
+ margin: 0;
+}
+select#del_cat {
+ width: 100%;
+}
+
+/* MEDIA */
+#media-icon {
+ float: left;
+}
+#media-details {
+ margin-left: 70px;
+}
+#media-details ul {
+ display: block;
+ margin-left: 0;
+ padding: 0;
+}
+#media-details li {
+ list-style: square inside;
+ margin: 0;
+ padding: 0;
+}
+#media-original-image {
+ overflow: auto;
+}
+#media-original-image.overheight {
+ height: 500px;
+}
+
+#add-file-f {
+ position: relative;
+}
+#add-file-f .more-file {
+ position:absolute;
+ right: 0.5em;
+ background: #999;
+ color: #fff;
+ border: none;
+}
+
+/* Help */
+#help {
+ margin-top: 2em;
+ background: #d6dde5;
+}
+#help-button {
+ position: absolute;
+ top: 50px;
+ right: 0px;
+ cursor: pointer;
+ background: #06c;
+ -moz-border-radius: 8px 0 0 8px;
+ -webkit-border-top-left-radius: 8px;
+ -webkit-border-bottom-left-radius: 8px;
+}
+.help-box {
+ display: none;
+}
+.help-box ul {
+ padding-left: 20px;
+ margin-left: 0;
+}
+#content.with-help #help-button {
+ right: 280px;
+}
+#content.with-help #help {
+ display: block;
+ position: absolute;
+ top: 40px;
+ right: 0;
+ width: 280px;
+ border-left: 1px solid #ccc;
+ margin-top: 0;
+ padding: 10px 0 0 0;
+ overflow: auto;
+}
+#content.with-help .help-content {
+ padding: 0 5px 1em 5px;
+}
+
+/* POPUP */
+body.popup #wrapper {
+ background-position : -130px 0;
+}
+body.popup #top h1 {
+ background-position : -130px 0;
+}
+body.popup #main {
+ margin-left : -35px;
+}
+body.popup #content {
+ margin-left : 35px;
+}
+body.popup #footer {
+ background-position: -130px 0;
+}
+body.popup #footer p {
+ margin-left: 35px;
+ border: none;
+}
+
+/* CLASSES
+-------------------------------------------------------- */
+a.button, a.back {
+ padding : 2px;
+ background: #e2dfca;
+ border: 1px solid #e2dfca;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ cursor: pointer;
+ outline: none;
+}
+a.button:hover, a.button:focus, a.back:hover, a.back:focus {
+ border-color: #ccc;
+}
+h2 a.button {
+ color: #333;
+ font-weight: normal;
+}
+a.back:before {
+ content: "\ab\a0";
+}
+
+.help-content dt {
+ font-weight: bold;
+ color: #666;
+ margin: 0;
+}
+.help-content dd {
+ margin: 0.3em 0 1.5em 0;
+}
+
+.clear {
+ clear : both;
+}
+.lclear {
+ clear : left;
+}
+div.clearer {
+ height : 1px;
+ font-size : 1px;
+}
+
+.hide {
+ display : none;
+}
+
+.right {
+ text-align : right;
+}
+
+.frame-shrink {
+ border: 1px solid #666;
+ padding: 0.5em;
+ margin-bottom: 1em;
+ height: 120px;
+ overflow: auto;
+}
+
+.grid {
+ background: transparent repeat url('grid.png') 0 0;
+}
+
+.line p {
+ margin : 0;
+}
+
+div.error, p.error, div.message, p.message, div.static-msg, p.static-msg {
+ padding: 0.5em 0.5em 0.5em 40px;
+ margin-bottom: 1em;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+}
+p.error, p.message, p.static-msg {
+ padding-top: 1em;
+ padding-bottom: 1em;
+}
+div.error, p.error {
+ background: #e5bfbf url(msg-error.png) no-repeat 5px 5px;
+ color: #600;
+}
+div.message, p.message, div.static-msg, p.static-msg {
+ background: #666 url(msg-std.png) no-repeat 5px 5px;
+ color: #fff;
+}
+div.message a, p.message a, div.static-msg a, p.static-msg a {
+ color: #fff;
+}
+
+.offline {
+ color : #666;
+}
+
+ul.nice {
+ margin: 1em 0;
+ padding: 0 0 0 2em;
+ list-style: square;
+}
+ul.nice li {
+ margin:0;
+ padding: 0;
+}
+
+.three-cols {
+}
+.three-cols .col {
+ width : 32.3%;
+ float : left;
+ margin-left : 1%;
+}
+.three-cols .col:first-child {
+ width : 33.3%;
+ margin-left : 0;
+}
+
+.two-cols {
+ position : static;
+}
+.two-cols .col {
+ width : 49%;
+ margin-left : 1%;
+ float : left;
+}
+.two-cols .col:first-child {
+ width : 50%;
+ margin-left : 0;
+}
+
+.comment {
+ border-top : 2px solid #ccc;
+ margin-bottom : 1em;
+ padding : 2em 0 1em 0;
+ position : relative;
+}
+.comment form p {
+ margin : 0;
+ position : absolute;
+ top : 2px;
+ right : 0;
+}
+
+
+.part-tabs {
+ float: left;
+ width: 100%;
+ background: transparent url(tab-bg.png) repeat-x bottom;
+ margin-bottom: 2em;
+}
+.part-tabs ul {
+ margin: 0;
+ padding: 10px 10px 0;
+ list-style: none;
+}
+.part-tabs li {
+ float: left;
+ background: transparent url(tab-n-l.png) no-repeat top left;
+ margin: 0 3px 0 0;
+ padding: 0 0 0 5px;
+}
+.part-tabs a {
+ display: block;
+ background: transparent url(tab-n-r.png) no-repeat top right;
+ padding: 1px 10px 1px 5px;
+ border: none;
+ outline: none;
+}
+.part-tabs li.part-tabs-active {
+ background-image: url(tab-c-l.png);
+}
+.part-tabs li.part-tabs-active a {
+ background-image: url(tab-c-r.png);
+ padding-bottom: 2px;
+ font-weight : bold;
+}
+.part-tabs li.part-tabs-link {
+ background-image: url(tab-l-l.png);
+}
+.part-tabs li.part-tabs-link a {
+ background-image: url(tab-l-r.png);
+}
+
+/* Themes list */
+#themes {
+ border-bottom: 1px solid #ccc;
+ margin: 1em 0;
+}
+#themes div.theme-details {
+ clear: left;
+ border-top: 1px solid #ccc;
+ padding: 1em 0;
+}
+#themes div.theme-details:hover {
+ background: #eee;
+}
+#themes div.theme-details div.theme-shot {
+ float: left;
+}
+#themes div.theme-details div.theme-shot img {
+ display: block;
+ width: 57px;
+ height: 50px;
+ border: 1px solid #ccc;
+}
+#themes div.theme-details div.theme-info {
+ margin-left: 67px;
+}
+#themes div.theme-details div.theme-info span.theme-desc {
+ display: block;
+}
+#themes div.theme-details div.theme-info span.theme-version {
+ color: #666;
+}
+#themes div.theme-details div.theme-actions {
+ margin-left: 67px;
+}
+/* Themes list, JS version */
+#themes-wrapper {
+}
+#theme-box {
+ border: 1px solid #999;
+ border-left: none;
+ padding: 5px;
+ float: right;
+ height: 400px;
+ width: 300px;
+ overflow: auto;
+}
+#theme-box div.theme-shot img {
+ display: block;
+ margin: 0 0 0 10px;
+ width: 280px;
+ height: 245px;
+ border: 1px solid #ccc;
+}
+#theme-box div.theme-info {
+ margin: 1em 0 0 10px;
+}
+#theme-box h3 {
+ margin: 0;
+}
+#theme-box div.theme-info span {
+ display: block;
+}
+#theme-box span.theme-version {
+ color: #666;
+}
+#theme-box span.theme-parent-ok {
+ color: #666;
+}
+#theme-box span.theme-parent-missing {
+ color: #c00;
+ font-weight:bold;
+}
+#theme-box div.theme-actions {
+ margin-left: 10px;
+}
+#themes-wrapper #themes {
+ border: 1px solid #999;
+ overflow: auto;
+ height: 400px;
+ padding: 5px;
+ margin: 0;
+}
+#themes div.theme-details-js {
+ float: left;
+ width: 120px;
+ height: 150px;
+ margin: 0 10px 20px;
+ padding: 10px 10px 0;
+ text-align: center;
+ background: #f3f3f3;
+ border: 1px solid #f3f3f3;
+ cursor: pointer;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+}
+#themes div.theme-details-js label {
+ cursor: pointer;
+}
+#themes div.theme-details-js.theme-selected {
+ background: #ebe9dd;
+ border: 1px solid #999;
+}
+#themes div.theme-details-js div.theme-shot img {
+ width: 120px;
+ height: 105px;
+ border: 1px solid #fff;
+}
+#themes div.theme-details-js h3 {
+ font-size: 90%;
+ font-family: inherit;
+ font-weight: normal;
+ margin: 0;
+ padding: 0;
+}
+
+/* Plugins list */
+#plugins td.action {
+ vertical-align: middle;
+}
+#plugins td form input.activate, table.plugins form input.delete {
+ padding: 1px;
+ background: none;
+ font-weight: normal;
+ border-color: #f90;
+}
+#plugins td form input.delete {
+ font-weight: bold;
+ color: #c00;
+}
+
+.media-list {
+ position : static;
+}
+.media-col-0 {
+ clear: left;
+}
+.media-item {
+ position: relative;
+ border-top: 1px solid #ccc;
+ margin-bottom: 1em;
+ padding: 5px 0;
+}
+div.media-list .media-item {
+ width: 49%;
+ float: left;
+ margin-right: 1%;
+}
+a.media-icon {
+ display: block;
+ border-bottom: none;
+ float: left;
+}
+.media-icon img {
+ display: block;
+}
+.media-item ul {
+ display: block;
+ list-style: none;
+ margin: 0 0 0 60px;
+ padding: 0;
+}
+li.media-action {
+ display: block;
+ position: absolute;
+ top: 5px;
+ right: 5px;
+ height: 16px;
+}
+li.media-action a {
+ border: none;
+}
+li.media-action form {
+ display: inline;
+}
+li.media-action input {
+ border: none;
+}
+
+.zip-dl {
+ background: transparent url(package.png) no-repeat 0 50%;
+ padding: 5px 0 5px 20px;
+}
+
+select.l10n option {
+ padding-left: 16px;
+}
+option.avail10n {
+ background: transparent url(../images/check-on.png) no-repeat 0 50%;
+}
+
+/* TABLES
+-------------------------------------------------------- */
+table {
+ font-size : 1em;
+ border-collapse : collapse;
+ margin : 0 0 1em 0;
+}
+tr.line:hover {
+ background : #ddd;
+}
+th, td {
+ border-width : 0 0 1px 0;
+ border-style : solid;
+ border-color : #ccc;
+ padding : 3px 5px;
+ vertical-align : top;
+}
+th {
+ text-align : left;
+ border-bottom-color : #666;
+}
+
+.noborder td, td.noborder, .noborder th, th.noborder {
+ border-width : 0;
+}
+
+table .maximal, table.maximal {
+ width : 100%;
+}
+table .minimal {
+ width : 1px;
+}
+
+table .nowrap {
+ white-space : nowrap;
+}
+
+td.status {
+ vertical-align: middle;
+}
+td.status img {
+ margin-bottom: -2px;
+}
+td.status a {
+ border: none;
+}
+
+tr.line img.expand {
+ margin-right: 10px;
+ margin-bottom: -2px;
+}
+tr.line input {
+ vertical-align: top;
+}
+tr.expand td {
+ border-bottom: none;
+}
+td.expand {
+ padding: 1em;
+}
+
+.dragable {
+ border-collapse: separate;
+}
+.dragable tbody td {
+
+}
+.handle {
+ padding : 0;
+}
+.handler {
+ cursor : move;
+ background : transparent url(drag.png) no-repeat 0 50%;
+ padding-left : 15px;
+}
+
+/* FORMS
+-------------------------------------------------------- */
+form {
+ display : block;
+ margin : 0;
+ padding : 0;
+}
+
+fieldset {
+ display : block;
+ margin : 0 0 1em 0;
+ padding : 1em 0.5em;
+ border-width : 1px 0;
+ border-style: solid;
+ border-color: #ccc;
+ background: #fbfbfb;
+}
+legend {
+ font-weight : bold;
+ padding: 0.2em 0.6em;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #ccc;
+ background: #fbfbfb;
+ margin-bottom: 0.5em;
+}
+optgroup {
+ font-weight : bold;
+ font-style : normal;
+}
+option {
+ font-weight : normal;
+}
+
+input, textarea, select {
+ background : #f9f9f9;
+ border-width : 1px;
+ border-style : solid;
+ border-color : #000 #ccc #ccc #000;
+}
+input, textarea, select, option {
+ font: 1em "DejaVu Sans","Lucida Grande","Lucida Sans Unicode",Arial,sans-serif;
+}
+input[type=text], input[type=password], textarea {
+ padding : 2px 0;
+}
+input[type=checkbox], input[type=radio] {
+ border: none;
+}
+textarea {
+ padding : 2px 0;
+}
+/*input[type=text]:focus, input[type=password]:focus, textarea:focus, option {
+ background : #dfdcc7;
+} can't select text with opera */
+input[type=submit], input[type=reset], input[type=button], input.submit {
+ padding : 2px 2px;
+ background: #e2dfca;
+ border: 1px solid #e2dfca;
+ color: #333;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ cursor: pointer;
+}
+input[type=submit]:hover, input[type=reset]:hover, input[type=button]:hover, input.submit:hover {
+ border-color: #ccc;
+ color: #06c;
+}
+
+input[type=submit], input.submit {
+ font-weight : bold;
+}
+
+input[type=checkbox], input[type=radio] {
+ margin : 0;
+ padding : 0;
+ background : transparent;
+}
+
+label {
+ display : block;
+}
+label input, label select, label span {
+ display : block;
+}
+p.form-note {
+ margin-top : -1em;
+ color : #f60;
+}
+
+label.classic {
+ display : inline;
+}
+label.classic input, label span input, label.classic select, label span select {
+ display : inline;
+}
+
+label.area, p.area {
+ width: inherit !important;
+}
+.area textarea {
+ display : block;
+ width : 100%;
+}
+
+label.required {
+ font-weight : bold;
+}
+label.required:before {
+ content : '* ';
+ color : #c00;
+}
+
+p.field {
+ position: relative;
+
+}
+p.field label {
+ display: block;
+ width: 14em;
+}
+p.field input, p.field select {
+ display: inline;
+ position: absolute;
+ left: 15em;
+ top: 0;
+}
+
+label .maximal, textarea.maximal, input.maximal {
+ width : 100%;
+}
+
+a.form-control {
+ display : none;
+ font-weight: bold;
+ background: url(magnifier.png) no-repeat 0 0;
+ color: green;
+ padding-left: 20px;
+}
+
+fieldset.constrained {
+ margin: 0;
+ padding: 0;
+ border: none;
+ background: transparent;
+}
+
+#login-screen {
+ display: block;
+ width : 180px;
+ margin : 30px auto 0;
+ font-size: 1.1em;
+}
+#login-screen h1 {
+ text-indent: -2000px;
+ background: transparent url(dotclear-logo.png) no-repeat top left;
+ height: 46px;
+}
+#login-screen fieldset {
+ border: 1px solid #999;
+ padding: 1em 10px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+}
+#login-screen input[type=text], #login-screen input[type=password] {
+ width: 100%;
+}
\ No newline at end of file
diff --git a/admin/style/dotclear-logo.png b/admin/style/dotclear-logo.png
new file mode 100644
index 0000000..e39a3ea
Binary files /dev/null and b/admin/style/dotclear-logo.png differ
diff --git a/admin/style/drag.png b/admin/style/drag.png
new file mode 100644
index 0000000..c581786
Binary files /dev/null and b/admin/style/drag.png differ
diff --git a/admin/style/farbtastic/farbtastic.css b/admin/style/farbtastic/farbtastic.css
new file mode 100644
index 0000000..07d953f
--- /dev/null
+++ b/admin/style/farbtastic/farbtastic.css
@@ -0,0 +1,33 @@
+.farbtastic {
+ position: relative;
+}
+.farbtastic * {
+ position: absolute;
+ cursor: crosshair;
+}
+.farbtastic, .farbtastic .wheel {
+ width: 195px;
+ height: 195px;
+}
+.farbtastic .color, .farbtastic .overlay {
+ top: 47px;
+ left: 47px;
+ width: 101px;
+ height: 101px;
+}
+.farbtastic .wheel {
+ background: url(wheel.png) no-repeat;
+ width: 195px;
+ height: 195px;
+}
+.farbtastic .overlay {
+ background: url(mask.png) no-repeat;
+}
+.farbtastic .marker {
+ width: 17px;
+ height: 17px;
+ margin: -8px 0 0 -8px;
+ overflow: hidden;
+ background: url(marker.png) no-repeat;
+}
+
diff --git a/admin/style/farbtastic/marker.png b/admin/style/farbtastic/marker.png
new file mode 100644
index 0000000..db7da55
Binary files /dev/null and b/admin/style/farbtastic/marker.png differ
diff --git a/admin/style/farbtastic/mask.png b/admin/style/farbtastic/mask.png
new file mode 100644
index 0000000..b0a4d40
Binary files /dev/null and b/admin/style/farbtastic/mask.png differ
diff --git a/admin/style/farbtastic/wheel.png b/admin/style/farbtastic/wheel.png
new file mode 100644
index 0000000..97b343d
Binary files /dev/null and b/admin/style/farbtastic/wheel.png differ
diff --git a/admin/style/footer-bg.png b/admin/style/footer-bg.png
new file mode 100644
index 0000000..45019be
Binary files /dev/null and b/admin/style/footer-bg.png differ
diff --git a/admin/style/grid.png b/admin/style/grid.png
new file mode 100644
index 0000000..cf9402d
Binary files /dev/null and b/admin/style/grid.png differ
diff --git a/admin/style/head-bg.png b/admin/style/head-bg.png
new file mode 100644
index 0000000..d3f91a3
Binary files /dev/null and b/admin/style/head-bg.png differ
diff --git a/admin/style/head-logo.png b/admin/style/head-logo.png
new file mode 100644
index 0000000..399c67e
Binary files /dev/null and b/admin/style/head-logo.png differ
diff --git a/admin/style/iesucks.css b/admin/style/iesucks.css
new file mode 100644
index 0000000..32faed0
--- /dev/null
+++ b/admin/style/iesucks.css
@@ -0,0 +1,42 @@
+label .maximal, textarea.maximal, input.maximal {
+ width : 98% !important;
+}
+.area textarea {
+ width : 98% !important;
+}
+textarea {
+ padding : 0 !important;
+}
+legend {
+ margin-bottom: 1em !important;
+}
+
+p.area {
+ width: 98% !important;
+}
+p.area textarea {
+ width: 100% !important;
+}
+
+tr.line input {
+ vertical-align: baseline !important;
+}
+
+#dashboard .col {
+ width: 48% !important;
+}
+
+td.status img, tr.line img.expand {
+ margin-bottom: 0 !important;
+}
+
+.wysiwygIframe {
+ width: 98% !important;
+}
+
+div.media-list .media-item {
+ width: 48% !important;
+}
+a.media-icon {
+ border-bottom:none !important;
+}
\ No newline at end of file
diff --git a/admin/style/jsToolBar/bt_bquote.png b/admin/style/jsToolBar/bt_bquote.png
new file mode 100644
index 0000000..bb6be88
Binary files /dev/null and b/admin/style/jsToolBar/bt_bquote.png differ
diff --git a/admin/style/jsToolBar/bt_br.png b/admin/style/jsToolBar/bt_br.png
new file mode 100644
index 0000000..717ff6c
Binary files /dev/null and b/admin/style/jsToolBar/bt_br.png differ
diff --git a/admin/style/jsToolBar/bt_clean.png b/admin/style/jsToolBar/bt_clean.png
new file mode 100644
index 0000000..3973a2c
Binary files /dev/null and b/admin/style/jsToolBar/bt_clean.png differ
diff --git a/admin/style/jsToolBar/bt_code.png b/admin/style/jsToolBar/bt_code.png
new file mode 100644
index 0000000..40a149f
Binary files /dev/null and b/admin/style/jsToolBar/bt_code.png differ
diff --git a/admin/style/jsToolBar/bt_del.png b/admin/style/jsToolBar/bt_del.png
new file mode 100644
index 0000000..87c3c66
Binary files /dev/null and b/admin/style/jsToolBar/bt_del.png differ
diff --git a/admin/style/jsToolBar/bt_em.png b/admin/style/jsToolBar/bt_em.png
new file mode 100644
index 0000000..cddfe87
Binary files /dev/null and b/admin/style/jsToolBar/bt_em.png differ
diff --git a/admin/style/jsToolBar/bt_img.png b/admin/style/jsToolBar/bt_img.png
new file mode 100644
index 0000000..b991a52
Binary files /dev/null and b/admin/style/jsToolBar/bt_img.png differ
diff --git a/admin/style/jsToolBar/bt_img_select.png b/admin/style/jsToolBar/bt_img_select.png
new file mode 100644
index 0000000..b5bc5bf
Binary files /dev/null and b/admin/style/jsToolBar/bt_img_select.png differ
diff --git a/admin/style/jsToolBar/bt_ins.png b/admin/style/jsToolBar/bt_ins.png
new file mode 100644
index 0000000..f690b90
Binary files /dev/null and b/admin/style/jsToolBar/bt_ins.png differ
diff --git a/admin/style/jsToolBar/bt_link.png b/admin/style/jsToolBar/bt_link.png
new file mode 100644
index 0000000..07a2b0e
Binary files /dev/null and b/admin/style/jsToolBar/bt_link.png differ
diff --git a/admin/style/jsToolBar/bt_ol.png b/admin/style/jsToolBar/bt_ol.png
new file mode 100644
index 0000000..65d26e4
Binary files /dev/null and b/admin/style/jsToolBar/bt_ol.png differ
diff --git a/admin/style/jsToolBar/bt_paragraph.png b/admin/style/jsToolBar/bt_paragraph.png
new file mode 100644
index 0000000..5de086e
Binary files /dev/null and b/admin/style/jsToolBar/bt_paragraph.png differ
diff --git a/admin/style/jsToolBar/bt_post.png b/admin/style/jsToolBar/bt_post.png
new file mode 100644
index 0000000..69f0c6f
Binary files /dev/null and b/admin/style/jsToolBar/bt_post.png differ
diff --git a/admin/style/jsToolBar/bt_pre.png b/admin/style/jsToolBar/bt_pre.png
new file mode 100644
index 0000000..b765759
Binary files /dev/null and b/admin/style/jsToolBar/bt_pre.png differ
diff --git a/admin/style/jsToolBar/bt_quote.png b/admin/style/jsToolBar/bt_quote.png
new file mode 100644
index 0000000..6cd98e1
Binary files /dev/null and b/admin/style/jsToolBar/bt_quote.png differ
diff --git a/admin/style/jsToolBar/bt_strong.png b/admin/style/jsToolBar/bt_strong.png
new file mode 100644
index 0000000..d2ac922
Binary files /dev/null and b/admin/style/jsToolBar/bt_strong.png differ
diff --git a/admin/style/jsToolBar/bt_ul.png b/admin/style/jsToolBar/bt_ul.png
new file mode 100644
index 0000000..158790a
Binary files /dev/null and b/admin/style/jsToolBar/bt_ul.png differ
diff --git a/admin/style/jsToolBar/jsToolBar.css b/admin/style/jsToolBar/jsToolBar.css
new file mode 100644
index 0000000..d6b8145
--- /dev/null
+++ b/admin/style/jsToolBar/jsToolBar.css
@@ -0,0 +1,173 @@
+.jstEditor {
+ border-width : 0 1px 1px 1px;
+ border-style : solid;
+ border-color : #000 #ccc #ccc #000;
+ padding-left: 5px;
+ background : #f9f9f9;
+}
+.jstEditor textarea, .jstEditor iframe {
+ margin: 0;
+ border: 0;
+}
+
+.jstHandle {
+ height: 8px;
+ background: #ccc url(resize.png) no-repeat center center;
+ font-size: 0.1em;
+ cursor: s-resize;
+ border-color: #ccc #ccc #ccc #000;
+ border-width: 0 1px 1px 1px;
+ border-style: solid;
+}
+
+.jstElements {
+ padding: 3px 3px;
+ border-width: 1px 1px 0 1px;
+ border-style: solid;
+ border-color: #000 #ccc #ccc #000;
+ background: #eceade;
+}
+
+.jstElements select, .jstElements button {
+ vertical-align: middle;
+}
+.jstElements select {
+ width: 12em;
+}
+.jstElements button {
+ margin-right : 2px;
+ width : 20px;
+ height: 20px;
+ padding: 0;
+ border-style: solid;
+ border-width: 1px;
+ border-color: #eceade;
+ background-color : transparent;
+ background-position : 50% 50%;
+ background-repeat: no-repeat;
+}
+.jstElements button:hover {
+ border-color : #ccc;
+ background-color: #dfdbc7;
+}
+.jstElements button span {
+ display : none;
+}
+.jstElements span {
+ display : inline;
+}
+
+.jstSpacer {
+ width : 0px;
+ font-size: 1px;
+ margin-right: 4px;
+}
+
+.jstSwitcher {
+ display: block;
+ list-style: none;
+ margin: 0 0 0 -5px;
+ padding: 0 0 5px 0;
+ background: #eee;
+ border-top: 1px solid #999;
+ font-size: 90%;
+ font-weight: bold;
+}
+.jstSwitcher li {
+ display: inline;
+ margin: 0 0 0 5px;
+ padding: 2px 4px;
+}
+.jstSwitcher li.jstSwitcherCurrent {
+ color: #fff;
+ background: #999;
+ -moz-border-radius: 0 0 2px 2px;
+}
+.jstSwitcher a {
+ font-weight: normal;
+ border-bottom: none !important;
+}
+
+/* Buttons
+-------------------------------------------------------- */
+.jstb_strong {
+ background-image: url(bt_strong.png);
+}
+.jstb_em {
+ background-image: url(bt_em.png);
+}
+.jstb_ins {
+ background-image: url(bt_ins.png);
+}
+.jstb_del {
+ background-image: url(bt_del.png);
+}
+.jstb_quote {
+ background-image: url(bt_quote.png);
+}
+.jstb_code {
+ background-image: url(bt_code.png);
+}
+.jstb_paragraph {
+ background-image: url(bt_paragraph.png);
+}
+.jstb_br {
+ background-image: url(bt_br.png);
+}
+.jstb_blockquote {
+ background-image: url(bt_bquote.png);
+}
+.jstb_pre {
+ background-image: url(bt_pre.png);
+}
+.jstb_ul {
+ background-image: url(bt_ul.png);
+}
+.jstb_ol {
+ background-image: url(bt_ol.png);
+}
+.jstb_link {
+ background-image: url(bt_link.png);
+}
+.jstb_img {
+ background-image: url(bt_img.png);
+}
+.jstb_img_select {
+ background-image: url(bt_img_select.png);
+}
+.jstb_post_link {
+ background-image: url(bt_post.png);
+}
+.jstb_removeFormat {
+ background-image: url(bt_clean.png);
+}
+
+
+/* WYSIWYG Iframe */
+.wysiwygIframe {
+ border-width : 1px;
+ border-style : solid;
+ border-color : #000 #ccc #ccc #000;
+ width : 100%;
+}
+
+/* WYSIWYG Document */
+body.wysiwygDoc {
+ font: 12px "DejaVu Sans","Lucida Grande","Lucida Sans Unicode",Arial,sans-serif;
+ color : #000;
+ background: #f9f9f9;
+ margin: 0;
+ padding : 2px;
+ border: none;
+}
+.wysiwygDoc pre, .wysiwygDoc code, .wysiwygDoc kbd, .wysiwygDoc samp {
+ font-family:"Courier New",Courier,monospace;
+ font-size : 1.1em;
+}
+.wysiwygDoc code {
+ color : #666;
+ font-weight : bold;
+}
+body.wysiwygDoc > p:first-child {
+ margin-top: 0;
+}
\ No newline at end of file
diff --git a/admin/style/jsToolBar/resize.png b/admin/style/jsToolBar/resize.png
new file mode 100644
index 0000000..1b21270
Binary files /dev/null and b/admin/style/jsToolBar/resize.png differ
diff --git a/admin/style/magnifier.png b/admin/style/magnifier.png
new file mode 100644
index 0000000..1578a8d
Binary files /dev/null and b/admin/style/magnifier.png differ
diff --git a/admin/style/modal/close.png b/admin/style/modal/close.png
new file mode 100644
index 0000000..5386506
Binary files /dev/null and b/admin/style/modal/close.png differ
diff --git a/admin/style/modal/loader.gif b/admin/style/modal/loader.gif
new file mode 100644
index 0000000..e2a116c
Binary files /dev/null and b/admin/style/modal/loader.gif differ
diff --git a/admin/style/modal/modal.css b/admin/style/modal/modal.css
new file mode 100644
index 0000000..8524e7c
--- /dev/null
+++ b/admin/style/modal/modal.css
@@ -0,0 +1,52 @@
+div.jq-modal {
+ line-height: 1;
+ background: #fff;
+}
+div.jq-modal-container {
+ padding: 1px;
+ position: relative;
+}
+div.jq-modal-content {
+ position: relative;
+ overflow: auto;
+}
+div.jq-modal-closer {
+ position: absolute;
+ top: -12px;
+ right: -12px;
+ width: 25px;
+ height: 25px;
+}
+div.jq-modal-closer a {
+ display: block;
+ text-indent: -5000px;
+ width: 25px;
+ height: 25px;
+ outline: none;
+ border: none;
+}
+
+/* modalImage */
+div.jq-modal-content img {
+ display: block;
+}
+span.jq-modal-legend {
+ display: block;
+ padding: 3px 0;
+}
+a.jq-modal-next, a.jq-modal-prev {
+ display: block;
+ position: absolute;
+ top: 0;
+ width: 50%;
+ bottom: 0;
+ outline: none;
+ border: none;
+ text-indent: -5000px;
+}
+a.jq-modal-next {
+ right: 0;
+}
+a.jq-modal-prev {
+ left: 0;
+}
\ No newline at end of file
diff --git a/admin/style/msg-error.png b/admin/style/msg-error.png
new file mode 100644
index 0000000..eb6cedb
Binary files /dev/null and b/admin/style/msg-error.png differ
diff --git a/admin/style/msg-std.png b/admin/style/msg-std.png
new file mode 100644
index 0000000..3a2ccd6
Binary files /dev/null and b/admin/style/msg-std.png differ
diff --git a/admin/style/package.png b/admin/style/package.png
new file mode 100644
index 0000000..7b5f24e
Binary files /dev/null and b/admin/style/package.png differ
diff --git a/admin/style/page-bg.png b/admin/style/page-bg.png
new file mode 100644
index 0000000..a048e81
Binary files /dev/null and b/admin/style/page-bg.png differ
diff --git a/admin/style/tab-bg.png b/admin/style/tab-bg.png
new file mode 100644
index 0000000..4c466be
Binary files /dev/null and b/admin/style/tab-bg.png differ
diff --git a/admin/style/tab-c-l.png b/admin/style/tab-c-l.png
new file mode 100644
index 0000000..e449418
Binary files /dev/null and b/admin/style/tab-c-l.png differ
diff --git a/admin/style/tab-c-r.png b/admin/style/tab-c-r.png
new file mode 100644
index 0000000..200358c
Binary files /dev/null and b/admin/style/tab-c-r.png differ
diff --git a/admin/style/tab-l-l.png b/admin/style/tab-l-l.png
new file mode 100644
index 0000000..3760520
Binary files /dev/null and b/admin/style/tab-l-l.png differ
diff --git a/admin/style/tab-l-r.png b/admin/style/tab-l-r.png
new file mode 100644
index 0000000..ef538e6
Binary files /dev/null and b/admin/style/tab-l-r.png differ
diff --git a/admin/style/tab-n-l.png b/admin/style/tab-n-l.png
new file mode 100644
index 0000000..2d9a8bf
Binary files /dev/null and b/admin/style/tab-n-l.png differ
diff --git a/admin/style/tab-n-r.png b/admin/style/tab-n-r.png
new file mode 100644
index 0000000..420bf7f
Binary files /dev/null and b/admin/style/tab-n-r.png differ
diff --git a/admin/trackbacks.php b/admin/trackbacks.php
new file mode 100644
index 0000000..cad9401
--- /dev/null
+++ b/admin/trackbacks.php
@@ -0,0 +1,150 @@
+blog->getPosts($params);
+
+ if ($post->isEmpty()) {
+ $core->error->add(__('This entry does not exist or is not published'));
+ $can_view_page = false;
+ } else {
+ $TB = new dcTrackback($core);
+ $tb_excerpt = $post->post_excerpt_xhtml.' '.$post->post_content_xhtml;
+ $post_title = $post->post_title;
+ $post_url = $post->getURL();
+ }
+}
+else
+{
+ $core->error->add(__('This entry does not exist.'));
+ $can_view_page = false;
+}
+
+# Change excerpt
+if (!empty($_POST['tb_excerpt'])) {
+ $tb_excerpt = $_POST['tb_excerpt'];
+}
+
+# Sanitize excerpt
+$tb_excerpt = html::clean($tb_excerpt);
+$tb_excerpt = html::decodeEntities($tb_excerpt);
+$tb_excerpt = text::cutString(html::escapeHTML($tb_excerpt),255);
+$tb_excerpt = preg_replace('/\s+/ms',' ',$tb_excerpt);
+
+# Send pings
+if ($post && !$post->isEmpty() && !empty($_POST['tb_urls']))
+{
+ $tb_urls = $_POST['tb_urls'];
+ $tb_urls = str_replace("\r",'',$tb_urls);
+
+ $post_title = html::escapeHTML(trim(html::clean($post_title)));
+
+ foreach (explode("\n",$tb_urls) as $tb_url)
+ {
+ try {
+ $TB->ping($tb_url,$id,$post_title,$tb_excerpt,$post_url);
+ } catch (Exception $e) {
+ $core->error->add($e->getMessage());
+ }
+ }
+
+ if (!$core->error->flag()) {
+ http::redirect('trackbacks.php?id='.$id.'&sent=1');
+ }
+}
+
+$page_title = __('Ping blogs');
+
+/* DISPLAY
+-------------------------------------------------------- */
+dcPage::open($page_title,dcPage::jsLoad('js/_trackbacks.js'));
+
+# Exit if we cannot view page
+if (!$can_view_page) {
+ dcPage::close();
+ exit;
+}
+
+if (!empty($_GET['sent'])) {
+ echo '
'.__('All pings sent.').'
';
+}
+
+echo '
'.html::escapeHTML($core->blog->name).' › '.$page_title.' ';
+
+echo '
« '.
+ sprintf(__('Back to "%s"'),html::escapeHTML($post->post_title)).'
';
+
+echo
+'
'.
+html::escapeHTML($post->post_title).' '.
+'
'.
+($post->post_excerpt_xhtml ? $post->post_excerpt_xhtml.'
' : '').
+$post->post_content_xhtml.
+'';
+
+if (!empty($_GET['auto'])) {
+ flush();
+ $tb_urls = implode("\n",$TB->discover($post->post_excerpt_xhtml.' '.$post->post_content_xhtml));
+} else {
+ $auto_link = ''.
+ __('Auto discover ping URLs').' ';
+}
+
+echo
+'
'.__('Ping blogs').' '.
+'
';
+
+$pings = $TB->getPostPings($id);
+
+if (!$pings->isEmpty())
+{
+ echo '
'.__('Previously sent pings').' ';
+
+ echo '
';
+ while ($pings->fetch()) {
+ echo
+ ''.dt::dt2str(__('%Y-%m-%d %H:%M'),$pings->ping_dt).' - '.
+ $pings->ping_url.' ';
+ }
+ echo ' ';
+}
+
+dcPage::close();
+?>
\ No newline at end of file
diff --git a/admin/update.php b/admin/update.php
new file mode 100644
index 0000000..1495fc3
--- /dev/null
+++ b/admin/update.php
@@ -0,0 +1,212 @@
+Access denied';
+ dcPage::close();
+ exit;
+}
+
+$updater = new dcUpdate(DC_UPDATE_URL,'dotclear',DC_UPDATE_VERSION,DC_TPL_CACHE.'/versions');
+$new_v = $updater->check(DC_VERSION);
+$zip_file = $new_v ? DC_ROOT.'/'.basename($updater->getFileURL()) : '';
+
+# Hide "update me" message
+if (!empty($_GET['hide_msg'])) {
+ $updater->setNotify(false);
+ http::redirect('index.php');
+}
+
+$p_url = 'update.php';
+
+$step = isset($_GET['step']) ? $_GET['step'] : '';
+$step = in_array($step,array('check','download','backup','unzip')) ? $step : '';
+
+$archives = array();
+foreach (files::scanDir(DC_ROOT) as $v) {
+ if (preg_match('/backup-([0-9A-Za-z\.-]+).zip/',$v)) {
+ $archives[] = $v;
+ }
+}
+
+# Revert or delete backup file
+if (!empty($_POST['backup_file']) && in_array($_POST['backup_file'],$archives))
+{
+ $b_file = $_POST['backup_file'];
+
+ try
+ {
+ if (!empty($_POST['b_del']))
+ {
+ if (!@unlink(DC_ROOT.'/'.$b_file)) {
+ throw new Exception(sprintf(__('Unable to delete file %s'),html::escapeHTML($b_file)));
+ }
+ http::redirect($p_url);
+ }
+
+ if (!empty($_POST['b_revert']))
+ {
+ $zip = new fileUnzip(DC_ROOT.'/'.$b_file);
+ $zip->unzipAll(DC_ROOT.'/');
+ @unlink(DC_ROOT.'/'.$b_file);
+ http::redirect($p_url);
+ }
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ }
+}
+
+# Upgrade process
+if ($new_v && $step)
+{
+ try
+ {
+ $updater->setForcedFiles('inc/digests');
+
+ switch ($step)
+ {
+ case 'check':
+ $updater->checkIntegrity(DC_ROOT.'/inc/digests',DC_ROOT);
+ http::redirect($p_url.'?step=download');
+ break;
+ case 'download':
+ $updater->download($zip_file);
+ if (!$updater->checkDownload($zip_file)) {
+ throw new Exception(
+ sprintf(__('Downloaded Dotclear archive seems to be corrupted. '.
+ 'Try download it again.'),'href="'.$p_url.'?step=download"')
+ );
+ }
+ http::redirect($p_url.'?step=backup');
+ break;
+ case 'backup':
+ $updater->backup(
+ $zip_file, 'dotclear/inc/digests',
+ DC_ROOT, DC_ROOT.'/inc/digests',
+ DC_ROOT.'/backup-'.DC_VERSION.'.zip'
+ );
+ http::redirect($p_url.'?step=unzip');
+ break;
+ case 'unzip':
+ $updater->performUpgrade(
+ $zip_file, 'dotclear/inc/digests', 'dotclear',
+ DC_ROOT, DC_ROOT.'/inc/digests'
+ );
+ break;
+ }
+ }
+ catch (Exception $e)
+ {
+ $msg = $e->getMessage();
+ if ($e->getCode() == dcUpdate::ERR_FILES_CHANGED)
+ {
+ $msg =
+ __('The following files of your Dotclear installation '.
+ 'have been modified so we won\'t try to update your installation. '.
+ 'Please try to update manually .');
+ }
+ elseif ($e->getCode() == dcUpdate::ERR_FILES_UNREADABLE)
+ {
+ $msg =
+ sprintf(__('The following files of your Dotclear installation are not readable. '.
+ 'Please fix this or try to make a backup file named %s manually.'),
+ 'backup-'.DC_VERSION.'.zip ');
+ }
+ elseif ($e->getCode() == dcUpdate::ERR_FILES_UNWRITALBE)
+ {
+ $msg =
+ __('The following files of your Dotclear installation cannot be written. '.
+ 'Please fix this or try to update manually .');
+ }
+
+ if (isset($e->bad_files)) {
+ $msg .=
+ '
'.
+ implode(' ',$e->bad_files).
+ ' ';
+ }
+
+ $core->error->add($msg);
+ }
+}
+
+/* DISPLAY Main page
+-------------------------------------------------------- */
+dcPage::open(__('Dotclear update'));
+
+if (!$core->error->flag()) {
+ echo '
'.__('Dotclear update').' ';
+}
+
+if (!$step)
+{
+ if (empty($new_v))
+ {
+ echo '
'.__('No newer Dotclear version available.').'
';
+ }
+ else
+ {
+ echo
+ '
'.sprintf(__('Dotclear %s is available.'),$new_v).'
'.
+
+ '
'.__('To upgrade your Dotclear installation simply click on the following button. '.
+ 'A backup file of your current installation will be created in your root directory.').'
'.
+ '
';
+ }
+
+ if (!empty($archives))
+ {
+ echo
+ '
'.__('Update backup files').' '.
+ '
'.__('The following files are backups of previously updates. '.
+ 'You can revert your previous installation or delete theses files.').'
';
+
+ echo '
';
+ }
+}
+elseif ($step == 'unzip' && !$core->error->flag())
+{
+ echo
+ '
'.
+ __("Congratulations, you're one click away from the end of the update.").
+ ' '.__('Finish the update.').' '.
+ '
';
+}
+
+dcPage::close();
+?>
\ No newline at end of file
diff --git a/admin/user.php b/admin/user.php
new file mode 100644
index 0000000..5e38136
--- /dev/null
+++ b/admin/user.php
@@ -0,0 +1,301 @@
+auth->getInfo('user_lang');
+$user_tz = $core->auth->getInfo('user_tz');
+$user_post_status = '';
+
+$user_options = $core->userDefaults();
+
+foreach ($core->getFormaters() as $v) {
+ $formaters_combo[$v] = $v;
+}
+
+foreach ($core->blog->getAllPostStatus() as $k => $v) {
+ $status_combo[$v] = $k;
+}
+
+# Language codes
+$langs = l10n::getISOcodes(1,1);
+foreach ($langs as $k => $v) {
+ $lang_avail = $v == 'en' || is_dir(DC_L10N_ROOT.'/'.$v);
+ $lang_combo[] = new formSelectOption($k,$v,$lang_avail ? 'avail10n' : '');
+}
+
+# Get user if we have an ID
+if (!empty($_REQUEST['id']))
+{
+ try {
+ $rs = $core->getUser($_REQUEST['id']);
+
+ $user_id = $rs->user_id;
+ $user_super = $rs->user_super;
+ $user_pwd = $rs->user_pwd;
+ $user_name = $rs->user_name;
+ $user_firstname = $rs->user_firstname;
+ $user_displayname = $rs->user_displayname;
+ $user_email = $rs->user_email;
+ $user_url = $rs->user_url;
+ $user_lang = $rs->user_lang;
+ $user_tz = $rs->user_tz;
+ $user_post_status = $rs->user_post_status;
+
+ $user_options = array_merge($user_options,$rs->options());
+
+ $page_title = $user_id;
+ } catch (Exception $e) {
+ $core->error->add($e->getMessage());
+ }
+}
+
+# Add or update user
+if (isset($_POST['user_name']))
+{
+ try
+ {
+ if (empty($_POST['your_pwd']) || !$core->auth->checkPassword(crypt::hmac(DC_MASTER_KEY,$_POST['your_pwd']))) {
+ throw new Exception(__('Password verification failed'));
+ }
+
+ $cur = $core->con->openCursor($core->prefix.'user');
+
+ $cur->user_id = $_POST['user_id'];
+ $cur->user_super = $user_super = !empty($_POST['user_super']) ? 1 : 0;
+ $cur->user_name = $user_name = $_POST['user_name'];
+ $cur->user_firstname = $user_firstname = $_POST['user_firstname'];
+ $cur->user_displayname = $user_displayname = $_POST['user_displayname'];
+ $cur->user_email = $user_email = $_POST['user_email'];
+ $cur->user_url = $user_url = $_POST['user_url'];
+ $cur->user_lang = $user_lang = $_POST['user_lang'];
+ $cur->user_tz = $user_tz = $_POST['user_tz'];
+ $cur->user_post_status = $user_post_status = $_POST['user_post_status'];
+
+ if (!empty($_POST['new_pwd'])) {
+ if ($_POST['new_pwd'] != $_POST['new_pwd_c']) {
+ throw new Exception(__("Passwords don't match"));
+ } else {
+ $cur->user_pwd = $_POST['new_pwd'];
+ }
+ }
+
+ $user_options['post_format'] = $_POST['user_post_format'];
+ $user_options['edit_size'] = (integer) $_POST['user_edit_size'];
+
+ if ($user_options['edit_size'] < 1) {
+ $user_options['edit_size'] = 10;
+ }
+
+ $cur->user_options = new ArrayObject($user_options);
+
+ # Udate user
+ if ($user_id)
+ {
+ # --BEHAVIOR-- adminBeforeUserUpdate
+ $core->callBehavior('adminBeforeUserUpdate',$cur,$user_id);
+
+ $new_id = $core->updUser($user_id,$cur);
+
+ # --BEHAVIOR-- adminAfterUserUpdate
+ $core->callBehavior('adminAfterUserUpdate',$cur,$new_id);
+
+ if ($user_id == $core->auth->userID() &&
+ $user_id != $new_id) {
+ $core->session->destroy();
+ }
+
+ http::redirect('user.php?id='.$new_id.'&upd=1');
+ }
+ # Add user
+ else
+ {
+ if ($core->getUsers(array('user_id' => $cur->user_id),true)->f(0) > 0) {
+ throw new Exception(sprintf(__('User "%s" already exists.'),html::escapeHTML($cur->user_id)));
+ }
+
+ # --BEHAVIOR-- adminBeforeUserCreate
+ $core->callBehavior('adminBeforeUserCreate',$cur);
+
+ $new_id = $core->addUser($cur);
+
+ # --BEHAVIOR-- adminAfterUserCreate
+ $core->callBehavior('adminAfterUserCreate',$cur,$new_id);
+
+ http::redirect('user.php?id='.$new_id.'&add=1');
+ }
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ }
+}
+
+
+/* DISPLAY
+-------------------------------------------------------- */
+dcPage::open($page_title,
+ dcPage::jsConfirmClose('user-form').
+
+ # --BEHAVIOR-- adminUserHeaders
+ $core->callBehavior('adminUserHeaders')
+);
+
+if (!empty($_GET['upd'])) {
+ echo '
'.__('User has been successfully updated.').'
';
+}
+
+if (!empty($_GET['add'])) {
+ echo '
'.__('User has been successfully created.').'
';
+}
+
+echo '
';
+
+if ($user_id == $core->auth->userID()) {
+ echo
+ '
'.__('Warning:').' '.
+ __('If you change your username, you will have to log in again.').'
';
+}
+
+echo
+'
';
+
+if ($user_id)
+{
+ echo '
'.__('Permissions').' ';
+
+ $permissions = $core->getUserPermissions($user_id);
+ $perm_types = $core->auth->getPermissionsTypes();
+
+ if (count($permissions) == 0)
+ {
+ echo ''.__('No permissions.').'
';
+ }
+ else
+ {
+ foreach ($permissions as $k => $v)
+ {
+ if (count($v['p']) > 0)
+ {
+ echo '';
+
+ echo '';
+ foreach ($v['p'] as $p => $V) {
+ if (isset($perm_types[$p])) {
+ echo ''.__($perm_types[$p]).' ';
+ }
+ }
+ echo ' ';
+ }
+ }
+ }
+
+ echo
+ ''.
+ __('Add new permissions').'
'.
+ '';
+}
+
+dcPage::close();
+?>
\ No newline at end of file
diff --git a/admin/users.php b/admin/users.php
new file mode 100644
index 0000000..195cabd
--- /dev/null
+++ b/admin/users.php
@@ -0,0 +1,167 @@
+callBehavior('adminBeforeUserDelete',$u);
+
+ $core->delUser($u);
+ }
+ catch (Exception $e)
+ {
+ $core->error->add($e->getMessage());
+ }
+ }
+
+ if (!$core->error->flag()) {
+ http::redirect('users.php?del=1');
+ }
+}
+
+
+# Creating filter combo boxes
+$sortby_combo = array(
+__('Username') => 'U.user_id',
+__('Last Name') => 'user_name',
+__('First Name') => 'user_firstname',
+__('Display name') => 'user_displayname',
+__('Number of entries') => 'nb_post'
+);
+
+$order_combo = array(
+__('Descending') => 'desc',
+__('Ascending') => 'asc'
+);
+
+
+# Get users
+$page = !empty($_GET['page']) ? $_GET['page'] : 1;
+$nb_per_page = 30;
+
+if (!empty($_GET['nb']) && (integer) $_GET['nb'] > 0) {
+ $nb_per_page = $_GET['nb'];
+}
+
+$q = !empty($_GET['q']) ? $_GET['q'] : '';
+$sortby = !empty($_GET['sortby']) ? $_GET['sortby'] : 'user_id';
+$order = !empty($_GET['order']) ? $_GET['order'] : 'asc';
+
+$params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page);
+
+$show_filters = false;
+
+# - Search filter
+if ($q) {
+ $params['q'] = $q;
+ $show_filters = true;
+}
+
+# - Sortby and order filter
+if ($sortby !== '' && in_array($sortby,$sortby_combo)) {
+ if ($order !== '' && in_array($order,$order_combo)) {
+ $params['order'] = $sortby.' '.$order;
+ $show_filters = true;
+ }
+}
+
+try {
+ $rs = $core->getUsers($params);
+ $counter = $core->getUsers($params,1);
+ $user_list = new adminUserList($core,$rs,$counter->f(0));
+} catch (Exception $e) {
+ $core->error->add($e->getMessage());
+}
+
+
+/* DISPLAY
+-------------------------------------------------------- */
+$starting_script = dcPage::jsLoad('js/_users.js');
+if (!$show_filters) {
+ $starting_script .= dcPage::jsLoad('js/filter-controls.js');
+}
+
+dcPage::open(__('users'),$starting_script);
+
+if (!$core->error->flag())
+{
+ if (!empty($_GET['del'])) {
+ echo '
'.__('User has been successfully removed.').'
';
+ }
+
+ echo '
'.__('Users').' ';
+
+ echo '
'.__('Create a new user').'
';
+
+ if (!$show_filters) {
+ echo '
'.__('Filters').'
';
+ }
+
+ echo
+ '
';
+
+ # Show users
+ $user_list->display($page,$nb_per_page,
+ '
'
+ );
+}
+
+dcPage::close();
+?>
\ No newline at end of file
diff --git a/admin/xmlrpc.php b/admin/xmlrpc.php
new file mode 100644
index 0000000..39b3e0c
--- /dev/null
+++ b/admin/xmlrpc.php
@@ -0,0 +1,35 @@
+plugins->loadModules(DC_PLUGINS_ROOT);
+
+# Start XML-RPC server
+$server = new dcXmlRpc($core,$blog_id);
+$server->serve();
+?>
\ No newline at end of file
diff --git a/cache/.htaccess b/cache/.htaccess
new file mode 100644
index 0000000..14249c5
--- /dev/null
+++ b/cache/.htaccess
@@ -0,0 +1 @@
+Deny from all
\ No newline at end of file
diff --git a/cache/cbfeed/6a/4f/6a4f55e24111799aaa8e45c1cc4d4583.php b/cache/cbfeed/6a/4f/6a4f55e24111799aaa8e45c1cc4d4583.php
new file mode 100644
index 0000000..2830353
--- /dev/null
+++ b/cache/cbfeed/6a/4f/6a4f55e24111799aaa8e45c1cc4d4583.php
@@ -0,0 +1,304 @@
+O:10:"feedParser":7:{s:9:"feed_type";s:8:"atom 1.0";s:5:"title";s:13:"Blog Dotclear";s:4:"link";s:29:"https://fr.dotclear.org/blog/";s:11:"description";s:33:"Prenez le contrôle de votre blog";s:7:"pubdate";s:25:"2023-10-16T10:50:34+02:00";s:9:"generator";s:8:"Dotclear";s:5:"items";a:20:{i:0;O:8:"stdClass":8:{s:4:"link";s:60:"https://fr.dotclear.org/blog/post/2023/08/31/Dotclear-2.27.3";s:5:"title";s:15:"Dotclear 2.27.3";s:7:"creator";s:6:"Franck";s:11:"description";s:0:"";s:7:"content";s:276:"
Une nouvelle version qui corrige quelques problèmes rencontrés avec l'installation, la gestion des dépendances des plugins et thèmes, la procédure de récupération de mot de passe, l'export à plat et lorsque certains réglages de widget étaient incorrects.
+";s:7:"subject";a:1:{i:0;s:4:"News";}s:7:"pubdate";s:25:"2023-08-31T16:34:00+02:00";s:2:"TS";i:1693492440;}i:1;O:8:"stdClass":8:{s:4:"link";s:60:"https://fr.dotclear.org/blog/post/2023/08/22/Dotclear-2.27.2";s:5:"title";s:15:"Dotclear 2.27.2";s:7:"creator";s:6:"Franck";s:11:"description";s:0:"";s:7:"content";s:300:"
Une nouvelle version de maintenance qui comporte quelques corrections d'erreurs rencontrées avec les versions 2.27 et 2.27.1 précédentes.
+";s:7:"subject";a:1:{i:0;s:4:"News";}s:7:"pubdate";s:25:"2023-08-22T11:05:00+02:00";s:2:"TS";i:1692695100;}i:2;O:8:"stdClass":8:{s:4:"link";s:60:"https://fr.dotclear.org/blog/post/2023/08/14/Dotclear-2.27.1";s:5:"title";s:15:"Dotclear 2.27.1";s:7:"creator";s:6:"Franck";s:11:"description";s:0:"";s:7:"content";s:217:"
Forcément, on regarde partout, on teste mille fois, et puis la petite erreur de frappe vient s'insinuer dans les rouages bien huilés et donc ce matin une petite version de maintenance sans effet visible.
+";s:7:"subject";a:1:{i:0;s:4:"News";}s:7:"pubdate";s:25:"2023-08-14T09:47:00+02:00";s:2:"TS";i:1691999220;}i:3;O:8:"stdClass":8:{s:4:"link";s:58:"https://fr.dotclear.org/blog/post/2023/08/13/Dotclear-2.27";s:5:"title";s:13:"Dotclear 2.27";s:7:"creator";s:6:"Franck";s:11:"description";s:0:"";s:7:"content";s:1223:"
Comme souvent on avait prévu des monts et des merveilles et puis chemin faisant on est redevenu raisonnable compte-tenu de nos disponibilités respectives avec toutefois quelques améliorations visibles et surtout beaucoup de travail invisible pour moderniser le code et supprimer les vieilleries.
+
+
Ce trimestre la version 2.27 apporte la prévisualisation des thèmes avec le contenu actuel du blog, ça peut être utile pour se rendre compte visuellement avant d'activer un thème, et puis on a ajouté et complété (à l'aide de moteurs de traduction) quelques langues ; mais surtout cette version est la dernière à supporter PHP 7.4 et PHP 8.0 .
+
+
Nous vous conseillons donc, si vous souhaitez poursuivre les mises à jour futures, de basculer sur PHP 8.1 ou PHP 8.2 . Notez que ne pas le faire ne vous empêchera pas d'utiliser encore longtemps la 2.27, à vous de voir.
+
+
Pour finir, nous souhaitons un joyeux anniversaire pour les vingt ans de DotClear avec un C majuscule, comme Olivier l'écrivait dans son billet d'annonce !
+";s:7:"subject";a:1:{i:0;s:4:"News";}s:7:"pubdate";s:25:"2023-08-13T08:43:00+02:00";s:2:"TS";i:1691908980;}i:4;O:8:"stdClass":8:{s:4:"link";s:60:"https://fr.dotclear.org/blog/post/2023/06/04/Dotclear-2.26.1";s:5:"title";s:15:"Dotclear 2.26.1";s:7:"creator";s:6:"Franck";s:11:"description";s:0:"";s:7:"content";s:708:"
Une petite version de maintenance, habituelle après une version majeure et qui règle quelques problèmes rencontrés depuis.
+
+
La prochaine version majeure (2.27) est prévue pour mi-août, ça sera d'ailleurs l'occasion de fêter les 20 ans de Dotclear et sachez que cette version sera la dernière à supporter encore PHP 7.4.
+
+
à partir de la 2.28 qui sera publiée à la fin de l'année (mi-novembre a priori) il faudra avoir a minima PHP 8.1 pour fonctionner.
+
+
Vous pouvez d'ores et déjà vous y préparer en basculant sur cette version, voire encore mieux sur la 8.2 puisque ça fait quelques versions que Dotclear la supporte bien !
+";s:7:"subject";a:1:{i:0;s:4:"News";}s:7:"pubdate";s:25:"2023-06-04T09:15:00+02:00";s:2:"TS";i:1685862900;}i:5;O:8:"stdClass":8:{s:4:"link";s:58:"https://fr.dotclear.org/blog/post/2023/05/13/Dotclear-2.26";s:5:"title";s:13:"Dotclear 2.26";s:7:"creator";s:6:"Franck";s:11:"description";s:0:"";s:7:"content";s:1228:"
Une nouvelle version dont la mise à jour devrait passer sans problème majeur chez la plupart d'entre vous.
+
+
Rien d'extraordinaire cette fois, surtout des petites améliorations ici et là , et c'est surtout du côté du code que l'essentiel à été fait car pour la première fois depuis la première version de Dotclear 2, la librairie Clearbricks n'en fait plus partie, ou plutôt a été intégrée directement dans le code de Dotclear.
+
+
C'était également l'occasion de renforcer les tests unitaires et l'analyse statique du code (avec PHPStan, PSalm et Rector) qui continuera d'être progressivement modernisé (il en reste pas mal).
+
+
Un nouveau thème est en cours de développement et il devrait, si possible, faire partie de la prochaine version majeure â qui sonnera aussi les 20 ans de Dotclear â, mais comme on a dit souvent ici : « Ãa sera le cas quand il sera prêt ! ».
+
+
Par ailleurs, la reprise de l'architecture de l'administration est à l'étude, en particulier pour bénéficier des dernières possibilités de HTML et CSS. Il y aura possiblement un peu de casse, mais on essaiera de limiter les dégâts, comme à notre habitude.
+
+
Bonne mise à jour !
+";s:7:"subject";a:1:{i:0;s:4:"News";}s:7:"pubdate";s:25:"2023-05-13T06:08:00+02:00";s:2:"TS";i:1683950880;}i:6;O:8:"stdClass":8:{s:4:"link";s:60:"https://fr.dotclear.org/blog/post/2023/02/25/Dotclear-2.25.3";s:5:"title";s:15:"Dotclear 2.25.3";s:7:"creator";s:6:"Franck";s:11:"description";s:0:"";s:7:"content";s:82:"
Une mise à jour qui corrige quelques bugs rencontrés avec la 2.25.2.
+";s:7:"subject";a:1:{i:0;s:4:"News";}s:7:"pubdate";s:25:"2023-02-25T09:16:00+01:00";s:2:"TS";i:1677312960;}i:7;O:8:"stdClass":8:{s:4:"link";s:60:"https://fr.dotclear.org/blog/post/2023/02/19/Dotclear-2.25.2";s:5:"title";s:15:"Dotclear 2.25.2";s:7:"creator";s:6:"Franck";s:11:"description";s:0:"";s:7:"content";s:82:"
Une mise à jour qui corrige quelques bugs rencontrés avec la 2.25.1.
+";s:7:"subject";a:1:{i:0;s:4:"News";}s:7:"pubdate";s:25:"2023-02-19T09:13:00+01:00";s:2:"TS";i:1676794380;}i:8;O:8:"stdClass":8:{s:4:"link";s:60:"https://fr.dotclear.org/blog/post/2023/02/18/Dotclear-2.25.1";s:5:"title";s:15:"Dotclear 2.25.1";s:7:"creator";s:6:"Franck";s:11:"description";s:0:"";s:7:"content";s:80:"
Une mise à jour qui corrige quelques bugs rencontrés avec la 2.25.
+";s:7:"subject";a:1:{i:0;s:4:"News";}s:7:"pubdate";s:25:"2023-02-18T13:08:00+01:00";s:2:"TS";i:1676722080;}i:9;O:8:"stdClass":8:{s:4:"link";s:58:"https://fr.dotclear.org/blog/post/2023/02/13/Dotclear-2.25";s:5:"title";s:13:"Dotclear 2.25";s:7:"creator";s:6:"Franck";s:11:"description";s:0:"";s:7:"content";s:3009:"
Une nouvelle version de Dotclear pour laquelle vous devriez rencontrer moins de soucis, si c'était le cas, qu'au moment de la mise à jour en 2.24.
+
+
Cette version intègre essentiellement une modernisation du code â modernisation qui devrait encore se poursuivre pendant quelques trimestres.
+
+
Il est possible que dans un futur proche la version de PHP requise évolue, en particulier pour nous permettre d'accentuer nos efforts sur la modernisation du code. Pour l'instant c'est encore PHP 7.4, mais l'interface d'administration de la 2.25 vous signalera, si vous utilisez encore cette version, qu'il est temps de songer à basculer sur PHP 8.0 ou encore PHP 8.1, voire PHP 8.2 pour laquelle nous nous sommes efforcés d'assurer la compatibilité.
+
+
Une petite note à l'attention des développeurs de plugins : Il était jusqu'à maintenant optionnel de définir le type de module dans le fichier _define.php ; il est fort probable que la future 2.26 l'impose, alors ajoutez cette ligne dans les propriétés :
+
+
+'type' => 'plugin',
+
+
+
Prenez exemple sur un des plugins distribués avec Dotclear si nécessaire.
+
+
Le CHANGELOG de la 2.25 :
+
+
+ð PHP 7.4+ is required, PHP 8.0/8.1 compliance (and as far as we know PHP 8.2)
+Core: New plugin/theme code structure (using a brand new autoloader), old plugins/themes remain compatibles
+Core: Clearbricks is now included in Dotclear code, not more as a git sub-module
+Core: Update last step will not redirect to the safe-mode login page
+Core: No more need to add namespace (blog-settings) / workspace (user-preferences) before using them
+Core: Add possible using of external db driver (Experimental)
+Core: Add support of .mjs ECMAScript module files
+Core: Remove unnecessary and weak protection code
+Core: Move some legacy and proxy code in dcProxyV2 plugin
+a11y: Some aria attributes have been set in backend
+Theme: Merge default smilies and blog's smilies (the blog's smilies have a higher priority)
+Theme: Merge plugin blowupConfig into theme Blowup
+Admin: Some jQuery javascript scripts have been rewritten in pure ECMAScript
+Admin: Add Atkinson Hyperlegible font (used by default in admin, may be disabled in user pref)
+Admin: Add some shortcuts (CTRL+letter) to dcLegacyEditor toolbar
+Admin: Add a specific warning message on update page if necessary (breaking changes)
+Admin: Cope with no user TZ defined (use UTC in this case)
+Admin: Fix admin permission management for blogroll and pages plugins
+Admin: Cope with float/double values in about:config and user:pref
+ð â Various bugs, a11y concerns and typos fixed
+ð¼ â Some locales and cosmetic adjustments
+ð£ Warning: Next major release (2.26) may require PHP 8.0 (announced in backend) or PHP 8.1
+
+";s:7:"subject";a:1:{i:0;s:4:"News";}s:7:"pubdate";s:25:"2023-02-13T09:25:00+01:00";s:2:"TS";i:1676276700;}i:10;O:8:"stdClass":8:{s:4:"link";s:60:"https://fr.dotclear.org/blog/post/2023/01/18/Dotclear-2.24.1";s:5:"title";s:15:"Dotclear 2.24.1";s:7:"creator";s:6:"Franck";s:11:"description";s:0:"";s:7:"content";s:97:"
Une mise à jour qui corrige quelques bugs rencontrés avec la 2.24 de Noël dernier.
+";s:7:"subject";a:1:{i:0;s:4:"News";}s:7:"pubdate";s:25:"2023-01-18T12:13:00+01:00";s:2:"TS";i:1674040380;}i:11;O:8:"stdClass":8:{s:4:"link";s:58:"https://fr.dotclear.org/blog/post/2022/12/24/Dotclear-2.24";s:5:"title";s:13:"Dotclear 2.24";s:7:"creator";s:6:"Franck";s:11:"description";s:0:"";s:7:"content";s:1827:"
La nouvelle version pour les fêtes de fin d'année. Il est fortement recommandé de faire la mise à jour en mode de secours , ce qui vous permettra ensuite de mettre à jour les plugins qui doivent l'être.
+
+
Si vous avez un souci pour vous connecter après la mise à jour, supprimez les cookies associés avant de rafraichir la page de connexion.
+
+
Le CHANGELOG de la 2.24 :
+
+
+ð PHP 7.4+ is required, PHP 8.0/8.1 compliance
+ð Remove XML/RPC system (keep only minimum for Pingbacks)
+New blog parameter to close comments/trackbacks after a period of inactivity on the blog
+Core: Large code review has been done, may break old code (3rd party plugins and themes)
+Admin UI: New default icons for media items
+Admin UI: Message look reviewed
+Admin UX: Preserve current dir and current view of media manager
+Admin UX: Password strength use an entropy indicator
+Admin UX: Improve navigation in about:config and user:preferences list
+Admin UX: Allow activation and de-activation of plugins in safe mode
+Admin UX: Allow update of disabled/activated plugins in safe mode/normal mode
+Admin UX: Add folding capability to widgets group
+Theme: Cope with theme defined widget container format
+Theme: Smilies are available for every theme (Blowup theme not more mandatory)
+Lib: Update CKEditor to 4.20.1
+Lib: Update Codemirror to 5.65.10
+ð â Various bugs, a11y concerns and typos fixed
+ð¼ â Some locales and cosmetic adjustments
+
+";s:7:"subject";a:1:{i:0;s:4:"News";}s:7:"pubdate";s:25:"2022-12-24T10:00:00+01:00";s:2:"TS";i:1671872400;}i:12;O:8:"stdClass":8:{s:4:"link";s:78:"https://fr.dotclear.org/blog/post/2022/12/13/Faire-la-mise-%C3%A0-jour-en-2.24";s:5:"title";s:29:"Faire la mise à jour en 2.24";s:7:"creator";s:6:"Franck";s:11:"description";s:0:"";s:7:"content";s:5541:"
+
+
On va pas se mentir, la prochaine mise à jour pourra être ⦠sportive1 :-)
+
+
Je viens de tester plusieurs fois, à partir d'une installation qui tourne en production (mon blog ) avec Dotclear 2.23.1 et j'ai noté les choses suivantes :
+
+
+Si jamais vous utilisez le plugin de cache statique 2 , désactivez-le temporairement (il suffit de commenter la constante d'activation DC_SC_CACHE_ENABLE dans le fichier inc/config.php , ou de la mettre à false).
+Faire la mise à jour vers Dotclear 2.24 en mode de secours est la meilleure façon de faire, une fois que vous savez3 que les plugins que vous utilisez sont disponibles pour la 2.244 .
+Si jamais vous aviez besoin du plugin FakeMeUp , alors reconnectez-vous en mode normal, installez-le, lancez-le, puis reconnectez-vous en mode de secours.
+Place aux mises à jour :
+
+
+Faites la mise à jour de Dotclear en 2.24 (toujours en mode de secours ),
+Reconnectez-vous en mode de secours car l'étape précédente vous ramènera sur la page d'authentification5 ,
+Faites la mise à jour des plugins 6 ,
+Réactivez le cache statique si nécessaire,
+Reconnectez-vous en mode normal .
+
+
+
+
Ãa devrait être tout bon !
+
+
Profitez-en pour vider le cache des templates et le cache statique (plugin Entretien).
+
+
Petit supplément : il peut être utile d'installer le plugin growUp pour faire un peu de ménage7 une fois la mise à jour effectuée8 .
+
+
Quoi qu'il en soit on sera dans les parages si jamais il y avait un problème ; sur le forum en particulier.
+
+
+";s:7:"subject";a:1:{i:0;s:4:"News";}s:7:"pubdate";s:25:"2022-12-13T15:13:00+01:00";s:2:"TS";i:1670940780;}i:13;O:8:"stdClass":8:{s:4:"link";s:77:"https://fr.dotclear.org/blog/post/2022/12/03/Mode-de-secours-de-Dotclear-2.24";s:5:"title";s:32:"Mode de secours de Dotclear 2.24";s:7:"creator";s:6:"Franck";s:11:"description";s:0:"";s:7:"content";s:7114:"
+
+
La version 2.24 de Dotclear â qui devrait être publiée dans quelques semaines â a été l'objet d'une reprise du code assez profonde, pour assurer une meilleure robustesse et pour évacuer quelques vieilleries qu'elle transportait depuis longtemps. Cependant cette refonte a généré quelques incompatibilités avec les versions précédentes des plugins et parfois des thèmes.
+
+
En conséquence, une fois mis à jour avec la version 2.24 de Dotclear il se pourrait bien que vous ayez du mal à retrouver votre tableau de bord ou autre chose qu'une page blanche du côté public de votre blog préféré.
+
+
+
+
La raison ?
+
+
Un ou plusieurs plugins qui nécessitent des mises à jour â celles-ci sont déjà disponibles pour un nombre conséquent de plugins tiers â, ou des désactivations .
+
+
Or comment faire cette ou ces mises à jour, voire cette ou ces désactivations si vous n'avez pas accès à l'administration de votre installation ?
+
+
C'est très exactement pour cette raison qu'il y a, depuis plusieurs années, un mode de secours â aussi appelé « mode sans échec » â qui permet de se connecter à l'interface d'administration sans activer aucun plugin . Et quand je dis aucun, c'est vraiment aucun ; même les plugins livrés avec Dotclear sont désactivés dans ce mode particulier.
+
+
+
Attention
+
Il vous est fortement conseillé, avant de mettre à jour votre installation vers la version 2.24, de lister les plugins tiers installés et actifs (et de mettre cette liste de côté), ils sont les plus susceptibles de poser des problèmes une fois la mise à jour effectuée, pour évaluer ensuite la liste des mises à jour requises, voire les désactivations à prévoir si elles n'étaient pas disponibles
+
Il existe d'ailleurs un plugin (pour les versions 2.19 à 2.23.1), nommé CheckStoreVersion , développé par Jean-Christian Denis, et qui permet d'ajouter un onglet supplémentaire sur la page de gestion des plugins (et des thèmes), et qui indique la liste des mises à jours disponibles pour les plugins (et thèmes) actuellement installés. Ce plugin est disponible sur DotAddict.
+
+
+
La nouveauté avec la version 2.24 de Dotclear est que vous pouvez, avec ce mode de secours , désactiver , mettre à jour , supprimer ou installer des plugins, ceux-ci restant bien évidemment inactifs tant que vous êtes connecté dans ce mode.
+
+
En pratique , comment ça se passe ?
+
+
Premièrement il faut vous connecter en mode de secours. Pour cela, sur la page de connexion vous avez un lien situé en bas et intitulé « Problème de connexion ? » :
+
+
+
+
Si vous cliquez sur ce lien vous démasquez alors deux liens . Le premier permet d'engager la procédure à utiliser en cas d'oubli de son mot de passe â mais ce n'est pas l'objet de ce billet â, et le second vous permet de basculer en mode de secours :
+
+
+
+
+
Astuce
+
Il se peut que même l'accès à la page de connexion soit impossible. Dans ce cas il vous suffira d'ajouter à la fin de l'URL de connexion que vous utilisez habituellement ceci :
+
?safe_mode=1
+
Safe mode étant l'équivalent anglais de
Mode de secours (ou mode sans échec).
+
+
Si par exemple votre URL de connexion est :
+
https://example.com/admin/auth.php
+
alors l'URL de connexion en mode de secours sera :
+
https://example.com/admin/auth.php?safe_mode=1
+
+
+
Il faut donc cliquer sur ce deuxième lien qui vous amènera alors sur une autre page de connexion :
+
+
+
+
Remplissez les champs comme à l'accoutumée et validez. Vous devriez maintenant avoir le tableau de bord affiché avec un beau message vous avertissant que vous êtes en mode de secours :
+
+
+
+
Vous remarquerez alors, que comme précisé plus haut, aucun plugin n'est actif ; par contre vous avez la possibilité de basculer sur la page de gestion des plugins qui fonctionne de la même manière qu'en mode normal.
+
+
Vous retrouverez donc les onglets classiques qui listent les plugins en attente de mise à jour, les plugins installés, activés ou pas, ainsi que les onglets qui permettent l'installation automatique ou manuelle de plugins :
+
+
+
+
Chaque action dans cette page ne vous sortira pas du mode de secours où aucun plugin n'est actif , donc aucun danger de « casser » votre installation ici.
+
+
Une fois tous les plugins mis à jour ou désactivés en attendant une prochaine mise à jour â comparez avec la liste que vous avez mis de côté avant de mettre à jour pour vérifier que vous n'avez rien oublié â, vous pouvez revenir à la connexion habituelle.
+
+
Il suffit pour cela de vous déconnecter et de vous reconnecter comme à l'ordinaire.
+
+
+
+
Gardez ce billet sous le coude pour le jour où vous ferez la mise à jour vers la 2.24, il se pourrait qu'il vous serve.
+";s:7:"subject";a:1:{i:0;s:4:"News";}s:7:"pubdate";s:25:"2022-12-03T15:38:00+01:00";s:2:"TS";i:1670078280;}i:14;O:8:"stdClass":8:{s:4:"link";s:74:"https://fr.dotclear.org/blog/post/2022/10/27/Adapter-son-code-pour-la-2.24";s:5:"title";s:29:"Adapter son code pour la 2.24";s:7:"creator";s:6:"Franck";s:11:"description";s:0:"";s:7:"content";s:1756:"
+
+
Bonjour,
+
+
J'ai entrepris, depuis quelques jours, de publier sur mon blog une série de billets expliquant, pas à pas, comment mettre à niveau le code de vos plugins et thèmes pour assurer la compatibilité avec la future version 2.24 de Dotclear, qui devrait être publiée dans quelques semaines.
+
+
Un flux Atom est également disponible pour cette série avec ce lien .
+
+
En effet, cette future version de Dotclear rompt avec le passé récent et la rétro-compatibilité habituelle assurée de version en version depuis quelques années ; c'est le coût de la modernisation et du renforcement de la robustesse du cÅur de Dotclear.
+
+
En conséquence il est possible que certains plugins (et peut-être thèmes) « bloquent » l'accès à votre blog et/ou à l'administration de votre installation après la mise à jour en 2.24. Il faudra alors vérifier si une mise à jour de ceux-ci est disponible ou dans le cas contraire les désactiver.
+
+
à ce sujet je reviendrai dans un futur billet sur le mode de secours , dont les fonctionnalités ont été améliorées, au moment de la sortie de la version 2.24.
+
+
Notez par ailleurs qu'il est d'ores et déjà possible de publier ses plugins et thèmes dépendants de la version 2.24 sur DotAddict (via la console ).
+";s:7:"subject";a:1:{i:0;s:14:"Développement";}s:7:"pubdate";s:25:"2022-10-27T08:14:00+02:00";s:2:"TS";i:1666851240;}i:15;O:8:"stdClass":8:{s:4:"link";s:60:"https://fr.dotclear.org/blog/post/2022/08/13/Dotclear-2.23.1";s:5:"title";s:15:"Dotclear 2.23.1";s:7:"creator";s:6:"Franck";s:11:"description";s:0:"";s:7:"content";s:108:"
Et dans la foulée, une version de maintenance pour corriger un bug avec l'ajout de commentaires.
";s:7:"subject";a:1:{i:0;s:4:"News";}s:7:"pubdate";s:25:"2022-08-13T10:01:00+02:00";s:2:"TS";i:1660377660;}i:16;O:8:"stdClass":8:{s:4:"link";s:58:"https://fr.dotclear.org/blog/post/2022/08/13/Dotclear-2.23";s:5:"title";s:13:"Dotclear 2.23";s:7:"creator";s:6:"Franck";s:11:"description";s:0:"";s:7:"content";s:2437:"
La nouvelle version pour ce trimestre avec quelques améliorations au programme essentiellement dans le cÅur du code, mais pas que.
+
+
+
Notez la disparition de la gestion des jeux d'icônes, peu utilisée et potentiellement complexifiée avec l'usage des icônes au format SVG en deux versions (thème clair et sombre).
+
+
+
Le CHANGELOG de la 2.23 :
+
+
+ð PHP 7.4+ is required, PHP 8.0/8.1 compliance
+ð Remove Iconset management
+Admin UI: Harmonize font size on different support (laptop, tablet, mobile)
+Admin UX: Group more logically buttons on CKEditor toolbar
+Core: New constant DC_DEFAULT_THEME, set to 'berlin'
+Core: Use predefined constants for post statuses (dcBlog::POST_*)
+Core: Use predefined constants for comment statuses (dcBlog::COMMENT_*)
+Core: Deprecated global $core (or $GLOBALS'core' ), use dcCore::app() instead
+Core: Deprecated global $_ctx, use dcCore::app()->ctx instead
+Core: Deprecated global $_lang, use dcCore::app()->lang instead
+Core: Deprecated global $mod_files, use dcCore::app()->cache'mod_files' instead
+Core: Deprecated global $mod_ts, use dcCore::app()->cache'mod_ts' instead
+Core: Deprecated global $_menu, use dcCore::app()->menu instead
+Core: Deprecated global $__resources, use dcCore::app()->resources instead
+Core: REST server now accepts JSON format (experimental)
+Fix: Use relative URL for attachments as far as possible
+Fix: Remove select hiding mechanism when help is displayed
+Fix: Loading of modules (plugins/themes) in safe mode
+Fix: Message position on Quick entry submit (dashboard)
+Fix: Select appearance on Safari (webkit engine)
+Lib: Update CKEditor to 4.19.1
+Lib: Update Codemirror to 5.65.7
+ð â Various bugs, a11y concerns and typos fixed
+ð¼ â Some locales and cosmetic adjustments
+ð£ Warning: Internet Explorer is not more officially supported (may still work weirdly)
+ ";s:7:"subject";a:1:{i:0;s:4:"News";}s:7:"pubdate";s:25:"2022-08-13T09:30:00+02:00";s:2:"TS";i:1660375800;}i:17;O:8:"stdClass":8:{s:4:"link";s:58:"https://fr.dotclear.org/blog/post/2022/05/13/Dotclear-2.22";s:5:"title";s:13:"Dotclear 2.22";s:7:"creator";s:6:"Franck";s:11:"description";s:0:"";s:7:"content";s:1381:"
La nouvelle version pour ce trimestre â on tient le rythme, c'est une bonne chose â avec quelques améliorations au programme :
+
+
+PHP 7.4 minimum et c'est compatible â sauf bug de dernière minute â jusqu'à PHP 8.1 inclus
+On a retiré le système de traçage FLoC de Google qui a jeté l'éponge entretemps
+Ajout d'un bouton de prévisualisation dans l'éditeur standard de Dotclear ; pratique pour vérifier les modifications d'un billet déjà publié, avant de les sauvegarder
+Les thèmes Berlin et Ductile ne requièrent plus jQuery pour fonctionner ; vérifiez toutefois les plugins tiers que vous avez installé, ils peuvent toujours en avoir besoin côté public
+Amélioration de la récupération des métadonnées de la source d'un Webmention ou d'un Pingback
+Ajout d'un bouton « Réinitialiser à maintenant » pour la date de publication d'un billet ; permet de pallier l'absence de cette fonctionnalité sur certains navigateurs
+Réduction des seuils de bascule de l'affichage de l'administration (mobile, tablette et laptop)
+Le menu d'accès rapide aux sections de about:Config et user:Pref est maintenant en position fixe en haut de l'écran
+Léger redesign des icônes de la barre d'outils de l'éditeur standard de Dotclear
+ ";s:7:"subject";a:1:{i:0;s:4:"News";}s:7:"pubdate";s:25:"2022-05-13T08:17:00+02:00";s:2:"TS";i:1652422620;}i:18;O:8:"stdClass":8:{s:4:"link";s:60:"https://fr.dotclear.org/blog/post/2022/03/07/Dotclear-2.21.3";s:5:"title";s:15:"Dotclear 2.21.3";s:7:"creator";s:6:"Franck";s:11:"description";s:0:"";s:7:"content";s:146:"
Une nouvelle version qui corrige deux bugs concernant la gestion des utilisateurs autres qu'administrateurs (ou super-administrateurs).
";s:7:"subject";a:1:{i:0;s:4:"News";}s:7:"pubdate";s:25:"2022-03-07T10:17:00+01:00";s:2:"TS";i:1646644620;}i:19;O:8:"stdClass":8:{s:4:"link";s:60:"https://fr.dotclear.org/blog/post/2022/02/26/Dotclear-2.21.2";s:5:"title";s:15:"Dotclear 2.21.2";s:7:"creator";s:6:"Franck";s:11:"description";s:0:"";s:7:"content";s:391:"
Une nouvelle version de maintenance qui résout, entre autres, les problèmes de date et de cache rencontrés par certains utilisateurs.
+
+
+
Changements :
+
+
+Retour en arrière sur certaines modifications faites pour la conformité à PHP 8.1 (strftime)
+Nettoyage des dossiers currywurst restants (template currywurst supprimé depuis la 2.20)
+ ";s:7:"subject";a:1:{i:0;s:4:"News";}s:7:"pubdate";s:25:"2022-02-26T09:32:00+01:00";s:2:"TS";i:1645864320;}}}
\ No newline at end of file
diff --git a/cache/cbtpl/06/16/061624c7d38d3b032e8770d96e17d8da.php b/cache/cbtpl/06/16/061624c7d38d3b032e8770d96e17d8da.php
new file mode 100644
index 0000000..73490f4
--- /dev/null
+++ b/cache/cbtpl/06/16/061624c7d38d3b032e8770d96e17d8da.php
@@ -0,0 +1,61 @@
+xml version="1.0" encoding="utf-8""; ?>
+
+
+ blog->name,1,0,0,0,0,'BlogName'); ?>feed_subtitle !== null) { echo context::global_filter($_ctx->feed_subtitle,1,0,0,0,0,'SysFeedSubtitle');} ?>
+ -
+ blog->desc,1,0,0,0,0,'BlogDescription'); ?>
+
+
+ blog->upddt,$core->blog->settings->blog_timezone),0,0,0,0,0,'BlogUpdateDate'); ?>
+
+ blog->settings->editor,1,0,0,0,0,'BlogEditor'); ?>
+
+ blog->uid,0,0,0,0,0,'BlogFeedID'); ?>
+ Dotclear
+
+ exists("meta")) { @$params['from'] .= ', '.$core->prefix.'meta META ';
+@$params['sql'] .= 'AND META.post_id = P.post_id ';
+$params['sql'] .= "AND META.meta_type = 'tag' ";
+$params['sql'] .= "AND META.meta_id = '".$core->con->escape($_ctx->meta->meta_id)."' ";
+} ?>
+posts !== null) { $params['post_id'] = $_ctx->posts->post_id; $core->blog->withoutPassword(false);
+}
+if ($_ctx->nb_comment_per_page !== null) { $params['limit'] = $_ctx->nb_comment_per_page; }
+if ($_ctx->exists("categories")) { $params['cat_id'] = $_ctx->categories->cat_id; }
+if ($_ctx->exists("langs")) { $params['sql'] = "AND P.post_lang = '".$core->blog->con->escape($_ctx->langs->post_lang)."' "; }
+$params['order'] = 'comment_dt desc';
+$_ctx->comments = $core->blog->getComments($params); unset($params);
+if ($_ctx->posts !== null) { $core->blog->withoutPassword(true);}
+$_ctx->pings = $_ctx->comments;
+?>
+comments->fetch()) : ?>
+
+ comments->comment_trackback) : ?>
+
+ [ping] pings->post_title,1,0,0,0,0,'PingEntryTitle'); ?> - pings->comment_author,1,0,0,0,0,'PingBlogName'); ?>
+
+ pings->getFeedID(),0,0,0,0,0,'PingFeedID'); ?>
+ pings->getISO8601Date(),0,0,0,0,0,'PingDate'); ?>
+ pings->comment_author,1,0,0,0,0,'PingBlogName'); ?>
+ <p><a href="pings->getAuthorURL(),1,0,0,0,0,'PingAuthorURL'); ?>">pings->getTrackbackTitle(),1,0,0,0,0,'PingTitle'); ?></a></p> pings->getTrackbackContent(),1,0,0,0,0,'PingContent'); ?>
+
+
+
+
+ comments->comment_trackback) : ?>
+
+ comments->post_title,1,0,0,0,0,'CommentEntryTitle'); ?> - comments->comment_author,1,0,0,0,0,'CommentAuthor'); ?>
+
+ comments->getFeedID(),0,0,0,0,0,'CommentFeedID'); ?>
+ comments->getISO8601Date(),0,0,0,0,0,'CommentDate'); ?>
+ comments->comment_author,1,0,0,0,0,'CommentAuthor'); ?>
+ comments->getContent(1),1,0,0,0,0,'CommentContent'); ?>
+
+
+ comments = null; ?>
+
+
\ No newline at end of file
diff --git a/cache/cbtpl/1c/4b/1c4b52bb84ebd38be237c1522ddf181d.php b/cache/cbtpl/1c/4b/1c4b52bb84ebd38be237c1522ddf181d.php
new file mode 100644
index 0000000..f8871ba
--- /dev/null
+++ b/cache/cbtpl/1c/4b/1c4b52bb84ebd38be237c1522ddf181d.php
@@ -0,0 +1,212 @@
+
+
+
+
+
+
+
+
- meta->meta_id,0,0,0,0,0,'TagID'); ?> - blog->name,1,0,0,0,0,'BlogName'); ?> -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ " title="" />
+
+ exists("meta")) { @$params['from'] .= ', '.$core->prefix.'meta META ';
+@$params['sql'] .= 'AND META.post_id = P.post_id ';
+$params['sql'] .= "AND META.meta_type = 'tag' ";
+$params['sql'] .= "AND META.meta_id = '".$core->con->escape($_ctx->meta->meta_id)."' ";
+} ?>
+nb_entry_per_page;
+$params['limit'] = array((($_page_number-1)*$params['limit']),$params['limit']);
+if ($_ctx->exists("users")) { $params['user_id'] = $_ctx->users->user_id; }
+if ($_ctx->exists("categories")) { $params['cat_id'] = $_ctx->categories->cat_id; }
+if ($_ctx->exists("archives")) { $params['post_year'] = $_ctx->archives->year(); $params['post_month'] = $_ctx->archives->month(); unset($params['limit']); }
+if ($_ctx->exists("langs")) { $params['post_lang'] = $_ctx->langs->post_lang; }
+if (isset($_search)) { $params['search'] = $_search; }
+$params['order'] = 'post_dt desc';
+$params['no_content'] = true;
+$_ctx->post_params = $params;
+$_ctx->posts = $core->blog->getPosts($params); unset($params);
+?>
+posts->fetch()) : ?>
+ posts->isStart()) : ?>
+ post_params;
+$_ctx->pagination = $core->blog->getPosts($params,true); unset($params);
+?>
+pagination->f(0) > $_ctx->posts->count()) : ?>
+
+
+
+
+
+
+
+
+
+
+
+ posts = null; $_ctx->post_params = null; ?>
+
+ meta->meta_id)."/atom",0,0,0,0,0,'TagFeedURL'); ?>" />
+ " />
+
+ tpl->getData('_head.html'); } catch (Exception $e) {} ?>
+
+
+
+