1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11:
12: if (defined('OFFSET_PATH')) {
13: $plugin_is_filter = 5 | ADMIN_PLUGIN;
14: $plugin_description = gettext("Import Wordpress pages, posts, categories, and comments to Zenpage.");
15: $plugin_author = "Malte Müller (acrylian)";
16:
17:
18: zp_register_filter('admin_utilities_buttons', 'wordpress_import_button');
19:
20: function wordpress_import_button($buttons) {
21: $buttons[] = array(
22: 'category' => gettext('Admin'),
23: 'enable' => true,
24: 'button_text' => gettext('Wordpress Importer'),
25: 'formname' => 'wordpress_import.php',
26: 'action' => WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/wordpress_import.php',
27: 'icon' => WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/wordpress_import/wpmini-blue.png',
28: 'title' => gettext('An importer for Wordpress posts and pages to Zenpage.'),
29: 'alt' => '',
30: 'hidden' => '',
31: 'rights' => ADMIN_RIGHTS
32: );
33: return $buttons;
34: }
35:
36: } else {
37:
38: define('OFFSET_PATH', 3);
39:
40: require_once(dirname(dirname(__FILE__)) . '/admin-globals.php');
41:
42: if (extensionEnabled('zenpage')) {
43: require_once(dirname(dirname(__FILE__)) . '/' . PLUGIN_FOLDER . '/zenpage/zenpage-admin-functions.php');
44: }
45:
46: admin_securityChecks(NULL, currentRelativeURL());
47:
48: if (isset($_REQUEST['dbname']) || isset($_REQUEST['dbuser']) || isset($_REQUEST['dbpass']) || isset($_REQUEST['dbhost'])) {
49: XSRFdefender('wordpress');
50: }
51:
52: $webpath = WEBPATH . '/' . ZENFOLDER . '/';
53:
54:
55: function wp_query_full_array($sql, $wpconnection) {
56: $result = mysqli_query($wpconnection, $sql) or die(gettext("Query failed : ") . mysqli_error($wpconnection));
57: if ($result) {
58: $allrows = array();
59: while ($row = mysqli_fetch_assoc($result))
60: $allrows[] = $row;
61: return $allrows;
62: } else {
63: return false;
64: }
65: }
66:
67: function wp_prefix($tablename, $wp_prefix) {
68: return '`' . $wp_prefix . $tablename . '`';
69: }
70:
71: function wpimport_TryAgainError($message) {
72: return '<p class="import-error">' . $message . '<br /><a href="wordpress_import.php">' . gettext('Please try again') . '</a>
73: </p>';
74: }
75:
76: $metaURL = '';
77: if (isset($_REQUEST['dbname']) || isset($_REQUEST['dbuser']) || isset($_REQUEST['dbpass']) || isset($_REQUEST['dbhost'])) {
78:
79: $wp_dbname = sanitize($_REQUEST['dbname']);
80: $wp_dbbuser = sanitize($_REQUEST['dbuser']);
81: $wp_dbpassword = sanitize($_REQUEST['dbpass']);
82: $wp_dbhost = sanitize($_REQUEST['dbhost']);
83: $wp_prefix = addslashes(sanitize($_REQUEST['tableprefix']));
84: $dbinfo_incomplete = '';
85: $db_noconnection = '';
86: $db_notselected = '';
87: $missingmessage = '<span style="color: red">' . gettext('Missing') . '</span>';
88: if (empty($wp_dbname) || empty($wp_dbbuser) || empty($wp_dbpassword) || empty($wp_dbhost)) {
89: if (empty($wp_dbname))
90: $wp_dbname = $missingmessage;
91: if (empty($wp_dbbuser))
92: $wp_dbbuser = $missingmessage;
93: if (empty($wp_dbpassword))
94: $wp_dbpassword = $missingmessage;
95: if (empty($wp_dbhost))
96: $wp_dbhost = $missingmessage;
97: }
98: $dbinfo = '
99: <h2>' . gettext('Wordpress-Database info') . '</h2>
100: <ul>
101: <li>' . gettext('Database name') . ': <strong>' . $wp_dbname . '</strong></li>
102: <li>' . gettext('Database user') . ': <strong>' . $wp_dbbuser . '</strong></li>
103: <li>' . gettext('Database password') . ': <strong>' . $wp_dbpassword . '</strong></li>
104: <li>' . gettext('Database host') . ': <strong>' . $wp_dbhost . '</strong></li>
105: <li>' . gettext('Database table prefix') . '>: <strong>' . $wp_prefix . '</strong></li>
106: </ul>
107: ';
108: if (empty($wp_dbname) || empty($wp_dbbuser) || empty($wp_dbpassword) || empty($wp_dbhost)) {
109: $dbinfo_incomplete = wpimport_TryAgainError($message);
110: }
111: $wpdbconnection = @mysqli_connect($wp_dbhost, $wp_dbbuser, $wp_dbpassword, $wp_dbname);
112: mysqli_query($wpdbconnection, "SET NAMES 'utf8'");
113: @mysqli_query($wpdbconnection, 'SET SESSION sql_mode="";');
114: if (!$wpdbconnection) {
115: $db_noconnection = wpimport_TryAgainError(gettext('<strong>ERROR:</strong> Could not connect to the Wordpress database - Query failed : ') . mysqli_error($wpdbconnection));
116: }
117: if (!@mysqli_select_db($wpdbconnection, $wp_dbname)) {
118: $db_notselected = wpimport_TryAgainError(gettext('<strong>ERROR:</strong> Wordpress database could not be selected - Query failed : ') . mysqli_error($wpdbconnection));
119: }
120:
121: 122: 123:
124: $catinfo = '';
125: if (!isset($_GET['refresh'])) {
126: $cats = wp_query_full_array("SELECT * FROM " . wp_prefix('terms', $wp_prefix) . " as terms, " . wp_prefix('term_taxonomy', $wp_prefix) . " as tax WHERE tax.taxonomy = 'category' AND terms.term_id = tax.term_id", $wpdbconnection);
127:
128: debugLogVar('Wordpress import - All Categories', $cats);
129:
130:
131: if ($cats) {
132: foreach ($cats as $cat) {
133: $cattitlelink = $cat['slug'];
134: $cattitle = $_zp_UTF8->convert($cat['name']);
135:
136: $catdesc = $cat['description'];
137: if (getcheckboxState('convertlinefeeds')) {
138: $catdesc = nl2br($catdesc);
139: }
140: if (query("INSERT INTO " . prefix('news_categories') . " (titlelink, title, permalink) VALUES (" . db_quote($cattitlelink) . ", " . db_quote($cattitle) . ", '1')", false)) {
141: $catinfo .= '<li class="import-success">' . sprintf(gettext("Category <em>%s</em> added"), $cat['name']) . '</li>';
142: } else {
143: $catinfo .= '<li class="import-exists">' . sprintf(gettext("A category with the title/titlelink <em>%s</em> already exists!"), $cat['name']) . '</li>';
144: }
145: }
146: } else {
147: $catinfo .= '<li class="import-nothing">' . gettext('No categories to import.') . '</li>';
148: }
149:
150: 151: 152:
153: $taginfo = '';
154: $tags = wp_query_full_array("SELECT * FROM " . wp_prefix('terms', $wp_prefix) . " as terms, " . wp_prefix('term_taxonomy', $wp_prefix) . " as tax WHERE tax.taxonomy = 'post_tag' AND terms.term_id = tax.term_id", $wpdbconnection);
155:
156: debugLogVar('Wordpress import - Tags import', $tags);
157:
158:
159: if ($tags) {
160: foreach ($tags as $tag) {
161: if (query("INSERT INTO " . prefix('tags') . " (name) VALUES (" . db_quote($tag['slug']) . ")", false)) {
162: $taginfo .= '<li class="import-success">' . sprintf(gettext("Tag <em>%s</em> added"), $tag['name']) . '</li>';
163: } else {
164: $taginfo .= '<li class="import-exists">' . sprintf(gettext("A tag with the title/titlelink <em>%s</em> already exists!"), $tag['name']) . '</li>';
165: }
166: }
167: } else {
168: $taginfo .= '<li class="import-nothing">' . gettext('No tags to import.') . '</li>';
169: }
170: }
171: $postinfo = '';
172: $postcount = '';
173: if (!isset($_GET['refresh'])) {
174: $limit = ' LIMIT 0,10';
175: } else {
176: $refresh = sanitize_numeric($_GET['refresh']);
177: $limit = ' LIMIT ' . ($refresh) . ',10';
178: $postcount = $refresh;
179: }
180: 181: 182:
183: $posttotal = mysqli_query($wpdbconnection, "
184: SELECT COUNT(*)
185: FROM " . wp_prefix('posts', $wp_prefix) . "
186: WHERE (post_type = 'post' OR post_type = 'page') AND (post_status = 'publish' OR post_status = 'draft')
187: ");
188: $row = db_fetch_row($posttotal);
189: $posttotalcount = $row[0];
190:
191: $posts = wp_query_full_array("
192: SELECT
193: id,
194: post_title as title,
195: post_name as titlelink,
196: post_content as content,
197: post_date as date,
198: post_modified as lastchange,
199: post_status as `show`,
200: post_type as type
201: FROM " . wp_prefix('posts', $wp_prefix) . "
202: WHERE (post_type = 'post' OR post_type = 'page') AND (post_status = 'publish' OR post_status = 'draft')
203: ORDER BY post_date DESC" . $limit, $wpdbconnection);
204: if ($posts) {
205:
206: foreach ($posts as $post) {
207:
208: debugLogVar('Wordpress import - Import post: "' . $post['title'] . '" (' . $post['type'] . ')', $posts);
209: if ($post['show'] == "publish") {
210: $show = 1;
211: } else {
212: $show = 0;
213: }
214: $post['title'] = $_zp_UTF8->convert($post['title']);
215: $titlelink = $post['titlelink'];
216: $post['content'] = $_zp_UTF8->convert($post['content']);
217: if (getcheckboxState('convertlinefeeds')) {
218: $post['content'] = nl2br($post['content']);
219: }
220: $post['date'] = $post['date'];
221: $post['lastchange'] = $post['lastchange'];
222: $post['type'] = $post['type'];
223: switch ($post['type']) {
224: case 'post':
225:
226: if (query("INSERT INTO " . prefix('news') . " (title,titlelink,content,date,lastchange,`show`,permalink) VALUES (" . db_quote($post['title']) . "," . db_quote($titlelink) . "," . db_quote($post['content']) . "," . db_quote($post['date']) . "," . db_quote($post['lastchange']) . "," . $show . ",1)", false)) {
227: $postinfo .= '<li class="import-success">' . sprintf(gettext('%1$s <em>%2$s</em> added'), $post['type'], $post['title']);
228: } else {
229: $postinfo .= '<li class="import-exists">' . sprintf(gettext('%1$s with the title/titlelink <em>%2$s</em> already exists!'), $post['type'], $post['title']);
230: }
231:
232: $newarticle = new ZenpageNews($titlelink, true);
233: $newarticleid = $newarticle->getID();
234:
235: $termrelations = wp_query_full_array("
236: SELECT rel.object_id, rel.term_taxonomy_id, tax.term_id, tax.taxonomy, terms.term_id, terms.name, terms.slug
237: FROM " . wp_prefix('term_relationships', $wp_prefix) . " as rel,
238: " . wp_prefix('term_taxonomy', $wp_prefix) . " as tax,
239: " . wp_prefix('terms', $wp_prefix) . " as terms
240: WHERE tax.term_taxonomy_id = rel.term_taxonomy_id
241: AND tax.term_id = terms.term_id
242: AND rel.object_id = '" . $post['id'] . "'", $wpdbconnection);
243:
244: $postinfo .= "<ul>";
245: if ($termrelations) {
246: foreach ($termrelations as $term) {
247: $term['name'] = $_zp_UTF8->convert($term['name']);
248: $term['slug'] = $term['slug'];
249: $term['taxonomy'] = $term['taxonomy'];
250: switch ($term['taxonomy']) {
251: case 'category':
252:
253: $getcat = query_single_row("SELECT titlelink, title,id from " . prefix('news_categories') . " WHERE titlelink = " . db_quote($term['slug']) . " AND title = " . db_quote($term['name']));
254:
255: if (query_single_row("SELECT id from " . prefix('news2cat') . " WHERE news_id = " . $newarticleid . " AND cat_id=" . $getcat['id'], false)) {
256: $postinfo .= '<li class="import-exists">' . sprintf(gettext('%1$s <em>%2$s</em> already assigned'), $term['taxonomy'], $term['name']);
257: } else {
258: if (query("INSERT INTO " . prefix('news2cat') . " (cat_id,news_id) VALUES (" . $getcat['id'] . "," . $newarticleid . ")", false)) {
259: $postinfo .= '<li class="import-success">' . sprintf(gettext('%1$s <em>%2$s</em> assigned'), $term['taxonomy'], $term['name']);
260: } else {
261: $postinfo .= '<li class="import-error">' . sprintf(gettext('%1$s <em>%2$s</em> could not be assigned!'), $term['taxonomy'], $term['name']);
262: }
263: }
264: break;
265: case 'post_tag':
266:
267:
268: $gettag = query_single_row("SELECT name,id from " . prefix('tags') . " WHERE name = " . db_quote($term['slug']));
269:
270: if (query_single_row("SELECT id from " . prefix('obj_to_tag') . " WHERE objectid = " . $newarticleid . " AND tagid =" . $gettag['id'], false)) {
271: $postinfo .= '<li class="import-exists">' . sprintf(gettext('%1$s <em>%2$s</em> already assigned'), $term['taxonomy'], $term['slug']);
272: } else {
273: if (query("INSERT INTO " . prefix('obj_to_tag') . " (tagid,type,objectid) VALUES (" . $gettag['id'] . ",'news'," . $newarticleid . ")", false)) {
274: $postinfo .= '<li class="import-success">' . sprintf(gettext('%1$s <em>%2$s</em> assigned'), $term['taxonomy'], $term['slug']);
275: } else {
276: $postinfo .= '<li class="import-error">' . sprintf(gettext('%1$s <em>%2$s</em> could not be assigned!'), $term['taxonomy'], $term['slug']);
277: }
278: }
279: break;
280: }
281:
282: }
283: $postinfo .= "</ul>";
284: debugLogVar('Wordpress import - Term relations for "' . $post['title'] . '" (' . $post['type'] . ')', $termrelations);
285: }
286: break;
287: case 'page':
288:
289: if (query("INSERT INTO " . prefix('pages') . " (title,titlelink,content,date,lastchange,`show`,permalink) VALUES (" . db_quote($post['title']) . "," . db_quote($titlelink) . "," . db_quote($post['content']) . "," . db_quote($post['date']) . "," . db_quote($post['lastchange']) . "," . $show . ",1)", false)) {
290: $postinfo .= '<li class="import-success">' . sprintf(gettext('%1$s <em>%2$s</em> added'), $post['type'], $post['title']);
291: } else {
292: $postinfo .= '<li class="import-exists">' . sprintf(gettext('%1$s with the title/titlelink <em>%2$s</em> already exists!'), $post['type'], $post['title']);
293: }
294: break;
295: }
296:
297: 298: 299:
300: switch ($post['type']) {
301: case 'post':
302: $ctype = 'news';
303: break;
304: case 'page':
305: $ctype = 'pages';
306: break;
307: }
308: $comments = wp_query_full_array("
309: SELECT comment_post_ID, comment_author, comment_author_email, comment_author_url,comment_date, comment_content, comment_approved
310: FROM " . wp_prefix('comments', $wp_prefix) . "
311: WHERE comment_approved = 1 AND comment_post_ID = " . $post['id'], $wpdbconnection);
312: $commentcount = '';
313: $commentexists_count = '';
314: if ($comments) {
315: $postinfo .= '<ul>';
316: foreach ($comments as $comment) {
317: $comment['comment_author'] = $_zp_UTF8->convert($comment['comment_author']);
318: $comment['comment_author_email'] = $comment['comment_author_email'];
319: $comment['comment_author_url'] = $comment['comment_author_url'];
320: $comment['comment_date'] = $comment['comment_date'];
321: $comment['comment_content'] = nl2br($_zp_UTF8->convert($comment['comment_content']));
322: if (getcheckboxState('convertlinefeeds')) {
323: $comment['comment_content'] = nl2br($comment['comment_content']);
324: }
325: $comment_approved = sanitize_numeric($comment['comment_approved']);
326: if ($comment_approved == 1) {
327: $comment_approved = 0;
328: } else {
329: $comment_approved = 1;
330: }
331:
332: if (query_single_row("SELECT * from " . prefix('comments') . " WHERE ownerid =" . $newarticleid . " AND name=" . db_quote($comment['comment_author']) . " AND email =" . db_quote($comment['comment_author_email']) . " AND website =" . db_quote($comment['comment_author_url']) . " AND date =" . db_quote($comment['comment_date']) . " AND comment =" . db_quote($comment['comment_content']) . " AND inmoderation =" . $comment_approved . " AND type='" . $ctype . "'", false)) {
333: $commentexists_count++;
334: } else {
335: if (query("INSERT INTO " . prefix('comments') . " (ownerid,name,email,website,date,comment,inmoderation,type) VALUES (" . $newarticleid . "," . db_quote($comment['comment_author']) . "," . db_quote($comment['comment_author_email']) . "," . db_quote($comment['comment_author_url']) . "," . db_quote($comment['comment_date']) . "," . db_quote($comment['comment_content']) . "," . $comment_approved . ",'" . $ctype . "')", true)) {
336: $commentcount++;
337: } else {
338: $postinfo .= '<li class="import-error">' . gettext('Comment could not be assigned!') . '</li>';
339: }
340: }
341: }
342: if ($commentexists_count != 0) {
343: $postinfo .= '<li class="import-exists">' . sprintf(ngettext('%1$u comment already exists.', '%1$u comments already exist.', $commentexists_count), $commentexists_count) . '</li>';
344: }
345: if ($commentcount != 0) {
346: $postinfo .= '<li class="import-success">' . sprintf(ngettext('%1$u comment imported.', '%1$u comments imported.', $commentcount), $commentcount) . '</li>';
347: }
348: } else {
349: $postinfo .= '<ul><li class="import-nothing">' . gettext('No comments to import') . '</li>';
350: }
351: debugLogVar('Wordpress import - Comments for "' . $post['title'] . '" (' . $post['type'] . ')', $comments);
352: $postinfo .= '</ul></li>';
353: $postcount++;
354: }
355: $metaURL = 'wordpress_import.php?refresh=' . $postcount . '&dbname=' . $wp_dbname . '&dbuser=' . $wp_dbbuser . '&dbpass=' . $wp_dbpassword . '&dbhost=' . $wp_dbhost . '&tableprefix=' . $wp_prefix . '&convertlinefeeds=' . getcheckboxState('convertlinefeeds') . '&XSRFToken=' . getXSRFToken('wordpress');
356: } else {
357: $metaURL = '';
358: $postinfo .= "<li class='import-nothing'>" . gettext("No posts or pages to import.") . "</li>";
359: }
360: }
361: $zenphoto_tabs['overview']['subtabs'] = array(gettext('Wordpress') => '');
362: printAdminHeader('overview', 'wordpress');
363: if (!empty($metaURL) && $postcount < $posttotalcount) {
364: ?>
365: <meta http-equiv="refresh" content="1; url=<?php echo $metaURL; ?>" />
366: <?php
367: }
368: ?>
369: <style type="text/css">
370: .import-success {
371: color: darkgreen;
372: }
373: .import-nothing {
374: color:
375: }
376: .import-exists {
377: color: darkblue;
378: }
379: .import-error {
380: color: red;
381: }
382: </style>
383: </head>
384: <body>
385: <?php printLogoAndLinks(); ?>
386: <div id="main">
387: <?php printTabs(); ?>
388: <div id="content">
389: <?php printSubtabs('Wordpress'); ?>
390: <div class="tabbox">
391: <?php zp_apply_filter('admin_note', 'wordpress', ''); ?>
392: <h1><?php echo (gettext('Wordpress Importer')); ?></h1>
393: <?php if (!isset($_REQUEST['dbname']) && !isset($_REQUEST['dbuser']) && !isset($_REQUEST['dbpass']) && !isset($_REQUEST['dbhost']) && !isset($_GET['refresh'])) { ?>
394: <p><?php echo gettext("An importer for <strong>Wordpress 3.x or newer</strong> to the Zenpage CMS plugin that imports the following:"); ?></p>
395: <ul>
396: <li><?php echo gettext("<strong>Posts (post_status published and draft only) => Zenpage articles</strong>"); ?></li>
397: <li><?php echo gettext("<strong>Pages (post_status published and draft only) => Zenpage pages</strong>"); ?></li>
398: <li><?php echo gettext("<strong>Post categories => Zenpage categories including assignment to their article</strong>"); ?></li>
399: <li><?php echo gettext("<strong>Post tags => Zenphoto tags including assignment to their article</strong>"); ?></li>
400: <li><?php echo gettext("<strong>Post and page comments => Zenphoto comments including assignment to their article</strong>"); ?></li>
401: </ul>
402: <p class="notebox">
403: <?php echo gettext("<strong>IMPORTANT: </strong>MySQLi must be selected as the database handler on the Zenphoto options (generally the default)."); ?>
404: </p
405: <p class="notebox">
406: <?php echo gettext("<strong>IMPORTANT: </strong>If you are not using an fresh Zenphoto install it is <strong>strongly recommended to backup your database</strong> before running this importer. Make also sure that both databases use the same encoding so you do not get messed up character display."); ?>
407: </p>
408: <p class="notebox">
409: <?php echo gettext("<strong>Note:</strong> <em>Wordpress page and category nesting</em> is currently not preserved but can easily be recreated by drag and drop sorting."); ?>
410: </p>
411:
412: <p><?php echo gettext("In case anything does not work as expected the query results from the Wordpress database are logged in <code>zp-data/debug.log</code>"); ?></p>
413: <?php if (!extensionEnabled('zenpage')) { ?>
414: <p class="errorbox"><?php echo gettext('<strong>ERROR: </strong>The Zenpage CMS plugin is not enabled.'); ?></p>
415: <?php
416: die();
417: }
418: ?>
419:
420: <h2><?php echo gettext('Please enter your Wordpress database details:'); ?></h2>
421: <form action="" method="post" name="wordpress">
422: <?php XSRFToken('wordpress'); ?>
423: <input type="text" value="wordpress" id="dbname" name="dbname" /> <label for="dbname"><?php echo gettext("Database name"); ?></label><br />
424: <input type="text" value="root" id="dbuser" name="dbuser" /> <label for="dbuser"><?php echo gettext("Database user"); ?></label><br />
425: <input type="text" value="root" id="dbpass" name="dbpass" /> <label for="dbpass"><?php echo gettext("Database password"); ?></label><br />
426: <input type="text" value="localhost" id="dbhost" name="dbhost" /> <label for="dbhost"><?php echo gettext("Database host"); ?></label><br />
427: <input type="text" value="wp_" name="tableprefix" id="tableprefix" /> <label for="tableprefix"><?php echo gettext("Database table prefix"); ?></label><br />
428: <input type="checkbox" value="0" name="convertlinefeeds" id="convertlinefeeds" /> <label for="convertlinefeeds"><?php echo gettext('Convert linefeeds to new lines (br)'); ?></label><br />
429: <p class="buttons"><button class="submitbutton" type="submit" title="<?php echo gettext("Import"); ?>"><img src="../images/pass.png" alt="" /><strong><?php echo gettext("Import"); ?></strong></button></p>
430: <p class="buttons"><button class="submitbutton" type="reset"><img src="../images/reset.png" alt="" /><strong><?php echo gettext("Reset"); ?></strong></button></p>
431: <br style="clear:both" />
432: </form>
433: <?php
434: }
435:
436: if (isset($_REQUEST['dbname']) || isset($_REQUEST['dbuser']) || isset($_REQUEST['dbpass']) || isset($_REQUEST['dbhost'])) {
437:
438: if ($dbinfo_incomplete) {
439: echo $dbinfo . $dbinfo_incomplete;
440: die();
441: }
442: if ($db_noconnection) {
443: echo $dbinfo . $db_noconnection;
444: die();
445: }
446: if ($db_notselected) {
447: echo $dbinfo . $db_notselected;
448: die();
449: }
450: if ($posttotalcount == $postcount) {
451: ?>
452: <p class="messagebox"><?php echo gettext('Import finished.'); ?></p>
453: <?php } else {
454: ?>
455: <p><?php echo gettext('Importing...patience please.'); ?></p>
456: <?php } ?>
457: <ul>
458: <?php
459: if (!isset($_GET['refresh'])) {
460: ?>
461: <li><strong><?php echo gettext('Categories'); ?></strong>
462: <ol>
463: <?php echo $catinfo; ?>
464: </ol>
465: </li>
466: <?php
467: }
468: if (!isset($_GET['refresh'])) {
469: ?>
470: <li><strong><?php echo gettext('Tags'); ?></strong>
471: <ol>
472: <?php echo $taginfo; ?>
473: </ol>
474: </li>
475: <?php
476: }
477: ?>
478: <li><strong><?php echo gettext('Pages and Articles'); ?></strong>
479: <?php
480: if (isset($_GET['refresh'])) {
481: $startlist = ' start="' . $refresh . '"';
482: } else {
483: $startlist = '';
484: }
485: ?>
486: <ol<?php echo $startlist; ?>>
487: <?php echo $postinfo; ?>
488: </ol>
489: </li>
490: </ul>
491: <?php if ($posttotalcount == $postcount) { ?>
492: <p class="buttons"><a href="wordpress_import.php"><?php echo gettext('New import'); ?></a></p>
493: <br style="clear:both" />
494: <?php
495: }
496: }
497: ?>
498: </div>
499: </div><!-- content -->
500: </div><!-- main -->
501: <?php printAdminFooter(); ?>
502: </body>
503: </html>
504:
505: <?php
506: }
507: ?>