Ejemplo n.º 1
0
function print_basic_info($userID, $db)
{
    // echo "<br>" .$query. "<br>";
    $query = 'select * from users_account ' . "where userID=" . $userID;
    // echo "<br>" .$query. "<br>";
    $result = $db->query($query);
    $row = $result->fetch_assoc();
    echo $row['name'] . '<br/>' . $row['email'] . '<br/>' . $row['birthdate'] . '<br/>' . 'Age:' . cal_age($row['birthdate']) . '<br/>' . $row['gender'] . '<br/>' . $row['city'] . '<br/>' . $row['height'] . '<br/>' . $row['education'] . '<br/>';
    if ($row['profilePhoto'] != Null) {
        echo '<img src=users_profile_photo/' . $row['profilePhoto'] . ' height="100">';
    } else {
        echo '<img src=users_profile_photo/default_' . $row['gender'] . '.jpg>';
    }
}
Ejemplo n.º 2
0
    ?>
">
								<div class="user-profile-avatar">
									<img src="<?php 
    echo $this->user_m->getProfileAvatar($item->id_user);
    ?>
" />
								</div>
								<div class="user-profile-username">
									<?php 
    echo $this->user_m->getProfileDisplayName($item->id_user);
    ?>
								</div>
								<div class="user-profile-agesex">
									<strong>Age/Sex:</strong> <?php 
    echo cal_age($item->dob);
    ?>
, <?php 
    echo $item->gender;
    ?>
								</div>
								<div class="user-profile-location">
									<strong>Location:</strong>
									<?php 
    if ($item->state) {
        echo $item->state . ', ';
    }
    if ($item->country) {
        echo $item->country;
    }
    ?>
Ejemplo n.º 3
0
			<img src="<?php 
echo $this->user_m->getProfileAvatar($userdataobj->id_user);
?>
" /> 
		</a>
		<br/>
		<?php 
echo $this->user_m->buildNativeLink($userdataobj->username);
?>
  	
		
		
	</div>
	<div class="right">
		<b>Age/Sex:</b> <?php 
echo cal_age($userdataobj->dob);
?>
/ <?php 
echo $userdataobj->gender;
?>
		
	</div>
	
	<div class="right" style="margin-left:10px;">
		<div style="width: 270px;">
			<div style="float:left;">
				<!--<fb:like href="<?php 
//echo site_url();
?>
" layout="button_count"
				show_faces="false" width="20" action="like" font="arial" colorscheme="light"></fb:like>
Ejemplo n.º 4
0
     echo "ช";
 } else {
     if ($person["GENDER_ID"] == 2) {
         echo "ญ";
     }
 }
 ?>
                     </div>
                     <div class="col-xs-2">
                         <?php 
 echo display_birthday($person['BIRTHDAY']);
 ?>
                     </div>
                     <div class="col-xs-1">
                         <?php 
 echo cal_age($person['BIRTHDAY']);
 ?>
                     </div>
                     <div class="col-xs-2">
                         <?php 
 if ($person["MARITALSTATUS_ID"] == 1) {
     echo "โสด";
 } else {
     if ($person["MARITALSTATUS_ID"] == 2) {
         echo "แต่งานแล้ว";
     } else {
         if ($person["MARITALSTATUS_ID"] == 3) {
             echo "หย่าร้าง";
         }
     }
 }
Ejemplo n.º 5
0
								<b>Location: </b> 
								<?php 
if ($this->friend_m->isMyFriend($userdataobj->id_user) and notMe($userdataobj->id_user)) {
    echo $userdataobj->city . ', ' . $userdataobj->state . ', ' . $userdataobj->country;
} else {
    echo $userdataobj->country;
}
?>
								
								<div class="clear"></div> <br/>
								
								<?php 
if ($this->friend_m->isMyFriend($userdataobj->id_user) and notMe($userdataobj->id_user)) {
    echo '<b>Birthday:</b> ' . birthDay($userdataobj->dob);
} else {
    echo '<b>Age:</b> ' . cal_age($userdataobj->dob);
}
?>
								
								<div class="clear"></div> <br/>
								
								<?php 
echo '<b>Sex:</b> ' . $userdataobj->gender;
?>
								
								<div class="clear"></div> <br/>
								
								<?php 
