public function findUsers($groupId, $count, $withPhoto = true) { $userTable = BOL_UserDao::getInstance()->getTableName(); $avatarJoin = !$withPhoto ? '' : "INNER JOIN `" . BOL_AvatarDao::getInstance()->getTableName() . "` as `a`\n \t\t\tON( `u`.`id` = `a`.`userId` )"; $query = "\n SELECT `u`.* FROM `{$userTable}` AS `u`\n\n INNER JOIN `" . GROUPS_BOL_GroupUserDao::getInstance()->getTableName() . "` AS `g`\n ON( `u`.`id` = `g`.`userId` )\n\n LEFT JOIN `" . BOL_UserSuspendDao::getInstance()->getTableName() . "` as `s`\n ON( `u`.`id` = `s`.`userId` )\n\n LEFT JOIN `" . BOL_UserApproveDao::getInstance()->getTableName() . "` as `d`\n ON( `u`.`id` = `d`.`userId` )\n\n {$avatarJoin}\n\n WHERE g.groupId=:g AND `s`.`id` IS NULL AND `d`.`id` IS NULL\n ORDER BY `u`.`activityStamp` DESC\n LIMIT :ls, :le"; return OW::getDbo()->queryForObjectList($query, BOL_UserDao::getInstance()->getDtoClassName(), array('ls' => 0, 'le' => $count, 'g' => $groupId)); }
public function findUsers($kw, $limit = null) { $questionName = OW::getConfig()->getValue('base', 'display_name_question'); $questionDataTable = BOL_QuestionDataDao::getInstance()->getTableName(); $limitStr = $limit === null ? '' : 'LIMIT 0, ' . intval($limit); $query = 'SELECT DISTINCT qd.userId FROM ' . $questionDataTable . ' qd LEFT JOIN `' . BOL_UserSuspendDao::getInstance()->getTableName() . '` AS `us` ON ( `qd`.`userId` = `us`.`userId` ) WHERE `us`.`userId` IS NULL AND questionName=:name AND textValue LIKE :kw ' . $limitStr; return OW::getDbo()->queryForColumnList($query, array('kw' => '%' . $kw . '%', 'name' => $questionName)); }
public function findUsers($kw, $userId, $limit = null) { if (!OW::getPluginManager()->isPluginActive('friends')) { return array(); } $friendsTable = FRIENDS_BOL_FriendshipDao::getInstance()->getTableName(); $questionName = OW::getConfig()->getValue('base', 'display_name_question'); $questionDataTable = BOL_QuestionDataDao::getInstance()->getTableName(); $limitStr = $limit === null ? '' : 'LIMIT 0, ' . intval($limit); $query = "SELECT `fr`.`userId` FROM `" . $friendsTable . "` AS `fr`\n INNER JOIN " . $questionDataTable . " qd ON fr.userId = qd.userId\n LEFT JOIN `" . BOL_UserSuspendDao::getInstance()->getTableName() . "` AS `us` ON ( `fr`.`friendId` = `us`.`userId` )\n WHERE `fr`.`status` = :status AND `us`.`userId` IS NULL AND `fr`.`friendId` = :userId\n AND qd.questionName=:name AND qd.textValue LIKE :kw\n UNION\n SELECT `fr`.`friendId` AS `userId` FROM `" . $friendsTable . "` AS `fr`\n INNER JOIN " . $questionDataTable . " qd ON fr.friendId = qd.userId\n LEFT JOIN `" . BOL_UserSuspendDao::getInstance()->getTableName() . "` AS `us` ON ( `fr`.`friendId` = `us`.`userId` )\n WHERE `fr`.`status` = :status AND `us`.`userId` IS NULL AND `fr`.`userId` = :userId\n AND qd.questionName=:name AND qd.textValue LIKE :kw\n {$limitStr}\n "; return OW::getDbo()->queryForColumnList($query, array('userId' => $userId, 'status' => FRIENDS_BOL_FriendshipDao::VAL_STATUS_ACTIVE, 'kw' => '%' . $kw . '%', 'name' => $questionName)); }
/** * Constructor. */ private function __construct() { $this->userDao = BOL_UserDao::getInstance(); $this->loginCookieDao = BOL_LoginCookieDao::getInstance(); $this->userFeaturedDao = BOL_UserFeaturedDao::getInstance(); $this->userOnlineDao = BOL_UserOnlineDao::getInstance(); $this->userSuspendDao = BOL_UserSuspendDao::getInstance(); $this->userApproveDao = BOL_UserApproveDao::getInstance(); $this->restrictedUsernamesDao = BOL_RestrictedUsernamesDao::getInstance(); $this->inviteCodeDao = BOL_InviteCodeDao::getInstance(); $this->approveDao = BOL_UserApproveDao::getInstance(); $this->resetPasswordDao = BOL_UserResetPasswordDao::getInstance(); $this->userBlockDao = BOL_UserBlockDao::getInstance(); $this->tokenDao = BOL_AuthTokenDao::getInstance(); }
public function countSuspended() { $query = "SELECT COUNT(*)\n FROM `{$this->getTableName()}` as `u`\n LEFT JOIN `" . BOL_UserSuspendDao::getInstance()->getTableName() . "` as `s`\n ON( `u`.`id` = `s`.`userId` )\n WHERE `s`.`id` IS NOT NULL\n "; return $this->dbo->queryForColumn($query); }
public function getNewUsersThisMonth($first, $count) { $query = "SELECT `u`.* FROM `" . BOL_UserDao::getInstance()->getTableName() . "` as `u`\n\t \tLEFT JOIN `" . BOL_UserSuspendDao::getInstance()->getTableName() . "` as `s`\n\t \t\tON( `u`.`id` = `s`.`userId` )\n LEFT JOIN `" . BOL_UserApproveDao::getInstance()->getTableName() . "` as `d`\n ON( `u`.`id` = `d`.`userId` )\n\t \tWHERE `s`.`id` IS NULL AND `d`.`id` IS NULL\n\t \tAND `u`.`joinStamp` >= :ts\n\t \tORDER BY `u`.`joinStamp` DESC\n\t \tLIMIT :first, :count"; return OW::getDbo()->queryForObjectList($query, BOL_UserDao::getInstance()->getDtoClassName(), array('ts' => time() - 30 * 24 * 3600, 'first' => $first, 'count' => $count)); }
public function findFriendshipListByUserId($userId, $userIdList = array()) { $query = "( SELECT `fr`.`id`, `fr`.`userId`, `fr`.`friendId`, `fr`.`status` FROM `" . $this->getTableName() . "` AS `fr`\r\n LEFT JOIN `" . BOL_UserSuspendDao::getInstance()->getTableName() . "` AS `us` ON ( `fr`.`" . self::USER_ID . "` = `us`.`userId` )\r\n WHERE `fr`.`" . self::STATUS . "` = :status1 AND `us`.`userId` IS NULL AND `fr`.`" . self::FRIEND_ID . "` = :userId1\r\n " . (empty($userIdList) ? '' : " AND `fr`.`" . self::USER_ID . "` IN ( " . $this->dbo->mergeInClause($userIdList) . " )") . " )\r\n UNION\r\n ( SELECT `fr`.`id`, `fr`.`userId`, `fr`.`friendId`, `fr`.`status` FROM `" . $this->getTableName() . "` AS `fr`\r\n LEFT JOIN `" . BOL_UserSuspendDao::getInstance()->getTableName() . "` AS `us` ON ( `fr`.`" . self::FRIEND_ID . "` = `us`.`userId` )\r\n WHERE `fr`.`" . self::STATUS . "` = :status2 AND `us`.`userId` IS NULL AND `fr`.`" . self::USER_ID . "` = :userId2\r\n " . (empty($userIdList) ? '' : " AND `fr`.`" . self::FRIEND_ID . "` IN ( " . $this->dbo->mergeInClause($userIdList) . " )") . " ) "; return $this->dbo->queryForObjectList($query, $this->getDtoClassName(), array('userId1' => $userId, 'userId2' => $userId, 'status1' => self::VAL_STATUS_ACTIVE, 'status2' => self::VAL_STATUS_ACTIVE)); }
public function findUserListForInvite($eventId, $first, $count, $friendList = null) { $userDao = BOL_UserDao::getInstance(); $eventDao = EVENTX_BOL_EventDao::getInstance(); $eventUserDao = EVENTX_BOL_EventUserDao::getInstance(); $where = ""; if (isset($friendList) && empty($friendList)) { return array(); } else { if (!empty($friendList)) { $where = " AND `u`.id IN ( " . $this->dbo->mergeInClause($friendList) . " ) "; } } $query = "SELECT `u`.`id`\n \t\tFROM `{$userDao->getTableName()}` as `u`\n LEFT JOIN `" . $eventDao->getTableName() . "` as `e`\n \t\t\tON( `u`.`id` = `e`.`userId` AND e.id = :event )\n LEFT JOIN `" . $this->getTableName() . "` as `ei`\n \t\t\tON( `u`.`id` = `ei`.`userId` AND `ei`.eventId = :event )\n\n LEFT JOIN `" . $eventUserDao->getTableName() . "` as `eu`\n \t\t\tON( `u`.`id` = `eu`.`userId` AND `eu`.eventId = :event )\n\n \t\tLEFT JOIN `" . BOL_UserSuspendDao::getInstance()->getTableName() . "` as `s`\n \t\t\tON( `u`.`id` = `s`.`userId` )\n\n \t\tLEFT JOIN `" . BOL_UserApproveDao::getInstance()->getTableName() . "` as `d`\n \t\t\tON( `u`.`id` = `d`.`userId` )\n\n \t\tWHERE `e`.`id` IS NULL AND `ei`.`id` IS NULL AND `s`.`id` IS NULL AND `d`.`id` IS NULL AND `eu`.`id` IS NULL " . $where . "\n \t\tORDER BY `u`.`activityStamp` DESC\n \t\tLIMIT :first, :count "; return $this->dbo->queryForColumnList($query, array('event' => $eventId, 'first' => $first, 'count' => $count)); }
public function get_startpage($type = "full", $curent_member_profile = 0, $page = 1) { //return; //echo "dfdf";exit; $per_page = OW::getConfig()->getValue('startpage', 'show_startpage_maxitems'); if (!$per_page) { $per_page = 0; } $page = $page - 1; if ($page < 0) { $page = 0; } $start_page = $page * $per_page; $id_user = OW::getUser()->getId(); //citent login user (uwner) $is_admin = OW::getUser()->isAdmin(); $curent_url = OW_URL_HOME; $content = ""; if (!$curent_member_profile or $curent_member_profile == "") { $curent_member_profile = $id_user; } //echo "--".$curent_member_profile."======".BOL_UserService::getInstance()->getDisplayName(1);exit;$curent_member_profile //print_r($_SESSION); // if ($id_user>0){ if ($curent_member_profile > 0 and OW::getConfig()->getValue('startpage', 'show_profile_inwidget_startpage') == 1) { $dname = BOL_UserService::getInstance()->getDisplayName($curent_member_profile); $uurl = BOL_UserService::getInstance()->getUserUrl($curent_member_profile); $uimg = BOL_AvatarService::getInstance()->getAvatarUrl($curent_member_profile); $contentt = ""; if ($uimg) { $contentt .= "<a href=\"" . $uurl . "\">"; $contentt .= "<img src=\"" . $uimg . "\" alt=\"" . $dname . "\" title=\"" . $dname . "\" width=\"45px\" style=\"max-width: 100%;\" align=\"left\" >"; $contentt .= "</a>"; } else { // $tabt .="<i>".OW::getLanguage()->text('search', 'index_hasnotimage')."</i>"; $contentt .= "<a href=\"" . $uurl . "\" >"; $contentt .= "<img src=\"" . $curent_url . "ow_static/themes/" . OW::getConfig()->getValue('base', 'selectedTheme') . "/images/no-avatar.png\" title=\"" . $dname . "\" width=\"45px\" style=\"max-width: 100%;\" align=\"left\" >"; $contentt .= "</a>"; } $mystatus = $this->get_status($curent_member_profile); $content .= "<div class=\"ow_box ow_stdmargin clearfix index-BASE_CMP_MyAvatarWidget ow_break_word\" style=\"margin-top:-10px;\">\n <div class=\"ow_my_avatar_widget clearfix\" id=\"aron_my_avatar_widget\">\n <div class=\"ow_left ow_my_avatar_img\">\n <div class=\"ow_avatar\">\n " . $contentt . "\n </div>\n </div>\n <div class=\"ow_my_avatar_cont\" style=\"height:22px;text-align:left;\">\n <a href=\"" . $uurl . "\" class=\"ow_my_avatar_username\"><span style=\"\">" . $dname . "</span></a>\n\n </div>\n <div class=\"ow_small ow_remark ow_ipc_dateX ow_left\" style=\"margin-left:5px;max-height: 14px;overflow: hidden;white-space: nowrap;\">" . $this->get_decoded_status($mystatus) . "</div>\n </div>"; //----stat start //$mystatus=$this->get_status();//move up if ($curent_member_profile > 0 and $id_user > 0 and $curent_member_profile == $id_user) { $content .= "<div class=\"ow_center ow_remark clearfix\">"; $content .= "<div class=\"ow_box_toolbar_cont clearfix ow_left\">"; //$content .="<div class=\"ow_left\">".$this->get_decoded_status($mystatus)."</div>"; $content .= "<div class=\"ow_box_toolbar ow_remark\">\n <span style=\"\" class=\"ow_nowrap\">\n <a href=\"javascript:void(0);\" id=\"startpage_pop\" >" . OW::getLanguage()->text('startpage', 'change_self_status') . "</a>\n </span>\n </div>\n </div>\n </div>"; //$burl=STARTPAGE_BOL_Service::getInstance()->get_curent_url(); $burl = $this->get_curent_url(); $burl = base64_encode($burl); $content .= "<form id=\"startpage_overlay_form\" style=\"display:none\" method=\"POST\" action=\"" . $curent_url . "startpage/savestatus\">\n<input type=\"hidden\" name=\"ss\" value=\"" . substr(session_id(), 2, 3) . "\">\n<input type=\"hidden\" name=\"burl\" value=\"" . $burl . "\">\n<h2>" . OW::getLanguage()->text('startpage', 'change_self_status') . "</h2>\n<br/> \n<select name=\"fstatus\">"; //echo "---".$mystatus; if (!$mystatus or $mystatus == "startpage") { $sel = " SELECTED "; } else { $sel = ""; } $content .= "<option " . $sel . " value=\"startpage\">" . OW::getLanguage()->text('startpage', 'default_status_startpage') . "</option>"; if ($mystatus == "absent") { $sel = " SELECTED "; } else { $sel = ""; } $content .= "<option " . $sel . " value=\"absent\">" . OW::getLanguage()->text('startpage', 'status_startpage_absent') . "</option>"; if ($mystatus == "rightback") { $sel = " SELECTED "; } else { $sel = ""; } $content .= "<option " . $sel . " value=\"rightback\">" . OW::getLanguage()->text('startpage', 'status_startpage_rightback') . "</option>"; if ($mystatus == "notime") { $sel = " SELECTED "; } else { $sel = ""; } $content .= "<option " . $sel . " value=\"notime\">" . OW::getLanguage()->text('startpage', 'status_startpage_notime') . "</option>"; if ($mystatus == "notdisturb") { $sel = " SELECTED "; } else { $sel = ""; } $content .= "<option " . $sel . " value=\"notdisturb\">" . OW::getLanguage()->text('startpage', 'status_startpage_notdisturb') . "</option>"; if ($mystatus == "chat") { $sel = " SELECTED "; } else { $sel = ""; } $content .= "<option " . $sel . " value=\"chat\">" . OW::getLanguage()->text('startpage', 'status_startpage_chat') . "</option>"; $content .= "</select>"; $content .= "<br/> <br/>\n <span class=\"ow_button\">\n <span class=\" ow_positive\">\n <input type=\"submit\" id=\"save_status\" name=\"Save_status\" value=\"" . OW::getLanguage()->text('startpage', 'save_status') . "\" title=\"" . OW::getLanguage()->text('startpage', 'save_status') . "\" class=\"ow_ic_save ow_positive\" style=\"\">\n </span>\n </span>\n\n <span class=\"ow_button\">\n <span class=\" ow_positive\">\n <input type=\"button\" id=\"startpage_close\" name=\"Close_status\" value=\" \" title=\"" . OW::getLanguage()->text('startpage', 'close') . "\" class=\"ow_ic_restrict ow_positive\" style=\"padding-left: 0;padding-right: 27px; background-position: 50% 50%;\">\n </span>\n </span>\n\n\n\n\n</form>"; } //if ($curent_member_profile>0 AND $id_user>0 AND $curent_member_profile==$id_user){ //----stat end $content .= "<div class=\"ow_box_bottom_left\"></div>\n <div class=\"ow_box_bottom_right\"></div>\n <div class=\"ow_box_bottom_body\"></div>\n <div class=\"ow_box_bottom_shadow\"></div>\n</div>"; } //if user:$curent_member_profile if ($type == "full") { //$content .="<div class=\"clearfix ow_box ow_stdmargin clearfix ow_break_word\" style=\"margin-bottom:10px; background: transparent;\">"; if (OW::getConfig()->getValue('startpage', 'show_startpage_only_friends') == 1 and OW::getPluginManager()->isPluginActive('friends')) { //-----------------------------------for friends only $content .= "<div class=\"clearfix\">"; $content .= "<div class=\"ow_small ow_remark ow_ipc_dateX ow_left\">"; $content .= OW::getLanguage()->text('startpage', 'friends_startpage'); $content .= "</div>"; $content .= "</div>"; } $content .= "<div class=\"ow_box ow_stdmargin clearfix index-BASE_CMP_AddNewContent ow_break_word\" style=\"margin-bottom:10px; background: transparent; padding: 0;margin: 2px;\">"; $add = ""; if ($id_user) { $add = " WHERE buo.userId<>'" . addslashes($id_user) . "' "; } $show_type = "all"; if (OW::getConfig()->getValue('startpage', 'show_startpage_only_friends') == 1 and OW::getPluginManager()->isPluginActive('friends')) { //-----------------------------------for friends only $show_type = "friends"; /* $sql = "SELECT buo.*,bus.status FROM " . OW_DB_PREFIX. "base_user_startpage buo LEFT JOIN " . OW_DB_PREFIX. "base_user_status bus ON (bus.userId=buo.userId) ".$add." ORDER BY buo.activityStamp DESC LIMIT ".$start_page.",".$per_page; */ // $sql="SELECT * FROM " . OW_DB_PREFIX. "friends_friendship ff // LEFT JOIN " . OW_DB_PREFIX. "base_user_startpage buo ON (buo. =ff.userId AND ff.status='active') // LIMIT ".$start_page.",".$per_page; $status = "status"; $user_id = "userId"; $friend_id = "friendId"; $startus1 = " fr." . $status . " = 'active' AND "; $startus2 = " fr." . $status . " = 'active' AND "; $sql = "(SELECT fr.id, fr.userId, fr.friendId, fr.status as fr_status, buo.userId as startpage_userId, bus.status,buo.activityStamp \n FROM " . OW_DB_PREFIX . "friends_friendship fr\n LEFT JOIN " . BOL_UserSuspendDao::getInstance()->getTableName() . " ussx ON ( fr." . $user_id . " = ussx.userId ) \nLEFT JOIN " . OW_DB_PREFIX . "base_user_startpage buo ON (buo.userId =fr." . $user_id . ") \nLEFT JOIN " . OW_DB_PREFIX . "base_user_status bus ON (bus.userId=fr." . $user_id . ") \n WHERE " . $startus1 . " ussx.userId IS NULL AND fr." . $friend_id . " = '" . $id_user . "' AND buo.userId>'0' \n )\n UNION\n ( SELECT fr.id, fr.userId, fr.friendId, fr.status as fr_status, buo.userId as startpage_userId, bus.status,buo.activityStamp \n FROM " . OW_DB_PREFIX . "friends_friendship fr\n LEFT JOIN " . BOL_UserSuspendDao::getInstance()->getTableName() . " ussx ON ( fr." . $friend_id . " = ussx.userId )\nLEFT JOIN " . OW_DB_PREFIX . "base_user_startpage buo ON (buo.userId =fr." . $friend_id . ") \nLEFT JOIN " . OW_DB_PREFIX . "base_user_status bus ON (bus.userId=fr." . $friend_id . ") \n WHERE " . $startus2 . " ussx.userId IS NULL AND fr." . $user_id . " = '" . $id_user . "' AND buo.userId>'0'\n ) LIMIT " . $start_page . "," . $per_page; //echo $sql;exit; } else { if (OW::getPluginManager()->isPluginActive('friends')) { //-----------------------------------for friends offline $show_type = "friends"; $status = "status"; $user_id = "userId"; $friend_id = "friendId"; $startus1 = " fr." . $status . " = 'active' AND "; $startus2 = " fr." . $status . " = 'active' AND "; $sql = "(SELECT fr.id, fr.userId, fr.friendId, fr.status as fr_status, buo.userId as startpage_userId, bus.status,buo.activityStamp \n FROM " . OW_DB_PREFIX . "friends_friendship fr \n LEFT JOIN " . BOL_UserSuspendDao::getInstance()->getTableName() . " ussx ON ( fr." . $user_id . " = ussx.userId ) \nLEFT JOIN " . OW_DB_PREFIX . "base_user_startpage buo ON (buo.userId =fr." . $user_id . ") \nLEFT JOIN " . OW_DB_PREFIX . "base_user_status bus ON (bus.userId=fr." . $user_id . ") \n WHERE " . $startus1 . " ussx.userId IS NULL AND fr." . $friend_id . " = '" . $id_user . "' AND !buo.userId \n )\n UNION\n ( SELECT fr.id, fr.userId, fr.friendId, fr.status as fr_status, buo.userId as startpage_userId, bus.status,buo.activityStamp \n FROM " . OW_DB_PREFIX . "friends_friendship fr \n LEFT JOIN " . BOL_UserSuspendDao::getInstance()->getTableName() . " ussx ON ( fr." . $friend_id . " = ussx.userId )\nLEFT JOIN " . OW_DB_PREFIX . "base_user_startpage buo ON (buo.userId =fr." . $friend_id . ") \nLEFT JOIN " . OW_DB_PREFIX . "base_user_status bus ON (bus.userId=fr." . $friend_id . ") \n WHERE " . $startus2 . " ussx.userId IS NULL AND fr." . $user_id . " = '" . $id_user . "' AND !buo.userId\n ) LIMIT " . $start_page . "," . $per_page; //echo $sql;exit; } else { //---------------------------------------------------------------------------------------------for all members start $sql = "SELECT buo.*,bus.status FROM " . OW_DB_PREFIX . "base_user_startpage buo \n LEFT JOIN " . OW_DB_PREFIX . "base_user_status bus ON (bus.userId=buo.userId) \n " . $add . " \n ORDER BY buo.activityStamp DESC \n LIMIT " . $start_page . "," . $per_page; } } //echo $sql; //exit; if (OW::getConfig()->getValue('startpage', 'show_small_startpage_list') == "1") { $is_small_list = true; $img_w = 20; $img_h = 20; } else { $is_small_list = false; $img_w = 40; $img_h = 40; } $arr = OW::getDbo()->queryForList($sql); foreach ($arr as $value) { if ($show_type == "all") { $value_userId = $value['userId']; } else { //-----friends $value_userId = $value['startpage_userId']; } $dname = BOL_UserService::getInstance()->getDisplayName($value_userId); $uurl = BOL_UserService::getInstance()->getUserUrl($value_userId); $uimg = BOL_AvatarService::getInstance()->getAvatarUrl($value_userId); $fromdate = date("Y-m-d H:i:s", $value['activityStamp']); if (!$value['status']) { $status = "startpage"; } else { $status = stripslashes($value['status']); } //echo "---".$status."<hr>"; $contentt = ""; if ($uimg) { // $contentt .="<a href=\"".$uurl."\">"; // $contentt .="<img src=\"".$uimg."\" alt=\"".$dname."\" title=\"".$dname."\" width=\"45px\" style=\"border:0;margin:10px;\" >"; // $contentt .="</a>"; } else { $uimg = $curent_url . "ow_static/themes/" . OW::getConfig()->getValue('base', 'selectedTheme') . "/images/no-avatar.png"; // $tabt .="<i>".OW::getLanguage()->text('search', 'index_hasnotimage')."</i>"; // $contentt .="<a href=\"".$uurl."\" >"; // $contentt .="<img src=\"".$curent_url."ow_static/themes/".OW::getConfig()->getValue('base', 'selectedTheme')."/images/no-avatar.png\" title=\"".$dname."\" style=\"border:0;margin:10px;\">"; // $contentt .="</a>"; } //$content .="<div class=\"ow_box clearfix ow_left\" style=\"margin: 5px;".$border_im.$background_im."\">"; //$content .="<div class=\"ow_box clearfix ow_left\" style=\"margin: 3px;\">"; //$content .="<div class=\"ow_box clearfix ow_left\" style=\"margin: 1px;\">"; if ($is_small_list == false) { $content .= "<div class=\"ow_add_content ow_box clearfix ow_left\" style=\"margin: 1px; background-image:none;padding: 5px 0 5px; min-width: 160px;width:100%\">"; } else { $content .= "<div class=\"ow_add_content ow_box clearfix ow_left\" style=\"margin: 1px; background-image:none;padding: 3px 0 1px; min-width: 160px;width:100%\">"; } //$content .="<div class=\"ow_box clearfix\" style=\"margin: 5px;\">"; // $content .="<li >".stripslashes($row2['title'])."</li>"; //$content .="<li >"; //$content .="<div class=\"ow_my_avatar_widget clearfix\" style=\"margin:2px;margin-bottom:10px;text-align:left;\">"; //$content .="<div class=\"ow_my_avatar_widget clearfix\" style=\"margin:1px;margin-bottom:10px;text-align:left;\">"; $content .= "<div class=\" ow_my_avatar_widget clearfix\" style=\"margin:1px;text-align:left;\">"; $content .= "<div class=\" ow_left ow_my_avatar_img\" style=\"max-height:" . $img_h . "px;max-width:" . $img_w . "px;margin-left: 4px;margin-top: -1px;margin-bottom:3px;\">\n <div class=\"ow_avatar\" style=\"max-width:" . $img_w . "px;max-height:" . $img_h . "px;\">\n <a href=\"" . $uurl . "\"><img alt=\"\" title=\"" . $dname . "\" src=\"" . $uimg . "\" style=\"max-height:" . $img_h . "px;max-width:" . $img_w . "px;\"></a>\n </div>\n </div>\n\n <div class=\"ow_my_avatar_cont\" style=\"margin-left:10px;max-height:" . $img_h . "px;height:auto;\">"; if ($is_small_list == false) { $content .= "<a href=\"" . $uurl . "\" class=\"ow_my_avatar_username\" style=\"margin-left:1px;display: inline;\">\n <span class=\"ow_small ow_remark ow_ipc_dateX ow_left\" style=\"font-size:11px;\noverflow: hidden;\nheight: 18px;\nmax-height: 18px;\nmax-width: 100px;\nwhite-space: nowrap;\nwidth: 100px;\ntop: 5px;\nposition: relative;\nz-index: 5;\nmargin-left:10px;\n\">@" . $dname . "</span></a>"; /* $content .="<br/>"; $content .="<span class=\"ow_comments_date ow_nowrap ow_tiny ow_remark\" style=\"overflow: hidden; height: 18px; max-height: 18px; max-width: 140px; white-space: nowrap;\">".$fromdate."</span>"; */ //$content .="<br/>"; $content .= "<span class=\"ow_remark ow_right\" style=\"overflow: hidden;\nheight: 18px;\nmax-height: 18px;\nmax-width: 120px;\nwidth: auto;\ntext-align:right;\nmargin-right:5px;\nwhite-space: nowrap;\ntop: 5px;\nposition: relative;\nz-index: 5;\nfont-weight:bold;\nmargin-left:10px;\n\">" . $this->get_decoded_status($status) . "</span>"; } else { $content .= "<span class=\"ow_remark ow_right\" style=\"overflow: hidden;\nheight: 20px;\nmax-height: 20px;\nmax-width: 160px;\nwidth: auto;\ntext-align:right;\nmargin-right:5px;\nwhite-space: nowrap;\nposition: relative;\nz-index: 5;\nfont-weight:bold;\nmargin-left:3px;\n\">" . $dname . ": " . $this->get_decoded_status($status) . "</span>"; } //$content .="<br/>"; $content .= "</div>"; $content .= "</div>"; $content .= "</div>"; } //for $content .= "</div>"; $content .= "<div class=\"ow_box_toolbar_cont clearfix\">\n<div class=\"ow_box_toolbar ow_remark\">\n <span style=\"\" class=\"ow_nowrap\">\n <a href=\"" . $curent_url . "users/startpage\">" . OW::getLanguage()->text('base', 'more') . "</a>\n </span>\n</div>\n </div>"; } //if $type=="full" return $content; }
/** * @param $userId * @param $page * @param $limit * @return array|mixed */ public function findGuestUsers($userId, $page, $limit) { $first = ($page - 1) * $limit; $query = "SELECT `u`.*\n FROM `" . $this->getTableName() . "` AS `g`\n INNER JOIN `" . BOL_UserDao::getInstance()->getTableName() . "` as `u`\n ON (`g`.`guestId` = `u`.`id`)\n LEFT JOIN `" . BOL_UserSuspendDao::getInstance()->getTableName() . "` as `s`\n ON( `u`.`id` = `s`.`userId` )\n LEFT JOIN `" . BOL_UserApproveDao::getInstance()->getTableName() . "` as `d`\n ON( `u`.`id` = `d`.`userId` )\n WHERE `s`.`id` IS NULL AND `d`.`id` IS NULL\n AND `g`.`userId` = ?\n ORDER BY `g`.`visitTimestamp` DESC\n LIMIT ?, ?"; return $this->dbo->queryForObjectList($query, BOL_UserDao::getInstance()->getDtoClassName(), array($userId, $first, $limit)); }
public function findCountByEventIdAndStatus($eventId, $status) { $query = " SELECT count(e.id) FROM " . $this->getTableName() . " e\n \t\tLEFT JOIN `" . BOL_UserSuspendDao::getInstance()->getTableName() . "` as `s` ON( `e`.`userId` = `s`.`userId` )\n LEFT JOIN `" . BOL_UserApproveDao::getInstance()->getTableName() . "` as `d` ON( `e`.`userId` = `d`.`userId` )\n WHERE s.Id IS NULL AND d.id IS NULL AND e.`" . self::EVENTX_ID . "` = :eventId AND e.`" . self::STATUS . "` = :status "; return $this->dbo->queryForColumn($query, array('eventId' => (int) $eventId, 'status' => (int) $status), self::CACHE_LIFE_TIME, array(self::CACHE_TAG_EVENTX_USER_LIST . $eventId)); }
public function findByAccountTypes($count, $accountTypes, $withPhoto = true) { if (empty($accountTypes)) { return array(); } $avatarJoin = !$withPhoto ? '' : "INNER JOIN `" . BOL_AvatarDao::getInstance()->getTableName() . "` as `a`\n \t\t\tON( `u`.`id` = `a`.`userId` )"; $query = "\n SELECT DISTINCT `u`.*\n FROM `{$this->getTableName()}` AS `u`\n\n \t\tLEFT JOIN `" . BOL_UserSuspendDao::getInstance()->getTableName() . "` as `s`\n \t\t\tON( `u`.`id` = `s`.`userId` )\n\n \t\tLEFT JOIN `" . BOL_UserApproveDao::getInstance()->getTableName() . "` as `d`\n \t\t\tON( `u`.`id` = `d`.`userId` )\n\n {$avatarJoin}\n \n \t\tWHERE `s`.`id` IS NULL AND `d`.`id` IS NULL AND `u`.`accountType` IN ( '" . implode("', '", $accountTypes) . "' )\n\n ORDER BY `u`.`activityStamp` DESC\n LIMIT ?, ?\n "; return $this->dbo->queryForObjectList($query, $this->getDtoClassName(), array(0, $count)); }