Exemplo n.º 1
0
function write_html()
{
    $argc = func_num_args();
    $argv = func_get_args();
    $output = $argv[0];
    if ($argc > 0) {
        for ($i = 1; $i < $argc; $i++) {
            $searchThisPunk = "(\\{" . ($i - 1) . "\\})";
            if (is_array($argv[$i])) {
                foreach ($argv[$i] as $thisArg) {
                    $output = preg_replace($searchThisPunk, $thisArg, $output);
                }
            } else {
                $output = preg_replace($searchThisPunk, $argv[$i], $output);
            }
        }
    }
    $output = str_replace("{allposts}", post_list(), $output);
    print $output;
}
Exemplo n.º 2
0
    while ($article_id = mysql_fetch_array($article_list, MYSQL_ASSOC)) {
        echo '<li>';
        if ($list_template == 1) {
            bits_list($article_id['SL_NO']);
        } else {
            post_list($article_id['SL_NO']);
        }
        echo '</li>';
    }
    // end of while loop
} else {
    echo '<li>';
    if ($list_template == 1) {
        bits_list();
    } else {
        post_list();
    }
    echo '</li>';
}
?>
						        			</ul>
							    		 	<?php 
if (article_exist()) {
    if ($category_data->cat_url == "all-articles") {
        pagination($post_per_page, $start, $category_data->cat_url, False, 'Bits');
    } else {
        pagination($post_per_page, $start, $category_data->cat_url, True, $category_data->cat_name);
    }
}
?>
			        			
Exemplo n.º 3
0
								</div>
								<div class="column-small-8 padd0">
									<h3 class="section-heading"><i class="fa fa-eye"></i> Most Read</h3>
									<div class="row">
								    	<div class="column-xsmall-7 most-read-post">
								    		<ul class="sections-list">
								    			<li><?php 
post_list(122, 2);
?>
</li>
								    			<li><?php 
post_list(125, 2);
?>
</li>
								    			<li><?php 
post_list(127, 2);
?>
</li>
								    		</ul>
										</div>
										<div class="column-xsmall-5 most-read-bits">
											<ul class="sections-list">
								    			<li><?php 
bits_list(122, 1);
?>
</li>
								    			<li><?php 
bits_list(125, 1);
?>
</li>
								    			<li><?php 
Exemplo n.º 4
0
    } else {
        // back to the start
        $posts->rewind();
        // reset original article
        Registry::set('article', Registry::get('original_article'));
        // remove items
        Registry::set('rwar_post_archive', false);
    }
    return $result;
}
?>

<!-- This is the HTML portion, it might go within a <body> tag or whatever -->

<?php 
while (post_list()) {
    ?>
    <?php 
    foreach ($displayCats as $cat) {
        ?>
        <?php 
        if (article_category_id() == $cat) {
            ?>
          <!-- Here Goes Whatever your want each item to display. I currently use list items but you could forseeably use divs, table items, or flexbox children.
          <li>
            <a href="<?php 
            echo article_url();
            ?>
"><h1><?php 
            echo article_title();
            ?>
Exemplo n.º 5
0
<?php

if (isset($board_nicename)) {
    $page_title = $board_nicename . ' - ' . APP_NAME;
}
include load_template('header');
$post_page = isset($_GET['post_page']) ? $_GET['post_page'] : 0;
post_list($at, $post_page, 10, $order = isset($_GET['list_order']) && $_GET['list_order'] == 'update' ? 'update' : 'post');
include load_template('footer');
Exemplo n.º 6
0
    ?>
" alt="編輯"></a></span>
<?php 
}
?>
				<div id="post-text">
<!-- Start of Post -->
<?php 
echo show_text($row["post_content"]);
?>
<!-- End of Post -->
				</div>
<?php 
if (isset($mod_time) && isset($mod_who)) {
    ?>
				<span id="post-view-modified">本文章在 <?php 
    echo $mod_time;
    ?>
 由 <strong><?php 
    echo $mod_who;
    ?>
</strong> 做了最後一次修改</span>
<?php 
}
?>
			</div>
<?php 
comment_list($to, $comment_page = isset($_GET['comment_page']) ? $_GET['comment_page'] : -1, 5);
comment_add($to);
post_list($board['name'], $post_page = isset($_GET['post_page']) ? $_GET['post_page'] : 0, 10, $order = isset($_GET['list_order']) && $_GET['list_order'] == 'update' ? 'update' : 'post');
include load_template('footer');
Exemplo n.º 7
0
require 'init.php';
?>
<!DOCTYPE html>
<head>
    <meta charset="utf-8">
    <title>Tubogram</title>
    <?php 
echo js_and_css();
?>
</head>

<?php 
if (get_current_user_id()) {
    page_header('logged', 'feed');
} else {
    page_header('not_logged', 'feed');
}
?>

<div class="container">
    <div class="page-header">
        <h1>Мої підписки</h1>
    </div>
    <?php 
post_list(get_feed_posts(get_current_user_id()));
?>
</div>

<?php 
page_footer();
Exemplo n.º 8
0
    ?>
                <button class="btn btn-default followers" style="background: transparent" data-content="<?php 
    echo escape_html(links_for_users($followers));
    ?>
">
                        <?php 
    echo $follower_count;
    ?>
 підписників
                </button>
            <?php 
}
?>
        </h1>
    </div>

    <?php 
post_list(get_user_posts_by_user_id($user_id));
?>
</div>
<?php 
page_footer();
?>

<script>
    $('.followers').hoverablePopover({
      placement: 'right',
      html: true
    });
</script>
        // remove items
        Registry::set('rwar_post_archive', false);
    }
    return $result;
}
?>