if ($userfavoritedata and $userfavoritedata->interested_in) {
    echo '<b>Interested in: </b>' . $userfavoritedata->interested_in;
    echo '<div class="clear"></div> <br/>';
Ejemplo n.º 6
0
    echo '<a href="browse_profile.php?customerID='.$row['userID'].'">';
    echo '<div id = "users">';
    echo '<img src="users_profile_photo/'.
         ($row['profilePhoto']!=Null?$row['profilePhoto']:'default_'.$row['gender'].'.jpg').'" height="80">';
    echo  $row['name'].'<br/>'.
          $row['city'].'<br/>'.
          $row['height'].'<br/>'.
          $row['education'].'<br/>';
    echo "</div></a>";
    */
    echo '
           <div class="left findlover_box">
             <a onclick="return checkLogin(isLogin);" href="profile.php?customerID=' . $row['userID'] . '"><div class="image_container_100" style="background-image: url(users_profile_photo/' . ($row['profilePhoto'] != Null ? $row['profilePhoto'] : 'default_' . $row['gender'] . '.jpg') . ');"></div></a>
             <div class="left profile_summary">
               <label class="left" id="profile_name">' . $row['name'] . '</label>
               <div class="clear_left">' . cal_age($row['birthdate']) . ', ' . $row['city'] . ', ' . $row['height'] . 'cm, ' . $row['education'] . '</div>';
    // <div class="bottom">
    //   <button>Like</button>
    //   <button>View</button>
    // </div>
    echo '</div>
           </div>
           ';
}
?>
      </div>
    </div>
  </div>


<!--  original php code for search and login
Ejemplo n.º 7
0
 function sendemail()
 {
     $sender_name = $this->input->post('sender_name');
     $sender_email = $this->input->post('sender_email');
     $to_users = $this->input->post('to_users');
     $countries = isset($_POST['countries']) ? $_POST['countries'] : null;
     $age_from = $this->input->post('age_from');
     $age_to = $this->input->post('age_to');
     $gender = $this->input->post('gender');
     $subject = $this->input->post('subject');
     $body = $this->input->post('body');
     $date_from = $this->input->post('date_from');
     $date_to = $this->input->post('date_to');
     $last_login_from = $this->input->post('last_login_from');
     $last_login_to = $this->input->post('last_login_to');
     $action = $this->input->post('action');
     $query = "SELECT * FROM " . TBL_USER . " WHERE floor(datediff(now(),dob)/365.25) >= {$age_from} AND floor(datediff(now(),dob)/365.25) <= {$age_to} AND status=0 ";
     $cond = '';
     if (strtolower($gender) != 'both') {
         $cond .= " AND gender LIKE '{$gender}' ";
     }
     if ($date_from and $date_to) {
         $cond .= " AND ( add_date < '{$date_to}' AND add_date > '{$date_from}') ";
     }
     if ($last_login_from and $last_login_to) {
         $cond .= " AND ( last_login > '{$last_login_from}' AND last_login < '{$last_login_to}' ) ";
     }
     $listUser = $this->getListUsername();
     $userArr = explode(',', $to_users);
     array_walk_recursive($userArr, 'trim_all');
     $arrayusername = array();
     foreach ($userArr as $username) {
         if ($username) {
             $arrayusername[] = "'" . mysql_real_escape_string($username) . "'";
         }
     }
     if (!empty($arrayusername)) {
         $cond .= " AND username IN(" . implode(',', $arrayusername) . ") ";
     }
     if (!empty($countries)) {
         $cond .= " AND id_country IN(" . implode(',', $countries) . ") ";
     }
     $query .= $cond;
     $rs = $this->db->query($query)->result();
     $from_email = "{$sender_name} <{$sender_email}>";
     $iS = 0;
     if ($action == 'Send') {
         $array = array();
         foreach ($rs as $item) {
             $arrayMaker = array('{$firstname}', '{$lastname}', '{$username}', '{$country}', '{$age}', '{$invite_url}');
             $arrayReplace = array($item->first_name, $item->last_name, $item->username, $item->country, cal_age($item->dob), "<a href='" . $this->user_io_m->getInviteUrl($item->username) . "'>" . $this->user_io_m->getInviteUrl($item->username) . "</a>");
             $subject_replace = str_replace($arrayMaker, $arrayReplace, $subject);
             $body_replace = str_replace($arrayMaker, $arrayReplace, $body);
             //debug($body);
             //if( $this->phpmail($from_email,$item->email,$subject,$body) ){
             //	$iS ++;
             //}
             $array[] = array('to_email' => $item->email, 'to_subject' => $subject_replace, 'body' => $body_replace);
         }
         if (SENDMAIL != 0) {
             $this->email_sender->sendSMTPMultiEmail($sender_email, $sender_name, $array);
             $iS = count($array);
             $this->session->set_flashdata('success', "Sent email to {$iS} users");
         } else {
             $this->session->set_flashdata('error', 'Email send status is disable');
         }
         redirect("admin/juzon/broadcast");
         exit;
     }
     if ($action == 'Preview') {
         $_SESSION['var_store'] = array('sender_name' => $sender_name, 'sender_email' => $sender_email, 'to_users' => $to_users, 'countries' => $countries, 'age_from' => $age_from, 'age_to' => $age_to, 'gender' => $gender, 'subject' => htmlentities($subject), 'body' => $body, 'date_from' => $date_from, 'date_to' => $date_to, 'last_login_from' => $last_login_from, 'last_login_to' => $last_login_to);
         $html = "Sender Name: {$from_email} <br/>";
         $html .= "Subject:" . htmlentities($subject) . " <br/>";
         $html .= "Body:" . html_entity_decode($body) . "<br/>";
         $html .= "To Users: <br/>";
         $html .= "<table><tr><td>Username</td><td>Join date</td><td>Email</td></tr>";
         foreach ($rs as $item) {
             $html .= "<tr><td>{$item->username}</td><td>{$item->add_date}</td><td>{$item->email}</td></tr>";
         }
         $html .= "</table>";
         $_SESSION['previewBROADCAST'] = $html;
         redirect("admin/juzon/broadcast");
         //echo $html;
         exit;
     }
 }
