Ejemplo n.º 1
0
 public function read()
 {
     // Adding JavaScript file for Ajax Comment
     $this->design->addJs(PH7_LAYOUT . PH7_SYS . PH7_MOD . $this->registry->module . PH7_SH . PH7_TPL . PH7_TPL_MOD_NAME . PH7_SH . PH7_JS, 'comment.js');
     $this->sTitle = t('Read Comment');
     $this->view->page_title = $this->sTitle;
     $this->view->meta_description = $this->sTitle;
     $this->view->h1_title = $this->sTitle;
     $this->view->h4_title = CommentCore::count($this->iId, $this->sTable);
     $oPage = new Page();
     $this->view->total_pages = $oPage->getTotalPages($this->oCommentModel->total($this->iId, $this->sTable), 15);
     $this->view->current_page = $oPage->getCurrentPage();
     $oComment = $this->oCommentModel->read($this->iId, 1, $oPage->getFirstItem(), $oPage->getNbItemsByPage(), $this->sTable);
     unset($oPage);
     if (!empty($oComment)) {
         $this->view->avatarDesign = new AvatarDesignCore();
         // Avatar Design Class
         $this->view->member_id = $this->session->get('member_id');
         $this->view->csrf_token = (new Framework\Security\CSRF\Token())->generate('comment');
         $this->view->comment = $oComment;
     } else {
         $this->_notFound();
     }
     $this->output();
 }
 public function browse()
 {
     $this->iTotalAdmins = $this->oAdminModel->searchAdmin($this->httpRequest->get('looking'), true, $this->httpRequest->get('order'), $this->httpRequest->get('sort'), null, null);
     $oPage = new Page();
     $this->view->total_pages = $oPage->getTotalPages($this->iTotalAdmins, 15);
     $this->view->current_page = $oPage->getCurrentPage();
     $oSearch = $this->oAdminModel->searchAdmin($this->httpRequest->get('looking'), false, $this->httpRequest->get('order'), $this->httpRequest->get('sort'), $oPage->getFirstItem(), $oPage->getNbItemsByPage());
     unset($oPage);
     if (empty($oSearch)) {
         $this->design->setRedirect(Uri::get(PH7_ADMIN_MOD, 'admin', 'browse'));
         $this->displayPageNotFound(t('Sorry, Your search returned no results!'));
     } else {
         // Adding the JS form file
         $this->design->addJs(PH7_STATIC . PH7_JS, 'form.js');
         // Assigns variables for views
         $this->view->designSecurity = new Framework\Layout\Html\Security();
         // Security Design Class
         $this->view->dateTime = $this->dateTime;
         // Date Time Class
         $this->sTitle = t('Browse Admins');
         $this->view->page_title = $this->sTitle;
         $this->view->h2_title = $this->sTitle;
         $this->view->h3_title = nt('%n% Admin', '%n% Admins', $this->iTotalAdmins);
         $this->view->browse = $oSearch;
     }
     $this->output();
 }
 public function browse()
 {
     $oSubscriptionModel = new SubscriptionModel();
     $iTotal = $this->oSubscriptionModel->browse($this->httpRequest->get('looking'), true, $this->httpRequest->get('order'), $this->httpRequest->get('sort'), null, null);
     $oPage = new Page();
     $this->view->total_pages = $oPage->getTotalPages($iTotal, 30);
     $this->view->current_page = $oPage->getCurrentPage();
     $oBrowse = $this->oSubscriptionModel->browse($this->httpRequest->get('looking'), false, $this->httpRequest->get('order'), $this->httpRequest->get('sort'), $oPage->getFirstItem(), $oPage->getNbItemsByPage());
     unset($oPage);
     if (empty($oBrowse)) {
         $this->design->setRedirect(Uri::get('newsletter', 'admin', 'browse'));
         $this->displayPageNotFound(t('Sorry, Your search returned no results!'));
     } else {
         // Adding the static files
         $this->design->addCss(PH7_LAYOUT . PH7_TPL . PH7_TPL_NAME . PH7_SH . PH7_CSS, 'browse.css');
         $this->design->addJs(PH7_STATIC . PH7_JS, 'form.js');
         // Assigns variables for views
         $this->view->designSecurity = new Framework\Layout\Html\Security();
         // Security Design Class
         $this->view->dateTime = $this->dateTime;
         // Date Time Class
         $this->sTitle = t('Browse Subscribers');
         $this->view->page_title = $this->sTitle;
         $this->view->h2_title = $this->sTitle;
         $this->view->h3_title = nt('%n% Subscriber', '%n% Subscribers', $iTotal);
         $this->view->browse = $oBrowse;
     }
     $this->output();
 }
