コード例 #1
0
ファイル: shots.php プロジェクト: jobizzness/Jobekunda
/**
* Template Name: Shots Page
* Info: Pretty straight forward..
*
*/
// Get URL variables and send to our Engine
isset($path['call_parts'][1]) ? $slug = $path['call_parts'][1] : ($slug = 'latest');
$category = null;
if (empty($slug)) {
    $slug = 'latest';
}
if (isset($path['query_vars']['cat'])) {
    $category = $path['query_vars']['cat'];
}
$image_path = 'images/shots/large/';
$shots = mt\shots::get($slug, $category);
// echo json_encode();
// echo VAR_DUMP($shots);
?>
 
    <section class="main-feed-header clearfix">
    

      <?php 
//<div class="mt-breadcrump-wrapper">
// <ul class="breadcrump">
//   <li><a href=" base($path);/home" title="home">Mytailor</a></li>
//   <li id="bread"><$page['pageLabel']</li>
// </ul>
//</div>
?>
コード例 #2
0
ファイル: home.php プロジェクト: jobizzness/Jobekunda

                      <div class="v-090">
                      <a href="<?php 
echo base($path);
?>
/shots" class="norm-text"><span class="button_09" id="vp-but0">View Shots</span></a>
                      </div>

              </div><!-- short banner -->

                <div>
                <div class="mt-row-wrapper clearfix">

            <?php 
$shots = mt\shots::get('featured', '', 9);
foreach ($shots as $shot) {
    ?>

    <div class ="lth-col-1 ht-col-1 all-container">
          <figure class="lth-wrapper" style="background:url('<?php 
    echo base($path) . '/' . $image_path . $shot->shotfilename . '.' . $shot->shotfiletype;
    ?>
');background-size: cover;">
            <a href="<?php 
    echo base($path) . '/shot/' . $shot->shotfilename;
    ?>
" class="sp-view">
              <img src="<?php 
    echo base($path) . '/' . $image_path . $shot->shotfilename . '.' . $shot->shotfiletype;
    ?>
コード例 #3
0
ファイル: more_shots.php プロジェクト: jobizzness/Jobekunda
<?php

if (isset($_POST['offset']) and isset($_POST['slug'])) {
    $offset = $_POST['offset'];
    $slug = $_POST['slug'];
    $category = $_POST['category'];
    $limit = 10;
    //$category = $_GET['category'];
    $data = mt\shots::get($slug, $category, $limit, $offset);
    if (!empty($data)) {
        $results = [];
        foreach ($data as $key => $value) {
            $results[] = $value->attributes;
        }
        echo json_encode($results);
        // header("content-type:application/json");
    }
}