Ejemplo n.º 8
0
    <div class="sub_container right" id="message_container">
    	<?php 
$query = 'select * from (select * from users_account right join(select receiverID, time from
    	          (SELECT receiverID, time FROM `users_message` WHERE senderID=' . $_SESSION['valid_userID'] . '
    	          UNION
    	          SELECT senderID, time  FROM `users_message` WHERE receiverID=' . $_SESSION['valid_userID'] . ') 
    	          as X order by time DESC)as Y on userID=receiverID order by time DESC) as Z group by userID order by time DESC';
$Contacters = $db->query($query);
$isfirst = true;
while ($row1 = $Contacters->fetch_assoc()) {
    $contact = get_basic_info($row1['receiverID'], $db);
    echo "\t\t  <div class=\"section_container\" id=" . $contact["userID"] . ">\n";
    echo "            <a href=\"profile.php?customerID=" . $contact['userID'] . "\"><div class=\"image_container_100\" style=\"background-image: url(users_profile_photo/" . ($contact['profilePhoto'] != Null ? $contact['profilePhoto'] : 'default_' . $row['gender'] . '.jpg') . ");\"></div></a>";
    echo "            <div class=\"profile_summary\">\n";
    echo "              <label id=\"profile_name\">" . $contact["name"] . "</label>\n";
    echo "              <div id=\"profile_brief\">" . cal_age($contact['birthdate']) . ", " . $contact['city'] . ", " . $contact['height'] . "cm, " . $contact['education'] . "</div>\n";
    echo "            </div>\n";
    // read button
    echo "            <button id=\"read\" onclick=\"showHide_inbox(" . $contact["userID"] . "); refreshMessage(" . $_SESSION['valid_userID'] . ", " . $contact['userID'] . ", 'message_area" . $contact['userID'] . "', 'textarea" . $contact['userID'] . "')\">Read Message</button>\n";
    echo "            <div class=\"hider clear\" id=\"hider" . $contact['userID'] . "\" style=\"display:none\">\n";
    echo "                <div class=\"message_area\" id=\"message_area" . $contact['userID'] . "\">\n";
    echo "                </div>\n";
    echo "                <div class=\"left clear\" id=\"reply_box\">\n";
    echo "                    <textarea placeholder=\"Reply message here...\" class=\"left\" id=\"textarea" . $contact['userID'] . "\" value=''></textarea>\n";
    echo "                    <button class=\"right\" onclick=\"refreshMessage(" . $_SESSION['valid_userID'] . ", " . $contact['userID'] . ", 'message_area" . $contact['userID'] . "', 'textarea" . $contact['userID'] . "')\">Send</button>\n";
    echo "                </div>\n";
    echo "            </div>\n";
    echo "        </div>\n";
    //echo $_SERVER['HTTP_REFERER'];
    if ($isfirst && strpos($_SERVER['HTTP_REFERER'], "customerID")) {
        $isfirst = false;
<?php

defined('BASEPATH') or exit('No direct script access allowed');
?>

<?php 
$mydataobj = getAccountUserDataObject();
$userdataobj = $this->user_io_m->init('id_user', $this->input->get('id_user', 0));
$data[0]['html'] = "<b>" . $userdataobj->username . "</b><br/>";
$data[0]['html'] .= "<b>" . cal_age($userdataobj->dob) . ', ' . $userdataobj->gender . "</b><br/>";
$data[0]['html'] .= "<div class='filter-split'><a class=\"button\" onclick=\"jqcc.cometchat.chatWith('{$userdataobj->id_user}');\" href=\"javascript:void(0);\">Chat</a></div>";
/*
if($userdataobj->address){
	$data[0]['html'] .= mysql_real_escape_string( $userdataobj->address );
}
if($userdataobj->city){
	$data[0]['html'] .= mysql_real_escape_string( $userdataobj->city ).'<br/>';
}
if($userdataobj->state){
	$data[0]['html'] .= mysql_real_escape_string( $userdataobj->state ).'<br/>';
}
if($userdataobj->country){
	$data[0]['html'] .= mysql_real_escape_string( $userdataobj->country ).'<br/>';
}
*/
$data[0]['icon']['image'] = $this->user_m->getCommentAvatar($userdataobj->id_user);
$data[0]['icon']['iconsize'] = array(40, 40);
$data[0]['icon']['iconanchor'] = array(12, 46);
$data[0]['icon']['infowindowanchor'] = array(12, 0);
$data[0]['longitude'] = $userdataobj->longitude;
$data[0]['latitude'] = $userdataobj->latitude;