Пример #1
0
 function ajax_load_more_messages($to_id, $offset)
 {
     $from_id = getUser()->id;
     $this->db->limit(10, $offset);
     $this->db->select('m.*, u.name');
     $this->db->from('messages m');
     $this->db->join('user u', 'm.from_id = u.id');
     $this->db->where('(m.from_id=' . $from_id . ' AND m.to_id=' . $to_id . ') OR (m.from_id=' . $to_id . ' AND m.to_id=' . $from_id . ')');
     $this->db->order_by('m.time DESC');
     $result = $this->db->get();
     $html = '';
     if ($result->num_rows()) {
         foreach ($result->result() as $message) {
             if (!$message->attach_dating) {
                 if ($message->from_id == getUser()->id) {
                     $class = 'dark';
                 } else {
                     $class = 'light';
                 }
                 $html .= '
                 <div class="comItem ' . $class . ' clearfix">
                     <div class="f-l" style="width:100px;">
                         <p>' . $message->name . '</p>
                         <span>' . get_time_difference_php($message->time) . '</span> </div>
                     <div class="f-r w380">
                         <p>' . $message->message . '</p>
                     </div>
                 </div>
                 ';
             } else {
             }
         }
     }
     return $html;
 }
Пример #2
0
 function ajax_save_message()
 {
     $message = $this->input->post('message');
     $from_id = $this->input->post('from_id');
     $to_id = $this->input->post('to_id');
     $attach_dating = $this->input->post('attach_dating');
     $time = $this->profiles_model->save_message($message, $from_id, $to_id, $attach_dating);
     $from_user = $this->profiles_model->load_name_from_id($from_id);
     $html = '<div class="comItem dark clearfix">
                 <div class="f-l" style="width:100px;">
                     <p>' . $from_user->name . '</p>
                     <span>' . get_time_difference_php($time) . '</span> </div>
                 <div class="f-r w380">
                     <p>' . $message . '</p>
                 </div>
             </div>';
     echo $html;
     exit;
 }
Пример #3
0
        } else {
            if ($activity->type == 2) {
                echo 'har tilføjet <strong>' . $activity->data . '</strong> billeder';
            } else {
                if ($activity->type == 3) {
                    echo 'har købt: <strong>' . $activity->data . '</strong>';
                } else {
                }
            }
        }
        ?>
                            </p>
                        </div>
                        <div class="f-r w100 text-r">
                            <p><?php 
        echo get_time_difference_php($activity->time);
        ?>
</p>
                        </div>
                    </div>
                    <?php 
    }
    ?>
                    
                </div>
                <div class="bntSeemore m-t10"><a href="javascript:void(0);"><img alt="Se mere" style="vertical-align: inherit;" src="<?php 
    echo base_url();
    ?>
/assets/frontend/img/seemore.png" /></a></div>
                <input type="hidden" id="offset" value="<?php 
    echo 3;
require 'profunc/decryptruleandcord.php';
?>
<h1><?php 
echo $row['name'];
?>
</h1>
<h3><?php 
echo $row['domain'];
?>
</h3>
<small><?php 
echo "created at:" . get_time_difference_php($row['create_time']);
?>
</small>
<small><?php 
echo "updated at" . get_time_difference_php($row['update_time']);
?>
</small>
 <p>
 	<h3>Introduction</h3>
 	<?php 
echo $row['introduction'];
?>

 </p>
 <p>
 	<h3>Rules</h3>

 	<?php 