<!-- While loop limited to 3 items.  -->

<div class="recent-posts">
<?php 
$i = 0;
?>
    
<?php 
while (post_list() && $i < 3) {
    ?>
 

<?php 
    foreach ($displayCats as $cat) {
        if (article_category_id() == $cat) {
            ?>
 
<?php 
            $i++;
            ?>

    <div class="col-md-4">
    <a href="<?php 
            echo article_url();
Exemplo n.º 10
0
    <title>Tubogram</title>
    <?php 
echo js_and_css();
?>
</head>

<?php 
if (get_current_user_id()) {
    page_header('logged', 'new_videos');
} else {
    page_header('not_logged', 'new_videos');
}
?>

<div class="container">
    <?php 
jumbotron();
?>

    <div class="page-header">
        <h1>Нові відео</h1>
    </div>

    <?php 
post_list(get_latest_posts(12));
?>

</div>

<?php 
page_footer();
Exemplo n.º 11
0
<?php

/**
 * CricBD post list API for Apps
 * @author Shahriar
 * @version 1.0.1
*/
header('Content-Type: application/json;');
//
if (isset($_POST['api_key'])) {
    $var = sql_data('forum_user', "api_key='" . $_POST['api_key'] . "'");
    if ($var) {
        //
        $chk = post_list();
        $uid = (int) $var['uid'];
        if ($chk) {
            $json['message'] = "Posts found!";
            $json['success'] = 1;
            $json['data'] = json_decode($chk, true);
            $counter = count($json['data']);
            for ($post = 0; $post < $counter; $post++) {
                $arr = json_decode($json['data'][$post]['post_like']);
                $json['data'][$post]['post_like'] = count($arr);
                if (in_array($uid, $arr)) {
                    $json['data'][$post]['liked'] = 1;
                } else {
                    $json['data'][$post]['liked'] = 0;
                }
                $com = post_comment($json['data'][$post]['post_id']);
                $arr = json_decode($com, true);
                $len = count($arr);
Exemplo n.º 12
0
function post_delete()
{
    $data = array();
    // kiểm tra login
    checkaut();
    // bắt dữ id bài viết cần chỉnh sửa
    $CurrentPost = empty($_GET['id']) ? null : strtolower($_GET['id']);
    // kiểm tra xem bài viết có tồn tại không!
    if (!model('post')->check_true($CurrentPost, 'Post_id')) {
        $msg = "Bài viết không tồn tại ";
        abort($msg);
    }
    $data['posts'] = model('post')->getOneBy($CurrentPost, 'Post_id');
    if (model('post')->delete($CurrentPost) >= 1) {
        $msg = "Xóa bài viết thành công!!!";
        abort($msg);
    } else {
        $msg = "Không thể xóa bài viết!!!";
        abort($msg);
    }
    post_list();
}
Exemplo n.º 13
0
    page_header('logged', 'best_videos');
} else {
    page_header('not_logged', 'best_videos');
}
?>
<div class="container">
    <ul class="nav nav-tabs">
        <li class="active">
            <a href="#most-likes" data-toggle="tab"><h4>Найбільше лайків</h4></a>
        </li>
        <li>
            <a href="#most-comments" data-toggle="tab"><h4>Найбільш коментуємі</h4></a>
        </li>
    </ul>
    <br>
    <div class="tab-content">
        <div class="tab-pane active" id="most-likes">
            <?php 
post_list(get_best_posts_by_likes(12));
?>
        </div>
        <div class="tab-pane" id="most-comments">
            <?php 
post_list(get_best_posts_by_comments(12));
?>
        </div>
    </div>
</div>

<?php 
page_footer();