public function index() { $this->view->page_title = t('Free Video Room, Live Speed Dating ChatRoulette'); $this->view->meta_description = t('Free Live Speed Dating with the Chatroulette of %site_name%, Meet new people near you and make new friends, sex friends and free flirting, Free online dating site for singles without registration with Video Chat Rooms!'); $this->view->meta_keywords = t('chat, chatroulette, sex friend, single, speed dating, meet singles, dating, free dating, chat room, chat webcam'); $this->view->h1_title = t('Welcome to <span class="pH1">Speed Dating ChatRoulette</span> of <span class="pH0">%site_name%</span>!'); $this->view->chatroulette = Url::clean((new SysVar())->parse(DbConfig::getSetting('chatrouletteApi'))); $this->output(); }
public function index() { $this->view->page_title = t('Free Chat Room Dating'); $this->view->meta_description = t('Find Your Match at The Best Free Online Dating Site with Free Chat Rooms, Single Chat Meet People'); $this->view->meta_keywords = t('chat, speed dating, meet singles, dating, free dating, chat room, chat webcam'); $this->view->h1_title = t('Welcome to <span class="pH3">Free Chat Room</span> on <span class="pH0">%site_name%</span>!'); $this->view->chat_room = Url::clean((new SysVar())->parse(DbConfig::getSetting('chatApi'))); $this->output(); }
/** * The HTML code for displaying the QR Code. * * @return void */ public function display() { echo '<p class="center"><img src="' . Url::clean($this->get()) . '" alt="QR Code" /></p>'; }
public function url($sModule, $sController, $sAction, $sVars = null, $bClear = true) { $sUrl = Uri::get($sModule, $sController, $sAction, $sVars, $bClear); echo Url::clean($sUrl); // For the parameters in the URL are valid in HTML }
/** * Get the User Avatar. * * @param string $sUername * @param string $sSex * @param integer $iSize * @return void Html contents. URL avatar default 150px or the user avatar. */ public function getUserAvatar($sUsername, $sSex = '', $iSize = '') { $oCache = (new \PH7\Framework\Cache\Cache())->start(self::CACHE_AVATAR_GROUP . $sUsername, $sSex . $iSize, 60 * 24 * 30); if (!($sUrl = $oCache->get())) { $oUserModel = new \PH7\UserCoreModel(); $iProfileId = $oUserModel->getId(null, $sUsername); $oGetAvatar = $oUserModel->getAvatar($iProfileId); $sSize = $iSize == '32' || $iSize == '64' || $iSize == '100' || $iSize == '150' || $iSize == '200' || $iSize == '400' ? '-' . $iSize : ''; $sAvatar = @$oGetAvatar->pic; $sExt = PH7_DOT . (new File())->getFileExt($sAvatar); $sDir = 'user/avatar/img/' . $sUsername . PH7_SH; $sPath = PH7_PATH_PUBLIC_DATA_SYS_MOD . $sDir . $sAvatar; $sUrl = PH7_URL_DATA_SYS_MOD . $sDir . str_replace($sExt, $sSize . $sExt, $sAvatar); $bIsModerate = Registry::getInstance()->module === PH7_ADMIN_MOD; if (!is_file($sPath) || $oGetAvatar->approvedAvatar == '0') { /* If sex is empty, it is recovered in the database using information from member */ $sSex = !empty($sSex) ? $sSex : $oUserModel->getSex(null, $sUsername, 'Members'); $sSex = $this->oStr->lower($sSex); $sIcon = $sSex == 'male' || $sSex == 'female' || $sSex == 'couple' || $sSex == PH7_ADMIN_USERNAME ? $sSex : 'visitor'; $sUrlTplName = defined('PH7_TPL_NAME') ? PH7_TPL_NAME : PH7_DEFAULT_THEME; /*** If the user does not have an avatar ***/ if (!is_file($sPath)) { /* The user has no avatar, we try to get a Gravatar */ // Get the User Email $sEmail = $oUserModel->getEmail($iProfileId); $bSecureGravatar = \PH7\Framework\Http\Http::isSsl(); $sUrl = $this->getGravatarUrl($sEmail, '404', $iSize, 'g', $bSecureGravatar); if (!(new \PH7\Framework\Security\Validate\Validate())->url($sUrl, true)) { // If there is no Gravatar, we set the default pH7CMS's avatar $sUrl = PH7_URL_TPL . $sUrlTplName . PH7_SH . PH7_IMG . 'icon/' . $sIcon . '_no_picture' . $sSize . '.jpg'; } } elseif (!$bIsModerate) { $sUrl = PH7_URL_TPL . $sUrlTplName . PH7_SH . PH7_IMG . 'icon/pending' . $sSize . '.jpg'; } } unset($oUserModel); /** * @internal Clean URL for parameters in Gravatar URL to make the HTML code valid. * If we set replace '&' by '&' before checking the 404's Gravatar URL, it will always return '200 OK', that's why we need to clean the URL now. */ $oCache->put(Url::clean($sUrl)); } unset($oCache); echo $sUrl; }