for ($i = 0; $i < $round; $i++) {
    ?>
Пример #5
0
        ?>
                    <div class="comItem <?php 
        if ($message->from_id == getUser()->id) {
            echo 'dark';
        } else {
            echo 'light';
        }
        ?>
 clearfix">
                        <div class="f-l" style="width:180px;">
                            <p><?php 
        echo $message->name;
        ?>
</p>
                            <span><?php 
        echo get_time_difference_php($message->time);
        ?>
</span> </div>
                        <div class="f-r" style="width: 300px;">
                            <p><?php 
        echo $message->message;
        ?>
</p>
                        </div>
                    </div>
                    <?php 
    } else {
    }
    $i++;
}
?>
Пример #6
0
 function ajax_load_more_activity($offset)
 {
     $i = 0;
     $actArr = array();
     while ($i < 3) {
         $this->db->limit(1, $offset);
         $this->db->select('id, user_id');
         $this->db->from('activity');
         $this->db->order_by('time DESC');
         $result = $this->db->get();
         $act = $result->row();
         if (!$act) {
             break;
         }
         $isOK = check_friend($act->user_id);
         if ($isOK) {
             array_push($actArr, $act->id);
             $i++;
         }
         $offset++;
     }
     if (!$actArr) {
         return false;
     }
     $this->db->select('*');
     $this->db->from('activity a');
     $this->db->join('user u', 'a.user_id=u.id ');
     $this->db->where_in('a.id', $actArr);
     $this->db->order_by('a.time DESC');
     $result = $this->db->get();
     $html = '';
     foreach ($result->result() as $activity) {
         $profile_link = base_url() . index_page() . 'profiles/detail/' . $activity->id . '/' . $activity->name . '.html';
         $html .= '<div class="commentItem"><div class="f-l w420"><a href="' . $profile_link . '">';
         if ($activity->avatar) {
             $html .= '<img alt="" src="' . base_url() . 'thumbnail/timthumb.php?src=' . base_url() . get_config_value('upload_avatar_path') . $activity->avatar . '&q=100&w=29&h=29" />';
         } else {
             $html .= '<img alt="" src="' . base_url() . 'thumbnail/timthumb.php?src=' . base_url() . get_config_value('upload_avatar_path') . 'noavatar' . $activity->gender . '.jpg&q=100&w=29&h=29" />';
         }
         $html .= '</a><p><span class="userName"><a href="' . $profile_link . '">' . $activity->name . '</a></span>';
         if ($activity->type == 1) {
             $html .= ' har postet <strong>' . $activity->data . '</strong>';
         } else {
             if ($activity->type == 2) {
                 $html .= ' har tilføjet <strong>' . $activity->data . '</strong> billeder';
             } else {
             }
         }
         $html .= '</p></div><div class="f-r w100 text-r"><p>' . get_time_difference_php($activity->time) . '</p></div></div>';
     }
     return $html;
 }
Пример #7
0
        ?>
" class="f-l"><?php 
        echo $user->name;
        ?>
</a></span> <span id="online_<?php 
        echo $user->id;
        ?>
"></span><?php 
        if ($user->not_seen) {
            echo '(<b style="color:red;">' . $user->not_seen . '</b>)';
        }
        ?>
</p>
                                        <div class="clear"></div>
                                        <p><?php 
        echo get_time_difference_php($user->message_time);
        ?>
</p>
                                    </div>
                                    <a href="<?php 
        echo $message_link;
        ?>
" class="message-more"><?php 
        echo $user->message;
        ?>
</a>
                                    <a style="background: #640c0c; display: inline; padding: 5px 15px; position: absolute; top: 2px; right: 5px;" href="<?php 
        echo base_url() . index_page() . 'profiles/deletemessage/' . $this->session->userdata('userid') . '/' . $user->id . '/' . $user->name . '.html';
        ?>
">Slet</a>
                                </div>
Пример #8
0
    foreach ($jsonDecode as $row) {
        if ($counters > 5) {
            break;
        }
        ?>
  <tr style="padding: 15px;">
    <td style="padding: 15px;">&nbsp;&nbsp;<?php 
        echo $row['name'];
        ?>
</td>
    <td style="padding: 15px;">&nbsp;&nbsp;<?php 
        echo get_time_difference_php($row['create_time']);
        ?>
</td>
    <td style="padding: 15px;">&nbsp;&nbsp;<?php 
        echo get_time_difference_php($row['update_time']);
        ?>
</td>
    <td style="padding: 15px;">&nbsp;&nbsp;<a href="viewaction_asjson.php?<?php 
        echo "eventid=" . $row['event_id'];
        ?>
 ">View</a></td>    
    <td style="padding: 15px;">&nbsp;&nbsp;<a href="editaction.php?<?php 
        echo "eventid=" . $row['event_id'];
        ?>
 ">Edit</a></td>
  </tr>
  	<?php 
        $counters++;
    }
}
Пример #9
0
            }
        } else {
            $avatar2 = 'noavatar' . $blogs[$i + 1]->gender . '.jpg';
        }
        ?>
            <div>
                <h3 class="clearfix">
                    <div class="name"><?php 
        echo $blogs[$i + 1]->name;
        ?>
<span style="margin-left: 3px;" id="online_blog_<?php 
        echo $i + 1 . '_' . $blogs[$i + 1]->user_id;
        ?>
"></span></div>
                    <div class="clock"><?php 
        echo get_time_difference_php($blogs[$i + 1]->time);
        ?>
</div>
                </h3>
                <div class="icon">
                    <a class="normalTip" <?php 
        if ($blogs[$i + 1]->own) {
            ?>
title="<?php 
            echo $own[$blogs[$i + 1]->own];
            ?>
"<?php 
        }
        ?>
><img src="<?php 
        echo base_url();