function listUniqueTerms($p = 0, $l = 0) { global $conn; ?> <ul><?php $lista = $conn->getUniqueTerms($p); foreach ($lista as $row) { ?> <li><a href="<?php echo getScriptName(); ?> ?idt=<?php echo $row['term_id']; ?> "><?php echo_utf8($row['name']); ?> </a> <?php listUniqueTerms($row['term_id']); ?> </li> <?php } ?> </ul><?php }
function listPosts($filter = '', $l = 0) { global $conn; $rs_posts = $conn->getPosts($filter); if ($rs_posts) { foreach ($rs_posts as $p) { ?> <ul class="posts_list"> <li><a href="post.php?idp=<?php echo $p['ID']; ?> "><?php echo_utf8($p['post_title']); ?> </a> (<a href="posts.php?pt=<?php echo $p['post_type']; ?> "><?php echo $p['post_type']; ?> </a>) <?php unset($filter['post_type']); $filter['post_parent'] = 'AND post_parent = ' . $p['ID']; listPosts($filter, $l + 1); ?> </li> </ul><?php } } else { echo "sem registos!"; } }
function listPosts($filter = array(), $l = 0) { global $conn; $rs_posts = $conn->getPosts($filter); if ($rs_posts) { while ($p = $rs_posts->fetch_object()) { ?> <ul class="posts_list"> <li><a href="post.php?idp=<?php echo $p->ID; ?> "><?php echo_utf8($p->post_title); ?> </a> (<a href="posts.php?pt=<?php echo $p->post_type; ?> "><?php echo $p->post_type; ?> </a>) </li> </ul><?php } } else { echo "sem registos!"; } }
</tr> </thead> <tbody> <?php foreach ($user_meta as $row) { ?> <tr> <td><?php echo_utf8($row['meta_key']); ?> </td> <td><?php if ($row['meta_key'] == 'wp_capabilities') { $v2 = unserialize($row['meta_value']); echo '<pre>'; var_dump($v2); echo '</pre>'; //echo_utf8($v2); } elseif ($row['meta_key'] == 'dummmmmy') { } else { echo_utf8($row['meta_value']); } ?> </td> </tr> <?php } ?> </tbody> </table>
<?php } ?> </tbody> </table> <?php } else { echo "none"; } ?> <h2>Parent Post</h2> <?php $parent_post = $conn->getPost($post->post_parent); if ($parent_post) { $link_txt = $parent_post->post_title . " (" . $parent_post->post_type . ")"; ?> <a href="<?php echo $_SERVER['SCRIPT_NAME']; ?> ?idp=<?php echo $parent_post->ID; ?> "><?php echo_utf8($link_txt); ?> </a><?php } else { echo "none"; }
transCheck($f->lock((int) $_GET['topic_id']), '', 0); break; case 'reply': transCheck($f->getPostReplyXML((int) $_GET['forum'], (int) $_GET['topic']), $gConf['dir']['xsl'] . 'post_reply.xsl', $_GET['trans']); break; case 'show_search': transCheck($f->getSearchXML(), $gConf['dir']['xsl'] . 'search_form.xsl', $_GET['trans']); break; case 'search': transCheck($f->getSearchResultsXML($_GET['text'], $_GET['type'], (int) $_GET['forum'], $_GET['u'], $_GET['disp'], $_GET['start']), $gConf['dir']['xsl'] . 'search.xsl', $_GET['trans']); break; case 'post_reply': echo_utf8($f->postReplyXML($_POST)); break; case 'post_new_topic': echo_utf8($f->postNewTopicXML($_POST)); break; case 'post_success': transCheck("<forum><uri>{$_GET['forum']}</uri></forum>", $gConf['dir']['xsl'] . 'default_post_success.xsl', $_GET['trans']); break; case 'access_denied': transCheck('<forum_access>no</forum_access>', $gConf['dir']['xsl'] . 'default_access_denied.xsl', $_GET['trans']); break; case 'forum_index': transCheck($f->getPageXML(0, $_GET), $gConf['dir']['xsl'] . 'home.xsl', $_GET['trans']); break; case 'list_forums': transCheck($f->getForumsXML($_GET['cat'], 1), $gConf['dir']['xsl'] . 'cat_forums.xsl', $_GET['trans']); break; case 'live_tracker': transCheck($f->liveTracker(), $gConf['dir']['xsl'] . 'live_tracker_main.xsl', $_GET['debug'] ? 0 : 1);
echo $row['term_count']; ?> </td> </tr><?php //listUniqueTaxonomies($t->term_taxonomy_id, $l+1); } } ?> </tbody> </table> <?php if ($req_taxonomy) { $rs_txm_t = $conn->getTaxonomyTerms($req_taxonomy); ?> <h2><?php echo_utf8($req_taxonomy); ?> - terms <span title="<?php echo count($rs_txm_t); ?> top level terms">(<?php echo count($rs_txm_t); ?> )</span></h2> <table class="ink-table alternating hover"> <?php //$conn->listByTemplate('row_term_1', $rs_txm_t); if ($rs_txm_t) { $tmpl = getTemplateContent('row_term_1'); $use_fields = $conn->getTemplateFields($tmpl);
<?php $term = $conn->getTerm($idt); ?> <h1>Term: <?php echo_utf8($term->name); ?> </h1><?php ?> <h3>meta</h3><?php $atts['class'] = 'ink-table alternating hover'; $sql = "SELECT * FROM wp_termmeta WHERE term_id = {$idt}"; select_to_table($conn, $sql, $atts); ?> <br> <h3>taxonomias</h3><?php $list_txns = $conn->getTermTaxonomies($term->name); foreach ($list_txns as $tx) { echo $tx . "<br>" . PHP_EOL; }
<h1>Gallery: <?php echo_utf8($post->post_title); ?> </h1> <h2>Fotos</h2> <?php $sql = "SELECT *"; $sql .= " FROM wp_posts WHERE ID IN ("; $sql .= " SELECT meta_value FROM wp_postmeta WHERE post_id = " . $post->ID . " AND meta_key = 'photos')"; $sql .= ""; $sql .= ""; $stmt_terms = $conn->query($sql); $lista = $stmt_terms->fetchAll(); /*echo '<pre>'; print_r($lista); echo '</pre>';*/ ?> <section id="galeria"><?php foreach ($lista as $k => $post) { ?> <img class="foto" src="<?php echo $post['guid']; ?> " alt=""> <?php } ?> </section>
<h1>Posts found</h1> <?php if ($rs_posts) { foreach ($rs_posts as $k => $v) { ?> <ul class="posts_list"> <li><a href="post.php?idp=<?php echo $v['ID']; ?> "><?php echo_utf8($v['post_title']); ?> </a> (<a href="posts.php?pt=<?php echo $v['post_type']; ?> "><?php echo $v['post_type']; ?> </a>)<br> <span style="font-size: 9px;"><strong>slug:</strong> <?php echo $v['post_name']; ?> </span> </li> </ul><?php } }
echo "<td>"; if ($row['option_name'] == 'cron') { ?> <a href="/cron.php">go to cron page</a><td><?php continue; } $maybe_object = @unserialize(utf8_encode($row['option_value'])); if ($maybe_object === false) { echo_utf8($row['option_value']); } else { $type = gettype($maybe_object); if ($type != 'string') { echo $type . '<br>' . PHP_EOL; } if ($type == 'object') { arrayToList((array) $maybe_object); } elseif ($type == 'array') { arrayToList($maybe_object); } else { echo $type . ' :: '; echo_utf8($row['option_value']); } } echo " </td>" . PHP_EOL; echo "<td>" . $row['autoload'] . "</td>" . PHP_EOL; echo "</tr>" . PHP_EOL; } ?> </tbody> </table>