Ejemplo n.º 4
0
 public function index()
 {
     $iTotalAds = (new AdsCoreModel())->total('AdsAffiliates');
     $oPage = new Page();
     $this->view->total_pages = $oPage->getTotalPages($iTotalAds, 10);
     $this->view->current_page = $oPage->getCurrentPage();
     unset($oPage);
     $this->sTitle = t('Banners');
     $this->view->page_title = $this->sTitle;
     $this->view->h1_title = $this->sTitle;
     $this->view->h3_title = nt('%n% Banner', '%n% Banners', $iTotalAds);
     $this->output();
 }
 public function ads()
 {
     $oPage = new Page();
     $sTable = AdsCore::getTable();
     $iTotalAds = (new AdsCoreModel())->total($sTable);
     $this->view->total_pages = $oPage->getTotalPages($iTotalAds, 10);
     $this->view->current_page = $oPage->getCurrentPage();
     unset($oPage, $sTable);
     // Add JS file for the ads form
     $this->design->addJs(PH7_LAYOUT . PH7_SYS . PH7_MOD . $this->registry->module . PH7_SH . PH7_TPL . PH7_TPL_MOD_NAME . PH7_SH . PH7_JS, 'common.js');
     $this->sTitle = t('Advertisement Settings');
     $this->view->page_title = $this->sTitle;
     $this->view->h1_title = $this->sTitle;
     $this->view->h4_title = t('%0% Banners', $iTotalAds);
     $this->output();
 }
 public function index()
 {
     // Add Stylesheet tooltip
     $this->design->addCss(PH7_LAYOUT . PH7_TPL . PH7_TPL_NAME . PH7_SH . PH7_CSS, 'tooltip.css');
     if ($this->httpRequest->getExists('country')) {
         // Get the country and city, limited to 50 characters and remove hyphens in too automatically insert the url.
         $this->registry->country = str_replace('-', ' ', substr($this->str->upperFirst($this->httpRequest->get('country')), 0, 50));
         $this->registry->city = $this->httpRequest->getExists('city') ? str_replace('-', ' ', substr($this->str->upperFirst($this->httpRequest->get('city')), 0, 50)) : '';
         // Set parameters Google Map
         $oMap = new Map();
         $oMap->setCenter($this->registry->country . ' ' . $this->registry->city);
         $oMap->setSize('800px', '690px');
         $oMap->setDivId('map');
         $oMap->setZoom(12);
         $oMap->addMarkerByAddress($this->registry->country . ' ' . $this->registry->city, t('Meet new people here!'));
         $oMap->generate();
         $this->view->map = $oMap->getMap();
         unset($oMap);
         $sCountryCode = $this->getCountryCode();
         // For User Model
         $this->view->userDesignModel = new UserDesignCoreModel();
         $this->view->country_code = $sCountryCode;
         $this->view->city = $this->registry->city;
         // Pagination
         $oPage = new Page();
         $iTotalUsers = (new UserCoreModel())->getGeoProfiles($sCountryCode, $this->registry->city, true, null, null, null);
         $this->view->total_pages = $oPage->getTotalPages($iTotalUsers, 20);
         $this->view->current_page = $oPage->getCurrentPage();
         $this->view->first_user = $oPage->getFirstItem();
         $this->view->nb_user_by_page = $oPage->getNbItemsByPage();
         // SEO Meta
         $this->view->page_title = t('Free online dating in %0% %1%, meet people, find friends. Single men & women in %2% %3%', $this->registry->country, $this->registry->city, $this->registry->country, $this->registry->city);
         $this->view->meta_description = t('Free online dating in %0% with single women & men. Personals, meet people & find friends in %1% on internet dating site. Find sweet love or sex dating and flirt in %2%, %3% with %site_name%', $this->registry->country, $this->registry->country, $this->registry->country, $this->registry->city);
         $this->view->meta_keywords = t('meeting woman, meeting man, %0%, %1%, meet people, networking, friends, communicate, meet online, online community, clubs, announces meeting, free dating, dating, %2% dating, communication, matrimonial meeting, sharing photos, flirt, finding friends, classifieds, personals, online, social networking', $this->registry->country, $this->registry->city, $this->registry->country);
         $this->view->h1_title = t('Meet new people in %0% %1%', '<span class="pH1">' . $this->registry->country . '</span>', '<span class="pH1">' . $this->registry->city . '</span>');
         $sMemberTxt = nt('%n% member', '%n% members', $iTotalUsers);
         $this->view->h3_title = t('%0% lives near %1% %2%', $sMemberTxt, $this->registry->country, $this->registry->city);
     } else {
         // Not found page
         Framework\Http\Http::setHeadersByCode(404);
         $this->view->error = t('Error, country is empty.');
     }
     $this->output();
 }
