Beispiel #1
0
function date_time_fomat($date)
{
    $row = explode(" ", $date);
    $row_time = $row['1'];
    $row_date = date_fomat($row['0']);
    echo $row_time . ' - ' . $row_date;
}
Beispiel #2
0
 function lists($select = '*', $where = '', $ordering = '', $limit = '', $other = '')
 {
     $select = str_replace(',', ',b.', $select);
     if ($ordering == '') {
         $ordering = 'b.' . $this->key . ' DESC';
     }
     if ($other != '') {
         $select = $select . ',cat.category_id as cat_id, cat.name as cat_name, cat.s_intro as sintro';
         $other = "LEFT JOIN 8x_blog_category as cat ON cat.category_id = b.category_id";
     }
     $result = $this->db->lists($this->table . ' AS b', 'b.' . $select, $where, $ordering, $limit, $other);
     $i = 0;
     while ($row = $this->db->fetch_assoc($result)) {
         $list[$i]->blog_id = $row[$this->key];
         $list[$i]->title = $row['title'];
         $list[$i]->keyword = $row['keyword'];
         $list[$i]->meta = $row['meta'];
         $list[$i]->cat_name = $row['cat_name'];
         $list[$i]->cat_id = $row['cat_id'];
         $list[$i]->body = $row['body'];
         $list[$i]->publishdate = date_fomat($row['publishdate']);
         $list[$i]->status = $row['status'];
         $list[$i]->desc = $row['description'];
         $list[$i]->alias = $row['alias'];
         $list[$i]->s_intro = $row['sintro'];
         $i++;
     }
     $this->db->free_result($result);
     return $list;
 }
 function lists($select = '*', $where = '', $ordering = '', $limit = '', $other = '')
 {
     $select = str_replace(',', ',c.', $select);
     if ($ordering == '') {
         $ordering = 'c.' . $this->key . ' DESC';
     }
     if ($other != '') {
         $select = $select . ',b.blog_id as blog_id, b.title';
         $other = "LEFT JOIN 8x_blogs as b ON b.blog_id = c.blog_id";
     }
     $result = $this->db->lists($this->table . ' as c', 'c.' . $select, $where, $ordering, $limit, $other);
     $i = 0;
     while ($row = $this->db->fetch_assoc($result)) {
         $list[$i]->comment_id = $row[$this->key];
         $list[$i]->name = $row['name'];
         $list[$i]->email = $row['email'];
         $list[$i]->blog_id = $row['blog_id'];
         $list[$i]->title = $row['title'];
         $list[$i]->comments = $row['comments'];
         $list[$i]->url = $row['url'];
         $list[$i]->commentdate = date_fomat($row['commentdate']);
         $list[$i]->status = $row['status'];
         $i++;
     }
     $this->db->free_result($result);
     return $list;
 }
Beispiel #4
0
 function lists($select = '*', $where = '', $ordering = '', $limit = '', $other = '')
 {
     if ($where != '') {
         $where = ' && ' . $where;
     }
     $where = 'n.lang = ' . $_SESSION['lang'] . $where;
     $select = str_replace(',', ',n.', $select);
     if ($ordering == '') {
         $ordering = 'n.' . $this->key . ' DESC';
     }
     if ($other != '') {
         $cha = new channel_news();
         $cat = new category_news();
         $select = $select . ',cha.cha_id,cha.name as cha_name,cat.cat_id,cat.name as cat_name';
         $other = "LEFT JOIN " . $cha->table . " as cha ON cha.cha_id = n.cha_id\n\t\t\t\t\tLEFT JOIN " . $cat->table . " as cat ON cat.cat_id = n.cat_id";
     }
     $result = $this->db->lists($this->table . ' AS n', 'n.' . $select, $where, $ordering, $limit, $other);
     $i = 0;
     while ($row = $this->db->fetch_assoc($result)) {
         $list[$i]->news_id = $row['news_id'];
         $list[$i]->cha_name = $row['cha_name'];
         $list[$i]->cat_name = $row['cat_name'];
         $list[$i]->alias = $row['alias'];
         $list[$i]->name = $row['name'];
         $list[$i]->special = $row['special'];
         $list[$i]->description = $row['description'];
         $list[$i]->detail = $row['detail'];
         $list[$i]->hit = $row['hit'];
         $list[$i]->date_up = date_fomat($row['date_up']);
         $list[$i]->image = $row['image'];
         $list[$i]->ordering = $row['ordering'];
         $list[$i]->cards_list = $row['cards_list'];
         $list[$i]->card_slogan = $row['card_slogan'];
         $i++;
     }
     $this->db->free_result($result);
     return $list;
 }
Beispiel #5
0
 function lists($select, $where = '', $limit)
 {
     /*	if ($where != ''){
     			$where = ' && '.$where;
     		}
     		$where = 'lang = '.$_SESSION['lang'].$where;*/
     $result = $this->db->lists($this->table, '', $where, 'ordering', $limit);
     $i = 0;
     while ($row = $this->db->fetch_assoc($result)) {
         $list[$i]->faq_id = $row[$this->key];
         $list[$i]->name = $row['name'];
         $list[$i]->email = $row['email'];
         $list[$i]->subject = $row['subject'];
         $list[$i]->question = $row['question'];
         $list[$i]->answer = $row['answer'];
         $list[$i]->status = $row['status'];
         $list[$i]->date = date_fomat($row['date']);
         $list[$i]->ordering = intval($row['ordering']);
         $i++;
     }
     $this->db->free_result($result);
     return $list;
 }