Beispiel #1
0
        $link = "type=details&cat={$cat}&nickname=" . urlencode($nickname) . "&" . $dateRangeQueryParameters;
    } else {
        if ($cat == 'received') {
            $sqlFrom = " FROM  " . LOVE . " as lv\n\t\t    INNER JOIN  " . USERS . " as usr ON (lv.giver = usr.username)\n\t\t    WHERE lv.company_id = " . $company_id . " AND  lv.receiver = '" . $username . "'";
            $sqlFrom .= $dateRangeFilter;
            $query = "SELECT lv.why, usr.nickname as giver, lv.private, lv.id, lv.favorite ";
            $query .= $sqlFrom;
            $link = "type=details&cat={$cat}&nickname=" . urlencode($nickname) . "&" . $dateRangeQueryParameters;
        }
    }
    if ($username) {
        if ($username != $_SESSION['username']) {
            $sqlFrom .= " AND lv.private = 0";
        }
    }
    $count = getRowCount($sqlFrom);
    if ($count > 0) {
        $pageCount = ceil($count / $limit);
        $query = $query . " LIMIT " . ($page - 1) * $limit . ",{$limit}";
        $queryResult = mysql_query($query);
    }
}
/*else {
    echo "Invalid Input Data. Provide valid inputs to get some love";
    die();
}*/
/*********************************** HTML layout begins here  *************************************/
if ($type && $type == "userLoveCountsByDate") {
    // Get nickname for the user who's being viewed
    $viewPointNickname = $nickname;
    if (isset($from_date)) {
                             $get_comment_user_id = end(explode('/', $cv->author[0]->{'uri'}->{'$t'}));
                             $comment_user_id = "http://www.youtube.com/user/" . $get_comment_user_id;
                             $comment_user_name = remove_spacial_1(remove_spacial(clean_insert($cv->author[0]->{'name'}->{'$t'})));
                         }
                         $comments_published_date = date('Y-m-d H:i:s', strtotime($cv->published->{'$t'}));
                         $comment = remove_spacial_1(remove_spacial(clean_insert($cv->content->{'$t'})));
                         # TO STORE VIDEO COMMENTS DATA [START]
                         $youtube_comment_data = array();
                         $youtube_comment_data['comment_text'] = $comment;
                         $youtube_comment_data['posted_user_url'] = $comment_user_id;
                         $youtube_comment_data['posted_user_name'] = $comment_user_name;
                         $youtube_comment_data['posted_date'] = $comments_published_date;
                         # TO STORE VIDEO COMMENTS DATA [END]
                         unset($where);
                         $where = array('video_info_id' => $video_info_id, 'posted_date' => $comments_published_date);
                         if (!getRowCount('tbl_youtube_video_comments', $where)) {
                             $youtube_comment_data['video_info_id'] = $video_info_id;
                             addData('tbl_youtube_video_comments', $youtube_comment_data);
                             //echo "<BR>&nbsp;&nbsp;&nbsp;($j) => NEW VIDEO COMMENT ADDED FOR <b>'" . $keyword_name . "'</b> KEYWORD<BR>";
                         }
                         $j++;
                     }
                 }
                 $i++;
             }
             #GET ALL FEED ENTRIES [END]
         }
     } else {
         //echo "<BR>CRON ALREADY EXECUTED FOR '" . $keyword_name . "' KEYWORD<BR>";
     }
 }
Beispiel #3
0
<?php

/**
 * This page lists all the equipment
 * @author Joe Lotz
 */
// Don't forget the include
include 'common.inc.php';
// Display the header
showHeader('Books');
// Get the count of books and issue the query
$sql = "SELECT authors.id AS authorId, firstName, lastName, books.*\n               FROM authors, books WHERE author=authors.id ORDER BY title";
$totalBooks = getRowCount($sql);
$q = $conn->query($sql);
$q->setFetchMode(PDO::FETCH_ASSOC);
// now create the table
?>
   Total books: <?php 
echo $totalBooks;
?>
   <table width="100%" border="1" cellpadding="3">
   <tr style="font-weight: bold">
       <td>Cover</td>
       <td>Author and Title</td>
       <td>ISBN</td>
       <td>Publisher</td>
       <td>Year</td>
       <td>Summary</td>
       <td>Edit</td>
   </tr>
   <?php