Ejemplo n.º 7
0
 public function index()
 {
     // CSRF Token
     $this->view->csrf_token = (new Framework\Security\CSRF\Token())->generate('report');
     // Security Design Class
     $this->view->designSecurity = new Framework\Layout\Html\Security();
     // Adding the JS files for the report and form.
     $this->design->addJs(PH7_LAYOUT . PH7_SYS . PH7_MOD . $this->registry->module . PH7_SH . PH7_TPL . PH7_TPL_MOD_NAME . PH7_SH . PH7_JS, 'common.js');
     $this->design->addJs(PH7_STATIC . PH7_JS, 'form.js');
     $this->sTitle = t('Report');
     $this->view->page_title = $this->sTitle;
     $this->view->h2_title = $this->sTitle;
     $oPage = new Page();
     $this->view->total_pages = $oPage->getTotalPages($this->oReportModel->totalReports(), 15);
     $this->view->current_page = $oPage->getCurrentPage();
     $this->view->reports = $this->oReportModel->get(null, $oPage->getFirstItem(), $oPage->getNbItemsByPage());
     unset($oPage);
     $this->output();
 }
Ejemplo n.º 8
0
 public function result()
 {
     error_reporting(0);
     $iGroupId = $this->httpRequest->get('group_id', 'int');
     $iBan = $this->httpRequest->get('ban', 'int');
     $sWhere = $this->httpRequest->get('where');
     $sWhat = $this->httpRequest->get('what');
     if ($sWhere !== 'all' && $sWhere !== 'username' && $sWhere !== 'email' && $sWhere !== 'firstName' && $sWhere !== 'lastName' && $sWhere !== 'ip') {
         \PFBC\Form::setError('form_admin_search', 'Invalid argument.');
         HeaderUrl::redirect(Uri::get(PH7_ADMIN_MOD, 'user', 'search'));
     } else {
         $this->iTotalUsers = $this->oAdminModel->searchUser($sWhat, $sWhere, $iGroupId, $iBan, true, $this->httpRequest->get('order'), $this->httpRequest->get('sort'), null, null);
         $this->view->total_users = $this->iTotalUsers;
         $oPage = new Page();
         $this->view->total_pages = $oPage->getTotalPages($this->iTotalUsers, 15);
         $this->view->current_page = $oPage->getCurrentPage();
         $oSearch = $this->oAdminModel->searchUser($sWhat, $sWhere, $iGroupId, $iBan, false, $this->httpRequest->get('order'), $this->httpRequest->get('sort'), $oPage->getFirstItem(), $oPage->getNbItemsByPage());
         unset($oPage);
         if (empty($oSearch)) {
             $this->design->setRedirect(Uri::get(PH7_ADMIN_MOD, 'user', 'search'));
             $this->displayPageNotFound('Empty search result. Please try again with wider or new search parameters.');
         } else {
             // Adding the static files
             $this->design->addCss(PH7_LAYOUT . PH7_TPL . PH7_TPL_NAME . PH7_SH . PH7_CSS, 'browse.css');
             $this->design->addJs(PH7_STATIC . PH7_JS, 'form.js');
             $this->sTitle = t('Users - Your search returned');
             $this->view->page_title = $this->sTitle;
             $this->view->h1_title = $this->sTitle;
             $this->view->h3_title = nt('%n% User Result!', '%n% Users Result!', $this->iTotalUsers);
             $this->view->browse = $oSearch;
         }
         $this->manualTplInclude('browse.tpl');
         $this->output();
     }
 }