/** * Returns an instance of class * * @return OCSTOPUSERS_BOL_Service */ public static function getInstance() { if (self::$classInstance === null) { self::$classInstance = new self(); } return self::$classInstance; }
public function onBeforeRender() { //echo "2222"; //echo $this->ciduser;exit; // $content = $this->nl2br ? nl2br( $this->content ) : $this->content; $content = MAP_BOL_Service::getInstance()->get_profile_map('profile', $this->ciduser); $this->assign('content', $content); }
function map_set_credits_action_tool(BASE_CLASS_EventCollector $event) { //echo "--".OW::getUser()->isAuthorized('fanpage'); // if ( !OW::getUser()->isAuthorized('fanpage') ){return;} //echo "--".$params['userId'];exit; $params = $event->getParams(); //print_r($params); //return; if (empty($params['userId'])) { return; } else { if (!OW::getUser()->getId()) { return; } else { if (!isset($params['userId']) or $params['userId'] != OW::getUser()->getId()) { return; } } } //echo $params['userId']; // echo MAP_BOL_Service::getInstance()->is_file_application();exit; if (OW::getConfig()->getValue('map', 'support_mobile_app') == 1 and MAP_BOL_Service::getInstance()->is_file_application()) { // if (OW::getConfig()->getValue('map', 'support_mobile_app')==1 AND is_file(OW::getPluginManager()->getPlugin('map')->getRootDir()."map_mobile.apk")){ $linkId = 'fp' . rand(1001, 1000000); $user = BOL_UserService::getInstance()->getUserName((int) $params['userId']); $resultArray = array(BASE_CMP_ProfileActionToolbar::DATA_KEY_LABEL => OW::getLanguage()->text('map', 'setup_mobile_app'), BASE_CMP_ProfileActionToolbar::DATA_KEY_LINK_HREF => OW_URL_HOME . 'map/confowner/' . $params['userId'], BASE_CMP_ProfileActionToolbar::DATA_KEY_LINK_ID => $linkId); $event->add($resultArray); } }
public function indexginfo($params) { //echo "SdfsDF";exit; $id_user = OW::getUser()->getId(); //citent login user (uwner) $is_admin = OW::getUser()->isAdmin(); $curent_url = 'http'; if (isset($_SERVER["HTTPS"])) { $curent_url .= "s"; } $curent_url .= "://"; $curent_url .= $_SERVER["SERVER_NAME"] . "/"; $curent_url = OW_URL_HOME; $pluginStaticDir = OW_DIR_STATIC . 'plugins' . DS . 'map' . DS; $pluginStaticURL2 = OW::getPluginManager()->getPlugin('map')->getStaticUrl(); $content = ""; $columns = 3; if (isset($params['id_markz']) and $params['id_markz'] > 0) { $ideditmark = $params['id_markz']; if (!$is_admin) { $addand = " AND active='1' "; } else { $addand = ""; } $query = "SELECT * FROM " . OW_DB_PREFIX . "map WHERE id='" . addslashes($ideditmark) . "' " . $addand . " LIMIT 1"; $arr = OW::getDbo()->queryForList($query); if (isset($arr[0])) { $row = $arr[0]; } else { $row = array(); $row['id'] = 0; } if ($ideditmark > 0 and $row['id'] > 0 and $row['id'] == $ideditmark) { //--------title start $content .= "<div class=\"ow_leftD clearfix ow_pageX\" >"; $content .= "<h1 class=\"ow_stdmargin ow_ic_file\">"; $content .= stripslashes($row['name']); $content .= "</h1>"; $content .= "</div>"; // $content .="<br/>"; //--------title end // $content .="<div class=\"clearfix\">"; //--------desc start $content .= "<div class=\"ow_leftX clearfix ow_pageXx\" >"; $content .= stripslashes($row['desc']); $content .= "</div>"; // $content .="<br/>"; //--------desc end $content .= "<div class=\"ow_value ow_center clearfix\" style=\"margin:10px;display:inline-block;width: 100%;\nmargin: auto;\ntext-align: center;border-top:1px solid #ddd;\">"; //--------image start $cell = 1; $query = "SELECT * FROM " . OW_DB_PREFIX . "map_images \n WHERE id_map='" . addslashes($ideditmark) . "' "; $arr = OW::getDbo()->queryForList($query); $ctab = ""; foreach ($arr as $value) { $img = $value['id_map'] . "_" . $value['image'] . "_mini." . $value['itype']; // $url=MAP_BOL_Service::getInstance()->get_plugin_url('map').$id_user.DS; $url = MAP_BOL_Service::getInstance()->get_plugin_url('map') . $value['id_ownerm'] . DS; $ctab .= "<td style=\"padding:0;margin:0;text-align:center;\">"; $ctab .= "<div class=\"ow_center ow_value clearfix item ow_box_empty ow_box item_border \" style=\"margin:10px;vertical-align:top;\">"; $ctab .= "<img src=\"" . $url . $img . "\" style=\"max-width:180px;\">"; $ctab .= "<br/>"; $ctab .= "<div class=\"ow_right clearfix ow_right ow_nowrap ow_remark\" style=\"display:inline-block;font-size:90%;\">"; if ($value['data_add'] != "0000-00-00 00:00:00") { list($xdat, $xtime) = explode(" ", $value['data_add']); $ctab .= $xdat; } // $ctab .="<b style=\"color:#f00;\">".OW::getLanguage()->text('map', 'check_fordelete_image').":</b> "; // $ctab .="<input type=\"checkbox\" name=\"delimg[]\" value=\"del_".$value['id_map']."_".$value['image']."\">"; $ctab .= "</div>"; /* $ctab .="<br/>"; $ctab .="<div class=\"ow_right clearfix\" style=\"display:inline-block;\">"; $ctab .="<b style=\"color:#f00;\">".OW::getLanguage()->text('map', 'check_fordelete_image').":</b> "; $ctab .="<input type=\"checkbox\" name=\"delimg[]\" value=\"del_".$value['id_map']."_".$value['image']."\">"; $ctab .="</div>"; $ctab .="<div class=\"ow_left clearfix\" style=\"display:inline-block;\">"; if ($value['is_default']==1) $sel=" checked "; else $sel=""; $ctab .="<input ".$sel." type=\"radio\" name=\"defimg\" value=\"def_".$value['id_map']."_".$value['image']."\">"; $ctab .=" "; $ctab .="<b style=\"\">".OW::getLanguage()->text('map', 'select_default_image')."</b> "; $ctab .="</div>"; */ $ctab .= "</div>"; $ctab .= "</td>"; $cell = $cell + 1; if ($cell > $columns) { $cell = 1; $ctab .= "</tr><tr>"; } } //for if ($ctab) { if ($ctab < $columns) { for ($i = $cell; $i < $columns; $i++) { $ctab .= "<td style=\"padding:0;margin:0;\"></td>"; } } $content .= "<table class=\"ow_center\" style=\"display: inline-block;\"><tr>" . $ctab . "</tr></table>"; } //--------edit img end $content .= "</div>"; } else { //if $ideditmark >0 $content .= "<div class=\"ow_center\">" . OW::getLanguage()->text('map', 'markernotfound') . "</div>"; } } else { //end if (isset($params['id_markz']) AND $params['id_markz']>0){ $content=""; $content .= "<div class=\"ow_center\">" . OW::getLanguage()->text('map', 'markernotfound') . "</div>"; } echo $content; exit; // $content=MAP_BOL_Service::getInstance()->make_tabs("zoom",$content); $this->assign('content', $content); }